Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into tee/pab/error-handlin…
Browse files Browse the repository at this point in the history
…g-get-tee-proofs-api
  • Loading branch information
pbeza committed Nov 26, 2024
2 parents 7a534c8 + 440fe8d commit fad428c
Show file tree
Hide file tree
Showing 69 changed files with 1,669 additions and 259 deletions.
53 changes: 36 additions & 17 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 @@ -79,6 +79,7 @@ members = [
# Test infrastructure
"core/tests/loadnext",
"core/tests/vm-benchmark",
"core/lib/bin_metadata",
]
resolver = "2"

Expand Down Expand Up @@ -277,6 +278,7 @@ zksync_health_check = { version = "0.1.0", path = "core/lib/health_check" }
zksync_l1_contract_interface = { version = "0.1.0", path = "core/lib/l1_contract_interface" }
zksync_mempool = { version = "0.1.0", path = "core/lib/mempool" }
zksync_merkle_tree = { version = "0.1.0", path = "core/lib/merkle_tree" }
zksync_bin_metadata = { version = "0.1.0", path = "core/lib/bin_metadata" }
zksync_mini_merkle_tree = { version = "0.1.0", path = "core/lib/mini_merkle_tree" }
zksync_object_store = { version = "0.1.0", path = "core/lib/object_store" }
zksync_protobuf_config = { version = "0.1.0", path = "core/lib/protobuf_config" }
Expand Down
3 changes: 2 additions & 1 deletion core/bin/external_node/src/metrics/framework.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use zksync_node_framework::{
implementations::resources::pools::{MasterPool, PoolResource},
FromContext, IntoContext, StopReceiver, Task, TaskId, WiringError, WiringLayer,
};
use zksync_shared_metrics::rustc::RUST_METRICS;
use zksync_shared_metrics::{GIT_METRICS, RUST_METRICS};
use zksync_types::{L1ChainId, L2ChainId, SLChainId};

use super::EN_METRICS;
Expand Down Expand Up @@ -40,6 +40,7 @@ impl WiringLayer for ExternalNodeMetricsLayer {

async fn wire(self, input: Self::Input) -> Result<Self::Output, WiringError> {
RUST_METRICS.initialize();
GIT_METRICS.initialize();
EN_METRICS.observe_config(
self.l1_chain_id,
self.sl_chain_id,
Expand Down
8 changes: 4 additions & 4 deletions core/bin/external_node/src/node_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ use zksync_node_framework::{
NodeStorageInitializerLayer,
},
pools_layer::PoolsLayerBuilder,
postgres_metrics::PostgresMetricsLayer,
postgres::PostgresLayer,
prometheus_exporter::PrometheusExporterLayer,
pruning::PruningLayer,
query_eth_client::QueryEthClientLayer,
Expand Down Expand Up @@ -125,8 +125,8 @@ impl ExternalNodeBuilder {
Ok(self)
}

fn add_postgres_metrics_layer(mut self) -> anyhow::Result<Self> {
self.node.add_layer(PostgresMetricsLayer);
fn add_postgres_layer(mut self) -> anyhow::Result<Self> {
self.node.add_layer(PostgresLayer);
Ok(self)
}

Expand Down Expand Up @@ -582,7 +582,7 @@ impl ExternalNodeBuilder {
// so until we have a dedicated component for "auxiliary" tasks,
// it's responsible for things like metrics.
self = self
.add_postgres_metrics_layer()?
.add_postgres_layer()?
.add_external_node_metrics_layer()?;
// We assign the storage initialization to the core, as it's considered to be
// the "main" component.
Expand Down
10 changes: 4 additions & 6 deletions core/bin/zksync_server/src/node_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ use zksync_node_framework::{
object_store::ObjectStoreLayer,
pk_signing_eth_client::PKSigningEthClientLayer,
pools_layer::PoolsLayerBuilder,
postgres_metrics::PostgresMetricsLayer,
postgres::PostgresLayer,
prometheus_exporter::PrometheusExporterLayer,
proof_data_handler::ProofDataHandlerLayer,
query_eth_client::QueryEthClientLayer,
Expand Down Expand Up @@ -138,8 +138,8 @@ impl MainNodeBuilder {
Ok(self)
}

fn add_postgres_metrics_layer(mut self) -> anyhow::Result<Self> {
self.node.add_layer(PostgresMetricsLayer);
fn add_postgres_layer(mut self) -> anyhow::Result<Self> {
self.node.add_layer(PostgresLayer);
Ok(self)
}

Expand Down Expand Up @@ -760,9 +760,7 @@ impl MainNodeBuilder {
self = self.add_eth_tx_manager_layer()?;
}
Component::Housekeeper => {
self = self
.add_house_keeper_layer()?
.add_postgres_metrics_layer()?;
self = self.add_house_keeper_layer()?.add_postgres_layer()?;
}
Component::ProofDataHandler => {
self = self.add_proof_data_handler_layer()?;
Expand Down
18 changes: 18 additions & 0 deletions core/lib/bin_metadata/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[package]
name = "zksync_bin_metadata"
version.workspace = true
edition.workspace = true
authors.workspace = true
homepage.workspace = true
repository.workspace = true
license.workspace = true
keywords.workspace = true
categories.workspace = true

[dependencies]
serde.workspace = true
vise.workspace = true
tracing.workspace = true

[build-dependencies]
rustc_version.workspace = true
Loading

0 comments on commit fad428c

Please sign in to comment.