Reduced the amount of time we spend encoding blocks - #146
Merged
Conversation
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
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.