From 806edd2aee710207a1225ea35db8eba75d9e9fb0 Mon Sep 17 00:00:00 2001 From: ilitteri Date: Mon, 29 Jan 2024 21:54:03 -0300 Subject: [PATCH] Remove 'l1' from the endpoint's name --- core/lib/dal/src/blocks_dal.rs | 2 +- core/lib/web3_decl/src/namespaces/zks.rs | 4 ++-- .../src/api_server/web3/backend_jsonrpsee/namespaces/zks.rs | 4 ++-- core/lib/zksync_core/src/api_server/web3/namespaces/zks.rs | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/core/lib/dal/src/blocks_dal.rs b/core/lib/dal/src/blocks_dal.rs index 5a156c181f6e..4d7696372abb 100644 --- a/core/lib/dal/src/blocks_dal.rs +++ b/core/lib/dal/src/blocks_dal.rs @@ -2147,7 +2147,7 @@ impl BlocksDal<'_, '_> { .map(|row| row.virtual_blocks as u32)) } - pub async fn get_l1_batch_pubdata( + pub async fn get_batch_pubdata( &mut self, l1_batch_number: L1BatchNumber, ) -> anyhow::Result>> { diff --git a/core/lib/web3_decl/src/namespaces/zks.rs b/core/lib/web3_decl/src/namespaces/zks.rs index 92120c19834c..aa0df4049730 100644 --- a/core/lib/web3_decl/src/namespaces/zks.rs +++ b/core/lib/web3_decl/src/namespaces/zks.rs @@ -119,6 +119,6 @@ pub trait ZksNamespace { l1_batch_number: L1BatchNumber, ) -> RpcResult; - #[method(name = "getL1BatchPubdata")] - async fn get_l1_batch_pubdata(&self, l1_batch_number: L1BatchNumber) -> RpcResult>; + #[method(name = "getBatchPubdata")] + async fn get_batch_pubdata(&self, l1_batch_number: L1BatchNumber) -> RpcResult>; } diff --git a/core/lib/zksync_core/src/api_server/web3/backend_jsonrpsee/namespaces/zks.rs b/core/lib/zksync_core/src/api_server/web3/backend_jsonrpsee/namespaces/zks.rs index 5bf0c5a0c0a9..b131825d5411 100644 --- a/core/lib/zksync_core/src/api_server/web3/backend_jsonrpsee/namespaces/zks.rs +++ b/core/lib/zksync_core/src/api_server/web3/backend_jsonrpsee/namespaces/zks.rs @@ -169,8 +169,8 @@ impl ZksNamespaceServer for ZksNamespace { .map_err(into_jsrpc_error) } - async fn get_l1_batch_pubdata(&self, l1_batch_number: L1BatchNumber) -> RpcResult> { - self.get_l1_batch_pubdata_impl(l1_batch_number) + async fn get_batch_pubdata(&self, l1_batch_number: L1BatchNumber) -> RpcResult> { + self.get_batch_pubdata_impl(l1_batch_number) .await .map_err(into_jsrpc_error) } diff --git a/core/lib/zksync_core/src/api_server/web3/namespaces/zks.rs b/core/lib/zksync_core/src/api_server/web3/namespaces/zks.rs index 8be5edc799aa..a03d63b4819f 100644 --- a/core/lib/zksync_core/src/api_server/web3/namespaces/zks.rs +++ b/core/lib/zksync_core/src/api_server/web3/namespaces/zks.rs @@ -644,18 +644,18 @@ impl ZksNamespace { } #[tracing::instrument(skip(self))] - pub async fn get_l1_batch_pubdata_impl( + pub async fn get_batch_pubdata_impl( &self, l1_batch_number: L1BatchNumber, ) -> Result, Web3Error> { - const METHOD_NAME: &str = "get_l1_batch_pubdata"; + const METHOD_NAME: &str = "get_batch_pubdata"; let method_latency = API_METRICS.start_call(METHOD_NAME); self.state.start_info.ensure_not_pruned(l1_batch_number)?; let mut storage = self.access_storage(METHOD_NAME).await?; let pubdata = storage .blocks_dal() - .get_l1_batch_pubdata(l1_batch_number) + .get_batch_pubdata(l1_batch_number) .await .map_err(|_err| Web3Error::PubdataNotFound)? .unwrap_or_default();