Skip to content

Commit

Permalink
Merge branch 'main' into miniblock_max_payload_size
Browse files Browse the repository at this point in the history
  • Loading branch information
moshababo committed Mar 6, 2024
2 parents c14cb22 + 160b4d4 commit 46285e1
Show file tree
Hide file tree
Showing 226 changed files with 10,749 additions and 2,619 deletions.
1 change: 0 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,3 @@ contracts/.git
!bellman-cuda
!prover/vk_setup_data_generator_server_fri/data/
!.github/release-please/manifest.json
!trusted_setup.json
4 changes: 2 additions & 2 deletions .github/release-please/manifest.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"core": "20.8.0",
"prover": "11.0.0"
"core": "21.0.0",
"prover": "12.0.1"
}
2 changes: 0 additions & 2 deletions .github/workflows/build-docker-from-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ jobs:
prover_fri_gpu_key_id: ${{ steps.extract-prover-fri-setup-key-ids.outputs.gpu_short_commit_sha }}
steps:
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
with:

- name: Generate output with git tag
id: set
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cargo-license.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: EmbarkStudios/cargo-deny-action@v1
- uses: EmbarkStudios/cargo-deny-action@68cd9c5e3e16328a430a37c743167572e3243e7e
2 changes: 1 addition & 1 deletion .github/workflows/vm-perf-comparison.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
run: echo "sha=$(git merge-base HEAD FETCH_HEAD)" >> $GITHUB_OUTPUT

- name: checkout divergence point
run: git checkout ${{ steps.merge_base.outputs.sha }}
run: git checkout ${{ steps.merge_base.outputs.sha }} --recurse-submodules

- name: setup-env
run: |
Expand Down
78 changes: 68 additions & 10 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 9 additions & 1 deletion checks-config/era.dic
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ U256
20%
*%
90%
1%
f64
k
M
Expand All @@ -59,6 +60,8 @@ kb
24k
500k
50k
52k
260k
120kb
18kb
12GB
Expand All @@ -80,6 +83,8 @@ L2s
L1
json
l1
G1
G2
SystemConfig
TODO
se
Expand Down Expand Up @@ -137,6 +142,8 @@ merkle
eth
Ethereum
deployer
designator
designators
RPC
tx
txs
Expand All @@ -162,6 +169,7 @@ zkEVM
src
utils
ptr
recurse
RefCell
Rc
StorageView
Expand Down Expand Up @@ -198,7 +206,7 @@ Serde
tokenize
EOAs
zeroized
value
cardinality

