Skip to content

Commit

Permalink
feat: EigenDA failover - update cfg name and add test comment
Browse files Browse the repository at this point in the history
  • Loading branch information
epociask committed Nov 7, 2024
1 parent 9bb2e70 commit a49db8f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 4 additions & 3 deletions arbnode/batch_poster.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,8 @@ type BatchPosterDangerousConfig struct {
type BatchPosterConfig struct {
Enable bool `koanf:"enable"`
DisableDapFallbackStoreDataOnChain bool `koanf:"disable-dap-fallback-store-data-on-chain" reload:"hot"`
EnableEigenDAFailover bool `koanf:"eigenda-failover" reload:"hot"`
// Enable failover to AnyTrust (if enabled) or native ETH DA if EigenDA fails.
EnableEigenDAFailover bool `koanf:"enable-eigenda-failover" reload:"hot"`

Check failure on line 154 in arbnode/batch_poster.go

View workflow job for this annotation

GitHub Actions / Go Tests (long)

File is not `gofmt`-ed with `-s` (gofmt)

Check failure on line 154 in arbnode/batch_poster.go

View workflow job for this annotation

GitHub Actions / Go Tests (race)

File is not `gofmt`-ed with `-s` (gofmt)

Check failure on line 154 in arbnode/batch_poster.go

View workflow job for this annotation

GitHub Actions / Go Tests (challenge)

File is not `gofmt`-ed with `-s` (gofmt)

Check failure on line 154 in arbnode/batch_poster.go

View workflow job for this annotation

GitHub Actions / Go Tests (defaults)

File is not `gofmt`-ed with `-s` (gofmt)

Check failure on line 154 in arbnode/batch_poster.go

View workflow job for this annotation

GitHub Actions / Go Tests (stylus)

File is not `gofmt`-ed with `-s` (gofmt)
// Max batch size.
MaxSize int `koanf:"max-size" reload:"hot"`
// Maximum 4844 blob enabled batch size.
Expand Down Expand Up @@ -217,7 +218,7 @@ type BatchPosterConfigFetcher func() *BatchPosterConfig
func BatchPosterConfigAddOptions(prefix string, f *pflag.FlagSet) {
f.Bool(prefix+".enable", DefaultBatchPosterConfig.Enable, "enable posting batches to l1")
f.Bool(prefix+".disable-dap-fallback-store-data-on-chain", DefaultBatchPosterConfig.DisableDapFallbackStoreDataOnChain, "If unable to batch to DA provider, disable fallback storing data on chain")
f.Bool(prefix+".eigenda-failover", DefaultBatchPosterConfig.EnableEigenDAFailover, "If EigenDA fails, failover to AnyTrust (if enabled) or native ETH DA")
f.Bool(prefix+".enable-eigenda-failover", DefaultBatchPosterConfig.EnableEigenDAFailover, "If EigenDA fails, failover to AnyTrust (if enabled) or native ETH DA")
f.Int(prefix+".max-size", DefaultBatchPosterConfig.MaxSize, "maximum batch size")
f.Int(prefix+".max-4844-batch-size", DefaultBatchPosterConfig.Max4844BatchSize, "maximum 4844 blob enabled batch size")
f.Int(prefix+".max-eigenda-batch-size", DefaultBatchPosterConfig.MaxEigenDABatchSize, "maximum EigenDA blob enabled batch size")
Expand Down Expand Up @@ -330,7 +331,7 @@ var EigenDABatchPosterConfig = BatchPosterConfig{
L1BlockBoundBypass: time.Hour,
UseAccessLists: true,
GasEstimateBaseFeeMultipleBips: arbmath.OneInUBips * 3 / 2,
CheckBatchCorrectness: false,
CheckBatchCorrectness: true,
}

type BatchPosterOpts struct {
Expand Down
2 changes: 2 additions & 0 deletions system_tests/eigenda_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ func TestEigenDAProxyFailOverToAnyTrust(t *testing.T) {
builder.nodeConfig.DataAvailability.RestAggregator.Urls = []string{"http://" + restLis.Addr().String()}
builder.nodeConfig.DataAvailability.ParentChainNodeURL = "none"

// set EigenDA params into L2 sequencer config
builder.nodeConfig.EigenDA.Enable = true
builder.nodeConfig.EigenDA.Rpc = proxyURL
builder.nodeConfig.BatchPoster.EnableEigenDAFailover = true
Expand Down Expand Up @@ -225,6 +226,7 @@ func TestEigenDAProxyFailOverToAnyTrust(t *testing.T) {
childNodeConfigB.EigenDA.Enable = true
childNodeConfigB.EigenDA.Rpc = proxyURL
childNodeConfigB.BatchPoster.EnableEigenDAFailover = true
childNodeConfigB.BatchPoster.CheckBatchCorrectness = true

nodeBParams := SecondNodeParams{
nodeConfig: childNodeConfigB,
Expand Down

0 comments on commit a49db8f

Please sign in to comment.