From d1d4391b7d4685346d005df75935769a42ea60bc Mon Sep 17 00:00:00 2001 From: Vladislav Volosnikov Date: Wed, 20 Nov 2024 18:46:26 +0100 Subject: [PATCH] feat: Bump zksolc to 1.5.7 (#1076) --- l2-contracts/foundry.toml | 2 +- l2-contracts/hardhat.config.ts | 2 +- system-contracts/SystemContractsHashes.json | 64 ++++++++++----------- system-contracts/foundry.toml | 2 +- system-contracts/hardhat.config.ts | 18 +----- system-contracts/scripts/compile-yul.ts | 4 +- system-contracts/scripts/compile-zasm.ts | 4 +- 7 files changed, 40 insertions(+), 56 deletions(-) diff --git a/l2-contracts/foundry.toml b/l2-contracts/foundry.toml index 7fb4971c7..5e7be2051 100644 --- a/l2-contracts/foundry.toml +++ b/l2-contracts/foundry.toml @@ -10,4 +10,4 @@ remappings = [ ] [profile.default.zksync] -zksolc = "1.5.6" +zksolc = "1.5.7" diff --git a/l2-contracts/hardhat.config.ts b/l2-contracts/hardhat.config.ts index 282ab7b96..3e05a558a 100644 --- a/l2-contracts/hardhat.config.ts +++ b/l2-contracts/hardhat.config.ts @@ -12,7 +12,7 @@ if (!process.env.CHAIN_ETH_NETWORK) { export default { zksolc: { - version: "1.5.0", + version: "1.5.7", compilerSource: "binary", settings: { isSystem: true, diff --git a/system-contracts/SystemContractsHashes.json b/system-contracts/SystemContractsHashes.json index 3404828fe..6204d7db4 100644 --- a/system-contracts/SystemContractsHashes.json +++ b/system-contracts/SystemContractsHashes.json @@ -3,224 +3,224 @@ "contractName": "AccountCodeStorage", "bytecodePath": "zkout/AccountCodeStorage.sol/AccountCodeStorage.json", "sourceCodePath": "contracts-preprocessed/AccountCodeStorage.sol", - "bytecodeHash": "0x01000059e58c4b510c6d3000e492d1c98cf6f5e97b17485d2fd4ae20774bbe31", + "bytecodeHash": "0x01000059b17a0edb4b15b38ad4f1ff583f90e01623b4bf816890422657411820", "sourceCodeHash": "0x2e0e09d57a04bd1e722d8bf8c6423fdf3f8bca44e5e8c4f6684f987794be066e" }, { "contractName": "BootloaderUtilities", "bytecodePath": "zkout/BootloaderUtilities.sol/BootloaderUtilities.json", "sourceCodePath": "contracts-preprocessed/BootloaderUtilities.sol", - "bytecodeHash": "0x010006dff879b6fda1310d6f6bacb5188744476796e0e78b8ef0f3665d221f64", + "bytecodeHash": "0x010006dfadf0602264b8bf7857d8503f81dad391df9d746ea6ecc09d153cfc70", "sourceCodeHash": "0x0f1213c4b95acb71f4ab5d4082cc1aeb2bd5017e1cccd46afc66e53268609d85" }, { "contractName": "ComplexUpgrader", "bytecodePath": "zkout/ComplexUpgrader.sol/ComplexUpgrader.json", "sourceCodePath": "contracts-preprocessed/ComplexUpgrader.sol", - "bytecodeHash": "0x010000477573dcfd9cf37d44859d54b7b176acba85ae8f18fd5ace0308d6f0ec", + "bytecodeHash": "0x01000047006264894aaf02bdf6f621f40f57e3de7467059b514fe9cd55d1e612", "sourceCodeHash": "0x796046a914fb676ba2bbd337b2924311ee2177ce54571c18a2c3945755c83614" }, { "contractName": "Compressor", "bytecodePath": "zkout/Compressor.sol/Compressor.json", "sourceCodePath": "contracts-preprocessed/Compressor.sol", - "bytecodeHash": "0x0100013f2d65426f271606752ad9ece505c728b90377406aa46cef48e611fa1f", + "bytecodeHash": "0x0100013f5bde1d3246e7dbb14d1a136a46831a64e6d657dabda2932fd62e2317", "sourceCodeHash": "0xc6f7cd8b21aae52ed3dd5083c09b438a7af142a4ecda6067c586770e8be745a5" }, { "contractName": "ContractDeployer", "bytecodePath": "zkout/ContractDeployer.sol/ContractDeployer.json", "sourceCodePath": "contracts-preprocessed/ContractDeployer.sol", - "bytecodeHash": "0x0100042d3e0b1d7027c7095a48fbac09515ee2417407678e237c0d29a4fbf7c2", + "bytecodeHash": "0x0100042d7de57aabc942f9a18373e396909775f5b8254dda6bed6370535478f4", "sourceCodeHash": "0x82f81fbf5fb007a9cac97462d50907ca5d7a1af62d82d2645e093ed8647a5209" }, { "contractName": "Create2Factory", "bytecodePath": "zkout/Create2Factory.sol/Create2Factory.json", "sourceCodePath": "contracts-preprocessed/Create2Factory.sol", - "bytecodeHash": "0x0100003f1e5d0e280c87a85625b19e23840538c0fee2adb6f473ae7deda99666", + "bytecodeHash": "0x0100003f763825fe9f1a8e5f7a78f3bbb4e4d3c80bd0c0f29198277bb8667150", "sourceCodeHash": "0x114d9322a9ca654989f3e0b3b21f1311dbc4db84f443d054cd414f6414d84de3" }, { "contractName": "DefaultAccount", "bytecodePath": "zkout/DefaultAccount.sol/DefaultAccount.json", "sourceCodePath": "contracts-preprocessed/DefaultAccount.sol", - "bytecodeHash": "0x010004dbe4df43333285d1984685bdb9aec3044931473c777483d63a99e66bb9", + "bytecodeHash": "0x010004db5a3c4eda46acb1dae10a9c8bc71066fc9eeb32056ff68fb7e8a2a7e9", "sourceCodeHash": "0xebffe840ebbd9329edb1ebff8ca50f6935e7dabcc67194a896fcc2e968d46dfb" }, { "contractName": "EmptyContract", "bytecodePath": "zkout/EmptyContract.sol/EmptyContract.json", "sourceCodePath": "contracts-preprocessed/EmptyContract.sol", - "bytecodeHash": "0x0100000759fbd07e0d0781d79416d24706955ba013862ffdd9c45d429d474784", + "bytecodeHash": "0x01000007053231bb71767708c7c8b18bee3ce13af3f346352471809266e6ca8b", "sourceCodeHash": "0xcac36c5afafbcff83601f4fbfdff660aa66d8c80ed97b9322d3011c1926b554d" }, { "contractName": "ImmutableSimulator", "bytecodePath": "zkout/ImmutableSimulator.sol/ImmutableSimulator.json", "sourceCodePath": "contracts-preprocessed/ImmutableSimulator.sol", - "bytecodeHash": "0x01000035b6bcb201f45b122be5632b55de78374a18efb2b812c943c3ee9ad154", + "bytecodeHash": "0x010000352a4c9cb410804df1e731568721b59cd77187d984682fe5208e18ad16", "sourceCodeHash": "0x9659e69f7db09e8f60a8bb95314b1ed26afcc689851665cf27f5408122f60c98" }, { "contractName": "KnownCodesStorage", "bytecodePath": "zkout/KnownCodesStorage.sol/KnownCodesStorage.json", "sourceCodePath": "contracts-preprocessed/KnownCodesStorage.sol", - "bytecodeHash": "0x010000692d7c6660a194c9128f937fcf638a3309424fa90d8e25107b76928d40", + "bytecodeHash": "0x01000069bea7c438daaf61e5743c22c2dd6ff9180e2845727d4c5f995aab15a8", "sourceCodeHash": "0xb39b5b81168653e0c5062f7b8e1d6d15a4e186df3317f192f0cb2fc3a74f5448" }, { "contractName": "L1Messenger", "bytecodePath": "zkout/L1Messenger.sol/L1Messenger.json", "sourceCodePath": "contracts-preprocessed/L1Messenger.sol", - "bytecodeHash": "0x01000261fc2f8bc373116ad7adab8fe9022996cf866f4eecf81034a7ad2ef357", + "bytecodeHash": "0x0100026167ff1be1af4471d8992ceeb66902ef7a3c4148570b947d257ce3b923", "sourceCodeHash": "0xa8768fdaac6d8804782f14e2a51bbe2b6be31dee9103b6d02d149ea8dc46eb6a" }, { "contractName": "L2BaseToken", "bytecodePath": "zkout/L2BaseToken.sol/L2BaseToken.json", "sourceCodePath": "contracts-preprocessed/L2BaseToken.sol", - "bytecodeHash": "0x010000ddd98f7915c8d5f04c9011f301b9714b10cd3c9d30f89d93c29d3dd3a7", + "bytecodeHash": "0x010000ddfd7eab80277672aa8cb37fdc5338f5034b8de9ffefb778ed6df4414a", "sourceCodeHash": "0xdea518b1ea16718b0f0ec6155b227a8bc8f51374a9eebf7bc17cfe84433df740" }, { "contractName": "MsgValueSimulator", "bytecodePath": "zkout/MsgValueSimulator.sol/MsgValueSimulator.json", "sourceCodePath": "contracts-preprocessed/MsgValueSimulator.sol", - "bytecodeHash": "0x0100005990ed517bc98ec25743f96de6d45efccce22b32a81093a10ba2e0eab5", + "bytecodeHash": "0x01000059783c42bcdc0ad44f4df48521854da0f47efc603dadcd0b47040c183d", "sourceCodeHash": "0x082f3dcbc2fe4d93706c86aae85faa683387097d1b676e7ebd00f71ee0f13b71" }, { "contractName": "NonceHolder", "bytecodePath": "zkout/NonceHolder.sol/NonceHolder.json", "sourceCodePath": "contracts-preprocessed/NonceHolder.sol", - "bytecodeHash": "0x010000d1e115f2aef2379c5544d8484268e305a60871d658b7af0be1870d3ac0", + "bytecodeHash": "0x010000d1b03fc58609492a125c429077e65a4f566af9dfebd899ad127122a234", "sourceCodeHash": "0xcd0c0366effebf2c98c58cf96322cc242a2d1c675620ef5514b7ed1f0a869edc" }, { "contractName": "PubdataChunkPublisher", "bytecodePath": "zkout/PubdataChunkPublisher.sol/PubdataChunkPublisher.json", "sourceCodePath": "contracts-preprocessed/PubdataChunkPublisher.sol", - "bytecodeHash": "0x01000041bfabdaaca186f9dc45a63b51be68d169c295b738788bc26f59370281", + "bytecodeHash": "0x010000418f7a6ab81233720485c2ad728bdc23e2ad99068b149ecf19d111ac6e", "sourceCodeHash": "0xd7161e2c8092cf57b43c6220bc605c0e7e540bddcde1af24e2d90f75633b098e" }, { "contractName": "SystemContext", "bytecodePath": "zkout/SystemContext.sol/SystemContext.json", "sourceCodePath": "contracts-preprocessed/SystemContext.sol", - "bytecodeHash": "0x010001a5ede6eafde755e1630fd4b287ad382955fa0339cb1f0bef5d35f858a7", + "bytecodeHash": "0x010001a5ebd43618bd4de33a36d21b78d216631fab1c92df914723a325b95d3b", "sourceCodeHash": "0xf308743981ef5cea2f7a3332b8e51695a5e47e811a63974437fc1cceee475e7a" }, { "contractName": "EventWriter", "bytecodePath": "zkout/EventWriter.yul/contracts-preprocessed/EventWriter.yul.json", "sourceCodePath": "contracts-preprocessed/EventWriter.yul", - "bytecodeHash": "0x0100001739ee6f13091800b6cac4bd0c2c81dd81b449b6ddf3e663ce098c60ad", + "bytecodeHash": "0x01000017575446d56eb4e640189c5e356449975b957ae5262924567f4f664d75", "sourceCodeHash": "0xfcf4828bcc109dea5f88c38f428d9ac5e18d5a2767fa4909277802c7e38c1f93" }, { "contractName": "CodeOracle", "bytecodePath": "zkout/CodeOracle.yul/contracts-preprocessed/precompiles/CodeOracle.yul.json", "sourceCodePath": "contracts-preprocessed/precompiles/CodeOracle.yul", - "bytecodeHash": "0x010000210cd0b1ab22d71e01091a15cb8190e30d884784b092640d83aaf6c462", + "bytecodeHash": "0x010000213ed880e87b5121c3d96a0cf6787ca83dda10080a1d7cce7ad72bf6a6", "sourceCodeHash": "0x476063e7907f2b7a532c4da6f606fa07186b5a10d77af8fdd83dbea3d9f23f93" }, { "contractName": "EcAdd", "bytecodePath": "zkout/EcAdd.yul/contracts-preprocessed/precompiles/EcAdd.yul.json", "sourceCodePath": "contracts-preprocessed/precompiles/EcAdd.yul", - "bytecodeHash": "0x01000085f63553694e753270541123b5e2c2b809f1b883db3ceb830366524a40", + "bytecodeHash": "0x01000085bf765ff04ad45979da71816fba3bdee901366c5cce73c94f3ee37bb9", "sourceCodeHash": "0xdfec1c5f8c6a93df1c8821f1ac15058a18a640bcbdeb67dc4a017f2153ff1c86" }, { "contractName": "EcMul", "bytecodePath": "zkout/EcMul.yul/contracts-preprocessed/precompiles/EcMul.yul.json", "sourceCodePath": "contracts-preprocessed/precompiles/EcMul.yul", - "bytecodeHash": "0x010000bbf677d3be4dbbf5dad75e63e87f2b1baf1b457d2507cb58025e26a2bf", + "bytecodeHash": "0x010000bbb84f463e70d100c271744ab9827d4c9b66ee4356a0c697dcb54e3b87", "sourceCodeHash": "0x0e3f320c8a9532425b85809bf0a2136e707046a01bf20491ec03c77887516c43" }, { "contractName": "EcPairing", "bytecodePath": "zkout/EcPairing.yul/contracts-preprocessed/precompiles/EcPairing.yul.json", "sourceCodePath": "contracts-preprocessed/precompiles/EcPairing.yul", - "bytecodeHash": "0x01000ef38d94382bae33b3ffc36660e56b2df54c49c32963f49153830c36121e", + "bytecodeHash": "0x01000ef37666c6447ad953d8be7ca75d4a0de3d5fd57a3966906d2c5577111ab", "sourceCodeHash": "0x5d008cedc44e0e52c2567fd2b877916b2ec5e7c80294cf99b66485e50a6f2c12" }, { "contractName": "Ecrecover", "bytecodePath": "zkout/Ecrecover.yul/contracts-preprocessed/precompiles/Ecrecover.yul.json", "sourceCodePath": "contracts-preprocessed/precompiles/Ecrecover.yul", - "bytecodeHash": "0x01000013ffc212bb76a7b9108abff6be1d0746154e36d32e9c69268ef95e556a", + "bytecodeHash": "0x01000013409fe778437b58e5819ee48a658fb09b86bb7badf93cb334c16cc632", "sourceCodeHash": "0x21e03ab7a5f518a21258669c82506b1d4d1141f8fd4f30bb385f9730580ddd3c" }, { "contractName": "Keccak256", "bytecodePath": "zkout/Keccak256.yul/contracts-preprocessed/precompiles/Keccak256.yul.json", "sourceCodePath": "contracts-preprocessed/precompiles/Keccak256.yul", - "bytecodeHash": "0x0100000f16ef9261284d26f08a560cd482ff7eb7944fe37ac99113aa4eb75188", + "bytecodeHash": "0x0100000fb95dd6f46682ea2f0b187124613531b459091a6c38dc9d0260e5fff1", "sourceCodeHash": "0xb454e7760732ce1fffc75174c8cf54dca422206cf1e52a29d274b310b574f26d" }, { "contractName": "P256Verify", "bytecodePath": "zkout/P256Verify.yul/contracts-preprocessed/precompiles/P256Verify.yul.json", "sourceCodePath": "contracts-preprocessed/precompiles/P256Verify.yul", - "bytecodeHash": "0x0100000ff914846f07b729f21be741f039c13d9c8e7c53e4db3a4c9a9f7e022d", + "bytecodeHash": "0x0100000f72c45ba0985fe38394a29445cb337c127afb0da5e94211d518a00949", "sourceCodeHash": "0x976b68d0362307313fd1aaea309eaa2d849187f37da451618c70dd3a6ac3cf3c" }, { "contractName": "SHA256", "bytecodePath": "zkout/SHA256.yul/contracts-preprocessed/precompiles/SHA256.yul.json", "sourceCodePath": "contracts-preprocessed/precompiles/SHA256.yul", - "bytecodeHash": "0x01000017cac2faad1aa8a1fd865fa464fbf092dbd8031dedb52fa6b8632e5b97", + "bytecodeHash": "0x010000176a7caf23abe1829a27684e6172e72e3b8a1d201364c5bbe53615202b", "sourceCodeHash": "0xfd4290467e26e992f39db9ca132e78ce99ce042b0254a368f1d7832dc94ddefb" }, { "contractName": "bootloader_test", "bytecodePath": "zkout/bootloader_test.yul/contracts-preprocessed/bootloader/bootloader_test.yul.json", "sourceCodePath": "bootloader/build/bootloader_test.yul", - "bytecodeHash": "0x010003ade02adac2c039832861a6649c6cbb7abbb2ff8542c6aefff7bde06a9c", + "bytecodeHash": "0x010003ad66a3c11e49c10fa3b03809e965e1983372bf5425e61182ac7a55d2e1", "sourceCodeHash": "0x006fdf461899dec5fdb34301c23e6819eb93e275907cbfc67d73fccfb47cae68" }, { "contractName": "dummy", "bytecodePath": "zkout/dummy.yul/contracts-preprocessed/bootloader/dummy.yul.json", "sourceCodePath": "bootloader/build/dummy.yul", - "bytecodeHash": "0x01000007b6aafb589f3b3d53466cb263cb237e75169fba7ba728aba0134007f9", + "bytecodeHash": "0x0100000799df180103cb4323acaa77800d219c3e00d3eeed7774d1fbdad4b930", "sourceCodeHash": "0xfac5ca11a9882425af93fe5bac6d10055b119cf13af79e6a2f4e74e8411b9c85" }, { "contractName": "fee_estimate", "bytecodePath": "zkout/fee_estimate.yul/contracts-preprocessed/bootloader/fee_estimate.yul.json", "sourceCodePath": "bootloader/build/fee_estimate.yul", - "bytecodeHash": "0x01000905327a3aeb212816e7e0f6c16c5acc491c714c06d823c4bbc7075b62d6", + "bytecodeHash": "0x01000905f08fe63941a99ae6f9da44c44d038cbc48a39d517bd24e672c5b50b7", "sourceCodeHash": "0x8a858319bac2924a3dee778218a7fe5e23898db0d87b02d7b783f94c5a02d257" }, { "contractName": "gas_test", "bytecodePath": "zkout/gas_test.yul/contracts-preprocessed/bootloader/gas_test.yul.json", "sourceCodePath": "bootloader/build/gas_test.yul", - "bytecodeHash": "0x01000871cdb46e23c5b65176cd772e368d255c80290058b89e9644efbe8d7c53", + "bytecodeHash": "0x01000871ca053253e09ee8d138c1fa7194bd3ef64b9ea36514aa13f997626d49", "sourceCodeHash": "0x89f5ad470f10e755fa57b82507518e571c24409a328bc33aeba26e9518ad1c3e" }, { "contractName": "playground_batch", "bytecodePath": "zkout/playground_batch.yul/contracts-preprocessed/bootloader/playground_batch.yul.json", "sourceCodePath": "bootloader/build/playground_batch.yul", - "bytecodeHash": "0x01000909408f87054598e7a1e9fbc58e0e9733b0ab5030618eef36ef746cac68", + "bytecodeHash": "0x01000909e749e13a2298999bd6a24030c144156b18f8531b9e4fdb009f23287a", "sourceCodeHash": "0x769448c4fd2b65c43d758ca5f34dd29d9b9dd3000fd0ec89cffcaf8d365a64fd" }, { "contractName": "proved_batch", "bytecodePath": "zkout/proved_batch.yul/contracts-preprocessed/bootloader/proved_batch.yul.json", "sourceCodePath": "bootloader/build/proved_batch.yul", - "bytecodeHash": "0x01000881f046342b70470a7e81423b5903dfe06669d01292e7dc6f8eb73bf404", + "bytecodeHash": "0x01000881ede3f4dc1d05626f241363b01670a395d54b74227348ed824f1c3dbd", "sourceCodeHash": "0x908bc6ddb34ef89b125e9637239a1149deacacd91255781d82a65a542a39036e" }, { "contractName": "transfer_test", "bytecodePath": "zkout/transfer_test.yul/contracts-preprocessed/bootloader/transfer_test.yul.json", "sourceCodePath": "bootloader/build/transfer_test.yul", - "bytecodeHash": "0x0100001532ccf5b061252699f6d2c677d987c775f48152271d5be4f02e41e454", + "bytecodeHash": "0x01000015904f1cc3ac2c66713ca1eaf00c27988a8d00515a743fb81a9919bdcc", "sourceCodeHash": "0xb828600c6f7366971580b68da39c3e449b9a0f922f52dd9841f33ae7f51ee71c" } ] diff --git a/system-contracts/foundry.toml b/system-contracts/foundry.toml index 4f5780943..98d9b22bd 100644 --- a/system-contracts/foundry.toml +++ b/system-contracts/foundry.toml @@ -10,6 +10,6 @@ remappings = [ ] [profile.default.zksync] -zksolc = "1.5.6" +zksolc = "1.5.7" enable_eravm_extensions = true suppressed_errors = ["sendtransfer"] diff --git a/system-contracts/hardhat.config.ts b/system-contracts/hardhat.config.ts index 5a6ab2986..a6e5dc44a 100644 --- a/system-contracts/hardhat.config.ts +++ b/system-contracts/hardhat.config.ts @@ -5,27 +5,11 @@ import "@matterlabs/hardhat-zksync-verify"; import "@nomiclabs/hardhat-ethers"; import "hardhat-typechain"; -// This version of system contracts requires a pre release of the compiler -const COMPILER_VERSION = "v1.5.6"; -const PRE_RELEASE_VERSION = "1.5.6"; -function getZksolcUrl(): string { - // @ts-ignore - const platform = { darwin: "macosx", linux: "linux", win32: "windows" }[process.platform]; - // @ts-ignore - const toolchain = { linux: "-musl", win32: "-gnu", darwin: "" }[process.platform]; - const arch = process.arch === "x64" ? "amd64" : process.arch; - const ext = process.platform === "win32" ? ".exe" : ""; - - return `https://github.com/matter-labs/era-compiler-solidity/releases/download/${PRE_RELEASE_VERSION}/zksolc-${platform}-${arch}${toolchain}-${COMPILER_VERSION}${ext}`; -} - -console.log(`Using zksolc from ${getZksolcUrl()}`); - export default { zksolc: { + version: "1.5.7", compilerSource: "binary", settings: { - compilerPath: getZksolcUrl(), enableEraVMExtensions: true, suppressedErrors: ["sendtransfer"], }, diff --git a/system-contracts/scripts/compile-yul.ts b/system-contracts/scripts/compile-yul.ts index e22f26b97..fd5061a5e 100644 --- a/system-contracts/scripts/compile-yul.ts +++ b/system-contracts/scripts/compile-yul.ts @@ -5,8 +5,8 @@ import * as fs from "fs"; import { Command } from "commander"; import * as _path from "path"; -const COMPILER_VERSION = "1.5.6"; -const IS_COMPILER_PRE_RELEASE = true; +const COMPILER_VERSION = "1.5.7"; +const IS_COMPILER_PRE_RELEASE = false; const CONTRACTS_DIR = "contracts-preprocessed"; const BOOTLOADER_DIR = "bootloader"; const TIMESTAMP_FILE_YUL = "last_compilation_yul.timestamp"; diff --git a/system-contracts/scripts/compile-zasm.ts b/system-contracts/scripts/compile-zasm.ts index 8ae15bf16..de0f84d4c 100644 --- a/system-contracts/scripts/compile-zasm.ts +++ b/system-contracts/scripts/compile-zasm.ts @@ -3,8 +3,8 @@ import type { CompilerPaths } from "./utils"; import { spawn, compilerLocation, prepareCompilerPaths } from "./utils"; import * as fs from "fs"; -const COMPILER_VERSION = "1.5.6"; -const IS_COMPILER_PRE_RELEASE = true; +const COMPILER_VERSION = "1.5.7"; +const IS_COMPILER_PRE_RELEASE = false; export async function compileZasm(paths: CompilerPaths, file: string) { const zksolcLocation = await compilerLocation(COMPILER_VERSION, IS_COMPILER_PRE_RELEASE);