Fix(eth-implicit-accounts): Do not assert wallet_contract_magic_bytes #11606
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The eth-implicit accounts feature had been assuming that all Ethereum address-like accounts would be created implicitly (via a
Transfer
action as opposed to theCreateAccount
action) and therefore always have the wallet contract "magic bytes" deployed. This invariant is maintained after account creation because the wallet contract does not allow adding full-access keys and therefore deploying different contract code is impossible.However, on Near today there are already 5552 accounts (attached list: eth_addresses.txt) that will be classified as eth-implicit accounts. These accounts do have full access keys and therefore can have any arbitrary Wasm code deployed to them. Thus the supposed invariant of all eth-implicit accounts having the magic bytes deployed is in fact already broken.
This PR removes the
assert
from the runtime which was checking this invariant.As a side note, the broader web3 wallets project will blacklist these 5552 accounts in the relayer implementation since the relayer also operations on the assumption that the accounts it interacts with will have the protocol-level wallet contract deployed and this assumption cannot be guaranteed on "legacy" eth-implicit accounts.