-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Move atomic hash from Block to Header #11513
Conversation
@yperbasis what do you think about:
There is also |
@@ -396,9 +396,6 @@ func (c *Clique) Finalize(config *chain.Config, header *types.Header, state *sta | |||
func (c *Clique) FinalizeAndAssemble(chainConfig *chain.Config, header *types.Header, state *state.IntraBlockState, | |||
txs types.Transactions, uncles []*types.Header, receipts types.Receipts, withdrawals []*types.Withdrawal, requests types.Requests, chain consensus.ChainReader, syscall consensus.SystemCall, call consensus.Call, logger log.Logger, | |||
) (*types.Block, types.Transactions, types.Receipts, error) { | |||
// No block rewards in PoA, so the state remains as is and uncles are dropped |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's remove the same line from (c *Clique) Finalize
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AuRa & Merge consensus don't call block.WithSeal
when building blocks. We could change them to ensure they do. But I think a better option is to set b.header.mutable
to false
at the end of NewBlock
.
Rationale: one small step to converge Polygon and Ethereum block production. Also, now `(s *Merge) Seal` calls `block.WithSeal`, which is important after PR #11513.
Cherry pick #11513 into `release/2.61` Co-authored-by: Alex Sharov <[email protected]>
Reason 1:
NewEVMBlockContext
->engine.Author(header)
->*Bor
->it's hard and not so useful to pass
block
through this abstractions.So, RPC does hash every requested header here.
Reason 2: In E3: many RPC will read 1 transaction only. So, likely we will have many places where no
Block
object.