Skip to content

refactor!: remove useless fields in BlockHeader#1339

Merged
chaoticlonghair merged 4 commits intomainfrom
refactor-header
Aug 22, 2023
Merged

refactor!: remove useless fields in BlockHeader#1339
chaoticlonghair merged 4 commits intomainfrom
refactor-header

Conversation

@KaoImin
Copy link
Copy Markdown
Contributor

@KaoImin KaoImin commented Aug 20, 2023

What this PR does / why we need it?

This PR remove these three fields in Header:

  1. difficulty
  2. nonce
  3. mixed_hash

They are all mining related and useless to Axon. The rpc will return the default value.

What is the impact of this PR?

⚠️This is a breaking change.

CI Settings

CI Usage

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

CI Switch

  • 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

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

@KaoImin KaoImin requested a review from a team as a code owner August 20, 2023 16:31
@KaoImin KaoImin requested review from Flouse, ashuralyk, chaoticlonghair, driftluo and jjyr and removed request for ashuralyk and jjyr August 20, 2023 16:31
@KaoImin KaoImin changed the title refactor: remove useless fields in lockHeader refactor!: remove useless fields in lockHeader Aug 20, 2023
@KaoImin KaoImin changed the title refactor!: remove useless fields in lockHeader refactor!: remove useless fields in BlockHeader Aug 20, 2023
@KaoImin

This comment was marked as off-topic.

@axon-bot

This comment was marked as outdated.

driftluo
driftluo previously approved these changes Aug 21, 2023
driftluo
driftluo previously approved these changes Aug 21, 2023
@KaoImin KaoImin dismissed stale reviews from driftluo and chaoticlonghair via db0c608 August 21, 2023 08:34
@KaoImin

This comment was marked as off-topic.

@axon-bot

This comment was marked as outdated.

driftluo
driftluo previously approved these changes Aug 22, 2023
@KaoImin KaoImin dismissed stale reviews from driftluo and chaoticlonghair via 23443c7 August 22, 2023 02:33
Copy link
Copy Markdown
Contributor

@Flouse Flouse left a comment

Choose a reason for hiding this comment

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

Is it necessary to update the test data?

"difficulty": "0x0",
"timestamp": 1679656015,
"number": 0,
"gas_used": "0x0",
"gas_limit": "0x0",
"extra_data": [],
"mixed_hash": null,
"nonce": "0x0000000000000000",

@KaoImin
Copy link
Copy Markdown
Contributor Author

KaoImin commented Aug 22, 2023

/run-ci

@axon-bot
Copy link
Copy Markdown

axon-bot Bot commented Aug 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.

@chaoticlonghair chaoticlonghair added this pull request to the merge queue Aug 22, 2023
Merged via the queue into main with commit 21785f7 Aug 22, 2023
@Flouse Flouse deleted the refactor-header branch August 22, 2023 07:47
KaoImin pushed a commit that referenced this pull request Aug 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Total difficulty always be zero, but every block difficulty always be one.

4 participants