Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
c416662
apollo_committer_types: update commit block fields (#10567)
yoavGrs Dec 4, 2025
e624493
starknet_os_flow_tests: migrate test_meta_tx (#9553)
dorimedini-starkware Dec 5, 2025
2f416e7
starknet_os_flow_tests: migrate test_declare_and_deploy_in_separate_b…
dorimedini-starkware Dec 5, 2025
c6e6621
starknet_os_flow_tests: migrate test_empty_multi_block (#9555)
dorimedini-starkware Dec 5, 2025
5e7eaa2
starknet_os_flow_tests: add coverage regression testing (#9556)
dorimedini-starkware Dec 5, 2025
cda9414
starknet_os_flow_tests: add all uncovered regression test (#9557)
dorimedini-starkware Dec 5, 2025
8926e6c
blockifier_test_utils: update block hash test execute mode (#10424)
dorimedini-starkware Dec 5, 2025
3a7d873
apollo_committer_types: add revert block types (#10575)
yoavGrs Dec 7, 2025
469c380
apollo_committer_types: add revert block variant (#10576)
yoavGrs Dec 7, 2025
0a3a126
deployment: using runner with more ram to solve oom killed (#10591)
idan-starkware Dec 7, 2025
3d73689
starknet_api: impl try_from BlockHeader for BlockHeaderCommitments (#…
rotem-starkware Dec 7, 2025
e66242b
blockifier_test_utils: add test_sha256_with_alternating_inner_calls t…
dorimedini-starkware Dec 7, 2025
bf900f8
starknet_committer: write FilledForest to storage with metadata (#10603)
yoavGrs Dec 8, 2025
3e3b453
deployment: limit docker compose parallel builds (#10602)
idan-starkware Dec 8, 2025
3a57aaa
apollo_batcher_types: add block_header_commitments to DecisionReached…
rotem-starkware Dec 8, 2025
e297108
apollo_committer_config: add crate (#10175)
yoavGrs Dec 8, 2025
af7a564
apollo_committer: add to hybrid deployment (#10503)
yoavGrs Dec 8, 2025
2d5e0ac
Merge remote-tracking branch 'origin/main-v0.14.1-committer' into yon…
Yoni-Starkware Dec 9, 2025
447354a
No conflicts in main-v0.14.1-committer -> main merge, this commit is …
Yoni-Starkware Dec 9, 2025
2df71c8
chore: fix committer_config version in cargo lock
Yoni-Starkware Dec 9, 2025
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
4 changes: 4 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,7 @@
crates/blockifier_test_utils/resources/feature_contracts/cairo0/compiled/*.json -diff
crates/blockifier_test_utils/resources/feature_contracts/cairo1/compiled/*.json -diff
crates/blockifier_test_utils/resources/feature_contracts/cairo1/sierra/*.json -diff

# Hint coverage of specific test cases do not require review - we use these artifacts to compute the
# list of all uncovered hints, which *should* be reviewed.
crates/starknet_os_flow_tests/resources/hint_coverage/*.json -diff
15 changes: 7 additions & 8 deletions .github/workflows/sequencer_docker-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,11 @@ name: Sequencer-Docker-Test

on:
workflow_dispatch:
push:

pull_request:
branches:
- main
- main-v[0-9].**
tags:
- v[0-9].**

pull_request:

env:
crate_triggers: "apollo_node,apollo_dashboard,apollo_integration_tests"
Expand Down Expand Up @@ -70,15 +67,17 @@ jobs:
SIMULATOR_RUN_FOREVER: false
FOLLOW_LOGS: false
SIMULATOR_TIMEOUT: 300
COMPOSE_PARALLEL_LIMIT: 2
COMPOSE_BAKE: false

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Run docker compose
run: ./deployments/monitoring/deploy_local_stack.sh up -d --build --yes
env:
COMPOSE_BAKE: true
run: |
echo "Docker compose version: $(docker compose version)"
./deployments/monitoring/deploy_local_stack.sh up -d --build --yes

# Getting the sequencer_simulator container id, then
# Invoking `docker wait $container_id`.
Expand Down
13 changes: 13 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ members = [
"crates/apollo_class_manager_config",
"crates/apollo_class_manager_types",
"crates/apollo_committer",
"crates/apollo_committer_config",
"crates/apollo_committer_types",
"crates/apollo_compilation_utils",
"crates/apollo_compile_to_casm",
Expand Down Expand Up @@ -131,6 +132,7 @@ apollo_class_manager.path = "crates/apollo_class_manager"
apollo_class_manager_config.path = "crates/apollo_class_manager_config"
apollo_class_manager_types.path = "crates/apollo_class_manager_types"
apollo_committer.path = "crates/apollo_committer"
apollo_committer_config.path = "crates/apollo_committer_config"
apollo_committer_types.path = "crates/apollo_committer_types"
apollo_compilation_utils = { path = "crates/apollo_compilation_utils", version = "0.0.0" }
apollo_compile_to_casm.path = "crates/apollo_compile_to_casm"
Expand Down
1 change: 1 addition & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const AllowedScopes = ['apollo_base_layer_tests',
'apollo_class_manager_config',
'apollo_class_manager_types',
'apollo_committer',
'apollo_committer_config',
'apollo_committer_types',
'apollo_compilation_utils',
'apollo_compile_to_casm',
Expand Down
2 changes: 2 additions & 0 deletions crates/apollo_batcher/src/batcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -637,6 +637,7 @@ impl Batcher {
.expect("Number of reverted transactions should fit in u64");
let partial_block_hash_components =
block_execution_artifacts.partial_block_hash_components().await;
let block_header_commitments = partial_block_hash_components.header_commitments.clone();
self.commit_proposal_and_block(
height,
state_diff.clone(),
Expand Down Expand Up @@ -676,6 +677,7 @@ impl Batcher {
compiled_class_hashes_for_migration: block_execution_artifacts
.compiled_class_hashes_for_migration,
},
block_header_commitments,
})
}

Expand Down
2 changes: 2 additions & 0 deletions crates/apollo_batcher_types/src/batcher_types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ use chrono::prelude::*;
use indexmap::IndexMap;
use serde::{Deserialize, Serialize};
use starknet_api::block::{BlockHashAndNumber, BlockHeader, BlockInfo, BlockNumber};
use starknet_api::block_hash::block_hash_calculator::BlockHeaderCommitments;
use starknet_api::consensus_transaction::InternalConsensusTransaction;
use starknet_api::core::StateDiffCommitment;
use starknet_api::execution_resources::GasAmount;
Expand Down Expand Up @@ -118,6 +119,7 @@ pub struct DecisionReachedResponse {
pub state_diff: ThinStateDiff,
pub l2_gas_used: GasAmount,
pub central_objects: CentralObjects,
pub block_header_commitments: BlockHeaderCommitments,
}

#[derive(Clone, Debug, Serialize, Deserialize, PartialEq)]
Expand Down
4 changes: 4 additions & 0 deletions crates/apollo_committer/src/communication.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ impl ComponentRequestHandler<CommitterRequest, CommitterResponse> for Committer
// TODO(Yoav): Call the committer.
unimplemented!()
}
CommitterRequest::RevertBlock(_) => {
// TODO(Yoav): Call the committer.
unimplemented!()
}
}
}
}
15 changes: 15 additions & 0 deletions crates/apollo_committer_config/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[package]
name = "apollo_committer_config"
version.workspace = true
edition.workspace = true
repository.workspace = true
license-file.workspace = true
description = "Configuration types for Apollo committer"

[dependencies]
apollo_config.workspace = true
serde = { workspace = true, features = ["derive"] }
validator.workspace = true

[lints]
workspace = true
23 changes: 23 additions & 0 deletions crates/apollo_committer_config/src/config.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
use std::collections::BTreeMap;

use apollo_config::dumping::{ser_param, SerializeConfig};
use apollo_config::{ParamPath, ParamPrivacyInput, SerializedParam};
use serde::{Deserialize, Serialize};
use validator::Validate;

#[derive(Clone, Debug, Default, Deserialize, Serialize, PartialEq, Validate)]
pub struct CommitterConfig {
// TODO(Yoav): Replace with real committer configuration parameters.
pub enable_committer: bool,
}

impl SerializeConfig for CommitterConfig {
fn dump(&self) -> BTreeMap<ParamPath, SerializedParam> {
BTreeMap::from_iter([ser_param(
"enable_committer",
&self.enable_committer,
"Placeholder configuration.",
ParamPrivacyInput::Public,
)])
}
}
1 change: 1 addition & 0 deletions crates/apollo_committer_config/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pub mod config;
21 changes: 18 additions & 3 deletions crates/apollo_committer_types/src/committer_types.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,29 @@
use serde::{Deserialize, Serialize};
use starknet_api::hash::StateRoots;
use starknet_api::block::BlockNumber;
use starknet_api::core::{GlobalRoot, StateDiffCommitment};
use starknet_committer::block_committer::input::StateDiff;

#[derive(Clone, Debug, Serialize, Deserialize)]
pub struct CommitBlockRequest {
state_diff: StateDiff,
prev_state_roots: StateRoots,
state_diff_commitment: StateDiffCommitment,
height: BlockNumber,
}

#[derive(Clone, Debug, Default, Serialize, Deserialize)]
pub struct CommitBlockResponse {
new_state_roots: StateRoots,
state_root: GlobalRoot,
}

#[derive(Clone, Debug, Serialize, Deserialize)]
pub struct RevertBlockRequest {
// A synthetic state diff that undoes the state diff of the given height.
reversed_state_diff: StateDiff,
height: BlockNumber,
}

#[derive(Clone, Debug, Serialize, Deserialize)]
pub enum RevertBlockResponse {
Uncommitted,
RevertedTo(GlobalRoot),
}
31 changes: 29 additions & 2 deletions crates/apollo_committer_types/src/communication.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,12 @@ use serde::{Deserialize, Serialize};
use strum::{EnumVariantNames, VariantNames};
use strum_macros::{AsRefStr, EnumDiscriminants, EnumIter, IntoStaticStr};

use crate::committer_types::{CommitBlockRequest, CommitBlockResponse};
use crate::committer_types::{
CommitBlockRequest,
CommitBlockResponse,
RevertBlockRequest,
RevertBlockResponse,
};
use crate::errors::{CommitterClientError, CommitterClientResult, CommitterResult};

pub type LocalCommitterClient = LocalComponentClient<CommitterRequest, CommitterResponse>;
Expand All @@ -25,11 +30,17 @@ pub type SharedCommitterClient = Arc<dyn CommitterClient>;
#[async_trait]
#[cfg_attr(any(feature = "testing", test), automock)]
pub trait CommitterClient: Send + Sync {
/// Applies the state diff on the state trees and computes the new state roots.
/// Applies the state diff on the state trees and computes the new state root.
async fn commit_block(
&self,
input: CommitBlockRequest,
) -> CommitterClientResult<CommitBlockResponse>;

/// Applies the reversed state diff on the state trees and computes the previous state root.
async fn revert_block(
&self,
input: RevertBlockRequest,
) -> CommitterClientResult<RevertBlockResponse>;
}

#[derive(Serialize, Deserialize, Clone, AsRefStr, EnumDiscriminants)]
Expand All @@ -40,6 +51,7 @@ pub trait CommitterClient: Send + Sync {
)]
pub enum CommitterRequest {
CommitBlock(CommitBlockRequest),
RevertBlock(RevertBlockRequest),
}

impl_debug_for_infra_requests_and_responses!(CommitterRequest);
Expand All @@ -49,6 +61,7 @@ impl PrioritizedRequest for CommitterRequest {}
#[derive(Clone, Serialize, Deserialize, AsRefStr)]
pub enum CommitterResponse {
CommitBlock(CommitterResult<CommitBlockResponse>),
RevertBlock(CommitterResult<RevertBlockResponse>),
}

impl_debug_for_infra_requests_and_responses!(CommitterResponse);
Expand Down Expand Up @@ -76,4 +89,18 @@ where
Direct
)
}

async fn revert_block(
&self,
input: RevertBlockRequest,
) -> CommitterClientResult<RevertBlockResponse> {
let request = CommitterRequest::RevertBlock(input);
handle_all_response_variants!(
CommitterResponse,
RevertBlock,
CommitterClientError,
CommitterError,
Direct
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ impl ConsensusContext for SequencerConsensusContext {

// TODO(dvir): return from the batcher's 'decision_reached' function the relevant data to
// build a blob.
let DecisionReachedResponse { state_diff, l2_gas_used, central_objects } =
let DecisionReachedResponse { state_diff, l2_gas_used, central_objects, .. } =
self.batcher_decision_reached(proposal_id).await;

// A hash map of (possibly failed) transactions, where the key is the transaction hash
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ use starknet_api::block::{
TEMP_ETH_BLOB_GAS_FEE_IN_WEI,
TEMP_ETH_GAS_FEE_IN_WEI,
};
use starknet_api::block_hash::block_hash_calculator::BlockHeaderCommitments;
use starknet_api::execution_resources::GasAmount;
use starknet_api::state::ThinStateDiff;
use starknet_api::versioned_constants_logic::VersionedConstantsTrait;
Expand Down Expand Up @@ -779,6 +780,7 @@ async fn oracle_fails_on_second_block(#[case] l1_oracle_failure: bool) {
state_diff: ThinStateDiff::default(),
l2_gas_used: GasAmount::default(),
central_objects: CentralObjects::default(),
block_header_commitments: BlockHeaderCommitments::default(),
})
});

Expand Down Expand Up @@ -978,6 +980,7 @@ async fn override_prices_behavior(
state_diff: ThinStateDiff::default(),
l2_gas_used: mock_l2_gas_used,
central_objects: CentralObjects::default(),
block_header_commitments: BlockHeaderCommitments::default(),
})
});

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"committer_config.enable_committer": true
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"committer_config.enable_committer": true
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,46 @@
{
"application_config_subdir": "crates/apollo_deployments/resources/",
"services": [
{
"name": "Committer",
"controller": "StatefulSet",
"config_paths": [
"app_configs/committer_config.json",
"app_configs/config_manager_config.json",
"app_configs/revert_config.json",
"app_configs/versioned_constants_overrides_config.json",
"app_configs/validate_resource_bounds_config.json",
"app_configs/monitoring_endpoint_config.json",
"deployments/mainnet/deployment_config_override.json",
"deployments/mainnet/hybrid_0.json",
"services/hybrid/committer.json"
],
"ingress": null,
"k8s_service_config": null,
"autoscale": false,
"replicas": 1,
"storage": 512,
"toleration": "apollo-general-service",
"resources": {
"requests": {
"cpu": 20,
"memory": 256
},
"limits": {
"cpu": 20,
"memory": 256
}
},
"external_secret": {
"gcsm_key": "apollo-mainnet-0"
},
"anti_affinity": true,
"update_strategy_type": "RollingUpdate",
"ports": {
"Committer": 55011,
"MonitoringEndpoint": 8082
}
},
{
"name": "Core",
"controller": "StatefulSet",
Expand Down
Loading
Loading