Skip to content

Commit

Permalink
[StateAccumulatorV2] Re-enable on testnet (#18443)
Browse files Browse the repository at this point in the history
## Description 

Same as #18444 but against the
release branch

## Test plan 

How did you test the new or updated feature?

---

## Release notes

Check each box that your changes affect. If none of the boxes relate to
your changes, release notes aren't required.

For each box you select, include information after the relevant heading
that describes the impact of your changes that a user might notice and
any actions they must take to implement updates.

- [ ] Protocol: 
- [ ] Nodes (Validators and Full nodes): 
- [ ] Indexer: 
- [ ] JSON-RPC: 
- [ ] GraphQL: 
- [ ] CLI: 
- [ ] Rust SDK:
  • Loading branch information
williampsmith committed Jun 27, 2024
1 parent 8ff8f2e commit 1428c71
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 @@ -61,7 +61,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, metrics))
} else {
StateAccumulator::V1(StateAccumulatorV1::new(store, metrics))
}

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

pub fn new_for_tests(
Expand Down

0 comments on commit 1428c71

Please sign in to comment.