rust-bitcoin-unsafe-fast/bitcoin
Andrew Poelstra 10eb0da1ef
Merge rust-bitcoin/rust-bitcoin#1533: Implement support for Hidden nodes in taproot trees and Fix taproot serde bugs
74022baa44 Rename ScriptLeaf to LeafNode (sanket1729)
289dc1e7f5 Remove serde for taprootspendinfo (sanket1729)
a397ab0c19 Remove serde for ScriptLeaf (sanket1729)
9affda3012 Introduce Hidden leaves in ScriptLeaves (sanket1729)
22bc39a143 Fix serde for TaprootMerkleBranch (sanket1729)
38ed9bdf49 MOVE ONLY: Move TapTree to taproot module (sanket1729)

Pull request description:

  This PR changes/removes the serde implementation for the following types

  - TaprootSpendInfo: Removed. This data structure contains derived information for taproot spending that cannot be validated easily. To elaborate, `TaprootSpendInfo` is constructed from a tree, but loses information about the tree structure and maintains handy information like `script_control_block_map`, cached tweaked key, Merkle root etc.
  - TaprootBuillder: Removed. Hard to implement and not very useful.
  - TapTree: Modified to check invariants.
  - NodeInfo: Now implements serde with support for Hidden nodes
  - ScriptLeaf: Removed serde. Users should not directly construct this. This is just an output iterator item of `TapTree::script_leaves()`

  Data structure changes:

  - Introduced `LeafNode`: Supports Hidden leaves. Has serde implemented
  - Cleanly separate `TapTree` and `NodeInfo`:  `TapTree` is a full BIP370 compatible tree with no hidden nodes. `NodeInfo` is a tree that can potentially contain hidden leaves.
  - Added `NodeInfo::leaf_nodes`: Iterator that iterates over known and hidden leaves of `NodeInfo`.
  - Updated `TapTree::script_leaves`: Iterator that is guaranteed to output known leaves.

ACKs for top commit:
  tcharding:
    ACK 74022baa44
  apoelstra:
    ACK 74022baa44

Tree-SHA512: 919ea5bf60dc0cd8431301c1b744b046d1d781b3bed302b83a600cfa644216b6c682752795d463646b2723ac8661879284f557862a67e4572fd965fcf3dc194d
2023-03-04 13:41:37 +00:00
..
contrib Pin syn dependency for MSRV toolchain 2023-02-24 08:41:40 +11:00
embedded Instruct devs to use nightly for embedded 2023-02-03 08:44:47 +11:00
examples Improve the public API 2023-03-01 09:28:42 +11:00
fuzz Add a newtype for script-pushable slice 2023-02-18 16:35:25 +01:00
src Merge rust-bitcoin/rust-bitcoin#1533: Implement support for Hidden nodes in taproot trees and Fix taproot serde bugs 2023-03-04 13:41:37 +00:00
tests Remove serde for taprootspendinfo 2023-03-01 16:58:24 -08:00
CHANGELOG.md add some documentation clarifying the locktime ordering shenanigans in #1330 2022-12-15 23:12:03 +00:00
Cargo.toml Re-name hash inner/byte methods 2023-02-27 14:23:58 +11:00
build.rs Set rustv_1_53 in build script 2023-02-02 10:12:16 +11:00