// zkSync-related words
matterlabs
Expand Down
2 changes: 1 addition & 1 deletion contracts
Submodule contracts updated 79 files
+60 −0 .github/workflows/build-release-manual.yaml
+3 −2 .github/workflows/buld-release.yaml
+5 −5 .github/workflows/l1-contracts-ci.yaml
+3 −3 .github/workflows/l2-contracts-ci.yaml
+2 −2 .github/workflows/nodejs-license.yaml
+5 −5 .github/workflows/system-contracts-ci.yaml
+9 −6 l1-contracts/contracts/common/L2ContractAddresses.sol
+7 −14 l1-contracts/contracts/dev-contracts/test/ExecutorProvingTest.sol
+22 −0 l1-contracts/contracts/upgrades/Upgrade_4844.sol
+3 −0 l1-contracts/contracts/zksync/Config.sol
+3 −0 l1-contracts/contracts/zksync/DiamondInit.sol
+2 −0 l1-contracts/contracts/zksync/Storage.sol
+37 −14 l1-contracts/contracts/zksync/ValidatorTimelock.sol
+4 −4 l1-contracts/contracts/zksync/Verifier.sol
+161 −53 l1-contracts/contracts/zksync/facets/Executor.sol
+57 −2 l1-contracts/contracts/zksync/interfaces/IExecutor.sol
+33 −0 l1-contracts/contracts/zksync/utils/BlobVersionedHashRetriever.yul
+1 −1 l1-contracts/foundry.toml
+3 −0 l1-contracts/hardhat.config.ts
+2 −0 l1-contracts/scripts/deploy-erc20.ts
+2 −0 l1-contracts/scripts/deploy-testkit.ts
+3 −1 l1-contracts/scripts/deploy-testnet-token.ts
+2 −0 l1-contracts/scripts/deploy-withdrawal-helpers.ts
+1 −0 l1-contracts/scripts/deploy.ts
+3 −1 l1-contracts/scripts/migrate-governance.ts
+3 −1 l1-contracts/scripts/read-variable.ts
+3 −1 l1-contracts/scripts/revert-reason.ts
+7 −0 l1-contracts/scripts/utils.ts
+2 −0 l1-contracts/scripts/verify.ts
+29 −6 l1-contracts/src.ts/deploy-utils.ts
+54 −3 l1-contracts/src.ts/deploy.ts
+2 −1 l1-contracts/test/foundry/unit/concrete/Admin/_Admin_Shared.t.sol
+2 −1 l1-contracts/test/foundry/unit/concrete/Bridge/L1WethBridge/_L1WethBridge_Shared.t.sol
+2 −1 l1-contracts/test/foundry/unit/concrete/DiamondCut/UpgradeLogic.t.sol
+1 −1 l1-contracts/test/foundry/unit/concrete/Executor/Authorization.t.sol
+519 −39 l1-contracts/test/foundry/unit/concrete/Executor/Committing.t.sol
+19 −20 l1-contracts/test/foundry/unit/concrete/Executor/Executing.t.sol
+7 −8 l1-contracts/test/foundry/unit/concrete/Executor/Proving.t.sol
+7 −8 l1-contracts/test/foundry/unit/concrete/Executor/Reverting.t.sol
+5 −2 l1-contracts/test/foundry/unit/concrete/Executor/_Executor_Shared.t.sol
+99 −19 l1-contracts/test/foundry/unit/concrete/Utils/Utils.sol
+46 −16 l1-contracts/test/foundry/unit/concrete/Utils/Utils.t.sol
+123 −0 l1-contracts/test/foundry/unit/concrete/ValidatorTimelock.t.sol
+12 −6 l1-contracts/test/unit_tests/executor_proof.spec.ts
+1 −0 l1-contracts/test/unit_tests/l1_erc20_bridge_test.spec.ts
+1 −0 l1-contracts/test/unit_tests/l1_weth_bridge_test.spec.ts
+3 −2 l1-contracts/test/unit_tests/l2-upgrade.test.spec.ts
+1 −0 l1-contracts/test/unit_tests/mailbox_test.spec.ts
+1 −0 l1-contracts/test/unit_tests/proxy_test.spec.ts
+6 −1 l1-contracts/test/unit_tests/utils.ts
+6 −5 l1-contracts/test/unit_tests/validator_timelock_test.spec.ts
+2 −1 l2-contracts/package.json
+3 −1 l2-contracts/src/deployForceDeployUpgrader.ts
+3 −1 l2-contracts/src/deployTestnetPaymaster.ts
+3 −1 l2-contracts/src/publish-bridge-preimages.ts
+188 −0 l2-contracts/src/updateL2ERC20Metadata.ts
+2 −0 l2-contracts/src/upgradeBridgeImpl.ts
+1 −0 l2-contracts/src/verify.ts
+31 −24 system-contracts/SystemContractsHashes.json
+4 −4 system-contracts/bootloader/bootloader.yul
+22 −21 system-contracts/bootloader/test_infra/Cargo.lock
+6 −6 system-contracts/bootloader/test_infra/Cargo.toml
+12 −1 system-contracts/bootloader/tests/bootloader/bootloader_test.yul
+18 −3 system-contracts/contracts/Constants.sol
+8 −1 system-contracts/contracts/L1Messenger.sol
+58 −0 system-contracts/contracts/PubdataChunkPublisher.sol
+13 −0 system-contracts/contracts/interfaces/IPubdataChunkPublisher.sol
+5 −0 system-contracts/scripts/constants.ts
+1 −0 system-contracts/scripts/deploy-preimages.ts
+8 −7 system-contracts/scripts/preprocess-bootloader.ts
+1 −0 system-contracts/scripts/utils.ts
+1 −72 system-contracts/test/Compressor.spec.ts
+529 −0 system-contracts/test/L1Messenger.spec.ts
+60 −0 system-contracts/test/PubdataChunkPublisher.spec.ts
+2 −0 system-contracts/test/shared/constants.ts
+6 −0 system-contracts/test/shared/mocks.ts
+76 −1 system-contracts/test/shared/utils.ts
+1 −1 tools/README.md
+17 −17 tools/data/scheduler_key.json
40 changes: 40 additions & 0 deletions core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,45 @@
# Changelog

