Skip to content

Commit

Permalink
[StateAccumulatorV2] Re-enable on testnet as per epoch component
Browse files Browse the repository at this point in the history
  • Loading branch information
williampsmith committed Jun 27, 2024
1 parent 74616f0 commit ee119d7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
2 changes: 1 addition & 1 deletion crates/sui-core/src/authority/epoch_start_configuration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ impl EpochFlag {

/// For situations in which there is no config available (e.g. setting up a downloaded snapshot).
pub fn default_for_no_config() -> Vec<Self> {
Self::default_flags_impl(&Default::default(), false)
Self::default_flags_impl(&Default::default(), true)
}

fn default_flags_impl(
Expand Down
16 changes: 7 additions & 9 deletions crates/sui-core/src/state_accumulator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use itertools::Itertools;
use mysten_metrics::monitored_scope;
use prometheus::{register_int_gauge_with_registry, IntGauge, Registry};
use serde::Serialize;
use sui_protocol_config::ProtocolConfig;
use sui_protocol_config::{Chain, ProtocolConfig};
use sui_types::base_types::{ObjectID, ObjectRef, SequenceNumber, VersionNumber};
use sui_types::committee::EpochId;
use sui_types::digests::{ObjectDigest, TransactionDigest};
Expand Down Expand Up @@ -389,15 +389,13 @@ impl StateAccumulator {
epoch_store: &Arc<AuthorityPerEpochStore>,
metrics: Arc<StateAccumulatorMetrics>,
) -> Self {
if cfg!(msim) {
if epoch_store.state_accumulator_v2_enabled() {
return StateAccumulator::V2(StateAccumulatorV2::new(store, metrics));
} else {
return StateAccumulator::V1(StateAccumulatorV1::new(store, metrics));
}
if epoch_store.state_accumulator_v2_enabled()
&& epoch_store.get_chain_identifier().chain() != Chain::Mainnet
{
StateAccumulator::V2(StateAccumulatorV2::new(store))
} else {
StateAccumulator::V1(StateAccumulatorV1::new(store))
}

StateAccumulator::V1(StateAccumulatorV1::new(store, metrics))
}

pub fn new_for_tests(
Expand Down

0 comments on commit ee119d7

Please sign in to comment.