Code Monkey home page Code Monkey logo

zksync-era's Introduction

ZKsync Era: A ZK Rollup For Scaling Ethereum

Logo

ZKsync Era is a layer 2 rollup that uses zero-knowledge proofs to scale Ethereum without compromising on security or decentralization. Since it's EVM compatible (Solidity/Vyper), 99% of Ethereum projects can redeploy without refactoring or re-auditing a single line of code. ZKsync Era also uses an LLVM-based compiler that will eventually let developers write smart contracts in C++, Rust and other popular languages.

Knowledge Index

The following questions will be answered by the following resources:

Question Resource
What do I need to develop the project locally? development.md
How can I set up my dev environment? setup-dev.md
How can I run the project? launch.md
What is the logical project structure and architecture? architecture.md
Where can I find protocol specs? specs.md
Where can I find developer docs? docs

Policies

License

ZKsync Era is distributed under the terms of either

at your option.

Official Links

Disclaimer

ZKsync Era has been through lots of testing and audits. Although it is live, it is still in alpha state and will go through more audits and bug bounty programs. We would love to hear our community's thoughts and suggestions about it! It is important to state that forking it now can potentially lead to missing important security updates, critical features, and performance improvements.

zksync-era's People

Contributors

akash-chandrakar avatar anastasiiavashchuk avatar aon avatar artemka374 avatar artmakh avatar colocarletti avatar deniallugo avatar dutterbutter avatar emilluta avatar haraldh avatar hatemosphere avatar ischasny avatar itegulov avatar joonazan avatar koloz193 avatar matias-gonz avatar mm-zk avatar montekki avatar otani88 avatar pbeza avatar perekopskiy avatar pompon0 avatar popzxc avatar romanbrodetski avatar shahar4 avatar slowli avatar stanislavbreadless avatar tomg10 avatar yorik avatar zksync-era-bot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

zksync-era's Issues

build_transaction 'Method not found'

router.functions.swap(paths, amountOutMin, deadline).build_transaction( {
"chainId":324,
"from": caller,
'gas': 1557329 ,
' gasPrice': int(0.25*10**9),

        'value': amount,
        'nonce': nonce,

    })

this error occurs 'code': -32601, 'message': 'Method not found'

How should I use python to interact with smart contracts

