diff --git a/core/lib/dal/.sqlx/query-0159271d31701963d0f2951c8ca21b20d55684a39d32005baebaba8e98045ab7.json b/core/lib/dal/.sqlx/query-0159271d31701963d0f2951c8ca21b20d55684a39d32005baebaba8e98045ab7.json deleted file mode 100644 index 694ac4183cf1..000000000000 --- a/core/lib/dal/.sqlx/query-0159271d31701963d0f2951c8ca21b20d55684a39d32005baebaba8e98045ab7.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n SELECT\n number,\n l1_tx_count,\n l2_tx_count,\n timestamp,\n l2_to_l1_logs,\n l2_to_l1_messages,\n bloom,\n priority_ops_onchain_data,\n used_contract_hashes,\n bootloader_code_hash,\n default_aa_code_hash,\n protocol_version,\n system_logs,\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 ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "number", - "type_info": "Int8" - }, - { - "ordinal": 1, - "name": "l1_tx_count", - "type_info": "Int4" - }, - { - "ordinal": 2, - "name": "l2_tx_count", - "type_info": "Int4" - }, - { - "ordinal": 3, - "name": "timestamp", - "type_info": "Int8" - }, - { - "ordinal": 4, - "name": "l2_to_l1_logs", - "type_info": "ByteaArray" - }, - { - "ordinal": 5, - "name": "l2_to_l1_messages", - "type_info": "ByteaArray" - }, - { - "ordinal": 6, - "name": "bloom", - "type_info": "Bytea" - }, - { - "ordinal": 7, - "name": "priority_ops_onchain_data", - "type_info": "ByteaArray" - }, - { - "ordinal": 8, - "name": "used_contract_hashes", - "type_info": "Jsonb" - }, - { - "ordinal": 9, - "name": "bootloader_code_hash", - "type_info": "Bytea" - }, - { - "ordinal": 10, - "name": "default_aa_code_hash", - "type_info": "Bytea" - }, - { - "ordinal": 11, - "name": "protocol_version", - "type_info": "Int4" - }, - { - "ordinal": 12, - "name": "system_logs", - "type_info": "ByteaArray" - }, - { - "ordinal": 13, - "name": "pubdata_input", - "type_info": "Bytea" - } - ], - "parameters": { - "Left": [ - "Int4" - ] - }, - "nullable": [ - false, - false, - false, - false, - false, - false, - false, - false, - false, - true, - true, - true, - false, - true - ] - }, - "hash": "0159271d31701963d0f2951c8ca21b20d55684a39d32005baebaba8e98045ab7" -} diff --git a/core/lib/dal/.sqlx/query-35e31e789379f3e36b36b5f824955eb58a0cc4e868ac01a12fae52f7be6b739d.json b/core/lib/dal/.sqlx/query-05b0050aa9d2944542abbcef31af3fe8d35800340d1c6e9d02c15226b699c93b.json similarity index 75% rename from core/lib/dal/.sqlx/query-35e31e789379f3e36b36b5f824955eb58a0cc4e868ac01a12fae52f7be6b739d.json rename to core/lib/dal/.sqlx/query-05b0050aa9d2944542abbcef31af3fe8d35800340d1c6e9d02c15226b699c93b.json index 178eba274fdc..b577e7535eb0 100644 --- a/core/lib/dal/.sqlx/query-35e31e789379f3e36b36b5f824955eb58a0cc4e868ac01a12fae52f7be6b739d.json +++ b/core/lib/dal/.sqlx/query-05b0050aa9d2944542abbcef31af3fe8d35800340d1c6e9d02c15226b699c93b.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT\n number,\n timestamp,\n l1_tx_count,\n l2_tx_count,\n bloom,\n priority_ops_onchain_data,\n hash,\n commitment,\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_merkle_root,\n rollup_last_leaf_index,\n zkporter_is_available,\n bootloader_code_hash,\n default_aa_code_hash,\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 ", + "query": "\n SELECT\n number,\n timestamp,\n l1_tx_count,\n l2_tx_count,\n bloom,\n priority_ops_onchain_data,\n hash,\n commitment,\n l2_to_l1_messages,\n used_contract_hashes,\n compressed_initial_writes,\n compressed_repeated_writes,\n l2_l1_merkle_root,\n rollup_last_leaf_index,\n zkporter_is_available,\n bootloader_code_hash,\n default_aa_code_hash,\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 ", "describe": { "columns": [ { @@ -45,74 +45,74 @@ }, { "ordinal": 8, - "name": "l2_to_l1_logs", - "type_info": "ByteaArray" - }, - { - "ordinal": 9, "name": "l2_to_l1_messages", "type_info": "ByteaArray" }, { - "ordinal": 10, + "ordinal": 9, "name": "used_contract_hashes", "type_info": "Jsonb" }, { - "ordinal": 11, + "ordinal": 10, "name": "compressed_initial_writes", "type_info": "Bytea" }, { - "ordinal": 12, + "ordinal": 11, "name": "compressed_repeated_writes", "type_info": "Bytea" }, { - "ordinal": 13, + "ordinal": 12, "name": "l2_l1_merkle_root", "type_info": "Bytea" }, { - "ordinal": 14, + "ordinal": 13, "name": "rollup_last_leaf_index", "type_info": "Int8" }, { - "ordinal": 15, + "ordinal": 14, "name": "zkporter_is_available", "type_info": "Bool" }, { - "ordinal": 16, + "ordinal": 15, "name": "bootloader_code_hash", "type_info": "Bytea" }, { - "ordinal": 17, + "ordinal": 16, "name": "default_aa_code_hash", "type_info": "Bytea" }, { - "ordinal": 18, + "ordinal": 17, "name": "aux_data_hash", "type_info": "Bytea" }, { - "ordinal": 19, + "ordinal": 18, "name": "pass_through_data_hash", "type_info": "Bytea" }, { - "ordinal": 20, + "ordinal": 19, "name": "meta_parameters_hash", "type_info": "Bytea" }, { - "ordinal": 21, + "ordinal": 20, "name": "protocol_version", "type_info": "Int4" }, + { + "ordinal": 21, + "name": "compressed_state_diffs", + "type_info": "Bytea" + }, { "ordinal": 22, "name": "system_logs", @@ -120,21 +120,16 @@ }, { "ordinal": 23, - "name": "compressed_state_diffs", - "type_info": "Bytea" - }, - { - "ordinal": 24, "name": "events_queue_commitment", "type_info": "Bytea" }, { - "ordinal": 25, + "ordinal": 24, "name": "bootloader_initial_content_commitment", "type_info": "Bytea" }, { - "ordinal": 26, + "ordinal": 25, "name": "pubdata_input", "type_info": "Bytea" } @@ -155,7 +150,6 @@ true, false, false, - false, true, true, true, @@ -167,12 +161,12 @@ true, true, true, - false, true, + false, true, true, true ] }, - "hash": "35e31e789379f3e36b36b5f824955eb58a0cc4e868ac01a12fae52f7be6b739d" + "hash": "05b0050aa9d2944542abbcef31af3fe8d35800340d1c6e9d02c15226b699c93b" } diff --git a/core/lib/dal/.sqlx/query-b259e6bacd98fa68003e0c87bb28cc77bd2dcee4a04d1afc9779714854623a79.json b/core/lib/dal/.sqlx/query-1e3c88b41bc02cb6a116fa930ae85b8b60165ed757ae1044e83fdc877d95cbd8.json similarity index 71% rename from core/lib/dal/.sqlx/query-b259e6bacd98fa68003e0c87bb28cc77bd2dcee4a04d1afc9779714854623a79.json rename to core/lib/dal/.sqlx/query-1e3c88b41bc02cb6a116fa930ae85b8b60165ed757ae1044e83fdc877d95cbd8.json index 90c940c3977c..206d2f91e3b1 100644 --- a/core/lib/dal/.sqlx/query-b259e6bacd98fa68003e0c87bb28cc77bd2dcee4a04d1afc9779714854623a79.json +++ b/core/lib/dal/.sqlx/query-1e3c88b41bc02cb6a116fa930ae85b8b60165ed757ae1044e83fdc877d95cbd8.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT\n miniblock_number,\n log_index_in_miniblock,\n log_index_in_tx,\n tx_hash,\n NULL::bytea AS \"block_hash\",\n NULL::BIGINT AS \"l1_batch_number?\",\n shard_id,\n is_service,\n tx_index_in_miniblock,\n tx_index_in_l1_batch,\n sender,\n key,\n value\n FROM\n l2_to_l1_logs\n WHERE\n tx_hash = ANY ($1)\n ORDER BY\n tx_index_in_l1_batch ASC,\n log_index_in_tx ASC\n ", + "query": "\n SELECT\n miniblock_number,\n log_index_in_miniblock,\n log_index_in_tx,\n tx_hash,\n NULL::BIGINT AS \"l1_batch_number?\",\n shard_id,\n is_service,\n tx_index_in_miniblock,\n tx_index_in_l1_batch,\n sender,\n key,\n value\n FROM\n l2_to_l1_logs\n WHERE\n tx_hash = ANY ($1)\n ORDER BY\n tx_index_in_l1_batch ASC,\n log_index_in_tx ASC\n ", "describe": { "columns": [ { @@ -25,46 +25,41 @@ }, { "ordinal": 4, - "name": "block_hash", - "type_info": "Bytea" - }, - { - "ordinal": 5, "name": "l1_batch_number?", "type_info": "Int8" }, { - "ordinal": 6, + "ordinal": 5, "name": "shard_id", "type_info": "Int4" }, { - "ordinal": 7, + "ordinal": 6, "name": "is_service", "type_info": "Bool" }, { - "ordinal": 8, + "ordinal": 7, "name": "tx_index_in_miniblock", "type_info": "Int4" }, { - "ordinal": 9, + "ordinal": 8, "name": "tx_index_in_l1_batch", "type_info": "Int4" }, { - "ordinal": 10, + "ordinal": 9, "name": "sender", "type_info": "Bytea" }, { - "ordinal": 11, + "ordinal": 10, "name": "key", "type_info": "Bytea" }, { - "ordinal": 12, + "ordinal": 11, "name": "value", "type_info": "Bytea" } @@ -80,7 +75,6 @@ false, false, null, - null, false, false, false, @@ -90,5 +84,5 @@ false ] }, - "hash": "b259e6bacd98fa68003e0c87bb28cc77bd2dcee4a04d1afc9779714854623a79" + "hash": "1e3c88b41bc02cb6a116fa930ae85b8b60165ed757ae1044e83fdc877d95cbd8" } diff --git a/core/lib/dal/.sqlx/query-b65bb931f00b53cc9ef41b58c1532945b091fece95bb85f954230c26ba78540a.json b/core/lib/dal/.sqlx/query-2486f8404e8cfcb9c178acd6dccae32e8812becbe5ce85e63694385f015f2cfe.json similarity index 72% rename from core/lib/dal/.sqlx/query-b65bb931f00b53cc9ef41b58c1532945b091fece95bb85f954230c26ba78540a.json rename to core/lib/dal/.sqlx/query-2486f8404e8cfcb9c178acd6dccae32e8812becbe5ce85e63694385f015f2cfe.json index ef1d2075170a..f28e3d044ccc 100644 --- a/core/lib/dal/.sqlx/query-b65bb931f00b53cc9ef41b58c1532945b091fece95bb85f954230c26ba78540a.json +++ b/core/lib/dal/.sqlx/query-2486f8404e8cfcb9c178acd6dccae32e8812becbe5ce85e63694385f015f2cfe.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT\n number,\n timestamp,\n l1_tx_count,\n l2_tx_count,\n bloom,\n priority_ops_onchain_data,\n hash,\n commitment,\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_merkle_root,\n rollup_last_leaf_index,\n zkporter_is_available,\n bootloader_code_hash,\n default_aa_code_hash,\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 ", + "query": "\n SELECT\n number,\n timestamp,\n l1_tx_count,\n l2_tx_count,\n bloom,\n priority_ops_onchain_data,\n hash,\n commitment,\n l2_to_l1_messages,\n used_contract_hashes,\n compressed_initial_writes,\n compressed_repeated_writes,\n l2_l1_merkle_root,\n rollup_last_leaf_index,\n zkporter_is_available,\n bootloader_code_hash,\n default_aa_code_hash,\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 ", "describe": { "columns": [ { @@ -45,96 +45,91 @@ }, { "ordinal": 8, - "name": "l2_to_l1_logs", - "type_info": "ByteaArray" - }, - { - "ordinal": 9, "name": "l2_to_l1_messages", "type_info": "ByteaArray" }, { - "ordinal": 10, + "ordinal": 9, "name": "used_contract_hashes", "type_info": "Jsonb" }, { - "ordinal": 11, + "ordinal": 10, "name": "compressed_initial_writes", "type_info": "Bytea" }, { - "ordinal": 12, + "ordinal": 11, "name": "compressed_repeated_writes", "type_info": "Bytea" }, { - "ordinal": 13, + "ordinal": 12, "name": "l2_l1_merkle_root", "type_info": "Bytea" }, { - "ordinal": 14, + "ordinal": 13, "name": "rollup_last_leaf_index", "type_info": "Int8" }, { - "ordinal": 15, + "ordinal": 14, "name": "zkporter_is_available", "type_info": "Bool" }, { - "ordinal": 16, + "ordinal": 15, "name": "bootloader_code_hash", "type_info": "Bytea" }, { - "ordinal": 17, + "ordinal": 16, "name": "default_aa_code_hash", "type_info": "Bytea" }, { - "ordinal": 18, + "ordinal": 17, "name": "aux_data_hash", "type_info": "Bytea" }, { - "ordinal": 19, + "ordinal": 18, "name": "pass_through_data_hash", "type_info": "Bytea" }, { - "ordinal": 20, + "ordinal": 19, "name": "meta_parameters_hash", "type_info": "Bytea" }, { - "ordinal": 21, + "ordinal": 20, "name": "protocol_version", "type_info": "Int4" }, { - "ordinal": 22, + "ordinal": 21, "name": "compressed_state_diffs", "type_info": "Bytea" }, { - "ordinal": 23, + "ordinal": 22, "name": "system_logs", "type_info": "ByteaArray" }, { - "ordinal": 24, + "ordinal": 23, "name": "events_queue_commitment", "type_info": "Bytea" }, { - "ordinal": 25, + "ordinal": 24, "name": "bootloader_initial_content_commitment", "type_info": "Bytea" }, { - "ordinal": 26, + "ordinal": 25, "name": "pubdata_input", "type_info": "Bytea" } @@ -157,7 +152,6 @@ true, false, false, - false, true, true, true, @@ -176,5 +170,5 @@ true ] }, - "hash": "b65bb931f00b53cc9ef41b58c1532945b091fece95bb85f954230c26ba78540a" + "hash": "2486f8404e8cfcb9c178acd6dccae32e8812becbe5ce85e63694385f015f2cfe" } diff --git a/core/lib/dal/.sqlx/query-37fee554801733f26904e23f6f84b79b6afddd869783dda827e2281640529492.json b/core/lib/dal/.sqlx/query-38dea171e4c49f54bf1db5ac9bfb3be9cf3928755be5f5fcfcdc086e73fb15e2.json similarity index 69% rename from core/lib/dal/.sqlx/query-37fee554801733f26904e23f6f84b79b6afddd869783dda827e2281640529492.json rename to core/lib/dal/.sqlx/query-38dea171e4c49f54bf1db5ac9bfb3be9cf3928755be5f5fcfcdc086e73fb15e2.json index b3f0bb2d8ab6..7ac6785d8e64 100644 --- a/core/lib/dal/.sqlx/query-37fee554801733f26904e23f6f84b79b6afddd869783dda827e2281640529492.json +++ b/core/lib/dal/.sqlx/query-38dea171e4c49f54bf1db5ac9bfb3be9cf3928755be5f5fcfcdc086e73fb15e2.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT\n number,\n timestamp,\n l1_tx_count,\n l2_tx_count,\n bloom,\n priority_ops_onchain_data,\n hash,\n commitment,\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_merkle_root,\n rollup_last_leaf_index,\n zkporter_is_available,\n bootloader_code_hash,\n default_aa_code_hash,\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 ", + "query": "\n SELECT\n number,\n timestamp,\n l1_tx_count,\n l2_tx_count,\n bloom,\n priority_ops_onchain_data,\n hash,\n commitment,\n l2_to_l1_messages,\n used_contract_hashes,\n compressed_initial_writes,\n compressed_repeated_writes,\n l2_l1_merkle_root,\n rollup_last_leaf_index,\n zkporter_is_available,\n bootloader_code_hash,\n default_aa_code_hash,\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 ", "describe": { "columns": [ { @@ -45,96 +45,91 @@ }, { "ordinal": 8, - "name": "l2_to_l1_logs", - "type_info": "ByteaArray" - }, - { - "ordinal": 9, "name": "l2_to_l1_messages", "type_info": "ByteaArray" }, { - "ordinal": 10, + "ordinal": 9, "name": "used_contract_hashes", "type_info": "Jsonb" }, { - "ordinal": 11, + "ordinal": 10, "name": "compressed_initial_writes", "type_info": "Bytea" }, { - "ordinal": 12, + "ordinal": 11, "name": "compressed_repeated_writes", "type_info": "Bytea" }, { - "ordinal": 13, + "ordinal": 12, "name": "l2_l1_merkle_root", "type_info": "Bytea" }, { - "ordinal": 14, + "ordinal": 13, "name": "rollup_last_leaf_index", "type_info": "Int8" }, { - "ordinal": 15, + "ordinal": 14, "name": "zkporter_is_available", "type_info": "Bool" }, { - "ordinal": 16, + "ordinal": 15, "name": "bootloader_code_hash", "type_info": "Bytea" }, { - "ordinal": 17, + "ordinal": 16, "name": "default_aa_code_hash", "type_info": "Bytea" }, { - "ordinal": 18, + "ordinal": 17, "name": "aux_data_hash", "type_info": "Bytea" }, { - "ordinal": 19, + "ordinal": 18, "name": "pass_through_data_hash", "type_info": "Bytea" }, { - "ordinal": 20, + "ordinal": 19, "name": "meta_parameters_hash", "type_info": "Bytea" }, { - "ordinal": 21, + "ordinal": 20, "name": "protocol_version", "type_info": "Int4" }, { - "ordinal": 22, + "ordinal": 21, "name": "compressed_state_diffs", "type_info": "Bytea" }, { - "ordinal": 23, + "ordinal": 22, "name": "system_logs", "type_info": "ByteaArray" }, { - "ordinal": 24, + "ordinal": 23, "name": "events_queue_commitment", "type_info": "Bytea" }, { - "ordinal": 25, + "ordinal": 24, "name": "bootloader_initial_content_commitment", "type_info": "Bytea" }, { - "ordinal": 26, + "ordinal": 25, "name": "pubdata_input", "type_info": "Bytea" } @@ -155,7 +150,6 @@ true, false, false, - false, true, true, true, @@ -174,5 +168,5 @@ true ] }, - "hash": "37fee554801733f26904e23f6f84b79b6afddd869783dda827e2281640529492" + "hash": "38dea171e4c49f54bf1db5ac9bfb3be9cf3928755be5f5fcfcdc086e73fb15e2" } diff --git a/core/lib/dal/.sqlx/query-3e3ddd6578e37d38cc03fa1df0b7617de769aac94aeabc55d58b906ca3698bc8.json b/core/lib/dal/.sqlx/query-3e3ddd6578e37d38cc03fa1df0b7617de769aac94aeabc55d58b906ca3698bc8.json deleted file mode 100644 index fb1478c1a627..000000000000 --- a/core/lib/dal/.sqlx/query-3e3ddd6578e37d38cc03fa1df0b7617de769aac94aeabc55d58b906ca3698bc8.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n l1_batches (\n number,\n l1_tx_count,\n l2_tx_count,\n timestamp,\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 bootloader_code_hash,\n default_aa_code_hash,\n protocol_version,\n system_logs,\n storage_refunds,\n pubdata_costs,\n pubdata_input,\n predicted_circuits_by_type,\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 NOW(),\n NOW()\n )\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8", - "Int4", - "Int4", - "Int8", - "ByteaArray", - "ByteaArray", - "Bytea", - "ByteaArray", - "Int8", - "Int8", - "Int8", - "Jsonb", - "Jsonb", - "Bytea", - "Bytea", - "Int4", - "ByteaArray", - "Int8Array", - "Int8Array", - "Bytea", - "Jsonb" - ] - }, - "nullable": [] - }, - "hash": "3e3ddd6578e37d38cc03fa1df0b7617de769aac94aeabc55d58b906ca3698bc8" -} diff --git a/core/lib/dal/.sqlx/query-64972039a9d9335332a0763eb1547489b5c6a3e2ff36d3b836ac24e1db9fd7d7.json b/core/lib/dal/.sqlx/query-454e16ddb5e85285d0c4b9013bcce5d464ecc55c80b54bc16040226df7e297bd.json similarity index 72% rename from core/lib/dal/.sqlx/query-64972039a9d9335332a0763eb1547489b5c6a3e2ff36d3b836ac24e1db9fd7d7.json rename to core/lib/dal/.sqlx/query-454e16ddb5e85285d0c4b9013bcce5d464ecc55c80b54bc16040226df7e297bd.json index c164bcab2c39..4a73fde57e29 100644 --- a/core/lib/dal/.sqlx/query-64972039a9d9335332a0763eb1547489b5c6a3e2ff36d3b836ac24e1db9fd7d7.json +++ b/core/lib/dal/.sqlx/query-454e16ddb5e85285d0c4b9013bcce5d464ecc55c80b54bc16040226df7e297bd.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT\n number,\n l1_tx_count,\n l2_tx_count,\n timestamp,\n l2_to_l1_logs,\n l2_to_l1_messages,\n bloom,\n priority_ops_onchain_data,\n used_contract_hashes,\n bootloader_code_hash,\n default_aa_code_hash,\n protocol_version,\n system_logs,\n pubdata_input\n FROM\n l1_batches\n WHERE\n number = $1\n ", + "query": "\n SELECT\n number,\n l1_tx_count,\n l2_tx_count,\n timestamp,\n l2_to_l1_messages,\n bloom,\n priority_ops_onchain_data,\n used_contract_hashes,\n bootloader_code_hash,\n default_aa_code_hash,\n protocol_version,\n system_logs,\n pubdata_input\n FROM\n l1_batches\n WHERE\n number = $1\n ", "describe": { "columns": [ { @@ -25,51 +25,46 @@ }, { "ordinal": 4, - "name": "l2_to_l1_logs", - "type_info": "ByteaArray" - }, - { - "ordinal": 5, "name": "l2_to_l1_messages", "type_info": "ByteaArray" }, { - "ordinal": 6, + "ordinal": 5, "name": "bloom", "type_info": "Bytea" }, { - "ordinal": 7, + "ordinal": 6, "name": "priority_ops_onchain_data", "type_info": "ByteaArray" }, { - "ordinal": 8, + "ordinal": 7, "name": "used_contract_hashes", "type_info": "Jsonb" }, { - "ordinal": 9, + "ordinal": 8, "name": "bootloader_code_hash", "type_info": "Bytea" }, { - "ordinal": 10, + "ordinal": 9, "name": "default_aa_code_hash", "type_info": "Bytea" }, { - "ordinal": 11, + "ordinal": 10, "name": "protocol_version", "type_info": "Int4" }, { - "ordinal": 12, + "ordinal": 11, "name": "system_logs", "type_info": "ByteaArray" }, { - "ordinal": 13, + "ordinal": 12, "name": "pubdata_input", "type_info": "Bytea" } @@ -88,7 +83,6 @@ false, false, false, - false, true, true, true, @@ -96,5 +90,5 @@ true ] }, - "hash": "64972039a9d9335332a0763eb1547489b5c6a3e2ff36d3b836ac24e1db9fd7d7" + "hash": "454e16ddb5e85285d0c4b9013bcce5d464ecc55c80b54bc16040226df7e297bd" } diff --git a/core/lib/dal/.sqlx/query-4c6a564888598d203fc2302f5a54ab6b42342e96ac8093f12812ab9a65e1d3c5.json b/core/lib/dal/.sqlx/query-52bb6de515e1edf4dcf34a31600edb31cfd855014dfca5041833b9d5d9f7a55e.json similarity index 73% rename from core/lib/dal/.sqlx/query-4c6a564888598d203fc2302f5a54ab6b42342e96ac8093f12812ab9a65e1d3c5.json rename to core/lib/dal/.sqlx/query-52bb6de515e1edf4dcf34a31600edb31cfd855014dfca5041833b9d5d9f7a55e.json index 2bb2502ba5c9..b872e2ce6297 100644 --- a/core/lib/dal/.sqlx/query-4c6a564888598d203fc2302f5a54ab6b42342e96ac8093f12812ab9a65e1d3c5.json +++ b/core/lib/dal/.sqlx/query-52bb6de515e1edf4dcf34a31600edb31cfd855014dfca5041833b9d5d9f7a55e.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT\n number,\n timestamp,\n l1_tx_count,\n l2_tx_count,\n bloom,\n priority_ops_onchain_data,\n hash,\n commitment,\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_merkle_root,\n rollup_last_leaf_index,\n zkporter_is_available,\n bootloader_code_hash,\n default_aa_code_hash,\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 ", + "query": "\n SELECT\n number,\n timestamp,\n l1_tx_count,\n l2_tx_count,\n bloom,\n priority_ops_onchain_data,\n hash,\n commitment,\n l2_to_l1_messages,\n used_contract_hashes,\n compressed_initial_writes,\n compressed_repeated_writes,\n l2_l1_merkle_root,\n rollup_last_leaf_index,\n zkporter_is_available,\n bootloader_code_hash,\n default_aa_code_hash,\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 ", "describe": { "columns": [ { @@ -45,74 +45,74 @@ }, { "ordinal": 8, - "name": "l2_to_l1_logs", - "type_info": "ByteaArray" - }, - { - "ordinal": 9, "name": "l2_to_l1_messages", "type_info": "ByteaArray" }, { - "ordinal": 10, + "ordinal": 9, "name": "used_contract_hashes", "type_info": "Jsonb" }, { - "ordinal": 11, + "ordinal": 10, "name": "compressed_initial_writes", "type_info": "Bytea" }, { - "ordinal": 12, + "ordinal": 11, "name": "compressed_repeated_writes", "type_info": "Bytea" }, { - "ordinal": 13, + "ordinal": 12, "name": "l2_l1_merkle_root", "type_info": "Bytea" }, { - "ordinal": 14, + "ordinal": 13, "name": "rollup_last_leaf_index", "type_info": "Int8" }, { - "ordinal": 15, + "ordinal": 14, "name": "zkporter_is_available", "type_info": "Bool" }, { - "ordinal": 16, + "ordinal": 15, "name": "bootloader_code_hash", "type_info": "Bytea" }, { - "ordinal": 17, + "ordinal": 16, "name": "default_aa_code_hash", "type_info": "Bytea" }, { - "ordinal": 18, + "ordinal": 17, "name": "aux_data_hash", "type_info": "Bytea" }, { - "ordinal": 19, + "ordinal": 18, "name": "pass_through_data_hash", "type_info": "Bytea" }, { - "ordinal": 20, + "ordinal": 19, "name": "meta_parameters_hash", "type_info": "Bytea" }, { - "ordinal": 21, + "ordinal": 20, "name": "protocol_version", "type_info": "Int4" }, + { + "ordinal": 21, + "name": "system_logs", + "type_info": "ByteaArray" + }, { "ordinal": 22, "name": "compressed_state_diffs", @@ -120,21 +120,16 @@ }, { "ordinal": 23, - "name": "system_logs", - "type_info": "ByteaArray" - }, - { - "ordinal": 24, "name": "events_queue_commitment", "type_info": "Bytea" }, { - "ordinal": 25, + "ordinal": 24, "name": "bootloader_initial_content_commitment", "type_info": "Bytea" }, { - "ordinal": 26, + "ordinal": 25, "name": "pubdata_input", "type_info": "Bytea" } @@ -155,8 +150,6 @@ true, false, false, - false, - true, true, true, true, @@ -171,8 +164,9 @@ false, true, true, + true, true ] }, - "hash": "4c6a564888598d203fc2302f5a54ab6b42342e96ac8093f12812ab9a65e1d3c5" + "hash": "52bb6de515e1edf4dcf34a31600edb31cfd855014dfca5041833b9d5d9f7a55e" } diff --git a/core/lib/dal/.sqlx/query-58f900812efdb615f6286eb4212c3252680594256dccb0d7e51444f613011980.json b/core/lib/dal/.sqlx/query-58f900812efdb615f6286eb4212c3252680594256dccb0d7e51444f613011980.json new file mode 100644 index 000000000000..0b45e2c25c2c --- /dev/null +++ b/core/lib/dal/.sqlx/query-58f900812efdb615f6286eb4212c3252680594256dccb0d7e51444f613011980.json @@ -0,0 +1,88 @@ +{ + "db_name": "PostgreSQL", + "query": "\n SELECT\n miniblock_number,\n log_index_in_miniblock,\n log_index_in_tx,\n tx_hash,\n l1_batch_number,\n shard_id,\n is_service,\n tx_index_in_miniblock,\n tx_index_in_l1_batch,\n sender,\n key,\n value\n FROM\n l2_to_l1_logs\n JOIN miniblocks ON l2_to_l1_logs.miniblock_number = miniblocks.number\n WHERE\n l1_batch_number = $1\n ORDER BY\n miniblock_number,\n log_index_in_miniblock\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "miniblock_number", + "type_info": "Int8" + }, + { + "ordinal": 1, + "name": "log_index_in_miniblock", + "type_info": "Int4" + }, + { + "ordinal": 2, + "name": "log_index_in_tx", + "type_info": "Int4" + }, + { + "ordinal": 3, + "name": "tx_hash", + "type_info": "Bytea" + }, + { + "ordinal": 4, + "name": "l1_batch_number", + "type_info": "Int8" + }, + { + "ordinal": 5, + "name": "shard_id", + "type_info": "Int4" + }, + { + "ordinal": 6, + "name": "is_service", + "type_info": "Bool" + }, + { + "ordinal": 7, + "name": "tx_index_in_miniblock", + "type_info": "Int4" + }, + { + "ordinal": 8, + "name": "tx_index_in_l1_batch", + "type_info": "Int4" + }, + { + "ordinal": 9, + "name": "sender", + "type_info": "Bytea" + }, + { + "ordinal": 10, + "name": "key", + "type_info": "Bytea" + }, + { + "ordinal": 11, + "name": "value", + "type_info": "Bytea" + } + ], + "parameters": { + "Left": [ + "Int8" + ] + }, + "nullable": [ + false, + false, + false, + false, + true, + false, + false, + false, + false, + false, + false, + false + ] + }, + "hash": "58f900812efdb615f6286eb4212c3252680594256dccb0d7e51444f613011980" +} diff --git a/core/lib/dal/.sqlx/query-d10bcceb808ee616c2de5f821246d2769261b070ab93a6e0aa889e619d08cd2c.json b/core/lib/dal/.sqlx/query-659f616d3af4a79f898e84f890e06de9633d1086da972a467d89831e7a07c67e.json similarity index 66% rename from core/lib/dal/.sqlx/query-d10bcceb808ee616c2de5f821246d2769261b070ab93a6e0aa889e619d08cd2c.json rename to core/lib/dal/.sqlx/query-659f616d3af4a79f898e84f890e06de9633d1086da972a467d89831e7a07c67e.json index 7d32cb004013..9116a25c1673 100644 --- a/core/lib/dal/.sqlx/query-d10bcceb808ee616c2de5f821246d2769261b070ab93a6e0aa889e619d08cd2c.json +++ b/core/lib/dal/.sqlx/query-659f616d3af4a79f898e84f890e06de9633d1086da972a467d89831e7a07c67e.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT\n number,\n timestamp,\n l1_tx_count,\n l2_tx_count,\n bloom,\n priority_ops_onchain_data,\n hash,\n commitment,\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_merkle_root,\n rollup_last_leaf_index,\n zkporter_is_available,\n bootloader_code_hash,\n default_aa_code_hash,\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 ", + "query": "\n SELECT\n number,\n timestamp,\n l1_tx_count,\n l2_tx_count,\n bloom,\n priority_ops_onchain_data,\n hash,\n commitment,\n l2_to_l1_messages,\n used_contract_hashes,\n compressed_initial_writes,\n compressed_repeated_writes,\n l2_l1_merkle_root,\n rollup_last_leaf_index,\n zkporter_is_available,\n bootloader_code_hash,\n default_aa_code_hash,\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 ", "describe": { "columns": [ { @@ -45,96 +45,91 @@ }, { "ordinal": 8, - "name": "l2_to_l1_logs", - "type_info": "ByteaArray" - }, - { - "ordinal": 9, "name": "l2_to_l1_messages", "type_info": "ByteaArray" }, { - "ordinal": 10, + "ordinal": 9, "name": "used_contract_hashes", "type_info": "Jsonb" }, { - "ordinal": 11, + "ordinal": 10, "name": "compressed_initial_writes", "type_info": "Bytea" }, { - "ordinal": 12, + "ordinal": 11, "name": "compressed_repeated_writes", "type_info": "Bytea" }, { - "ordinal": 13, + "ordinal": 12, "name": "l2_l1_merkle_root", "type_info": "Bytea" }, { - "ordinal": 14, + "ordinal": 13, "name": "rollup_last_leaf_index", "type_info": "Int8" }, { - "ordinal": 15, + "ordinal": 14, "name": "zkporter_is_available", "type_info": "Bool" }, { - "ordinal": 16, + "ordinal": 15, "name": "bootloader_code_hash", "type_info": "Bytea" }, { - "ordinal": 17, + "ordinal": 16, "name": "default_aa_code_hash", "type_info": "Bytea" }, { - "ordinal": 18, + "ordinal": 17, "name": "aux_data_hash", "type_info": "Bytea" }, { - "ordinal": 19, + "ordinal": 18, "name": "pass_through_data_hash", "type_info": "Bytea" }, { - "ordinal": 20, + "ordinal": 19, "name": "meta_parameters_hash", "type_info": "Bytea" }, { - "ordinal": 21, + "ordinal": 20, "name": "system_logs", "type_info": "ByteaArray" }, { - "ordinal": 22, + "ordinal": 21, "name": "compressed_state_diffs", "type_info": "Bytea" }, { - "ordinal": 23, + "ordinal": 22, "name": "protocol_version", "type_info": "Int4" }, { - "ordinal": 24, + "ordinal": 23, "name": "events_queue_commitment", "type_info": "Bytea" }, { - "ordinal": 25, + "ordinal": 24, "name": "bootloader_initial_content_commitment", "type_info": "Bytea" }, { - "ordinal": 26, + "ordinal": 25, "name": "pubdata_input", "type_info": "Bytea" } @@ -156,7 +151,6 @@ true, false, false, - false, true, true, true, @@ -175,5 +169,5 @@ true ] }, - "hash": "d10bcceb808ee616c2de5f821246d2769261b070ab93a6e0aa889e619d08cd2c" + "hash": "659f616d3af4a79f898e84f890e06de9633d1086da972a467d89831e7a07c67e" } diff --git a/core/lib/dal/.sqlx/query-9f2c06e6b14434ac4f3b556dc97994cc05ebeb4e5aeeaee50b7c4d8baf58ca44.json b/core/lib/dal/.sqlx/query-9f2c06e6b14434ac4f3b556dc97994cc05ebeb4e5aeeaee50b7c4d8baf58ca44.json new file mode 100644 index 000000000000..54f0d27bab26 --- /dev/null +++ b/core/lib/dal/.sqlx/query-9f2c06e6b14434ac4f3b556dc97994cc05ebeb4e5aeeaee50b7c4d8baf58ca44.json @@ -0,0 +1,33 @@ +{ + "db_name": "PostgreSQL", + "query": "\n INSERT INTO\n l1_batches (\n number,\n l1_tx_count,\n l2_tx_count,\n timestamp,\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 bootloader_code_hash,\n default_aa_code_hash,\n protocol_version,\n system_logs,\n storage_refunds,\n pubdata_costs,\n pubdata_input,\n predicted_circuits_by_type,\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 NOW(),\n NOW()\n )\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8", + "Int4", + "Int4", + "Int8", + "ByteaArray", + "Bytea", + "ByteaArray", + "Int8", + "Int8", + "Int8", + "Jsonb", + "Jsonb", + "Bytea", + "Bytea", + "Int4", + "ByteaArray", + "Int8Array", + "Int8Array", + "Bytea", + "Jsonb" + ] + }, + "nullable": [] + }, + "hash": "9f2c06e6b14434ac4f3b556dc97994cc05ebeb4e5aeeaee50b7c4d8baf58ca44" +} diff --git a/core/lib/dal/.sqlx/query-5e5c279ed5f26c2465edf701fd7ecf7e45774cb5aa8b1d27bdecacc8de4956ea.json b/core/lib/dal/.sqlx/query-b7cd7c40282c2ca2287eef93ee79c69a9e494bf1f873291b4ae7bf68b7e3c549.json similarity index 67% rename from core/lib/dal/.sqlx/query-5e5c279ed5f26c2465edf701fd7ecf7e45774cb5aa8b1d27bdecacc8de4956ea.json rename to core/lib/dal/.sqlx/query-b7cd7c40282c2ca2287eef93ee79c69a9e494bf1f873291b4ae7bf68b7e3c549.json index 16ca5c2bc1a1..ed4744206a48 100644 --- a/core/lib/dal/.sqlx/query-5e5c279ed5f26c2465edf701fd7ecf7e45774cb5aa8b1d27bdecacc8de4956ea.json +++ b/core/lib/dal/.sqlx/query-b7cd7c40282c2ca2287eef93ee79c69a9e494bf1f873291b4ae7bf68b7e3c549.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT\n number,\n l1_batches.timestamp,\n l1_tx_count,\n l2_tx_count,\n bloom,\n priority_ops_onchain_data,\n hash,\n commitment,\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_merkle_root,\n rollup_last_leaf_index,\n zkporter_is_available,\n l1_batches.bootloader_code_hash,\n l1_batches.default_aa_code_hash,\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 ", + "query": "\n SELECT\n number,\n l1_batches.timestamp,\n l1_tx_count,\n l2_tx_count,\n bloom,\n priority_ops_onchain_data,\n hash,\n commitment,\n l2_to_l1_messages,\n used_contract_hashes,\n compressed_initial_writes,\n compressed_repeated_writes,\n l2_l1_merkle_root,\n rollup_last_leaf_index,\n zkporter_is_available,\n l1_batches.bootloader_code_hash,\n l1_batches.default_aa_code_hash,\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 ", "describe": { "columns": [ { @@ -45,96 +45,91 @@ }, { "ordinal": 8, - "name": "l2_to_l1_logs", - "type_info": "ByteaArray" - }, - { - "ordinal": 9, "name": "l2_to_l1_messages", "type_info": "ByteaArray" }, { - "ordinal": 10, + "ordinal": 9, "name": "used_contract_hashes", "type_info": "Jsonb" }, { - "ordinal": 11, + "ordinal": 10, "name": "compressed_initial_writes", "type_info": "Bytea" }, { - "ordinal": 12, + "ordinal": 11, "name": "compressed_repeated_writes", "type_info": "Bytea" }, { - "ordinal": 13, + "ordinal": 12, "name": "l2_l1_merkle_root", "type_info": "Bytea" }, { - "ordinal": 14, + "ordinal": 13, "name": "rollup_last_leaf_index", "type_info": "Int8" }, { - "ordinal": 15, + "ordinal": 14, "name": "zkporter_is_available", "type_info": "Bool" }, { - "ordinal": 16, + "ordinal": 15, "name": "bootloader_code_hash", "type_info": "Bytea" }, { - "ordinal": 17, + "ordinal": 16, "name": "default_aa_code_hash", "type_info": "Bytea" }, { - "ordinal": 18, + "ordinal": 17, "name": "aux_data_hash", "type_info": "Bytea" }, { - "ordinal": 19, + "ordinal": 18, "name": "pass_through_data_hash", "type_info": "Bytea" }, { - "ordinal": 20, + "ordinal": 19, "name": "meta_parameters_hash", "type_info": "Bytea" }, { - "ordinal": 21, + "ordinal": 20, "name": "protocol_version", "type_info": "Int4" }, { - "ordinal": 22, + "ordinal": 21, "name": "compressed_state_diffs", "type_info": "Bytea" }, { - "ordinal": 23, + "ordinal": 22, "name": "system_logs", "type_info": "ByteaArray" }, { - "ordinal": 24, + "ordinal": 23, "name": "events_queue_commitment", "type_info": "Bytea" }, { - "ordinal": 25, + "ordinal": 24, "name": "bootloader_initial_content_commitment", "type_info": "Bytea" }, { - "ordinal": 26, + "ordinal": 25, "name": "pubdata_input", "type_info": "Bytea" } @@ -158,7 +153,6 @@ true, false, false, - false, true, true, true, @@ -177,5 +171,5 @@ true ] }, - "hash": "5e5c279ed5f26c2465edf701fd7ecf7e45774cb5aa8b1d27bdecacc8de4956ea" + "hash": "b7cd7c40282c2ca2287eef93ee79c69a9e494bf1f873291b4ae7bf68b7e3c549" } diff --git a/core/lib/dal/.sqlx/query-71f82ea7c83cccab209e13ea388dbb6b0c35c756638588792ac9c1db221fef33.json b/core/lib/dal/.sqlx/query-cc4c740ec24e6845343adc3ce43588448fb534a75d2da0f54999f1befa17facc.json similarity index 65% rename from core/lib/dal/.sqlx/query-71f82ea7c83cccab209e13ea388dbb6b0c35c756638588792ac9c1db221fef33.json rename to core/lib/dal/.sqlx/query-cc4c740ec24e6845343adc3ce43588448fb534a75d2da0f54999f1befa17facc.json index afa7ac0e2111..5fdf9363a0f9 100644 --- a/core/lib/dal/.sqlx/query-71f82ea7c83cccab209e13ea388dbb6b0c35c756638588792ac9c1db221fef33.json +++ b/core/lib/dal/.sqlx/query-cc4c740ec24e6845343adc3ce43588448fb534a75d2da0f54999f1befa17facc.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT\n number,\n l1_batches.timestamp,\n l1_tx_count,\n l2_tx_count,\n bloom,\n priority_ops_onchain_data,\n hash,\n commitment,\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_merkle_root,\n rollup_last_leaf_index,\n zkporter_is_available,\n l1_batches.bootloader_code_hash,\n l1_batches.default_aa_code_hash,\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 ", + "query": "\n SELECT\n number,\n l1_batches.timestamp,\n l1_tx_count,\n l2_tx_count,\n bloom,\n priority_ops_onchain_data,\n hash,\n commitment,\n l2_to_l1_messages,\n used_contract_hashes,\n compressed_initial_writes,\n compressed_repeated_writes,\n l2_l1_merkle_root,\n rollup_last_leaf_index,\n zkporter_is_available,\n l1_batches.bootloader_code_hash,\n l1_batches.default_aa_code_hash,\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 ", "describe": { "columns": [ { @@ -45,96 +45,91 @@ }, { "ordinal": 8, - "name": "l2_to_l1_logs", - "type_info": "ByteaArray" - }, - { - "ordinal": 9, "name": "l2_to_l1_messages", "type_info": "ByteaArray" }, { - "ordinal": 10, + "ordinal": 9, "name": "used_contract_hashes", "type_info": "Jsonb" }, { - "ordinal": 11, + "ordinal": 10, "name": "compressed_initial_writes", "type_info": "Bytea" }, { - "ordinal": 12, + "ordinal": 11, "name": "compressed_repeated_writes", "type_info": "Bytea" }, { - "ordinal": 13, + "ordinal": 12, "name": "l2_l1_merkle_root", "type_info": "Bytea" }, { - "ordinal": 14, + "ordinal": 13, "name": "rollup_last_leaf_index", "type_info": "Int8" }, { - "ordinal": 15, + "ordinal": 14, "name": "zkporter_is_available", "type_info": "Bool" }, { - "ordinal": 16, + "ordinal": 15, "name": "bootloader_code_hash", "type_info": "Bytea" }, { - "ordinal": 17, + "ordinal": 16, "name": "default_aa_code_hash", "type_info": "Bytea" }, { - "ordinal": 18, + "ordinal": 17, "name": "aux_data_hash", "type_info": "Bytea" }, { - "ordinal": 19, + "ordinal": 18, "name": "pass_through_data_hash", "type_info": "Bytea" }, { - "ordinal": 20, + "ordinal": 19, "name": "meta_parameters_hash", "type_info": "Bytea" }, { - "ordinal": 21, + "ordinal": 20, "name": "protocol_version", "type_info": "Int4" }, { - "ordinal": 22, + "ordinal": 21, "name": "compressed_state_diffs", "type_info": "Bytea" }, { - "ordinal": 23, + "ordinal": 22, "name": "system_logs", "type_info": "ByteaArray" }, { - "ordinal": 24, + "ordinal": 23, "name": "events_queue_commitment", "type_info": "Bytea" }, { - "ordinal": 25, + "ordinal": 24, "name": "bootloader_initial_content_commitment", "type_info": "Bytea" }, { - "ordinal": 26, + "ordinal": 25, "name": "pubdata_input", "type_info": "Bytea" } @@ -158,7 +153,6 @@ true, false, false, - false, true, true, true, @@ -177,5 +171,5 @@ true ] }, - "hash": "71f82ea7c83cccab209e13ea388dbb6b0c35c756638588792ac9c1db221fef33" + "hash": "cc4c740ec24e6845343adc3ce43588448fb534a75d2da0f54999f1befa17facc" } diff --git a/core/lib/dal/.sqlx/query-f7bbf329c045055d85811968552e4d38c6631b37c2894c2ff16449e7a2b0c7a2.json b/core/lib/dal/.sqlx/query-de255be5d2e5ef215428e9a886e7c9dc036873c60b8b916ce8c446e310447b66.json similarity index 72% rename from core/lib/dal/.sqlx/query-f7bbf329c045055d85811968552e4d38c6631b37c2894c2ff16449e7a2b0c7a2.json rename to core/lib/dal/.sqlx/query-de255be5d2e5ef215428e9a886e7c9dc036873c60b8b916ce8c446e310447b66.json index acb2c7d3bdc5..8a492376557b 100644 --- a/core/lib/dal/.sqlx/query-f7bbf329c045055d85811968552e4d38c6631b37c2894c2ff16449e7a2b0c7a2.json +++ b/core/lib/dal/.sqlx/query-de255be5d2e5ef215428e9a886e7c9dc036873c60b8b916ce8c446e310447b66.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT\n number,\n timestamp,\n l1_tx_count,\n l2_tx_count,\n bloom,\n priority_ops_onchain_data,\n hash,\n commitment,\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_merkle_root,\n rollup_last_leaf_index,\n zkporter_is_available,\n bootloader_code_hash,\n default_aa_code_hash,\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 ", + "query": "\n SELECT\n number,\n timestamp,\n l1_tx_count,\n l2_tx_count,\n bloom,\n priority_ops_onchain_data,\n hash,\n commitment,\n l2_to_l1_messages,\n used_contract_hashes,\n compressed_initial_writes,\n compressed_repeated_writes,\n l2_l1_merkle_root,\n rollup_last_leaf_index,\n zkporter_is_available,\n bootloader_code_hash,\n default_aa_code_hash,\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 ", "describe": { "columns": [ { @@ -45,96 +45,91 @@ }, { "ordinal": 8, - "name": "l2_to_l1_logs", - "type_info": "ByteaArray" - }, - { - "ordinal": 9, "name": "l2_to_l1_messages", "type_info": "ByteaArray" }, { - "ordinal": 10, + "ordinal": 9, "name": "used_contract_hashes", "type_info": "Jsonb" }, { - "ordinal": 11, + "ordinal": 10, "name": "compressed_initial_writes", "type_info": "Bytea" }, { - "ordinal": 12, + "ordinal": 11, "name": "compressed_repeated_writes", "type_info": "Bytea" }, { - "ordinal": 13, + "ordinal": 12, "name": "l2_l1_merkle_root", "type_info": "Bytea" }, { - "ordinal": 14, + "ordinal": 13, "name": "rollup_last_leaf_index", "type_info": "Int8" }, { - "ordinal": 15, + "ordinal": 14, "name": "zkporter_is_available", "type_info": "Bool" }, { - "ordinal": 16, + "ordinal": 15, "name": "bootloader_code_hash", "type_info": "Bytea" }, { - "ordinal": 17, + "ordinal": 16, "name": "default_aa_code_hash", "type_info": "Bytea" }, { - "ordinal": 18, + "ordinal": 17, "name": "aux_data_hash", "type_info": "Bytea" }, { - "ordinal": 19, + "ordinal": 18, "name": "pass_through_data_hash", "type_info": "Bytea" }, { - "ordinal": 20, + "ordinal": 19, "name": "meta_parameters_hash", "type_info": "Bytea" }, { - "ordinal": 21, + "ordinal": 20, "name": "protocol_version", "type_info": "Int4" }, { - "ordinal": 22, + "ordinal": 21, "name": "compressed_state_diffs", "type_info": "Bytea" }, { - "ordinal": 23, + "ordinal": 22, "name": "system_logs", "type_info": "ByteaArray" }, { - "ordinal": 24, + "ordinal": 23, "name": "events_queue_commitment", "type_info": "Bytea" }, { - "ordinal": 25, + "ordinal": 24, "name": "bootloader_initial_content_commitment", "type_info": "Bytea" }, { - "ordinal": 26, + "ordinal": 25, "name": "pubdata_input", "type_info": "Bytea" } @@ -153,7 +148,6 @@ true, false, false, - false, true, true, true, @@ -172,5 +166,5 @@ true ] }, - "hash": "f7bbf329c045055d85811968552e4d38c6631b37c2894c2ff16449e7a2b0c7a2" + "hash": "de255be5d2e5ef215428e9a886e7c9dc036873c60b8b916ce8c446e310447b66" } diff --git a/core/lib/dal/.sqlx/query-f6c0b212fad536f46863ce3a6105249bd77b263c4fcef81689f9dcd155064a36.json b/core/lib/dal/.sqlx/query-f6c0b212fad536f46863ce3a6105249bd77b263c4fcef81689f9dcd155064a36.json new file mode 100644 index 000000000000..f916d0dddcef --- /dev/null +++ b/core/lib/dal/.sqlx/query-f6c0b212fad536f46863ce3a6105249bd77b263c4fcef81689f9dcd155064a36.json @@ -0,0 +1,40 @@ +{ + "db_name": "PostgreSQL", + "query": "\n SELECT\n number,\n l1_tx_count,\n l2_tx_count,\n timestamp\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 ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "number", + "type_info": "Int8" + }, + { + "ordinal": 1, + "name": "l1_tx_count", + "type_info": "Int4" + }, + { + "ordinal": 2, + "name": "l2_tx_count", + "type_info": "Int4" + }, + { + "ordinal": 3, + "name": "timestamp", + "type_info": "Int8" + } + ], + "parameters": { + "Left": [ + "Int4" + ] + }, + "nullable": [ + false, + false, + false, + false + ] + }, + "hash": "f6c0b212fad536f46863ce3a6105249bd77b263c4fcef81689f9dcd155064a36" +} diff --git a/core/lib/dal/.sqlx/query-fe501f86f4bf6c5b8ccc2e039a4eb09b538a67d1c39fda052c4f4ddb23ce0084.json b/core/lib/dal/.sqlx/query-fe501f86f4bf6c5b8ccc2e039a4eb09b538a67d1c39fda052c4f4ddb23ce0084.json deleted file mode 100644 index 5573cdd99530..000000000000 --- a/core/lib/dal/.sqlx/query-fe501f86f4bf6c5b8ccc2e039a4eb09b538a67d1c39fda052c4f4ddb23ce0084.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n SELECT\n l2_to_l1_logs\n FROM\n l1_batches\n WHERE\n number = $1\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "l2_to_l1_logs", - "type_info": "ByteaArray" - } - ], - "parameters": { - "Left": [ - "Int8" - ] - }, - "nullable": [ - false - ] - }, - "hash": "fe501f86f4bf6c5b8ccc2e039a4eb09b538a67d1c39fda052c4f4ddb23ce0084" -} diff --git a/core/lib/dal/src/blocks_dal.rs b/core/lib/dal/src/blocks_dal.rs index 2e59c2db50e4..6062dcefe89c 100644 --- a/core/lib/dal/src/blocks_dal.rs +++ b/core/lib/dal/src/blocks_dal.rs @@ -15,9 +15,13 @@ use zksync_db_connection::{ }; use zksync_types::{ aggregated_operations::AggregatedActionType, - block::{BlockGasCount, L1BatchHeader, L1BatchTreeData, L2BlockHeader, StorageOracleInfo}, + block::{ + BlockGasCount, L1BatchHeader, L1BatchStatistics, L1BatchTreeData, L2BlockHeader, + StorageOracleInfo, + }, circuit::CircuitStatistic, commitment::{L1BatchCommitmentArtifacts, L1BatchWithMetadata}, + l2_to_l1_log::UserL2ToL1Log, writes::TreeWrite, Address, L1BatchNumber, L2BlockNumber, ProtocolVersionId, H256, U256, }; @@ -27,6 +31,7 @@ use crate::{ models::{ parse_protocol_version, storage_block::{StorageL1Batch, StorageL1BatchHeader, StorageL2BlockHeader}, + storage_event::StorageL2ToL1Log, storage_oracle_info::DbStorageOracleInfo, }, Core, CoreDal, @@ -102,7 +107,7 @@ impl BlocksDal<'_, '_> { l1_batches "# ) - .instrument("get_sealed_block_number") + .instrument("get_sealed_l1_batch_number") .report_latency() .fetch_one(self.storage) .await?; @@ -158,7 +163,7 @@ impl BlocksDal<'_, '_> { hash IS NOT NULL "# ) - .instrument("get_last_block_number_with_tree_data") + .instrument("get_last_l1_batch_number_with_tree_data") .report_latency() .fetch_one(self.storage) .await?; @@ -245,28 +250,17 @@ impl BlocksDal<'_, '_> { Ok(row.number.map(|num| L1BatchNumber(num as u32))) } - pub async fn get_l1_batches_for_eth_tx_id( + pub async fn get_l1_batches_statistics_for_eth_tx_id( &mut self, eth_tx_id: u32, - ) -> DalResult> { - let l1_batches = sqlx::query_as!( - StorageL1BatchHeader, + ) -> DalResult> { + Ok(sqlx::query!( r#" SELECT number, l1_tx_count, l2_tx_count, - timestamp, - l2_to_l1_logs, - l2_to_l1_messages, - bloom, - priority_ops_onchain_data, - used_contract_hashes, - bootloader_code_hash, - default_aa_code_hash, - protocol_version, - system_logs, - pubdata_input + timestamp FROM l1_batches WHERE @@ -276,12 +270,18 @@ impl BlocksDal<'_, '_> { "#, eth_tx_id as i32 ) - .instrument("get_l1_batches_for_eth_tx_id") + .instrument("get_l1_batch_statistics_for_eth_tx_id") .with_arg("eth_tx_id", ð_tx_id) .fetch_all(self.storage) - .await?; - - Ok(l1_batches.into_iter().map(Into::into).collect()) + .await? + .into_iter() + .map(|row| L1BatchStatistics { + number: L1BatchNumber(row.number as u32), + timestamp: row.timestamp as u64, + l2_tx_count: row.l2_tx_count as u32, + l1_tx_count: row.l1_tx_count as u32, + }) + .collect()) } async fn get_storage_l1_batch( @@ -300,7 +300,6 @@ impl BlocksDal<'_, '_> { priority_ops_onchain_data, hash, commitment, - l2_to_l1_logs, l2_to_l1_messages, used_contract_hashes, compressed_initial_writes, @@ -337,7 +336,7 @@ impl BlocksDal<'_, '_> { &mut self, number: L1BatchNumber, ) -> DalResult> { - Ok(sqlx::query_as!( + let storage_l1_batch_header = sqlx::query_as!( StorageL1BatchHeader, r#" SELECT @@ -345,7 +344,6 @@ impl BlocksDal<'_, '_> { l1_tx_count, l2_tx_count, timestamp, - l2_to_l1_logs, l2_to_l1_messages, bloom, priority_ops_onchain_data, @@ -365,8 +363,18 @@ impl BlocksDal<'_, '_> { .instrument("get_l1_batch_header") .with_arg("number", &number) .fetch_optional(self.storage) - .await? - .map(Into::into)) + .await?; + + if let Some(storage_l1_batch_header) = storage_l1_batch_header { + let l2_to_l1_logs = self + .get_l2_to_l1_logs_for_batch::(number) + .await?; + return Ok(Some( + storage_l1_batch_header.into_l1_batch_header_with_logs(l2_to_l1_logs), + )); + } + + Ok(None) } /// Returns initial bootloader heap content for the specified L1 batch. @@ -555,11 +563,6 @@ impl BlocksDal<'_, '_> { .iter() .map(|data| data.clone().into()) .collect(); - let l2_to_l1_logs: Vec<_> = header - .l2_to_l1_logs - .iter() - .map(|log| log.0.to_bytes().to_vec()) - .collect(); let system_logs = header .system_logs .iter() @@ -581,7 +584,6 @@ impl BlocksDal<'_, '_> { l1_tx_count, l2_tx_count, timestamp, - l2_to_l1_logs, l2_to_l1_messages, bloom, priority_ops_onchain_data, @@ -623,7 +625,6 @@ impl BlocksDal<'_, '_> { $18, $19, $20, - $21, NOW(), NOW() ) @@ -632,7 +633,6 @@ impl BlocksDal<'_, '_> { i32::from(header.l1_tx_count), i32::from(header.l2_tx_count), header.timestamp as i64, - &l2_to_l1_logs, &header.l2_to_l1_messages, header.bloom.as_bytes(), &priority_onchain_data, @@ -988,8 +988,8 @@ impl BlocksDal<'_, '_> { pub async fn get_last_committed_to_eth_l1_batch( &mut self, ) -> DalResult> { - // We can get 0 block for the first transaction - let block = sqlx::query_as!( + // We can get 0 batch for the first transaction + let batch = sqlx::query_as!( StorageL1Batch, r#" SELECT @@ -1001,7 +1001,6 @@ impl BlocksDal<'_, '_> { priority_ops_onchain_data, hash, commitment, - l2_to_l1_logs, l2_to_l1_messages, used_contract_hashes, compressed_initial_writes, @@ -1036,12 +1035,12 @@ impl BlocksDal<'_, '_> { .instrument("get_last_committed_to_eth_l1_batch") .fetch_one(self.storage) .await?; - // genesis block is first generated without commitment, we should wait for the tree to set it. - if block.commitment.is_none() { + // genesis batch is first generated without commitment, we should wait for the tree to set it. + if batch.commitment.is_none() { return Ok(None); } - self.map_storage_l1_batch(block).await + self.map_storage_l1_batch(batch).await } /// Returns the number of the last L1 batch for which an Ethereum commit tx was sent and confirmed. @@ -1182,7 +1181,6 @@ impl BlocksDal<'_, '_> { priority_ops_onchain_data, hash, commitment, - l2_to_l1_logs, l2_to_l1_messages, used_contract_hashes, compressed_initial_writes, @@ -1228,16 +1226,16 @@ impl BlocksDal<'_, '_> { &mut self, raw_batches: Vec, ) -> anyhow::Result> { - let mut l1_batches = Vec::with_capacity(raw_batches.len()); + let mut l1_batches_with_metadata = Vec::with_capacity(raw_batches.len()); for raw_batch in raw_batches { - let block = self + let batch = self .map_storage_l1_batch(raw_batch) .await - .context("get_l1_batch_with_metadata()")? - .context("Block should be complete")?; - l1_batches.push(block); + .context("map_storage_l1_batch()")? + .context("Batch should be complete")?; + l1_batches_with_metadata.push(batch); } - Ok(l1_batches) + Ok(l1_batches_with_metadata) } /// This method returns batches that are committed on L1 and witness jobs for them are skipped. @@ -1245,12 +1243,12 @@ impl BlocksDal<'_, '_> { &mut self, limit: usize, ) -> anyhow::Result> { - let last_proved_block_number = self + let last_proved_batch_number = self .get_last_l1_batch_with_prove_tx() .await .context("get_last_l1_batch_with_prove_tx()")?; // Witness jobs can be processed out of order, so `WHERE l1_batches.number - row_number = $1` - // is used to avoid having gaps in the list of blocks to send dummy proofs for. + // is used to avoid having gaps in the list of batches to send dummy proofs for. let raw_batches = sqlx::query_as!( StorageL1Batch, r#" @@ -1263,7 +1261,6 @@ impl BlocksDal<'_, '_> { priority_ops_onchain_data, hash, commitment, - l2_to_l1_logs, l2_to_l1_messages, used_contract_hashes, compressed_initial_writes, @@ -1305,7 +1302,7 @@ impl BlocksDal<'_, '_> { WHERE number - ROW_NUMBER = $1 "#, - last_proved_block_number.0 as i32, + last_proved_batch_number.0 as i32, limit as i32 ) .instrument("get_skipped_for_proof_l1_batches") @@ -1337,7 +1334,6 @@ impl BlocksDal<'_, '_> { priority_ops_onchain_data, hash, commitment, - l2_to_l1_logs, l2_to_l1_messages, used_contract_hashes, compressed_initial_writes, @@ -1447,10 +1443,10 @@ impl BlocksDal<'_, '_> { .fetch_one(self.storage.conn()) .await?; - Ok(if let Some(max_ready_to_send_block) = row.max { - // If we found at least one ready to execute batch then we can simply return all blocks between - // the expected started point and the max ready to send block because we send them to the L1 sequentially. - assert!(max_ready_to_send_block >= expected_started_point); + Ok(if let Some(max_ready_to_send_batch) = row.max { + // If we found at least one ready to execute batch then we can simply return all batches between + // the expected started point and the max ready to send batch because we send them to the L1 sequentially. + assert!(max_ready_to_send_batch >= expected_started_point); sqlx::query_as!( StorageL1Batch, r#" @@ -1463,7 +1459,6 @@ impl BlocksDal<'_, '_> { priority_ops_onchain_data, hash, commitment, - l2_to_l1_logs, l2_to_l1_messages, used_contract_hashes, compressed_initial_writes, @@ -1493,13 +1488,13 @@ impl BlocksDal<'_, '_> { $3 "#, expected_started_point as i32, - max_ready_to_send_block, + max_ready_to_send_batch, limit as i32, ) .instrument("get_ready_for_execute_l1_batches") .with_arg( "numbers", - &(expected_started_point..=max_ready_to_send_block), + &(expected_started_point..=max_ready_to_send_batch), ) .with_arg("limit", &limit) .fetch_all(self.storage) @@ -1528,7 +1523,6 @@ impl BlocksDal<'_, '_> { priority_ops_onchain_data, hash, commitment, - l2_to_l1_logs, l2_to_l1_messages, used_contract_hashes, compressed_initial_writes, @@ -1603,7 +1597,6 @@ impl BlocksDal<'_, '_> { priority_ops_onchain_data, hash, commitment, - l2_to_l1_logs, l2_to_l1_messages, used_contract_hashes, compressed_initial_writes, @@ -1732,8 +1725,14 @@ impl BlocksDal<'_, '_> { let Some(l1_batch) = self.get_storage_l1_batch(number).await? else { return Ok(None); }; + + let l2_to_l1_logs = self + .get_l2_to_l1_logs_for_batch::(number) + .await?; Ok(Some(L1BatchWithOptionalMetadata { - header: l1_batch.clone().into(), + header: l1_batch + .clone() + .into_l1_batch_header_with_logs(l2_to_l1_logs), metadata: l1_batch.try_into(), })) } @@ -1774,10 +1773,19 @@ impl BlocksDal<'_, '_> { let unsorted_factory_deps = self .get_l1_batch_factory_deps(L1BatchNumber(storage_batch.number as u32)) .await?; - let header: L1BatchHeader = storage_batch.clone().into(); - let Ok(metadata) = storage_batch.try_into() else { + + let l2_to_l1_logs = self + .get_l2_to_l1_logs_for_batch::(L1BatchNumber( + storage_batch.number as u32, + )) + .await?; + + let Ok(metadata) = storage_batch.clone().try_into() else { return Ok(None); }; + + let header: L1BatchHeader = storage_batch.into_l1_batch_header_with_logs(l2_to_l1_logs); + let raw_published_bytecode_hashes = self .storage .events_dal() @@ -2273,6 +2281,48 @@ impl BlocksDal<'_, '_> { .map(|row| row.tree_writes_are_present) .unwrap_or(false)) } + + pub(crate) async fn get_l2_to_l1_logs_for_batch( + &mut self, + l1_batch_number: L1BatchNumber, + ) -> DalResult> + where + L: From, + { + let results = sqlx::query_as!( + StorageL2ToL1Log, + r#" + SELECT + miniblock_number, + log_index_in_miniblock, + log_index_in_tx, + tx_hash, + l1_batch_number, + shard_id, + is_service, + tx_index_in_miniblock, + tx_index_in_l1_batch, + sender, + key, + value + FROM + l2_to_l1_logs + JOIN miniblocks ON l2_to_l1_logs.miniblock_number = miniblocks.number + WHERE + l1_batch_number = $1 + ORDER BY + miniblock_number, + log_index_in_miniblock + "#, + i64::from(l1_batch_number.0) + ) + .instrument("get_l2_to_l1_logs_by_number") + .with_arg("l1_batch_number", &l1_batch_number) + .fetch_all(self.storage) + .await?; + + Ok(results.into_iter().map(L::from).collect()) + } } /// These methods should only be used for tests. @@ -2360,13 +2410,13 @@ impl BlocksDal<'_, '_> { #[cfg(test)] mod tests { use zksync_contracts::BaseSystemContractsHashes; - use zksync_types::{ - l2_to_l1_log::{L2ToL1Log, UserL2ToL1Log}, - Address, ProtocolVersion, ProtocolVersionId, - }; + use zksync_types::{tx::IncludedTxLocation, Address, ProtocolVersion, ProtocolVersionId}; use super::*; - use crate::{tests::create_l1_batch_header, ConnectionPool, Core, CoreDal}; + use crate::{ + tests::{create_l1_batch_header, create_l2_block_header, create_l2_to_l1_log}, + ConnectionPool, Core, CoreDal, + }; async fn save_mock_eth_tx(action_type: AggregatedActionType, conn: &mut Connection<'_, Core>) { conn.eth_sender_dal() @@ -2379,20 +2429,20 @@ mod tests { let mut header = create_l1_batch_header(1); header.l1_tx_count = 3; header.l2_tx_count = 5; - header.l2_to_l1_logs.push(UserL2ToL1Log(L2ToL1Log { - shard_id: 0, - is_service: false, - tx_number_in_block: 2, - sender: Address::repeat_byte(2), - key: H256::repeat_byte(3), - value: H256::zero(), - })); + header.l2_to_l1_logs.push(create_l2_to_l1_log(0, 0)); header.l2_to_l1_messages.push(vec![22; 22]); header.l2_to_l1_messages.push(vec![33; 33]); header } + async fn insert_mock_l1_batch_header(conn: &mut Connection<'_, Core>, header: &L1BatchHeader) { + conn.blocks_dal() + .insert_mock_l1_batch(header) + .await + .unwrap(); + } + #[tokio::test] async fn set_tx_id_works_correctly() { let pool = ConnectionPool::::test_pool().await; @@ -2403,10 +2453,9 @@ mod tests { .await .unwrap(); - conn.blocks_dal() - .insert_mock_l1_batch(&mock_l1_batch_header()) - .await - .unwrap(); + let header = mock_l1_batch_header(); + + insert_mock_l1_batch_header(&mut conn, &header).await; save_mock_eth_tx(AggregatedActionType::Commit, &mut conn).await; save_mock_eth_tx(AggregatedActionType::PublishProofOnchain, &mut conn).await; @@ -2477,6 +2526,7 @@ mod tests { async fn loading_l1_batch_header() { let pool = ConnectionPool::::test_pool().await; let mut conn = pool.connection().await.unwrap(); + conn.protocol_versions_dal() .save_protocol_version_with_tx(&ProtocolVersion::default()) .await @@ -2484,8 +2534,30 @@ mod tests { let header = mock_l1_batch_header(); + insert_mock_l1_batch_header(&mut conn, &header).await; + + let l2_block_header = create_l2_block_header(1); + conn.blocks_dal() - .insert_mock_l1_batch(&header) + .insert_l2_block(&l2_block_header) + .await + .unwrap(); + + conn.blocks_dal() + .mark_l2_blocks_as_executed_in_l1_batch(L1BatchNumber(1)) + .await + .unwrap(); + + let first_location = IncludedTxLocation { + tx_hash: H256([1; 32]), + tx_index_in_l2_block: 0, + tx_initiator_address: Address::repeat_byte(2), + }; + let first_logs = [create_l2_to_l1_log(0, 0)]; + + let all_logs = vec![(first_location, first_logs.iter().collect())]; + conn.events_dal() + .save_user_l2_to_l1_logs(L2BlockNumber(1), &all_logs) .await .unwrap(); @@ -2495,6 +2567,7 @@ mod tests { .await .unwrap() .unwrap(); + assert_eq!(loaded_header.number, header.number); assert_eq!(loaded_header.timestamp, header.timestamp); assert_eq!(loaded_header.l1_tx_count, header.l1_tx_count); diff --git a/core/lib/dal/src/blocks_web3_dal.rs b/core/lib/dal/src/blocks_web3_dal.rs index b1637d2124b5..2957701f9e23 100644 --- a/core/lib/dal/src/blocks_web3_dal.rs +++ b/core/lib/dal/src/blocks_web3_dal.rs @@ -21,7 +21,7 @@ use crate::{ }, storage_transaction::CallTrace, }, - Core, + Core, CoreDal, }; #[derive(Debug)] @@ -424,28 +424,10 @@ impl BlocksWeb3Dal<'_, '_> { &mut self, l1_batch_number: L1BatchNumber, ) -> DalResult> { - let raw_logs = sqlx::query!( - r#" - SELECT - l2_to_l1_logs - FROM - l1_batches - WHERE - number = $1 - "#, - i64::from(l1_batch_number.0) - ) - .instrument("get_l2_to_l1_logs") - .with_arg("l1_batch_number", &l1_batch_number) - .fetch_optional(self.storage) - .await? - .map(|row| row.l2_to_l1_logs) - .unwrap_or_default(); - - Ok(raw_logs - .into_iter() - .map(|bytes| L2ToL1Log::from_slice(&bytes)) - .collect()) + self.storage + .blocks_dal() + .get_l2_to_l1_logs_for_batch::(l1_batch_number) + .await } pub async fn get_l1_batch_number_of_l2_block( diff --git a/core/lib/dal/src/events_dal.rs b/core/lib/dal/src/events_dal.rs index ebe159577bb2..7bbffb23e320 100644 --- a/core/lib/dal/src/events_dal.rs +++ b/core/lib/dal/src/events_dal.rs @@ -307,7 +307,6 @@ impl EventsDal<'_, '_> { log_index_in_miniblock, log_index_in_tx, tx_hash, - NULL::bytea AS "block_hash", NULL::BIGINT AS "l1_batch_number?", shard_id, is_service, @@ -416,7 +415,10 @@ mod tests { use zksync_types::{Address, L1BatchNumber, ProtocolVersion}; use super::*; - use crate::{tests::create_l2_block_header, ConnectionPool, Core}; + use crate::{ + tests::{create_l2_block_header, create_l2_to_l1_log}, + ConnectionPool, Core, + }; fn create_vm_event(index: u8, topic_count: u8) -> VmEvent { assert!(topic_count <= 4); @@ -498,17 +500,6 @@ mod tests { } } - fn create_l2_to_l1_log(tx_number_in_block: u16, index: u8) -> UserL2ToL1Log { - UserL2ToL1Log(L2ToL1Log { - shard_id: 0, - is_service: false, - tx_number_in_block, - sender: Address::repeat_byte(index), - key: H256::from_low_u64_be(u64::from(index)), - value: H256::repeat_byte(index), - }) - } - #[tokio::test] async fn storing_l2_to_l1_logs() { let pool = ConnectionPool::::test_pool().await; diff --git a/core/lib/dal/src/models/storage_block.rs b/core/lib/dal/src/models/storage_block.rs index 95780e667784..be8b4e4152b5 100644 --- a/core/lib/dal/src/models/storage_block.rs +++ b/core/lib/dal/src/models/storage_block.rs @@ -38,7 +38,6 @@ pub(crate) struct StorageL1BatchHeader { pub timestamp: i64, pub l1_tx_count: i32, pub l2_tx_count: i32, - pub l2_to_l1_logs: Vec>, pub l2_to_l1_messages: Vec>, pub bloom: Vec, pub priority_ops_onchain_data: Vec>, @@ -55,38 +54,40 @@ pub(crate) struct StorageL1BatchHeader { pub pubdata_input: Option>, } -impl From for L1BatchHeader { - fn from(l1_batch: StorageL1BatchHeader) -> Self { - let priority_ops_onchain_data: Vec<_> = l1_batch +impl StorageL1BatchHeader { + pub fn into_l1_batch_header_with_logs( + self, + l2_to_l1_logs: Vec, + ) -> L1BatchHeader { + let priority_ops_onchain_data: Vec<_> = self .priority_ops_onchain_data .into_iter() .map(|raw_data| raw_data.into()) .collect(); - let system_logs = convert_l2_to_l1_logs(l1_batch.system_logs); - let user_l2_to_l1_logs = convert_l2_to_l1_logs(l1_batch.l2_to_l1_logs); + let system_logs = convert_l2_to_l1_logs(self.system_logs); L1BatchHeader { - number: L1BatchNumber(l1_batch.number as u32), - timestamp: l1_batch.timestamp as u64, + number: L1BatchNumber(self.number as u32), + timestamp: self.timestamp as u64, priority_ops_onchain_data, - l1_tx_count: l1_batch.l1_tx_count as u16, - l2_tx_count: l1_batch.l2_tx_count as u16, - l2_to_l1_logs: user_l2_to_l1_logs.into_iter().map(UserL2ToL1Log).collect(), - l2_to_l1_messages: l1_batch.l2_to_l1_messages, + l1_tx_count: self.l1_tx_count as u16, + l2_tx_count: self.l2_tx_count as u16, + l2_to_l1_logs, + l2_to_l1_messages: self.l2_to_l1_messages, - bloom: H2048::from_slice(&l1_batch.bloom), - used_contract_hashes: serde_json::from_value(l1_batch.used_contract_hashes) + bloom: H2048::from_slice(&self.bloom), + used_contract_hashes: serde_json::from_value(self.used_contract_hashes) .expect("invalid value for used_contract_hashes in the DB"), base_system_contracts_hashes: convert_base_system_contracts_hashes( - l1_batch.bootloader_code_hash, - l1_batch.default_aa_code_hash, + self.bootloader_code_hash, + self.default_aa_code_hash, ), system_logs: system_logs.into_iter().map(SystemL2ToL1Log).collect(), - protocol_version: l1_batch + protocol_version: self .protocol_version .map(|v| (v as u16).try_into().unwrap()), - pubdata_input: l1_batch.pubdata_input, + pubdata_input: self.pubdata_input, } } } @@ -121,7 +122,6 @@ pub(crate) struct StorageL1Batch { pub l1_tx_count: i32, pub l2_tx_count: i32, pub bloom: Vec, - pub l2_to_l1_logs: Vec>, pub priority_ops_onchain_data: Vec>, pub hash: Option>, @@ -149,38 +149,40 @@ pub(crate) struct StorageL1Batch { pub pubdata_input: Option>, } -impl From for L1BatchHeader { - fn from(l1_batch: StorageL1Batch) -> Self { - let priority_ops_onchain_data: Vec<_> = l1_batch +impl StorageL1Batch { + pub fn into_l1_batch_header_with_logs( + self, + l2_to_l1_logs: Vec, + ) -> L1BatchHeader { + let priority_ops_onchain_data: Vec<_> = self .priority_ops_onchain_data .into_iter() .map(Vec::into) .collect(); - let system_logs = convert_l2_to_l1_logs(l1_batch.system_logs); - let user_l2_to_l1_logs = convert_l2_to_l1_logs(l1_batch.l2_to_l1_logs); + let system_logs = convert_l2_to_l1_logs(self.system_logs); L1BatchHeader { - number: L1BatchNumber(l1_batch.number as u32), - timestamp: l1_batch.timestamp as u64, + number: L1BatchNumber(self.number as u32), + timestamp: self.timestamp as u64, priority_ops_onchain_data, - l1_tx_count: l1_batch.l1_tx_count as u16, - l2_tx_count: l1_batch.l2_tx_count as u16, - l2_to_l1_logs: user_l2_to_l1_logs.into_iter().map(UserL2ToL1Log).collect(), - l2_to_l1_messages: l1_batch.l2_to_l1_messages, + l1_tx_count: self.l1_tx_count as u16, + l2_tx_count: self.l2_tx_count as u16, + l2_to_l1_logs, + l2_to_l1_messages: self.l2_to_l1_messages, - bloom: H2048::from_slice(&l1_batch.bloom), - used_contract_hashes: serde_json::from_value(l1_batch.used_contract_hashes) + bloom: H2048::from_slice(&self.bloom), + used_contract_hashes: serde_json::from_value(self.used_contract_hashes) .expect("invalid value for used_contract_hashes in the DB"), base_system_contracts_hashes: convert_base_system_contracts_hashes( - l1_batch.bootloader_code_hash, - l1_batch.default_aa_code_hash, + self.bootloader_code_hash, + self.default_aa_code_hash, ), system_logs: system_logs.into_iter().map(SystemL2ToL1Log).collect(), - protocol_version: l1_batch + protocol_version: self .protocol_version .map(|v| (v as u16).try_into().unwrap()), - pubdata_input: l1_batch.pubdata_input, + pubdata_input: self.pubdata_input, } } } diff --git a/core/lib/dal/src/models/storage_event.rs b/core/lib/dal/src/models/storage_event.rs index 98e53ae374ef..f741e2aa1202 100644 --- a/core/lib/dal/src/models/storage_event.rs +++ b/core/lib/dal/src/models/storage_event.rs @@ -1,5 +1,6 @@ use zksync_types::{ - api::{L2ToL1Log, Log}, + api, + l2_to_l1_log::{self, UserL2ToL1Log}, web3::{Bytes, Index}, Address, H256, U256, U64, }; @@ -21,8 +22,8 @@ pub struct StorageWeb3Log { pub event_index_in_tx: i32, } -impl From for Log { - fn from(log: StorageWeb3Log) -> Log { +impl From for api::Log { + fn from(log: StorageWeb3Log) -> api::Log { let topics = vec![log.topic1, log.topic2, log.topic3, log.topic4] .into_iter() .filter_map(|topic| { @@ -33,7 +34,7 @@ impl From for Log { } }) .collect(); - Log { + api::Log { address: Address::from_slice(&log.address), topics, data: Bytes(log.value), @@ -52,7 +53,6 @@ impl From for Log { #[derive(sqlx::FromRow, Debug, Clone)] pub struct StorageL2ToL1Log { - pub block_hash: Option>, pub miniblock_number: i64, pub l1_batch_number: Option, pub log_index_in_miniblock: i32, @@ -67,10 +67,10 @@ pub struct StorageL2ToL1Log { pub value: Vec, } -impl From for L2ToL1Log { - fn from(log: StorageL2ToL1Log) -> L2ToL1Log { - L2ToL1Log { - block_hash: log.block_hash.map(|hash| H256::from_slice(&hash)), +impl From for api::L2ToL1Log { + fn from(log: StorageL2ToL1Log) -> api::L2ToL1Log { + api::L2ToL1Log { + block_hash: None, block_number: (log.miniblock_number as u32).into(), l1_batch_number: (log.l1_batch_number).map(|n| (n as u32).into()), log_index: (log.log_index_in_miniblock as u32).into(), @@ -86,3 +86,22 @@ impl From for L2ToL1Log { } } } + +impl From for l2_to_l1_log::L2ToL1Log { + fn from(log: StorageL2ToL1Log) -> l2_to_l1_log::L2ToL1Log { + l2_to_l1_log::L2ToL1Log { + shard_id: (log.shard_id as u32).try_into().unwrap(), + is_service: log.is_service, + tx_number_in_block: (log.tx_index_in_l1_batch as u32).try_into().unwrap(), + sender: Address::from_slice(&log.sender), + key: H256::from_slice(&log.key), + value: H256::from_slice(&log.value), + } + } +} + +impl From for l2_to_l1_log::UserL2ToL1Log { + fn from(log: StorageL2ToL1Log) -> l2_to_l1_log::UserL2ToL1Log { + UserL2ToL1Log(log.into()) + } +} diff --git a/core/lib/dal/src/pruning_dal/tests.rs b/core/lib/dal/src/pruning_dal/tests.rs index 1c3b1edcbd42..0999e2be1642 100644 --- a/core/lib/dal/src/pruning_dal/tests.rs +++ b/core/lib/dal/src/pruning_dal/tests.rs @@ -2,18 +2,16 @@ use std::ops; use zksync_db_connection::connection::Connection; use zksync_types::{ - fee::TransactionExecutionMetrics, - l2_to_l1_log::{L2ToL1Log, UserL2ToL1Log}, - tx::IncludedTxLocation, - AccountTreeId, Address, L1BatchNumber, L2BlockNumber, L2ChainId, ProtocolVersion, - ProtocolVersionId, StorageKey, StorageLog, H256, + fee::TransactionExecutionMetrics, tx::IncludedTxLocation, AccountTreeId, Address, + L1BatchNumber, L2BlockNumber, L2ChainId, ProtocolVersion, ProtocolVersionId, StorageKey, + StorageLog, H256, }; use super::*; use crate::{ storage_logs_dal::DbStorageLog, tests::{ - create_l1_batch_header, create_l2_block_header, mock_execution_result, mock_l2_to_l1_log, + create_l1_batch_header, create_l2_block_header, create_l2_to_l1_log, mock_execution_result, mock_l2_transaction, mock_vm_event, }, ConnectionPool, Core, CoreDal, @@ -42,16 +40,16 @@ async fn insert_l2_to_l1_logs(conn: &mut Connection<'_, Core>, l2_block_number: tx_index_in_l2_block: 0, tx_initiator_address: Address::default(), }; - let first_logs = [mock_l2_to_l1_log(), mock_l2_to_l1_log()]; + let first_logs = [create_l2_to_l1_log(0, 0), create_l2_to_l1_log(0, 0)]; let second_location = IncludedTxLocation { tx_hash: H256([2; 32]), tx_index_in_l2_block: 1, tx_initiator_address: Address::default(), }; let second_logs = vec![ - mock_l2_to_l1_log(), - mock_l2_to_l1_log(), - mock_l2_to_l1_log(), + create_l2_to_l1_log(0, 0), + create_l2_to_l1_log(0, 0), + create_l2_to_l1_log(0, 0), ]; let all_logs = vec![ (first_location, first_logs.iter().collect()), @@ -90,14 +88,7 @@ async fn insert_l1_batch(conn: &mut Connection<'_, Core>, l1_batch_number: L1Bat let mut header = create_l1_batch_header(*l1_batch_number); header.l1_tx_count = 3; header.l2_tx_count = 5; - header.l2_to_l1_logs.push(UserL2ToL1Log(L2ToL1Log { - shard_id: 0, - is_service: false, - tx_number_in_block: 2, - sender: Address::repeat_byte(2), - key: H256::repeat_byte(3), - value: H256::zero(), - })); + header.l2_to_l1_logs.push(create_l2_to_l1_log(2, 2)); header.l2_to_l1_messages.push(vec![22; 22]); header.l2_to_l1_messages.push(vec![33; 33]); diff --git a/core/lib/dal/src/tests/mod.rs b/core/lib/dal/src/tests/mod.rs index d6ffde594323..11f88ba8a70b 100644 --- a/core/lib/dal/src/tests/mod.rs +++ b/core/lib/dal/src/tests/mod.rs @@ -183,14 +183,14 @@ pub(crate) fn mock_vm_event(index: u8) -> VmEvent { } } -pub(crate) fn mock_l2_to_l1_log() -> UserL2ToL1Log { +pub(crate) fn create_l2_to_l1_log(tx_number_in_block: u16, index: u8) -> UserL2ToL1Log { UserL2ToL1Log(L2ToL1Log { shard_id: 0, is_service: false, - tx_number_in_block: 0, - sender: Address::repeat_byte(0), - key: H256::from_low_u64_be(0), - value: H256::repeat_byte(0), + tx_number_in_block, + sender: Address::repeat_byte(index), + key: H256::from_low_u64_be(u64::from(index)), + value: H256::repeat_byte(index), }) } diff --git a/core/lib/types/src/block.rs b/core/lib/types/src/block.rs index 221b9b4d63ff..bc13bed457bf 100644 --- a/core/lib/types/src/block.rs +++ b/core/lib/types/src/block.rs @@ -30,6 +30,14 @@ impl DeployedContract { } } +/// Holder for l1 batches data, used in eth sender metrics +pub struct L1BatchStatistics { + pub number: L1BatchNumber, + pub timestamp: u64, + pub l2_tx_count: u32, + pub l1_tx_count: u32, +} + /// Holder for the block metadata that is not available from transactions themselves. #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] pub struct L1BatchHeader { diff --git a/core/lib/types/src/commitment/tests/post_boojum_1_4_1_test.json b/core/lib/types/src/commitment/tests/post_boojum_1_4_1_test.json index ab260f4011de..c5eccbce038a 100644 --- a/core/lib/types/src/commitment/tests/post_boojum_1_4_1_test.json +++ b/core/lib/types/src/commitment/tests/post_boojum_1_4_1_test.json @@ -81,38 +81,9 @@ "address": "0x000000000000000000000000000000000000800a", "key": "0x1", "derived_key": [ - 113, - 233, - 23, - 33, - 249, - 145, - 133, - 118, - 215, - 96, - 240, - 47, - 3, - 202, - 196, - 124, - 111, - 64, - 3, - 49, - 96, - 49, - 132, - 142, - 60, - 29, - 153, - 230, - 232, - 58, - 71, - 67 + 113, 233, 23, 33, 249, 145, 133, 118, 215, 96, 240, 47, 3, 202, 196, + 124, 111, 64, 3, 49, 96, 49, 132, 142, 60, 29, 153, 230, 232, 58, + 71, 67 ], "enumeration_index": 49, "initial_value": "0x18776f28c303800", @@ -122,38 +93,9 @@ "address": "0x000000000000000000000000000000000000800a", "key": "0x294a00337abeee2b3cd948ffeed92231e2a3acc2eb11210400e0aa9557f23e26", "derived_key": [ - 45, - 90, - 105, - 98, - 204, - 206, - 229, - 212, - 173, - 180, - 138, - 54, - 187, - 191, - 68, - 58, - 83, - 23, - 33, - 72, - 67, - 129, - 18, - 89, - 55, - 243, - 0, - 26, - 197, - 255, - 135, - 91 + 45, 90, 105, 98, 204, 206, 229, 212, 173, 180, 138, 54, 187, 191, + 68, 58, 83, 23, 33, 72, 67, 129, 18, 89, 55, 243, 0, 26, 197, 255, + 135, 91 ], "enumeration_index": 50, "initial_value": "0xf5559e28fd66c0", @@ -163,38 +105,9 @@ "address": "0x000000000000000000000000000000000000800a", "key": "0xeaa2b2fbf0b42c559059e5e9510edc15755f1c1883f0e41d5ba5f9aea4ac201a", "derived_key": [ - 141, - 97, - 126, - 192, - 90, - 203, - 191, - 95, - 226, - 69, - 41, - 166, - 75, - 35, - 133, - 169, - 106, - 173, - 67, - 240, - 155, - 225, - 173, - 169, - 44, - 112, - 64, - 49, - 220, - 193, - 72, - 27 + 141, 97, 126, 192, 90, 203, 191, 95, 226, 69, 41, 166, 75, 35, 133, + 169, 106, 173, 67, 240, 155, 225, 173, 169, 44, 112, 64, 49, 220, + 193, 72, 27 ], "enumeration_index": 0, "initial_value": "0x0", @@ -204,38 +117,9 @@ "address": "0x000000000000000000000000000000000000800b", "key": "0x7", "derived_key": [ - 18, - 59, - 175, - 197, - 134, - 247, - 119, - 100, - 72, - 140, - 210, - 76, - 106, - 119, - 84, - 110, - 90, - 15, - 232, - 189, - 251, - 79, - 162, - 3, - 207, - 175, - 252, - 54, - 204, - 228, - 221, - 91 + 18, 59, 175, 197, 134, 247, 119, 100, 72, 140, 210, 76, 106, 119, + 84, 110, 90, 15, 232, 189, 251, 79, 162, 3, 207, 175, 252, 54, 204, + 228, 221, 91 ], "enumeration_index": 53, "initial_value": "0x100000000000000000000000065c22e3e", @@ -245,38 +129,9 @@ "address": "0x000000000000000000000000000000000000800b", "key": "0x9", "derived_key": [ - 142, - 125, - 208, - 106, - 197, - 183, - 59, - 71, - 59, - 230, - 188, - 90, - 81, - 3, - 15, - 76, - 116, - 55, - 101, - 124, - 183, - 178, - 155, - 243, - 118, - 197, - 100, - 184, - 209, - 103, - 90, - 94 + 142, 125, 208, 106, 197, 183, 59, 71, 59, 230, 188, 90, 81, 3, 15, + 76, 116, 55, 101, 124, 183, 178, 155, 243, 118, 197, 100, 184, 209, + 103, 90, 94 ], "enumeration_index": 54, "initial_value": "0x200000000000000000000000065c22e3f", @@ -286,38 +141,9 @@ "address": "0x000000000000000000000000000000000000800b", "key": "0xd", "derived_key": [ - 235, - 221, - 239, - 221, - 164, - 142, - 178, - 170, - 127, - 102, - 236, - 247, - 148, - 10, - 40, - 14, - 158, - 243, - 251, - 46, - 149, - 219, - 9, - 149, - 83, - 132, - 64, - 166, - 42, - 247, - 152, - 97 + 235, 221, 239, 221, 164, 142, 178, 170, 127, 102, 236, 247, 148, 10, + 40, 14, 158, 243, 251, 46, 149, 219, 9, 149, 83, 132, 64, 166, 42, + 247, 152, 97 ], "enumeration_index": 0, "initial_value": "0x0", @@ -327,38 +153,9 @@ "address": "0x000000000000000000000000000000000000800b", "key": "0xe", "derived_key": [ - 70, - 64, - 215, - 56, - 69, - 54, - 78, - 198, - 145, - 246, - 222, - 251, - 96, - 106, - 58, - 114, - 253, - 165, - 215, - 173, - 51, - 209, - 125, - 4, - 153, - 90, - 142, - 37, - 44, - 74, - 6, - 216 + 70, 64, 215, 56, 69, 54, 78, 198, 145, 246, 222, 251, 96, 106, 58, + 114, 253, 165, 215, 173, 51, 209, 125, 4, 153, 90, 142, 37, 44, 74, + 6, 216 ], "enumeration_index": 0, "initial_value": "0x0", @@ -368,38 +165,9 @@ "address": "0x000000000000000000000000000000000000800b", "key": "0x10c", "derived_key": [ - 121, - 9, - 53, - 136, - 208, - 232, - 71, - 239, - 167, - 58, - 16, - 206, - 32, - 228, - 121, - 159, - 177, - 228, - 102, - 66, - 214, - 86, - 23, - 199, - 229, - 33, - 63, - 160, - 73, - 137, - 217, - 45 + 121, 9, 53, 136, 208, 232, 71, 239, 167, 58, 16, 206, 32, 228, 121, + 159, 177, 228, 102, 66, 214, 86, 23, 199, 229, 33, 63, 160, 73, 137, + 217, 45 ], "enumeration_index": 57, "initial_value": "0x200000000000000000000000065c22e3f", @@ -409,38 +177,9 @@ "address": "0x000000000000000000000000000000000000800b", "key": "0xad67d757c34507f157cacfa2e3153e9f260a2244f30428821be7be64587ac55f", "derived_key": [ - 12, - 194, - 74, - 180, - 47, - 190, - 197, - 49, - 125, - 155, - 26, - 44, - 164, - 124, - 169, - 185, - 59, - 158, - 195, - 109, - 121, - 142, - 253, - 124, - 218, - 167, - 57, - 36, - 22, - 48, - 203, - 70 + 12, 194, 74, 180, 47, 190, 197, 49, 125, 155, 26, 44, 164, 124, 169, + 185, 59, 158, 195, 109, 121, 142, 253, 124, 218, 167, 57, 36, 22, + 48, 203, 70 ], "enumeration_index": 0, "initial_value": "0x0", @@ -451,7 +190,10 @@ "events_queue_commitment": "0x6193a5098eb140796387bdf40700a3855eeb010474b5478f30bf917172c67883", "bootloader_initial_content_commitment": "0xf031b4491c37f20516c4ebf428f4765156409f67089e64772f4106fd2d9f3351" }, - "blob_commitments": ["0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000"] + "blob_commitments": [ + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000" + ] } }, "pass_through_data": { @@ -480,347 +222,40 @@ }, "system_logs_linear_hash": "0x3fc3c24217a2f1e09715eb3fa07327bec6818799a847175174ae027525519eb6", "state_diffs_compressed": [ - 1, - 0, - 1, - 72, - 4, - 0, - 4, - 141, - 97, - 126, - 192, - 90, - 203, - 191, - 95, - 226, - 69, - 41, - 166, - 75, - 35, - 133, - 169, - 106, - 173, - 67, - 240, - 155, - 225, - 173, - 169, - 44, - 112, - 64, - 49, - 220, - 193, - 72, - 27, - 65, - 111, - 5, - 225, - 147, - 53, - 50, - 134, - 160, - 235, - 221, - 239, - 221, - 164, - 142, - 178, - 170, - 127, - 102, - 236, - 247, - 148, - 10, - 40, - 14, - 158, - 243, - 251, - 46, - 149, - 219, - 9, - 149, - 83, - 132, - 64, - 166, - 42, - 247, - 152, - 97, - 0, - 235, - 190, - 96, - 156, - 211, - 204, - 209, - 31, - 39, - 62, - 185, - 67, - 116, - 214, - 211, - 162, - 247, - 133, - 108, - 95, - 16, - 57, - 220, - 72, - 119, - 198, - 163, - 52, - 24, - 138, - 199, - 193, - 70, - 64, - 215, - 56, - 69, - 54, - 78, - 198, - 145, - 246, - 222, - 251, - 96, - 106, - 58, - 114, - 253, - 165, - 215, - 173, - 51, - 209, - 125, - 4, - 153, - 90, - 142, - 37, - 44, - 74, - 6, - 216, - 0, - 112, - 142, - 127, - 207, - 104, - 235, - 171, - 108, - 135, - 50, - 38, - 134, - 202, - 196, - 188, - 219, - 95, - 43, - 212, - 199, - 31, - 51, - 123, - 24, - 209, - 71, - 253, - 154, - 108, - 68, - 173, - 19, - 12, - 194, - 74, - 180, - 47, - 190, - 197, - 49, - 125, - 155, - 26, - 44, - 164, - 124, - 169, - 185, - 59, - 158, - 195, - 109, - 121, - 142, - 253, - 124, - 218, - 167, - 57, - 36, - 22, - 48, - 203, - 70, - 0, - 85, - 97, - 141, - 181, - 255, - 36, - 174, - 228, - 210, - 54, - 146, - 27, - 111, - 66, - 114, - 16, - 17, - 97, - 19, - 113, - 21, - 163, - 180, - 196, - 166, - 95, - 134, - 119, - 177, - 36, - 192, - 28, - 0, - 0, - 0, - 49, - 65, - 111, - 6, - 45, - 144, - 62, - 129, - 207, - 96, - 0, - 0, - 0, - 50, - 49, - 75, - 253, - 9, - 79, - 72, - 192, - 0, - 0, - 0, - 53, - 137, - 1, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 1, - 66, - 0, - 0, - 0, - 54, - 137, - 2, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 1, - 66, - 0, - 0, - 0, - 57, - 137, - 2, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 1, - 66 + 1, 0, 1, 72, 4, 0, 4, 141, 97, 126, 192, 90, 203, 191, 95, 226, 69, 41, + 166, 75, 35, 133, 169, 106, 173, 67, 240, 155, 225, 173, 169, 44, 112, + 64, 49, 220, 193, 72, 27, 65, 111, 5, 225, 147, 53, 50, 134, 160, 235, + 221, 239, 221, 164, 142, 178, 170, 127, 102, 236, 247, 148, 10, 40, 14, + 158, 243, 251, 46, 149, 219, 9, 149, 83, 132, 64, 166, 42, 247, 152, 97, + 0, 235, 190, 96, 156, 211, 204, 209, 31, 39, 62, 185, 67, 116, 214, 211, + 162, 247, 133, 108, 95, 16, 57, 220, 72, 119, 198, 163, 52, 24, 138, + 199, 193, 70, 64, 215, 56, 69, 54, 78, 198, 145, 246, 222, 251, 96, 106, + 58, 114, 253, 165, 215, 173, 51, 209, 125, 4, 153, 90, 142, 37, 44, 74, + 6, 216, 0, 112, 142, 127, 207, 104, 235, 171, 108, 135, 50, 38, 134, + 202, 196, 188, 219, 95, 43, 212, 199, 31, 51, 123, 24, 209, 71, 253, + 154, 108, 68, 173, 19, 12, 194, 74, 180, 47, 190, 197, 49, 125, 155, 26, + 44, 164, 124, 169, 185, 59, 158, 195, 109, 121, 142, 253, 124, 218, 167, + 57, 36, 22, 48, 203, 70, 0, 85, 97, 141, 181, 255, 36, 174, 228, 210, + 54, 146, 27, 111, 66, 114, 16, 17, 97, 19, 113, 21, 163, 180, 196, 166, + 95, 134, 119, 177, 36, 192, 28, 0, 0, 0, 49, 65, 111, 6, 45, 144, 62, + 129, 207, 96, 0, 0, 0, 50, 49, 75, 253, 9, 79, 72, 192, 0, 0, 0, 53, + 137, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 66, 0, 0, 0, 54, + 137, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 66, 0, 0, 0, 57, + 137, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 66 ], "state_diffs_hash": "0xb18f72a4a5b4b8ce1b7e41095fb1332a211a140376bcc2607910875d236708e0", "aux_commitments": { "events_queue_commitment": "0x6193a5098eb140796387bdf40700a3855eeb010474b5478f30bf917172c67883", "bootloader_initial_content_commitment": "0xf031b4491c37f20516c4ebf428f4765156409f67089e64772f4106fd2d9f3351" }, - "blob_linear_hashes": ["0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000"], - "blob_commitments": ["0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000"] + "blob_linear_hashes": [ + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000" + ], + "blob_commitments": [ + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000" + ] } }, "hashes": { diff --git a/core/lib/types/src/commitment/tests/post_boojum_1_4_2_test.json b/core/lib/types/src/commitment/tests/post_boojum_1_4_2_test.json index 726874949ad8..4983bbeca143 100644 --- a/core/lib/types/src/commitment/tests/post_boojum_1_4_2_test.json +++ b/core/lib/types/src/commitment/tests/post_boojum_1_4_2_test.json @@ -97,38 +97,9 @@ "address": "0x000000000000000000000000000000000000800a", "key": "0x1", "derived_key": [ - 113, - 233, - 23, - 33, - 249, - 145, - 133, - 118, - 215, - 96, - 240, - 47, - 3, - 202, - 196, - 124, - 111, - 64, - 3, - 49, - 96, - 49, - 132, - 142, - 60, - 29, - 153, - 230, - 232, - 58, - 71, - 67 + 113, 233, 23, 33, 249, 145, 133, 118, 215, 96, 240, 47, 3, 202, 196, + 124, 111, 64, 3, 49, 96, 49, 132, 142, 60, 29, 153, 230, 232, 58, + 71, 67 ], "enumeration_index": 49, "initial_value": "0x18776f28c303800", @@ -138,38 +109,9 @@ "address": "0x000000000000000000000000000000000000800a", "key": "0x294a00337abeee2b3cd948ffeed92231e2a3acc2eb11210400e0aa9557f23e26", "derived_key": [ - 45, - 90, - 105, - 98, - 204, - 206, - 229, - 212, - 173, - 180, - 138, - 54, - 187, - 191, - 68, - 58, - 83, - 23, - 33, - 72, - 67, - 129, - 18, - 89, - 55, - 243, - 0, - 26, - 197, - 255, - 135, - 91 + 45, 90, 105, 98, 204, 206, 229, 212, 173, 180, 138, 54, 187, 191, + 68, 58, 83, 23, 33, 72, 67, 129, 18, 89, 55, 243, 0, 26, 197, 255, + 135, 91 ], "enumeration_index": 50, "initial_value": "0xf5559e28fd66c0", @@ -179,38 +121,9 @@ "address": "0x000000000000000000000000000000000000800a", "key": "0xeaa2b2fbf0b42c559059e5e9510edc15755f1c1883f0e41d5ba5f9aea4ac201a", "derived_key": [ - 141, - 97, - 126, - 192, - 90, - 203, - 191, - 95, - 226, - 69, - 41, - 166, - 75, - 35, - 133, - 169, - 106, - 173, - 67, - 240, - 155, - 225, - 173, - 169, - 44, - 112, - 64, - 49, - 220, - 193, - 72, - 27 + 141, 97, 126, 192, 90, 203, 191, 95, 226, 69, 41, 166, 75, 35, 133, + 169, 106, 173, 67, 240, 155, 225, 173, 169, 44, 112, 64, 49, 220, + 193, 72, 27 ], "enumeration_index": 0, "initial_value": "0x0", @@ -220,38 +133,9 @@ "address": "0x000000000000000000000000000000000000800b", "key": "0x7", "derived_key": [ - 18, - 59, - 175, - 197, - 134, - 247, - 119, - 100, - 72, - 140, - 210, - 76, - 106, - 119, - 84, - 110, - 90, - 15, - 232, - 189, - 251, - 79, - 162, - 3, - 207, - 175, - 252, - 54, - 204, - 228, - 221, - 91 + 18, 59, 175, 197, 134, 247, 119, 100, 72, 140, 210, 76, 106, 119, + 84, 110, 90, 15, 232, 189, 251, 79, 162, 3, 207, 175, 252, 54, 204, + 228, 221, 91 ], "enumeration_index": 53, "initial_value": "0x100000000000000000000000065c22e3e", @@ -261,38 +145,9 @@ "address": "0x000000000000000000000000000000000000800b", "key": "0x9", "derived_key": [ - 142, - 125, - 208, - 106, - 197, - 183, - 59, - 71, - 59, - 230, - 188, - 90, - 81, - 3, - 15, - 76, - 116, - 55, - 101, - 124, - 183, - 178, - 155, - 243, - 118, - 197, - 100, - 184, - 209, - 103, - 90, - 94 + 142, 125, 208, 106, 197, 183, 59, 71, 59, 230, 188, 90, 81, 3, 15, + 76, 116, 55, 101, 124, 183, 178, 155, 243, 118, 197, 100, 184, 209, + 103, 90, 94 ], "enumeration_index": 54, "initial_value": "0x200000000000000000000000065c22e3f", @@ -302,38 +157,9 @@ "address": "0x000000000000000000000000000000000000800b", "key": "0xd", "derived_key": [ - 235, - 221, - 239, - 221, - 164, - 142, - 178, - 170, - 127, - 102, - 236, - 247, - 148, - 10, - 40, - 14, - 158, - 243, - 251, - 46, - 149, - 219, - 9, - 149, - 83, - 132, - 64, - 166, - 42, - 247, - 152, - 97 + 235, 221, 239, 221, 164, 142, 178, 170, 127, 102, 236, 247, 148, 10, + 40, 14, 158, 243, 251, 46, 149, 219, 9, 149, 83, 132, 64, 166, 42, + 247, 152, 97 ], "enumeration_index": 0, "initial_value": "0x0", @@ -343,38 +169,9 @@ "address": "0x000000000000000000000000000000000000800b", "key": "0xe", "derived_key": [ - 70, - 64, - 215, - 56, - 69, - 54, - 78, - 198, - 145, - 246, - 222, - 251, - 96, - 106, - 58, - 114, - 253, - 165, - 215, - 173, - 51, - 209, - 125, - 4, - 153, - 90, - 142, - 37, - 44, - 74, - 6, - 216 + 70, 64, 215, 56, 69, 54, 78, 198, 145, 246, 222, 251, 96, 106, 58, + 114, 253, 165, 215, 173, 51, 209, 125, 4, 153, 90, 142, 37, 44, 74, + 6, 216 ], "enumeration_index": 0, "initial_value": "0x0", @@ -384,38 +181,9 @@ "address": "0x000000000000000000000000000000000000800b", "key": "0x10c", "derived_key": [ - 121, - 9, - 53, - 136, - 208, - 232, - 71, - 239, - 167, - 58, - 16, - 206, - 32, - 228, - 121, - 159, - 177, - 228, - 102, - 66, - 214, - 86, - 23, - 199, - 229, - 33, - 63, - 160, - 73, - 137, - 217, - 45 + 121, 9, 53, 136, 208, 232, 71, 239, 167, 58, 16, 206, 32, 228, 121, + 159, 177, 228, 102, 66, 214, 86, 23, 199, 229, 33, 63, 160, 73, 137, + 217, 45 ], "enumeration_index": 57, "initial_value": "0x200000000000000000000000065c22e3f", @@ -425,38 +193,9 @@ "address": "0x000000000000000000000000000000000000800b", "key": "0xad67d757c34507f157cacfa2e3153e9f260a2244f30428821be7be64587ac55f", "derived_key": [ - 12, - 194, - 74, - 180, - 47, - 190, - 197, - 49, - 125, - 155, - 26, - 44, - 164, - 124, - 169, - 185, - 59, - 158, - 195, - 109, - 121, - 142, - 253, - 124, - 218, - 167, - 57, - 36, - 22, - 48, - 203, - 70 + 12, 194, 74, 180, 47, 190, 197, 49, 125, 155, 26, 44, 164, 124, 169, + 185, 59, 158, 195, 109, 121, 142, 253, 124, 218, 167, 57, 36, 22, + 48, 203, 70 ], "enumeration_index": 0, "initial_value": "0x0", @@ -467,7 +206,10 @@ "events_queue_commitment": "0x6193a5098eb140796387bdf40700a3855eeb010474b5478f30bf917172c67883", "bootloader_initial_content_commitment": "0xf031b4491c37f20516c4ebf428f4765156409f67089e64772f4106fd2d9f3351" }, - "blob_commitments": ["0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000002"] + "blob_commitments": [ + "0x0000000000000000000000000000000000000000000000000000000000000001", + "0x0000000000000000000000000000000000000000000000000000000000000002" + ] } }, "pass_through_data": { @@ -496,347 +238,40 @@ }, "system_logs_linear_hash": "0xc559d154f69af74a0017e2380afa3a861822cf47bc5b99e3a76f7fc4de6cca09", "state_diffs_compressed": [ - 1, - 0, - 1, - 72, - 4, - 0, - 4, - 141, - 97, - 126, - 192, - 90, - 203, - 191, - 95, - 226, - 69, - 41, - 166, - 75, - 35, - 133, - 169, - 106, - 173, - 67, - 240, - 155, - 225, - 173, - 169, - 44, - 112, - 64, - 49, - 220, - 193, - 72, - 27, - 65, - 111, - 5, - 225, - 147, - 53, - 50, - 134, - 160, - 235, - 221, - 239, - 221, - 164, - 142, - 178, - 170, - 127, - 102, - 236, - 247, - 148, - 10, - 40, - 14, - 158, - 243, - 251, - 46, - 149, - 219, - 9, - 149, - 83, - 132, - 64, - 166, - 42, - 247, - 152, - 97, - 0, - 235, - 190, - 96, - 156, - 211, - 204, - 209, - 31, - 39, - 62, - 185, - 67, - 116, - 214, - 211, - 162, - 247, - 133, - 108, - 95, - 16, - 57, - 220, - 72, - 119, - 198, - 163, - 52, - 24, - 138, - 199, - 193, - 70, - 64, - 215, - 56, - 69, - 54, - 78, - 198, - 145, - 246, - 222, - 251, - 96, - 106, - 58, - 114, - 253, - 165, - 215, - 173, - 51, - 209, - 125, - 4, - 153, - 90, - 142, - 37, - 44, - 74, - 6, - 216, - 0, - 112, - 142, - 127, - 207, - 104, - 235, - 171, - 108, - 135, - 50, - 38, - 134, - 202, - 196, - 188, - 219, - 95, - 43, - 212, - 199, - 31, - 51, - 123, - 24, - 209, - 71, - 253, - 154, - 108, - 68, - 173, - 19, - 12, - 194, - 74, - 180, - 47, - 190, - 197, - 49, - 125, - 155, - 26, - 44, - 164, - 124, - 169, - 185, - 59, - 158, - 195, - 109, - 121, - 142, - 253, - 124, - 218, - 167, - 57, - 36, - 22, - 48, - 203, - 70, - 0, - 85, - 97, - 141, - 181, - 255, - 36, - 174, - 228, - 210, - 54, - 146, - 27, - 111, - 66, - 114, - 16, - 17, - 97, - 19, - 113, - 21, - 163, - 180, - 196, - 166, - 95, - 134, - 119, - 177, - 36, - 192, - 28, - 0, - 0, - 0, - 49, - 65, - 111, - 6, - 45, - 144, - 62, - 129, - 207, - 96, - 0, - 0, - 0, - 50, - 49, - 75, - 253, - 9, - 79, - 72, - 192, - 0, - 0, - 0, - 53, - 137, - 1, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 1, - 66, - 0, - 0, - 0, - 54, - 137, - 2, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 1, - 66, - 0, - 0, - 0, - 57, - 137, - 2, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 1, - 66 + 1, 0, 1, 72, 4, 0, 4, 141, 97, 126, 192, 90, 203, 191, 95, 226, 69, 41, + 166, 75, 35, 133, 169, 106, 173, 67, 240, 155, 225, 173, 169, 44, 112, + 64, 49, 220, 193, 72, 27, 65, 111, 5, 225, 147, 53, 50, 134, 160, 235, + 221, 239, 221, 164, 142, 178, 170, 127, 102, 236, 247, 148, 10, 40, 14, + 158, 243, 251, 46, 149, 219, 9, 149, 83, 132, 64, 166, 42, 247, 152, 97, + 0, 235, 190, 96, 156, 211, 204, 209, 31, 39, 62, 185, 67, 116, 214, 211, + 162, 247, 133, 108, 95, 16, 57, 220, 72, 119, 198, 163, 52, 24, 138, + 199, 193, 70, 64, 215, 56, 69, 54, 78, 198, 145, 246, 222, 251, 96, 106, + 58, 114, 253, 165, 215, 173, 51, 209, 125, 4, 153, 90, 142, 37, 44, 74, + 6, 216, 0, 112, 142, 127, 207, 104, 235, 171, 108, 135, 50, 38, 134, + 202, 196, 188, 219, 95, 43, 212, 199, 31, 51, 123, 24, 209, 71, 253, + 154, 108, 68, 173, 19, 12, 194, 74, 180, 47, 190, 197, 49, 125, 155, 26, + 44, 164, 124, 169, 185, 59, 158, 195, 109, 121, 142, 253, 124, 218, 167, + 57, 36, 22, 48, 203, 70, 0, 85, 97, 141, 181, 255, 36, 174, 228, 210, + 54, 146, 27, 111, 66, 114, 16, 17, 97, 19, 113, 21, 163, 180, 196, 166, + 95, 134, 119, 177, 36, 192, 28, 0, 0, 0, 49, 65, 111, 6, 45, 144, 62, + 129, 207, 96, 0, 0, 0, 50, 49, 75, 253, 9, 79, 72, 192, 0, 0, 0, 53, + 137, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 66, 0, 0, 0, 54, + 137, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 66, 0, 0, 0, 57, + 137, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 66 ], "state_diffs_hash": "0xb18f72a4a5b4b8ce1b7e41095fb1332a211a140376bcc2607910875d236708e0", "aux_commitments": { "events_queue_commitment": "0x6193a5098eb140796387bdf40700a3855eeb010474b5478f30bf917172c67883", "bootloader_initial_content_commitment": "0xf031b4491c37f20516c4ebf428f4765156409f67089e64772f4106fd2d9f3351" }, - "blob_linear_hashes": ["0x0000000000000000000000000000000000000000000000000000000000000003", "0x0000000000000000000000000000000000000000000000000000000000000004"], - "blob_commitments": ["0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000002"] + "blob_linear_hashes": [ + "0x0000000000000000000000000000000000000000000000000000000000000003", + "0x0000000000000000000000000000000000000000000000000000000000000004" + ], + "blob_commitments": [ + "0x0000000000000000000000000000000000000000000000000000000000000001", + "0x0000000000000000000000000000000000000000000000000000000000000002" + ] } }, "hashes": { diff --git a/core/lib/types/src/commitment/tests/post_boojum_1_5_0_test.json b/core/lib/types/src/commitment/tests/post_boojum_1_5_0_test.json index 506110c6bcce..59a24b7c90ce 100644 --- a/core/lib/types/src/commitment/tests/post_boojum_1_5_0_test.json +++ b/core/lib/types/src/commitment/tests/post_boojum_1_5_0_test.json @@ -129,38 +129,9 @@ "address": "0x000000000000000000000000000000000000800a", "key": "0x1", "derived_key": [ - 113, - 233, - 23, - 33, - 249, - 145, - 133, - 118, - 215, - 96, - 240, - 47, - 3, - 202, - 196, - 124, - 111, - 64, - 3, - 49, - 96, - 49, - 132, - 142, - 60, - 29, - 153, - 230, - 232, - 58, - 71, - 67 + 113, 233, 23, 33, 249, 145, 133, 118, 215, 96, 240, 47, 3, 202, 196, + 124, 111, 64, 3, 49, 96, 49, 132, 142, 60, 29, 153, 230, 232, 58, + 71, 67 ], "enumeration_index": 49, "initial_value": "0x18776f28c303800", @@ -170,38 +141,9 @@ "address": "0x000000000000000000000000000000000000800a", "key": "0x294a00337abeee2b3cd948ffeed92231e2a3acc2eb11210400e0aa9557f23e26", "derived_key": [ - 45, - 90, - 105, - 98, - 204, - 206, - 229, - 212, - 173, - 180, - 138, - 54, - 187, - 191, - 68, - 58, - 83, - 23, - 33, - 72, - 67, - 129, - 18, - 89, - 55, - 243, - 0, - 26, - 197, - 255, - 135, - 91 + 45, 90, 105, 98, 204, 206, 229, 212, 173, 180, 138, 54, 187, 191, + 68, 58, 83, 23, 33, 72, 67, 129, 18, 89, 55, 243, 0, 26, 197, 255, + 135, 91 ], "enumeration_index": 50, "initial_value": "0xf5559e28fd66c0", @@ -211,38 +153,9 @@ "address": "0x000000000000000000000000000000000000800a", "key": "0xeaa2b2fbf0b42c559059e5e9510edc15755f1c1883f0e41d5ba5f9aea4ac201a", "derived_key": [ - 141, - 97, - 126, - 192, - 90, - 203, - 191, - 95, - 226, - 69, - 41, - 166, - 75, - 35, - 133, - 169, - 106, - 173, - 67, - 240, - 155, - 225, - 173, - 169, - 44, - 112, - 64, - 49, - 220, - 193, - 72, - 27 + 141, 97, 126, 192, 90, 203, 191, 95, 226, 69, 41, 166, 75, 35, 133, + 169, 106, 173, 67, 240, 155, 225, 173, 169, 44, 112, 64, 49, 220, + 193, 72, 27 ], "enumeration_index": 0, "initial_value": "0x0", @@ -252,38 +165,9 @@ "address": "0x000000000000000000000000000000000000800b", "key": "0x7", "derived_key": [ - 18, - 59, - 175, - 197, - 134, - 247, - 119, - 100, - 72, - 140, - 210, - 76, - 106, - 119, - 84, - 110, - 90, - 15, - 232, - 189, - 251, - 79, - 162, - 3, - 207, - 175, - 252, - 54, - 204, - 228, - 221, - 91 + 18, 59, 175, 197, 134, 247, 119, 100, 72, 140, 210, 76, 106, 119, + 84, 110, 90, 15, 232, 189, 251, 79, 162, 3, 207, 175, 252, 54, 204, + 228, 221, 91 ], "enumeration_index": 53, "initial_value": "0x100000000000000000000000065c22e3e", @@ -293,38 +177,9 @@ "address": "0x000000000000000000000000000000000000800b", "key": "0x9", "derived_key": [ - 142, - 125, - 208, - 106, - 197, - 183, - 59, - 71, - 59, - 230, - 188, - 90, - 81, - 3, - 15, - 76, - 116, - 55, - 101, - 124, - 183, - 178, - 155, - 243, - 118, - 197, - 100, - 184, - 209, - 103, - 90, - 94 + 142, 125, 208, 106, 197, 183, 59, 71, 59, 230, 188, 90, 81, 3, 15, + 76, 116, 55, 101, 124, 183, 178, 155, 243, 118, 197, 100, 184, 209, + 103, 90, 94 ], "enumeration_index": 54, "initial_value": "0x200000000000000000000000065c22e3f", @@ -334,38 +189,9 @@ "address": "0x000000000000000000000000000000000000800b", "key": "0xd", "derived_key": [ - 235, - 221, - 239, - 221, - 164, - 142, - 178, - 170, - 127, - 102, - 236, - 247, - 148, - 10, - 40, - 14, - 158, - 243, - 251, - 46, - 149, - 219, - 9, - 149, - 83, - 132, - 64, - 166, - 42, - 247, - 152, - 97 + 235, 221, 239, 221, 164, 142, 178, 170, 127, 102, 236, 247, 148, 10, + 40, 14, 158, 243, 251, 46, 149, 219, 9, 149, 83, 132, 64, 166, 42, + 247, 152, 97 ], "enumeration_index": 0, "initial_value": "0x0", @@ -375,38 +201,9 @@ "address": "0x000000000000000000000000000000000000800b", "key": "0xe", "derived_key": [ - 70, - 64, - 215, - 56, - 69, - 54, - 78, - 198, - 145, - 246, - 222, - 251, - 96, - 106, - 58, - 114, - 253, - 165, - 215, - 173, - 51, - 209, - 125, - 4, - 153, - 90, - 142, - 37, - 44, - 74, - 6, - 216 + 70, 64, 215, 56, 69, 54, 78, 198, 145, 246, 222, 251, 96, 106, 58, + 114, 253, 165, 215, 173, 51, 209, 125, 4, 153, 90, 142, 37, 44, 74, + 6, 216 ], "enumeration_index": 0, "initial_value": "0x0", @@ -416,38 +213,9 @@ "address": "0x000000000000000000000000000000000000800b", "key": "0x10c", "derived_key": [ - 121, - 9, - 53, - 136, - 208, - 232, - 71, - 239, - 167, - 58, - 16, - 206, - 32, - 228, - 121, - 159, - 177, - 228, - 102, - 66, - 214, - 86, - 23, - 199, - 229, - 33, - 63, - 160, - 73, - 137, - 217, - 45 + 121, 9, 53, 136, 208, 232, 71, 239, 167, 58, 16, 206, 32, 228, 121, + 159, 177, 228, 102, 66, 214, 86, 23, 199, 229, 33, 63, 160, 73, 137, + 217, 45 ], "enumeration_index": 57, "initial_value": "0x200000000000000000000000065c22e3f", @@ -457,38 +225,9 @@ "address": "0x000000000000000000000000000000000000800b", "key": "0xad67d757c34507f157cacfa2e3153e9f260a2244f30428821be7be64587ac55f", "derived_key": [ - 12, - 194, - 74, - 180, - 47, - 190, - 197, - 49, - 125, - 155, - 26, - 44, - 164, - 124, - 169, - 185, - 59, - 158, - 195, - 109, - 121, - 142, - 253, - 124, - 218, - 167, - 57, - 36, - 22, - 48, - 203, - 70 + 12, 194, 74, 180, 47, 190, 197, 49, 125, 155, 26, 44, 164, 124, 169, + 185, 59, 158, 195, 109, 121, 142, 253, 124, 218, 167, 57, 36, 22, + 48, 203, 70 ], "enumeration_index": 0, "initial_value": "0x0", @@ -499,7 +238,24 @@ "events_queue_commitment": "0x6193a5098eb140796387bdf40700a3855eeb010474b5478f30bf917172c67883", "bootloader_initial_content_commitment": "0xf031b4491c37f20516c4ebf428f4765156409f67089e64772f4106fd2d9f3351" }, - "blob_commitments": ["0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x0000000000000000000000000000000000000000000000000000000000000003", "0x0000000000000000000000000000000000000000000000000000000000000004", "0x0000000000000000000000000000000000000000000000000000000000000005", "0x0000000000000000000000000000000000000000000000000000000000000006", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000"] + "blob_commitments": [ + "0x0000000000000000000000000000000000000000000000000000000000000001", + "0x0000000000000000000000000000000000000000000000000000000000000002", + "0x0000000000000000000000000000000000000000000000000000000000000003", + "0x0000000000000000000000000000000000000000000000000000000000000004", + "0x0000000000000000000000000000000000000000000000000000000000000005", + "0x0000000000000000000000000000000000000000000000000000000000000006", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000" + ] } }, "pass_through_data": { @@ -528,347 +284,68 @@ }, "system_logs_linear_hash": "0x602dacc0a26e3347f0679924c4ae151ff5200e7dd80902fe0fc11c806c4d3ffb", "state_diffs_compressed": [ - 1, - 0, - 1, - 72, - 4, - 0, - 4, - 141, - 97, - 126, - 192, - 90, - 203, - 191, - 95, - 226, - 69, - 41, - 166, - 75, - 35, - 133, - 169, - 106, - 173, - 67, - 240, - 155, - 225, - 173, - 169, - 44, - 112, - 64, - 49, - 220, - 193, - 72, - 27, - 65, - 111, - 5, - 225, - 147, - 53, - 50, - 134, - 160, - 235, - 221, - 239, - 221, - 164, - 142, - 178, - 170, - 127, - 102, - 236, - 247, - 148, - 10, - 40, - 14, - 158, - 243, - 251, - 46, - 149, - 219, - 9, - 149, - 83, - 132, - 64, - 166, - 42, - 247, - 152, - 97, - 0, - 235, - 190, - 96, - 156, - 211, - 204, - 209, - 31, - 39, - 62, - 185, - 67, - 116, - 214, - 211, - 162, - 247, - 133, - 108, - 95, - 16, - 57, - 220, - 72, - 119, - 198, - 163, - 52, - 24, - 138, - 199, - 193, - 70, - 64, - 215, - 56, - 69, - 54, - 78, - 198, - 145, - 246, - 222, - 251, - 96, - 106, - 58, - 114, - 253, - 165, - 215, - 173, - 51, - 209, - 125, - 4, - 153, - 90, - 142, - 37, - 44, - 74, - 6, - 216, - 0, - 112, - 142, - 127, - 207, - 104, - 235, - 171, - 108, - 135, - 50, - 38, - 134, - 202, - 196, - 188, - 219, - 95, - 43, - 212, - 199, - 31, - 51, - 123, - 24, - 209, - 71, - 253, - 154, - 108, - 68, - 173, - 19, - 12, - 194, - 74, - 180, - 47, - 190, - 197, - 49, - 125, - 155, - 26, - 44, - 164, - 124, - 169, - 185, - 59, - 158, - 195, - 109, - 121, - 142, - 253, - 124, - 218, - 167, - 57, - 36, - 22, - 48, - 203, - 70, - 0, - 85, - 97, - 141, - 181, - 255, - 36, - 174, - 228, - 210, - 54, - 146, - 27, - 111, - 66, - 114, - 16, - 17, - 97, - 19, - 113, - 21, - 163, - 180, - 196, - 166, - 95, - 134, - 119, - 177, - 36, - 192, - 28, - 0, - 0, - 0, - 49, - 65, - 111, - 6, - 45, - 144, - 62, - 129, - 207, - 96, - 0, - 0, - 0, - 50, - 49, - 75, - 253, - 9, - 79, - 72, - 192, - 0, - 0, - 0, - 53, - 137, - 1, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 1, - 66, - 0, - 0, - 0, - 54, - 137, - 2, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 1, - 66, - 0, - 0, - 0, - 57, - 137, - 2, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 1, - 66 + 1, 0, 1, 72, 4, 0, 4, 141, 97, 126, 192, 90, 203, 191, 95, 226, 69, 41, + 166, 75, 35, 133, 169, 106, 173, 67, 240, 155, 225, 173, 169, 44, 112, + 64, 49, 220, 193, 72, 27, 65, 111, 5, 225, 147, 53, 50, 134, 160, 235, + 221, 239, 221, 164, 142, 178, 170, 127, 102, 236, 247, 148, 10, 40, 14, + 158, 243, 251, 46, 149, 219, 9, 149, 83, 132, 64, 166, 42, 247, 152, 97, + 0, 235, 190, 96, 156, 211, 204, 209, 31, 39, 62, 185, 67, 116, 214, 211, + 162, 247, 133, 108, 95, 16, 57, 220, 72, 119, 198, 163, 52, 24, 138, + 199, 193, 70, 64, 215, 56, 69, 54, 78, 198, 145, 246, 222, 251, 96, 106, + 58, 114, 253, 165, 215, 173, 51, 209, 125, 4, 153, 90, 142, 37, 44, 74, + 6, 216, 0, 112, 142, 127, 207, 104, 235, 171, 108, 135, 50, 38, 134, + 202, 196, 188, 219, 95, 43, 212, 199, 31, 51, 123, 24, 209, 71, 253, + 154, 108, 68, 173, 19, 12, 194, 74, 180, 47, 190, 197, 49, 125, 155, 26, + 44, 164, 124, 169, 185, 59, 158, 195, 109, 121, 142, 253, 124, 218, 167, + 57, 36, 22, 48, 203, 70, 0, 85, 97, 141, 181, 255, 36, 174, 228, 210, + 54, 146, 27, 111, 66, 114, 16, 17, 97, 19, 113, 21, 163, 180, 196, 166, + 95, 134, 119, 177, 36, 192, 28, 0, 0, 0, 49, 65, 111, 6, 45, 144, 62, + 129, 207, 96, 0, 0, 0, 50, 49, 75, 253, 9, 79, 72, 192, 0, 0, 0, 53, + 137, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 66, 0, 0, 0, 54, + 137, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 66, 0, 0, 0, 57, + 137, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 66 ], "state_diffs_hash": "0xb18f72a4a5b4b8ce1b7e41095fb1332a211a140376bcc2607910875d236708e0", "aux_commitments": { "events_queue_commitment": "0x6193a5098eb140796387bdf40700a3855eeb010474b5478f30bf917172c67883", "bootloader_initial_content_commitment": "0xf031b4491c37f20516c4ebf428f4765156409f67089e64772f4106fd2d9f3351" }, - "blob_linear_hashes": ["0x0000000000000000000000000000000000000000000000000000000000000003", "0x0000000000000000000000000000000000000000000000000000000000000004", "0x0000000000000000000000000000000000000000000000000000000000000005", "0x0000000000000000000000000000000000000000000000000000000000000006", "0x0000000000000000000000000000000000000000000000000000000000000007", "0x0000000000000000000000000000000000000000000000000000000000000008","0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000"], - "blob_commitments": ["0x0000000000000000000000000000000000000000000000000000000000000001", "0x0000000000000000000000000000000000000000000000000000000000000002", "0x0000000000000000000000000000000000000000000000000000000000000003", "0x0000000000000000000000000000000000000000000000000000000000000004", "0x0000000000000000000000000000000000000000000000000000000000000005", "0x0000000000000000000000000000000000000000000000000000000000000006", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000000000000000000000000000"] + "blob_linear_hashes": [ + "0x0000000000000000000000000000000000000000000000000000000000000003", + "0x0000000000000000000000000000000000000000000000000000000000000004", + "0x0000000000000000000000000000000000000000000000000000000000000005", + "0x0000000000000000000000000000000000000000000000000000000000000006", + "0x0000000000000000000000000000000000000000000000000000000000000007", + "0x0000000000000000000000000000000000000000000000000000000000000008", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000" + ], + "blob_commitments": [ + "0x0000000000000000000000000000000000000000000000000000000000000001", + "0x0000000000000000000000000000000000000000000000000000000000000002", + "0x0000000000000000000000000000000000000000000000000000000000000003", + "0x0000000000000000000000000000000000000000000000000000000000000004", + "0x0000000000000000000000000000000000000000000000000000000000000005", + "0x0000000000000000000000000000000000000000000000000000000000000006", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x0000000000000000000000000000000000000000000000000000000000000000" + ] } }, "hashes": { diff --git a/core/node/eth_sender/src/metrics.rs b/core/node/eth_sender/src/metrics.rs index 32425baa5eee..471a56b9bea5 100644 --- a/core/node/eth_sender/src/metrics.rs +++ b/core/node/eth_sender/src/metrics.rs @@ -131,24 +131,25 @@ impl EthSenderMetrics { tx_type: tx.tx_type, }; - let l1_batch_headers = connection + let l1_batches_statistics = connection .blocks_dal() - .get_l1_batches_for_eth_tx_id(tx.id) + .get_l1_batches_statistics_for_eth_tx_id(tx.id) .await .unwrap(); // This should be only the case when some blocks were reverted. - if l1_batch_headers.is_empty() { + if l1_batches_statistics.is_empty() { tracing::warn!("No L1 batches were found for eth_tx with id = {}", tx.id); return; } - for header in l1_batch_headers { + for statistics in l1_batches_statistics { APP_METRICS.block_latency[&stage].observe(Duration::from_secs( - seconds_since_epoch() - header.timestamp, + seconds_since_epoch() - statistics.timestamp, )); - APP_METRICS.processed_txs[&stage.into()].inc_by(header.tx_count() as u64); - APP_METRICS.processed_l1_txs[&stage.into()].inc_by(header.tx_count() as u64); + APP_METRICS.processed_txs[&stage.into()] + .inc_by(statistics.l2_tx_count as u64 + statistics.l1_tx_count as u64); + APP_METRICS.processed_l1_txs[&stage.into()].inc_by(statistics.l1_tx_count as u64); } metrics_latency.observe(); }