-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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 EIP-7612: Update func implementations and add further clarifications #8754
Conversation
Signed-off-by: Ignacio Hagopian <[email protected]>
Signed-off-by: Ignacio Hagopian <[email protected]>
Signed-off-by: Ignacio Hagopian <[email protected]>
Signed-off-by: Ignacio Hagopian <[email protected]>
✅ All reviewers have approved. |
@@ -13,15 +13,15 @@ requires: 4762, 6800, 7545 | |||
|
|||
## Abstract | |||
|
|||
This EIP proposes a method to switch the state tree tree format from hexary Merkle Patricia Tree (MPT) to a verkle tree: the MPT tree is frozen, and new writes to the state are stored in a verkle tree “laid over” the hexary MPT. The historical MPT state is left untouched and its eventual migration is handled at a later time. | |||
This EIP proposes a method to switch the state tree tree format from hexary Merkle Patricia Tree (MPT) to a Verkle Tree (VKT): the MPT tree is frozen, and new writes to the state are stored in a VKT “laid over” the hexary MPT. The historical MPT state is left untouched and its eventual migration is handled at a later time. |
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.
For "Verkle Tree" do the same as we do for "Merkle Patricia Tree".
@@ -31,9 +31,9 @@ The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "S | |||
|
|||
### Constants | |||
|
|||
|Parameter|value|Description| | |||
|-|-|-| | |||
|`FORK_TIME`|`TDB`|Time at which the verkle, overlay tree is activated.| |
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 think TDB was a typo.
ckkey[31] = CODE_KECCAK_LEAF_KEY | ||
ckkey[31] = CODEHASH_LEAF_KEY |
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.
Align naming to EIP-4762/EIP-6800
basicdata = bytes(0) # Version | ||
basicdata += bytes(4) # Reserved | ||
basicdata += len(account.code).to_bytes(3, 'big') | ||
basicdata += account.nonce.to_bytes(8, 'big') | ||
basicdata += account.balance.to_bytes(16, 'big') |
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.
Update to do BASIC_DATA
packing. This code assumes this PR will be accepted where we switch to big-endian encoding.
```python3 | ||
def state_set_codechunk(state: State, addr: Address, chunk_num: int, chunk: Bytes): | ||
state._overlay_tree.set(get_tree_key_for_code_chunk(addr, chunk_num), chunk) | ||
``` |
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.
this isn't used anywhere, so imo we should remove it unless it is used
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's not referenced in this EIP, but it's referenced in another one which has this one as a dependency, see 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.
I would then put it the referring eip, but I will let the allmighty editors decide on this one. @g11tech ?
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.
Actually this code should be part of 6800, but that EIP doesn't have this "Python-style". But yep, let's see what @g11tech says and I can remove/move/add as needed.
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.
All Reviewers Have Approved; Performing Automatic Merge...
This PR proposes:
BASIC_DATA
.