-
Notifications
You must be signed in to change notification settings - Fork 147
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
Update precompile setup for warp #390
Conversation
// - Enabling or disabling precompiles as network upgrades. | ||
type UpgradeConfig struct { | ||
// Config for enabling and disabling precompiles as network upgrades. | ||
PrecompileUpgrades []PrecompileUpgrade `json:"precompileUpgrades,omitempty"` |
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.
do we need this? Isn't warp going to be activated with DUpgrade itself?
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.
Yes it's activated with the DUpgrade in vm.go
. I thought it was easier to keep Coreth and Subnet-EVM closer in line rather than having a different mechanism.
Additionally, we can't import the Warp precompile in the params/
package, so it needs to be done externally anyways. Open to suggestion, but after playing around a bit, I thought the best path was to simply share the same code with Subnet-EVM and set the PrecompileUpgrades
field in vm.go
here: https://github.com/ava-labs/coreth/blob/migrate-warp-precompile/plugin/evm/vm.go#L470
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 was just in favor of having less code to reduce risk. But I think that's fine.
params/precompile_upgrade.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.
IMO it's probably better to skip unused code, and this should not be needed by coreth since precompiles should be activated by direct network upgrades.
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.
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.
just few nits
Co-authored-by: Ceyhun Onur <[email protected]> Signed-off-by: aaronbuchwald <[email protected]>
The base branch was changed.
This PR migrates Coreth to use the latest precompile package structure from Subnet-EVM in preparation for migrating the Warp precompile.