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: derive block hash from header #4890

Merged
merged 1 commit into from
Jul 25, 2024

Conversation

Erigara
Copy link
Contributor

@Erigara Erigara commented Jul 24, 2024

Description

Derive block hash from the header only.

Linked issue

Closes #4641

Benefits

  • block hash is the same for the whole lifetime of the block
  • block hash is less expensive as only header is used
  • light client is able to verify block chain by only headers and corresponding signatures (without obligation to load the whole block)

@Erigara Erigara added the Refactor Improvement to overall code quality label Jul 24, 2024
@Erigara Erigara self-assigned this Jul 24, 2024
@Erigara Erigara force-pushed the block_header_hash branch 2 times, most recently from 6e1c1eb to e305422 Compare July 24, 2024 14:11
mversic
mversic previously approved these changes Jul 24, 2024
Signed-off-by: Shanin Roman <shanin1000@yandex.ru>
@mversic mversic enabled auto-merge (squash) July 24, 2024 18:09
@s8sato s8sato self-assigned this Jul 25, 2024
Copy link
Contributor

@s8sato s8sato left a comment

Choose a reason for hiding this comment

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

Along with #4880 that made the block header reflect the whole block payload, this PR would streamline the block hash

@mversic mversic merged commit d8e65f0 into hyperledger:main Jul 25, 2024
12 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Refactor Improvement to overall code quality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

How block hash should be derived?
3 participants