System accounts disambiguation #8119
Labels
Blocker
Further development work cannot be done.
Epic
A body of work that can be broken down into specific tasks.
Limechain
Work planned for the LimeChain team
Work Package
Limechain Work package
Definition
Create a design document describing the expected behavior of the EVM when operating on Hedera system accounts and push it to the repository as an
.md
file.Create a test plan and implement individual test cases asserting the current behavior is aligned with the design.
Observe the current version of the Operations classes (e.g. HederaSelfDestructOperationV038), the modularized version of the operation classes (e.g. CustomSelfDestructOperation) and assert that they provide a similar behavior inline with the definition in the Specification section of this document.
Abstract
Hedera’s EVM implementation will diverge from the Ethereum specification in order to handle operations on system accounts differently. EVM operations that work in any way with addresses include all
Call
operations, theSelfDestruct
operation,Balance
operation, and allExtCode
operations. The expected behavior for each is described in the Specification section of this document.Motivation
Ethereum addresses 0x0 → 0x3E8 map to Hedera IDs 0.0.0 → 0.0.1000.
When a call is made to an address, the EVM loads the corresponding code belonging to the contract with Hedera ID mapping to the EVM address that was called.
Ethereum addresses 0x1 → 0x9 are special addresses on which precompiled contracts exist. For example, the Solidity language keyword
ecrecover
is “sugar syntax” which compiles to acall
to address0x1
. More information here.Hedera IDs in the range 0.0.1 → 0.0.1000 are reserved for “system” accounts. Some of them exist today - for example the genesis account, the fee collecting account, etc - and more can be created in the future.
Rationale
Described in Hedera/Ethereum precompiles equivalence
Backwards Compatibility
This is a breaking change fixing incorrect behavior from the past. We do not expect to be backwards compatible.
Security Implications
The changes described here should improve overal security when related to Hedera system accounts and EVM operations.
References & Dependencies
PR5962 EVM version update and optimisations - this PR provides version 38 of the operation classes that are affected by the specification in this document.
PR7000 Refactor operations to eliminate duplicate code between EVM versions -
PR6985 Blocking transfers through HTSPrecompile for system account receivers 0.0.1-750.
Tasks
The text was updated successfully, but these errors were encountered: