Skip to content

Commit 8fdeeb1

Browse files
samlafgastonponti
andauthored
feat(batcher): altda->ethda failover (#34)
* test(altda): add test for altda->ethda failover * feat(batcher): altda->ethda failover when altda is down * chore: fix typos * fix(fakeDAServer): handlePut was still handling put when in failover mode * Update op-batcher/batcher/driver.go Co-authored-by: Gaston Ponti <pontigaston@gmail.com> * chore: better logs in batcher * test(kt-devnet): add batcher failover kurtosis test (#33) * test(kt-devnet): add batcher failover test * chore(kt-devnet): use new proxy image v1.6.5 which has memstore rest routes * test(kt-devnet): fix TestFailover + add comments/logs * ci(kt-devnet): run new kurtosis failover test in ci * test(kt-devnet): remove enclaveCtx from test harness Was not being used and I had put it there only "in case" * test(kt-devnet): refactor failover test to not use hardcoded 10 constant Define l1BlocksQueriedForBatcherTxs and better describe how tests use it Also refactored graphql query to use both FROM and TO blocks, not only FROM. This makes the semantics of the tests easier to understand. * test(kt-devnet): better comments for requireBatcherTxsToBeFromLayer function * teest(kt-devnet): return err from getEndpointsFromKurtosis if EnclaveServiceEndpoints field doesn't have kurtosis tag * docs(kt-failover-test): rename getEndpointsFromKurtosis -> getPublicEndpointsFromKurtosis Also better document the function to explain what its doing * style(kt-devnet): reformat a weirdly tabbed comment * docs(kt-failover-test): describe why we use graphql api insead of l1retriever api * docs(kt-failover-test): add note mentioning that kt tests need to be run sequentially * docs(kt-failover-test): update test name to TestFailoverToEthDACalldata This is done to reflect the fact that batcher currently doesn't support failing over to calldata. * style: fix lint * docs(e2eutils): document returned values for WaitForBlockWithTxFromSender * docs(e2eutils): add doc comment for TransactionsBySender * docs(op-e2e): remove wrong comment in failover_test * docs(op-e2e): better test comment in failover_test * style(op-e2e): merged 2 if statements into one * style: fix comment typo --------- Co-authored-by: Gaston Ponti <pontigaston@gmail.com>
1 parent 3efe6e7 commit 8fdeeb1

20 files changed

Lines changed: 661 additions & 34 deletions

File tree

.github/workflows/kurtosis-devnet.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,5 @@ jobs:
4747
experimental: true
4848
- run: just eigenda-memstore-devnet-start
4949
working-directory: kurtosis-devnet
50+
- run: just eigenda-memstore-devnet-test
51+
working-directory: kurtosis-devnet

go.mod

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ toolchain go1.22.7
66

77
require (
88
github.com/BurntSushi/toml v1.4.0
9+
github.com/Layr-Labs/eigenda-proxy/clients v1.0.1
910
github.com/andybalholm/brotli v1.1.0
1011
github.com/bmatcuk/doublestar/v4 v4.8.1
1112
github.com/btcsuite/btcd v0.24.2

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ github.com/DataDog/datadog-go v2.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3
1616
github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ=
1717
github.com/DataDog/zstd v1.5.6-0.20230824185856-869dae002e5e h1:ZIWapoIRN1VqT8GR8jAwb1Ie9GyehWjVcGh32Y2MznE=
1818
github.com/DataDog/zstd v1.5.6-0.20230824185856-869dae002e5e/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw=
19+
github.com/Layr-Labs/eigenda-proxy/clients v1.0.1 h1:62NFB1fUauwQPGvTiOXhz1HKaL0fRhGy34tI9EpKz6I=
20+
github.com/Layr-Labs/eigenda-proxy/clients v1.0.1/go.mod h1:JbDNvSritUGHErvzwB5Tb1IrVk7kea9DSBLKEOkBebE=
1921
github.com/Masterminds/semver/v3 v3.1.1 h1:hLg3sBzpNErnxhQtUy/mmLR2I9foDujNK030IGemrRc=
2022
github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs=
2123
github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY=

kurtosis-devnet/eigenda-memstore.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ optimism_package:
5151
image: {{ localDockerImage "op-batcher" }}
5252
extra_params:
5353
- --altda.max-concurrent-da-requests=1
54-
- --max-channel-duration=25
54+
- --max-channel-duration=2
5555
- --target-num-frames=1
5656
- --max-l1-tx-size-bytes=1000
5757
- --batch-type=1
@@ -68,7 +68,7 @@ optimism_package:
6868
cannon_prestates_url: "http://fileserver/proofs/op-program/cannon"
6969
extra_params: []
7070
da_server_params:
71-
image: ghcr.io/layr-labs/eigenda-proxy:v1.6.4
71+
image: ghcr.io/layr-labs/eigenda-proxy:v1.6.5
7272
cmd:
7373
- --addr
7474
- 0.0.0.0
@@ -86,6 +86,8 @@ optimism_package:
8686
ethereum_package:
8787
participants:
8888
- el_type: geth
89+
el_extra_params:
90+
- --graphql # needed to query for batcher-inbox txs to test failover working correctly
8991
cl_type: teku
9092
network_params:
9193
preset: minimal

kurtosis-devnet/justfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,10 +155,13 @@ eigenda-memstore-devnet-restart-batcher:
155155
--altda.da-server=http://da-server-op-kurtosis:3100 \
156156
--altda.da-service \
157157
--altda.max-concurrent-da-requests=1 \
158-
--max-channel-duration=25 \
158+
--max-channel-duration=2 \
159159
--target-num-frames=1 \
160160
--max-l1-tx-size-bytes=1000 \
161161
--batch-type=1
162+
[group('eigenda')]
163+
eigenda-memstore-devnet-test:
164+
go test ./tests/eigenda/...
162165

163166
# Simple devnet
164167
simple-devnet: (devnet "simple.yaml")

0 commit comments

Comments
 (0)