-
Notifications
You must be signed in to change notification settings - Fork 49
Deprecate precompile #1511
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
Deprecate precompile #1511
Conversation
@@ -144,8 +144,7 @@ where | |||
a if a == addr(0x602) => | |||
Some(<pallet_evm_precompile_conviction_voting::ConvictionVotingPrecompile<Runtime>>::execute(handle)), | |||
// [0x800..) reserved for the experimental precompiles. | |||
a if a == addr(0x800) => | |||
Some(<darwinia_precompile_bls12_381::BLS12381<Runtime>>::execute(handle)), | |||
a if a == addr(0x800) => Some(Err(precompile_utils::prelude::revert("This precompile is no longer supported."))), |
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.
What if return None
here?
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.
Returning None means that the precompile does not exist. But in our case, we want to remind the users that this is a deprecated precompile.
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.
It indeed does not exist in Koi.
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 doesn't exist on the testnet(mainnet) anymore, but some applications or developers may still rely on this precompile. We need to avoid the situation where an application uses this precompile(address) now, but the precompile to this address changes to a another one later. This will break the application's logic if it is not aware of the change.
The Koi is the testnet for other networks, we should keep it the same behaviour across all the networks, otherwise, some application will work on the testnet but not on the mainnet.
Fix #1501