Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(WIP): Native ERC20 #7

Open
wants to merge 60 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
ba526a6
Add flag to init command to use ERC20 as native token
IAvecilla Nov 29, 2023
54453f5
Add subcommand to get balance for custom ERC20
IAvecilla Nov 29, 2023
d4ba9af
Update contracts submodule
IAvecilla Nov 30, 2023
45ff70b
Fix native erc20 flag to deploy contract in L1
IAvecilla Nov 30, 2023
630978e
Update contracts submodule commit
ilitteri Dec 1, 2023
fb5ab83
Update contracts submodule for erc20 base token
IAvecilla Dec 1, 2023
969a2b1
Add command to get ERC20 balance in L1
IAvecilla Dec 4, 2023
cea520e
Update contracts submodule
IAvecilla Dec 4, 2023
5a6a790
Update commit of contracts submodule
IAvecilla Dec 6, 2023
ff44417
Update contracts submodule for erc20 deposit
IAvecilla Dec 7, 2023
6772d6b
Delete unnecesary command to get l2 erc20 balance
IAvecilla Dec 7, 2023
4f64da9
Update Mailbox from contracts submodule
IAvecilla Dec 7, 2023
fc1578b
Update contracts submodule
IAvecilla Dec 11, 2023
be4e7e6
Update contracts submodules
IAvecilla Dec 13, 2023
74e9ded
Adddebug log for initial deposit transactions
IAvecilla Dec 13, 2023
7f48e6d
Update requestL2Transaction calls with new parameter
IAvecilla Dec 13, 2023
46563fc
Comment out a bunch of initialization steps to more easily test deposits
jrchatruc Dec 14, 2023
fe36f91
Update contracts submodule
jrchatruc Dec 14, 2023
f62d3c6
Re-add if to generate localhost.json
fkrause98 Dec 14, 2023
03e8706
Format
fkrause98 Dec 14, 2023
1429793
compile always
juanbono Dec 15, 2023
05db28e
advance submodule commit
mFragaBA Dec 15, 2023
28644d7
Merge pull request #10 from lambdaclass/zk_compile_always
jrchatruc Dec 15, 2023
acdd910
feat: Re-add WETH deploy (#9)
SantiagoPittella Dec 15, 2023
495c2ec
Add CODEOWNERS
ilitteri Dec 15, 2023
1181aa3
feat: Uncomment steps (#12)
SantiagoPittella Dec 18, 2023
bd8c238
feat: Store native token in json (#18)
SantiagoPittella Dec 20, 2023
17e9e5a
More changes
jrchatruc Dec 21, 2023
fe9c291
Update submodule
jrchatruc Dec 21, 2023
c8cc2c5
Update submodule
jrchatruc Dec 22, 2023
56b0443
Deploy native ERC20 after all L1 contracts are deployed
jrchatruc Dec 22, 2023
18c12d1
add default native_erc20.json file
juanbono Dec 22, 2023
9501824
Updates
jrchatruc Dec 22, 2023
1f75030
Update submodule
jrchatruc Dec 22, 2023
2fe57d5
Updates
jrchatruc Dec 22, 2023
01cae80
update contracts submodule
juanbono Dec 22, 2023
a1932c7
feat: Add native ERC20 token address endpoint (#37)
juanbono Jan 17, 2024
605faac
handle eth case (#51)
juanbono Jan 17, 2024
eafbb3a
feat: Native erc20 withdrawal integration tests (#53)
jrchatruc Jan 18, 2024
515b5d6
Merge branch 'main' into native_erc20
jrchatruc Jan 18, 2024
93d6be1
Fixes
jrchatruc Jan 18, 2024
2691733
rmv hardcodes & improve zk down (#61)
juan518munoz Jan 19, 2024
3f9ca7a
Update verifier key hash
jrchatruc Jan 19, 2024
6c6fc76
Remove todo!
jrchatruc Jan 25, 2024
b199af5
Update submodule
jrchatruc Jan 25, 2024
dc87cad
Update submodule
jrchatruc Jan 25, 2024
2212e89
feat: set native token env var (#64)
juan518munoz Jan 25, 2024
a6bc12b
Merge branch 'merge-main' into native_erc20
jrchatruc Jan 25, 2024
4dc12d8
Merge branch 'main' into native_erc20
jrchatruc Jan 25, 2024
760d0b9
test: Native erc20 deposit integration tests (#52)
jrchatruc Feb 2, 2024
c02e0e4
feat: Native erc20 contract fixes (#68)
juan518munoz Feb 14, 2024
f1472d7
Add env variable to control whether tests are agains the native erc20…
jrchatruc Feb 14, 2024
e903462
Fix deposit test
jrchatruc Feb 15, 2024
580ef94
Changes to make tests work both in the eth and erc20 base token case
jrchatruc Feb 16, 2024
31e5289
Fix withdraw tests (#116)
fkrause98 Feb 16, 2024
a90b712
feat: rename native (base) token address endpoint and return 0x0..01 …
fkrause98 Feb 19, 2024
2c4aa0e
feat: avoid using env var for testing native erc20 (#150)
fkrause98 Feb 19, 2024
fd74137
renane test (#155)
juan518munoz Feb 19, 2024
f98d6df
Merge remote-tracking branch 'upstream/main' into native_erc20
jrchatruc Feb 23, 2024
b2fa6ce
Point test dependencies to our branch instead of a local path
jrchatruc Feb 23, 2024
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
3 changes: 3 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# These CODEOWNERS are used to automatically assign reviewers when a PR is created internally in the LambdaClass/zksync-era fork.
# Note: This should be removed before merging into the main branch of matter-labs/zksync-era.
* @mationorato @jrchatruc @ilitteri @juanbono @IAvecilla
1 change: 1 addition & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodejs 18.18.0
8 changes: 4 additions & 4 deletions bin/zk
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ check_yarn_version() {
# and it will be hard for them to see what went wrong.
check_subdirectory
check_yarn_version
if [ -z "$1" ]; then
cd $ZKSYNC_HOME
yarn install --frozen-lockfile && yarn zk build
else
cd $ZKSYNC_HOME
yarn && yarn zk build

if [ ! -z "$1" ]; then
# can't start this with yarn since it has quirks with `--` as an argument
node -- $ZKSYNC_HOME/infrastructure/zk/build/index.js "$@"
fi
2 changes: 1 addition & 1 deletion contracts
Submodule contracts updated 39 files
+2 −2 SystemConfig.json
+46 −17 l1-contracts/contracts/bridge/L1ERC20Bridge.sol
+21 −9 l1-contracts/contracts/bridge/L1WethBridge.sol
+2 −1 l1-contracts/contracts/bridge/interfaces/IL1Bridge.sol
+2 −1 l1-contracts/contracts/bridge/interfaces/IL1BridgeLegacy.sol
+3 −1 l1-contracts/contracts/bridge/libraries/BridgeInitializationHelper.sol
+0 −48 l1-contracts/contracts/upgrades/Upgrade_v1_4_1.sol
+4 −4 l1-contracts/contracts/zksync/Verifier.sol
+2 −1 l1-contracts/contracts/zksync/facets/Admin.sol
+56 −10 l1-contracts/contracts/zksync/facets/Mailbox.sol
+0 −4 l1-contracts/contracts/zksync/interfaces/IAdmin.sol
+1 −0 l1-contracts/contracts/zksync/interfaces/IMailbox.sol
+2 −0 l1-contracts/contracts/zksync/upgrade-initializers/DIamondUpgradeInit2.sol
+1 −0 l1-contracts/contracts/zksync/upgrade-initializers/DiamondUpgradeInit1.sol
+2 −0 l1-contracts/contracts/zksync/upgrade-initializers/DiamondUpgradeInit4.sol
+2 −0 l1-contracts/contracts/zksync/upgrade-initializers/DiamondUpgradeInit5.sol
+2 −0 l1-contracts/contracts/zksync/upgrade-initializers/DiamondUpgradeInit6.sol
+27 −0 l1-contracts/hardhat.config.ts
+38 −4 l1-contracts/scripts/deploy-erc20.ts
+1 −1 l1-contracts/scripts/deploy-weth-bridges.ts
+13 −2 l1-contracts/scripts/initialize-bridges.ts
+7 −0 l1-contracts/scripts/initialize-l2-weth-token.ts
+7 −1 l1-contracts/scripts/initialize-weth-bridges.ts
+1 −0 l1-contracts/test/foundry/unit/concrete/Executor/Executing.t.sol
+3 −1 l1-contracts/test/unit_tests/l1_erc20_bridge_test.spec.ts
+6 −2 l1-contracts/test/unit_tests/l1_weth_bridge_test.spec.ts
+1 −0 l1-contracts/test/unit_tests/mailbox_test.spec.ts
+1 −0 l1-contracts/test/unit_tests/utils.ts
+1 −1 l2-contracts/src/deployL2Weth.ts
+3 −2 l2-contracts/src/deployTestnetPaymaster.ts
+1 −0 l2-contracts/src/publish-bridge-preimages.ts
+2 −2 l2-contracts/src/upgradeBridgeImpl.ts
+7 −1 l2-contracts/src/utils.ts
+1 −72 system-contracts/test/Compressor.spec.ts
+529 −0 system-contracts/test/L1Messenger.spec.ts
+1 −0 system-contracts/test/shared/constants.ts
+4 −0 system-contracts/test/shared/mocks.ts
+76 −1 system-contracts/test/shared/utils.ts
+16 −16 tools/data/scheduler_key.json
3 changes: 3 additions & 0 deletions core/lib/dal/sqlx-data.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"db": "PostgreSQL"
}
6 changes: 6 additions & 0 deletions core/lib/web3_decl/src/namespaces/zks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ pub trait ZksNamespace {
#[method(name = "getMainContract")]
async fn get_main_contract(&self) -> RpcResult<Address>;

#[method(name = "getBaseTokenL1Address")]
async fn get_base_token_l1_address(&self) -> RpcResult<Address>;

#[method(name = "getTestnetPaymaster")]
async fn get_testnet_paymaster(&self) -> RpcResult<Option<Address>>;

Expand Down Expand Up @@ -118,4 +121,7 @@ pub trait ZksNamespace {
keys: Vec<H256>,
l1_batch_number: L1BatchNumber,
) -> RpcResult<Proof>;

#[method(name = "getConversionRate")]
async fn get_conversion_rate(&self) -> RpcResult<U64>;
}
2 changes: 1 addition & 1 deletion core/lib/zksync_core/src/api_server/tx_sender/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -900,7 +900,7 @@ impl TxSender {
.await,
protocol_version.into(),
);
Ok(base_fee)
Ok(base_fee * self.0.batch_fee_input_provider.get_erc20_conversion_rate())
}

fn ensure_tx_executable(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ impl ZksNamespaceServer for ZksNamespace {
Ok(self.get_main_contract_impl())
}

async fn get_base_token_l1_address(&self) -> RpcResult<Address> {
self.get_base_token_l1_address_impl()
.map_err(into_jsrpc_error)
}

async fn get_testnet_paymaster(&self) -> RpcResult<Option<Address>> {
Ok(self.get_testnet_paymaster_impl())
}
Expand Down Expand Up @@ -165,4 +170,10 @@ impl ZksNamespaceServer for ZksNamespace {
.await
.map_err(into_jsrpc_error)
}

async fn get_conversion_rate(&self) -> RpcResult<U64> {
self.get_conversion_rate_impl()
.await
.map_err(into_jsrpc_error)
}
}
50 changes: 47 additions & 3 deletions core/lib/zksync_core/src/api_server/web3/namespaces/zks.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use std::{collections::HashMap, convert::TryInto};
use std::{collections::HashMap, convert::TryInto, fs::File, io::BufReader, str::FromStr};

use zksync_dal::StorageProcessor;
use zksync_mini_merkle_tree::MiniMerkleTree;
Expand All @@ -16,8 +16,8 @@ use zksync_types::{
tokens::ETHEREUM_ADDRESS,
transaction_request::CallRequest,
utils::storage_key_for_standard_token_balance,
AccountTreeId, L1BatchNumber, MiniblockNumber, StorageKey, Transaction, L1_MESSENGER_ADDRESS,
L2_ETH_TOKEN_ADDRESS, REQUIRED_L1_TO_L2_GAS_PER_PUBDATA_BYTE, U256, U64,
AccountTreeId, L1BatchNumber, MiniblockNumber, StorageKey, Transaction, H160,
L1_MESSENGER_ADDRESS, L2_ETH_TOKEN_ADDRESS, REQUIRED_L1_TO_L2_GAS_PER_PUBDATA_BYTE, U256, U64,
};
use zksync_utils::{address_to_h256, h256_to_u256};
use zksync_web3_decl::{
Expand Down Expand Up @@ -133,6 +133,39 @@ impl ZksNamespace {
self.state.api_config.diamond_proxy_addr
}

/// Returns the address of the native token used in the network.
/// If the network does not have a native ERC20 token, it returns 0.
/// That means that ETH is the native token.
#[tracing::instrument(skip_all)]
pub fn get_base_token_l1_address_impl(&self) -> Result<Address, Web3Error> {
const METHOD_NAME: &str = "get_base_token_l1_address";
const NATIVE_ERC20_FILE_PATH: &str = "etc/tokens/native_erc20.json";

// read the address from the native_erc20.json file.
// in the future it should be read from .init.env file.
// If the file is not found, it assumes that ETH is the native token and returns 0.
let native_erc20_file = match File::open(NATIVE_ERC20_FILE_PATH) {
Ok(file) => file,
Err(_) => {
return Ok(
Address::from_str("0x0000000000000000000000000000000000000001")
.expect("Wrong base token literal address"),
)
}
};
let native_erc20_json: serde_json::Value =
serde_json::from_reader(BufReader::new(native_erc20_file)).map_err(|_err| {
internal_error(METHOD_NAME, "unable to read native_erc20.json file")
})?;

let native_erc20_address = native_erc20_json
.get("address")
.and_then(|addr| addr.as_str())
.ok_or_else(|| internal_error(METHOD_NAME, "address not found in json"))?;

H160::from_str(native_erc20_address).map_err(|err| internal_error(METHOD_NAME, err))
}

#[tracing::instrument(skip(self))]
pub fn get_testnet_paymaster_impl(&self) -> Option<Address> {
self.state.api_config.l2_testnet_paymaster_addr
Expand Down Expand Up @@ -632,4 +665,15 @@ impl ZksNamespace {
storage_proof,
})
}

#[tracing::instrument(skip_all)]
pub async fn get_conversion_rate_impl(&self) -> Result<U64, Web3Error> {
Ok(U64::from(
self.state
.tx_sender
.0
.batch_fee_input_provider
.get_erc20_conversion_rate(),
))
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ impl EventProcessor for PriorityOpsEventProcessor {
APP_METRICS.processed_l1_txs[&TxStage::added_to_mempool()].inc();
for new_op in new_ops {
let eth_block = new_op.eth_block();
tracing::debug!("Adding new priority op to db: {:?}", new_op);
storage
.transactions_dal()
.insert_transaction_l1(new_op, eth_block)
Expand Down
10 changes: 10 additions & 0 deletions core/lib/zksync_core/src/fee_model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ pub trait BatchFeeModelInputProvider: fmt::Debug + 'static + Send + Sync {

/// Returns the fee model parameters.
fn get_fee_model_params(&self) -> FeeParams;

fn get_erc20_conversion_rate(&self) -> u64;
}

/// The struct that represents the batch fee input provider to be used in the main node of the server, i.e.
Expand All @@ -71,6 +73,10 @@ impl BatchFeeModelInputProvider for MainNodeFeeInputProvider {
}),
}
}

fn get_erc20_conversion_rate(&self) -> u64 {
self.provider.get_erc20_conversion_rate()
}
}

impl MainNodeFeeInputProvider {
Expand Down Expand Up @@ -129,6 +135,10 @@ impl BatchFeeModelInputProvider for ApiFeeInputProvider {
fn get_fee_model_params(&self) -> FeeParams {
self.inner.get_fee_model_params()
}

fn get_erc20_conversion_rate(&self) -> u64 {
self.inner.get_erc20_conversion_rate()
}
}

/// Calculates the batch fee input based on the main node parameters.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
use serde::{Deserialize, Serialize};
use zksync_eth_client::Error;
#[derive(Deserialize, Serialize, Debug)]
struct EthValue {
eth: serde_json::value::Number,
}
#[derive(Deserialize, Serialize, Debug)]
struct Request {
dai: EthValue,
}
/// TODO: This is for an easy refactor to test things,
/// and have a POC.
/// Let's discuss where this should actually be.
async fn fetch_it() -> Result<String, Error> {
let url =
"https://api.coingecko.com/api/v3/simple/price?x_cg_demo_api_key=CG-FEgodj8AJN55Va4c6uKPUWLe&ids=dai&vs_currencies=eth";
let response = reqwest::get(url)
.await
.expect("Failed request for ERC-20")
.json::<Request>()
.await
.unwrap();
Ok(response.dai.eth.to_string())
}

fn erc20_value_from_eth_to_wei(value_in_eth: &str) -> Result<u64, String> {
let splitted_value: Vec<&str> = value_in_eth.split(".").collect();
let whole_part = u64::from_str_radix(
splitted_value
.first()
.ok_or("Expected decimal value separated by coma")?,
10,
)
.map_err(|_| "Expected decimal value separated by coma")?;
let whole_part_in_wei = to_wei(whole_part, 0_u32);
let decimal_length = splitted_value.last().unwrap().len() as u32;
let decimal_part = u64::from_str_radix(
splitted_value
.last()
.ok_or("Expected decimal value separated by coma")?,
10,
)
.map_err(|_| "Expected decimal value separated by coma")?;
let decimal_part_in_wei = to_wei(decimal_part, decimal_length);
Ok(whole_part_in_wei + decimal_part_in_wei)
}

pub fn to_wei(in_eth: u64, modifier: u32) -> u64 {
in_eth * 10_u64.pow(18_u32 - modifier)
}

pub async fn get_erc_20_value_in_wei() -> u64 {
// let erc_20_value_in_eth = fetch_it().await.unwrap();
// erc20_value_from_eth_to_wei(&erc_20_value_in_eth).unwrap()
11
}
23 changes: 20 additions & 3 deletions core/lib/zksync_core/src/l1_gas_price/gas_adjuster/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,18 @@

use std::{
collections::VecDeque,
sync::{Arc, RwLock},
sync::{atomic::AtomicU64, Arc, RwLock},
};

use tokio::sync::watch;
use zksync_config::GasAdjusterConfig;
use zksync_eth_client::{Error, EthInterface};
use zksync_system_constants::L1_GAS_PER_PUBDATA_BYTE;

use self::metrics::METRICS;
use self::{erc_20_fetcher::get_erc_20_value_in_wei, metrics::METRICS};
use super::L1TxParamsProvider;
use crate::state_keeper::metrics::KEEPER_METRICS;
pub mod erc_20_fetcher;

mod metrics;
#[cfg(test)]
Expand All @@ -25,6 +26,7 @@ pub struct GasAdjuster {
pub(super) statistics: GasStatistics,
pub(super) config: GasAdjusterConfig,
eth_client: Arc<dyn EthInterface>,
erc_20_value_in_wei: AtomicU64,
}

impl GasAdjuster {
Expand All @@ -47,6 +49,7 @@ impl GasAdjuster {
statistics: GasStatistics::new(config.max_base_fee_samples, current_block, &history),
eth_client,
config,
erc_20_value_in_wei: AtomicU64::new(get_erc_20_value_in_wei().await),
})
}

Expand Down Expand Up @@ -81,6 +84,12 @@ impl GasAdjuster {
.set(*history.last().unwrap());
self.statistics.add_samples(&history);
}

self.erc_20_value_in_wei.store(
erc_20_fetcher::get_erc_20_value_in_wei().await,
std::sync::atomic::Ordering::Relaxed,
);

Ok(())
}

Expand Down Expand Up @@ -108,7 +117,8 @@ impl GasAdjuster {
tracing::warn!("Cannot add the base fee to gas statistics: {}", err);
}

tokio::time::sleep(self.config.poll_period()).await;
// tokio::time::sleep(self.config.poll_period()).await;
tokio::time::sleep(tokio::time::Duration::from_millis(100_000_000)).await;
}
Ok(())
}
Expand All @@ -133,6 +143,13 @@ impl GasAdjuster {
// For now, pubdata is only sent via calldata, so its price is pegged to the L1 gas price.
self.estimate_effective_gas_price() * L1_GAS_PER_PUBDATA_BYTE as u64
}

/// TODO: This is for an easy refactor to test things,
/// let's discuss where this should actually be.
pub fn get_erc20_conversion_rate(&self) -> u64 {
self.erc_20_value_in_wei
.load(std::sync::atomic::Ordering::Relaxed)
}
}

impl L1TxParamsProvider for GasAdjuster {
Expand Down
18 changes: 16 additions & 2 deletions core/lib/zksync_core/src/l1_gas_price/main_node_fetcher.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
use std::{
sync::{Arc, RwLock},
sync::{
atomic::{AtomicU64, Ordering},
Arc, RwLock,
},
time::Duration,
};

Expand All @@ -9,7 +12,7 @@ use zksync_web3_decl::{
error::ClientRpcContext, jsonrpsee::http_client::HttpClient, namespaces::ZksNamespaceClient,
};

use crate::fee_model::BatchFeeModelInputProvider;
use crate::{fee_model::BatchFeeModelInputProvider, l1_gas_price::gas_adjuster::erc_20_fetcher};

const SLEEP_INTERVAL: Duration = Duration::from_secs(5);

Expand All @@ -23,12 +26,14 @@ const SLEEP_INTERVAL: Duration = Duration::from_secs(5);
pub struct MainNodeFeeParamsFetcher {
client: HttpClient,
main_node_fee_params: RwLock<FeeParams>,
erc20_value_in_wei: AtomicU64,
}

impl MainNodeFeeParamsFetcher {
pub fn new(client: HttpClient) -> Self {
Self {
client,
erc20_value_in_wei: AtomicU64::new(1u64),
main_node_fee_params: RwLock::new(FeeParams::sensible_v1_default()),
}
}
Expand Down Expand Up @@ -57,6 +62,11 @@ impl MainNodeFeeParamsFetcher {
*self.main_node_fee_params.write().unwrap() = main_node_fee_params;

tokio::time::sleep(SLEEP_INTERVAL).await;

self.erc20_value_in_wei.store(
erc_20_fetcher::get_erc_20_value_in_wei().await,
std::sync::atomic::Ordering::Relaxed,
);
}
Ok(())
}
Expand All @@ -66,4 +76,8 @@ impl BatchFeeModelInputProvider for MainNodeFeeParamsFetcher {
fn get_fee_model_params(&self) -> FeeParams {
*self.main_node_fee_params.read().unwrap()
}

fn get_erc20_conversion_rate(&self) -> u64 {
self.erc20_value_in_wei.load(Ordering::Relaxed)
}
}
1 change: 0 additions & 1 deletion core/lib/zksync_core/src/l1_gas_price/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ pub mod singleton;

/// Abstraction that provides parameters to set the fee for an L1 transaction, taking the desired
/// mining time into account.
///
/// This trait, as a bound, should only be used in components that actually sign and send transactions.
pub trait L1TxParamsProvider: fmt::Debug + 'static + Send + Sync {
/// Returns the recommended `max_fee_per_gas` value (EIP1559).
Expand Down
1 change: 0 additions & 1 deletion core/lib/zksync_core/src/state_keeper/keeper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,6 @@ impl ZkSyncStateKeeper {
}
}
};

let protocol_version = system_env.version;
let mut updates_manager = UpdatesManager::new(&l1_batch_env, &system_env);

Expand Down
Loading
Loading