Skip to content

Commit 91eabf3

Browse files
Merge pull request #10652 from starkware-libs/yonatan/merge-main-v0.14.1-committer-into-main-1765273972
Merge main-v0.14.1-committer into main
2 parents 23c111c + f7eff34 commit 91eabf3

File tree

138 files changed

+38279
-11751
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

138 files changed

+38279
-11751
lines changed

.gitattributes

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,7 @@
22
crates/blockifier_test_utils/resources/feature_contracts/cairo0/compiled/*.json -diff
33
crates/blockifier_test_utils/resources/feature_contracts/cairo1/compiled/*.json -diff
44
crates/blockifier_test_utils/resources/feature_contracts/cairo1/sierra/*.json -diff
5+
6+
# Hint coverage of specific test cases do not require review - we use these artifacts to compute the
7+
# list of all uncovered hints, which *should* be reviewed.
8+
crates/starknet_os_flow_tests/resources/hint_coverage/*.json -diff

.github/workflows/sequencer_docker-test.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,11 @@ name: Sequencer-Docker-Test
22

33
on:
44
workflow_dispatch:
5-
push:
5+
6+
pull_request:
67
branches:
78
- main
89
- main-v[0-9].**
9-
tags:
10-
- v[0-9].**
11-
12-
pull_request:
1310

1411
env:
1512
crate_triggers: "apollo_node,apollo_dashboard,apollo_integration_tests"
@@ -70,15 +67,17 @@ jobs:
7067
SIMULATOR_RUN_FOREVER: false
7168
FOLLOW_LOGS: false
7269
SIMULATOR_TIMEOUT: 300
70+
COMPOSE_PARALLEL_LIMIT: 2
71+
COMPOSE_BAKE: false
7372

7473
steps:
7574
- name: Checkout repository
7675
uses: actions/checkout@v4
7776

7877
- name: Run docker compose
79-
run: ./deployments/monitoring/deploy_local_stack.sh up -d --build --yes
80-
env:
81-
COMPOSE_BAKE: true
78+
run: |
79+
echo "Docker compose version: $(docker compose version)"
80+
./deployments/monitoring/deploy_local_stack.sh up -d --build --yes
8281
8382
# Getting the sequencer_simulator container id, then
8483
# Invoking `docker wait $container_id`.

Cargo.lock

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ members = [
1414
"crates/apollo_class_manager_config",
1515
"crates/apollo_class_manager_types",
1616
"crates/apollo_committer",
17+
"crates/apollo_committer_config",
1718
"crates/apollo_committer_types",
1819
"crates/apollo_compilation_utils",
1920
"crates/apollo_compile_to_casm",
@@ -131,6 +132,7 @@ apollo_class_manager.path = "crates/apollo_class_manager"
131132
apollo_class_manager_config.path = "crates/apollo_class_manager_config"
132133
apollo_class_manager_types.path = "crates/apollo_class_manager_types"
133134
apollo_committer.path = "crates/apollo_committer"
135+
apollo_committer_config.path = "crates/apollo_committer_config"
134136
apollo_committer_types.path = "crates/apollo_committer_types"
135137
apollo_compilation_utils = { path = "crates/apollo_compilation_utils", version = "0.0.0" }
136138
apollo_compile_to_casm.path = "crates/apollo_compile_to_casm"

commitlint.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ const AllowedScopes = ['apollo_base_layer_tests',
88
'apollo_class_manager_config',
99
'apollo_class_manager_types',
1010
'apollo_committer',
11+
'apollo_committer_config',
1112
'apollo_committer_types',
1213
'apollo_compilation_utils',
1314
'apollo_compile_to_casm',

crates/apollo_batcher/src/batcher.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -637,6 +637,7 @@ impl Batcher {
637637
.expect("Number of reverted transactions should fit in u64");
638638
let partial_block_hash_components =
639639
block_execution_artifacts.partial_block_hash_components().await;
640+
let block_header_commitments = partial_block_hash_components.header_commitments.clone();
640641
self.commit_proposal_and_block(
641642
height,
642643
state_diff.clone(),
@@ -676,6 +677,7 @@ impl Batcher {
676677
compiled_class_hashes_for_migration: block_execution_artifacts
677678
.compiled_class_hashes_for_migration,
678679
},
680+
block_header_commitments,
679681
})
680682
}
681683

crates/apollo_batcher_types/src/batcher_types.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ use chrono::prelude::*;
88
use indexmap::IndexMap;
99
use serde::{Deserialize, Serialize};
1010
use starknet_api::block::{BlockHashAndNumber, BlockHeader, BlockInfo, BlockNumber};
11+
use starknet_api::block_hash::block_hash_calculator::BlockHeaderCommitments;
1112
use starknet_api::consensus_transaction::InternalConsensusTransaction;
1213
use starknet_api::core::StateDiffCommitment;
1314
use starknet_api::execution_resources::GasAmount;
@@ -118,6 +119,7 @@ pub struct DecisionReachedResponse {
118119
pub state_diff: ThinStateDiff,
119120
pub l2_gas_used: GasAmount,
120121
pub central_objects: CentralObjects,
122+
pub block_header_commitments: BlockHeaderCommitments,
121123
}
122124

123125
#[derive(Clone, Debug, Serialize, Deserialize, PartialEq)]

crates/apollo_committer/src/communication.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ impl ComponentRequestHandler<CommitterRequest, CommitterResponse> for Committer
1717
// TODO(Yoav): Call the committer.
1818
unimplemented!()
1919
}
20+
CommitterRequest::RevertBlock(_) => {
21+
// TODO(Yoav): Call the committer.
22+
unimplemented!()
23+
}
2024
}
2125
}
2226
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
[package]
2+
name = "apollo_committer_config"
3+
version.workspace = true
4+
edition.workspace = true
5+
repository.workspace = true
6+
license-file.workspace = true
7+
description = "Configuration types for Apollo committer"
8+
9+
[dependencies]
10+
apollo_config.workspace = true
11+
serde = { workspace = true, features = ["derive"] }
12+
validator.workspace = true
13+
14+
[lints]
15+
workspace = true
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
use std::collections::BTreeMap;
2+
3+
use apollo_config::dumping::{ser_param, SerializeConfig};
4+
use apollo_config::{ParamPath, ParamPrivacyInput, SerializedParam};
5+
use serde::{Deserialize, Serialize};
6+
use validator::Validate;
7+
8+
#[derive(Clone, Debug, Default, Deserialize, Serialize, PartialEq, Validate)]
9+
pub struct CommitterConfig {
10+
// TODO(Yoav): Replace with real committer configuration parameters.
11+
pub enable_committer: bool,
12+
}
13+
14+
impl SerializeConfig for CommitterConfig {
15+
fn dump(&self) -> BTreeMap<ParamPath, SerializedParam> {
16+
BTreeMap::from_iter([ser_param(
17+
"enable_committer",
18+
&self.enable_committer,
19+
"Placeholder configuration.",
20+
ParamPrivacyInput::Public,
21+
)])
22+
}
23+
}

0 commit comments

Comments
 (0)