chainsmeta: tolerate SystemConfig 4.0.0 removed getters#1799
Open
mds1 wants to merge 1 commit into
Open
Conversation
SystemConfig 4.0.0 (op-contracts v8.0.0) removes batchInbox, startBlock, BATCH_INBOX_SLOT, and START_BLOCK_SLOT. Reverts were already recorded as None; also treat empty 0x eth_call results the same way instead of producing garbage decodes. Co-Authored-By: Claude Fable 5 <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.
SystemConfig 4.0.0 (op-contracts v8.0.0, ethereum-optimism/optimism#21641) removes the
batchInbox(),startBlock(),BATCH_INBOX_SLOT(), andSTART_BLOCK_SLOT()getters that the chainsmeta systemconfig ingest calls on every chain. Chains upgrade at different times, so the ingest must tolerate both versions indefinitely.The pipeline already treats per-method reverts as None (that is how
operatorFeeScalarand friends work on not-yet-upgraded chains), so reverts from removed getters were already handled. The actual gap: some nodes answer aneth_callto a removed method with an empty0xresult instead of a revert, which previously produced garbage for address fields ("0x0x") or raised for int fields. This PR treats an empty result the same as a revert, marks the two slot annotationsOptional, and adds a test covering both failure shapes against a 4.0.0 SystemConfig.No SQL changes — the ClickHouse columns are already
Nullable. Historical rows keep their values; post-upgrade rows get NULL for the removed fields.Tests:
uv run pytest tests/op_analytics/datasources/chainsmeta/ -v→ 19 passed; mypy and ruff clean.Related PRs: ethereum-optimism/optimism#21641 (contracts), ethereum-optimism/specs#922 (spec), ethereum-optimism/superchain-ops#1492 (upgrade tooling), the dev-docs edit rides along in the monorepo PR. Context: ethereum-optimism/optimism#21614.