You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Hi team, while walking through fullnode's syncing logic from sequencer, I realize that (maybe i am wrong):
broadcastclient received batch item from sequencer/feedrelay
broadcastclient calls TransactionStreamer.AddBroadcastMessages then the batch item/messages would be stored into ethdb
TransactionStreamer also has a timing function executeMessages which consumes messages from step 2, and the roughly call stack is executeMessages -> ExecuteNextMsg -> ExecutionEngine.DigestMessage -> digestMessageWithBlockMutex -> createBlockFromNextMessage -> arbos.ProduceBlock -> ProduceBlockAdvanced
inside ProduceBlockAdvanced, it calls FinalizeBlock which get us a headerRoot of this block
So i wonder, is it possible to verify the computed headerRoot with the one synced from sequencer? That will give us some more confidence that the block data we get from sequencer is valid even before going to block validation (sometimes we disable it for some reason or we want check the block validity immediately while block validation is a bit slow behind the block creation)
Describe the solution you'd like
Add one more filed into L1IncomingMessage, it can be like:
type L1IncomingMessage struct {
Header *L1IncomingMessageHeader `json:"header"`
L2msg []byte `json:"l2Msg"`
L2HeaderRoot common.hash `json:"l2HeaderRoot"` <---- to add
// Only used for `L1MessageType_BatchPostingReport`
BatchGasCost *uint64 `json:"batchGasCost,omitempty" rlp:"optional"`
}
Then check L2HeaderRoot with header.Root
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Feel free to let me know if I misunderstood the codebase, appreciated!
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
Hi team, while walking through fullnode's syncing logic from sequencer, I realize that (maybe i am wrong):
received batch item
from sequencer/feedrelayTransactionStreamer.AddBroadcastMessages
then the batch item/messages would be stored into ethdbTransactionStreamer
also has a timing functionexecuteMessages
which consumes messages from step 2, and the roughly call stack isexecuteMessages -> ExecuteNextMsg -> ExecutionEngine.DigestMessage -> digestMessageWithBlockMutex -> createBlockFromNextMessage -> arbos.ProduceBlock -> ProduceBlockAdvanced
ProduceBlockAdvanced
, it callsFinalizeBlock
which get us aheaderRoot
of this blockSo i wonder, is it possible to verify the computed
headerRoot
with the one synced from sequencer? That will give us some more confidence that the block data we get from sequencer is valid even before going to block validation (sometimes we disable it for some reason or we want check the block validity immediately while block validation is a bit slow behind the block creation)Describe the solution you'd like
Add one more filed into
L1IncomingMessage
, it can be like:Then check
L2HeaderRoot
withheader.Root
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Feel free to let me know if I misunderstood the codebase, appreciated!
The text was updated successfully, but these errors were encountered: