-
Notifications
You must be signed in to change notification settings - Fork 117
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
Replay run mode #320
Replay run mode #320
Conversation
@@ -80,7 +80,7 @@ func (p *StateProcessor) Process(block *types.Block, statedb *state.StateDB, cfg | |||
} | |||
// Iterate over and process the individual transactions | |||
for i, tx := range block.Transactions() { | |||
msg, err := TransactionToMessage(tx, signer, header.BaseFee) | |||
msg, err := TransactionToMessage(tx, signer, header.BaseFee, MessageCommitMode) |
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.
In Arbitrum, I think this is used by state recreation, not commit mode
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.
Changed that.
But we need to remember that, for when we switch to a more POS-like block addition.
internal/ethapi/api.go
Outdated
@@ -1155,7 +1155,7 @@ func runScheduledTxes(ctx context.Context, b core.NodeInterfaceBackendAPI, state | |||
scheduled := result.ScheduledTxes | |||
for runMode == core.MessageGasEstimationMode && len(scheduled) > 0 { | |||
// This will panic if the scheduled tx is signed, but we only schedule unsigned ones | |||
msg, err := core.TransactionToMessage(scheduled[0], types.NewArbitrumSigner(nil), header.BaseFee) | |||
msg, err := core.TransactionToMessage(scheduled[0], types.NewArbitrumSigner(nil), header.BaseFee, core.MessageReplayMode) |
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.
I don't think this is replay mode, I think it should use runMode
. In fact, we currently override it below, which could be replaced by this parameter.
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.
LGTM
creates a new runmode for replaying message, which should produce same result as messageCommit but not be expected to be latest block