Skip to content

Commit

Permalink
primitives: make TapMerklePath max size match consensus rule
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-orlovsky committed Oct 5, 2023
1 parent 2bf569e commit 64a77f3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions primitives/src/taproot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ use std::borrow::Borrow;
use std::fmt::{self, Formatter, LowerHex, UpperHex};
use std::{cmp, io};

use amplify::confinement::{Confined, TinyVec, U32};
use amplify::confinement::{Confined, U32};
use amplify::{Bytes32, Wrapper};
use commit_verify::{DigestExt, Sha256};
use secp256k1::{Scalar, XOnlyPublicKey};
Expand Down Expand Up @@ -221,7 +221,7 @@ impl IntoTapHash for TapNodeHash {
derive(Serialize, Deserialize),
serde(crate = "serde_crate", transparent)
)]
pub struct TapMerklePath(TinyVec<TapBranchHash>);
pub struct TapMerklePath(Confined<Vec<TapBranchHash>, 0, 128>);

/// Taproot annex prefix.
pub const TAPROOT_ANNEX_PREFIX: u8 = 0x50;
Expand Down
2 changes: 1 addition & 1 deletion stl/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Dependencies:
urn:ubideco:stl:9KALDYR8Nyjq4FdMW6kYoL7vdkWnqPqNuFnmE9qHpNjZ

B0JpdGNvaW4Be4SAPJ764hElp3wsObxw0v3o+UOuDf2c9OaC7cdmynADU3RkAQNT
dGQBAGGGItF7rvBmAt/ndcmA4LNrbrroCQ2AdfdRO+xLk/ZNBEJvb2wpAAlCaXAz
dGQBAGGGItF7rvBmAt/ndcmA4LNrbrroCQ2AdfdRO+xLk/ZNBEJvb2wrAAlCaXAz
NDBTaWcGAgNzaWcABwAAQEAADHNpZ2hhc2hfdHlwZQAEAgAEbm9uZQAAAAEEc29t
ZQAFAQHbF2Q+dwkTJ+gEmSSB1dxgFSMIlVM55Yszn9RMT3JIKglCbG9ja0hhc2gF
AQAHAABAIAALQmxvY2tIZWFkZXIGBgd2ZXJzaW9uAABEDXByZXZCbG9ja0hhc2gB
Expand Down
4 changes: 2 additions & 2 deletions stl/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ data TapCode :: pushBytes32:32 | pushData1:76 | pushData2:77 | pushData

-- urn:ubideco:semid:FHWiTycy1JvN5CvVJ3ibyAhtXfr21t3BDNuLFnqYPQ2j#middle-jazz-basket
data TapLeafHash :: [Byte ^ 32]
-- urn:ubideco:semid:5YrqoQi4fLCLqzBE1ZKb623WC311FGRgjcivLPXadnEN#gossip-protein-orion
data TapMerklePath :: [TapBranchHash ^ ..0xff]
-- urn:ubideco:semid:2Cy61crHEVHKfCSix5WhmS9ms6J4FFE9wCC6pLsyondh#dublin-chemist-version
data TapMerklePath :: [TapBranchHash ^ ..0x80]
-- urn:ubideco:semid:4M8xyvABKKKJseN6Pme5eKrAuusMNMXoY5s6ifsEcreC#crash-culture-jamaica
data TapNodeHash :: [Byte ^ 32]
-- urn:ubideco:semid:71AxyLFsoRG6hJ1c11gxad65nEbWfzkQBjWCPPrgCyjX#telecom-quest-helium
Expand Down

0 comments on commit 64a77f3

Please sign in to comment.