From 82acd87472f8f24c986586fc587a720a285cce51 Mon Sep 17 00:00:00 2001 From: scx1332 Date: Thu, 19 Feb 2026 19:16:48 +0100 Subject: [PATCH 1/8] Patch for optimism. Fix wrong error type. Fix busy loop. Greater limits for batcher. --- op-alt-da/damgr.go | 5 ++++- op-alt-da/params.go | 8 +++++++- op-batcher/batcher/driver.go | 3 +++ op-node/rollup/derive/altda_data_source.go | 6 ++++++ op-node/rollup/derive/frame.go | 7 ++++++- 5 files changed, 26 insertions(+), 3 deletions(-) diff --git a/op-alt-da/damgr.go b/op-alt-da/damgr.go index 15814263c4..10c7cdb7c5 100644 --- a/op-alt-da/damgr.go +++ b/op-alt-da/damgr.go @@ -23,6 +23,9 @@ var ErrPendingChallenge = errors.New("not found, pending challenge") // ErrExpiredChallenge is returned when a challenge was not resolved and derivation should skip this input. var ErrExpiredChallenge = errors.New("challenge expired") +// ErrCommitmentTypeMismatch is returned when the commitment type of the input does not match the expected commitment type in the config. +var ErrCommitmentTypeMismatch = errors.New("commitment type mismatch") + // ErrMissingPastWindow is returned when the input data is MIA and cannot be challenged. // This is a protocol fatal error. var ErrMissingPastWindow = errors.New("data missing past window") @@ -193,7 +196,7 @@ func (d *DA) Reset(ctx context.Context, base eth.L1BlockRef, baseCfg eth.SystemC func (d *DA) GetInput(ctx context.Context, l1 L1Fetcher, comm CommitmentData, blockId eth.L1BlockRef) (eth.Data, error) { // If it's not the right commitment type, report it as an expired commitment in order to skip it if d.cfg.CommitmentType != comm.CommitmentType() { - return nil, fmt.Errorf("invalid commitment type; expected: %v, got: %v: %w", d.cfg.CommitmentType, comm.CommitmentType(), ErrExpiredChallenge) + return nil, fmt.Errorf("invalid commitment type; expected: %v, got: %v: %w", d.cfg.CommitmentType, comm.CommitmentType(), ErrCommitmentTypeMismatch) } status := d.state.GetChallengeStatus(comm, blockId.Number) // check if the challenge is expired diff --git a/op-alt-da/params.go b/op-alt-da/params.go index bc0762ba13..52ca484bfe 100644 --- a/op-alt-da/params.go +++ b/op-alt-da/params.go @@ -3,4 +3,10 @@ package altda // MaxInputSize ensures the canonical chain cannot include input batches too large to // challenge in the Data Availability Challenge contract. Value in number of bytes. // This value can only be changed in a hard fork. -const MaxInputSize = 130672 + +//const MaxInputSize = 130672 + +// scx1332 - ovveride MaxInputSize to 10MB for testing purposes, +// to allow for larger batches to be included in the canonical chain and tested in the Data Availability Challenge contract. +// This should be removed before mainnet deployment. +const MaxInputSize = 10 * 1024 * 1024 diff --git a/op-batcher/batcher/driver.go b/op-batcher/batcher/driver.go index 4630df4a6f..afde21d4cb 100644 --- a/op-batcher/batcher/driver.go +++ b/op-batcher/batcher/driver.go @@ -952,6 +952,9 @@ func (l *BatchSubmitter) publishToAltDAAndL1(txdata txData, queue *txmgr.Queue[t // is already reached. Since we can't send the txdata, we have to // return it for later processing. We use nil error to skip error logging. l.recordFailedDARequest(txdata.ID(), nil) + l.Log.Warn("Max concurrent DA requests reached, unable to publish to Alt DA at this time") + // Avoid busy looping + time.Sleep(1 * time.Second) } } diff --git a/op-node/rollup/derive/altda_data_source.go b/op-node/rollup/derive/altda_data_source.go index 2945a2a9e5..603c8b5c6f 100644 --- a/op-node/rollup/derive/altda_data_source.go +++ b/op-node/rollup/derive/altda_data_source.go @@ -77,6 +77,12 @@ func (s *AltDADataSource) Next(ctx context.Context) (eth.Data, error) { if errors.Is(err, altda.ErrReorgRequired) { // challenge for a new previously derived commitment expired. return nil, NewResetError(err) + } else if errors.Is(err, altda.ErrCommitmentMismatch) { + // expected different commitment type + s.log.Error("commitment mismatch, skipping batch", "err", err.Error()) + s.comm = nil + // skip the input + return s.Next(ctx) } else if errors.Is(err, altda.ErrExpiredChallenge) { // this commitment was challenged and the challenge expired. s.log.Warn("challenge expired, skipping batch", "comm", s.comm) diff --git a/op-node/rollup/derive/frame.go b/op-node/rollup/derive/frame.go index e18562560e..243e4e7587 100644 --- a/op-node/rollup/derive/frame.go +++ b/op-node/rollup/derive/frame.go @@ -13,7 +13,12 @@ import ( // Frames cannot be larger than 1 MB. // Data transactions that carry frames are generally not larger than 128 KB due to L1 network conditions, // but we leave space to grow larger anyway (gas limit allows for more data). -const MaxFrameLen = 1_000_000 +//const MaxFrameLen = 1_000_000 + +// scx1332 - override MaxFrameLen to 11MB for testing purposes, +// to allow for larger batches to be included in the canonical chain and tested in the Data Availability Challenge contract. +// This should be removed before mainnet deployment. +const MaxFrameLen = 11 * 1024 * 1024 // Data Format // From 9d8bf0e4b7464140285db8d63a6fc305b88cd534 Mon Sep 17 00:00:00 2001 From: scx1332 Date: Mon, 23 Feb 2026 12:36:49 +0100 Subject: [PATCH 2/8] Apply suggestion from @Copilot Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- op-alt-da/params.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/op-alt-da/params.go b/op-alt-da/params.go index 52ca484bfe..daf029d17e 100644 --- a/op-alt-da/params.go +++ b/op-alt-da/params.go @@ -6,7 +6,7 @@ package altda //const MaxInputSize = 130672 -// scx1332 - ovveride MaxInputSize to 10MB for testing purposes, +// scx1332 - override MaxInputSize to 10MB for testing purposes, // to allow for larger batches to be included in the canonical chain and tested in the Data Availability Challenge contract. // This should be removed before mainnet deployment. const MaxInputSize = 10 * 1024 * 1024 From ff8c52c8b79b0910992f947a6508cbdd12405ff8 Mon Sep 17 00:00:00 2001 From: scx1332 Date: Mon, 23 Feb 2026 12:37:19 +0100 Subject: [PATCH 3/8] Apply suggestion from @Copilot Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- op-node/rollup/derive/altda_data_source.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/op-node/rollup/derive/altda_data_source.go b/op-node/rollup/derive/altda_data_source.go index 603c8b5c6f..b5819a5f05 100644 --- a/op-node/rollup/derive/altda_data_source.go +++ b/op-node/rollup/derive/altda_data_source.go @@ -77,7 +77,7 @@ func (s *AltDADataSource) Next(ctx context.Context) (eth.Data, error) { if errors.Is(err, altda.ErrReorgRequired) { // challenge for a new previously derived commitment expired. return nil, NewResetError(err) - } else if errors.Is(err, altda.ErrCommitmentMismatch) { + } else if errors.Is(err, altda.ErrCommitmentTypeMismatch) { // expected different commitment type s.log.Error("commitment mismatch, skipping batch", "err", err.Error()) s.comm = nil From 96f74ddaac12a6cdd8240e4e7b22e4c903229656 Mon Sep 17 00:00:00 2001 From: scx1332 Date: Mon, 23 Feb 2026 12:37:52 +0100 Subject: [PATCH 4/8] Apply suggestion from @Copilot Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- op-node/rollup/derive/altda_data_source.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/op-node/rollup/derive/altda_data_source.go b/op-node/rollup/derive/altda_data_source.go index b5819a5f05..2c6907cf1e 100644 --- a/op-node/rollup/derive/altda_data_source.go +++ b/op-node/rollup/derive/altda_data_source.go @@ -79,7 +79,7 @@ func (s *AltDADataSource) Next(ctx context.Context) (eth.Data, error) { return nil, NewResetError(err) } else if errors.Is(err, altda.ErrCommitmentTypeMismatch) { // expected different commitment type - s.log.Error("commitment mismatch, skipping batch", "err", err.Error()) + s.log.Warn("commitment mismatch, skipping batch", "err", err.Error()) s.comm = nil // skip the input return s.Next(ctx) From 7e476eb706b67b30c67250b4004a10f74a5b1e25 Mon Sep 17 00:00:00 2001 From: scx1332 Date: Mon, 23 Feb 2026 12:40:18 +0100 Subject: [PATCH 5/8] Change to 10 --- op-node/rollup/derive/frame.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/op-node/rollup/derive/frame.go b/op-node/rollup/derive/frame.go index 243e4e7587..fafca796dc 100644 --- a/op-node/rollup/derive/frame.go +++ b/op-node/rollup/derive/frame.go @@ -18,7 +18,7 @@ import ( // scx1332 - override MaxFrameLen to 11MB for testing purposes, // to allow for larger batches to be included in the canonical chain and tested in the Data Availability Challenge contract. // This should be removed before mainnet deployment. -const MaxFrameLen = 11 * 1024 * 1024 +const MaxFrameLen = 10 * 1024 * 1024 // Data Format // From b00e5fef4beb44a27131b90fee166ee9cd4593ec Mon Sep 17 00:00:00 2001 From: scx1332 Date: Mon, 23 Feb 2026 18:52:25 +0100 Subject: [PATCH 6/8] Update release on tag action with performance test request --- .github/workflows/release-on-tag.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/workflows/release-on-tag.yml b/.github/workflows/release-on-tag.yml index 26843dd638..37ba052a4a 100644 --- a/.github/workflows/release-on-tag.yml +++ b/.github/workflows/release-on-tag.yml @@ -85,3 +85,17 @@ jobs: files: arkiv-${{ matrix.binary }}-*.tar.xz env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + start-performance-tests: + needs: build-and-upload + runs-on: ubuntu-latest + steps: + - name: Trigger Performance Tests + run: | + echo "Triggering performance tests for release ${{ github.ref_name }}" + # Here you can add commands to trigger your performance tests, e.g., via API calls or other means + BEARER = ${{ secrets.TEST_TRACKER_BEARER_KEY }} + URL = ${{ secrets.TEST_TRACKER_URL }}/public/test/run/NewBuild + + curl -X POST -H "Authorization: Bearer $BEARER" $URL + From 6643bb714765da5729845cf234d867063d89bc79 Mon Sep 17 00:00:00 2001 From: scx1332 Date: Mon, 23 Feb 2026 19:00:41 +0100 Subject: [PATCH 7/8] Fix spawn action command --- .github/workflows/release-on-tag.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release-on-tag.yml b/.github/workflows/release-on-tag.yml index 37ba052a4a..0a1bbd584c 100644 --- a/.github/workflows/release-on-tag.yml +++ b/.github/workflows/release-on-tag.yml @@ -94,8 +94,8 @@ jobs: run: | echo "Triggering performance tests for release ${{ github.ref_name }}" # Here you can add commands to trigger your performance tests, e.g., via API calls or other means - BEARER = ${{ secrets.TEST_TRACKER_BEARER_KEY }} - URL = ${{ secrets.TEST_TRACKER_URL }}/public/test/run/NewBuild + BEARER=${{ secrets.TEST_TRACKER_BEARER_KEY }} + URL=${{ secrets.TEST_TRACKER_URL }}/public/test/run/NewBuild curl -X POST -H "Authorization: Bearer $BEARER" $URL From 631a59379e27f6ee1bcc83dd36373c344dc7e3c5 Mon Sep 17 00:00:00 2001 From: scx1332 Date: Mon, 23 Feb 2026 19:10:44 +0100 Subject: [PATCH 8/8] More elegant solution --- .github/workflows/release-on-tag.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release-on-tag.yml b/.github/workflows/release-on-tag.yml index 0a1bbd584c..738e1b5ceb 100644 --- a/.github/workflows/release-on-tag.yml +++ b/.github/workflows/release-on-tag.yml @@ -95,7 +95,7 @@ jobs: echo "Triggering performance tests for release ${{ github.ref_name }}" # Here you can add commands to trigger your performance tests, e.g., via API calls or other means BEARER=${{ secrets.TEST_TRACKER_BEARER_KEY }} - URL=${{ secrets.TEST_TRACKER_URL }}/public/test/run/NewBuild + URL=${{ secrets.TEST_TRACKER_URL }}/public/test/run/OptimismBuild - curl -X POST -H "Authorization: Bearer $BEARER" $URL + curl -X POST -H "Authorization: Bearer $BEARER" -f -s $URL