-
Notifications
You must be signed in to change notification settings - Fork 555
eth: fixes in receipt handling via p2p post HF #1825
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
lucca30
merged 8 commits into
lmartins/state-sync-txs-on-block-body
from
include-bor-receipt-for-roothash-calc-post-hf
Oct 20, 2025
Merged
eth: fixes in receipt handling via p2p post HF #1825
lucca30
merged 8 commits into
lmartins/state-sync-txs-on-block-body
from
include-bor-receipt-for-roothash-calc-post-hf
Oct 20, 2025
+358
−58
Conversation
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
lucca30
approved these changes
Oct 15, 2025
…-receipt-for-roothash-calc-post-hf
|
marcello33
approved these changes
Oct 20, 2025
be7f430
into
lmartins/state-sync-txs-on-block-body
6 of 8 checks passed
manav2401
added a commit
that referenced
this pull request
Oct 30, 2025
* first working version of new state sync tx * remove logs * fix lint * fix integration tests * test fixes * lint fix * fix parallel processor * type improvement and unit tests * remove duplicates * ignore data test output * fixing method calls and fields * build fix * remove bor filter for after hf blocks * sort logs just when necessary * ssTxs: fix receiptsHash mismatch (#1829) * ssTxs: fix receiptsHash mismatch * chore: remove block hash and number * revert: add block number * core(tx): fix Hash method for StateSyncTxType (#1830) * eth: fixes in receipt handling via p2p post HF (#1825) * eth: include bor receipts in ReceiptHash post HF * eth: rename to receiptListHash * eth: extrat typecasting logic for better testing, fix type matching issue * eth: add e2e tests for receipt delivery * eth/protocols/eth: apply HF logic while handling receipt query over eth69 * core: skip split receipts post HF * tests/bor: extend e2e test to check presence of state-sync in block * core/types: return nil for chainID() call over state-sync tx * internal/ethapi: handle bor txs and receipts post HF (#1834) * fix: cumulativeGasUsed in insertStateSyncTransactionAndCalculateReceipt (#1835) * fix: sort logs and remove duplicate append in Finalize (#1836) * fix: append tx only in FinalizeAndAssemble and use state instead of wrappedState * consensus/bor: sort logs before extracting state-sync logs * chore: revert statedb changes --------- Co-authored-by: Manav Darji <[email protected]> * chore: nit (#1838) * chore: typos * fix: lint * Renaming to Madhugiri HF * chore: nits * (fix): handle pointers to receipt list received via p2p * (chore): rename tests with HF name * chore: more nits * core: add blocktime in bor receipt logs (#1848) * core/types: derive bloom for bor receipts --------- Co-authored-by: kamuikatsurgi <[email protected]> Co-authored-by: Krishang Shah <[email protected]> Co-authored-by: Manav Darji <[email protected]>
manav2401
added a commit
that referenced
this pull request
Oct 30, 2025
…1842) * first working version of new state sync tx * remove logs * fix lint * fix integration tests * test fixes * lint fix * fix parallel processor * type improvement and unit tests * remove duplicates * ignore data test output * fixing method calls and fields * build fix * remove bor filter for after hf blocks * sort logs just when necessary * ssTxs: fix receiptsHash mismatch (#1829) * ssTxs: fix receiptsHash mismatch * chore: remove block hash and number * revert: add block number * core(tx): fix Hash method for StateSyncTxType (#1830) * eth: fixes in receipt handling via p2p post HF (#1825) * eth: include bor receipts in ReceiptHash post HF * eth: rename to receiptListHash * eth: extrat typecasting logic for better testing, fix type matching issue * eth: add e2e tests for receipt delivery * eth/protocols/eth: apply HF logic while handling receipt query over eth69 * core: skip split receipts post HF * tests/bor: extend e2e test to check presence of state-sync in block * core/types: return nil for chainID() call over state-sync tx * internal/ethapi: handle bor txs and receipts post HF (#1834) * fix: cumulativeGasUsed in insertStateSyncTransactionAndCalculateReceipt (#1835) * fix: sort logs and remove duplicate append in Finalize (#1836) * fix: append tx only in FinalizeAndAssemble and use state instead of wrappedState * consensus/bor: sort logs before extracting state-sync logs * chore: revert statedb changes --------- Co-authored-by: Manav Darji <[email protected]> * chore: nit (#1838) * chore: typos * fix: lint * Renaming to Madhugiri HF * chore: nits * (fix): handle pointers to receipt list received via p2p * (chore): rename tests with HF name * chore: more nits * core: implement eip7883 * core: implement eip7825 * fix lint * fix isOsaka condition * fix lint and add comment for int test failing * fix failing test / address comments * core: add blocktime in bor receipt logs (#1848) * core/types: derive bloom for bor receipts * prioritize ss hf / remove todo * fix lint * split precompiled contracts and addresses for madhugiri HF from osaka * revert err msg to align with geth * eth/gasestimator: check ErrGasLimitTooHigh conditions (#32348) This PR makes 2 changes to how [EIP-7825](ethereum/go-ethereum#31824) behaves. When `eth_estimateGas` or `eth_createAccessList` is called without any gas limit in the payload, geth will choose the block's gas limit or the `RPCGasCap`, which can be larger than the `maxTxGas`. When this happens for `estimateGas`, the gas estimation just errors out and ends, when it should continue doing binary search to find the lowest possible gas limit. This PR will: - Add a check to see if `hi` is larger than `maxTxGas` and cap it to `maxTxGas` if it's larger. And add a special case handling for gas estimation execute when it errs with `ErrGasLimitTooHigh` --------- Co-authored-by: Gary Rong <[email protected]> * internal/ethapi: skip tx gas limit check for calls (#32641) This disables the tx gaslimit cap for eth_call and related RPC operations. I don't like how this fix works. Ideally we'd be checking the tx gaslimit somewhere else, like in the block validator, or any other place that considers block transactions. Doing the check in StateTransition means it affects all possible ways of executing a message. The challenge is finding a place for this check that also triggers correctly in tests where it is wanted. So for now, we are just combining this with the EOA sender check for transactions. Both are disabled for call-type messages. * internal/ethapi: use gas from gaspool for call defaults * eth/gasestimator: check for madhugiri HF * consensus/bor: honour MaxTxGas for system calls --------- Co-authored-by: Lucca Martins <[email protected]> Co-authored-by: kamuikatsurgi <[email protected]> Co-authored-by: Krishang Shah <[email protected]> Co-authored-by: Manav Darji <[email protected]> Co-authored-by: Minhyuk Kim <[email protected]> Co-authored-by: Gary Rong <[email protected]> Co-authored-by: Felix Lange <[email protected]>
manav2401
added a commit
that referenced
this pull request
Oct 30, 2025
…block time (#1851) * first working version of new state sync tx * remove logs * fix lint * fix integration tests * test fixes * lint fix * fix parallel processor * type improvement and unit tests * remove duplicates * ignore data test output * fixing method calls and fields * build fix * remove bor filter for after hf blocks * sort logs just when necessary * ssTxs: fix receiptsHash mismatch (#1829) * ssTxs: fix receiptsHash mismatch * chore: remove block hash and number * revert: add block number * core(tx): fix Hash method for StateSyncTxType (#1830) * eth: fixes in receipt handling via p2p post HF (#1825) * eth: include bor receipts in ReceiptHash post HF * eth: rename to receiptListHash * eth: extrat typecasting logic for better testing, fix type matching issue * eth: add e2e tests for receipt delivery * eth/protocols/eth: apply HF logic while handling receipt query over eth69 * core: skip split receipts post HF * tests/bor: extend e2e test to check presence of state-sync in block * core/types: return nil for chainID() call over state-sync tx * internal/ethapi: handle bor txs and receipts post HF (#1834) * fix: cumulativeGasUsed in insertStateSyncTransactionAndCalculateReceipt (#1835) * fix: sort logs and remove duplicate append in Finalize (#1836) * fix: append tx only in FinalizeAndAssemble and use state instead of wrappedState * consensus/bor: sort logs before extracting state-sync logs * chore: revert statedb changes --------- Co-authored-by: Manav Darji <[email protected]> * chore: nit (#1838) * chore: typos * fix: lint * Renaming to Madhugiri HF * chore: nits * (fix): handle pointers to receipt list received via p2p * (chore): rename tests with HF name * chore: more nits * core: add blocktime in bor receipt logs (#1848) * core/types: derive bloom for bor receipts * (chore): update madhugiri block for amoy * Change consensus block time to 1s at Madhugiri HF (#1852) --------- Co-authored-by: Lucca Martins <[email protected]> Co-authored-by: kamuikatsurgi <[email protected]> Co-authored-by: Krishang Shah <[email protected]> Co-authored-by: Jerry <[email protected]>
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.


Description
After the state-sync HF, state-sync (or bor) transactions will be part of block body and bor receipts will also be stored along with normal block receipts (i.e. under same key). This PR does some changes around handling receipts via p2p after the HF. Note that it only affects nodes syncing via snap syncing (which is disabled until this HF goes through).
GetReceiptsquery -- pre HF, normal and bor receipts are fetched separately and later merged and encoded. Post HF, they can be fetched in single call and encoding is relatively easier.ReceiptRootcalculation -- currently, state-sync receipts are excluded but post-HF, they should be part of receipt root. As we don't have access to block number (to check if we're cross HF or not), this change can't be implemented directly in handler. The encoded packet is sent ahead until the point we have access to header.InsertReceiptChain.Changes
Breaking changes
Please complete this section if any breaking changes have been made, otherwise delete it
Nodes audience
In case this PR includes changes that must be applied only to a subset of nodes, please specify how you handled it (e.g. by adding a flag with a default value...)
Checklist
Cross repository changes
Testing
Manual tests
Please complete this section with the steps you performed if you ran manual tests for this functionality, otherwise delete it
Additional comments
Please post additional comments in this section if you have them, otherwise delete it