miner: support builder-proposed block with validator blind signing - #3691
Conversation
b7c3533 to
f18a70a
Compare
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
Pull Request ReviewThis PR introduces a new BidBlock (builder-proposed block) flow for Parlia/MEV, including RPC admission ( Sensitive ContentNo sensitive content detected. Security Issues🟠 [HIGH] BidBlock is broadcast before full verification, enabling potential invalid block propagation
Security IssuesNo serious security issues detected. Generated by Hashdit Bot. This tool can absolutely NOT replace manual audits. |
This comment was marked as resolved.
This comment was marked as resolved.
Pull Request ReviewThis PR introduces validator-side support for BEP-675 builder-proposed BidBlocks with blind-signing flow, including new RPCs ( Sensitive ContentNo sensitive content detected. Security IssuesNo serious security issues detected. Generated by Hashdit Bot. This tool can absolutely NOT replace manual audits. |
Pull Request ReviewThis PR introduces comprehensive validator-side support for BEP-675 BidBlock flow, including new Sensitive ContentNo sensitive content detected. Security IssuesNo serious security issues detected. Generated by Hashdit Bot. This tool can absolutely NOT replace manual audits. |
Pull Request ReviewThis PR introduces validator-side support for BEP-675 Sensitive ContentBlockchain Address:
Security IssuesNo serious security issues detected. Generated by Hashdit Bot. This tool can absolutely NOT replace manual audits. |
Pull Request ReviewThis PR introduces validator-side support for BEP-675 Builder-Proposed Blocks with blind signing, including new Sensitive ContentBlockchain Address:
Security IssuesNo serious security issues detected. Generated by Hashdit Bot. This tool can absolutely NOT replace manual audits. |
Pull Request ReviewThis PR adds full validator-side support for BEP-675 BidBlock flow, including new Sensitive ContentBlockchain Address:
No private keys, mnemonic phrases, or social accounts detected in newly added non-test files. Security IssuesNo serious security issues detected. Generated by Hashdit Bot. This tool can absolutely NOT replace manual audits. |
Pull Request ReviewThis PR introduces BEP-675 BidBlock support end-to-end in a Go-based Ethereum client/miner stack (Parlia/BSC context), including new RPCs ( Sensitive ContentBlockchain Address:
No private keys, mnemonic phrases, or secret key material newly added in non-test files. Security IssuesNo serious security issues detected. Generated by Hashdit Bot. This tool can absolutely NOT replace manual audits. |
Pull Request ReviewThis PR introduces validator-side support for BEP-675 BidBlock flow, including new RPCs ( Sensitive ContentBlockchain Address:
Security IssuesNo serious security issues detected. Generated by Hashdit Bot. This tool can absolutely NOT replace manual audits. |
Pull Request ReviewThis PR introduces full validator-side support for BEP-675 BidBlock flow in a Go-based blockchain client (Parlia/BNB chain stack), including new Sensitive ContentBlockchain Address:
Private Key / Seed Phrase / Mnemonic / Secret Material:
Security Issues🟡 [MEDIUM] Unauthenticated admin RPC method can change builder permissions (confirm RPC exposure/auth is enforced)
No serious security issues detected. Generated by Hashdit Bot. This tool can absolutely NOT replace manual audits. |
Pull Request ReviewThis PR introduces validator-side BEP-675 BidBlock support across the miner, Parlia consensus, RPC/API surface, and client bindings, including admission checks, system-tx bind-signing flow, BidBlock selection, and permission revoke/restore mechanics for misbehaving builders. It also adds block-level MEV attribution tagging ( Sensitive ContentBlockchain Address:
Security IssuesNo serious security issues detected. Generated by Hashdit Bot. This tool can absolutely NOT replace manual audits. |
| ) { | ||
| m.mu.Lock() | ||
| defer m.mu.Unlock() | ||
| m.revoked[builder] = BidBlockRevokeRecord{ |
There was a problem hiding this comment.
Do we need prune this map every day?
| // - Tx precheck failures (nonce, balance, signature, intrinsic gas, ...) | ||
| // - System tx value / params (e.g. deposit value vs. SystemAddress balance) | ||
| // - Blob sidecar checks (KZG proofs, blob hashes) | ||
| if _, err := w.chain.InsertChain(types.Blocks{block}); err != nil { |
There was a problem hiding this comment.
Do we need check the err if it cause by bid?
| } | ||
|
|
||
| bidBlockFee := uint256.MustFromBig(bidBlock.GasFee) | ||
| bidBlockValidatorReward := new(uint256.Int).Mul(bidBlockFee, uint256.NewInt(*w.config.Mev.ValidatorCommission)) |
There was a problem hiding this comment.
validatorCommission could be nil?
| BlockHash *common.Hash `json:"blockHash,omitempty"` | ||
| BlockNumber *hexutil.Uint64 `json:"blockNumber,omitempty"` | ||
| RevokedAt *time.Time `json:"revokedAt,omitempty"` | ||
| ResetAt time.Time `json:"resetAt"` |
There was a problem hiding this comment.
Why not same as 'BidBlockPermissionResult' in api_mev.go'
| case b.newBidBlockCh <- newBidBlockPackage{bidBlock: block, feedback: replyCh}: | ||
| b.AddPending(block.BlockNumber(), block.Builder, block.Hash()) | ||
| case <-timer.C: | ||
| return types.ErrMevBusy |
There was a problem hiding this comment.
| return types.ErrMevBusy | |
| return types.ErrMevBusy | |
| case <-ctx.Done(): | |
| return ctx.Err() |
|
|
||
| // sendBidBlock queues a decoded BidBlock for selection. | ||
| func (b *bidSimulator) sendBidBlock(_ context.Context, block *types.DecodedBidBlock) error { | ||
| timer := time.NewTimer(1 * time.Second) |
Description
This PR adds validator-side support for Builder-Proposed Block with Validator Blind Signin mev flow (bep-675)
It adds the full BidBlock path: builder submission, validator admission, pre-seal validation, bind-signing of unsigned system transactions, BidBlock selection, post-insert GasFee validation, and local permission revoke on dishonest or malformed BidBlocks.
Main Changes
SendBid.Rationale
tell us why we need these changes...
Example
Validator need to add config BidBlockEnabled to support new bid path
Changes
Notable changes: