diff --git a/Cargo.lock b/Cargo.lock index b0e27dd4..dfd900dc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,9 +4,9 @@ version = 3 [[package]] name = "aluvm" -version = "0.11.0-beta.3" +version = "0.11.0-beta.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60bd5631720ae3b92182387baa647e34a45b56ea3e359fa756866a95a64e48f4" +checksum = "e0278873e02b7eca06433f4f13aaf77bbf6e6976444d17c811e140c254a67c38" dependencies = [ "amplify", "baid58", @@ -187,8 +187,9 @@ dependencies = [ [[package]] name = "bp-consensus" -version = "0.11.0-beta.3" -source = "git+https://github.com/BP-WG/bp-core?branch=v0.11#19cf59adea068dbda7a617a1c514b544c008b10d" +version = "0.11.0-beta.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4455276e0c26bc4a742b8cf2a2a8fe1a42b06f15873dd6145c32af9a7a387a94" dependencies = [ "amplify", "chrono", @@ -201,8 +202,9 @@ dependencies = [ [[package]] name = "bp-core" -version = "0.11.0-beta.3" -source = "git+https://github.com/BP-WG/bp-core?branch=v0.11#19cf59adea068dbda7a617a1c514b544c008b10d" +version = "0.11.0-beta.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83c1a3c6505e4fbf81d3f7ba5b79c789336e7b959d6b87ff3f37e0b70df68a51" dependencies = [ "amplify", "bp-consensus", @@ -219,8 +221,9 @@ dependencies = [ [[package]] name = "bp-dbc" -version = "0.11.0-beta.3" -source = "git+https://github.com/BP-WG/bp-core?branch=v0.11#19cf59adea068dbda7a617a1c514b544c008b10d" +version = "0.11.0-beta.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9efc8f72528ae16a84aeac95657f326268289bb5b5b64c24309c1a6bc0b97caa" dependencies = [ "amplify", "base85", @@ -233,8 +236,9 @@ dependencies = [ [[package]] name = "bp-seals" -version = "0.11.0-beta.3" -source = "git+https://github.com/BP-WG/bp-core?branch=v0.11#19cf59adea068dbda7a617a1c514b544c008b10d" +version = "0.11.0-beta.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a54af971320d2b3358eb7b4380d0dda72810b8f8b417790f38e2a8f28a10cad" dependencies = [ "amplify", "baid58", @@ -249,9 +253,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.15.0" +version = "3.15.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d32a994c2b3ca201d9b263612a374263f05e7adde37c4707f693dcd375076d1f" +checksum = "8ea184aa71bb362a1157c896979544cc23974e08fd265f29ea96b59f0b4a555b" [[package]] name = "byteorder" @@ -261,12 +265,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "cc" -version = "1.0.83" +version = "1.0.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" -dependencies = [ - "libc", -] +checksum = "02f341c093d19155a6e41631ce5971aac4e9a868262212153124c15fa22d1cdc" [[package]] name = "cfg-if" @@ -290,8 +291,9 @@ dependencies = [ [[package]] name = "commit_encoding_derive" -version = "0.11.0-beta.3" -source = "git+https://github.com/LNP-BP/client_side_validation?branch=layouts#d81288a7df7d52e5dfc4b2a17ad43780d6107cc4" +version = "0.11.0-beta.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d25b4b09de08ea8530138fb8a7ca45d90b53fef8d582a944a1b08eedf3f2583e" dependencies = [ "amplify", "amplify_syn", @@ -302,8 +304,9 @@ dependencies = [ [[package]] name = "commit_verify" -version = "0.11.0-beta.3" -source = "git+https://github.com/LNP-BP/client_side_validation?branch=layouts#d81288a7df7d52e5dfc4b2a17ad43780d6107cc4" +version = "0.11.0-beta.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00351b49be0ce72775b37cca336c3c10e958d810ca097f0712d95a63684b4f99" dependencies = [ "amplify", "commit_encoding_derive", @@ -619,9 +622,9 @@ dependencies = [ [[package]] name = "ryu" -version = "1.0.16" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" +checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" [[package]] name = "scoped-tls" @@ -674,29 +677,29 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.196" +version = "1.0.197" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "870026e60fa08c69f064aa766c10f10b1d62db9ccd4d0abb206472bee0ce3b32" +checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.196" +version = "1.0.197" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33c85360c95e7d137454dc81d9a4ed2b8efd8fbe19cee57357b32b9771fccb67" +checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.49", + "syn 2.0.51", ] [[package]] name = "serde_json" -version = "1.0.113" +version = "1.0.114" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69801b70b1c3dac963ecb03a364ba0ceda9cf60c71cfe475e99864759c8b8a79" +checksum = "c5f09b1bd632ef549eaa9f60a1f8de742bdbc698e6cee2095fc84dde5f549ae0" dependencies = [ "itoa", "ryu", @@ -724,9 +727,9 @@ dependencies = [ [[package]] name = "serde_yaml" -version = "0.9.31" +version = "0.9.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adf8a49373e98a4c5f0ceb5d05aa7c648d75f63774981ed95b7c7443bbd50c6e" +checksum = "8fd075d994154d4a774f95b51fb96bdc2832b0ea48425c92546073816cda1f2f" dependencies = [ "indexmap", "itoa", @@ -748,9 +751,9 @@ dependencies = [ [[package]] name = "single_use_seals" -version = "0.11.0-beta.3" +version = "0.11.0-beta.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b14ebe6be1e12070208a6f2ceb49f946d835b1f7dfb809a4db025de8f5ffe0a" +checksum = "88382ebc20031395d2b3acd6ac70f2fc41dfcaaefa5b61836fe5753837284957" dependencies = [ "amplify_derive", ] @@ -783,7 +786,8 @@ dependencies = [ [[package]] name = "strict_types" version = "2.7.0-beta.1" -source = "git+https://github.com/strict-types/strict-types?branch=vesper#266f2d8b6e015522e9e7e72af663af9c9d3c7d2c" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d66de5cdf197b68e13fcac9fad7ed288f44052a319a3df3abbaba9c6e52f735b" dependencies = [ "amplify", "baid58", @@ -822,9 +826,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.49" +version = "2.0.51" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "915aea9e586f80826ee59f8453c1101f9d1c4b3964cd2460185ee8e299ada496" +checksum = "6ab617d94515e94ae53b8406c628598680aa0c9587474ecbe58188f7b345d66c" dependencies = [ "proc-macro2", "quote", @@ -848,7 +852,7 @@ checksum = "a953cb265bef375dae3de6663da4d3804eee9682ea80d8e2542529b73c531c81" dependencies = [ "proc-macro2", "quote", - "syn 2.0.49", + "syn 2.0.51", ] [[package]] @@ -946,7 +950,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.49", + "syn 2.0.51", "wasm-bindgen-shared", ] @@ -980,7 +984,7 @@ checksum = "642f325be6301eb8107a83d12a8ac6c1e1c54345a7ef1a9261962dfefda09e66" dependencies = [ "proc-macro2", "quote", - "syn 2.0.49", + "syn 2.0.51", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -1013,7 +1017,7 @@ checksum = "a5211b7550606857312bba1d978a8ec75692eae187becc5e680444fffc5e6f89" dependencies = [ "proc-macro2", "quote", - "syn 2.0.49", + "syn 2.0.51", ] [[package]] @@ -1037,9 +1041,9 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.0" +version = "0.52.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" +checksum = "d380ba1dc7187569a8a9e91ed34b8ccfc33123bbacb8c0aed2d1ad7f3ef2dc5f" dependencies = [ "windows_aarch64_gnullvm", "windows_aarch64_msvc", @@ -1052,51 +1056,51 @@ dependencies = [ [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.0" +version = "0.52.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" +checksum = "68e5dcfb9413f53afd9c8f86e56a7b4d86d9a2fa26090ea2dc9e40fba56c6ec6" [[package]] name = "windows_aarch64_msvc" -version = "0.52.0" +version = "0.52.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" +checksum = "8dab469ebbc45798319e69eebf92308e541ce46760b49b18c6b3fe5e8965b30f" [[package]] name = "windows_i686_gnu" -version = "0.52.0" +version = "0.52.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" +checksum = "2a4e9b6a7cac734a8b4138a4e1044eac3404d8326b6c0f939276560687a033fb" [[package]] name = "windows_i686_msvc" -version = "0.52.0" +version = "0.52.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" +checksum = "28b0ec9c422ca95ff34a78755cfa6ad4a51371da2a5ace67500cf7ca5f232c58" [[package]] name = "windows_x86_64_gnu" -version = "0.52.0" +version = "0.52.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" +checksum = "704131571ba93e89d7cd43482277d6632589b18ecf4468f591fbae0a8b101614" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.0" +version = "0.52.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" +checksum = "42079295511643151e98d61c38c0acc444e52dd42ab456f7ccfd5152e8ecf21c" [[package]] name = "windows_x86_64_msvc" -version = "0.52.0" +version = "0.52.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" +checksum = "0770833d60a970638e989b3fa9fd2bb1aaadcf88963d1659fd7d9990196ed2d6" [[package]] name = "winnow" -version = "0.6.1" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d90f4e0f530c4c69f62b80d839e9ef3855edc9cba471a160c4d692deed62b401" +checksum = "7a4191c47f15cc3ec71fcb4913cb83d58def65dd3787610213c649283b5ce178" dependencies = [ "memchr", ] diff --git a/Cargo.toml b/Cargo.toml index 187dd164..d9b74fc7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -25,10 +25,10 @@ required-features = ["stl"] amplify = { version = "~4.6.0", features = ["rand"] } strict_encoding = "~2.7.0-beta.1" strict_types = "~2.7.0-beta.1" -aluvm = { version = "~0.11.0-beta.3", features = ["std"] } -commit_verify = { version = "~0.11.0-beta.3", features = ["rand", "derive"] } -single_use_seals = "~0.11.0-beta.3" -bp-core = { version = "~0.11.0-beta.3" } +aluvm = { version = "~0.11.0-beta.4", features = ["std"] } +commit_verify = { version = "~0.11.0-beta.4", features = ["rand", "derive"] } +single_use_seals = "~0.11.0-beta.4" +bp-core = { version = "~0.11.0-beta.4" } secp256k1-zkp = { version = "0.10.1", features = ["rand", "rand-std", "global-context"] } # TODO: Update version before the release baid58 = "~0.4.4" mime = "~0.3.17" @@ -60,11 +60,3 @@ wasm-bindgen-test = "0.3" [package.metadata.docs.rs] features = [ "all" ] - -[patch.crates-io] -strict_types = { git = "https://github.com/strict-types/strict-types", branch = "vesper" } -commit_verify = { git = "https://github.com/LNP-BP/client_side_validation", branch = "layouts" } -bp-consensus = { git = "https://github.com/BP-WG/bp-core", branch = "v0.11" } -bp-dbc = { git = "https://github.com/BP-WG/bp-core", branch = "v0.11" } -bp-seals = { git = "https://github.com/BP-WG/bp-core", branch = "v0.11" } -bp-core = { git = "https://github.com/BP-WG/bp-core", branch = "v0.11" } diff --git a/src/contract/fungible.rs b/src/contract/fungible.rs index 14ffd672..afa1f593 100644 --- a/src/contract/fungible.rs +++ b/src/contract/fungible.rs @@ -447,8 +447,9 @@ impl Default for RangeProof { } impl StrictEncode for RangeProof { - fn strict_encode(&self, _: W) -> io::Result { - panic!("bulletproof dummies must never be stored") + fn strict_encode(&self, writer: W) -> io::Result { + eprintln!("bulletproof dummies must never be stored"); + Ok(writer) } } diff --git a/src/stl.rs b/src/stl.rs index 6f73da44..236d029e 100644 --- a/src/stl.rs +++ b/src/stl.rs @@ -34,7 +34,7 @@ use crate::{ /// Strict types id for the library providing data types for RGB consensus. pub const LIB_ID_RGB: &str = - "urn:ubideco:stl:Hzv1xPBtQfqcGYeisvS2V9DPj1VRC5WyYfME2RtmuRpu#blitz-english-eric"; + "urn:ubideco:stl:2nWgjeSMhVE2mKgC7WyE5Dn8a6tZJDMoNugDWdc4vcZZ#spring-moral-almanac"; fn _rgb_core_stl() -> Result { LibBuilder::new(libname!(LIB_NAME_RGB), tiny_bset! { diff --git a/src/vm/isa.rs b/src/vm/isa.rs index ed0090fe..bcbafc15 100644 --- a/src/vm/isa.rs +++ b/src/vm/isa.rs @@ -20,7 +20,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use std::collections::{BTreeSet, HashSet}; +use std::collections::BTreeSet; use std::ops::RangeInclusive; use aluvm::isa; @@ -52,19 +52,19 @@ impl InstructionSet for RgbIsa { bset! {"RGB"} } - fn src_regs(&self) -> HashSet { + fn src_regs(&self) -> BTreeSet { match self { RgbIsa::Contract(op) => op.src_regs(), RgbIsa::Timechain(op) => op.src_regs(), - RgbIsa::Fail(_) => set![], + RgbIsa::Fail(_) => bset![], } } - fn dst_regs(&self) -> HashSet { + fn dst_regs(&self) -> BTreeSet { match self { RgbIsa::Contract(op) => op.dst_regs(), RgbIsa::Timechain(op) => op.dst_regs(), - RgbIsa::Fail(_) => set![], + RgbIsa::Fail(_) => bset![], } } diff --git a/src/vm/op_contract.rs b/src/vm/op_contract.rs index 94caa453..dfc9fc03 100644 --- a/src/vm/op_contract.rs +++ b/src/vm/op_contract.rs @@ -22,7 +22,7 @@ #![allow(clippy::unusual_byte_groupings)] -use std::collections::{BTreeSet, HashSet}; +use std::collections::BTreeSet; use std::ops::RangeInclusive; use aluvm::isa::{Bytecode, BytecodeError, ExecStep, InstructionSet}; @@ -157,32 +157,32 @@ impl InstructionSet for ContractOp { fn isa_ids() -> BTreeSet<&'static str> { none!() } - fn src_regs(&self) -> HashSet { set![] } + fn src_regs(&self) -> BTreeSet { bset![] } - fn dst_regs(&self) -> HashSet { + fn dst_regs(&self) -> BTreeSet { match self { ContractOp::CnP(_, reg) | ContractOp::CnS(_, reg) | ContractOp::CnG(_, reg) | ContractOp::CnC(_, reg) => { - set![Reg::A(RegA::A16, *reg)] + bset![Reg::A(RegA::A16, *reg)] } ContractOp::LdF(_, _, reg) => { - set![Reg::A(RegA::A64, *reg)] + bset![Reg::A(RegA::A64, *reg)] } ContractOp::LdP(_, _, reg) | ContractOp::LdS(_, _, reg) | ContractOp::LdG(_, _, reg) | ContractOp::LdC(_, _, reg) | ContractOp::LdM(reg) => { - set![Reg::S(*reg)] + bset![Reg::S(*reg)] } ContractOp::PcVs(_) | ContractOp::PcCs(_, _) => { - set![] + bset![] } - ContractOp::Fail(_) => set![], + ContractOp::Fail(_) => bset![], } } diff --git a/src/vm/op_timechain.rs b/src/vm/op_timechain.rs index 7cb3b1c3..beaaddf7 100644 --- a/src/vm/op_timechain.rs +++ b/src/vm/op_timechain.rs @@ -20,7 +20,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use std::collections::{BTreeSet, HashSet}; +use std::collections::BTreeSet; use std::ops::RangeInclusive; use aluvm::isa::{Bytecode, BytecodeError, ExecStep, InstructionSet}; @@ -43,9 +43,9 @@ impl InstructionSet for TimechainOp { fn isa_ids() -> BTreeSet<&'static str> { none!() } - fn src_regs(&self) -> HashSet { set![] } + fn src_regs(&self) -> BTreeSet { bset![] } - fn dst_regs(&self) -> HashSet { set![] } + fn dst_regs(&self) -> BTreeSet { bset![] } fn exec(&self, regs: &mut CoreRegs, _site: LibSite, _context: &Self::Context<'_>) -> ExecStep { match self {