rust-bitcoin-unsafe-fast/bitcoin
merge-script 31f1a12aaf
Merge rust-bitcoin/rust-bitcoin#2945: Support Testnet4 Network
2424b654d5 feat: rust-bitcoin supports testnet4 (BinChengZhao)
afa91a2030 Introduce TestnetVersion enum with only TestnetV3 (BinChengZhao)

Pull request description:

  Fixed: https://github.com/rust-bitcoin/rust-bitcoin/issues/2749

  1. Adjust `Network` to support `Testnet4`. (Based on https://github.com/rust-bitcoin/rust-bitcoin/issues/2749#issuecomment-2152366608 as an implementation idea.)

  2. Handle conflicting procedure macros and declaration macros, since the original macros can't handle the new `Network::Testnet(TestnetVersion)` structure properly, and make internal implementations compatible with previous versions (e.g., `testnet` for `Testnet3`, `testnet4` for `Testnet4`, to minimize user-side effects).

  3. add `Testnet4` related Params, Block.

  4. optimize compatibility test cases.

  5. Regarding `fn: genesis_block`, calling `bitcoin_genesis_tx` with any Network type internally gets a reasonable `merkle_root`, but not `Testnet4`. (By comparison, I confirmed that the built-in transaction data provided is correct, and combined with the fixed `merkle_root` of `Testnet4` the correct block hash can be computed, which is not possible if the transaction data is incorrect.) **I'd appreciate it if some developer could guide me on what the problem is, and I'll work on it.**

  Of course, all these changes are based on https://github.com/rust-bitcoin/rust-bitcoin/issues/2749 , and the consensus of the discussion, if you have any comments, please leave a message, I will actively improve, and promote the support of `Testnet4`.

ACKs for top commit:
  tcharding:
    ACK 2424b654d5
  apoelstra:
    ACK 2424b654d5 successfully ran local tests

Tree-SHA512: a501f0a320460afdad2eb12ef6ff315b6357b7779dfe7c7028ea090da567019c947599006a06b3834265db1481129752f015629ef72fea6f862d01323ce9d024
2024-10-07 17:15:04 +00:00
..
contrib Add Arbitrary dependency 2024-08-23 15:39:20 -05:00
embedded Move opcodes to primitives 2024-07-09 15:26:33 +10:00
examples Improve naming of methods on Xpub and Xpriv 2024-09-29 11:07:32 +08:00
src feat: rust-bitcoin supports testnet4 2024-10-05 23:47:21 +08:00
tests Introduce TestnetVersion enum with only TestnetV3 2024-10-03 18:40:06 +08:00
CHANGELOG.md Capitalize Merkle 2024-07-01 17:42:43 +01:00
Cargo.toml Bump version of bitcoin-io to 0.2.0 2024-10-02 09:47:10 +10:00