Skip to content
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

organize state machine #38

Merged
merged 2 commits into from
Oct 6, 2023
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
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
Loading