Skip to content

feat: add EIP-1898 blockHash option to JSON-RPC methods#1101

Merged
ahonn merged 9 commits intomainfrom
feature/eip-1898
Mar 22, 2023
Merged

feat: add EIP-1898 blockHash option to JSON-RPC methods#1101
ahonn merged 9 commits intomainfrom
feature/eip-1898

Conversation

@ahonn
Copy link
Copy Markdown
Contributor

@ahonn ahonn commented Mar 20, 2023

What this PR does / why we need it:

https://eips.ethereum.org/EIPS/eip-1898

Which issue(s) this PR fixes:

Fixes #

Which docs this PR relation:

Ref #

Which toolchain this PR adaption:

No Breaking Change

Special notes for your reviewer:

NIL

CI Description

CI Name Description
Chaos CI Test the liveness and robustness of Axon under terrible network condition
Cargo Clippy Run cargo clippy --all --all-targets --all-features
Coverage Test Get the unit test coverage report
E2E Test Run end-to-end test to check interfaces
Code Format Run cargo +nightly fmt --all -- --check and cargo sort -gwc
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

CI Usage

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

CI Switch

  • Chaos CI
  • Cargo Clippy
  • Coverage Test
  • E2E Tests
  • Code Format
  • Unit Tests
  • Web3 Compatible Tests
  • OCT 1-5 And 12-15
  • OCT 6-10
  • OCT 11
  • OCT 16-19
  • v3 Core Tests

@ahonn ahonn requested a review from a team as a code owner March 20, 2023 11:18
@ahonn ahonn requested review from hongda3141 and wenyuanhust March 20, 2023 11:18
@ahonn
Copy link
Copy Markdown
Contributor Author

ahonn commented Mar 20, 2023

/run-ci

@axon-bot
Copy link
Copy Markdown

axon-bot Bot commented Mar 20, 2023

CI tests run on commit:

CI test list:

  • Code Format
  • Cargo Clippy
  • Chaos CI
  • Coverage Test
  • E2E Tests
  • OCT 1-5 And 12-15
  • OCT 6-10
  • OCT 11
  • OCT 16-19
  • Unit Tests
  • v3 Core Tests
  • Web3 Compatible Tests

Please check ci test results later.

@KaoImin KaoImin changed the title [WIP] feat: add EIP-1898 blockHash option to JSON-RPC methods [WIP] feat: add EIP-1898 blockHash option to JSON-RPC methods Mar 20, 2023
@ahonn
Copy link
Copy Markdown
Contributor Author

ahonn commented Mar 21, 2023

/run-ci

@axon-bot
Copy link
Copy Markdown

axon-bot Bot commented Mar 21, 2023

CI tests run on commit:

CI test list:

  • Code Format
  • Cargo Clippy
  • E2E Tests
  • OCT 1-5 And 12-15
  • OCT 6-10
  • OCT 11
  • OCT 16-19
  • Unit Tests
  • v3 Core Tests
  • Web3 Compatible Tests

Please check ci test results later.

Copy link
Copy Markdown
Contributor

@KaoImin KaoImin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only need to extend the BlockId enumeration like this:

#[derive(Default, Clone, Debug, PartialEq, Eq, Hash)]
pub enum BlockId {
    Num(u64),
    Hash(H256),
    #[default]
    Latest,
    Earliest,
    Pending,
}

Comment thread core/api/src/jsonrpc/web3_types.rs Outdated
@ahonn ahonn force-pushed the feature/eip-1898 branch from 01e4939 to a05d11e Compare March 21, 2023 09:15
@ahonn
Copy link
Copy Markdown
Contributor Author

ahonn commented Mar 21, 2023

/run-ci

@axon-bot
Copy link
Copy Markdown

axon-bot Bot commented Mar 21, 2023

CI tests run on commit:

CI test list:

  • Code Format
  • Cargo Clippy
  • E2E Tests
  • OCT 1-5 And 12-15
  • OCT 6-10
  • OCT 11
  • OCT 16-19
  • Unit Tests
  • v3 Core Tests
  • Web3 Compatible Tests

Please check ci test results later.

@KaoImin KaoImin requested a review from driftluo March 21, 2023 10:53
@ahonn
Copy link
Copy Markdown
Contributor Author

ahonn commented Mar 21, 2023

/run-ci

@axon-bot
Copy link
Copy Markdown

