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

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

Closed
yangby-cryptape opened this issue Aug 18, 2023 · 0 comments · Fixed by #1339
Closed

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

yangby-cryptape opened this issue Aug 18, 2023 · 0 comments · Fixed by #1339
Assignees
Labels
t:bug Something isn't working

Comments

@yangby-cryptape
Copy link
Collaborator

yangby-cryptape commented Aug 18, 2023

Current Behavior

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

It doesn't make sense.

difficulty: U256::one(),

total_difficulty: Some(U256::zero()),

Same situation (just be constant) for Header.nonce:

nonce: H64::default(),

nonce: U256::default(),

Expected Behavior

Proposals:

  • Should Axon just remove difficulty field from Header?

    Then set Web3Block.difficulty to be constant U256::zero().

  • The nonce field in Header is useless, too.

    Should Axon just remove nonce field from Header?

    Then set Web3Block.nonce to be constant U256::zero().

Break changes:

  • Block (header) hashes.

Anything else?

The fields difficulty and nonce in Header are used when calculates its hash.

If Axon want to remove them, they have to be removed before release a no-break-changes version.

Ref: #1332 (comment)

@yangby-cryptape yangby-cryptape added the t:bug Something isn't working label Aug 18, 2023
@Flouse Flouse linked a pull request Aug 22, 2023 that will close this issue
11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
t:bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants