fix(giga): fall back to v2 on execution errors#3768
Conversation
Co-authored-by: Philip Su <philip.su.522@gmail.com>
|
The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3768 +/- ##
==========================================
- Coverage 59.92% 59.02% -0.91%
==========================================
Files 2288 2201 -87
Lines 190180 180310 -9870
==========================================
- Hits 113971 106419 -7552
+ Misses 66049 64534 -1515
+ Partials 10160 9357 -803
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
bdchatham
left a comment
There was a problem hiding this comment.
This is a live bugfix, not just defense: the new test fails on main at receipt parity (giga stamps TxType=2, gasUsed=gasLimit; v2 writes the EndBlock synthetic receipt with zeros) while consensus fields match. State the red-proof in the description so the severity (RPC-level receipt divergence on mixed fleets) is on record.
Co-authored-by: FromTheRain <bdchatham@users.noreply.github.com>
Live mixed-fleet validation on harborValidated this PR end-to-end on an ephemeral harbor chain: 4 validators + one v2 RPC node ( Probe: EIP-7623 floor-data-gas tx (1000 zero calldata bytes, gasLimit 27500 — clears the ante's intrinsic check, fails inside geth's Pre-fix giga node — divergence reproduced. Same tx hash,
Consensus held throughout (nonce, sender balance, and fee charge matched v2 on both executors) — receipt-only divergence, invisible to the AppHash/LastResultsHash gate, per the RCA. This PR's image — fixed. Giga node on
The qa-testing spec now guards this class continuously: it locks the canonical v2 receipt shape at the RPC surface, so a regression on any executor fails it regardless of which node serves the query. |
Describe your changes and provide context
This fixes a live RPC-level divergence, not only a defensive edge case. On
main, the parity test reaches matching consensus fields but fails receipt parity: Giga stampsTxType=2andgasUsed=gasLimit, while V2 writes an EndBlock synthetic receipt with zero values. Mixed Giga/V2 fleets can therefore return different receipts for the same transaction.State-transition errors now route through the existing V2 fallback instead of duplicating V2's fee, nonce, receipt, deferred-info, and ABCI result handling. This adds an
execution_failedabort sentinel and fallback metric reason. Because the Giga StateDB has not been finalized whenExecuteTransactionFeeChargedreturns an error, its transaction-local cache is discarded before V2 re-runs the transaction. Both sequential and OCC Giga paths use the existing fallback plumbing.The EIP-7623 floor-data-gas parity test covers deterministic ABCI fields, LastResultsHash, nonce, receipt, sender balance, fee-collector balance, and per-transaction coinbase balance in sequential and OCC modes.
Operational tradeoff: this creates the first deterministic single-transaction trigger that passes CheckTx at roughly 27.5k gas but reverts an entire OCC batch to V2. Operators should alert on
app_giga_fallback_to_v2{reason="execution_failed"}; per-transaction OCC fallback should be tracked as follow-up work.Testing performed to validate your change
go test ./giga/tests -run '^TestGiga_FailedExecutionFallsBackToV2$' -count=1go test ./giga/tests -count=1go test ./app -run 'TestGiga|TestOCC|TestProcess' -count=1gofmt -sandgoimportson all changed Go filesSlack Thread