blockchain: implement EIP-2935#121
Merged
hyunsooda merged 11 commits intokaiachain:devfrom Nov 7, 2024
Merged
Conversation
blukat29
reviewed
Nov 1, 2024
blukat29
reviewed
Nov 1, 2024
blukat29
reviewed
Nov 1, 2024
ian0371
reviewed
Nov 1, 2024
ian0371
reviewed
Nov 1, 2024
ian0371
reviewed
Nov 1, 2024
blukat29
reviewed
Nov 1, 2024
ian0371
reviewed
Nov 1, 2024
index zero and removal of introduced `ChainContext`
blukat29
reviewed
Nov 5, 2024
blukat29
reviewed
Nov 5, 2024
hyeonLewis
reviewed
Nov 5, 2024
Contributor
hyeonLewis
left a comment
There was a problem hiding this comment.
In PR Usage comments, the output seems not a block hash for 20333. Could you recheck this?
> kaia.call({to:"0x0eF71b533f074383A14696f7EeBD94446b10F679", data:"0x6b2fafa90000000000000000000000000000000000000000000000000000000000004f6d"}) // getHash(20333)
> 0x6b2fafa90000000000000000000000000000000000000000000000000000000000004f6d // <- It seems data for eth_call, not block hash at 20333.
Contributor
Author
|
@hyeonLewis Thank you. Typo fixed. |
blukat29
reviewed
Nov 6, 2024
blukat29
reviewed
Nov 6, 2024
blukat29
reviewed
Nov 6, 2024
blukat29
approved these changes
Nov 7, 2024
ian0371
approved these changes
Nov 7, 2024
Contributor
Author
|
Currently, onboarding EIP-2935 requires additional modifications at the core level, specifically for:
Other changes involve deployment, but the provided artifact appears non-deployable (the signature value seems invalid). Once the artifact stabilizes, I’ll test it again. cc. @blukat29 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Proposed changes
The main function has been implemented, but a task has been queued to simplify the history store callsite.
c1714134(implement the main function)b38c8f2(simplify the historical store callsite)Contract Deployment Process
According to EIP-2935 deployment transaction artifact, the code below generate the exact same system history storage address.
[Requred by KF] 0. Run a deployment script and get raw tx
[Requred by KF] 1. Send some kaia to sender
[Requred by KF] 2. Send raw transaction
Usage
Once deployed, retrieval works like below:
Implementation details
consensus.Engine.Initialize()that performs pre-block state transitions.(start, end]for num = start; num < end; num++ { - statedb = StateAtBlock(num) + statedb = StateAtTransaction(num+1, 0) for tx in block(num+1) traceTx(tx) }numtxin blocknum-- unchangedtxat the end of the blocknum, not the beginning ofnum+1-- unchangedTypes of changes
Please put an x in the boxes related to your change.
Checklist
Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.
I have read the CLA Document and I hereby sign the CLAin first time contribute$ make test)Related issues
Further comments
If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...