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

Use sha2 for block hash calculation #1823

Merged
merged 8 commits into from
Feb 7, 2025
Merged

Conversation

exeokan
Copy link
Contributor

@exeokan exeokan commented Feb 6, 2025

Description

Modifies HeaderWrapper::verify_hash to use accelerated sha2 crate.

Linked Issues

Testing

Added unit test calculate_block_hash

@exeokan exeokan requested a review from eyusufatik as a code owner February 6, 2025 15:02
@auto-assign auto-assign bot requested a review from jfldde February 6, 2025 15:02
@exeokan
Copy link
Contributor Author

exeokan commented Feb 6, 2025

Didn't change HeaderWrapper::block_hash and HeaderWrapper::new as they are not called from guest code, correct me if that's not the case

Copy link

codecov bot commented Feb 6, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.5%. Comparing base (d1d6dd4) to head (ce8b510).
Report is 6 commits behind head on nightly.

Additional details and impacted files
Files with missing lines Coverage Δ
crates/bitcoin-da/src/spec/header.rs 83.1% <100.0%> (+7.5%) ⬆️

... and 5 files with indirect coverage changes

@exeokan exeokan added the HOLD-MERGE PR is not draft but should not be merged yet label Feb 6, 2025
@kpp
Copy link
Contributor

kpp commented Feb 6, 2025

Didn't change HeaderWrapper::block_hash and HeaderWrapper::new as they are not called from guest code, correct me if that's not the case

Probably yes but tests now test your code and reflect changes

@exeokan exeokan removed the HOLD-MERGE PR is not draft but should not be merged yet label Feb 7, 2025
@eyusufatik eyusufatik merged commit 91120a9 into nightly Feb 7, 2025
13 of 14 checks passed
@eyusufatik eyusufatik deleted the ege/use-sha2-for-block-hash branch February 7, 2025 14:21
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.

use precompile for Bitcoin header hash calculation
3 participants