Skip to content

Commit

Permalink
Merge branch 'main' into zk-4844-kzg-info
Browse files Browse the repository at this point in the history
  • Loading branch information
koloz193 committed Jan 19, 2024
2 parents 5668422 + dec608d commit 91a6278
Show file tree
Hide file tree
Showing 144 changed files with 5,725 additions and 3,060 deletions.
2 changes: 1 addition & 1 deletion .github/release-please/manifest.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"sdk/zksync-rs": "0.4.0",
"core": "19.1.1",
"core": "20.0.0",
"prover": "10.1.0"
}
2 changes: 1 addition & 1 deletion .github/workflows/build-contracts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
description: 'JSON of required compilers and their versions'
type: string
required: false
default: '[{ "zksolc": ["1.3.14", "1.3.16", "1.3.17", "1.3.1", "1.3.7", "1.3.18", "1.3.19"] } , { "zkvyper": ["1.3.13"] }]'
default: '[{ "zksolc": ["1.3.14", "1.3.16", "1.3.17", "1.3.1", "1.3.7", "1.3.18", "1.3.19", "1.3.21"] } , { "zkvyper": ["1.3.13"] }]'

jobs:
build-images:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-local-node-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
description: 'JSON of required compilers and their versions'
type: string
required: false
default: '[{ "zksolc": ["1.3.14", "1.3.16", "1.3.17", "1.3.1", "1.3.7", "1.3.18", "1.3.19"] } , { "zkvyper": ["1.3.13"] }]'
default: '[{ "zksolc": ["1.3.14", "1.3.16", "1.3.17", "1.3.1", "1.3.7", "1.3.18", "1.3.19", "1.3.21"] } , { "zkvyper": ["1.3.13"] }]'

jobs:
build-images:
Expand Down
38 changes: 38 additions & 0 deletions .github/workflows/build-prover-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -175,3 +175,41 @@ jobs:
run: |
ci_run sccache --show-stats
ci_run cat /tmp/sccache_log.txt
copy-images:
name: Copy images between docker registries
env:
IMAGE_TAG_SUFFIX: ${{ inputs.image_tag_suffix }}
runs-on: matterlabs-ci-runner
needs: build-images
if: ${{ inputs.action == 'push' }}
strategy:
matrix:
component:
- witness-vector-generator
steps:

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to us-central1 GAR
run: |
gcloud auth print-access-token --lifetime=7200 --impersonate-service-account=gha-ci-runners@matterlabs-infra.iam.gserviceaccount.com | docker login -u oauth2accesstoken --password-stdin https://us-docker.pkg.dev
- name: Login and push to Asia GAR
run: |
gcloud auth print-access-token --lifetime=7200 --impersonate-service-account=gha-ci-runners@matterlabs-infra.iam.gserviceaccount.com | docker login -u oauth2accesstoken --password-stdin https://asia-docker.pkg.dev
docker buildx imagetools create \
--tag asia-docker.pkg.dev/matterlabs-infra/matterlabs-docker/${{ matrix.component }}:2.0-${{ inputs.image_tag_suffix }} \
us-docker.pkg.dev/matterlabs-infra/matterlabs-docker/${{ matrix.component }}:2.0-${{ inputs.image_tag_suffix }}
- name: Login and push to Europe GAR
run: |
gcloud auth print-access-token --lifetime=7200 --impersonate-service-account=gha-ci-runners@matterlabs-infra.iam.gserviceaccount.com | docker login -u oauth2accesstoken --password-stdin https://europe-docker.pkg.dev
docker buildx imagetools create \
--tag europe-docker.pkg.dev/matterlabs-infra/matterlabs-docker/${{ matrix.component }}:2.0-${{ inputs.image_tag_suffix }} \
us-docker.pkg.dev/matterlabs-infra/matterlabs-docker/${{ matrix.component }}:2.0-${{ inputs.image_tag_suffix }}
30 changes: 19 additions & 11 deletions .github/workflows/ci-core-reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
description: 'JSON of required compilers and their versions'
type: string
required: false
default: '[{ "zksolc": ["1.3.14", "1.3.16", "1.3.17", "1.3.1", "1.3.7", "1.3.18", "1.3.19"] } , { "zkvyper": ["1.3.13"] }]'
default: '[{ "zksolc": ["1.3.14", "1.3.16", "1.3.17", "1.3.1", "1.3.7", "1.3.18", "1.3.19", "1.3.21"] } , { "zkvyper": ["1.3.13"] }]'

