diff --git a/.github/workflows/ci-core-reusable.yml b/.github/workflows/ci-core-reusable.yml index 00e56e9ff745..6e28f85e3c01 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 000000000000..103f3ce566fb --- /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 000000000000..bd88f25e2094 --- /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 a7bd3d25ae82..68c1731fd0f6 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 322219deaace..ba3c314a135b 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 6cc58c78b098..c48e3d8c7104 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 e63ab376bad4..623d3d735d19 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 0dbacc9d1d9e..cfee13d2031b 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 c2d98049ec67..1418ce6adc34 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 14e693a1d2e3..d914aacab178 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 16776be444e0..93ec255e7740 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 388b5ef209e0..5773e3797e2b 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 c189de7266d4..7dc60ec5b0fb 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 fd00b333c725..aa9e8a7eda70 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 159f50a89ee3..73d551942bff 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 4935b853e4f6..485f34196450 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 a0e3039a59a8..9336e0998888 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 e152709cff5d..15f10ce3ce7d 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 26458956af7a..c725cdcf010b 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![]), } }