Repository: ergoplatform/sigma-rust (language: rust)

Issue:
Expose `ErgoBox::from_box_candidate` in Wasm API



Discussion / hints:

Fix patch:
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index ee660a4af..e8fecadcc 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -235,7 +235,7 @@ jobs:
 
       - uses: actions-rs/toolchain@v1
         with:
-          toolchain: nightly-2022-03-29
+          toolchain: nightly-2022-11-17
           override: true
 
       - name: install deps
diff --git a/Cargo.toml b/Cargo.toml
index 41be49db5..0f8e83c65 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -20,6 +20,59 @@ members = [
     "bindings/ergo-lib-jni"
 ]
 
+[workspace.package]
+repository = "https://github.com/ergoplatform/sigma-rust"
+edition = "2021"
+
+[workspace.dependencies]
+sigma-util = { version = "^0.9.0", path = "./sigma-util" }
+sigma-ser = { version = "^0.10.0", path = "./sigma-ser" }
+ergotree-ir = { version = "^0.21.0", path = "./ergotree-ir" }
+ergo-chain-types = { version = "^0.8.0", path = "./ergo-chain-types" }
+sigma-test-util = { version = "^0.3.0", path = "./sigma-test-util" }
+ergoscript-compiler = { version = "^0.17.0", path = "./ergoscript-compiler" }
+ergotree-interpreter = { version = "^0.21.0", path = "./ergotree-interpreter" }
+ergo-nipopow = { version = "^0.8", path = "./ergo-nipopow" }
+ergo-merkle-tree = { version = "^0.8.0", path = "./ergo-merkle-tree" }
+ergo-rest = { version = "^0.6.0", path = "./ergo-rest" }
+ergo-lib = { version = "^0.21.0", path = "./ergo-lib"}
+k256 = { version = "0.11", features = ["arithmetic", "ecdsa"] }
+elliptic-curve = {version = "0.12", features = [ "ff"]}
+thiserror = "1"
+bounded-vec = { version = "^0.7.0" }
+bitvec = { version = "1.0.1" }
+derive_more = "0.99"
+blake2 = "0.10"
+sha2 = "0.10"
+num-derive = "0.3.3"
+num-traits = "0.2.14"
+num-integer = "0.1.44"
+num-bigint = "0.4.0"
+lazy_static = "1.4"
+bs58 = "0.4.0"
+base16 = "0.2.1"
+base64 = "0.13.0"
+indexmap = "1.3.2"
+serde = { version = "1.0", features = ["derive"] }
+serde_json = { version = "1.0", features = ["arbitrary_precision"] }
+serde_with = { version = "1.9.1", features = ["json"] }
+rand = "0.8.5"
+bytes = "1.1"
+byteorder = "1"
+futures = "0.3"
+tokio = { version = "1.15.0", features = ["full"] }
+tokio-stream = { version = "0.1.8", features = ["sync", "time"] }
+tokio-util = { version = "0.6.9", features = ["codec"] }
+bounded-integer = { version = "^0.5", features = ["types"] }
+url = "2.2"
+getrandom = { version = "0.2.7" }
+
+# dev-dependencies
+proptest = { version = "1.0", default-features = false, features = ["std"] }
+proptest-derive = "0.3"
+pretty_assertions = "0.7.2"
+wasm-bindgen-test = "0.3.10"
+
 [profile.release]
 # Tell `rustc` to optimize for small code size.
 opt-level = "z"
diff --git a/bindings/ergo-lib-c-core/Cargo.toml b/bindings/ergo-lib-c-core/Cargo.toml
index c9f42aa2b..a9022f265 100644
--- a/bindings/ergo-lib-c-core/Cargo.toml
+++ b/bindings/ergo-lib-c-core/Cargo.toml
@@ -3,32 +3,26 @@ name = "ergo-lib-c-core"
 version = "0.21.0"
 license = "CC0-1.0"
 authors = ["Denys Zadorozhnyi <denys@zadorozhnyi.com>"]
-edition = "2018"
+repository.workspace = true
+edition.workspace = true
 description = "Common code for ergo-lib C and JNI bindings"
-repository = "https://github.com/ergoplatform/sigma-rust"
 
 [lib]
 crate-type = ["lib"]
 
 [dependencies]
-base16 = "0.2.1"
-derive_more = "0.99"
-ergo-lib = { version = "^0.21.0", path = "../../ergo-lib"}
-serde = { version = "1.0", features = ["derive"]}
-serde_json = "1.0"
-thiserror = "1"
-tokio = { version = "1", features = ["full"], optional = true }
+base16 = { workspace = true }
+derive_more = { workspace = true }
+ergo-lib = { workspace = true }
+serde = { workspace = true }
+serde_json = { workspace = true }
+thiserror = { workspace = true }
+tokio = { workspace = true, optional = true }
 futures-util = "0.3"
-url = "2.2"
-bounded-integer = { version = "^0.5", features = ["types"] }
-
-[dependencies.serde_with]
-version = "1.9.1"
-features = [ "json" ]
-
-[dependencies.bounded-vec]
-version = "^0.7.0"
-features = ["serde"]
+url = { workspace = true }
+bounded-integer = { workspace = true }
+serde_with = { workspace = true }
+bounded-vec = { workspace = true, features=["serde"] }
 
 [features]
 default = ["mnemonic_gen", "ergo-lib/compiler"]
diff --git a/bindings/ergo-lib-c/Cargo.toml b/bindings/ergo-lib-c/Cargo.toml
index f54362933..143bf3287 100644
--- a/bindings/ergo-lib-c/Cargo.toml
+++ b/bindings/ergo-lib-c/Cargo.toml
@@ -3,9 +3,9 @@ name = "ergo-lib-c"
 version = "0.21.0"
 license = "CC0-1.0"
 authors = ["Denys Zadorozhnyi <denys@zadorozhnyi.com>"]
-edition = "2018"
+repository.workspace = true
+edition.workspace = true
 description = "C bindings for ergo-lib"
