Repository navigation
Update flow-go to master (Cadence v1.10.7 CCF decoder fix) — fixes #1000 - #1001
Closed
vishalchangrani wants to merge 2 commits into
Closed
vishalchangrani wants to merge 2 commits into
vishalchangrani wants to merge 2 commits into
Conversation
The replay loop was passing the trace target's receipt into every BlockExecutor.Run() call. BlockExecutor.Run compares res.GasConsumed to receipt.GasUsed and errors out on mismatch, so any trace of a tx at block index > 0 failed with "used gas mismatch, expected: <target gas>, got: <tx #0 gas>" for every tracer except callTracer (whose hook path happens to produce a GasConsumed value that satisfies the check). Load the block's receipts once up front, key them by tx hash, and look up the correct receipt per tx in the loop — matching what traceBlockByNumber already does. Fixes #998 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Bumps github.com/onflow/flow-go to v0.51.1-0.20261113165525-fe155581e20d (master tip), which transitively pulls in onflow/cadence v1.10.7. This fixes the CCF decoder bug that caused FF internal mainnet ingestion to wedge on 2026-11-13 after AN8 was upgraded to v0.51.2 (see #1000 and onflow/flow-go#8701). Cadence v1.10.7 adds decoder-side handling for CBOR nil values in ReferenceType (cyclic references), covariant array/dictionary types encoded via CBORTagTypeAndValue, and nil values in composite fields. v1.10.7 ships a regression test with the real mainnet event payload that v1.10.6 rejected. Targets master rather than v0.51.2 so we keep the errors.Is unwrap in ExecutionErrorCode() introduced by onflow/flow-go#8679 (the fix PR #993 pulled in). v0.51.2 reverts that and ships a stricter ValidateResult error-code comparison in parallel, which risks reintroducing the operator-crash scenario PR #993 fixed. Applied to both the root module and tests/ in lockstep. Pure dep bump, no gateway code changes. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Contributor
Author
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.
Summary
Bump
github.com/onflow/flow-goto a master pseudo-version that includes Cadence v1.10.7. This fixes the CCF decoder bug that caused the FF internal mainnet ingestion wedge on 2026-11-13 (#1000) immediately after upstream AN8 was upgraded to docker tagv0.51.2.Cadence v1.10.7 adds decoder-side support for CBOR nil values in
ReferenceType(cyclic references), covariant array/dictionary types encoded viaCBORTagTypeAndValue, andnilvalues in composite fields — all surfaced by scheduled-transaction system events on mainnet (onflow/flow-go#8701). The v1.10.7 regression test (e982440 add regression test with mainnet event payload) exercises the actual mainnet payload that was tripping v1.10.6.Also bumps
tests/go.modin lockstep.Why master, not v0.51.2
v0.51.2 is on the
v0.51release branch and reverts onflow/flow-go#8679 (Handle both unwrapped & wrapped Geth VM errors in ExecutionErrorCode()) while tighteningValidateResultto compare exactErrorCodeinstead of just success/failed status. The combination risks reintroducing the operator-crash scenario PR #993 fixed (wrapped Geth VM errors mapping toExecutionErrCodeMiscon one side and to the specific code on the other, under strict code comparison).Master keeps the
errors.Isunwrap infvm/evm/types/codeFinder.goAND pinsonflow/cadence v1.10.7. See #1000 for the full writeup.What does NOT change in this PR
--force-start-heightsemantics orRegisterStoragelayout.Test plan
Precondition: EN fleet alignment
Confirm what flow-go commit the mainnet EN fleet is running before merging. If ENs are on vanilla v0.51.2 (release-branch) we have an asymmetry on wrapped Geth errors even with this bump: ENs would emit
ExecutionErrCodeMisc, gateway would unwrap to the specific code, stricterValidateResultfails. Safest state: ENs and gateway both on a master pseudo-version past #8679.Local
go mod tidyleaves a clean diff in rootgo.mod/go.sumandtests/go.mod/tests/go.sum.go build ./...at repo root succeeds.go build ./...intests/succeeds.go test ./models/... ./storage/... ./services/ingestion/...passes (events decoding, register store, ingestion engine).go test ./tests/...passes the integration/web3js suite.FF testnet smoke (
evm-001.devnet0.nodes.onflow.org:8000)v1.5.9-rc.2).--force-start-height(testnet should not need rewind — check first that its ingestion is healthy at the moment of deploy).received new cadence evm eventswith non-zero event lengths; nofailed to process EVM events; nofailed to replay block on height.eth_blockNumberadvances steadily;eth_chainIdreturns testnet.FF internal mainnet (
evm-001.mainnet0.nodes.onflow.org:8000) — the wedged nodeThe register store diverged at EVM block 85,022,353 (Cadence ~171,027,516). Rewind to a margin before that.
FLOW_FORCE_START_CADENCE_HEIGHT=171027500(or equivalent flag per deploy config).force setting starting Cadence height!!!thenbootstrap starting API server(per PR Update flow-go to master (onflow/flow-go#8679) and fix force-start-height stall #993 this should not stall).received new cadence evm eventsat heights 171,027,500 → 171,027,520 and beyond.cadence-event-lengthand no "heartbeat" skip. This is the before/after signal.failed to replay block on height: 85022353or85022357.eth_getTransactionCount(0xe87cA221C48c3Abf7Feba933c2c2E858721835D7, 0x5115695)returns0x1436b(82,795) — matches public mainnet.eth_getTransactionByHash(0xcfa1d40d4a23eebcd49866d94f9a33bce301b8064570ece680f28ccbe19dac55)returns the tx withblockNumber: 0x5115695.eth_getTransactionCount(addr, 0x5115694)for the senders in blocks 85,022,350-85,022,356 (via public mainnet as ground truth) and spot-check against internal mainnet.FF public mainnet (
mainnet.evm.nodes.onflow.org)Only after FF internal mainnet is clean for a few hours. Public mainnet is currently on v1.5.7 — if it hasn't crashed yet, it may just not have hit the problematic Cadence block yet, OR the register state divergence may have happened on another EOA that hasn't resurfaced. Rewind window should cover the AN upgrade epoch.
--force-start-heightset to a safe margin before the AN8 upgrade timestamp.Rollback
If the bump introduces a regression (error-code mismatch under strict
ValidateResult, or anything else), revert to v1.5.9-rc.1 binary. The underlying CCF decoder bug returns — until EN alignment is confirmed and we re-attempt the bump.References
event_encoding_versionis not configurable flow-go#8701 — CCF decoder bug + REST hotfix context