axon-bot Bot commented Mar 21, 2023

CI tests run on commit:

CI test list:

  • Code Format
  • Cargo Clippy
  • E2E Tests
  • OCT 1-5 And 12-15
  • OCT 6-10
  • OCT 11
  • OCT 16-19
  • Unit Tests
  • v3 Core Tests
  • Web3 Compatible Tests

Please check ci test results later.

@ahonn
Copy link
Copy Markdown
Contributor Author

ahonn commented Mar 21, 2023

/run-ci

@axon-bot
Copy link
Copy Markdown

axon-bot Bot commented Mar 21, 2023

CI tests run on commit:

CI test list:

  • Code Format
  • Cargo Clippy
  • E2E Tests
  • OCT 1-5 And 12-15
  • OCT 6-10
  • OCT 11
  • OCT 16-19
  • Unit Tests
  • v3 Core Tests
  • Web3 Compatible Tests

Please check ci test results later.

@ahonn ahonn force-pushed the feature/eip-1898 branch from 91df343 to eab5ea2 Compare March 21, 2023 14:10
@ahonn
Copy link
Copy Markdown
Contributor Author

ahonn commented Mar 21, 2023

/run-ci

@axon-bot
Copy link
Copy Markdown

axon-bot Bot commented Mar 21, 2023

CI tests run on commit:

CI test list:

  • Code Format
  • Cargo Clippy
  • E2E Tests
  • OCT 1-5 And 12-15
  • OCT 6-10
  • OCT 11
  • OCT 16-19
  • Unit Tests
  • v3 Core Tests
  • Web3 Compatible Tests

Please check ci test results later.

@ahonn
Copy link
Copy Markdown
Contributor Author

ahonn commented Mar 21, 2023

/run-ci

@axon-bot
Copy link
Copy Markdown

axon-bot Bot commented Mar 21, 2023

CI tests run on commit:

CI test list:

  • Code Format
  • Cargo Clippy
  • E2E Tests
  • OCT 1-5 And 12-15
  • OCT 6-10
  • OCT 11
  • OCT 16-19
  • Unit Tests
  • v3 Core Tests
  • Web3 Compatible Tests

Please check ci test results later.

@ahonn ahonn changed the title [WIP] feat: add EIP-1898 blockHash option to JSON-RPC methods feat: add EIP-1898 blockHash option to JSON-RPC methods Mar 22, 2023
Copy link
Copy Markdown
Contributor

@KaoImin KaoImin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The type of Num in BlockID should be U64, the current code style is inelegant. It should be changed.

Comment thread core/api/src/jsonrpc/web3_types.rs Outdated
Comment thread core/api/src/jsonrpc/web3_types.rs Outdated
@ahonn ahonn force-pushed the feature/eip-1898 branch from dfedeb2 to 19b7c3d Compare March 22, 2023 07:39
@ahonn
Copy link
Copy Markdown
Contributor Author

ahonn commented Mar 22, 2023

/run-ci

@axon-bot
Copy link
Copy Markdown

axon-bot Bot commented Mar 22, 2023

CI tests run on commit:

CI test list:

  • Code Format
  • Cargo Clippy
  • E2E Tests
  • OCT 1-5 And 12-15
  • OCT 6-10
  • OCT 11
  • OCT 16-19
  • Unit Tests
  • v3 Core Tests
  • Web3 Compatible Tests

Please check ci test results later.

KaoImin
KaoImin previously approved these changes Mar 22, 2023
Comment thread core/api/src/adapter.rs Outdated
@ahonn
Copy link
Copy Markdown
Contributor Author

ahonn commented Mar 22, 2023

/run-ci

@axon-bot
Copy link
Copy Markdown

axon-bot Bot commented Mar 22, 2023

CI tests run on commit:

CI test list:

  • Code Format
  • Cargo Clippy
  • E2E Tests
  • OCT 1-5 And 12-15
  • OCT 6-10
  • OCT 11
  • OCT 16-19
  • Unit Tests
  • v3 Core Tests
  • Web3 Compatible Tests

Please check ci test results later.

@ahonn ahonn added this pull request to the merge queue Mar 22, 2023
@ahonn ahonn merged commit 98a8216 into main Mar 22, 2023
@KaoImin KaoImin deleted the feature/eip-1898 branch March 22, 2023 16:38
@Flouse Flouse added t:feature and removed feature labels Nov 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants