-
Notifications
You must be signed in to change notification settings - Fork 11
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
Refactor for the new version of the Substate #7
base: main
Are you sure you want to change the base?
Conversation
evmcore/state_processor.go
Outdated
substate.NewEnv( | ||
stypes.Address(etherBlock.Coinbase()), | ||
etherBlock.Difficulty(), | ||
etherBlock.GasLimit(), | ||
etherBlock.NumberU64(), | ||
etherBlock.Time(), | ||
etherBlock.BaseFee(), | ||
innerSubstate.HashGethToSubstate(statedb.SubstateBlockHashes)), | ||
substate.NewMessage( | ||
msg.Nonce(), | ||
msg.IsFake(), | ||
msg.GasPrice(), | ||
msg.Gas(), | ||
stypes.Address(msg.From()), | ||
&to, | ||
msg.Value(), | ||
msg.Data(), | ||
&dataHash, | ||
innerSubstate.AccessListGethToSubstate(msg.AccessList()), | ||
msg.GasFeeCap(), | ||
msg.GasTipCap()), | ||
substate.NewResult( | ||
receipt.Status, | ||
receipt.Bloom.Bytes(), | ||
innerSubstate.LogsGethToSubstate(receipt.Logs), | ||
stypes.Address(receipt.ContractAddress), | ||
receipt.GasUsed), |
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.
Each New function takes long arguments. I want to suggest moving them to the substate
package.
substate/utils.go
Outdated
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 see a full copy of a structure in the util function. Can you and @matejmlejnek double check on performance penalty when recording new substates?
substate/utils.go
Outdated
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.
Since this is our package, please add unit tests.
cmd/cmdtest/test_cmd.go
Outdated
@@ -79,7 +79,7 @@ func (tt *TestCmd) Run(name string, args ...string) { | |||
// InputLine writes the given text to the childs stdin. | |||
// This method can also be called from an expect template, e.g.: | |||
// | |||
// cli.expect(`Passphrase: {{.InputLine "password"}}`) |
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.
This file seems to be modified by auto-formatting tool. I would suggest remove files which are unrelated to this change.
Functions and methods changed according to the code in the develop branch