-repository = "https://github.com/ergoplatform/sigma-rust"
 # exclude generated C header
 exclude = [
     "h/*"
@@ -16,7 +16,7 @@ name = "ergo"
 crate-type = ["staticlib"]
 
 [dependencies]
-ergo-lib-c-core = {version = "^0.21.0", path = "../ergo-lib-c-core"}
+ergo-lib-c-core = { version = "^0.21.0", path = "../ergo-lib-c-core" }
 paste = "^1.0"
 
 [features]
diff --git a/bindings/ergo-lib-ios/Tests/ErgoLibTests/RestNodeApiTests.swift b/bindings/ergo-lib-ios/Tests/ErgoLibTests/RestNodeApiTests.swift
index 7c3f7be6e..da4787bfd 100644
--- a/bindings/ergo-lib-ios/Tests/ErgoLibTests/RestNodeApiTests.swift
+++ b/bindings/ergo-lib-ios/Tests/ErgoLibTests/RestNodeApiTests.swift
@@ -106,7 +106,7 @@ final class RestNodeApiTests: XCTestCase {
         let txId = try TxId(withString: "258ddfc09b94b8313bca724de44a0d74010cab26de379be845713cc129546b78")
         let proofs = try await withThrowingTaskGroup(of: [NipopowProof].self) { group -> [NipopowProof] in
             group.addTask {
-                let proof = try await getNipopowProof(url: URL(string: "167.235.75.51:9053")!, headerId: headerId)!
+                let proof = try await getNipopowProof(url: URL(string: "159.65.11.55:9053")!, headerId: headerId)!
                 return [proof]
             }
             group.addTask {
@@ -124,7 +124,7 @@ final class RestNodeApiTests: XCTestCase {
         XCTAssertEqual(try bestProof.suffixHead().getHeader().getBlockId(), headerId)
         
         // Now verify with 3rd node
-        let nodeConf = try NodeConf(withAddrString: "167.235.142.92:9053")
+        let nodeConf = try NodeConf(withAddrString: "198.58.96.195:9053")
         let restNodeApi = try RestNodeApi()
         let header = try await restNodeApi.getHeaderAsync(nodeConf: nodeConf, blockId: headerId)
         let merkleProof = try await restNodeApi.getBlocksHeaderIdProofForTxIdAsync(nodeConf: nodeConf, blockId: headerId, txId: txId)
diff --git a/bindings/ergo-lib-jni/Cargo.toml b/bindings/ergo-lib-jni/Cargo.toml
index 4181b894a..4adf25eb8 100644
--- a/bindings/ergo-lib-jni/Cargo.toml
+++ b/bindings/ergo-lib-jni/Cargo.toml
@@ -3,9 +3,9 @@ name = "ergo-lib-jni"
 version = "0.21.0"
 license = "CC0-1.0"
 authors = ["Denys Zadorozhnyi <denys@zadorozhnyi.com>"]
-edition = "2018"
+repository.workspace = true
+edition.workspace = true
 description = "JNI bindings for ergo-lib"
-repository = "https://github.com/ergoplatform/sigma-rust"
 
 [lib]
 name = "ergowalletlibjni"
@@ -15,5 +15,5 @@ path = "src/main/rust/lib.rs"
 [dependencies]
 jni = "0.19.0"
 log = "0.4.16"
-ergo-lib = {version = "^0.21.0", path = "../../ergo-lib"}
-ergo-lib-c-core = {version = "^0.21.0", path = "../ergo-lib-c-core"}
+ergo-lib = { workspace = true }
+ergo-lib-c-core = { version = "^0.21.0", path = "../ergo-lib-c-core" }
diff --git a/bindings/ergo-lib-wasm/Cargo.toml b/bindings/ergo-lib-wasm/Cargo.toml
index 67ff9fc3c..5a74de73a 100644
--- a/bindings/ergo-lib-wasm/Cargo.toml
+++ b/bindings/ergo-lib-wasm/Cargo.toml
@@ -3,9 +3,9 @@ name = "ergo-lib-wasm"
 version = "0.21.0"
 license = "CC0-1.0"
 authors = ["Denys Zadorozhnyi <denys@zadorozhnyi.com>"]
-edition = "2018"
-description = "WASM bindings for ergo-lib"
 repository = "https://github.com/ergoplatform/sigma-rust"
+edition.workspace = true
+description = "WASM bindings for ergo-lib"
 
 [lib]
 crate-type = ["cdylib", "rlib"]
@@ -16,62 +16,39 @@ rest = ["ergo-lib/rest"]
 compiler = ["ergo-lib/compiler"]
 
 [dependencies]
-base16 = "0.2.1"
-serde = { version = "1.0", features = ["derive"]}
-ergo-lib = { version = "^0.21.0", path = "../../ergo-lib"}
-sigma-util = { version = "^0.9.0", path = "../../sigma-util"}
-serde_json = "1.0"
+base16 = { workspace = true }
+serde =  { workspace = true } 
+ergo-lib = { workspace = true }
+sigma-util = { workspace = true }
+serde_json = { workspace = true }
 js-sys = "0.3"
 web-sys = {version = "0.3", features = ["Url"]}
-url = "2.2"
-bounded-integer = { version = "^0.5", features = ["types"] }
-futures = "0.3"
-thiserror = "1"
-
+url = { workspace = true }
+bounded-integer = { workspace = true }
+futures = { workspace = true }
+thiserror = { workspace = true }
 # This dependency is needed due to deprecation of `JsValue::[into|from]_serde` in `wasm-bindgen`.
 # Note that the deprecation comments suggest using `serde-wasm-bindgen` as another alternative; I
 # tried it but it breaks some of our tests.
 gloo-utils = {version = "0.1.5", features = ["serde"] }
-
 # used in elliptic-curve(in ergo-lib), compiled here with WASM support
-getrandom = {version = "0.2.7", features = ["js"]}
-
+getrandom = { workspace = true, features = ["js"] }
 # The `console_error_panic_hook` crate provides better debugging of panics by
 # logging them with `console.error`. This is great for development, but requires
 # all the `std::fmt` and `std::panicking` infrastructure, so isn't great for
 # code size when deploying.
 console_error_panic_hook = { version = "0.1.6", optional = true }
-
-derive_more = "0.99"
-num-traits = "0.2.14"
-
-[dependencies.serde_with]
-version = "1.9.1"
-features = [ "json" ]
-
-[dependencies.wasm-bindgen]
-version = "0.2.83"
-features = []
-
-[dependencies.wasm-bindgen-futures]
-version = "0.4.33"
-
-[dependencies.bounded-vec]
-version = "^0.7.0"
-features = ["serde"]
+derive_more = { workspace = true }
+num-traits = { workspace = true }
+serde_with = { workspace = true }
+bounded-vec = { workspace = true, features=["serde"] }
+wasm-bindgen = { version = "0.2.83", features = [] }
+wasm-bindgen-futures = { version = "0.4.33" }
 
 [dev-dependencies]
-wasm-bindgen-test = "0.3.33"
-ergo-lib = { version = "^0.21.0", path = "../../ergo-lib", features = ["arbitrary"] }
-
-[dev-dependencies.proptest]
-# wasm support, via https://altsysrq.github.io/proptest-book/proptest/wasm.html
-version = "1.0.0"
-# The default feature set includes things like process forking which are not
-# supported in Web Assembly.
-default-features = false
-# Enable using the `std` crate.
-features = ["std"]
+wasm-bindgen-test = { workspace = true }
+ergo-lib = { workspace = true, features = ["arbitrary"] }
+proptest = { workspace = true }
 
 [package.metadata.wasm-pack.profile.release]
 wasm-opt = ["-Os", "--enable-mutable-globals"]
diff --git a/bindings/ergo-lib-wasm/src/ergo_box.rs b/bindings/ergo-lib-wasm/src/ergo_box.rs
index 3aacfa11d..1864e7d54 100644
--- a/bindings/ergo-lib-wasm/src/ergo_box.rs
+++ b/bindings/ergo-lib-wasm/src/ergo_box.rs
@@ -244,6 +244,19 @@ impl ErgoBox {
             .map(ErgoBox)
             .map_err(to_js)
     }
+
+    /// Create ErgoBox from ErgoBoxCandidate by adding transaction id
+    /// and index of the box in the transaction
+    pub fn from_box_candidate(
+        candidate: &ErgoBoxCandidate,
+        tx_id: &TxId,
+        index: u16,
+    ) -> Result<ErgoBox, JsValue> {
+        let candidate: chain::ergo_box::ErgoBoxCandidate = candidate.0.clone();
+        chain::ergo_box::ErgoBox::from_box_candidate(&candidate, tx_id.clone().into(), index)
+            .map_err(to_js)
+            .map(ErgoBox)
+    }
 }
 
 impl From<ErgoBox> for chain::ergo_box::ErgoBox {
diff --git a/ergo-chain-generation/Cargo.toml b/ergo-chain-generation/Cargo.toml
index c15427204..b3ef0d5cf 100644
--- a/ergo-chain-generation/Cargo.toml
+++ b/ergo-chain-generation/Cargo.toml
@@ -2,23 +2,23 @@
 name = "ergo-chain-generation"
 version = "0.14.0"
 license = "CC0-1.0"
-edition = "2021"
+repository.workspace = true
+edition.workspace = true
 
 # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
 
 [dependencies]
-base16 = "0.2.1"
-blake2 = "0.9"
-byteorder = "1"
-ergo-lib = {version = "^0.21.0", path = "../ergo-lib"}
-num-bigint = "0.4.0"
-rand = "0.8.5"
-sigma-test-util = { version = "^0.3.0", path = "../sigma-test-util" }
-ergo-chain-types = { version = "^0.8", path = "../ergo-chain-types" }
-ergo-nipopow = { version = "^0.8", path = "../ergo-nipopow" }
-ergo-merkle-tree = { version = "^0.8", path = "../ergo-merkle-tree" }
-
+base16 = { workspace = true }
+blake2 = { workspace = true }
+byteorder = { workspace = true }
+ergo-lib = { workspace = true }
+num-bigint = { workspace = true }
+rand = { workspace = true }
+sigma-test-util = { workspace = true }
+ergo-chain-types = { workspace = true }
+ergo-nipopow = { workspace = true }
+ergo-merkle-tree = { workspace = true }
 
 [dev-dependencies]
-sigma-ser = { version = "^0.10", path = "../sigma-ser" }
-serde_json = { version = "1.0" }
+sigma-ser = { workspace = true }
+serde_json = { workspace = true }
diff --git a/ergo-chain-types/Cargo.toml b/ergo-chain-types/Cargo.toml
index 84f1a7215..3918ce7cf 100644
--- a/ergo-chain-types/Cargo.toml
+++ b/ergo-chain-types/Cargo.toml
@@ -3,9 +3,9 @@ name = "ergo-chain-types"
 version = "0.8.0"
 license = "CC0-1.0"
 authors = ["Denys Zadorozhnyi <denys@zadorozhnyi.com>"]
-edition = "2018"
+repository.workspace = true
+edition.workspace = true
 description = "Ergo blockchain types"
-repository = "https://github.com/ergoplatform/sigma-rust"
 exclude = [
     "proptest-regressions/*"
 ]
@@ -14,35 +14,22 @@ exclude = [
 crate-type = ["cdylib", "rlib"]
 
 [dependencies]
-thiserror = "1"
-derive_more = "0.99"
-sigma-ser = { version = "^0.10.0", path = "../sigma-ser" }
-sigma-util = { version = "^0.9.0", path = "../sigma-util" }
-base16 = "0.2.1"
-base64 = "0.13.0"
-proptest-derive = {version = "0.3.0", optional = true }
-serde = { version = "1.0", features = ["derive"], optional = true }
-serde_json = { version = "1.0", optional = true }
-url = "2.2"
-k256 = { version = "0.10.2", features = ["arithmetic", "ecdsa"] }
-elliptic-curve = {version = "0.11.6", features = [ "ff"]}
-num-bigint = "0.4.0"
-byteorder = "1"
-
-[dependencies.serde_with]
-version = "1.9.1"
-features = [ "json" ]
-optional = true
-
-[dependencies.proptest]
-# wasm support, via https://altsysrq.github.io/proptest-book/proptest/wasm.html
-version = "1.0.0"
-# The default feature set includes things like process forking which are not
-# supported in Web Assembly.
-default-features = false
-# Enable using the `std` crate.
-features = ["std"]
-optional = true
+thiserror = { workspace = true }
+derive_more = { workspace = true }
+sigma-ser = { workspace = true }
+sigma-util = { workspace = true }
+base16 = { workspace = true }
+base64 = { workspace = true }
+serde = { workspace = true, optional = true }
+serde_json = { workspace = true, optional = true }
+url = { workspace = true }
+k256 = { workspace = true }
+elliptic-curve = { workspace = true }
+num-bigint = { workspace = true }
+byteorder = { workspace = true }
+serde_with = { workspace = true, optional = true }
+proptest = { workspace = true , optional = true }
+proptest-derive = {workspace = true, optional = true }
 
 [features]
 default = ["json"]
diff --git a/ergo-lib/Cargo.toml b/ergo-lib/Cargo.toml
index 1cca75bdb..de6fcaa22 100644
--- a/ergo-lib/Cargo.toml
+++ b/ergo-lib/Cargo.toml
@@ -3,9 +3,9 @@ name = "ergo-lib"
 version = "0.21.0"
 license = "CC0-1.0"
 authors = ["Denys Zadorozhnyi <denys@zadorozhnyi.com>"]
-edition = "2018"
+repository.workspace = true
+edition.workspace = true
 description = "ErgoTree interpreter and wallet-like features for Ergo"
-repository = "https://github.com/ergoplatform/sigma-rust"
 exclude = [
     "proptest-regressions/*"
 ]
@@ -14,48 +14,35 @@ exclude = [
 crate-type = ["cdylib", "rlib"]
 
 [dependencies]
-
-sigma-ser = { version = "^0.10.0", path = "../sigma-ser" }
-sigma-util = { version = "^0.9.0", path = "../sigma-util" }
-ergo-chain-types = { version = "^0.8.0", path = "../ergo-chain-types" }
-ergotree-ir = { version = "^0.21.0", path = "../ergotree-ir", features = ["json"] }
-ergotree-interpreter = { version = "^0.21.0", path = "../ergotree-interpreter" }
-ergo-nipopow = { version = "^0.8", path = "../ergo-nipopow" }
-ergoscript-compiler = { version = "^0.17.0", path = "../ergoscript-compiler" , optional = true}
-ergo-merkle-tree = { version = "^0.8.0", path = "../ergo-merkle-tree" }
-ergo-rest = { version = "^0.6.0", path = "../ergo-rest" , optional = true}
-indexmap = "1.3.2"
-base16 = "0.2.1"
-serde = { version = "1.0", features = ["derive"], optional = true }
-serde_json = { version = "1.0", optional = true }
-thiserror = "1"
-derive_more = "0.99"
-bounded-vec = { version = "^0.7.0" }
-num-bigint = { version = "0.4.0", features = ["serde"] }
-proptest-derive = {version = "0.3.0", optional = true }
-sha2 = { version = "0.9.8" }
-hmac = { version = "0.11.0" }
-k256 = { version = "0.10.0", features = ["arithmetic", "ecdsa"] }
-pbkdf2 = "0.8"
-rand = "0.8.5"
-bitvec = { version = "0.22.3", optional = true }
+sigma-ser = { workspace = true }
+sigma-util = { workspace = true }
+ergo-chain-types = { workspace = true }
+ergotree-ir = { workspace = true }
+ergotree-interpreter = { workspace = true }
+ergo-nipopow = { workspace = true }
+ergoscript-compiler = { workspace = true, optional = true}
+ergo-merkle-tree = { workspace = true }
+ergo-rest = { workspace = true, optional = true}
+indexmap = { workspace = true }
+base16 = { workspace = true }
+serde = { workspace = true, optional = true }
+serde_json = { workspace = true, optional = true }
+thiserror = { workspace = true }
+derive_more = { workspace = true }
+bounded-vec = { workspace = true }
+num-bigint = { workspace = true, features = ["serde"] }
+proptest-derive = {workspace = true, optional = true }
+k256 = { workspace = true }
+sha2 = { workspace = true }
+hmac = { version = "0.12" }
+pbkdf2 = "0.11"
+rand = { workspace = true }
+bitvec = { workspace = true, optional = true }
 unicode-normalization = "0.1.19"
-lazy_static = "1.4"
-
-[dependencies.proptest]
-# wasm support, via https://altsysrq.github.io/proptest-book/proptest/wasm.html
-version = "1.0.0"
-# The default feature set includes things like process forking which are not
-# supported in Web Assembly.
-default-features = false
-# Enable using the `std` crate.
-features = ["std"]
-optional = true
+lazy_static = { workspace = true }
+proptest = { workspace = true , optional = true }
+serde_with = { workspace = true, optional = true }
 
-[dependencies.serde_with]
-version = "1.9.1"
-features = [ "json" ]
-optional = true
 
 [features]
 default = ["json"]
@@ -66,11 +53,11 @@ mnemonic_gen = ["bitvec"]
 rest = ["ergo-rest"]
 
 [dev-dependencies]
-wasm-bindgen-test = "0.3.10"
-ergotree-ir = { version = "^0.21.0", path = "../ergotree-ir", features = ["arbitrary"] }
-ergotree-interpreter = { version = "^0.21.0", path = "../ergotree-interpreter", features = ["arbitrary"] }
-ergo-merkle-tree = { version = "^0.8.0", path = "../ergo-merkle-tree", features = ["arbitrary"] }
-sigma-test-util = { version = "^0.3.0", path = "../sigma-test-util" }
-pretty_assertions = "0.7.2"
-bs58 = "0.4.0"
-byteorder = "1"
+wasm-bindgen-test = { workspace = true }
+ergotree-ir = { workspace = true, features = ["arbitrary"] }
+ergotree-interpreter = { workspace = true, features = ["arbitrary"] }
+ergo-merkle-tree = { workspace = true, features = ["arbitrary"] }
+sigma-test-util = { workspace = true }
+pretty_assertions = { workspace = true }
+bs58 = { workspace = true }
+byteorder = { workspace = true }
diff --git a/ergo-lib/src/wallet/ext_pub_key.rs b/ergo-lib/src/wallet/ext_pub_key.rs
index 91b645216..d6ab42efb 100644
--- a/ergo-lib/src/wallet/ext_pub_key.rs
+++ b/ergo-lib/src/wallet/ext_pub_key.rs
@@ -6,7 +6,7 @@ use ergotree_interpreter::sigma_protocol::private_input::DlogProverInput;
 use ergotree_ir::chain::address::Address;
 use ergotree_ir::serialization::SigmaParsingError;
 use ergotree_ir::serialization::SigmaSerializable;
-use hmac::{Hmac, Mac, NewMac};
+use hmac::{Hmac, Mac};
 use sha2::Sha512;
 use thiserror::Error;
 
diff --git a/ergo-lib/src/wallet/ext_secret_key.rs b/ergo-lib/src/wallet/ext_secret_key.rs
index 6fdfa463f..0d17d7e87 100644
--- a/ergo-lib/src/wallet/ext_secret_key.rs
+++ b/ergo-lib/src/wallet/ext_secret_key.rs
@@ -13,7 +13,7 @@ use ergotree_ir::{
     serialization::{SigmaParsingError, SigmaSerializable, SigmaSerializationError},
     sigma_protocol::sigma_boolean::ProveDlog,
 };
-use hmac::{Hmac, Mac, NewMac};
+use hmac::{Hmac, Mac};
 
 use sha2::Sha512;
 use thiserror::Error;
diff --git a/ergo-lib/src/wallet/mnemonic_generator.rs b/ergo-lib/src/wallet/mnemonic_generator.rs
index d1cf51844..c88d725ab 100644
--- a/ergo-lib/src/wallet/mnemonic_generator.rs
+++ b/ergo-lib/src/wallet/mnemonic_generator.rs
@@ -161,9 +161,9 @@ impl MnemonicGenerator {
             let mut hasher = Sha256::new();
             hasher.update(entrophy.clone());
 
-            let checksum = BitVec::<Msb0, _>::from_vec(hasher.finalize().to_vec());
+            let checksum = BitVec::<_, Msb0>::from_vec(hasher.finalize().to_vec());
             let ent_len = entrophy.len();
-            let mut entrophy_with_checksum = BitVec::<Msb0, _>::from_vec(entrophy);
+            let mut entrophy_with_checksum = BitVec::<_, Msb0>::from_vec(entrophy);
             entrophy_with_checksum.append(&mut checksum[..ent_len / 4].into());
 
             let wl = WordList(self.lang);
diff --git a/ergo-merkle-tree/Cargo.toml b/ergo-merkle-tree/Cargo.toml
index f361657b2..f15739cc8 100644
--- a/ergo-merkle-tree/Cargo.toml
+++ b/ergo-merkle-tree/Cargo.toml
@@ -1,33 +1,28 @@
 [package]
 name = "ergo-merkle-tree"
 version = "0.8.0"
-edition = "2021"
+repository.workspace = true
+edition.workspace = true
 license = "CC0-1.0"
 description = "Merkle tree proofs"
 
 # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
 
 [dependencies]
-blake2 = "0.9"
-base16 = { version = "0.2.1", optional = true }
-serde = { version = "1.0", features = ["derive"], optional = true }
+blake2 = { workspace = true }
+base16 = { workspace = true, optional = true }
+serde = { workspace = true, optional = true }
 serde_repr = { version = "0.1.7", optional = true }
-serde_json = { version = "1.0", optional = true }
-thiserror = { version = "1.0", optional = true } # currently thiserror is only needed for json conversion, so it's feature-gated behind json. This may change in the future
+serde_json = { workspace = true, optional = true }
+# currently thiserror is only needed for json conversion, so it's feature-gated behind json. 
+# This may change in the future
+thiserror = { workspace = true, optional = true } 
 itertools = "0.10.3"
-proptest-derive = {version = "0.3.0", optional = true }
-sigma-ser = { version = "0.10.0", path = "../sigma-ser" }
-ergo-chain-types = { version = "0.8.0", path = "../ergo-chain-types" }
-[dependencies.proptest]
-# wasm support, via https://altsysrq.github.io/proptest-book/proptest/wasm.html
-version = "1.0.0"
-# The default feature set includes things like process forking which are not
-# supported in Web Assembly.
-default-features = false
-# Enable using the `std` crate.
-features = ["std"]
-optional = true
-
+proptest-derive = {workspace = true, optional = true }
+sigma-ser = { workspace = true }
+ergo-chain-types = { workspace = true }
+sigma-util = { workspace = true }
+proptest = { workspace = true , optional = true }
 
 [features]
 default = ["json"]
diff --git a/ergo-merkle-tree/src/lib.rs b/ergo-merkle-tree/src/lib.rs
index 7143d86f6..3150668af 100644
--- a/ergo-merkle-tree/src/lib.rs
+++ b/ergo-merkle-tree/src/lib.rs
@@ -18,8 +18,6 @@
 #![deny(clippy::unimplemented)]
 #![deny(clippy::panic)]
 
-use blake2::digest::{Update, VariableOutput};
-use blake2::VarBlake2b;
 use ergo_chain_types::Digest32;
 
 // Constants for hashing
@@ -35,10 +33,9 @@ pub(crate) mod json;
 #[allow(clippy::unwrap_used)]
 // Generates a hash of data prefixed with `prefix`
 pub(crate) fn prefixed_hash(prefix: u8, data: &[u8]) -> Digest32 {
-    let mut hasher = VarBlake2b::new(HASH_SIZE).unwrap();
-    hasher.update(&[prefix]);
-    hasher.update(data);
-    let hash: Box<[u8; HASH_SIZE]> = hasher.finalize_boxed().try_into().unwrap();
+    let mut bytes = vec![prefix];
+    bytes.extend_from_slice(data);
+    let hash = blake2b256_hash(bytes.as_slice());
     Digest32::from(hash)
 }
 
@@ -49,16 +46,14 @@ pub(crate) fn prefixed_hash2<'a>(
     data: impl Into<Option<&'a [u8]>>,
     data2: impl Into<Option<&'a [u8]>>,
 ) -> Digest32 {
-    let mut hasher = VarBlake2b::new(HASH_SIZE).unwrap();
-    hasher.update(&[prefix]);
-
+    let mut bytes = vec![prefix];
     if let Some(data) = data.into() {
-        hasher.update(data);
+        bytes.extend_from_slice(data);
     }
     if let Some(data2) = data2.into() {
-        hasher.update(data2);
+        bytes.extend_from_slice(data2);
     };
-    let hash: Box<[u8; HASH_SIZE]> = hasher.finalize_boxed().try_into().unwrap();
+    let hash = blake2b256_hash(bytes.as_slice());
     Digest32::from(hash)
 }
 
@@ -69,3 +64,4 @@ mod merkletree;
 pub use batchmerkleproof::BatchMerkleProof;
 pub use merkleproof::*;
 pub use merkletree::*;
+use sigma_util::hash::blake2b256_hash;
diff --git a/ergo-merkle-tree/src/merkletree.rs b/ergo-merkle-tree/src/merkletree.rs
index 9bec9ba5e..068d83045 100644
--- a/ergo-merkle-tree/src/merkletree.rs
+++ b/ergo-merkle-tree/src/merkletree.rs
@@ -1,6 +1,7 @@
 use crate::batchmerkleproof::{BatchMerkleProof, BatchMerkleProofIndex};
 use crate::{prefixed_hash, prefixed_hash2, INTERNAL_PREFIX, LEAF_PREFIX};
 use ergo_chain_types::Digest32;
+use sigma_util::hash::blake2b256_hash;
 use std::collections::{BTreeSet, HashMap};
 
 /// Node for a Merkle Tree
@@ -221,17 +222,10 @@ impl MerkleTree {
             .get(0)
             .and_then(MerkleNode::get_hash)
             .cloned()
-            .unwrap_or_else(
-                #[allow(clippy::unwrap_used)]
-                // unwrap is safe to use here, since digest size is always 32 bytes
-                || {
-                    use blake2::digest::{Update, VariableOutput};
-                    let mut hasher = crate::VarBlake2b::new(32).unwrap();
-                    hasher.update(&[]);
-                    let hash: Box<[u8; 32]> = hasher.finalize_boxed().try_into().unwrap();
-                    Digest32::from(hash)
-                },
-            )
+            .unwrap_or_else(|| {
+                let hash = blake2b256_hash(&[]);
+                Digest32::from(hash)
+            })
     }
 
     /// Returns HashMap of hashes and their index in the tree
diff --git a/ergo-nipopow/Cargo.toml b/ergo-nipopow/Cargo.toml
index d40918535..5143fd90c 100644
--- a/ergo-nipopow/Cargo.toml
+++ b/ergo-nipopow/Cargo.toml
@@ -3,9 +3,9 @@ name = "ergo-nipopow"
 version = "0.8.0"
 license = "CC0-1.0"
 authors = ["Denys Zadorozhnyi <denys@zadorozhnyi.com>"]
-edition = "2018"
+repository.workspace = true
+edition.workspace = true
 description = "Ergo blockchain types"
-repository = "https://github.com/ergoplatform/sigma-rust"
 exclude = [
     "proptest-regressions/*"
 ]
@@ -14,34 +14,25 @@ exclude = [
 crate-type = ["cdylib", "rlib"]
 
 [dependencies]
-base16 = "0.2.1"
-bounded-integer = { version = "^0.5", features = ["types"] }
-byteorder = "1"
-thiserror = "1"
-derive_more = "0.99"
-ergotree-ir = { version = "^0.21.0", path = "../ergotree-ir", features = ["json"] }
-num-bigint = "0.4.0"
-num-traits = "0.2.14"
-proptest-derive = {version = "0.3.0", optional = true }
-sigma-ser = { version = "^0.10.0", path = "../sigma-ser" }
-sigma-util = { version = "^0.9.0", path = "../sigma-util" }
-ergo-chain-types = { version = "^0.8.0", path = "../ergo-chain-types" }
-ergo-merkle-tree = { version = "^0.8.0", path = "../ergo-merkle-tree" }
-serde = { version = "1.0", features = ["derive"] }
-serde_json = { version = "1.0" }
+base16 = { workspace = true }
+bounded-integer = { workspace = true }
+byteorder = { workspace = true }
+thiserror = { workspace = true }
+derive_more = { workspace = true }
+ergotree-ir = { workspace = true, features = ["json"] }
+num-bigint = { workspace = true }
+num-traits = { workspace = true }
+proptest-derive = { workspace = true, optional = true }
+sigma-ser = { workspace = true }
+sigma-util = { workspace = true }
+ergo-chain-types = { workspace = true }
+ergo-merkle-tree = { workspace = true }
+serde = { workspace = true }
+serde_json = { workspace = true }
+proptest = { workspace = true , optional = true }
 
 [dev-dependencies]
 
-[dependencies.proptest]
-# wasm support, via https://altsysrq.github.io/proptest-book/proptest/wasm.html
-version = "1.0.0"
-# The default feature set includes things like process forking which are not
-# supported in Web Assembly.
-default-features = false
-# Enable using the `std` crate.
-features = ["std"]
-optional = true
-
 [features]
 default = []
 arbitrary = ["proptest", "proptest-derive", "ergo-chain-types/arbitrary", "ergotree-ir/arbitrary"]
diff --git a/ergo-p2p/Cargo.toml b/ergo-p2p/Cargo.toml
index 98c39ad9f..f31b2f19a 100644
--- a/ergo-p2p/Cargo.toml
+++ b/ergo-p2p/Cargo.toml
@@ -3,9 +3,9 @@ name = "ergo-p2p"
 version = "0.1.0"
 license = "CC0-1.0"
 authors = ["Denys Zadorozhnyi <denys@zadorozhnyi.com>"]
-edition = "2018"
 description = "Ergo peer-to-peer networking library"
-repository = "https://github.com/ergoplatform/sigma-rust"
+repository.workspace = true
+edition.workspace = true
 exclude = [
     "proptest-regressions/*"
 ]
@@ -14,40 +14,27 @@ exclude = [
 crate-type = ["cdylib", "rlib"]
 
 [dependencies]
-sigma-ser = { version = "^0.10.0", path = "../sigma-ser" }
-sigma-util = { version = "^0.9.0", path = "../sigma-util" }
-ergo-chain-types = { version = "^0.8.0", path = "../ergo-chain-types"}
-thiserror = "1"
-derive_more = "0.99"
-bounded-vec = { version = "^0.7.0" }
-proptest-derive = {version = "0.3.0", optional = true }
-
-futures = "0.3"
-
+sigma-ser = { workspace = true }
+sigma-util = { workspace = true }
+ergo-chain-types = { workspace = true }
+thiserror = { workspace = true }
+derive_more = { workspace = true }
+bounded-vec = { workspace = true }
+proptest-derive = {workspace = true, optional = true }
+futures = { workspace = true }
 tracing = "0.1"
 tracing-error = { version = "0.2.0", features = ["traced-error"] }
-
-tokio = { version = "1.15.0", features = ["net", "time", "tracing", "macros", "rt-multi-thread"] }
-tokio-stream = { version = "0.1.8", features = ["sync", "time"] }
-tokio-util = { version = "0.6.9", features = ["codec"] }
+tokio = { workspace = true }
+tokio-stream = { workspace = true }
+tokio-util = { workspace = true }
 tower = { version = "0.4.11", features = ["retry", "discover", "load", "load-shed", "timeout", "util", "buffer"] }
-bytes = "1.1.0"
-
+bytes = { workspace = true }
 chrono = "0.4.19"
-
-[dependencies.proptest]
-# wasm support, via https://altsysrq.github.io/proptest-book/proptest/wasm.html
-version = "1.0.0"
-# The default feature set includes things like process forking which are not
-# supported in Web Assembly.
-default-features = false
-# Enable using the `std` crate.
-features = ["std"]
-optional = true
+proptest = { workspace = true , optional = true }
 
 [features]
 arbitrary = ["proptest", "proptest-derive", "ergo-chain-types/arbitrary"]
 
 [dev-dependencies]
-sigma-test-util = { version = "^0.3.0", path = "../sigma-test-util" }
+sigma-test-util = { workspace = true }
 ergo-p2p = { path = ".", features = ["arbitrary"] }
diff --git a/ergo-rest/Cargo.toml b/ergo-rest/Cargo.toml
index 796401927..9477290a5 100644
--- a/ergo-rest/Cargo.toml
+++ b/ergo-rest/Cargo.toml
@@ -3,9 +3,9 @@ name = "ergo-rest"
 version = "0.6.0"
 license = "CC0-1.0"
 authors = ["Denys Zadorozhnyi <denys@zadorozhnyi.com>"]
-edition = "2018"
+repository.workspace = true
+edition.workspace = true
 description = "Ergo node REST API library"
-repository = "https://github.com/ergoplatform/sigma-rust"
 exclude = [
     "proptest-regressions/*"
 ]
@@ -15,22 +15,24 @@ crate-type = ["cdylib", "rlib"]
 
 [dependencies]
 async-trait = "^0.1"
-bounded-integer = { version = "^0.5", features = ["types"] }
-bounded-vec = { version = "^0.7.0", features=["serde"] }
-sigma-ser = { version = "^0.10.0", path = "../sigma-ser" }
-sigma-util = { version = "^0.9.0", path = "../sigma-util" }
-ergo-chain-types = { version = "^0.8.0", path = "../ergo-chain-types" }
-ergo-nipopow = { version = "^0.8.0", path = "../ergo-nipopow" }
-ergotree-ir = { version = "^0.21.0", path = "../ergotree-ir", features = ["json"] }
-ergo-merkle-tree = { version = "^0.8", path = "../ergo-merkle-tree" }
-futures = "0.3"
-thiserror = "1"
-derive_more = "0.99"
-proptest-derive = {version = "0.3.0", optional = true }
-rand = "0.8.5"
-serde = { version = "1.0", features = ["derive"]}
-serde_json = { version = "1.0", optional = true }
-url = "2.2"
+bounded-integer = { workspace = true }
+bounded-vec = { workspace = true, features=["serde"] }
+sigma-ser = { workspace = true }
+sigma-util = { workspace = true }
+ergo-chain-types = { workspace = true }
+ergo-nipopow = { workspace = true }
+ergotree-ir = { workspace =  true, features = ["json"] }
+ergo-merkle-tree = { workspace = true }
+futures = { workspace = true }
+thiserror = { workspace = true }
+derive_more = { workspace = true }
+proptest-derive = {workspace = true, optional = true }
+rand = { workspace = true }
+serde = { workspace = true }
+serde_json = { workspace = true, optional = true }
+url = { workspace = true }
+proptest = { workspace = true , optional = true }
+
 # Dependencies for `wasm-timer`
 parking_lot = "0.12"
 pin-utils = "0.1"
@@ -71,27 +73,17 @@ features = [
 ]
 
 [target.'cfg(not(target_arch = "wasm32"))'.dependencies]
-tokio = { version = "1", features = ["full"] }
-tokio-stream = "0.1"
+tokio = { workspace = true }
+tokio-stream = { workspace = true }
 reqwest = { version = "0.11.10", default-features = false, features = ["json"] }
 
-[dependencies.proptest]
-# wasm support, via https://altsysrq.github.io/proptest-book/proptest/wasm.html
-version = "1.0.0"
-# The default feature set includes things like process forking which are not
-# supported in Web Assembly.
-default-features = false
-# Enable using the `std` crate.
-features = ["std"]
-optional = true
-
 [features]
 json = ["serde_json"]
 arbitrary = ["proptest", "proptest-derive"]
 default = ["json"]
 
 [dev-dependencies]
-sigma-test-util = { version = "^0.3.0", path = "../sigma-test-util" }
+sigma-test-util = { workspace = true }
 
 # Addition from `reqwest`
 [target.'cfg(target_arch = "wasm32")'.dev-dependencies]
diff --git a/ergoscript-compiler/Cargo.toml b/ergoscript-compiler/Cargo.toml
index 55b0519fd..35c8dc45e 100644
--- a/ergoscript-compiler/Cargo.toml
+++ b/ergoscript-compiler/Cargo.toml
@@ -3,9 +3,9 @@ name = "ergoscript-compiler"
 version = "0.17.0"
 license = "CC0-1.0"
 authors = ["Denys Zadorozhnyi <denys@zadorozhnyi.com>"]
-edition = "2018"
+repository.workspace = true
+edition.workspace = true
 description = "Compiler for ErgoScript"
-repository = "https://github.com/ergoplatform/sigma-rust"
 exclude = [
     "proptest-regressions/*"
 ]
@@ -14,12 +14,12 @@ exclude = [
 crate-type = ["cdylib", "rlib"]
 
 [dependencies]
-ergotree-ir = { version = "^0.21.0", path = "../ergotree-ir" }
+ergotree-ir = { workspace = true }
+derive_more = { workspace = true }
+num-derive = { workspace = true }
+num-traits = { workspace = true }
 logos = "0.12"
 text-size = "1.1.0"
-derive_more = "0.99"
-num-derive = "0.3.3"
-num-traits = "0.2.14"
 rowan = "0.12.1"
 drop_bomb = "0.1.5"
 line-col = "0.2.1"
diff --git a/ergotree-interpreter/Cargo.toml b/ergotree-interpreter/Cargo.toml
index 3f2b374f0..ef6469584 100644
--- a/ergotree-interpreter/Cargo.toml
+++ b/ergotree-interpreter/Cargo.toml
@@ -3,9 +3,9 @@ name = "ergotree-interpreter"
 version = "0.21.0"
 license = "CC0-1.0"
 authors = ["Denys Zadorozhnyi <denys@zadorozhnyi.com>"]
-edition = "2018"
+repository.workspace = true
+edition.workspace = true
 description = "ErgoTree interpreter"
-repository = "https://github.com/ergoplatform/sigma-rust"
 exclude = [
     "proptest-regressions/*"
 ]
@@ -14,43 +14,30 @@ exclude = [
 crate-type = ["cdylib", "rlib"]
 
 [dependencies]
-sigma-util = { version = "^0.9.0", path = "../sigma-util" }
-sigma-ser = { version = "^0.10.0", path = "../sigma-ser" }
-ergo-chain-types = { version = "^0.8.0", path = "../ergo-chain-types" }
-ergotree-ir = { version = "^0.21.0", path = "../ergotree-ir" }
-gf2_192 = { version = "^0.21.0", path = "../gf2_192" }
-indexmap = "1.3.2"
-k256 = { version = "0.10.0", features = ["arithmetic", "ecdsa"] }
-elliptic-curve = {version = "0.11.6", features = [ "ff"]}
-blake2 = "0.9"
-rand = "0.8.5"
-lazy_static = "1.4"
-thiserror = "1"
-derive_more = "0.99"
-num-traits = "0.2.14"
-proptest-derive = {version = "0.3.0", optional = true }
-base16 = "0.2.1"
-bytes = "1.1"
-num-bigint = "0.4.0"
+sigma-util = { workspace = true }
+sigma-ser = { workspace = true }
+ergo-chain-types = { workspace = true }
+ergotree-ir = { workspace = true }
+indexmap = { workspace = true }
+k256 = { workspace = true }
+elliptic-curve = { workspace = true }
+blake2 = { workspace = true }
+rand = { workspace = true }
+lazy_static = { workspace = true }
+thiserror = { workspace = true }
+derive_more = { workspace = true }
+num-traits = { workspace = true }
+base16 = { workspace = true }
+proptest-derive = { workspace = true, optional = true }
+bytes = { workspace = true }
+num-bigint = { workspace = true }
+bounded-vec = { workspace = true, features=["serde"] }
+serde = { workspace = true, optional = true }
+serde_json = { workspace = true, optional = true }
+serde_with = { workspace = true, optional = true }
+proptest = { workspace = true , optional = true }
 scorex_crypto_avltree = "0.1.0"
-bounded-vec = { version = "^0.7.0", features=["serde"] }
-serde = { version = "1.0", features = ["derive"], optional = true }
-serde_json = { version = "1.0", optional = true }
-
-[dependencies.proptest]
-# wasm support, via https://altsysrq.github.io/proptest-book/proptest/wasm.html
-version = "1.0.0"
-# The default feature set includes things like process forking which are not
-# supported in Web Assembly.
-default-features = false
-# Enable using the `std` crate.
-features = ["std"]
-optional = true
-
-[dependencies.serde_with]
-version = "1.9.1"
-features = [ "json" ]
-optional = true
+gf2_192 = { version = "^0.21.0", path = "../gf2_192" }
 
 [features]
 default = ["json"]
@@ -58,8 +45,8 @@ json = ["serde", "serde_json", "serde_with", "bounded-vec/serde"]
 arbitrary = ["proptest", "proptest-derive", "ergotree-ir/arbitrary", "ergo-chain-types/arbitrary", "gf2_192/arbitrary"]
 
 [dev-dependencies]
-ergotree-ir = { version = "^0.21.0", path = "../ergotree-ir", features = ["arbitrary"] }
-ergoscript-compiler = { version = "^0.17.0", path = "../ergoscript-compiler" }
-proptest = "1.0.0"
-sigma-test-util = { version = "^0.3.0", path = "../sigma-test-util" }
+ergotree-ir = { workspace = true, features = ["arbitrary"] }
+ergoscript-compiler = { workspace = true }
+proptest = { workspace = true }
+sigma-test-util = { workspace = true }
 
diff --git a/ergotree-interpreter/src/sigma_protocol/fiat_shamir.rs b/ergotree-interpreter/src/sigma_protocol/fiat_shamir.rs
index 81c135905..a64e422f4 100644
--- a/ergotree-interpreter/src/sigma_protocol/fiat_shamir.rs
+++ b/ergotree-interpreter/src/sigma_protocol/fiat_shamir.rs
@@ -5,8 +5,6 @@ use super::proof_tree::ProofTreeKind;
 use crate::sigma_protocol::unchecked_tree::{UncheckedConjecture, UncheckedTree};
 use crate::sigma_protocol::unproven_tree::{UnprovenConjecture, UnprovenTree};
 use crate::sigma_protocol::ProverMessage;
-use blake2::digest::{Update, VariableOutput};
-use blake2::VarBlake2b;
 use ergo_chain_types::{Base16DecodedBytes, Base16EncodedBytes};
 use ergotree_ir::ergo_tree::{ErgoTree, ErgoTreeHeader};
 use ergotree_ir::mir::expr::Expr;
@@ -14,6 +12,7 @@ use ergotree_ir::serialization::sigma_byte_writer::SigmaByteWrite;
 use ergotree_ir::serialization::sigma_byte_writer::SigmaByteWriter;
 use ergotree_ir::serialization::SigmaSerializable;
 use ergotree_ir::sigma_protocol::sigma_boolean::{SigmaBoolean, SigmaProp};
+use sigma_util::hash::blake2b256_hash;
 use std::array::TryFromSliceError;
 use std::convert::{TryFrom, TryInto};
 use std::fmt::Formatter;
@@ -23,7 +22,6 @@ use thiserror::Error;
 use proptest_derive::Arbitrary;
 
 use super::proof_tree::ProofTree;
-use super::GROUP_SIZE;
 use super::SOUNDNESS_BYTES;
 
 /// Hash type for Fiat-Shamir hash function (24-bytes)
@@ -66,11 +64,7 @@ impl TryFrom<Base16DecodedBytes> for FiatShamirHash {
 
 /// Fiat-Shamir hash function
 pub fn fiat_shamir_hash_fn(input: &[u8]) -> FiatShamirHash {
-    // unwrap is safe, since 32 bytes is a valid hash size (<= 512 && 24 % 8 == 0)
-    #[allow(clippy::unwrap_used)]
-    let mut hasher = VarBlake2b::new(GROUP_SIZE).unwrap();
-    hasher.update(input);
-    let hash = hasher.finalize_boxed();
+    let hash = blake2b256_hash(input);
     let taken: Vec<u8> = hash.iter().copied().take(SOUNDNESS_BYTES).collect();
     // unwrap is safe due to hash size is expected to be SOUNDNESS_BYTES
     #[allow(clippy::unwrap_used)]
diff --git a/ergotree-ir/Cargo.toml b/ergotree-ir/Cargo.toml
index af8d73d1f..8f4e34c5e 100644
--- a/ergotree-ir/Cargo.toml
+++ b/ergotree-ir/Cargo.toml
@@ -3,9 +3,9 @@ name = "ergotree-ir"
 version = "0.21.0"
 license = "CC0-1.0"
 authors = ["Denys Zadorozhnyi <denys@zadorozhnyi.com>"]
-edition = "2018"
+repository.workspace = true
+edition.workspace = true
 description = "ErgoTree IR, serialization"
-repository = "https://github.com/ergoplatform/sigma-rust"
 exclude = [
     "proptest-regressions/*"
 ]
@@ -14,46 +14,31 @@ exclude = [
 crate-type = ["cdylib", "rlib"]
 
 [dependencies]
-sigma-ser = { version = "^0.10.0", path = "../sigma-ser" }
-sigma-util = { version = "^0.9.0", path = "../sigma-util" }
-k256 = { version = "0.10.2", features = ["arithmetic", "ecdsa"] }
-ergo-chain-types = { version = "^0.8.0", path = "../ergo-chain-types" }
-elliptic-curve = {version = "0.11.6", features = [ "ff"]}
-thiserror = "1"
-# used in elliptic-curve(in ergo-lib), compiled here with WASM support
-# getrandom = {version = "0.2.7", features = ["js"]}
-lazy_static = "1.4"
-derive_more = "0.99"
-impl-trait-for-tuples = "0.2.0"
-proptest-derive = {version = "0.3.0", optional = true }
-bs58 = "0.4.0"
-base16 = "0.2.1"
-num-bigint = "0.4.0"
-bounded-vec = { version = "^0.7.0", features=["serde"] }
+sigma-ser = { workspace = true }
+sigma-util = { workspace = true }
+ergo-chain-types = { workspace = true }
+k256 = { workspace = true }
+elliptic-curve = { workspace = true }
+thiserror = { workspace = true }
+lazy_static = { workspace = true }
+derive_more = { workspace = true }
+proptest = { workspace = true , optional = true }
+proptest-derive = { workspace = true, optional = true }
+bs58 = { workspace = true }
+base16 = { workspace = true }
+num-bigint = { workspace = true }
+bounded-vec = { workspace = true, features = ["serde"] }
+num-traits = { workspace = true }
+num-derive = { workspace = true }
+num-integer = { workspace = true }
+indexmap = { workspace = true }
+serde = { workspace = true , optional = true }
+serde_json = { workspace = true, optional = true }
+serde_with = { workspace = true, optional = true }
 num256 = "0.3.1"
-num-traits = "0.2.14"
-num-derive = "0.3.3"
-num-integer = "0.1.44"
+impl-trait-for-tuples = "0.2.0"
 strum = "0.21"
 strum_macros = "0.21"
-indexmap = "1.3.2"
-serde = { version = "1.0", features = ["derive"], optional = true }
-serde_json = { version = "1.0", features = ["arbitrary_precision"], optional = true }
-
-[dependencies.proptest]
-# wasm support, via https://altsysrq.github.io/proptest-book/proptest/wasm.html
-version = "1.0.0"
-# The default feature set includes things like process forking which are not
-# supported in Web Assembly.
-default-features = false
-# Enable using the `std` crate.
-features = ["std"]
-optional = true
-
-[dependencies.serde_with]
-version = "1.9.1"
-features = [ "json" ]
-optional = true
 
 [features]
 default = ["json"]
@@ -61,6 +46,6 @@ arbitrary = ["proptest", "proptest-derive", "ergo-chain-types/arbitrary"]
 json = ["serde", "serde_json", "serde_with", "bounded-vec/serde"]
 
 [dev-dependencies]
-sigma-test-util = { version = "^0.3.0", path = "../sigma-test-util" }
-rand = "0.8.5"
-pretty_assertions = "0.7.2"
+sigma-test-util = { workspace = true }
+rand = { workspace = true }
+pretty_assertions = { workspace = true }
diff --git a/gf2_192/Cargo.toml b/gf2_192/Cargo.toml
index e9fc589c2..e8d4a9193 100644
--- a/gf2_192/Cargo.toml
+++ b/gf2_192/Cargo.toml
@@ -4,26 +4,15 @@ version = "0.21.0"
 license = "CC0-1.0"
 authors = ["Timothy Ling (@kettlebell)"]
 description = "Arithmetic operations and polynomial interpolation over Galois fields GF(2^192)"
-repository = "https://github.com/ergoplatform/sigma-rust"
-edition = "2021"
-
-# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
+repository.workspace = true
+edition.workspace = true
 
 [dependencies]
-derive_more = "0.99"
-rand = "0.8.5"
-thiserror = "1"
-proptest-derive = {version = "0.3.0", optional = true }
-
-[dependencies.proptest]
-# wasm support, via https://altsysrq.github.io/proptest-book/proptest/wasm.html
-version = "1.0.0"
-# The default feature set includes things like process forking which are not
-# supported in Web Assembly.
-default-features = false
-# Enable using the `std` crate.
-features = ["std"]
-optional = true
+derive_more = { workspace = true }
+rand = { workspace = true }
+thiserror = { workspace = true }
+proptest-derive = { workspace = true, optional = true }
+proptest = { workspace = true , optional = true }
 
 [features]
 arbitrary = ["proptest", "proptest-derive"]
diff --git a/rust-toolchain b/rust-toolchain
index 58e4eb6b2..8725364a8 100644
--- a/rust-toolchain
+++ b/rust-toolchain
@@ -1,1 +1,1 @@
-1.63
+1.64
diff --git a/sigma-ser/Cargo.toml b/sigma-ser/Cargo.toml
index 768ec5777..db6ef6db9 100644
--- a/sigma-ser/Cargo.toml
+++ b/sigma-ser/Cargo.toml
@@ -3,29 +3,19 @@ name = "sigma-ser"
 version = "0.10.0"
 license = "CC0-1.0"
 authors = ["Denys Zadorozhnyi <denys@zadorozhnyi.com>"]
-edition = "2018"
+repository.workspace = true
+edition.workspace = true
 description = "Ergo binary serialization primitives"
-repository = "https://github.com/ergoplatform/sigma-rust"
 
 [lib]
 crate-type = ["cdylib", "rlib"]
 
-# [features]
-# default = ["console_error_panic_hook"]
-
 [dependencies]
-# wasm-bindgen = "0.2"
-thiserror = "1"
-bitvec = "0.22.3"
-bounded-vec = { version = "^0.7.0" }
-# The `console_error_panic_hook` crate provides better debugging of panics by
-# logging them with `console.error`. This is great for development, but requires
-# all the `std::fmt` and `std::panicking` infrastructure, so isn't great for
-# code size when deploying.
-# console_error_panic_hook = { version = "0.1.6", optional = true }
+thiserror = { workspace = true }
+bitvec = { workspace = true }
+bounded-vec = { workspace = true }
 
 [dev-dependencies]
-# wasm-bindgen-test = "0.3.10"
-proptest = "0.10"
-proptest-derive = "0.2"
-derive_more = "0.99"
+proptest = { workspace = true }
+proptest-derive = { workspace = true }
+derive_more = { workspace = true }
diff --git a/sigma-ser/src/vlq_encode.rs b/sigma-ser/src/vlq_encode.rs
index a43dc6dc4..61074ff7d 100644
--- a/sigma-ser/src/vlq_encode.rs
+++ b/sigma-ser/src/vlq_encode.rs
@@ -108,7 +108,7 @@ pub trait WriteSigmaVlqExt: io::Write {
 
     /// Encode bool array as bit vector, filling trailing bits with `false`
     fn put_bits(&mut self, bools: &[bool]) -> io::Result<()> {
-        let mut bits = BitVec::<Lsb0, u8>::new();
+        let mut bits = BitVec::<u8, Lsb0>::new();
         for b in bools {
             bits.push(*b);
         }
@@ -227,7 +227,7 @@ pub trait ReadSigmaVlqExt: io::Read {
         let mut buf = vec![0u8; byte_num];
         self.read_exact(&mut buf)?;
         // May fail if number of bits in buf is larger that maximum value of usize
-        let mut bits = BitVec::<Lsb0, u8>::from_vec(buf);
+        let mut bits = BitVec::<u8, Lsb0>::from_vec(buf);
         bits.truncate(size);
         Ok(bits.iter().map(|x| *x).collect::<Vec<bool>>())
     }
diff --git a/sigma-util/Cargo.toml b/sigma-util/Cargo.toml
index 679da23f4..eae1d5a56 100644
--- a/sigma-util/Cargo.toml
+++ b/sigma-util/Cargo.toml
@@ -3,16 +3,15 @@ name = "sigma-util"
 version = "0.9.0"
 license = "CC0-1.0"
 authors = ["Denys Zadorozhnyi <denys@zadorozhnyi.com>"]
-edition = "2018"
+repository.workspace = true
+edition.workspace = true
 description = "Ergo primitives"
-repository = "https://github.com/ergoplatform/sigma-rust"
 
 [lib]
 crate-type = ["cdylib", "rlib"]
 
 [dependencies]
-blake2 = "0.9"
-sha2 = "0.9"
-
+blake2 = { workspace = true }
+sha2 = { workspace = true }
 
 [dev-dependencies]
diff --git a/sigma-util/src/hash.rs b/sigma-util/src/hash.rs
index fcc3bc349..418d74c23 100644
--- a/sigma-util/src/hash.rs
+++ b/sigma-util/src/hash.rs
@@ -1,18 +1,17 @@
 //! Hash functions
 
-use std::convert::TryInto;
-
 /// Blake2b256 hash (256 bit)
 pub fn blake2b256_hash(bytes: &[u8]) -> Box<[u8; 32]> {
-    use blake2::digest::{Update, VariableOutput};
-    use blake2::VarBlake2b;
+    use blake2::digest::typenum::U32;
+    use blake2::Blake2b;
+    use blake2::Digest;
+
+    type Blake2b256 = Blake2b<U32>;
 
-    // unwrap is safe 32 bytes is a valid hash size (<= 512 && 32 % 8 == 0)
-    let mut hasher = VarBlake2b::new(32).unwrap();
+    let mut hasher = Blake2b256::new();
     hasher.update(bytes);
-    let hash = hasher.finalize_boxed();
-    // unwrap is safe due to hash size is expected to be 32
-    hash.try_into().unwrap()
+    let hash: [u8; 32] = hasher.finalize().into();
+    Box::new(hash)
 }
 
 /// Sha256 hash (256 bit)


Test patch:
diff --git a/bindings/ergo-lib-wasm/tests_browser/test_rest_api.js b/bindings/ergo-lib-wasm/tests_browser/test_rest_api.js
index 7401010d6..e11350ee6 100644
--- a/bindings/ergo-lib-wasm/tests_browser/test_rest_api.js
+++ b/bindings/ergo-lib-wasm/tests_browser/test_rest_api.js
@@ -54,7 +54,7 @@ it('node REST API: example SPV workflow', async () => {
 
     // Get NiPoPow proofs from 2 separate ergo nodes
     let proofs = await Promise.all([
-        get_nipopow_proof(new URL("http://167.235.75.51:9053"), header_id),
+        get_nipopow_proof(new URL("http://159.65.11.55:9053"), header_id),
         get_nipopow_proof(new URL("http://213.239.193.208:9053"), header_id),
     ]);
 
@@ -68,7 +68,7 @@ it('node REST API: example SPV workflow', async () => {
     assert(best_proof.suffix_head().id().equals(header_id), "equality");
 
     // Verify with a 3rd node
-    let node_conf = new ergo_wasm.NodeConf(new URL("http://167.235.142.92:9053"));
+    let node_conf = new ergo_wasm.NodeConf(new URL("http://198.58.96.195:9053"));
     let header = await ergo_wasm.get_header(node_conf, header_id);
     assert(header != null, "header should be non-null");
     let merkle_proof = await ergo_wasm.get_blocks_header_id_proof_for_tx_id(node_conf, header_id, tx_id);
diff --git a/sigma-test-util/Cargo.toml b/sigma-test-util/Cargo.toml
index 78c0d59fe..03c5e36dc 100644
--- a/sigma-test-util/Cargo.toml
+++ b/sigma-test-util/Cargo.toml
@@ -3,9 +3,9 @@ name = "sigma-test-util"
 version = "0.3.0"
 license = "CC0-1.0"
 authors = ["Denys Zadorozhnyi <denys@zadorozhnyi.com>"]
-edition = "2018"
+repository.workspace = true
+edition.workspace = true
 description = "Test utilities for Ergo"
-repository = "https://github.com/ergoplatform/sigma-rust"
 
 [lib]
 crate-type = ["cdylib", "rlib"]