From 1d526632227d50e496bac4f7333dfe079bd36090 Mon Sep 17 00:00:00 2001 From: Dustin Brickwood Date: Sat, 23 Dec 2023 03:22:41 -0600 Subject: [PATCH 01/23] chore: fix dev discussions link (#750) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## What ❔ - Addresses typo in link ## Why ❔ - link was incorrect ## Checklist - [ ] PR title corresponds to the body of PR (we generate changelog entries from PRs). - [ ] Tests for the changes have been added / updated. - [ ] Documentation comments have been added / updated. - [ ] Code has been formatted via `zk fmt` and `zk lint`. - [ ] Spellcheck has been run via `cargo spellcheck --cfg=./spellcheck/era.cfg --code 1`. --- docs/specs/blocks_batches.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/specs/blocks_batches.md b/docs/specs/blocks_batches.md index 796429f78ce..bd3df88539c 100644 --- a/docs/specs/blocks_batches.md +++ b/docs/specs/blocks_batches.md @@ -136,7 +136,7 @@ will return values for L2 blocks. ### Migration status At the time of this writing, the migration has been complete on testnet, i.e. there we already have only the L2 block -information returned. However, the [migration](https://github.com/zkSync-Community-Hub/zkync-developers/discussions/87) +information returned. However, the [migration](https://github.com/zkSync-Community-Hub/zksync-developers/discussions/87) on mainnet is still ongoing and most likely will end on late October / early November. ## Blocks’ processing and consistency checks From 3d211e8333eacc5d403dd75dc73e94e967f80059 Mon Sep 17 00:00:00 2001 From: Ivan Bogatyy Date: Sat, 23 Dec 2023 04:25:29 -0500 Subject: [PATCH 02/23] fix: all Docker configs no longer expose PostgreSQL externally (#749) PostgreSQL should only be accessible from the localhost interface, otherwise malicious actors can change or delete the database. Per discussion with Shahar, fixing all the remaining configs. Related: https://github.com/matter-labs/zksync-era/pull/741 --- docker-compose-cpu-runner.yml | 2 +- docker-compose-gpu-runner-cuda-12-0.yml | 2 +- docker-compose-gpu-runner.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docker-compose-cpu-runner.yml b/docker-compose-cpu-runner.yml index 98b42fc7357..7e728001e00 100644 --- a/docker-compose-cpu-runner.yml +++ b/docker-compose-cpu-runner.yml @@ -33,6 +33,6 @@ services: postgres: image: "postgres:14" ports: - - "5432:5432" + - 127.0.0.1:5432:5432 environment: - POSTGRES_HOST_AUTH_METHOD=trust diff --git a/docker-compose-gpu-runner-cuda-12-0.yml b/docker-compose-gpu-runner-cuda-12-0.yml index 9b5feea15b0..2dd05299f58 100644 --- a/docker-compose-gpu-runner-cuda-12-0.yml +++ b/docker-compose-gpu-runner-cuda-12-0.yml @@ -47,6 +47,6 @@ services: postgres: image: "postgres:14" ports: - - "5432:5432" + - 127.0.0.1:5432:5432 environment: - POSTGRES_HOST_AUTH_METHOD=trust diff --git a/docker-compose-gpu-runner.yml b/docker-compose-gpu-runner.yml index b2683111378..a3997a63089 100644 --- a/docker-compose-gpu-runner.yml +++ b/docker-compose-gpu-runner.yml @@ -38,6 +38,6 @@ services: postgres: image: "postgres:14" ports: - - "5432:5432" + - 127.0.0.1:5432:5432 environment: - POSTGRES_HOST_AUTH_METHOD=trust From 0a7a4da52926d1db8dfe72aef78390cba3754627 Mon Sep 17 00:00:00 2001 From: Roman Brodetski Date: Mon, 25 Dec 2023 10:25:40 +0000 Subject: [PATCH 03/23] fix(EN): temporary produce a warning on pubdata mismatch with L1 (#758) --- core/lib/zksync_core/src/consistency_checker/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/lib/zksync_core/src/consistency_checker/mod.rs b/core/lib/zksync_core/src/consistency_checker/mod.rs index cb122ca2f47..4e3dc44a7fd 100644 --- a/core/lib/zksync_core/src/consistency_checker/mod.rs +++ b/core/lib/zksync_core/src/consistency_checker/mod.rs @@ -194,7 +194,7 @@ impl ConsistencyChecker { batch_number.0 += 1; } Ok(false) => { - anyhow::bail!("Batch {} is inconsistent with L1", batch_number.0); + tracing::warn!("Batch {} is inconsistent with L1", batch_number.0); } Err(e) => { tracing::warn!("Consistency checker error: {}", e); From 35497044f96f7e12d9f1622c830aa92f38fc1823 Mon Sep 17 00:00:00 2001 From: zksync-era-bot <147085853+zksync-era-bot@users.noreply.github.com> Date: Mon, 25 Dec 2023 11:30:33 +0100 Subject: [PATCH 04/23] chore(main): release core 18.10.0 (#713) :robot: I have created a release *beep* *boop* --- ## [18.10.0](https://github.com/matter-labs/zksync-era/compare/core-v18.9.0...core-v18.10.0) (2023-12-25) ### Features * **api:** Add metrics for `jsonrpsee` subscriptions ([#733](https://github.com/matter-labs/zksync-era/issues/733)) ([39fd71c](https://github.com/matter-labs/zksync-era/commit/39fd71cc2a0ffda45933fc99c4dac6d9beb92ad0)) * **api:** remove jsonrpc backend ([#693](https://github.com/matter-labs/zksync-era/issues/693)) ([b3f0417](https://github.com/matter-labs/zksync-era/commit/b3f0417fd4512f98d7e579eb5b3b03c7f4b92e18)) * applied status snapshots dal ([#679](https://github.com/matter-labs/zksync-era/issues/679)) ([2e9f23b](https://github.com/matter-labs/zksync-era/commit/2e9f23b46c31a9538d4a55bed75c5df3ed8e8f63)) * **en:** Make reorg detector work with pruned data ([#712](https://github.com/matter-labs/zksync-era/issues/712)) ([c4185d5](https://github.com/matter-labs/zksync-era/commit/c4185d5b6526cc9ec42e6941d76453cb693988bd)) * Remove data fetchers ([#694](https://github.com/matter-labs/zksync-era/issues/694)) ([f48d677](https://github.com/matter-labs/zksync-era/commit/f48d6773e1e30fede44075f8862c68e7a8173cbb)) * Remove zks_getConfirmedTokens method ([#719](https://github.com/matter-labs/zksync-era/issues/719)) ([9298b1b](https://github.com/matter-labs/zksync-era/commit/9298b1b916ad5f81160c66c061370f804d129d97)) ### Bug Fixes * added waiting for prometheus to finish ([#745](https://github.com/matter-labs/zksync-era/issues/745)) ([eed330d](https://github.com/matter-labs/zksync-era/commit/eed330dd2e47114d9d0ea29c074259a0bc016f78)) * **EN:** temporary produce a warning on pubdata mismatch with L1 ([#758](https://github.com/matter-labs/zksync-era/issues/758)) ([0a7a4da](https://github.com/matter-labs/zksync-era/commit/0a7a4da52926d1db8dfe72aef78390cba3754627)) * **prover:** Add logging for prover + WVGs ([#723](https://github.com/matter-labs/zksync-era/issues/723)) ([d7ce14c](https://github.com/matter-labs/zksync-era/commit/d7ce14c5d0434326a1ebf406d77c20676ae526ae)) * remove leftovers after [#693](https://github.com/matter-labs/zksync-era/issues/693) ([#720](https://github.com/matter-labs/zksync-era/issues/720)) ([e93aa35](https://github.com/matter-labs/zksync-era/commit/e93aa358c43e60d5640224e5422a40d91cd4b9a0)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- .github/release-please/manifest.json | 2 +- core/CHANGELOG.md | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/.github/release-please/manifest.json b/.github/release-please/manifest.json index abc09c05bf7..d2acc43e2e1 100644 --- a/.github/release-please/manifest.json +++ b/.github/release-please/manifest.json @@ -1,5 +1,5 @@ { "sdk/zksync-rs": "0.4.0", - "core": "18.9.0", + "core": "18.10.0", "prover": "10.0.2" } diff --git a/core/CHANGELOG.md b/core/CHANGELOG.md index c9427113be1..e1d264051b5 100644 --- a/core/CHANGELOG.md +++ b/core/CHANGELOG.md @@ -1,5 +1,25 @@ # Changelog +## [18.10.0](https://github.com/matter-labs/zksync-era/compare/core-v18.9.0...core-v18.10.0) (2023-12-25) + + +### Features + +* **api:** Add metrics for `jsonrpsee` subscriptions ([#733](https://github.com/matter-labs/zksync-era/issues/733)) ([39fd71c](https://github.com/matter-labs/zksync-era/commit/39fd71cc2a0ffda45933fc99c4dac6d9beb92ad0)) +* **api:** remove jsonrpc backend ([#693](https://github.com/matter-labs/zksync-era/issues/693)) ([b3f0417](https://github.com/matter-labs/zksync-era/commit/b3f0417fd4512f98d7e579eb5b3b03c7f4b92e18)) +* applied status snapshots dal ([#679](https://github.com/matter-labs/zksync-era/issues/679)) ([2e9f23b](https://github.com/matter-labs/zksync-era/commit/2e9f23b46c31a9538d4a55bed75c5df3ed8e8f63)) +* **en:** Make reorg detector work with pruned data ([#712](https://github.com/matter-labs/zksync-era/issues/712)) ([c4185d5](https://github.com/matter-labs/zksync-era/commit/c4185d5b6526cc9ec42e6941d76453cb693988bd)) +* Remove data fetchers ([#694](https://github.com/matter-labs/zksync-era/issues/694)) ([f48d677](https://github.com/matter-labs/zksync-era/commit/f48d6773e1e30fede44075f8862c68e7a8173cbb)) +* Remove zks_getConfirmedTokens method ([#719](https://github.com/matter-labs/zksync-era/issues/719)) ([9298b1b](https://github.com/matter-labs/zksync-era/commit/9298b1b916ad5f81160c66c061370f804d129d97)) + + +### Bug Fixes + +* added waiting for prometheus to finish ([#745](https://github.com/matter-labs/zksync-era/issues/745)) ([eed330d](https://github.com/matter-labs/zksync-era/commit/eed330dd2e47114d9d0ea29c074259a0bc016f78)) +* **EN:** temporary produce a warning on pubdata mismatch with L1 ([#758](https://github.com/matter-labs/zksync-era/issues/758)) ([0a7a4da](https://github.com/matter-labs/zksync-era/commit/0a7a4da52926d1db8dfe72aef78390cba3754627)) +* **prover:** Add logging for prover + WVGs ([#723](https://github.com/matter-labs/zksync-era/issues/723)) ([d7ce14c](https://github.com/matter-labs/zksync-era/commit/d7ce14c5d0434326a1ebf406d77c20676ae526ae)) +* remove leftovers after [#693](https://github.com/matter-labs/zksync-era/issues/693) ([#720](https://github.com/matter-labs/zksync-era/issues/720)) ([e93aa35](https://github.com/matter-labs/zksync-era/commit/e93aa358c43e60d5640224e5422a40d91cd4b9a0)) + ## [18.9.0](https://github.com/matter-labs/zksync-era/compare/core-v18.8.0...core-v18.9.0) (2023-12-19) From 50cd7c41f71757a3f2ffb36a6c1e1fa6b4372703 Mon Sep 17 00:00:00 2001 From: Roman Brodetski Date: Mon, 25 Dec 2023 11:03:14 +0000 Subject: [PATCH 05/23] fix(sequencer): don't stall blockchain on failed L1 tx (#759) --- core/lib/zksync_core/src/lib.rs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/core/lib/zksync_core/src/lib.rs b/core/lib/zksync_core/src/lib.rs index b4ddea4a797..67eac97d196 100644 --- a/core/lib/zksync_core/src/lib.rs +++ b/core/lib/zksync_core/src/lib.rs @@ -1166,12 +1166,10 @@ async fn circuit_breakers_for_components( ) -> anyhow::Result>> { let mut circuit_breakers: Vec> = Vec::new(); - if components.iter().any(|c| { - matches!( - c, - Component::EthTxAggregator | Component::EthTxManager | Component::StateKeeper - ) - }) { + if components + .iter() + .any(|c| matches!(c, Component::EthTxAggregator | Component::EthTxManager)) + { let pool = ConnectionPool::singleton(postgres_config.replica_url()?) .build() .await From 6c5dbb8bcb2ead5c5d1af553449e44fc50883b9a Mon Sep 17 00:00:00 2001 From: zksync-era-bot <147085853+zksync-era-bot@users.noreply.github.com> Date: Mon, 25 Dec 2023 12:30:03 +0100 Subject: [PATCH 06/23] chore(main): release core 18.10.1 (#760) :robot: I have created a release *beep* *boop* --- ## [18.10.1](https://github.com/matter-labs/zksync-era/compare/core-v18.10.0...core-v18.10.1) (2023-12-25) ### Bug Fixes * **sequencer:** don't stall blockchain on failed L1 tx ([#759](https://github.com/matter-labs/zksync-era/issues/759)) ([50cd7c4](https://github.com/matter-labs/zksync-era/commit/50cd7c41f71757a3f2ffb36a6c1e1fa6b4372703)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- .github/release-please/manifest.json | 2 +- core/CHANGELOG.md | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/release-please/manifest.json b/.github/release-please/manifest.json index d2acc43e2e1..0e28ab83017 100644 --- a/.github/release-please/manifest.json +++ b/.github/release-please/manifest.json @@ -1,5 +1,5 @@ { "sdk/zksync-rs": "0.4.0", - "core": "18.10.0", + "core": "18.10.1", "prover": "10.0.2" } diff --git a/core/CHANGELOG.md b/core/CHANGELOG.md index e1d264051b5..e6b8684e556 100644 --- a/core/CHANGELOG.md +++ b/core/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [18.10.1](https://github.com/matter-labs/zksync-era/compare/core-v18.10.0...core-v18.10.1) (2023-12-25) + + +### Bug Fixes + +* **sequencer:** don't stall blockchain on failed L1 tx ([#759](https://github.com/matter-labs/zksync-era/issues/759)) ([50cd7c4](https://github.com/matter-labs/zksync-era/commit/50cd7c41f71757a3f2ffb36a6c1e1fa6b4372703)) + ## [18.10.0](https://github.com/matter-labs/zksync-era/compare/core-v18.9.0...core-v18.10.0) (2023-12-25) From 6c6f1ab078485669002e50197b35ab1b6a38cdb9 Mon Sep 17 00:00:00 2001 From: Danil Date: Mon, 25 Dec 2023 15:03:34 +0100 Subject: [PATCH 07/23] fix(vm): Get pubdata bytes from vm (#756) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## What ❔ ## Why ❔ ## Checklist - [ ] PR title corresponds to the body of PR (we generate changelog entries from PRs). - [ ] Tests for the changes have been added / updated. - [ ] Documentation comments have been added / updated. - [ ] Code has been formatted via `zk fmt` and `zk lint`. - [ ] Spellcheck has been run via `cargo spellcheck --cfg=./spellcheck/era.cfg --code 1`. --------- Signed-off-by: Danil --- .github/workflows/ci-core-reusable.yml | 12 + ...20231225083442_add-pub-data-input.down.sql | 1 + .../20231225083442_add-pub-data-input.up.sql | 1 + core/lib/dal/sqlx-data.json | 5247 +++++++++-------- core/lib/dal/src/blocks_dal.rs | 37 +- core/lib/dal/src/models/storage_block.rs | 4 + .../src/glue/types/vm/vm_block_result.rs | 3 + core/lib/multivm/src/interface/traits/vm.rs | 1 + .../types/outputs/finished_l1batch.rs | 1 + .../vm_latest/bootloader_state/state.rs | 7 +- .../vm_latest/bootloader_state/utils.rs | 11 +- .../vm_latest/tracers/pubdata_tracer.rs | 2 +- .../versions/vm_latest/types/internals/mod.rs | 3 +- .../vm_latest/types/internals/pubdata.rs | 27 +- core/lib/multivm/src/versions/vm_latest/vm.rs | 21 +- core/lib/types/src/block.rs | 2 + core/lib/types/src/commitment.rs | 34 +- .../src/state_keeper/io/seal_logic.rs | 1 + .../zksync_core/src/state_keeper/tests/mod.rs | 1 + 19 files changed, 2756 insertions(+), 2660 deletions(-) create mode 100644 core/lib/dal/migrations/20231225083442_add-pub-data-input.down.sql create mode 100644 core/lib/dal/migrations/20231225083442_add-pub-data-input.up.sql diff --git a/.github/workflows/ci-core-reusable.yml b/.github/workflows/ci-core-reusable.yml index 00e56e9ff74..6e28f85e3c0 100644 --- a/.github/workflows/ci-core-reusable.yml +++ b/.github/workflows/ci-core-reusable.yml @@ -109,9 +109,11 @@ jobs: run: ci_run zk run loadtest - name: Show server.log logs + if: always() run: ci_run cat server.log || true - name: Show sccache logs + if: always() run: | ci_run sccache --show-stats ci_run cat /tmp/sccache_log.txt @@ -202,18 +204,23 @@ jobs: ci_run zk test i upgrade - name: Show server.log logs + if: always() run: ci_run cat server.log || true - name: Show contract_verifier.log logs + if: always() run: ci_run cat contract_verifier.log || true - name: Show revert.log logs + if: always() run: ci_run cat core/tests/revert-test/revert.log || true - name: Show upgrade.log logs + if: always() run: ci_run cat core/tests/upgrade-test/upgrade.log || true - name: Show sccache logs + if: always() run: | ci_run sccache --show-stats ci_run cat /tmp/sccache_log.txt @@ -316,18 +323,23 @@ jobs: CHECK_EN_URL="http://0.0.0.0:3060" ci_run zk test i upgrade - name: Show server.log logs + if: always() run: ci_run cat server.log || true - name: Show contract_verifier.log logs + if: always() run: ci_run cat ext-node.log || true - name: Show revert.log logs + if: always() run: ci_run cat core/tests/revert-test/revert.log || true - name: Show upgrade.log logs + if: always() run: ci_run cat core/tests/upgrade-test/upgrade.log || true - name: Show sccache logs + if: always() run: | ci_run sccache --show-stats ci_run cat /tmp/sccache_log.txt diff --git a/core/lib/dal/migrations/20231225083442_add-pub-data-input.down.sql b/core/lib/dal/migrations/20231225083442_add-pub-data-input.down.sql new file mode 100644 index 00000000000..103f3ce566f --- /dev/null +++ b/core/lib/dal/migrations/20231225083442_add-pub-data-input.down.sql @@ -0,0 +1 @@ +ALTER table l1_batches DROP COLUMN pubdata_input; \ No newline at end of file diff --git a/core/lib/dal/migrations/20231225083442_add-pub-data-input.up.sql b/core/lib/dal/migrations/20231225083442_add-pub-data-input.up.sql new file mode 100644 index 00000000000..bd88f25e209 --- /dev/null +++ b/core/lib/dal/migrations/20231225083442_add-pub-data-input.up.sql @@ -0,0 +1 @@ +ALTER TABLE l1_batches ADD COLUMN pubdata_input BYTEA; \ No newline at end of file diff --git a/core/lib/dal/sqlx-data.json b/core/lib/dal/sqlx-data.json index a7bd3d25ae8..68c1731fd0f 100644 --- a/core/lib/dal/sqlx-data.json +++ b/core/lib/dal/sqlx-data.json @@ -595,6 +595,263 @@ }, "query": "\n INSERT INTO\n transactions (\n hash,\n is_priority,\n initiator_address,\n gas_limit,\n max_fee_per_gas,\n gas_per_pubdata_limit,\n data,\n priority_op_id,\n full_fee,\n layer_2_tip_fee,\n contract_address,\n l1_block_number,\n value,\n paymaster,\n paymaster_input,\n tx_format,\n l1_tx_mint,\n l1_tx_refund_recipient,\n received_at,\n created_at,\n updated_at\n )\n VALUES\n (\n $1,\n TRUE,\n $2,\n $3,\n $4,\n $5,\n $6,\n $7,\n $8,\n $9,\n $10,\n $11,\n $12,\n $13,\n $14,\n $15,\n $16,\n $17,\n $18,\n NOW(),\n NOW()\n )\n ON CONFLICT (hash) DO NOTHING\n " }, + "0aaefa9d5518ed1a2d8f735435e8048558243ff878b59586eb3a8b22794395d8": { + "describe": { + "columns": [ + { + "name": "number", + "ordinal": 0, + "type_info": "Int8" + }, + { + "name": "timestamp", + "ordinal": 1, + "type_info": "Int8" + }, + { + "name": "is_finished", + "ordinal": 2, + "type_info": "Bool" + }, + { + "name": "l1_tx_count", + "ordinal": 3, + "type_info": "Int4" + }, + { + "name": "l2_tx_count", + "ordinal": 4, + "type_info": "Int4" + }, + { + "name": "fee_account_address", + "ordinal": 5, + "type_info": "Bytea" + }, + { + "name": "bloom", + "ordinal": 6, + "type_info": "Bytea" + }, + { + "name": "priority_ops_onchain_data", + "ordinal": 7, + "type_info": "ByteaArray" + }, + { + "name": "hash", + "ordinal": 8, + "type_info": "Bytea" + }, + { + "name": "parent_hash", + "ordinal": 9, + "type_info": "Bytea" + }, + { + "name": "commitment", + "ordinal": 10, + "type_info": "Bytea" + }, + { + "name": "compressed_write_logs", + "ordinal": 11, + "type_info": "Bytea" + }, + { + "name": "compressed_contracts", + "ordinal": 12, + "type_info": "Bytea" + }, + { + "name": "eth_prove_tx_id", + "ordinal": 13, + "type_info": "Int4" + }, + { + "name": "eth_commit_tx_id", + "ordinal": 14, + "type_info": "Int4" + }, + { + "name": "eth_execute_tx_id", + "ordinal": 15, + "type_info": "Int4" + }, + { + "name": "merkle_root_hash", + "ordinal": 16, + "type_info": "Bytea" + }, + { + "name": "l2_to_l1_logs", + "ordinal": 17, + "type_info": "ByteaArray" + }, + { + "name": "l2_to_l1_messages", + "ordinal": 18, + "type_info": "ByteaArray" + }, + { + "name": "used_contract_hashes", + "ordinal": 19, + "type_info": "Jsonb" + }, + { + "name": "compressed_initial_writes", + "ordinal": 20, + "type_info": "Bytea" + }, + { + "name": "compressed_repeated_writes", + "ordinal": 21, + "type_info": "Bytea" + }, + { + "name": "l2_l1_compressed_messages", + "ordinal": 22, + "type_info": "Bytea" + }, + { + "name": "l2_l1_merkle_root", + "ordinal": 23, + "type_info": "Bytea" + }, + { + "name": "l1_gas_price", + "ordinal": 24, + "type_info": "Int8" + }, + { + "name": "l2_fair_gas_price", + "ordinal": 25, + "type_info": "Int8" + }, + { + "name": "rollup_last_leaf_index", + "ordinal": 26, + "type_info": "Int8" + }, + { + "name": "zkporter_is_available", + "ordinal": 27, + "type_info": "Bool" + }, + { + "name": "bootloader_code_hash", + "ordinal": 28, + "type_info": "Bytea" + }, + { + "name": "default_aa_code_hash", + "ordinal": 29, + "type_info": "Bytea" + }, + { + "name": "base_fee_per_gas", + "ordinal": 30, + "type_info": "Numeric" + }, + { + "name": "aux_data_hash", + "ordinal": 31, + "type_info": "Bytea" + }, + { + "name": "pass_through_data_hash", + "ordinal": 32, + "type_info": "Bytea" + }, + { + "name": "meta_parameters_hash", + "ordinal": 33, + "type_info": "Bytea" + }, + { + "name": "protocol_version", + "ordinal": 34, + "type_info": "Int4" + }, + { + "name": "compressed_state_diffs", + "ordinal": 35, + "type_info": "Bytea" + }, + { + "name": "system_logs", + "ordinal": 36, + "type_info": "ByteaArray" + }, + { + "name": "events_queue_commitment", + "ordinal": 37, + "type_info": "Bytea" + }, + { + "name": "bootloader_initial_content_commitment", + "ordinal": 38, + "type_info": "Bytea" + }, + { + "name": "pubdata_input", + "ordinal": 39, + "type_info": "Bytea" + } + ], + "nullable": [ + false, + false, + false, + false, + false, + false, + false, + false, + true, + true, + true, + true, + true, + true, + true, + true, + true, + false, + false, + false, + true, + true, + true, + true, + false, + false, + true, + true, + true, + true, + false, + true, + true, + true, + true, + true, + false, + true, + true, + true + ], + "parameters": { + "Left": [ + "Bytea", + "Bytea", + "Int4", + "Int8" + ] + } + }, + "query": "\n SELECT\n number,\n l1_batches.timestamp,\n is_finished,\n l1_tx_count,\n l2_tx_count,\n fee_account_address,\n bloom,\n priority_ops_onchain_data,\n hash,\n parent_hash,\n commitment,\n compressed_write_logs,\n compressed_contracts,\n eth_prove_tx_id,\n eth_commit_tx_id,\n eth_execute_tx_id,\n merkle_root_hash,\n l2_to_l1_logs,\n l2_to_l1_messages,\n used_contract_hashes,\n compressed_initial_writes,\n compressed_repeated_writes,\n l2_l1_compressed_messages,\n l2_l1_merkle_root,\n l1_gas_price,\n l2_fair_gas_price,\n rollup_last_leaf_index,\n zkporter_is_available,\n l1_batches.bootloader_code_hash,\n l1_batches.default_aa_code_hash,\n base_fee_per_gas,\n aux_data_hash,\n pass_through_data_hash,\n meta_parameters_hash,\n protocol_version,\n compressed_state_diffs,\n system_logs,\n events_queue_commitment,\n bootloader_initial_content_commitment,\n pubdata_input\n FROM\n l1_batches\n LEFT JOIN commitments ON commitments.l1_batch_number = l1_batches.number\n JOIN protocol_versions ON protocol_versions.id = l1_batches.protocol_version\n WHERE\n eth_commit_tx_id IS NULL\n AND number != 0\n AND protocol_versions.bootloader_code_hash = $1\n AND protocol_versions.default_account_code_hash = $2\n AND commitment IS NOT NULL\n AND (\n protocol_versions.id = $3\n OR protocol_versions.upgrade_tx_hash IS NULL\n )\n ORDER BY\n number\n LIMIT\n $4\n " + }, "0bdcf87f6910c7222b621f76f71bc6e326e15dca141050bc9d7dacae98a430e8": { "describe": { "columns": [ @@ -900,262 +1157,11 @@ }, "query": "\n SELECT\n *\n FROM\n protocol_versions\n WHERE\n id = $1\n " }, - "139318ef312eac6a70e9f4382b57920144e985bc70250f711170a47c7dfe0bec": { + "15858168fea6808c6d59d0e6d8f28a20420763a3a22899ad0e5f4b953b615a9e": { "describe": { "columns": [ { - "name": "number", - "ordinal": 0, - "type_info": "Int8" - }, - { - "name": "timestamp", - "ordinal": 1, - "type_info": "Int8" - }, - { - "name": "is_finished", - "ordinal": 2, - "type_info": "Bool" - }, - { - "name": "l1_tx_count", - "ordinal": 3, - "type_info": "Int4" - }, - { - "name": "l2_tx_count", - "ordinal": 4, - "type_info": "Int4" - }, - { - "name": "fee_account_address", - "ordinal": 5, - "type_info": "Bytea" - }, - { - "name": "bloom", - "ordinal": 6, - "type_info": "Bytea" - }, - { - "name": "priority_ops_onchain_data", - "ordinal": 7, - "type_info": "ByteaArray" - }, - { - "name": "hash", - "ordinal": 8, - "type_info": "Bytea" - }, - { - "name": "parent_hash", - "ordinal": 9, - "type_info": "Bytea" - }, - { - "name": "commitment", - "ordinal": 10, - "type_info": "Bytea" - }, - { - "name": "compressed_write_logs", - "ordinal": 11, - "type_info": "Bytea" - }, - { - "name": "compressed_contracts", - "ordinal": 12, - "type_info": "Bytea" - }, - { - "name": "eth_prove_tx_id", - "ordinal": 13, - "type_info": "Int4" - }, - { - "name": "eth_commit_tx_id", - "ordinal": 14, - "type_info": "Int4" - }, - { - "name": "eth_execute_tx_id", - "ordinal": 15, - "type_info": "Int4" - }, - { - "name": "merkle_root_hash", - "ordinal": 16, - "type_info": "Bytea" - }, - { - "name": "l2_to_l1_logs", - "ordinal": 17, - "type_info": "ByteaArray" - }, - { - "name": "l2_to_l1_messages", - "ordinal": 18, - "type_info": "ByteaArray" - }, - { - "name": "used_contract_hashes", - "ordinal": 19, - "type_info": "Jsonb" - }, - { - "name": "compressed_initial_writes", - "ordinal": 20, - "type_info": "Bytea" - }, - { - "name": "compressed_repeated_writes", - "ordinal": 21, - "type_info": "Bytea" - }, - { - "name": "l2_l1_compressed_messages", - "ordinal": 22, - "type_info": "Bytea" - }, - { - "name": "l2_l1_merkle_root", - "ordinal": 23, - "type_info": "Bytea" - }, - { - "name": "l1_gas_price", - "ordinal": 24, - "type_info": "Int8" - }, - { - "name": "l2_fair_gas_price", - "ordinal": 25, - "type_info": "Int8" - }, - { - "name": "rollup_last_leaf_index", - "ordinal": 26, - "type_info": "Int8" - }, - { - "name": "zkporter_is_available", - "ordinal": 27, - "type_info": "Bool" - }, - { - "name": "bootloader_code_hash", - "ordinal": 28, - "type_info": "Bytea" - }, - { - "name": "default_aa_code_hash", - "ordinal": 29, - "type_info": "Bytea" - }, - { - "name": "base_fee_per_gas", - "ordinal": 30, - "type_info": "Numeric" - }, - { - "name": "aux_data_hash", - "ordinal": 31, - "type_info": "Bytea" - }, - { - "name": "pass_through_data_hash", - "ordinal": 32, - "type_info": "Bytea" - }, - { - "name": "meta_parameters_hash", - "ordinal": 33, - "type_info": "Bytea" - }, - { - "name": "protocol_version", - "ordinal": 34, - "type_info": "Int4" - }, - { - "name": "compressed_state_diffs", - "ordinal": 35, - "type_info": "Bytea" - }, - { - "name": "system_logs", - "ordinal": 36, - "type_info": "ByteaArray" - }, - { - "name": "events_queue_commitment", - "ordinal": 37, - "type_info": "Bytea" - }, - { - "name": "bootloader_initial_content_commitment", - "ordinal": 38, - "type_info": "Bytea" - } - ], - "nullable": [ - false, - false, - false, - false, - false, - false, - false, - false, - true, - true, - true, - true, - true, - true, - true, - true, - true, - false, - false, - false, - true, - true, - true, - true, - false, - false, - true, - true, - true, - true, - false, - true, - true, - true, - true, - true, - false, - true, - true - ], - "parameters": { - "Left": [ - "Bytea", - "Bytea", - "Int4", - "Int8" - ] - } - }, - "query": "\n SELECT\n number,\n l1_batches.timestamp,\n is_finished,\n l1_tx_count,\n l2_tx_count,\n fee_account_address,\n bloom,\n priority_ops_onchain_data,\n hash,\n parent_hash,\n commitment,\n compressed_write_logs,\n compressed_contracts,\n eth_prove_tx_id,\n eth_commit_tx_id,\n eth_execute_tx_id,\n merkle_root_hash,\n l2_to_l1_logs,\n l2_to_l1_messages,\n used_contract_hashes,\n compressed_initial_writes,\n compressed_repeated_writes,\n l2_l1_compressed_messages,\n l2_l1_merkle_root,\n l1_gas_price,\n l2_fair_gas_price,\n rollup_last_leaf_index,\n zkporter_is_available,\n l1_batches.bootloader_code_hash,\n l1_batches.default_aa_code_hash,\n base_fee_per_gas,\n aux_data_hash,\n pass_through_data_hash,\n meta_parameters_hash,\n protocol_version,\n compressed_state_diffs,\n system_logs,\n events_queue_commitment,\n bootloader_initial_content_commitment\n FROM\n l1_batches\n LEFT JOIN commitments ON commitments.l1_batch_number = l1_batches.number\n JOIN protocol_versions ON protocol_versions.id = l1_batches.protocol_version\n WHERE\n eth_commit_tx_id IS NULL\n AND number != 0\n AND protocol_versions.bootloader_code_hash = $1\n AND protocol_versions.default_account_code_hash = $2\n AND commitment IS NOT NULL\n AND (\n protocol_versions.id = $3\n OR protocol_versions.upgrade_tx_hash IS NULL\n )\n AND events_queue_commitment IS NOT NULL\n AND bootloader_initial_content_commitment IS NOT NULL\n ORDER BY\n number\n LIMIT\n $4\n " - }, - "15858168fea6808c6d59d0e6d8f28a20420763a3a22899ad0e5f4b953b615a9e": { - "describe": { - "columns": [ - { - "name": "id", + "name": "id", "ordinal": 0, "type_info": "Int4" } @@ -1494,196 +1500,453 @@ }, "query": "\n SELECT\n *\n FROM\n transactions\n WHERE\n miniblock_number IS NOT NULL\n AND l1_batch_number IS NULL\n ORDER BY\n miniblock_number,\n index_in_block\n " }, - "1766c0a21ba5918dd08f4babd8dbfdf10fb1cb43781219586c169fb976204331": { + "16e62660fd14f6d3731e69fa696a36408510bb05c15285dfa7708bc0b044d0c5": { "describe": { "columns": [ { - "name": "l1_batch_number", + "name": "number", "ordinal": 0, "type_info": "Int8" - } - ], - "nullable": [ - false - ], - "parameters": { - "Left": [ - "Bytea" - ] - } - }, - "query": "\n SELECT\n l1_batch_number\n FROM\n initial_writes\n WHERE\n hashed_key = $1\n " - }, - "1862d3a78e4e9068df1b8ce3bbe9f3f0b5d629fdb5c36ea1bfb93ed246be968e": { - "describe": { - "columns": [ - { - "name": "is_priority", - "ordinal": 0, - "type_info": "Bool" }, { - "name": "initiator_address", + "name": "timestamp", "ordinal": 1, - "type_info": "Bytea" + "type_info": "Int8" }, { - "name": "gas_limit", + "name": "is_finished", "ordinal": 2, - "type_info": "Numeric" + "type_info": "Bool" }, { - "name": "gas_per_pubdata_limit", + "name": "l1_tx_count", "ordinal": 3, - "type_info": "Numeric" + "type_info": "Int4" }, { - "name": "received_at", + "name": "l2_tx_count", "ordinal": 4, - "type_info": "Timestamp" + "type_info": "Int4" }, { - "name": "miniblock_number", + "name": "fee_account_address", "ordinal": 5, - "type_info": "Int8" + "type_info": "Bytea" }, { - "name": "error", + "name": "bloom", "ordinal": 6, - "type_info": "Varchar" + "type_info": "Bytea" }, { - "name": "effective_gas_price", + "name": "priority_ops_onchain_data", "ordinal": 7, - "type_info": "Numeric" + "type_info": "ByteaArray" }, { - "name": "refunded_gas", + "name": "hash", "ordinal": 8, - "type_info": "Int8" + "type_info": "Bytea" }, { - "name": "eth_commit_tx_hash?", + "name": "parent_hash", "ordinal": 9, - "type_info": "Text" + "type_info": "Bytea" }, { - "name": "eth_prove_tx_hash?", + "name": "commitment", "ordinal": 10, - "type_info": "Text" + "type_info": "Bytea" }, { - "name": "eth_execute_tx_hash?", + "name": "compressed_write_logs", "ordinal": 11, - "type_info": "Text" - } - ], - "nullable": [ - false, - false, - true, - true, - false, - true, - true, - true, - false, - false, - false, - false - ], - "parameters": { - "Left": [ - "Bytea" - ] - } - }, - "query": "\n SELECT\n transactions.is_priority,\n transactions.initiator_address,\n transactions.gas_limit,\n transactions.gas_per_pubdata_limit,\n transactions.received_at,\n transactions.miniblock_number,\n transactions.error,\n transactions.effective_gas_price,\n transactions.refunded_gas,\n commit_tx.tx_hash AS \"eth_commit_tx_hash?\",\n prove_tx.tx_hash AS \"eth_prove_tx_hash?\",\n execute_tx.tx_hash AS \"eth_execute_tx_hash?\"\n FROM\n transactions\n LEFT JOIN miniblocks ON miniblocks.number = transactions.miniblock_number\n LEFT JOIN l1_batches ON l1_batches.number = miniblocks.l1_batch_number\n LEFT JOIN eth_txs_history AS commit_tx ON (\n l1_batches.eth_commit_tx_id = commit_tx.eth_tx_id\n AND commit_tx.confirmed_at IS NOT NULL\n )\n LEFT JOIN eth_txs_history AS prove_tx ON (\n l1_batches.eth_prove_tx_id = prove_tx.eth_tx_id\n AND prove_tx.confirmed_at IS NOT NULL\n )\n LEFT JOIN eth_txs_history AS execute_tx ON (\n l1_batches.eth_execute_tx_id = execute_tx.eth_tx_id\n AND execute_tx.confirmed_at IS NOT NULL\n )\n WHERE\n transactions.hash = $1\n " - }, - "18820f4ab0c3d2cc9187c5660f9f50e423eb6134659fe52bcc2b27ad16740c96": { - "describe": { - "columns": [], - "nullable": [], - "parameters": { - "Left": [ - "ByteaArray" - ] - } - }, - "query": "\n DELETE FROM transactions\n WHERE\n in_mempool = TRUE\n AND initiator_address = ANY ($1)\n " - }, - "19314d74e94b610e2da6d728ca37ea964610e131d45f720f7a7b2a130fe9ed89": { - "describe": { - "columns": [], - "nullable": [], - "parameters": { - "Left": [ - "Int8", - "Text", - "Jsonb", - "Text" - ] - } - }, - "query": "\n UPDATE contract_verification_requests\n SET\n status = 'failed',\n updated_at = NOW(),\n error = $2,\n compilation_errors = $3,\n panic_message = $4\n WHERE\n id = $1\n " - }, - "19545806b8f772075096e69f8665d98a3d9f7df162ae22a98c3c7620fcd13bd2": { - "describe": { - "columns": [ + "type_info": "Bytea" + }, { - "name": "id", - "ordinal": 0, + "name": "compressed_contracts", + "ordinal": 12, + "type_info": "Bytea" + }, + { + "name": "eth_prove_tx_id", + "ordinal": 13, "type_info": "Int4" }, { - "name": "timestamp", - "ordinal": 1, - "type_info": "Int8" + "name": "eth_commit_tx_id", + "ordinal": 14, + "type_info": "Int4" }, { - "name": "recursion_scheduler_level_vk_hash", - "ordinal": 2, + "name": "eth_execute_tx_id", + "ordinal": 15, + "type_info": "Int4" + }, + { + "name": "merkle_root_hash", + "ordinal": 16, "type_info": "Bytea" }, { - "name": "recursion_node_level_vk_hash", - "ordinal": 3, + "name": "l2_to_l1_logs", + "ordinal": 17, + "type_info": "ByteaArray" + }, + { + "name": "l2_to_l1_messages", + "ordinal": 18, + "type_info": "ByteaArray" + }, + { + "name": "used_contract_hashes", + "ordinal": 19, + "type_info": "Jsonb" + }, + { + "name": "compressed_initial_writes", + "ordinal": 20, "type_info": "Bytea" }, { - "name": "recursion_leaf_level_vk_hash", - "ordinal": 4, + "name": "compressed_repeated_writes", + "ordinal": 21, "type_info": "Bytea" }, { - "name": "recursion_circuits_set_vks_hash", - "ordinal": 5, + "name": "l2_l1_compressed_messages", + "ordinal": 22, + "type_info": "Bytea" + }, + { + "name": "l2_l1_merkle_root", + "ordinal": 23, "type_info": "Bytea" }, + { + "name": "l1_gas_price", + "ordinal": 24, + "type_info": "Int8" + }, + { + "name": "l2_fair_gas_price", + "ordinal": 25, + "type_info": "Int8" + }, + { + "name": "rollup_last_leaf_index", + "ordinal": 26, + "type_info": "Int8" + }, + { + "name": "zkporter_is_available", + "ordinal": 27, + "type_info": "Bool" + }, { "name": "bootloader_code_hash", - "ordinal": 6, + "ordinal": 28, "type_info": "Bytea" }, { - "name": "default_account_code_hash", - "ordinal": 7, + "name": "default_aa_code_hash", + "ordinal": 29, "type_info": "Bytea" }, { - "name": "verifier_address", - "ordinal": 8, + "name": "base_fee_per_gas", + "ordinal": 30, + "type_info": "Numeric" + }, + { + "name": "aux_data_hash", + "ordinal": 31, "type_info": "Bytea" }, { - "name": "upgrade_tx_hash", - "ordinal": 9, + "name": "pass_through_data_hash", + "ordinal": 32, "type_info": "Bytea" }, { - "name": "created_at", - "ordinal": 10, - "type_info": "Timestamp" + "name": "meta_parameters_hash", + "ordinal": 33, + "type_info": "Bytea" + }, + { + "name": "protocol_version", + "ordinal": 34, + "type_info": "Int4" + }, + { + "name": "compressed_state_diffs", + "ordinal": 35, + "type_info": "Bytea" + }, + { + "name": "system_logs", + "ordinal": 36, + "type_info": "ByteaArray" + }, + { + "name": "events_queue_commitment", + "ordinal": 37, + "type_info": "Bytea" + }, + { + "name": "bootloader_initial_content_commitment", + "ordinal": 38, + "type_info": "Bytea" + }, + { + "name": "pubdata_input", + "ordinal": 39, + "type_info": "Bytea" + } + ], + "nullable": [ + false, + false, + false, + false, + false, + false, + false, + false, + true, + true, + true, + true, + true, + true, + true, + true, + true, + false, + false, + false, + true, + true, + true, + true, + false, + false, + true, + true, + true, + true, + false, + true, + true, + true, + true, + true, + false, + true, + true, + true + ], + "parameters": { + "Left": [ + "Bytea", + "Bytea", + "Int4", + "Int8" + ] + } + }, + "query": "\n SELECT\n number,\n l1_batches.timestamp,\n is_finished,\n l1_tx_count,\n l2_tx_count,\n fee_account_address,\n bloom,\n priority_ops_onchain_data,\n hash,\n parent_hash,\n commitment,\n compressed_write_logs,\n compressed_contracts,\n eth_prove_tx_id,\n eth_commit_tx_id,\n eth_execute_tx_id,\n merkle_root_hash,\n l2_to_l1_logs,\n l2_to_l1_messages,\n used_contract_hashes,\n compressed_initial_writes,\n compressed_repeated_writes,\n l2_l1_compressed_messages,\n l2_l1_merkle_root,\n l1_gas_price,\n l2_fair_gas_price,\n rollup_last_leaf_index,\n zkporter_is_available,\n l1_batches.bootloader_code_hash,\n l1_batches.default_aa_code_hash,\n base_fee_per_gas,\n aux_data_hash,\n pass_through_data_hash,\n meta_parameters_hash,\n protocol_version,\n compressed_state_diffs,\n system_logs,\n events_queue_commitment,\n bootloader_initial_content_commitment,\n pubdata_input\n FROM\n l1_batches\n LEFT JOIN commitments ON commitments.l1_batch_number = l1_batches.number\n JOIN protocol_versions ON protocol_versions.id = l1_batches.protocol_version\n WHERE\n eth_commit_tx_id IS NULL\n AND number != 0\n AND protocol_versions.bootloader_code_hash = $1\n AND protocol_versions.default_account_code_hash = $2\n AND commitment IS NOT NULL\n AND (\n protocol_versions.id = $3\n OR protocol_versions.upgrade_tx_hash IS NULL\n )\n AND events_queue_commitment IS NOT NULL\n AND bootloader_initial_content_commitment IS NOT NULL\n ORDER BY\n number\n LIMIT\n $4\n " + }, + "1766c0a21ba5918dd08f4babd8dbfdf10fb1cb43781219586c169fb976204331": { + "describe": { + "columns": [ + { + "name": "l1_batch_number", + "ordinal": 0, + "type_info": "Int8" + } + ], + "nullable": [ + false + ], + "parameters": { + "Left": [ + "Bytea" + ] + } + }, + "query": "\n SELECT\n l1_batch_number\n FROM\n initial_writes\n WHERE\n hashed_key = $1\n " + }, + "1862d3a78e4e9068df1b8ce3bbe9f3f0b5d629fdb5c36ea1bfb93ed246be968e": { + "describe": { + "columns": [ + { + "name": "is_priority", + "ordinal": 0, + "type_info": "Bool" + }, + { + "name": "initiator_address", + "ordinal": 1, + "type_info": "Bytea" + }, + { + "name": "gas_limit", + "ordinal": 2, + "type_info": "Numeric" + }, + { + "name": "gas_per_pubdata_limit", + "ordinal": 3, + "type_info": "Numeric" + }, + { + "name": "received_at", + "ordinal": 4, + "type_info": "Timestamp" + }, + { + "name": "miniblock_number", + "ordinal": 5, + "type_info": "Int8" + }, + { + "name": "error", + "ordinal": 6, + "type_info": "Varchar" + }, + { + "name": "effective_gas_price", + "ordinal": 7, + "type_info": "Numeric" + }, + { + "name": "refunded_gas", + "ordinal": 8, + "type_info": "Int8" + }, + { + "name": "eth_commit_tx_hash?", + "ordinal": 9, + "type_info": "Text" + }, + { + "name": "eth_prove_tx_hash?", + "ordinal": 10, + "type_info": "Text" + }, + { + "name": "eth_execute_tx_hash?", + "ordinal": 11, + "type_info": "Text" + } + ], + "nullable": [ + false, + false, + true, + true, + false, + true, + true, + true, + false, + false, + false, + false + ], + "parameters": { + "Left": [ + "Bytea" + ] + } + }, + "query": "\n SELECT\n transactions.is_priority,\n transactions.initiator_address,\n transactions.gas_limit,\n transactions.gas_per_pubdata_limit,\n transactions.received_at,\n transactions.miniblock_number,\n transactions.error,\n transactions.effective_gas_price,\n transactions.refunded_gas,\n commit_tx.tx_hash AS \"eth_commit_tx_hash?\",\n prove_tx.tx_hash AS \"eth_prove_tx_hash?\",\n execute_tx.tx_hash AS \"eth_execute_tx_hash?\"\n FROM\n transactions\n LEFT JOIN miniblocks ON miniblocks.number = transactions.miniblock_number\n LEFT JOIN l1_batches ON l1_batches.number = miniblocks.l1_batch_number\n LEFT JOIN eth_txs_history AS commit_tx ON (\n l1_batches.eth_commit_tx_id = commit_tx.eth_tx_id\n AND commit_tx.confirmed_at IS NOT NULL\n )\n LEFT JOIN eth_txs_history AS prove_tx ON (\n l1_batches.eth_prove_tx_id = prove_tx.eth_tx_id\n AND prove_tx.confirmed_at IS NOT NULL\n )\n LEFT JOIN eth_txs_history AS execute_tx ON (\n l1_batches.eth_execute_tx_id = execute_tx.eth_tx_id\n AND execute_tx.confirmed_at IS NOT NULL\n )\n WHERE\n transactions.hash = $1\n " + }, + "18820f4ab0c3d2cc9187c5660f9f50e423eb6134659fe52bcc2b27ad16740c96": { + "describe": { + "columns": [], + "nullable": [], + "parameters": { + "Left": [ + "ByteaArray" + ] + } + }, + "query": "\n DELETE FROM transactions\n WHERE\n in_mempool = TRUE\n AND initiator_address = ANY ($1)\n " + }, + "19314d74e94b610e2da6d728ca37ea964610e131d45f720f7a7b2a130fe9ed89": { + "describe": { + "columns": [], + "nullable": [], + "parameters": { + "Left": [ + "Int8", + "Text", + "Jsonb", + "Text" + ] + } + }, + "query": "\n UPDATE contract_verification_requests\n SET\n status = 'failed',\n updated_at = NOW(),\n error = $2,\n compilation_errors = $3,\n panic_message = $4\n WHERE\n id = $1\n " + }, + "19545806b8f772075096e69f8665d98a3d9f7df162ae22a98c3c7620fcd13bd2": { + "describe": { + "columns": [ + { + "name": "id", + "ordinal": 0, + "type_info": "Int4" + }, + { + "name": "timestamp", + "ordinal": 1, + "type_info": "Int8" + }, + { + "name": "recursion_scheduler_level_vk_hash", + "ordinal": 2, + "type_info": "Bytea" + }, + { + "name": "recursion_node_level_vk_hash", + "ordinal": 3, + "type_info": "Bytea" + }, + { + "name": "recursion_leaf_level_vk_hash", + "ordinal": 4, + "type_info": "Bytea" + }, + { + "name": "recursion_circuits_set_vks_hash", + "ordinal": 5, + "type_info": "Bytea" + }, + { + "name": "bootloader_code_hash", + "ordinal": 6, + "type_info": "Bytea" + }, + { + "name": "default_account_code_hash", + "ordinal": 7, + "type_info": "Bytea" + }, + { + "name": "verifier_address", + "ordinal": 8, + "type_info": "Bytea" + }, + { + "name": "upgrade_tx_hash", + "ordinal": 9, + "type_info": "Bytea" + }, + { + "name": "created_at", + "ordinal": 10, + "type_info": "Timestamp" } ], "nullable": [ @@ -3527,54 +3790,14 @@ }, "query": "\n UPDATE prover_jobs_fri\n SET\n status = 'failed',\n error = $1,\n updated_at = NOW()\n WHERE\n id = $2\n " }, - "367ca58514762ffc26fd906c4c441a21691357494c2f9919bfcbcbb0e42315c2": { + "3671f23665664b8d6acf97e4f697e5afa28d855d87ea2f8c93e79c436749068a": { "describe": { "columns": [ { - "name": "count!", + "name": "number", "ordinal": 0, "type_info": "Int8" - } - ], - "nullable": [ - null - ], - "parameters": { - "Left": [ - "Int8" - ] - } - }, - "query": "\n SELECT\n COUNT(*) AS \"count!\"\n FROM\n miniblocks\n WHERE\n number = $1\n AND consensus IS NOT NULL\n " - }, - "373f6339a61c6ac74080f855fcc25dab33355eefdce69255bc7106675b0e5641": { - "describe": { - "columns": [ - { - "name": "count!", - "ordinal": 0, - "type_info": "Int8" - } - ], - "nullable": [ - null - ], - "parameters": { - "Left": [ - "Int4" - ] - } - }, - "query": "\n SELECT\n COUNT(*) AS \"count!\"\n FROM\n prover_protocol_versions\n WHERE\n id = $1\n " - }, - "3767abe810cebfc0ea1992948274c3c20ebc23e30b30eb1358fade7b23318414": { - "describe": { - "columns": [ - { - "name": "number", - "ordinal": 0, - "type_info": "Int8" - }, + }, { "name": "timestamp", "ordinal": 1, @@ -3764,6 +3987,11 @@ "name": "bootloader_initial_content_commitment", "ordinal": 38, "type_info": "Bytea" + }, + { + "name": "pubdata_input", + "ordinal": 39, + "type_info": "Bytea" } ], "nullable": [ @@ -3805,6 +4033,7 @@ true, false, true, + true, true ], "parameters": { @@ -3815,7 +4044,47 @@ ] } }, - "query": "\n SELECT\n number,\n timestamp,\n is_finished,\n l1_tx_count,\n l2_tx_count,\n fee_account_address,\n bloom,\n priority_ops_onchain_data,\n hash,\n parent_hash,\n commitment,\n compressed_write_logs,\n compressed_contracts,\n eth_prove_tx_id,\n eth_commit_tx_id,\n eth_execute_tx_id,\n merkle_root_hash,\n l2_to_l1_logs,\n l2_to_l1_messages,\n used_contract_hashes,\n compressed_initial_writes,\n compressed_repeated_writes,\n l2_l1_compressed_messages,\n l2_l1_merkle_root,\n l1_gas_price,\n l2_fair_gas_price,\n rollup_last_leaf_index,\n zkporter_is_available,\n bootloader_code_hash,\n default_aa_code_hash,\n base_fee_per_gas,\n aux_data_hash,\n pass_through_data_hash,\n meta_parameters_hash,\n protocol_version,\n compressed_state_diffs,\n system_logs,\n events_queue_commitment,\n bootloader_initial_content_commitment\n FROM\n l1_batches\n LEFT JOIN commitments ON commitments.l1_batch_number = l1_batches.number\n WHERE\n number BETWEEN $1 AND $2\n ORDER BY\n number\n LIMIT\n $3\n " + "query": "\n SELECT\n number,\n timestamp,\n is_finished,\n l1_tx_count,\n l2_tx_count,\n fee_account_address,\n bloom,\n priority_ops_onchain_data,\n hash,\n parent_hash,\n commitment,\n compressed_write_logs,\n compressed_contracts,\n eth_prove_tx_id,\n eth_commit_tx_id,\n eth_execute_tx_id,\n merkle_root_hash,\n l2_to_l1_logs,\n l2_to_l1_messages,\n used_contract_hashes,\n compressed_initial_writes,\n compressed_repeated_writes,\n l2_l1_compressed_messages,\n l2_l1_merkle_root,\n l1_gas_price,\n l2_fair_gas_price,\n rollup_last_leaf_index,\n zkporter_is_available,\n bootloader_code_hash,\n default_aa_code_hash,\n base_fee_per_gas,\n aux_data_hash,\n pass_through_data_hash,\n meta_parameters_hash,\n protocol_version,\n compressed_state_diffs,\n system_logs,\n events_queue_commitment,\n bootloader_initial_content_commitment,\n pubdata_input\n FROM\n l1_batches\n LEFT JOIN commitments ON commitments.l1_batch_number = l1_batches.number\n WHERE\n number BETWEEN $1 AND $2\n ORDER BY\n number\n LIMIT\n $3\n " + }, + "367ca58514762ffc26fd906c4c441a21691357494c2f9919bfcbcbb0e42315c2": { + "describe": { + "columns": [ + { + "name": "count!", + "ordinal": 0, + "type_info": "Int8" + } + ], + "nullable": [ + null + ], + "parameters": { + "Left": [ + "Int8" + ] + } + }, + "query": "\n SELECT\n COUNT(*) AS \"count!\"\n FROM\n miniblocks\n WHERE\n number = $1\n AND consensus IS NOT NULL\n " + }, + "373f6339a61c6ac74080f855fcc25dab33355eefdce69255bc7106675b0e5641": { + "describe": { + "columns": [ + { + "name": "count!", + "ordinal": 0, + "type_info": "Int8" + } + ], + "nullable": [ + null + ], + "parameters": { + "Left": [ + "Int4" + ] + } + }, + "query": "\n SELECT\n COUNT(*) AS \"count!\"\n FROM\n prover_protocol_versions\n WHERE\n id = $1\n " }, "38a8b00e320b16e99f6ea0e5954e2f7e49cd6600bd3d56cf41795c2c9e082e4c": { "describe": { @@ -3966,40 +4235,6 @@ }, "query": "\n UPDATE scheduler_witness_jobs_fri\n SET\n status = 'queued'\n WHERE\n l1_batch_number = $1\n AND status != 'successful'\n AND status != 'in_progress'\n " }, - "40741973e34329d4924bce8d1af8d9b4ce7e457ed05e0973c18405a25d5ab025": { - "describe": { - "columns": [], - "nullable": [], - "parameters": { - "Left": [ - "Int8", - "Int4", - "Int4", - "Int8", - "Bool", - "Bytea", - "ByteaArray", - "ByteaArray", - "Bytea", - "ByteaArray", - "Int8", - "Int8", - "Int8", - "Jsonb", - "Jsonb", - "Numeric", - "Int8", - "Int8", - "Bytea", - "Bytea", - "Int4", - "ByteaArray", - "Int8Array" - ] - } - }, - "query": "\n INSERT INTO\n l1_batches (\n number,\n l1_tx_count,\n l2_tx_count,\n timestamp,\n is_finished,\n fee_account_address,\n l2_to_l1_logs,\n l2_to_l1_messages,\n bloom,\n priority_ops_onchain_data,\n predicted_commit_gas_cost,\n predicted_prove_gas_cost,\n predicted_execute_gas_cost,\n initial_bootloader_heap_content,\n used_contract_hashes,\n base_fee_per_gas,\n l1_gas_price,\n l2_fair_gas_price,\n bootloader_code_hash,\n default_aa_code_hash,\n protocol_version,\n system_logs,\n storage_refunds,\n created_at,\n updated_at\n )\n VALUES\n (\n $1,\n $2,\n $3,\n $4,\n $5,\n $6,\n $7,\n $8,\n $9,\n $10,\n $11,\n $12,\n $13,\n $14,\n $15,\n $16,\n $17,\n $18,\n $19,\n $20,\n $21,\n $22,\n $23,\n NOW(),\n NOW()\n )\n " - }, "40c82325e05572db9c3a4ca8cc347617ed18495ef147b3ecfacdd89f54957b6a": { "describe": { "columns": [], @@ -4090,202 +4325,186 @@ }, "query": "\n SELECT\n MIN(number) AS \"number\"\n FROM\n l1_batches\n " }, - "45b5825c82d33c9494ceef0fdc77675b89128d56559b8c89465844a914f5245e": { + "46c4696fff5a4b8cc5cb46b05645da82065836fe17687ffad04126a6a8b2b27c": { + "describe": { + "columns": [], + "nullable": [], + "parameters": { + "Left": [ + "Time", + "Int8" + ] + } + }, + "query": "\n UPDATE leaf_aggregation_witness_jobs_fri\n SET\n status = 'successful',\n updated_at = NOW(),\n time_taken = $1\n WHERE\n id = $2\n " + }, + "47c2f23d9209d155f3f32fd21ef7931a02fe5ffaf2c4dc2f1e7a48c0e932c060": { "describe": { "columns": [ { - "name": "number", + "name": "l1_batch_number", "ordinal": 0, "type_info": "Int8" }, { - "name": "timestamp", + "name": "l1_batch_root_hash", "ordinal": 1, - "type_info": "Int8" + "type_info": "Bytea" }, { - "name": "is_finished", + "name": "miniblock_number", "ordinal": 2, - "type_info": "Bool" + "type_info": "Int8" }, { - "name": "l1_tx_count", + "name": "miniblock_root_hash", "ordinal": 3, + "type_info": "Bytea" + }, + { + "name": "last_finished_chunk_id", + "ordinal": 4, + "type_info": "Int4" + }, + { + "name": "total_chunk_count", + "ordinal": 5, + "type_info": "Int4" + } + ], + "nullable": [ + false, + false, + false, + false, + true, + false + ], + "parameters": { + "Left": [] + } + }, + "query": "\n SELECT\n l1_batch_number,\n l1_batch_root_hash,\n miniblock_number,\n miniblock_root_hash,\n last_finished_chunk_id,\n total_chunk_count\n FROM\n snapshot_recovery\n " + }, + "481d3cdb6c9a90843b240dba84377cb8f1340b483faedbbc2b71055aa5451cae": { + "describe": { + "columns": [ + { + "name": "number", + "ordinal": 0, + "type_info": "Int8" + } + ], + "nullable": [ + null + ], + "parameters": { + "Left": [] + } + }, + "query": "\n SELECT\n MAX(number) AS \"number\"\n FROM\n l1_batches\n WHERE\n is_finished = TRUE\n " + }, + "4cdc90ed409b37b3c1c57bbcca9f82918afa1b0ac410325e4d00cd1c4fdd1e8b": { + "describe": { + "columns": [ + { + "name": "number", + "ordinal": 0, + "type_info": "Int8" + }, + { + "name": "l1_tx_count", + "ordinal": 1, "type_info": "Int4" }, { "name": "l2_tx_count", - "ordinal": 4, + "ordinal": 2, "type_info": "Int4" }, + { + "name": "timestamp", + "ordinal": 3, + "type_info": "Int8" + }, + { + "name": "is_finished", + "ordinal": 4, + "type_info": "Bool" + }, { "name": "fee_account_address", "ordinal": 5, "type_info": "Bytea" }, { - "name": "bloom", + "name": "l2_to_l1_logs", "ordinal": 6, - "type_info": "Bytea" + "type_info": "ByteaArray" }, { - "name": "priority_ops_onchain_data", + "name": "l2_to_l1_messages", "ordinal": 7, "type_info": "ByteaArray" }, { - "name": "hash", + "name": "bloom", "ordinal": 8, "type_info": "Bytea" }, { - "name": "parent_hash", + "name": "priority_ops_onchain_data", "ordinal": 9, - "type_info": "Bytea" + "type_info": "ByteaArray" }, { - "name": "commitment", + "name": "used_contract_hashes", "ordinal": 10, - "type_info": "Bytea" + "type_info": "Jsonb" }, { - "name": "compressed_write_logs", + "name": "base_fee_per_gas", "ordinal": 11, - "type_info": "Bytea" + "type_info": "Numeric" }, { - "name": "compressed_contracts", + "name": "l1_gas_price", "ordinal": 12, - "type_info": "Bytea" + "type_info": "Int8" }, { - "name": "eth_prove_tx_id", + "name": "l2_fair_gas_price", "ordinal": 13, - "type_info": "Int4" + "type_info": "Int8" }, { - "name": "eth_commit_tx_id", + "name": "bootloader_code_hash", "ordinal": 14, - "type_info": "Int4" + "type_info": "Bytea" }, { - "name": "eth_execute_tx_id", + "name": "default_aa_code_hash", "ordinal": 15, - "type_info": "Int4" + "type_info": "Bytea" }, { - "name": "merkle_root_hash", + "name": "protocol_version", "ordinal": 16, - "type_info": "Bytea" + "type_info": "Int4" }, { - "name": "l2_to_l1_logs", + "name": "compressed_state_diffs", "ordinal": 17, - "type_info": "ByteaArray" + "type_info": "Bytea" }, { - "name": "l2_to_l1_messages", + "name": "system_logs", "ordinal": 18, "type_info": "ByteaArray" }, { - "name": "used_contract_hashes", + "name": "pubdata_input", "ordinal": 19, - "type_info": "Jsonb" - }, - { - "name": "compressed_initial_writes", - "ordinal": 20, - "type_info": "Bytea" - }, - { - "name": "compressed_repeated_writes", - "ordinal": 21, - "type_info": "Bytea" - }, - { - "name": "l2_l1_compressed_messages", - "ordinal": 22, - "type_info": "Bytea" - }, - { - "name": "l2_l1_merkle_root", - "ordinal": 23, - "type_info": "Bytea" - }, - { - "name": "l1_gas_price", - "ordinal": 24, - "type_info": "Int8" - }, - { - "name": "l2_fair_gas_price", - "ordinal": 25, - "type_info": "Int8" - }, - { - "name": "rollup_last_leaf_index", - "ordinal": 26, - "type_info": "Int8" - }, - { - "name": "zkporter_is_available", - "ordinal": 27, - "type_info": "Bool" - }, - { - "name": "bootloader_code_hash", - "ordinal": 28, - "type_info": "Bytea" - }, - { - "name": "default_aa_code_hash", - "ordinal": 29, - "type_info": "Bytea" - }, - { - "name": "base_fee_per_gas", - "ordinal": 30, - "type_info": "Numeric" - }, - { - "name": "aux_data_hash", - "ordinal": 31, - "type_info": "Bytea" - }, - { - "name": "pass_through_data_hash", - "ordinal": 32, - "type_info": "Bytea" - }, - { - "name": "meta_parameters_hash", - "ordinal": 33, - "type_info": "Bytea" - }, - { - "name": "protocol_version", - "ordinal": 34, - "type_info": "Int4" - }, - { - "name": "compressed_state_diffs", - "ordinal": 35, - "type_info": "Bytea" - }, - { - "name": "system_logs", - "ordinal": 36, - "type_info": "ByteaArray" - }, - { - "name": "events_queue_commitment", - "ordinal": 37, - "type_info": "Bytea" - }, - { - "name": "bootloader_initial_content_commitment", - "ordinal": 38, "type_info": "Bytea" } ], @@ -4298,122 +4517,24 @@ false, false, false, - true, - true, - true, - true, - true, - true, - true, - true, - true, false, false, false, - true, - true, - true, - true, false, false, - true, - true, - true, - true, false, true, true, true, true, - true, false, - true, true ], "parameters": { "Left": [] } }, - "query": "\n SELECT\n number,\n timestamp,\n is_finished,\n l1_tx_count,\n l2_tx_count,\n fee_account_address,\n bloom,\n priority_ops_onchain_data,\n hash,\n parent_hash,\n commitment,\n compressed_write_logs,\n compressed_contracts,\n eth_prove_tx_id,\n eth_commit_tx_id,\n eth_execute_tx_id,\n merkle_root_hash,\n l2_to_l1_logs,\n l2_to_l1_messages,\n used_contract_hashes,\n compressed_initial_writes,\n compressed_repeated_writes,\n l2_l1_compressed_messages,\n l2_l1_merkle_root,\n l1_gas_price,\n l2_fair_gas_price,\n rollup_last_leaf_index,\n zkporter_is_available,\n bootloader_code_hash,\n default_aa_code_hash,\n base_fee_per_gas,\n aux_data_hash,\n pass_through_data_hash,\n meta_parameters_hash,\n protocol_version,\n compressed_state_diffs,\n system_logs,\n events_queue_commitment,\n bootloader_initial_content_commitment\n FROM\n l1_batches\n LEFT JOIN commitments ON commitments.l1_batch_number = l1_batches.number\n WHERE\n number = 0\n OR eth_commit_tx_id IS NOT NULL\n AND commitment IS NOT NULL\n ORDER BY\n number DESC\n LIMIT\n 1\n " - }, - "46c4696fff5a4b8cc5cb46b05645da82065836fe17687ffad04126a6a8b2b27c": { - "describe": { - "columns": [], - "nullable": [], - "parameters": { - "Left": [ - "Time", - "Int8" - ] - } - }, - "query": "\n UPDATE leaf_aggregation_witness_jobs_fri\n SET\n status = 'successful',\n updated_at = NOW(),\n time_taken = $1\n WHERE\n id = $2\n " - }, - "47c2f23d9209d155f3f32fd21ef7931a02fe5ffaf2c4dc2f1e7a48c0e932c060": { - "describe": { - "columns": [ - { - "name": "l1_batch_number", - "ordinal": 0, - "type_info": "Int8" - }, - { - "name": "l1_batch_root_hash", - "ordinal": 1, - "type_info": "Bytea" - }, - { - "name": "miniblock_number", - "ordinal": 2, - "type_info": "Int8" - }, - { - "name": "miniblock_root_hash", - "ordinal": 3, - "type_info": "Bytea" - }, - { - "name": "last_finished_chunk_id", - "ordinal": 4, - "type_info": "Int4" - }, - { - "name": "total_chunk_count", - "ordinal": 5, - "type_info": "Int4" - } - ], - "nullable": [ - false, - false, - false, - false, - true, - false - ], - "parameters": { - "Left": [] - } - }, - "query": "\n SELECT\n l1_batch_number,\n l1_batch_root_hash,\n miniblock_number,\n miniblock_root_hash,\n last_finished_chunk_id,\n total_chunk_count\n FROM\n snapshot_recovery\n " - }, - "481d3cdb6c9a90843b240dba84377cb8f1340b483faedbbc2b71055aa5451cae": { - "describe": { - "columns": [ - { - "name": "number", - "ordinal": 0, - "type_info": "Int8" - } - ], - "nullable": [ - null - ], - "parameters": { - "Left": [] - } - }, - "query": "\n SELECT\n MAX(number) AS \"number\"\n FROM\n l1_batches\n WHERE\n is_finished = TRUE\n " + "query": "\n SELECT\n number,\n l1_tx_count,\n l2_tx_count,\n timestamp,\n is_finished,\n fee_account_address,\n l2_to_l1_logs,\n l2_to_l1_messages,\n bloom,\n priority_ops_onchain_data,\n used_contract_hashes,\n base_fee_per_gas,\n l1_gas_price,\n l2_fair_gas_price,\n bootloader_code_hash,\n default_aa_code_hash,\n protocol_version,\n compressed_state_diffs,\n system_logs,\n pubdata_input\n FROM\n l1_batches\n ORDER BY\n number DESC\n LIMIT\n 1\n " }, "4d263992ed6d5abbd7d3ca43af9d772d8801b0ae673b7173ae08a1fa6cbf67b2": { "describe": { @@ -4905,7 +5026,7 @@ }, "query": "\n UPDATE tokens\n SET\n usd_price = $2,\n usd_price_updated_at = $3,\n updated_at = NOW()\n WHERE\n l1_address = $1\n " }, - "5c39f043c9b36693b0a845eb36549374a2d931e62615bc7e6ecd0af957b42a13": { + "5aaed2a975042cc9b7b9d88e5fd5db07667280abef27cc73159d2fd9c95b209b": { "describe": { "columns": [ { @@ -4919,9 +5040,9 @@ "type_info": "Int8" }, { - "name": "hash", + "name": "is_finished", "ordinal": 2, - "type_info": "Bytea" + "type_info": "Bool" }, { "name": "l1_tx_count", @@ -4934,275 +5055,45 @@ "type_info": "Int4" }, { - "name": "base_fee_per_gas", + "name": "fee_account_address", "ordinal": 5, - "type_info": "Numeric" + "type_info": "Bytea" }, { - "name": "l1_gas_price", + "name": "bloom", "ordinal": 6, - "type_info": "Int8" + "type_info": "Bytea" }, { - "name": "l2_fair_gas_price", + "name": "priority_ops_onchain_data", "ordinal": 7, - "type_info": "Int8" + "type_info": "ByteaArray" }, { - "name": "bootloader_code_hash", + "name": "hash", "ordinal": 8, "type_info": "Bytea" }, { - "name": "default_aa_code_hash", + "name": "parent_hash", "ordinal": 9, "type_info": "Bytea" }, { - "name": "protocol_version", + "name": "commitment", "ordinal": 10, - "type_info": "Int4" + "type_info": "Bytea" }, { - "name": "virtual_blocks", + "name": "compressed_write_logs", "ordinal": 11, - "type_info": "Int8" - } - ], - "nullable": [ - false, - false, - false, - false, - false, - false, - false, - false, - true, - true, - true, - false - ], - "parameters": { - "Left": [ - "Int8" - ] - } - }, - "query": "\n SELECT\n number,\n timestamp,\n hash,\n l1_tx_count,\n l2_tx_count,\n base_fee_per_gas,\n l1_gas_price,\n l2_fair_gas_price,\n bootloader_code_hash,\n default_aa_code_hash,\n protocol_version,\n virtual_blocks\n FROM\n miniblocks\n WHERE\n number = $1\n " - }, - "5d493cbce749cc5b56d4069423597b16599abaf51df0f19effe1a536376cf6a6": { - "describe": { - "columns": [ - { - "name": "bootloader_code_hash", - "ordinal": 0, "type_info": "Bytea" }, { - "name": "default_account_code_hash", - "ordinal": 1, + "name": "compressed_contracts", + "ordinal": 12, "type_info": "Bytea" - } - ], - "nullable": [ - false, - false - ], - "parameters": { - "Left": [ - "Int4" - ] - } - }, - "query": "\n SELECT\n bootloader_code_hash,\n default_account_code_hash\n FROM\n protocol_versions\n WHERE\n id = $1\n " - }, - "5e781f84ec41edd0941fa84de837effac442434c6e734d977e6682a7484abe7f": { - "describe": { - "columns": [ - { - "name": "l1_batch_number", - "ordinal": 0, - "type_info": "Int8" - }, - { - "name": "status", - "ordinal": 1, - "type_info": "Text" - }, - { - "name": "attempts", - "ordinal": 2, - "type_info": "Int2" - } - ], - "nullable": [ - false, - false, - false - ], - "parameters": { - "Left": [ - "Interval", - "Int2" - ] - } - }, - "query": "\n UPDATE proof_compression_jobs_fri\n SET\n status = 'queued',\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n (\n status = 'in_progress'\n AND processing_started_at <= NOW() - $1::INTERVAL\n AND attempts < $2\n )\n OR (\n status = 'failed'\n AND attempts < $2\n )\n RETURNING\n l1_batch_number,\n status,\n attempts\n " - }, - "5f6885b5457aaa78e10917ae5b8cd0bc0e8923a6bae64f22f09242766835ee0c": { - "describe": { - "columns": [ - { - "name": "id", - "ordinal": 0, - "type_info": "Int8" - }, - { - "name": "contract_address", - "ordinal": 1, - "type_info": "Bytea" - }, - { - "name": "source_code", - "ordinal": 2, - "type_info": "Text" - }, - { - "name": "contract_name", - "ordinal": 3, - "type_info": "Text" - }, - { - "name": "zk_compiler_version", - "ordinal": 4, - "type_info": "Text" - }, - { - "name": "compiler_version", - "ordinal": 5, - "type_info": "Text" - }, - { - "name": "optimization_used", - "ordinal": 6, - "type_info": "Bool" - }, - { - "name": "optimizer_mode", - "ordinal": 7, - "type_info": "Text" - }, - { - "name": "constructor_arguments", - "ordinal": 8, - "type_info": "Bytea" - }, - { - "name": "is_system", - "ordinal": 9, - "type_info": "Bool" - } - ], - "nullable": [ - false, - false, - false, - false, - false, - false, - false, - true, - false, - false - ], - "parameters": { - "Left": [] - } - }, - "query": "\n SELECT\n id,\n contract_address,\n source_code,\n contract_name,\n zk_compiler_version,\n compiler_version,\n optimization_used,\n optimizer_mode,\n constructor_arguments,\n is_system\n FROM\n contract_verification_requests\n WHERE\n status = 'successful'\n ORDER BY\n id\n " - }, - "5f8fc05ae782846898295d210dd3d55ff2b1510868dfe80d14fffa3f5ff07b83": { - "describe": { - "columns": [], - "nullable": [], - "parameters": { - "Left": [ - "Int8", - "Int8" - ] - } - }, - "query": "\n UPDATE l1_batches\n SET\n predicted_commit_gas_cost = $2,\n updated_at = NOW()\n WHERE\n number = $1\n " - }, - "608ee7ab02c003b0035db84a46b16da979d97a8f8cd10595cc55bdfa156e4c33": { - "describe": { - "columns": [ - { - "name": "number", - "ordinal": 0, - "type_info": "Int8" - }, - { - "name": "timestamp", - "ordinal": 1, - "type_info": "Int8" - }, - { - "name": "is_finished", - "ordinal": 2, - "type_info": "Bool" - }, - { - "name": "l1_tx_count", - "ordinal": 3, - "type_info": "Int4" - }, - { - "name": "l2_tx_count", - "ordinal": 4, - "type_info": "Int4" - }, - { - "name": "fee_account_address", - "ordinal": 5, - "type_info": "Bytea" - }, - { - "name": "bloom", - "ordinal": 6, - "type_info": "Bytea" - }, - { - "name": "priority_ops_onchain_data", - "ordinal": 7, - "type_info": "ByteaArray" - }, - { - "name": "hash", - "ordinal": 8, - "type_info": "Bytea" - }, - { - "name": "parent_hash", - "ordinal": 9, - "type_info": "Bytea" - }, - { - "name": "commitment", - "ordinal": 10, - "type_info": "Bytea" - }, - { - "name": "compressed_write_logs", - "ordinal": 11, - "type_info": "Bytea" - }, - { - "name": "compressed_contracts", - "ordinal": 12, - "type_info": "Bytea" - }, + }, { "name": "eth_prove_tx_id", "ordinal": 13, @@ -5314,14 +5205,14 @@ "type_info": "Int4" }, { - "name": "system_logs", + "name": "compressed_state_diffs", "ordinal": 35, - "type_info": "ByteaArray" + "type_info": "Bytea" }, { - "name": "compressed_state_diffs", + "name": "system_logs", "ordinal": 36, - "type_info": "Bytea" + "type_info": "ByteaArray" }, { "name": "events_queue_commitment", @@ -5332,6 +5223,11 @@ "name": "bootloader_initial_content_commitment", "ordinal": 38, "type_info": "Bytea" + }, + { + "name": "pubdata_input", + "ordinal": 39, + "type_info": "Bytea" } ], "nullable": [ @@ -5370,6 +5266,7 @@ true, true, true, + true, false, true, true, @@ -5381,9 +5278,9 @@ ] } }, - "query": "\n SELECT\n number,\n timestamp,\n is_finished,\n l1_tx_count,\n l2_tx_count,\n fee_account_address,\n bloom,\n priority_ops_onchain_data,\n hash,\n parent_hash,\n commitment,\n compressed_write_logs,\n compressed_contracts,\n eth_prove_tx_id,\n eth_commit_tx_id,\n eth_execute_tx_id,\n merkle_root_hash,\n l2_to_l1_logs,\n l2_to_l1_messages,\n used_contract_hashes,\n compressed_initial_writes,\n compressed_repeated_writes,\n l2_l1_compressed_messages,\n l2_l1_merkle_root,\n l1_gas_price,\n l2_fair_gas_price,\n rollup_last_leaf_index,\n zkporter_is_available,\n bootloader_code_hash,\n default_aa_code_hash,\n base_fee_per_gas,\n aux_data_hash,\n pass_through_data_hash,\n meta_parameters_hash,\n protocol_version,\n system_logs,\n compressed_state_diffs,\n events_queue_commitment,\n bootloader_initial_content_commitment\n FROM\n l1_batches\n LEFT JOIN commitments ON commitments.l1_batch_number = l1_batches.number\n WHERE\n number = $1\n " + "query": "\n SELECT\n number,\n timestamp,\n is_finished,\n l1_tx_count,\n l2_tx_count,\n fee_account_address,\n bloom,\n priority_ops_onchain_data,\n hash,\n parent_hash,\n commitment,\n compressed_write_logs,\n compressed_contracts,\n eth_prove_tx_id,\n eth_commit_tx_id,\n eth_execute_tx_id,\n merkle_root_hash,\n l2_to_l1_logs,\n l2_to_l1_messages,\n used_contract_hashes,\n compressed_initial_writes,\n compressed_repeated_writes,\n l2_l1_compressed_messages,\n l2_l1_merkle_root,\n l1_gas_price,\n l2_fair_gas_price,\n rollup_last_leaf_index,\n zkporter_is_available,\n bootloader_code_hash,\n default_aa_code_hash,\n base_fee_per_gas,\n aux_data_hash,\n pass_through_data_hash,\n meta_parameters_hash,\n protocol_version,\n compressed_state_diffs,\n system_logs,\n events_queue_commitment,\n bootloader_initial_content_commitment,\n pubdata_input\n FROM\n l1_batches\n LEFT JOIN commitments ON commitments.l1_batch_number = l1_batches.number\n WHERE\n eth_prove_tx_id IS NOT NULL\n AND eth_execute_tx_id IS NULL\n ORDER BY\n number\n LIMIT\n $1\n " }, - "6132af955efc6a7b0dfe8bae021d79feb4576dbd37c2d93c2aefaaf79efce87c": { + "5c39f043c9b36693b0a845eb36549374a2d931e62615bc7e6ecd0af957b42a13": { "describe": { "columns": [ { @@ -5397,9 +5294,9 @@ "type_info": "Int8" }, { - "name": "is_finished", + "name": "hash", "ordinal": 2, - "type_info": "Bool" + "type_info": "Bytea" }, { "name": "l1_tx_count", @@ -5412,174 +5309,174 @@ "type_info": "Int4" }, { - "name": "fee_account_address", + "name": "base_fee_per_gas", "ordinal": 5, - "type_info": "Bytea" + "type_info": "Numeric" }, { - "name": "bloom", + "name": "l1_gas_price", "ordinal": 6, - "type_info": "Bytea" + "type_info": "Int8" }, { - "name": "priority_ops_onchain_data", + "name": "l2_fair_gas_price", "ordinal": 7, - "type_info": "ByteaArray" + "type_info": "Int8" }, { - "name": "hash", + "name": "bootloader_code_hash", "ordinal": 8, "type_info": "Bytea" }, { - "name": "parent_hash", + "name": "default_aa_code_hash", "ordinal": 9, "type_info": "Bytea" }, { - "name": "commitment", + "name": "protocol_version", "ordinal": 10, - "type_info": "Bytea" + "type_info": "Int4" }, { - "name": "compressed_write_logs", + "name": "virtual_blocks", "ordinal": 11, - "type_info": "Bytea" - }, + "type_info": "Int8" + } + ], + "nullable": [ + false, + false, + false, + false, + false, + false, + false, + false, + true, + true, + true, + false + ], + "parameters": { + "Left": [ + "Int8" + ] + } + }, + "query": "\n SELECT\n number,\n timestamp,\n hash,\n l1_tx_count,\n l2_tx_count,\n base_fee_per_gas,\n l1_gas_price,\n l2_fair_gas_price,\n bootloader_code_hash,\n default_aa_code_hash,\n protocol_version,\n virtual_blocks\n FROM\n miniblocks\n WHERE\n number = $1\n " + }, + "5d493cbce749cc5b56d4069423597b16599abaf51df0f19effe1a536376cf6a6": { + "describe": { + "columns": [ { - "name": "compressed_contracts", - "ordinal": 12, + "name": "bootloader_code_hash", + "ordinal": 0, "type_info": "Bytea" }, { - "name": "eth_prove_tx_id", - "ordinal": 13, - "type_info": "Int4" - }, - { - "name": "eth_commit_tx_id", - "ordinal": 14, - "type_info": "Int4" - }, - { - "name": "eth_execute_tx_id", - "ordinal": 15, - "type_info": "Int4" - }, - { - "name": "merkle_root_hash", - "ordinal": 16, - "type_info": "Bytea" - }, - { - "name": "l2_to_l1_logs", - "ordinal": 17, - "type_info": "ByteaArray" - }, - { - "name": "l2_to_l1_messages", - "ordinal": 18, - "type_info": "ByteaArray" - }, - { - "name": "used_contract_hashes", - "ordinal": 19, - "type_info": "Jsonb" - }, - { - "name": "compressed_initial_writes", - "ordinal": 20, - "type_info": "Bytea" - }, - { - "name": "compressed_repeated_writes", - "ordinal": 21, - "type_info": "Bytea" - }, - { - "name": "l2_l1_compressed_messages", - "ordinal": 22, - "type_info": "Bytea" - }, - { - "name": "l2_l1_merkle_root", - "ordinal": 23, + "name": "default_account_code_hash", + "ordinal": 1, "type_info": "Bytea" - }, - { - "name": "l1_gas_price", - "ordinal": 24, - "type_info": "Int8" - }, + } + ], + "nullable": [ + false, + false + ], + "parameters": { + "Left": [ + "Int4" + ] + } + }, + "query": "\n SELECT\n bootloader_code_hash,\n default_account_code_hash\n FROM\n protocol_versions\n WHERE\n id = $1\n " + }, + "5e781f84ec41edd0941fa84de837effac442434c6e734d977e6682a7484abe7f": { + "describe": { + "columns": [ { - "name": "l2_fair_gas_price", - "ordinal": 25, + "name": "l1_batch_number", + "ordinal": 0, "type_info": "Int8" }, { - "name": "rollup_last_leaf_index", - "ordinal": 26, - "type_info": "Int8" + "name": "status", + "ordinal": 1, + "type_info": "Text" }, { - "name": "zkporter_is_available", - "ordinal": 27, - "type_info": "Bool" - }, + "name": "attempts", + "ordinal": 2, + "type_info": "Int2" + } + ], + "nullable": [ + false, + false, + false + ], + "parameters": { + "Left": [ + "Interval", + "Int2" + ] + } + }, + "query": "\n UPDATE proof_compression_jobs_fri\n SET\n status = 'queued',\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n (\n status = 'in_progress'\n AND processing_started_at <= NOW() - $1::INTERVAL\n AND attempts < $2\n )\n OR (\n status = 'failed'\n AND attempts < $2\n )\n RETURNING\n l1_batch_number,\n status,\n attempts\n " + }, + "5f6885b5457aaa78e10917ae5b8cd0bc0e8923a6bae64f22f09242766835ee0c": { + "describe": { + "columns": [ { - "name": "bootloader_code_hash", - "ordinal": 28, - "type_info": "Bytea" + "name": "id", + "ordinal": 0, + "type_info": "Int8" }, { - "name": "default_aa_code_hash", - "ordinal": 29, + "name": "contract_address", + "ordinal": 1, "type_info": "Bytea" }, { - "name": "base_fee_per_gas", - "ordinal": 30, - "type_info": "Numeric" - }, - { - "name": "aux_data_hash", - "ordinal": 31, - "type_info": "Bytea" + "name": "source_code", + "ordinal": 2, + "type_info": "Text" }, { - "name": "pass_through_data_hash", - "ordinal": 32, - "type_info": "Bytea" + "name": "contract_name", + "ordinal": 3, + "type_info": "Text" }, { - "name": "meta_parameters_hash", - "ordinal": 33, - "type_info": "Bytea" + "name": "zk_compiler_version", + "ordinal": 4, + "type_info": "Text" }, { - "name": "protocol_version", - "ordinal": 34, - "type_info": "Int4" + "name": "compiler_version", + "ordinal": 5, + "type_info": "Text" }, { - "name": "compressed_state_diffs", - "ordinal": 35, - "type_info": "Bytea" + "name": "optimization_used", + "ordinal": 6, + "type_info": "Bool" }, { - "name": "system_logs", - "ordinal": 36, - "type_info": "ByteaArray" + "name": "optimizer_mode", + "ordinal": 7, + "type_info": "Text" }, { - "name": "events_queue_commitment", - "ordinal": 37, + "name": "constructor_arguments", + "ordinal": 8, "type_info": "Bytea" }, { - "name": "bootloader_initial_content_commitment", - "ordinal": 38, - "type_info": "Bytea" + "name": "is_system", + "ordinal": 9, + "type_info": "Bool" } ], "nullable": [ @@ -5590,49 +5487,28 @@ false, false, false, - false, - true, - true, - true, - true, - true, - true, - true, - true, - true, - false, - false, - false, - true, - true, - true, - true, - false, - false, - true, - true, - true, - true, - false, - true, - true, - true, - true, true, false, - true, - true + false ], + "parameters": { + "Left": [] + } + }, + "query": "\n SELECT\n id,\n contract_address,\n source_code,\n contract_name,\n zk_compiler_version,\n compiler_version,\n optimization_used,\n optimizer_mode,\n constructor_arguments,\n is_system\n FROM\n contract_verification_requests\n WHERE\n status = 'successful'\n ORDER BY\n id\n " + }, + "5f8fc05ae782846898295d210dd3d55ff2b1510868dfe80d14fffa3f5ff07b83": { + "describe": { + "columns": [], + "nullable": [], "parameters": { "Left": [ - "Bytea", - "Bytea", - "Int4", + "Int8", "Int8" ] } }, - "query": "\n SELECT\n number,\n l1_batches.timestamp,\n is_finished,\n l1_tx_count,\n l2_tx_count,\n fee_account_address,\n bloom,\n priority_ops_onchain_data,\n hash,\n parent_hash,\n commitment,\n compressed_write_logs,\n compressed_contracts,\n eth_prove_tx_id,\n eth_commit_tx_id,\n eth_execute_tx_id,\n merkle_root_hash,\n l2_to_l1_logs,\n l2_to_l1_messages,\n used_contract_hashes,\n compressed_initial_writes,\n compressed_repeated_writes,\n l2_l1_compressed_messages,\n l2_l1_merkle_root,\n l1_gas_price,\n l2_fair_gas_price,\n rollup_last_leaf_index,\n zkporter_is_available,\n l1_batches.bootloader_code_hash,\n l1_batches.default_aa_code_hash,\n base_fee_per_gas,\n aux_data_hash,\n pass_through_data_hash,\n meta_parameters_hash,\n protocol_version,\n compressed_state_diffs,\n system_logs,\n events_queue_commitment,\n bootloader_initial_content_commitment\n FROM\n l1_batches\n LEFT JOIN commitments ON commitments.l1_batch_number = l1_batches.number\n JOIN protocol_versions ON protocol_versions.id = l1_batches.protocol_version\n WHERE\n eth_commit_tx_id IS NULL\n AND number != 0\n AND protocol_versions.bootloader_code_hash = $1\n AND protocol_versions.default_account_code_hash = $2\n AND commitment IS NOT NULL\n AND (\n protocol_versions.id = $3\n OR protocol_versions.upgrade_tx_hash IS NULL\n )\n ORDER BY\n number\n LIMIT\n $4\n " + "query": "\n UPDATE l1_batches\n SET\n predicted_commit_gas_cost = $2,\n updated_at = NOW()\n WHERE\n number = $1\n " }, "61b2b858d4636809c21838635aa52aeb5f06c26f68d131dd242f6ed68816c513": { "describe": { @@ -6302,184 +6178,56 @@ }, "query": "\n SELECT\n number,\n hash\n FROM\n miniblocks\n WHERE\n number >= $1\n ORDER BY\n number ASC\n LIMIT\n $2\n " }, - "711820868a1e3016e68f0f4ed92ba6a3edc9f72675dae6ff44442e09caf48178": { + "72a4f50355324cce85ebaef9fa32826095e9290f0c1157094bd0c44e06012e42": { "describe": { "columns": [ { - "name": "number", + "name": "hash", "ordinal": 0, - "type_info": "Int8" + "type_info": "Bytea" }, { - "name": "l1_tx_count", + "name": "is_priority", "ordinal": 1, - "type_info": "Int4" + "type_info": "Bool" }, { - "name": "l2_tx_count", + "name": "full_fee", "ordinal": 2, - "type_info": "Int4" + "type_info": "Numeric" }, { - "name": "timestamp", + "name": "layer_2_tip_fee", "ordinal": 3, - "type_info": "Int8" + "type_info": "Numeric" }, { - "name": "is_finished", + "name": "initiator_address", "ordinal": 4, - "type_info": "Bool" + "type_info": "Bytea" }, { - "name": "fee_account_address", + "name": "nonce", "ordinal": 5, - "type_info": "Bytea" + "type_info": "Int8" }, { - "name": "l2_to_l1_logs", + "name": "signature", "ordinal": 6, - "type_info": "ByteaArray" + "type_info": "Bytea" }, { - "name": "l2_to_l1_messages", + "name": "input", "ordinal": 7, - "type_info": "ByteaArray" + "type_info": "Bytea" }, { - "name": "bloom", + "name": "data", "ordinal": 8, - "type_info": "Bytea" + "type_info": "Jsonb" }, { - "name": "priority_ops_onchain_data", - "ordinal": 9, - "type_info": "ByteaArray" - }, - { - "name": "used_contract_hashes", - "ordinal": 10, - "type_info": "Jsonb" - }, - { - "name": "base_fee_per_gas", - "ordinal": 11, - "type_info": "Numeric" - }, - { - "name": "l1_gas_price", - "ordinal": 12, - "type_info": "Int8" - }, - { - "name": "l2_fair_gas_price", - "ordinal": 13, - "type_info": "Int8" - }, - { - "name": "bootloader_code_hash", - "ordinal": 14, - "type_info": "Bytea" - }, - { - "name": "default_aa_code_hash", - "ordinal": 15, - "type_info": "Bytea" - }, - { - "name": "protocol_version", - "ordinal": 16, - "type_info": "Int4" - }, - { - "name": "compressed_state_diffs", - "ordinal": 17, - "type_info": "Bytea" - }, - { - "name": "system_logs", - "ordinal": 18, - "type_info": "ByteaArray" - } - ], - "nullable": [ - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - true, - true, - true, - true, - false - ], - "parameters": { - "Left": [ - "Int8" - ] - } - }, - "query": "\n SELECT\n number,\n l1_tx_count,\n l2_tx_count,\n timestamp,\n is_finished,\n fee_account_address,\n l2_to_l1_logs,\n l2_to_l1_messages,\n bloom,\n priority_ops_onchain_data,\n used_contract_hashes,\n base_fee_per_gas,\n l1_gas_price,\n l2_fair_gas_price,\n bootloader_code_hash,\n default_aa_code_hash,\n protocol_version,\n compressed_state_diffs,\n system_logs\n FROM\n l1_batches\n WHERE\n number = $1\n " - }, - "72a4f50355324cce85ebaef9fa32826095e9290f0c1157094bd0c44e06012e42": { - "describe": { - "columns": [ - { - "name": "hash", - "ordinal": 0, - "type_info": "Bytea" - }, - { - "name": "is_priority", - "ordinal": 1, - "type_info": "Bool" - }, - { - "name": "full_fee", - "ordinal": 2, - "type_info": "Numeric" - }, - { - "name": "layer_2_tip_fee", - "ordinal": 3, - "type_info": "Numeric" - }, - { - "name": "initiator_address", - "ordinal": 4, - "type_info": "Bytea" - }, - { - "name": "nonce", - "ordinal": 5, - "type_info": "Int8" - }, - { - "name": "signature", - "ordinal": 6, - "type_info": "Bytea" - }, - { - "name": "input", - "ordinal": 7, - "type_info": "Bytea" - }, - { - "name": "data", - "ordinal": 8, - "type_info": "Jsonb" - }, - { - "name": "received_at", + "name": "received_at", "ordinal": 9, "type_info": "Timestamp" }, @@ -6670,7 +6418,67 @@ }, "query": "\n VACUUM storage_logs\n " }, - "73114e702ff74da985e1e757bbae8e56f148282e3f27ff701adf248281811d9f": { + "73c4bf1e35d49faaab9f7828e80f396f9d193615d70184d4327378a7fc8a5665": { + "describe": { + "columns": [], + "nullable": [], + "parameters": { + "Left": [ + { + "Custom": { + "kind": { + "Enum": [ + "Queued", + "ManuallySkipped", + "InProgress", + "Successful", + "Failed" + ] + }, + "name": "basic_witness_input_producer_job_status" + } + }, + "Int8", + "Time", + "Text" + ] + } + }, + "query": "\n UPDATE basic_witness_input_producer_jobs\n SET\n status = $1,\n updated_at = NOW(),\n time_taken = $3,\n input_blob_url = $4\n WHERE\n l1_batch_number = $2\n " + }, + "7560ba61643a8ec8eeefbe6034226313c255ce356a9a4e25c098484d3129c914": { + "describe": { + "columns": [], + "nullable": [], + "parameters": { + "Left": [ + "Int4" + ] + } + }, + "query": "\n DELETE FROM eth_txs_history\n WHERE\n id = $1\n " + }, + "759b80414b5bcbfe03a0e1e15b37f92c4cfad9313b1461e12242d9becb59e0b0": { + "describe": { + "columns": [ + { + "name": "max?", + "ordinal": 0, + "type_info": "Int4" + } + ], + "nullable": [ + null + ], + "parameters": { + "Left": [ + "Int8" + ] + } + }, + "query": "\n SELECT\n MAX(operation_number) AS \"max?\"\n FROM\n storage_logs\n WHERE\n miniblock_number = $1\n " + }, + "75a3cf6f502ebb1a0e92b672dc6ce56b53cc4ca0a8c6ee7cac1b9a5863000be3": { "describe": { "columns": [ { @@ -6867,6 +6675,11 @@ "name": "bootloader_initial_content_commitment", "ordinal": 38, "type_info": "Bytea" + }, + { + "name": "pubdata_input", + "ordinal": 39, + "type_info": "Bytea" } ], "nullable": [ @@ -6908,6 +6721,7 @@ true, false, true, + true, true ], "parameters": { @@ -6916,67 +6730,7 @@ ] } }, - "query": "\n SELECT\n number,\n timestamp,\n is_finished,\n l1_tx_count,\n l2_tx_count,\n fee_account_address,\n bloom,\n priority_ops_onchain_data,\n hash,\n parent_hash,\n commitment,\n compressed_write_logs,\n compressed_contracts,\n eth_prove_tx_id,\n eth_commit_tx_id,\n eth_execute_tx_id,\n merkle_root_hash,\n l2_to_l1_logs,\n l2_to_l1_messages,\n used_contract_hashes,\n compressed_initial_writes,\n compressed_repeated_writes,\n l2_l1_compressed_messages,\n l2_l1_merkle_root,\n l1_gas_price,\n l2_fair_gas_price,\n rollup_last_leaf_index,\n zkporter_is_available,\n bootloader_code_hash,\n default_aa_code_hash,\n base_fee_per_gas,\n aux_data_hash,\n pass_through_data_hash,\n meta_parameters_hash,\n protocol_version,\n compressed_state_diffs,\n system_logs,\n events_queue_commitment,\n bootloader_initial_content_commitment\n FROM\n l1_batches\n LEFT JOIN commitments ON commitments.l1_batch_number = l1_batches.number\n WHERE\n eth_commit_tx_id IS NOT NULL\n AND eth_prove_tx_id IS NULL\n ORDER BY\n number\n LIMIT\n $1\n " - }, - "73c4bf1e35d49faaab9f7828e80f396f9d193615d70184d4327378a7fc8a5665": { - "describe": { - "columns": [], - "nullable": [], - "parameters": { - "Left": [ - { - "Custom": { - "kind": { - "Enum": [ - "Queued", - "ManuallySkipped", - "InProgress", - "Successful", - "Failed" - ] - }, - "name": "basic_witness_input_producer_job_status" - } - }, - "Int8", - "Time", - "Text" - ] - } - }, - "query": "\n UPDATE basic_witness_input_producer_jobs\n SET\n status = $1,\n updated_at = NOW(),\n time_taken = $3,\n input_blob_url = $4\n WHERE\n l1_batch_number = $2\n " - }, - "7560ba61643a8ec8eeefbe6034226313c255ce356a9a4e25c098484d3129c914": { - "describe": { - "columns": [], - "nullable": [], - "parameters": { - "Left": [ - "Int4" - ] - } - }, - "query": "\n DELETE FROM eth_txs_history\n WHERE\n id = $1\n " - }, - "759b80414b5bcbfe03a0e1e15b37f92c4cfad9313b1461e12242d9becb59e0b0": { - "describe": { - "columns": [ - { - "name": "max?", - "ordinal": 0, - "type_info": "Int4" - } - ], - "nullable": [ - null - ], - "parameters": { - "Left": [ - "Int8" - ] - } - }, - "query": "\n SELECT\n MAX(operation_number) AS \"max?\"\n FROM\n storage_logs\n WHERE\n miniblock_number = $1\n " + "query": "\n SELECT\n number,\n timestamp,\n is_finished,\n l1_tx_count,\n l2_tx_count,\n fee_account_address,\n bloom,\n priority_ops_onchain_data,\n hash,\n parent_hash,\n commitment,\n compressed_write_logs,\n compressed_contracts,\n eth_prove_tx_id,\n eth_commit_tx_id,\n eth_execute_tx_id,\n merkle_root_hash,\n l2_to_l1_logs,\n l2_to_l1_messages,\n used_contract_hashes,\n compressed_initial_writes,\n compressed_repeated_writes,\n l2_l1_compressed_messages,\n l2_l1_merkle_root,\n l1_gas_price,\n l2_fair_gas_price,\n rollup_last_leaf_index,\n zkporter_is_available,\n bootloader_code_hash,\n default_aa_code_hash,\n base_fee_per_gas,\n aux_data_hash,\n pass_through_data_hash,\n meta_parameters_hash,\n protocol_version,\n compressed_state_diffs,\n system_logs,\n events_queue_commitment,\n bootloader_initial_content_commitment,\n pubdata_input\n FROM\n l1_batches\n LEFT JOIN commitments ON commitments.l1_batch_number = l1_batches.number\n WHERE\n eth_commit_tx_id IS NOT NULL\n AND eth_prove_tx_id IS NULL\n ORDER BY\n number\n LIMIT\n $1\n " }, "75f6eaa518e7840374c4e44b0788bf92c7f2c55386c8208e3a82b30456abd5b4": { "describe": { @@ -7415,13 +7169,267 @@ }, "query": "\n SELECT\n base_fee_per_gas\n FROM\n miniblocks\n WHERE\n number <= $1\n ORDER BY\n number DESC\n LIMIT\n $2\n " }, - "852aa5fe1c3b2dfe875cd4adf0d19a00c170cf7725d95dd6eb8b753fa5facec8": { + "84c804db9d60a4c1ebbce5e3dcdf03c0aad3ac30d85176e0a4e35f72bbb21b12": { "describe": { "columns": [ { - "name": "hash", + "name": "number", "ordinal": 0, - "type_info": "Bytea" + "type_info": "Int8" + }, + { + "name": "timestamp", + "ordinal": 1, + "type_info": "Int8" + }, + { + "name": "is_finished", + "ordinal": 2, + "type_info": "Bool" + }, + { + "name": "l1_tx_count", + "ordinal": 3, + "type_info": "Int4" + }, + { + "name": "l2_tx_count", + "ordinal": 4, + "type_info": "Int4" + }, + { + "name": "fee_account_address", + "ordinal": 5, + "type_info": "Bytea" + }, + { + "name": "bloom", + "ordinal": 6, + "type_info": "Bytea" + }, + { + "name": "priority_ops_onchain_data", + "ordinal": 7, + "type_info": "ByteaArray" + }, + { + "name": "hash", + "ordinal": 8, + "type_info": "Bytea" + }, + { + "name": "parent_hash", + "ordinal": 9, + "type_info": "Bytea" + }, + { + "name": "commitment", + "ordinal": 10, + "type_info": "Bytea" + }, + { + "name": "compressed_write_logs", + "ordinal": 11, + "type_info": "Bytea" + }, + { + "name": "compressed_contracts", + "ordinal": 12, + "type_info": "Bytea" + }, + { + "name": "eth_prove_tx_id", + "ordinal": 13, + "type_info": "Int4" + }, + { + "name": "eth_commit_tx_id", + "ordinal": 14, + "type_info": "Int4" + }, + { + "name": "eth_execute_tx_id", + "ordinal": 15, + "type_info": "Int4" + }, + { + "name": "merkle_root_hash", + "ordinal": 16, + "type_info": "Bytea" + }, + { + "name": "l2_to_l1_logs", + "ordinal": 17, + "type_info": "ByteaArray" + }, + { + "name": "l2_to_l1_messages", + "ordinal": 18, + "type_info": "ByteaArray" + }, + { + "name": "used_contract_hashes", + "ordinal": 19, + "type_info": "Jsonb" + }, + { + "name": "compressed_initial_writes", + "ordinal": 20, + "type_info": "Bytea" + }, + { + "name": "compressed_repeated_writes", + "ordinal": 21, + "type_info": "Bytea" + }, + { + "name": "l2_l1_compressed_messages", + "ordinal": 22, + "type_info": "Bytea" + }, + { + "name": "l2_l1_merkle_root", + "ordinal": 23, + "type_info": "Bytea" + }, + { + "name": "l1_gas_price", + "ordinal": 24, + "type_info": "Int8" + }, + { + "name": "l2_fair_gas_price", + "ordinal": 25, + "type_info": "Int8" + }, + { + "name": "rollup_last_leaf_index", + "ordinal": 26, + "type_info": "Int8" + }, + { + "name": "zkporter_is_available", + "ordinal": 27, + "type_info": "Bool" + }, + { + "name": "bootloader_code_hash", + "ordinal": 28, + "type_info": "Bytea" + }, + { + "name": "default_aa_code_hash", + "ordinal": 29, + "type_info": "Bytea" + }, + { + "name": "base_fee_per_gas", + "ordinal": 30, + "type_info": "Numeric" + }, + { + "name": "aux_data_hash", + "ordinal": 31, + "type_info": "Bytea" + }, + { + "name": "pass_through_data_hash", + "ordinal": 32, + "type_info": "Bytea" + }, + { + "name": "meta_parameters_hash", + "ordinal": 33, + "type_info": "Bytea" + }, + { + "name": "protocol_version", + "ordinal": 34, + "type_info": "Int4" + }, + { + "name": "system_logs", + "ordinal": 35, + "type_info": "ByteaArray" + }, + { + "name": "compressed_state_diffs", + "ordinal": 36, + "type_info": "Bytea" + }, + { + "name": "events_queue_commitment", + "ordinal": 37, + "type_info": "Bytea" + }, + { + "name": "bootloader_initial_content_commitment", + "ordinal": 38, + "type_info": "Bytea" + }, + { + "name": "pubdata_input", + "ordinal": 39, + "type_info": "Bytea" + } + ], + "nullable": [ + false, + false, + false, + false, + false, + false, + false, + false, + true, + true, + true, + true, + true, + true, + true, + true, + true, + false, + false, + false, + true, + true, + true, + true, + false, + false, + true, + true, + true, + true, + false, + true, + true, + true, + true, + false, + true, + true, + true, + true + ], + "parameters": { + "Left": [ + "Int8" + ] + } + }, + "query": "\n SELECT\n number,\n timestamp,\n is_finished,\n l1_tx_count,\n l2_tx_count,\n fee_account_address,\n bloom,\n priority_ops_onchain_data,\n hash,\n parent_hash,\n commitment,\n compressed_write_logs,\n compressed_contracts,\n eth_prove_tx_id,\n eth_commit_tx_id,\n eth_execute_tx_id,\n merkle_root_hash,\n l2_to_l1_logs,\n l2_to_l1_messages,\n used_contract_hashes,\n compressed_initial_writes,\n compressed_repeated_writes,\n l2_l1_compressed_messages,\n l2_l1_merkle_root,\n l1_gas_price,\n l2_fair_gas_price,\n rollup_last_leaf_index,\n zkporter_is_available,\n bootloader_code_hash,\n default_aa_code_hash,\n base_fee_per_gas,\n aux_data_hash,\n pass_through_data_hash,\n meta_parameters_hash,\n protocol_version,\n system_logs,\n compressed_state_diffs,\n events_queue_commitment,\n bootloader_initial_content_commitment,\n pubdata_input\n FROM\n l1_batches\n LEFT JOIN commitments ON commitments.l1_batch_number = l1_batches.number\n WHERE\n number = $1\n " + }, + "852aa5fe1c3b2dfe875cd4adf0d19a00c170cf7725d95dd6eb8b753fa5facec8": { + "describe": { + "columns": [ + { + "name": "hash", + "ordinal": 0, + "type_info": "Bytea" }, { "name": "is_priority", @@ -7969,139 +7977,13 @@ }, "query": "\n SELECT\n recursion_scheduler_level_vk_hash,\n recursion_node_level_vk_hash,\n recursion_leaf_level_vk_hash,\n recursion_circuits_set_vks_hash\n FROM\n protocol_versions\n WHERE\n id = $1\n " }, - "96c8383b5f6480b00a266908a0dbc0dbdc64f250432ed638cacb65a9e5a0d462": { + "9955b9215096f781442153518c4f0a9676e26f422506545ccc90b7e8a36c8d47": { "describe": { "columns": [ { - "name": "number", + "name": "bytecode", "ordinal": 0, - "type_info": "Int8" - }, - { - "name": "l1_tx_count", - "ordinal": 1, - "type_info": "Int4" - }, - { - "name": "l2_tx_count", - "ordinal": 2, - "type_info": "Int4" - }, - { - "name": "timestamp", - "ordinal": 3, - "type_info": "Int8" - }, - { - "name": "is_finished", - "ordinal": 4, - "type_info": "Bool" - }, - { - "name": "fee_account_address", - "ordinal": 5, - "type_info": "Bytea" - }, - { - "name": "l2_to_l1_logs", - "ordinal": 6, - "type_info": "ByteaArray" - }, - { - "name": "l2_to_l1_messages", - "ordinal": 7, - "type_info": "ByteaArray" - }, - { - "name": "bloom", - "ordinal": 8, - "type_info": "Bytea" - }, - { - "name": "priority_ops_onchain_data", - "ordinal": 9, - "type_info": "ByteaArray" - }, - { - "name": "used_contract_hashes", - "ordinal": 10, - "type_info": "Jsonb" - }, - { - "name": "base_fee_per_gas", - "ordinal": 11, - "type_info": "Numeric" - }, - { - "name": "l1_gas_price", - "ordinal": 12, - "type_info": "Int8" - }, - { - "name": "l2_fair_gas_price", - "ordinal": 13, - "type_info": "Int8" - }, - { - "name": "bootloader_code_hash", - "ordinal": 14, - "type_info": "Bytea" - }, - { - "name": "default_aa_code_hash", - "ordinal": 15, - "type_info": "Bytea" - }, - { - "name": "protocol_version", - "ordinal": 16, - "type_info": "Int4" - }, - { - "name": "compressed_state_diffs", - "ordinal": 17, - "type_info": "Bytea" - }, - { - "name": "system_logs", - "ordinal": 18, - "type_info": "ByteaArray" - } - ], - "nullable": [ - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - true, - true, - true, - true, - false - ], - "parameters": { - "Left": [] - } - }, - "query": "\n SELECT\n number,\n l1_tx_count,\n l2_tx_count,\n timestamp,\n is_finished,\n fee_account_address,\n l2_to_l1_logs,\n l2_to_l1_messages,\n bloom,\n priority_ops_onchain_data,\n used_contract_hashes,\n base_fee_per_gas,\n l1_gas_price,\n l2_fair_gas_price,\n bootloader_code_hash,\n default_aa_code_hash,\n protocol_version,\n compressed_state_diffs,\n system_logs\n FROM\n l1_batches\n ORDER BY\n number DESC\n LIMIT\n 1\n " - }, - "9955b9215096f781442153518c4f0a9676e26f422506545ccc90b7e8a36c8d47": { - "describe": { - "columns": [ - { - "name": "bytecode", - "ordinal": 0, - "type_info": "Bytea" + "type_info": "Bytea" }, { "name": "data?", @@ -8558,6 +8440,41 @@ }, "query": "\n SELECT\n upgrade_tx_hash\n FROM\n protocol_versions\n WHERE\n id = $1\n " }, + "aa8e569cf406cd0975a6ffaeeafa92f632186181ba8b93518e549e0643f58da8": { + "describe": { + "columns": [], + "nullable": [], + "parameters": { + "Left": [ + "Int8", + "Int4", + "Int4", + "Int8", + "Bool", + "Bytea", + "ByteaArray", + "ByteaArray", + "Bytea", + "ByteaArray", + "Int8", + "Int8", + "Int8", + "Jsonb", + "Jsonb", + "Numeric", + "Int8", + "Int8", + "Bytea", + "Bytea", + "Int4", + "ByteaArray", + "Int8Array", + "Bytea" + ] + } + }, + "query": "\n INSERT INTO\n l1_batches (\n number,\n l1_tx_count,\n l2_tx_count,\n timestamp,\n is_finished,\n fee_account_address,\n l2_to_l1_logs,\n l2_to_l1_messages,\n bloom,\n priority_ops_onchain_data,\n predicted_commit_gas_cost,\n predicted_prove_gas_cost,\n predicted_execute_gas_cost,\n initial_bootloader_heap_content,\n used_contract_hashes,\n base_fee_per_gas,\n l1_gas_price,\n l2_fair_gas_price,\n bootloader_code_hash,\n default_aa_code_hash,\n protocol_version,\n system_logs,\n storage_refunds,\n pubdata_input,\n created_at,\n updated_at\n )\n VALUES\n (\n $1,\n $2,\n $3,\n $4,\n $5,\n $6,\n $7,\n $8,\n $9,\n $10,\n $11,\n $12,\n $13,\n $14,\n $15,\n $16,\n $17,\n $18,\n $19,\n $20,\n $21,\n $22,\n $23,\n $24,\n NOW(),\n NOW()\n )\n " + }, "aa91697157517322b0dbb53dca99f41220c51f58a03c61d6b7789eab0504e320": { "describe": { "columns": [ @@ -9116,113 +9033,247 @@ }, "query": "\n UPDATE transactions\n SET\n l1_batch_number = $3,\n l1_batch_tx_index = data_table.l1_batch_tx_index,\n updated_at = NOW()\n FROM\n (\n SELECT\n UNNEST($1::INT[]) AS l1_batch_tx_index,\n UNNEST($2::bytea[]) AS hash\n ) AS data_table\n WHERE\n transactions.hash = data_table.hash\n " }, - "bd51c9d93b103292f5acbdb266ba4b4e2af48907fa9321064ddb24ac02ab17cd": { + "bb1904a01a3860b5440ae23763d6d5ee4341edadb8a86b459a07427b7e265e98": { "describe": { "columns": [ { "name": "number", "ordinal": 0, "type_info": "Int8" - } - ], - "nullable": [ - false - ], - "parameters": { - "Left": [] - } - }, - "query": "\n SELECT\n number\n FROM\n l1_batches\n LEFT JOIN eth_txs_history AS commit_tx ON (l1_batches.eth_commit_tx_id = commit_tx.eth_tx_id)\n WHERE\n commit_tx.confirmed_at IS NOT NULL\n ORDER BY\n number DESC\n LIMIT\n 1\n " - }, - "bd74435dc6dba3f4173858682ee5661d1df4ec053797d75cfd32272be4f485e7": { - "describe": { - "columns": [ - { - "name": "key!", - "ordinal": 0, - "type_info": "Bytea" }, { - "name": "value!", + "name": "l1_tx_count", "ordinal": 1, - "type_info": "Bytea" + "type_info": "Int4" }, { - "name": "address!", + "name": "l2_tx_count", "ordinal": 2, - "type_info": "Bytea" + "type_info": "Int4" }, { - "name": "miniblock_number!", + "name": "timestamp", "ordinal": 3, "type_info": "Int8" }, { - "name": "l1_batch_number!", + "name": "is_finished", "ordinal": 4, - "type_info": "Int8" + "type_info": "Bool" }, { - "name": "index", + "name": "fee_account_address", "ordinal": 5, - "type_info": "Int8" - } - ], - "nullable": [ - true, - true, - true, - true, - true, - true - ], - "parameters": { - "Left": [ - "Int8", - "Bytea", - "Bytea" - ] - } - }, - "query": "\n SELECT\n storage_logs.key AS \"key!\",\n storage_logs.value AS \"value!\",\n storage_logs.address AS \"address!\",\n storage_logs.miniblock_number AS \"miniblock_number!\",\n initial_writes.l1_batch_number AS \"l1_batch_number!\",\n initial_writes.index\n FROM\n (\n SELECT\n hashed_key,\n MAX(ARRAY[miniblock_number, operation_number]::INT[]) AS op\n FROM\n storage_logs\n WHERE\n miniblock_number <= $1\n AND hashed_key >= $2\n AND hashed_key < $3\n GROUP BY\n hashed_key\n ORDER BY\n hashed_key\n ) AS keys\n INNER JOIN storage_logs ON keys.hashed_key = storage_logs.hashed_key\n AND storage_logs.miniblock_number = keys.op[1]\n AND storage_logs.operation_number = keys.op[2]\n INNER JOIN initial_writes ON keys.hashed_key = initial_writes.hashed_key;\n " - }, - "be16d820c124dba9f4a272f54f0b742349e78e6e4ce3e7c9a0dcf6447eedc6d8": { - "describe": { - "columns": [ - { - "name": "miniblock_number", - "ordinal": 0, - "type_info": "Int8" + "type_info": "Bytea" }, { - "name": "log_index_in_miniblock", - "ordinal": 1, - "type_info": "Int4" + "name": "l2_to_l1_logs", + "ordinal": 6, + "type_info": "ByteaArray" }, { - "name": "log_index_in_tx", - "ordinal": 2, - "type_info": "Int4" + "name": "l2_to_l1_messages", + "ordinal": 7, + "type_info": "ByteaArray" }, { - "name": "tx_hash", - "ordinal": 3, + "name": "bloom", + "ordinal": 8, "type_info": "Bytea" }, { - "name": "block_hash", - "ordinal": 4, - "type_info": "Bytea" + "name": "priority_ops_onchain_data", + "ordinal": 9, + "type_info": "ByteaArray" }, { - "name": "l1_batch_number?", - "ordinal": 5, - "type_info": "Int8" + "name": "used_contract_hashes", + "ordinal": 10, + "type_info": "Jsonb" }, { - "name": "shard_id", - "ordinal": 6, - "type_info": "Int4" + "name": "base_fee_per_gas", + "ordinal": 11, + "type_info": "Numeric" + }, + { + "name": "l1_gas_price", + "ordinal": 12, + "type_info": "Int8" + }, + { + "name": "l2_fair_gas_price", + "ordinal": 13, + "type_info": "Int8" + }, + { + "name": "bootloader_code_hash", + "ordinal": 14, + "type_info": "Bytea" + }, + { + "name": "default_aa_code_hash", + "ordinal": 15, + "type_info": "Bytea" + }, + { + "name": "protocol_version", + "ordinal": 16, + "type_info": "Int4" + }, + { + "name": "compressed_state_diffs", + "ordinal": 17, + "type_info": "Bytea" + }, + { + "name": "system_logs", + "ordinal": 18, + "type_info": "ByteaArray" + }, + { + "name": "pubdata_input", + "ordinal": 19, + "type_info": "Bytea" + } + ], + "nullable": [ + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + true, + true, + true, + true, + false, + true + ], + "parameters": { + "Left": [ + "Int8" + ] + } + }, + "query": "\n SELECT\n number,\n l1_tx_count,\n l2_tx_count,\n timestamp,\n is_finished,\n fee_account_address,\n l2_to_l1_logs,\n l2_to_l1_messages,\n bloom,\n priority_ops_onchain_data,\n used_contract_hashes,\n base_fee_per_gas,\n l1_gas_price,\n l2_fair_gas_price,\n bootloader_code_hash,\n default_aa_code_hash,\n protocol_version,\n compressed_state_diffs,\n system_logs,\n pubdata_input\n FROM\n l1_batches\n WHERE\n number = $1\n " + }, + "bd51c9d93b103292f5acbdb266ba4b4e2af48907fa9321064ddb24ac02ab17cd": { + "describe": { + "columns": [ + { + "name": "number", + "ordinal": 0, + "type_info": "Int8" + } + ], + "nullable": [ + false + ], + "parameters": { + "Left": [] + } + }, + "query": "\n SELECT\n number\n FROM\n l1_batches\n LEFT JOIN eth_txs_history AS commit_tx ON (l1_batches.eth_commit_tx_id = commit_tx.eth_tx_id)\n WHERE\n commit_tx.confirmed_at IS NOT NULL\n ORDER BY\n number DESC\n LIMIT\n 1\n " + }, + "bd74435dc6dba3f4173858682ee5661d1df4ec053797d75cfd32272be4f485e7": { + "describe": { + "columns": [ + { + "name": "key!", + "ordinal": 0, + "type_info": "Bytea" + }, + { + "name": "value!", + "ordinal": 1, + "type_info": "Bytea" + }, + { + "name": "address!", + "ordinal": 2, + "type_info": "Bytea" + }, + { + "name": "miniblock_number!", + "ordinal": 3, + "type_info": "Int8" + }, + { + "name": "l1_batch_number!", + "ordinal": 4, + "type_info": "Int8" + }, + { + "name": "index", + "ordinal": 5, + "type_info": "Int8" + } + ], + "nullable": [ + true, + true, + true, + true, + true, + true + ], + "parameters": { + "Left": [ + "Int8", + "Bytea", + "Bytea" + ] + } + }, + "query": "\n SELECT\n storage_logs.key AS \"key!\",\n storage_logs.value AS \"value!\",\n storage_logs.address AS \"address!\",\n storage_logs.miniblock_number AS \"miniblock_number!\",\n initial_writes.l1_batch_number AS \"l1_batch_number!\",\n initial_writes.index\n FROM\n (\n SELECT\n hashed_key,\n MAX(ARRAY[miniblock_number, operation_number]::INT[]) AS op\n FROM\n storage_logs\n WHERE\n miniblock_number <= $1\n AND hashed_key >= $2\n AND hashed_key < $3\n GROUP BY\n hashed_key\n ORDER BY\n hashed_key\n ) AS keys\n INNER JOIN storage_logs ON keys.hashed_key = storage_logs.hashed_key\n AND storage_logs.miniblock_number = keys.op[1]\n AND storage_logs.operation_number = keys.op[2]\n INNER JOIN initial_writes ON keys.hashed_key = initial_writes.hashed_key;\n " + }, + "be16d820c124dba9f4a272f54f0b742349e78e6e4ce3e7c9a0dcf6447eedc6d8": { + "describe": { + "columns": [ + { + "name": "miniblock_number", + "ordinal": 0, + "type_info": "Int8" + }, + { + "name": "log_index_in_miniblock", + "ordinal": 1, + "type_info": "Int4" + }, + { + "name": "log_index_in_tx", + "ordinal": 2, + "type_info": "Int4" + }, + { + "name": "tx_hash", + "ordinal": 3, + "type_info": "Bytea" + }, + { + "name": "block_hash", + "ordinal": 4, + "type_info": "Bytea" + }, + { + "name": "l1_batch_number?", + "ordinal": 5, + "type_info": "Int8" + }, + { + "name": "shard_id", + "ordinal": 6, + "type_info": "Int4" }, { "name": "is_service", @@ -9894,173 +9945,208 @@ }, "query": "\n UPDATE prover_jobs\n SET\n status = 'in_progress',\n attempts = attempts + 1,\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n id = (\n SELECT\n id\n FROM\n prover_jobs\n WHERE\n circuit_type = ANY ($1)\n AND status = 'queued'\n AND protocol_version = ANY ($2)\n ORDER BY\n aggregation_round DESC,\n l1_batch_number ASC,\n id ASC\n LIMIT\n 1\n FOR UPDATE\n SKIP LOCKED\n )\n RETURNING\n prover_jobs.*\n " }, - "ce5779092feb8a3d3e2c5e395783e67f08f2ead5f55bfb6594e50346bf9cf2ef": { + "cddf48514aa2aa249d0530d44c741368993009bb4bd90c2ad177ce56317aa04c": { "describe": { "columns": [ { - "name": "l1_batch_number!", + "name": "number", "ordinal": 0, "type_info": "Int8" }, { - "name": "circuit_id", + "name": "timestamp", "ordinal": 1, - "type_info": "Int2" + "type_info": "Int8" }, { - "name": "aggregation_round", + "name": "is_finished", "ordinal": 2, - "type_info": "Int2" - } - ], - "nullable": [ - null, - false, - false - ], - "parameters": { - "Left": [] - } - }, - "query": "\n SELECT\n MIN(l1_batch_number) AS \"l1_batch_number!\",\n circuit_id,\n aggregation_round\n FROM\n prover_jobs_fri\n WHERE\n status IN ('queued', 'in_gpu_proof', 'in_progress', 'failed')\n GROUP BY\n circuit_id,\n aggregation_round\n " - }, - "cea9fe027a6a0ada827f23b48ac32432295b2f7ee40bf13522a6edbd236f1970": { - "describe": { - "columns": [ + "type_info": "Bool" + }, { - "name": "hashed_key!", - "ordinal": 0, + "name": "l1_tx_count", + "ordinal": 3, + "type_info": "Int4" + }, + { + "name": "l2_tx_count", + "ordinal": 4, + "type_info": "Int4" + }, + { + "name": "fee_account_address", + "ordinal": 5, "type_info": "Bytea" }, { - "name": "value?", - "ordinal": 1, + "name": "bloom", + "ordinal": 6, "type_info": "Bytea" - } - ], - "nullable": [ - null, - null - ], - "parameters": { - "Left": [ - "ByteaArray", - "Int8" - ] - } - }, - "query": "\n SELECT\n u.hashed_key AS \"hashed_key!\",\n (\n SELECT\n value\n FROM\n storage_logs\n WHERE\n hashed_key = u.hashed_key\n AND miniblock_number <= $2\n ORDER BY\n miniblock_number DESC,\n operation_number DESC\n LIMIT\n 1\n ) AS \"value?\"\n FROM\n UNNEST($1::bytea[]) AS u (hashed_key)\n " - }, - "d14b52df2cd9f9e484c60ba00383b438f14b68535111cf2cedd363fc646aac99": { - "describe": { - "columns": [ + }, { - "name": "timestamp", - "ordinal": 0, - "type_info": "Int8" - } - ], - "nullable": [ - false - ], - "parameters": { - "Left": [] - } - }, - "query": "\n SELECT\n timestamp\n FROM\n l1_batches\n WHERE\n eth_commit_tx_id IS NULL\n AND number > 0\n ORDER BY\n number\n LIMIT\n 1\n " - }, - "d17221312e645b0287ff9238954512b528e7928087351a32c96b44d538dfb9ee": { - "describe": { - "columns": [ + "name": "priority_ops_onchain_data", + "ordinal": 7, + "type_info": "ByteaArray" + }, { - "name": "id", - "ordinal": 0, - "type_info": "Int8" + "name": "hash", + "ordinal": 8, + "type_info": "Bytea" }, { - "name": "l1_batch_number", - "ordinal": 1, - "type_info": "Int8" + "name": "parent_hash", + "ordinal": 9, + "type_info": "Bytea" }, { - "name": "circuit_type", - "ordinal": 2, - "type_info": "Text" + "name": "commitment", + "ordinal": 10, + "type_info": "Bytea" }, { - "name": "prover_input", - "ordinal": 3, + "name": "compressed_write_logs", + "ordinal": 11, "type_info": "Bytea" }, { - "name": "status", - "ordinal": 4, - "type_info": "Text" + "name": "compressed_contracts", + "ordinal": 12, + "type_info": "Bytea" }, { - "name": "error", - "ordinal": 5, - "type_info": "Text" + "name": "eth_prove_tx_id", + "ordinal": 13, + "type_info": "Int4" }, { - "name": "processing_started_at", - "ordinal": 6, - "type_info": "Timestamp" + "name": "eth_commit_tx_id", + "ordinal": 14, + "type_info": "Int4" }, { - "name": "created_at", - "ordinal": 7, - "type_info": "Timestamp" + "name": "eth_execute_tx_id", + "ordinal": 15, + "type_info": "Int4" }, { - "name": "updated_at", - "ordinal": 8, - "type_info": "Timestamp" + "name": "merkle_root_hash", + "ordinal": 16, + "type_info": "Bytea" }, { - "name": "time_taken", - "ordinal": 9, - "type_info": "Time" + "name": "l2_to_l1_logs", + "ordinal": 17, + "type_info": "ByteaArray" }, { - "name": "aggregation_round", - "ordinal": 10, - "type_info": "Int4" + "name": "l2_to_l1_messages", + "ordinal": 18, + "type_info": "ByteaArray" }, { - "name": "result", - "ordinal": 11, + "name": "used_contract_hashes", + "ordinal": 19, + "type_info": "Jsonb" + }, + { + "name": "compressed_initial_writes", + "ordinal": 20, "type_info": "Bytea" }, { - "name": "sequence_number", - "ordinal": 12, - "type_info": "Int4" + "name": "compressed_repeated_writes", + "ordinal": 21, + "type_info": "Bytea" }, { - "name": "attempts", - "ordinal": 13, - "type_info": "Int4" + "name": "l2_l1_compressed_messages", + "ordinal": 22, + "type_info": "Bytea" }, { - "name": "circuit_input_blob_url", - "ordinal": 14, - "type_info": "Text" + "name": "l2_l1_merkle_root", + "ordinal": 23, + "type_info": "Bytea" }, { - "name": "proccesed_by", - "ordinal": 15, - "type_info": "Text" + "name": "l1_gas_price", + "ordinal": 24, + "type_info": "Int8" }, { - "name": "is_blob_cleaned", - "ordinal": 16, + "name": "l2_fair_gas_price", + "ordinal": 25, + "type_info": "Int8" + }, + { + "name": "rollup_last_leaf_index", + "ordinal": 26, + "type_info": "Int8" + }, + { + "name": "zkporter_is_available", + "ordinal": 27, "type_info": "Bool" }, + { + "name": "bootloader_code_hash", + "ordinal": 28, + "type_info": "Bytea" + }, + { + "name": "default_aa_code_hash", + "ordinal": 29, + "type_info": "Bytea" + }, + { + "name": "base_fee_per_gas", + "ordinal": 30, + "type_info": "Numeric" + }, + { + "name": "aux_data_hash", + "ordinal": 31, + "type_info": "Bytea" + }, + { + "name": "pass_through_data_hash", + "ordinal": 32, + "type_info": "Bytea" + }, + { + "name": "meta_parameters_hash", + "ordinal": 33, + "type_info": "Bytea" + }, + { + "name": "system_logs", + "ordinal": 34, + "type_info": "ByteaArray" + }, + { + "name": "compressed_state_diffs", + "ordinal": 35, + "type_info": "Bytea" + }, { "name": "protocol_version", - "ordinal": 17, + "ordinal": 36, "type_info": "Int4" + }, + { + "name": "events_queue_commitment", + "ordinal": 37, + "type_info": "Bytea" + }, + { + "name": "bootloader_initial_content_commitment", + "ordinal": 38, + "type_info": "Bytea" + }, + { + "name": "pubdata_input", + "ordinal": 39, + "type_info": "Bytea" } ], "nullable": [ @@ -10069,299 +10155,501 @@ false, false, false, + false, + false, + false, + true, + true, + true, + true, + true, + true, + true, true, true, - false, false, false, false, true, + true, + true, + true, + false, false, + true, + true, + true, + true, false, true, true, + true, false, + true, + true, + true, + true, true ], "parameters": { "Left": [ - "Int4Array" + "Int8", + "Int8" ] } }, - "query": "\n UPDATE prover_jobs\n SET\n status = 'in_progress',\n attempts = attempts + 1,\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n id = (\n SELECT\n id\n FROM\n prover_jobs\n WHERE\n status = 'queued'\n AND protocol_version = ANY ($1)\n ORDER BY\n aggregation_round DESC,\n l1_batch_number ASC,\n id ASC\n LIMIT\n 1\n FOR UPDATE\n SKIP LOCKED\n )\n RETURNING\n prover_jobs.*\n " + "query": "\n SELECT\n number,\n timestamp,\n is_finished,\n l1_tx_count,\n l2_tx_count,\n fee_account_address,\n bloom,\n priority_ops_onchain_data,\n hash,\n parent_hash,\n commitment,\n compressed_write_logs,\n compressed_contracts,\n eth_prove_tx_id,\n eth_commit_tx_id,\n eth_execute_tx_id,\n merkle_root_hash,\n l2_to_l1_logs,\n l2_to_l1_messages,\n used_contract_hashes,\n compressed_initial_writes,\n compressed_repeated_writes,\n l2_l1_compressed_messages,\n l2_l1_merkle_root,\n l1_gas_price,\n l2_fair_gas_price,\n rollup_last_leaf_index,\n zkporter_is_available,\n bootloader_code_hash,\n default_aa_code_hash,\n base_fee_per_gas,\n aux_data_hash,\n pass_through_data_hash,\n meta_parameters_hash,\n system_logs,\n compressed_state_diffs,\n protocol_version,\n events_queue_commitment,\n bootloader_initial_content_commitment,\n pubdata_input\n FROM\n (\n SELECT\n l1_batches.*,\n ROW_NUMBER() OVER (\n ORDER BY\n number ASC\n ) AS ROW_NUMBER\n FROM\n l1_batches\n WHERE\n eth_commit_tx_id IS NOT NULL\n AND l1_batches.skip_proof = TRUE\n AND l1_batches.number > $1\n ORDER BY\n number\n LIMIT\n $2\n ) inn\n LEFT JOIN commitments ON commitments.l1_batch_number = inn.number\n WHERE\n number - ROW_NUMBER = $1\n " }, - "d3b09cbcddf6238b358d32d57678242aad3e9a47400f6d6837a35f4c54a216b9": { + "ce5779092feb8a3d3e2c5e395783e67f08f2ead5f55bfb6594e50346bf9cf2ef": { "describe": { "columns": [ { - "name": "number", + "name": "l1_batch_number!", "ordinal": 0, "type_info": "Int8" + }, + { + "name": "circuit_id", + "ordinal": 1, + "type_info": "Int2" + }, + { + "name": "aggregation_round", + "ordinal": 2, + "type_info": "Int2" } ], "nullable": [ + null, + false, false ], "parameters": { "Left": [] } }, - "query": "\n SELECT\n number\n FROM\n l1_batches\n LEFT JOIN eth_txs_history AS execute_tx ON (l1_batches.eth_execute_tx_id = execute_tx.eth_tx_id)\n WHERE\n execute_tx.confirmed_at IS NOT NULL\n ORDER BY\n number DESC\n LIMIT\n 1\n " + "query": "\n SELECT\n MIN(l1_batch_number) AS \"l1_batch_number!\",\n circuit_id,\n aggregation_round\n FROM\n prover_jobs_fri\n WHERE\n status IN ('queued', 'in_gpu_proof', 'in_progress', 'failed')\n GROUP BY\n circuit_id,\n aggregation_round\n " }, - "d70cfc158e31dd2d5c942d24f81fd17f833fb15b58b0110c7cc566946db98e76": { + "cea9fe027a6a0ada827f23b48ac32432295b2f7ee40bf13522a6edbd236f1970": { "describe": { "columns": [ { - "name": "block_hash?", + "name": "hashed_key!", "ordinal": 0, "type_info": "Bytea" }, { - "name": "address!", + "name": "value?", "ordinal": 1, "type_info": "Bytea" - }, - { - "name": "topic1!", - "ordinal": 2, - "type_info": "Bytea" - }, - { - "name": "topic2!", - "ordinal": 3, - "type_info": "Bytea" - }, + } + ], + "nullable": [ + null, + null + ], + "parameters": { + "Left": [ + "ByteaArray", + "Int8" + ] + } + }, + "query": "\n SELECT\n u.hashed_key AS \"hashed_key!\",\n (\n SELECT\n value\n FROM\n storage_logs\n WHERE\n hashed_key = u.hashed_key\n AND miniblock_number <= $2\n ORDER BY\n miniblock_number DESC,\n operation_number DESC\n LIMIT\n 1\n ) AS \"value?\"\n FROM\n UNNEST($1::bytea[]) AS u (hashed_key)\n " + }, + "d14b52df2cd9f9e484c60ba00383b438f14b68535111cf2cedd363fc646aac99": { + "describe": { + "columns": [ { - "name": "topic3!", - "ordinal": 4, + "name": "timestamp", + "ordinal": 0, + "type_info": "Int8" + } + ], + "nullable": [ + false + ], + "parameters": { + "Left": [] + } + }, + "query": "\n SELECT\n timestamp\n FROM\n l1_batches\n WHERE\n eth_commit_tx_id IS NULL\n AND number > 0\n ORDER BY\n number\n LIMIT\n 1\n " + }, + "d17221312e645b0287ff9238954512b528e7928087351a32c96b44d538dfb9ee": { + "describe": { + "columns": [ + { + "name": "id", + "ordinal": 0, + "type_info": "Int8" + }, + { + "name": "l1_batch_number", + "ordinal": 1, + "type_info": "Int8" + }, + { + "name": "circuit_type", + "ordinal": 2, + "type_info": "Text" + }, + { + "name": "prover_input", + "ordinal": 3, "type_info": "Bytea" }, { - "name": "topic4!", + "name": "status", + "ordinal": 4, + "type_info": "Text" + }, + { + "name": "error", "ordinal": 5, - "type_info": "Bytea" + "type_info": "Text" }, { - "name": "value!", + "name": "processing_started_at", "ordinal": 6, - "type_info": "Bytea" + "type_info": "Timestamp" }, { - "name": "miniblock_number!", + "name": "created_at", "ordinal": 7, - "type_info": "Int8" + "type_info": "Timestamp" }, { - "name": "l1_batch_number?", + "name": "updated_at", "ordinal": 8, - "type_info": "Int8" + "type_info": "Timestamp" }, { - "name": "tx_hash!", + "name": "time_taken", "ordinal": 9, - "type_info": "Bytea" + "type_info": "Time" }, { - "name": "tx_index_in_block!", + "name": "aggregation_round", "ordinal": 10, "type_info": "Int4" }, { - "name": "event_index_in_block!", + "name": "result", "ordinal": 11, - "type_info": "Int4" + "type_info": "Bytea" }, { - "name": "event_index_in_tx!", + "name": "sequence_number", "ordinal": 12, "type_info": "Int4" + }, + { + "name": "attempts", + "ordinal": 13, + "type_info": "Int4" + }, + { + "name": "circuit_input_blob_url", + "ordinal": 14, + "type_info": "Text" + }, + { + "name": "proccesed_by", + "ordinal": 15, + "type_info": "Text" + }, + { + "name": "is_blob_cleaned", + "ordinal": 16, + "type_info": "Bool" + }, + { + "name": "protocol_version", + "ordinal": 17, + "type_info": "Int4" } ], "nullable": [ + false, + false, + false, + false, + false, true, true, + false, + false, + false, + false, true, + false, + false, true, true, - true, - true, - true, - true, - true, - true, - true, + false, true ], "parameters": { "Left": [ - "Int8" + "Int4Array" ] } }, - "query": "\n WITH\n events_select AS (\n SELECT\n address,\n topic1,\n topic2,\n topic3,\n topic4,\n value,\n miniblock_number,\n tx_hash,\n tx_index_in_block,\n event_index_in_block,\n event_index_in_tx\n FROM\n events\n WHERE\n miniblock_number > $1\n ORDER BY\n miniblock_number ASC,\n event_index_in_block ASC\n )\n SELECT\n miniblocks.hash AS \"block_hash?\",\n address AS \"address!\",\n topic1 AS \"topic1!\",\n topic2 AS \"topic2!\",\n topic3 AS \"topic3!\",\n topic4 AS \"topic4!\",\n value AS \"value!\",\n miniblock_number AS \"miniblock_number!\",\n miniblocks.l1_batch_number AS \"l1_batch_number?\",\n tx_hash AS \"tx_hash!\",\n tx_index_in_block AS \"tx_index_in_block!\",\n event_index_in_block AS \"event_index_in_block!\",\n event_index_in_tx AS \"event_index_in_tx!\"\n FROM\n events_select\n INNER JOIN miniblocks ON events_select.miniblock_number = miniblocks.number\n ORDER BY\n miniblock_number ASC,\n event_index_in_block ASC\n " + "query": "\n UPDATE prover_jobs\n SET\n status = 'in_progress',\n attempts = attempts + 1,\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n id = (\n SELECT\n id\n FROM\n prover_jobs\n WHERE\n status = 'queued'\n AND protocol_version = ANY ($1)\n ORDER BY\n aggregation_round DESC,\n l1_batch_number ASC,\n id ASC\n LIMIT\n 1\n FOR UPDATE\n SKIP LOCKED\n )\n RETURNING\n prover_jobs.*\n " }, - "d712707e47e143c52330ea6e0513d2839f0f928c06b8020eecec38e895f99b42": { + "d1b261f4057e4113b96eb87c9e20015eeb3ef2643ceda3024504a471b24d1283": { "describe": { "columns": [ { - "name": "address", + "name": "number", "ordinal": 0, - "type_info": "Bytea" + "type_info": "Int8" }, { - "name": "key", + "name": "timestamp", "ordinal": 1, + "type_info": "Int8" + }, + { + "name": "is_finished", + "ordinal": 2, + "type_info": "Bool" + }, + { + "name": "l1_tx_count", + "ordinal": 3, + "type_info": "Int4" + }, + { + "name": "l2_tx_count", + "ordinal": 4, + "type_info": "Int4" + }, + { + "name": "fee_account_address", + "ordinal": 5, "type_info": "Bytea" - } - ], - "nullable": [ - false, - false - ], - "parameters": { - "Left": [ - "Int8" - ] - } - }, - "query": "\n SELECT\n address,\n key\n FROM\n protective_reads\n WHERE\n l1_batch_number = $1\n " - }, - "d7e8eabd7b43ff62838fbc847e4813d2b2d411bd5faf8306cd48db500532b711": { - "describe": { - "columns": [ + }, { - "name": "l1_batch_number", - "ordinal": 0, - "type_info": "Int8" + "name": "bloom", + "ordinal": 6, + "type_info": "Bytea" }, { - "name": "status", - "ordinal": 1, - "type_info": "Text" - } - ], - "nullable": [ - false, - false - ], - "parameters": { - "Left": [ - "Text", - "Text" - ] - } - }, - "query": "\n SELECT\n l1_batch_number,\n status\n FROM\n proof_compression_jobs_fri\n WHERE\n l1_batch_number = (\n SELECT\n MIN(l1_batch_number)\n FROM\n proof_compression_jobs_fri\n WHERE\n status = $1\n OR status = $2\n )\n " - }, - "d7ed82f0d012f72374edb2ebcec33c83477d65a6f8cb2673f67b3148cd95b436": { - "describe": { - "columns": [ + "name": "priority_ops_onchain_data", + "ordinal": 7, + "type_info": "ByteaArray" + }, { - "name": "count", - "ordinal": 0, - "type_info": "Int8" - } - ], - "nullable": [ - null - ], - "parameters": { - "Left": [] - } - }, - "query": "\n SELECT\n COUNT(*)\n FROM\n eth_txs\n WHERE\n has_failed = TRUE\n " - }, - "d8e3ee346375e4b6a8b2c73a3827e88abd0f8164c2413dc83c91c29665ca645e": { - "describe": { - "columns": [ + "name": "hash", + "ordinal": 8, + "type_info": "Bytea" + }, { - "name": "id", - "ordinal": 0, - "type_info": "Int8" + "name": "parent_hash", + "ordinal": 9, + "type_info": "Bytea" }, { - "name": "status", - "ordinal": 1, - "type_info": "Text" + "name": "commitment", + "ordinal": 10, + "type_info": "Bytea" }, { - "name": "attempts", - "ordinal": 2, - "type_info": "Int2" - } - ], - "nullable": [ - false, - false, - false - ], - "parameters": { - "Left": [ - "Interval", - "Int2" - ] - } - }, - "query": "\n UPDATE leaf_aggregation_witness_jobs_fri\n SET\n status = 'queued',\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n (\n status = 'in_progress'\n AND processing_started_at <= NOW() - $1::INTERVAL\n AND attempts < $2\n )\n OR (\n status = 'failed'\n AND attempts < $2\n )\n RETURNING\n id,\n status,\n attempts\n " - }, - "d90ed4c0f67c1826f9be90bb5566aba34bfab67494fee578613b03ef7255324d": { - "describe": { - "columns": [], - "nullable": [], - "parameters": { - "Left": [ - "Int8", - "Jsonb" - ] - } - }, - "query": "\n UPDATE miniblocks\n SET\n consensus = $2\n WHERE\n number = $1\n " - }, - "da51a5220c2b964303292592c34e8ee5e54b170de9da863bbdbc79e3f206640b": { - "describe": { - "columns": [], - "nullable": [], - "parameters": { - "Left": [ - "ByteaArray" - ] - } - }, - "query": "\n DELETE FROM storage\n WHERE\n hashed_key = ANY ($1)\n " - }, - "db3e74f0e83ffbf84a6d61e560f2060fbea775dc185f639139fbfd23e4d5f3c6": { - "describe": { - "columns": [], - "nullable": [], - "parameters": { - "Left": [ - "Time", - "Int8" - ] - } - }, - "query": "\n UPDATE node_aggregation_witness_jobs_fri\n SET\n status = 'successful',\n updated_at = NOW(),\n time_taken = $1\n WHERE\n id = $2\n " - }, - "dc16d0fac093a52480b66dfcb5976fb01e6629e8c982c265f2af1d5000090572": { - "describe": { - "columns": [ + "name": "compressed_write_logs", + "ordinal": 11, + "type_info": "Bytea" + }, { - "name": "count", - "ordinal": 0, + "name": "compressed_contracts", + "ordinal": 12, + "type_info": "Bytea" + }, + { + "name": "eth_prove_tx_id", + "ordinal": 13, + "type_info": "Int4" + }, + { + "name": "eth_commit_tx_id", + "ordinal": 14, + "type_info": "Int4" + }, + { + "name": "eth_execute_tx_id", + "ordinal": 15, + "type_info": "Int4" + }, + { + "name": "merkle_root_hash", + "ordinal": 16, + "type_info": "Bytea" + }, + { + "name": "l2_to_l1_logs", + "ordinal": 17, + "type_info": "ByteaArray" + }, + { + "name": "l2_to_l1_messages", + "ordinal": 18, + "type_info": "ByteaArray" + }, + { + "name": "used_contract_hashes", + "ordinal": 19, + "type_info": "Jsonb" + }, + { + "name": "compressed_initial_writes", + "ordinal": 20, + "type_info": "Bytea" + }, + { + "name": "compressed_repeated_writes", + "ordinal": 21, + "type_info": "Bytea" + }, + { + "name": "l2_l1_compressed_messages", + "ordinal": 22, + "type_info": "Bytea" + }, + { + "name": "l2_l1_merkle_root", + "ordinal": 23, + "type_info": "Bytea" + }, + { + "name": "l1_gas_price", + "ordinal": 24, + "type_info": "Int8" + }, + { + "name": "l2_fair_gas_price", + "ordinal": 25, + "type_info": "Int8" + }, + { + "name": "rollup_last_leaf_index", + "ordinal": 26, "type_info": "Int8" + }, + { + "name": "zkporter_is_available", + "ordinal": 27, + "type_info": "Bool" + }, + { + "name": "bootloader_code_hash", + "ordinal": 28, + "type_info": "Bytea" + }, + { + "name": "default_aa_code_hash", + "ordinal": 29, + "type_info": "Bytea" + }, + { + "name": "base_fee_per_gas", + "ordinal": 30, + "type_info": "Numeric" + }, + { + "name": "aux_data_hash", + "ordinal": 31, + "type_info": "Bytea" + }, + { + "name": "pass_through_data_hash", + "ordinal": 32, + "type_info": "Bytea" + }, + { + "name": "meta_parameters_hash", + "ordinal": 33, + "type_info": "Bytea" + }, + { + "name": "protocol_version", + "ordinal": 34, + "type_info": "Int4" + }, + { + "name": "compressed_state_diffs", + "ordinal": 35, + "type_info": "Bytea" + }, + { + "name": "system_logs", + "ordinal": 36, + "type_info": "ByteaArray" + }, + { + "name": "events_queue_commitment", + "ordinal": 37, + "type_info": "Bytea" + }, + { + "name": "bootloader_initial_content_commitment", + "ordinal": 38, + "type_info": "Bytea" + }, + { + "name": "pubdata_input", + "ordinal": 39, + "type_info": "Bytea" } ], "nullable": [ - null + false, + false, + false, + false, + false, + false, + false, + false, + true, + true, + true, + true, + true, + true, + true, + true, + true, + false, + false, + false, + true, + true, + true, + true, + false, + false, + true, + true, + true, + true, + false, + true, + true, + true, + true, + true, + false, + true, + true, + true ], "parameters": { "Left": [] } }, - "query": "SELECT COUNT(miniblocks.number) FROM miniblocks WHERE l1_batch_number IS NULL" + "query": "\n SELECT\n number,\n timestamp,\n is_finished,\n l1_tx_count,\n l2_tx_count,\n fee_account_address,\n bloom,\n priority_ops_onchain_data,\n hash,\n parent_hash,\n commitment,\n compressed_write_logs,\n compressed_contracts,\n eth_prove_tx_id,\n eth_commit_tx_id,\n eth_execute_tx_id,\n merkle_root_hash,\n l2_to_l1_logs,\n l2_to_l1_messages,\n used_contract_hashes,\n compressed_initial_writes,\n compressed_repeated_writes,\n l2_l1_compressed_messages,\n l2_l1_merkle_root,\n l1_gas_price,\n l2_fair_gas_price,\n rollup_last_leaf_index,\n zkporter_is_available,\n bootloader_code_hash,\n default_aa_code_hash,\n base_fee_per_gas,\n aux_data_hash,\n pass_through_data_hash,\n meta_parameters_hash,\n protocol_version,\n compressed_state_diffs,\n system_logs,\n events_queue_commitment,\n bootloader_initial_content_commitment,\n pubdata_input\n FROM\n l1_batches\n LEFT JOIN commitments ON commitments.l1_batch_number = l1_batches.number\n WHERE\n number = 0\n OR eth_commit_tx_id IS NOT NULL\n AND commitment IS NOT NULL\n ORDER BY\n number DESC\n LIMIT\n 1\n " }, - "dc481f59aae632ff6f5fa23f5c5c82627a936f7ea9f6c354eca4bea76fac6b10": { + "d3b09cbcddf6238b358d32d57678242aad3e9a47400f6d6837a35f4c54a216b9": { "describe": { "columns": [ { @@ -10371,61 +10659,123 @@ } ], "nullable": [ - null + false ], "parameters": { "Left": [] } }, - "query": "\n SELECT\n MAX(number) AS \"number\"\n FROM\n l1_batches\n WHERE\n hash IS NOT NULL\n " + "query": "\n SELECT\n number\n FROM\n l1_batches\n LEFT JOIN eth_txs_history AS execute_tx ON (l1_batches.eth_execute_tx_id = execute_tx.eth_tx_id)\n WHERE\n execute_tx.confirmed_at IS NOT NULL\n ORDER BY\n number DESC\n LIMIT\n 1\n " }, - "dc764e1636c4e958753c1fd54562e2ca92fdfdf01cfd0b11f5ce24f0458a5e48": { + "d70cfc158e31dd2d5c942d24f81fd17f833fb15b58b0110c7cc566946db98e76": { "describe": { - "columns": [], - "nullable": [], + "columns": [ + { + "name": "block_hash?", + "ordinal": 0, + "type_info": "Bytea" + }, + { + "name": "address!", + "ordinal": 1, + "type_info": "Bytea" + }, + { + "name": "topic1!", + "ordinal": 2, + "type_info": "Bytea" + }, + { + "name": "topic2!", + "ordinal": 3, + "type_info": "Bytea" + }, + { + "name": "topic3!", + "ordinal": 4, + "type_info": "Bytea" + }, + { + "name": "topic4!", + "ordinal": 5, + "type_info": "Bytea" + }, + { + "name": "value!", + "ordinal": 6, + "type_info": "Bytea" + }, + { + "name": "miniblock_number!", + "ordinal": 7, + "type_info": "Int8" + }, + { + "name": "l1_batch_number?", + "ordinal": 8, + "type_info": "Int8" + }, + { + "name": "tx_hash!", + "ordinal": 9, + "type_info": "Bytea" + }, + { + "name": "tx_index_in_block!", + "ordinal": 10, + "type_info": "Int4" + }, + { + "name": "event_index_in_block!", + "ordinal": 11, + "type_info": "Int4" + }, + { + "name": "event_index_in_tx!", + "ordinal": 12, + "type_info": "Int4" + } + ], + "nullable": [ + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true + ], "parameters": { "Left": [ - "Bytea", - "Bytea", - "Bytea", - "Bytea", - "Bytea", - "Bytea", - "Bool", - "Bytea", - "Int8", - "Bytea", - "Bytea", - "Bytea", "Int8" ] } }, - "query": "\n UPDATE l1_batches\n SET\n hash = $1,\n merkle_root_hash = $2,\n compressed_repeated_writes = $3,\n compressed_initial_writes = $4,\n l2_l1_compressed_messages = $5,\n l2_l1_merkle_root = $6,\n zkporter_is_available = $7,\n parent_hash = $8,\n rollup_last_leaf_index = $9,\n pass_through_data_hash = $10,\n meta_parameters_hash = $11,\n compressed_state_diffs = $12,\n updated_at = NOW()\n WHERE\n number = $13\n AND hash IS NULL\n " + "query": "\n WITH\n events_select AS (\n SELECT\n address,\n topic1,\n topic2,\n topic3,\n topic4,\n value,\n miniblock_number,\n tx_hash,\n tx_index_in_block,\n event_index_in_block,\n event_index_in_tx\n FROM\n events\n WHERE\n miniblock_number > $1\n ORDER BY\n miniblock_number ASC,\n event_index_in_block ASC\n )\n SELECT\n miniblocks.hash AS \"block_hash?\",\n address AS \"address!\",\n topic1 AS \"topic1!\",\n topic2 AS \"topic2!\",\n topic3 AS \"topic3!\",\n topic4 AS \"topic4!\",\n value AS \"value!\",\n miniblock_number AS \"miniblock_number!\",\n miniblocks.l1_batch_number AS \"l1_batch_number?\",\n tx_hash AS \"tx_hash!\",\n tx_index_in_block AS \"tx_index_in_block!\",\n event_index_in_block AS \"event_index_in_block!\",\n event_index_in_tx AS \"event_index_in_tx!\"\n FROM\n events_select\n INNER JOIN miniblocks ON events_select.miniblock_number = miniblocks.number\n ORDER BY\n miniblock_number ASC,\n event_index_in_block ASC\n " }, - "dd55e46dfa5ba3692d9620088a3550b8db817630d1a9341db4a1f453f12e64fb": { + "d712707e47e143c52330ea6e0513d2839f0f928c06b8020eecec38e895f99b42": { "describe": { "columns": [ { - "name": "status", + "name": "address", "ordinal": 0, - "type_info": "Text" + "type_info": "Bytea" }, { - "name": "error", + "name": "key", "ordinal": 1, - "type_info": "Text" - }, - { - "name": "compilation_errors", - "ordinal": 2, - "type_info": "Jsonb" + "type_info": "Bytea" } ], "nullable": [ false, - true, - true + false ], "parameters": { "Left": [ @@ -10433,753 +10783,696 @@ ] } }, - "query": "\n SELECT\n status,\n error,\n compilation_errors\n FROM\n contract_verification_requests\n WHERE\n id = $1\n " - }, - "dea22358feed1418430505767d03aa4239d3a8be71b47178b4b8fb11fe898b31": { - "describe": { - "columns": [], - "nullable": [], - "parameters": { - "Left": [ - "Int4", - "Int8", - "Int8" - ] - } - }, - "query": "\n UPDATE l1_batches\n SET\n eth_execute_tx_id = $1,\n updated_at = NOW()\n WHERE\n number BETWEEN $2 AND $3\n " + "query": "\n SELECT\n address,\n key\n FROM\n protective_reads\n WHERE\n l1_batch_number = $1\n " }, - "df00e33809768120e395d8f740770a4e629b2a1cde641e74e4e55bb100df809f": { + "d7e8eabd7b43ff62838fbc847e4813d2b2d411bd5faf8306cd48db500532b711": { "describe": { "columns": [ { - "name": "attempts", + "name": "l1_batch_number", "ordinal": 0, - "type_info": "Int2" + "type_info": "Int8" + }, + { + "name": "status", + "ordinal": 1, + "type_info": "Text" } ], "nullable": [ + false, false ], "parameters": { "Left": [ - "Int8" - ] - } - }, - "query": "\n SELECT\n attempts\n FROM\n prover_jobs_fri\n WHERE\n id = $1\n " - }, - "df3b08549a11729fb475341b8f38f8af02aa297d85a2695c5f448ed14b2d7386": { - "describe": { - "columns": [], - "nullable": [], - "parameters": { - "Left": [ - "Int8", - "Bytea", - "Int8", - "Bytea", - "Int4", - "Int4" + "Text", + "Text" ] } }, - "query": "\n INSERT INTO\n snapshot_recovery (\n l1_batch_number,\n l1_batch_root_hash,\n miniblock_number,\n miniblock_root_hash,\n last_finished_chunk_id,\n total_chunk_count,\n updated_at,\n created_at\n )\n VALUES\n ($1, $2, $3, $4, $5, $6, NOW(), NOW())\n ON CONFLICT (l1_batch_number) DO\n UPDATE\n SET\n l1_batch_number = excluded.l1_batch_number,\n l1_batch_root_hash = excluded.l1_batch_root_hash,\n miniblock_number = excluded.miniblock_number,\n miniblock_root_hash = excluded.miniblock_root_hash,\n last_finished_chunk_id = excluded.last_finished_chunk_id,\n total_chunk_count = excluded.total_chunk_count,\n updated_at = excluded.updated_at\n " + "query": "\n SELECT\n l1_batch_number,\n status\n FROM\n proof_compression_jobs_fri\n WHERE\n l1_batch_number = (\n SELECT\n MIN(l1_batch_number)\n FROM\n proof_compression_jobs_fri\n WHERE\n status = $1\n OR status = $2\n )\n " }, - "e073cfdc7a00559994ce04eca15f35d55901fb1e6805f23413ea43e3637540a0": { + "d7ed82f0d012f72374edb2ebcec33c83477d65a6f8cb2673f67b3148cd95b436": { "describe": { "columns": [ { - "name": "bytecode", + "name": "count", "ordinal": 0, - "type_info": "Bytea" - }, - { - "name": "bytecode_hash", - "ordinal": 1, - "type_info": "Bytea" + "type_info": "Int8" } ], "nullable": [ - false, - false + null ], "parameters": { - "Left": [ - "ByteaArray" - ] + "Left": [] } }, - "query": "\n SELECT\n bytecode,\n bytecode_hash\n FROM\n factory_deps\n WHERE\n bytecode_hash = ANY ($1)\n " + "query": "\n SELECT\n COUNT(*)\n FROM\n eth_txs\n WHERE\n has_failed = TRUE\n " }, - "e3479d12d9dc97001cf03dc42d9b957e92cd375ec33fe16f855f319ffc0b208e": { + "d8e0f98a67ffb53a1caa6820f8475da2787332deca5708d1d08730cdbfc73541": { "describe": { "columns": [ { - "name": "l1_batch_number", + "name": "number", "ordinal": 0, "type_info": "Int8" }, { - "name": "status", + "name": "l1_tx_count", "ordinal": 1, - "type_info": "Text" + "type_info": "Int4" }, { - "name": "circuit_1_final_prover_job_id", + "name": "l2_tx_count", "ordinal": 2, - "type_info": "Int8" + "type_info": "Int4" }, { - "name": "circuit_2_final_prover_job_id", + "name": "timestamp", "ordinal": 3, "type_info": "Int8" }, { - "name": "circuit_3_final_prover_job_id", + "name": "is_finished", "ordinal": 4, - "type_info": "Int8" + "type_info": "Bool" }, { - "name": "circuit_4_final_prover_job_id", + "name": "fee_account_address", "ordinal": 5, - "type_info": "Int8" + "type_info": "Bytea" }, { - "name": "circuit_5_final_prover_job_id", + "name": "l2_to_l1_logs", "ordinal": 6, - "type_info": "Int8" + "type_info": "ByteaArray" }, { - "name": "circuit_6_final_prover_job_id", + "name": "l2_to_l1_messages", "ordinal": 7, - "type_info": "Int8" + "type_info": "ByteaArray" }, { - "name": "circuit_7_final_prover_job_id", + "name": "bloom", "ordinal": 8, - "type_info": "Int8" + "type_info": "Bytea" }, { - "name": "circuit_8_final_prover_job_id", + "name": "priority_ops_onchain_data", "ordinal": 9, - "type_info": "Int8" + "type_info": "ByteaArray" }, { - "name": "circuit_9_final_prover_job_id", + "name": "used_contract_hashes", "ordinal": 10, - "type_info": "Int8" + "type_info": "Jsonb" }, { - "name": "circuit_10_final_prover_job_id", + "name": "base_fee_per_gas", "ordinal": 11, - "type_info": "Int8" + "type_info": "Numeric" }, { - "name": "circuit_11_final_prover_job_id", + "name": "l1_gas_price", "ordinal": 12, "type_info": "Int8" }, { - "name": "circuit_12_final_prover_job_id", + "name": "l2_fair_gas_price", "ordinal": 13, "type_info": "Int8" }, { - "name": "circuit_13_final_prover_job_id", + "name": "bootloader_code_hash", "ordinal": 14, - "type_info": "Int8" + "type_info": "Bytea" }, { - "name": "created_at", + "name": "default_aa_code_hash", "ordinal": 15, - "type_info": "Timestamp" + "type_info": "Bytea" }, { - "name": "updated_at", + "name": "protocol_version", "ordinal": 16, - "type_info": "Timestamp" + "type_info": "Int4" + }, + { + "name": "system_logs", + "ordinal": 17, + "type_info": "ByteaArray" + }, + { + "name": "compressed_state_diffs", + "ordinal": 18, + "type_info": "Bytea" + }, + { + "name": "pubdata_input", + "ordinal": 19, + "type_info": "Bytea" } ], "nullable": [ false, false, - true, - true, - true, - true, - true, - true, - true, - true, - true, - true, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, + false, true, true, true, false, - false + true, + true ], "parameters": { "Left": [ - "Int8" + "Int4" ] } }, - "query": "\n SELECT\n *\n FROM\n scheduler_dependency_tracker_fri\n WHERE\n l1_batch_number = $1\n " + "query": "\n SELECT\n number,\n l1_tx_count,\n l2_tx_count,\n timestamp,\n is_finished,\n fee_account_address,\n l2_to_l1_logs,\n l2_to_l1_messages,\n bloom,\n priority_ops_onchain_data,\n used_contract_hashes,\n base_fee_per_gas,\n l1_gas_price,\n l2_fair_gas_price,\n bootloader_code_hash,\n default_aa_code_hash,\n protocol_version,\n system_logs,\n compressed_state_diffs,\n pubdata_input\n FROM\n l1_batches\n WHERE\n eth_commit_tx_id = $1\n OR eth_prove_tx_id = $1\n OR eth_execute_tx_id = $1\n " }, - "e5a90d17b2c25744df4585b53678c7ffd9a04eae27afbdf37a6ba8ff7ac85f3b": { + "d8e3ee346375e4b6a8b2c73a3827e88abd0f8164c2413dc83c91c29665ca645e": { "describe": { "columns": [ { - "name": "serialized_events_queue", + "name": "id", "ordinal": 0, - "type_info": "Jsonb" + "type_info": "Int8" + }, + { + "name": "status", + "ordinal": 1, + "type_info": "Text" + }, + { + "name": "attempts", + "ordinal": 2, + "type_info": "Int2" } ], "nullable": [ + false, + false, false ], "parameters": { "Left": [ - "Int8" + "Interval", + "Int2" ] } }, - "query": "\n SELECT\n serialized_events_queue\n FROM\n events_queue\n WHERE\n l1_batch_number = $1\n " + "query": "\n UPDATE leaf_aggregation_witness_jobs_fri\n SET\n status = 'queued',\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n (\n status = 'in_progress'\n AND processing_started_at <= NOW() - $1::INTERVAL\n AND attempts < $2\n )\n OR (\n status = 'failed'\n AND attempts < $2\n )\n RETURNING\n id,\n status,\n attempts\n " }, - "e63cc86a8d527dae2905b2af6a66bc6419ba51514519652e055c769b096015f6": { + "d90ed4c0f67c1826f9be90bb5566aba34bfab67494fee578613b03ef7255324d": { "describe": { - "columns": [ - { - "name": "hash", - "ordinal": 0, - "type_info": "Bytea" - } - ], - "nullable": [ - false - ], + "columns": [], + "nullable": [], "parameters": { "Left": [ - "Interval" + "Int8", + "Jsonb" + ] + } + }, + "query": "\n UPDATE miniblocks\n SET\n consensus = $2\n WHERE\n number = $1\n " + }, + "da51a5220c2b964303292592c34e8ee5e54b170de9da863bbdbc79e3f206640b": { + "describe": { + "columns": [], + "nullable": [], + "parameters": { + "Left": [ + "ByteaArray" + ] + } + }, + "query": "\n DELETE FROM storage\n WHERE\n hashed_key = ANY ($1)\n " + }, + "db3e74f0e83ffbf84a6d61e560f2060fbea775dc185f639139fbfd23e4d5f3c6": { + "describe": { + "columns": [], + "nullable": [], + "parameters": { + "Left": [ + "Time", + "Int8" ] } }, - "query": "\n DELETE FROM transactions\n WHERE\n miniblock_number IS NULL\n AND received_at < NOW() - $1::INTERVAL\n AND is_priority = FALSE\n AND error IS NULL\n RETURNING\n hash\n " + "query": "\n UPDATE node_aggregation_witness_jobs_fri\n SET\n status = 'successful',\n updated_at = NOW(),\n time_taken = $1\n WHERE\n id = $2\n " }, - "e6a3efeffe1b3520cc9b1751e2c842c27546b3fd41f7d8a784ca58579856621b": { + "dc16d0fac093a52480b66dfcb5976fb01e6629e8c982c265f2af1d5000090572": { "describe": { "columns": [ { - "name": "l1_batch_number", + "name": "count", "ordinal": 0, "type_info": "Int8" - }, - { - "name": "attempts", - "ordinal": 1, - "type_info": "Int4" } ], "nullable": [ - false, - false + null ], "parameters": { - "Left": [ - "Text", - "Int8" - ] + "Left": [] } }, - "query": "\n UPDATE prover_jobs\n SET\n status = 'failed',\n error = $1,\n updated_at = NOW()\n WHERE\n id = $2\n RETURNING\n l1_batch_number,\n attempts\n " + "query": "SELECT COUNT(miniblocks.number) FROM miniblocks WHERE l1_batch_number IS NULL" }, - "e71c39b93ceba5416ff3d988290cb35d4d07d47f33fe1a5b9e9fe1f0ae09b705": { + "dc481f59aae632ff6f5fa23f5c5c82627a936f7ea9f6c354eca4bea76fac6b10": { "describe": { "columns": [ { - "name": "usd_price", + "name": "number", "ordinal": 0, - "type_info": "Numeric" - }, - { - "name": "usd_price_updated_at", - "ordinal": 1, - "type_info": "Timestamp" + "type_info": "Int8" } ], "nullable": [ - true, - true + null ], "parameters": { - "Left": [ - "Bytea" - ] + "Left": [] } }, - "query": "\n SELECT\n usd_price,\n usd_price_updated_at\n FROM\n tokens\n WHERE\n l2_address = $1\n " + "query": "\n SELECT\n MAX(number) AS \"number\"\n FROM\n l1_batches\n WHERE\n hash IS NOT NULL\n " }, - "e74a34a59e6afda689b0ec9e19071ababa66e4a443fbefbfffca72b7540b075b": { + "dc764e1636c4e958753c1fd54562e2ca92fdfdf01cfd0b11f5ce24f0458a5e48": { "describe": { "columns": [], "nullable": [], "parameters": { "Left": [ + "Bytea", + "Bytea", + "Bytea", + "Bytea", + "Bytea", + "Bytea", + "Bool", + "Bytea", "Int8", - "Text" + "Bytea", + "Bytea", + "Bytea", + "Int8" ] } }, - "query": "\n INSERT INTO\n proof_compression_jobs_fri (l1_batch_number, status, created_at, updated_at)\n VALUES\n ($1, $2, NOW(), NOW())\n ON CONFLICT (l1_batch_number) DO NOTHING\n " - }, - "e76217231b4d896118e9630de9485b19e1294b3aa6e084d2051bb532408672be": { - "describe": { - "columns": [], - "nullable": [], - "parameters": { - "Left": [] - } - }, - "query": "\n UPDATE transactions\n SET\n in_mempool = FALSE\n WHERE\n in_mempool = TRUE\n " + "query": "\n UPDATE l1_batches\n SET\n hash = $1,\n merkle_root_hash = $2,\n compressed_repeated_writes = $3,\n compressed_initial_writes = $4,\n l2_l1_compressed_messages = $5,\n l2_l1_merkle_root = $6,\n zkporter_is_available = $7,\n parent_hash = $8,\n rollup_last_leaf_index = $9,\n pass_through_data_hash = $10,\n meta_parameters_hash = $11,\n compressed_state_diffs = $12,\n updated_at = NOW()\n WHERE\n number = $13\n AND hash IS NULL\n " }, - "e9adf5b5a1ab84c20a514a7775f91a9984685eaaaa0a8b223410d560a15a3034": { + "dd55e46dfa5ba3692d9620088a3550b8db817630d1a9341db4a1f453f12e64fb": { "describe": { "columns": [ { - "name": "id", + "name": "status", "ordinal": 0, - "type_info": "Int8" + "type_info": "Text" }, { - "name": "l1_batch_number", + "name": "error", "ordinal": 1, - "type_info": "Int8" + "type_info": "Text" }, { - "name": "circuit_id", + "name": "compilation_errors", "ordinal": 2, - "type_info": "Int2" - }, - { - "name": "aggregation_round", - "ordinal": 3, - "type_info": "Int2" - }, - { - "name": "sequence_number", - "ordinal": 4, - "type_info": "Int4" - }, - { - "name": "depth", - "ordinal": 5, - "type_info": "Int4" - }, - { - "name": "is_node_final_proof", - "ordinal": 6, - "type_info": "Bool" + "type_info": "Jsonb" } ], "nullable": [ false, - false, - false, - false, - false, - false, - false + true, + true ], "parameters": { "Left": [ - "Int2Array", - "Int2Array", - "Int4Array", - "Text" + "Int8" ] } }, - "query": "\n UPDATE prover_jobs_fri\n SET\n status = 'in_progress',\n attempts = attempts + 1,\n processing_started_at = NOW(),\n updated_at = NOW(),\n picked_by = $4\n WHERE\n id = (\n SELECT\n pj.id\n FROM\n (\n SELECT\n *\n FROM\n UNNEST($1::SMALLINT[], $2::SMALLINT[])\n ) AS tuple (circuit_id, ROUND)\n JOIN LATERAL (\n SELECT\n *\n FROM\n prover_jobs_fri AS pj\n WHERE\n pj.status = 'queued'\n AND pj.protocol_version = ANY ($3)\n AND pj.circuit_id = tuple.circuit_id\n AND pj.aggregation_round = tuple.round\n ORDER BY\n pj.l1_batch_number ASC,\n pj.id ASC\n LIMIT\n 1\n ) AS pj ON TRUE\n ORDER BY\n pj.l1_batch_number ASC,\n pj.aggregation_round DESC,\n pj.id ASC\n LIMIT\n 1\n FOR UPDATE\n SKIP LOCKED\n )\n RETURNING\n prover_jobs_fri.id,\n prover_jobs_fri.l1_batch_number,\n prover_jobs_fri.circuit_id,\n prover_jobs_fri.aggregation_round,\n prover_jobs_fri.sequence_number,\n prover_jobs_fri.depth,\n prover_jobs_fri.is_node_final_proof\n " + "query": "\n SELECT\n status,\n error,\n compilation_errors\n FROM\n contract_verification_requests\n WHERE\n id = $1\n " }, - "e9ca863d6e77edd39a9fc55700a6686e655206601854799139c22c017a214744": { + "dea22358feed1418430505767d03aa4239d3a8be71b47178b4b8fb11fe898b31": { "describe": { "columns": [], "nullable": [], "parameters": { "Left": [ - "Int8", - "Int2", - "Int4", - "Text", "Int4", - "Int4" - ] - } - }, - "query": "\n INSERT INTO\n node_aggregation_witness_jobs_fri (\n l1_batch_number,\n circuit_id,\n depth,\n aggregations_url,\n number_of_dependent_jobs,\n protocol_version,\n status,\n created_at,\n updated_at\n )\n VALUES\n ($1, $2, $3, $4, $5, $6, 'waiting_for_proofs', NOW(), NOW())\n ON CONFLICT (l1_batch_number, circuit_id, depth) DO\n UPDATE\n SET\n updated_at = NOW()\n " - }, - "ea904aa930d602d33b6fbc1bf1178a8a0ec739f4ddec8ffeb3a87253aeb18d30": { - "describe": { - "columns": [], - "nullable": [], - "parameters": { - "Left": [ + "Int8", "Int8" ] } }, - "query": "\n DELETE FROM miniblocks\n WHERE\n number > $1\n " + "query": "\n UPDATE l1_batches\n SET\n eth_execute_tx_id = $1,\n updated_at = NOW()\n WHERE\n number BETWEEN $2 AND $3\n " }, - "ec04b89218111a5dc8d5ade506ac3465e2211ef3013386feb12d4cc04e0eade9": { + "df00e33809768120e395d8f740770a4e629b2a1cde641e74e4e55bb100df809f": { "describe": { "columns": [ { - "name": "id", + "name": "attempts", "ordinal": 0, - "type_info": "Int8" - }, - { - "name": "l1_batch_number", - "ordinal": 1, - "type_info": "Int8" - }, - { - "name": "circuit_id", - "ordinal": 2, - "type_info": "Int2" - }, - { - "name": "aggregation_round", - "ordinal": 3, "type_info": "Int2" - }, - { - "name": "sequence_number", - "ordinal": 4, - "type_info": "Int4" - }, - { - "name": "depth", - "ordinal": 5, - "type_info": "Int4" - }, - { - "name": "is_node_final_proof", - "ordinal": 6, - "type_info": "Bool" } ], "nullable": [ - false, - false, - false, - false, - false, - false, false ], "parameters": { "Left": [ - "Time", - "Text", "Int8" ] } }, - "query": "\n UPDATE prover_jobs_fri\n SET\n status = 'successful',\n updated_at = NOW(),\n time_taken = $1,\n proof_blob_url = $2\n WHERE\n id = $3\n RETURNING\n prover_jobs_fri.id,\n prover_jobs_fri.l1_batch_number,\n prover_jobs_fri.circuit_id,\n prover_jobs_fri.aggregation_round,\n prover_jobs_fri.sequence_number,\n prover_jobs_fri.depth,\n prover_jobs_fri.is_node_final_proof\n " + "query": "\n SELECT\n attempts\n FROM\n prover_jobs_fri\n WHERE\n id = $1\n " }, - "edc61e1285bf6d3837acc67af4f15aaade450980719933089824eb8c494d64a4": { + "df3b08549a11729fb475341b8f38f8af02aa297d85a2695c5f448ed14b2d7386": { "describe": { "columns": [], "nullable": [], "parameters": { "Left": [ - "Time", - "Int8" + "Int8", + "Bytea", + "Int8", + "Bytea", + "Int4", + "Int4" ] } }, - "query": "\n UPDATE witness_inputs_fri\n SET\n status = 'successful',\n updated_at = NOW(),\n time_taken = $1\n WHERE\n l1_batch_number = $2\n " + "query": "\n INSERT INTO\n snapshot_recovery (\n l1_batch_number,\n l1_batch_root_hash,\n miniblock_number,\n miniblock_root_hash,\n last_finished_chunk_id,\n total_chunk_count,\n updated_at,\n created_at\n )\n VALUES\n ($1, $2, $3, $4, $5, $6, NOW(), NOW())\n ON CONFLICT (l1_batch_number) DO\n UPDATE\n SET\n l1_batch_number = excluded.l1_batch_number,\n l1_batch_root_hash = excluded.l1_batch_root_hash,\n miniblock_number = excluded.miniblock_number,\n miniblock_root_hash = excluded.miniblock_root_hash,\n last_finished_chunk_id = excluded.last_finished_chunk_id,\n total_chunk_count = excluded.total_chunk_count,\n updated_at = excluded.updated_at\n " }, - "ee17d2b3edfe705d14811e3938d4312b2b780563a9fde48bae5e51650475670f": { + "e073cfdc7a00559994ce04eca15f35d55901fb1e6805f23413ea43e3637540a0": { "describe": { "columns": [ { - "name": "id", + "name": "bytecode", "ordinal": 0, - "type_info": "Int4" + "type_info": "Bytea" }, { - "name": "eth_tx_id", + "name": "bytecode_hash", "ordinal": 1, - "type_info": "Int4" - }, - { - "name": "tx_hash", - "ordinal": 2, - "type_info": "Text" - }, - { - "name": "created_at", - "ordinal": 3, - "type_info": "Timestamp" - }, - { - "name": "updated_at", - "ordinal": 4, - "type_info": "Timestamp" - }, - { - "name": "base_fee_per_gas", - "ordinal": 5, - "type_info": "Int8" - }, - { - "name": "priority_fee_per_gas", - "ordinal": 6, - "type_info": "Int8" - }, - { - "name": "confirmed_at", - "ordinal": 7, - "type_info": "Timestamp" - }, - { - "name": "signed_raw_tx", - "ordinal": 8, "type_info": "Bytea" - }, - { - "name": "sent_at_block", - "ordinal": 9, - "type_info": "Int4" - }, - { - "name": "sent_at", - "ordinal": 10, - "type_info": "Timestamp" } ], - "nullable": [ - false, - false, - false, - false, - false, - false, + "nullable": [ false, - true, - true, - true, - true + false ], "parameters": { "Left": [ - "Int4" + "ByteaArray" ] } }, - "query": "\n SELECT\n *\n FROM\n eth_txs_history\n WHERE\n eth_tx_id = $1\n ORDER BY\n created_at DESC\n LIMIT\n 1\n " + "query": "\n SELECT\n bytecode,\n bytecode_hash\n FROM\n factory_deps\n WHERE\n bytecode_hash = ANY ($1)\n " }, - "ee5111f1b616434587e2079ae676e36a4b2d7905bb60573df362063f7b007edb": { + "e3479d12d9dc97001cf03dc42d9b957e92cd375ec33fe16f855f319ffc0b208e": { "describe": { "columns": [ { - "name": "number", + "name": "l1_batch_number", "ordinal": 0, "type_info": "Int8" }, { - "name": "timestamp", + "name": "status", "ordinal": 1, - "type_info": "Int8" + "type_info": "Text" }, { - "name": "is_finished", + "name": "circuit_1_final_prover_job_id", "ordinal": 2, - "type_info": "Bool" + "type_info": "Int8" }, { - "name": "l1_tx_count", + "name": "circuit_2_final_prover_job_id", "ordinal": 3, - "type_info": "Int4" + "type_info": "Int8" }, { - "name": "l2_tx_count", + "name": "circuit_3_final_prover_job_id", "ordinal": 4, - "type_info": "Int4" + "type_info": "Int8" }, { - "name": "fee_account_address", + "name": "circuit_4_final_prover_job_id", "ordinal": 5, - "type_info": "Bytea" + "type_info": "Int8" }, { - "name": "bloom", + "name": "circuit_5_final_prover_job_id", "ordinal": 6, - "type_info": "Bytea" + "type_info": "Int8" }, { - "name": "priority_ops_onchain_data", + "name": "circuit_6_final_prover_job_id", "ordinal": 7, - "type_info": "ByteaArray" + "type_info": "Int8" }, { - "name": "hash", + "name": "circuit_7_final_prover_job_id", "ordinal": 8, - "type_info": "Bytea" + "type_info": "Int8" }, { - "name": "parent_hash", + "name": "circuit_8_final_prover_job_id", "ordinal": 9, - "type_info": "Bytea" + "type_info": "Int8" }, { - "name": "commitment", + "name": "circuit_9_final_prover_job_id", "ordinal": 10, - "type_info": "Bytea" + "type_info": "Int8" }, { - "name": "compressed_write_logs", + "name": "circuit_10_final_prover_job_id", "ordinal": 11, - "type_info": "Bytea" + "type_info": "Int8" }, { - "name": "compressed_contracts", + "name": "circuit_11_final_prover_job_id", "ordinal": 12, - "type_info": "Bytea" + "type_info": "Int8" }, { - "name": "eth_prove_tx_id", + "name": "circuit_12_final_prover_job_id", "ordinal": 13, - "type_info": "Int4" + "type_info": "Int8" }, { - "name": "eth_commit_tx_id", + "name": "circuit_13_final_prover_job_id", "ordinal": 14, - "type_info": "Int4" + "type_info": "Int8" }, { - "name": "eth_execute_tx_id", + "name": "created_at", "ordinal": 15, - "type_info": "Int4" + "type_info": "Timestamp" }, { - "name": "merkle_root_hash", + "name": "updated_at", "ordinal": 16, - "type_info": "Bytea" - }, - { - "name": "l2_to_l1_logs", - "ordinal": 17, - "type_info": "ByteaArray" - }, - { - "name": "l2_to_l1_messages", - "ordinal": 18, - "type_info": "ByteaArray" - }, + "type_info": "Timestamp" + } + ], + "nullable": [ + false, + false, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + true, + false, + false + ], + "parameters": { + "Left": [ + "Int8" + ] + } + }, + "query": "\n SELECT\n *\n FROM\n scheduler_dependency_tracker_fri\n WHERE\n l1_batch_number = $1\n " + }, + "e5a90d17b2c25744df4585b53678c7ffd9a04eae27afbdf37a6ba8ff7ac85f3b": { + "describe": { + "columns": [ { - "name": "used_contract_hashes", - "ordinal": 19, + "name": "serialized_events_queue", + "ordinal": 0, "type_info": "Jsonb" - }, - { - "name": "compressed_initial_writes", - "ordinal": 20, - "type_info": "Bytea" - }, - { - "name": "compressed_repeated_writes", - "ordinal": 21, - "type_info": "Bytea" - }, - { - "name": "l2_l1_compressed_messages", - "ordinal": 22, - "type_info": "Bytea" - }, + } + ], + "nullable": [ + false + ], + "parameters": { + "Left": [ + "Int8" + ] + } + }, + "query": "\n SELECT\n serialized_events_queue\n FROM\n events_queue\n WHERE\n l1_batch_number = $1\n " + }, + "e63cc86a8d527dae2905b2af6a66bc6419ba51514519652e055c769b096015f6": { + "describe": { + "columns": [ { - "name": "l2_l1_merkle_root", - "ordinal": 23, + "name": "hash", + "ordinal": 0, "type_info": "Bytea" - }, - { - "name": "l1_gas_price", - "ordinal": 24, - "type_info": "Int8" - }, - { - "name": "l2_fair_gas_price", - "ordinal": 25, - "type_info": "Int8" - }, + } + ], + "nullable": [ + false + ], + "parameters": { + "Left": [ + "Interval" + ] + } + }, + "query": "\n DELETE FROM transactions\n WHERE\n miniblock_number IS NULL\n AND received_at < NOW() - $1::INTERVAL\n AND is_priority = FALSE\n AND error IS NULL\n RETURNING\n hash\n " + }, + "e6a3efeffe1b3520cc9b1751e2c842c27546b3fd41f7d8a784ca58579856621b": { + "describe": { + "columns": [ { - "name": "rollup_last_leaf_index", - "ordinal": 26, + "name": "l1_batch_number", + "ordinal": 0, "type_info": "Int8" }, { - "name": "zkporter_is_available", - "ordinal": 27, - "type_info": "Bool" - }, + "name": "attempts", + "ordinal": 1, + "type_info": "Int4" + } + ], + "nullable": [ + false, + false + ], + "parameters": { + "Left": [ + "Text", + "Int8" + ] + } + }, + "query": "\n UPDATE prover_jobs\n SET\n status = 'failed',\n error = $1,\n updated_at = NOW()\n WHERE\n id = $2\n RETURNING\n l1_batch_number,\n attempts\n " + }, + "e71c39b93ceba5416ff3d988290cb35d4d07d47f33fe1a5b9e9fe1f0ae09b705": { + "describe": { + "columns": [ { - "name": "bootloader_code_hash", - "ordinal": 28, - "type_info": "Bytea" + "name": "usd_price", + "ordinal": 0, + "type_info": "Numeric" }, { - "name": "default_aa_code_hash", - "ordinal": 29, - "type_info": "Bytea" - }, + "name": "usd_price_updated_at", + "ordinal": 1, + "type_info": "Timestamp" + } + ], + "nullable": [ + true, + true + ], + "parameters": { + "Left": [ + "Bytea" + ] + } + }, + "query": "\n SELECT\n usd_price,\n usd_price_updated_at\n FROM\n tokens\n WHERE\n l2_address = $1\n " + }, + "e74a34a59e6afda689b0ec9e19071ababa66e4a443fbefbfffca72b7540b075b": { + "describe": { + "columns": [], + "nullable": [], + "parameters": { + "Left": [ + "Int8", + "Text" + ] + } + }, + "query": "\n INSERT INTO\n proof_compression_jobs_fri (l1_batch_number, status, created_at, updated_at)\n VALUES\n ($1, $2, NOW(), NOW())\n ON CONFLICT (l1_batch_number) DO NOTHING\n " + }, + "e76217231b4d896118e9630de9485b19e1294b3aa6e084d2051bb532408672be": { + "describe": { + "columns": [], + "nullable": [], + "parameters": { + "Left": [] + } + }, + "query": "\n UPDATE transactions\n SET\n in_mempool = FALSE\n WHERE\n in_mempool = TRUE\n " + }, + "e9adf5b5a1ab84c20a514a7775f91a9984685eaaaa0a8b223410d560a15a3034": { + "describe": { + "columns": [ { - "name": "base_fee_per_gas", - "ordinal": 30, - "type_info": "Numeric" + "name": "id", + "ordinal": 0, + "type_info": "Int8" }, { - "name": "aux_data_hash", - "ordinal": 31, - "type_info": "Bytea" + "name": "l1_batch_number", + "ordinal": 1, + "type_info": "Int8" }, { - "name": "pass_through_data_hash", - "ordinal": 32, - "type_info": "Bytea" + "name": "circuit_id", + "ordinal": 2, + "type_info": "Int2" }, { - "name": "meta_parameters_hash", - "ordinal": 33, - "type_info": "Bytea" + "name": "aggregation_round", + "ordinal": 3, + "type_info": "Int2" }, { - "name": "protocol_version", - "ordinal": 34, + "name": "sequence_number", + "ordinal": 4, "type_info": "Int4" }, { - "name": "compressed_state_diffs", - "ordinal": 35, - "type_info": "Bytea" - }, - { - "name": "system_logs", - "ordinal": 36, - "type_info": "ByteaArray" - }, - { - "name": "events_queue_commitment", - "ordinal": 37, - "type_info": "Bytea" + "name": "depth", + "ordinal": 5, + "type_info": "Int4" }, { - "name": "bootloader_initial_content_commitment", - "ordinal": 38, - "type_info": "Bytea" + "name": "is_node_final_proof", + "ordinal": 6, + "type_info": "Bool" } ], "nullable": [ @@ -11189,245 +11482,176 @@ false, false, false, - false, - false, - true, - true, - true, - true, - true, - true, - true, - true, - true, - false, - false, - false, - true, - true, - true, - true, - false, - false, - true, - true, - true, - true, - false, - true, - true, - true, - true, - true, - false, - true, - true + false ], + "parameters": { + "Left": [ + "Int2Array", + "Int2Array", + "Int4Array", + "Text" + ] + } + }, + "query": "\n UPDATE prover_jobs_fri\n SET\n status = 'in_progress',\n attempts = attempts + 1,\n processing_started_at = NOW(),\n updated_at = NOW(),\n picked_by = $4\n WHERE\n id = (\n SELECT\n pj.id\n FROM\n (\n SELECT\n *\n FROM\n UNNEST($1::SMALLINT[], $2::SMALLINT[])\n ) AS tuple (circuit_id, ROUND)\n JOIN LATERAL (\n SELECT\n *\n FROM\n prover_jobs_fri AS pj\n WHERE\n pj.status = 'queued'\n AND pj.protocol_version = ANY ($3)\n AND pj.circuit_id = tuple.circuit_id\n AND pj.aggregation_round = tuple.round\n ORDER BY\n pj.l1_batch_number ASC,\n pj.id ASC\n LIMIT\n 1\n ) AS pj ON TRUE\n ORDER BY\n pj.l1_batch_number ASC,\n pj.aggregation_round DESC,\n pj.id ASC\n LIMIT\n 1\n FOR UPDATE\n SKIP LOCKED\n )\n RETURNING\n prover_jobs_fri.id,\n prover_jobs_fri.l1_batch_number,\n prover_jobs_fri.circuit_id,\n prover_jobs_fri.aggregation_round,\n prover_jobs_fri.sequence_number,\n prover_jobs_fri.depth,\n prover_jobs_fri.is_node_final_proof\n " + }, + "e9ca863d6e77edd39a9fc55700a6686e655206601854799139c22c017a214744": { + "describe": { + "columns": [], + "nullable": [], + "parameters": { + "Left": [ + "Int8", + "Int2", + "Int4", + "Text", + "Int4", + "Int4" + ] + } + }, + "query": "\n INSERT INTO\n node_aggregation_witness_jobs_fri (\n l1_batch_number,\n circuit_id,\n depth,\n aggregations_url,\n number_of_dependent_jobs,\n protocol_version,\n status,\n created_at,\n updated_at\n )\n VALUES\n ($1, $2, $3, $4, $5, $6, 'waiting_for_proofs', NOW(), NOW())\n ON CONFLICT (l1_batch_number, circuit_id, depth) DO\n UPDATE\n SET\n updated_at = NOW()\n " + }, + "ea904aa930d602d33b6fbc1bf1178a8a0ec739f4ddec8ffeb3a87253aeb18d30": { + "describe": { + "columns": [], + "nullable": [], "parameters": { "Left": [ "Int8" ] } }, - "query": "\n SELECT\n number,\n timestamp,\n is_finished,\n l1_tx_count,\n l2_tx_count,\n fee_account_address,\n bloom,\n priority_ops_onchain_data,\n hash,\n parent_hash,\n commitment,\n compressed_write_logs,\n compressed_contracts,\n eth_prove_tx_id,\n eth_commit_tx_id,\n eth_execute_tx_id,\n merkle_root_hash,\n l2_to_l1_logs,\n l2_to_l1_messages,\n used_contract_hashes,\n compressed_initial_writes,\n compressed_repeated_writes,\n l2_l1_compressed_messages,\n l2_l1_merkle_root,\n l1_gas_price,\n l2_fair_gas_price,\n rollup_last_leaf_index,\n zkporter_is_available,\n bootloader_code_hash,\n default_aa_code_hash,\n base_fee_per_gas,\n aux_data_hash,\n pass_through_data_hash,\n meta_parameters_hash,\n protocol_version,\n compressed_state_diffs,\n system_logs,\n events_queue_commitment,\n bootloader_initial_content_commitment\n FROM\n l1_batches\n LEFT JOIN commitments ON commitments.l1_batch_number = l1_batches.number\n WHERE\n eth_prove_tx_id IS NOT NULL\n AND eth_execute_tx_id IS NULL\n ORDER BY\n number\n LIMIT\n $1\n " + "query": "\n DELETE FROM miniblocks\n WHERE\n number > $1\n " }, - "eebfc56a12abe6ac2219a239c8138c83e59b73003c832a418b55433f469392bc": { + "ec04b89218111a5dc8d5ade506ac3465e2211ef3013386feb12d4cc04e0eade9": { "describe": { "columns": [ { - "name": "number", + "name": "id", "ordinal": 0, "type_info": "Int8" }, { - "name": "timestamp", + "name": "l1_batch_number", "ordinal": 1, "type_info": "Int8" }, { - "name": "is_finished", + "name": "circuit_id", "ordinal": 2, - "type_info": "Bool" + "type_info": "Int2" }, { - "name": "l1_tx_count", + "name": "aggregation_round", "ordinal": 3, - "type_info": "Int4" + "type_info": "Int2" }, { - "name": "l2_tx_count", + "name": "sequence_number", "ordinal": 4, "type_info": "Int4" }, { - "name": "fee_account_address", + "name": "depth", "ordinal": 5, - "type_info": "Bytea" - }, - { - "name": "bloom", - "ordinal": 6, - "type_info": "Bytea" - }, - { - "name": "priority_ops_onchain_data", - "ordinal": 7, - "type_info": "ByteaArray" - }, - { - "name": "hash", - "ordinal": 8, - "type_info": "Bytea" - }, - { - "name": "parent_hash", - "ordinal": 9, - "type_info": "Bytea" - }, - { - "name": "commitment", - "ordinal": 10, - "type_info": "Bytea" - }, - { - "name": "compressed_write_logs", - "ordinal": 11, - "type_info": "Bytea" - }, - { - "name": "compressed_contracts", - "ordinal": 12, - "type_info": "Bytea" - }, - { - "name": "eth_prove_tx_id", - "ordinal": 13, - "type_info": "Int4" - }, - { - "name": "eth_commit_tx_id", - "ordinal": 14, "type_info": "Int4" }, { - "name": "eth_execute_tx_id", - "ordinal": 15, - "type_info": "Int4" - }, - { - "name": "merkle_root_hash", - "ordinal": 16, - "type_info": "Bytea" - }, - { - "name": "l2_to_l1_logs", - "ordinal": 17, - "type_info": "ByteaArray" - }, - { - "name": "l2_to_l1_messages", - "ordinal": 18, - "type_info": "ByteaArray" - }, - { - "name": "used_contract_hashes", - "ordinal": 19, - "type_info": "Jsonb" - }, + "name": "is_node_final_proof", + "ordinal": 6, + "type_info": "Bool" + } + ], + "nullable": [ + false, + false, + false, + false, + false, + false, + false + ], + "parameters": { + "Left": [ + "Time", + "Text", + "Int8" + ] + } + }, + "query": "\n UPDATE prover_jobs_fri\n SET\n status = 'successful',\n updated_at = NOW(),\n time_taken = $1,\n proof_blob_url = $2\n WHERE\n id = $3\n RETURNING\n prover_jobs_fri.id,\n prover_jobs_fri.l1_batch_number,\n prover_jobs_fri.circuit_id,\n prover_jobs_fri.aggregation_round,\n prover_jobs_fri.sequence_number,\n prover_jobs_fri.depth,\n prover_jobs_fri.is_node_final_proof\n " + }, + "edc61e1285bf6d3837acc67af4f15aaade450980719933089824eb8c494d64a4": { + "describe": { + "columns": [], + "nullable": [], + "parameters": { + "Left": [ + "Time", + "Int8" + ] + } + }, + "query": "\n UPDATE witness_inputs_fri\n SET\n status = 'successful',\n updated_at = NOW(),\n time_taken = $1\n WHERE\n l1_batch_number = $2\n " + }, + "ee17d2b3edfe705d14811e3938d4312b2b780563a9fde48bae5e51650475670f": { + "describe": { + "columns": [ { - "name": "compressed_initial_writes", - "ordinal": 20, - "type_info": "Bytea" + "name": "id", + "ordinal": 0, + "type_info": "Int4" }, { - "name": "compressed_repeated_writes", - "ordinal": 21, - "type_info": "Bytea" + "name": "eth_tx_id", + "ordinal": 1, + "type_info": "Int4" }, { - "name": "l2_l1_compressed_messages", - "ordinal": 22, - "type_info": "Bytea" + "name": "tx_hash", + "ordinal": 2, + "type_info": "Text" }, { - "name": "l2_l1_merkle_root", - "ordinal": 23, - "type_info": "Bytea" + "name": "created_at", + "ordinal": 3, + "type_info": "Timestamp" }, { - "name": "l1_gas_price", - "ordinal": 24, - "type_info": "Int8" + "name": "updated_at", + "ordinal": 4, + "type_info": "Timestamp" }, { - "name": "l2_fair_gas_price", - "ordinal": 25, + "name": "base_fee_per_gas", + "ordinal": 5, "type_info": "Int8" }, { - "name": "rollup_last_leaf_index", - "ordinal": 26, + "name": "priority_fee_per_gas", + "ordinal": 6, "type_info": "Int8" }, { - "name": "zkporter_is_available", - "ordinal": 27, - "type_info": "Bool" - }, - { - "name": "bootloader_code_hash", - "ordinal": 28, - "type_info": "Bytea" - }, - { - "name": "default_aa_code_hash", - "ordinal": 29, - "type_info": "Bytea" - }, - { - "name": "base_fee_per_gas", - "ordinal": 30, - "type_info": "Numeric" - }, - { - "name": "aux_data_hash", - "ordinal": 31, - "type_info": "Bytea" - }, - { - "name": "pass_through_data_hash", - "ordinal": 32, - "type_info": "Bytea" - }, - { - "name": "meta_parameters_hash", - "ordinal": 33, - "type_info": "Bytea" - }, - { - "name": "system_logs", - "ordinal": 34, - "type_info": "ByteaArray" + "name": "confirmed_at", + "ordinal": 7, + "type_info": "Timestamp" }, { - "name": "compressed_state_diffs", - "ordinal": 35, + "name": "signed_raw_tx", + "ordinal": 8, "type_info": "Bytea" }, { - "name": "protocol_version", - "ordinal": 36, + "name": "sent_at_block", + "ordinal": 9, "type_info": "Int4" }, { - "name": "events_queue_commitment", - "ordinal": 37, - "type_info": "Bytea" - }, - { - "name": "bootloader_initial_content_commitment", - "ordinal": 38, - "type_info": "Bytea" + "name": "sent_at", + "ordinal": 10, + "type_info": "Timestamp" } ], "nullable": [ @@ -11438,34 +11662,6 @@ false, false, false, - false, - true, - true, - true, - true, - true, - true, - true, - true, - true, - false, - false, - false, - true, - true, - true, - true, - false, - false, - true, - true, - true, - true, - false, - true, - true, - true, - false, true, true, true, @@ -11473,12 +11669,11 @@ ], "parameters": { "Left": [ - "Int8", - "Int8" + "Int4" ] } }, - "query": "\n SELECT\n number,\n timestamp,\n is_finished,\n l1_tx_count,\n l2_tx_count,\n fee_account_address,\n bloom,\n priority_ops_onchain_data,\n hash,\n parent_hash,\n commitment,\n compressed_write_logs,\n compressed_contracts,\n eth_prove_tx_id,\n eth_commit_tx_id,\n eth_execute_tx_id,\n merkle_root_hash,\n l2_to_l1_logs,\n l2_to_l1_messages,\n used_contract_hashes,\n compressed_initial_writes,\n compressed_repeated_writes,\n l2_l1_compressed_messages,\n l2_l1_merkle_root,\n l1_gas_price,\n l2_fair_gas_price,\n rollup_last_leaf_index,\n zkporter_is_available,\n bootloader_code_hash,\n default_aa_code_hash,\n base_fee_per_gas,\n aux_data_hash,\n pass_through_data_hash,\n meta_parameters_hash,\n system_logs,\n compressed_state_diffs,\n protocol_version,\n events_queue_commitment,\n bootloader_initial_content_commitment\n FROM\n (\n SELECT\n l1_batches.*,\n ROW_NUMBER() OVER (\n ORDER BY\n number ASC\n ) AS ROW_NUMBER\n FROM\n l1_batches\n WHERE\n eth_commit_tx_id IS NOT NULL\n AND l1_batches.skip_proof = TRUE\n AND l1_batches.number > $1\n ORDER BY\n number\n LIMIT\n $2\n ) inn\n LEFT JOIN commitments ON commitments.l1_batch_number = inn.number\n WHERE\n number - ROW_NUMBER = $1\n " + "query": "\n SELECT\n *\n FROM\n eth_txs_history\n WHERE\n eth_tx_id = $1\n ORDER BY\n created_at DESC\n LIMIT\n 1\n " }, "ef331469f78c6ff68a254a15b55d056cc9bae25bc070c5de8424f88fab20e5ea": { "describe": { @@ -11941,134 +12136,6 @@ }, "query": "\n UPDATE proof_compression_jobs_fri\n SET\n status = $1,\n attempts = attempts + 1,\n updated_at = NOW(),\n processing_started_at = NOW(),\n picked_by = $3\n WHERE\n l1_batch_number = (\n SELECT\n l1_batch_number\n FROM\n proof_compression_jobs_fri\n WHERE\n status = $2\n ORDER BY\n l1_batch_number ASC\n LIMIT\n 1\n FOR UPDATE\n SKIP LOCKED\n )\n RETURNING\n proof_compression_jobs_fri.l1_batch_number\n " }, - "f89d5b65ce2c1a82acec40776bc9bab706512f234c0bb50be89b33cc85b66d41": { - "describe": { - "columns": [ - { - "name": "number", - "ordinal": 0, - "type_info": "Int8" - }, - { - "name": "l1_tx_count", - "ordinal": 1, - "type_info": "Int4" - }, - { - "name": "l2_tx_count", - "ordinal": 2, - "type_info": "Int4" - }, - { - "name": "timestamp", - "ordinal": 3, - "type_info": "Int8" - }, - { - "name": "is_finished", - "ordinal": 4, - "type_info": "Bool" - }, - { - "name": "fee_account_address", - "ordinal": 5, - "type_info": "Bytea" - }, - { - "name": "l2_to_l1_logs", - "ordinal": 6, - "type_info": "ByteaArray" - }, - { - "name": "l2_to_l1_messages", - "ordinal": 7, - "type_info": "ByteaArray" - }, - { - "name": "bloom", - "ordinal": 8, - "type_info": "Bytea" - }, - { - "name": "priority_ops_onchain_data", - "ordinal": 9, - "type_info": "ByteaArray" - }, - { - "name": "used_contract_hashes", - "ordinal": 10, - "type_info": "Jsonb" - }, - { - "name": "base_fee_per_gas", - "ordinal": 11, - "type_info": "Numeric" - }, - { - "name": "l1_gas_price", - "ordinal": 12, - "type_info": "Int8" - }, - { - "name": "l2_fair_gas_price", - "ordinal": 13, - "type_info": "Int8" - }, - { - "name": "bootloader_code_hash", - "ordinal": 14, - "type_info": "Bytea" - }, - { - "name": "default_aa_code_hash", - "ordinal": 15, - "type_info": "Bytea" - }, - { - "name": "protocol_version", - "ordinal": 16, - "type_info": "Int4" - }, - { - "name": "system_logs", - "ordinal": 17, - "type_info": "ByteaArray" - }, - { - "name": "compressed_state_diffs", - "ordinal": 18, - "type_info": "Bytea" - } - ], - "nullable": [ - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - false, - true, - true, - true, - false, - true - ], - "parameters": { - "Left": [ - "Int4" - ] - } - }, - "query": "\n SELECT\n number,\n l1_tx_count,\n l2_tx_count,\n timestamp,\n is_finished,\n fee_account_address,\n l2_to_l1_logs,\n l2_to_l1_messages,\n bloom,\n priority_ops_onchain_data,\n used_contract_hashes,\n base_fee_per_gas,\n l1_gas_price,\n l2_fair_gas_price,\n bootloader_code_hash,\n default_aa_code_hash,\n protocol_version,\n system_logs,\n compressed_state_diffs\n FROM\n l1_batches\n WHERE\n eth_commit_tx_id = $1\n OR eth_prove_tx_id = $1\n OR eth_execute_tx_id = $1\n " - }, "f91790ae5cc4b087bf942ba52dd63a1e89945f8d5e0f4da42ecf6313c4f5967e": { "describe": { "columns": [ diff --git a/core/lib/dal/src/blocks_dal.rs b/core/lib/dal/src/blocks_dal.rs index 322219deaac..ba3c314a135 100644 --- a/core/lib/dal/src/blocks_dal.rs +++ b/core/lib/dal/src/blocks_dal.rs @@ -170,7 +170,8 @@ impl BlocksDal<'_, '_> { default_aa_code_hash, protocol_version, system_logs, - compressed_state_diffs + compressed_state_diffs, + pubdata_input FROM l1_batches WHERE @@ -234,7 +235,8 @@ impl BlocksDal<'_, '_> { system_logs, compressed_state_diffs, events_queue_commitment, - bootloader_initial_content_commitment + bootloader_initial_content_commitment, + pubdata_input FROM l1_batches LEFT JOIN commitments ON commitments.l1_batch_number = l1_batches.number @@ -275,7 +277,8 @@ impl BlocksDal<'_, '_> { default_aa_code_hash, protocol_version, compressed_state_diffs, - system_logs + system_logs, + pubdata_input FROM l1_batches WHERE @@ -465,6 +468,7 @@ impl BlocksDal<'_, '_> { .iter() .map(|log| log.0.to_bytes().to_vec()) .collect::>>(); + let pubdata_input = header.pubdata_input.clone(); // Serialization should always succeed. let initial_bootloader_contents = serde_json::to_value(initial_bootloader_contents) @@ -506,6 +510,7 @@ impl BlocksDal<'_, '_> { protocol_version, system_logs, storage_refunds, + pubdata_input, created_at, updated_at ) @@ -534,6 +539,7 @@ impl BlocksDal<'_, '_> { $21, $22, $23, + $24, NOW(), NOW() ) @@ -561,6 +567,7 @@ impl BlocksDal<'_, '_> { header.protocol_version.map(|v| v as i32), &system_logs, &storage_refunds, + pubdata_input, ) .execute(transaction.conn()) .await?; @@ -1036,7 +1043,8 @@ impl BlocksDal<'_, '_> { compressed_state_diffs, system_logs, events_queue_commitment, - bootloader_initial_content_commitment + bootloader_initial_content_commitment, + pubdata_input FROM l1_batches LEFT JOIN commitments ON commitments.l1_batch_number = l1_batches.number @@ -1221,7 +1229,8 @@ impl BlocksDal<'_, '_> { compressed_state_diffs, system_logs, events_queue_commitment, - bootloader_initial_content_commitment + bootloader_initial_content_commitment, + pubdata_input FROM l1_batches LEFT JOIN commitments ON commitments.l1_batch_number = l1_batches.number @@ -1333,7 +1342,8 @@ impl BlocksDal<'_, '_> { compressed_state_diffs, protocol_version, events_queue_commitment, - bootloader_initial_content_commitment + bootloader_initial_content_commitment, + pubdata_input FROM ( SELECT @@ -1419,7 +1429,8 @@ impl BlocksDal<'_, '_> { compressed_state_diffs, system_logs, events_queue_commitment, - bootloader_initial_content_commitment + bootloader_initial_content_commitment, + pubdata_input FROM l1_batches LEFT JOIN commitments ON commitments.l1_batch_number = l1_batches.number @@ -1557,7 +1568,8 @@ impl BlocksDal<'_, '_> { compressed_state_diffs, system_logs, events_queue_commitment, - bootloader_initial_content_commitment + bootloader_initial_content_commitment, + pubdata_input FROM l1_batches LEFT JOIN commitments ON commitments.l1_batch_number = l1_batches.number @@ -1634,7 +1646,8 @@ impl BlocksDal<'_, '_> { compressed_state_diffs, system_logs, events_queue_commitment, - bootloader_initial_content_commitment + bootloader_initial_content_commitment, + pubdata_input FROM l1_batches LEFT JOIN commitments ON commitments.l1_batch_number = l1_batches.number @@ -1721,7 +1734,8 @@ impl BlocksDal<'_, '_> { compressed_state_diffs, system_logs, events_queue_commitment, - bootloader_initial_content_commitment + bootloader_initial_content_commitment, + pubdata_input FROM l1_batches LEFT JOIN commitments ON commitments.l1_batch_number = l1_batches.number @@ -1832,7 +1846,8 @@ impl BlocksDal<'_, '_> { default_aa_code_hash, protocol_version, compressed_state_diffs, - system_logs + system_logs, + pubdata_input FROM l1_batches ORDER BY diff --git a/core/lib/dal/src/models/storage_block.rs b/core/lib/dal/src/models/storage_block.rs index 6cc58c78b09..c48e3d8c710 100644 --- a/core/lib/dal/src/models/storage_block.rs +++ b/core/lib/dal/src/models/storage_block.rs @@ -50,6 +50,7 @@ pub struct StorageL1BatchHeader { // will be exactly 7 (or 8 in the event of a protocol upgrade) system logs. pub system_logs: Vec>, pub compressed_state_diffs: Option>, + pub pubdata_input: Option>, } impl From for L1BatchHeader { @@ -91,6 +92,7 @@ impl From for L1BatchHeader { protocol_version: l1_batch .protocol_version .map(|v| (v as u16).try_into().unwrap()), + pubdata_input: l1_batch.pubdata_input, } } } @@ -169,6 +171,7 @@ pub struct StorageL1Batch { pub events_queue_commitment: Option>, pub bootloader_initial_content_commitment: Option>, + pub pubdata_input: Option>, } impl From for L1BatchHeader { @@ -210,6 +213,7 @@ impl From for L1BatchHeader { protocol_version: l1_batch .protocol_version .map(|v| (v as u16).try_into().unwrap()), + pubdata_input: l1_batch.pubdata_input, } } } diff --git a/core/lib/multivm/src/glue/types/vm/vm_block_result.rs b/core/lib/multivm/src/glue/types/vm/vm_block_result.rs index e63ab376bad..623d3d735d1 100644 --- a/core/lib/multivm/src/glue/types/vm/vm_block_result.rs +++ b/core/lib/multivm/src/glue/types/vm/vm_block_result.rs @@ -46,6 +46,7 @@ impl GlueFrom for crate::interface::Fi storage_refunds: Vec::new(), }, final_bootloader_memory: None, + pubdata_input: None, } } } @@ -83,6 +84,7 @@ impl GlueFrom for crate::interface::Fi storage_refunds: Vec::new(), }, final_bootloader_memory: None, + pubdata_input: None, } } } @@ -126,6 +128,7 @@ impl GlueFrom for crate::interface: storage_refunds: Vec::new(), }, final_bootloader_memory: None, + pubdata_input: None, } } } diff --git a/core/lib/multivm/src/interface/traits/vm.rs b/core/lib/multivm/src/interface/traits/vm.rs index 0dbacc9d1d9..cfee13d2031 100644 --- a/core/lib/multivm/src/interface/traits/vm.rs +++ b/core/lib/multivm/src/interface/traits/vm.rs @@ -133,6 +133,7 @@ pub trait VmInterface { block_tip_execution_result: result, final_execution_state: execution_state, final_bootloader_memory: Some(bootloader_memory), + pubdata_input: None, } } } diff --git a/core/lib/multivm/src/interface/types/outputs/finished_l1batch.rs b/core/lib/multivm/src/interface/types/outputs/finished_l1batch.rs index c2d98049ec6..1418ce6adc3 100644 --- a/core/lib/multivm/src/interface/types/outputs/finished_l1batch.rs +++ b/core/lib/multivm/src/interface/types/outputs/finished_l1batch.rs @@ -9,4 +9,5 @@ pub struct FinishedL1Batch { pub final_execution_state: CurrentExecutionState, /// Memory of the bootloader with all executed transactions. Could be optional for old versions of the VM. pub final_bootloader_memory: Option, + pub pubdata_input: Option>, } diff --git a/core/lib/multivm/src/versions/vm_latest/bootloader_state/state.rs b/core/lib/multivm/src/versions/vm_latest/bootloader_state/state.rs index 14e693a1d2e..d914aacab17 100644 --- a/core/lib/multivm/src/versions/vm_latest/bootloader_state/state.rs +++ b/core/lib/multivm/src/versions/vm_latest/bootloader_state/state.rs @@ -14,7 +14,7 @@ use crate::{ utils::{apply_l2_block, apply_tx_to_memory}, }, constants::TX_DESCRIPTION_OFFSET, - types::internals::{pubdata::PubdataInput, TransactionData}, + types::internals::{PubdataInput, TransactionData}, utils::l2_blocks::assert_next_block, }, }; @@ -136,6 +136,11 @@ impl BootloaderState { pub(crate) fn last_l2_block(&self) -> &BootloaderL2Block { self.l2_blocks.last().unwrap() } + pub(crate) fn get_pubdata_information(&self) -> &PubdataInput { + self.pubdata_information + .get() + .expect("Pubdata information is not set") + } fn last_mut_l2_block(&mut self) -> &mut BootloaderL2Block { self.l2_blocks.last_mut().unwrap() diff --git a/core/lib/multivm/src/versions/vm_latest/bootloader_state/utils.rs b/core/lib/multivm/src/versions/vm_latest/bootloader_state/utils.rs index 16776be444e..93ec255e774 100644 --- a/core/lib/multivm/src/versions/vm_latest/bootloader_state/utils.rs +++ b/core/lib/multivm/src/versions/vm_latest/bootloader_state/utils.rs @@ -1,4 +1,4 @@ -use zksync_types::U256; +use zksync_types::{ethabi, U256}; use zksync_utils::{bytecode::CompressedBytecodeInfo, bytes_to_be_words, h256_to_u256}; use super::tx::BootloaderTx; @@ -13,7 +13,7 @@ use crate::{ TX_DESCRIPTION_OFFSET, TX_OPERATOR_L2_BLOCK_INFO_OFFSET, TX_OPERATOR_SLOTS_PER_L2_BLOCK_INFO, TX_OVERHEAD_OFFSET, TX_TRUSTED_GAS_LIMIT_OFFSET, }, - types::internals::pubdata::PubdataInput, + types::internals::PubdataInput, }, }; @@ -124,7 +124,12 @@ pub(crate) fn apply_pubdata_to_memory( // - The other slot is for the 0x20 offset for the calldata. let l1_messenger_pubdata_start_slot = OPERATOR_PROVIDED_L1_MESSENGER_PUBDATA_OFFSET + 2; - let pubdata = pubdata_information.build_pubdata(); + // Need to skip first word as it represents array offset + // while bootloader expects only [len || data] + let pubdata = ethabi::encode(&[ethabi::Token::Bytes( + pubdata_information.build_pubdata(true), + )])[32..] + .to_vec(); assert!( pubdata.len() / 32 <= OPERATOR_PROVIDED_L1_MESSENGER_PUBDATA_SLOTS - 2, diff --git a/core/lib/multivm/src/versions/vm_latest/tracers/pubdata_tracer.rs b/core/lib/multivm/src/versions/vm_latest/tracers/pubdata_tracer.rs index 388b5ef209e..5773e3797e2 100644 --- a/core/lib/multivm/src/versions/vm_latest/tracers/pubdata_tracer.rs +++ b/core/lib/multivm/src/versions/vm_latest/tracers/pubdata_tracer.rs @@ -28,7 +28,7 @@ use crate::{ constants::BOOTLOADER_HEAP_PAGE, old_vm::{history_recorder::HistoryMode, memory::SimpleMemory}, tracers::{traits::VmTracer, utils::VmHook}, - types::internals::{pubdata::PubdataInput, ZkSyncVmState}, + types::internals::{PubdataInput, ZkSyncVmState}, utils::logs::collect_events_and_l1_system_logs_after_timestamp, StorageOracle, }, diff --git a/core/lib/multivm/src/versions/vm_latest/types/internals/mod.rs b/core/lib/multivm/src/versions/vm_latest/types/internals/mod.rs index c189de7266d..7dc60ec5b0f 100644 --- a/core/lib/multivm/src/versions/vm_latest/types/internals/mod.rs +++ b/core/lib/multivm/src/versions/vm_latest/types/internals/mod.rs @@ -1,8 +1,9 @@ +pub(crate) use pubdata::PubdataInput; pub(crate) use snapshot::VmSnapshot; pub(crate) use transaction_data::TransactionData; pub(crate) use vm_state::new_vm_state; -pub(crate) mod pubdata; pub use vm_state::ZkSyncVmState; +mod pubdata; mod snapshot; mod transaction_data; mod vm_state; diff --git a/core/lib/multivm/src/versions/vm_latest/types/internals/pubdata.rs b/core/lib/multivm/src/versions/vm_latest/types/internals/pubdata.rs index fd00b333c72..aa9e8a7eda7 100644 --- a/core/lib/multivm/src/versions/vm_latest/types/internals/pubdata.rs +++ b/core/lib/multivm/src/versions/vm_latest/types/internals/pubdata.rs @@ -1,5 +1,4 @@ use zksync_types::{ - ethabi, event::L1MessengerL2ToL1Log, writes::{compress_state_diffs, StateDiffRecord}, }; @@ -14,7 +13,7 @@ pub(crate) struct PubdataInput { } impl PubdataInput { - pub(crate) fn build_pubdata(self) -> Vec { + pub(crate) fn build_pubdata(self, with_uncompressed_state_diffs: bool) -> Vec { let mut l1_messenger_pubdata = vec![]; let PubdataInput { @@ -51,24 +50,15 @@ impl PubdataInput { // Format: [size of compressed state diffs u32 || compressed state diffs || (# state diffs: intial + repeated) as u32 || sorted state diffs by ] let state_diffs_compressed = compress_state_diffs(state_diffs.clone()); l1_messenger_pubdata.extend(state_diffs_compressed); - l1_messenger_pubdata.extend((state_diffs.len() as u32).to_be_bytes()); - for state_diff in state_diffs { - l1_messenger_pubdata.extend(state_diff.encode_padded()); + if with_uncompressed_state_diffs { + l1_messenger_pubdata.extend((state_diffs.len() as u32).to_be_bytes()); + for state_diff in state_diffs { + l1_messenger_pubdata.extend(state_diff.encode_padded()); + } } - // ABI-encoding the final pubdata - let l1_messenger_abi_encoded_pubdata = - ethabi::encode(&[ethabi::Token::Bytes(l1_messenger_pubdata)]); - - assert!( - l1_messenger_abi_encoded_pubdata.len() % 32 == 0, - "abi encoded bytes array length should be divisible by 32" - ); - - // Need to skip first word as it represents array offset - // while bootloader expects only [len || data] - l1_messenger_abi_encoded_pubdata[32..].to_vec() + l1_messenger_pubdata } } @@ -126,7 +116,8 @@ mod tests { state_diffs, }; - let pubdata = input.build_pubdata(); + let pubdata = + ethabi::encode(&[ethabi::Token::Bytes(input.build_pubdata(true))])[32..].to_vec(); assert_eq!(hex::encode(pubdata), "00000000000000000000000000000000000000000000000000000000000002c700000001000000000000000000000000000000000000000000008001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000800000000100000004deadbeef0000000100000004aaaabbbb0100002a040001000000000000000000000000000000000000000000000000000000000000007e090e0000000c0901000000020000000000000000000000000000000000008002000000000000000000000000000000000000000000000000000000000000009b000000000000000000000000000000000000000000000000000000000000007d000000000000000c000000000000000000000000000000000000000000000000000000000000000b000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008002000000000000000000000000000000000000000000000000000000000000009c000000000000000000000000000000000000000000000000000000000000007e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"); } diff --git a/core/lib/multivm/src/versions/vm_latest/vm.rs b/core/lib/multivm/src/versions/vm_latest/vm.rs index 159f50a89ee..73d551942bf 100644 --- a/core/lib/multivm/src/versions/vm_latest/vm.rs +++ b/core/lib/multivm/src/versions/vm_latest/vm.rs @@ -8,8 +8,8 @@ use zksync_utils::bytecode::CompressedBytecodeInfo; use crate::{ interface::{ - BootloaderMemory, BytecodeCompressionError, CurrentExecutionState, L1BatchEnv, L2BlockEnv, - SystemEnv, VmExecutionMode, VmExecutionResultAndLogs, VmInterface, + BootloaderMemory, BytecodeCompressionError, CurrentExecutionState, FinishedL1Batch, + L1BatchEnv, L2BlockEnv, SystemEnv, VmExecutionMode, VmExecutionResultAndLogs, VmInterface, VmInterfaceHistoryEnabled, VmMemoryMetrics, }, vm_latest::{ @@ -140,6 +140,23 @@ impl VmInterface for Vm { fn record_vm_memory_metrics(&self) -> VmMemoryMetrics { self.record_vm_memory_metrics_inner() } + + fn finish_batch(&mut self) -> FinishedL1Batch { + let result = self.execute(VmExecutionMode::Batch); + let execution_state = self.get_current_execution_state(); + let bootloader_memory = self.get_bootloader_memory(); + FinishedL1Batch { + block_tip_execution_result: result, + final_execution_state: execution_state, + final_bootloader_memory: Some(bootloader_memory), + pubdata_input: Some( + self.bootloader_state + .get_pubdata_information() + .clone() + .build_pubdata(false), + ), + } + } } /// Methods of vm, which required some history manipulations diff --git a/core/lib/types/src/block.rs b/core/lib/types/src/block.rs index 4935b853e4f..485f3419645 100644 --- a/core/lib/types/src/block.rs +++ b/core/lib/types/src/block.rs @@ -65,6 +65,7 @@ pub struct L1BatchHeader { pub system_logs: Vec, /// Version of protocol used for the L1 batch. pub protocol_version: Option, + pub pubdata_input: Option>, } /// Holder for the miniblock metadata that is not available from transactions themselves. @@ -121,6 +122,7 @@ impl L1BatchHeader { base_system_contracts_hashes, system_logs: vec![], protocol_version: Some(protocol_version), + pubdata_input: Some(vec![]), } } diff --git a/core/lib/types/src/commitment.rs b/core/lib/types/src/commitment.rs index a0e3039a59a..9336e099888 100644 --- a/core/lib/types/src/commitment.rs +++ b/core/lib/types/src/commitment.rs @@ -209,7 +209,7 @@ impl L1BatchWithMetadata { .to_vec(), ), Token::Bytes(self.metadata.l2_l1_messages_compressed.clone()), - Token::Bytes(self.construct_pubdata()), + Token::Bytes(self.header.pubdata_input.clone().unwrap()), ]) } } @@ -217,38 +217,6 @@ impl L1BatchWithMetadata { pub fn l1_commit_data_size(&self) -> usize { crate::ethabi::encode(&[Token::Array(vec![self.l1_commit_data()])]).len() } - - /// Packs all pubdata needed for batch commitment in boojum into one bytes array. The packing contains the - /// following: logs, messages, bytecodes, and compressed state diffs. - /// This data is currently part of calldata but will be submitted as part of the blob section post EIP-4844. - pub fn construct_pubdata(&self) -> Vec { - let mut res: Vec = vec![]; - - // Process and Pack Logs - res.extend((self.header.l2_to_l1_logs.len() as u32).to_be_bytes()); - for l2_to_l1_log in &self.header.l2_to_l1_logs { - res.extend(l2_to_l1_log.0.to_bytes()); - } - - // Process and Pack Msgs - res.extend((self.header.l2_to_l1_messages.len() as u32).to_be_bytes()); - for msg in &self.header.l2_to_l1_messages { - res.extend((msg.len() as u32).to_be_bytes()); - res.extend(msg); - } - - // Process and Pack Bytecodes - res.extend((self.factory_deps.len() as u32).to_be_bytes()); - for bytecode in &self.factory_deps { - res.extend((bytecode.len() as u32).to_be_bytes()); - res.extend(bytecode); - } - - // Extend with Compressed StateDiffs - res.extend(&self.metadata.state_diffs_compressed); - - res - } } impl SerializeCommitment for L2ToL1Log { diff --git a/core/lib/zksync_core/src/state_keeper/io/seal_logic.rs b/core/lib/zksync_core/src/state_keeper/io/seal_logic.rs index e152709cff5..15f10ce3ce7 100644 --- a/core/lib/zksync_core/src/state_keeper/io/seal_logic.rs +++ b/core/lib/zksync_core/src/state_keeper/io/seal_logic.rs @@ -134,6 +134,7 @@ impl UpdatesManager { base_system_contracts_hashes: self.base_system_contract_hashes(), protocol_version: Some(self.protocol_version()), system_logs: finished_batch.final_execution_state.system_logs, + pubdata_input: finished_batch.pubdata_input, }; let events_queue = finished_batch diff --git a/core/lib/zksync_core/src/state_keeper/tests/mod.rs b/core/lib/zksync_core/src/state_keeper/tests/mod.rs index 26458956af7..c725cdcf010 100644 --- a/core/lib/zksync_core/src/state_keeper/tests/mod.rs +++ b/core/lib/zksync_core/src/state_keeper/tests/mod.rs @@ -130,6 +130,7 @@ pub(super) fn default_vm_block_result() -> FinishedL1Batch { storage_refunds: Vec::new(), }, final_bootloader_memory: Some(vec![]), + pubdata_input: Some(vec![]), } } From 2cc3ed56d320c84613bc941c719d2a75979ba95e Mon Sep 17 00:00:00 2001 From: zksync-era-bot <147085853+zksync-era-bot@users.noreply.github.com> Date: Mon, 25 Dec 2023 15:19:58 +0100 Subject: [PATCH 08/23] chore(main): release core 18.10.2 (#761) :robot: I have created a release *beep* *boop* --- ## [18.10.2](https://github.com/matter-labs/zksync-era/compare/core-v18.10.1...core-v18.10.2) (2023-12-25) ### Bug Fixes * **vm:** Get pubdata bytes from vm ([#756](https://github.com/matter-labs/zksync-era/issues/756)) ([6c6f1ab](https://github.com/matter-labs/zksync-era/commit/6c6f1ab078485669002e50197b35ab1b6a38cdb9)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- .github/release-please/manifest.json | 2 +- core/CHANGELOG.md | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/release-please/manifest.json b/.github/release-please/manifest.json index 0e28ab83017..cbbd52b8100 100644 --- a/.github/release-please/manifest.json +++ b/.github/release-please/manifest.json @@ -1,5 +1,5 @@ { "sdk/zksync-rs": "0.4.0", - "core": "18.10.1", + "core": "18.10.2", "prover": "10.0.2" } diff --git a/core/CHANGELOG.md b/core/CHANGELOG.md index e6b8684e556..22e517a7a65 100644 --- a/core/CHANGELOG.md +++ b/core/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [18.10.2](https://github.com/matter-labs/zksync-era/compare/core-v18.10.1...core-v18.10.2) (2023-12-25) + + +### Bug Fixes + +* **vm:** Get pubdata bytes from vm ([#756](https://github.com/matter-labs/zksync-era/issues/756)) ([6c6f1ab](https://github.com/matter-labs/zksync-era/commit/6c6f1ab078485669002e50197b35ab1b6a38cdb9)) + ## [18.10.1](https://github.com/matter-labs/zksync-era/compare/core-v18.10.0...core-v18.10.1) (2023-12-25) From ec104ef01136d1a455f40163c2ced92dbc5917e2 Mon Sep 17 00:00:00 2001 From: Fedor Sakharov Date: Mon, 25 Dec 2023 17:21:25 +0100 Subject: [PATCH 09/23] fix(core): do not unwrap unexisting calldata in commitment and regenerate it (#762) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## What ❔ Solve panics on nonexistent calldata. ## Checklist - [ ] PR title corresponds to the body of PR (we generate changelog entries from PRs). - [ ] Tests for the changes have been added / updated. - [ ] Documentation comments have been added / updated. - [ ] Code has been formatted via `zk fmt` and `zk lint`. - [ ] Spellcheck has been run via `cargo spellcheck --cfg=./spellcheck/era.cfg --code 1`. --- core/lib/types/src/commitment.rs | 39 +++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/core/lib/types/src/commitment.rs b/core/lib/types/src/commitment.rs index 9336e099888..91503b7401c 100644 --- a/core/lib/types/src/commitment.rs +++ b/core/lib/types/src/commitment.rs @@ -209,7 +209,12 @@ impl L1BatchWithMetadata { .to_vec(), ), Token::Bytes(self.metadata.l2_l1_messages_compressed.clone()), - Token::Bytes(self.header.pubdata_input.clone().unwrap()), + Token::Bytes( + self.header + .pubdata_input + .clone() + .unwrap_or(self.construct_pubdata()), + ), ]) } } @@ -217,6 +222,38 @@ impl L1BatchWithMetadata { pub fn l1_commit_data_size(&self) -> usize { crate::ethabi::encode(&[Token::Array(vec![self.l1_commit_data()])]).len() } + + /// Packs all pubdata needed for batch commitment in boojum into one bytes array. The packing contains the + /// following: logs, messages, bytecodes, and compressed state diffs. + /// This data is currently part of calldata but will be submitted as part of the blob section post EIP-4844. + pub fn construct_pubdata(&self) -> Vec { + let mut res: Vec = vec![]; + + // Process and Pack Logs + res.extend((self.header.l2_to_l1_logs.len() as u32).to_be_bytes()); + for l2_to_l1_log in &self.header.l2_to_l1_logs { + res.extend(l2_to_l1_log.0.to_bytes()); + } + + // Process and Pack Msgs + res.extend((self.header.l2_to_l1_messages.len() as u32).to_be_bytes()); + for msg in &self.header.l2_to_l1_messages { + res.extend((msg.len() as u32).to_be_bytes()); + res.extend(msg); + } + + // Process and Pack Bytecodes + res.extend((self.factory_deps.len() as u32).to_be_bytes()); + for bytecode in &self.factory_deps { + res.extend((bytecode.len() as u32).to_be_bytes()); + res.extend(bytecode); + } + + // Extend with Compressed StateDiffs + res.extend(&self.metadata.state_diffs_compressed); + + res + } } impl SerializeCommitment for L2ToL1Log { From 46ab40b819d291733e6a5d12d19fe8bffe59ce8b Mon Sep 17 00:00:00 2001 From: zksync-era-bot <147085853+zksync-era-bot@users.noreply.github.com> Date: Mon, 25 Dec 2023 18:26:37 +0100 Subject: [PATCH 10/23] chore(main): release core 18.10.3 (#763) :robot: I have created a release *beep* *boop* --- ## [18.10.3](https://github.com/matter-labs/zksync-era/compare/core-v18.10.2...core-v18.10.3) (2023-12-25) ### Bug Fixes * **core:** do not unwrap unexisting calldata in commitment and regenerate it ([#762](https://github.com/matter-labs/zksync-era/issues/762)) ([ec104ef](https://github.com/matter-labs/zksync-era/commit/ec104ef01136d1a455f40163c2ced92dbc5917e2)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- .github/release-please/manifest.json | 2 +- core/CHANGELOG.md | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/release-please/manifest.json b/.github/release-please/manifest.json index cbbd52b8100..900269b34d3 100644 --- a/.github/release-please/manifest.json +++ b/.github/release-please/manifest.json @@ -1,5 +1,5 @@ { "sdk/zksync-rs": "0.4.0", - "core": "18.10.2", + "core": "18.10.3", "prover": "10.0.2" } diff --git a/core/CHANGELOG.md b/core/CHANGELOG.md index 22e517a7a65..131c069e9f7 100644 --- a/core/CHANGELOG.md +++ b/core/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [18.10.3](https://github.com/matter-labs/zksync-era/compare/core-v18.10.2...core-v18.10.3) (2023-12-25) + + +### Bug Fixes + +* **core:** do not unwrap unexisting calldata in commitment and regenerate it ([#762](https://github.com/matter-labs/zksync-era/issues/762)) ([ec104ef](https://github.com/matter-labs/zksync-era/commit/ec104ef01136d1a455f40163c2ced92dbc5917e2)) + ## [18.10.2](https://github.com/matter-labs/zksync-era/compare/core-v18.10.1...core-v18.10.2) (2023-12-25) From 6e7ed124e816f5ba1d2ba3e8efaf281cd2c055dd Mon Sep 17 00:00:00 2001 From: Roman Brodetski Date: Mon, 25 Dec 2023 21:00:03 +0000 Subject: [PATCH 11/23] feat: Revert "feat: Remove zks_getConfirmedTokens method" (#765) Reverts matter-labs/zksync-era#719 --- core/lib/dal/sqlx-data.json | 42 +++++++++++++++++++ core/lib/dal/src/tokens_web3_dal.rs | 39 ++++++++++++++++- core/lib/web3_decl/src/namespaces/zks.rs | 4 ++ core/lib/web3_decl/src/types.rs | 11 +++++ .../web3/backend_jsonrpsee/namespaces/zks.rs | 7 ++++ .../src/api_server/web3/namespaces/zks.rs | 37 +++++++++++++++- .../ts-integration/tests/api/web3.test.ts | 8 ++++ 7 files changed, 146 insertions(+), 2 deletions(-) diff --git a/core/lib/dal/sqlx-data.json b/core/lib/dal/sqlx-data.json index 68c1731fd0f..ee6b28a54ef 100644 --- a/core/lib/dal/sqlx-data.json +++ b/core/lib/dal/sqlx-data.json @@ -8671,6 +8671,48 @@ }, "query": "\n UPDATE prover_jobs_fri\n SET\n status = 'sent_to_server',\n updated_at = NOW()\n WHERE\n l1_batch_number = $1\n " }, + "af74cb82724bdf9fa4f716cf2ee07a011c3ad3f13a2ed37c4bcce515786fc867": { + "describe": { + "columns": [ + { + "name": "l1_address", + "ordinal": 0, + "type_info": "Bytea" + }, + { + "name": "l2_address", + "ordinal": 1, + "type_info": "Bytea" + }, + { + "name": "name", + "ordinal": 2, + "type_info": "Varchar" + }, + { + "name": "symbol", + "ordinal": 3, + "type_info": "Varchar" + }, + { + "name": "decimals", + "ordinal": 4, + "type_info": "Int4" + } + ], + "nullable": [ + false, + false, + false, + false, + false + ], + "parameters": { + "Left": [] + } + }, + "query": "\n SELECT\n l1_address,\n l2_address,\n NAME,\n symbol,\n decimals\n FROM\n tokens\n ORDER BY\n symbol\n " + }, "afc24bd1407dba82cd3dc9e7ee71ac4ab2d73bda6022700aeb0a630a2563a4b4": { "describe": { "columns": [], diff --git a/core/lib/dal/src/tokens_web3_dal.rs b/core/lib/dal/src/tokens_web3_dal.rs index 6c990f96408..6e40cfdbd7d 100644 --- a/core/lib/dal/src/tokens_web3_dal.rs +++ b/core/lib/dal/src/tokens_web3_dal.rs @@ -1,4 +1,7 @@ -use zksync_types::{tokens::TokenPrice, Address}; +use zksync_types::{ + tokens::{TokenInfo, TokenMetadata, TokenPrice}, + Address, +}; use crate::{models::storage_token::StorageTokenPrice, SqlxError, StorageProcessor}; @@ -8,6 +11,40 @@ pub struct TokensWeb3Dal<'a, 'c> { } impl TokensWeb3Dal<'_, '_> { + pub async fn get_well_known_tokens(&mut self) -> Result, SqlxError> { + { + let records = sqlx::query!( + r#" + SELECT + l1_address, + l2_address, + NAME, + symbol, + decimals + FROM + tokens + ORDER BY + symbol + "# + ) + .fetch_all(self.storage.conn()) + .await?; + let result: Vec = records + .into_iter() + .map(|record| TokenInfo { + l1_address: Address::from_slice(&record.l1_address), + l2_address: Address::from_slice(&record.l2_address), + metadata: TokenMetadata { + name: record.name, + symbol: record.symbol, + decimals: record.decimals as u8, + }, + }) + .collect(); + Ok(result) + } + } + pub async fn get_token_price( &mut self, l2_address: &Address, diff --git a/core/lib/web3_decl/src/namespaces/zks.rs b/core/lib/web3_decl/src/namespaces/zks.rs index 473a7192e28..1a8922dcb28 100644 --- a/core/lib/web3_decl/src/namespaces/zks.rs +++ b/core/lib/web3_decl/src/namespaces/zks.rs @@ -12,6 +12,8 @@ use zksync_types::{ Address, L1BatchNumber, MiniblockNumber, H256, U256, U64, }; +use crate::types::Token; + #[cfg_attr( all(feature = "client", feature = "server"), rpc(server, client, namespace = "zks") @@ -43,6 +45,8 @@ pub trait ZksNamespace { #[method(name = "L1ChainId")] async fn l1_chain_id(&self) -> RpcResult; + #[method(name = "getConfirmedTokens")] + async fn get_confirmed_tokens(&self, from: u32, limit: u8) -> RpcResult>; #[method(name = "getTokenPrice")] async fn get_token_price(&self, token_address: Address) -> RpcResult; diff --git a/core/lib/web3_decl/src/types.rs b/core/lib/web3_decl/src/types.rs index 2b690e76b4e..61a3e10397c 100644 --- a/core/lib/web3_decl/src/types.rs +++ b/core/lib/web3_decl/src/types.rs @@ -26,6 +26,17 @@ pub use zksync_types::{ }, }; +/// Token in the zkSync network +#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct Token { + pub l1_address: Address, + pub l2_address: Address, + pub name: String, + pub symbol: String, + pub decimals: u8, +} + /// Helper structure used to parse deserialized `Ethereum` transaction. #[derive(Clone, Debug, Eq, PartialEq)] pub struct TransactionCalldata { diff --git a/core/lib/zksync_core/src/api_server/web3/backend_jsonrpsee/namespaces/zks.rs b/core/lib/zksync_core/src/api_server/web3/backend_jsonrpsee/namespaces/zks.rs index 14b911311c8..01afdd5a357 100644 --- a/core/lib/zksync_core/src/api_server/web3/backend_jsonrpsee/namespaces/zks.rs +++ b/core/lib/zksync_core/src/api_server/web3/backend_jsonrpsee/namespaces/zks.rs @@ -13,6 +13,7 @@ use zksync_types::{ use zksync_web3_decl::{ jsonrpsee::core::{async_trait, RpcResult}, namespaces::zks::ZksNamespaceServer, + types::Token, }; use crate::{ @@ -48,6 +49,12 @@ impl ZksNamespaceServer for ZksNa Ok(self.l1_chain_id_impl()) } + async fn get_confirmed_tokens(&self, from: u32, limit: u8) -> RpcResult> { + self.get_confirmed_tokens_impl(from, limit) + .await + .map_err(into_jsrpc_error) + } + async fn get_token_price(&self, token_address: Address) -> RpcResult { self.get_token_price_impl(token_address) .await diff --git a/core/lib/zksync_core/src/api_server/web3/namespaces/zks.rs b/core/lib/zksync_core/src/api_server/web3/namespaces/zks.rs index 2dbadcb776b..f8f13e96af2 100644 --- a/core/lib/zksync_core/src/api_server/web3/namespaces/zks.rs +++ b/core/lib/zksync_core/src/api_server/web3/namespaces/zks.rs @@ -21,7 +21,7 @@ use zksync_types::{ use zksync_utils::{address_to_h256, ratio_to_big_decimal_normalized}; use zksync_web3_decl::{ error::Web3Error, - types::{Address, H256}, + types::{Address, Token, H256}, }; use crate::{ @@ -141,6 +141,41 @@ impl ZksNamespace { U64::from(*self.state.api_config.l1_chain_id) } + #[tracing::instrument(skip(self))] + pub async fn get_confirmed_tokens_impl( + &self, + from: u32, + limit: u8, + ) -> Result, Web3Error> { + const METHOD_NAME: &str = "get_confirmed_tokens"; + + let method_latency = API_METRICS.start_call(METHOD_NAME); + let tokens = self + .state + .connection_pool + .access_storage_tagged("api") + .await + .unwrap() + .tokens_web3_dal() + .get_well_known_tokens() + .await + .map_err(|err| internal_error(METHOD_NAME, err))? + .into_iter() + .skip(from as usize) + .take(limit.into()) + .map(|token_info| Token { + l1_address: token_info.l1_address, + l2_address: token_info.l2_address, + name: token_info.metadata.name, + symbol: token_info.metadata.symbol, + decimals: token_info.metadata.decimals, + }) + .collect(); + + method_latency.observe(); + Ok(tokens) + } + #[tracing::instrument(skip(self))] pub async fn get_token_price_impl(&self, l2_token: Address) -> Result { const METHOD_NAME: &str = "get_token_price"; diff --git a/core/tests/ts-integration/tests/api/web3.test.ts b/core/tests/ts-integration/tests/api/web3.test.ts index bda0aa6a730..000b61276be 100644 --- a/core/tests/ts-integration/tests/api/web3.test.ts +++ b/core/tests/ts-integration/tests/api/web3.test.ts @@ -201,6 +201,14 @@ describe('web3 API compatibility tests', () => { }); }); + test('Should test various token methods', async () => { + const tokens = await alice.provider.getConfirmedTokens(); + expect(tokens).not.toHaveLength(0); // Should not be an empty array. + + const price = await alice.provider.getTokenPrice(l2Token); + expect(+price!).toEqual(expect.any(Number)); + }); + test('Should check transactions from API / Legacy tx', async () => { const LEGACY_TX_TYPE = 0; const legacyTx = await alice.sendTransaction({ From be5306f08855a45d36423c0117c34f112ab97f46 Mon Sep 17 00:00:00 2001 From: zksync-era-bot <147085853+zksync-era-bot@users.noreply.github.com> Date: Mon, 25 Dec 2023 22:03:10 +0100 Subject: [PATCH 12/23] chore(main): release core 18.11.0 (#766) :robot: I have created a release *beep* *boop* --- ## [18.11.0](https://github.com/matter-labs/zksync-era/compare/core-v18.10.3...core-v18.11.0) (2023-12-25) ### Features * Revert "feat: Remove zks_getConfirmedTokens method" ([#765](https://github.com/matter-labs/zksync-era/issues/765)) ([6e7ed12](https://github.com/matter-labs/zksync-era/commit/6e7ed124e816f5ba1d2ba3e8efaf281cd2c055dd)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- .github/release-please/manifest.json | 2 +- core/CHANGELOG.md | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/release-please/manifest.json b/.github/release-please/manifest.json index 900269b34d3..0dd319d6a2d 100644 --- a/.github/release-please/manifest.json +++ b/.github/release-please/manifest.json @@ -1,5 +1,5 @@ { "sdk/zksync-rs": "0.4.0", - "core": "18.10.3", + "core": "18.11.0", "prover": "10.0.2" } diff --git a/core/CHANGELOG.md b/core/CHANGELOG.md index 131c069e9f7..358da9b7518 100644 --- a/core/CHANGELOG.md +++ b/core/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [18.11.0](https://github.com/matter-labs/zksync-era/compare/core-v18.10.3...core-v18.11.0) (2023-12-25) + + +### Features + +* Revert "feat: Remove zks_getConfirmedTokens method" ([#765](https://github.com/matter-labs/zksync-era/issues/765)) ([6e7ed12](https://github.com/matter-labs/zksync-era/commit/6e7ed124e816f5ba1d2ba3e8efaf281cd2c055dd)) + ## [18.10.3](https://github.com/matter-labs/zksync-era/compare/core-v18.10.2...core-v18.10.3) (2023-12-25) From 9c99e13ca0a4de678a4ce5bf7e2d5880d79c0e66 Mon Sep 17 00:00:00 2001 From: Roman Brodetski Date: Mon, 25 Dec 2023 23:53:08 +0000 Subject: [PATCH 13/23] feat(get-tokens): filter tokens by `well_known` (#767) Co-authored-by: Fedor Sakharov --- core/lib/dal/sqlx-data.json | 84 ++++++++++++++--------------- core/lib/dal/src/tokens_web3_dal.rs | 2 + 2 files changed, 44 insertions(+), 42 deletions(-) diff --git a/core/lib/dal/sqlx-data.json b/core/lib/dal/sqlx-data.json index ee6b28a54ef..36b8bad5787 100644 --- a/core/lib/dal/sqlx-data.json +++ b/core/lib/dal/sqlx-data.json @@ -8671,48 +8671,6 @@ }, "query": "\n UPDATE prover_jobs_fri\n SET\n status = 'sent_to_server',\n updated_at = NOW()\n WHERE\n l1_batch_number = $1\n " }, - "af74cb82724bdf9fa4f716cf2ee07a011c3ad3f13a2ed37c4bcce515786fc867": { - "describe": { - "columns": [ - { - "name": "l1_address", - "ordinal": 0, - "type_info": "Bytea" - }, - { - "name": "l2_address", - "ordinal": 1, - "type_info": "Bytea" - }, - { - "name": "name", - "ordinal": 2, - "type_info": "Varchar" - }, - { - "name": "symbol", - "ordinal": 3, - "type_info": "Varchar" - }, - { - "name": "decimals", - "ordinal": 4, - "type_info": "Int4" - } - ], - "nullable": [ - false, - false, - false, - false, - false - ], - "parameters": { - "Left": [] - } - }, - "query": "\n SELECT\n l1_address,\n l2_address,\n NAME,\n symbol,\n decimals\n FROM\n tokens\n ORDER BY\n symbol\n " - }, "afc24bd1407dba82cd3dc9e7ee71ac4ab2d73bda6022700aeb0a630a2563a4b4": { "describe": { "columns": [], @@ -11912,6 +11870,48 @@ }, "query": "\n UPDATE prover_jobs\n SET\n status = 'queued',\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n (\n status = 'in_progress'\n AND processing_started_at <= NOW() - $1::INTERVAL\n AND attempts < $2\n )\n OR (\n status = 'in_gpu_proof'\n AND processing_started_at <= NOW() - $1::INTERVAL\n AND attempts < $2\n )\n OR (\n status = 'failed'\n AND attempts < $2\n )\n RETURNING\n id,\n status,\n attempts\n " }, + "f39372e37160df4897f62a800694867ed765dcb9dc60754df9df8700d4244bfb": { + "describe": { + "columns": [ + { + "name": "l1_address", + "ordinal": 0, + "type_info": "Bytea" + }, + { + "name": "l2_address", + "ordinal": 1, + "type_info": "Bytea" + }, + { + "name": "name", + "ordinal": 2, + "type_info": "Varchar" + }, + { + "name": "symbol", + "ordinal": 3, + "type_info": "Varchar" + }, + { + "name": "decimals", + "ordinal": 4, + "type_info": "Int4" + } + ], + "nullable": [ + false, + false, + false, + false, + false + ], + "parameters": { + "Left": [] + } + }, + "query": "\n SELECT\n l1_address,\n l2_address,\n NAME,\n symbol,\n decimals\n FROM\n tokens\n WHERE\n well_known = TRUE\n ORDER BY\n symbol\n " + }, "f4362a61ab05af3d71a3232d2f017db60405a887f9f7fa0ca60aa7fc879ce630": { "describe": { "columns": [], diff --git a/core/lib/dal/src/tokens_web3_dal.rs b/core/lib/dal/src/tokens_web3_dal.rs index 6e40cfdbd7d..c3421c64679 100644 --- a/core/lib/dal/src/tokens_web3_dal.rs +++ b/core/lib/dal/src/tokens_web3_dal.rs @@ -23,6 +23,8 @@ impl TokensWeb3Dal<'_, '_> { decimals FROM tokens + WHERE + well_known = TRUE ORDER BY symbol "# From 3a0ec355f4ade8641d52ccdcc9ed03753fcb7882 Mon Sep 17 00:00:00 2001 From: zksync-era-bot <147085853+zksync-era-bot@users.noreply.github.com> Date: Tue, 26 Dec 2023 00:56:12 +0100 Subject: [PATCH 14/23] chore(main): release core 18.12.0 (#768) :robot: I have created a release *beep* *boop* --- ## [18.12.0](https://github.com/matter-labs/zksync-era/compare/core-v18.11.0...core-v18.12.0) (2023-12-25) ### Features * **get-tokens:** filter tokens by `well_known` ([#767](https://github.com/matter-labs/zksync-era/issues/767)) ([9c99e13](https://github.com/matter-labs/zksync-era/commit/9c99e13ca0a4de678a4ce5bf7e2d5880d79c0e66)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- .github/release-please/manifest.json | 2 +- core/CHANGELOG.md | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/release-please/manifest.json b/.github/release-please/manifest.json index 0dd319d6a2d..aca464aef9f 100644 --- a/.github/release-please/manifest.json +++ b/.github/release-please/manifest.json @@ -1,5 +1,5 @@ { "sdk/zksync-rs": "0.4.0", - "core": "18.11.0", + "core": "18.12.0", "prover": "10.0.2" } diff --git a/core/CHANGELOG.md b/core/CHANGELOG.md index 358da9b7518..6773f58bbb1 100644 --- a/core/CHANGELOG.md +++ b/core/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [18.12.0](https://github.com/matter-labs/zksync-era/compare/core-v18.11.0...core-v18.12.0) (2023-12-25) + + +### Features + +* **get-tokens:** filter tokens by `well_known` ([#767](https://github.com/matter-labs/zksync-era/issues/767)) ([9c99e13](https://github.com/matter-labs/zksync-era/commit/9c99e13ca0a4de678a4ce5bf7e2d5880d79c0e66)) + ## [18.11.0](https://github.com/matter-labs/zksync-era/compare/core-v18.10.3...core-v18.11.0) (2023-12-25) From 4a4a8659cc240d3bac78ff7ae4d5d4c6f7da9202 Mon Sep 17 00:00:00 2001 From: Alex <149157638+AlexBill01@users.noreply.github.com> Date: Fri, 29 Dec 2023 02:17:13 +0800 Subject: [PATCH 15/23] chore(docs): corrected spelling in `status.ts` file (#753) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## What ❔ corrected spelling in `status.ts` file ## Why ❔ Spelling was incorrect ## Checklist - [x] PR title corresponds to the body of PR (we generate changelog entries from PRs). - [x] Tests for the changes have been added / updated. - [x] Documentation comments have been added / updated. - [x] Code has been formatted via `zk fmt` and `zk lint`. - [x] Spellcheck has been run via `cargo spellcheck --cfg=./spellcheck/era.cfg --code 1`. --- infrastructure/zk/src/status.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/infrastructure/zk/src/status.ts b/infrastructure/zk/src/status.ts index cd03e5748e6..0abd008c836 100644 --- a/infrastructure/zk/src/status.ts +++ b/infrastructure/zk/src/status.ts @@ -167,7 +167,7 @@ async function compareVerificationParams() { } if (fail == false) { - console.log(`${greenStart}Verifcation params match.${resetColor}`); + console.log(`${greenStart}Verification params match.${resetColor}`); } } From 0a05feaeb48cf1f6bb5359de55e6c2285a286bde Mon Sep 17 00:00:00 2001 From: CrytoInsight <150222426+CrytoInsight@users.noreply.github.com> Date: Fri, 29 Dec 2023 02:17:32 +0800 Subject: [PATCH 16/23] chore: fix link (#752) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## What ❔ fix link ## Why ❔ Inaccessible ## Checklist - [x] PR title corresponds to the body of PR (we generate changelog entries from PRs). - [x] Tests for the changes have been added / updated. - [x] Documentation comments have been added / updated. - [x] Code has been formatted via `zk fmt` and `zk lint`. - [x] Spellcheck has been run via `cargo spellcheck --cfg=./spellcheck/era.cfg --code 1`. --- docs/guides/advanced/how_l2_messaging_works.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/guides/advanced/how_l2_messaging_works.md b/docs/guides/advanced/how_l2_messaging_works.md index eee69114604..750d7453883 100644 --- a/docs/guides/advanced/how_l2_messaging_works.md +++ b/docs/guides/advanced/how_l2_messaging_works.md @@ -195,8 +195,7 @@ transmitted to L1 for final verification. https://github.com/matter-labs/zksync-era/blob/43d7bd587a84b1b4489f4c6a4169ccb90e0df467/core/lib/vm/src/vm.rs#L81 [log_queries]: https://github.com/matter-labs/era-zk_evm_abstractions/blob/15a2af404902d5f10352e3d1fac693cc395fcff9/src/queries.rs#L30C2-L30C2 -[aux_bytes]: - https://github.com/matter-labs/zkevm_opcode_defs/blob/780ce4129a95ab9a68abf0d60c156ee8df6008c2/src/system_params.rs#L37C39-L37C39 +[aux_bytes]: https://github.com/matter-labs/era-zkevm_opcode_defs/blob/v1.3.2/src/system_params.rs#L37C39-L37C39 [event_sink]: https://github.com/matter-labs/zksync-era/blob/43d7bd587a84b1b4489f4c6a4169ccb90e0df467/core/lib/vm/src/event_sink.rs#L116 [log_writing_in_vm]: https://github.com/matter-labs/era-zk_evm/blob/v1.3.2/src/opcodes/execution/log.rs From 9d98715bfed000899a2c0e5d60518477aa9be9b3 Mon Sep 17 00:00:00 2001 From: 0xDev <84038223+avocadodefi@users.noreply.github.com> Date: Thu, 28 Dec 2023 19:19:30 +0100 Subject: [PATCH 17/23] docs: Update 01_initialization.md (#769) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove the comma after "doc": "The goal of this doc is to show you some more details on how zkSync works internally." ## What ❔ ## Why ❔ ## Checklist - [ ] PR title corresponds to the body of PR (we generate changelog entries from PRs). - [ ] Tests for the changes have been added / updated. - [ ] Documentation comments have been added / updated. - [ ] Code has been formatted via `zk fmt` and `zk lint`. - [ ] Spellcheck has been run via `cargo spellcheck --cfg=./spellcheck/era.cfg --code 1`. --- docs/guides/advanced/01_initialization.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/guides/advanced/01_initialization.md b/docs/guides/advanced/01_initialization.md index 235ef372d41..1a0ca750807 100644 --- a/docs/guides/advanced/01_initialization.md +++ b/docs/guides/advanced/01_initialization.md @@ -1,6 +1,6 @@ # zkSync deeper dive -The goal of this doc, is to show you some more details on how zkSync works internally. +The goal of this doc is to show you some more details on how zkSync works internally. Please do the dev_setup.md and development.md (these commands do all the heavy lifting on starting the components of the system). @@ -20,7 +20,7 @@ there, make sure to run `zk` (that compiles this code), before re-running `zk in As first step, it gets the docker images for postgres and geth. -Geth (one of the ethereum clients) will be used to setup our own copy of L1 chain (that our local zkSync would use). +Geth (one of the Ethereum clients) will be used to setup our own copy of L1 chain (that our local zkSync would use). Postgres is one of the two databases, that is used by zkSync (the other one is RocksDB). Currently most of the data is stored in postgres (blocks, transactions etc) - while RocksDB is only storing the state (Tree & Map) - and it used by From fe730e72f69df3cbd44e147331641b5228aa776d Mon Sep 17 00:00:00 2001 From: Money Bund <148772726+MoneyBund@users.noreply.github.com> Date: Fri, 29 Dec 2023 02:23:58 +0800 Subject: [PATCH 18/23] fix: fix path (#751) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## What ❔ fixed path ## Why ❔ ## Checklist - [x] PR title corresponds to the body of PR (we generate changelog entries from PRs). - [x] Tests for the changes have been added / updated. - [x] Documentation comments have been added / updated. - [x] Code has been formatted via `zk fmt` and `zk lint`. - [x] Spellcheck has been run via `cargo spellcheck --cfg=./spellcheck/era.cfg --code 1`. --- docs/guides/advanced/how_call_works.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/guides/advanced/how_call_works.md b/docs/guides/advanced/how_call_works.md index 4ba4859c410..178a95b3239 100644 --- a/docs/guides/advanced/how_call_works.md +++ b/docs/guides/advanced/how_call_works.md @@ -69,7 +69,8 @@ opcodes similar to EVM, but operates on registers rather than a stack. We have t 'pure rust' without circuits (in the zk_evm repository), and the other has circuits (in the sync_vm repository). In this example, the api server uses the 'zk_evm' implementation without circuits. -Most of the code that the server uses to interact with the VM is in [core/lib/vm/src/vm.rs][vm_code]. +Most of the code that the server uses to interact with the VM is in +[core/lib/multivm/src/versions/vm_latest/implementation/execution.rs][vm_code]. In this line, we're calling self.state.cycle(), which executes a single VM instruction. You can see that we do a lot of things around this, such as executing multiple tracers after each instruction. This allows us to debug and provide From 1a3d616b346267d5fb9c84812a155b76e34a1cc8 Mon Sep 17 00:00:00 2001 From: Mattew <149158367+MattewGraham@users.noreply.github.com> Date: Fri, 29 Dec 2023 02:24:47 +0800 Subject: [PATCH 19/23] fix: fix several typos (#754) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## What ❔ Fixing possiblity to possibility ## Why ❔ The modifications are straightforward and aim to enhance the accuracy of the documentation. ## Checklist - [x] PR title corresponds to the body of PR (we generate changelog entries from PRs). - [x] Tests for the changes have been added / updated. - [x] Documentation comments have been added / updated. - [x] Code has been formatted via `zk fmt` and `zk lint`. - [x] Spellcheck has been run via `cargo spellcheck --cfg=./spellcheck/era.cfg --code 1`. Co-authored-by: Fedor Sakharov --- docs/guides/advanced/how_transaction_works.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guides/advanced/how_transaction_works.md b/docs/guides/advanced/how_transaction_works.md index 5507596efda..3ee9c30a205 100644 --- a/docs/guides/advanced/how_transaction_works.md +++ b/docs/guides/advanced/how_transaction_works.md @@ -74,7 +74,7 @@ The transaction can have three different results in state keeper: - Success - Failure (but still included in the block, and gas was charged) - Rejection - when it fails validation, and cannot be included in the block. This last case should (in theory) never - happen - as we cannot charge the fee in such scenario, and it opens the possiblity for the DDoS attack. + happen - as we cannot charge the fee in such scenario, and it opens the possibility for the DDoS attack. [transaction_request_from_bytes]: https://github.com/matter-labs/zksync-era/blob/main/core/lib/types/src/transaction_request.rs#L196 From 62aacab8f1a56332fc1e03c67162d3ec20a643e7 Mon Sep 17 00:00:00 2001 From: 0xDev <84038223+avocadodefi@users.noreply.github.com> Date: Thu, 28 Dec 2023 19:26:32 +0100 Subject: [PATCH 20/23] docs: Update 01_initialization.md (#770) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add "at" after "look": "Now let's take a look at what's inside:" ## What ❔ ## Why ❔ ## Checklist - [ ] PR title corresponds to the body of PR (we generate changelog entries from PRs). - [ ] Tests for the changes have been added / updated. - [ ] Documentation comments have been added / updated. - [ ] Code has been formatted via `zk fmt` and `zk lint`. - [ ] Spellcheck has been run via `cargo spellcheck --cfg=./spellcheck/era.cfg --code 1`. --- docs/guides/advanced/01_initialization.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guides/advanced/01_initialization.md b/docs/guides/advanced/01_initialization.md index 1a0ca750807..f44af176fb8 100644 --- a/docs/guides/advanced/01_initialization.md +++ b/docs/guides/advanced/01_initialization.md @@ -5,7 +5,7 @@ The goal of this doc is to show you some more details on how zkSync works intern Please do the dev_setup.md and development.md (these commands do all the heavy lifting on starting the components of the system). -Now let's take a look what's inside: +Now let's take a look at what's inside: ### Initialization (zk init) From 896b6602485ed8a764688ce7ec7421beb9f6162b Mon Sep 17 00:00:00 2001 From: 0xblackbox <105477847+0xblackbox@users.noreply.github.com> Date: Fri, 29 Dec 2023 02:26:58 +0800 Subject: [PATCH 21/23] docs: fix typo (#746) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## What ❔ fix some minor typo in readme.md and overview.md files ## Why ❔ I think it’s important to let users read the most accurate documentation --- docs/specs/l1_l2_communication/l1_to_l2.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/specs/l1_l2_communication/l1_to_l2.md b/docs/specs/l1_l2_communication/l1_to_l2.md index 46855cee50c..12a20292ef6 100644 --- a/docs/specs/l1_l2_communication/l1_to_l2.md +++ b/docs/specs/l1_l2_communication/l1_to_l2.md @@ -87,7 +87,7 @@ been complete. The upgrade transactions are processed just like with priority transactions, with only the following differences: - We can have only one upgrade transaction per batch & this transaction must be the first transaction in the batch. -- The system contracts upgrade transaction is not appended to `priorityOperationsRollingHash` and doesn’t increment +- The system contracts upgrade transaction is not appended to `priorityOperationsRollingHash` and doesn't increment `numberOfPriorityTransactions`. Instead, its hash is calculated via a system L2→L1 log _before_ it gets executed. Note, that it is an important property. More on it [below](#security-considerations). From e5a3a2cc5b220d46fd5dc265686a5e37664c3df4 Mon Sep 17 00:00:00 2001 From: Money Bund <148772726+MoneyBund@users.noreply.github.com> Date: Fri, 29 Dec 2023 03:24:33 +0800 Subject: [PATCH 22/23] chore: update contracts.md (#773) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## What ❔ fixed typo ## Why ❔ ## Checklist - [x] PR title corresponds to the body of PR (we generate changelog entries from PRs). - [x] Tests for the changes have been added / updated. - [x] Documentation comments have been added / updated. - [x] Code has been formatted via `zk fmt` and `zk lint`. - [x] Spellcheck has been run via `cargo spellcheck --cfg=./spellcheck/era.cfg --code 1`. --- docs/guides/advanced/contracts.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guides/advanced/contracts.md b/docs/guides/advanced/contracts.md index e32992fb79b..cb42a945da6 100644 --- a/docs/guides/advanced/contracts.md +++ b/docs/guides/advanced/contracts.md @@ -86,7 +86,7 @@ changed - so updating the same slot multiple times doesn't increase the amount o ### Account abstraction and some method calls -As `zkSync` has a built-in AccountAbstration (more on this in a separate article) - you shouldn't depend on some of the +As `zkSync` has a built-in AccountAbstraction (more on this in a separate article) - you shouldn't depend on some of the solidity functions (like `ecrecover` - that checks the keys, or `tx.origin`) - in all the cases, the compiler will try to warn you. From eb4750d36c86d9a108213974bc6543b77614021e Mon Sep 17 00:00:00 2001 From: Doll <148654386+Dollyerls@users.noreply.github.com> Date: Fri, 29 Dec 2023 05:56:18 +0800 Subject: [PATCH 23/23] chore: fix error link (#744) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## What ❔ fix error link ## Why ❔ 404 ## Checklist - [x] PR title corresponds to the body of PR (we generate changelog entries from PRs). - [x] Tests for the changes have been added / updated. - [x] Documentation comments have been added / updated. - [x] Code has been formatted via `zk fmt` and `zk lint`. - [x] Spellcheck has been run via `cargo spellcheck --cfg=./spellcheck/era.cfg --code 1`. --- docs/guides/advanced/compression.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/guides/advanced/compression.md b/docs/guides/advanced/compression.md index cd7052f989b..de257cc4c2b 100644 --- a/docs/guides/advanced/compression.md +++ b/docs/guides/advanced/compression.md @@ -10,8 +10,8 @@ bytecode is chunked into opcodes (which have a size of 8 bytes), assigned a 2 by sequence (indexes) are verified and sent to L1. This process is split into 2 different parts: (1) [the server side operator](https://github.com/matter-labs/zksync-era/blob/main/core/lib/utils/src/bytecode.rs#L31) handling the compression and (2) -[the system contract](https://github.com/matter-labs/era-system-contracts/blob/main/contracts/BytecodeCompressor.sol) -verifying that the compression is correct before sending to L1. +[the system contract](https://github.com/matter-labs/era-system-contracts/blob/main/contracts/Compressor.sol) verifying +that the compression is correct before sending to L1. ## Example