Skip to content
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

refactor: change the calculation of receipts root to EIP-2718 #1486

Merged
merged 2 commits into from
Oct 20, 2023

Conversation

wenyuanhust
Copy link
Contributor

@wenyuanhust wenyuanhust commented Oct 19, 2023

What this PR does / why we need it?

This PR modifies receipt root calculation procedure based on eip-2718.
In the previous implementation. A receipt is inserted into receipt trie in the following steps:

  1. call encode_receipt() to get rlp_receipt(Bytes)
  2. call digest(rlp_receipt) to get hash_rlp_receipt(H256)
  3. call encode() of H256 to get final val
  4. insert val into the trie.

however, according to eip2718, step 2-3 is unnecessary.
we need to decide whether to in consistence with Ethereum standards or not.

What is the impact of this PR?

This will change the receipt root kept in block.

CI Settings

CI Usage

Tip: Check the CI you want to run below, and then comment /run-ci.

CI Switch

  • Web3 Compatible Tests
  • OCT 1-5 And 12-15
  • OCT 6-10
  • OCT 11
  • OCT 16-19
  • v3 Core Tests

CI Description

CI Name Description
Web3 Compatible Test Test the Web3 compatibility of Axon
v3 Core Test Run the compatibility tests provided by Uniswap V3
OCT 1-5 | 6-10 | 11 | 12-15 | 16-19 Run the compatibility tests provided by OpenZeppelin

common/merkle/src/lib.rs Outdated Show resolved Hide resolved
core/executor/src/lib.rs Show resolved Hide resolved
@Flouse Flouse requested a review from KaoImin October 19, 2023 06:50
@KaoImin KaoImin changed the title tmp: receipt trie test refactor!: change the calculation of receipts root Oct 20, 2023
@KaoImin KaoImin changed the title refactor!: change the calculation of receipts root refactor: change the calculation of receipts root Oct 20, 2023
@wenyuanhust wenyuanhust changed the title refactor: change the calculation of receipts root refactor: change the calculation of receipts root ( sync with eip-2718 ) Oct 20, 2023
@wenyuanhust wenyuanhust marked this pull request as ready for review October 20, 2023 06:48
@wenyuanhust wenyuanhust requested a review from a team as a code owner October 20, 2023 06:48
core/executor/src/lib.rs Outdated Show resolved Hide resolved
@Flouse Flouse requested a review from driftluo October 20, 2023 06:52
@KaoImin KaoImin changed the title refactor: change the calculation of receipts root ( sync with eip-2718 ) refactor: change the calculation of receipts root sync with EIP-2718 Oct 20, 2023
@KaoImin KaoImin changed the title refactor: change the calculation of receipts root sync with EIP-2718 refactor: change the calculation of receipts root to EIP-2718 Oct 20, 2023
@Flouse

This comment was marked as off-topic.

@github-actions
Copy link

CI tests run on commit:

CI test list:

  • OCT 1-5 And 12-15
  • OCT 6-10
  • OCT 11
  • OCT 16-19
  • v3 Core Tests
  • Web3 Compatible Tests

Please check ci test results later.

@wenyuanhust wenyuanhust added this pull request to the merge queue Oct 20, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 20, 2023
@wenyuanhust wenyuanhust added this pull request to the merge queue Oct 20, 2023
Merged via the queue into axonweb3:main with commit e64f03c Oct 20, 2023
30 of 33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants