Skip to content

Update flow-go to master (Cadence v1.10.7 CCF decoder fix) — fixes #1000 - #1001

Closed
vishalchangrani wants to merge 2 commits into
mainfrom
vishal/bump-flow-go-cadence-v1.10.7
Closed

vishalchangrani wants to merge 2 commits into
mainfrom
vishal/bump-flow-go-cadence-v1.10.7

Conversation

@vishalchangrani

Copy link
Copy Markdown
Contributor

Summary

Bump github.com/onflow/flow-go to 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 tag v0.51.2.

Cadence v1.10.7 adds decoder-side support for CBOR nil values in ReferenceType (cyclic references), covariant array/dictionary types encoded via CBORTagTypeAndValue, and nil values 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.mod in lockstep.

Why master, not v0.51.2

v0.51.2 is on the v0.51 release branch and reverts onflow/flow-go#8679 (Handle both unwrapped & wrapped Geth VM errors in ExecutionErrorCode()) while tightening ValidateResult to compare exact ErrorCode instead of just success/failed status. The combination risks reintroducing the operator-crash scenario PR #993 fixed (wrapped Geth VM errors mapping to ExecutionErrCodeMisc on one side and to the specific code on the other, under strict code comparison).

Master keeps the errors.Is unwrap in fvm/evm/types/codeFinder.go AND pins onflow/cadence v1.10.7. See #1000 for the full writeup.

What does NOT change in this PR

  • No gateway code changes. Pure dep bump.
  • No change to --force-start-height semantics or RegisterStorage layout.
  • The existing stale state on FF internal mainnet is NOT auto-healed by this bump. Rewind is required on deploy (see test plan).

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, stricter ValidateResult fails. Safest state: ENs and gateway both on a master pseudo-version past #8679.

Local

  • go mod tidy leaves a clean diff in root go.mod/go.sum and tests/go.mod/tests/go.sum.
  • go build ./... at repo root succeeds.
  • go build ./... in tests/ 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)

  • Build+push image tag (e.g. v1.5.9-rc.2).
  • Deploy to FF testnet with no --force-start-height (testnet should not need rewind — check first that its ingestion is healthy at the moment of deploy).
  • Tail ingestion logs for 10 min. Look for received new cadence evm events with non-zero event lengths; no failed to process EVM events; no failed to replay block on height.
  • Smoke the 5 tracers for a tx at a block with index > 0 (the v1.5.9-rc.1 trace receipt fix should still work — regression check).
  • eth_blockNumber advances steadily; eth_chainId returns testnet.

FF internal mainnet (evm-001.mainnet0.nodes.onflow.org:8000) — the wedged node

The register store diverged at EVM block 85,022,353 (Cadence ~171,027,516). Rewind to a margin before that.

  • Stop the service.
  • Set FLOW_FORCE_START_CADENCE_HEIGHT=171027500 (or equivalent flag per deploy config).
  • Deploy the new RC image.
  • Start the service and tail logs. Expected:
    • force setting starting Cadence height!!! then bootstrap 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).
    • Sequential received new cadence evm events at heights 171,027,500 → 171,027,520 and beyond.
    • At Cadence ~171,027,516: non-empty cadence-event-length and no "heartbeat" skip. This is the before/after signal.
    • No failed to replay block on height: 85022353 or 85022357.
  • Once past the previous crash height, verify replay with an RPC query:
    • eth_getTransactionCount(0xe87cA221C48c3Abf7Feba933c2c2E858721835D7, 0x5115695) returns 0x1436b (82,795) — matches public mainnet.
    • eth_getTransactionByHash(0xcfa1d40d4a23eebcd49866d94f9a33bce301b8064570ece680f28ccbe19dac55) returns the tx with blockNumber: 0x5115695.
  • Let it run 30 min and check for any new ingestion errors. Also scan for other EOAs that may have had state updates in the same skipped Cadence block — proactively query 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.

  • Deploy the RC image with --force-start-height set to a safe margin before the AN8 upgrade timestamp.
  • Same log/replay verification as internal mainnet.
  • Monitor Grafana dashboards for a few hours before cutting the tag as a release.

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

vishalchangrani and others added 2 commits October 1, 2026 12:15
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>
@coderabbitai

coderabbitai Bot commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

@vishalchangrani

Copy link
Copy Markdown
Contributor Author

Superseded by #1002 — this branch was accidentally stacked on the trace-receipt fix (#999), so the diff pulled in that commit too. #1002 is the clean main-branched equivalent with just the flow-go bump.

@vishalchangrani
vishalchangrani deleted the vishal/bump-flow-go-cadence-v1.10.7 branch November 13, 2026 23:31
@github-project-automation github-project-automation Bot moved this from 👀 In Review to ✅ Done in 🌊 Flow 4D Nov 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

1 participant