fix: run gas-fee and blob-sidecar checks at BidBlock admission time#413
Closed
chee-chyuan wants to merge 1 commit into
Closed
fix: run gas-fee and blob-sidecar checks at BidBlock admission time#413chee-chyuan wants to merge 1 commit into
chee-chyuan wants to merge 1 commit into
Conversation
Mirrors go-bsc preSealVerifyBidBlock checks 3–4 synchronously in admit_bid_block so builders receive immediate error feedback: - empty-txs guard (before decode) - extract_bid_block_deposit_value + zero gas-fee reject - validate_bid_block_blob_sidecars (cheap; KZG deferred to insertion) VerifyUnsealedHeader and BlockTimeUpperCheck (checks 1–2) require Arc<Parlia<BscChainSpec>> which is not wired into MevApiImpl yet; those remain deferred to simulate_bid_block miner-side. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Pull Request ReviewThis PR strengthens Sensitive ContentNo sensitive content detected. Security IssuesNo serious security issues detected. Generated by Hashdit Bot. This tool can absolutely NOT replace manual audits. |
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.
Problem
admit_bid_blockwas missing two of the four checks that go-bsc performs synchronously inpreSealVerifyBidBlockbefore queuing a BidBlock:VerifyUnsealedHeaderBlockTimeUpperCheckExtractBidBlockDepositValue+ gas-fee validationvalidateBidBlockBlobSidecarsChecks 1–2 still need
Arc<Parlia<BscChainSpec>>wired intoMevApiImpland remain deferred. Checks 3–4 have no Parlia dependency and are added here.Also adds the empty-txs guard from
Miner.SendBidBlock(before decode).Changes
src/rpc/mev.rs: inadmit_bid_block, beforeadd_pending_bid_block:Miner.SendBidBlockline 97)extract_bid_block_deposit_value+gas_fee.is_zero()rejectvalidate_bid_block_blob_sidecars(cheap checks only; KZG at insertion)Test plan
cargo clippy --workspace --tests --all-featurespassescargo test -p reth_bsc -- --test-threads=1passesempty gasFeeerror instead of being silently dropped🤖 Generated with Claude Code