Skip to content

Commit

Permalink
organize state machine (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
seunlanlege authored Oct 6, 2023
1 parent 49562e7 commit af4c4a2
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ members = [
"parachain/modules/ismp/sync-committee",

# modules
"parachain/modules/state-machine",
"parachain/modules/ismp/state-machine",
"parachain/modules/consensus/sync-committee/prover",
"parachain/modules/consensus/sync-committee/verifier",
"parachain/modules/consensus/sync-committee/primitives",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,12 @@ pub fn verify_aggregate_signature(
let subset_aggregate = subtract_points_from_aggregate(aggregate, non_participants)?;
let aggregate_key_point: G1AffinePoint = subset_aggregate.into();
let signature = bls::signature_to_point(signature).map_err(|e| anyhow!("{:?}", e))?;
let dst = DST_ETHEREUM.as_bytes().to_vec();

let q = bls::hash_to_point(&msg, &dst);
if !bls::signature_subgroup_check(signature) {
Err(anyhow!("Signature not in subgroup"))?
}

let q = bls::hash_to_point(&msg, &DST_ETHEREUM.as_bytes().to_vec());
let c1 = pairing(q, aggregate_key_point);

// From the spec:
Expand Down
2 changes: 1 addition & 1 deletion parachain/modules/ismp/parachain/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ parachain-system = { package = "cumulus-pallet-parachain-system", git = "https:/
cumulus-primitives-core = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false }

# local
substrate-state-machine = { path = "../../state-machine", default-features = false }
substrate-state-machine = { path = "../state-machine", default-features = false }

[features]
default = ["std"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ sp-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "rel

# polytope labs
ismp = { git = "https://github.com/polytope-labs/ismp-rs", branch = "main", default-features = false }
ismp-primitives = { path = "../ismp/primitives", default-features = false }
pallet-ismp = { path = "../ismp/core", default-features = false }
ismp-primitives = { path = "../primitives", default-features = false }
pallet-ismp = { path = "../core", default-features = false }

# crates.io
merkle-mountain-range = { package = "ckb-merkle-mountain-range", version = "0.5.2", default-features = false }
Expand Down
File renamed without changes.

0 comments on commit af4c4a2

Please sign in to comment.