Skip to content

Reduced the amount of time we spend encoding blocks - #146

Merged
didac-gluwa merged 2 commits into
mainfrom
reduce_decoding_workflow_tx_amount
Aug 20, 2026
Merged

Reduced the amount of time we spend encoding blocks#146
didac-gluwa merged 2 commits into
mainfrom
reduce_decoding_workflow_tx_amount

Conversation

@didac-gluwa

Copy link
Copy Markdown
Contributor

No description provided.

@didac-gluwa
didac-gluwa requested review from a team, BradleyOlson64, DylanVerstraete, beqaabu, creditcoinprotoclaw, jakerumbles and mdbig1 and removed request for a team August 20, 2026 18:28
@didac-gluwa
didac-gluwa merged commit 043333a into main Aug 20, 2026
13 of 15 checks passed
@didac-gluwa
didac-gluwa deleted the reduce_decoding_workflow_tx_amount branch August 20, 2026 19:22
beqaabu added a commit that referenced this pull request Aug 24, 2026
…tested

The skip guard from the previous commit was too blunt and failed this PR's own
decode-transactions checks: `50/50 proof lookups were skipped
(BlockNotOnSourceChain=50)`. Those skips were legitimate, and chasing them down
corrects the diagnosis behind that commit.

Attestation trails the source chain by roughly 30-40 blocks (~7 minutes,
measured on both chains). #146 cut the encode window from 30 minutes to 3, so
decode now only ever sees blocks minutes old — inside that lag — and the prover
correctly answers 'BlockNotOnSourceChain'. The transaction counts show the same
break exactly where #146 landed:

    2026-08-20 (30 min window): 15,710-42,615 txns, verification gas nonzero
    2026-08-21 onwards (3 min):  1,720-5,142 txns, verification gas all zero

So the verification-gas check going quiet is fallout from the shortened window,
not a broken prover: `cc3_rpc_connected: false` on the prover's health endpoint
is real but unrelated, and it still serves proofs and advances attested heights
for blocks old enough to have them.

The guard now classifies each skip (src/bin/proof-skips.ts, kept out of the
SDK's public surface):

- block newer than the latest attested height, or an empty block: expected, no
  proof can exist yet
- block at or below the attested height: unexpected — the proof should be there,
  so this is the prover genuinely failing, and only these count towards the
  90%-over-50-lookups failure threshold
- either height unknown: treated as expected, rather than failing a run over a
  missing data point

The attested height comes from chain-info's precompile provider, read lazily on
the first skip and cached for a minute; a stale (lower) height only makes the
classification more forgiving.

A run where *every* transaction was skipped now warns loudly that verification
gas was never measured and that the encode window is shorter than the
attestation lag. That is the real coverage regression from #146 and it is a
call for the team, so it warns rather than fails.

Verified: build and prettier clean; 16 tests over the classification (using the
block heights and attestation values observed in the failing runs), the
threshold arithmetic, and rate-limit retry behaviour.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
beqaabu added a commit that referenced this pull request Aug 26, 2026
…tested

The skip guard from the previous commit was too blunt and failed this PR's own
decode-transactions checks: `50/50 proof lookups were skipped
(BlockNotOnSourceChain=50)`. Those skips were legitimate, and chasing them down
corrects the diagnosis behind that commit.

Attestation trails the source chain by roughly 30-40 blocks (~7 minutes,
measured on both chains). #146 cut the encode window from 30 minutes to 3, so
decode now only ever sees blocks minutes old — inside that lag — and the prover
correctly answers 'BlockNotOnSourceChain'. The transaction counts show the same
break exactly where #146 landed:

    2026-08-20 (30 min window): 15,710-42,615 txns, verification gas nonzero
    2026-08-21 onwards (3 min):  1,720-5,142 txns, verification gas all zero

So the verification-gas check going quiet is fallout from the shortened window,
not a broken prover: `cc3_rpc_connected: false` on the prover's health endpoint
is real but unrelated, and it still serves proofs and advances attested heights
for blocks old enough to have them.

The guard now classifies each skip (src/bin/proof-skips.ts, kept out of the
SDK's public surface):

- block newer than the latest attested height, or an empty block: expected, no
  proof can exist yet
- block at or below the attested height: unexpected — the proof should be there,
  so this is the prover genuinely failing, and only these count towards the
  90%-over-50-lookups failure threshold
- either height unknown: treated as expected, rather than failing a run over a
  missing data point

The attested height comes from chain-info's precompile provider, read lazily on
the first skip and cached for a minute; a stale (lower) height only makes the
classification more forgiving.

A run where *every* transaction was skipped now warns loudly that verification
gas was never measured and that the encode window is shorter than the
attestation lag. That is the real coverage regression from #146 and it is a
call for the team, so it warns rather than fails.

Verified: build and prettier clean; 16 tests over the classification (using the
block heights and attestation values observed in the failing runs), the
threshold arithmetic, and rate-limit retry behaviour.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant