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

downgrade jf #1383

Closed
wants to merge 1 commit into from
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
612 changes: 30 additions & 582 deletions Cargo.lock

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,9 @@ hotshot-utils = { path = "./utils" }
hotshot-task = { path = "./task", version = "0.1.0", default-features = false }
hotshot-task-impls = { path = "./task-impls", version = "0.1.0", default-features = false }
itertools = "0.10"
hotshot-primitives = { git = "ssh://[email protected]/EspressoSystems/hotshot-primitives.git", branch = 'update_jellyfish_0.4.0_pre.0' }
jf-primitives = { git = "https://github.com/EspressoSystems/jellyfish", rev = "36dceb6", features = [
"std",
# hotshot-primitives = { git = "ssh://[email protected]/EspressoSystems/hotshot-primitives.git", branch = 'update_jellyfish_0.4.0_pre.0' }
jf-primitives = { git = "https://github.com/EspressoSystems/jellyfish", tag = "0.1.2-patch.1", features = [
"std",
] }
libp2p-swarm-derive = { version = "=0.32.0" }
libp2p-networking = { path = "./libp2p-networking", version = "0.1.0", default-features = false }
Expand Down
4 changes: 2 additions & 2 deletions src/traits/election/static_committee.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use super::vrf::JfPubKey;
// use ark_bls12_381::Parameters as Param381;
use ark_bls12_381::Parameters as Param381;
use commit::{Commitment, Committable, RawCommitmentBuilder};
use espresso_systems_common::hotshot::tag;
use hotshot_types::{
Expand Down Expand Up @@ -32,7 +32,7 @@ pub struct GeneralStaticCommittee<T, LEAF: LeafType<NodeType = T>, PUBKEY: Signa
}

/// static committee using a vrf kp
pub type StaticCommittee<T, LEAF> = GeneralStaticCommittee<T, LEAF, JfPubKey<BLSSignatureScheme>>;
pub type StaticCommittee<T, LEAF> = GeneralStaticCommittee<T, LEAF, JfPubKey<BLSSignatureScheme<Param381>>>;

impl<T, LEAF: LeafType<NodeType = T>, PUBKEY: SignatureKey>
GeneralStaticCommittee<T, LEAF, PUBKEY>
Expand Down
4 changes: 2 additions & 2 deletions src/traits/election/vrf.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// // Needed to avoid the non-biding `let` warning.
// #![allow(clippy::let_underscore_untyped)]

// use ark_ed_on_bls12_381::EdwardsConfig as Param381;
use ark_ed_on_bls12_381::EdwardsConfig as Param381;
// use ark_bls12_381::Parameters as Param381;
// use ark_ec::bls12::Bls12Parameters;
use bincode::Options;
Expand Down Expand Up @@ -73,7 +73,7 @@ impl<VRF, VRFHASHER, VRFPARAMS> Clone for VRFStakeTable<VRF, VRFHASHER, VRFPARAM
}

/// concrete type for bls public key
pub type BlsPubKey = JfPubKey<BLSSignatureScheme>;
pub type BlsPubKey = JfPubKey<BLSSignatureScheme<Param381>>;

/// type wrapper for VRF's public key
#[derive(Deserialize, Serialize)]
Expand Down
4 changes: 2 additions & 2 deletions testing-macros/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ hotshot = { path = "../", default-features = false }
hotshot-consensus = { path = "../consensus", default-features = false }
hotshot-types = { path = "../types", default-features = false }
hotshot-testing = { path = "../testing", default-features = false }
hotshot-primitives = { git = "ssh://[email protected]/EspressoSystems/hotshot-primitives.git", branch = 'update_jellyfish_0.4.0_pre.0' }
jf-primitives = { git = "https://github.com/EspressoSystems/jellyfish", rev = "36dceb6", features = [
# hotshot-primitives = { git = "ssh://[email protected]/EspressoSystems/hotshot-primitives.git", branch = 'update_jellyfish_0.4.0_pre.0' }
jf-primitives = { git = "https://github.com/EspressoSystems/jellyfish", tag = "0.1.2-patch.1", features = [
"std",
] }
nll = { git = "https://github.com/EspressoSystems/nll.git" }
Expand Down
4 changes: 2 additions & 2 deletions testing/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ hotshot-types = { path = "../types", default-features = false }
hotshot-utils = { path = "../utils" }
hotshot-task = { path = "../task", version = "0.1.0", default-features = false }
hotshot-task-impls = { path = "../task-impls", version = "0.1.0", default-features = false }
hotshot-primitives = { git = "ssh://[email protected]/EspressoSystems/hotshot-primitives.git", branch = 'update_jellyfish_0.4.0_pre.0' }
jf-primitives = { git = "https://github.com/EspressoSystems/jellyfish", rev = "36dceb6", features = [
# hotshot-primitives = { git = "ssh://[email protected]/EspressoSystems/hotshot-primitives.git", branch = 'update_jellyfish_0.4.0_pre.0' }
jf-primitives = { git = "https://github.com/EspressoSystems/jellyfish", tag = "0.1.2-patch.1", features = [
"std",
] }
# nll = { git = "https://github.com/EspressoSystems/nll.git" }
Expand Down
4 changes: 3 additions & 1 deletion testing/src/test_runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ use hotshot::{
types::{Message, SystemContextHandle},
HotShotError, HotShotInitializer, HotShotType, SystemContext, ViewRunner,
};
use ark_bls12_381::Parameters as Param381;

use hotshot_types::{
certificate::QuorumCertificate,
traits::{
Expand Down Expand Up @@ -559,7 +561,7 @@ pub mod test {
type ConsensusType = SequencingConsensus;
type Time = ViewNumber;
type BlockType = SDemoBlock;
type SignatureKey = JfPubKey<BLSSignatureScheme>;
type SignatureKey = JfPubKey<BLSSignatureScheme<Param381>>;
type VoteTokenType = StaticVoteToken<Self::SignatureKey>;
type Transaction = SDemoTransaction;
type ElectionConfigType = StaticElectionConfig;
Expand Down
6 changes: 3 additions & 3 deletions testing/src/test_types.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::test_runner::TestRunner;
// use ark_bls12_381::Parameters as Param381;
use ark_bls12_381::Parameters as Param381;
// use blake3::Hasher;
use hotshot::{
demos::vdemo::{VDemoBlock, VDemoState, VDemoTransaction},
Expand Down Expand Up @@ -76,8 +76,8 @@ impl NodeType for StaticCommitteeTestTypes {
type ConsensusType = ValidatingConsensus;
type Time = ViewNumber;
type BlockType = VDemoBlock;
type SignatureKey = JfPubKey<BLSSignatureScheme>;
type VoteTokenType = StaticVoteToken<JfPubKey<BLSSignatureScheme>>;
type SignatureKey = JfPubKey<BLSSignatureScheme<Param381>>;
type VoteTokenType = StaticVoteToken<JfPubKey<BLSSignatureScheme<Param381>>>;
type Transaction = VDemoTransaction;
type ElectionConfigType = StaticElectionConfig;
type StateType = VDemoState;
Expand Down
9 changes: 5 additions & 4 deletions testing/tests/consensus_task.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use async_lock::Mutex;
use ark_bls12_381::Parameters as Param381;

use hotshot_testing::{
round::{Round, RoundCtx, RoundHook, RoundResult, RoundSafetyCheck, RoundSetup},
Expand All @@ -17,7 +18,7 @@ use hotshot::{
HotShotType, SystemContext,
};

use ark_bls12_381::Parameters as Param381;
// use ark_bls12_381::Parameters as Param381;
use async_compatibility_layer::art::async_spawn;
use hotshot::demos::sdemo::SDemoBlock;
use hotshot::demos::sdemo::SDemoState;
Expand Down Expand Up @@ -109,7 +110,7 @@ impl NodeType for SequencingTestTypes {
type ConsensusType = SequencingConsensus;
type Time = ViewNumber;
type BlockType = SDemoBlock;
type SignatureKey = JfPubKey<BLSSignatureScheme>;
type SignatureKey = JfPubKey<BLSSignatureScheme<Param381>>;
type VoteTokenType = StaticVoteToken<Self::SignatureKey>;
type Transaction = SDemoTransaction;
type ElectionConfigType = StaticElectionConfig;
Expand Down Expand Up @@ -199,7 +200,7 @@ async fn build_consensus_task<
TYPES: NodeType<
ConsensusType = SequencingConsensus,
ElectionConfigType = StaticElectionConfig,
SignatureKey = JfPubKey<BLSSignatureScheme>,
SignatureKey = JfPubKey<BLSSignatureScheme<Param381>>,
Time = ViewNumber,
>,
I: TestableNodeImplementation<
Expand Down Expand Up @@ -248,7 +249,7 @@ where
GeneralStaticCommittee<
SequencingTestTypes,
SequencingLeaf<SequencingTestTypes>,
JfPubKey<BLSSignatureScheme>,
JfPubKey<BLSSignatureScheme<Param381>>,
>: Membership<TYPES>,
{
let builder = TestBuilder::default_multiple_rounds();
Expand Down
4 changes: 2 additions & 2 deletions types/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ futures = "0.3.28"
hex_fmt = "0.3.0"
hotshot-utils = { path = "../utils" }
hotshot-task = { path = "../task", default-features = false }
hotshot-primitives = { git = "ssh://[email protected]/EspressoSystems/hotshot-primitives.git", branch = 'update_jellyfish_0.4.0_pre.0' }
jf-primitives = { git = "https://github.com/EspressoSystems/jellyfish", rev = "36dceb6", features = [
# hotshot-primitives = { git = "ssh://[email protected]/EspressoSystems/hotshot-primitives.git", branch = 'update_jellyfish_0.4.0_pre.0' }
jf-primitives = { git = "https://github.com/EspressoSystems/jellyfish", tag = "0.1.2-patch.1", features = [
"std",
] }
nll = { git = "https://github.com/EspressoSystems/nll.git" }
Expand Down
4 changes: 2 additions & 2 deletions web_server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ futures = "0.3.28"
libp2p-core = { version = "0.39.2", default-features = false }
hotshot-types = { path = "../types", default-features = false }
hotshot-utils = { path = "../utils"}
hotshot-primitives = { git = "ssh://[email protected]/EspressoSystems/hotshot-primitives.git", branch = 'update_jellyfish_0.4.0_pre.0' }
jf-primitives = { git = "https://github.com/EspressoSystems/jellyfish", rev = "36dceb6", features = [
# hotshot-primitives = { git = "ssh://[email protected]/EspressoSystems/hotshot-primitives.git", branch = 'update_jellyfish_0.4.0_pre.0' }
jf-primitives = { git = "https://github.com/EspressoSystems/jellyfish", tag = "0.1.2-patch.1", features = [
"std",
] }
tide-disco = { git = "https://github.com/EspressoSystems/tide-disco.git", tag = "v0.4.1" }
Expand Down
Loading