Skip to content

Commit b439449

Browse files
committed
update
1 parent 3378ceb commit b439449

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

consensus/src/epoch_manager.rs

+2
Original file line numberDiff line numberDiff line change
@@ -822,6 +822,7 @@ impl<P: OnChainConfigProvider> EpochManager<P> {
822822
epoch_state.clone(),
823823
safety_rules_container.clone(),
824824
payload_manager.clone(),
825+
&onchain_consensus_config,
825826
&onchain_execution_config,
826827
features,
827828
rand_config,
@@ -1191,6 +1192,7 @@ impl<P: OnChainConfigProvider> EpochManager<P> {
11911192
epoch_state.clone(),
11921193
commit_signer,
11931194
payload_manager.clone(),
1195+
&onchain_consensus_config,
11941196
&on_chain_execution_config,
11951197
features,
11961198
rand_config,

consensus/src/pipeline/execution_client.rs

+6-1
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ use futures::{
4747
use futures_channel::mpsc::unbounded;
4848
use move_core_types::account_address::AccountAddress;
4949
use std::sync::Arc;
50+
use aptos_types::on_chain_config::OnChainConsensusConfig;
5051

5152
#[async_trait::async_trait]
5253
pub trait TExecutionClient: Send + Sync {
@@ -56,6 +57,7 @@ pub trait TExecutionClient: Send + Sync {
5657
epoch_state: Arc<EpochState>,
5758
commit_signer_provider: Arc<dyn CommitSignerProvider>,
5859
payload_manager: Arc<PayloadManager>,
60+
onchain_consensus_config: &OnChainConsensusConfig,
5961
onchain_execution_config: &OnChainExecutionConfig,
6062
features: &Features,
6163
rand_config: Option<RandConfig>,
@@ -274,6 +276,7 @@ impl TExecutionClient for ExecutionProxyClient {
274276
epoch_state: Arc<EpochState>,
275277
commit_signer_provider: Arc<dyn CommitSignerProvider>,
276278
payload_manager: Arc<PayloadManager>,
279+
onchain_consensus_config: &OnChainConsensusConfig,
277280
onchain_execution_config: &OnChainExecutionConfig,
278281
features: &Features,
279282
rand_config: Option<RandConfig>,
@@ -290,13 +293,14 @@ impl TExecutionClient for ExecutionProxyClient {
290293
onchain_execution_config.block_executor_onchain_config();
291294
let transaction_deduper =
292295
create_transaction_deduper(onchain_execution_config.transaction_deduper_type());
296+
let randomness_enabled = onchain_consensus_config.is_vtxn_enabled() && features.is_enabled(FeatureFlag::RECONFIGURE_WITH_DKG);
293297
self.execution_proxy.new_epoch(
294298
&epoch_state,
295299
payload_manager,
296300
transaction_shuffler,
297301
block_executor_onchain_config,
298302
transaction_deduper,
299-
features.is_enabled(FeatureFlag::RECONFIGURE_WITH_DKG),
303+
randomness_enabled,
300304
);
301305

302306
maybe_rand_msg_tx
@@ -453,6 +457,7 @@ impl TExecutionClient for DummyExecutionClient {
453457
_epoch_state: Arc<EpochState>,
454458
_commit_signer_provider: Arc<dyn CommitSignerProvider>,
455459
_payload_manager: Arc<PayloadManager>,
460+
_onchain_consensus_config: &OnChainConsensusConfig,
456461
_onchain_execution_config: &OnChainExecutionConfig,
457462
_features: &Features,
458463
_rand_config: Option<RandConfig>,

consensus/src/test_utils/mock_execution_client.rs

+2
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ use futures::{channel::mpsc, SinkExt};
3131
use futures_channel::mpsc::UnboundedSender;
3232
use move_core_types::account_address::AccountAddress;
3333
use std::{collections::HashMap, sync::Arc};
34+
use aptos_types::on_chain_config::OnChainConsensusConfig;
3435

3536
pub struct MockExecutionClient {
3637
state_sync_client: mpsc::UnboundedSender<Vec<SignedTransaction>>,
@@ -94,6 +95,7 @@ impl TExecutionClient for MockExecutionClient {
9495
_epoch_state: Arc<EpochState>,
9596
_commit_signer_provider: Arc<dyn CommitSignerProvider>,
9697
_payload_manager: Arc<PayloadManager>,
98+
_onchain_consensus_config: &OnChainConsensusConfig,
9799
_onchain_execution_config: &OnChainExecutionConfig,
98100
_features: &Features,
99101
_rand_config: Option<RandConfig>,

0 commit comments

Comments
 (0)