Skip to content

Commit

Permalink
Verify script via bitcoinconsensus (paritytech#24)
Browse files Browse the repository at this point in the history
* Minor pure refactor

* Replace tx_serialize_size_no_witness() with tx.base_size()

This function is already equivalently implemented in rust-bitcoin.

* Replace block_serialize_size_no_witness() with block.base_size()

* Use block.weight() and tx.weight()

* Separate out tx_verify module

* Rename header_verifier.rs to header_verify.rs

* Inline verify_transaction clsoure

* Verify script using bitcoinconsensus

* Fix difficulty bits check

* Double the stall timeout when the chain is higher than 300000
  • Loading branch information
liuchengxu committed Jul 19, 2024
1 parent 4097995 commit 19e6a7f
Show file tree
Hide file tree
Showing 8 changed files with 295 additions and 255 deletions.
10 changes: 10 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ default-members = ["crates/subcoin-node"]
ansi_term = "0.12.1"
async-trait = "0.1"
bitcoin = { git = "https://github.com/liuchengxu/rust-bitcoin", branch = "0.32.x-subcoin", default-features = false }
bitcoinconsensus = "0.106.0"
bitcoin-explorer = { git = "https://github.com/liuchengxu/Rusty-Bitcoin-Explorer", branch = "rust-bitcoin-upgrade", default-features = false }
chrono = "0.4.37"
clap = { version = "4", features = ["derive"] }
Expand Down
1 change: 1 addition & 0 deletions crates/sc-consensus-nakamoto/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ license.workspace = true
[dependencies]
async-trait = { workspace = true }
bitcoin = { workspace = true }
bitcoinconsensus = { workspace = true }
clap = { workspace = true, optional = true }
codec = { workspace = true }
futures = { workspace = true }
Expand Down
Loading

0 comments on commit 19e6a7f

Please sign in to comment.