Skip to content

Skalman beefy generating bls aggregate #6

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

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
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
66 changes: 64 additions & 2 deletions Cargo.lock

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

5 changes: 5 additions & 0 deletions substrate/client/consensus/beefy/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ sp-crypto-hashing = { path = "../../../primitives/crypto/hashing" }
sp-keystore = { path = "../../../primitives/keystore" }
sp-runtime = { path = "../../../primitives/runtime" }
tokio = "1.37"
jsonrpc = "*"
reqwest = {version = "*" , features = ["blocking", "json"]}
serde = { workspace = true, default-features = true }
serde_json = "*"

[dev-dependencies]
serde = { workspace = true, default-features = true }
Expand All @@ -52,6 +56,7 @@ sp-keyring = { path = "../../../primitives/keyring" }
sp-mmr-primitives = { path = "../../../primitives/merkle-mountain-range" }
sp-tracing = { path = "../../../primitives/tracing" }
substrate-test-runtime-client = { path = "../../../test-utils/runtime/client" }
env_logger = "*"

[features]
# This feature adds BLS crypto primitives. It should not be used in production since
Expand Down
6 changes: 3 additions & 3 deletions substrate/client/consensus/beefy/src/aux_schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ pub(crate) mod tests {
use super::*;
use crate::tests::BeefyTestNet;
use sc_network_test::TestNetFactory;
use sp_consensus_beefy::ecdsa_crypto;
use sp_consensus_beefy::ecdsa_bls_crypto;

// also used in tests.rs
pub fn verify_persisted_version<B: BlockT, BE: Backend<B>>(backend: &BE) -> bool {
Expand All @@ -100,15 +100,15 @@ pub(crate) mod tests {
let backend = net.peer(0).client().as_backend();

// version not available in db -> None
assert_eq!(load_persistent::<_, _, ecdsa_crypto::AuthorityId>(&*backend).unwrap(), None);
assert_eq!(load_persistent::<_, _, ecdsa_bls_crypto::AuthorityId>(&*backend).unwrap(), None);

// populate version in db
write_current_version(&*backend).unwrap();
// verify correct version is retrieved
assert_eq!(load_decode(&*backend, VERSION_KEY).unwrap(), Some(CURRENT_VERSION));

// version is available in db but state isn't -> None
assert_eq!(load_persistent::<_, _, ecdsa_crypto::AuthorityId>(&*backend).unwrap(), None);
assert_eq!(load_persistent::<_, _, ecdsa_bls_crypto::AuthorityId>(&*backend).unwrap(), None);

// full `PersistedState` load is tested in `tests.rs`.
}
Expand Down
Loading