Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
359 changes: 246 additions & 113 deletions Cargo.lock

Large diffs are not rendered by default.

18 changes: 17 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ borsh = "1.3.1"
byteorder = "1.4.3"
bytes = "1.9.0"
clap = "4.5.4"
curve25519-dalek = { version = "5", default-features = false }
dirs = "6.0.0"
dotenvy = "0.15.7"
ed25519-dalek = "2.1.1"
educe = { version = "0.6.0", default-features = false }
eframe = "0.34.0"
either = "1.13.0"
Expand Down Expand Up @@ -53,6 +53,8 @@ prost-build = "0.14.3"
prost-types = "0.14.3"
protox = "0.9.1"
quinn = "0.11.6"
# needs to line up with version required by frost-core
rand = { version = "0.10", default-features = false }
rayon = "1.7.0"
rcgen = "0.13.2"
reserve-port = "2.0.1"
Expand Down Expand Up @@ -99,6 +101,20 @@ default-features = false
git = "https://github.com/LayerTwo-Labs/bip300301_enforcer"
rev = "1100b6085d9ed64eeaf1b57b3c44609626bd4b23"

# TODO: remove once a release is published that is compatible with
# curve25519-dalek v5
[workspace.dependencies.frost-core]
default-features = false
git = "https://github.com/ZcashFoundation/frost"
rev = "0966bd1529aa062ad3b621af99e277f976b1c0f0"

# TODO: remove once a release is published that is compatible with
# curve25519-dalek v5
[workspace.dependencies.frost-ristretto255]
default-features = false
git = "https://github.com/ZcashFoundation/frost"
rev = "0966bd1529aa062ad3b621af99e277f976b1c0f0"

[workspace.dependencies.l2l-openapi]
git = "https://github.com/Ash-L2L/l2l-openapi"
rev = "5f8fb2237c95725731d5fb10542098303d82e215"
Expand Down
1 change: 1 addition & 0 deletions app/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ plain_bitassets = { path = "../lib", features = ["clap"] }
plain_bitassets_app_cli = { path = "../cli" }
plain_bitassets_app_rpc_api = { path = "../rpc-api" }
poll-promise = { workspace = true, features = ["tokio"] }
rand = { workspace = true, features = ["thread_rng"] }
serde = { workspace = true, features = ["derive"] }
shlex = { workspace = true }
strum = { workspace = true, features = ["derive"] }
Expand Down
3 changes: 2 additions & 1 deletion app/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@ impl App {
config.network,
cusf_mainchain,
cusf_mainchain_wallet,
&mut rand::rng(),
&runtime,
#[cfg(feature = "zmq")]
config.zmq_addr,
Expand Down Expand Up @@ -306,7 +307,7 @@ impl App {
}

pub fn sign_and_send(&self, tx: Transaction) -> Result<(), Error> {
let authorized_transaction = self.wallet.authorize(tx)?;
let authorized_transaction = self.wallet.authorize(rand::rng(), tx)?;
self.node.submit_transaction(authorized_transaction)?;
let () = self.update()?;
Ok(())
Expand Down
25 changes: 17 additions & 8 deletions app/rpc_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,11 @@ impl RpcServer for RpcServerImpl {
amount_receive,
)
.map_err(custom_err)?;
let authorized_tx =
self.app.wallet.authorize(tx).map_err(custom_err)?;
let authorized_tx = self
.app
.wallet
.authorize(rand::rng(), tx)
.map_err(custom_err)?;
self.app
.node
.submit_transaction(authorized_tx)
Expand Down Expand Up @@ -238,8 +241,11 @@ impl RpcServer for RpcServerImpl {
receive_quantity,
)
.map_err(custom_err)?;
let authorized_tx =
self.app.wallet.authorize(tx).map_err(custom_err)?;
let authorized_tx = self
.app
.wallet
.authorize(rand::rng(), tx)
.map_err(custom_err)?;
self.app
.node
.submit_transaction(authorized_tx)
Expand Down Expand Up @@ -274,8 +280,11 @@ impl RpcServer for RpcServerImpl {
auction_state.quote_amount.latest().data,
)
.map_err(custom_err)?;
let authorized_tx =
self.app.wallet.authorize(tx).map_err(custom_err)?;
let authorized_tx = self
.app
.wallet
.authorize(rand::rng(), tx)
.map_err(custom_err)?;
self.app
.node
.submit_transaction(authorized_tx)
Expand Down Expand Up @@ -629,7 +638,7 @@ impl RpcServer for RpcServerImpl {
) -> RpcResult<Signature> {
self.app
.wallet
.sign_arbitrary_msg(&verifying_key, &msg)
.sign_arbitrary_msg(rand::rng(), &verifying_key, &msg)
.map_err(custom_err)
}

Expand All @@ -640,7 +649,7 @@ impl RpcServer for RpcServerImpl {
) -> RpcResult<Authorization> {
self.app
.wallet
.sign_arbitrary_msg_as_addr(&address, &msg)
.sign_arbitrary_msg_as_addr(rand::rng(), &address, &msg)
.map_err(custom_err)
}

Expand Down
1 change: 1 addition & 0 deletions deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,7 @@ allow-git = [
"https://github.com/LayerTwo-Labs/bip300301_enforcer.git",
"https://github.com/LayerTwo-Labs/cusf-enforcer-mempool.git",
"https://github.com/torkelrogstad/tokio-tracing.git?branch=log-rotation-size",
"https://github.com/ZcashFoundation/frost.git?rev=0966bd1529aa062ad3b621af99e277f976b1c0f0",
]

[sources.allow-org]
Expand Down
6 changes: 5 additions & 1 deletion lib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,12 @@ borsh = { workspace = true, features = ["derive"] }
byteorder = { workspace = true }
bytes = { workspace = true }
clap = { workspace = true, features = ["derive"], optional = true }
ed25519-dalek = { workspace = true, features = ["batch", "serde"] }
curve25519-dalek = { workspace = true, features = ["group", "serde"] }
educe = { workspace = true, features = ["Clone", "Debug"] }
error-fatality = { workspace = true }
fallible-iterator = { workspace = true }
frost-core = { workspace = true, features = ["internals"] }
frost-ristretto255 = { workspace = true, features = ["serde"] }
futures = { workspace = true, features = ["alloc"] }
hashlink = { workspace = true, features = ["serde_impl"] }
fraction = { workspace = true }
Expand All @@ -43,6 +45,7 @@ parking_lot = { workspace = true }
prost = { workspace = true }
prost-types = { workspace = true }
quinn = { workspace = true }
rand = { workspace = true, features = ["chacha"] }
rayon = { workspace = true }
rcgen = { workspace = true }
rustls = { workspace = true, features = ["ring"] }
Expand Down Expand Up @@ -71,6 +74,7 @@ workspace = true
features = ["AES256-GCM", "ECIES-MAC", "HMAC-SHA256", "x25519"]

[dev-dependencies]
rand = { workspace = true, features = ["thread_rng"] }
temp-dir = { workspace = true }

[features]
Expand Down
Loading
Loading