Skip to content
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
1 change: 1 addition & 0 deletions crates/apollo_consensus_manager/src/consensus_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,7 @@ impl ConsensusManager {
outbound_proposal_sender: outbound_internal_sender,
vote_broadcast_client: votes_broadcast_channels.broadcast_topic_client.clone(),
config_manager_client: Some(Arc::clone(&config_manager_client)),
strk_to_usd_oracle: None,
},
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ use apollo_config::behavior_mode::BehaviorMode;
use apollo_config_manager_types::communication::SharedConfigManagerClient;
use apollo_consensus::types::{ConsensusContext, ConsensusError, ProposalCommitment, Round};
use apollo_consensus_orchestrator_config::config::ContextConfig;
use apollo_l1_gas_price_types::L1GasPriceProviderClient;
use apollo_l1_gas_price_types::{ExchangeRateOracleClientTrait, L1GasPriceProviderClient};
use apollo_network::network_manager::{BroadcastTopicClient, BroadcastTopicClientTrait};
use apollo_protobuf::consensus::{
BuildParam,
Expand Down Expand Up @@ -250,6 +250,10 @@ pub struct SequencerConsensusContextDeps {
// Used to broadcast votes to other consensus nodes.
pub vote_broadcast_client: BroadcastTopicClient<Vote>,
pub config_manager_client: Option<SharedConfigManagerClient>,
/// STRK/USD oracle for SNIP-35 dynamic gas pricing. The underlying trait is generic; this
/// field's name labels the rate semantics. The instance must be configured with STRK/USD
/// URLs at construction time. None if disabled.
pub strk_to_usd_oracle: Option<Arc<dyn ExchangeRateOracleClientTrait>>,
Comment thread
sirandreww-starkware marked this conversation as resolved.
}

#[derive(thiserror::Error, PartialEq, Debug)]
Expand Down
4 changes: 4 additions & 0 deletions crates/apollo_consensus_orchestrator/src/test_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ pub(crate) struct TestDeps {
pub clock: Arc<dyn Clock>,
pub outbound_proposal_sender: mpsc::Sender<(HeightAndRound, mpsc::Receiver<ProposalPart>)>,
pub vote_broadcast_client: BroadcastTopicClient<Vote>,
pub strk_to_usd_oracle:
Option<Arc<dyn apollo_l1_gas_price_types::ExchangeRateOracleClientTrait>>,
}

impl From<TestDeps> for SequencerConsensusContextDeps {
Expand All @@ -141,6 +143,7 @@ impl From<TestDeps> for SequencerConsensusContextDeps {
outbound_proposal_sender: deps.outbound_proposal_sender,
vote_broadcast_client: deps.vote_broadcast_client,
config_manager_client: None,
strk_to_usd_oracle: deps.strk_to_usd_oracle,
}
}
}
Expand Down Expand Up @@ -367,6 +370,7 @@ pub(crate) fn create_test_and_network_deps() -> (TestDeps, NetworkDependencies)
clock,
outbound_proposal_sender,
vote_broadcast_client: votes_topic_client,
strk_to_usd_oracle: None,
};

let network_deps =
Expand Down
Loading