Skip to content

Commit

Permalink
chore: update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-orlovsky committed Nov 4, 2024
1 parent 506d28e commit 900d455
Show file tree
Hide file tree
Showing 7 changed files with 96 additions and 106 deletions.
26 changes: 8 additions & 18 deletions Cargo.lock

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

12 changes: 6 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ default-members = [
]

[workspace.package]
version = "0.12.0-alpha.1"
version = "0.12.0-alpha.2"
authors = ["Dr Maxim Orlovsky <[email protected]>"]
homepage = "https://github.com/LNP-BP"
repository = "https://github.com/LNP-BP/client_side_validation"
Expand All @@ -22,9 +22,9 @@ edition = "2021"
license = "Apache-2.0"

[workspace.dependencies]
amplify = "4.8.0"
strict_encoding = "2.8.0"
strict_types = "2.8.0"
amplify = "~4.8.0"
strict_encoding = "~2.8.0"
strict_types = "~2.8.0"

[package]
name = "client_side_validation"
Expand All @@ -46,8 +46,8 @@ name = "client_side_validation"
path = "src/lib.rs"

[dependencies]
commit_verify = { version = "0.12.0-alpha.1", path = "./commit_verify", default-features = false }
single_use_seals = { version = "0.12.0-alpha.1", path = "./single_use_seals" }
commit_verify = { version = "0.12.0-alpha.2", path = "./commit_verify", default-features = false }
single_use_seals = { version = "0.12.0-alpha.2", path = "./single_use_seals" }
serde_crate = { package = "serde", version = "1", features = ["derive"], optional = true }

[features]
Expand Down
4 changes: 2 additions & 2 deletions commit_verify/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ required-features = ["stl"]
amplify = { workspace = true }
strict_encoding = { workspace = true }
strict_types = { workspace = true }
vesper-lang = "0.1.0"
commit_encoding_derive = { version = "0.12.0-alpha.1", path = "derive" }
vesper-lang = "0.2.1"
commit_encoding_derive = { version = "0.12.0-alpha.2", path = "derive" }
sha2 = "0.10.8"
ripemd = "0.1.3"
rand = { version = "0.8.5", optional = true }
Expand Down
2 changes: 1 addition & 1 deletion commit_verify/src/stl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ use strict_types::{CompileError, LibBuilder, TypeLib};
use crate::{mpc, MerkleHash, MerkleNode, ReservedBytes, StrictHash, LIB_NAME_COMMIT_VERIFY};

pub const LIB_ID_COMMIT_VERIFY: &str =
"stl:t1xwwwIz-fgj0c!P-$Kh8oaL-qrthWrM-dxqldh6-qLoQ4Pk#escort-between-doctor";
"stl:t1xwwwIz-fgj0c~P-.Kh8oaL-qrthWrM-dxqldh6-qLoQ4Pk#escort-between-doctor";