zk init error

  Compiling zkevm_test_harness v1.3.1 (https://github.com/matter-labs/era-zkevm_test_harness.git?branch=main#cfac36a3)
error[E0046]: not all trait items implemented, missing: `report_new_callstack_frame`
    --> /Users/kaichen/.cargo/git/checkouts/era-zkevm_test_harness-22d97ff2abf02d7d/cfac36a/src/witness/oracle.rs:1250:1
     |
1250 | impl<E: Engine> WitnessOracle<E> for VmWitnessOracle<E> {
     | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `report_new_callstack_frame` in implementation
     |
     = help: implement the missing item: `fn report_new_callstack_frame(&mut self, _: &ExecutionContextRecord<E>, _: sync_vm::vm::primitives::UInt32<E>, _: &sync_vm::franklin_crypto::plonk::circuit::boolean::Boolean, _: &sync_vm::franklin_crypto::plonk::circuit::boolean::Boolean) { todo!() }`

For more information about this error, try `rustc --explain E0046`.
error: could not compile `zkevm_test_harness` due to previous error
error: `cargo check` failed with status: exit status: 101
   Compiling zkevm_test_harness v1.3.1 (https://github.com/matter-labs/era-zkevm_test_harness.git?branch=main#cfac36a3)
error[E0046]: not all trait items implemented, missing: `report_new_callstack_frame`
    --> /Users/kaichen/.cargo/git/checkouts/era-zkevm_test_harness-22d97ff2abf02d7d/cfac36a/src/witness/oracle.rs:1250:1
     |
1250 | impl<E: Engine> WitnessOracle<E> for VmWitnessOracle<E> {
     | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `report_new_callstack_frame` in implementation
     |
     = help: implement the missing item: `fn report_new_callstack_frame(&mut self, _: &ExecutionContextRecord<E>, _: sync_vm::vm::primitives::UInt32<E>, _: &sync_vm::franklin_crypto::plonk::circuit::boolean::Boolean, _: &sync_vm::franklin_crypto::plonk::circuit::boolean::Boolean) { todo!() }`

For more information about this error, try `rustc --explain E0046`.
error: could not compile `zkevm_test_harness` due to previous error
error: `cargo check` failed with status: exit status: 101
Error: Child process exited with code 1

when I run "zk init" ,there's an error,

I use the main branch to deploy the project,when I run "zk init", how to fix it

Running server genesis setup
Updating git repository https://github.com/matter-labs/era-zk_evm.git
Updating git repository https://github.com/matter-labs/era-zkEVM-assembly.git
Updating git repository https://github.com/matter-labs/era-zkevm_test_harness.git
Updating git repository https://github.com/matter-labs/era-circuit_testing.git
Updating git repository https://github.com/matter-labs/era-zkevm_opcode_defs.git
Updating crates.io index
Updating git repository https://github.com/matter-labs/era-sync_vm.git
error: failed to select a version for regex.
... required by package zkevm-assembly v1.3.2 (https://github.com/matter-labs/era-zkEVM-assembly.git?branch=v1.3.2#8a339104)
... which satisfies git dependency zkevm-assembly of package vm v0.1.0 (/mnt/volume_nyc1_02/zksync-era/core/lib/vm)
... which satisfies path dependency vm (locked to 0.1.0) of package system-constants-generator v0.1.0 (/mnt/volume_nyc1_02/zksync-era/core/bin/system-constants-generator)
versions that meet the requirements ^1.8 are: 1.8.4, 1.8.3, 1.8.2, 1.8.1, 1.8.0

all possible versions conflict with previously selected packages.

previously selected package regex v1.7.3
... which satisfies dependency regex = "^1.5" (locked to 1.7.3) of package actix-router v0.5.1
... which satisfies dependency actix-router = "^0.5" (locked to 0.5.1) of package actix-web v4.3.1
... which satisfies dependency actix-web = "^4" (locked to 4.3.1) of package actix-cors v0.6.4
... which satisfies dependency actix-cors = "^0.6.0-beta.2" (locked to 0.6.4) of package zksync_core v1.0.0 (/mnt/volume_nyc1_02/zksync-era/core/bin/zksync_core)
... which satisfies path dependency zksync_core (locked to 1.0.0) of package zksync_external_node v1.0.0 (/mnt/volume_nyc1_02/zksync-era/core/bin/external_node)

failed to select a version for regex which could resolve this conflict

Requesting for traces is not available for historical blocks

Hello, I can't get the traces before block 2219807.

This is the example for the request

curl --location 'https://mainnet.era.zksync.io' \
--header 'Content-Type: application/json' \
--data ' {
  "jsonrpc": "2.0",
  "method": "debug_traceBlockByNumber",
  "params": [
    "0x4995d", 
    {
      "tracer": "callTracer",
      "tracerConfig": {"onlyTopCall": false}
    }
  ],
  "id": 1
}
'
-- response
{
    "jsonrpc": "2.0",
    "result": [],
    "id": 1
}

And I can find the tx in this block in scan https://explorer.zksync.io/block/301405 . It should not be empty.

Deprecated zksolc compiler version in hardhat config file

I get an error during zk init command execution at the commit 1283a410c918568808de7897f3b4bb6b57da98a0:

> Compile l2 contracts
yarn run v1.22.19
$ /home/zk-module-experimental/node_modules/.bin/hardhat compile
Nothing to compile
Done in 0.52s.
yarn install v1.22.19
[1/4] Resolving packages...
success Already up-to-date.
Done in 0.28s.
yarn run v1.22.19
$ /home/zk-module-experimental/etc/system-contracts/node_modules/.bin/hardhat compile
Error in plugin @matterlabs/hardhat-zksync-solc: Deprecated zksolc compiler version in hardhat config file (1.3.1). Please use versions 1.3.13 to 1.3.13.

when I tried to change the version from 1.3.1 to 1.3.13 I got an error

$ /home/zk-module-experimental/etc/system-contracts/node_modules/.bin/hardhat run ./scripts/compile-yul.ts
Creating Typechain artifacts in directory typechain for target ethers-v5
Successfully generated Typechain artifacts!
Error: (0 , hardhat_zksync_solc_1.getZksolcPath) is not a function

my command history

 2083  zk
 2084  zk init
 2085  cargo update --package regex
 2086  zk init
 2087  cd etc/system-contracts/
 2088  yarn add -D @matterlabs/hardhat-zksync-solc
 2089  cd ../../
 2090  zk clean --all && zk init

could you please help me with that?

zk init error

I'm trying to build the server from the source code on Ubuntu 20.04, but got an error while running zk init:

$ zk init

-------------------------
> Creating docker volumes
✔ Creating docker volumes done (13ms)

----------------
> Pulling images
Pulling geth     ... done
Pulling postgres ... done
✔ Pulling images done (9700ms)

----------------------
> Checking environment
✔ Checking environment done (46ms)

--------------------
> Checking git hooks
✔ Checking git hooks done (2ms)

-----------------------
> Setting up containers
zksync-era_postgres_1 is up-to-date
zksync-era_geth_1 is up-to-date
✔ Setting up containers done (386ms)

-------------------------------------
> Checkout system-contracts submodule
✔ Checkout system-contracts submodule done (25ms)

-----------------------
> Compiling JS packages
yarn install v1.22.19
[1/4] Resolving packages...
success Already up-to-date.
Done in 0.40s.
yarn run v1.22.19
$ yarn npm-run-all --parallel build:*
$ /lotus/zksync/zksync-era/node_modules/.bin/npm-run-all --parallel 'build:*'
$ yarn web3 build
$ yarn reading-tool build
$ yarn workspace zksync-web3 build
$ yarn workspace reading-tool build
$ tsc && cp -f typechain/*.d.ts build/typechain
$ tsc
Done in 5.19s.
✔ Compiling JS packages done (5944ms)

----------------------
> Compile l2 contracts
yarn run v1.22.19
$ /lotus/zksync/zksync-era/node_modules/.bin/hardhat compile
Nothing to compile
Done in 0.47s.
yarn install v1.22.19
[1/4] Resolving packages...
success Already up-to-date.
Done in 0.40s.
yarn run v1.22.19
$ /lotus/zksync/zksync-era/node_modules/.bin/hardhat compile
Nothing to compile
Done in 0.24s.
yarn run v1.22.19
error Command "preprocess" not found.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Error: Child process exited with code 1

I tried install preprocess via yarn, but the output remains the same. How can i fix it?

compile error

compile error for zksync-era

error[E0282]: type annotations needed
   --> core/bin/system-constants-generator/src/main.rs:126:9
    |
126 | /         vec![
127 | |         ]
    | |_________^ cannot infer type of the type parameter `T` declared on the struct `Vec`
    |
    = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)

For more information about this error, try `rustc --explain E0282`.
error: could not compile `system-constants-generator` due to previous error
warning: build failed, waiting for other jobs to finish...

error while using zk init command its not pulling out the images correctly

zk init


Creating docker volumes
✔ Creating docker volumes done (0ms)


Pulling images
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 699, in urlopen
httplib_response = self._make_request(
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 394, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/usr/lib/python3.10/http/client.py", line 1282, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/lib/python3.10/http/client.py", line 1328, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/usr/lib/python3.10/http/client.py", line 1277, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/lib/python3.10/http/client.py", line 1037, in _send_output
self.send(msg)
File "/usr/lib/python3.10/http/client.py", line 975, in send
self.connect()
File "/usr/lib/python3/dist-packages/docker/transport/unixconn.py", line 30, in connect
sock.connect(self.unix_socket)
PermissionError: [Errno 13] Permission denied

How to upgrade to a new version

How to upgrade to a new version, including l1 contracts, l2 contracts and system contracts?
Is there a script to do that?

`zk test rust` error MacOS

I'm trying to run zk test rust, but i keep getting the following error:

Some errors have detailed explanations: E0277, E0609.
For more information about an error, try `rustc --explain E0277`.
warning: `zksync_dal` (lib) generated 26 warnings
error: could not compile `zksync_dal` due to 227 previous errors; 26 warnings emitted
warning: build failed, waiting for other jobs to finish...
Error: Child process exited with code 101

Screen Shot 2023-05-08 at 6 34 44 PM

insert or update on table "factory_deps" violates foreign key constraint error

when run external node, it show below errors:

2023-06-01T14:58:27.060483Z  INFO zksync_external_node: Started the external node
2023-06-01T14:58:27.060500Z  INFO zksync_external_node: Main node URL is: https://zksync2-mainnet.zksync.io:443
2023-06-01T14:58:27.078888Z  INFO zksync_core::genesis: running regenesis
2023-06-01T14:58:28.689813Z  INFO zksync_core::genesis: chain_schema_genesis is complete
2023-06-01T14:58:28.743148Z  INFO zksync_core::genesis: operations_schema_genesis is complete
CONTRACTS_GENESIS_ROOT=0xbc59c242d551e3939b9b2939b8b686efa77ba3833183045d548aa5f53357ba95
CONTRACTS_GENESIS_BLOCK_COMMITMENT=0x37d58c849a0eaf7c8b842ec04a5cfeb854f547e0a040d6717cfeb778bfc072fa
CONTRACTS_GENESIS_ROLLUP_LEAF_INDEX=21
CHAIN_STATE_KEEPER_BOOTLOADER_HASH=0x010007794e73f682ad6d27e86b6f71bbee875fc26f5708d1713e7cfd476098d3
CHAIN_STATE_KEEPER_DEFAULT_AA_HASH=0x0100067d861e2f5717a12c3e869cfb657793b86bbb0caa05cc1421f16c5217bc
2023-06-01T14:58:29.028072Z  INFO zksync_core::sync_layer::external_io: Initialized the ExternalIO: current L1 batch number 1, current miniblock number 1
2023-06-01T14:58:29.109201Z  INFO zksync_core::sync_layer::fetcher: Starting the fetcher routine. Initial miniblock: 1, initial l1 batch: 0
2023-06-01T14:58:29.109554Z  INFO zksync_core::state_keeper::keeper: Starting state keeper. Next l1 batch to seal: 1, Next miniblock to seal: 1
2023-06-01T14:58:29.111344Z  INFO zksync_core::consistency_checker: Starting consistency checker from batch 1
2023-06-01T14:58:29.114647Z  INFO zksync_core::metadata_calculator::updater: Initialized metadata calculator with new tree implementation. Current RocksDB block: 1. Current Postgres block: 1
2023-06-01T14:58:29.114906Z  INFO zksync_core::state_keeper::keeper: There is no open pending batch, starting a new empty batch
2023-06-01T14:58:29.114918Z DEBUG zksync_core::sync_layer::external_io: Waiting for the new batch params
2023-06-01T14:58:29.172915Z  WARN zksync_core::data_fetchers::error: [TokenListFetcher] Parse data error: error decoding response body: expected value at line 1 column 1 file="core/bin/zksync_core/src/data_fetchers/error.rs" line=70 column=17
2023-06-01T14:58:30.115570Z DEBUG zksync_core::sync_layer::external_io: Waiting for the new batch params
2023-06-01T14:58:30.681705Z  INFO zksync_core::sync_layer::fetcher: New batch: 1. Timestamp: 1676384542
2023-06-01T14:58:30.681747Z  INFO zksync_core::sync_layer::fetcher: New miniblock: 1
2023-06-01T14:58:30.715982Z  INFO zksync_core::sync_layer::external_io: Getting previous block hash
2023-06-01T14:58:30.716785Z  INFO zksync_core::sync_layer::external_io: Previous l1_batch_hash: 85193405663032319915008731881807224107828471675661128689794724912223424592533
2023-06-01T14:58:30.716808Z  INFO zksync_core::sync_layer::external_io: Previous l1_batch_hash: 85193405663032319915008731881807224107828471675661128689794724912223424592533
2023-06-01T14:58:30.717425Z  INFO zksync_core::sync_layer::external_io: Fetching base system contract bytecode from the main node
2023-06-01T14:58:30.887785Z  INFO zksync_core::sync_layer::fetcher: Batch 1: committed
2023-06-01T14:58:30.887802Z  INFO zksync_core::sync_layer::fetcher: Batch 1: proven
2023-06-01T14:58:30.887812Z  INFO zksync_core::sync_layer::fetcher: Batch 1: executed
2023-06-01T14:58:31.094588Z  INFO zksync_core::sync_layer::fetcher: New miniblock: 2

thread 'tokio-runtime-worker' panicked at 'called `Result::unwrap()` on an `Err` value: Database(PgDatabaseError { severity: Error, code: "23503", message: "insert or update on table \"factory_deps\" violates foreign key constraint \"factory_deps_miniblock_number_fkey\"", detail: Some("Key (miniblock_number)=(1) is not present in table \"miniblocks\"."), hint: None, position: None, where: None, schema: Some("public"), table: Some("factory_deps"), column: None, data_type: None, constraint: Some("factory_deps_miniblock_number_fkey"), file: Some("ri_triggers.c"), line: Some(2463), routine: Some("ri_ReportViolation") })', core/lib/dal/src/storage_dal.rs:44:14
stack backtrace:
   0:     0x565371e00a7a - std::backtrace_rs::backtrace::libunwind::trace::h79937bc171ada62c
                               at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x565371e00a7a - std::backtrace_rs::backtrace::trace_unsynchronized::h2292bca8571cb919
                               at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x565371e00a7a - std::sys_common::backtrace::_print_fmt::h9c461f248e4ae90d
                               at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/std/src/sys_common/backtrace.rs:65:5
   3:     0x565371e00a7a - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::he9fe6bf1a39182e1
                               at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x565371e2685e - core::fmt::write::h032658c119c720d7
                               at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/core/src/fmt/mod.rs:1208:17
   5:     0x565371dfab45 - std::io::Write::write_fmt::h299fc90dfae41c0d
                               at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/std/src/io/mod.rs:1682:15
   6:     0x565371e00845 - std::sys_common::backtrace::_print::heb70d25df9937e3f
                               at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/std/src/sys_common/backtrace.rs:47:5
   7:     0x565371e00845 - std::sys_common::backtrace::print::had745c0a76b8b521
                               at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/std/src/sys_common/backtrace.rs:34:9
   8:     0x565371e0249f - std::panicking::default_hook::{{closure}}::h1ea782cdfa2fd097
                               at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/std/src/panicking.rs:267:22
   9:     0x565371e021db - std::panicking::default_hook::h1cc3af63455a163c
                               at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/std/src/panicking.rs:286:9
  10:     0x565371e02bac - std::panicking::rust_panic_with_hook::h5cafdc4b3bfd5528
                               at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/std/src/panicking.rs:688:13
  11:     0x565371e02949 - std::panicking::begin_panic_handler::{{closure}}::hf31c60f40775892c
                               at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/std/src/panicking.rs:579:13
  12:     0x565371e00f2c - std::sys_common::backtrace::__rust_end_short_backtrace::h28a5c7be595826cd
                               at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/std/src/sys_common/backtrace.rs:137:18
  13:     0x565371e02652 - rust_begin_unwind
                               at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/std/src/panicking.rs:575:5
  14:     0x565370660f63 - core::panicking::panic_fmt::h8fa27a0b37dd98b7
                               at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/core/src/panicking.rs:64:14
  15:     0x5653706613f3 - core::result::unwrap_failed::h62abf61e411aaa08
                               at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/core/src/result.rs:1791:5
  16:     0x565370ef4aaa - std::thread::local::LocalKey<T>::with::h2a526c24981b6747
  17:     0x56537104cfef - <futures_lite::future::Or<F1,F2> as core::future::future::Future>::poll::h77a06b9c829f316d
  18:     0x565370fc9434 - async_io::driver::block_on::h1a408de39a017c65
  19:     0x565370f11dfa - std::thread::local::LocalKey<T>::with::h8144249a518c0073
  20:     0x565370f2c493 - std::thread::local::LocalKey<T>::with::ha8e97e6d878940b3
  21:     0x565370f075e5 - std::thread::local::LocalKey<T>::with::h5e3a59a8ba023484
  22:     0x565370ecb6e1 - async_std::task::builder::Builder::blocking::h6236099b77627694
  23:     0x565370e67eb0 - zksync_dal::storage_dal::StorageDal::insert_factory_deps::h15f5e7df06276d96
  24:     0x565370bbb167 - zksync_core::sync_layer::external_io::ExternalIO::get_base_system_contract::hf62a7e0dd594674f
  25:     0x565370a75526 - zksync_core::state_keeper::io::common::poll_until::h7945bc51736b5aff
  26:     0x565370bbb7f5 - <zksync_core::sync_layer::external_io::ExternalIO as zksync_core::state_keeper::io::StateKeeperIO>::wait_for_new_batch_params::hf02a6e287b428399
  27:     0x565370adb7a7 - zksync_core::state_keeper::keeper::ZkSyncStateKeeper::wait_for_new_batch_params::h0a4be13bd0090479
  28:     0x565370ad6a50 - zksync_core::state_keeper::keeper::ZkSyncStateKeeper::run_inner::h6d161ab9ba4d6690
  29:     0x565370ad5829 - zksync_core::state_keeper::keeper::ZkSyncStateKeeper::run::hf84973cb78dcd70d
  30:     0x565370760060 - tokio::loom::std::unsafe_cell::UnsafeCell<T>::with_mut::ha31b58a84527b4cc
  31:     0x565370852617 - tokio::runtime::task::core::Core<T,S>::poll::h2e858048874d2431
  32:     0x5653707d7802 - tokio::runtime::task::harness::Harness<T,S>::poll::hed4245f88475a679
  33:     0x565371da71e8 - tokio::runtime::blocking::pool::Inner::run::h5e955592e87dac7b
  34:     0x565371da873a - std::sys_common::backtrace::__rust_begin_short_backtrace::hfab7d4e1fe9df520
  35:     0x565371dba47b - core::ops::function::FnOnce::call_once{{vtable.shim}}::h923b5256cb5f2ded
  36:     0x565371e05f83 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hb77d8d72ebcf79c4
                               at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/alloc/src/boxed.rs:2000:9
  37:     0x565371e05f83 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hc08c3353e1568487
                               at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/alloc/src/boxed.rs:2000:9
  38:     0x565371e05f83 - std::sys::unix::thread::Thread::new::thread_start::h7168e596cd5e5ce6
                               at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/std/src/sys/unix/thread.rs:108:17
  39:     0x7fdc42c1bfa3 - start_thread
  40:     0x7fdc429c306f - clone
  41:                0x0 - <unknown>
2023-06-02T04:53:07.619909Z ERROR zksync_core: One of the tokio actors unexpectedly finished, shutting down: JoinError::Panic(Id(53), ...) file="core/bin/zksync_core/src/lib.rs" line=98 column=13
2023-06-02T04:53:07.619979Z  INFO zksync_storage::db: Waiting for all the RocksDB instances to be dropped, 1 remaining
2023-06-02T04:53:07.620101Z  INFO zksync_core::metadata_calculator::updater: Stop signal received, metadata_calculator is shutting down
2023-06-02T04:53:07.620114Z  INFO zksync_core::api_server::web3: Stop signal received, WS JSON RPC API is shutting down
2023-06-02T04:53:07.620784Z  INFO zksync_storage::db: All the RocksDB instances are dropped
2023-06-02T04:53:07.648760Z  INFO zksync_core::api_server::web3::pubsub_notifier: Stop signal received, pubsub_tx_notifier is shutting down
2023-06-02T04:53:07.648861Z  INFO zksync_core::api_server::web3::pubsub_notifier: Stop signal received, pubsub_logs_notifier is shutting down
2023-06-02T04:53:07.652091Z  INFO zksync_core::api_server::web3::pubsub_notifier: Stop signal received, pubsub_block_notifier is shutting down
2023-06-02T04:53:07.754485Z  INFO zksync_core::sync_layer::fetcher: New batch: 2. Timestamp: 1676429272
2023-06-02T04:53:07.754505Z  INFO zksync_core::sync_layer::fetcher: New miniblock: 3
2023-06-02T04:53:07.968675Z  INFO zksync_core::sync_layer::fetcher: Batch 2: committed
2023-06-02T04:53:07.968689Z  INFO zksync_core::sync_layer::fetcher: Batch 2: proven
2023-06-02T04:53:07.968696Z  INFO zksync_core::sync_layer::fetcher: Batch 2: executed
2023-06-02T04:53:07.968703Z  INFO zksync_core::sync_layer::fetcher: Stop signal received, exiting the fetcher routine
2023-06-02T04:53:10.648935Z  INFO zksync_core::consistency_checker: Stop signal received, consistency_checker is shutting down
2023-06-02T04:53:10.650241Z  INFO zksync_core::sync_layer::batch_status_updater: Stop signal receiver, exiting the batch status updater routine
2023-06-02T04:53:10.897976Z  INFO zksync_core::l1_gas_price::main_node_fetcher: Stop signal received, MainNodeGasPriceFetcher is shutting down

Compile error when running zksync_server

➜  zksync-era git:(main) ✗ cargo run --bin zksync_server
   Compiling zkevm_test_harness v1.3.1 (https://github.com/matter-labs/era-zkevm_test_harness.git?branch=main#cfac36a3)
   Compiling librocksdb-sys v0.6.1+6.28.2
   Compiling rocksdb v0.18.0
error[E0046]: not all trait items implemented, missing: `report_new_callstack_frame`
    --> /Users/bgd/.cargo/git/checkouts/era-zkevm_test_harness-22d97ff2abf02d7d/cfac36a/src/witness/oracle.rs:1250:1
     |
1250 | impl<E: Engine> WitnessOracle<E> for VmWitnessOracle<E> {
     | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `report_new_callstack_frame` in implementation
     |
     = help: implement the missing item: `fn report_new_callstack_frame(&mut self, _: &ExecutionContextRecord<E>, _: sync_vm::vm::primitives::UInt32<E>, _: &sync_vm::franklin_crypto::plonk::circuit::boolean::Boolean, _: &sync_vm::franklin_crypto::plonk::circuit::boolean::Boolean) { todo!() }`

For more information about this error, try `rustc --explain E0046`.
error: could not compile `zkevm_test_harness` due to previous error
warning: build failed, waiting for other jobs to finish...

Error when run `zk init`

I ran zk init and I got this error

> Running server genesis setup
    Finished release [optimized] target(s) in 0.57s
     Running `target/release/zksync_server --genesis`
2023-06-21T07:49:51.442941Z  INFO zksync_core::genesis: running regenesis
thread 'main' panicked at 'Can't read .zbin bytecode at "/home/developer/zksync-era/etc/system-contracts/contracts/precompiles/artifacts/Keccak256.yul/Keccak256.yul.zbin": No such file or directory (os error 2)', core/lib/contracts/src/lib.rs:195:31
stack backtrace:
   0:     0x559f9fe5423a - std::backtrace_rs::backtrace::libunwind::trace::h79937bc171ada62c
                               at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x559f9fe5423a - std::backtrace_rs::backtrace::trace_unsynchronized::h2292bca8571cb919
                               at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x559f9fe5423a - std::sys_common::backtrace::_print_fmt::h9c461f248e4ae90d
                               at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/std/src/sys_common/backtrace.rs:65:5
   3:     0x559f9fe5423a - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::he9fe6bf1a39182e1
                               at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x559f9fe7a84e - core::fmt::write::h032658c119c720d7
                               at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/core/src/fmt/mod.rs:1208:17
   5:     0x559f9fe4df25 - std::io::Write::write_fmt::h299fc90dfae41c0d
                               at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/std/src/io/mod.rs:1682:15
   6:     0x559f9fe54005 - std::sys_common::backtrace::_print::heb70d25df9937e3f
                               at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/std/src/sys_common/backtrace.rs:47:5
   7:     0x559f9fe54005 - std::sys_common::backtrace::print::had745c0a76b8b521
                               at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/std/src/sys_common/backtrace.rs:34:9
   8:     0x559f9fe55c5f - std::panicking::default_hook::{{closure}}::h1ea782cdfa2fd097
                               at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/std/src/panicking.rs:267:22
   9:     0x559f9fe5599b - std::panicking::default_hook::h1cc3af63455a163c
                               at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/std/src/panicking.rs:286:9
  10:     0x559f9fe5636c - std::panicking::rust_panic_with_hook::h5cafdc4b3bfd5528
                               at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/std/src/panicking.rs:688:13
  11:     0x559f9fe56109 - std::panicking::begin_panic_handler::{{closure}}::hf31c60f40775892c
                               at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/std/src/panicking.rs:579:13
  12:     0x559f9fe546ec - std::sys_common::backtrace::__rust_end_short_backtrace::h28a5c7be595826cd
                               at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/std/src/sys_common/backtrace.rs:137:18
  13:     0x559f9fe55e12 - rust_begin_unwind
                               at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/std/src/panicking.rs:575:5
  14:     0x559f9dee1793 - core::panicking::panic_fmt::h8fa27a0b37dd98b7
                               at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/core/src/panicking.rs:64:14
  15:     0x559f9f6f9657 - zksync_contracts::read_zbin_bytecode::h019f7e40fb83fe26
  16:     0x559f9f6f8f33 - zksync_contracts::read_sys_contract_bytecode::h67501b418aa0b9d7
  17:     0x559f9f368b64 - core::array::collect_into_array_unchecked::h7a21f436668d8136
  18:     0x559f9f378df1 - core::ops::function::FnOnce::call_once::h3517cf1cc6508053
  19:     0x559f9f37a95a - once_cell::imp::OnceCell<T>::initialize::{{closure}}::h611c9878b595dcb1
  20:     0x559f9fde8c61 - once_cell::imp::initialize_or_wait::hffbd1dbdb754c2ad
  21:     0x559f9dea2e12 - once_cell::imp::OnceCell<T>::initialize::hf64de522f6baed2c
  22:     0x559f9f37b5c4 - zksync_types::system_contracts::get_system_smart_contracts::h42706fb6c1e723be
  23:     0x559f9e4e47fd - zksync_core::genesis::create_genesis_block::h16e2b680098eaf23
  24:     0x559f9df05aed - zksync_core::genesis_init::{{closure}}::hfa6fa76183d856ac
  25:     0x559f9df4b172 - tokio::runtime::park::CachedParkThread::block_on::h6daa800f1c4d158b
  26:     0x559f9e184ca9 - tokio::runtime::scheduler::multi_thread::MultiThread::block_on::h6f6535201995ecdf
  27:     0x559f9e1c43c0 - tokio::runtime::runtime::Runtime::block_on::h1b8f393dc36173d0
  28:     0x559f9e0d9daf - zksync_server::main::h09c7414d2d63b222
  29:     0x559f9e005803 - std::sys_common::backtrace::__rust_begin_short_backtrace::h19649a926bdc1402
  30:     0x559f9df2a85d - std::rt::lang_start::{{closure}}::hc44effbbc306b0e0
  31:     0x559f9fe44dfc - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::hfa1c3687c9a20bb8
                               at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/core/src/ops/function.rs:606:13
  32:     0x559f9fe44dfc - std::panicking::try::do_call::h0497133ebe1341e5
                               at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/std/src/panicking.rs:483:40
  33:     0x559f9fe44dfc - std::panicking::try::h6c3de05c7ca5d07f
                               at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/std/src/panicking.rs:447:19
  34:     0x559f9fe44dfc - std::panic::catch_unwind::h969058ecb5334b30
                               at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/std/src/panic.rs:137:14
  35:     0x559f9fe44dfc - std::rt::lang_start_internal::{{closure}}::h0de6d98cafb42a58
                               at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/std/src/rt.rs:148:48
  36:     0x559f9fe44dfc - std::panicking::try::do_call::h77301dcf43953993
                               at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/std/src/panicking.rs:483:40
  37:     0x559f9fe44dfc - std::panicking::try::h45b05523a2fe135a
                               at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/std/src/panicking.rs:447:19
  38:     0x559f9fe44dfc - std::panic::catch_unwind::hd95cea544b2b9bd2
                               at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/std/src/panic.rs:137:14
  39:     0x559f9fe44dfc - std::rt::lang_start_internal::hd16e6ff7bf05a444
                               at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/std/src/rt.rs:148:20
  40:     0x559f9e0d9e95 - main
  41:     0x7f48dbeec083 - __libc_start_main
  42:     0x559f9df0248e - _start
  43:                0x0 - <unknown>

Genesis block mismatch with main node

I pulled externel node image in docker hub and run with main-net configs, version is matterlabs/external-node-public:v0.0.6.

Then it failed and there's log.

Could someone help me?

"2023-07-21T02:14:39.239989Z INFO zksync_core::genesis: operations_schema_genesis is complete
CONTRACTS_GENESIS_ROOT=0x668e46ea2b4c67fbaf7c6fa3fa2e6c29d1215847a503c29372d7301a2b50c997
CONTRACTS_GENESIS_BLOCK_COMMITMENT=0x4d7766c608dc5a3fdbba2c52fb7e09754904f966a3eaf8af85ca1a77be7176d5
CONTRACTS_GENESIS_ROLLUP_LEAF_INDEX=22
CHAIN_STATE_KEEPER_BOOTLOADER_HASH=0x010007794e73f682ad6d27e86b6f71bbee875fc26f5708d1713e7cfd476098d3
CHAIN_STATE_KEEPER_DEFAULT_AA_HASH=0x0100067d861e2f5717a12c3e869cfb657793b86bbb0caa05cc1421f16c5217bc
thread 'main' panicked at 'Genesis block root hash mismatch with main node: expected 0x668e…c997, got 0xbc59…ba95', /usr/src/zksync/core/bin/zksync_core/src/sync_layer/genesis.rs:46:9
stack backtrace:
0: 0x4001b46f7a - std::backtrace_rs::backtrace::libunwind::trace::h79937bc171ada62c"

Signed transactions fail signature check in go-ethereum

copied from Discord:

Hi ! Currently testing some basic ETH methods through the Zk Sync mainnet endpoint "wss://mainnet.era.zksync.io/ws" : while some of them behave without noticeable issues ( e.g SubscribeNewHead or BlockNumber) i noticed errors being returned constantly when using GetBlockByHash and GetBlockByNumber (returning respectively "transaction type not supported" and / or "invalid transaction v, r, s values") both on latest processed blocks and more ancient blocks. Those issues seems to be related to incompatibilities between the way Geth handle "classic" requests through its rpc server, and some of the specificities of your network (probably the v,r,s values being considered as invalid and thus not serverd / provoking the error throwing through your API for those methods). Would love to have some feedback on those issues, as the features they seems to impact are usually heavily used on other networks

image

To reproduce:

rpc,_ := rpc.DialHTTP("https://mainnet.era.zksync.io")
eth := ethclient.NewClient(rpc)
eth.TransactionByHash("[hash]")

where [hash] is the tx hash of any legacy (type 0) transaction on zksync era.

eth_maxPriorityFeePerGas not available

While zkSync era using EIP1559, eth_maxPriorityFeePerGas isn't implemented.

curl --url https://zksync2-mainnet.zksync.io \
-X POST \
-H "Content-Type: application/json" \
-d '{ "id": 1, "jsonrpc": "2.0", "method": "eth_maxPriorityFeePerGas" }'

{"jsonrpc":"2.0","error":{"code":-32601,"message":"Method not found"},"id":1}

Although eth_maxPriorityFeePerGas is not a standard rpc method of Ethereum, it is very important in practical use, especially for determining gas fee when sending transactions.

Thanks!

Can build a no_asm version of blst under Windows system and x86?

May I ask if I can compile a no_asm version of blst under Windows system and x86 within rust binding version, by utilizing the environment variable CARGO_CFG_TARGET_ARCH=xx ?

like CARGO_CFG_TARGET_ARCH=xx cargo build --release

According to the description in the build.rs file, when the environment variable CARGO_CFG_TARGET_ARCH is not set to x86_64 or aarch64, it will enable __BLST_NO_ASM__.

But I’ve seen other issues that say it is not unjustified.

Support eth_call state override set

Why should this feature exist?
state override set makes eth_call even more powerful and allows for deep code analyses.

Advantages of state override set (from geth docs):

  • It can be used by DApps to reduce the amount of contract code needed to be deployed on chain. Code that simply returns internal state or does pre-defined validations can be kept off chain and fed to the node on-demand.
  • It can be used for smart contract analysis by extending the code deployed on chain with custom methods and invoking them. This avoids having to download and reconstruct the entire state in a sandbox to run custom code against.
  • It can be used to debug smart contracts in an already deployed large suite of contracts by selectively overriding some code or state and seeing how execution changes. Specialized tooling will probably be necessary.

Command "deploy-l2-weth" not found

When I run zk init command I face the following error:

$ yarn workspace l2-zksync-contracts deploy-l2-weth
error Command "deploy-l2-weth" not found.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed.
Exit code: 1

`zk init` error

zk init gives me error

thread 'main' panicked at 'Can't read .zbin bytecode at "/Users//Documents/Projects/zksync-era/etc/system-contracts/contracts/precompiles/artifacts/Keccak256.yul/Keccak256.yul.zbin": No such file or directory (os error 2)', core/lib/contracts/src/lib.rs:195:31

root cause in core/lib/types/src/system_contracts.rs

workaround bap2pecs#1

zksync_object_store has broken dependencies

The google-cloud-default dependency no longer exists inside the git repo

https://github.com/yoshidan/google-cloud-rust?branch=main

Also I believe the ClientConfig struct has been changed such that some methods defined in gcs.rs, a file in object_store's src, are no longer found. Maybe I have a fundamental misunderstanding of the issue but it seems like the yoshida google-cloud-rust fork has undergone a breaking update and the dependencies in zksync_object_store no longer function as intended.

(zksync_object_store, path=zksync-era/core/lib/object_store)

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Awaiting Schedule

These updates are awaiting their schedule. Click on a checkbox to get an update now.

  • chore(deps): update actions/checkout digest to 692973e
  • chore(deps): update trufflesecurity/trufflehog digest to 5d7e6fc
  • chore(deps): update bufbuild/buf-setup-action action to v1.40.0
  • chore(deps): update docker/build-push-action action to v6.7.0
  • chore(deps): update docker/setup-buildx-action action to v3.6.1
  • chore(deps): update tj-actions/changed-files action to v45

Detected dependencies

github-actions
.github/workflows/build-contract-verifier-template.yml
  • actions/checkout v4@a5ac7e51b41094c92402da3b24376905380afc29
  • actions/checkout v4@a5ac7e51b41094c92402da3b24376905380afc29
.github/workflows/build-core-template.yml
  • actions/checkout v4@a5ac7e51b41094c92402da3b24376905380afc29
  • actions/checkout v4@a5ac7e51b41094c92402da3b24376905380afc29
.github/workflows/build-docker-from-tag.yml
  • actions/checkout v4@a5ac7e51b41094c92402da3b24376905380afc29
.github/workflows/build-local-node-docker.yml
  • actions/checkout v4@a5ac7e51b41094c92402da3b24376905380afc29
.github/workflows/build-prover-fri-gpu-gar.yml
  • actions/checkout v4@a5ac7e51b41094c92402da3b24376905380afc29
  • docker/setup-qemu-action v3.2.0@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf
  • docker/setup-buildx-action v3.6.1@988b5a0280414f521da01fcc63a27aeeb4b104db
  • docker/build-push-action v6.7.0@5cd11c3a4ced054e52742c5fd54dca954e0edd85
.github/workflows/build-prover-template.yml
  • actions/checkout v4@a5ac7e51b41094c92402da3b24376905380afc29
  • docker/setup-buildx-action v3.6.1@988b5a0280414f521da01fcc63a27aeeb4b104db
.github/workflows/build-tee-prover-template.yml
  • actions/checkout v4@a5ac7e51b41094c92402da3b24376905380afc29
  • actions/checkout v4@a5ac7e51b41094c92402da3b24376905380afc29
  • cachix/install-nix-action v27@ba0dd844c9180cbf77aa72a116d6fbc515d0e87b
  • ryanccn/attic-action v0.2.1@618a980988d704a7709daeea88526146acd1d45f
.github/workflows/build-witness-generator-template.yml
  • actions/checkout v4@a5ac7e51b41094c92402da3b24376905380afc29
.github/workflows/cargo-license.yaml
  • actions/checkout v4.1.7@692973e3d937129bcbf40652eb9f2f61becf3332
  • EmbarkStudios/cargo-deny-action v2.0.1@8371184bd11e21dcf8ac82ebf8c9c9f74ebf7268
.github/workflows/check-pr-title.yml
  • amannn/action-semantic-pull-request v5@0723387faaf9b38adef4775cd42cfd5155ed6017
  • marocchino/sticky-pull-request-comment v2@331f8f5b4215f0445d3c07b4967662a32a2d3e31
  • marocchino/sticky-pull-request-comment v2@331f8f5b4215f0445d3c07b4967662a32a2d3e31
.github/workflows/ci-common-reusable.yml
  • actions/checkout v4@a5ac7e51b41094c92402da3b24376905380afc29
.github/workflows/ci-core-lint-reusable.yml
  • actions/checkout v4@a5ac7e51b41094c92402da3b24376905380afc29
.github/workflows/ci-core-reusable.yml
  • actions/checkout v4@a5ac7e51b41094c92402da3b24376905380afc29
  • actions/checkout v4@a5ac7e51b41094c92402da3b24376905380afc29
  • actions/checkout v4@a5ac7e51b41094c92402da3b24376905380afc29
  • actions/checkout v4@a5ac7e51b41094c92402da3b24376905380afc29
.github/workflows/ci-docs-reusable.yml
  • actions/checkout v4@a5ac7e51b41094c92402da3b24376905380afc29
.github/workflows/ci-prover-reusable.yml
  • actions/checkout v4@a5ac7e51b41094c92402da3b24376905380afc29
  • actions/checkout v4@a5ac7e51b41094c92402da3b24376905380afc29
.github/workflows/ci-zk-toolbox-reusable.yml
  • actions/checkout v4@a5ac7e51b41094c92402da3b24376905380afc29
  • actions/upload-artifact v4.4.0@50769540e7f4bd5e21e526ee35c689e35e0d6874
.github/workflows/ci.yml
  • actions/checkout v4@a5ac7e51b41094c92402da3b24376905380afc29
  • tj-actions/changed-files v39@fea790cb660e33aef4bdf07304e28fedd77dfa13
.github/workflows/label-extenal-contributions.yml
.github/workflows/nodejs-license.yaml
  • actions/checkout v4@a5ac7e51b41094c92402da3b24376905380afc29
  • actions/checkout v4@a5ac7e51b41094c92402da3b24376905380afc29
  • actions/setup-node v4.0.3@1e60f620b9541d16bece96c5465dc8ee9832be0b
.github/workflows/protobuf.yaml
  • mozilla-actions/sccache-action v0.0.5@89e9040de88b577a072e3760aaf59f585da083af
  • actions/checkout v4@a5ac7e51b41094c92402da3b24376905380afc29
  • actions/checkout v4@a5ac7e51b41094c92402da3b24376905380afc29
  • bufbuild/buf-setup-action v1.39.0@54abbed4fe8d8d45173eca4798b0c39a53a7b658
.github/workflows/release-please-cargo-lock.yml
  • actions/checkout v4@a5ac7e51b41094c92402da3b24376905380afc29
.github/workflows/release-please.yml
  • google-github-actions/release-please-action v4.1.1@e4dc86ba9405554aeba3c6bb2d169500e7d3b4ee
  • matter-labs/format-release-please-for-slack-action v2.1.0@69e6fe9e4ec531b7b5fb0d826f73c190db83cf42
.github/workflows/release-test-stage.yml
  • actions/checkout v4@a5ac7e51b41094c92402da3b24376905380afc29
  • tj-actions/changed-files v39@fea790cb660e33aef4bdf07304e28fedd77dfa13
  • actions/checkout v4@a5ac7e51b41094c92402da3b24376905380afc29
.github/workflows/secrets_scanner.yaml
  • actions/checkout v4@a5ac7e51b41094c92402da3b24376905380afc29
  • trufflesecurity/trufflehog 0c66d30c1f4075cee1aada2e1ab46dabb1b0071a
.github/workflows/vm-perf-comparison.yml
  • actions/checkout v4@a5ac7e51b41094c92402da3b24376905380afc29
  • thollander/actions-comment-pull-request v2.5.0@fabd468d3a1a0b97feee5f6b9e499eab0dd903f6
.github/workflows/vm-perf-to-prometheus.yml
  • actions/checkout v4@a5ac7e51b41094c92402da3b24376905380afc29
.github/workflows/zk-environment-publish.yml
  • actions/checkout v4.1.7@692973e3d937129bcbf40652eb9f2f61becf3332
  • tj-actions/changed-files v39@fea790cb660e33aef4bdf07304e28fedd77dfa13
  • actions/checkout v4.1.7@692973e3d937129bcbf40652eb9f2f61becf3332
  • actions/checkout v4.1.7@692973e3d937129bcbf40652eb9f2f61becf3332
  • docker/setup-buildx-action v3.5.0@aa33708b10e362ff993539393ff100fa93ed6a27
  • docker/login-action v3.3.0@9780b0c442fbb1117ed29e0efdff1e18412f7567
  • docker/login-action v3.3.0@9780b0c442fbb1117ed29e0efdff1e18412f7567
  • docker/build-push-action v6.5.0@5176d81f87c23d6fc96624dfdbcd9f3830bbe445
  • docker/build-push-action v6.5.0@5176d81f87c23d6fc96624dfdbcd9f3830bbe445
  • docker/login-action v3.3.0@9780b0c442fbb1117ed29e0efdff1e18412f7567
  • docker/login-action v3.3.0@9780b0c442fbb1117ed29e0efdff1e18412f7567
  • actions/checkout v4.1.7@692973e3d937129bcbf40652eb9f2f61becf3332
  • docker/login-action v3.3.0@9780b0c442fbb1117ed29e0efdff1e18412f7567
  • docker/login-action v3.3.0@9780b0c442fbb1117ed29e0efdff1e18412f7567
  • docker/setup-qemu-action v3.2.0@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf
  • docker/setup-buildx-action v3.5.0@aa33708b10e362ff993539393ff100fa93ed6a27
  • docker/build-push-action v6.5.0@5176d81f87c23d6fc96624dfdbcd9f3830bbe445

  • Check this box to trigger a request for Renovate to run again on this repository

Determine smart contract with Layer 1

Hi there,

I have a smart contract on Ethereum that was created using the CREAT2 opcode, and now I intend to deploy it on Zksync Era while maintaining the same address as on Ethereum. However, I've discovered that Zksync Era utilizes a different method for calculating smart contract addresses. Is there any way for me to solve this issue ?.

Thanks for reading.

Suggestion for improvement

I found that due to changes in the create and create2 algorithms, even in the case of the same address and nonce, the deployed contract address is different from other Chain. Currently, many projects use fixed addresses on all EVM chains, which can lead to unexpected errors. Can we introduce a function similar to CREATEXXXX that still uses the keccak256 algorithm (used on Ethereum to calculate the deployment contract address) to generate the contract, and allows users to specify a NONCE (if need)?

By the way, I couldn't find the code related to the EVM execution layer module in your codebase. Can you tell me where the transaction logic is executed specifically (vm)?

Getting URL error, when instantiating with `Wallet::with_http_client()`

Info

Currently when attempting to instantiate a wallet with the with_http_client() method, it is returning an error if a port is not included in the rpc url.

example: when url is without a port number, such as: https://testnet.era.zksync.dev, an error is returned,
but when url includes a port number, like https://testnet.era.zksync.dev:443, a wallet is successfully instantiated.

Unfortunately many rpc urls do not contain a port number (i.e infura links), these rpc urls are unable to successfully instantiate a wallet.

Here is code that illustrates the issue: (can be pulled from this repo)

Cargo.toml:

[dependencies]
zksync = {git = "https://github.com/matter-labs/zksync-era.git"}
zksync_eth_signer = {git = "https://github.com/matter-labs/zksync-era.git"}

main.rs:

use zksync::{
    self,
    signer::Signer,
    wallet::Wallet,
    zksync_types::{L2ChainId, PackedEthSignature, H256},
};
use zksync_eth_signer::PrivateKeySigner;

const CHAIN: u16 = 280;

// Switch these comments to suppress error
const RPC_URL: &str = "https://testnet.era.zksync.dev";
// const RPC_URL: &str = "https://testnet.era.zksync.dev:443";

fn main() {
    let mut eth_private_key = H256::default();
    eth_private_key.randomize();

    let eth_signer = PrivateKeySigner::new(eth_private_key);
    let address_from_pk = PackedEthSignature::address_from_private_key(&eth_private_key).unwrap();
    let signer = Signer::new(eth_signer, address_from_pk, L2ChainId(CHAIN));

    // getting port error retrieving this wallet, if no port provided
    let wallet = Wallet::with_http_client(RPC_URL, signer);
    println!("{:#?} wallet", wallet);
}

When the above code is run:

cargo run

Output:

Err(
    RpcError(
        Transport(
            Url(
                "Port number is missing in the URL",
            ),
        ),
    ),
) wallet

To Reproduce Error:

Clone Repo

Clone rpc-url-issue

# Clone repo
git clone https://github.com/sammyshakes/rpc-url-issue.git

# Navigate to folder
cd rpc-url-issue

#execute
cargo run

Transaction Receipt contains invalid data.

Sometimes the eth_getTransactionReceipt returns a receipt with an empty blockNumber and empty logs. If resend the request after a few seconds, It's likely to get a standard receipt with fields filled correctly. Is this a bug or I missed something?

cargo.toml files point to private repositories and v1.3.1 branches

I understand with the re-branding that there's a lot of churn with your files, here's one you missed ---

I'm trying to run through the install steps and am getting stuck doing a cargo build - all the dependent cargo packages in your organization are pointing to non-'era-' repositories and to a 'v1.3.1' instead of 'main' branch. I was able to text-replace all the cargo.toml files in this repository, but now some dependent packages are themselves trying to find their own non-'era-' repositories so it's best to let you know!

cargo build fails

Cargo build fails with this error:

$ cargo build
    Updating git repository `https://github.com/matter-labs/era-zk_evm.git`
    Updating git repository `https://github.com/matter-labs/era-zkEVM-assembly.git`
    Updating git repository `https://github.com/matter-labs/era-zkevm_test_harness.git`
    Updating git repository `https://github.com/matter-labs/era-circuit_testing.git`
    Updating git repository `https://github.com/matter-labs/era-zkevm_opcode_defs.git`
    Updating crates.io index
    Updating git repository `https://github.com/matter-labs/era-sync_vm.git`
error: failed to select a version for `regex`.
    ... required by package `zkevm-assembly v1.3.2 (https://github.com/matter-labs/era-zkEVM-assembly.git?branch=v1.3.2#8a339104)`
    ... which satisfies git dependency `zkevm-assembly` of package `vm v0.1.0 (/home/ubuntu/workspace/zksync-era/core/lib/vm)`
    ... which satisfies path dependency `vm` (locked to 0.1.0) of package `system-constants-generator v0.1.0 (/home/ubuntu/workspace/zksync-era/core/bin/system-constants-generator)`
versions that meet the requirements `^1.8` are: 1.8.4, 1.8.3, 1.8.2, 1.8.1, 1.8.0

all possible versions conflict with previously selected packages.

  previously selected package `regex v1.7.3`
    ... which satisfies dependency `regex = "^1.5"` (locked to 1.7.3) of package `actix-router v0.5.1`
    ... which satisfies dependency `actix-router = "^0.5"` (locked to 0.5.1) of package `actix-web v4.3.1`
    ... which satisfies dependency `actix-web = "^4"` (locked to 4.3.1) of package `actix-cors v0.6.4`
    ... which satisfies dependency `actix-cors = "^0.6.0-beta.2"` (locked to 0.6.4) of package `zksync_core v1.0.0 (/home/ubuntu/workspace/zksync-era/core/bin/zksync_core)`
    ... which satisfies path dependency `zksync_core` (locked to 1.0.0) of package `zksync_external_node v1.0.0 (/home/ubuntu/workspace/zksync-era/core/bin/external_node)`

failed to select a version for `regex` which could resolve this conflict

Commit: 1283a41

Unable to set gasLimit

What I want to do

I want to set gasLimit when executing zksync.Wallet's transfer function.

What I need help with

When I set gasLimit, I get an error "invalid object key - maxFeePerGas
When I set maxFeePerGas, I get an error "pre-eip-1559 transaction do not support".

zk init error

when I run zk init, all went well until the point I reached DB init. I get this error:

✔ Compile l2 contracts done (26476ms)

------------------
> Drop postgres db
Dropping DB...
error: error returned from database: password authentication failed for user "postgres"
Error: Child process exited with code 1

in addition I tried to add this line

local all postgres trust

to ./volumes/postgres/pg_hba.conf :

# TYPE  DATABASE        USER            ADDRESS                 METHOD

# "local" is for Unix domain socket connections only
local   all             postgres                                trust
local   all             all                                     trust
local   all             all                                     trust
# IPv4 local connections:
host    all             all             127.0.0.1/32            trust

But it didn't help.

Do you have experience with this? What could be the root-cause?

`zk init` error : solc subprocess error: Os { code: 2, kind: NotFound, message: "No such file or directory" }


Creating docker volumes
✔ Creating docker volumes done (1ms)


Pulling images
Pulling geth ... done
Pulling postgres ... done
✔ Pulling images done (3023ms)


Checking environment
✔ Checking environment done (108ms)


Checking git hooks
✔ Checking git hooks done (4ms)


Setting up containers
WARNING: Found orphan containers (zksync_dev-liquidity-token-watcher_1, zksync_dev-ticker_1) for this project. If you removed or renamed this service in your compose file, you can run this command with the --remove-orphans flag to clean it up.
zksync_geth_1 is up-to-date
zksync_postgres_1 is up-to-date
✔ Setting up containers done (927ms)


Checkout system-contracts submodule
✔ Checkout system-contracts submodule done (121ms)


Compiling JS packages
yarn install v1.22.19
[1/4] Resolving packages...
success Already up-to-date.
Done in 1.97s.
yarn run v1.22.19
$ yarn npm-run-all --parallel build:*
$ /root/codes/zksync/node_modules/.bin/npm-run-all --parallel 'build:'
$ yarn web3 build
$ yarn reading-tool build
$ yarn workspace reading-tool build
$ yarn workspace zksync-web3 build
$ tsc && cp -f typechain/
.d.ts build/typechain
$ tsc
Done in 16.83s.
✔ Compiling JS packages done (19518ms)


Compile l2 contracts
yarn run v1.22.19
$ /root/codes/zksync/node_modules/.bin/hardhat compile
Nothing to compile
Done in 1.69s.
yarn install v1.22.19
[1/4] Resolving packages...
success Already up-to-date.
Done in 0.93s.
yarn run v1.22.19
$ /root/codes/zksync/etc/system-contracts/node_modules/.bin/hardhat compile
Nothing to compile
Creating Typechain artifacts in directory typechain for target ethers-v5
Successfully generated Typechain artifacts!
Done in 9.50s.
yarn run v1.22.19
$ rm -rf ./bootloader/build && yarn ts-node scripts/process.ts
$ /root/codes/zksync/etc/system-contracts/node_modules/.bin/ts-node scripts/process.ts
Preprocessing production bootloader
Preprocessing playground block bootloader
Preprocessing gas test bootloader
Preprocessing fee estimation bootloader
Preprocessing done!
Done in 6.34s.
yarn run v1.22.19
$ /root/codes/zksync/etc/system-contracts/node_modules/.bin/hardhat run ./scripts/compile-yul.ts
Creating Typechain artifacts in directory typechain for target ethers-v5
Successfully generated Typechain artifacts!
solc subprocess error: Os { code: 2, kind: NotFound, message: "No such file or directory" }
Error: Child process exited with code 1
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Error: Child process exited with code 1
root@ubuntu:~/codes/zksync# cat /etc/issue
Ubuntu 22.04.2 LTS \n \l

error in running external node

i am trying to run a external node. however, it throws error

error: The following required arguments were not provided:
    --database-url <DATABASE_URL>

i have specificlly set the env of DATABASE_URL in my command; but it still throws such error
my docker command is

docker run matterlabs/external-node-public:v0.0.4 --env-file /root/zksync_nodes/mainnet-config.env --mount type=bind,source=/data/rocksdb/,target=./db/ext-node/ --env DATABASE_URL=postgres://postgres@localhost/zksync_local_ext_node

Bug/Logic error in tx() method of DeployContractBuilder in zksync-rs

Info


There seems to be a bug/logic error in the rust sdk that has been preventing the deployment of Child contracts from a Factory

Some(vec![bytecode.clone()]),
it is trying to feed in only the bytecode of the contract instead of all factory deps.. I changed this line from:

Some(vec![bytecode.clone()])

to:

Some(factory_deps)

and it worked for my use case..

Error received

The error received when attempting to deploy a child contract from a SimpleFactory contract by calling newStepChild() here.

ErrorObject { code: ServerError(3), message: "Failed to submit transaction: cannot estimate gas: The code hash is not known", data: Some(RawValue({"code":104,"message":"cannot estimate gas: The code hash is not known"})) }

Once i made the change stated above, newStepChild() executed and deployed successfully.
*If this is the right fix, I am happy to make a PR for it

Open traces api

Hello, When I create a private node and request traces, I find that the trace function is not enabled, and I don't find the corresponding settings in the documentation. Thanks for your advice!

build `zksync_setup_key_generator` error

following by https://github.com/matter-labs/zksync-era/blob/main/docs/launch.md#running-the-setup-key-generator-on-machine-with-gpu

executing this command on my MacOS with intel CPU

cargo +nightly run  --release --bin zksync_setup_key_generator -- --numeric-circuit 2

got link errors like

   Compiling setup_key_generator_and_server v1.0.0 (/Users/workspace/zksync-era/core/bin/setup_key_generator_and_server)
error: linking with `cc` failed: exit status: 1
...

                gpu_prover::cuda_bindings::context::GpuContext::set_up_pn::h9d12043d11ad2202 in libgpu_prover-7fec296419129293.rlib(gpu_prover-7fec296419129293.gpu_prover.a717ac5adf33dbf8-cgu.2.rcgu.o)
            "_pn_tear_down", referenced from:
                _$LT$gpu_prover..cuda_bindings..context..GpuContext$u20$as$u20$core..ops..drop..Drop$GT$::drop::ha180cb7e369595f2 in libgpu_prover-7fec296419129293.rlib(gpu_prover-7fec296419129293.gpu_prover.a717ac5adf33dbf8-cgu.2.rcgu.o)
          ld: symbol(s) not found for architecture x86_64
          clang: error: linker command failed with exit code 1 (use -v to see invocation)
          

error: could not compile `setup_key_generator_and_server` (bin "zksync_setup_key_generator") due to previous error

not sure how to fix it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.