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

Ed/merge sig agg #1589

Merged
merged 88 commits into from
Aug 22, 2023
Merged
Show file tree
Hide file tree
Changes from 87 commits
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
7625472
with public hotshot_primitive
dailinsubjam Jun 13, 2023
134862c
change signature scheme from BLSSignatureScheme to BLSOverBN254CurveS…
dailinsubjam Jun 21, 2023
8b5f092
Added KeyPair and a new robust version of jf-primitives
dailinsubjam Jun 29, 2023
0d1abfd
fixing small bugs when running all tests
dailinsubjam Jun 30, 2023
0cd0244
Implement Commitment<T> for all the kinds of VoteData
dailinsubjam Jul 1, 2023
61b6180
replace .as_bytes() with .commit().as_ref()
dailinsubjam Jul 3, 2023
e25d08f
Change the type of [u8] to [u8, 32] so that sign() can take in generi…
dailinsubjam Jul 3, 2023
d3cae68
Change the input type from [u8] to generic array
dailinsubjam Jul 3, 2023
8418e33
add notes for message in static_committee.rs
dailinsubjam Jul 3, 2023
286b39b
Merge pull request #1326 from EspressoSystems/sishan/implement_commit…
dailinsubjam Jul 4, 2023
590a08e
make validate() directly return bool for short term
dailinsubjam Jul 10, 2023
f7727c7
Add entry with stake public key and stake_amount for QC Aseembling
dailinsubjam Jul 10, 2023
fb25b1a
assembling of QC signature aggregation added
dailinsubjam Jul 10, 2023
543e95f
notes for assembling
dailinsubjam Jul 10, 2023
deace86
assembling mostly done (besides few bitvec-bytes transfer)
dailinsubjam Jul 11, 2023
91a6eb1
Update validate() before doing append()
dailinsubjam Jul 12, 2023
094e299
Add bitvec serialization
shenkeyao Jul 12, 2023
26311b2
Merge pull request #1377 from EspressoSystems/keyao/try-bit-vec
dailinsubjam Jul 12, 2023
923a4fe
add QCParams to qc
dailinsubjam Jul 12, 2023
198c275
Merge branch 'sishan/signature_aggregation_with_hsp' of github.com:Es…
dailinsubjam Jul 12, 2023
57e09d6
Add sig serialization helper
shenkeyao Jul 12, 2023
9a24c5a
Merge pull request #1378 from EspressoSystems/keyao/try-bit-vec
dailinsubjam Jul 12, 2023
5328c05
Merge branch 'sishan/signature_aggregation_with_hsp' of github.com:Es…
dailinsubjam Jul 13, 2023
276fac2
solve conflicts
dailinsubjam Jul 13, 2023
a436c39
validation not work
dailinsubjam Jul 13, 2023
bd65ec7
Validation on aggregated signature works
dailinsubjam Jul 13, 2023
73b0810
last commit also include separating DA vote and Yes vote in QC
dailinsubjam Jul 13, 2023
ca06668
param_pp and bit_vector is global now, so that only one signature and…
dailinsubjam Jul 20, 2023
c3e48bb
clean up
dailinsubjam Jul 20, 2023
4c5eebd
clean up on cargo dependency
dailinsubjam Jul 20, 2023
08e907a
more clean up and renaming QCYesNoVote to AssembledSignature since it…
dailinsubjam Jul 20, 2023
4b52521
more clean up and comments updated
dailinsubjam Jul 20, 2023
344f9e6
more clean up and ready to merge into run view refactor
dailinsubjam Jul 20, 2023
5b125bd
comments refined
dailinsubjam Jul 20, 2023
ad951e4
delete dead code and deal with potential panic situation
dailinsubjam Jul 20, 2023
d416b3f
blank line after last line for cargo.toml
dailinsubjam Jul 20, 2023
b2ccb15
delete dead code
dailinsubjam Jul 20, 2023
b1e2e7e
change the dependency of hotshot-primitives and jellyfish to the newe…
dailinsubjam Jul 22, 2023
de5e948
pin to jellyfish's and hotshot-primitives' hotshot-compat branch rath…
dailinsubjam Jul 22, 2023
58f0068
Merge branch 'sishan/signature_aggregation_with_hsp' into run_view_re…
dailinsubjam Jul 25, 2023
343e34b
changes for merging
dailinsubjam Jul 25, 2023
c333f2d
fix examples
dailinsubjam Jul 25, 2023
fca5743
Merge pull request #1432 from EspressoSystems/sishan/run_view_refacto…
dailinsubjam Jul 25, 2023
592578d
fix committable and is_valid_view_sync_cert() for run view related co…
dailinsubjam Jul 25, 2023
612d423
revert changes for two comment-ed files in testing/tests
dailinsubjam Jul 26, 2023
2cfc7d3
blank lines
dailinsubjam Jul 26, 2023
a078472
Merge pull request #1429 from EspressoSystems/run_view_refactor_sig_agg
dailinsubjam Jul 26, 2023
6a82c67
traits are also implemented for BN254
dailinsubjam Aug 3, 2023
d6ef7dd
(real) traits are also implemented for BN254
dailinsubjam Aug 3, 2023
ed6c6a2
update all the place using ed25519 to bn254
dailinsubjam Aug 5, 2023
64ab775
totally get rid of ed25519 except for libp2p
dailinsubjam Aug 5, 2023
12411cc
Restore validate() and sign() for original ed25519 for parameterizing…
dailinsubjam Aug 5, 2023
16edc06
hotshot-compat update
dailinsubjam Aug 5, 2023
1933d4d
clean up some warnings
dailinsubjam Aug 5, 2023
7bc3d14
cleanup some todo
dailinsubjam Aug 7, 2023
759bdf2
dealing with unwrap() and serialization in sign()
dailinsubjam Aug 7, 2023
9c8fa77
Merge pull request #1482 from EspressoSystems/sishan/signature_scheme…
dailinsubjam Aug 7, 2023
9d7425b
substitude all JfPubKey<JfPubKey<BLSOverBN254CurveSignatureScheme> to…
dailinsubjam Aug 9, 2023
546d6c7
totally get rid of JfPubKey
dailinsubjam Aug 9, 2023
1928da4
remove key_pair in validate()
dailinsubjam Aug 9, 2023
69037e7
remove KeyPair in sign()
dailinsubjam Aug 10, 2023
d53171c
remove KeyPair in make_vote_token() and validate_vote_token()
dailinsubjam Aug 10, 2023
462c5fc
clean up
dailinsubjam Aug 10, 2023
dd58214
Added get_committee_in_vec() for membership so that it can position a…
dailinsubjam Aug 10, 2023
e1a2f84
remove redundant parameters for VoteMetaData
dailinsubjam Aug 10, 2023
6f98011
remove redundant parameters in vote
dailinsubjam Aug 10, 2023
53b3bdb
remove redundant key_pair and ver_key
dailinsubjam Aug 10, 2023
682f1a4
renaming nodes with stake value
dailinsubjam Aug 10, 2023
e1068bc
clean up warnings
dailinsubjam Aug 10, 2023
7ad4498
Merge pull request #1530 from EspressoSystems/sishan/discard_Signatur…
dailinsubjam Aug 11, 2023
eb5e667
a non-working version
dailinsubjam Aug 14, 2023
db61256
Remove centralized server code
elliedavidson Aug 14, 2023
5f5df22
minor update
elliedavidson Aug 14, 2023
b86a7ef
minor update
elliedavidson Aug 14, 2023
f347544
feat: fix serde errors
DieracDelta Aug 14, 2023
6d6e5de
Add assemble() and check() to SignatureKey and partially parameterize…
dailinsubjam Aug 14, 2023
7a6137a
remove the file ed25519 with trait SignatureKey
dailinsubjam Aug 14, 2023
9134ddc
remove get_committee_in_vec()
dailinsubjam Aug 15, 2023
6dd41f2
remove get_committee_in_vec()
dailinsubjam Aug 15, 2023
d2cbaa4
remove get_stake_table() which only get Vec<PUBKEY>
dailinsubjam Aug 15, 2023
0b701c1
Merge pull request #1551 from EspressoSystems/sishan/parameterizing_c…
dailinsubjam Aug 15, 2023
b00eb77
fix errors and warnings arised when merging
dailinsubjam Aug 15, 2023
0e05b95
fix todo
dailinsubjam Aug 15, 2023
9cfbc91
clean up and try
dailinsubjam Aug 21, 2023
c7dd3ce
remain some cleanup
dailinsubjam Aug 21, 2023
10c2b0a
Merge pull request #1587 from dailinsubjam/sishan/merge_sig_agg_to_ma…
elliedavidson Aug 21, 2023
821b47a
Fix lints
elliedavidson Aug 21, 2023
9a10b37
Address comments
elliedavidson Aug 21, 2023
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
178 changes: 99 additions & 79 deletions Cargo.lock

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,9 @@ tokio = { version = "1", optional = true, features = [
] }

