From 952cf280c292767c9f9988e1f70e85d773d3f717 Mon Sep 17 00:00:00 2001 From: Luke Parker Date: Mon, 20 Mar 2023 20:28:41 -0400 Subject: [PATCH] Bump crate versions --- Cargo.lock | 24 ++++++++++++------------ coins/bitcoin/Cargo.toml | 6 +++--- coins/bitcoin/README.md | 4 ++++ coins/bitcoin/src/lib.rs | 4 ++++ coins/monero/Cargo.toml | 14 +++++++------- coins/monero/generators/Cargo.toml | 4 ++-- coins/monero/src/lib.rs | 19 +------------------ coins/monero/src/wallet/send/multisig.rs | 4 +--- crypto/ciphersuite/Cargo.toml | 6 +++--- crypto/dalek-ff-group/Cargo.toml | 2 +- crypto/dkg/Cargo.toml | 8 ++++---- crypto/dleq/Cargo.toml | 2 +- crypto/ed448/Cargo.toml | 4 ++-- crypto/ff-group-tests/Cargo.toml | 2 +- crypto/ff-group-tests/src/lib.rs | 1 + crypto/frost/Cargo.toml | 14 +++++++------- crypto/multiexp/Cargo.toml | 2 +- crypto/schnorr/Cargo.toml | 8 ++++---- crypto/transcript/Cargo.toml | 2 +- substrate/serai/client/Cargo.toml | 4 ++-- 20 files changed, 62 insertions(+), 72 deletions(-) create mode 100644 coins/bitcoin/README.md diff --git a/Cargo.lock b/Cargo.lock index 7a829640..4578fbda 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -585,7 +585,7 @@ dependencies = [ [[package]] name = "bitcoin-serai" -version = "0.1.1" +version = "0.2.0" dependencies = [ "bitcoin", "flexible-transcript", @@ -1015,7 +1015,7 @@ dependencies = [ [[package]] name = "ciphersuite" -version = "0.2.0" +version = "0.3.0" dependencies = [ "dalek-ff-group", "digest 0.10.6", @@ -1637,7 +1637,7 @@ dependencies = [ [[package]] name = "dalek-ff-group" -version = "0.2.0" +version = "0.3.0" dependencies = [ "crypto-bigint 0.5.1", "curve25519-dalek 3.2.0", @@ -1945,7 +1945,7 @@ dependencies = [ [[package]] name = "dkg" -version = "0.3.0" +version = "0.4.0" dependencies = [ "chacha20 0.9.0", "ciphersuite", @@ -1961,7 +1961,7 @@ dependencies = [ [[package]] name = "dleq" -version = "0.3.0" +version = "0.3.1" dependencies = [ "blake2", "dalek-ff-group", @@ -2625,7 +2625,7 @@ dependencies = [ [[package]] name = "ff-group-tests" -version = "0.12.1" +version = "0.12.2" dependencies = [ "group", "k256 0.12.0", @@ -2720,7 +2720,7 @@ dependencies = [ [[package]] name = "flexible-transcript" -version = "0.3.0" +version = "0.3.1" dependencies = [ "blake2", "digest 0.10.6", @@ -4936,7 +4936,7 @@ checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" [[package]] name = "minimal-ed448" -version = "0.2.0" +version = "0.3.0" dependencies = [ "crypto-bigint 0.5.1", "dalek-ff-group", @@ -5007,7 +5007,7 @@ dependencies = [ [[package]] name = "modular-frost" -version = "0.6.0" +version = "0.7.0" dependencies = [ "ciphersuite", "dalek-ff-group", @@ -5089,7 +5089,7 @@ dependencies = [ [[package]] name = "monero-serai" -version = "0.1.3-alpha" +version = "0.1.4-alpha" dependencies = [ "base58-monero", "crc", @@ -5171,7 +5171,7 @@ dependencies = [ [[package]] name = "multiexp" -version = "0.3.0" +version = "0.3.1" dependencies = [ "dalek-ff-group", "ff", @@ -8105,7 +8105,7 @@ dependencies = [ [[package]] name = "schnorr-signatures" -version = "0.3.0" +version = "0.4.0" dependencies = [ "ciphersuite", "dalek-ff-group", diff --git a/coins/bitcoin/Cargo.toml b/coins/bitcoin/Cargo.toml index e10aeb48..7f872930 100644 --- a/coins/bitcoin/Cargo.toml +++ b/coins/bitcoin/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bitcoin-serai" -version = "0.1.1" +version = "0.2.0" description = "A Bitcoin library for FROST-signing transactions" license = "MIT" repository = "https://github.com/serai-dex/serai/tree/develop/coins/bitcoin" @@ -21,7 +21,7 @@ bitcoin = { version = "0.29", features = ["serde"] } k256 = { version = "0.12", features = ["arithmetic"] } transcript = { package = "flexible-transcript", path = "../../crypto/transcript", version = "0.3", features = ["recommended"] } -frost = { package = "modular-frost", path = "../../crypto/frost", version = "0.6", features = ["secp256k1"] } +frost = { package = "modular-frost", path = "../../crypto/frost", version = "0.7", features = ["secp256k1"] } hex = "0.4" serde = { version = "1", features = ["derive"] } @@ -29,7 +29,7 @@ serde_json = "1" reqwest = { version = "0.11", features = ["json"] } [dev-dependencies] -frost = { package = "modular-frost", path = "../../crypto/frost", version = "0.6", features = ["tests"] } +frost = { package = "modular-frost", path = "../../crypto/frost", version = "0.7", features = ["tests"] } tokio = { version = "1", features = ["full"] } diff --git a/coins/bitcoin/README.md b/coins/bitcoin/README.md new file mode 100644 index 00000000..a0c05d45 --- /dev/null +++ b/coins/bitcoin/README.md @@ -0,0 +1,4 @@ +# bitcoin-serai + +An application of [modular-frost](https://docs.rs/modular-frost) to Bitcoin +transactions, enabling extremely-efficient multisigs. diff --git a/coins/bitcoin/src/lib.rs b/coins/bitcoin/src/lib.rs index 657f3ffc..f27ea83e 100644 --- a/coins/bitcoin/src/lib.rs +++ b/coins/bitcoin/src/lib.rs @@ -1,3 +1,7 @@ +#![cfg_attr(docsrs, feature(doc_auto_cfg))] + +#![doc = include_str!("../README.md")] + /// The bitcoin Rust library. pub use bitcoin; diff --git a/coins/monero/Cargo.toml b/coins/monero/Cargo.toml index d06a5622..7a15da68 100644 --- a/coins/monero/Cargo.toml +++ b/coins/monero/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "monero-serai" -version = "0.1.3-alpha" +version = "0.1.4-alpha" description = "A modern Monero transaction library" license = "MIT" repository = "https://github.com/serai-dex/serai/tree/develop/coins/monero" @@ -31,14 +31,14 @@ sha3 = "0.10" curve25519-dalek = { version = "^3.2", features = ["std"] } group = "0.12" -dalek-ff-group = { path = "../../crypto/dalek-ff-group", version = "0.2" } +dalek-ff-group = { path = "../../crypto/dalek-ff-group", version = "0.3" } multiexp = { path = "../../crypto/multiexp", version = "0.3", features = ["batch"] } transcript = { package = "flexible-transcript", path = "../../crypto/transcript", version = "0.3", features = ["recommended"], optional = true } -frost = { package = "modular-frost", path = "../../crypto/frost", version = "0.6", features = ["ed25519"], optional = true } +frost = { package = "modular-frost", path = "../../crypto/frost", version = "0.7", features = ["ed25519"], optional = true } dleq = { path = "../../crypto/dleq", version = "0.3", features = ["serialize"], optional = true } -monero-generators = { path = "generators", version = "0.2" } +monero-generators = { path = "generators", version = "0.3" } hex = "0.4" serde = { version = "1", features = ["derive"] } @@ -51,8 +51,8 @@ digest_auth = "0.3" reqwest = { version = "0.11", features = ["json"] } [build-dependencies] -dalek-ff-group = { path = "../../crypto/dalek-ff-group", version = "0.2" } -monero-generators = { path = "generators", version = "0.2" } +dalek-ff-group = { path = "../../crypto/dalek-ff-group", version = "0.3" } +monero-generators = { path = "generators", version = "0.3" } [dev-dependencies] hex-literal = "0.3" @@ -60,7 +60,7 @@ hex-literal = "0.3" tokio = { version = "1", features = ["full"] } monero-rpc = "0.3" -frost = { package = "modular-frost", path = "../../crypto/frost", version = "0.6", features = ["tests"] } +frost = { package = "modular-frost", path = "../../crypto/frost", version = "0.7", features = ["tests"] } [features] multisig = ["transcript", "frost", "dleq"] diff --git a/coins/monero/generators/Cargo.toml b/coins/monero/generators/Cargo.toml index 9bbc5aa3..c1a4a3be 100644 --- a/coins/monero/generators/Cargo.toml +++ b/coins/monero/generators/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "monero-generators" -version = "0.2.0" +version = "0.3.0" description = "Monero's hash_to_point and generators" license = "MIT" repository = "https://github.com/serai-dex/serai/tree/develop/coins/monero/generators" @@ -21,4 +21,4 @@ sha3 = "0.10" curve25519-dalek = { version = "3", features = ["std"] } group = "0.12" -dalek-ff-group = { path = "../../../crypto/dalek-ff-group", version = "0.2" } +dalek-ff-group = { path = "../../../crypto/dalek-ff-group", version = "0.3" } diff --git a/coins/monero/src/lib.rs b/coins/monero/src/lib.rs index 203698a9..5822ef67 100644 --- a/coins/monero/src/lib.rs +++ b/coins/monero/src/lib.rs @@ -1,22 +1,5 @@ #![cfg_attr(docsrs, feature(doc_auto_cfg))] - -//! A modern Monero transaction library intended for usage in wallets. It prides -//! itself on accuracy, correctness, and removing common pit falls developers may -//! face. -//! -//! monero-serai contains safety features, such as first-class acknowledgement of -//! the burning bug, yet also a high level API around creating transactions. -//! monero-serai also offers a FROST-based multisig, which is orders of magnitude -//! more performant than Monero's. -//! -//! monero-serai was written for Serai, a decentralized exchange aiming to support -//! Monero. Despite this, monero-serai is intended to be a widely usable library, -//! accurate to Monero. monero-serai guarantees the functionality needed for Serai, -//! yet will not deprive functionality from other users, and may potentially leave -//! Serai's umbrella at some point. -//! -//! Various legacy transaction formats are not currently implemented, yet -//! monero-serai is still increasing its support for various transaction types. +#![doc = include_str!("../README.md")] use std::io; diff --git a/coins/monero/src/wallet/send/multisig.rs b/coins/monero/src/wallet/send/multisig.rs index a953d403..94814cb8 100644 --- a/coins/monero/src/wallet/send/multisig.rs +++ b/coins/monero/src/wallet/send/multisig.rs @@ -267,9 +267,7 @@ impl SignMachine for TransactionSignMachine { msg: &[u8], ) -> Result<(TransactionSignatureMachine, Self::SignatureShare), FrostError> { if !msg.is_empty() { - Err(FrostError::InternalError( - "message was passed to the TransactionMachine when it generates its own", - ))?; + panic!("message was passed to the TransactionMachine when it generates its own"); } // Find out who's included diff --git a/crypto/ciphersuite/Cargo.toml b/crypto/ciphersuite/Cargo.toml index 15242428..8db1312b 100644 --- a/crypto/ciphersuite/Cargo.toml +++ b/crypto/ciphersuite/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ciphersuite" -version = "0.2.0" +version = "0.3.0" description = "Ciphersuites built around ff/group" license = "MIT" repository = "https://github.com/serai-dex/serai/tree/develop/crypto/ciphersuite" @@ -26,13 +26,13 @@ sha3 = { version = "0.10", optional = true } ff = { version = "0.12", features = ["bits"] } group = "0.12" -dalek-ff-group = { path = "../dalek-ff-group", version = "0.2", optional = true } +dalek-ff-group = { path = "../dalek-ff-group", version = "0.3", optional = true } elliptic-curve = { version = "0.12", features = ["hash2curve"], optional = true } p256 = { version = "0.12", features = ["arithmetic", "bits", "hash2curve"], optional = true } k256 = { version = "0.12", features = ["arithmetic", "bits", "hash2curve"], optional = true } -minimal-ed448 = { path = "../ed448", version = "0.2", optional = true } +minimal-ed448 = { path = "../ed448", version = "0.3", optional = true } [dev-dependencies] hex = "0.4" diff --git a/crypto/dalek-ff-group/Cargo.toml b/crypto/dalek-ff-group/Cargo.toml index 93e798b7..859397cc 100644 --- a/crypto/dalek-ff-group/Cargo.toml +++ b/crypto/dalek-ff-group/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "dalek-ff-group" -version = "0.2.0" +version = "0.3.0" description = "ff/group bindings around curve25519-dalek" license = "MIT" repository = "https://github.com/serai-dex/serai/tree/develop/crypto/dalek-ff-group" diff --git a/crypto/dkg/Cargo.toml b/crypto/dkg/Cargo.toml index 4808001a..dd8c673e 100644 --- a/crypto/dkg/Cargo.toml +++ b/crypto/dkg/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "dkg" -version = "0.3.0" +version = "0.4.0" description = "Distributed key generation over ff/group" license = "MIT" repository = "https://github.com/serai-dex/serai/tree/develop/crypto/dkg" @@ -24,14 +24,14 @@ serde = { version = "1", features = ["derive"], optional = true } transcript = { package = "flexible-transcript", path = "../transcript", version = "0.3", features = ["recommended"] } chacha20 = { version = "0.9", features = ["zeroize"] } -ciphersuite = { path = "../ciphersuite", version = "0.2", features = ["std"] } +ciphersuite = { path = "../ciphersuite", version = "0.3", features = ["std"] } multiexp = { path = "../multiexp", version = "0.3", features = ["batch"] } -schnorr = { package = "schnorr-signatures", path = "../schnorr", version = "0.3" } +schnorr = { package = "schnorr-signatures", path = "../schnorr", version = "0.4" } dleq = { path = "../dleq", version = "0.3", features = ["serialize"] } [dev-dependencies] -ciphersuite = { path = "../ciphersuite", version = "0.2", features = ["ristretto"] } +ciphersuite = { path = "../ciphersuite", version = "0.3", features = ["ristretto"] } [features] serde = ["dep:serde"] diff --git a/crypto/dleq/Cargo.toml b/crypto/dleq/Cargo.toml index 00c5a29c..c582f502 100644 --- a/crypto/dleq/Cargo.toml +++ b/crypto/dleq/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "dleq" -version = "0.3.0" +version = "0.3.1" description = "Implementation of single and cross-curve Discrete Log Equality proofs" license = "MIT" repository = "https://github.com/serai-dex/serai/tree/develop/crypto/dleq" diff --git a/crypto/ed448/Cargo.toml b/crypto/ed448/Cargo.toml index 807c125b..9ba2686d 100644 --- a/crypto/ed448/Cargo.toml +++ b/crypto/ed448/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "minimal-ed448" -version = "0.2.0" +version = "0.3.0" description = "Unaudited, inefficient implementation of Ed448 in Rust" license = "MIT" repository = "https://github.com/serai-dex/serai/tree/develop/crypto/ed448" @@ -26,7 +26,7 @@ group = "0.12" generic-array = "0.14" crypto-bigint = { version = "0.5", features = ["zeroize"] } -dalek-ff-group = { path = "../dalek-ff-group", version = "0.2" } +dalek-ff-group = { path = "../dalek-ff-group", version = "0.3" } [dev-dependencies] hex = "0.4" diff --git a/crypto/ff-group-tests/Cargo.toml b/crypto/ff-group-tests/Cargo.toml index c75bfc32..21efc182 100644 --- a/crypto/ff-group-tests/Cargo.toml +++ b/crypto/ff-group-tests/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ff-group-tests" -version = "0.12.1" +version = "0.12.2" description = "A collection of sanity tests for implementors of ff/group APIs" license = "MIT" repository = "https://github.com/serai-dex/serai/tree/develop/crypto/ff-group-tests" diff --git a/crypto/ff-group-tests/src/lib.rs b/crypto/ff-group-tests/src/lib.rs index 0f14eb69..f19804d2 100644 --- a/crypto/ff-group-tests/src/lib.rs +++ b/crypto/ff-group-tests/src/lib.rs @@ -1,4 +1,5 @@ #![cfg_attr(docsrs, feature(doc_auto_cfg))] + #![doc = include_str!("../README.md")] /// Tests for the Field trait. diff --git a/crypto/frost/Cargo.toml b/crypto/frost/Cargo.toml index 521b7ffa..df34d82c 100644 --- a/crypto/frost/Cargo.toml +++ b/crypto/frost/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "modular-frost" -version = "0.6.0" +version = "0.7.0" description = "Modular implementation of FROST over ff/group" license = "MIT" repository = "https://github.com/serai-dex/serai/tree/develop/crypto/frost" @@ -26,23 +26,23 @@ hex = { version = "0.4", optional = true } digest = "0.10" transcript = { package = "flexible-transcript", path = "../transcript", version = "0.3", features = ["recommended"] } -dalek-ff-group = { path = "../dalek-ff-group", version = "0.2", optional = true } -minimal-ed448 = { path = "../ed448", version = "0.2", optional = true } +dalek-ff-group = { path = "../dalek-ff-group", version = "0.3", optional = true } +minimal-ed448 = { path = "../ed448", version = "0.3", optional = true } -ciphersuite = { path = "../ciphersuite", version = "0.2", features = ["std"] } +ciphersuite = { path = "../ciphersuite", version = "0.3", features = ["std"] } multiexp = { path = "../multiexp", version = "0.3", features = ["batch"] } -schnorr = { package = "schnorr-signatures", path = "../schnorr", version = "0.3" } +schnorr = { package = "schnorr-signatures", path = "../schnorr", version = "0.4" } dleq = { path = "../dleq", version = "0.3", features = ["serialize"] } -dkg = { path = "../dkg", version = "0.3" } +dkg = { path = "../dkg", version = "0.4" } [dev-dependencies] hex = "0.4" serde_json = "1" -dkg = { path = "../dkg", version = "0.3", features = ["tests"] } +dkg = { path = "../dkg", version = "0.4", features = ["tests"] } [features] ed25519 = ["dalek-ff-group", "ciphersuite/ed25519"] diff --git a/crypto/multiexp/Cargo.toml b/crypto/multiexp/Cargo.toml index bd1c0422..77523fc7 100644 --- a/crypto/multiexp/Cargo.toml +++ b/crypto/multiexp/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "multiexp" -version = "0.3.0" +version = "0.3.1" description = "Multiexponentation algorithms for ff/group" license = "MIT" repository = "https://github.com/serai-dex/serai/tree/develop/crypto/multiexp" diff --git a/crypto/schnorr/Cargo.toml b/crypto/schnorr/Cargo.toml index 39fbb84f..07fa2487 100644 --- a/crypto/schnorr/Cargo.toml +++ b/crypto/schnorr/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "schnorr-signatures" -version = "0.3.0" +version = "0.4.0" description = "Minimal Schnorr signatures crate hosting common code" license = "MIT" repository = "https://github.com/serai-dex/serai/tree/develop/crypto/schnorr" @@ -19,11 +19,11 @@ zeroize = { version = "^1.5", features = ["zeroize_derive"] } transcript = { package = "flexible-transcript", path = "../transcript", version = "0.3" } -ciphersuite = { path = "../ciphersuite", version = "0.2" } +ciphersuite = { path = "../ciphersuite", version = "0.3" } multiexp = { path = "../multiexp", version = "0.3", features = ["batch"] } [dev-dependencies] hex = "0.4" sha2 = "0.10" -dalek-ff-group = { path = "../dalek-ff-group", version = "0.2" } -ciphersuite = { path = "../ciphersuite", version = "0.2", features = ["ed25519"] } +dalek-ff-group = { path = "../dalek-ff-group", version = "0.3" } +ciphersuite = { path = "../ciphersuite", version = "0.3", features = ["ed25519"] } diff --git a/crypto/transcript/Cargo.toml b/crypto/transcript/Cargo.toml index fd4be501..6ef0a696 100644 --- a/crypto/transcript/Cargo.toml +++ b/crypto/transcript/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "flexible-transcript" -version = "0.3.0" +version = "0.3.1" description = "A simple transcript trait definition, along with viable options" license = "MIT" repository = "https://github.com/serai-dex/serai/tree/develop/crypto/transcript" diff --git a/substrate/serai/client/Cargo.toml b/substrate/serai/client/Cargo.toml index a844a0e7..37e847e3 100644 --- a/substrate/serai/client/Cargo.toml +++ b/substrate/serai/client/Cargo.toml @@ -25,8 +25,8 @@ subxt = { version = "0.27", default-features = false, features = ["jsonrpsee-ws" bitcoin = { version = "0.29", optional = true } -ciphersuite = { path = "../../../crypto/ciphersuite", version = "0.2", optional = true } -monero-serai = { path = "../../../coins/monero", version = "0.1.3-alpha", optional = true } +ciphersuite = { path = "../../../crypto/ciphersuite", version = "0.3", optional = true } +monero-serai = { path = "../../../coins/monero", version = "0.1.4-alpha", optional = true } [features] serai = ["thiserror", "scale-info", "subxt"]