8000 fix: upgrade to `manta-rs` v0.5.4 by bhgomes · Pull Request #723 · Manta-Network/Manta · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix: upgrade to manta-rs v0.5.4 #723

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jul 29, 2022
Merged
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
84 changes: 34 additions & 50 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ clap = { version = "3.1", features = ["derive"] }
codec = { package = 'parity-scale-codec', version = '3.1.2' }
futures = "0.3.21"
log = "0.4.16"
serde = { version = "1.0.137", features = ["derive"] }
serde = { version = "1.0.140", features = ["derive"] }

# Substrate frames
frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.22" }
Expand Down
2 changes: 1 addition & 1 deletion pallets/collator-selection/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ codec = { version = '3.1.2', default-features = false, features = ['derive'], pa
log = { version = "0.4.16", default-features = false }
rand = { version = "0.8.5", default-features = false, optional = true }
scale-info = { version = "2.1.2", default-features = false, features = ["derive"] }
serde = { version = "1.0.137", default-features = false }
serde = { version = "1.0.140", default-features = false }

frame-support = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.22" }
frame-system = { git = 'https://github.com/paritytech/substrate.git', default-features = false, branch = "polkadot-v0.9.22" }
Expand Down
18 changes: 9 additions & 9 deletions pallets/manta-pay/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -92,21 +92,21 @@ sp-std = { git = 'https://github.com/paritytech/substrate.git', branch = "polkad
jsonrpsee = { version = "0.13.0", features = ["server", "macros"], optional = true }

# manta dependencies
manta-accounting = { git = "https://github.com/manta-network/manta-rs.git", tag = "v0.5.1", default-featur 10000 es = false }
manta-crypto = { git = "https://github.com/manta-network/manta-rs.git", tag = "v0.5.1", default-features = false }
manta-parameters = { git = "https://github.com/manta-network/manta-rs.git", tag = "v0.5.1", default-features = false }
manta-pay = { git = "https://github.com/manta-network/manta-rs.git", tag = "v0.5.1", default-features = false, features = ["groth16", "scale"] }
manta-accounting = { git = "https://github.com/manta-network/manta-rs.git", tag = "v0.5.4", default-features = false }
manta-crypto = { git = "https://github.com/manta-network/manta-rs.git", tag = "v0.5.4", default-features = false }
manta-parameters = { git = "https://github.com/manta-network/manta-rs.git", tag = "v0.5.4", default-features = false }
manta-pay = { git = "https://github.com/manta-network/manta-rs.git", tag = "v0.5.4", default-features = false, features = ["groth16", "scale"] }
manta-primitives = { path = "../../primitives/manta", default-features = false }
manta-util = { git = "https://github.com/manta-network/manta-rs.git", tag = "v0.5.1", default-features = false }
manta-util = { git = "https://github.com/manta-network/manta-rs.git", tag = "v0.5.4", default-features = false }

[dev-dependencies]
bencher = "0.1.5"
criterion = "0.3.4"
lazy_static = "1.4.0"
manta-accounting = { git = "https://github.com/manta-network/manta-rs.git", tag = "v0.5.1", features = ["test"] }
manta-crypto = { git = "https://github.com/manta-network/manta-rs.git", tag = "v0.5.1", features = ["getrandom"] }
manta-parameters = { git = "https://github.com/manta-network/manta-rs.git", tag = "v0.5.1", features = ["download"] }
manta-util = { git = "https://github.com/manta-network/manta-rs.git", tag = "v0.5.1", features = ["std"] }
manta-accounting = { git = "https://github.com/manta-network/manta-rs.git", tag = "v0.5.4", features = ["test"] }
manta-crypto = { git = "https://github.com/manta-network/manta-rs.git", tag = "v0.5.4", features = ["getrandom"] }
manta-parameters = { git = "https://github.com/manta-network/manta-rs.git", tag = "v0.5.4", features = ["download"] }
manta-util = { git = "https://github.com/manta-network/manta-rs.git", tag = "v0.5.4", features = ["std"] }
pallet-asset-manager = { path = "../asset-manager" }
pallet-assets = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.22" }
pallet-balances = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.22" }
Expand Down
13 changes: 9 additions & 4 deletions pallets/manta-pay/src/types.rs
< 8000 td id="diff-7266a47901e2de1e7862a1c0b125d1a196a51e9b5ca5a963c0e43d527a2d14afR208" data-line-number="208" class="blob-num blob-num-context js-linkable-line-number js-blob-rnum">
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
//! Type Definitions for Manta Pay

use super::*;
use manta_crypto::encryption::hybrid;
use manta_util::into_array_unchecked;
use scale_codec::Error;

Expand Down Expand Up @@ -133,6 +134,7 @@ impl Default for EncryptedNote {
impl From<config::EncryptedNote> for EncryptedNote {
#[inline]
fn from(encrypted_note: config::EncryptedNote) -> Self {
let encrypted_note = encrypted_note.ciphertext;
Self {
ephemeral_public_key: encode(encrypted_note.ephemeral_public_key),
ciphertext: encrypted_note.ciphertext.into(),
Expand All @@ -146,8 +148,11 @@ impl TryFrom<EncryptedNote> for config::EncryptedNote {
#[inline]
fn try_from(encrypted_note: EncryptedNote) -> Result<Self, Self::Error> {
Ok(Self {
ephemeral_public_key: decode(encrypted_note.ephemeral_public_key)?,
ciphertext: encrypted_note.ciphertext.into(),
header: (),
ciphertext: hybrid::Ciphertext {
ephemeral_public_key: decode(encrypted_note.ephemeral_public_key)?,
ciphertext: encrypted_note.ciphertext.into(),
},
})
}
}
Expand Down Expand Up @@ -199,7 +204,7 @@ impl From<config::ReceiverPost> for ReceiverPost {
fn from(post: config::ReceiverPost) -> Self {
Self {
utxo: encode(post.utxo),
encrypted_note: post.encrypted_note.into(),
encrypted_note: EncryptedNote::from(post.encrypted_note),
}
}
}
Expand Down Expand Up @@ -304,7 +309,7 @@ impl MaxEncodedLen for CurrentPath {
.saturating_add(
// NOTE: We know that these paths don't exceed the path length.
InnerDigest::max_encoded_len().saturating_mul(
manta_crypto::merkle_tree::path_length::<config::MerkleTreeConfiguration>(),
manta_crypto::merkle_tree::path_length::<config::MerkleTreeConfiguration, ()>(),
),
)
}
Expand Down
2 changes: 1 addition & 1 deletion primitives/manta/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ scale-info = { version = "2.1.2", default-features = false, features = ["derive"
smallvec = "1.8.0"

# manta-rs dependencies
manta-accounting = { git = "https://github.com/manta-network/manta-rs.git", tag = "v0.5.0", default-features = false }
manta-accounting = { git = "https://github.com/manta-network/manta-rs.git", tag = "v0.5.4", default-features = false }

# Substrate primitives
frame-benchmarking = { git = 'https://github.com/paritytech/substrate.git', branch = "polkadot-v0.9.22", default-features = false, optional = true }
Expand Down
2 changes: 1 addition & 1 deletion runtime/calamari/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ codec = { package = "parity-scale-codec", version = '3.1.2', default-features =
hex-literal = { version = '0.3.4', optional = true }
log = { version = "0.4.16", default-features = false }
scale-info = { version = "2.1.2", default-features = false, features = ["derive"] }
serde = { version = '1.0.137', features = ['derive'], optional = true }
serde = { version = "1.0.140", features = ['derive'], optional = true }
smallvec = "1.8.0"

# Substrate primitives
Expand Down
2 changes: 1 addition & 1 deletion runtime/dolphin/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ codec = { package = "parity-scale-codec", version = '3.1.2', default-features =
hex-literal = { version = '0.3.4', optional = true }
log = { version = "0.4.16", default-features = false }
scale-info = { version = "2.1.2", default-features = false, features = ["derive"] }
serde = { version = '1.0.137', features = ['derive'], optional = true }
serde = { version = "1.0.140", features = ['derive'], optional = true }
smallvec = "1.8.0"

# Substrate primitives
Expand Down
2 changes: 1 addition & 1 deletion runtime/manta/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ version = '3.2.1'
codec = { package = "parity-scale-codec", version = '3.1.2', default-features = false, features = ["derive", "max-encoded-len"] }
hex-literal = { version = '0.3.4', optional = true }
scale-info = { version = "2.1.2", default-features = false, features = ["derive"] }
serde = { version = '1.0.137', features = ['derive'], optional = true }
serde = { version = "1.0.140", features = ['derive'], optional = true }
smallvec = "1.8.0"

# Substrate 4157 primitives
Expand Down
0