tracing = "0.1.37"
ethereum-types = { version = "0.14.1", features = ["impl-serde"] }
bitvec = { version = "1.0.1", default-features = false, features = ["alloc", "atomic", "serde"] }
typenum = { version = "1.16.0" }

[dev-dependencies]
async-std = { version = "1.12.0", features = ["attributes"] }
Expand Down
6 changes: 5 additions & 1 deletion consensus/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,8 @@ tokio = { version = "1", optional = true, features = [
"tracing",
] }
tracing = "0.1.37"
time = "0.3.23"
time = "0.3.22" # 0.3.23
bitvec = { version = "1.0.1", default-features = false, features = ["alloc", "atomic", "serde"] }
hotshot-primitives = { git = "https://github.com/EspressoSystems/hotshot-primitives", branch = 'hotshot-compat'} # rev = "4aee90c" for 'hotshot-compat'
jf-primitives = { git = "https://github.com/EspressoSystems/jellyfish", branch = 'hotshot-compat'} # rev = "470a833" for branch = 'hotshot-compat'
blake3 = { version = "1.3.3", features = ["traits-preview"] }
2 changes: 0 additions & 2 deletions consensus/src/da_member.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,15 +120,13 @@ impl<
if view_leader_key != sender {
continue;
}

let block_commitment = p.data.deltas.commit();
if !view_leader_key
.validate(&p.signature, block_commitment.as_ref())
{
warn!(?p.signature, "Could not verify proposal.");
continue;
}

