-
Notifications
You must be signed in to change notification settings - Fork 632
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
[fix] Always use latest ETH wallet contract #12038
Conversation
if checked_feature!("stable", EthImplicitAccounts, version) | ||
&& account_id.get_account_type() == AccountType::EthImplicitAccount | ||
&& code_hash_matches_wallet_contract(chain_id, &code_hash, version) |
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.
todo: Verify if it is fine to remove this check
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.
We actually cannot remove this check because not all accounts that look like eth-implicit have the wallet contract magic bytes (see details in this PR description).
@@ -379,11 +379,12 @@ impl<'a> Contract for RuntimeContractExt<'a> { | |||
let code_hash = self.hash(); | |||
let version = self.current_protocol_version; | |||
let chain_id = self.chain_id; | |||
// We are removing the check to match code_hash_matches_wallet_contract |
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.
nit. once you remove the code below, this comment will not refer to any check after merging.
Can you provide more context?
|
if checked_feature!("stable", EthImplicitAccounts, version) | ||
&& account_id.get_account_type() == AccountType::EthImplicitAccount | ||
&& code_hash_matches_wallet_contract(chain_id, &code_hash, version) |
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.
We actually cannot remove this check because not all accounts that look like eth-implicit have the wallet contract magic bytes (see details in this PR description).
There was originally a bug fix to the ETH contract code
This PR removes the check for protocol version >= 71 and < 71 and always tries to load the latest wallet contract code for ETH implicit accounts