## [21.0.0](https://github.com/matter-labs/zksync-era/compare/core-v20.8.0...core-v21.0.0) (2024-03-01)


### ⚠ BREAKING CHANGES

* **prover:** Add EIP4844 support for provers subsystem ([#1200](https://github.com/matter-labs/zksync-era/issues/1200))
* Set 21 as latest protocol version ([#1262](https://github.com/matter-labs/zksync-era/issues/1262))

### Features

* A way to disable slow query logging for some queries ([#1297](https://github.com/matter-labs/zksync-era/issues/1297)) ([13b82a0](https://github.com/matter-labs/zksync-era/commit/13b82a0db88d64b579e79cb824c71af8d14a9e64))
* **aggregator:** support two operator addresses in sender and aggregator ([#1201](https://github.com/matter-labs/zksync-era/issues/1201)) ([7be56e5](https://github.com/matter-labs/zksync-era/commit/7be56e576fbb4d404319a6c099dcf1d5cb0b476a))
* change EN main node fetcher concurrency factor ([#1317](https://github.com/matter-labs/zksync-era/issues/1317)) ([d4235b5](https://github.com/matter-labs/zksync-era/commit/d4235b541034b300a7043e83bb9fc44ab196dad5))
* **commitment-generator:** Commitment for 1.4.2 ([#1234](https://github.com/matter-labs/zksync-era/issues/1234)) ([9b773eb](https://github.com/matter-labs/zksync-era/commit/9b773ebb3c170dc3d503ec83fb33d8d463614b4f))
* **config:** add pubdata sending method to config ([#1261](https://github.com/matter-labs/zksync-era/issues/1261)) ([cebf55a](https://github.com/matter-labs/zksync-era/commit/cebf55acde566064d365840933515d79535af18c))
* **config:** Added blobs to commit batches and made da source part of config ([#1243](https://github.com/matter-labs/zksync-era/issues/1243)) ([e01d1b6](https://github.com/matter-labs/zksync-era/commit/e01d1b64a20eabf7c43f310978730ad6f3223fb2))
* **config:** update eth_sender to use blobs ([#1295](https://github.com/matter-labs/zksync-era/issues/1295)) ([e81f080](https://github.com/matter-labs/zksync-era/commit/e81f0800ad072e4a1433e1fdce6866bb7568f7da))
* **core:** Adds support for 4844 transaction signing and rlp encoding ([#1254](https://github.com/matter-labs/zksync-era/issues/1254)) ([10e3a3e](https://github.com/matter-labs/zksync-era/commit/10e3a3ec50c84b3533af111d532e0b528c0b4966))
* **dal:** `zksync_types::Transaction` to use protobuf for wire encoding (BFT-407) ([#1047](https://github.com/matter-labs/zksync-era/issues/1047)) ([ee94bee](https://github.com/matter-labs/zksync-era/commit/ee94beed9e610adee94ea5073f0c748df7447135))
* **eth_sender:** set blob gas fee when blobs DA is used ([#1285](https://github.com/matter-labs/zksync-era/issues/1285)) ([57c5526](https://github.com/matter-labs/zksync-era/commit/57c5526602b89ce0fff9bbf06d840f7858b2ce99))
* **gas-adjuster:** gas adjuster for EIP4844 ([#1255](https://github.com/matter-labs/zksync-era/issues/1255)) ([1da97ed](https://github.com/matter-labs/zksync-era/commit/1da97edea5bc323fc40d76c96d6ac48be77f0f7b))
* Metrics for block tip ([#1144](https://github.com/matter-labs/zksync-era/issues/1144)) ([85d4b12](https://github.com/matter-labs/zksync-era/commit/85d4b124f59ee6596aaa8e6db3bbbb86fa829c90))
* **node_framework:** Add Web3 API layers ([#1258](https://github.com/matter-labs/zksync-era/issues/1258)) ([105f4cc](https://github.com/matter-labs/zksync-era/commit/105f4cc2aebce958c3e9d2bfe4a4277fc26ebb4b))
* **node_framework:** Support Proof Data Handler in the framework ([#1233](https://github.com/matter-labs/zksync-era/issues/1233)) ([2191218](https://github.com/matter-labs/zksync-era/commit/21912182b72f17c40d259f2bc0de9ce8e8241420))
* **prover:** Add EIP4844 support for provers subsystem ([#1200](https://github.com/matter-labs/zksync-era/issues/1200)) ([6953e89](https://github.com/matter-labs/zksync-era/commit/6953e8989571d65230c66f3731c8831fd7abb274))
* Remove methods to sign an arbitraty message ([#1294](https://github.com/matter-labs/zksync-era/issues/1294)) ([8904123](https://github.com/matter-labs/zksync-era/commit/89041236282e4b85de5eec3a4d9471f0fd3db58d))
* Set 21 as latest protocol version ([#1262](https://github.com/matter-labs/zksync-era/issues/1262)) ([30579ef](https://github.com/matter-labs/zksync-era/commit/30579ef6cf5e8f96572d9b215fceec79556ce0ea))
* support loading verifier and protocol version from db ([#1293](https://github.com/matter-labs/zksync-era/issues/1293)) ([533f013](https://github.com/matter-labs/zksync-era/commit/533f0131342dc40eea1bb82334828d0007043d19))


### Bug Fixes

* Add EIP4844 to fri_prover_group_config ([#1309](https://github.com/matter-labs/zksync-era/issues/1309)) ([edf9397](https://github.com/matter-labs/zksync-era/commit/edf9397ea65ddcb41b68f9732e496f38cadf3e58))
* **api:** Use better gas per pubdata in API (pure server changes) ([#1311](https://github.com/matter-labs/zksync-era/issues/1311)) ([54f8d8c](https://github.com/matter-labs/zksync-era/commit/54f8d8caa702e0676b31cfc048d8d331fa961547))
* **docker:** change default password for postgres ([#1250](https://github.com/matter-labs/zksync-era/issues/1250)) ([f6bff74](https://github.com/matter-labs/zksync-era/commit/f6bff74845983518026ec1d91a47523a3ec0f48c))
* **en:** fail fast if we don't request correct number of txs from man node ([#1269](https://github.com/matter-labs/zksync-era/issues/1269)) ([1bcbf17](https://github.com/matter-labs/zksync-era/commit/1bcbf1751c6224619873373c7cf071cdebdf56ee))
* Fix scheduler enqueuer bug ([#1322](https://github.com/matter-labs/zksync-era/issues/1322)) ([95deb92](https://github.com/matter-labs/zksync-era/commit/95deb92a2da59417470084894588a97c98bc65b8))
* **snapshots_creator:** Fix snapshot generation query ([#1289](https://github.com/matter-labs/zksync-era/issues/1289)) ([e279456](https://github.com/matter-labs/zksync-era/commit/e2794564ce61e52b0f31079e9a0f67c27037002c))
* **vm:** fix match clause in `get_max_gas_per_pubdata_byte` ([#1292](https://github.com/matter-labs/zksync-era/issues/1292)) ([eaf5a50](https://github.com/matter-labs/zksync-era/commit/eaf5a506266b5292df9b277b6c020170ca1f59db))

## [20.8.0](https://github.com/matter-labs/zksync-era/compare/core-v20.7.0...core-v20.8.0) (2024-02-26)


Expand Down
1 change: 1 addition & 0 deletions core/bin/external_node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ zksync_utils = { path = "../../lib/utils" }
zksync_state = { path = "../../lib/state" }
zksync_basic_types = { path = "../../lib/basic_types" }
zksync_contracts = { path = "../../lib/contracts" }
zksync_l1_contract_interface = { path = "../../lib/l1_contract_interface" }
zksync_concurrency = { version = "0.1.0", git = "https://github.com/matter-labs/era-consensus.git", rev = "97d139969476a004c50f8b4a31ece748e5bee14e" }
zksync_consensus_roles = { version = "0.1.0", git = "https://github.com/matter-labs/era-consensus.git", rev = "97d139969476a004c50f8b4a31ece748e5bee14e" }
zksync_snapshots_applier = { path = "../../lib/snapshots_applier" }
Expand Down
25 changes: 17 additions & 8 deletions core/bin/external_node/src/config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use zksync_core::{
},
consensus,
};
use zksync_types::api::BridgeAddresses;
use zksync_types::{api::BridgeAddresses, fee_model::FeeParams};
use zksync_web3_decl::{
error::ClientRpcContext,
jsonrpsee::http_client::{HttpClient, HttpClientBuilder},
Expand All @@ -38,6 +38,7 @@ pub struct RemoteENConfig {
pub l2_testnet_paymaster_addr: Option<Address>,
pub l2_chain_id: L2ChainId,
pub l1_chain_id: L1ChainId,
pub max_pubdata_per_batch: u64,
}

impl RemoteENConfig {
Expand All @@ -62,6 +63,19 @@ impl RemoteENConfig {
let l1_chain_id = client.l1_chain_id().rpc_context("l1_chain_id").await?;
let l1_chain_id = L1ChainId(l1_chain_id.as_u64());

let fee_params = client
.get_fee_params()
.rpc_context("get_fee_params")
.await?;
let max_pubdata_per_batch = match fee_params {
FeeParams::V1(_) => {
const MAX_V1_PUBDATA_PER_BATCH: u64 = 100_000;

MAX_V1_PUBDATA_PER_BATCH
}
FeeParams::V2(params) => params.config.max_pubdata_per_batch,
};

Ok(Self {
bridgehub_proxy_addr,
diamond_proxy_addr,
Expand All @@ -72,6 +86,7 @@ impl RemoteENConfig {
l2_weth_bridge_addr: bridges.l2_weth_bridge,
l2_chain_id,
l1_chain_id,
max_pubdata_per_batch,
})
}
}
Expand Down Expand Up @@ -222,9 +237,6 @@ pub struct OptionalENConfig {
/// 0 means that sealing is synchronous; this is mostly useful for performance comparison, testing etc.
#[serde(default = "OptionalENConfig::default_miniblock_seal_queue_capacity")]
pub miniblock_seal_queue_capacity: usize,
/// Path to KZG trusted setup path.
#[serde(default = "OptionalENConfig::default_kzg_trusted_setup_path")]
pub kzg_trusted_setup_path: String,
}

impl OptionalENConfig {
Expand Down Expand Up @@ -331,10 +343,6 @@ impl OptionalENConfig {
10
}

fn default_kzg_trusted_setup_path() -> String {
"./trusted_setup.json".to_owned()
}

pub fn polling_interval(&self) -> Duration {
Duration::from_millis(self.polling_interval)
}
Expand Down Expand Up @@ -625,6 +633,7 @@ impl From<ExternalNodeConfig> for TxSenderConfig {
l1_to_l2_transactions_compatibility_mode: config
.optional
.l1_to_l2_transactions_compatibility_mode,
max_pubdata_per_batch: config.remote.max_pubdata_per_batch,
}
}
}
Expand Down
Loading

0 comments on commit 46285e1

Please sign in to comment.