fn _commit_verify_stl() -> Result<TypeLib, CompileError> {
LibBuilder::new(libname!(LIB_NAME_COMMIT_VERIFY), tiny_bset! {
Expand Down
2 changes: 1 addition & 1 deletion stl/[email protected]
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
-----BEGIN STRICT TYPE LIB-----
Id: stl:t1xwwwIz-fgj0c!P-$Kh8oaL-qrthWrM-dxqldh6-qLoQ4Pk#escort-between-doctor
Id: stl:t1xwwwIz-fgj0c~P-.Kh8oaL-qrthWrM-dxqldh6-qLoQ4Pk#escort-between-doctor
Name: CommitVerify
Dependencies: Std#ralph-blue-lucky
Check-SHA256: 4ec05430ba720c208d7a88e5bf0e66cd3660dbd2fd7695c6209acb19591e3a7d
Expand Down
4 changes: 2 additions & 2 deletions stl/[email protected]
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{-
Id: stl:t1xwwwIz-fgj0c!P-$Kh8oaL-qrthWrM-dxqldh6-qLoQ4Pk#escort-between-doctor
Id: stl:t1xwwwIz-fgj0c~P-.Kh8oaL-qrthWrM-dxqldh6-qLoQ4Pk#escort-between-doctor
Name: CommitVerify
Version: 0.1.0
Description: Client-side-validation deterministic commitments
Expand Down Expand Up @@ -62,7 +62,7 @@ data MerkleTree : method Method
data Message : [Byte ^ 32]

@mnemonic(subject-justin-cowboy)
data Method : sha256t
data Method : sha256t | (|)


@mnemonic(member-dexter-price)
Expand Down
152 changes: 76 additions & 76 deletions stl/Merkle.vesper
Original file line number Diff line number Diff line change
Expand Up @@ -10,93 +10,93 @@ Merklization vesper lexicon=types+commitments

-- General merklization workflows

MerkleHash commitment hasher=SHA256 tagged=urn:ubideco:merkle:node#2024-01-31
MerkleNode serialized
commitment MerkleHash, hasher SHA256, tagged urn:ubideco:merkle:node#2024-01-31
serialized MerkleNode

MerkleNode rec
branching enum NodeBranching void=0 single=1 branch=2
depth is U8
width is U256
node1 bytes len=32 aka=MerkleHash
node2 bytes len=32 aka=MerkleHash
rec MerkleNode
enum branching, NodeBranching, void 0, single 1, branch 2
is depth, U8
is width, U256
bytes node1, len 32, aka MerkleHash
bytes node2, len 32, aka MerkleHash


-- Multi-protocol commitment workflows

MerkleHash commitment hasher=SHA256 tagged=urn:ubideco:merkle:node#2024-01-31
Leaf serialized

Leaf union
inhabited rec tag=0
protocol bytes len=32 aka=ProtocolId
message bytes len=32 aka=Message
entropy rec tag=1
entropy is U64
pos is U32

Commitment commitment hasher=SHA256 tagged=urn:ubideco:mpc:commitment#2024-01-31
MerkleConcealed serialized

MerkleConcealed rec
depth enum {
U5 _0=0 _1=1 _2=2 _3=3 _4=4 _5=5 _6=6 _7=7
_8=8 _9=9 _10=10 _11=11 _12=12 _13=13 _14=14 _15=15
_16=16 _17=17 _18=18 _19=19 _20=20 _21=21 _22=22 _23=23
_24=24 _25=25 _26=26 _27=27 _28=28 _29=29 _30=30 _31=31
commitment MerkleHash, hasher SHA256, tagged urn:ubideco:merkle:node#2024-01-31
serialized Leaf

union Leaf
rec inhabited, tag 0
bytes protocol, len 32, aka ProtocolId
bytes message, len 32, aka Message
rec entropy, tag 1
is entropy, U64
is pos, U32

commitment Commitment, hasher SHA256, tagged urn:ubideco:mpc:commitment#2024-01-31
serialized MerkleConcealed

rec MerkleConcealed
enum depth {
U5, _0 0, _1 1, _2 2, _3 3, _4 4, _5 5, _6 6, _7 7
_8 8, _9 9, _10 10, _11 11, _12 12, _13 13, _14 14, _15 15
_16 16, _17 17, _18 18, _19 19, _20 20, _21 21, _22 22, _23 23
_24 24, _25 25, _26 26, _27 27, _28 28, _29 29, _30 30, _31 31

}
cofactor is U16
merkleRoot bytes len=32 aka=MerkleHash

Commitment commitment hasher=SHA256 tagged=urn:ubideco:mpc:commitment#2024-01-31
MerkleConcealed concealed concealed=MerkleConcealed

MerkleBlock rec
method enum Method sha256t=0
depth enum {
U5 _0=0 _1=1 _2=2 _3=3 _4=4 _5=5 _6=6 _7=7
_8=8 _9=9 _10=10 _11=11 _12=12 _13=13 _14=14 _15=15
_16=16 _17=17 _18=18 _19=19 _20=20 _21=21 _22=22 _23=23
_24=24 _25=25 _26=26 _27=27 _28=28 _29=29 _30=30 _31=31
is cofactor, U16
bytes merkleRoot, len 32, aka MerkleHash

commitment Commitment, hasher SHA256, tagged urn:ubideco:mpc:commitment#2024-01-31
concealed MerkleConcealed, concealed MerkleConcealed

rec MerkleBlock
enum method, Method, sha256t 0
enum depth {
U5, _0 0, _1 1, _2 2, _3 3, _4 4, _5 5, _6 6, _7 7
_8 8, _9 9, _10 10, _11 11, _12 12, _13 13, _14 14, _15 15
_16 16, _17 17, _18 18, _19 19, _20 20, _21 21, _22 22, _23 23
_24 24, _25 25, _26 26, _27 27, _28 28, _29 29, _30 30, _31 31

}
cofactor is U16
crossSection list len=1..MAX32
TreeNode union
concealedNode rec tag=0
depth enum {
U5 _0=0 _1=1 _2=2 _3=3 _4=4 _5=5 _6=6 _7=7
_8=8 _9=9 _10=10 _11=11 _12=12 _13=13 _14=14 _15=15
_16=16 _17=17 _18=18 _19=19 _20=20 _21=21 _22=22 _23=23
_24=24 _25=25 _26=26 _27=27 _28=28 _29=29 _30=30 _31=31
is cofactor, U16
list crossSection, len 1..MAX32
union TreeNode
rec concealedNode, tag 0
enum depth {
U5, _0 0, _1 1, _2 2, _3 3, _4 4, _5 5, _6 6, _7 7
_8 8, _9 9, _10 10, _11 11, _12 12, _13 13, _14 14, _15 15
_16 16, _17 17, _18 18, _19 19, _20 20, _21 21, _22 22, _23 23
_24 24, _25 25, _26 26, _27 27, _28 28, _29 29, _30 30, _31 31

}
hash bytes len=32 aka=MerkleHash
commitmentLeaf rec tag=1
protocolId bytes len=32 aka=ProtocolId
message bytes len=32 aka=Message
some is U64 option wrapped tag=1

Commitment commitment hasher=SHA256 tagged=urn:ubideco:mpc:commitment#2024-01-31
MerkleConcealed concealed concealed=MerkleConcealed

MerkleTree rec
method enum Method sha256t=0
depth enum {
U5 _0=0 _1=1 _2=2 _3=3 _4=4 _5=5 _6=6 _7=7
_8=8 _9=9 _10=10 _11=11 _12=12 _13=13 _14=14 _15=15
_16=16 _17=17 _18=18 _19=19 _20=20 _21=21 _22=22 _23=23
_24=24 _25=25 _26=26 _27=27 _28=28 _29=29 _30=30 _31=31
bytes hash, len 32, aka MerkleHash
rec commitmentLeaf, tag 1
bytes protocolId, len 32, aka ProtocolId
bytes message, len 32, aka Message
is some, U64, option, wrapped, tag 1

commitment Commitment, hasher SHA256, tagged urn:ubideco:mpc:commitment#2024-01-31
concealed MerkleConcealed, concealed MerkleConcealed

rec MerkleTree
enum method, Method, sha256t 0
enum depth {
U5, _0 0, _1 1, _2 2, _3 3, _4 4, _5 5, _6 6, _7 7
_8 8, _9 9, _10 10, _11 11, _12 12, _13 13, _14 14, _15 15
_16 16, _17 17, _18 18, _19 19, _20 20, _21 21, _22 22, _23 23
_24 24, _25 25, _26 26, _27 27, _28 28, _29 29, _30 30, _31 31

}
entropy is U64
cofactor is U16
messages map len=0..MAX24
key bytes len=32 aka=ProtocolId
value bytes len=32 aka=Message
map map len=0..MAX24
key is U32
value tuple
_ bytes len=32 aka=ProtocolId
_ bytes len=32 aka=Message
is entropy, U64
is cofactor, U16
map messages, len 0..MAX24
bytes key, len 32, aka ProtocolId
bytes value, len 32, aka Message
map map, len 0..MAX24
is key, U32
tuple value
bytes _, len 32, aka ProtocolId
bytes _, len 32, aka Message

0 comments on commit 900d455

Please sign in to comment.