Created
September 23, 2019 18:08
-
-
Save huitseeker/f33444ce23d26524eab551a8d47d7bd4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
./src/chained_bft/event_processor_test.rs | |
nodes.push(Self::new( | |
playground, | |
executor.clone(), | |
signer.clone(), | |
proposer_author, | |
storage, | |
initial_data, | |
Arc::clone(&epoch_mgr), | |
)); | |
./src/chained_bft/event_processor_test.rs | |
new( | |
playground: &mut NetworkPlayground, | |
executor: TaskExecutor, | |
signer: ValidatorSigner, | |
proposer_author: Author, | |
storage: Arc<MockStorage<TestPayload>>, | |
initial_data: RecoveryData<TestPayload>, | |
epoch_mgr: Arc<EpochManager>, | |
) | |
./src/chained_bft/event_processor_test.rs | |
ProposalGenerator::new( | |
block_store.clone(), | |
Arc::new(MockTransactionManager::new()), | |
time_service.clone(), | |
1, | |
true, | |
); | |
./src/chained_bft/event_processor_test.rs | |
EventProcessor::new( | |
author, | |
Arc::clone(&block_store), | |
pacemaker, | |
proposer_election, | |
proposal_generator, | |
safety_rules, | |
Arc::new(MockStateComputer::new(commit_cb_sender)), | |
Arc::new(MockTransactionManager::new()), | |
network, | |
storage.clone(), | |
time_service, | |
true, | |
Arc::clone(&epoch_mgr), | |
); | |
./src/chained_bft/event_processor_test.rs | |
Self::new( | |
playground, | |
executor, | |
self.signer, | |
self.proposer_author, | |
self.storage, | |
recover_data, | |
self.epoch_mgr, | |
) | |
./src/chained_bft/event_processor_test.rs | |
Block::make_block( | |
genesis.as_ref(), | |
vec![1], | |
1, | |
1, | |
genesis_qc.clone(), | |
node.block_store.signer(), | |
); | |
./src/chained_bft/event_processor_test.rs | |
Block::make_block( | |
genesis.as_ref(), | |
vec![1], | |
1, | |
1, | |
genesis_qc.clone(), | |
node.block_store.signer(), | |
); | |
./src/chained_bft/event_processor_test.rs | |
Block::make_block( | |
genesis.as_ref(), | |
vec![1], | |
1, | |
2, | |
genesis_qc.clone(), | |
node.block_store.signer(), | |
); | |
./src/chained_bft/event_processor_test.rs | |
Block::make_block( | |
genesis.as_ref(), | |
vec![1], | |
1, | |
1, | |
genesis_qc.clone(), | |
node.block_store.signer(), | |
); | |
./src/chained_bft/event_processor_test.rs | |
Block::make_block( | |
genesis.as_ref(), | |
vec![1], | |
2, | |
2, | |
genesis_qc.clone(), | |
node.block_store.signer(), | |
); | |
./src/chained_bft/event_processor_test.rs | |
placeholder_certificate_for_block( | |
vec![&static_proposer.signer, &non_proposer.signer], | |
block_0_id, | |
1, | |
block_0.quorum_cert().certified_block_id(), | |
block_0.quorum_cert().certified_block_round(), | |
block_0.quorum_cert().parent_block_id(), | |
block_0.quorum_cert().parent_block_round(), | |
); | |
./src/chained_bft/event_processor_test.rs | |
SyncInfo::new( | |
block_0_quorum_cert, | |
QuorumCert::certificate_for_genesis(), | |
None, | |
), | |
PacemakerTimeout::new(2, &non_proposer.signer, None), | |
&non_proposer.signer, | |
)), | |
); | |
./src/chained_bft/event_processor_test.rs | |
Block::make_block( | |
genesis.as_ref(), | |
vec![1], | |
1, | |
1, | |
genesis_qc.clone(), | |
node.block_store.signer(), | |
); | |
./src/chained_bft/event_processor_test.rs | |
Block::make_block( | |
genesis.as_ref(), | |
vec![1], | |
1, | |
1, | |
genesis_qc.clone(), | |
incorrect_proposer.block_store.signer(), | |
); | |
./src/chained_bft/event_processor_test.rs | |
Block::make_block( | |
genesis.as_ref(), | |
vec![1], | |
1, | |
1, | |
genesis_qc.clone(), | |
node.block_store.signer(), | |
); | |
./src/chained_bft/event_processor_test.rs | |
Block::make_block( | |
genesis.as_ref(), | |
vec![1], | |
2, | |
2, | |
genesis_qc.clone(), | |
node.block_store.signer(), | |
); | |
./src/chained_bft/event_processor_test.rs | |
Block::make_block( | |
genesis.as_ref(), | |
vec![1], | |
1, | |
1, | |
genesis_qc.clone(), | |
node.block_store.signer(), | |
); | |
./src/chained_bft/test_utils/mod.rs | |
placeholder_certificate_for_block( | |
vec![self.block_store.signer()], | |
parent.id(), | |
parent.round(), | |
parent.quorum_cert().certified_block_id(), | |
parent.quorum_cert().certified_block_round(), | |
parent.quorum_cert().parent_block_id(), | |
parent.quorum_cert().parent_block_round(), | |
); | |
./src/chained_bft/test_utils/mod.rs | |
block_on(self.block_store.insert_block_with_qc(Block::make_block( | |
parent, | |
vec![self.payload_val], | |
round, | |
parent.timestamp_usecs() + 1, | |
parent_qc, | |
self.block_store.signer(), | |
))) | |
./src/chained_bft/test_utils/mod.rs | |
placeholder_certificate_for_block( | |
qc_signers, | |
block.parent_id(), | |
new_round, | |
block.quorum_cert().parent_block_id(), | |
block.quorum_cert().parent_block_round(), | |
block.quorum_cert().grandparent_block_id(), | |
block.quorum_cert().grandparent_block_round(), | |
) | |
./src/chained_bft/test_utils/mod.rs | |
Block::new_internal( | |
block.get_payload().clone(), | |
block.parent_id(), | |
block.round(), | |
block.height(), | |
block.timestamp_usecs(), | |
parent_qc, | |
block_signer, | |
); | |
./src/chained_bft/test_utils/mod.rs | |
LedgerInfo::new( | |
0, | |
HashValue::zero(), | |
HashValue::zero(), | |
HashValue::zero(), | |
0, | |
0, | |
None, | |
) | |
./src/chained_bft/test_utils/mod.rs | |
placeholder_certificate_for_block( | |
signers: Vec<&ValidatorSigner>, | |
certified_block_id: HashValue, | |
certified_block_round: u64, | |
certified_parent_block_id: HashValue, | |
certified_parent_block_round: u64, | |
certified_grandparent_block_id: HashValue, | |
certified_grandparent_block_round: u64, | |
) | |
./src/chained_bft/test_utils/mod.rs | |
VoteData::vote_digest( | |
certified_block_id, | |
certified_block_state.state_id, | |
certified_block_round, | |
certified_parent_block_id, | |
certified_parent_block_round, | |
certified_grandparent_block_id, | |
certified_grandparent_block_round, | |
); | |
./src/chained_bft/test_utils/mod.rs | |
VoteData::new( | |
certified_block_id, | |
certified_block_state.state_id, | |
certified_block_round, | |
certified_parent_block_id, | |
certified_parent_block_round, | |
certified_grandparent_block_id, | |
certified_grandparent_block_round, | |
), | |
LedgerInfoWithSignatures::new(ledger_info_placeholder, signatures), | |
) | |
./src/chained_bft/test_utils/mock_storage.rs | |
RecoveryData::new( | |
ConsensusState::default(), | |
vec![genesis], | |
vec![genesis_qc], | |
HashValue::random(), | |
htc, | |
) | |
./src/chained_bft/chained_bft_consensus_provider.rs | |
new( | |
node_config: &mut NodeConfig, | |
network_sender: ConsensusNetworkSender, | |
network_events: ConsensusNetworkEvents, | |
mempool_client: Arc<MempoolClient>, | |
executor: Arc<Executor<MoveVM>>, | |
synchronizer_client: Arc<StateSyncClient>, | |
) | |
./src/chained_bft/chained_bft_consensus_provider.rs | |
ChainedBftSMR::new( | |
initial_setup.author, | |
initial_setup.signer, | |
proposer, | |
network, | |
runtime, | |
config, | |
storage, | |
initial_data, | |
epoch_mgr, | |
); | |
./src/chained_bft/consensusdb/mod.rs | |
( | |
/* UNUSED CF = */ DEFAULT_CF_NAME, | |
ColumnFamilyOptions::default(), | |
), | |
(BLOCK_CF_NAME, ColumnFamilyOptions::default()), | |
(QC_CF_NAME, ColumnFamilyOptions::default()), | |
(SINGLE_ENTRY_CF_NAME, ColumnFamilyOptions::default()) | |
./src/chained_bft/proto_test.rs | |
VoteData::new( | |
HashValue::random(), | |
ExecutedState::state_for_genesis().state_id, | |
1, | |
HashValue::random(), | |
0, | |
HashValue::random(), | |
0, | |
), | |
signer.author(), | |
placeholder_ledger_info(), | |
&signer, | |
); | |
./src/chained_bft/block_storage/block_store_test.rs | |
LedgerInfo::new( | |
1, | |
HashValue::zero(), | |
HashValue::zero(), | |
HashValue::zero(), | |
0, | |
0, | |
None, | |
); | |
./src/chained_bft/block_storage/block_store_test.rs | |
VoteMsg::new( | |
vote_data.clone(), | |
signers[2].author(), | |
li1.clone(), | |
&signers[2], | |
), | |
qc_size, | |
) | |
./src/chained_bft/block_storage/block_store_test.rs | |
LedgerInfo::new( | |
1, | |
HashValue::zero(), | |
HashValue::zero(), | |
HashValue::zero(), | |
0, | |
0, | |
None, | |
); | |
./src/chained_bft/block_storage/block_store_test.rs | |
VoteMsg::new( | |
block0_vote_data.clone(), | |
signers[1].author(), | |
li0.clone(), | |
&signers[1], | |
), | |
qc_size, | |
) | |
./src/chained_bft/block_storage/block_store_test.rs | |
VoteMsg::new( | |
block1_vote_data.clone(), | |
signers[0].author(), | |
li1.clone(), | |
&signers[0], | |
), | |
qc_size, | |
) | |
./src/chained_bft/block_storage/block_store_test.rs | |
placeholder_certificate_for_block( | |
vec![block_tree.signer()], | |
HashValue::zero(), | |
a3.round() + 1, | |
HashValue::zero(), | |
a3.round(), | |
HashValue::zero(), | |
a3.round() - 1, | |
); | |
./src/chained_bft/block_storage/block_store_test.rs | |
placeholder_certificate_for_block( | |
vec![block_tree.signer()], | |
a3.id(), | |
a3.round(), | |
a2.id(), | |
a2.round(), | |
a1.id(), | |
a1.round(), | |
); | |
./src/chained_bft/block_storage/block_store_test.rs | |
placeholder_certificate_for_block( | |
vec![block_tree.signer()], | |
HashValue::zero(), | |
a3.round() + 3, | |
HashValue::zero(), | |
a3.round() + 2, | |
HashValue::zero(), | |
a3.round() + 1, | |
); | |
./src/chained_bft/block_storage/block_store_test.rs | |
placeholder_certificate_for_block( | |
vec![block_tree.signer()], | |
HashValue::zero(), | |
a3.round() + 2, | |
HashValue::zero(), | |
a3.round() + 1, | |
HashValue::zero(), | |
a3.round(), | |
); | |
./src/chained_bft/block_storage/block_store.rs | |
new( | |
storage: Arc<dyn PersistentStorage<T>>, | |
initial_data: RecoveryData<T>, | |
validator_signer: ValidatorSigner, | |
state_computer: Arc<dyn StateComputer<Payload = T>>, | |
enforce_increasing_timestamps: bool, | |
max_pruned_blocks_in_mem: usize, | |
) | |
./src/chained_bft/block_storage/block_store.rs | |
Self::build_block_tree( | |
root, | |
blocks, | |
quorum_certs, | |
Arc::clone(&state_computer), | |
max_pruned_blocks_in_mem, | |
) | |
./src/chained_bft/block_storage/block_store.rs | |
build_block_tree( | |
root: (Block<T>, QuorumCert, QuorumCert), | |
blocks: Vec<Block<T>>, | |
quorum_certs: Vec<QuorumCert>, | |
state_computer: Arc<dyn StateComputer<Payload = T>>, | |
max_pruned_blocks_in_mem: usize, | |
) | |
./src/chained_bft/block_storage/block_store.rs | |
Self::build_block_tree( | |
root, | |
blocks, | |
quorum_certs, | |
Arc::clone(&self.state_computer), | |
self.inner.read().unwrap().max_pruned_blocks_in_mem(), | |
) | |
./src/chained_bft/block_storage/block_store.rs | |
LedgerInfo::new( | |
0, | |
HashValue::zero(), | |
HashValue::zero(), | |
HashValue::zero(), | |
0, | |
0, | |
None, | |
) | |
./src/chained_bft/block_storage/block_store.rs | |
create_block( | |
&self, | |
parent: &Block<Self::Payload>, | |
payload: Self::Payload, | |
round: Round, | |
timestamp_usecs: u64, | |
) | |
./src/chained_bft/block_storage/block_store.rs | |
Block::make_block( | |
parent, | |
payload, | |
round, | |
timestamp_usecs, | |
quorum_cert, | |
&self.validator_signer, | |
) | |
./src/chained_bft/block_storage/block_tree.rs | |
VoteData::new( | |
block_id, | |
vote_msg.executed_state_id(), | |
vote_msg.block_round(), | |
vote_msg.parent_block_id(), | |
vote_msg.parent_block_round(), | |
vote_msg.grandparent_block_id(), | |
vote_msg.grandparent_block_round(), | |
), | |
li_with_sig.clone(), | |
); | |
./src/chained_bft/block_storage/mod.rs | |
create_block( | |
&self, | |
parent: &Block<Self::Payload>, | |
payload: Self::Payload, | |
round: Round, | |
timestamp_usecs: u64, | |
) | |
./src/chained_bft/chained_bft_smr_test.rs | |
start( | |
playground: &mut NetworkPlayground, | |
signer: ValidatorSigner, | |
epoch_mgr: Arc<EpochManager>, | |
proposer: Vec<Author>, | |
smr_id: usize, | |
storage: Arc<MockStorage<TestPayload>>, | |
initial_data: RecoveryData<TestPayload>, | |
proposer_type: ConsensusProposerType, | |
) | |
./src/chained_bft/chained_bft_smr_test.rs | |
ChainedBftSMR::new( | |
author, | |
signer.clone(), | |
proposer.clone(), | |
network, | |
runtime, | |
config, | |
storage.clone(), | |
initial_data, | |
Arc::clone(&epoch_mgr), | |
); | |
./src/chained_bft/chained_bft_smr_test.rs | |
Self::start( | |
playground, | |
self.signer, | |
self.epoch_mgr, | |
self.proposer, | |
self.smr_id + 10, | |
self.storage, | |
recover_data, | |
self.proposer_type, | |
) | |
./src/chained_bft/chained_bft_smr_test.rs | |
nodes.push(Self::start( | |
playground, | |
signers.remove(0), | |
Arc::clone(&epoch_mgr), | |
proposer.clone(), | |
smr_id, | |
storage, | |
initial_data, | |
proposer_type, | |
)); | |
./src/chained_bft/event_processor.rs | |
new( | |
author: Author, | |
block_store: Arc<BlockStore<T>>, | |
pacemaker: Pacemaker, | |
proposer_election: Box<dyn ProposerElection<T> + Send + Sync>, | |
proposal_generator: ProposalGenerator<T>, | |
safety_rules: SafetyRules, | |
state_computer: Arc<dyn StateComputer<Payload = T>>, | |
txn_manager: Arc<dyn TxnManager<Payload = T>>, | |
network: ConsensusNetworkImpl, | |
storage: Arc<dyn PersistentStorage<T>>, | |
time_service: Arc<dyn TimeService>, | |
enforce_increasing_timestamps: bool, | |
epoch_mgr: Arc<EpochManager>, | |
) | |
./src/chained_bft/event_processor.rs | |
debug!( | |
"Peer {} is at round {} with hqc round {}, sending it {}", | |
peer.short_str(), | |
remote_round, | |
remote_hqc_round, | |
sync_info, | |
); | |
./src/chained_bft/event_processor.rs | |
SyncInfo::new( | |
self.block_store.highest_quorum_cert().as_ref().clone(), | |
self.block_store.highest_ledger_info().as_ref().clone(), | |
self.pacemaker.highest_timeout_certificate(), | |
), | |
PacemakerTimeout::new(round, self.block_store.signer(), vote_msg_to_attach), | |
self.block_store.signer(), | |
)) | |
./src/chained_bft/event_processor.rs | |
VoteData::new( | |
proposal_id, | |
executed_state_id, | |
block.round(), | |
vote_info.parent_block_id(), | |
vote_info.parent_block_round(), | |
vote_info.grandparent_block_id(), | |
vote_info.grandparent_block_round(), | |
), | |
self.author, | |
ledger_info_placeholder, | |
self.block_store.signer(), | |
)) | |
./src/chained_bft/liveness/multi_proposer_test.rs | |
Block::make_block( | |
&genesis_block, | |
1, | |
1, | |
1, | |
QuorumCert::certificate_for_genesis(), | |
&signers[primary_idx], | |
); | |
./src/chained_bft/liveness/multi_proposer_test.rs | |
Block::make_block( | |
&genesis_block, | |
1, | |
1, | |
1, | |
QuorumCert::certificate_for_genesis(), | |
&signers[secondary_idx], | |
); | |
./src/chained_bft/liveness/proposal_generator.rs | |
new( | |
block_store: Arc<dyn BlockReader<Payload = T> + Send + Sync>, | |
txn_manager: Arc<dyn TxnManager<Payload = T>>, | |
time_service: Arc<dyn TimeService>, | |
max_block_size: u64, | |
enforce_increasing_timestamps: bool, | |
) | |
./src/chained_bft/liveness/proposal_generator.rs | |
Ok(block_store.create_block( | |
&hqc_block, | |
txns, | |
round, | |
block_timestamp.as_micros() as u64, | |
)), | |
Err(_) => Err(ProposalGenerationError::TxnRetrievalError) | |
./src/chained_bft/liveness/pacemaker.rs | |
new( | |
persistent_liveness_storage: Box<dyn PersistentLivenessStorage>, | |
time_interval: Box<dyn PacemakerTimeInterval>, | |
time_service: Arc<dyn TimeService>, | |
timeout_sender: channel::Sender<Round>, | |
highest_timeout_certificate: HighestTimeoutCertificates, | |
) | |
./src/chained_bft/liveness/rotating_proposer_test.rs | |
Block::make_block( | |
&genesis_block, | |
1, | |
1, | |
1, | |
quorum_cert.clone(), | |
&another_validator_signer, | |
); | |
./src/chained_bft/liveness/rotating_proposer_test.rs | |
Block::make_block( | |
&genesis_block, | |
2, | |
1, | |
2, | |
quorum_cert.clone(), | |
&chosen_validator_signer, | |
); | |
./src/chained_bft/liveness/rotating_proposer_test.rs | |
Block::make_block( | |
&genesis_block, | |
3, | |
2, | |
3, | |
quorum_cert.clone(), | |
&chosen_validator_signer, | |
); | |
./src/chained_bft/liveness/rotating_proposer_test.rs | |
Block::make_block( | |
&genesis_block, | |
1, | |
1, | |
1, | |
quorum_cert.clone(), | |
&chosen_validator_signer, | |
); | |
./src/chained_bft/liveness/rotating_proposer_test.rs | |
Block::make_block( | |
&genesis_block, | |
2, | |
1, | |
2, | |
quorum_cert.clone(), | |
&another_validator_signer, | |
); | |
./src/chained_bft/liveness/rotating_proposer_test.rs | |
Block::make_block( | |
&genesis_block, | |
3, | |
2, | |
3, | |
quorum_cert.clone(), | |
&chosen_validator_signer, | |
); | |
./src/chained_bft/liveness/rotating_proposer_test.rs | |
Block::make_block( | |
&genesis_block, | |
1, | |
1, | |
1, | |
quorum_cert.clone(), | |
&chosen_validator_signer, | |
); | |
./src/chained_bft/liveness/rotating_proposer_test.rs | |
Block::make_block( | |
&genesis_block, | |
2, | |
1, | |
2, | |
quorum_cert.clone(), | |
&another_validator_signer, | |
); | |
./src/chained_bft/liveness/rotating_proposer_test.rs | |
Block::make_block( | |
&genesis_block, | |
2, | |
2, | |
3, | |
quorum_cert.clone(), | |
&chosen_validator_signer, | |
); | |
./src/chained_bft/liveness/proposal_generator_test.rs | |
ProposalGenerator::new( | |
block_store.clone(), | |
Arc::new(MockTransactionManager::new()), | |
Arc::new(SimulatedTimeService::new()), | |
1, | |
true, | |
); | |
./src/chained_bft/liveness/proposal_generator_test.rs | |
ProposalGenerator::new( | |
block_store.clone(), | |
Arc::new(MockTransactionManager::new()), | |
Arc::new(SimulatedTimeService::new()), | |
1, | |
true, | |
); | |
./src/chained_bft/liveness/proposal_generator_test.rs | |
ProposalGenerator::new( | |
block_store.clone(), | |
Arc::new(MockTransactionManager::new()), | |
Arc::new(SimulatedTimeService::new()), | |
1, | |
true, | |
); | |
./src/chained_bft/network.rs | |
Payload>( | |
&mut self, | |
block_id: HashValue, | |
num_blocks: u64, | |
from: Author, | |
timeout: Duration, | |
) | |
./src/chained_bft/network_tests.rs | |
start_node_outbound_handler( | |
drop_config: Arc<RwLock<DropConfig>>, | |
src: Author, | |
mut network_reqs_rx: channel::Receiver<NetworkRequest>, | |
mut outbound_msgs_tx: mpsc::Sender<(Author, NetworkRequest)>, | |
node_consensus_txs: Arc<Mutex<HashMap<Author, channel::Sender<NetworkNotification>>>>, | |
) | |
./src/chained_bft/network_tests.rs | |
NetworkPlayground::start_node_outbound_handler( | |
Arc::clone(&self.drop_config), | |
author, | |
network_reqs_rx, | |
self.outbound_msgs_tx.clone(), | |
self.node_consensus_txs.clone(), | |
); | |
./src/chained_bft/network_tests.rs | |
VoteData::new( | |
HashValue::random(), | |
ExecutedState::state_for_genesis().state_id, | |
1, | |
HashValue::random(), | |
0, | |
HashValue::random(), | |
0, | |
), | |
peers[0], | |
placeholder_ledger_info(), | |
&signers[0], | |
); | |
./src/chained_bft/chained_bft_smr.rs | |
new( | |
author: Author, | |
signer: ValidatorSigner, | |
proposers: Vec<Author>, | |
network: ConsensusNetworkImpl, | |
runtime: Runtime, | |
config: ChainedBftSMRConfig, | |
storage: Arc<dyn PersistentStorage<T>>, | |
initial_data: RecoveryData<T>, | |
epoch_mgr: Arc<EpochManager>, | |
) | |
./src/chained_bft/chained_bft_smr.rs | |
create_pacemaker( | |
&self, | |
persistent_liveness_storage: Box<dyn PersistentLivenessStorage>, | |
time_service: Arc<dyn TimeService>, | |
timeout_sender: channel::Sender<Round>, | |
highest_timeout_certificate: HighestTimeoutCertificates, | |
) | |
./src/chained_bft/chained_bft_smr.rs | |
Pacemaker::new( | |
persistent_liveness_storage, | |
time_interval, | |
time_service, | |
timeout_sender, | |
highest_timeout_certificate, | |
) | |
./src/chained_bft/chained_bft_smr.rs | |
start_event_processing( | |
&mut self, | |
executor: TaskExecutor, | |
mut event_processor: EventProcessor<T>, | |
mut pacemaker_timeout_sender_rx: channel::Receiver<Round>, | |
mut network_receivers: NetworkReceivers<T>, | |
) | |
./src/chained_bft/chained_bft_smr.rs | |
Arc::new(block_on(BlockStore::new( | |
Arc::clone(&self.storage), | |
initial_data, | |
signer, | |
Arc::clone(&state_computer), | |
true, | |
self.config.max_pruned_blocks_in_mem, | |
))); | |
./src/chained_bft/chained_bft_smr.rs | |
ProposalGenerator::new( | |
block_store.clone(), | |
Arc::clone(&txn_manager), | |
time_service.clone(), | |
self.config.max_block_size, | |
true, | |
); | |
./src/chained_bft/chained_bft_smr.rs | |
EventProcessor::new( | |
self.author, | |
Arc::clone(&block_store), | |
pacemaker, | |
proposer_election, | |
proposal_generator, | |
safety_rules, | |
state_computer, | |
txn_manager, | |
self.network.clone(), | |
Arc::clone(&self.storage), | |
time_service.clone(), | |
true, | |
Arc::clone(&self.epoch_mgr), | |
); | |
./src/chained_bft/persistent_storage.rs | |
new( | |
state: ConsensusState, | |
mut blocks: Vec<Block<T>>, | |
mut quorum_certs: Vec<QuorumCert>, | |
root_from_storage: HashValue, | |
highest_timeout_certificates: HighestTimeoutCertificates, | |
) | |
./src/chained_bft/persistent_storage.rs | |
RecoveryData::new( | |
consensus_state, | |
blocks, | |
quorum_certs, | |
root_from_storage, | |
highest_timeout_certificates, | |
) | |
./src/chained_bft/event_processor_fuzzing.rs | |
ProposalGenerator::new( | |
block_store.clone(), | |
Arc::new(MockTransactionManager::new()), | |
time_service.clone(), | |
1, | |
true, | |
); | |
./src/chained_bft/event_processor_fuzzing.rs | |
EventProcessor::new( | |
signer.author(), | |
Arc::clone(&block_store), | |
pacemaker, | |
proposer_election, | |
proposal_generator, | |
safety_rules, | |
empty_state_computer, | |
Arc::new(MockTransactionManager::new()), | |
network, | |
storage.clone(), | |
time_service, | |
enforce_increasing_timestamps, | |
Arc::clone(&epoch_mgr), | |
) | |
./src/chained_bft/consensus_types/block.rs | |
LedgerInfo::new( | |
0, | |
state_id, | |
HashValue::zero(), | |
HashValue::zero(), | |
0, | |
0, | |
None, | |
), | |
HashMap::new(), | |
), | |
); | |
./src/chained_bft/consensus_types/block.rs | |
new_internal( | |
payload: T, | |
parent_id: HashValue, | |
round: Round, | |
height: Height, | |
timestamp_usecs: u64, | |
quorum_cert: QuorumCert, | |
validator_signer: &ValidatorSigner, | |
) | |
./src/chained_bft/consensus_types/block.rs | |
make_block( | |
parent_block: &Block<T>, | |
payload: T, | |
round: Round, | |
timestamp_usecs: u64, | |
quorum_cert: QuorumCert, | |
validator_signer: &ValidatorSigner, | |
) | |
./src/chained_bft/consensus_types/block_test.rs | |
make_block( | |
_ancestor_id: HashValue, | |
parent_id_strategy: impl Strategy<Value = HashValue>, | |
round_strategy: impl Strategy<Value = Round>, | |
height: Height, | |
signer_strategy: impl Strategy<Value = ValidatorSigner>, | |
parent_qc: QuorumCert, | |
) | |
./src/chained_bft/consensus_types/block_test.rs | |
( | |
parent_id in parent_id_strategy, | |
round in round_strategy, | |
payload in 0usize..10usize, | |
height in Just(height), | |
signer in signer_strategy, | |
parent_qc in Just(parent_qc) | |
./src/chained_bft/consensus_types/block_test.rs | |
Block::new_internal( | |
vec![payload], | |
parent_id, | |
round, | |
height, | |
get_current_timestamp().as_micros() as u64, | |
parent_qc, | |
&signer, | |
) | |
./src/chained_bft/consensus_types/block_test.rs | |
make_block( | |
ancestor_id, | |
HashValue::arbitrary(), | |
Round::arbitrary(), | |
123, | |
proptests::arb_signer(), | |
QuorumCert::certificate_for_genesis(), | |
) | |
./src/chained_bft/consensus_types/block_test.rs | |
placeholder_certificate_for_block( | |
vec![&signer], | |
nil_block.id(), | |
nil_block.round(), | |
nil_block.quorum_cert().certified_block_id(), | |
nil_block.quorum_cert().certified_block_round(), | |
nil_block.quorum_cert().parent_block_id(), | |
nil_block.quorum_cert().parent_block_round(), | |
); | |
./src/chained_bft/consensus_types/block_test.rs | |
Block::make_block( | |
&nil_block, | |
payload, | |
2, | |
get_current_timestamp().as_micros() as u64, | |
nil_block_qc.clone(), | |
&signer, | |
); | |
./src/chained_bft/consensus_types/block_test.rs | |
Block::make_block( | |
&genesis_block, | |
payload, | |
1, | |
get_current_timestamp().as_micros() as u64, | |
quorum_cert, | |
&signer, | |
); | |
./src/chained_bft/consensus_types/block_test.rs | |
Block::make_block( | |
&genesis_block, | |
payload, | |
1, | |
get_current_timestamp().as_micros() as u64, | |
genesis_qc.clone(), | |
&signer, | |
); | |
./src/chained_bft/consensus_types/block_test.rs | |
placeholder_certificate_for_block( | |
vec![&signer], | |
a1.id(), | |
a1.round(), | |
a1.quorum_cert().certified_block_id(), | |
a1.quorum_cert().certified_block_round(), | |
a1.quorum_cert().parent_block_id(), | |
a1.quorum_cert().parent_block_round(), | |
); | |
./src/chained_bft/consensus_types/block_test.rs | |
Block::make_block( | |
&a1, | |
payload, | |
2, | |
get_current_timestamp().as_micros() as u64, | |
genesis_qc.clone(), | |
&signer, | |
); | |
./src/chained_bft/consensus_types/block_test.rs | |
Block::make_block( | |
&a1, | |
payload, | |
2, | |
get_current_timestamp().as_micros() as u64, | |
a1_qc.clone(), | |
&signer, | |
); | |
./src/chained_bft/consensus_types/vote_data.rs | |
new( | |
block_id: HashValue, | |
executed_state_id: HashValue, | |
round: Round, | |
parent_block_id: HashValue, | |
parent_block_round: Round, | |
grandparent_block_id: HashValue, | |
grandparent_block_round: Round, | |
) | |
./src/chained_bft/consensus_types/vote_data.rs | |
Self::vote_digest( | |
self.block_id, | |
self.executed_state_id, | |
self.round, | |
self.parent_block_id, | |
self.parent_block_round, | |
self.grandparent_block_id, | |
self.grandparent_block_round, | |
) | |
./src/chained_bft/consensus_types/vote_data.rs | |
vote_digest( | |
block_id: HashValue, | |
executed_state_id: HashValue, | |
round: Round, | |
parent_block_id: HashValue, | |
parent_block_round: Round, | |
grandparent_block_id: HashValue, | |
grandparent_block_round: Round, | |
) | |
./src/chained_bft/consensus_types/sync_info.rs | |
write!( | |
f, | |
"SyncInfo[round: {}, HQC: {}, HLI: {}, HTC: {}]", | |
self.highest_round(), | |
self.highest_quorum_cert, | |
self.highest_ledger_info, | |
htc_repr, | |
) | |
./src/chained_bft/consensus_types/quorum_cert.rs | |
VoteData::vote_digest( | |
*GENESIS_BLOCK_ID, | |
*ACCUMULATOR_PLACEHOLDER_HASH, | |
0, | |
*GENESIS_BLOCK_ID, | |
0, | |
*GENESIS_BLOCK_ID, | |
0, | |
); | |
./src/chained_bft/consensus_types/quorum_cert.rs | |
LedgerInfo::new( | |
0, | |
*ACCUMULATOR_PLACEHOLDER_HASH, | |
genesis_digest, | |
*GENESIS_BLOCK_ID, | |
0, | |
0, | |
None, | |
); | |
./src/chained_bft/consensus_types/quorum_cert.rs | |
VoteData::new( | |
*GENESIS_BLOCK_ID, | |
*ACCUMULATOR_PLACEHOLDER_HASH, | |
0, | |
*GENESIS_BLOCK_ID, | |
0, | |
*GENESIS_BLOCK_ID, | |
0, | |
), | |
LedgerInfoWithSignatures::new(li, signatures), | |
) | |
./src/consensus_provider.rs | |
make_consensus_provider( | |
node_config: &mut NodeConfig, | |
network_sender: ConsensusNetworkSender, | |
network_receiver: ConsensusNetworkEvents, | |
executor: Arc<Executor<MoveVM>>, | |
state_sync_client: Arc<StateSyncClient>, | |
) | |
./src/consensus_provider.rs | |
Box::new(ChainedBftProvider::new( | |
node_config, | |
network_sender, | |
network_receiver, | |
create_mempool_client(node_config), | |
executor, | |
state_sync_client, | |
)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment