Skip to content

Commit 8b5ec15

Browse files
committed
apollo_node_config: CR fixes
1 parent 3772cef commit 8b5ec15

2 files changed

Lines changed: 2 additions & 47 deletions

File tree

crates/apollo_node_config/src/config_test.rs

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -229,34 +229,3 @@ fn validation_only_with_tx_ingestion_disabled_succeeds() {
229229
};
230230
assert!(config.validate_node_config().is_ok());
231231
}
232-
233-
#[test]
234-
fn validation_only_with_state_only_state_sync_fails() {
235-
let config = SequencerNodeConfig {
236-
validation_only: true,
237-
components: ComponentConfig {
238-
gateway: ReactiveComponentExecutionConfig::disabled(),
239-
http_server: ActiveComponentExecutionConfig::disabled(),
240-
mempool: ReactiveComponentExecutionConfig::disabled(),
241-
mempool_p2p: ReactiveComponentExecutionConfig::disabled(),
242-
..Default::default()
243-
},
244-
gateway_config: None,
245-
http_server_config: None,
246-
mempool_config: None,
247-
mempool_p2p_config: None,
248-
state_sync_config: Some(StateSyncConfig {
249-
static_config: StateSyncStaticConfig {
250-
storage_config: StorageConfig {
251-
scope: StorageScope::StateOnly,
252-
..Default::default()
253-
},
254-
..Default::default()
255-
},
256-
..Default::default()
257-
}),
258-
..Default::default()
259-
};
260-
let err = config.validate_node_config().unwrap_err();
261-
assert!(format!("{err:?}").contains("FullArchive"), "Unexpected error: {err:?}");
262-
}

crates/apollo_node_config/src/node_config.rs

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ use apollo_reverts::RevertConfig;
3939
use apollo_sierra_compilation_config::config::SierraCompilationConfig;
4040
use apollo_staking_config::config::StakingManagerDynamicConfig;
4141
use apollo_state_sync_config::config::{StateSyncConfig, StateSyncDynamicConfig};
42-
use apollo_storage::StorageScope;
4342
use blockifier::blockifier::config::NativeClassesWhitelist;
4443
use blockifier::blockifier_versioned_constants::VersionedConstantsOverrides;
4544
use clap::Command;
@@ -604,21 +603,8 @@ impl SequencerNodeConfig {
604603
}
605604
other => other,
606605
})?;
607-
// TODO(Asaf): validation-only nodes should ideally use StorageScope::StateOnly to
608-
// save disk and write traffic, but the SNIP-35 fee_proposals bootstrap calls
609-
// state_sync.get_block(), which reads transaction_metadata - a table excluded from
610-
// StateOnly (see apollo_storage::StorageScope). Find a way to either (a) make
611-
// get_block work without transaction_metadata or (b) skip the bootstrap call on
612-
// validation-only nodes, then flip this back to requiring StateOnly.
613-
if let Some(state_sync_config) = &self.state_sync_config {
614-
if state_sync_config.static_config.storage_config.scope != StorageScope::FullArchive {
615-
return Err(ConfigError::ComponentConfigMismatch {
616-
component_config_mismatch: "state_sync storage scope must be FullArchive when \
617-
validation_only is true"
618-
.to_string(),
619-
});
620-
}
621-
}
606+
// TODO(Asaf): Revert PR 14122 and require StorageScope::StateOnly here once
607+
// state_sync.get_block() works without transaction_metadata (the orchestrator needs it).
622608
Ok(())
623609
}
624610
}

0 commit comments

Comments
 (0)