jobs:
lint:
Expand All @@ -27,7 +27,7 @@ jobs:
echo IN_DOCKER=1 >> .env
# TODO: Remove when we after upgrade of hardhat-plugins
- name: pre-download compiilers
- name: pre-download compilers
run: |
# Download needed versions of vyper compiler
# Not sanitized due to unconventional path and tags
Expand Down Expand Up @@ -141,11 +141,15 @@ jobs:
wget https://github.com/ethereum/solc-bin/raw/gh-pages/linux-amd64/solc-linux-amd64-v0.8.23%2Bcommit.f704f362
mv solc-linux-amd64-v0.8.23+commit.f704f362 $(pwd)/etc/solc-bin/0.8.23/solc
chmod +x $(pwd)/etc/solc-bin/0.8.23/solc
mkdir -p $(pwd)/etc/solc-bin/zkVM-0.8.23-1.0.0
wget https://github.com/matter-labs/era-solidity/releases/download/0.8.23-1.0.0/solc-linux-amd64-0.8.23-1.0.0 -O $(pwd)/etc/solc-bin/zkVM-0.8.23-1.0.0/solc
chmod +x $(pwd)/etc/solc-bin/zkVM-0.8.23-1.0.0/solc
mkdir -p $(pwd)/etc/zksolc-bin/v1.3.19
wget https://github.com/matter-labs/zksolc-bin/raw/main/linux-amd64/zksolc-linux-amd64-musl-v1.3.19
mv zksolc-linux-amd64-musl-v1.3.19 $(pwd)/etc/zksolc-bin/v1.3.19/zksolc
chmod +x $(pwd)/etc/zksolc-bin/v1.3.19/zksolc
mkdir -p $(pwd)/etc/zksolc-bin/v1.3.21
wget https://github.com/matter-labs/zksolc-bin/raw/main/linux-amd64/zksolc-linux-amd64-musl-v1.3.21
mv zksolc-linux-amd64-musl-v1.3.21 $(pwd)/etc/zksolc-bin/v1.3.21/zksolc
chmod +x $(pwd)/etc/zksolc-bin/v1.3.21/zksolc
mkdir -p $(pwd)/etc/vyper-bin/0.3.10
wget -O vyper0.3.10 https://github.com/vyperlang/vyper/releases/download/v0.3.10/vyper.0.3.10%2Bcommit.91361694.linux
Expand Down Expand Up @@ -250,11 +254,15 @@ jobs:
wget https://github.com/ethereum/solc-bin/raw/gh-pages/linux-amd64/solc-linux-amd64-v0.8.23%2Bcommit.f704f362
mv solc-linux-amd64-v0.8.23+commit.f704f362 $(pwd)/etc/solc-bin/0.8.23/solc
chmod +x $(pwd)/etc/solc-bin/0.8.23/solc
mkdir -p $(pwd)/etc/zksolc-bin/v1.3.19
wget https://github.com/matter-labs/zksolc-bin/raw/main/linux-amd64/zksolc-linux-amd64-musl-v1.3.19
mv zksolc-linux-amd64-musl-v1.3.19 $(pwd)/etc/zksolc-bin/v1.3.19/zksolc
chmod +x $(pwd)/etc/zksolc-bin/v1.3.19/zksolc
mkdir -p $(pwd)/etc/solc-bin/zkVM-0.8.23-1.0.0
wget https://github.com/matter-labs/era-solidity/releases/download/0.8.23-1.0.0/solc-linux-amd64-0.8.23-1.0.0 -O $(pwd)/etc/solc-bin/zkVM-0.8.23-1.0.0/solc
chmod +x $(pwd)/etc/solc-bin/zkVM-0.8.23-1.0.0/solc
mkdir -p $(pwd)/etc/zksolc-bin/v1.3.21
wget https://github.com/matter-labs/zksolc-bin/raw/main/linux-amd64/zksolc-linux-amd64-musl-v1.3.21
mv zksolc-linux-amd64-musl-v1.3.21 $(pwd)/etc/zksolc-bin/v1.3.21/zksolc
chmod +x $(pwd)/etc/zksolc-bin/v1.3.21/zksolc
mkdir -p $(pwd)/etc/vyper-bin/0.3.10
wget -O vyper0.3.10 https://github.com/vyperlang/vyper/releases/download/v0.3.10/vyper.0.3.10%2Bcommit.91361694.linux
Expand Down
46 changes: 12 additions & 34 deletions Cargo.lock

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

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ The following questions will be answered by the following resources:
| How can I run the project? | [launch.md](docs/guides/launch.md) |
| What is the logical project structure and architecture? | [architecture.md](docs/guides/architecture.md) |
| Where can I find protocol specs? | [specs](docs/specs/README.md) |
| Where can I find developer docs? | [docs](https://v2-docs.zksync.io/dev/) |
| Where can I find developer docs? | [docs](https://era.zksync.io/docs/) |

## Policies

Expand All @@ -30,7 +30,7 @@ The following questions will be answered by the following resources:
zkSync Era is distributed under the terms of either

- Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or <http://www.apache.org/licenses/LICENSE-2.0>)
- MIT license ([LICENSE-MIT](LICENSE-MIT) or <http://opensource.org/licenses/MIT>)
- MIT license ([LICENSE-MIT](LICENSE-MIT) or <https://opensource.org/license/mit/>)

at your option.

Expand Down
2 changes: 1 addition & 1 deletion checks-config/era.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ lang = "en_US"
# Windows: []
# macOS [ /home/alice/Libraries/hunspell, /Libraries/hunspell ]

# Additional search paths, which take presedence over the default
# Additional search paths, which take precedence over the default
# os specific search dirs, searched in order, defaults last
search_dirs = ["."]

Expand Down
2 changes: 2 additions & 0 deletions checks-config/era.dic
Original file line number Diff line number Diff line change
Expand Up @@ -879,3 +879,5 @@ decommitment
hardcoded
plookup
shivini
EIP4844
KZG
2 changes: 1 addition & 1 deletion contracts
31 changes: 30 additions & 1 deletion core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,34 @@
# Changelog

## [20.0.0](https://github.com/matter-labs/zksync-era/compare/core-v19.2.0...core-v20.0.0) (2024-01-19)


### ⚠ BREAKING CHANGES

* **vm:** fee model updates + 1.4.1 ([#791](https://github.com/matter-labs/zksync-era/issues/791))

### Features

* **api:** Consider State keeper fee model input in the API ([#901](https://github.com/matter-labs/zksync-era/issues/901)) ([3211687](https://github.com/matter-labs/zksync-era/commit/32116878ba0ac68a7b90afa1a7e0fe170bdcd902))
* **api:** Make Web3 API server work with pruned data ([#838](https://github.com/matter-labs/zksync-era/issues/838)) ([0b7cd0b](https://github.com/matter-labs/zksync-era/commit/0b7cd0b50ead2406915528becad2fac8b7e48f85))
* **vm:** fee model updates + 1.4.1 ([#791](https://github.com/matter-labs/zksync-era/issues/791)) ([3564aff](https://github.com/matter-labs/zksync-era/commit/3564affbb246c87d668ea2ec74809384bc9d621f))


### Bug Fixes

* addresses broken links in preparation for ci link check ([#869](https://github.com/matter-labs/zksync-era/issues/869)) ([a78d03c](https://github.com/matter-labs/zksync-era/commit/a78d03cc53d0097f6be892de65a2c35bd7f1baa3))
* Incorrect exposing of log indexes ([#896](https://github.com/matter-labs/zksync-era/issues/896)) ([12974fc](https://github.com/matter-labs/zksync-era/commit/12974fcba74c5704b89fa63d7f73222d4fa58228))

## [19.2.0](https://github.com/matter-labs/zksync-era/compare/core-v19.1.1...core-v19.2.0) (2024-01-17)


### Features

* adds `zk linkcheck` to zk tool and updates zk env for `zk linkcheck` ci usage ([#868](https://github.com/matter-labs/zksync-era/issues/868)) ([d64f584](https://github.com/matter-labs/zksync-era/commit/d64f584f6d505b19cd6424928e9dc68e370e17fd))
* **contract-verifier:** Support zkVM solc contract verification ([#854](https://github.com/matter-labs/zksync-era/issues/854)) ([1ed5a95](https://github.com/matter-labs/zksync-era/commit/1ed5a95462dbd73151acd8afbc4ab6158a2aecda))
* **en:** Make batch status updater work with pruned data ([#863](https://github.com/matter-labs/zksync-era/issues/863)) ([3a07890](https://github.com/matter-labs/zksync-era/commit/3a07890dacebf6179636c44d7cce1afd21ab49eb))
* rewritten gossip sync to be async from block processing ([#711](https://github.com/matter-labs/zksync-era/issues/711)) ([3af4644](https://github.com/matter-labs/zksync-era/commit/3af4644f428af0328cdea0fbae8a8f965489c6c4))

## [19.1.1](https://github.com/matter-labs/zksync-era/compare/core-v19.1.0...core-v19.1.1) (2024-01-12)


Expand Down Expand Up @@ -433,7 +462,7 @@
### Features

* Implement dynamic L2-to-L1 log tree depth ([#126](https://github.com/matter-labs/zksync-era/issues/126)) ([7dfbc5e](https://github.com/matter-labs/zksync-era/commit/7dfbc5eddab94cd24f96912e0d43ba36e1cf363f))
* **vm:** Introduce new way of returning from the tracer [#2569](https://github.com/matter-labs/zksync-era/issues/2569) ([#116](https://github.com/matter-labs/zksync-era/issues/116)) ([cf44a49](https://github.com/matter-labs/zksync-era/commit/cf44a491a324199b4cf457d28658da44b6dafc61))
* **vm:** Introduce new way of returning from the tracer [#2569](https://github.com/matter-labs/zksync-2-dev/issues/2569) ([#116](https://github.com/matter-labs/zksync-era/issues/116)) ([cf44a49](https://github.com/matter-labs/zksync-era/commit/cf44a491a324199b4cf457d28658da44b6dafc61))
* **vm:** Restore system-constants-generator ([#115](https://github.com/matter-labs/zksync-era/issues/115)) ([5e61bdc](https://github.com/matter-labs/zksync-era/commit/5e61bdc75b2baa03004d4d3e801170c094766964))

## [15.0.1](https://github.com/matter-labs/zksync-2-dev/compare/core-v15.0.0...core-v15.0.1) (2023-09-27)
Expand Down
6 changes: 6 additions & 0 deletions core/bin/contract-verifier/src/verifier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,12 @@ impl ContractVerifier {
);

if artifacts.bytecode != deployed_bytecode {
tracing::info!(
"Bytecode mismatch req {}, deployed: 0x{}, compiled 0x{}",
request.id,
hex::encode(deployed_bytecode),
hex::encode(artifacts.bytecode)
);
return Err(ContractVerifierError::BytecodeMismatch);
}

Expand Down
16 changes: 16 additions & 0 deletions core/bin/external_node/src/config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,15 @@ pub struct OptionalENConfig {
/// The max possible number of gas that `eth_estimateGas` is allowed to overestimate.
#[serde(default = "OptionalENConfig::default_estimate_gas_acceptable_overestimation")]
pub estimate_gas_acceptable_overestimation: u32,
/// Whether to use the compatibility mode for gas estimation for L1->L2 transactions.
/// During the migration to the 1.4.1 fee model, there will be a period, when the server
/// will already have the 1.4.1 fee model, while the L1 contracts will still expect the transactions
/// to use the previous fee model with much higher overhead.
///
/// When set to `true`, the API will ensure to return gasLimit is high enough overhead for both the old
/// and the new fee model when estimating L1->L2 transactions.
#[serde(default = "OptionalENConfig::default_l1_to_l2_transactions_compatibility_mode")]
pub l1_to_l2_transactions_compatibility_mode: bool,
/// The multiplier to use when suggesting gas price. Should be higher than one,
/// otherwise if the L1 prices soar, the suggested gas price won't be sufficient to be included in block
#[serde(default = "OptionalENConfig::default_gas_price_scale_factor")]
Expand Down Expand Up @@ -214,6 +223,10 @@ impl OptionalENConfig {
1_000
}

const fn default_l1_to_l2_transactions_compatibility_mode() -> bool {
true
}

const fn default_gas_price_scale_factor() -> f64 {
1.2
}
Expand Down Expand Up @@ -521,6 +534,9 @@ impl From<ExternalNodeConfig> for TxSenderConfig {
max_allowed_l2_tx_gas_limit: u32::MAX,
validation_computational_gas_limit: u32::MAX,
chain_id: config.remote.l2_chain_id,
l1_to_l2_transactions_compatibility_mode: config
.optional
.l1_to_l2_transactions_compatibility_mode,
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion core/bin/external_node/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ async fn init_tasks(
.await
.context("failed to build a connection pool for BatchStatusUpdater")?,
)
.await;
.context("failed initializing batch status updater")?;

// Run the components.
let tree_stop_receiver = stop_receiver.clone();
Expand Down
3 changes: 2 additions & 1 deletion core/bin/storage_logs_dedup_migration/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ async fn main() {
.blocks_dal()
.get_sealed_miniblock_number()
.await
.unwrap();
.unwrap()
.expect("Cannot start migration for Postgres recovered from snapshot");
println!(
"Migration started for miniblock range {}..={}",
opt.start_from_miniblock, sealed_miniblock
Expand Down
Loading

0 comments on commit 91a6278

Please sign in to comment.