let vote_token = self.exchange.make_vote_token(self.cur_view);
match vote_token {
Err(e) => {
Expand Down
30 changes: 18 additions & 12 deletions consensus/src/sequencing_leader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ use async_compatibility_layer::{
async_primitives::subscribable_rwlock::{ReadView, SubscribableRwLock},
};
use async_lock::{Mutex, RwLock};
use bitvec::prelude::*;
use commit::Commitment;
use commit::Committable;
use either::Either;
use either::{Left, Right};
use hotshot_types::data::QuorumProposal;
use hotshot_types::message::Message;
use hotshot_types::traits::election::CommitteeExchangeType;
use hotshot_types::traits::election::ConsensusExchange;
Expand All @@ -22,8 +22,8 @@ use hotshot_types::traits::node_implementation::{
};
use hotshot_types::traits::state::State;
use hotshot_types::{
certificate::{DACertificate, QuorumCertificate, YesNoSignature},
data::{DAProposal, SequencingLeaf},
certificate::{AssembledSignature, DACertificate, QuorumCertificate},
data::{DAProposal, QuorumProposal, SequencingLeaf},
message::{
CommitteeConsensusMessage, ConsensusMessageType, GeneralConsensusMessage, InternalTrigger,
ProcessedCommitteeConsensusMessage, ProcessedGeneralConsensusMessage,
Expand Down Expand Up @@ -98,16 +98,22 @@ where
&self,
cur_view: TYPES::Time,
threshold: NonZeroU64,
total_nodes_num: usize,
block_commitment: Commitment<<TYPES as NodeType>::BlockType>,
) -> Option<DACertificate<TYPES>> {
let lock = self.vote_collection_chan.lock().await;
let mut accumulator = VoteAccumulator {
total_vote_outcomes: HashMap::new(),
da_vote_outcomes: HashMap::new(),
yes_vote_outcomes: HashMap::new(),
no_vote_outcomes: HashMap::new(),
viewsync_precommit_vote_outcomes: HashMap::new(),
viewsync_commit_vote_outcomes: HashMap::new(),
viewsync_finalize_vote_outcomes: HashMap::new(),
success_threshold: threshold,
failure_threshold: threshold,
sig_lists: Vec::new(),
signers: bitvec![0; total_nodes_num],
};

while let Ok(msg) = lock.recv().await {
Expand Down Expand Up @@ -157,9 +163,8 @@ where
}
Either::Right(qc) => {
match qc.clone().signatures {
YesNoSignature::Yes(map) => {
info!("Number of DA signatures in this QC: {}", map.len());
}
AssembledSignature::Yes(_signature) => {}
AssembledSignature::DA(_signature) => {}
_ => unimplemented!(),
};
return Some(qc);
Expand Down Expand Up @@ -297,6 +302,7 @@ where
.wait_for_votes(
self.cur_view,
self.committee_exchange.success_threshold(),
self.committee_exchange.total_nodes(),
block_commitment,
)
.await
Expand Down Expand Up @@ -385,7 +391,6 @@ where
dac: Some(self.cert),
proposer_id: leaf.proposer_id,
};

let message =
SequencingMessage::<TYPES, I>(Left(GeneralConsensusMessage::Proposal(Proposal {
data: proposal,
Expand Down Expand Up @@ -459,14 +464,18 @@ where
pub async fn run_view(self) -> QuorumCertificate<TYPES, SequencingLeaf<TYPES>> {
let mut qcs = HashSet::<QuorumCertificate<TYPES, SequencingLeaf<TYPES>>>::new();
qcs.insert(self.generic_qc.clone());

let mut accumulator = VoteAccumulator {
total_vote_outcomes: HashMap::new(),
da_vote_outcomes: HashMap::new(),
yes_vote_outcomes: HashMap::new(),
no_vote_outcomes: HashMap::new(),
viewsync_precommit_vote_outcomes: HashMap::new(),
viewsync_commit_vote_outcomes: HashMap::new(),
viewsync_finalize_vote_outcomes: HashMap::new(),
success_threshold: self.quorum_exchange.success_threshold(),
failure_threshold: self.quorum_exchange.failure_threshold(),
sig_lists: Vec::new(),
signers: bitvec![0; self.quorum_exchange.total_nodes()],
};

let lock = self.vote_collection_chan.lock().await;
Expand Down Expand Up @@ -501,10 +510,7 @@ where
}
Either::Right(qc) => {
match qc.clone().signatures {
YesNoSignature::Yes(map) => info!(
"Number of qurorum signatures in this QC: {}",
map.len()
),
AssembledSignature::Yes(_signature) => {}
_ => unimplemented!(),
};
return qc;
Expand Down
17 changes: 14 additions & 3 deletions examples/infra/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,22 @@ pub struct OrchestratorArgs {
/// Reads a network configuration from a given filepath
pub fn load_config_from_file<TYPES: NodeType>(
config_file: String,
) -> NetworkConfig<TYPES::SignatureKey, TYPES::ElectionConfigType> {
) -> NetworkConfig<
TYPES::SignatureKey,
<TYPES::SignatureKey as SignatureKey>::StakeTableEntry,
TYPES::ElectionConfigType,
> {
let config_file_as_string: String = fs::read_to_string(config_file.as_str())
.unwrap_or_else(|_| panic!("Could not read config file located at {config_file}"));
let config_toml: NetworkConfigFile =
toml::from_str::<NetworkConfigFile>(&config_file_as_string)
.expect("Unable to convert config file to TOML");

let mut config: NetworkConfig<TYPES::SignatureKey, TYPES::ElectionConfigType> =
config_toml.into();
let mut config: NetworkConfig<
TYPES::SignatureKey,
<TYPES::SignatureKey as SignatureKey>::StakeTableEntry,
TYPES::ElectionConfigType,
> = config_toml.into();

// Generate network's public keys
config.config.known_nodes = (0..config.config.total_nodes.get())
Expand All @@ -57,6 +64,10 @@ pub fn load_config_from_file<TYPES: NodeType>(
})
.collect();

config.config.known_nodes_with_stake = (0..config.config.total_nodes.get())
.map(|node_id| config.config.known_nodes[node_id].get_stake_table_entry(1u64))
.collect();

config
}

Expand Down
44 changes: 34 additions & 10 deletions examples/infra/modDA.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ use hotshot_types::{
// };
// use libp2p_identity::PeerId;
// use libp2p_networking::network::{MeshParams, NetworkNodeConfigBuilder, NetworkNodeType};
use rand::SeedableRng;
use std::fmt::Debug;
use std::net::Ipv4Addr;
use std::{
Expand Down Expand Up @@ -208,7 +207,11 @@ pub trait RunDA<
{
/// Initializes networking, returns self
async fn initialize_networking(
config: NetworkConfig<TYPES::SignatureKey, TYPES::ElectionConfigType>,
config: NetworkConfig<
TYPES::SignatureKey,
<TYPES::SignatureKey as SignatureKey>::StakeTableEntry,
TYPES::ElectionConfigType,
>,
) -> Self;

/// Initializes the genesis state and HotShot instance; does not start HotShot consensus
Expand All @@ -225,12 +228,12 @@ pub trait RunDA<

let config = self.get_config();

// Get KeyPair for certificate Aggregation
let (pk, sk) =
TYPES::SignatureKey::generated_from_seed_indexed(config.seed, config.node_index);
let ek = jf_primitives::aead::KeyPair::generate(&mut rand_chacha::ChaChaRng::from_seed(
config.seed,
));
let known_nodes = config.config.known_nodes.clone();
let known_nodes_with_stake = config.config.known_nodes_with_stake.clone();
let entry = pk.get_stake_table_entry(1u64);

let da_network = self.get_da_network();
let quorum_network = self.get_quorum_network();
Expand All @@ -252,6 +255,7 @@ pub trait RunDA<
);

let exchanges = NODE::Exchanges::create(
known_nodes_with_stake.clone(),
known_nodes.clone(),
(quorum_election_config, committee_election_config),
(
Expand All @@ -260,8 +264,8 @@ pub trait RunDA<
view_sync_network.clone(),
),
pk.clone(),
entry.clone(),
sk.clone(),
ek.clone(),
);

SystemContext::init(
Expand Down Expand Up @@ -424,7 +428,13 @@ pub trait RunDA<
fn get_view_sync_network(&self) -> VIEWSYNCNETWORK;

/// Returns the config for this run
fn get_config(&self) -> NetworkConfig<TYPES::SignatureKey, TYPES::ElectionConfigType>;
fn get_config(
&self,
) -> NetworkConfig<
TYPES::SignatureKey,
<TYPES::SignatureKey as SignatureKey>::StakeTableEntry,
TYPES::ElectionConfigType,
>;
}

// WEB SERVER
Expand Down Expand Up @@ -452,7 +462,11 @@ pub struct WebServerDARun<
I: NodeImplementation<TYPES>,
MEMBERSHIP: Membership<TYPES>,
> {
config: NetworkConfig<TYPES::SignatureKey, TYPES::ElectionConfigType>,
config: NetworkConfig<
TYPES::SignatureKey,
<TYPES::SignatureKey as SignatureKey>::StakeTableEntry,
TYPES::ElectionConfigType,
>,
quorum_network: StaticQuorumComm<TYPES, I, MEMBERSHIP>,
da_network: StaticDAComm<TYPES, I, MEMBERSHIP>,
view_sync_network: StaticViewSyncComm<TYPES, I, MEMBERSHIP>,
Expand Down Expand Up @@ -522,7 +536,11 @@ where
Self: Sync,
{
async fn initialize_networking(
config: NetworkConfig<TYPES::SignatureKey, TYPES::ElectionConfigType>,
config: NetworkConfig<
TYPES::SignatureKey,
<TYPES::SignatureKey as SignatureKey>::StakeTableEntry,
TYPES::ElectionConfigType,
>,
) -> WebServerDARun<TYPES, NODE, MEMBERSHIP> {
// Generate our own key
let (pub_key, _priv_key) =
Expand Down Expand Up @@ -615,7 +633,13 @@ where
self.view_sync_network.clone()
}

fn get_config(&self) -> NetworkConfig<TYPES::SignatureKey, TYPES::ElectionConfigType> {
fn get_config(
&self,
) -> NetworkConfig<
TYPES::SignatureKey,
<TYPES::SignatureKey as SignatureKey>::StakeTableEntry,
TYPES::ElectionConfigType,
> {
self.config.clone()
}
}
Expand Down
16 changes: 13 additions & 3 deletions orchestrator/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use async_compatibility_layer::art::async_sleep;
use clap::Parser;
use futures::{Future, FutureExt};

use hotshot_types::traits::node_implementation::NodeType;
use hotshot_types::traits::{node_implementation::NodeType, signature_key::SignatureKey};
use surf_disco::{error::ClientError, Client};

/// Holds the client connection to the orchestrator
Expand Down Expand Up @@ -60,14 +60,24 @@ impl OrchestratorClient {

/// Returns the run configuration from the orchestrator
/// Will block until the configuration is returned
#[allow(clippy::type_complexity)]

pub async fn get_config_from_orchestrator<TYPES: NodeType>(
&self,
node_index: u16,
) -> NetworkConfig<TYPES::SignatureKey, TYPES::ElectionConfigType> {
) -> NetworkConfig<
TYPES::SignatureKey,
<TYPES::SignatureKey as SignatureKey>::StakeTableEntry,
TYPES::ElectionConfigType,
> {
let f = |client: Client<ClientError>| {
async move {
let config: Result<
NetworkConfig<TYPES::SignatureKey, TYPES::ElectionConfigType>,
NetworkConfig<
TYPES::SignatureKey,
<TYPES::SignatureKey as SignatureKey>::StakeTableEntry,
TYPES::ElectionConfigType,
>,
ClientError,
> = client
.post(&format!("api/config/{node_index}"))
Expand Down
12 changes: 6 additions & 6 deletions orchestrator/src/config.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use hotshot_types::{ExecutionType, HotShotConfig};
use std::net::{Ipv4Addr, SocketAddr};
use std::{net::IpAddr, num::NonZeroUsize, time::Duration};

#[derive(serde::Serialize, serde::Deserialize, Clone, Debug)]
pub struct Libp2pConfig {
pub bootstrap_nodes: Vec<(SocketAddr, Vec<u8>)>,
Expand Down Expand Up @@ -53,7 +52,7 @@ pub struct WebServerConfig {
}

#[derive(serde::Serialize, serde::Deserialize, Clone, Debug)]
pub struct NetworkConfig<KEY, ELECTIONCONFIG> {
pub struct NetworkConfig<KEY, ENTRY, ELECTIONCONFIG> {
pub rounds: usize,
pub transactions_per_round: usize,
pub node_index: u64,
Expand All @@ -63,12 +62,12 @@ pub struct NetworkConfig<KEY, ELECTIONCONFIG> {
pub key_type_name: String,
pub election_config_type_name: String,
pub libp2p_config: Option<Libp2pConfig>,
pub config: HotShotConfig<KEY, ELECTIONCONFIG>,
pub config: HotShotConfig<KEY, ENTRY, ELECTIONCONFIG>,
pub web_server_config: Option<WebServerConfig>,
pub da_web_server_config: Option<WebServerConfig>,
}

impl<K, E> Default for NetworkConfig<K, E> {
impl<K, ENTRY, E> Default for NetworkConfig<K, ENTRY, E> {
fn default() -> Self {
Self {
rounds: default_rounds(),
Expand Down Expand Up @@ -115,7 +114,7 @@ fn default_web_server_config() -> Option<WebServerConfig> {
None
}

impl<K, E> From<NetworkConfigFile> for NetworkConfig<K, E> {
impl<K, ENTRY, E> From<NetworkConfigFile> for NetworkConfig<K, ENTRY, E> {
fn from(val: NetworkConfigFile) -> Self {
NetworkConfig {
rounds: val.rounds,
Expand Down Expand Up @@ -181,14 +180,15 @@ pub struct HotShotConfigFile {
pub propose_max_round_time: Duration,
}

impl<K, E> From<HotShotConfigFile> for HotShotConfig<K, E> {
impl<K, ENTRY, E> From<HotShotConfigFile> for HotShotConfig<K, ENTRY, E> {
fn from(val: HotShotConfigFile) -> Self {
HotShotConfig {
execution_type: ExecutionType::Continuous,
total_nodes: val.total_nodes,
max_transactions: val.max_transactions,
min_transactions: val.min_transactions,
known_nodes: Vec::new(),
known_nodes_with_stake: Vec::new(),
da_committee_size: val.committee_nodes,
next_view_timeout: val.next_view_timeout,
timeout_ratio: val.timeout_ratio,
Expand Down
Loading
Loading