Skip to content

Commit 93d8c02

Browse files
juan518munozperekopskiybrunoffrancakelemenodutterbutter
authored
feat(eigen-client-m0): merge extra-features branch & remove unused vars (#371)
* feat(state-keeper): mempool io opens batch if there is protocol upgrade tx (matter-labs#3360) ## What ❔ Mempool io opens batch if there is protocol upgrade tx ## Why ❔ Currently if mempool is empty but there is protocol upgrade tx, then batch is not opened ## Checklist <!-- Check your PR fulfills the following items. --> <!-- For draft PRs check the boxes as you complete them. --> - [ ] PR title corresponds to the body of PR (we generate changelog entries from PRs). - [ ] Tests for the changes have been added / updated. - [ ] Documentation comments have been added / updated. - [ ] Code has been formatted via `zkstack dev fmt` and `zkstack dev lint`. * fix: Fixed cargo deny (matter-labs#3372) ## What ❔ Fixes cargo deny CI fail. * docs: interop docs update (matter-labs#3366) ## What ❔ <!-- What are the changes this PR brings about? --> <!-- Example: This PR adds a PR template to the repo. --> <!-- (For bigger PRs adding more context is appreciated) --> ## Why ❔ <!-- Why are these changes done? What goal do they contribute to? What are the principles behind them? --> <!-- Example: PR templates ensure PR reviewers, observers, and future iterators are in context about the evolution of repos. --> ## Checklist <!-- Check your PR fulfills the following items. --> <!-- For draft PRs check the boxes as you complete them. --> - [ ] PR title corresponds to the body of PR (we generate changelog entries from PRs). - [ ] Tests for the changes have been added / updated. - [ ] Documentation comments have been added / updated. - [ ] Code has been formatted via `zkstack dev fmt` and `zkstack dev lint`. * fix(tracer): adds vm error to flatCallTracer error field if exists (matter-labs#3374) ## What ❔ <!-- What are the changes this PR brings about? --> <!-- Example: This PR adds a PR template to the repo. --> <!-- (For bigger PRs adding more context is appreciated) --> - Updates `flatCallTracer` error to include vm error if it exists ## Why ❔ <!-- Why are these changes done? What goal do they contribute to? What are the principles behind them? --> <!-- Example: PR templates ensure PR reviewers, observers, and future iterators are in context about the evolution of repos. --> - MM has requested that if an error exists we should populate within `flatCallTracer` as this is what others do, prior to this PR it was only revert_reason introduced here: matter-labs#3306. However, if we have a vm error the error field is not populated as seen in this tx: `0x6c85bf34666dcdaa885f2bc6e95186029d2b25f2a3bbdff21c36878e2d4a19ed` which failed due to a vm panic. ## Checklist <!-- Check your PR fulfills the following items. --> <!-- For draft PRs check the boxes as you complete them. --> - [x] PR title corresponds to the body of PR (we generate changelog entries from PRs). - [ ] Tests for the changes have been added / updated. - [x] Documentation comments have been added / updated. - [x] Code has been formatted via `zkstack dev fmt` and `zkstack dev lint`. * chore(main): release core 25.3.0 (matter-labs#3313) :robot: I have created a release *beep* *boop* --- ## [25.3.0](matter-labs/zksync-era@core-v25.2.0...core-v25.3.0) (2024-12-11) ### Features * change seal criteria for gateway ([matter-labs#3320](matter-labs#3320)) ([a0a74aa](matter-labs@a0a74aa)) * **contract-verifier:** Download compilers from GH automatically ([matter-labs#3291](matter-labs#3291)) ([a10c4ba](matter-labs@a10c4ba)) * integrate gateway changes for some components ([matter-labs#3274](matter-labs#3274)) ([cbc91e3](matter-labs@cbc91e3)) * **proof-data-handler:** exclude batches without object file in GCS ([matter-labs#2980](matter-labs#2980)) ([3e309e0](matter-labs@3e309e0)) * **pruning:** Record L1 batch root hash in pruning logs ([matter-labs#3266](matter-labs#3266)) ([7b6e590](matter-labs@7b6e590)) * **state-keeper:** mempool io opens batch if there is protocol upgrade tx ([matter-labs#3360](matter-labs#3360)) ([f6422cd](matter-labs@f6422cd)) * **tee:** add error handling for unstable_getTeeProofs API endpoint ([matter-labs#3321](matter-labs#3321)) ([26f630c](matter-labs@26f630c)) * **zksync_cli:** Health checkpoint improvements ([matter-labs#3193](matter-labs#3193)) ([440fe8d](matter-labs@440fe8d)) ### Bug Fixes * **api:** batch fee input scaling for `debug_traceCall` ([matter-labs#3344](matter-labs#3344)) ([7ace594](matter-labs@7ace594)) * **tee:** correct previous fix for race condition in batch locking ([matter-labs#3358](matter-labs#3358)) ([b12da8d](matter-labs@b12da8d)) * **tee:** fix race condition in batch locking ([matter-labs#3342](matter-labs#3342)) ([a7dc0ed](matter-labs@a7dc0ed)) * **tracer:** adds vm error to flatCallTracer error field if exists ([matter-labs#3374](matter-labs#3374)) ([5d77727](matter-labs@5d77727)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: zksync-era-bot <[email protected]> * feat(eigen-client-extra-features): Fix PR comments (#369) * Add envy load * Readd proto reference * Rename blob id to request id * Make literals constants * Make point size constant * Get pool unique * Remaining comments * Fix comment * Add check for failed states * Change l1 name * Cargo lock conflicts * remove concurrent dispatcher leftovers * Solve comments (#372) * remove METRICS var * feat(eigen-client-extra-features): address PR comments (#375) * Change settlement layer for u32 * Change string to address * Remove unwraps * Remove error from name * Remove unused to bytes * Rename call for get blob data * Revert "Change string to address" This reverts commit 6dd94d4. * Change string for address * feat(eigen-client-extra-features): address PR comments (part 2) (#374) * initial commit * clippy suggestion * feat(eigen-client-extra-features): address PR comments (part 3) (#376) * use keccak256 fn * simplify get_context_block * use saturating sub * feat(eigen-client-extra-features): address PR comments (part 4) (#378) * Replace decode bytes for ethabi * Add default to eigenconfig * Change str to url * Add index to data availability table * Address comments * Change error to verificationerror * Format code * feat(eigen-client-extra-features): address PR comments (part 5) (#377) * use trait object * prevent blocking non async code * clippy suggestion --------- Co-authored-by: juan518munoz <[email protected]> --------- Co-authored-by: Gianbelinche <[email protected]> --------- Co-authored-by: Gianbelinche <[email protected]> * Format code --------- Co-authored-by: juan518munoz <[email protected]> --------- Co-authored-by: perekopskiy <[email protected]> Co-authored-by: Bruno França <[email protected]> Co-authored-by: kelemeno <[email protected]> Co-authored-by: Dustin Brickwood <[email protected]> Co-authored-by: zksync-era-bot <[email protected]> Co-authored-by: zksync-era-bot <[email protected]> Co-authored-by: Gianbelinche <[email protected]>
1 parent 2362226 commit 93d8c02

File tree

34 files changed

+398
-466
lines changed

34 files changed

+398
-466
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"core": "25.2.0",
2+
"core": "25.3.0",
33
"prover": "17.1.1",
44
"zkstack_cli": "0.1.2"
55
}

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

core/CHANGELOG.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,27 @@
11
# Changelog
22

3+
## [25.3.0](https://github.com/matter-labs/zksync-era/compare/core-v25.2.0...core-v25.3.0) (2024-12-11)
4+
5+
6+
### Features
7+
8+
* change seal criteria for gateway ([#3320](https://github.com/matter-labs/zksync-era/issues/3320)) ([a0a74aa](https://github.com/matter-labs/zksync-era/commit/a0a74aaeb42f076d20c4ae8a32925eff2de11d0c))
9+
* **contract-verifier:** Download compilers from GH automatically ([#3291](https://github.com/matter-labs/zksync-era/issues/3291)) ([a10c4ba](https://github.com/matter-labs/zksync-era/commit/a10c4baa312f26ebac2a10115fb7bd314d18b9c1))
10+
* integrate gateway changes for some components ([#3274](https://github.com/matter-labs/zksync-era/issues/3274)) ([cbc91e3](https://github.com/matter-labs/zksync-era/commit/cbc91e35f84d04f2e4c8e81028596db009e478d1))
11+
* **proof-data-handler:** exclude batches without object file in GCS ([#2980](https://github.com/matter-labs/zksync-era/issues/2980)) ([3e309e0](https://github.com/matter-labs/zksync-era/commit/3e309e06b24649c74bfe120e8ca45247cb2b5628))
12+
* **pruning:** Record L1 batch root hash in pruning logs ([#3266](https://github.com/matter-labs/zksync-era/issues/3266)) ([7b6e590](https://github.com/matter-labs/zksync-era/commit/7b6e59083cf0cafeaef5dd4b2dd39257ff91316d))
13+
* **state-keeper:** mempool io opens batch if there is protocol upgrade tx ([#3360](https://github.com/matter-labs/zksync-era/issues/3360)) ([f6422cd](https://github.com/matter-labs/zksync-era/commit/f6422cd59dab2c105bb7c125c172f2621fe39464))
14+
* **tee:** add error handling for unstable_getTeeProofs API endpoint ([#3321](https://github.com/matter-labs/zksync-era/issues/3321)) ([26f630c](https://github.com/matter-labs/zksync-era/commit/26f630cb75958c711d67d13bc77ddbb1117156c3))
15+
* **zksync_cli:** Health checkpoint improvements ([#3193](https://github.com/matter-labs/zksync-era/issues/3193)) ([440fe8d](https://github.com/matter-labs/zksync-era/commit/440fe8d8afdf0fc2768692a1b40b0910873e2faf))
16+
17+
18+
### Bug Fixes
19+
20+
* **api:** batch fee input scaling for `debug_traceCall` ([#3344](https://github.com/matter-labs/zksync-era/issues/3344)) ([7ace594](https://github.com/matter-labs/zksync-era/commit/7ace594fb3140212bd94ffd6bffcac99805cf4b1))
21+
* **tee:** correct previous fix for race condition in batch locking ([#3358](https://github.com/matter-labs/zksync-era/issues/3358)) ([b12da8d](https://github.com/matter-labs/zksync-era/commit/b12da8d1fddc7870bf17d5e08312d20773815269))
22+
* **tee:** fix race condition in batch locking ([#3342](https://github.com/matter-labs/zksync-era/issues/3342)) ([a7dc0ed](https://github.com/matter-labs/zksync-era/commit/a7dc0ed5007f6b2f789f4c61cb3d137843151860))
23+
* **tracer:** adds vm error to flatCallTracer error field if exists ([#3374](https://github.com/matter-labs/zksync-era/issues/3374)) ([5d77727](https://github.com/matter-labs/zksync-era/commit/5d77727cd3ba5f4d84643fee1873f03656310b4d))
24+
325
## [25.2.0](https://github.com/matter-labs/zksync-era/compare/core-v25.1.0...core-v25.2.0) (2024-11-19)
426

527

core/bin/external_node/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "zksync_external_node"
33
description = "Non-validator ZKsync node"
4-
version = "25.2.0" # x-release-please-version
4+
version = "25.3.0" # x-release-please-version
55
edition.workspace = true
66
authors.workspace = true
77
homepage.workspace = true

core/bin/zksync_server/src/node_builder.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -525,6 +525,7 @@ impl MainNodeBuilder {
525525
};
526526

527527
let secrets = try_load_config!(self.secrets.data_availability);
528+
let l1_secrets = try_load_config!(self.secrets.l1);
528529
match (da_client_config, secrets) {
529530
(DAClientConfig::Avail(config), DataAvailabilitySecrets::Avail(secret)) => {
530531
self.node.add_layer(AvailWiringLayer::new(config, secret));
@@ -535,7 +536,10 @@ impl MainNodeBuilder {
535536
.add_layer(CelestiaWiringLayer::new(config, secret));
536537
}
537538

538-
(DAClientConfig::Eigen(config), DataAvailabilitySecrets::Eigen(secret)) => {
539+
(DAClientConfig::Eigen(mut config), DataAvailabilitySecrets::Eigen(secret)) => {
540+
if config.eigenda_eth_rpc.is_none() {
541+
config.eigenda_eth_rpc = Some(l1_secrets.l1_rpc_url.expose_str().to_string());
542+
}
539543
self.node.add_layer(EigenWiringLayer::new(config, secret));
540544
}
541545

core/lib/config/src/configs/da_client/eigen.rs

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
use serde::Deserialize;
22
use zksync_basic_types::secrets::PrivateKey;
33
/// Configuration for the EigenDA remote disperser client.
4-
#[derive(Clone, Debug, PartialEq, Deserialize, Default)]
4+
#[derive(Clone, Debug, PartialEq, Deserialize)]
55
pub struct EigenConfig {
66
/// URL of the Disperser RPC server
77
pub disperser_rpc: String,
88
/// Block height needed to reach in order to consider the blob finalized
99
/// a value less or equal to 0 means that the disperser will not wait for finalization
10-
pub settlement_layer_confirmation_depth: i32,
10+
pub settlement_layer_confirmation_depth: u32,
1111
/// URL of the Ethereum RPC server
12-
pub eigenda_eth_rpc: String,
12+
pub eigenda_eth_rpc: Option<String>,
1313
/// Address of the service manager contract
1414
pub eigenda_svc_manager_address: String,
1515
/// Wait for the blob to be finalized before returning the response
@@ -24,6 +24,22 @@ pub struct EigenConfig {
2424
pub chain_id: u64,
2525
}
2626

27+
impl Default for EigenConfig {
28+
fn default() -> Self {
29+
Self {
30+
disperser_rpc: "https://disperser-holesky.eigenda.xyz:443".to_string(),
31+
settlement_layer_confirmation_depth: 0,
32+
eigenda_eth_rpc: Some("https://ethereum-holesky-rpc.publicnode.com".to_string()),
33+
eigenda_svc_manager_address: "0xD4A7E1Bd8015057293f0D0A557088c286942e84b".to_string(),
34+
wait_for_finalization: false,
35+
authenticated: false,
36+
g1_url: "https://github.com/Layr-Labs/eigenda-proxy/raw/2fd70b99ef5bf137d7bbca3461cf9e1f2c899451/resources/g1.point".to_string(),
37+
g2_url: "https://github.com/Layr-Labs/eigenda-proxy/raw/2fd70b99ef5bf137d7bbca3461cf9e1f2c899451/resources/g2.point.powerOf2".to_string(),
38+
chain_id: 19000,
39+
}
40+
}
41+
}
42+
2743
#[derive(Clone, Debug, PartialEq)]
2844
pub struct EigenSecrets {
2945
pub private_key: PrivateKey,

core/lib/config/src/configs/da_dispatcher.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ pub const DEFAULT_POLLING_INTERVAL_MS: u32 = 5000;
66
pub const DEFAULT_MAX_ROWS_TO_DISPATCH: u32 = 100;
77
pub const DEFAULT_MAX_RETRIES: u16 = 5;
88
pub const DEFAULT_USE_DUMMY_INCLUSION_DATA: bool = false;
9-
pub const DEFAULT_MAX_CONCURRENT_REQUESTS: u32 = 100;
109

1110
#[derive(Debug, Clone, PartialEq, Deserialize)]
1211
pub struct DADispatcherConfig {
@@ -20,8 +19,6 @@ pub struct DADispatcherConfig {
2019
// TODO: run a verification task to check if the L1 contract expects the inclusion proofs to
2120
// avoid the scenario where contracts expect real proofs, and server is using dummy proofs.
2221
pub use_dummy_inclusion_data: Option<bool>,
23-
/// The maximun number of concurrent request to send to the DA server.
24-
pub max_concurrent_requests: Option<u32>,
2522
}
2623

2724
impl DADispatcherConfig {
@@ -31,7 +28,6 @@ impl DADispatcherConfig {
3128
max_rows_to_dispatch: Some(DEFAULT_MAX_ROWS_TO_DISPATCH),
3229
max_retries: Some(DEFAULT_MAX_RETRIES),
3330
use_dummy_inclusion_data: Some(DEFAULT_USE_DUMMY_INCLUSION_DATA),
34-
max_concurrent_requests: Some(DEFAULT_MAX_CONCURRENT_REQUESTS),
3531
}
3632
}
3733

core/lib/config/src/testonly.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -972,7 +972,6 @@ impl Distribution<configs::da_dispatcher::DADispatcherConfig> for EncodeDist {
972972
max_rows_to_dispatch: self.sample(rng),
973973
max_retries: self.sample(rng),
974974
use_dummy_inclusion_data: self.sample(rng),
975-
max_concurrent_requests: self.sample(rng),
976975
}
977976
}
978977
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
CREATE INDEX idx_blob_id_l1_batch_number ON data_availability (blob_id, l1_batch_number);

core/lib/dal/src/data_availability_dal.rs

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -175,45 +175,6 @@ impl DataAvailabilityDal<'_, '_> {
175175
.map(DataAvailabilityBlob::from))
176176
}
177177

178-
pub async fn get_da_blob_ids_awaiting_inclusion(
179-
&mut self,
180-
) -> DalResult<Vec<Option<DataAvailabilityBlob>>> {
181-
let rows = sqlx::query!(
182-
r#"
183-
SELECT
184-
l1_batch_number,
185-
blob_id,
186-
inclusion_data,
187-
sent_at
188-
FROM
189-
data_availability
190-
WHERE
191-
inclusion_data IS NULL
192-
ORDER BY
193-
l1_batch_number
194-
"#,
195-
)
196-
.instrument("get_da_blobs_awaiting_inclusion")
197-
.fetch_all(self.storage)
198-
.await?;
199-
200-
Ok(rows
201-
.into_iter()
202-
.map(|row| {
203-
let l1_batch_number_u32 = row.l1_batch_number.try_into();
204-
if let Ok(l1_batch_number) = l1_batch_number_u32 {
205-
Some(DataAvailabilityBlob {
206-
l1_batch_number: L1BatchNumber(l1_batch_number),
207-
blob_id: row.blob_id,
208-
inclusion_data: row.inclusion_data,
209-
sent_at: row.sent_at.and_utc(),
210-
})
211-
} else {
212-
None
213-
}
214-
})
215-
.collect())
216-
}
217178
/// Fetches the pubdata and `l1_batch_number` for the L1 batches that are ready for DA dispatch.
218179
pub async fn get_ready_for_da_dispatch_l1_batches(
219180
&mut self,

0 commit comments

Comments
 (0)