From b2adcf86215feb2a3341cd22acc23f320e46e2e2 Mon Sep 17 00:00:00 2001 From: matias-gonz Date: Tue, 24 Sep 2024 09:36:30 -0300 Subject: [PATCH 01/19] Add sqlformat --- zk_toolbox/Cargo.lock | 5 +++-- zk_toolbox/crates/zk_supervisor/Cargo.toml | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/zk_toolbox/Cargo.lock b/zk_toolbox/Cargo.lock index 296037094529..866693da1bb1 100644 --- a/zk_toolbox/Cargo.lock +++ b/zk_toolbox/Cargo.lock @@ -4847,9 +4847,9 @@ dependencies = [ [[package]] name = "sqlformat" -version = "0.2.4" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f895e3734318cc55f1fe66258926c9b910c124d47520339efecbb6c59cec7c1f" +checksum = "7bba3a93db0cc4f7bdece8bb09e77e2e785c20bfebf79eb8340ed80708048790" dependencies = [ "nom", "unicode_categories", @@ -6455,6 +6455,7 @@ dependencies = [ "serde", "serde_json", "serde_yaml", + "sqlformat", "strum", "tokio", "types", diff --git a/zk_toolbox/crates/zk_supervisor/Cargo.toml b/zk_toolbox/crates/zk_supervisor/Cargo.toml index 4c450a736393..ce73a1f59737 100644 --- a/zk_toolbox/crates/zk_supervisor/Cargo.toml +++ b/zk_toolbox/crates/zk_supervisor/Cargo.toml @@ -29,3 +29,4 @@ futures.workspace = true types.workspace = true serde_yaml.workspace = true zksync_basic_types.workspace = true +sqlformat = "0.2.6" From 960ae9c27a8f6898f69866bd6b6c96f060f2e742 Mon Sep 17 00:00:00 2001 From: matias-gonz Date: Tue, 24 Sep 2024 09:48:14 -0300 Subject: [PATCH 02/19] Add format_sql --- .../crates/zk_supervisor/src/commands/fmt.rs | 3 +++ .../crates/zk_supervisor/src/commands/mod.rs | 1 + .../zk_supervisor/src/commands/sql_fmt.rs | 18 ++++++++++++++++++ 3 files changed, 22 insertions(+) create mode 100644 zk_toolbox/crates/zk_supervisor/src/commands/sql_fmt.rs diff --git a/zk_toolbox/crates/zk_supervisor/src/commands/fmt.rs b/zk_toolbox/crates/zk_supervisor/src/commands/fmt.rs index fc55ed2c1f6f..8b69dd3e9c89 100644 --- a/zk_toolbox/crates/zk_supervisor/src/commands/fmt.rs +++ b/zk_toolbox/crates/zk_supervisor/src/commands/fmt.rs @@ -13,6 +13,8 @@ use crate::{ }, }; +use super::sql_fmt::format_sql; + async fn prettier(shell: Shell, target: Target, check: bool) -> anyhow::Result<()> { let spinner = Spinner::new(&msg_running_fmt_for_extension_spinner(target)); let files = get_unignored_files(&shell, &target)?; @@ -59,6 +61,7 @@ async fn run_all_rust_formatters( check: bool, link_to_code: PathBuf, ) -> anyhow::Result<()> { + format_sql(shell.clone(), check).await?; rustfmt(shell.clone(), check, link_to_code).await?; Ok(()) } diff --git a/zk_toolbox/crates/zk_supervisor/src/commands/mod.rs b/zk_toolbox/crates/zk_supervisor/src/commands/mod.rs index d3cb99f1e342..38ec586e7451 100644 --- a/zk_toolbox/crates/zk_supervisor/src/commands/mod.rs +++ b/zk_toolbox/crates/zk_supervisor/src/commands/mod.rs @@ -8,4 +8,5 @@ pub(crate) mod lint_utils; pub mod prover; pub mod send_transactions; pub mod snapshot; +pub(crate) mod sql_fmt; pub mod test; diff --git a/zk_toolbox/crates/zk_supervisor/src/commands/sql_fmt.rs b/zk_toolbox/crates/zk_supervisor/src/commands/sql_fmt.rs new file mode 100644 index 000000000000..a4fcc8dca16e --- /dev/null +++ b/zk_toolbox/crates/zk_supervisor/src/commands/sql_fmt.rs @@ -0,0 +1,18 @@ +use common::spinner::Spinner; +use xshell::Shell; + +use super::lint_utils::{get_unignored_files, Target}; + +fn fmt_file(shell: &Shell, file_path: &str, check: bool) -> anyhow::Result<()> { + Ok(()) +} + +pub async fn format_sql(shell: Shell, check: bool) -> anyhow::Result<()> { + let spinner = Spinner::new("Running SQL formatter"); + let rust_files = get_unignored_files(&shell, &Target::Rs)?; + for file in rust_files { + fmt_file(&shell, &file, check)?; + } + spinner.finish(); + Ok(()) +} From fd757e319aeb806150966f7c26130a4dfdd340ab Mon Sep 17 00:00:00 2001 From: matias-gonz Date: Tue, 24 Sep 2024 11:09:07 -0300 Subject: [PATCH 03/19] Update fmt_file --- .../zk_supervisor/src/commands/sql_fmt.rs | 83 ++++++++++++++++++- 1 file changed, 82 insertions(+), 1 deletion(-) diff --git a/zk_toolbox/crates/zk_supervisor/src/commands/sql_fmt.rs b/zk_toolbox/crates/zk_supervisor/src/commands/sql_fmt.rs index a4fcc8dca16e..7fe8c5ea21cc 100644 --- a/zk_toolbox/crates/zk_supervisor/src/commands/sql_fmt.rs +++ b/zk_toolbox/crates/zk_supervisor/src/commands/sql_fmt.rs @@ -2,8 +2,89 @@ use common::spinner::Spinner; use xshell::Shell; use super::lint_utils::{get_unignored_files, Target}; +use anyhow::{bail, Result}; + +fn format_one_line_query(line: &str) -> String { + line.to_string() +} + +fn format_rust_string_query(built_query: &str, is_raw_string: bool) -> String { + built_query.to_string() +} + +fn fmt_file(shell: &Shell, file_path: &str, check: bool) -> Result<()> { + let content = shell.read_file(file_path)?; + let mut modified_file = String::new(); + + let mut lines_to_query: Option = None; + let mut is_inside_query = false; + let mut is_raw_string = false; + let mut built_query = String::new(); + + for line in content.lines() { + if line.contains("sqlx::query!(\"") || line.contains("sqlx::query!(r") { + modified_file.push_str(&format_one_line_query(line)); + modified_file.push('\n'); + continue; + } + + if line.ends_with("sqlx::query!(") { + lines_to_query = Some(1); + is_raw_string = false; + built_query.clear(); + } else if line.ends_with("sqlx::query_as!(") { + lines_to_query = Some(2); + is_raw_string = false; + built_query.clear(); + } + + if let Some(ref mut count) = lines_to_query { + if *count == 0 { + is_inside_query = true; + lines_to_query = None; + if line.contains("r#\"") { + is_raw_string = true; + } + } else { + *count -= 1; + } + } + + if is_inside_query { + let query_not_empty = !built_query.is_empty() || line.trim().len() > 1; + let raw_string_query_ended = line.ends_with("\"#,") || line.ends_with("\"#"); + let regular_string_query_ended = + (line.ends_with("\",") || line.ends_with("\"")) && query_not_empty; + built_query.push_str(line); + built_query.push('\n'); + + let line_end_is_not_escape = !line.ends_with("\\\"") && !line.ends_with("\\\","); + if (is_raw_string && raw_string_query_ended) + || (!is_raw_string && regular_string_query_ended && line_end_is_not_escape) + { + is_inside_query = false; + let ended_with_comma = built_query.trim_end().ends_with(','); + modified_file + .push_str(&format_rust_string_query(&built_query, is_raw_string).trim_end()); + if ended_with_comma { + modified_file.push(','); + } + modified_file.push('\n'); + } + } else { + modified_file.push_str(line); + modified_file.push('\n'); + } + } + + if content != modified_file { + if check { + bail!("File {} is not formatted", file_path); + } else { + shell.write_file(file_path, &modified_file)?; + } + } -fn fmt_file(shell: &Shell, file_path: &str, check: bool) -> anyhow::Result<()> { Ok(()) } From 59bbae49896ad8b34c4e1774e9bee38b286ea131 Mon Sep 17 00:00:00 2001 From: matias-gonz Date: Tue, 24 Sep 2024 12:02:14 -0300 Subject: [PATCH 04/19] Implement sql fmt --- docs/guides/external-node/00_quick_start.md | 3 +- zk_toolbox/Cargo.lock | 5 +- zk_toolbox/crates/zk_supervisor/Cargo.toml | 1 + .../crates/zk_supervisor/src/commands/fmt.rs | 7 +- .../crates/zk_supervisor/src/commands/lint.rs | 2 +- .../zk_supervisor/src/commands/lint_utils.rs | 24 ++- .../zk_supervisor/src/commands/sql_fmt.rs | 137 ++++++++++++++++-- 7 files changed, 155 insertions(+), 24 deletions(-) diff --git a/docs/guides/external-node/00_quick_start.md b/docs/guides/external-node/00_quick_start.md index 75d8ba891512..287a4d2d47c0 100644 --- a/docs/guides/external-node/00_quick_start.md +++ b/docs/guides/external-node/00_quick_start.md @@ -34,8 +34,7 @@ cd docker-compose-examples docker compose --file testnet-external-node-docker-compose.yml down --volumes ``` -You can see the status of the node (after recovery) in -[local grafana dashboard](http://localhost:3000/dashboards). +You can see the status of the node (after recovery) in [local grafana dashboard](http://localhost:3000/dashboards). Those commands start ZKsync node locally inside docker. diff --git a/zk_toolbox/Cargo.lock b/zk_toolbox/Cargo.lock index 866693da1bb1..ed6a04eee3f9 100644 --- a/zk_toolbox/Cargo.lock +++ b/zk_toolbox/Cargo.lock @@ -3904,9 +3904,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.5" +version = "1.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b91213439dad192326a0d7c6ee3955910425f441d7038e0d6933b0aec5c4517f" +checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619" dependencies = [ "aho-corasick", "memchr", @@ -6452,6 +6452,7 @@ dependencies = [ "ethers", "futures", "human-panic", + "regex", "serde", "serde_json", "serde_yaml", diff --git a/zk_toolbox/crates/zk_supervisor/Cargo.toml b/zk_toolbox/crates/zk_supervisor/Cargo.toml index ce73a1f59737..81142d53d6ac 100644 --- a/zk_toolbox/crates/zk_supervisor/Cargo.toml +++ b/zk_toolbox/crates/zk_supervisor/Cargo.toml @@ -30,3 +30,4 @@ types.workspace = true serde_yaml.workspace = true zksync_basic_types.workspace = true sqlformat = "0.2.6" +regex = "1.10.6" diff --git a/zk_toolbox/crates/zk_supervisor/src/commands/fmt.rs b/zk_toolbox/crates/zk_supervisor/src/commands/fmt.rs index 8b69dd3e9c89..3aefc15aba79 100644 --- a/zk_toolbox/crates/zk_supervisor/src/commands/fmt.rs +++ b/zk_toolbox/crates/zk_supervisor/src/commands/fmt.rs @@ -5,6 +5,7 @@ use common::{cmd::Cmd, logger, spinner::Spinner}; use config::EcosystemConfig; use xshell::{cmd, Shell}; +use super::sql_fmt::format_sql; use crate::{ commands::lint_utils::{get_unignored_files, Target}, messages::{ @@ -13,11 +14,9 @@ use crate::{ }, }; -use super::sql_fmt::format_sql; - async fn prettier(shell: Shell, target: Target, check: bool) -> anyhow::Result<()> { let spinner = Spinner::new(&msg_running_fmt_for_extension_spinner(target)); - let files = get_unignored_files(&shell, &target)?; + let files = get_unignored_files(&shell, &target, None)?; if files.is_empty() { logger::info(format!("No files for {target} found")); @@ -95,7 +94,7 @@ pub async fn run(shell: Shell, args: FmtArgs) -> anyhow::Result<()> { for ext in extensions { tasks.push(tokio::spawn(prettier(shell.clone(), ext, args.check))); } - tasks.push(tokio::spawn(rustfmt( + tasks.push(tokio::spawn(run_all_rust_formatters( shell.clone(), args.check, ecosystem.link_to_code, diff --git a/zk_toolbox/crates/zk_supervisor/src/commands/lint.rs b/zk_toolbox/crates/zk_supervisor/src/commands/lint.rs index 1861d164ce44..45a7a46ebbe0 100644 --- a/zk_toolbox/crates/zk_supervisor/src/commands/lint.rs +++ b/zk_toolbox/crates/zk_supervisor/src/commands/lint.rs @@ -92,7 +92,7 @@ fn lint( ) -> anyhow::Result<()> { let spinner = Spinner::new(&msg_running_linter_for_extension_spinner(target)); let _dir_guard = shell.push_dir(&ecosystem.link_to_code); - let files = get_unignored_files(shell, target)?; + let files = get_unignored_files(shell, target, None)?; let cmd = cmd!(shell, "yarn"); let config_path = ecosystem.link_to_code.join(CONFIG_PATH); let config_path = config_path.join(format!("{}.js", target)); diff --git a/zk_toolbox/crates/zk_supervisor/src/commands/lint_utils.rs b/zk_toolbox/crates/zk_supervisor/src/commands/lint_utils.rs index a7236dc04fb3..9095e445384b 100644 --- a/zk_toolbox/crates/zk_supervisor/src/commands/lint_utils.rs +++ b/zk_toolbox/crates/zk_supervisor/src/commands/lint_utils.rs @@ -17,14 +17,28 @@ pub enum Target { } #[derive(Deserialize, Serialize, Debug)] -struct IgnoredData { - files: Vec, - dirs: Vec, +pub struct IgnoredData { + pub files: Vec, + pub dirs: Vec, } -pub fn get_unignored_files(shell: &Shell, target: &Target) -> anyhow::Result> { +impl IgnoredData { + pub fn merge(&mut self, other: &IgnoredData) { + self.files.extend(other.files.clone()); + self.dirs.extend(other.dirs.clone()); + } +} + +pub fn get_unignored_files( + shell: &Shell, + target: &Target, + ignored_data: Option, +) -> anyhow::Result> { let mut files = Vec::new(); - let ignored_files: IgnoredData = serde_yaml::from_str(&shell.read_file(IGNORE_FILE)?)?; + let mut ignored_files: IgnoredData = serde_yaml::from_str(&shell.read_file(IGNORE_FILE)?)?; + if let Some(ignored_data) = ignored_data { + ignored_files.merge(&ignored_data); + } let output = cmd!(shell, "git ls-files --recurse-submodules").read()?; for line in output.lines() { diff --git a/zk_toolbox/crates/zk_supervisor/src/commands/sql_fmt.rs b/zk_toolbox/crates/zk_supervisor/src/commands/sql_fmt.rs index 7fe8c5ea21cc..72b88fa7628a 100644 --- a/zk_toolbox/crates/zk_supervisor/src/commands/sql_fmt.rs +++ b/zk_toolbox/crates/zk_supervisor/src/commands/sql_fmt.rs @@ -1,15 +1,128 @@ +use anyhow::{bail, Context, Result}; use common::spinner::Spinner; +use regex::Regex; use xshell::Shell; -use super::lint_utils::{get_unignored_files, Target}; -use anyhow::{bail, Result}; +use super::lint_utils::{get_unignored_files, IgnoredData, Target}; -fn format_one_line_query(line: &str) -> String { - line.to_string() +fn format_query(query: &str) -> anyhow::Result { + let options = sqlformat::FormatOptions { + indent: sqlformat::Indent::Spaces(4), + uppercase: true, + lines_between_queries: 1, + }; + + let mut formatted_query = sqlformat::format(query, &sqlformat::QueryParams::None, options); + + // Replace certain keywords with lowercase versions + let keywords = vec![ + "STORAGE", + "TIMESTAMP", + "INPUT", + "DATA", + "ZONE", + "VALUE", + "DEPTH", + "KEY", + ]; + for keyword in keywords { + let regex = Regex::new(&format!(r"\b{}\b", keyword))?; + formatted_query = regex + .replace_all(&formatted_query, keyword.to_lowercase()) + .to_string(); + } + + // Remove minimum indent from the formatted query + let formatted_lines: Vec<&str> = formatted_query.lines().collect(); + let min_indent = formatted_lines + .iter() + .filter_map(|line| line.find(|c: char| !c.is_whitespace())) + .min() + .unwrap_or(0); + Ok(formatted_query + .lines() + .map(|line| line[min_indent..].to_string()) + .collect::>() + .join("\n")) +} + +fn extract_query_from_rust_string(query: &str, is_raw: bool) -> String { + let mut query = query.trim().to_string(); + if query.ends_with(',') { + query.pop(); + } + // Removing quotes + if !is_raw { + query = query[1..query.len() - 1].to_string(); // normal string + } else { + query = query[3..query.len() - 2].to_string(); // raw string + } + + // Remove all escape characters + if !is_raw { + query = query.replace(r#"\""#, "\""); + } + + query +} + +fn embed_text_inside_rust_string(query: &str) -> String { + format!("r#\"\n{}\n\"#", query) +} + +fn add_indent(query: &str, indent: usize) -> String { + query + .lines() + .map(|line| format!("{:indent$}{}", "", line)) + .collect::>() + .join("\n") } -fn format_rust_string_query(built_query: &str, is_raw_string: bool) -> String { - built_query.to_string() +fn format_rust_string_query(query: &str, is_raw: bool) -> anyhow::Result { + let base_indent = query.find(|c: char| !c.is_whitespace()).unwrap_or(0); + let raw_query = extract_query_from_rust_string(query, is_raw); + let formatted_query = format_query(&raw_query)?; + let reconstructed_rust_string = embed_text_inside_rust_string(&formatted_query); + Ok(add_indent(&reconstructed_rust_string, base_indent)) +} + +fn format_one_line_query(line: &str) -> anyhow::Result { + let is_raw_string = line.contains("sqlx::query!(r"); + + let query_start = if is_raw_string { + line.find(r#"r#""#).context(format!( + "Failed to find the start of the raw string query: {line}" + ))? + } else { + line.find('"') + .context("Failed to find the start of the regular string query")? + }; + + let base_indent = line + .find(|c: char| !c.is_whitespace()) + .context("Failed to determine base indent")? + + 4; + + let prefix = &line[..query_start]; + + let query_end = if is_raw_string { + line.find(r#""#) + .context("Failed to find the end of the raw string query")? + + 2 + } else { + line[1..] + .find('"') + .context("Failed to find the end of the regular string query")? + + 3 + }; + + let suffix = &line[query_end..]; + let query = &line[query_start..query_end]; + + let mut formatted_query = format_rust_string_query(query, is_raw_string)?; + formatted_query = add_indent(&formatted_query, base_indent); + + Ok(format!("{}\n{}\n{}", prefix, formatted_query, suffix)) } fn fmt_file(shell: &Shell, file_path: &str, check: bool) -> Result<()> { @@ -23,7 +136,7 @@ fn fmt_file(shell: &Shell, file_path: &str, check: bool) -> Result<()> { for line in content.lines() { if line.contains("sqlx::query!(\"") || line.contains("sqlx::query!(r") { - modified_file.push_str(&format_one_line_query(line)); + modified_file.push_str(&format_one_line_query(line)?); modified_file.push('\n'); continue; } @@ -54,7 +167,7 @@ fn fmt_file(shell: &Shell, file_path: &str, check: bool) -> Result<()> { let query_not_empty = !built_query.is_empty() || line.trim().len() > 1; let raw_string_query_ended = line.ends_with("\"#,") || line.ends_with("\"#"); let regular_string_query_ended = - (line.ends_with("\",") || line.ends_with("\"")) && query_not_empty; + (line.ends_with("\",") || line.ends_with('"')) && query_not_empty; built_query.push_str(line); built_query.push('\n'); @@ -65,7 +178,7 @@ fn fmt_file(shell: &Shell, file_path: &str, check: bool) -> Result<()> { is_inside_query = false; let ended_with_comma = built_query.trim_end().ends_with(','); modified_file - .push_str(&format_rust_string_query(&built_query, is_raw_string).trim_end()); + .push_str(&format_rust_string_query(&built_query, is_raw_string)?.trim_end()); if ended_with_comma { modified_file.push(','); } @@ -90,7 +203,11 @@ fn fmt_file(shell: &Shell, file_path: &str, check: bool) -> Result<()> { pub async fn format_sql(shell: Shell, check: bool) -> anyhow::Result<()> { let spinner = Spinner::new("Running SQL formatter"); - let rust_files = get_unignored_files(&shell, &Target::Rs)?; + let ignored_data = Some(IgnoredData { + files: vec![], + dirs: vec!["zk_toolbox".to_string()], + }); + let rust_files = get_unignored_files(&shell, &Target::Rs, ignored_data)?; for file in rust_files { fmt_file(&shell, &file, check)?; } From 0b04412e783960548ad0a94f5ebed21c216380c2 Mon Sep 17 00:00:00 2001 From: matias-gonz Date: Tue, 24 Sep 2024 12:02:31 -0300 Subject: [PATCH 05/19] Run fmt --- core/lib/dal/src/base_token_dal.rs | 8 +- core/lib/dal/src/blocks_dal.rs | 86 +++-- core/lib/dal/src/blocks_web3_dal.rs | 25 +- core/lib/dal/src/consensus_dal.rs | 22 +- core/lib/dal/src/contract_verification_dal.rs | 60 ++-- core/lib/dal/src/data_availability_dal.rs | 14 +- core/lib/dal/src/eth_sender_dal.rs | 50 ++- core/lib/dal/src/events_dal.rs | 22 +- core/lib/dal/src/events_web3_dal.rs | 43 ++- core/lib/dal/src/factory_deps_dal.rs | 14 +- core/lib/dal/src/proof_generation_dal.rs | 41 ++- core/lib/dal/src/protocol_versions_dal.rs | 9 +- core/lib/dal/src/pruning_dal/mod.rs | 110 +++--- core/lib/dal/src/snapshot_recovery_dal.rs | 5 +- core/lib/dal/src/snapshots_creator_dal.rs | 24 +- core/lib/dal/src/snapshots_dal.rs | 19 +- core/lib/dal/src/storage_logs_dal.rs | 64 ++-- core/lib/dal/src/storage_logs_dedup_dal.rs | 10 +- core/lib/dal/src/system_dal.rs | 10 +- core/lib/dal/src/tee_proof_generation_dal.rs | 35 +- .../src/tee_verifier_input_producer_dal.rs | 37 +- core/lib/dal/src/tokens_dal.rs | 6 +- core/lib/dal/src/transactions_dal.rs | 267 ++++++++------- core/lib/dal/src/transactions_web3_dal.rs | 35 +- core/lib/dal/src/vm_runner_dal.rs | 98 +++--- .../crates/lib/prover_dal/src/cli_test_dal.rs | 102 +++--- .../src/fri_gpu_prover_queue_dal.rs | 37 +- .../src/fri_proof_compressor_dal.rs | 79 +++-- .../src/fri_protocol_versions_dal.rs | 17 +- .../lib/prover_dal/src/fri_prover_dal.rs | 143 +++++--- .../src/fri_witness_generator_dal.rs | 324 +++++++++++------- 31 files changed, 1067 insertions(+), 749 deletions(-) diff --git a/core/lib/dal/src/base_token_dal.rs b/core/lib/dal/src/base_token_dal.rs index a8bf51d0c603..8155f2987a0e 100644 --- a/core/lib/dal/src/base_token_dal.rs +++ b/core/lib/dal/src/base_token_dal.rs @@ -21,7 +21,13 @@ impl BaseTokenDal<'_, '_> { let row = sqlx::query!( r#" INSERT INTO - base_token_ratios (numerator, denominator, ratio_timestamp, created_at, updated_at) + base_token_ratios ( + numerator, + denominator, + ratio_timestamp, + created_at, + updated_at + ) VALUES ($1, $2, $3, NOW(), NOW()) RETURNING diff --git a/core/lib/dal/src/blocks_dal.rs b/core/lib/dal/src/blocks_dal.rs index 1f4cc3b0b98c..f15b5f7da242 100644 --- a/core/lib/dal/src/blocks_dal.rs +++ b/core/lib/dal/src/blocks_dal.rs @@ -67,7 +67,8 @@ impl BlocksDal<'_, '_> { ) -> DalResult<()> { sqlx::query!( r#" - UPDATE consistency_checker_info + UPDATE + consistency_checker_info SET last_processed_l1_batch = $1, updated_at = NOW() @@ -463,7 +464,8 @@ impl BlocksDal<'_, '_> { let query = sqlx::query!( r#" - UPDATE l1_batches + UPDATE + l1_batches SET eth_commit_tx_id = $1, updated_at = NOW() @@ -494,7 +496,8 @@ impl BlocksDal<'_, '_> { .with_arg("eth_tx_id", ð_tx_id); let query = sqlx::query!( r#" - UPDATE l1_batches + UPDATE + l1_batches SET eth_prove_tx_id = $1, updated_at = NOW() @@ -527,7 +530,8 @@ impl BlocksDal<'_, '_> { let query = sqlx::query!( r#" - UPDATE l1_batches + UPDATE + l1_batches SET eth_execute_tx_id = $1, updated_at = NOW() @@ -846,7 +850,8 @@ impl BlocksDal<'_, '_> { ) -> DalResult<()> { sqlx::query!( r#" - UPDATE miniblocks + UPDATE + miniblocks SET l1_batch_number = $1 WHERE @@ -868,7 +873,8 @@ impl BlocksDal<'_, '_> { ) -> anyhow::Result<()> { let update_result = sqlx::query!( r#" - UPDATE l1_batches + UPDATE + l1_batches SET hash = $1, rollup_last_leaf_index = $2, @@ -910,7 +916,8 @@ impl BlocksDal<'_, '_> { let update_result = sqlx::query!( r#" - UPDATE l1_batches + UPDATE + l1_batches SET commitment = $1, aux_data_hash = $2, @@ -986,14 +993,20 @@ impl BlocksDal<'_, '_> { sqlx::query!( r#" INSERT INTO - commitments (l1_batch_number, events_queue_commitment, bootloader_initial_content_commitment) + commitments ( + l1_batch_number, + events_queue_commitment, + bootloader_initial_content_commitment + ) VALUES - ($1, $2, $3) - ON CONFLICT (l1_batch_number) DO NOTHING + ($1, $2, $3) ON CONFLICT (l1_batch_number) DO NOTHING "#, i64::from(number.0), - commitment_artifacts.aux_commitments.map(|a| a.events_queue_commitment.0.to_vec()), - commitment_artifacts.aux_commitments + commitment_artifacts + .aux_commitments + .map(|a| a.events_queue_commitment.0.to_vec()), + commitment_artifacts + .aux_commitments .map(|a| a.bootloader_initial_content_commitment.0.to_vec()), ) .instrument("save_batch_aux_commitments") @@ -1074,7 +1087,9 @@ impl BlocksDal<'_, '_> { number FROM l1_batches - LEFT JOIN eth_txs_history AS commit_tx ON (l1_batches.eth_commit_tx_id = commit_tx.eth_tx_id) + LEFT JOIN eth_txs_history AS commit_tx ON ( + l1_batches.eth_commit_tx_id = commit_tx.eth_tx_id + ) WHERE commit_tx.confirmed_at IS NOT NULL ORDER BY @@ -1166,7 +1181,9 @@ impl BlocksDal<'_, '_> { number FROM l1_batches - LEFT JOIN eth_txs_history AS execute_tx ON (l1_batches.eth_execute_tx_id = execute_tx.eth_tx_id) + LEFT JOIN eth_txs_history AS execute_tx ON ( + l1_batches.eth_execute_tx_id = execute_tx.eth_tx_id + ) WHERE execute_tx.confirmed_at IS NOT NULL ORDER BY @@ -1448,7 +1465,9 @@ impl BlocksDal<'_, '_> { FROM l1_batches JOIN eth_txs ON (l1_batches.eth_commit_tx_id = eth_txs.id) - JOIN eth_txs_history AS commit_tx ON (eth_txs.confirmed_eth_tx_history_id = commit_tx.id) + JOIN eth_txs_history AS commit_tx ON ( + eth_txs.confirmed_eth_tx_history_id = commit_tx.id + ) WHERE commit_tx.confirmed_at IS NOT NULL AND eth_prove_tx_id IS NOT NULL @@ -1873,7 +1892,8 @@ impl BlocksDal<'_, '_> { let l1_batch_number = last_batch_to_keep.map_or(-1, |number| i64::from(number.0)); sqlx::query!( r#" - DELETE FROM initial_writes + DELETE FROM + initial_writes WHERE l1_batch_number > $1 "#, @@ -1898,7 +1918,8 @@ impl BlocksDal<'_, '_> { let l1_batch_number = last_batch_to_keep.map_or(-1, |number| i64::from(number.0)); sqlx::query!( r#" - DELETE FROM l1_batches + DELETE FROM + l1_batches WHERE number > $1 "#, @@ -1927,7 +1948,8 @@ impl BlocksDal<'_, '_> { let block_number = last_l2_block_to_keep.map_or(-1, |number| i64::from(number.0)); sqlx::query!( r#" - DELETE FROM miniblocks + DELETE FROM + miniblocks WHERE number > $1 "#, @@ -1943,7 +1965,8 @@ impl BlocksDal<'_, '_> { async fn delete_logs_inner(&mut self) -> DalResult<()> { sqlx::query!( r#" - DELETE FROM storage_logs + DELETE FROM + storage_logs "#, ) .instrument("delete_logs") @@ -2123,7 +2146,8 @@ impl BlocksDal<'_, '_> { ) -> DalResult<()> { sqlx::query!( r#" - UPDATE miniblocks + UPDATE + miniblocks SET protocol_version = $1 WHERE @@ -2194,7 +2218,8 @@ impl BlocksDal<'_, '_> { ) -> DalResult<()> { sqlx::query!( r#" - UPDATE l1_batches + UPDATE + l1_batches SET protocol_version = $1 WHERE @@ -2219,7 +2244,8 @@ impl BlocksDal<'_, '_> { ) -> DalResult<()> { sqlx::query!( r#" - UPDATE miniblocks + UPDATE + miniblocks SET protocol_version = $1 WHERE @@ -2249,7 +2275,8 @@ impl BlocksDal<'_, '_> { let query = sqlx::query!( r#" - UPDATE l1_batches + UPDATE + l1_batches SET tree_writes = $1 WHERE @@ -2431,14 +2458,15 @@ impl BlocksDal<'_, '_> { .collect::>(); sqlx::query!( r#" - UPDATE miniblocks + UPDATE + miniblocks SET logs_bloom = data.logs_bloom FROM ( SELECT - UNNEST($1::BIGINT[]) AS number, - UNNEST($2::BYTEA[]) AS logs_bloom + UNNEST($1 :: BIGINT []) AS number, + UNNEST($2 :: BYTEA []) AS logs_bloom ) AS data WHERE miniblocks.number = data.number @@ -2464,7 +2492,8 @@ impl BlocksDal<'_, '_> { ) -> DalResult<()> { sqlx::query!( r#" - UPDATE l1_batches + UPDATE + l1_batches SET hash = $1 WHERE @@ -2538,7 +2567,8 @@ impl BlocksDal<'_, '_> { pub async fn drop_l2_block_bloom(&mut self, l2_block_number: L2BlockNumber) -> DalResult<()> { sqlx::query!( r#" - UPDATE miniblocks + UPDATE + miniblocks SET logs_bloom = NULL WHERE diff --git a/core/lib/dal/src/blocks_web3_dal.rs b/core/lib/dal/src/blocks_web3_dal.rs index 36a4acc0a6db..58e0805ffbe5 100644 --- a/core/lib/dal/src/blocks_web3_dal.rs +++ b/core/lib/dal/src/blocks_web3_dal.rs @@ -701,19 +701,18 @@ impl BlocksWeb3Dal<'_, '_> { let l1_batch_details: Option = sqlx::query_as!( StorageL1BatchDetails, r#" - WITH - mb AS ( - SELECT - l1_gas_price, - l2_fair_gas_price, - fair_pubdata_price - FROM - miniblocks - WHERE - l1_batch_number = $1 - LIMIT - 1 - ) + WITH mb AS ( + SELECT + l1_gas_price, + l2_fair_gas_price, + fair_pubdata_price + FROM + miniblocks + WHERE + l1_batch_number = $1 + LIMIT + 1 + ) SELECT l1_batches.number, l1_batches.timestamp, diff --git a/core/lib/dal/src/consensus_dal.rs b/core/lib/dal/src/consensus_dal.rs index 711ce3ddf392..705092d7f678 100644 --- a/core/lib/dal/src/consensus_dal.rs +++ b/core/lib/dal/src/consensus_dal.rs @@ -111,7 +111,8 @@ impl ConsensusDal<'_, '_> { .unwrap(); sqlx::query!( r#" - DELETE FROM l1_batches_consensus + DELETE FROM + l1_batches_consensus "# ) .instrument("try_update_genesis#DELETE FROM l1_batches_consensus") @@ -119,7 +120,8 @@ impl ConsensusDal<'_, '_> { .await?; sqlx::query!( r#" - DELETE FROM miniblocks_consensus + DELETE FROM + miniblocks_consensus "# ) .instrument("try_update_genesis#DELETE FROM miniblock_consensus") @@ -127,7 +129,8 @@ impl ConsensusDal<'_, '_> { .await?; sqlx::query!( r#" - DELETE FROM consensus_replica_state + DELETE FROM + consensus_replica_state "# ) .instrument("try_update_genesis#DELETE FROM consensus_replica_state") @@ -216,7 +219,8 @@ impl ConsensusDal<'_, '_> { zksync_protobuf::serde::serialize(state, serde_json::value::Serializer).unwrap(); sqlx::query!( r#" - UPDATE consensus_replica_state + UPDATE + consensus_replica_state SET state = $1 WHERE @@ -457,8 +461,7 @@ impl ConsensusDal<'_, '_> { INSERT INTO l1_batches_consensus_committees (l1_batch_number, attesters, updated_at) VALUES - ($1, $2, NOW()) - ON CONFLICT (l1_batch_number) DO + ($1, $2, NOW()) ON CONFLICT (l1_batch_number) DO UPDATE SET l1_batch_number = $1, @@ -529,7 +532,12 @@ impl ConsensusDal<'_, '_> { sqlx::query!( r#" INSERT INTO - l1_batches_consensus (l1_batch_number, certificate, updated_at, created_at) + l1_batches_consensus ( + l1_batch_number, + certificate, + updated_at, + created_at + ) VALUES ($1, $2, NOW(), NOW()) "#, diff --git a/core/lib/dal/src/contract_verification_dal.rs b/core/lib/dal/src/contract_verification_dal.rs index 194d85323b61..60430a4fef0b 100644 --- a/core/lib/dal/src/contract_verification_dal.rs +++ b/core/lib/dal/src/contract_verification_dal.rs @@ -52,7 +52,7 @@ impl ContractVerificationDal<'_, '_> { FROM contract_verification_requests WHERE - status = 'queued' + STATUS = 'queued' "# ) .fetch_one(self.storage.conn()) @@ -78,12 +78,26 @@ impl ContractVerificationDal<'_, '_> { constructor_arguments, is_system, force_evmla, - status, + STATUS, created_at, updated_at ) VALUES - ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, 'queued', NOW(), NOW()) + ( + $1, + $2, + $3, + $4, + $5, + $6, + $7, + $8, + $9, + $10, + 'queued', + NOW(), + NOW() + ) RETURNING id "#, @@ -120,9 +134,10 @@ impl ContractVerificationDal<'_, '_> { let result = sqlx::query_as!( StorageVerificationRequest, r#" - UPDATE contract_verification_requests + UPDATE + contract_verification_requests SET - status = 'in_progress', + STATUS = 'in_progress', attempts = attempts + 1, updated_at = NOW(), processing_started_at = NOW() @@ -133,16 +148,16 @@ impl ContractVerificationDal<'_, '_> { FROM contract_verification_requests WHERE - status = 'queued' + STATUS = 'queued' OR ( - status = 'in_progress' - AND processing_started_at < NOW() - $1::INTERVAL + STATUS = 'in_progress' + AND processing_started_at < NOW() - $1 :: INTERVAL ) ORDER BY created_at LIMIT - 1 - FOR UPDATE + 1 FOR + UPDATE SKIP LOCKED ) RETURNING @@ -179,9 +194,10 @@ impl ContractVerificationDal<'_, '_> { sqlx::query!( r#" - UPDATE contract_verification_requests + UPDATE + contract_verification_requests SET - status = 'successful', + STATUS = 'successful', updated_at = NOW() WHERE id = $1 @@ -200,8 +216,7 @@ impl ContractVerificationDal<'_, '_> { INSERT INTO contracts_verification_info (address, verification_info) VALUES - ($1, $2) - ON CONFLICT (address) DO + ($1, $2) ON CONFLICT (address) DO UPDATE SET verification_info = $2 @@ -225,9 +240,10 @@ impl ContractVerificationDal<'_, '_> { ) -> sqlx::Result<()> { sqlx::query!( r#" - UPDATE contract_verification_requests + UPDATE + contract_verification_requests SET - status = 'failed', + STATUS = 'failed', updated_at = NOW(), error = $2, compilation_errors = $3, @@ -252,7 +268,7 @@ impl ContractVerificationDal<'_, '_> { let Some(row) = sqlx::query!( r#" SELECT - status, + STATUS, error, compilation_errors FROM @@ -305,7 +321,7 @@ impl ContractVerificationDal<'_, '_> { tx_hash, topic3 FROM - events + EVENTS WHERE address = $1 AND topic1 = $2 @@ -421,7 +437,8 @@ impl ContractVerificationDal<'_, '_> { sqlx::query!( r#" - DELETE FROM compiler_versions + DELETE FROM + compiler_versions WHERE compiler = $1 "#, @@ -440,8 +457,7 @@ impl ContractVerificationDal<'_, '_> { NOW(), NOW() FROM - UNNEST($1::TEXT[]) AS u (VERSION) - ON CONFLICT (VERSION, compiler) DO NOTHING + UNNEST($1 :: TEXT []) AS u (VERSION) ON CONFLICT (VERSION, compiler) DO NOTHING "#, &versions, &compiler, @@ -489,7 +505,7 @@ impl ContractVerificationDal<'_, '_> { FROM contract_verification_requests WHERE - status = 'successful' + STATUS = 'successful' ORDER BY id "#, diff --git a/core/lib/dal/src/data_availability_dal.rs b/core/lib/dal/src/data_availability_dal.rs index 24048ec4fa19..fb5370a5e81c 100644 --- a/core/lib/dal/src/data_availability_dal.rs +++ b/core/lib/dal/src/data_availability_dal.rs @@ -28,10 +28,15 @@ impl DataAvailabilityDal<'_, '_> { let update_result = sqlx::query!( r#" INSERT INTO - data_availability (l1_batch_number, blob_id, sent_at, created_at, updated_at) + data_availability ( + l1_batch_number, + blob_id, + sent_at, + created_at, + updated_at + ) VALUES - ($1, $2, $3, NOW(), NOW()) - ON CONFLICT DO NOTHING + ($1, $2, $3, NOW(), NOW()) ON CONFLICT DO NOTHING "#, i64::from(number.0), blob_id, @@ -93,7 +98,8 @@ impl DataAvailabilityDal<'_, '_> { ) -> DalResult<()> { let update_result = sqlx::query!( r#" - UPDATE data_availability + UPDATE + data_availability SET inclusion_data = $1, updated_at = NOW() diff --git a/core/lib/dal/src/eth_sender_dal.rs b/core/lib/dal/src/eth_sender_dal.rs index 2266d6fb60f9..f3c73c839470 100644 --- a/core/lib/dal/src/eth_sender_dal.rs +++ b/core/lib/dal/src/eth_sender_dal.rs @@ -35,7 +35,9 @@ impl EthSenderDal<'_, '_> { FROM eth_txs WHERE - from_addr IS NOT DISTINCT FROM $1 -- can't just use equality as NULL != NULL + from_addr IS NOT DISTINCT + FROM + $1 -- can't just use equality as NULL != NULL AND confirmed_eth_tx_history_id IS NULL AND is_gateway = $2 AND id <= ( @@ -46,7 +48,9 @@ impl EthSenderDal<'_, '_> { JOIN eth_txs ON eth_txs.id = eth_txs_history.eth_tx_id WHERE eth_txs_history.sent_at_block IS NOT NULL - AND eth_txs.from_addr IS NOT DISTINCT FROM $1 + AND eth_txs.from_addr IS NOT DISTINCT + FROM + $1 AND is_gateway = $2 ) ORDER BY @@ -167,7 +171,9 @@ impl EthSenderDal<'_, '_> { FROM eth_txs WHERE - from_addr IS NOT DISTINCT FROM $2 -- can't just use equality as NULL != NULL + from_addr IS NOT DISTINCT + FROM + $2 -- can't just use equality as NULL != NULL AND is_gateway = $3 AND id > ( SELECT @@ -177,7 +183,9 @@ impl EthSenderDal<'_, '_> { JOIN eth_txs ON eth_txs.id = eth_txs_history.eth_tx_id WHERE eth_txs_history.sent_at_block IS NOT NULL - AND eth_txs.from_addr IS NOT DISTINCT FROM $2 + AND eth_txs.from_addr IS NOT DISTINCT + FROM + $2 AND is_gateway = $3 ) ORDER BY @@ -303,8 +311,7 @@ impl EthSenderDal<'_, '_> { sent_at ) VALUES - ($1, $2, $3, $4, $5, NOW(), NOW(), $6, $7, NOW()) - ON CONFLICT (tx_hash) DO NOTHING + ($1, $2, $3, $4, $5, NOW(), NOW(), $6, $7, NOW()) ON CONFLICT (tx_hash) DO NOTHING RETURNING id "#, @@ -328,7 +335,8 @@ impl EthSenderDal<'_, '_> { ) -> sqlx::Result<()> { sqlx::query!( r#" - UPDATE eth_txs_history + UPDATE + eth_txs_history SET sent_at_block = $2, sent_at = NOW() @@ -347,7 +355,8 @@ impl EthSenderDal<'_, '_> { pub async fn remove_tx_history(&mut self, eth_txs_history_id: u32) -> sqlx::Result<()> { sqlx::query!( r#" - DELETE FROM eth_txs_history + DELETE FROM + eth_txs_history WHERE id = $1 "#, @@ -369,7 +378,8 @@ impl EthSenderDal<'_, '_> { let tx_hash = format!("{:#x}", tx_hash); let ids = sqlx::query!( r#" - UPDATE eth_txs_history + UPDATE + eth_txs_history SET updated_at = NOW(), confirmed_at = NOW() @@ -386,7 +396,8 @@ impl EthSenderDal<'_, '_> { sqlx::query!( r#" - UPDATE eth_txs + UPDATE + eth_txs SET gas_used = $1, confirmed_eth_tx_history_id = $2 @@ -407,7 +418,8 @@ impl EthSenderDal<'_, '_> { pub async fn set_chain_id(&mut self, eth_tx_id: u32, chain_id: u64) -> anyhow::Result<()> { sqlx::query!( r#" - UPDATE eth_txs + UPDATE + eth_txs SET chain_id = $1 WHERE @@ -513,7 +525,8 @@ impl EthSenderDal<'_, '_> { // Mark general entry as confirmed. sqlx::query!( r#" - UPDATE eth_txs + UPDATE + eth_txs SET confirmed_eth_tx_history_id = $1 WHERE @@ -636,7 +649,9 @@ impl EthSenderDal<'_, '_> { FROM eth_txs WHERE - from_addr IS NOT DISTINCT FROM $1 -- can't just use equality as NULL != NULL\ + from_addr IS NOT DISTINCT + FROM + $1 -- can't just use equality as NULL != NULL\ AND is_gateway = $2 ORDER BY id DESC @@ -655,7 +670,8 @@ impl EthSenderDal<'_, '_> { pub async fn mark_failed_transaction(&mut self, eth_tx_id: u32) -> sqlx::Result<()> { sqlx::query!( r#" - UPDATE eth_txs + UPDATE + eth_txs SET has_failed = TRUE WHERE @@ -688,7 +704,8 @@ impl EthSenderDal<'_, '_> { pub async fn clear_failed_transactions(&mut self) -> sqlx::Result<()> { sqlx::query!( r#" - DELETE FROM eth_txs + DELETE FROM + eth_txs WHERE id >= ( SELECT @@ -708,7 +725,8 @@ impl EthSenderDal<'_, '_> { pub async fn delete_eth_txs(&mut self, last_batch_to_keep: L1BatchNumber) -> sqlx::Result<()> { sqlx::query!( r#" - DELETE FROM eth_txs + DELETE FROM + eth_txs WHERE id IN ( ( diff --git a/core/lib/dal/src/events_dal.rs b/core/lib/dal/src/events_dal.rs index 4050acf7135b..889ec8a9fa17 100644 --- a/core/lib/dal/src/events_dal.rs +++ b/core/lib/dal/src/events_dal.rs @@ -105,7 +105,8 @@ impl EventsDal<'_, '_> { pub async fn roll_back_events(&mut self, block_number: L2BlockNumber) -> DalResult<()> { sqlx::query!( r#" - DELETE FROM events + DELETE FROM + EVENTS WHERE miniblock_number > $1 "#, @@ -185,7 +186,8 @@ impl EventsDal<'_, '_> { pub async fn roll_back_l2_to_l1_logs(&mut self, block_number: L2BlockNumber) -> DalResult<()> { sqlx::query!( r#" - DELETE FROM l2_to_l1_logs + DELETE FROM + l2_to_l1_logs WHERE miniblock_number > $1 "#, @@ -216,16 +218,16 @@ impl EventsDal<'_, '_> { topic3, topic4, value, - NULL::bytea AS "block_hash", - NULL::BIGINT AS "l1_batch_number?", + NULL :: bytea AS "block_hash", + NULL :: BIGINT AS "l1_batch_number?", miniblock_number, tx_hash, tx_index_in_block, event_index_in_block, event_index_in_tx, - NULL::BIGINT AS "block_timestamp?" + NULL :: BIGINT AS "block_timestamp?" FROM - events + EVENTS WHERE tx_hash = ANY ($1) ORDER BY @@ -266,7 +268,7 @@ impl EventsDal<'_, '_> { SELECT value FROM - events + EVENTS WHERE miniblock_number BETWEEN $1 AND $2 AND address = $3 @@ -308,7 +310,7 @@ impl EventsDal<'_, '_> { log_index_in_miniblock, log_index_in_tx, tx_hash, - NULL::BIGINT AS "l1_batch_number?", + NULL :: BIGINT AS "l1_batch_number?", shard_id, is_service, tx_index_in_miniblock, @@ -367,7 +369,7 @@ impl EventsDal<'_, '_> { value, event_index_in_tx FROM - events + EVENTS WHERE miniblock_number BETWEEN $1 AND $2 ORDER BY @@ -424,7 +426,7 @@ impl EventsDal<'_, '_> { topic4, miniblock_number FROM - events + EVENTS WHERE miniblock_number BETWEEN $1 AND $2 ORDER BY diff --git a/core/lib/dal/src/events_web3_dal.rs b/core/lib/dal/src/events_web3_dal.rs index fc21cc36460c..d8f7f9402fc0 100644 --- a/core/lib/dal/src/events_web3_dal.rs +++ b/core/lib/dal/src/events_web3_dal.rs @@ -188,28 +188,27 @@ impl EventsWeb3Dal<'_, '_> { let db_logs: Vec = sqlx::query_as!( StorageWeb3Log, r#" - WITH - events_select AS ( - SELECT - address, - topic1, - topic2, - topic3, - topic4, - value, - miniblock_number, - tx_hash, - tx_index_in_block, - event_index_in_block, - event_index_in_tx - FROM - events - WHERE - miniblock_number > $1 - ORDER BY - miniblock_number ASC, - event_index_in_block ASC - ) + WITH events_select AS ( + SELECT + address, + topic1, + topic2, + topic3, + topic4, + value, + miniblock_number, + tx_hash, + tx_index_in_block, + event_index_in_block, + event_index_in_tx + FROM + EVENTS + WHERE + miniblock_number > $1 + ORDER BY + miniblock_number ASC, + event_index_in_block ASC + ) SELECT miniblocks.hash AS "block_hash?", address AS "address!", diff --git a/core/lib/dal/src/factory_deps_dal.rs b/core/lib/dal/src/factory_deps_dal.rs index 02ce32306cfb..dd699f613fed 100644 --- a/core/lib/dal/src/factory_deps_dal.rs +++ b/core/lib/dal/src/factory_deps_dal.rs @@ -31,7 +31,13 @@ impl FactoryDepsDal<'_, '_> { sqlx::query!( r#" INSERT INTO - factory_deps (bytecode_hash, bytecode, miniblock_number, created_at, updated_at) + factory_deps ( + bytecode_hash, + bytecode, + miniblock_number, + created_at, + updated_at + ) SELECT u.bytecode_hash, u.bytecode, @@ -39,8 +45,7 @@ impl FactoryDepsDal<'_, '_> { NOW(), NOW() FROM - UNNEST($1::bytea[], $2::bytea[]) AS u (bytecode_hash, bytecode) - ON CONFLICT (bytecode_hash) DO NOTHING + UNNEST($1 :: bytea [], $2 :: bytea []) AS u (bytecode_hash, bytecode) ON CONFLICT (bytecode_hash) DO NOTHING "#, &bytecode_hashes as &[&[u8]], &bytecodes as &[&[u8]], @@ -183,7 +188,8 @@ impl FactoryDepsDal<'_, '_> { pub async fn roll_back_factory_deps(&mut self, block_number: L2BlockNumber) -> DalResult<()> { sqlx::query!( r#" - DELETE FROM factory_deps + DELETE FROM + factory_deps WHERE miniblock_number > $1 "#, diff --git a/core/lib/dal/src/proof_generation_dal.rs b/core/lib/dal/src/proof_generation_dal.rs index dada6c69ed34..d215065e8327 100644 --- a/core/lib/dal/src/proof_generation_dal.rs +++ b/core/lib/dal/src/proof_generation_dal.rs @@ -44,9 +44,10 @@ impl ProofGenerationDal<'_, '_> { let processing_timeout = pg_interval_from_duration(processing_timeout); let result: Option = sqlx::query!( r#" - UPDATE proof_generation_details + UPDATE + proof_generation_details SET - status = 'picked_by_prover', + STATUS = 'picked_by_prover', updated_at = NOW(), prover_taken_at = NOW() WHERE @@ -63,11 +64,11 @@ impl ProofGenerationDal<'_, '_> { AND l1_batches.hash IS NOT NULL AND l1_batches.aux_data_hash IS NOT NULL AND l1_batches.meta_parameters_hash IS NOT NULL - AND status = 'unpicked' + AND STATUS = 'unpicked' ) OR ( - status = 'picked_by_prover' - AND prover_taken_at < NOW() - $1::INTERVAL + STATUS = 'picked_by_prover' + AND prover_taken_at < NOW() - $1 :: INTERVAL ) ORDER BY l1_batch_number ASC @@ -117,9 +118,10 @@ impl ProofGenerationDal<'_, '_> { let batch_number = i64::from(l1_batch_number.0); sqlx::query!( r#" - UPDATE proof_generation_details + UPDATE + proof_generation_details SET - status = 'unpicked', + STATUS = 'unpicked', updated_at = NOW() WHERE l1_batch_number = $1 @@ -142,9 +144,10 @@ impl ProofGenerationDal<'_, '_> { let batch_number = i64::from(batch_number.0); let query = sqlx::query!( r#" - UPDATE proof_generation_details + UPDATE + proof_generation_details SET - status = 'generated', + STATUS = 'generated', proof_blob_url = $1, updated_at = NOW() WHERE @@ -180,7 +183,8 @@ impl ProofGenerationDal<'_, '_> { let batch_number = i64::from(batch_number.0); let query = sqlx::query!( r#" - UPDATE proof_generation_details + UPDATE + proof_generation_details SET vm_run_data_blob_url = $1, updated_at = NOW() @@ -217,7 +221,8 @@ impl ProofGenerationDal<'_, '_> { let batch_number = i64::from(batch_number.0); let query = sqlx::query!( r#" - UPDATE proof_generation_details + UPDATE + proof_generation_details SET proof_gen_data_blob_url = $1, updated_at = NOW() @@ -254,10 +259,9 @@ impl ProofGenerationDal<'_, '_> { let result = sqlx::query!( r#" INSERT INTO - proof_generation_details (l1_batch_number, status, created_at, updated_at) + proof_generation_details (l1_batch_number, STATUS, created_at, updated_at) VALUES - ($1, 'unpicked', NOW(), NOW()) - ON CONFLICT (l1_batch_number) DO NOTHING + ($1, 'unpicked', NOW(), NOW()) ON CONFLICT (l1_batch_number) DO NOTHING "#, i64::from(l1_batch_number.0), ) @@ -284,9 +288,10 @@ impl ProofGenerationDal<'_, '_> { let l1_batch_number = i64::from(block_number.0); let query = sqlx::query!( r#" - UPDATE proof_generation_details + UPDATE + proof_generation_details SET - status = $1, + STATUS = $1, updated_at = NOW() WHERE l1_batch_number = $2 @@ -321,7 +326,7 @@ impl ProofGenerationDal<'_, '_> { FROM proof_generation_details WHERE - status = 'unpicked' + STATUS = 'unpicked' ORDER BY l1_batch_number ASC LIMIT @@ -344,7 +349,7 @@ impl ProofGenerationDal<'_, '_> { FROM proof_generation_details WHERE - status NOT IN ('generated', 'skipped') + STATUS NOT IN ('generated', 'skipped') ORDER BY l1_batch_number ASC LIMIT diff --git a/core/lib/dal/src/protocol_versions_dal.rs b/core/lib/dal/src/protocol_versions_dal.rs index 8cb5094fd49e..52dfc26ac9f9 100644 --- a/core/lib/dal/src/protocol_versions_dal.rs +++ b/core/lib/dal/src/protocol_versions_dal.rs @@ -49,8 +49,7 @@ impl ProtocolVersionsDal<'_, '_> { created_at ) VALUES - ($1, $2, $3, $4, $5, NOW()) - ON CONFLICT DO NOTHING + ($1, $2, $3, $4, $5, NOW()) ON CONFLICT DO NOTHING "#, version.minor as i32, timestamp as i64, @@ -73,8 +72,7 @@ impl ProtocolVersionsDal<'_, '_> { INSERT INTO protocol_patches (minor, patch, snark_wrapper_vk_hash, created_at) VALUES - ($1, $2, $3, NOW()) - ON CONFLICT DO NOTHING + ($1, $2, $3, NOW()) ON CONFLICT DO NOTHING "#, version.minor as i32, version.patch.0 as i32, @@ -123,7 +121,8 @@ impl ProtocolVersionsDal<'_, '_> { ) -> DalResult<()> { sqlx::query!( r#" - UPDATE protocol_versions + UPDATE + protocol_versions SET upgrade_tx_hash = $1 WHERE diff --git a/core/lib/dal/src/pruning_dal/mod.rs b/core/lib/dal/src/pruning_dal/mod.rs index 0d1584ebba36..3e2459e93c6b 100644 --- a/core/lib/dal/src/pruning_dal/mod.rs +++ b/core/lib/dal/src/pruning_dal/mod.rs @@ -44,41 +44,39 @@ impl PruningDal<'_, '_> { pub async fn get_pruning_info(&mut self) -> DalResult { let pruning_info = sqlx::query!( r#" - WITH - soft AS ( - SELECT - pruned_l1_batch, - pruned_miniblock - FROM - pruning_log - WHERE + WITH soft AS ( + SELECT + pruned_l1_batch, + pruned_miniblock + FROM + pruning_log + WHERE TYPE = 'Soft' - ORDER BY - pruned_l1_batch DESC - LIMIT - 1 - ), - hard AS ( - SELECT - pruned_l1_batch, - pruned_miniblock - FROM - pruning_log - WHERE + ORDER BY + pruned_l1_batch DESC + LIMIT + 1 + ), hard AS ( + SELECT + pruned_l1_batch, + pruned_miniblock + FROM + pruning_log + WHERE TYPE = 'Hard' - ORDER BY - pruned_l1_batch DESC - LIMIT - 1 - ) + ORDER BY + pruned_l1_batch DESC + LIMIT + 1 + ) SELECT soft.pruned_l1_batch AS last_soft_pruned_l1_batch, soft.pruned_miniblock AS last_soft_pruned_miniblock, hard.pruned_l1_batch AS last_hard_pruned_l1_batch, hard.pruned_miniblock AS last_hard_pruned_miniblock FROM - soft - FULL JOIN hard ON TRUE + soft FULL + JOIN hard ON TRUE "# ) .map(|row| PruningInfo { @@ -202,7 +200,8 @@ impl PruningDal<'_, '_> { ) -> DalResult { let execution_result = sqlx::query!( r#" - DELETE FROM events + DELETE FROM + EVENTS WHERE miniblock_number BETWEEN $1 AND $2 "#, @@ -223,7 +222,8 @@ impl PruningDal<'_, '_> { ) -> DalResult { let execution_result = sqlx::query!( r#" - DELETE FROM l2_to_l1_logs + DELETE FROM + l2_to_l1_logs WHERE miniblock_number BETWEEN $1 AND $2 "#, @@ -247,7 +247,8 @@ impl PruningDal<'_, '_> { ) -> DalResult { let execution_result = sqlx::query!( r#" - DELETE FROM call_traces + DELETE FROM + call_traces WHERE tx_hash IN ( SELECT @@ -283,7 +284,8 @@ impl PruningDal<'_, '_> { ) -> DalResult { let execution_result = sqlx::query!( r#" - UPDATE transactions + UPDATE + transactions SET input = NULL, data = '{}', @@ -318,26 +320,32 @@ impl PruningDal<'_, '_> { // Using more sophisticated queries leads to fluctuating performance due to unpredictable indexes being used. let execution_result = sqlx::query!( r#" - WITH - new_logs AS MATERIALIZED ( - SELECT DISTINCT - ON (hashed_key) hashed_key, - miniblock_number, - operation_number - FROM - storage_logs - WHERE - miniblock_number BETWEEN $1 AND $2 - ORDER BY - hashed_key, - miniblock_number DESC, - operation_number DESC - ) - DELETE FROM storage_logs USING new_logs + WITH new_logs AS MATERIALIZED ( + SELECT + DISTINCT ON (hashed_key) hashed_key, + miniblock_number, + operation_number + FROM + storage_logs + WHERE + miniblock_number BETWEEN $1 AND $2 + ORDER BY + hashed_key, + miniblock_number DESC, + operation_number DESC + ) + DELETE FROM + storage_logs USING new_logs WHERE storage_logs.hashed_key = new_logs.hashed_key AND storage_logs.miniblock_number <= $2 - AND (storage_logs.miniblock_number, storage_logs.operation_number) < (new_logs.miniblock_number, new_logs.operation_number) + AND ( + storage_logs.miniblock_number, + storage_logs.operation_number + ) < ( + new_logs.miniblock_number, + new_logs.operation_number + ) "#, i64::from(l2_blocks_to_prune.start().0), i64::from(l2_blocks_to_prune.end().0) @@ -353,7 +361,8 @@ impl PruningDal<'_, '_> { async fn delete_l1_batches(&mut self, last_l1_batch_to_prune: L1BatchNumber) -> DalResult { let execution_result = sqlx::query!( r#" - DELETE FROM l1_batches + DELETE FROM + l1_batches WHERE number <= $1 "#, @@ -370,7 +379,8 @@ impl PruningDal<'_, '_> { async fn delete_l2_blocks(&mut self, last_l2_block_to_prune: L2BlockNumber) -> DalResult { let execution_result = sqlx::query!( r#" - DELETE FROM miniblocks + DELETE FROM + miniblocks WHERE number <= $1 "#, diff --git a/core/lib/dal/src/snapshot_recovery_dal.rs b/core/lib/dal/src/snapshot_recovery_dal.rs index 0b0c0e1735fd..512411f56121 100644 --- a/core/lib/dal/src/snapshot_recovery_dal.rs +++ b/core/lib/dal/src/snapshot_recovery_dal.rs @@ -53,9 +53,10 @@ impl SnapshotRecoveryDal<'_, '_> { pub async fn mark_storage_logs_chunk_as_processed(&mut self, chunk_id: u64) -> DalResult<()> { sqlx::query!( r#" - UPDATE snapshot_recovery + UPDATE + snapshot_recovery SET - storage_logs_chunks_processed[$1] = TRUE, + storage_logs_chunks_processed [$1] = TRUE, updated_at = NOW() "#, chunk_id as i32 + 1 diff --git a/core/lib/dal/src/snapshots_creator_dal.rs b/core/lib/dal/src/snapshots_creator_dal.rs index b076240173b1..b04a135cdfdd 100644 --- a/core/lib/dal/src/snapshots_creator_dal.rs +++ b/core/lib/dal/src/snapshots_creator_dal.rs @@ -64,7 +64,7 @@ impl SnapshotsCreatorDal<'_, '_> { ( SELECT hashed_key, - MAX(ARRAY[miniblock_number, operation_number]::INT[]) AS op + MAX(ARRAY [miniblock_number, operation_number] :: INT []) AS op FROM storage_logs WHERE @@ -75,11 +75,11 @@ impl SnapshotsCreatorDal<'_, '_> { hashed_key ORDER BY hashed_key - ) AS keys - INNER JOIN storage_logs ON keys.hashed_key = storage_logs.hashed_key - AND storage_logs.miniblock_number = keys.op[1] - AND storage_logs.operation_number = keys.op[2] - INNER JOIN initial_writes ON keys.hashed_key = initial_writes.hashed_key + ) AS KEYS + INNER JOIN storage_logs ON KEYS.hashed_key = storage_logs.hashed_key + AND storage_logs.miniblock_number = KEYS.op [1] + AND storage_logs.operation_number = KEYS.op [2] + INNER JOIN initial_writes ON KEYS.hashed_key = initial_writes.hashed_key WHERE initial_writes.l1_batch_number <= $2 "#, @@ -130,7 +130,7 @@ impl SnapshotsCreatorDal<'_, '_> { ( SELECT hashed_key, - MAX(ARRAY[miniblock_number, operation_number]::INT[]) AS op + MAX(ARRAY [miniblock_number, operation_number] :: INT []) AS op FROM storage_logs WHERE @@ -141,11 +141,11 @@ impl SnapshotsCreatorDal<'_, '_> { hashed_key ORDER BY hashed_key - ) AS keys - INNER JOIN storage_logs ON keys.hashed_key = storage_logs.hashed_key - AND storage_logs.miniblock_number = keys.op[1] - AND storage_logs.operation_number = keys.op[2] - INNER JOIN initial_writes ON keys.hashed_key = initial_writes.hashed_key + ) AS KEYS + INNER JOIN storage_logs ON KEYS.hashed_key = storage_logs.hashed_key + AND storage_logs.miniblock_number = KEYS.op [1] + AND storage_logs.operation_number = KEYS.op [2] + INNER JOIN initial_writes ON KEYS.hashed_key = initial_writes.hashed_key WHERE initial_writes.l1_batch_number <= $2 "#, diff --git a/core/lib/dal/src/snapshots_dal.rs b/core/lib/dal/src/snapshots_dal.rs index 009efd3da078..11e9204dc39c 100644 --- a/core/lib/dal/src/snapshots_dal.rs +++ b/core/lib/dal/src/snapshots_dal.rs @@ -63,7 +63,14 @@ impl SnapshotsDal<'_, '_> { updated_at ) VALUES - ($1, $2, ARRAY_FILL(''::TEXT, ARRAY[$3::INTEGER]), $4, NOW(), NOW()) + ( + $1, + $2, + ARRAY_FILL('' :: TEXT, ARRAY [$3::INTEGER]), + $4, + NOW(), + NOW() + ) "#, version as i32, l1_batch_number.0 as i32, @@ -87,9 +94,10 @@ impl SnapshotsDal<'_, '_> { ) -> DalResult<()> { sqlx::query!( r#" - UPDATE snapshots + UPDATE + snapshots SET - storage_logs_filepaths[$2] = $3, + storage_logs_filepaths [$2] = $3, updated_at = NOW() WHERE l1_batch_number = $1 @@ -115,7 +123,7 @@ impl SnapshotsDal<'_, '_> { FROM snapshots WHERE - NOT (''::TEXT = ANY (storage_logs_filepaths)) + NOT ('' :: TEXT = ANY (storage_logs_filepaths)) ORDER BY l1_batch_number DESC "# @@ -194,7 +202,8 @@ impl SnapshotsDal<'_, '_> { sqlx::query_as!( StorageSnapshotMetadata, r#" - DELETE FROM snapshots + DELETE FROM + snapshots WHERE l1_batch_number > $1 RETURNING diff --git a/core/lib/dal/src/storage_logs_dal.rs b/core/lib/dal/src/storage_logs_dal.rs index d5de66037b49..89f8773dd11f 100644 --- a/core/lib/dal/src/storage_logs_dal.rs +++ b/core/lib/dal/src/storage_logs_dal.rs @@ -186,8 +186,8 @@ impl StorageLogsDal<'_, '_> { ) -> DalResult> { let rows = sqlx::query!( r#" - SELECT DISTINCT - hashed_key + SELECT + DISTINCT hashed_key FROM storage_logs WHERE @@ -211,7 +211,8 @@ impl StorageLogsDal<'_, '_> { pub async fn roll_back_storage_logs(&mut self, block_number: L2BlockNumber) -> DalResult<()> { sqlx::query!( r#" - DELETE FROM storage_logs + DELETE FROM + storage_logs WHERE miniblock_number > $1 "#, @@ -289,8 +290,8 @@ impl StorageLogsDal<'_, '_> { // this value will equal `FAILED_CONTRACT_DEPLOYMENT_BYTECODE_HASH`, so that they can be easily filtered. let rows = sqlx::query!( r#" - SELECT DISTINCT - ON (hashed_key) hashed_key, + SELECT + DISTINCT ON (hashed_key) hashed_key, miniblock_number, value FROM @@ -543,7 +544,7 @@ impl StorageLogsDal<'_, '_> { FROM initial_writes WHERE - hashed_key = ANY ($1::bytea[]) + hashed_key = ANY ($1 :: bytea []) "#, &hashed_keys as &[&[u8]], ) @@ -621,7 +622,7 @@ impl StorageLogsDal<'_, '_> { 1 ) AS "value?" FROM - UNNEST($1::bytea[]) AS u (hashed_key) + UNNEST($1 :: bytea []) AS u (hashed_key) "#, &hashed_keys as &[&[u8]], i64::from(l2_block_number.0) @@ -716,33 +717,32 @@ impl StorageLogsDal<'_, '_> { .unzip(); let rows = sqlx::query!( r#" - WITH - sl AS ( - SELECT - ( - SELECT - ARRAY[hashed_key, value] AS kv - FROM - storage_logs - WHERE - storage_logs.miniblock_number = $1 - AND storage_logs.hashed_key >= u.start_key - AND storage_logs.hashed_key <= u.end_key - ORDER BY - storage_logs.hashed_key - LIMIT - 1 - ) - FROM - UNNEST($2::bytea[], $3::bytea[]) AS u (start_key, end_key) - ) + WITH sl AS ( + SELECT + ( + SELECT + ARRAY [hashed_key, value] AS kv + FROM + storage_logs + WHERE + storage_logs.miniblock_number = $1 + AND storage_logs.hashed_key >= u.start_key + AND storage_logs.hashed_key <= u.end_key + ORDER BY + storage_logs.hashed_key + LIMIT + 1 + ) + FROM + UNNEST($2 :: bytea [], $3 :: bytea []) AS u (start_key, end_key) + ) SELECT - sl.kv[1] AS "hashed_key?", - sl.kv[2] AS "value?", + sl.kv [1] AS "hashed_key?", + sl.kv [2] AS "value?", initial_writes.index FROM sl - LEFT OUTER JOIN initial_writes ON initial_writes.hashed_key = sl.kv[1] + LEFT OUTER JOIN initial_writes ON initial_writes.hashed_key = sl.kv [1] "#, i64::from(l2_block_number.0), &start_keys as &[&[u8]], @@ -782,8 +782,8 @@ impl StorageLogsDal<'_, '_> { INNER JOIN initial_writes ON storage_logs.hashed_key = initial_writes.hashed_key WHERE storage_logs.miniblock_number = $1 - AND storage_logs.hashed_key >= $2::bytea - AND storage_logs.hashed_key <= $3::bytea + AND storage_logs.hashed_key >= $2 :: bytea + AND storage_logs.hashed_key <= $3 :: bytea ORDER BY storage_logs.hashed_key "#, diff --git a/core/lib/dal/src/storage_logs_dedup_dal.rs b/core/lib/dal/src/storage_logs_dedup_dal.rs index 02049f3e9ade..3b464e596120 100644 --- a/core/lib/dal/src/storage_logs_dedup_dal.rs +++ b/core/lib/dal/src/storage_logs_dedup_dal.rs @@ -93,7 +93,13 @@ impl StorageLogsDedupDal<'_, '_> { sqlx::query!( r#" INSERT INTO - initial_writes (hashed_key, INDEX, l1_batch_number, created_at, updated_at) + initial_writes ( + hashed_key, + INDEX, + l1_batch_number, + created_at, + updated_at + ) SELECT u.hashed_key, u.index, @@ -101,7 +107,7 @@ impl StorageLogsDedupDal<'_, '_> { NOW(), NOW() FROM - UNNEST($1::bytea[], $2::BIGINT[]) AS u (hashed_key, INDEX) + UNNEST($1 :: bytea [], $2 :: BIGINT []) AS u (hashed_key, INDEX) "#, &hashed_keys as &[&[u8]], &indices, diff --git a/core/lib/dal/src/system_dal.rs b/core/lib/dal/src/system_dal.rs index f6dda53b1584..3e307ce23db3 100644 --- a/core/lib/dal/src/system_dal.rs +++ b/core/lib/dal/src/system_dal.rs @@ -31,7 +31,7 @@ impl SystemDal<'_, '_> { SECONDS FROM NOW() - PG_LAST_XACT_REPLAY_TIMESTAMP() - )::INT AS LAG + ) :: INT AS LAG "# ) .instrument("get_replication_lag") @@ -49,10 +49,10 @@ impl SystemDal<'_, '_> { r#" SELECT table_name, - PG_TABLE_SIZE(('public.' || QUOTE_IDENT(table_name))::regclass) AS table_size, - PG_INDEXES_SIZE(('public.' || QUOTE_IDENT(table_name))::regclass) AS indexes_size, - PG_RELATION_SIZE(('public.' || QUOTE_IDENT(table_name))::regclass) AS relation_size, - PG_TOTAL_RELATION_SIZE(('public.' || QUOTE_IDENT(table_name))::regclass) AS total_size + PG_TABLE_SIZE(('public.' || QUOTE_IDENT(table_name)) :: regclass) AS table_size, + PG_INDEXES_SIZE(('public.' || QUOTE_IDENT(table_name)) :: regclass) AS indexes_size, + PG_RELATION_SIZE(('public.' || QUOTE_IDENT(table_name)) :: regclass) AS relation_size, + PG_TOTAL_RELATION_SIZE(('public.' || QUOTE_IDENT(table_name)) :: regclass) AS total_size FROM information_schema.tables WHERE diff --git a/core/lib/dal/src/tee_proof_generation_dal.rs b/core/lib/dal/src/tee_proof_generation_dal.rs index cc6b87a07aca..c40ea608fa55 100644 --- a/core/lib/dal/src/tee_proof_generation_dal.rs +++ b/core/lib/dal/src/tee_proof_generation_dal.rs @@ -41,9 +41,10 @@ impl TeeProofGenerationDal<'_, '_> { let min_batch_number = min_batch_number.map_or(0, |num| i64::from(num.0)); let query = sqlx::query!( r#" - UPDATE tee_proof_generation_details + UPDATE + tee_proof_generation_details SET - status = $1, + STATUS = $1, updated_at = NOW(), prover_taken_at = NOW() WHERE @@ -60,15 +61,15 @@ impl TeeProofGenerationDal<'_, '_> { proofs.status = $4 OR ( proofs.status = $1 - AND proofs.prover_taken_at < NOW() - $5::INTERVAL + AND proofs.prover_taken_at < NOW() - $5 :: INTERVAL ) ) AND proofs.l1_batch_number >= $6 ORDER BY l1_batch_number ASC LIMIT - 1 - FOR UPDATE + 1 FOR + UPDATE SKIP LOCKED ) RETURNING @@ -102,9 +103,10 @@ impl TeeProofGenerationDal<'_, '_> { let batch_number = i64::from(l1_batch_number.0); sqlx::query!( r#" - UPDATE tee_proof_generation_details + UPDATE + tee_proof_generation_details SET - status = $1, + STATUS = $1, updated_at = NOW() WHERE l1_batch_number = $2 @@ -134,10 +136,11 @@ impl TeeProofGenerationDal<'_, '_> { let batch_number = i64::from(batch_number.0); let query = sqlx::query!( r#" - UPDATE tee_proof_generation_details + UPDATE + tee_proof_generation_details SET tee_type = $1, - status = $2, + STATUS = $2, pubkey = $3, signature = $4, proof = $5, @@ -183,10 +186,15 @@ impl TeeProofGenerationDal<'_, '_> { let query = sqlx::query!( r#" INSERT INTO - tee_proof_generation_details (l1_batch_number, tee_type, status, created_at, updated_at) + tee_proof_generation_details ( + l1_batch_number, + tee_type, + STATUS, + created_at, + updated_at + ) VALUES - ($1, $2, $3, NOW(), NOW()) - ON CONFLICT (l1_batch_number, tee_type) DO NOTHING + ($1, $2, $3, NOW(), NOW()) ON CONFLICT (l1_batch_number, tee_type) DO NOTHING "#, batch_number, tee_type.to_string(), @@ -210,8 +218,7 @@ impl TeeProofGenerationDal<'_, '_> { INSERT INTO tee_attestations (pubkey, attestation) VALUES - ($1, $2) - ON CONFLICT (pubkey) DO NOTHING + ($1, $2) ON CONFLICT (pubkey) DO NOTHING "#, pubkey, attestation diff --git a/core/lib/dal/src/tee_verifier_input_producer_dal.rs b/core/lib/dal/src/tee_verifier_input_producer_dal.rs index 4a178fd52253..89179e0baa3b 100644 --- a/core/lib/dal/src/tee_verifier_input_producer_dal.rs +++ b/core/lib/dal/src/tee_verifier_input_producer_dal.rs @@ -55,10 +55,9 @@ impl TeeVerifierInputProducerDal<'_, '_> { sqlx::query!( r#" INSERT INTO - tee_verifier_input_producer_jobs (l1_batch_number, status, created_at, updated_at) + tee_verifier_input_producer_jobs (l1_batch_number, STATUS, created_at, updated_at) VALUES - ($1, $2, NOW(), NOW()) - ON CONFLICT (l1_batch_number) DO NOTHING + ($1, $2, NOW(), NOW()) ON CONFLICT (l1_batch_number) DO NOTHING "#, i64::from(l1_batch_number.0), TeeVerifierInputProducerJobStatus::Queued as TeeVerifierInputProducerJobStatus, @@ -77,9 +76,10 @@ impl TeeVerifierInputProducerDal<'_, '_> { ) -> DalResult> { let l1_batch_number = sqlx::query!( r#" - UPDATE tee_verifier_input_producer_jobs + UPDATE + tee_verifier_input_producer_jobs SET - status = $1, + STATUS = $1, attempts = attempts + 1, updated_at = NOW(), processing_started_at = NOW() @@ -90,20 +90,20 @@ impl TeeVerifierInputProducerDal<'_, '_> { FROM tee_verifier_input_producer_jobs WHERE - status = $2 + STATUS = $2 OR ( - status = $1 - AND processing_started_at < NOW() - $4::INTERVAL + STATUS = $1 + AND processing_started_at < NOW() - $4 :: INTERVAL ) OR ( - status = $3 + STATUS = $3 AND attempts < $5 ) ORDER BY l1_batch_number ASC LIMIT - 1 - FOR UPDATE + 1 FOR + UPDATE SKIP LOCKED ) RETURNING @@ -156,9 +156,10 @@ impl TeeVerifierInputProducerDal<'_, '_> { ) -> DalResult<()> { sqlx::query!( r#" - UPDATE tee_verifier_input_producer_jobs + UPDATE + tee_verifier_input_producer_jobs SET - status = $1, + STATUS = $1, updated_at = NOW(), time_taken = $3, input_blob_url = $4 @@ -187,15 +188,16 @@ impl TeeVerifierInputProducerDal<'_, '_> { ) -> DalResult> { let attempts = sqlx::query!( r#" - UPDATE tee_verifier_input_producer_jobs + UPDATE + tee_verifier_input_producer_jobs SET - status = $1, + STATUS = $1, updated_at = NOW(), time_taken = $3, error = $4 WHERE l1_batch_number = $2 - AND status != $5 + AND STATUS != $5 RETURNING tee_verifier_input_producer_jobs.attempts "#, @@ -221,7 +223,8 @@ impl TeeVerifierInputProducerDal<'_, '_> { pub async fn delete_all_jobs(&mut self) -> DalResult<()> { sqlx::query!( r#" - DELETE FROM tee_verifier_input_producer_jobs + DELETE FROM + tee_verifier_input_producer_jobs "# ) .instrument("delete_all_tee_verifier_jobs") diff --git a/core/lib/dal/src/tokens_dal.rs b/core/lib/dal/src/tokens_dal.rs index b34b913c45c3..54d976aa0762 100644 --- a/core/lib/dal/src/tokens_dal.rs +++ b/core/lib/dal/src/tokens_dal.rs @@ -49,7 +49,8 @@ impl TokensDal<'_, '_> { pub async fn mark_token_as_well_known(&mut self, l1_address: Address) -> DalResult<()> { sqlx::query!( r#" - UPDATE tokens + UPDATE + tokens SET well_known = TRUE, updated_at = NOW() @@ -108,7 +109,8 @@ impl TokensDal<'_, '_> { .collect(); sqlx::query!( r#" - DELETE FROM tokens + DELETE FROM + tokens WHERE l2_address = ANY ($1) "#, diff --git a/core/lib/dal/src/transactions_dal.rs b/core/lib/dal/src/transactions_dal.rs index 0a72289b48a4..5980b66c6b52 100644 --- a/core/lib/dal/src/transactions_dal.rs +++ b/core/lib/dal/src/transactions_dal.rs @@ -132,8 +132,7 @@ impl TransactionsDal<'_, '_> { $18, NOW(), NOW() - ) - ON CONFLICT (hash) DO NOTHING + ) ON CONFLICT (hash) DO NOTHING "#, tx_hash_bytes, sender, @@ -230,8 +229,7 @@ impl TransactionsDal<'_, '_> { $16, NOW(), NOW() - ) - ON CONFLICT (hash) DO NOTHING + ) ON CONFLICT (hash) DO NOTHING "#, tx_hash, sender, @@ -364,12 +362,18 @@ impl TransactionsDal<'_, '_> { $13, $14, $15, - JSONB_BUILD_OBJECT('gas_used', $16::BIGINT, 'storage_writes', $17::INT, 'contracts_used', $18::INT), + JSONB_BUILD_OBJECT( + 'gas_used', + $16 :: BIGINT, + 'storage_writes', + $17 :: INT, + 'contracts_used', + $18 :: INT + ), $19, NOW(), NOW() - ) - ON CONFLICT (initiator_address, nonce) DO + ) ON CONFLICT (initiator_address, nonce) DO UPDATE SET hash = $1, @@ -385,7 +389,14 @@ impl TransactionsDal<'_, '_> { value = $13, paymaster = $14, paymaster_input = $15, - execution_info = JSONB_BUILD_OBJECT('gas_used', $16::BIGINT, 'storage_writes', $17::INT, 'contracts_used', $18::INT), + execution_info = JSONB_BUILD_OBJECT( + 'gas_used', + $16 :: BIGINT, + 'storage_writes', + $17 :: INT, + 'contracts_used', + $18 :: INT + ), in_mempool = FALSE, received_at = $19, created_at = NOW(), @@ -479,7 +490,8 @@ impl TransactionsDal<'_, '_> { let l1_batch_tx_indexes: Vec<_> = (0..transactions.len() as i32).collect(); sqlx::query!( r#" - UPDATE transactions + UPDATE + transactions SET l1_batch_number = $3, l1_batch_tx_index = data_table.l1_batch_tx_index, @@ -487,8 +499,8 @@ impl TransactionsDal<'_, '_> { FROM ( SELECT - UNNEST($1::INT[]) AS l1_batch_tx_index, - UNNEST($2::bytea[]) AS hash + UNNEST($1 :: INT []) AS l1_batch_tx_index, + UNNEST($2 :: bytea []) AS hash ) AS data_table WHERE transactions.hash = data_table.hash @@ -532,7 +544,8 @@ impl TransactionsDal<'_, '_> { let tx_hashes: Vec<_> = transactions.iter().map(|tx| tx.hash.as_bytes()).collect(); sqlx::query!( r#" - DELETE FROM transactions + DELETE FROM + transactions WHERE hash = ANY ($1) "#, @@ -549,7 +562,8 @@ impl TransactionsDal<'_, '_> { let initiator = tx.transaction.initiator_account(); sqlx::query!( r#" - DELETE FROM transactions + DELETE FROM + transactions WHERE initiator_address = $1 AND nonce = $2 @@ -608,7 +622,7 @@ impl TransactionsDal<'_, '_> { u.tx_hash, u.call_trace FROM - UNNEST($1::bytea[], $2::bytea[]) AS u (tx_hash, call_trace) + UNNEST($1 :: bytea [], $2 :: bytea []) AS u (tx_hash, call_trace) "#, &call_traces_tx_hashes as &[&[u8]], &bytea_call_traces @@ -790,26 +804,26 @@ impl TransactionsDal<'_, '_> { FROM ( SELECT - UNNEST($1::bytea[]) AS hash, - UNNEST($2::bytea[]) AS initiator_address, - UNNEST($3::INT[]) AS nonce, - UNNEST($4::bytea[]) AS signature, - UNNEST($5::NUMERIC[]) AS gas_limit, - UNNEST($6::NUMERIC[]) AS max_fee_per_gas, - UNNEST($7::NUMERIC[]) AS max_priority_fee_per_gas, - UNNEST($8::NUMERIC[]) AS gas_per_pubdata_limit, - UNNEST($9::bytea[]) AS input, - UNNEST($10::jsonb[]) AS data, - UNNEST($11::INT[]) AS tx_format, - UNNEST($12::bytea[]) AS contract_address, - UNNEST($13::NUMERIC[]) AS value, - UNNEST($14::bytea[]) AS paymaster, - UNNEST($15::bytea[]) AS paymaster_input, - UNNEST($16::jsonb[]) AS new_execution_info, - UNNEST($17::INTEGER[]) AS index_in_block, - UNNEST($18::VARCHAR[]) AS error, - UNNEST($19::NUMERIC[]) AS effective_gas_price, - UNNEST($20::BIGINT[]) AS refunded_gas + UNNEST($1 :: bytea []) AS hash, + UNNEST($2 :: bytea []) AS initiator_address, + UNNEST($3 :: INT []) AS nonce, + UNNEST($4 :: bytea []) AS signature, + UNNEST($5 :: NUMERIC []) AS gas_limit, + UNNEST($6 :: NUMERIC []) AS max_fee_per_gas, + UNNEST($7 :: NUMERIC []) AS max_priority_fee_per_gas, + UNNEST($8 :: NUMERIC []) AS gas_per_pubdata_limit, + UNNEST($9 :: bytea []) AS input, + UNNEST($10 :: jsonb []) AS data, + UNNEST($11 :: INT []) AS tx_format, + UNNEST($12 :: bytea []) AS contract_address, + UNNEST($13 :: NUMERIC []) AS value, + UNNEST($14 :: bytea []) AS paymaster, + UNNEST($15 :: bytea []) AS paymaster_input, + UNNEST($16 :: jsonb []) AS new_execution_info, + UNNEST($17 :: INTEGER []) AS index_in_block, + UNNEST($18 :: VARCHAR []) AS error, + UNNEST($19 :: NUMERIC []) AS effective_gas_price, + UNNEST($20 :: BIGINT []) AS refunded_gas ) AS data_table "#, &l2_hashes as &[&[u8]], @@ -943,7 +957,8 @@ impl TransactionsDal<'_, '_> { // Note, that transactions are updated in order of their hashes to avoid deadlocks with other UPDATE queries. let query = sqlx::query!( r#" - UPDATE transactions + UPDATE + transactions SET hash = data_table.hash, signature = data_table.signature, @@ -973,26 +988,26 @@ impl TransactionsDal<'_, '_> { FROM ( SELECT - UNNEST($1::bytea[]) AS initiator_address, - UNNEST($2::INT[]) AS nonce, - UNNEST($3::bytea[]) AS hash, - UNNEST($4::bytea[]) AS signature, - UNNEST($5::NUMERIC[]) AS gas_limit, - UNNEST($6::NUMERIC[]) AS max_fee_per_gas, - UNNEST($7::NUMERIC[]) AS max_priority_fee_per_gas, - UNNEST($8::NUMERIC[]) AS gas_per_pubdata_limit, - UNNEST($9::INT[]) AS tx_format, - UNNEST($10::INTEGER[]) AS index_in_block, - UNNEST($11::VARCHAR[]) AS error, - UNNEST($12::NUMERIC[]) AS effective_gas_price, - UNNEST($13::jsonb[]) AS new_execution_info, - UNNEST($14::bytea[]) AS input, - UNNEST($15::jsonb[]) AS data, - UNNEST($16::BIGINT[]) AS refunded_gas, - UNNEST($17::NUMERIC[]) AS value, - UNNEST($18::bytea[]) AS contract_address, - UNNEST($19::bytea[]) AS paymaster, - UNNEST($20::bytea[]) AS paymaster_input + UNNEST($1 :: bytea []) AS initiator_address, + UNNEST($2 :: INT []) AS nonce, + UNNEST($3 :: bytea []) AS hash, + UNNEST($4 :: bytea []) AS signature, + UNNEST($5 :: NUMERIC []) AS gas_limit, + UNNEST($6 :: NUMERIC []) AS max_fee_per_gas, + UNNEST($7 :: NUMERIC []) AS max_priority_fee_per_gas, + UNNEST($8 :: NUMERIC []) AS gas_per_pubdata_limit, + UNNEST($9 :: INT []) AS tx_format, + UNNEST($10 :: INTEGER []) AS index_in_block, + UNNEST($11 :: VARCHAR []) AS error, + UNNEST($12 :: NUMERIC []) AS effective_gas_price, + UNNEST($13 :: jsonb []) AS new_execution_info, + UNNEST($14 :: bytea []) AS input, + UNNEST($15 :: jsonb []) AS data, + UNNEST($16 :: BIGINT []) AS refunded_gas, + UNNEST($17 :: NUMERIC []) AS value, + UNNEST($18 :: bytea []) AS contract_address, + UNNEST($19 :: bytea []) AS paymaster, + UNNEST($20 :: bytea []) AS paymaster_input ) AS data_table_temp JOIN transactions ON transactions.initiator_address = data_table_temp.initiator_address AND transactions.nonce = data_table_temp.nonce @@ -1164,8 +1179,8 @@ impl TransactionsDal<'_, '_> { data_table.contract_address, data_table.l1_block_number, data_table.value, - '\x0000000000000000000000000000000000000000'::bytea, - '\x'::bytea, + '\x0000000000000000000000000000000000000000' :: bytea, + '\x' :: bytea, data_table.tx_format, data_table.l1_tx_mint, data_table.l1_tx_refund_recipient, @@ -1181,26 +1196,26 @@ impl TransactionsDal<'_, '_> { FROM ( SELECT - UNNEST($1::BYTEA[]) AS hash, - UNNEST($2::BYTEA[]) AS initiator_address, - UNNEST($3::NUMERIC[]) AS gas_limit, - UNNEST($4::NUMERIC[]) AS max_fee_per_gas, - UNNEST($5::NUMERIC[]) AS gas_per_pubdata_limit, - UNNEST($6::JSONB[]) AS data, - UNNEST($7::BIGINT[]) AS priority_op_id, - UNNEST($8::NUMERIC[]) AS full_fee, - UNNEST($9::NUMERIC[]) AS layer_2_tip_fee, - UNNEST($10::BYTEA[]) AS contract_address, - UNNEST($11::INT[]) AS l1_block_number, - UNNEST($12::NUMERIC[]) AS value, - UNNEST($13::INTEGER[]) AS tx_format, - UNNEST($14::NUMERIC[]) AS l1_tx_mint, - UNNEST($15::BYTEA[]) AS l1_tx_refund_recipient, - UNNEST($16::INT[]) AS index_in_block, - UNNEST($17::VARCHAR[]) AS error, - UNNEST($18::JSONB[]) AS execution_info, - UNNEST($19::BIGINT[]) AS refunded_gas, - UNNEST($20::NUMERIC[]) AS effective_gas_price + UNNEST($1 :: BYTEA []) AS hash, + UNNEST($2 :: BYTEA []) AS initiator_address, + UNNEST($3 :: NUMERIC []) AS gas_limit, + UNNEST($4 :: NUMERIC []) AS max_fee_per_gas, + UNNEST($5 :: NUMERIC []) AS gas_per_pubdata_limit, + UNNEST($6 :: JSONB []) AS data, + UNNEST($7 :: BIGINT []) AS priority_op_id, + UNNEST($8 :: NUMERIC []) AS full_fee, + UNNEST($9 :: NUMERIC []) AS layer_2_tip_fee, + UNNEST($10 :: BYTEA []) AS contract_address, + UNNEST($11 :: INT []) AS l1_block_number, + UNNEST($12 :: NUMERIC []) AS value, + UNNEST($13 :: INTEGER []) AS tx_format, + UNNEST($14 :: NUMERIC []) AS l1_tx_mint, + UNNEST($15 :: BYTEA []) AS l1_tx_refund_recipient, + UNNEST($16 :: INT []) AS index_in_block, + UNNEST($17 :: VARCHAR []) AS error, + UNNEST($18 :: JSONB []) AS execution_info, + UNNEST($19 :: BIGINT []) AS refunded_gas, + UNNEST($20 :: NUMERIC []) AS effective_gas_price ) AS data_table "#, &l1_hashes as &[&[u8]], @@ -1286,7 +1301,8 @@ impl TransactionsDal<'_, '_> { let query = sqlx::query!( r#" - UPDATE transactions + UPDATE + transactions SET miniblock_number = $1, index_in_block = data_table.index_in_block, @@ -1299,12 +1315,12 @@ impl TransactionsDal<'_, '_> { FROM ( SELECT - UNNEST($2::bytea[]) AS hash, - UNNEST($3::INTEGER[]) AS index_in_block, - UNNEST($4::VARCHAR[]) AS error, - UNNEST($5::jsonb[]) AS new_execution_info, - UNNEST($6::BIGINT[]) AS refunded_gas, - UNNEST($7::NUMERIC[]) AS effective_gas_price + UNNEST($2 :: bytea []) AS hash, + UNNEST($3 :: INTEGER []) AS index_in_block, + UNNEST($4 :: VARCHAR []) AS error, + UNNEST($5 :: jsonb []) AS new_execution_info, + UNNEST($6 :: BIGINT []) AS refunded_gas, + UNNEST($7 :: NUMERIC []) AS effective_gas_price ) AS data_table WHERE transactions.hash = data_table.hash @@ -1451,8 +1467,8 @@ impl TransactionsDal<'_, '_> { data_table.contract_address, data_table.l1_block_number, data_table.value, - '\x0000000000000000000000000000000000000000'::bytea, - '\x'::bytea, + '\x0000000000000000000000000000000000000000' :: bytea, + '\x' :: bytea, data_table.tx_format, data_table.l1_tx_mint, data_table.l1_tx_refund_recipient, @@ -1468,24 +1484,24 @@ impl TransactionsDal<'_, '_> { FROM ( SELECT - UNNEST($1::BYTEA[]) AS hash, - UNNEST($2::BYTEA[]) AS initiator_address, - UNNEST($3::NUMERIC[]) AS gas_limit, - UNNEST($4::NUMERIC[]) AS max_fee_per_gas, - UNNEST($5::NUMERIC[]) AS gas_per_pubdata_limit, - UNNEST($6::JSONB[]) AS data, - UNNEST($7::INT[]) AS upgrade_id, - UNNEST($8::BYTEA[]) AS contract_address, - UNNEST($9::INT[]) AS l1_block_number, - UNNEST($10::NUMERIC[]) AS value, - UNNEST($11::INTEGER[]) AS tx_format, - UNNEST($12::NUMERIC[]) AS l1_tx_mint, - UNNEST($13::BYTEA[]) AS l1_tx_refund_recipient, - UNNEST($14::INT[]) AS index_in_block, - UNNEST($15::VARCHAR[]) AS error, - UNNEST($16::JSONB[]) AS execution_info, - UNNEST($17::BIGINT[]) AS refunded_gas, - UNNEST($18::NUMERIC[]) AS effective_gas_price + UNNEST($1 :: BYTEA []) AS hash, + UNNEST($2 :: BYTEA []) AS initiator_address, + UNNEST($3 :: NUMERIC []) AS gas_limit, + UNNEST($4 :: NUMERIC []) AS max_fee_per_gas, + UNNEST($5 :: NUMERIC []) AS gas_per_pubdata_limit, + UNNEST($6 :: JSONB []) AS data, + UNNEST($7 :: INT []) AS upgrade_id, + UNNEST($8 :: BYTEA []) AS contract_address, + UNNEST($9 :: INT []) AS l1_block_number, + UNNEST($10 :: NUMERIC []) AS value, + UNNEST($11 :: INTEGER []) AS tx_format, + UNNEST($12 :: NUMERIC []) AS l1_tx_mint, + UNNEST($13 :: BYTEA []) AS l1_tx_refund_recipient, + UNNEST($14 :: INT []) AS index_in_block, + UNNEST($15 :: VARCHAR []) AS error, + UNNEST($16 :: JSONB []) AS execution_info, + UNNEST($17 :: BIGINT []) AS refunded_gas, + UNNEST($18 :: NUMERIC []) AS effective_gas_price ) AS data_table "#, &upgrade_hashes as &[&[u8]], @@ -1571,7 +1587,8 @@ impl TransactionsDal<'_, '_> { let query = sqlx::query!( r#" - UPDATE transactions + UPDATE + transactions SET miniblock_number = $1, index_in_block = data_table.index_in_block, @@ -1584,12 +1601,12 @@ impl TransactionsDal<'_, '_> { FROM ( SELECT - UNNEST($2::bytea[]) AS hash, - UNNEST($3::INTEGER[]) AS index_in_block, - UNNEST($4::VARCHAR[]) AS error, - UNNEST($5::jsonb[]) AS new_execution_info, - UNNEST($6::BIGINT[]) AS refunded_gas, - UNNEST($7::NUMERIC[]) AS effective_gas_price + UNNEST($2 :: bytea []) AS hash, + UNNEST($3 :: INTEGER []) AS index_in_block, + UNNEST($4 :: VARCHAR []) AS error, + UNNEST($5 :: jsonb []) AS new_execution_info, + UNNEST($6 :: BIGINT []) AS refunded_gas, + UNNEST($7 :: NUMERIC []) AS effective_gas_price ) AS data_table WHERE transactions.hash = data_table.hash @@ -1617,7 +1634,8 @@ impl TransactionsDal<'_, '_> { // These txs don't affect the state, so we can just easily skip this update. sqlx::query!( r#" - UPDATE transactions + UPDATE + transactions SET error = $1, updated_at = NOW() @@ -1640,7 +1658,8 @@ impl TransactionsDal<'_, '_> { ) -> DalResult<()> { let hash_rows = sqlx::query!( r#" - UPDATE transactions + UPDATE + transactions SET l1_batch_number = NULL, miniblock_number = NULL, @@ -1662,7 +1681,8 @@ impl TransactionsDal<'_, '_> { let tx_hashes: Vec<_> = hash_rows.iter().map(|row| &row.hash[..]).collect(); sqlx::query!( r#" - DELETE FROM call_traces + DELETE FROM + call_traces WHERE tx_hash = ANY ($1) "#, @@ -1680,10 +1700,11 @@ impl TransactionsDal<'_, '_> { let stuck_tx_timeout = pg_interval_from_duration(stuck_tx_timeout); let rows = sqlx::query!( r#" - DELETE FROM transactions + DELETE FROM + transactions WHERE miniblock_number IS NULL - AND received_at < NOW() - $1::INTERVAL + AND received_at < NOW() - $1 :: INTERVAL AND is_priority = FALSE AND error IS NULL RETURNING @@ -1712,11 +1733,12 @@ impl TransactionsDal<'_, '_> { let stashed_addresses: Vec<_> = stashed_accounts.iter().map(Address::as_bytes).collect(); sqlx::query!( r#" - UPDATE transactions + UPDATE + transactions SET in_mempool = FALSE FROM - UNNEST($1::bytea[]) AS s (address) + UNNEST($1 :: bytea []) AS s (address) WHERE transactions.in_mempool = TRUE AND transactions.initiator_address = s.address @@ -1731,7 +1753,8 @@ impl TransactionsDal<'_, '_> { let purged_addresses: Vec<_> = purged_accounts.iter().map(Address::as_bytes).collect(); sqlx::query!( r#" - DELETE FROM transactions + DELETE FROM + transactions WHERE in_mempool = TRUE AND initiator_address = ANY ($1) @@ -1747,7 +1770,8 @@ impl TransactionsDal<'_, '_> { let transactions = sqlx::query_as!( StorageTransaction, r#" - UPDATE transactions + UPDATE + transactions SET in_mempool = TRUE FROM @@ -1806,7 +1830,8 @@ impl TransactionsDal<'_, '_> { pub async fn reset_mempool(&mut self) -> DalResult<()> { sqlx::query!( r#" - UPDATE transactions + UPDATE + transactions SET in_mempool = FALSE WHERE diff --git a/core/lib/dal/src/transactions_web3_dal.rs b/core/lib/dal/src/transactions_web3_dal.rs index f5a3c492f8af..ff50628f691c 100644 --- a/core/lib/dal/src/transactions_web3_dal.rs +++ b/core/lib/dal/src/transactions_web3_dal.rs @@ -48,20 +48,19 @@ impl TransactionsWeb3Dal<'_, '_> { let st_receipts: Vec = sqlx::query_as!( StorageTransactionReceipt, r#" - WITH - events AS ( - SELECT DISTINCT - ON (events.tx_hash) * - FROM - events - WHERE - events.address = $1 - AND events.topic1 = $2 - AND events.tx_hash = ANY ($3) - ORDER BY - events.tx_hash, - events.event_index_in_tx DESC - ) + WITH EVENTS AS ( + SELECT + DISTINCT ON (EVENTS.tx_hash) * + FROM + EVENTS + WHERE + EVENTS.address = $1 + AND EVENTS.topic1 = $2 + AND EVENTS.tx_hash = ANY ($3) + ORDER BY + EVENTS.tx_hash, + EVENTS.event_index_in_tx DESC + ) SELECT transactions.hash AS tx_hash, transactions.index_in_block AS index_in_block, @@ -77,15 +76,15 @@ impl TransactionsWeb3Dal<'_, '_> { transactions.gas_limit AS gas_limit, miniblocks.hash AS "block_hash", miniblocks.l1_batch_number AS "l1_batch_number?", - events.topic4 AS "contract_address?", + EVENTS.topic4 AS "contract_address?", miniblocks.timestamp AS "block_timestamp?" FROM transactions JOIN miniblocks ON miniblocks.number = transactions.miniblock_number - LEFT JOIN events ON events.tx_hash = transactions.hash + LEFT JOIN EVENTS ON EVENTS.tx_hash = transactions.hash WHERE transactions.hash = ANY ($3) - AND transactions.data != '{}'::jsonb + AND transactions.data != '{}' :: jsonb "#, // ^ Filter out transactions with pruned data, which would lead to potentially incomplete / bogus // transaction info. @@ -318,7 +317,7 @@ impl TransactionsWeb3Dal<'_, '_> { ) WHERE transactions.hash = $1 - AND transactions.data != '{}'::jsonb + AND transactions.data != '{}' :: jsonb "#, // ^ Filter out transactions with pruned data, which would lead to potentially incomplete / bogus // transaction info. diff --git a/core/lib/dal/src/vm_runner_dal.rs b/core/lib/dal/src/vm_runner_dal.rs index 37ef1517d54a..c6884cc35b00 100644 --- a/core/lib/dal/src/vm_runner_dal.rs +++ b/core/lib/dal/src/vm_runner_dal.rs @@ -36,26 +36,25 @@ impl VmRunnerDal<'_, '_> { ) -> DalResult { let row = sqlx::query!( r#" - WITH - available_batches AS ( - SELECT - MAX(number) AS "last_batch" - FROM - l1_batches - ), - processed_batches AS ( - SELECT - COALESCE(MAX(l1_batch_number), $1) + $2 AS "last_ready_batch" - FROM - vm_runner_protective_reads - WHERE - time_taken IS NOT NULL - ) + WITH available_batches AS ( + SELECT + MAX(number) AS "last_batch" + FROM + l1_batches + ), + processed_batches AS ( + SELECT + COALESCE(MAX(l1_batch_number), $1) + $2 AS "last_ready_batch" + FROM + vm_runner_protective_reads + WHERE + time_taken IS NOT NULL + ) SELECT LEAST(last_batch, last_ready_batch) AS "last_ready_batch!" FROM - available_batches - FULL JOIN processed_batches ON TRUE + available_batches FULL + JOIN processed_batches ON TRUE "#, default_batch.0 as i32, window_size as i32 @@ -74,10 +73,14 @@ impl VmRunnerDal<'_, '_> { sqlx::query!( r#" INSERT INTO - vm_runner_protective_reads (l1_batch_number, created_at, updated_at, processing_started_at) + vm_runner_protective_reads ( + l1_batch_number, + created_at, + updated_at, + processing_started_at + ) VALUES - ($1, NOW(), NOW(), NOW()) - ON CONFLICT (l1_batch_number) DO + ($1, NOW(), NOW(), NOW()) ON CONFLICT (l1_batch_number) DO UPDATE SET updated_at = NOW(), @@ -98,7 +101,8 @@ impl VmRunnerDal<'_, '_> { ) -> anyhow::Result<()> { let update_result = sqlx::query!( r#" - UPDATE vm_runner_protective_reads + UPDATE + vm_runner_protective_reads SET time_taken = NOW() - processing_started_at WHERE @@ -133,7 +137,8 @@ impl VmRunnerDal<'_, '_> { let l1_batch_number = last_batch_to_keep.map_or(-1, |number| i64::from(number.0)); sqlx::query!( r#" - DELETE FROM vm_runner_protective_reads + DELETE FROM + vm_runner_protective_reads WHERE l1_batch_number > $1 "#, @@ -157,7 +162,8 @@ impl VmRunnerDal<'_, '_> { let l1_batch_number = last_batch_to_keep.map_or(-1, |number| i64::from(number.0)); sqlx::query!( r#" - DELETE FROM vm_runner_bwip + DELETE FROM + vm_runner_bwip WHERE l1_batch_number > $1 "#, @@ -195,26 +201,25 @@ impl VmRunnerDal<'_, '_> { ) -> DalResult { let row = sqlx::query!( r#" - WITH - available_batches AS ( - SELECT - MAX(number) AS "last_batch" - FROM - l1_batches - ), - processed_batches AS ( - SELECT - COALESCE(MAX(l1_batch_number), $1) + $2 AS "last_ready_batch" - FROM - vm_runner_bwip - WHERE - time_taken IS NOT NULL - ) + WITH available_batches AS ( + SELECT + MAX(number) AS "last_batch" + FROM + l1_batches + ), + processed_batches AS ( + SELECT + COALESCE(MAX(l1_batch_number), $1) + $2 AS "last_ready_batch" + FROM + vm_runner_bwip + WHERE + time_taken IS NOT NULL + ) SELECT LEAST(last_batch, last_ready_batch) AS "last_ready_batch!" FROM - available_batches - FULL JOIN processed_batches ON TRUE + available_batches FULL + JOIN processed_batches ON TRUE "#, default_batch.0 as i32, window_size as i32 @@ -233,10 +238,14 @@ impl VmRunnerDal<'_, '_> { sqlx::query!( r#" INSERT INTO - vm_runner_bwip (l1_batch_number, created_at, updated_at, processing_started_at) + vm_runner_bwip ( + l1_batch_number, + created_at, + updated_at, + processing_started_at + ) VALUES - ($1, NOW(), NOW(), NOW()) - ON CONFLICT (l1_batch_number) DO + ($1, NOW(), NOW(), NOW()) ON CONFLICT (l1_batch_number) DO UPDATE SET updated_at = NOW(), @@ -257,7 +266,8 @@ impl VmRunnerDal<'_, '_> { ) -> anyhow::Result<()> { let update_result = sqlx::query!( r#" - UPDATE vm_runner_bwip + UPDATE + vm_runner_bwip SET time_taken = NOW() - processing_started_at WHERE diff --git a/prover/crates/lib/prover_dal/src/cli_test_dal.rs b/prover/crates/lib/prover_dal/src/cli_test_dal.rs index 19fe0e4f57b0..c441bde7df9b 100644 --- a/prover/crates/lib/prover_dal/src/cli_test_dal.rs +++ b/prover/crates/lib/prover_dal/src/cli_test_dal.rs @@ -21,11 +21,17 @@ impl CliTestDal<'_, '_> { sequence_number: usize, ) { sqlx::query!( - "UPDATE prover_jobs_fri SET status = $1 - WHERE l1_batch_number = $2 + r#" + UPDATE + prover_jobs_fri + SET + STATUS = $1 + WHERE + l1_batch_number = $2 AND sequence_number = $3 AND aggregation_round = $4 - AND circuit_id = $5", + AND circuit_id = $5 + "#, status.to_string(), batch_number.0 as i64, sequence_number as i64, @@ -44,22 +50,22 @@ impl CliTestDal<'_, '_> { circuit_id: u8, ) { sqlx::query!( - " + r#" INSERT INTO leaf_aggregation_witness_jobs_fri ( l1_batch_number, circuit_id, - status, + STATUS, number_of_basic_circuits, created_at, updated_at ) VALUES - ($1, $2, 'waiting_for_proofs', 2, NOW(), NOW()) - ON CONFLICT (l1_batch_number, circuit_id) DO + ($1, $2, 'waiting_for_proofs', 2, NOW(), NOW()) ON CONFLICT (l1_batch_number, circuit_id) DO UPDATE - SET status = $3 - ", + SET + STATUS = $3 + "#, batch_number.0 as i64, circuit_id as i16, status.to_string() @@ -76,21 +82,21 @@ impl CliTestDal<'_, '_> { circuit_id: u8, ) { sqlx::query!( - " + r#" INSERT INTO node_aggregation_witness_jobs_fri ( l1_batch_number, circuit_id, - status, + STATUS, created_at, updated_at ) VALUES - ($1, $2, 'waiting_for_proofs', NOW(), NOW()) - ON CONFLICT (l1_batch_number, circuit_id, depth) DO + ($1, $2, 'waiting_for_proofs', NOW(), NOW()) ON CONFLICT (l1_batch_number, circuit_id, depth) DO UPDATE - SET status = $3 - ", + SET + STATUS = $3 + "#, batch_number.0 as i64, circuit_id as i16, status.to_string(), @@ -102,21 +108,21 @@ impl CliTestDal<'_, '_> { pub async fn insert_rt_job(&mut self, status: WitnessJobStatus, batch_number: L1BatchNumber) { sqlx::query!( - " + r#" INSERT INTO recursion_tip_witness_jobs_fri ( l1_batch_number, - status, + STATUS, number_of_final_node_jobs, created_at, updated_at ) VALUES - ($1, 'waiting_for_proofs',1, NOW(), NOW()) - ON CONFLICT (l1_batch_number) DO + ($1, 'waiting_for_proofs', 1, NOW(), NOW()) ON CONFLICT (l1_batch_number) DO UPDATE - SET status = $2 - ", + SET + STATUS = $2 + "#, batch_number.0 as i64, status.to_string(), ) @@ -131,21 +137,21 @@ impl CliTestDal<'_, '_> { batch_number: L1BatchNumber, ) { sqlx::query!( - " + r#" INSERT INTO scheduler_witness_jobs_fri ( l1_batch_number, scheduler_partial_input_blob_url, - status, + STATUS, created_at, updated_at ) VALUES - ($1, '', 'waiting_for_proofs', NOW(), NOW()) - ON CONFLICT (l1_batch_number) DO + ($1, '', 'waiting_for_proofs', NOW(), NOW()) ON CONFLICT (l1_batch_number) DO UPDATE - SET status = $2 - ", + SET + STATUS = $2 + "#, batch_number.0 as i64, status.to_string(), ) @@ -160,20 +166,20 @@ impl CliTestDal<'_, '_> { batch_number: L1BatchNumber, ) { sqlx::query!( - " + r#" INSERT INTO proof_compression_jobs_fri ( l1_batch_number, - status, + STATUS, created_at, updated_at ) VALUES - ($1, $2, NOW(), NOW()) - ON CONFLICT (l1_batch_number) DO + ($1, $2, NOW(), NOW()) ON CONFLICT (l1_batch_number) DO UPDATE - SET status = $2 - ", + SET + STATUS = $2 + "#, batch_number.0 as i64, status.to_string(), ) @@ -192,12 +198,18 @@ impl CliTestDal<'_, '_> { sequence_number: usize, ) { sqlx::query!( - "UPDATE prover_jobs_fri - SET status = $1, attempts = $2 - WHERE l1_batch_number = $3 - AND sequence_number =$4 + r#" + UPDATE + prover_jobs_fri + SET + STATUS = $1, + attempts = $2 + WHERE + l1_batch_number = $3 + AND sequence_number = $4 AND aggregation_round = $5 - AND circuit_id = $6", + AND circuit_id = $6 + "#, status.to_string(), attempts as i64, batch_number.0 as i64, @@ -218,10 +230,16 @@ impl CliTestDal<'_, '_> { batch_number: L1BatchNumber, ) { sqlx::query!( - "UPDATE leaf_aggregation_witness_jobs_fri - SET status = $1, attempts = $2 - WHERE l1_batch_number = $3 - AND circuit_id = $4", + r#" + UPDATE + leaf_aggregation_witness_jobs_fri + SET + STATUS = $1, + attempts = $2 + WHERE + l1_batch_number = $3 + AND circuit_id = $4 + "#, status.to_string(), attempts as i64, batch_number.0 as i64, diff --git a/prover/crates/lib/prover_dal/src/fri_gpu_prover_queue_dal.rs b/prover/crates/lib/prover_dal/src/fri_gpu_prover_queue_dal.rs index aa4810ad2f6f..7cc424e35c50 100644 --- a/prover/crates/lib/prover_dal/src/fri_gpu_prover_queue_dal.rs +++ b/prover/crates/lib/prover_dal/src/fri_gpu_prover_queue_dal.rs @@ -24,7 +24,8 @@ impl FriGpuProverQueueDal<'_, '_> { let processing_timeout = pg_interval_from_duration(processing_timeout); let result: Option = sqlx::query!( r#" - UPDATE gpu_prover_queue_fri + UPDATE + gpu_prover_queue_fri SET instance_status = 'reserved', updated_at = NOW(), @@ -44,14 +45,14 @@ impl FriGpuProverQueueDal<'_, '_> { instance_status = 'available' OR ( instance_status = 'reserved' - AND processing_started_at < NOW() - $1::INTERVAL + AND processing_started_at < NOW() - $1 :: INTERVAL ) ) ORDER BY updated_at ASC LIMIT - 1 - FOR UPDATE + 1 FOR + UPDATE SKIP LOCKED ) RETURNING @@ -96,8 +97,17 @@ impl FriGpuProverQueueDal<'_, '_> { protocol_version_patch ) VALUES - (CAST($1::TEXT AS inet), $2, 'available', $3, $4, NOW(), NOW(), $5, $6) - ON CONFLICT (instance_host, instance_port, zone) DO + ( + CAST($1 :: TEXT AS inet), + $2, + 'available', + $3, + $4, + NOW(), + NOW(), + $5, + $6 + ) ON CONFLICT (instance_host, instance_port, zone) DO UPDATE SET instance_status = 'available', @@ -127,12 +137,13 @@ impl FriGpuProverQueueDal<'_, '_> { ) { sqlx::query!( r#" - UPDATE gpu_prover_queue_fri + UPDATE + gpu_prover_queue_fri SET instance_status = $1, updated_at = NOW() WHERE - instance_host = $2::TEXT::inet + instance_host = $2 :: TEXT :: inet AND instance_port = $3 AND zone = $4 "#, @@ -153,12 +164,13 @@ impl FriGpuProverQueueDal<'_, '_> { ) { sqlx::query!( r#" - UPDATE gpu_prover_queue_fri + UPDATE + gpu_prover_queue_fri SET instance_status = 'available', updated_at = NOW() WHERE - instance_host = $1::TEXT::inet + instance_host = $1 :: TEXT :: inet AND instance_port = $2 AND instance_status = 'full' AND zone = $3 @@ -184,7 +196,7 @@ impl FriGpuProverQueueDal<'_, '_> { FROM gpu_prover_queue_fri WHERE - instance_host = $1::TEXT::inet + instance_host = $1 :: TEXT :: inet AND instance_port = $2 AND zone = $3 "#, @@ -240,7 +252,8 @@ impl FriGpuProverQueueDal<'_, '_> { ) -> sqlx::Result { sqlx::query!( r#" - DELETE FROM gpu_prover_queue_fri + DELETE FROM + gpu_prover_queue_fri "# ) .execute(self.storage.conn()) diff --git a/prover/crates/lib/prover_dal/src/fri_proof_compressor_dal.rs b/prover/crates/lib/prover_dal/src/fri_proof_compressor_dal.rs index 31b121e51e42..faf9e29ef100 100644 --- a/prover/crates/lib/prover_dal/src/fri_proof_compressor_dal.rs +++ b/prover/crates/lib/prover_dal/src/fri_proof_compressor_dal.rs @@ -30,15 +30,14 @@ impl FriProofCompressorDal<'_, '_> { proof_compression_jobs_fri ( l1_batch_number, fri_proof_blob_url, - status, + STATUS, created_at, updated_at, protocol_version, protocol_version_patch ) VALUES - ($1, $2, $3, NOW(), NOW(), $4, $5) - ON CONFLICT (l1_batch_number) DO NOTHING + ($1, $2, $3, NOW(), NOW(), $4, $5) ON CONFLICT (l1_batch_number) DO NOTHING "#, i64::from(block_number.0), fri_proof_blob_url, @@ -58,9 +57,10 @@ impl FriProofCompressorDal<'_, '_> { ) -> Option { sqlx::query!( r#" - UPDATE proof_compression_jobs_fri + UPDATE + proof_compression_jobs_fri SET - status = $1, + STATUS = $1, attempts = attempts + 1, updated_at = NOW(), processing_started_at = NOW(), @@ -72,14 +72,14 @@ impl FriProofCompressorDal<'_, '_> { FROM proof_compression_jobs_fri WHERE - status = $2 + STATUS = $2 AND protocol_version = $4 AND protocol_version_patch = $5 ORDER BY l1_batch_number ASC LIMIT - 1 - FOR UPDATE + 1 FOR + UPDATE SKIP LOCKED ) RETURNING @@ -127,9 +127,10 @@ impl FriProofCompressorDal<'_, '_> { ) { sqlx::query!( r#" - UPDATE proof_compression_jobs_fri + UPDATE + proof_compression_jobs_fri SET - status = $1, + STATUS = $1, updated_at = NOW(), time_taken = $2, l1_proof_blob_url = $3 @@ -153,15 +154,16 @@ impl FriProofCompressorDal<'_, '_> { ) { sqlx::query!( r#" - UPDATE proof_compression_jobs_fri + UPDATE + proof_compression_jobs_fri SET - status = $1, + STATUS = $1, error = $2, updated_at = NOW() WHERE l1_batch_number = $3 - AND status != $4 - AND status != $5 + AND STATUS != $4 + AND STATUS != $5 "#, ProofCompressionJobStatus::Failed.to_string(), error, @@ -185,7 +187,7 @@ impl FriProofCompressorDal<'_, '_> { r#" SELECT l1_batch_number, - status, + STATUS, protocol_version, protocol_version_patch FROM @@ -197,8 +199,8 @@ impl FriProofCompressorDal<'_, '_> { FROM proof_compression_jobs_fri WHERE - status = $1 - OR status = $2 + STATUS = $1 + OR STATUS = $2 ) "#, ProofCompressionJobStatus::Successful.to_string(), @@ -223,9 +225,10 @@ impl FriProofCompressorDal<'_, '_> { pub async fn mark_proof_sent_to_server(&mut self, block_number: L1BatchNumber) { sqlx::query!( r#" - UPDATE proof_compression_jobs_fri + UPDATE + proof_compression_jobs_fri SET - status = $1, + STATUS = $1, updated_at = NOW() WHERE l1_batch_number = $2 @@ -246,11 +249,11 @@ impl FriProofCompressorDal<'_, '_> { protocol_version_patch, COUNT(*) FILTER ( WHERE - status = 'queued' + STATUS = 'queued' ) AS queued, COUNT(*) FILTER ( WHERE - status = 'in_progress' + STATUS = 'in_progress' ) AS in_progress FROM proof_compression_jobs_fri @@ -287,8 +290,8 @@ impl FriProofCompressorDal<'_, '_> { FROM proof_compression_jobs_fri WHERE - status <> 'successful' - AND status <> 'sent_to_server' + STATUS <> 'successful' + AND STATUS <> 'sent_to_server' ORDER BY l1_batch_number ASC LIMIT @@ -312,24 +315,25 @@ impl FriProofCompressorDal<'_, '_> { { sqlx::query!( r#" - UPDATE proof_compression_jobs_fri + UPDATE + proof_compression_jobs_fri SET - status = 'queued', + STATUS = 'queued', updated_at = NOW(), processing_started_at = NOW() WHERE ( - status = 'in_progress' - AND processing_started_at <= NOW() - $1::INTERVAL + STATUS = 'in_progress' + AND processing_started_at <= NOW() - $1 :: INTERVAL AND attempts < $2 ) OR ( - status = 'failed' + STATUS = 'failed' AND attempts < $2 ) RETURNING l1_batch_number, - status, + STATUS, attempts, error, picked_by @@ -392,7 +396,8 @@ impl FriProofCompressorDal<'_, '_> { ) -> sqlx::Result { sqlx::query!( r#" - DELETE FROM proof_compression_jobs_fri + DELETE FROM + proof_compression_jobs_fri WHERE l1_batch_number = $1 "#, @@ -405,7 +410,8 @@ impl FriProofCompressorDal<'_, '_> { pub async fn delete(&mut self) -> sqlx::Result { sqlx::query!( r#" - DELETE FROM proof_compression_jobs_fri + DELETE FROM + proof_compression_jobs_fri "# ) .execute(self.storage.conn()) @@ -420,9 +426,10 @@ impl FriProofCompressorDal<'_, '_> { { sqlx::query!( r#" - UPDATE proof_compression_jobs_fri + UPDATE + proof_compression_jobs_fri SET - status = 'queued', + STATUS = 'queued', error = 'Manually requeued', attempts = 2, updated_at = NOW(), @@ -431,11 +438,11 @@ impl FriProofCompressorDal<'_, '_> { l1_batch_number = $1 AND attempts >= $2 AND ( - status = 'in_progress' - OR status = 'failed' + STATUS = 'in_progress' + OR STATUS = 'failed' ) RETURNING - status, + STATUS, attempts, error, picked_by diff --git a/prover/crates/lib/prover_dal/src/fri_protocol_versions_dal.rs b/prover/crates/lib/prover_dal/src/fri_protocol_versions_dal.rs index 50df1046e67d..7de6e3f7c6fd 100644 --- a/prover/crates/lib/prover_dal/src/fri_protocol_versions_dal.rs +++ b/prover/crates/lib/prover_dal/src/fri_protocol_versions_dal.rs @@ -20,15 +20,17 @@ impl FriProtocolVersionsDal<'_, '_> { sqlx::query!( r#" INSERT INTO - prover_fri_protocol_versions (id, snark_wrapper_vk_hash, created_at, protocol_version_patch) + prover_fri_protocol_versions ( + id, + snark_wrapper_vk_hash, + created_at, + protocol_version_patch + ) VALUES - ($1, $2, NOW(), $3) - ON CONFLICT (id, protocol_version_patch) DO NOTHING + ($1, $2, NOW(), $3) ON CONFLICT (id, protocol_version_patch) DO NOTHING "#, id.minor as i32, - l1_verifier_config - .snark_wrapper_vk_hash - .as_bytes(), + l1_verifier_config.snark_wrapper_vk_hash.as_bytes(), id.patch.0 as i32 ) .execute(self.storage.conn()) @@ -85,7 +87,8 @@ impl FriProtocolVersionsDal<'_, '_> { pub async fn delete(&mut self) -> sqlx::Result { sqlx::query!( r#" - DELETE FROM prover_fri_protocol_versions + DELETE FROM + prover_fri_protocol_versions "# ) .execute(self.storage.conn()) diff --git a/prover/crates/lib/prover_dal/src/fri_prover_dal.rs b/prover/crates/lib/prover_dal/src/fri_prover_dal.rs index 1a3b8de0ce4b..b15fb2672e58 100644 --- a/prover/crates/lib/prover_dal/src/fri_prover_dal.rs +++ b/prover/crates/lib/prover_dal/src/fri_prover_dal.rs @@ -68,9 +68,10 @@ impl FriProverDal<'_, '_> { ) -> Option { sqlx::query!( r#" - UPDATE prover_jobs_fri + UPDATE + prover_jobs_fri SET - status = 'in_progress', + STATUS = 'in_progress', attempts = attempts + 1, updated_at = NOW(), processing_started_at = NOW(), @@ -82,7 +83,7 @@ impl FriProverDal<'_, '_> { FROM prover_jobs_fri WHERE - status = 'queued' + STATUS = 'queued' AND protocol_version = $1 AND protocol_version_patch = $2 ORDER BY @@ -91,8 +92,8 @@ impl FriProverDal<'_, '_> { circuit_id ASC, id ASC LIMIT - 1 - FOR UPDATE + 1 FOR + UPDATE SKIP LOCKED ) RETURNING @@ -130,9 +131,10 @@ impl FriProverDal<'_, '_> { ) -> Option { sqlx::query!( r#" - UPDATE prover_jobs_fri + UPDATE + prover_jobs_fri SET - status = 'in_progress', + STATUS = 'in_progress', attempts = attempts + 1, updated_at = NOW(), processing_started_at = NOW(), @@ -144,7 +146,7 @@ impl FriProverDal<'_, '_> { FROM prover_jobs_fri WHERE - status = 'queued' + STATUS = 'queued' AND protocol_version = $1 AND protocol_version_patch = $2 ORDER BY @@ -152,8 +154,8 @@ impl FriProverDal<'_, '_> { l1_batch_number ASC, id ASC LIMIT - 1 - FOR UPDATE + 1 FOR + UPDATE SKIP LOCKED ) RETURNING @@ -200,9 +202,10 @@ impl FriProverDal<'_, '_> { .collect(); sqlx::query!( r#" - UPDATE prover_jobs_fri + UPDATE + prover_jobs_fri SET - status = 'in_progress', + STATUS = 'in_progress', attempts = attempts + 1, processing_started_at = NOW(), updated_at = NOW(), @@ -216,7 +219,7 @@ impl FriProverDal<'_, '_> { SELECT * FROM - UNNEST($1::SMALLINT[], $2::SMALLINT[]) + UNNEST($1 :: SMALLINT [], $2 :: SMALLINT []) ) AS tuple (circuit_id, ROUND) JOIN LATERAL ( SELECT @@ -240,8 +243,8 @@ impl FriProverDal<'_, '_> { pj.aggregation_round DESC, pj.id ASC LIMIT - 1 - FOR UPDATE + 1 FOR + UPDATE SKIP LOCKED ) RETURNING @@ -278,14 +281,15 @@ impl FriProverDal<'_, '_> { { sqlx::query!( r#" - UPDATE prover_jobs_fri + UPDATE + prover_jobs_fri SET - status = 'failed', + STATUS = 'failed', error = $1, updated_at = NOW() WHERE id = $2 - AND status != 'successful' + AND STATUS != 'successful' "#, error, i64::from(id) @@ -323,9 +327,10 @@ impl FriProverDal<'_, '_> { ) -> FriProverJobMetadata { sqlx::query!( r#" - UPDATE prover_jobs_fri + UPDATE + prover_jobs_fri SET - status = 'successful', + STATUS = 'successful', updated_at = NOW(), time_taken = $1, proof_blob_url = $2 @@ -372,9 +377,10 @@ impl FriProverDal<'_, '_> { { sqlx::query!( r#" - UPDATE prover_jobs_fri + UPDATE + prover_jobs_fri SET - status = 'queued', + STATUS = 'queued', updated_at = NOW(), processing_started_at = NOW() WHERE @@ -385,20 +391,20 @@ impl FriProverDal<'_, '_> { prover_jobs_fri WHERE ( - status IN ('in_progress', 'in_gpu_proof') - AND processing_started_at <= NOW() - $1::INTERVAL + STATUS IN ('in_progress', 'in_gpu_proof') + AND processing_started_at <= NOW() - $1 :: INTERVAL AND attempts < $2 ) OR ( - status = 'failed' + STATUS = 'failed' AND attempts < $2 - ) - FOR UPDATE + ) FOR + UPDATE SKIP LOCKED ) RETURNING id, - status, + STATUS, attempts, circuit_id, error, @@ -447,14 +453,32 @@ impl FriProverDal<'_, '_> { depth, is_node_final_proof, protocol_version, - status, + STATUS, created_at, updated_at, protocol_version_patch ) VALUES - ($1, $2, $3, $4, $5, $6, $7, $8, 'queued', NOW(), NOW(), $9) - ON CONFLICT (l1_batch_number, aggregation_round, circuit_id, depth, sequence_number) DO + ( + $1, + $2, + $3, + $4, + $5, + $6, + $7, + $8, + 'queued', + NOW(), + NOW(), + $9 + ) ON CONFLICT ( + l1_batch_number, + aggregation_round, + circuit_id, + depth, + sequence_number + ) DO UPDATE SET updated_at = NOW() @@ -482,21 +506,21 @@ impl FriProverDal<'_, '_> { COUNT(*) AS "count!", circuit_id AS "circuit_id!", aggregation_round AS "aggregation_round!", - status AS "status!", + STATUS AS "status!", protocol_version AS "protocol_version!", protocol_version_patch AS "protocol_version_patch!" FROM prover_jobs_fri WHERE ( - status = 'queued' - OR status = 'in_progress' + STATUS = 'queued' + OR STATUS = 'in_progress' ) AND protocol_version IS NOT NULL GROUP BY circuit_id, aggregation_round, - status, + STATUS, protocol_version, protocol_version_patch "# @@ -528,12 +552,18 @@ impl FriProverDal<'_, '_> { SELECT protocol_version AS "protocol_version!", protocol_version_patch AS "protocol_version_patch!", - COUNT(*) FILTER (WHERE status = 'queued') as queued, - COUNT(*) FILTER (WHERE status = 'in_progress') as in_progress + COUNT(*) FILTER ( + WHERE + STATUS = 'queued' + ) AS queued, + COUNT(*) FILTER ( + WHERE + STATUS = 'in_progress' + ) AS in_progress FROM prover_jobs_fri WHERE - status IN ('queued', 'in_progress') + STATUS IN ('queued', 'in_progress') AND protocol_version IS NOT NULL GROUP BY protocol_version, @@ -571,7 +601,12 @@ impl FriProverDal<'_, '_> { FROM prover_jobs_fri WHERE - status IN ('queued', 'in_gpu_proof', 'in_progress', 'failed') + STATUS IN ( + 'queued', + 'in_gpu_proof', + 'in_progress', + 'failed' + ) GROUP BY circuit_id, aggregation_round @@ -594,13 +629,14 @@ impl FriProverDal<'_, '_> { pub async fn update_status(&mut self, id: u32, status: &str) { sqlx::query!( r#" - UPDATE prover_jobs_fri + UPDATE + prover_jobs_fri SET - status = $1, + STATUS = $1, updated_at = NOW() WHERE id = $2 - AND status != 'successful' + AND STATUS != 'successful' "#, status, i64::from(id) @@ -622,7 +658,7 @@ impl FriProverDal<'_, '_> { prover_jobs_fri WHERE l1_batch_number = $1 - AND status = 'successful' + AND STATUS = 'successful' AND aggregation_round = $2 "#, i64::from(l1_batch_number.0), @@ -646,7 +682,7 @@ impl FriProverDal<'_, '_> { prover_jobs_fri WHERE l1_batch_number = $1 - AND status = 'successful' + AND STATUS = 'successful' AND aggregation_round = $2 "#, l1_batch_number.0 as i64, @@ -700,7 +736,7 @@ impl FriProverDal<'_, '_> { WHERE l1_batch_number = $1 AND is_node_final_proof = TRUE - AND status = 'successful' + AND STATUS = 'successful' ORDER BY circuit_id ASC "#, @@ -767,7 +803,8 @@ impl FriProverDal<'_, '_> { ) -> sqlx::Result { sqlx::query!( r#" - DELETE FROM prover_jobs_fri + DELETE FROM + prover_jobs_fri WHERE l1_batch_number = $1; "#, @@ -788,7 +825,8 @@ impl FriProverDal<'_, '_> { pub async fn delete_prover_jobs_fri(&mut self) -> sqlx::Result { sqlx::query!( r#" - DELETE FROM prover_jobs_fri + DELETE FROM + prover_jobs_fri "# ) .execute(self.storage.conn()) @@ -807,9 +845,10 @@ impl FriProverDal<'_, '_> { { sqlx::query!( r#" - UPDATE prover_jobs_fri + UPDATE + prover_jobs_fri SET - status = 'queued', + STATUS = 'queued', error = 'Manually requeued', attempts = 2, updated_at = NOW(), @@ -818,12 +857,12 @@ impl FriProverDal<'_, '_> { l1_batch_number = $1 AND attempts >= $2 AND ( - status = 'in_progress' - OR status = 'failed' + STATUS = 'in_progress' + OR STATUS = 'failed' ) RETURNING id, - status, + STATUS, attempts, circuit_id, error, diff --git a/prover/crates/lib/prover_dal/src/fri_witness_generator_dal.rs b/prover/crates/lib/prover_dal/src/fri_witness_generator_dal.rs index 66e34f7f8e75..d38409631adc 100644 --- a/prover/crates/lib/prover_dal/src/fri_witness_generator_dal.rs +++ b/prover/crates/lib/prover_dal/src/fri_witness_generator_dal.rs @@ -53,14 +53,13 @@ impl FriWitnessGeneratorDal<'_, '_> { l1_batch_number, witness_inputs_blob_url, protocol_version, - status, + STATUS, created_at, updated_at, protocol_version_patch ) VALUES - ($1, $2, $3, 'queued', NOW(), NOW(), $4) - ON CONFLICT (l1_batch_number) DO NOTHING + ($1, $2, $3, 'queued', NOW(), NOW(), $4) ON CONFLICT (l1_batch_number) DO NOTHING "#, i64::from(block_number.0), witness_inputs_blob_url, @@ -82,9 +81,10 @@ impl FriWitnessGeneratorDal<'_, '_> { ) -> Option { sqlx::query!( r#" - UPDATE witness_inputs_fri + UPDATE + witness_inputs_fri SET - status = 'in_progress', + STATUS = 'in_progress', attempts = attempts + 1, updated_at = NOW(), processing_started_at = NOW(), @@ -97,14 +97,14 @@ impl FriWitnessGeneratorDal<'_, '_> { witness_inputs_fri WHERE l1_batch_number <= $1 - AND status = 'queued' + AND STATUS = 'queued' AND protocol_version = $2 AND protocol_version_patch = $4 ORDER BY l1_batch_number ASC LIMIT - 1 - FOR UPDATE + 1 FOR + UPDATE SKIP LOCKED ) RETURNING @@ -150,13 +150,14 @@ impl FriWitnessGeneratorDal<'_, '_> { ) { sqlx::query!( r#" - UPDATE witness_inputs_fri + UPDATE + witness_inputs_fri SET - status = $1, + STATUS = $1, updated_at = NOW() WHERE l1_batch_number = $2 - AND status != 'successful' + AND STATUS != 'successful' "#, status.to_string(), i64::from(block_number.0) @@ -173,9 +174,10 @@ impl FriWitnessGeneratorDal<'_, '_> { ) { sqlx::query!( r#" - UPDATE witness_inputs_fri + UPDATE + witness_inputs_fri SET - status = 'successful', + STATUS = 'successful', updated_at = NOW(), time_taken = $1 WHERE @@ -192,14 +194,15 @@ impl FriWitnessGeneratorDal<'_, '_> { pub async fn mark_witness_job_failed(&mut self, error: &str, block_number: L1BatchNumber) { sqlx::query!( r#" - UPDATE witness_inputs_fri + UPDATE + witness_inputs_fri SET - status = 'failed', + STATUS = 'failed', error = $1, updated_at = NOW() WHERE l1_batch_number = $2 - AND status != 'successful' + AND STATUS != 'successful' "#, error, i64::from(block_number.0) @@ -212,14 +215,15 @@ impl FriWitnessGeneratorDal<'_, '_> { pub async fn mark_leaf_aggregation_job_failed(&mut self, error: &str, id: u32) { sqlx::query!( r#" - UPDATE leaf_aggregation_witness_jobs_fri + UPDATE + leaf_aggregation_witness_jobs_fri SET - status = 'failed', + STATUS = 'failed', error = $1, updated_at = NOW() WHERE id = $2 - AND status != 'successful' + AND STATUS != 'successful' "#, error, i64::from(id) @@ -232,9 +236,10 @@ impl FriWitnessGeneratorDal<'_, '_> { pub async fn mark_leaf_aggregation_as_successful(&mut self, id: u32, time_taken: Duration) { sqlx::query!( r#" - UPDATE leaf_aggregation_witness_jobs_fri + UPDATE + leaf_aggregation_witness_jobs_fri SET - status = 'successful', + STATUS = 'successful', updated_at = NOW(), time_taken = $1 WHERE @@ -256,24 +261,25 @@ impl FriWitnessGeneratorDal<'_, '_> { let processing_timeout = pg_interval_from_duration(processing_timeout); sqlx::query!( r#" - UPDATE witness_inputs_fri + UPDATE + witness_inputs_fri SET - status = 'queued', + STATUS = 'queued', updated_at = NOW(), processing_started_at = NOW() WHERE ( - status = 'in_progress' - AND processing_started_at <= NOW() - $1::INTERVAL + STATUS = 'in_progress' + AND processing_started_at <= NOW() - $1 :: INTERVAL AND attempts < $2 ) OR ( - status = 'failed' + STATUS = 'failed' AND attempts < $2 ) RETURNING l1_batch_number, - status, + STATUS, attempts, error, picked_by @@ -327,14 +333,23 @@ impl FriWitnessGeneratorDal<'_, '_> { closed_form_inputs_blob_url, number_of_basic_circuits, protocol_version, - status, + STATUS, created_at, updated_at, protocol_version_patch ) VALUES - ($1, $2, $3, $4, $5, 'waiting_for_proofs', NOW(), NOW(), $6) - ON CONFLICT (l1_batch_number, circuit_id) DO + ( + $1, + $2, + $3, + $4, + $5, + 'waiting_for_proofs', + NOW(), + NOW(), + $6 + ) ON CONFLICT (l1_batch_number, circuit_id) DO UPDATE SET updated_at = NOW() @@ -366,7 +381,7 @@ impl FriWitnessGeneratorDal<'_, '_> { INSERT INTO recursion_tip_witness_jobs_fri ( l1_batch_number, - status, + STATUS, number_of_final_node_jobs, protocol_version, created_at, @@ -374,8 +389,15 @@ impl FriWitnessGeneratorDal<'_, '_> { protocol_version_patch ) VALUES - ($1, 'waiting_for_proofs', $2, $3, NOW(), NOW(), $4) - ON CONFLICT (l1_batch_number) DO + ( + $1, + 'waiting_for_proofs', + $2, + $3, + NOW(), + NOW(), + $4 + ) ON CONFLICT (l1_batch_number) DO UPDATE SET updated_at = NOW() @@ -396,14 +418,21 @@ impl FriWitnessGeneratorDal<'_, '_> { l1_batch_number, scheduler_partial_input_blob_url, protocol_version, - status, + STATUS, created_at, updated_at, protocol_version_patch ) VALUES - ($1, $2, $3, 'waiting_for_proofs', NOW(), NOW(), $4) - ON CONFLICT (l1_batch_number) DO + ( + $1, + $2, + $3, + 'waiting_for_proofs', + NOW(), + NOW(), + $4 + ) ON CONFLICT (l1_batch_number) DO UPDATE SET updated_at = NOW() @@ -428,9 +457,10 @@ impl FriWitnessGeneratorDal<'_, '_> { ) -> Option { let row = sqlx::query!( r#" - UPDATE leaf_aggregation_witness_jobs_fri + UPDATE + leaf_aggregation_witness_jobs_fri SET - status = 'in_progress', + STATUS = 'in_progress', attempts = attempts + 1, updated_at = NOW(), processing_started_at = NOW(), @@ -442,15 +472,15 @@ impl FriWitnessGeneratorDal<'_, '_> { FROM leaf_aggregation_witness_jobs_fri WHERE - status = 'queued' + STATUS = 'queued' AND protocol_version = $1 AND protocol_version_patch = $2 ORDER BY l1_batch_number ASC, id ASC LIMIT - 1 - FOR UPDATE + 1 FOR + UPDATE SKIP LOCKED ) RETURNING @@ -522,7 +552,7 @@ impl FriWitnessGeneratorDal<'_, '_> { AND circuit_id = $2 AND aggregation_round = $3 AND depth = $4 - AND status = 'successful' + AND STATUS = 'successful' ORDER BY sequence_number ASC; "#, @@ -542,9 +572,10 @@ impl FriWitnessGeneratorDal<'_, '_> { pub async fn move_leaf_aggregation_jobs_from_waiting_to_queued(&mut self) -> Vec<(i64, u8)> { sqlx::query!( r#" - UPDATE leaf_aggregation_witness_jobs_fri + UPDATE + leaf_aggregation_witness_jobs_fri SET - status = 'queued' + STATUS = 'queued' WHERE (l1_batch_number, circuit_id) IN ( SELECT @@ -588,7 +619,8 @@ impl FriWitnessGeneratorDal<'_, '_> { ) { sqlx::query!( r#" - UPDATE node_aggregation_witness_jobs_fri + UPDATE + node_aggregation_witness_jobs_fri SET aggregations_url = $1, number_of_dependent_jobs = $5, @@ -616,9 +648,10 @@ impl FriWitnessGeneratorDal<'_, '_> { ) -> Option { let row = sqlx::query!( r#" - UPDATE node_aggregation_witness_jobs_fri + UPDATE + node_aggregation_witness_jobs_fri SET - status = 'in_progress', + STATUS = 'in_progress', attempts = attempts + 1, updated_at = NOW(), processing_started_at = NOW(), @@ -630,7 +663,7 @@ impl FriWitnessGeneratorDal<'_, '_> { FROM node_aggregation_witness_jobs_fri WHERE - status = 'queued' + STATUS = 'queued' AND protocol_version = $1 AND protocol_version_patch = $2 ORDER BY @@ -638,8 +671,8 @@ impl FriWitnessGeneratorDal<'_, '_> { depth ASC, id ASC LIMIT - 1 - FOR UPDATE + 1 FOR + UPDATE SKIP LOCKED ) RETURNING @@ -700,14 +733,15 @@ impl FriWitnessGeneratorDal<'_, '_> { pub async fn mark_node_aggregation_job_failed(&mut self, error: &str, id: u32) { sqlx::query!( r#" - UPDATE node_aggregation_witness_jobs_fri + UPDATE + node_aggregation_witness_jobs_fri SET - status = 'failed', + STATUS = 'failed', error = $1, updated_at = NOW() WHERE id = $2 - AND status != 'successful' + AND STATUS != 'successful' "#, error, i64::from(id) @@ -720,9 +754,10 @@ impl FriWitnessGeneratorDal<'_, '_> { pub async fn mark_node_aggregation_as_successful(&mut self, id: u32, time_taken: Duration) { sqlx::query!( r#" - UPDATE node_aggregation_witness_jobs_fri + UPDATE + node_aggregation_witness_jobs_fri SET - status = 'successful', + STATUS = 'successful', updated_at = NOW(), time_taken = $1 WHERE @@ -755,14 +790,24 @@ impl FriWitnessGeneratorDal<'_, '_> { aggregations_url, number_of_dependent_jobs, protocol_version, - status, + STATUS, created_at, updated_at, protocol_version_patch ) VALUES - ($1, $2, $3, $4, $5, $6, 'waiting_for_proofs', NOW(), NOW(), $7) - ON CONFLICT (l1_batch_number, circuit_id, depth) DO + ( + $1, + $2, + $3, + $4, + $5, + $6, + 'waiting_for_proofs', + NOW(), + NOW(), + $7 + ) ON CONFLICT (l1_batch_number, circuit_id, depth) DO UPDATE SET updated_at = NOW() @@ -783,9 +828,10 @@ impl FriWitnessGeneratorDal<'_, '_> { pub async fn move_depth_zero_node_aggregation_jobs(&mut self) -> Vec<(i64, u8, u16)> { sqlx::query!( r#" - UPDATE node_aggregation_witness_jobs_fri + UPDATE + node_aggregation_witness_jobs_fri SET - status = 'queued' + STATUS = 'queued' WHERE (l1_batch_number, circuit_id, depth) IN ( SELECT @@ -827,9 +873,10 @@ impl FriWitnessGeneratorDal<'_, '_> { pub async fn move_depth_non_zero_node_aggregation_jobs(&mut self) -> Vec<(i64, u8, u16)> { sqlx::query!( r#" - UPDATE node_aggregation_witness_jobs_fri + UPDATE + node_aggregation_witness_jobs_fri SET - status = 'queued' + STATUS = 'queued' WHERE (l1_batch_number, circuit_id, depth) IN ( SELECT @@ -870,9 +917,10 @@ impl FriWitnessGeneratorDal<'_, '_> { pub async fn move_recursion_tip_jobs_from_waiting_to_queued(&mut self) -> Vec { sqlx::query!( r#" - UPDATE recursion_tip_witness_jobs_fri + UPDATE + recursion_tip_witness_jobs_fri SET - status = 'queued' + STATUS = 'queued' WHERE l1_batch_number IN ( SELECT @@ -907,9 +955,10 @@ impl FriWitnessGeneratorDal<'_, '_> { pub async fn move_scheduler_jobs_from_waiting_to_queued(&mut self) -> Vec { sqlx::query!( r#" - UPDATE scheduler_witness_jobs_fri + UPDATE + scheduler_witness_jobs_fri SET - status = 'queued' + STATUS = 'queued' WHERE l1_batch_number IN ( SELECT @@ -943,24 +992,25 @@ impl FriWitnessGeneratorDal<'_, '_> { let processing_timeout = pg_interval_from_duration(processing_timeout); sqlx::query!( r#" - UPDATE leaf_aggregation_witness_jobs_fri + UPDATE + leaf_aggregation_witness_jobs_fri SET - status = 'queued', + STATUS = 'queued', updated_at = NOW(), processing_started_at = NOW() WHERE ( - status = 'in_progress' - AND processing_started_at <= NOW() - $1::INTERVAL + STATUS = 'in_progress' + AND processing_started_at <= NOW() - $1 :: INTERVAL AND attempts < $2 ) OR ( - status = 'failed' + STATUS = 'failed' AND attempts < $2 ) RETURNING id, - status, + STATUS, attempts, circuit_id, error, @@ -992,24 +1042,25 @@ impl FriWitnessGeneratorDal<'_, '_> { let processing_timeout = pg_interval_from_duration(processing_timeout); sqlx::query!( r#" - UPDATE node_aggregation_witness_jobs_fri + UPDATE + node_aggregation_witness_jobs_fri SET - status = 'queued', + STATUS = 'queued', updated_at = NOW(), processing_started_at = NOW() WHERE ( - status = 'in_progress' - AND processing_started_at <= NOW() - $1::INTERVAL + STATUS = 'in_progress' + AND processing_started_at <= NOW() - $1 :: INTERVAL AND attempts < $2 ) OR ( - status = 'failed' + STATUS = 'failed' AND attempts < $2 ) RETURNING id, - status, + STATUS, attempts, circuit_id, error, @@ -1041,24 +1092,25 @@ impl FriWitnessGeneratorDal<'_, '_> { let processing_timeout = pg_interval_from_duration(processing_timeout); sqlx::query!( r#" - UPDATE recursion_tip_witness_jobs_fri + UPDATE + recursion_tip_witness_jobs_fri SET - status = 'queued', + STATUS = 'queued', updated_at = NOW(), processing_started_at = NOW() WHERE ( - status = 'in_progress' - AND processing_started_at <= NOW() - $1::INTERVAL + STATUS = 'in_progress' + AND processing_started_at <= NOW() - $1 :: INTERVAL AND attempts < $2 ) OR ( - status = 'failed' + STATUS = 'failed' AND attempts < $2 ) RETURNING l1_batch_number, - status, + STATUS, attempts, error, picked_by @@ -1088,9 +1140,10 @@ impl FriWitnessGeneratorDal<'_, '_> { ) -> Option<(L1BatchNumber, i32)> { sqlx::query!( r#" - UPDATE recursion_tip_witness_jobs_fri + UPDATE + recursion_tip_witness_jobs_fri SET - status = 'in_progress', + STATUS = 'in_progress', attempts = attempts + 1, updated_at = NOW(), processing_started_at = NOW(), @@ -1102,14 +1155,14 @@ impl FriWitnessGeneratorDal<'_, '_> { FROM recursion_tip_witness_jobs_fri WHERE - status = 'queued' + STATUS = 'queued' AND protocol_version = $1 AND protocol_version_patch = $2 ORDER BY l1_batch_number ASC LIMIT - 1 - FOR UPDATE + 1 FOR + UPDATE SKIP LOCKED ) RETURNING @@ -1134,13 +1187,14 @@ impl FriWitnessGeneratorDal<'_, '_> { pub async fn mark_scheduler_jobs_as_queued(&mut self, l1_batch_number: i64) { sqlx::query!( r#" - UPDATE scheduler_witness_jobs_fri + UPDATE + scheduler_witness_jobs_fri SET - status = 'queued' + STATUS = 'queued' WHERE l1_batch_number = $1 - AND status != 'successful' - AND status != 'in_progress' + AND STATUS != 'successful' + AND STATUS != 'in_progress' "#, l1_batch_number ) @@ -1157,24 +1211,25 @@ impl FriWitnessGeneratorDal<'_, '_> { let processing_timeout = pg_interval_from_duration(processing_timeout); sqlx::query!( r#" - UPDATE scheduler_witness_jobs_fri + UPDATE + scheduler_witness_jobs_fri SET - status = 'queued', + STATUS = 'queued', updated_at = NOW(), processing_started_at = NOW() WHERE ( - status = 'in_progress' - AND processing_started_at <= NOW() - $1::INTERVAL + STATUS = 'in_progress' + AND processing_started_at <= NOW() - $1 :: INTERVAL AND attempts < $2 ) OR ( - status = 'failed' + STATUS = 'failed' AND attempts < $2 ) RETURNING l1_batch_number, - status, + STATUS, attempts, error, picked_by @@ -1204,9 +1259,10 @@ impl FriWitnessGeneratorDal<'_, '_> { ) -> Option { sqlx::query!( r#" - UPDATE scheduler_witness_jobs_fri + UPDATE + scheduler_witness_jobs_fri SET - status = 'in_progress', + STATUS = 'in_progress', attempts = attempts + 1, updated_at = NOW(), processing_started_at = NOW(), @@ -1218,14 +1274,14 @@ impl FriWitnessGeneratorDal<'_, '_> { FROM scheduler_witness_jobs_fri WHERE - status = 'queued' + STATUS = 'queued' AND protocol_version = $1 AND protocol_version_patch = $3 ORDER BY l1_batch_number ASC LIMIT - 1 - FOR UPDATE + 1 FOR + UPDATE SKIP LOCKED ) RETURNING @@ -1292,9 +1348,10 @@ impl FriWitnessGeneratorDal<'_, '_> { ) { sqlx::query!( r#" - UPDATE recursion_tip_witness_jobs_fri + UPDATE + recursion_tip_witness_jobs_fri SET - status = 'successful', + STATUS = 'successful', updated_at = NOW(), time_taken = $1 WHERE @@ -1315,9 +1372,10 @@ impl FriWitnessGeneratorDal<'_, '_> { ) { sqlx::query!( r#" - UPDATE scheduler_witness_jobs_fri + UPDATE + scheduler_witness_jobs_fri SET - status = 'successful', + STATUS = 'successful', updated_at = NOW(), time_taken = $1 WHERE @@ -1338,14 +1396,15 @@ impl FriWitnessGeneratorDal<'_, '_> { ) { sqlx::query!( r#" - UPDATE recursion_tip_witness_jobs_fri + UPDATE + recursion_tip_witness_jobs_fri SET - status = 'failed', + STATUS = 'failed', error = $1, updated_at = NOW() WHERE l1_batch_number = $2 - AND status != 'successful' + AND STATUS != 'successful' "#, error, l1_batch_number.0 as i64 @@ -1358,14 +1417,15 @@ impl FriWitnessGeneratorDal<'_, '_> { pub async fn mark_scheduler_job_failed(&mut self, error: &str, block_number: L1BatchNumber) { sqlx::query!( r#" - UPDATE scheduler_witness_jobs_fri + UPDATE + scheduler_witness_jobs_fri SET - status = 'failed', + STATUS = 'failed', error = $1, updated_at = NOW() WHERE l1_batch_number = $2 - AND status != 'successful' + AND STATUS != 'successful' "#, error, i64::from(block_number.0) @@ -1711,18 +1771,22 @@ impl FriWitnessGeneratorDal<'_, '_> { ) -> Vec { sqlx::query!( r#" - UPDATE witness_inputs_fri + UPDATE + witness_inputs_fri SET - status = 'queued', + STATUS = 'queued', updated_at = NOW(), processing_started_at = NOW() WHERE l1_batch_number = $1 AND attempts >= $2 - AND (status = 'in_progress' OR status = 'failed') + AND ( + STATUS = 'in_progress' + OR STATUS = 'failed' + ) RETURNING l1_batch_number, - status, + STATUS, attempts, error, picked_by @@ -1778,18 +1842,22 @@ impl FriWitnessGeneratorDal<'_, '_> { ) -> Vec { sqlx::query!( r#" - UPDATE recursion_tip_witness_jobs_fri + UPDATE + recursion_tip_witness_jobs_fri SET - status = 'queued', + STATUS = 'queued', updated_at = NOW(), processing_started_at = NOW() WHERE l1_batch_number = $1 AND attempts >= $2 - AND (status = 'in_progress' OR status = 'failed') + AND ( + STATUS = 'in_progress' + OR STATUS = 'failed' + ) RETURNING l1_batch_number, - status, + STATUS, attempts, error, picked_by @@ -1819,18 +1887,22 @@ impl FriWitnessGeneratorDal<'_, '_> { ) -> Vec { sqlx::query!( r#" - UPDATE scheduler_witness_jobs_fri + UPDATE + scheduler_witness_jobs_fri SET - status = 'queued', + STATUS = 'queued', updated_at = NOW(), processing_started_at = NOW() WHERE l1_batch_number = $1 AND attempts >= $2 - AND (status = 'in_progress' OR status = 'failed') + AND ( + STATUS = 'in_progress' + OR STATUS = 'failed' + ) RETURNING l1_batch_number, - status, + STATUS, attempts, error, picked_by From 473432d337db9db92be2ede493377e04e9fe7f95 Mon Sep 17 00:00:00 2001 From: matias-gonz Date: Tue, 24 Sep 2024 13:01:08 -0300 Subject: [PATCH 06/19] Prepare db --- ...a7db7673811ac181e801a16a7aefc984d60b0.json | 16 -- ...db7dbe0bb23c4fc87a78be2d01b77da2ecbd3.json | 23 --- ...a23ccc0a18b0a4c8ee281f5f0ad131d25b33.json} | 4 +- ...d58ab63035cdda861ff7566a9b1f6a68b9162.json | 15 ++ ...c42cfea253a182ca5df143a183cd522ecac33.json | 22 --- ...7c7497d418325ac0f24468fb3d9bcc99f9c1.json} | 4 +- ...c3bdae18b88c4c223e374df9a997c271b091b.json | 38 ----- ...50e42abbaf365a1b041d0e7a809796ef0fe63.json | 22 --- ...57db0a54d476b78dc0e36e3ef94dcc17099ae.json | 15 ++ ...a6acecaaffde2e922fb384ecc96571bd9e786.json | 16 ++ ...db6978a6c1e80bbaa5f8fded39a82f8e50e0.json} | 4 +- ...1f5dd0730d1a8e111892025f1c2688e338fbc.json | 15 ++ ...3897edf8c868094ad029e2e8fcf286d44fd55.json | 16 -- ...a22b17e75cb6778168d230d9ccd263caca23.json} | 4 +- ...7fb9102b175047588ec1cca515ff31ae131c3.json | 20 +++ ...760b8368dd5532caa5fb8b4310a96d44d8530.json | 15 -- ...2b3266e5e0140e6d04819be4a5997d193d1de.json | 14 ++ ...b96b711e8667df7a3c87a5ddf062842a0da6c.json | 14 -- ...7ae62a53e1fa4834acc82c18e265867b69d9.json} | 4 +- ...8e34818a86cbc50fb5a509f4072ca97db926c.json | 15 ++ ...3c13834347e2bf7a90d2113a2e0d623c6122.json} | 4 +- ...dc9216ee7df28e08c7eb4899c2e7df4078c50.json | 16 ++ ...3db7a71aca15698bafba051a8d9a91a4dbc76.json | 112 -------------- ...854f613c3267b983a031998856873740c9bff.json | 15 ++ ...44a0202265d741912125f7865e570411997d7.json | 15 -- ...0f58093cdfe21871592876b9a2a73ec8c1b10.json | 15 ++ ...97d1fef3dc39e95d98dbdfe49c9121e58ecf2.json | 14 ++ ...78e96ac6f94edb2983a7e68a3d650a091da1a.json | 15 ++ ...6b04cd475386497611ed5664a281c66917afc.json | 14 ++ ...f9ce57c51198af167ec2b98944659ba0c53a.json} | 4 +- ...7ea964610e131d45f720f7a7b2a130fe9ed89.json | 17 -- ...74e68843b551901c83dcf74901cc78e9bdb1c.json | 14 ++ ...6d922fa1fc9c202072fbc04cae1bbf97195aa.json | 14 -- ...68cee71742b732112038a642e2a07305053c2.json | 12 -- ...4d26e48e968c79834858c98b7a7f9dfc81910.json | 14 -- ...4129e2abdfa088c8089ec3765d771d130133.json} | 4 +- ...ec7eefa0edd3cefd7eb6025c2c1456f2a6095.json | 15 ++ ...6e7a755c4bc6c25c7e6caff5fd6142813d349.json | 16 -- ...af15a5a69d936e0b33000e3035cd1af92bf8.json} | 4 +- ...518daf76a5f283e4298fd12022b0c3db07319.json | 16 -- ...6381a9c4165e2727542eaeef3bbedd13a4f20.json | 15 -- ...c836a8ffc0f71f082efca16d14ac0b897597d.json | 16 ++ ...aaf3a07530a8d8b6787e20ebafd344c01ba65.json | 15 ++ ...83f115cd97586bd795ee31f58fc14e56d58cb.json | 14 -- ...70e583b455383eec526eee3acfe6670e30f2f.json | 15 -- ...bfcde52f6856c4aaacb55fd7250823368c4a1.json | 14 ++ ...ed5d8007789c0fc1eab948f6d7339dfb69147.json | 22 --- ...fc5bccba61861c6f6a1e807d210b25c5af830.json | 14 ++ ...00f7b1176d59a83520288f5428b67ebd52130.json | 14 -- ...62af196d586cc08ea0f23d2c568527e94b41d.json | 12 -- ...87ed365c0369f94bc457cb162a5c876a123c7.json | 16 -- ...2db755007951ab826147a7d5d001f12b991c6.json | 15 ++ ...be225db5f8165acf1d617d0c31e8c47bab33.json} | 4 +- ...0f2ede5e22b0bbd8bc910cb36a91ed992bde1.json | 15 -- ...14be23e4bde145064157427e7c74e7facda30.json | 14 ++ ...b57ecda488eb062fcacbb59bd6d00b2c7703e.json | 14 ++ ...2c5eeab06ff664141fa542229e7c9a46d4410.json | 34 ---- ...6a186c539fe34c9893c51018687ae0ca01b5.json} | 4 +- ...ae976ea533143b0eb0644612e926624d710f0.json | 12 ++ ...1d5b68fb9450d17372701907905bb74af844a.json | 14 ++ ...6fc91f2969fd0f108d72debe703e95855298.json} | 4 +- ...f9db6cd67629c9d987f1ed7da6bdb341edfd.json} | 4 +- ...54682bd852c4a54387f92b3f633b5a5899c93.json | 14 ++ ...61c816f583c69a64b7768887ecce434b829fd.json | 14 ++ ...0c1f7b0d68b747e3a75a63d60ccd0982c7fde.json | 14 ++ ...618217af059a796e4a3cc0f5269709f7ffd49.json | 14 -- ...96ec397767a063dc21aa3add974cb9b070361.json | 16 -- ...3ff4b3462b42ca731963eca0e46997527ae3.json} | 4 +- ...9b3253ea21b3eac3c1df1921e040e3f059aac.json | 12 ++ ...83b7955a058705093d7372726c3fc7ce506ad.json | 14 -- ...31867b3c0bff34bbacbc31ff4cd786c97ca90.json | 12 -- ...16b8b569a196df3ebf75ee779665ec53d1187.json | 38 +++++ ...6e4da6574f78094cbbc8eb27b9b273a96aa10.json | 14 ++ ...7d113257cca7a7fc6c8036b61cc0e005099a8.json | 16 -- ...a75893ee5b1b94b6d0f25f1db5342888a2a30.json | 15 -- ...d590df2d0633fb5e58f600fe5a87012bc998d.json | 15 ++ ...59d96738d6bccaa175362cc554eddb3b26262.json | 14 ++ ...843620210aff3a9a7aa8a249db50c1c56d927.json | 20 --- ...12e49a65da26212e6d676abffb9d137aa3c2e.json | 14 -- ...3b18a1bd18b922640d3ae70ae0b9bfde8effc.json | 14 ++ ...43895c9a3cf9e0c52bd65c5eace2445c2249f.json | 15 ++ ...3fb92c099f0b71ecfabd33325cfd107f2fecf.json | 16 ++ ...182ca8e746122e42f448a7f349a234e6ab594.json | 16 ++ ...5a8b4cb42b579f4e968664b6210c6058bfb5.json} | 4 +- ...8f02328de7f12c5e83609a477feddbbdd754.json} | 4 +- ...ec427a099492905a1feee512dc43f39d10047.json | 15 -- ...162d717ffcf46fdf5d2ce5d32555353b6da6b.json | 14 -- ...5b2356e58f12a7af7539f2b75eb318941db6d.json | 14 ++ ...4c3262d5cab17e8f76bdc6672459e0091b1d8.json | 19 +++ ...373147984aa3931df33a50de2bb2ed4367d51.json | 14 ++ ...ecd50a04799ffd36be0e17c56f47fcdbc8f60.json | 14 -- ...16369609c69bf8fed67f6fb96859844ed29b1.json | 23 +++ ...325fad494a512ba92df95439d2d7fe0f3a285.json | 23 --- ...ec30c53893af990a3158a7006904c7073b14.json} | 4 +- ...da959f3f2e5375d8f1687231f13d26a41cc68.json | 14 ++ ...6228315e7aeed1c6b6f3989e043d6f4fd5f70.json | 16 ++ ...6de37201091bfccd3caf922e766896c5a542b.json | 15 -- ...c7573fe040d47d17d9bd4e2a2b6d3131a4f9c.json | 16 -- ...18890d009081b1c1cec8773e25c6621753372.json | 40 +++++ ...3ee9ed6fd28c338ddadd9958f3bb0901ba454.json | 16 ++ ...3ea4423fdaf5d03cb70e8c3a67b6d4a24d29e.json | 19 --- ...b9593ba6ff291db9868a1ad6df21440ef311a.json | 14 ++ ...0bb5b8a0a5408ccd09465225f8bf3fee551a.json} | 4 +- ...c0798441543244f83b691783127979e02dd8c.json | 15 -- ...84aaa174ea8a577dcc97e84680f4fd650c37.json} | 4 +- ...fadbcfc343374fad173df0cc8db38419a9726.json | 14 -- ...28321969b8c5bce89a83b74ee08f9e2dfcf9b.json | 14 ++ ...c86783d7da0ec1d008680872f3619cf217923.json | 14 -- ...91a8d67abcdb743a619ed0d1b9c16206a3c20.json | 12 -- ...ab01cb2c55bf86d2c8c99abb1b7ca21cf75c0.json | 14 -- ...a82f1af696fcc8f7484eaf255d5311589ee39.json | 14 -- ...295a5f5d8ad9a1560d96bed1250c37ec9cb0e.json | 15 ++ ...ac5e5fccb3ec55aa1227f5f1ea5a11f9b36a9.json | 15 -- ...2ed3cba01cf9a816e8eea972020d4be8ad5e.json} | 4 +- ...2cec15b0c574fd94917e82238d1294831197.json} | 4 +- ...4c4a82d399ca1c4c6da36d2ab98a7537de7aa.json | 12 ++ ...26313c255ce356a9a4e25c098484d3129c914.json | 14 -- ...6bf94a013e49bf50ce23f4de4968781df0796.json | 15 -- ...5217a1838cc7ea29b1f8fa394b62573884512.json | 12 ++ ...29bf769829991c7d732b13f96bcd1293263ea.json | 12 -- ...664b1106316347f0fc557afe7112d6fca7e3b.json | 22 +++ ...736ceef46d819394b7602218514b2e2a906eb.json | 14 ++ ...d4c2f5800c37ac0715f6ae351cafb8afbb76a.json | 12 ++ ...cf7f4d16593b0ed0b496c903d967efe5bb6a6.json | 17 ++ ...31f9138b204f4bcd15f934e5b209f3dac0639.json | 16 ++ ...3a203f640cb2279f3b75108c49b2527b19c8b.json | 15 ++ ...81e33845ec68e386ef032715ad1222e2fdc8b.json | 15 -- ...8abd8d4e534e5c17e4ffbcf5c97ff920b12d6.json | 14 ++ ...466f8a4efab1a52acc26f3a6c6b219a46390b.json | 15 -- ...9c7459db54dae9a2ea2db8595af4cb70c8aa9.json | 22 +++ ...0116e8dc7ad2cff1a746a4f3191ceadef0f5.json} | 4 +- ...6de657d21422fd1d46b1fc0d3e829393146c.json} | 4 +- ...d49a080299632be9f41bc838d2e7416fce75.json} | 4 +- ...2767e112b95f4d103c27acd6f7ede108bd300.json | 16 -- ...e5783f3df8ad73ef92b62bafc1a8b5e1046a.json} | 4 +- ...d2bd038257f7cf2ab51405dc05ccba3e33312.json | 16 ++ ...4e8901b631ff170733621ce3ece216d71205b.json | 15 ++ ...3ec6c9383b5cac5112569a77caa00747288c.json} | 4 +- ...c9317c01d6e35db3b07d0a31f436e7e3c7c40.json | 14 -- ...8e221a8ef9014458cc7f1dbc60c056a0768a0.json | 16 -- ...d1910919b8b46e895ddaa4ba5bf411585dc6e.json | 16 ++ ...59a410844c0e3cb5e190d1b8442da802825ad.json | 14 ++ ...c08e57f95c6ee5a69f02f15eb1e886df4c882.json | 14 ++ ...f8fbd8fdaf23266412e2faffb7e3813213b98.json | 14 -- ...1719519938eccbea4a598d842bd75b9553880.json | 14 ++ ...8ad91e8653d01981640d2d068c9564393f7b9.json | 16 ++ ...a69138206dfeb41f3daff4a3eef1de0bed4e4.json | 16 -- ...d10c23ab2924f6a3f0594f6990af8ea9146a6.json | 15 -- ...b94486499a3d5b380948cb94e4b5066fea9a.json} | 4 +- ...5d93e391600ab9da2e5fd4e8b139ab3d77583.json | 15 -- ...de45f8f3f3b6cf2e4136f25a1c3ab85d92668.json | 15 -- ...08f1ce816a56308fb9fe581b8683f76cbbbc3.json | 14 -- ...877866bbdd1f8c359d97538125756fd05a2ab.json | 12 -- ...40e65af4ac1cbd81ae1bce16e74927ddfa7b.json} | 4 +- ...0457113e073b392c569c077d719941d1e37aa.json | 14 -- ...63f436a4f16dbeb784d0d28be392ad96b1c49.json | 14 -- ...6d2b2e3f2497e6b5f26c72e220397cc0e62f7.json | 15 -- ...61b86b1abd915739533f9982fea9d8e21b9e9.json | 14 -- ...d1f5e03924dbf6dd1e824d4aca837e604b7e9.json | 44 ------ ...5386a2fd53492f3df05545edbfb0ec0f059d2.json | 15 -- ...71a5609ca74432dcec3c169279bbbfce9fdae.json | 16 ++ ...5637fcf7f6c27d1238b17bc0f9bc50a0ffa7a.json | 14 ++ ...58e579752dea7632e9422c2921a5d7e4d62ba.json | 16 ++ ...1cc9d3523a392fd2011491c6017400f313a16.json | 12 -- ...f67d2ef1428c61ae84003c9b52b03204d1f0a.json | 14 -- ...9d5cc099abb0e1ccac715094c46297aacb3f4.json | 100 ++++++++++++ ...5560139c2bc540cc7777da44c9585206382c.json} | 4 +- ...2a7c60e89631bfe95611f156dac532218ca5.json} | 4 +- ...a4b4e2af48907fa9321064ddb24ac02ab17cd.json | 20 --- ...facec8c88629c4993f6c86a30193c7916fff6.json | 12 ++ ...4fdfd4e8aed4c63898af5b3c3d5ad2c6bec6c.json | 15 ++ ...75072106e943b76c17ef42a1138e291da86c6.json | 112 ++++++++++++++ ...c1d66aeaeb6e2d36fddcf96775f01716a8a74.json | 14 -- ...432d865852afe0c60e11a2c1800d30599aa61.json | 14 -- ...87f7a2aeb77058e409a57f8e62b8dd0b27ac.json} | 4 +- ...5a9a38a8d8ff1fba9a834d37927793f532b7d.json | 14 -- ...77fde74782e8849e84a2b699fe855946f8905.json | 22 +++ ...2188769ca8c52125e7739bb00e90eedc79af.json} | 4 +- ...2cb9aa7c0305378d758dfe9bce80912e59255.json | 15 ++ ...33acd2066a5e238088b39b982b10770f51479.json | 100 ------------ ...9713f437db492e2075ca69e11e2ef5728ccaa.json | 24 --- ...95d973d60b5a02c628bb0f38dd00f3396b3b.json} | 4 +- ...0d7eaeeb4549ed59b58f8d984be2a22a80355.json | 22 --- ...5668359e4b623876422cf6915d4888cdca31a.json | 14 ++ ...864174f39e6011fdfdc56490397ce90233055.json | 16 -- ...3f2f9edd3fb4e73b44d9fa2c2bb927acb99f0.json | 20 +++ ...c623866c3fd2e862c38c2af172c7c39620a49.json | 14 ++ ...825c64f43a819b9c787228b23814542f563d9.json | 36 +++++ ...74a5ade5c1a472c4e5c9f5e9050e4136273b6.json | 24 +++ ...0e202da24ac3ca205154417e98ccfa7437379.json | 16 -- ...8b424b2152a99a3cdff452218b6bb7f12840.json} | 4 +- ...d455f4043c60538687dec050c5b578d505ef8.json | 23 +++ ...a6b3e9bca996fa633005bc8eeb77341c8c893.json | 14 -- ...beea37512f1c5855579bdbb4cd8ba6d9977c3.json | 44 ++++++ ...700f9ae2a6e5a917b1a21f290d313d9d88dba.json | 14 ++ ...1885d320c146cd8fad77c107ef12fa38e6c98.json | 40 ----- ...89bd8a6a70e23feb489cebb14ba906865898.json} | 4 +- ...9411ba30ac67080552279d821d66b1b804db3.json | 14 -- ...8242aad3e9a47400f6d6837a35f4c54a216b9.json | 20 --- ...f64c789d3a8a1d6c96c58213c23a055cde751.json | 15 -- ...66c69a183624bd5c982a36756ac57c4b49ba.json} | 4 +- ...e5da19947002e66110573e6fad9105f07413a.json | 15 ++ ...5cadeff54160c1cc0b6b4fddecf090ebb30f1.json | 20 +++ ...5dbc6f5ed92bc3d47b4dd91116dd6ec354d50.json | 12 ++ ...98c18f29d3bebb42b0ae3fe7757eeea9ee175.json | 40 +++++ ...4675993ca0c7b2fb1d2be386101b78a995110.json | 14 ++ ...6862d6ad0de7c7ca1d5320800f317428f07e1.json | 14 -- ...a8b12b67678e983dc2570be28fe9b1e016c28.json | 14 -- ...9903fb3c9eaed968af5638a6f94bae2e7bb3.json} | 4 +- ...0b04a045f37cb9217ed0b17a78f9949f3d7ed.json | 22 +++ ...c1b0b2dd97b590d546c3c03dc1a97144a57ec.json | 15 ++ ...98deaa1ee92c9c7d608199673a8ed5558a17.json} | 4 +- ...a683c2092560f59c8a6703d4ccc1715872ba9.json | 14 ++ ...0294ec464d184ad732692faa61d2ef99c84e9.json | 40 ----- ...27bae6207b1a5ac294b2d84b6f69ddb14fa9.json} | 4 +- ...f3f9dd37b771cf76261762ae18fd14cf0efc5.json | 16 -- ...5eb148aa6d1dbd69bf3fe48522101a6ea0bcb.json | 23 --- ...668929ceaaa66536248f4a0fc062e50d0d80c.json | 23 +++ ...1450fb1cb5219bcf68b920cf42c23628bd58.json} | 4 +- ...e6ecbe96475e83dfed603bd305e72460f52c2.json | 14 -- ...78a8a0ec739f4ddec8ffeb3a87253aeb18d30.json | 14 -- ...2fe98364aa684180dd6fbf540bb0b68d96a64.json | 15 -- ...89268465b346af5da1a58cac850b687e5eb34.json | 15 ++ ...ab318006e8b52570a72a89682435a92ca75f8.json | 14 ++ ...9d4ab965ab3e45badaf607af8e8787b5a8cb.json} | 4 +- ...5ff66f2c3b2b83d45360818a8782e56aa3d66.json | 36 ----- ...92dfb0d28a797bee69872634f3105d2d51996.json | 14 -- ...8779128de288484abea33d338c3304dd66e08.json | 16 -- ...6109696737ae42ee1ee38e99ac07564816b5a.json | 16 ++ ...328e19bed529d4bd71ca5bc7df0de1a0a463.json} | 4 +- ...fd7144b05f75aa304bf217cf14b9625a09e64.json | 34 ++++ ...81314e65b27790b9946a58c95f2fbe6fb664.json} | 4 +- ...bd48e2dc3cce5f3f40cea31eb3b27c6bff1c1.json | 16 ++ ...f01c2abe41c456d85787038ad0b3cc21b59f8.json | 14 ++ ...5d9ec9b3f628c3a4cf5e10580ea6e5e3a2429.json | 14 -- ...c10b9ae1a80fe6b6a9bb50ee4bfe849f398d.json} | 4 +- core/lib/dal/src/contract_verification_dal.rs | 18 +-- core/lib/dal/src/proof_generation_dal.rs | 18 +-- core/lib/dal/src/snapshots_creator_dal.rs | 8 +- core/lib/dal/src/system_dal.rs | 16 +- core/lib/dal/src/tee_proof_generation_dal.rs | 8 +- .../src/tee_verifier_input_producer_dal.rs | 16 +- ...f6e1df560ab1e8935564355236e90b6147d2f.json | 15 -- ...7619d79075a2177b8f9b464565474b43afc21.json | 15 ++ ...c252e5c82673e1595829b4b9f897b7df61e6a.json | 15 ++ ...8dbc21cccb9a95e3db1c93da239845a5e9036.json | 26 ---- ...52e0e45816db6ebc2c16a09350b99d87d5f27.json | 26 ++++ ...36ca3032cd5dcc5d3d1d4d5d0a16c38c20ef.json} | 4 +- ...1c5fa2958f06898a8c67079a7ccf0c340df2.json} | 4 +- ...473766ab4f51dd399c879b4f7c3bc157ab77e.json | 30 ++++ ...a80c233a9fd3e892b5a867a5517c2e04497a8.json | 41 ----- ...151b3f9a2285724c9dc1a044762f7ce6f8bb7.json | 15 ++ ...2254a457665179d9cf0a3c0b18c3fe09e4838.json | 15 -- ...98f5e2450cc4faee2f80b37fbd5626324dbeb.json | 12 -- ...4dab579b76ea65ea022505a3f57fc0a4a946.json} | 4 +- ...0d001cdf5bc7ba988b742571ec90a938434e3.json | 17 -- ...6054d3fb4f4a5c014ef24f5cb0ac4cd3465eb.json | 17 ++ ...332b826708800a2f72f09bd7aea08cf724e1a.json | 47 ------ ...431e3e266c84e1ef03cf4015202dbb9f54174.json | 22 +++ ...09c2c60fd2b91d376b924ec0089a721a2a640.json | 15 ++ ...d1b98aa902e56d35f55c0d7e2a983ce1bdd80.json | 53 +++++++ ...74aac9fa17a424d1f5c673e78a2a023bc2205.json | 15 ++ ...a68a48db6a64afcd41bbe0e17d98fa38fdb19.json | 22 --- ...0cd5c6b1122c35d7ffdbbba30327ca3fb5a8.json} | 4 +- ...f19ec63114a652fdebce5a872a8eb694626fe.json | 47 ++++++ ...7249ec09c0daf4368021788207370213a6d94.json | 14 -- ...f1d4d9a4b83a8b42846d8373ea13b96d612cf.json | 19 --- ...bea9465ef0f5732df44d1d50f792d5a4aef5.json} | 4 +- ...ec0b54094da72d2d9de5e3948001164bf739c.json | 18 +++ ...39c62de28c585158497d9d1984fdc762f1440.json | 15 ++ ...e2d3a6ebb3657862b91e3ece34119f098fc2d.json | 32 ---- ...fe6ee0c0c54e68daabbe2eab5c7ce9b1cd4bc.json | 60 +++++++ ...0ad195b0dd2a8ce56b1a9eb531103130b5e3e.json | 62 -------- ...8b87ead36f593488437c6f67da629ca81e4fa.json | 14 -- ...aa0a0ad5fba0f6dbc4d8f36c79171a8be8f42.json | 17 ++ ...091e0d7c5ada67cb757b874a5c62e32184666.json | 15 ++ ...97ed410fa47b268a66f1fc56d469c06ae50af.json | 12 -- ...2601d35fd2881ac1fd070f0f1a8add4bc388d.json | 30 ---- ...9a67936d572f8046d3a1c7a4f100ff209d81d.json | 18 --- ...7d91e2cbbcb7ce02bfa14913d76cb946a57e.json} | 4 +- ...5da82065836fe17687ffad04126a6a8b2b27c.json | 15 -- ...74ec8fc1800b848951cf264b3f309701c52f.json} | 4 +- ...0ee050f09ae3886243c9af0677ad20e115a01.json | 15 ++ ...a420c278e5771858d9de8d08a23e1fda97f5.json} | 4 +- ...0fc6b60b9a522b1a3134752c2ccca06f08cd.json} | 4 +- ...b25b709ba99059f4a2f5e1bc5fd17f27c1244.json | 12 ++ ...17729a81f999c81701c148a4d85f413f6e30.json} | 4 +- ...9a8f447824a5ab466bb6eea1710e8aeaa2c56.json | 15 -- ...1d22f984d4b063eeb9e92726a2afd86555277.json | 15 ++ ...31c32226a54cd980aa99a38289452fbb100d4.json | 14 ++ ...c0094aba5c7966739d2d56ac74ed28ceb715f.json | 16 ++ ...40d96210c6e7f1dc2f249741e45385e30e61.json} | 4 +- ...7a1a04821495487a80595cc9b523dac6ac8e9.json | 15 -- ...701950441fcbf9784a6634ce020262e170951.json | 19 +++ ...7af8475cef49d0dc34c3d6ac79e1032f2a94.json} | 4 +- ...d0fc9ac9a7f3dce2ba48c2d0e6f38b6ba455a.json | 15 -- ...1810d85803da953bd7d5c46b34619e05374ed.json | 18 +++ ...92dd0bec10a53fa6d9052f9aeeeed8080d304.json | 12 ++ ...28e90167f2051e1c9b3a4d63e11f3273cc7a.json} | 4 +- ...ad2ccc0aeaaecbb8989eb738a01ea253a237b.json | 12 ++ ...715e903f3b399886c2c73e838bd924fed6776.json | 18 --- ...2723def558800cb1d56840886199c584294c.json} | 4 +- ...ba7f33558aa20961f475823e0216873a9e8a4.json | 17 ++ ...fcddbb47c5e9965443f118f8edd7d562734a2.json | 60 ------- ...fb2d59c01a15172b2accc0cddc4e8326a792.json} | 4 +- ...b6d9065bf4494daf8f7632ab2bfe055773f7b.json | 47 ------ ...44a1e3248c7c0ce034ff41ba2070200195ad.json} | 4 +- ...c0b6c018e6a4d279acd24a4ea7d81b5cc5123.json | 60 ------- ...e085ea80cf93c2fd66fd3949aab428bbdc560.json | 12 -- ...f5a15d2fc5ad3e5ce738a2f6ee3eecfc96736.json | 16 -- ...78649e228eecbbbf959a1e3b87c08faa60de.json} | 4 +- ...b7b5831361599874fc223dd389fcc3f9efee7.json | 41 +++++ ...023678f31a1b7f5ee33b643dd551c40e88329.json | 15 -- ...866e8f67a380302762c272bfb27307682d62e.json | 18 --- ...e2a39dd892793175e3d943487875367d220e6.json | 14 ++ ...6d119cc0df302fa2288d37741138cb4592156.json | 19 +++ ...6b4d3d6a762761e45af2a73fe96da804e627e.json | 53 ------- ...0767a2cd4488e670674cd9149f7a332c0198d.json | 22 --- ...023375273c2211dab39e1f28d51724b7d8ad.json} | 4 +- ...0aa5270bbe4e14e7608eb7f86f25b3337dfc.json} | 4 +- ...10648e2870c18716c6cf30dbf3a704c137776.json | 15 ++ ...3ced4deef9ea2f9699e8e173d5d2343f26cc3.json | 14 ++ ...700302981be0afef31a8864613484f8521f9e.json | 19 --- ...426777a8a76f02f528348bfe81f19ba5ebaa3.json | 15 ++ ...43c868c63c853edb5c4f41e48a3cc6378eca9.json | 32 ---- ...cef7a213d52ec4d393e1e2f3a40aa9e1d7e9.json} | 4 +- ...bd791fce9a86b6cadb2c8a2b2834bbe71fbd4.json | 62 ++++++++ ...fa244d5b3c2ae22b4850c9a536e4d54ce38d3.json | 15 ++ ...0103263af3ff5cb6c9dc5df59d3cd2a5e56b4.json | 17 -- ...a9dc31c7d51476f18cffa80cad653298ad252.json | 12 -- ...cb86bd28dbda3ee3444f300da9f7d25930cae.json | 47 ++++++ ...61698aeed3f3de0994908fd7a655ff465f250.json | 32 ++++ ...ad70e48d1171fbdc1c929e1d004e73805d4e9.json | 26 ++++ ...9e36eb532235d016c31ae8d86455506dd7a80.json | 22 +++ ...6682c19f3f44dd424c81e0f8e94c59f4a8780.json | 47 ++++++ ...a13c70062609adca4c60274ba19cde990727c.json | 53 +++++++ ...71570fc88c17822bebd5b92e3b2f726d9af3a.json | 47 ------ ...5263556f258565f79cbb40f5ecc1a4f6402f5.json | 15 -- ...3c0c5544cb14cc06baa46cd7ecc329bba7b49.json | 60 +++++++ ...9f22d450a0fb0f10eb391b058f650d99ef71.json} | 4 +- ...4775c6f7414c7bed75d33b61de00fdbabc349.json | 15 -- ...1f40b839fecf8c4388ec0c0089b1548fef08.json} | 4 +- ...ac429aac3c030f7e226a1264243d8cdae038d.json | 17 -- ...d24b3f001a2d4ea0da817e69f3816d43ce73b.json | 12 ++ ...2f85ac05423fdcd31c7e27c42cfd2e85b6cb1.json | 25 +++ ...6b93bfd5d96fdc68732fe38c79ccd44b84def.json | 53 ------- ...86ce94a1379a01ec3ebb41aa9a210d589d08.json} | 4 +- ...8b02c44b099e27e3c45c5c810cd5fcd8884ed.json | 15 -- ...c6fadb8e12a9218399d189b4d95e2ca4fcc48.json | 25 --- ...2060fbea775dc185f639139fbfd23e4d5f3c6.json | 15 -- ...6b80c122699e003028b14a0530e2fba5f5b23.json | 16 ++ ...9ad7df6c6b0e29981439d94dc081d4fad3cba.json | 32 ++++ ...4e83cc39c941282257e0c9a488bcb52f63dd2.json | 18 +++ ...4f3fe0a8d05c55536b230594c1e1f17e0d9d8.json | 47 ++++++ ...68f529dce53a9e2b37adf73c88e3dd64d461a.json | 15 ++ ...93a4eb2ee0284aa89bca1ba958f470a2d6254.json | 14 -- ...fba74ec2cfc3c89c7e4e2ea475c3ce4092849.json | 26 ---- ...567878f347bdaf36294e9b24ee9c0aa1e861b.json | 15 -- ...a78c1118063b2a1cda34bb49e9365219c32d.json} | 4 +- ...af89bbd72934e1405e320e746158e6d395d96.json | 47 ------ ...15aaade450980719933089824eb8c494d64a4.json | 15 -- ...861eea20a381f6451ca82b4f1319364f77a9.json} | 4 +- ...d5c40935ed7b37013c9c608bfdcffd9611d8.json} | 4 +- ...304e8a35fd65bf37e976b7106f57c57e70b9b.json | 16 -- .../crates/lib/prover_dal/src/cli_test_dal.rs | 26 ++-- .../src/fri_proof_compressor_dal.rs | 46 +++--- .../lib/prover_dal/src/fri_prover_dal.rs | 60 +++---- .../src/fri_witness_generator_dal.rs | 146 +++++++++--------- yarn.lock | 2 +- .../zk_supervisor/src/commands/sql_fmt.rs | 1 + 370 files changed, 3328 insertions(+), 3315 deletions(-) delete mode 100644 core/lib/dal/.sqlx/query-00220170d8f9e577321a0522337a7db7673811ac181e801a16a7aefc984d60b0.json delete mode 100644 core/lib/dal/.sqlx/query-00c0389f4cde049078885cdf05bdb7dbe0bb23c4fc87a78be2d01b77da2ecbd3.json rename core/lib/dal/.sqlx/{query-f4e7e2dd109aab2714845b028eba780c75468aa36615bcfcf7f7d8ace23cd1aa.json => query-02494e0846398040749aa89c7051a23ccc0a18b0a4c8ee281f5f0ad131d25b33.json} (82%) create mode 100644 core/lib/dal/.sqlx/query-02cd10bd405bb3150478ef98d9dd58ab63035cdda861ff7566a9b1f6a68b9162.json delete mode 100644 core/lib/dal/.sqlx/query-03e00f422f991f8f12aad0083e1c42cfea253a182ca5df143a183cd522ecac33.json rename core/lib/dal/.sqlx/{query-cea9fe027a6a0ada827f23b48ac32432295b2f7ee40bf13522a6edbd236f1970.json => query-044bbd6c7926890b642c906167307c7497d418325ac0f24468fb3d9bcc99f9c1.json} (85%) delete mode 100644 core/lib/dal/.sqlx/query-046590a310cc7bbfa421d0d8e20c3bdae18b88c4c223e374df9a997c271b091b.json delete mode 100644 core/lib/dal/.sqlx/query-05c2a77d9f65d435e2df63a300850e42abbaf365a1b041d0e7a809796ef0fe63.json create mode 100644 core/lib/dal/.sqlx/query-05e94c9609efb0e4e0c96f3ee7f57db0a54d476b78dc0e36e3ef94dcc17099ae.json create mode 100644 core/lib/dal/.sqlx/query-079da9dcd3f65b8fad7465a5cb5a6acecaaffde2e922fb384ecc96571bd9e786.json rename core/lib/dal/.sqlx/{query-0fbdf8da9a000c433c5475d57f6ad2574cd1310dff1d1bf06825d5634ba25f04.json => query-08cd0d21cc831cd54f55d6e02daddb6978a6c1e80bbaa5f8fded39a82f8e50e0.json} (57%) create mode 100644 core/lib/dal/.sqlx/query-0a55ee6934920b29262040064261f5dd0730d1a8e111892025f1c2688e338fbc.json delete mode 100644 core/lib/dal/.sqlx/query-0b5d5efeac95d429cf6a5be22153897edf8c868094ad029e2e8fcf286d44fd55.json rename core/lib/dal/.sqlx/{query-0fef49a649d20c9fd263c1dfa40daa9b94d398c635c37746736e98f1f18fcca7.json => query-0bd951ee87fe42893321894594cca22b17e75cb6778168d230d9ccd263caca23.json} (51%) create mode 100644 core/lib/dal/.sqlx/query-0c2be3c7bd278d24d3a155203067fb9102b175047588ec1cca515ff31ae131c3.json delete mode 100644 core/lib/dal/.sqlx/query-0d60eb7536b49716fa01a14b0be760b8368dd5532caa5fb8b4310a96d44d8530.json create mode 100644 core/lib/dal/.sqlx/query-0e9727e6537ef08e65b8868e7a22b3266e5e0140e6d04819be4a5997d193d1de.json delete mode 100644 core/lib/dal/.sqlx/query-0f381418ac79762b4573bf5b440b96b711e8667df7a3c87a5ddf062842a0da6c.json rename core/lib/dal/.sqlx/{query-4aeb7dcd79000540c03fb12c0608ab71005d70f13ed32172e47166f71b3aef80.json => query-0f4a7d7c5e737a1f232a2db675557ae62a53e1fa4834acc82c18e265867b69d9.json} (55%) create mode 100644 core/lib/dal/.sqlx/query-0fc5c017a21f1ed897d9856e7318e34818a86cbc50fb5a509f4072ca97db926c.json rename core/lib/dal/.sqlx/{query-3518a3e93da8115b54426d72aea0800383e6b73a8b48dc3e589a29a4367cbb5a.json => query-0feeb221b1d18eb2331c88696d1f3c13834347e2bf7a90d2113a2e0d623c6122.json} (65%) create mode 100644 core/lib/dal/.sqlx/query-105ea691e4022cf707db0707a42dc9216ee7df28e08c7eb4899c2e7df4078c50.json delete mode 100644 core/lib/dal/.sqlx/query-1074d0a2e4a4afb9a92f3822e133db7a71aca15698bafba051a8d9a91a4dbc76.json create mode 100644 core/lib/dal/.sqlx/query-11960ee50e5cb3a2f1e8150e1e6854f613c3267b983a031998856873740c9bff.json delete mode 100644 core/lib/dal/.sqlx/query-120970162104e0560784ee4b8fa44a0202265d741912125f7865e570411997d7.json create mode 100644 core/lib/dal/.sqlx/query-137702c69220666ec5c1c4dc0fd0f58093cdfe21871592876b9a2a73ec8c1b10.json create mode 100644 core/lib/dal/.sqlx/query-14cd4cad9c69985b59cb924339297d1fef3dc39e95d98dbdfe49c9121e58ecf2.json create mode 100644 core/lib/dal/.sqlx/query-1656c38e85e1f7e1164aec5d5ee78e96ac6f94edb2983a7e68a3d650a091da1a.json create mode 100644 core/lib/dal/.sqlx/query-1854e92462e839e741fdfef196f6b04cd475386497611ed5664a281c66917afc.json rename core/lib/dal/.sqlx/{query-37890022be6b5e893cf051266fa16618914d6dedb39a9a40d36484741e8b01f4.json => query-19188b9e92b0cc5660c851baccc6f9ce57c51198af167ec2b98944659ba0c53a.json} (66%) delete mode 100644 core/lib/dal/.sqlx/query-19314d74e94b610e2da6d728ca37ea964610e131d45f720f7a7b2a130fe9ed89.json create mode 100644 core/lib/dal/.sqlx/query-19a4025388ec9dd14de5f8d794b74e68843b551901c83dcf74901cc78e9bdb1c.json delete mode 100644 core/lib/dal/.sqlx/query-1bbfac481c402bcb3bb888b84146d922fa1fc9c202072fbc04cae1bbf97195aa.json delete mode 100644 core/lib/dal/.sqlx/query-1c14d2def60fa5ff91788ddb55e68cee71742b732112038a642e2a07305053c2.json delete mode 100644 core/lib/dal/.sqlx/query-1c994d418ada78586de829fc2d34d26e48e968c79834858c98b7a7f9dfc81910.json rename core/lib/dal/.sqlx/{query-6621de90a024cc85946f17948e5c171cd0e4d38bd6e9cfec58b2d7f53a3204e1.json => query-1dc66c13020087cc74c84bd731134129e2abdfa088c8089ec3765d771d130133.json} (73%) create mode 100644 core/lib/dal/.sqlx/query-1fba74c9aa8760adf71bd98b278ec7eefa0edd3cefd7eb6025c2c1456f2a6095.json delete mode 100644 core/lib/dal/.sqlx/query-2169cc7dfb074566ceb0bd5754d6e7a755c4bc6c25c7e6caff5fd6142813d349.json rename core/lib/dal/.sqlx/{query-6e3a3ef443ce8aab55b10eea55f9c8ff11775885aebaf457075c6825305244e5.json => query-2520d5065659546dcd50d4be8733af15a5a69d936e0b33000e3035cd1af92bf8.json} (96%) delete mode 100644 core/lib/dal/.sqlx/query-25ef41cbeb95d10e4051b822769518daf76a5f283e4298fd12022b0c3db07319.json delete mode 100644 core/lib/dal/.sqlx/query-26e0b7eb1871d94ddc98254fece6381a9c4165e2727542eaeef3bbedd13a4f20.json create mode 100644 core/lib/dal/.sqlx/query-27f58d66139d7fad29b2f31a4a1c836a8ffc0f71f082efca16d14ac0b897597d.json create mode 100644 core/lib/dal/.sqlx/query-281ccf6f99d9e3c5e9eb29de437aaf3a07530a8d8b6787e20ebafd344c01ba65.json delete mode 100644 core/lib/dal/.sqlx/query-293258ecb299be5f5e81696d14883f115cd97586bd795ee31f58fc14e56d58cb.json delete mode 100644 core/lib/dal/.sqlx/query-29a9350164fc0b2983f753e105a70e583b455383eec526eee3acfe6670e30f2f.json create mode 100644 core/lib/dal/.sqlx/query-2af4a147c9172bcb6dfcd1c9808bfcde52f6856c4aaacb55fd7250823368c4a1.json delete mode 100644 core/lib/dal/.sqlx/query-2b1aa207a058f66265acf2c21b8ed5d8007789c0fc1eab948f6d7339dfb69147.json create mode 100644 core/lib/dal/.sqlx/query-2bb702d1f3bb935fd0f447ffb6bfc5bccba61861c6f6a1e807d210b25c5af830.json delete mode 100644 core/lib/dal/.sqlx/query-2c71a819c6ed22a3ab79675840e00f7b1176d59a83520288f5428b67ebd52130.json delete mode 100644 core/lib/dal/.sqlx/query-2ffa321700ef1f70a1c3f516f3162af196d586cc08ea0f23d2c568527e94b41d.json delete mode 100644 core/lib/dal/.sqlx/query-307f15e00a97440868189f25e4487ed365c0369f94bc457cb162a5c876a123c7.json create mode 100644 core/lib/dal/.sqlx/query-3099a2329d130d003bc781f5dcd2db755007951ab826147a7d5d001f12b991c6.json rename core/lib/dal/.sqlx/{query-26bc9b315c4c57bcff1f46da956727233a36e018fe5c0651995b876053a6a054.json => query-30ccd33a8bf7ac28fe510e15e360be225db5f8165acf1d617d0c31e8c47bab33.json} (86%) delete mode 100644 core/lib/dal/.sqlx/query-311d0357c22163b893dc91f2b080f2ede5e22b0bbd8bc910cb36a91ed992bde1.json create mode 100644 core/lib/dal/.sqlx/query-3125669226682212fdc06c0145614be23e4bde145064157427e7c74e7facda30.json create mode 100644 core/lib/dal/.sqlx/query-335474e43a63dd08d362f5c7122b57ecda488eb062fcacbb59bd6d00b2c7703e.json delete mode 100644 core/lib/dal/.sqlx/query-33a78184559d0c0d13469fa799e2c5eeab06ff664141fa542229e7c9a46d4410.json rename core/lib/dal/.sqlx/{query-a71a87d91dcf0f624dbd64eb8828f65ff83204ebab2ea31847ae305a098823b0.json => query-340c154ee5969dbcdf87b1f268236a186c539fe34c9893c51018687ae0ca01b5.json} (70%) create mode 100644 core/lib/dal/.sqlx/query-346d2bc8ba252a17d5d0918e1b7ae976ea533143b0eb0644612e926624d710f0.json create mode 100644 core/lib/dal/.sqlx/query-369736a602fe2ebf7392ca171581d5b68fb9450d17372701907905bb74af844a.json rename core/lib/dal/.sqlx/{query-ada54322a28012b1b761f3631c4cd6ca26aa2fa565fcf208b6985f461c1868f2.json => query-37294ec4a7b7ac48ccaecaaf96166fc91f2969fd0f108d72debe703e95855298.json} (50%) rename core/lib/dal/.sqlx/{query-2d8da95804a7a300ff2b756e6785c0665ee3ea4086ddb91428fa1b6a00760737.json => query-375bfcf94a885ea91295da97a8a8f9db6cd67629c9d987f1ed7da6bdb341edfd.json} (90%) create mode 100644 core/lib/dal/.sqlx/query-380b3a40db65f66f502cc7e696254682bd852c4a54387f92b3f633b5a5899c93.json create mode 100644 core/lib/dal/.sqlx/query-39415f0debcf35d8cd85b04866861c816f583c69a64b7768887ecce434b829fd.json create mode 100644 core/lib/dal/.sqlx/query-3a6417f3ac8889a8db762d1f1820c1f7b0d68b747e3a75a63d60ccd0982c7fde.json delete mode 100644 core/lib/dal/.sqlx/query-3a82d9a45f4a90b8baf82f3e281618217af059a796e4a3cc0f5269709f7ffd49.json delete mode 100644 core/lib/dal/.sqlx/query-3b4d5009ec22f54cc7d305aa11d96ec397767a063dc21aa3add974cb9b070361.json rename core/lib/dal/.sqlx/{query-bfc84bcf0985446b337467dd1da709dbee508ad6d1cae43e477cf1bef8cb4aa9.json => query-3d19e75e0e224679c3f30e67a2a53ff4b3462b42ca731963eca0e46997527ae3.json} (75%) create mode 100644 core/lib/dal/.sqlx/query-3ea010bc3e3267e48decf025cb99b3253ea21b3eac3c1df1921e040e3f059aac.json delete mode 100644 core/lib/dal/.sqlx/query-3f0966f082e9e7cdfa18c107a1283b7955a058705093d7372726c3fc7ce506ad.json delete mode 100644 core/lib/dal/.sqlx/query-3f9543c622a3877dd8612f3fc5f31867b3c0bff34bbacbc31ff4cd786c97ca90.json create mode 100644 core/lib/dal/.sqlx/query-3fc77acab04760b40d49ffe42e616b8b569a196df3ebf75ee779665ec53d1187.json create mode 100644 core/lib/dal/.sqlx/query-404dca0439d8c2682848049026d6e4da6574f78094cbbc8eb27b9b273a96aa10.json delete mode 100644 core/lib/dal/.sqlx/query-414749a3d8d1ac4f2c66b386df47d113257cca7a7fc6c8036b61cc0e005099a8.json delete mode 100644 core/lib/dal/.sqlx/query-45372b701c23ce782695f11f846a75893ee5b1b94b6d0f25f1db5342888a2a30.json create mode 100644 core/lib/dal/.sqlx/query-466c76cff08259849d87d3596dad590df2d0633fb5e58f600fe5a87012bc998d.json create mode 100644 core/lib/dal/.sqlx/query-4694e5534f7d2a3b9a49d097ec659d96738d6bccaa175362cc554eddb3b26262.json delete mode 100644 core/lib/dal/.sqlx/query-469db79fcf8d692507317080e0d843620210aff3a9a7aa8a249db50c1c56d927.json delete mode 100644 core/lib/dal/.sqlx/query-482bee9b383b17bddf819b977a012e49a65da26212e6d676abffb9d137aa3c2e.json create mode 100644 core/lib/dal/.sqlx/query-4ae097f244938d39a735735f75b3b18a1bd18b922640d3ae70ae0b9bfde8effc.json create mode 100644 core/lib/dal/.sqlx/query-4c33e5cc065a4d92ae94e01eeda43895c9a3cf9e0c52bd65c5eace2445c2249f.json create mode 100644 core/lib/dal/.sqlx/query-4c80d74f23341a08320f50f2e923fb92c099f0b71ecfabd33325cfd107f2fecf.json create mode 100644 core/lib/dal/.sqlx/query-4ec3bdb8a51f9e9dae77e545c4d182ca8e746122e42f448a7f349a234e6ab594.json rename core/lib/dal/.sqlx/{query-0385576f1fb3836fc04a6cde3e92c03e1de8292eb0ea1e026ba1b32a3745c261.json => query-5019e70efb40d983d3e99922b7415a8b4cb42b579f4e968664b6210c6058bfb5.json} (55%) rename core/lib/dal/.sqlx/{query-5d341e334cbc2d38efc8a060325677d57040037da0e07cef2c7b7246851a3703.json => query-507ba20e231ea2cf8ac15cb5a6bc8f02328de7f12c5e83609a477feddbbdd754.json} (50%) delete mode 100644 core/lib/dal/.sqlx/query-532a80b0873871896dd318beba5ec427a099492905a1feee512dc43f39d10047.json delete mode 100644 core/lib/dal/.sqlx/query-546c729829083b7eba94fea742c162d717ffcf46fdf5d2ce5d32555353b6da6b.json create mode 100644 core/lib/dal/.sqlx/query-549a74361713f1ad79b03a680815b2356e58f12a7af7539f2b75eb318941db6d.json create mode 100644 core/lib/dal/.sqlx/query-54c96dc5e0a78551ba713814f944c3262d5cab17e8f76bdc6672459e0091b1d8.json create mode 100644 core/lib/dal/.sqlx/query-5545ceadc462969a4557b5bc5db373147984aa3931df33a50de2bb2ed4367d51.json delete mode 100644 core/lib/dal/.sqlx/query-55b0b4c569c0aaf9741afc85400ecd50a04799ffd36be0e17c56f47fcdbc8f60.json create mode 100644 core/lib/dal/.sqlx/query-55b90277afa79835a01107536cd16369609c69bf8fed67f6fb96859844ed29b1.json delete mode 100644 core/lib/dal/.sqlx/query-55f4585be3d0f1a147cb10f6e59325fad494a512ba92df95439d2d7fe0f3a285.json rename core/lib/dal/.sqlx/{query-f3a049c7eb0d8903737f02fa154b50ebc862a133734382bad8fdfa3a93d8b743.json => query-587a6fa944e122d4a045192f4f84ec30c53893af990a3158a7006904c7073b14.json} (91%) create mode 100644 core/lib/dal/.sqlx/query-5a20e458be6c6c90c1e6f9c2cfada959f3f2e5375d8f1687231f13d26a41cc68.json create mode 100644 core/lib/dal/.sqlx/query-5c65e8b97f2fa2fda703f85d6c56228315e7aeed1c6b6f3989e043d6f4fd5f70.json delete mode 100644 core/lib/dal/.sqlx/query-5c99342c4fbf36ccc8e9c9dafc76de37201091bfccd3caf922e766896c5a542b.json delete mode 100644 core/lib/dal/.sqlx/query-5d1f588b2b652105b4452be1cc6c7573fe040d47d17d9bd4e2a2b6d3131a4f9c.json create mode 100644 core/lib/dal/.sqlx/query-5d7fd6503caf4bf05d387e7214518890d009081b1c1cec8773e25c6621753372.json create mode 100644 core/lib/dal/.sqlx/query-5dc4ecdfac01e15e4d2fe7c124c3ee9ed6fd28c338ddadd9958f3bb0901ba454.json delete mode 100644 core/lib/dal/.sqlx/query-6292dc157e2b4c64c513b4b8f043ea4423fdaf5d03cb70e8c3a67b6d4a24d29e.json create mode 100644 core/lib/dal/.sqlx/query-662a3d53026e983fea3087099b8b9593ba6ff291db9868a1ad6df21440ef311a.json rename core/lib/dal/.sqlx/{query-2d1e0f2e043c193052c9cc20f9efeb5f094160627bc09db4bda2dda9a8c11c44.json => query-66e4b86d23a96174ef1edcee4da70bb5b8a0a5408ccd09465225f8bf3fee551a.json} (55%) delete mode 100644 core/lib/dal/.sqlx/query-67f6a13a4c5bd16f77e449b5f0bc0798441543244f83b691783127979e02dd8c.json rename core/lib/dal/.sqlx/{query-b42fc86726ac40d0ca38640884da192a143f6a7501b7da65bb7df40a0a4ead70.json => query-683973e92438d8a16dd0a4fe46e884aaa174ea8a577dcc97e84680f4fd650c37.json} (62%) delete mode 100644 core/lib/dal/.sqlx/query-6849be0788a509e4e68acc2da4bfadbcfc343374fad173df0cc8db38419a9726.json create mode 100644 core/lib/dal/.sqlx/query-68e5240ab8c75e68c13efad97a628321969b8c5bce89a83b74ee08f9e2dfcf9b.json delete mode 100644 core/lib/dal/.sqlx/query-69c885498b186f3b7cbb215112ec86783d7da0ec1d008680872f3619cf217923.json delete mode 100644 core/lib/dal/.sqlx/query-6b327df84d2b3b31d02db35fd5d91a8d67abcdb743a619ed0d1b9c16206a3c20.json delete mode 100644 core/lib/dal/.sqlx/query-6c0d03b1fbe6f47546bc34c6b2eab01cb2c55bf86d2c8c99abb1b7ca21cf75c0.json delete mode 100644 core/lib/dal/.sqlx/query-6c46fb3d51aeb069c09ff0cae3ea82f1af696fcc8f7484eaf255d5311589ee39.json create mode 100644 core/lib/dal/.sqlx/query-6f76da3d11930f44dc30884e6e3295a5f5d8ad9a1560d96bed1250c37ec9cb0e.json delete mode 100644 core/lib/dal/.sqlx/query-703836a3f065b0aedf71ad0474cac5e5fccb3ec55aa1227f5f1ea5a11f9b36a9.json rename core/lib/dal/.sqlx/{query-526a8e1c231e99faadd5dbbe9c49ed811faffcc108d04b59fdec5a0ab9d13fa3.json => query-7168f5cf14cfaa35962c5a25b00e2ed3cba01cf9a816e8eea972020d4be8ad5e.json} (75%) rename core/lib/dal/.sqlx/{query-25fb31277591dd7d5d783bd8777f1a855e76b37b6ed36ae612b551f9a6a55633.json => query-729e09e0029b12156689ebe01e082cec15b0c574fd94917e82238d1294831197.json} (74%) create mode 100644 core/lib/dal/.sqlx/query-73a08b7a9eeadfabe4bcafaf03d4c4a82d399ca1c4c6da36d2ab98a7537de7aa.json delete mode 100644 core/lib/dal/.sqlx/query-7560ba61643a8ec8eeefbe6034226313c255ce356a9a4e25c098484d3129c914.json delete mode 100644 core/lib/dal/.sqlx/query-77a43830ca31eac85a3c03d87696bf94a013e49bf50ce23f4de4968781df0796.json create mode 100644 core/lib/dal/.sqlx/query-788efaf2682ec81871738a943675217a1838cc7ea29b1f8fa394b62573884512.json delete mode 100644 core/lib/dal/.sqlx/query-7af52a220958d790bd8b5b06a6e29bf769829991c7d732b13f96bcd1293263ea.json create mode 100644 core/lib/dal/.sqlx/query-7dfd5e11546dc2b5ae02428e99e664b1106316347f0fc557afe7112d6fca7e3b.json create mode 100644 core/lib/dal/.sqlx/query-7fdc68c55f4860ce767a5e9d20d736ceef46d819394b7602218514b2e2a906eb.json create mode 100644 core/lib/dal/.sqlx/query-811143c3607b1a06d1c88084c43d4c2f5800c37ac0715f6ae351cafb8afbb76a.json create mode 100644 core/lib/dal/.sqlx/query-83cb057f275c71da641d9b727abcf7f4d16593b0ed0b496c903d967efe5bb6a6.json create mode 100644 core/lib/dal/.sqlx/query-892c0f4aaedfb447eee63fecbcb31f9138b204f4bcd15f934e5b209f3dac0639.json create mode 100644 core/lib/dal/.sqlx/query-8b103e7c6e2e0955b5bc283ceef3a203f640cb2279f3b75108c49b2527b19c8b.json delete mode 100644 core/lib/dal/.sqlx/query-8cc3cf441b12a8b6a2f25f4fe5581e33845ec68e386ef032715ad1222e2fdc8b.json create mode 100644 core/lib/dal/.sqlx/query-8e2b160a4d0de1573ecd486c91b8abd8d4e534e5c17e4ffbcf5c97ff920b12d6.json delete mode 100644 core/lib/dal/.sqlx/query-8f662682747a24fbe122533f421466f8a4efab1a52acc26f3a6c6b219a46390b.json create mode 100644 core/lib/dal/.sqlx/query-901b5259b9bfcb8469175a0a4ba9c7459db54dae9a2ea2db8595af4cb70c8aa9.json rename core/lib/dal/.sqlx/{query-5137159db7d3ff456e368e6246b07554ce738a2d7005472e7e76a64a8fbd57ad.json => query-90e69db5fce86f7735b550d0f60b0116e8dc7ad2cff1a746a4f3191ceadef0f5.json} (69%) rename core/lib/dal/.sqlx/{query-8b9e5d525c026de97c0a732b1adc8dc4bd57e32dfefe1017acba9a15fc14b895.json => query-9583c10504ec214bc15eac407a7e6de657d21422fd1d46b1fc0d3e829393146c.json} (77%) rename core/lib/dal/.sqlx/{query-13b09ea7749530884233add59dee9906a81580f252b2260bfdaa46a25f45d1cd.json => query-959e1b8231484611334d4441823ad49a080299632be9f41bc838d2e7416fce75.json} (89%) delete mode 100644 core/lib/dal/.sqlx/query-95ea0522a3eff6c0d2d0b1c58fd2767e112b95f4d103c27acd6f7ede108bd300.json rename core/lib/dal/.sqlx/{query-b61b2545ff82bc3e2a198b21546735c1dcccdd6c439827fc4c3ba57e8767076e.json => query-970fc9fe2ada8f862b8fe4dfd7cde5783f3df8ad73ef92b62bafc1a8b5e1046a.json} (57%) create mode 100644 core/lib/dal/.sqlx/query-9a261b451c31d010b1b2bc0af25d2bd038257f7cf2ab51405dc05ccba3e33312.json create mode 100644 core/lib/dal/.sqlx/query-9cebabf4e4643a41452266a9d7c4e8901b631ff170733621ce3ece216d71205b.json rename core/lib/dal/.sqlx/{query-66b3f476cf4487239190175d2940fd5e1330393d8b04c7cf03b8c7ab2edad5d1.json => query-9cf8419746f9b86749c36d0a0d443ec6c9383b5cac5112569a77caa00747288c.json} (51%) delete mode 100644 core/lib/dal/.sqlx/query-9cfcde703a48b110791d2ae1103c9317c01d6e35db3b07d0a31f436e7e3c7c40.json delete mode 100644 core/lib/dal/.sqlx/query-9de5acb3de1b96ff8eb62a6324e8e221a8ef9014458cc7f1dbc60c056a0768a0.json create mode 100644 core/lib/dal/.sqlx/query-a0fc795697398f22b45601f51a6d1910919b8b46e895ddaa4ba5bf411585dc6e.json create mode 100644 core/lib/dal/.sqlx/query-a12b2f1fdd28f68a429f307d66259a410844c0e3cb5e190d1b8442da802825ad.json create mode 100644 core/lib/dal/.sqlx/query-a22e5f63ee08ee38efcba440364c08e57f95c6ee5a69f02f15eb1e886df4c882.json delete mode 100644 core/lib/dal/.sqlx/query-a23d63b7c4264ee0f5b60c09f09f8fbd8fdaf23266412e2faffb7e3813213b98.json create mode 100644 core/lib/dal/.sqlx/query-a343c1ea8ad33350b21a820ba981719519938eccbea4a598d842bd75b9553880.json create mode 100644 core/lib/dal/.sqlx/query-a3b4d8e4487dbc898277645524b8ad91e8653d01981640d2d068c9564393f7b9.json delete mode 100644 core/lib/dal/.sqlx/query-a4fcd075b68467bb119e49e6b20a69138206dfeb41f3daff4a3eef1de0bed4e4.json delete mode 100644 core/lib/dal/.sqlx/query-a51b8f1eeb6ef6800619e7a5a91d10c23ab2924f6a3f0594f6990af8ea9146a6.json rename core/lib/dal/.sqlx/{query-acfd5a60fda5782bddb8cba033a5d3a0eed793f7b64ad3ed035f20e896371721.json => query-a57b02104ce2fe58a6c8f7e946bcb94486499a3d5b380948cb94e4b5066fea9a.json} (92%) delete mode 100644 core/lib/dal/.sqlx/query-a74d029f58801ec05d8d14a3b065d93e391600ab9da2e5fd4e8b139ab3d77583.json delete mode 100644 core/lib/dal/.sqlx/query-a8dad09a54cc991706141da557dde45f8f3f3b6cf2e4136f25a1c3ab85d92668.json delete mode 100644 core/lib/dal/.sqlx/query-aab0254e6bf2c109d97e84053cb08f1ce816a56308fb9fe581b8683f76cbbbc3.json delete mode 100644 core/lib/dal/.sqlx/query-ab68f07dc6f3ec66200df109527877866bbdd1f8c359d97538125756fd05a2ab.json rename core/lib/dal/.sqlx/{query-406e51d7884cdff36632ccf97912484f0a0d76a8097b61ead5f1f20301ce524d.json => query-abea8d1555215836299a2e640e8440e65af4ac1cbd81ae1bce16e74927ddfa7b.json} (61%) delete mode 100644 core/lib/dal/.sqlx/query-ae204503b0a682a9edc4d7bd7430457113e073b392c569c077d719941d1e37aa.json delete mode 100644 core/lib/dal/.sqlx/query-aeda34b1beadca72e3e600ea9ae63f436a4f16dbeb784d0d28be392ad96b1c49.json delete mode 100644 core/lib/dal/.sqlx/query-b313ab2b1e0a83136a202ea758c6d2b2e3f2497e6b5f26c72e220397cc0e62f7.json delete mode 100644 core/lib/dal/.sqlx/query-b452354c888bfc19b5f4012582061b86b1abd915739533f9982fea9d8e21b9e9.json delete mode 100644 core/lib/dal/.sqlx/query-b47a2961dc2f1347864682c572dd1f5e03924dbf6dd1e824d4aca837e604b7e9.json delete mode 100644 core/lib/dal/.sqlx/query-b4a0444897b60c7061363a48b2b5386a2fd53492f3df05545edbfb0ec0f059d2.json create mode 100644 core/lib/dal/.sqlx/query-b5cd80d579d87c610b16640166371a5609ca74432dcec3c169279bbbfce9fdae.json create mode 100644 core/lib/dal/.sqlx/query-b6ce3e762f37ab0d5b052f080715637fcf7f6c27d1238b17bc0f9bc50a0ffa7a.json create mode 100644 core/lib/dal/.sqlx/query-b73e874da2c1aa9de4fe700166458e579752dea7632e9422c2921a5d7e4d62ba.json delete mode 100644 core/lib/dal/.sqlx/query-b95b63f22afee3b186da4284a0a1cc9d3523a392fd2011491c6017400f313a16.json delete mode 100644 core/lib/dal/.sqlx/query-ba2343a38e37d104786f9276d91f67d2ef1428c61ae84003c9b52b03204d1f0a.json create mode 100644 core/lib/dal/.sqlx/query-ba978a517822c512a1a5bf9f9119d5cc099abb0e1ccac715094c46297aacb3f4.json rename core/lib/dal/.sqlx/{query-040eaa878c3473f5edc73b77e572b5ea100f59295cd693d14ee0d5ee089c7981.json => query-bb686779db0b9b0cb844702affbd5560139c2bc540cc7777da44c9585206382c.json} (63%) rename core/lib/dal/.sqlx/{query-a8d55f14de2f489fdc12c8da540e0d51f86d30d5ad92496e4aa087a3c4aae09f.json => query-bb728bbbf89d3996b7412043ead62a7c60e89631bfe95611f156dac532218ca5.json} (53%) delete mode 100644 core/lib/dal/.sqlx/query-bd51c9d93b103292f5acbdb266ba4b4e2af48907fa9321064ddb24ac02ab17cd.json create mode 100644 core/lib/dal/.sqlx/query-bd8a4057d6b0ece3298becbe143facec8c88629c4993f6c86a30193c7916fff6.json create mode 100644 core/lib/dal/.sqlx/query-bdd26a468254acd2ed54f17f37b4fdfd4e8aed4c63898af5b3c3d5ad2c6bec6c.json create mode 100644 core/lib/dal/.sqlx/query-bdf8b49f917e67009bb5f1d951575072106e943b76c17ef42a1138e291da86c6.json delete mode 100644 core/lib/dal/.sqlx/query-c139df45a977290d1c2c7987fb9c1d66aeaeb6e2d36fddcf96775f01716a8a74.json delete mode 100644 core/lib/dal/.sqlx/query-c14837e92dbb02f2fde7109f524432d865852afe0c60e11a2c1800d30599aa61.json rename core/lib/dal/.sqlx/{query-bf481c2b498420f80765b837059cab02b0656d863dbfce4b5dad7bc72e52b05d.json => query-c26690ee0bd897d83941300072c787f7a2aeb77058e409a57f8e62b8dd0b27ac.json} (63%) delete mode 100644 core/lib/dal/.sqlx/query-c29909fda6f1e4116a9a28407805a9a38a8d8ff1fba9a834d37927793f532b7d.json create mode 100644 core/lib/dal/.sqlx/query-c2eac2a7c10ee56245b688b88d077fde74782e8849e84a2b699fe855946f8905.json rename core/lib/dal/.sqlx/{query-1e3c88b41bc02cb6a116fa930ae85b8b60165ed757ae1044e83fdc877d95cbd8.json => query-c2ef57bcc2a2628618a6b292180e2188769ca8c52125e7739bb00e90eedc79af.json} (73%) create mode 100644 core/lib/dal/.sqlx/query-c37e5e7ee96c2136fbe9e0e56602cb9aa7c0305378d758dfe9bce80912e59255.json delete mode 100644 core/lib/dal/.sqlx/query-c3af06cc232adb93f16456da07733acd2066a5e238088b39b982b10770f51479.json delete mode 100644 core/lib/dal/.sqlx/query-c5aef75dbeb520c965a0996abed9713f437db492e2075ca69e11e2ef5728ccaa.json rename core/lib/dal/.sqlx/{query-3ddb13ffbafae2374527886e592b3c0210383d8698f6f84f694fece9fd59f3d5.json => query-c6902d8bcfb4d04e11229683cd4295d973d60b5a02c628bb0f38dd00f3396b3b.json} (63%) delete mode 100644 core/lib/dal/.sqlx/query-c6d523c6ae857022318350a2f210d7eaeeb4549ed59b58f8d984be2a22a80355.json create mode 100644 core/lib/dal/.sqlx/query-c767e485ef5a341faefe2c6c39a5668359e4b623876422cf6915d4888cdca31a.json delete mode 100644 core/lib/dal/.sqlx/query-c81438eae5e2482c57c54941780864174f39e6011fdfdc56490397ce90233055.json create mode 100644 core/lib/dal/.sqlx/query-c89076470d35115de7f5c68a5113f2f9edd3fb4e73b44d9fa2c2bb927acb99f0.json create mode 100644 core/lib/dal/.sqlx/query-c89cd551c59b54dd628c7e2339bc623866c3fd2e862c38c2af172c7c39620a49.json create mode 100644 core/lib/dal/.sqlx/query-c8d9aa5d11de37a35f421c0ff61825c64f43a819b9c787228b23814542f563d9.json create mode 100644 core/lib/dal/.sqlx/query-c95612615946c403890e8a942e174a5ade5c1a472c4e5c9f5e9050e4136273b6.json delete mode 100644 core/lib/dal/.sqlx/query-c98f19505792a4085bb5ddddb6d0e202da24ac3ca205154417e98ccfa7437379.json rename core/lib/dal/.sqlx/{query-eab36591af61369e36e3dab79025ac6758a0a4e367f93a9bd48ec82c51e09755.json => query-ca497322d6d5d80e8958a01f74fb8b424b2152a99a3cdff452218b6bb7f12840.json} (71%) create mode 100644 core/lib/dal/.sqlx/query-cd882b7e8a8d76ed1438097b246d455f4043c60538687dec050c5b578d505ef8.json delete mode 100644 core/lib/dal/.sqlx/query-ce0b54e6f5a805144ace2f0f9fba6b3e9bca996fa633005bc8eeb77341c8c893.json create mode 100644 core/lib/dal/.sqlx/query-ced682e16c616d26674c104caffbeea37512f1c5855579bdbb4cd8ba6d9977c3.json create mode 100644 core/lib/dal/.sqlx/query-cf5e1c6912b432eeb9b9779bfc3700f9ae2a6e5a917b1a21f290d313d9d88dba.json delete mode 100644 core/lib/dal/.sqlx/query-cf8cff1e6d277088519ef7dfbdb1885d320c146cd8fad77c107ef12fa38e6c98.json rename core/lib/dal/.sqlx/{query-718d29517c100ad9d258a7ee90c48449c1c4bed4d0236fcedc177c9478e72262.json => query-d2b3332be1c559226a1782031cd289bd8a6a70e23feb489cebb14ba906865898.json} (81%) delete mode 100644 core/lib/dal/.sqlx/query-d3abe74360732659a1a35a176679411ba30ac67080552279d821d66b1b804db3.json delete mode 100644 core/lib/dal/.sqlx/query-d3b09cbcddf6238b358d32d57678242aad3e9a47400f6d6837a35f4c54a216b9.json delete mode 100644 core/lib/dal/.sqlx/query-d3e4ee6677ce9de438abf7529aaf64c789d3a8a1d6c96c58213c23a055cde751.json rename core/lib/dal/.sqlx/{query-2e5b9ae1b81b0abfe7a962c93b3119a0a60dc9804175b2baf8b45939c74bd583.json => query-d4ae7c8a220920ef6a2d34d34b6966c69a183624bd5c982a36756ac57c4b49ba.json} (68%) create mode 100644 core/lib/dal/.sqlx/query-d4da5af7b848e3354b66bbc7ed5e5da19947002e66110573e6fad9105f07413a.json create mode 100644 core/lib/dal/.sqlx/query-d7e5ff78b2bc2e12fa5b17e6b555cadeff54160c1cc0b6b4fddecf090ebb30f1.json create mode 100644 core/lib/dal/.sqlx/query-d8a41829e3836ea05802ac7257f5dbc6f5ed92bc3d47b4dd91116dd6ec354d50.json create mode 100644 core/lib/dal/.sqlx/query-d92d99b940e439fa8942e1e8a4a98c18f29d3bebb42b0ae3fe7757eeea9ee175.json create mode 100644 core/lib/dal/.sqlx/query-da08c899a7c5243cfcda7fbbcd34675993ca0c7b2fb1d2be386101b78a995110.json delete mode 100644 core/lib/dal/.sqlx/query-daa330d43f150824f2195cdbfb96862d6ad0de7c7ca1d5320800f317428f07e1.json delete mode 100644 core/lib/dal/.sqlx/query-dac29d7eb16782713acb7aa68aaa8b12b67678e983dc2570be28fe9b1e016c28.json rename core/lib/dal/.sqlx/{query-45a968c6d667b13bbe9d895e7734fc05eaa158a6f38a87187d7f2c2068a0112a.json => query-dae7b7ab08a3397a4e587ebe40e79903fb3c9eaed968af5638a6f94bae2e7bb3.json} (81%) create mode 100644 core/lib/dal/.sqlx/query-dd0803aa12873b541ee88f3609d0b04a045f37cb9217ed0b17a78f9949f3d7ed.json create mode 100644 core/lib/dal/.sqlx/query-df8bfa2f1691f1c1aa683fa2821c1b0b2dd97b590d546c3c03dc1a97144a57ec.json rename core/lib/dal/.sqlx/{query-9f29aa31d4698031e9f3fe2eb273724dcce382936af0d4c386143399995cd325.json => query-e0aa620216ab8b1b209bc2b1079198deaa1ee92c9c7d608199673a8ed5558a17.json} (56%) create mode 100644 core/lib/dal/.sqlx/query-e210f3652790e82cc1f69a017dea683c2092560f59c8a6703d4ccc1715872ba9.json delete mode 100644 core/lib/dal/.sqlx/query-e3f4af790fca9149f4edff070170294ec464d184ad732692faa61d2ef99c84e9.json rename core/lib/dal/.sqlx/{query-82ed556807bcd7dd5872c220b3399f9b8679d770b3d1ca755c42ee264342da03.json => query-e496794ed5fb282a64d8bd84f8a227bae6207b1a5ac294b2d84b6f69ddb14fa9.json} (81%) delete mode 100644 core/lib/dal/.sqlx/query-e673789d5b4a7aae11feccb085bf3f9dd37b771cf76261762ae18fd14cf0efc5.json delete mode 100644 core/lib/dal/.sqlx/query-e7d0b7c132b80195dae7cbf50355eb148aa6d1dbd69bf3fe48522101a6ea0bcb.json create mode 100644 core/lib/dal/.sqlx/query-e7f05f081e989f104d0352b0ad0668929ceaaa66536248f4a0fc062e50d0d80c.json rename core/lib/dal/.sqlx/{query-e1e8ab0cb11c6081d3525228eacbad74e1bab808c744fa14bf24332b39120767.json => query-e8058944c2b1650ba831865aa62d1450fb1cb5219bcf68b920cf42c23628bd58.json} (50%) delete mode 100644 core/lib/dal/.sqlx/query-ea682d41219feda3514336f4c1ae6ecbe96475e83dfed603bd305e72460f52c2.json delete mode 100644 core/lib/dal/.sqlx/query-ea904aa930d602d33b6fbc1bf1178a8a0ec739f4ddec8ffeb3a87253aeb18d30.json delete mode 100644 core/lib/dal/.sqlx/query-ead71ae66fe4685132c03a973612fe98364aa684180dd6fbf540bb0b68d96a64.json create mode 100644 core/lib/dal/.sqlx/query-ed39fb08c3ae2927c940d129ffd89268465b346af5da1a58cac850b687e5eb34.json create mode 100644 core/lib/dal/.sqlx/query-ededd1048db5b1696c42f8f7073ab318006e8b52570a72a89682435a92ca75f8.json rename core/lib/dal/.sqlx/{query-2cba440c2925631655a7f67486a5a8869da8f10738ba77e3d8e048057b0e7b12.json => query-ee4f40c9924b607226e60279e0c89d4ab965ab3e45badaf607af8e8787b5a8cb.json} (91%) delete mode 100644 core/lib/dal/.sqlx/query-f012d0922265269746396dac8f25ff66f2c3b2b83d45360818a8782e56aa3d66.json delete mode 100644 core/lib/dal/.sqlx/query-f2f852a340c45ff69cbca42d7c592dfb0d28a797bee69872634f3105d2d51996.json delete mode 100644 core/lib/dal/.sqlx/query-f3c651a3ecd2aefabef802f32c18779128de288484abea33d338c3304dd66e08.json create mode 100644 core/lib/dal/.sqlx/query-f4761be1ff382f2d9bbafc971bf6109696737ae42ee1ee38e99ac07564816b5a.json rename core/lib/dal/.sqlx/{query-30e5c8710b1611872da06b72ac681aff512b3a9b2587b8e59848345c07dd8f3b.json => query-f56a7eb6a82875d5151ec2c1b320328e19bed529d4bd71ca5bc7df0de1a0a463.json} (66%) create mode 100644 core/lib/dal/.sqlx/query-f6e3b19a18b5ee75805418563b9fd7144b05f75aa304bf217cf14b9625a09e64.json rename core/lib/dal/.sqlx/{query-3490fe0b778a03c73111bf8cbf426b0b3185a231bbf0b8b132a1a95bc157e827.json => query-f773adbbc1587e69fa8665806fde81314e65b27790b9946a58c95f2fbe6fb664.json} (83%) create mode 100644 core/lib/dal/.sqlx/query-fd4f2f6dbd0e2ab56faa91ff3ebbd48e2dc3cce5f3f40cea31eb3b27c6bff1c1.json create mode 100644 core/lib/dal/.sqlx/query-fdbf99a779c7c894bd5ab6ac142f01c2abe41c456d85787038ad0b3cc21b59f8.json delete mode 100644 core/lib/dal/.sqlx/query-fdffa5841554286a924b217b5885d9ec9b3f628c3a4cf5e10580ea6e5e3a2429.json rename core/lib/dal/.sqlx/{query-40c17194a2089a7d3fa6b7923c9e03def94f4bf4674def1893e2232be80f57a0.json => query-ff38c42f0dc6fd3b3976a3b36f41c10b9ae1a80fe6b6a9bb50ee4bfe849f398d.json} (64%) delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-00b88ec7fcf40bb18e0018b7c76f6e1df560ab1e8935564355236e90b6147d2f.json create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-08a97610cfe85ab84df2f2ca3ab7619d79075a2177b8f9b464565474b43afc21.json create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-0b3dcc054233e1269e067741394c252e5c82673e1595829b4b9f897b7df61e6a.json delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-0b70c98c2edd8370ad09ac553c18dbc21cccb9a95e3db1c93da239845a5e9036.json create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-0c047f4e856486d039a21a5622652e0e45816db6ebc2c16a09350b99d87d5f27.json rename prover/crates/lib/prover_dal/.sqlx/{query-3a9ffd4d88f2cfac22835aac2512e61157bf58aec70903623afc9da24d46a336.json => query-0cc53f605989b99ad612d9a5353636ca3032cd5dcc5d3d1d4d5d0a16c38c20ef.json} (67%) rename prover/crates/lib/prover_dal/.sqlx/{query-7effbacbdcc4bd762386351755f4f32042dfead8a37401558f5fd3b03480f2dd.json => query-0d434d0e100bbcfaf56fdb598f9d1c5fa2958f06898a8c67079a7ccf0c340df2.json} (64%) create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-0f42168a211b64df8f78031341e473766ab4f51dd399c879b4f7c3bc157ab77e.json delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-102b79726652d9150c802350bdca80c233a9fd3e892b5a867a5517c2e04497a8.json create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-10b5ee91c7995390603c2c9a253151b3f9a2285724c9dc1a044762f7ce6f8bb7.json delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-16548daf69e9ff0528904be2e142254a457665179d9cf0a3c0b18c3fe09e4838.json delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-1849cfa3167eed2809e7724a63198f5e2450cc4faee2f80b37fbd5626324dbeb.json rename prover/crates/lib/prover_dal/.sqlx/{query-39f60c638d445c5dbf23e01fd89a468057599be1e6c6c96a947c33df53a68224.json => query-1902180f79ffb2f9903e16752d0a4dab579b76ea65ea022505a3f57fc0a4a946.json} (67%) delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-1926cf432237684de2383179a6d0d001cdf5bc7ba988b742571ec90a938434e3.json create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-1dc6a926ada3f13ab6c2a6f3cc16054d3fb4f4a5c014ef24f5cb0ac4cd3465eb.json delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-216d0c263539739b53975a96a10332b826708800a2f72f09bd7aea08cf724e1a.json create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-23fab2481b7e7a30d4f8299e267431e3e266c84e1ef03cf4015202dbb9f54174.json create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-23fd65c2640e9fabaa625da83da09c2c60fd2b91d376b924ec0089a721a2a640.json create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-25f599ed134f5866dace386fc34d1b98aa902e56d35f55c0d7e2a983ce1bdd80.json create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-2764de4edfb998bb498127b072574aac9fa17a424d1f5c673e78a2a023bc2205.json delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-28397b5a0b7af832d2a4d3d7011a68a48db6a64afcd41bbe0e17d98fa38fdb19.json rename prover/crates/lib/prover_dal/.sqlx/{query-97adb49780c9edde6a3cfda09dadbd694e1781e013247d090a280a1f894de464.json => query-29f7a564a8373f7e44840e8e9e7d0cd5c6b1122c35d7ffdbbba30327ca3fb5a8.json} (53%) create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-2b9d06b673ac6bbc908227eff0ff19ec63114a652fdebce5a872a8eb694626fe.json delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-2df88abaae97b6f916b104375bd7249ec09c0daf4368021788207370213a6d94.json delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-2e6e2b68efc28114f44616b68fcf1d4d9a4b83a8b42846d8373ea13b96d612cf.json rename prover/crates/lib/prover_dal/.sqlx/{query-3bb8fbd9e83703887e0a3c196031b931c0d8dbc6835dfac20107ea7412ce9fbb.json => query-34dfb800784c52812cdeb5ecbf08bea9465ef0f5732df44d1d50f792d5a4aef5.json} (64%) create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-36ab4be452fab7229a4b1c03675ec0b54094da72d2d9de5e3948001164bf739c.json create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-37030583321ef93fed35f88576639c62de28c585158497d9d1984fdc762f1440.json delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-3941da180ee62a7c5d4e392ff4fe2d3a6ebb3657862b91e3ece34119f098fc2d.json create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-3df3c567f7f875cde9ea8c723b1fe6ee0c0c54e68daabbe2eab5c7ce9b1cd4bc.json delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-3e0a1ebc684810c09ff83784bdd0ad195b0dd2a8ce56b1a9eb531103130b5e3e.json delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-3ec365c5c81f4678a905ae5bbd48b87ead36f593488437c6f67da629ca81e4fa.json create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-3fc24886802a354174796071f46aa0a0ad5fba0f6dbc4d8f36c79171a8be8f42.json create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-40e3b4646af1abe9c7b56206d73091e0d7c5ada67cb757b874a5c62e32184666.json delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-412ef600a2f6025d8c22c2df8a497ed410fa47b268a66f1fc56d469c06ae50af.json delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-41af30620f8a1f20b8a6c46be162601d35fd2881ac1fd070f0f1a8add4bc388d.json delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-434f7cb51a7d22948cd26e962679a67936d572f8046d3a1c7a4f100ff209d81d.json rename prover/crates/lib/prover_dal/.sqlx/{query-28f03acf565c4b50fe86f606c18a8b699386b3c5b4e02d5ce046f0f2e0ddc388.json => query-459705905af1c2928704ffb5dbc07d91e2cbbcb7ce02bfa14913d76cb946a57e.json} (59%) delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-46c4696fff5a4b8cc5cb46b05645da82065836fe17687ffad04126a6a8b2b27c.json rename prover/crates/lib/prover_dal/.sqlx/{query-c19fc4c8e4b3a3ef4f9c0f4c22ed68c598eada8e60938a8e4b5cd32b53f5a574.json => query-4836d3766c6d31566a66ffb2b81874ec8fc1800b848951cf264b3f309701c52f.json} (51%) create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-4931bdce191a7d30d2887bb069b0ee050f09ae3886243c9af0677ad20e115a01.json rename prover/crates/lib/prover_dal/.sqlx/{query-0a1ec4690d6b4a67d6ad16badcbf113a19feb73c4cf9876855523499998b99c0.json => query-4e851913270d32a72ebf654b8b7ba420c278e5771858d9de8d08a23e1fda97f5.json} (56%) rename prover/crates/lib/prover_dal/.sqlx/{query-2dc6b7bf08cced8791354fc47e319d03f894f40d2ec528382b5643c3d51ec8e7.json => query-4e8ddaf3e4411bfcef4f353b4b310fc6b60b9a522b1a3134752c2ccca06f08cd.json} (53%) create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-51ec4739f25b233efe6c2d67620b25b709ba99059f4a2f5e1bc5fd17f27c1244.json rename prover/crates/lib/prover_dal/.sqlx/{query-d272c91f1209c277189a31c59ee191a43dc8eafc33ee067bd41e20f25f7625f0.json => query-5207488b5e71395b700fb0f0ba8117729a81f999c81701c148a4d85f413f6e30.json} (63%) delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-534822a226068cde83ad8c30b569a8f447824a5ab466bb6eea1710e8aeaa2c56.json create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-53f99a67b05cc8f1150d5cff4731d22f984d4b063eeb9e92726a2afd86555277.json create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-57ac943c57d905575f5dcc9d94031c32226a54cd980aa99a38289452fbb100d4.json create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-5a782ff686ca6b194013af509c1c0094aba5c7966739d2d56ac74ed28ceb715f.json rename prover/crates/lib/prover_dal/.sqlx/{query-0eac6f7b2d799059328584029b437891598dc79b5ed11258b2c90c3f282929ad.json => query-5cf5d667206438d3fcf478a6c79940d96210c6e7f1dc2f249741e45385e30e61.json} (71%) delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-5db868e03dc6901a0afa06f82a37a1a04821495487a80595cc9b523dac6ac8e9.json create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-5fe7345162c22fab6b2bb13e29d701950441fcbf9784a6634ce020262e170951.json rename prover/crates/lib/prover_dal/.sqlx/{query-eef1b56e87eff63fcf6ffb98791583a7526ae38ceb4bf80543cfd3fb60492fb9.json => query-6476cda32a4c54a5f68a73f9b02b7af8475cef49d0dc34c3d6ac79e1032f2a94.json} (57%) delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-67f5f3a015dc478f02f4f701c90d0fc9ac9a7f3dce2ba48c2d0e6f38b6ba455a.json create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-6a77f68e7c3fa1d3bbf2fd6195e1810d85803da953bd7d5c46b34619e05374ed.json create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-6de8db565e0604ca30cdf78d3d792dd0bec10a53fa6d9052f9aeeeed8080d304.json rename prover/crates/lib/prover_dal/.sqlx/{query-63cf7038e6c48af8ed9afc7d6ea07edd87cb16a79c13e7d4291d99736e51d3b9.json => query-6ff1dea12f696274a62338cb8b5928e90167f2051e1c9b3a4d63e11f3273cc7a.json} (66%) create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-786246e83babf9c07589f6dc61ead2ccc0aeaaecbb8989eb738a01ea253a237b.json delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-7a2145e2234a7896031bbc1ce82715e903f3b399886c2c73e838bd924fed6776.json rename prover/crates/lib/prover_dal/.sqlx/{query-2b12c5d469e6220cc8ddc997c666e4aa4f797bcc6e05ec2f2e435a7e940d8cf9.json => query-7ae81e77402f0ce3d1fabc9884cd2723def558800cb1d56840886199c584294c.json} (50%) create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-7bae6a889d785dc526970cf022fba7f33558aa20961f475823e0216873a9e8a4.json delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-7d20c0bf35625185c1f6c675aa8fcddbb47c5e9965443f118f8edd7d562734a2.json rename prover/crates/lib/prover_dal/.sqlx/{query-caff620ae66d7fbe3caff7505173b6da86d1e693be03936730c340121167341f.json => query-7e19bfe8f29b4c5921c7f3b24fdafb2d59c01a15172b2accc0cddc4e8326a792.json} (57%) delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-8357972a21b39644e4cbe4bedc3b6d9065bf4494daf8f7632ab2bfe055773f7b.json rename prover/crates/lib/prover_dal/.sqlx/{query-f99c34313e2717ec74b4f274e33dae905acac53b46eeaeb059d23e48a71df3b4.json => query-863d1a8ddd28472dae2835032f8244a1e3248c7c0ce034ff41ba2070200195ad.json} (51%) delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-8720d411e0c9640afd61e927a89c0b6c018e6a4d279acd24a4ea7d81b5cc5123.json delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-87a73aa95a85efeb065428f9e56e085ea80cf93c2fd66fd3949aab428bbdc560.json delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-89a25708d0b0a15e1e56ee8fd69f5a15d2fc5ad3e5ce738a2f6ee3eecfc96736.json rename prover/crates/lib/prover_dal/.sqlx/{query-ce5779092feb8a3d3e2c5e395783e67f08f2ead5f55bfb6594e50346bf9cf2ef.json => query-8abfb4b84de35e8e336d59389ca978649e228eecbbbf959a1e3b87c08faa60de.json} (64%) create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-8bbe4a8fd46bee5ead5324029c9b7b5831361599874fc223dd389fcc3f9efee7.json delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-8bcad2be3dd29e36ea731417b68023678f31a1b7f5ee33b643dd551c40e88329.json delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-93b9706aa8eb840d574d7c156cc866e8f67a380302762c272bfb27307682d62e.json create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-96c76bcbd40328c21c9d2795e48e2a39dd892793175e3d943487875367d220e6.json create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-97c0634523806fa77776dc5dc296d119cc0df302fa2288d37741138cb4592156.json delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-9895b2ded08be3e81a5357decf76b4d3d6a762761e45af2a73fe96da804e627e.json delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-9b713312b539b4eefa58346f0070767a2cd4488e670674cd9149f7a332c0198d.json rename prover/crates/lib/prover_dal/.sqlx/{query-29ff260b02f7b955f9fe0b657b87def3a97275b66ad33d214054dc9048ddf584.json => query-9cf70c7776934252d45cb23eec5c023375273c2211dab39e1f28d51724b7d8ad.json} (75%) rename prover/crates/lib/prover_dal/.sqlx/{query-ec04b89218111a5dc8d5ade506ac3465e2211ef3013386feb12d4cc04e0eade9.json => query-a03c230ca6542578f5b8bc8c9de90aa5270bbe4e14e7608eb7f86f25b3337dfc.json} (57%) create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-a089a2359b1ed513d20f02f395f10648e2870c18716c6cf30dbf3a704c137776.json create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-a2d3dd0dc61bcaeff337498d1803ced4deef9ea2f9699e8e173d5d2343f26cc3.json delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-aabcfa9005b8e1d84cfa083a47a700302981be0afef31a8864613484f8521f9e.json create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-ab0c9b013d044a5f75b9f396ac1426777a8a76f02f528348bfe81f19ba5ebaa3.json delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-abc93d27a8673b23e18d050e84c43c868c63c853edb5c4f41e48a3cc6378eca9.json rename prover/crates/lib/prover_dal/.sqlx/{query-b25c66b9705b3f2fb8a3492f1bd20222e177262292241bd8cb89dbb9c1e74c2d.json => query-aed6242f090b249a03a3d8c1d801cef7a213d52ec4d393e1e2f3a40aa9e1d7e9.json} (52%) create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-b41dc55dcb9789e8c2907f53e11bd791fce9a86b6cadb2c8a2b2834bbe71fbd4.json create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-b4687c54ac45145bc6a27162949fa244d5b3c2ae22b4850c9a536e4d54ce38d3.json delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-b4794e6a0c2366d5d95ab373c310103263af3ff5cb6c9dc5df59d3cd2a5e56b4.json delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-b568f9cb9c2bd53b5dcde15f368a9dc31c7d51476f18cffa80cad653298ad252.json create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-b6835c57f5468a65731b7ddbd25cb86bd28dbda3ee3444f300da9f7d25930cae.json create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-b6db24ad38dcc89646fdf50b51c61698aeed3f3de0994908fd7a655ff465f250.json create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-ba29cedd1fd713745a016c391f3ad70e48d1171fbdc1c929e1d004e73805d4e9.json create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-bbced31c8d9ec17dd994c7de71b9e36eb532235d016c31ae8d86455506dd7a80.json create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-bc0b9c8d1bc2e1c782bd1fb8df16682c19f3f44dd424c81e0f8e94c59f4a8780.json create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-bc9ddab523f9a35809cfded7b18a13c70062609adca4c60274ba19cde990727c.json delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-bcc5d3d35652f49b41d4ee673b171570fc88c17822bebd5b92e3b2f726d9af3a.json delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-bf06bd08d8ccf67fc00bbc364715263556f258565f79cbb40f5ecc1a4f6402f5.json create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-bfbc5a8bc212991873fbf722b6f3c0c5544cb14cc06baa46cd7ecc329bba7b49.json rename prover/crates/lib/prover_dal/.sqlx/{query-548414f8148740c991c345e5fd46ea738d209eb07e7a6bcbdb33e25b3347a08c.json => query-c0effa8e455c1a09c205994e58569f22d450a0fb0f10eb391b058f650d99ef71.json} (51%) delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-c340c043c938bf5f4b63d57a1654775c6f7414c7bed75d33b61de00fdbabc349.json rename prover/crates/lib/prover_dal/.sqlx/{query-764693ceeb45f8478a20242b592d419667f11d80036cda021ecbf23b0b5f7f42.json => query-c5ddcf14f794c0b329efc7802c201f40b839fecf8c4388ec0c0089b1548fef08.json} (54%) delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-c706a49ff54f6b424e24d061fe7ac429aac3c030f7e226a1264243d8cdae038d.json create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-ca219864909a8b41ea5d4438235d24b3f001a2d4ea0da817e69f3816d43ce73b.json create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-cc686271a43d1ba657630e1eb702f85ac05423fdcd31c7e27c42cfd2e85b6cb1.json delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-d0be28042b50199075cb0eca26f6b93bfd5d96fdc68732fe38c79ccd44b84def.json rename prover/crates/lib/prover_dal/.sqlx/{query-75c1affbca0901edd5d0e2f12ef4d935674a5aff2f34421d753b4d1a9dea5b12.json => query-d21a3d43542ffbd22d6b55c5787b86ce94a1379a01ec3ebb41aa9a210d589d08.json} (51%) delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-d4949debfe0dc5112204cd196c68b02c44b099e27e3c45c5c810cd5fcd8884ed.json delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-d91c931e2a14cf1183a608d041fc6fadb8e12a9218399d189b4d95e2ca4fcc48.json delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-db3e74f0e83ffbf84a6d61e560f2060fbea775dc185f639139fbfd23e4d5f3c6.json create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-dcd3fdf29bb629a4398df652b016b80c122699e003028b14a0530e2fba5f5b23.json create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-deb56a8ff986f469a19db676be79ad7df6c6b0e29981439d94dc081d4fad3cba.json create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-e068fc601d0e579f1ada02665aa4e83cc39c941282257e0c9a488bcb52f63dd2.json create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-e09cff7ded7376ab0cec94e05e24f3fe0a8d05c55536b230594c1e1f17e0d9d8.json create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-e2e7991f27b4d58911cb7c6daa568f529dce53a9e2b37adf73c88e3dd64d461a.json delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-e495b78add1c942d89d806e228093a4eb2ee0284aa89bca1ba958f470a2d6254.json delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-e743af4c18ec91eb46db5a19556fba74ec2cfc3c89c7e4e2ea475c3ce4092849.json delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-e8066db420e075306235f728d57567878f347bdaf36294e9b24ee9c0aa1e861b.json rename prover/crates/lib/prover_dal/.sqlx/{query-929419ad8dcc70e8ce986f17075cd21d4645563f93afd4428734196c2b212276.json => query-e8db5d17dd2218bb34777ecf406fa78c1118063b2a1cda34bb49e9365219c32d.json} (74%) delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-eb2a85cb60c680a71203769db7baf89bbd72934e1405e320e746158e6d395d96.json delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-edc61e1285bf6d3837acc67af4f15aaade450980719933089824eb8c494d64a4.json rename prover/crates/lib/prover_dal/.sqlx/{query-d5bb897092bce2788fe02f31c9de6dde4142e09330557cc627fee2db278ace50.json => query-f49e345ad92e35acd40bcd097f77861eea20a381f6451ca82b4f1319364f77a9.json} (50%) rename prover/crates/lib/prover_dal/.sqlx/{query-2095e5646c382ccbc6e3bafdeddaae31358088e142dff51c9f0bde8f386900d3.json => query-f907bd746d0d085e4612c01b7a90d5c40935ed7b37013c9c608bfdcffd9611d8.json} (65%) delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-fcddeb96dcd1611dedb2091c1be304e8a35fd65bf37e976b7106f57c57e70b9b.json diff --git a/core/lib/dal/.sqlx/query-00220170d8f9e577321a0522337a7db7673811ac181e801a16a7aefc984d60b0.json b/core/lib/dal/.sqlx/query-00220170d8f9e577321a0522337a7db7673811ac181e801a16a7aefc984d60b0.json deleted file mode 100644 index 7676cdc25018..000000000000 --- a/core/lib/dal/.sqlx/query-00220170d8f9e577321a0522337a7db7673811ac181e801a16a7aefc984d60b0.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE l1_batches\n SET\n protocol_version = $1\n WHERE\n number BETWEEN $2 AND $3\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int4", - "Int8", - "Int8" - ] - }, - "nullable": [] - }, - "hash": "00220170d8f9e577321a0522337a7db7673811ac181e801a16a7aefc984d60b0" -} diff --git a/core/lib/dal/.sqlx/query-00c0389f4cde049078885cdf05bdb7dbe0bb23c4fc87a78be2d01b77da2ecbd3.json b/core/lib/dal/.sqlx/query-00c0389f4cde049078885cdf05bdb7dbe0bb23c4fc87a78be2d01b77da2ecbd3.json deleted file mode 100644 index d83713192cb4..000000000000 --- a/core/lib/dal/.sqlx/query-00c0389f4cde049078885cdf05bdb7dbe0bb23c4fc87a78be2d01b77da2ecbd3.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n WITH\n available_batches AS (\n SELECT\n MAX(number) AS \"last_batch\"\n FROM\n l1_batches\n ),\n processed_batches AS (\n SELECT\n COALESCE(MAX(l1_batch_number), $1) + $2 AS \"last_ready_batch\"\n FROM\n vm_runner_protective_reads\n WHERE\n time_taken IS NOT NULL\n )\n SELECT\n LEAST(last_batch, last_ready_batch) AS \"last_ready_batch!\"\n FROM\n available_batches\n FULL JOIN processed_batches ON TRUE\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "last_ready_batch!", - "type_info": "Int8" - } - ], - "parameters": { - "Left": [ - "Int8", - "Int8" - ] - }, - "nullable": [ - true - ] - }, - "hash": "00c0389f4cde049078885cdf05bdb7dbe0bb23c4fc87a78be2d01b77da2ecbd3" -} diff --git a/core/lib/dal/.sqlx/query-f4e7e2dd109aab2714845b028eba780c75468aa36615bcfcf7f7d8ace23cd1aa.json b/core/lib/dal/.sqlx/query-02494e0846398040749aa89c7051a23ccc0a18b0a4c8ee281f5f0ad131d25b33.json similarity index 82% rename from core/lib/dal/.sqlx/query-f4e7e2dd109aab2714845b028eba780c75468aa36615bcfcf7f7d8ace23cd1aa.json rename to core/lib/dal/.sqlx/query-02494e0846398040749aa89c7051a23ccc0a18b0a4c8ee281f5f0ad131d25b33.json index a8e5dbf66d5e..3a0d1f28d082 100644 --- a/core/lib/dal/.sqlx/query-f4e7e2dd109aab2714845b028eba780c75468aa36615bcfcf7f7d8ace23cd1aa.json +++ b/core/lib/dal/.sqlx/query-02494e0846398040749aa89c7051a23ccc0a18b0a4c8ee281f5f0ad131d25b33.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT\n PG_LAST_WAL_RECEIVE_LSN() = PG_LAST_WAL_REPLAY_LSN() AS synced,\n EXTRACT(\n SECONDS\n FROM\n NOW() - PG_LAST_XACT_REPLAY_TIMESTAMP()\n )::INT AS LAG\n ", + "query": "\n SELECT\n PG_LAST_WAL_RECEIVE_LSN() = PG_LAST_WAL_REPLAY_LSN() AS synced,\n EXTRACT(\n SECONDS\n FROM\n NOW() - PG_LAST_XACT_REPLAY_TIMESTAMP()\n ) :: INT AS LAG\n ", "describe": { "columns": [ { @@ -22,5 +22,5 @@ null ] }, - "hash": "f4e7e2dd109aab2714845b028eba780c75468aa36615bcfcf7f7d8ace23cd1aa" + "hash": "02494e0846398040749aa89c7051a23ccc0a18b0a4c8ee281f5f0ad131d25b33" } diff --git a/core/lib/dal/.sqlx/query-02cd10bd405bb3150478ef98d9dd58ab63035cdda861ff7566a9b1f6a68b9162.json b/core/lib/dal/.sqlx/query-02cd10bd405bb3150478ef98d9dd58ab63035cdda861ff7566a9b1f6a68b9162.json new file mode 100644 index 000000000000..9fe301f846b0 --- /dev/null +++ b/core/lib/dal/.sqlx/query-02cd10bd405bb3150478ef98d9dd58ab63035cdda861ff7566a9b1f6a68b9162.json @@ -0,0 +1,15 @@ +{ + "db_name": "PostgreSQL", + "query": "\n DELETE FROM\n l2_to_l1_logs\n WHERE\n miniblock_number BETWEEN $1 AND $2\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8", + "Int8" + ] + }, + "nullable": [] + }, + "hash": "02cd10bd405bb3150478ef98d9dd58ab63035cdda861ff7566a9b1f6a68b9162" +} diff --git a/core/lib/dal/.sqlx/query-03e00f422f991f8f12aad0083e1c42cfea253a182ca5df143a183cd522ecac33.json b/core/lib/dal/.sqlx/query-03e00f422f991f8f12aad0083e1c42cfea253a182ca5df143a183cd522ecac33.json deleted file mode 100644 index 12498582adaa..000000000000 --- a/core/lib/dal/.sqlx/query-03e00f422f991f8f12aad0083e1c42cfea253a182ca5df143a183cd522ecac33.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE transactions\n SET\n l1_batch_number = NULL,\n miniblock_number = NULL,\n error = NULL,\n index_in_block = NULL,\n execution_info = '{}'\n WHERE\n miniblock_number > $1\n RETURNING\n hash\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "hash", - "type_info": "Bytea" - } - ], - "parameters": { - "Left": [ - "Int8" - ] - }, - "nullable": [ - false - ] - }, - "hash": "03e00f422f991f8f12aad0083e1c42cfea253a182ca5df143a183cd522ecac33" -} diff --git a/core/lib/dal/.sqlx/query-cea9fe027a6a0ada827f23b48ac32432295b2f7ee40bf13522a6edbd236f1970.json b/core/lib/dal/.sqlx/query-044bbd6c7926890b642c906167307c7497d418325ac0f24468fb3d9bcc99f9c1.json similarity index 85% rename from core/lib/dal/.sqlx/query-cea9fe027a6a0ada827f23b48ac32432295b2f7ee40bf13522a6edbd236f1970.json rename to core/lib/dal/.sqlx/query-044bbd6c7926890b642c906167307c7497d418325ac0f24468fb3d9bcc99f9c1.json index b1eae968a897..05d0bf939434 100644 --- a/core/lib/dal/.sqlx/query-cea9fe027a6a0ada827f23b48ac32432295b2f7ee40bf13522a6edbd236f1970.json +++ b/core/lib/dal/.sqlx/query-044bbd6c7926890b642c906167307c7497d418325ac0f24468fb3d9bcc99f9c1.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT\n u.hashed_key AS \"hashed_key!\",\n (\n SELECT\n value\n FROM\n storage_logs\n WHERE\n hashed_key = u.hashed_key\n AND miniblock_number <= $2\n ORDER BY\n miniblock_number DESC,\n operation_number DESC\n LIMIT\n 1\n ) AS \"value?\"\n FROM\n UNNEST($1::bytea[]) AS u (hashed_key)\n ", + "query": "\n SELECT\n u.hashed_key AS \"hashed_key!\",\n (\n SELECT\n value\n FROM\n storage_logs\n WHERE\n hashed_key = u.hashed_key\n AND miniblock_number <= $2\n ORDER BY\n miniblock_number DESC,\n operation_number DESC\n LIMIT\n 1\n ) AS \"value?\"\n FROM\n UNNEST($1 :: bytea []) AS u (hashed_key)\n ", "describe": { "columns": [ { @@ -25,5 +25,5 @@ null ] }, - "hash": "cea9fe027a6a0ada827f23b48ac32432295b2f7ee40bf13522a6edbd236f1970" + "hash": "044bbd6c7926890b642c906167307c7497d418325ac0f24468fb3d9bcc99f9c1" } diff --git a/core/lib/dal/.sqlx/query-046590a310cc7bbfa421d0d8e20c3bdae18b88c4c223e374df9a997c271b091b.json b/core/lib/dal/.sqlx/query-046590a310cc7bbfa421d0d8e20c3bdae18b88c4c223e374df9a997c271b091b.json deleted file mode 100644 index 950d72a3e238..000000000000 --- a/core/lib/dal/.sqlx/query-046590a310cc7bbfa421d0d8e20c3bdae18b88c4c223e374df9a997c271b091b.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n WITH\n soft AS (\n SELECT\n pruned_l1_batch,\n pruned_miniblock\n FROM\n pruning_log\n WHERE\n TYPE = 'Soft'\n ORDER BY\n pruned_l1_batch DESC\n LIMIT\n 1\n ),\n hard AS (\n SELECT\n pruned_l1_batch,\n pruned_miniblock\n FROM\n pruning_log\n WHERE\n TYPE = 'Hard'\n ORDER BY\n pruned_l1_batch DESC\n LIMIT\n 1\n )\n SELECT\n soft.pruned_l1_batch AS last_soft_pruned_l1_batch,\n soft.pruned_miniblock AS last_soft_pruned_miniblock,\n hard.pruned_l1_batch AS last_hard_pruned_l1_batch,\n hard.pruned_miniblock AS last_hard_pruned_miniblock\n FROM\n soft\n FULL JOIN hard ON TRUE\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "last_soft_pruned_l1_batch", - "type_info": "Int8" - }, - { - "ordinal": 1, - "name": "last_soft_pruned_miniblock", - "type_info": "Int8" - }, - { - "ordinal": 2, - "name": "last_hard_pruned_l1_batch", - "type_info": "Int8" - }, - { - "ordinal": 3, - "name": "last_hard_pruned_miniblock", - "type_info": "Int8" - } - ], - "parameters": { - "Left": [] - }, - "nullable": [ - true, - true, - true, - true - ] - }, - "hash": "046590a310cc7bbfa421d0d8e20c3bdae18b88c4c223e374df9a997c271b091b" -} diff --git a/core/lib/dal/.sqlx/query-05c2a77d9f65d435e2df63a300850e42abbaf365a1b041d0e7a809796ef0fe63.json b/core/lib/dal/.sqlx/query-05c2a77d9f65d435e2df63a300850e42abbaf365a1b041d0e7a809796ef0fe63.json deleted file mode 100644 index f3c85b9b43dc..000000000000 --- a/core/lib/dal/.sqlx/query-05c2a77d9f65d435e2df63a300850e42abbaf365a1b041d0e7a809796ef0fe63.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE proof_generation_details\n SET\n status = 'picked_by_prover',\n updated_at = NOW(),\n prover_taken_at = NOW()\n WHERE\n l1_batch_number = (\n SELECT\n l1_batch_number\n FROM\n proof_generation_details\n LEFT JOIN l1_batches ON l1_batch_number = l1_batches.number\n WHERE\n (\n vm_run_data_blob_url IS NOT NULL\n AND proof_gen_data_blob_url IS NOT NULL\n AND l1_batches.hash IS NOT NULL\n AND l1_batches.aux_data_hash IS NOT NULL\n AND l1_batches.meta_parameters_hash IS NOT NULL\n AND status = 'unpicked'\n )\n OR (\n status = 'picked_by_prover'\n AND prover_taken_at < NOW() - $1::INTERVAL\n )\n ORDER BY\n l1_batch_number ASC\n LIMIT\n 1\n )\n RETURNING\n proof_generation_details.l1_batch_number\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "l1_batch_number", - "type_info": "Int8" - } - ], - "parameters": { - "Left": [ - "Interval" - ] - }, - "nullable": [ - false - ] - }, - "hash": "05c2a77d9f65d435e2df63a300850e42abbaf365a1b041d0e7a809796ef0fe63" -} diff --git a/core/lib/dal/.sqlx/query-05e94c9609efb0e4e0c96f3ee7f57db0a54d476b78dc0e36e3ef94dcc17099ae.json b/core/lib/dal/.sqlx/query-05e94c9609efb0e4e0c96f3ee7f57db0a54d476b78dc0e36e3ef94dcc17099ae.json new file mode 100644 index 000000000000..c1b3932dfe2f --- /dev/null +++ b/core/lib/dal/.sqlx/query-05e94c9609efb0e4e0c96f3ee7f57db0a54d476b78dc0e36e3ef94dcc17099ae.json @@ -0,0 +1,15 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE\n eth_txs_history\n SET\n sent_at_block = $2,\n sent_at = NOW()\n WHERE\n id = $1\n AND sent_at_block IS NULL\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int4", + "Int4" + ] + }, + "nullable": [] + }, + "hash": "05e94c9609efb0e4e0c96f3ee7f57db0a54d476b78dc0e36e3ef94dcc17099ae" +} diff --git a/core/lib/dal/.sqlx/query-079da9dcd3f65b8fad7465a5cb5a6acecaaffde2e922fb384ecc96571bd9e786.json b/core/lib/dal/.sqlx/query-079da9dcd3f65b8fad7465a5cb5a6acecaaffde2e922fb384ecc96571bd9e786.json new file mode 100644 index 000000000000..45974f8f4a9d --- /dev/null +++ b/core/lib/dal/.sqlx/query-079da9dcd3f65b8fad7465a5cb5a6acecaaffde2e922fb384ecc96571bd9e786.json @@ -0,0 +1,16 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE\n l1_batches\n SET\n eth_prove_tx_id = $1,\n updated_at = NOW()\n WHERE\n number BETWEEN $2 AND $3\n AND eth_prove_tx_id IS NULL\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int4", + "Int8", + "Int8" + ] + }, + "nullable": [] + }, + "hash": "079da9dcd3f65b8fad7465a5cb5a6acecaaffde2e922fb384ecc96571bd9e786" +} diff --git a/core/lib/dal/.sqlx/query-0fbdf8da9a000c433c5475d57f6ad2574cd1310dff1d1bf06825d5634ba25f04.json b/core/lib/dal/.sqlx/query-08cd0d21cc831cd54f55d6e02daddb6978a6c1e80bbaa5f8fded39a82f8e50e0.json similarity index 57% rename from core/lib/dal/.sqlx/query-0fbdf8da9a000c433c5475d57f6ad2574cd1310dff1d1bf06825d5634ba25f04.json rename to core/lib/dal/.sqlx/query-08cd0d21cc831cd54f55d6e02daddb6978a6c1e80bbaa5f8fded39a82f8e50e0.json index 05b94ad249ac..6ad0b6d0daac 100644 --- a/core/lib/dal/.sqlx/query-0fbdf8da9a000c433c5475d57f6ad2574cd1310dff1d1bf06825d5634ba25f04.json +++ b/core/lib/dal/.sqlx/query-08cd0d21cc831cd54f55d6e02daddb6978a6c1e80bbaa5f8fded39a82f8e50e0.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n UPDATE tee_verifier_input_producer_jobs\n SET\n status = $1,\n updated_at = NOW(),\n time_taken = $3,\n input_blob_url = $4\n WHERE\n l1_batch_number = $2\n ", + "query": "\n UPDATE\n tee_verifier_input_producer_jobs\n SET\n status = $1,\n updated_at = NOW(),\n time_taken = $3,\n input_blob_url = $4\n WHERE\n l1_batch_number = $2\n ", "describe": { "columns": [], "parameters": { @@ -26,5 +26,5 @@ }, "nullable": [] }, - "hash": "0fbdf8da9a000c433c5475d57f6ad2574cd1310dff1d1bf06825d5634ba25f04" + "hash": "08cd0d21cc831cd54f55d6e02daddb6978a6c1e80bbaa5f8fded39a82f8e50e0" } diff --git a/core/lib/dal/.sqlx/query-0a55ee6934920b29262040064261f5dd0730d1a8e111892025f1c2688e338fbc.json b/core/lib/dal/.sqlx/query-0a55ee6934920b29262040064261f5dd0730d1a8e111892025f1c2688e338fbc.json new file mode 100644 index 000000000000..b2f7da1d8dec --- /dev/null +++ b/core/lib/dal/.sqlx/query-0a55ee6934920b29262040064261f5dd0730d1a8e111892025f1c2688e338fbc.json @@ -0,0 +1,15 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE\n proof_generation_details\n SET\n status = 'generated',\n proof_blob_url = $1,\n updated_at = NOW()\n WHERE\n l1_batch_number = $2\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Text", + "Int8" + ] + }, + "nullable": [] + }, + "hash": "0a55ee6934920b29262040064261f5dd0730d1a8e111892025f1c2688e338fbc" +} diff --git a/core/lib/dal/.sqlx/query-0b5d5efeac95d429cf6a5be22153897edf8c868094ad029e2e8fcf286d44fd55.json b/core/lib/dal/.sqlx/query-0b5d5efeac95d429cf6a5be22153897edf8c868094ad029e2e8fcf286d44fd55.json deleted file mode 100644 index 822a6967f6db..000000000000 --- a/core/lib/dal/.sqlx/query-0b5d5efeac95d429cf6a5be22153897edf8c868094ad029e2e8fcf286d44fd55.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n data_availability (l1_batch_number, blob_id, sent_at, created_at, updated_at)\n VALUES\n ($1, $2, $3, NOW(), NOW())\n ON CONFLICT DO NOTHING\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8", - "Text", - "Timestamp" - ] - }, - "nullable": [] - }, - "hash": "0b5d5efeac95d429cf6a5be22153897edf8c868094ad029e2e8fcf286d44fd55" -} diff --git a/core/lib/dal/.sqlx/query-0fef49a649d20c9fd263c1dfa40daa9b94d398c635c37746736e98f1f18fcca7.json b/core/lib/dal/.sqlx/query-0bd951ee87fe42893321894594cca22b17e75cb6778168d230d9ccd263caca23.json similarity index 51% rename from core/lib/dal/.sqlx/query-0fef49a649d20c9fd263c1dfa40daa9b94d398c635c37746736e98f1f18fcca7.json rename to core/lib/dal/.sqlx/query-0bd951ee87fe42893321894594cca22b17e75cb6778168d230d9ccd263caca23.json index adfd1919db51..26698a036f41 100644 --- a/core/lib/dal/.sqlx/query-0fef49a649d20c9fd263c1dfa40daa9b94d398c635c37746736e98f1f18fcca7.json +++ b/core/lib/dal/.sqlx/query-0bd951ee87fe42893321894594cca22b17e75cb6778168d230d9ccd263caca23.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n UPDATE tee_verifier_input_producer_jobs\n SET\n status = $1,\n attempts = attempts + 1,\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n l1_batch_number = (\n SELECT\n l1_batch_number\n FROM\n tee_verifier_input_producer_jobs\n WHERE\n status = $2\n OR (\n status = $1\n AND processing_started_at < NOW() - $4::INTERVAL\n )\n OR (\n status = $3\n AND attempts < $5\n )\n ORDER BY\n l1_batch_number ASC\n LIMIT\n 1\n FOR UPDATE\n SKIP LOCKED\n )\n RETURNING\n tee_verifier_input_producer_jobs.l1_batch_number\n ", + "query": "\n UPDATE\n tee_verifier_input_producer_jobs\n SET\n status = $1,\n attempts = attempts + 1,\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n l1_batch_number = (\n SELECT\n l1_batch_number\n FROM\n tee_verifier_input_producer_jobs\n WHERE\n status = $2\n OR (\n status = $1\n AND processing_started_at < NOW() - $4 :: INTERVAL\n )\n OR (\n status = $3\n AND attempts < $5\n )\n ORDER BY\n l1_batch_number ASC\n LIMIT\n 1 FOR\n UPDATE\n SKIP LOCKED\n )\n RETURNING\n tee_verifier_input_producer_jobs.l1_batch_number\n ", "describe": { "columns": [ { @@ -61,5 +61,5 @@ false ] }, - "hash": "0fef49a649d20c9fd263c1dfa40daa9b94d398c635c37746736e98f1f18fcca7" + "hash": "0bd951ee87fe42893321894594cca22b17e75cb6778168d230d9ccd263caca23" } diff --git a/core/lib/dal/.sqlx/query-0c2be3c7bd278d24d3a155203067fb9102b175047588ec1cca515ff31ae131c3.json b/core/lib/dal/.sqlx/query-0c2be3c7bd278d24d3a155203067fb9102b175047588ec1cca515ff31ae131c3.json new file mode 100644 index 000000000000..4c5950576be2 --- /dev/null +++ b/core/lib/dal/.sqlx/query-0c2be3c7bd278d24d3a155203067fb9102b175047588ec1cca515ff31ae131c3.json @@ -0,0 +1,20 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE\n transactions\n SET\n miniblock_number = $1,\n index_in_block = data_table.index_in_block,\n error = NULLIF(data_table.error, ''),\n in_mempool = FALSE,\n execution_info = execution_info || data_table.new_execution_info,\n refunded_gas = data_table.refunded_gas,\n effective_gas_price = data_table.effective_gas_price,\n updated_at = NOW()\n FROM\n (\n SELECT\n UNNEST($2 :: bytea []) AS hash,\n UNNEST($3 :: INTEGER []) AS index_in_block,\n UNNEST($4 :: VARCHAR []) AS error,\n UNNEST($5 :: jsonb []) AS new_execution_info,\n UNNEST($6 :: BIGINT []) AS refunded_gas,\n UNNEST($7 :: NUMERIC []) AS effective_gas_price\n ) AS data_table\n WHERE\n transactions.hash = data_table.hash\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8", + "ByteaArray", + "Int4Array", + "VarcharArray", + "JsonbArray", + "Int8Array", + "NumericArray" + ] + }, + "nullable": [] + }, + "hash": "0c2be3c7bd278d24d3a155203067fb9102b175047588ec1cca515ff31ae131c3" +} diff --git a/core/lib/dal/.sqlx/query-0d60eb7536b49716fa01a14b0be760b8368dd5532caa5fb8b4310a96d44d8530.json b/core/lib/dal/.sqlx/query-0d60eb7536b49716fa01a14b0be760b8368dd5532caa5fb8b4310a96d44d8530.json deleted file mode 100644 index fcb753088e98..000000000000 --- a/core/lib/dal/.sqlx/query-0d60eb7536b49716fa01a14b0be760b8368dd5532caa5fb8b4310a96d44d8530.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE transactions\n SET\n input = NULL,\n data = '{}',\n execution_info = '{}',\n updated_at = NOW()\n WHERE\n miniblock_number BETWEEN $1 AND $2\n AND upgrade_id IS NULL\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8", - "Int8" - ] - }, - "nullable": [] - }, - "hash": "0d60eb7536b49716fa01a14b0be760b8368dd5532caa5fb8b4310a96d44d8530" -} diff --git a/core/lib/dal/.sqlx/query-0e9727e6537ef08e65b8868e7a22b3266e5e0140e6d04819be4a5997d193d1de.json b/core/lib/dal/.sqlx/query-0e9727e6537ef08e65b8868e7a22b3266e5e0140e6d04819be4a5997d193d1de.json new file mode 100644 index 000000000000..e71b6fad77d9 --- /dev/null +++ b/core/lib/dal/.sqlx/query-0e9727e6537ef08e65b8868e7a22b3266e5e0140e6d04819be4a5997d193d1de.json @@ -0,0 +1,14 @@ +{ + "db_name": "PostgreSQL", + "query": "\n DELETE FROM\n miniblocks\n WHERE\n number > $1\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8" + ] + }, + "nullable": [] + }, + "hash": "0e9727e6537ef08e65b8868e7a22b3266e5e0140e6d04819be4a5997d193d1de" +} diff --git a/core/lib/dal/.sqlx/query-0f381418ac79762b4573bf5b440b96b711e8667df7a3c87a5ddf062842a0da6c.json b/core/lib/dal/.sqlx/query-0f381418ac79762b4573bf5b440b96b711e8667df7a3c87a5ddf062842a0da6c.json deleted file mode 100644 index 38d7a2ab64d1..000000000000 --- a/core/lib/dal/.sqlx/query-0f381418ac79762b4573bf5b440b96b711e8667df7a3c87a5ddf062842a0da6c.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n DELETE FROM eth_txs\n WHERE\n id IN (\n (\n SELECT\n eth_commit_tx_id\n FROM\n l1_batches\n WHERE\n number > $1\n )\n UNION\n (\n SELECT\n eth_prove_tx_id\n FROM\n l1_batches\n WHERE\n number > $1\n )\n UNION\n (\n SELECT\n eth_execute_tx_id\n FROM\n l1_batches\n WHERE\n number > $1\n )\n )\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8" - ] - }, - "nullable": [] - }, - "hash": "0f381418ac79762b4573bf5b440b96b711e8667df7a3c87a5ddf062842a0da6c" -} diff --git a/core/lib/dal/.sqlx/query-4aeb7dcd79000540c03fb12c0608ab71005d70f13ed32172e47166f71b3aef80.json b/core/lib/dal/.sqlx/query-0f4a7d7c5e737a1f232a2db675557ae62a53e1fa4834acc82c18e265867b69d9.json similarity index 55% rename from core/lib/dal/.sqlx/query-4aeb7dcd79000540c03fb12c0608ab71005d70f13ed32172e47166f71b3aef80.json rename to core/lib/dal/.sqlx/query-0f4a7d7c5e737a1f232a2db675557ae62a53e1fa4834acc82c18e265867b69d9.json index feb8f29855e4..5d12a9d122ae 100644 --- a/core/lib/dal/.sqlx/query-4aeb7dcd79000540c03fb12c0608ab71005d70f13ed32172e47166f71b3aef80.json +++ b/core/lib/dal/.sqlx/query-0f4a7d7c5e737a1f232a2db675557ae62a53e1fa4834acc82c18e265867b69d9.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT\n nonce\n FROM\n eth_txs\n WHERE\n from_addr IS NOT DISTINCT FROM $1 -- can't just use equality as NULL != NULL\\\n AND is_gateway = $2\n ORDER BY\n id DESC\n LIMIT\n 1\n ", + "query": "\n SELECT\n nonce\n FROM\n eth_txs\n WHERE\n from_addr IS NOT DISTINCT\n FROM\n $1 -- can't just use equality as NULL != NULL\\\n AND is_gateway = $2\n ORDER BY\n id DESC\n LIMIT\n 1\n ", "describe": { "columns": [ { @@ -19,5 +19,5 @@ false ] }, - "hash": "4aeb7dcd79000540c03fb12c0608ab71005d70f13ed32172e47166f71b3aef80" + "hash": "0f4a7d7c5e737a1f232a2db675557ae62a53e1fa4834acc82c18e265867b69d9" } diff --git a/core/lib/dal/.sqlx/query-0fc5c017a21f1ed897d9856e7318e34818a86cbc50fb5a509f4072ca97db926c.json b/core/lib/dal/.sqlx/query-0fc5c017a21f1ed897d9856e7318e34818a86cbc50fb5a509f4072ca97db926c.json new file mode 100644 index 000000000000..c3739b763cb0 --- /dev/null +++ b/core/lib/dal/.sqlx/query-0fc5c017a21f1ed897d9856e7318e34818a86cbc50fb5a509f4072ca97db926c.json @@ -0,0 +1,15 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE\n eth_txs\n SET\n chain_id = $1\n WHERE\n id = $2\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8", + "Int4" + ] + }, + "nullable": [] + }, + "hash": "0fc5c017a21f1ed897d9856e7318e34818a86cbc50fb5a509f4072ca97db926c" +} diff --git a/core/lib/dal/.sqlx/query-3518a3e93da8115b54426d72aea0800383e6b73a8b48dc3e589a29a4367cbb5a.json b/core/lib/dal/.sqlx/query-0feeb221b1d18eb2331c88696d1f3c13834347e2bf7a90d2113a2e0d623c6122.json similarity index 65% rename from core/lib/dal/.sqlx/query-3518a3e93da8115b54426d72aea0800383e6b73a8b48dc3e589a29a4367cbb5a.json rename to core/lib/dal/.sqlx/query-0feeb221b1d18eb2331c88696d1f3c13834347e2bf7a90d2113a2e0d623c6122.json index a2351b5eef86..e2dde4b61943 100644 --- a/core/lib/dal/.sqlx/query-3518a3e93da8115b54426d72aea0800383e6b73a8b48dc3e589a29a4367cbb5a.json +++ b/core/lib/dal/.sqlx/query-0feeb221b1d18eb2331c88696d1f3c13834347e2bf7a90d2113a2e0d623c6122.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n call_traces (tx_hash, call_trace)\n SELECT\n u.tx_hash,\n u.call_trace\n FROM\n UNNEST($1::bytea[], $2::bytea[]) AS u (tx_hash, call_trace)\n ", + "query": "\n INSERT INTO\n call_traces (tx_hash, call_trace)\n SELECT\n u.tx_hash,\n u.call_trace\n FROM\n UNNEST($1 :: bytea [], $2 :: bytea []) AS u (tx_hash, call_trace)\n ", "describe": { "columns": [], "parameters": { @@ -11,5 +11,5 @@ }, "nullable": [] }, - "hash": "3518a3e93da8115b54426d72aea0800383e6b73a8b48dc3e589a29a4367cbb5a" + "hash": "0feeb221b1d18eb2331c88696d1f3c13834347e2bf7a90d2113a2e0d623c6122" } diff --git a/core/lib/dal/.sqlx/query-105ea691e4022cf707db0707a42dc9216ee7df28e08c7eb4899c2e7df4078c50.json b/core/lib/dal/.sqlx/query-105ea691e4022cf707db0707a42dc9216ee7df28e08c7eb4899c2e7df4078c50.json new file mode 100644 index 000000000000..fef7e1cb45df --- /dev/null +++ b/core/lib/dal/.sqlx/query-105ea691e4022cf707db0707a42dc9216ee7df28e08c7eb4899c2e7df4078c50.json @@ -0,0 +1,16 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE\n snapshots\n SET\n storage_logs_filepaths [$2] = $3,\n updated_at = NOW()\n WHERE\n l1_batch_number = $1\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8", + "Int4", + "Text" + ] + }, + "nullable": [] + }, + "hash": "105ea691e4022cf707db0707a42dc9216ee7df28e08c7eb4899c2e7df4078c50" +} diff --git a/core/lib/dal/.sqlx/query-1074d0a2e4a4afb9a92f3822e133db7a71aca15698bafba051a8d9a91a4dbc76.json b/core/lib/dal/.sqlx/query-1074d0a2e4a4afb9a92f3822e133db7a71aca15698bafba051a8d9a91a4dbc76.json deleted file mode 100644 index 13e4cdb9431d..000000000000 --- a/core/lib/dal/.sqlx/query-1074d0a2e4a4afb9a92f3822e133db7a71aca15698bafba051a8d9a91a4dbc76.json +++ /dev/null @@ -1,112 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n WITH\n mb AS (\n SELECT\n l1_gas_price,\n l2_fair_gas_price,\n fair_pubdata_price\n FROM\n miniblocks\n WHERE\n l1_batch_number = $1\n LIMIT\n 1\n )\n SELECT\n l1_batches.number,\n l1_batches.timestamp,\n l1_batches.l1_tx_count,\n l1_batches.l2_tx_count,\n l1_batches.hash AS \"root_hash?\",\n commit_tx.tx_hash AS \"commit_tx_hash?\",\n commit_tx.confirmed_at AS \"committed_at?\",\n prove_tx.tx_hash AS \"prove_tx_hash?\",\n prove_tx.confirmed_at AS \"proven_at?\",\n execute_tx.tx_hash AS \"execute_tx_hash?\",\n execute_tx.confirmed_at AS \"executed_at?\",\n mb.l1_gas_price,\n mb.l2_fair_gas_price,\n mb.fair_pubdata_price,\n l1_batches.bootloader_code_hash,\n l1_batches.default_aa_code_hash\n FROM\n l1_batches\n INNER JOIN mb ON TRUE\n LEFT JOIN eth_txs_history AS commit_tx ON (\n l1_batches.eth_commit_tx_id = commit_tx.eth_tx_id\n AND commit_tx.confirmed_at IS NOT NULL\n )\n LEFT JOIN eth_txs_history AS prove_tx ON (\n l1_batches.eth_prove_tx_id = prove_tx.eth_tx_id\n AND prove_tx.confirmed_at IS NOT NULL\n )\n LEFT JOIN eth_txs_history AS execute_tx ON (\n l1_batches.eth_execute_tx_id = execute_tx.eth_tx_id\n AND execute_tx.confirmed_at IS NOT NULL\n )\n WHERE\n l1_batches.number = $1\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "number", - "type_info": "Int8" - }, - { - "ordinal": 1, - "name": "timestamp", - "type_info": "Int8" - }, - { - "ordinal": 2, - "name": "l1_tx_count", - "type_info": "Int4" - }, - { - "ordinal": 3, - "name": "l2_tx_count", - "type_info": "Int4" - }, - { - "ordinal": 4, - "name": "root_hash?", - "type_info": "Bytea" - }, - { - "ordinal": 5, - "name": "commit_tx_hash?", - "type_info": "Text" - }, - { - "ordinal": 6, - "name": "committed_at?", - "type_info": "Timestamp" - }, - { - "ordinal": 7, - "name": "prove_tx_hash?", - "type_info": "Text" - }, - { - "ordinal": 8, - "name": "proven_at?", - "type_info": "Timestamp" - }, - { - "ordinal": 9, - "name": "execute_tx_hash?", - "type_info": "Text" - }, - { - "ordinal": 10, - "name": "executed_at?", - "type_info": "Timestamp" - }, - { - "ordinal": 11, - "name": "l1_gas_price", - "type_info": "Int8" - }, - { - "ordinal": 12, - "name": "l2_fair_gas_price", - "type_info": "Int8" - }, - { - "ordinal": 13, - "name": "fair_pubdata_price", - "type_info": "Int8" - }, - { - "ordinal": 14, - "name": "bootloader_code_hash", - "type_info": "Bytea" - }, - { - "ordinal": 15, - "name": "default_aa_code_hash", - "type_info": "Bytea" - } - ], - "parameters": { - "Left": [ - "Int8" - ] - }, - "nullable": [ - false, - false, - false, - false, - true, - false, - true, - false, - true, - false, - true, - false, - false, - true, - true, - true - ] - }, - "hash": "1074d0a2e4a4afb9a92f3822e133db7a71aca15698bafba051a8d9a91a4dbc76" -} diff --git a/core/lib/dal/.sqlx/query-11960ee50e5cb3a2f1e8150e1e6854f613c3267b983a031998856873740c9bff.json b/core/lib/dal/.sqlx/query-11960ee50e5cb3a2f1e8150e1e6854f613c3267b983a031998856873740c9bff.json new file mode 100644 index 000000000000..f36d04be52c9 --- /dev/null +++ b/core/lib/dal/.sqlx/query-11960ee50e5cb3a2f1e8150e1e6854f613c3267b983a031998856873740c9bff.json @@ -0,0 +1,15 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE\n proof_generation_details\n SET\n proof_gen_data_blob_url = $1,\n updated_at = NOW()\n WHERE\n l1_batch_number = $2\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Text", + "Int8" + ] + }, + "nullable": [] + }, + "hash": "11960ee50e5cb3a2f1e8150e1e6854f613c3267b983a031998856873740c9bff" +} diff --git a/core/lib/dal/.sqlx/query-120970162104e0560784ee4b8fa44a0202265d741912125f7865e570411997d7.json b/core/lib/dal/.sqlx/query-120970162104e0560784ee4b8fa44a0202265d741912125f7865e570411997d7.json deleted file mode 100644 index 00e558b13628..000000000000 --- a/core/lib/dal/.sqlx/query-120970162104e0560784ee4b8fa44a0202265d741912125f7865e570411997d7.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE l1_batches\n SET\n tree_writes = $1\n WHERE\n number = $2\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Bytea", - "Int8" - ] - }, - "nullable": [] - }, - "hash": "120970162104e0560784ee4b8fa44a0202265d741912125f7865e570411997d7" -} diff --git a/core/lib/dal/.sqlx/query-137702c69220666ec5c1c4dc0fd0f58093cdfe21871592876b9a2a73ec8c1b10.json b/core/lib/dal/.sqlx/query-137702c69220666ec5c1c4dc0fd0f58093cdfe21871592876b9a2a73ec8c1b10.json new file mode 100644 index 000000000000..aa7b6552f874 --- /dev/null +++ b/core/lib/dal/.sqlx/query-137702c69220666ec5c1c4dc0fd0f58093cdfe21871592876b9a2a73ec8c1b10.json @@ -0,0 +1,15 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE\n protocol_versions\n SET\n upgrade_tx_hash = $1\n WHERE\n id = $2\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Bytea", + "Int4" + ] + }, + "nullable": [] + }, + "hash": "137702c69220666ec5c1c4dc0fd0f58093cdfe21871592876b9a2a73ec8c1b10" +} diff --git a/core/lib/dal/.sqlx/query-14cd4cad9c69985b59cb924339297d1fef3dc39e95d98dbdfe49c9121e58ecf2.json b/core/lib/dal/.sqlx/query-14cd4cad9c69985b59cb924339297d1fef3dc39e95d98dbdfe49c9121e58ecf2.json new file mode 100644 index 000000000000..982f5d9643f4 --- /dev/null +++ b/core/lib/dal/.sqlx/query-14cd4cad9c69985b59cb924339297d1fef3dc39e95d98dbdfe49c9121e58ecf2.json @@ -0,0 +1,14 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE\n snapshot_recovery\n SET\n storage_logs_chunks_processed [$1] = TRUE,\n updated_at = NOW()\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int4" + ] + }, + "nullable": [] + }, + "hash": "14cd4cad9c69985b59cb924339297d1fef3dc39e95d98dbdfe49c9121e58ecf2" +} diff --git a/core/lib/dal/.sqlx/query-1656c38e85e1f7e1164aec5d5ee78e96ac6f94edb2983a7e68a3d650a091da1a.json b/core/lib/dal/.sqlx/query-1656c38e85e1f7e1164aec5d5ee78e96ac6f94edb2983a7e68a3d650a091da1a.json new file mode 100644 index 000000000000..8ee3126901c3 --- /dev/null +++ b/core/lib/dal/.sqlx/query-1656c38e85e1f7e1164aec5d5ee78e96ac6f94edb2983a7e68a3d650a091da1a.json @@ -0,0 +1,15 @@ +{ + "db_name": "PostgreSQL", + "query": "\n DELETE FROM\n call_traces\n WHERE\n tx_hash IN (\n SELECT\n hash\n FROM\n transactions\n WHERE\n miniblock_number BETWEEN $1 AND $2\n )\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8", + "Int8" + ] + }, + "nullable": [] + }, + "hash": "1656c38e85e1f7e1164aec5d5ee78e96ac6f94edb2983a7e68a3d650a091da1a" +} diff --git a/core/lib/dal/.sqlx/query-1854e92462e839e741fdfef196f6b04cd475386497611ed5664a281c66917afc.json b/core/lib/dal/.sqlx/query-1854e92462e839e741fdfef196f6b04cd475386497611ed5664a281c66917afc.json new file mode 100644 index 000000000000..c62c9a4cd631 --- /dev/null +++ b/core/lib/dal/.sqlx/query-1854e92462e839e741fdfef196f6b04cd475386497611ed5664a281c66917afc.json @@ -0,0 +1,14 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE\n vm_runner_protective_reads\n SET\n time_taken = NOW() - processing_started_at\n WHERE\n l1_batch_number = $1\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8" + ] + }, + "nullable": [] + }, + "hash": "1854e92462e839e741fdfef196f6b04cd475386497611ed5664a281c66917afc" +} diff --git a/core/lib/dal/.sqlx/query-37890022be6b5e893cf051266fa16618914d6dedb39a9a40d36484741e8b01f4.json b/core/lib/dal/.sqlx/query-19188b9e92b0cc5660c851baccc6f9ce57c51198af167ec2b98944659ba0c53a.json similarity index 66% rename from core/lib/dal/.sqlx/query-37890022be6b5e893cf051266fa16618914d6dedb39a9a40d36484741e8b01f4.json rename to core/lib/dal/.sqlx/query-19188b9e92b0cc5660c851baccc6f9ce57c51198af167ec2b98944659ba0c53a.json index a39a1bdb07b8..1a8e517096db 100644 --- a/core/lib/dal/.sqlx/query-37890022be6b5e893cf051266fa16618914d6dedb39a9a40d36484741e8b01f4.json +++ b/core/lib/dal/.sqlx/query-19188b9e92b0cc5660c851baccc6f9ce57c51198af167ec2b98944659ba0c53a.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n tee_attestations (pubkey, attestation)\n VALUES\n ($1, $2)\n ON CONFLICT (pubkey) DO NOTHING\n ", + "query": "\n INSERT INTO\n tee_attestations (pubkey, attestation)\n VALUES\n ($1, $2) ON CONFLICT (pubkey) DO NOTHING\n ", "describe": { "columns": [], "parameters": { @@ -11,5 +11,5 @@ }, "nullable": [] }, - "hash": "37890022be6b5e893cf051266fa16618914d6dedb39a9a40d36484741e8b01f4" + "hash": "19188b9e92b0cc5660c851baccc6f9ce57c51198af167ec2b98944659ba0c53a" } diff --git a/core/lib/dal/.sqlx/query-19314d74e94b610e2da6d728ca37ea964610e131d45f720f7a7b2a130fe9ed89.json b/core/lib/dal/.sqlx/query-19314d74e94b610e2da6d728ca37ea964610e131d45f720f7a7b2a130fe9ed89.json deleted file mode 100644 index 88093dcee18e..000000000000 --- a/core/lib/dal/.sqlx/query-19314d74e94b610e2da6d728ca37ea964610e131d45f720f7a7b2a130fe9ed89.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE contract_verification_requests\n SET\n status = 'failed',\n updated_at = NOW(),\n error = $2,\n compilation_errors = $3,\n panic_message = $4\n WHERE\n id = $1\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8", - "Text", - "Jsonb", - "Text" - ] - }, - "nullable": [] - }, - "hash": "19314d74e94b610e2da6d728ca37ea964610e131d45f720f7a7b2a130fe9ed89" -} diff --git a/core/lib/dal/.sqlx/query-19a4025388ec9dd14de5f8d794b74e68843b551901c83dcf74901cc78e9bdb1c.json b/core/lib/dal/.sqlx/query-19a4025388ec9dd14de5f8d794b74e68843b551901c83dcf74901cc78e9bdb1c.json new file mode 100644 index 000000000000..28c3b555a253 --- /dev/null +++ b/core/lib/dal/.sqlx/query-19a4025388ec9dd14de5f8d794b74e68843b551901c83dcf74901cc78e9bdb1c.json @@ -0,0 +1,14 @@ +{ + "db_name": "PostgreSQL", + "query": "\n DELETE FROM\n transactions\n WHERE\n hash = ANY ($1)\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "ByteaArray" + ] + }, + "nullable": [] + }, + "hash": "19a4025388ec9dd14de5f8d794b74e68843b551901c83dcf74901cc78e9bdb1c" +} diff --git a/core/lib/dal/.sqlx/query-1bbfac481c402bcb3bb888b84146d922fa1fc9c202072fbc04cae1bbf97195aa.json b/core/lib/dal/.sqlx/query-1bbfac481c402bcb3bb888b84146d922fa1fc9c202072fbc04cae1bbf97195aa.json deleted file mode 100644 index f24a28ffdc28..000000000000 --- a/core/lib/dal/.sqlx/query-1bbfac481c402bcb3bb888b84146d922fa1fc9c202072fbc04cae1bbf97195aa.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n vm_runner_bwip (l1_batch_number, created_at, updated_at, processing_started_at)\n VALUES\n ($1, NOW(), NOW(), NOW())\n ON CONFLICT (l1_batch_number) DO\n UPDATE\n SET\n updated_at = NOW(),\n processing_started_at = NOW()\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8" - ] - }, - "nullable": [] - }, - "hash": "1bbfac481c402bcb3bb888b84146d922fa1fc9c202072fbc04cae1bbf97195aa" -} diff --git a/core/lib/dal/.sqlx/query-1c14d2def60fa5ff91788ddb55e68cee71742b732112038a642e2a07305053c2.json b/core/lib/dal/.sqlx/query-1c14d2def60fa5ff91788ddb55e68cee71742b732112038a642e2a07305053c2.json deleted file mode 100644 index 71dfada3d59a..000000000000 --- a/core/lib/dal/.sqlx/query-1c14d2def60fa5ff91788ddb55e68cee71742b732112038a642e2a07305053c2.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE transactions\n SET\n in_mempool = FALSE\n WHERE\n in_mempool = TRUE\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [] - }, - "nullable": [] - }, - "hash": "1c14d2def60fa5ff91788ddb55e68cee71742b732112038a642e2a07305053c2" -} diff --git a/core/lib/dal/.sqlx/query-1c994d418ada78586de829fc2d34d26e48e968c79834858c98b7a7f9dfc81910.json b/core/lib/dal/.sqlx/query-1c994d418ada78586de829fc2d34d26e48e968c79834858c98b7a7f9dfc81910.json deleted file mode 100644 index 747105fb444b..000000000000 --- a/core/lib/dal/.sqlx/query-1c994d418ada78586de829fc2d34d26e48e968c79834858c98b7a7f9dfc81910.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n DELETE FROM l2_to_l1_logs\n WHERE\n miniblock_number > $1\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8" - ] - }, - "nullable": [] - }, - "hash": "1c994d418ada78586de829fc2d34d26e48e968c79834858c98b7a7f9dfc81910" -} diff --git a/core/lib/dal/.sqlx/query-6621de90a024cc85946f17948e5c171cd0e4d38bd6e9cfec58b2d7f53a3204e1.json b/core/lib/dal/.sqlx/query-1dc66c13020087cc74c84bd731134129e2abdfa088c8089ec3765d771d130133.json similarity index 73% rename from core/lib/dal/.sqlx/query-6621de90a024cc85946f17948e5c171cd0e4d38bd6e9cfec58b2d7f53a3204e1.json rename to core/lib/dal/.sqlx/query-1dc66c13020087cc74c84bd731134129e2abdfa088c8089ec3765d771d130133.json index 8ba437fe2cee..afd927e03f45 100644 --- a/core/lib/dal/.sqlx/query-6621de90a024cc85946f17948e5c171cd0e4d38bd6e9cfec58b2d7f53a3204e1.json +++ b/core/lib/dal/.sqlx/query-1dc66c13020087cc74c84bd731134129e2abdfa088c8089ec3765d771d130133.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n UPDATE transactions\n SET\n in_mempool = TRUE\n FROM\n (\n SELECT\n hash\n FROM\n (\n SELECT\n hash\n FROM\n transactions\n WHERE\n miniblock_number IS NULL\n AND in_mempool = FALSE\n AND error IS NULL\n AND (\n is_priority = TRUE\n OR (\n max_fee_per_gas >= $2\n AND gas_per_pubdata_limit >= $3\n )\n )\n AND tx_format != $4\n ORDER BY\n is_priority DESC,\n priority_op_id,\n received_at\n LIMIT\n $1\n ) AS subquery1\n ORDER BY\n hash\n ) AS subquery2\n WHERE\n transactions.hash = subquery2.hash\n RETURNING\n transactions.*\n ", + "query": "\n UPDATE\n transactions\n SET\n in_mempool = TRUE\n FROM\n (\n SELECT\n hash\n FROM\n (\n SELECT\n hash\n FROM\n transactions\n WHERE\n miniblock_number IS NULL\n AND in_mempool = FALSE\n AND error IS NULL\n AND (\n is_priority = TRUE\n OR (\n max_fee_per_gas >= $2\n AND gas_per_pubdata_limit >= $3\n )\n )\n AND tx_format != $4\n ORDER BY\n is_priority DESC,\n priority_op_id,\n received_at\n LIMIT\n $1\n ) AS subquery1\n ORDER BY\n hash\n ) AS subquery2\n WHERE\n transactions.hash = subquery2.hash\n RETURNING\n transactions.*\n ", "describe": { "columns": [ { @@ -231,5 +231,5 @@ true ] }, - "hash": "6621de90a024cc85946f17948e5c171cd0e4d38bd6e9cfec58b2d7f53a3204e1" + "hash": "1dc66c13020087cc74c84bd731134129e2abdfa088c8089ec3765d771d130133" } diff --git a/core/lib/dal/.sqlx/query-1fba74c9aa8760adf71bd98b278ec7eefa0edd3cefd7eb6025c2c1456f2a6095.json b/core/lib/dal/.sqlx/query-1fba74c9aa8760adf71bd98b278ec7eefa0edd3cefd7eb6025c2c1456f2a6095.json new file mode 100644 index 000000000000..761bf043f98a --- /dev/null +++ b/core/lib/dal/.sqlx/query-1fba74c9aa8760adf71bd98b278ec7eefa0edd3cefd7eb6025c2c1456f2a6095.json @@ -0,0 +1,15 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE\n miniblocks\n SET\n logs_bloom = data.logs_bloom\n FROM\n (\n SELECT\n UNNEST($1 :: BIGINT []) AS number,\n UNNEST($2 :: BYTEA []) AS logs_bloom\n ) AS data\n WHERE\n miniblocks.number = data.number\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8Array", + "ByteaArray" + ] + }, + "nullable": [] + }, + "hash": "1fba74c9aa8760adf71bd98b278ec7eefa0edd3cefd7eb6025c2c1456f2a6095" +} diff --git a/core/lib/dal/.sqlx/query-2169cc7dfb074566ceb0bd5754d6e7a755c4bc6c25c7e6caff5fd6142813d349.json b/core/lib/dal/.sqlx/query-2169cc7dfb074566ceb0bd5754d6e7a755c4bc6c25c7e6caff5fd6142813d349.json deleted file mode 100644 index e48fddcf6175..000000000000 --- a/core/lib/dal/.sqlx/query-2169cc7dfb074566ceb0bd5754d6e7a755c4bc6c25c7e6caff5fd6142813d349.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n tee_proof_generation_details (l1_batch_number, tee_type, status, created_at, updated_at)\n VALUES\n ($1, $2, $3, NOW(), NOW())\n ON CONFLICT (l1_batch_number, tee_type) DO NOTHING\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8", - "Text", - "Text" - ] - }, - "nullable": [] - }, - "hash": "2169cc7dfb074566ceb0bd5754d6e7a755c4bc6c25c7e6caff5fd6142813d349" -} diff --git a/core/lib/dal/.sqlx/query-6e3a3ef443ce8aab55b10eea55f9c8ff11775885aebaf457075c6825305244e5.json b/core/lib/dal/.sqlx/query-2520d5065659546dcd50d4be8733af15a5a69d936e0b33000e3035cd1af92bf8.json similarity index 96% rename from core/lib/dal/.sqlx/query-6e3a3ef443ce8aab55b10eea55f9c8ff11775885aebaf457075c6825305244e5.json rename to core/lib/dal/.sqlx/query-2520d5065659546dcd50d4be8733af15a5a69d936e0b33000e3035cd1af92bf8.json index de474897307a..b8f9d910a3d3 100644 --- a/core/lib/dal/.sqlx/query-6e3a3ef443ce8aab55b10eea55f9c8ff11775885aebaf457075c6825305244e5.json +++ b/core/lib/dal/.sqlx/query-2520d5065659546dcd50d4be8733af15a5a69d936e0b33000e3035cd1af92bf8.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT\n transactions.is_priority,\n transactions.initiator_address,\n transactions.gas_limit,\n transactions.gas_per_pubdata_limit,\n transactions.received_at,\n miniblocks.number AS \"miniblock_number?\",\n transactions.error,\n transactions.effective_gas_price,\n transactions.refunded_gas,\n commit_tx.tx_hash AS \"eth_commit_tx_hash?\",\n prove_tx.tx_hash AS \"eth_prove_tx_hash?\",\n execute_tx.tx_hash AS \"eth_execute_tx_hash?\"\n FROM\n transactions\n LEFT JOIN miniblocks ON miniblocks.number = transactions.miniblock_number\n LEFT JOIN l1_batches ON l1_batches.number = miniblocks.l1_batch_number\n LEFT JOIN eth_txs_history AS commit_tx ON (\n l1_batches.eth_commit_tx_id = commit_tx.eth_tx_id\n AND commit_tx.confirmed_at IS NOT NULL\n )\n LEFT JOIN eth_txs_history AS prove_tx ON (\n l1_batches.eth_prove_tx_id = prove_tx.eth_tx_id\n AND prove_tx.confirmed_at IS NOT NULL\n )\n LEFT JOIN eth_txs_history AS execute_tx ON (\n l1_batches.eth_execute_tx_id = execute_tx.eth_tx_id\n AND execute_tx.confirmed_at IS NOT NULL\n )\n WHERE\n transactions.hash = $1\n AND transactions.data != '{}'::jsonb\n ", + "query": "\n SELECT\n transactions.is_priority,\n transactions.initiator_address,\n transactions.gas_limit,\n transactions.gas_per_pubdata_limit,\n transactions.received_at,\n miniblocks.number AS \"miniblock_number?\",\n transactions.error,\n transactions.effective_gas_price,\n transactions.refunded_gas,\n commit_tx.tx_hash AS \"eth_commit_tx_hash?\",\n prove_tx.tx_hash AS \"eth_prove_tx_hash?\",\n execute_tx.tx_hash AS \"eth_execute_tx_hash?\"\n FROM\n transactions\n LEFT JOIN miniblocks ON miniblocks.number = transactions.miniblock_number\n LEFT JOIN l1_batches ON l1_batches.number = miniblocks.l1_batch_number\n LEFT JOIN eth_txs_history AS commit_tx ON (\n l1_batches.eth_commit_tx_id = commit_tx.eth_tx_id\n AND commit_tx.confirmed_at IS NOT NULL\n )\n LEFT JOIN eth_txs_history AS prove_tx ON (\n l1_batches.eth_prove_tx_id = prove_tx.eth_tx_id\n AND prove_tx.confirmed_at IS NOT NULL\n )\n LEFT JOIN eth_txs_history AS execute_tx ON (\n l1_batches.eth_execute_tx_id = execute_tx.eth_tx_id\n AND execute_tx.confirmed_at IS NOT NULL\n )\n WHERE\n transactions.hash = $1\n AND transactions.data != '{}' :: jsonb\n ", "describe": { "columns": [ { @@ -84,5 +84,5 @@ false ] }, - "hash": "6e3a3ef443ce8aab55b10eea55f9c8ff11775885aebaf457075c6825305244e5" + "hash": "2520d5065659546dcd50d4be8733af15a5a69d936e0b33000e3035cd1af92bf8" } diff --git a/core/lib/dal/.sqlx/query-25ef41cbeb95d10e4051b822769518daf76a5f283e4298fd12022b0c3db07319.json b/core/lib/dal/.sqlx/query-25ef41cbeb95d10e4051b822769518daf76a5f283e4298fd12022b0c3db07319.json deleted file mode 100644 index 079246791a98..000000000000 --- a/core/lib/dal/.sqlx/query-25ef41cbeb95d10e4051b822769518daf76a5f283e4298fd12022b0c3db07319.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE l1_batches\n SET\n eth_prove_tx_id = $1,\n updated_at = NOW()\n WHERE\n number BETWEEN $2 AND $3\n AND eth_prove_tx_id IS NULL\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int4", - "Int8", - "Int8" - ] - }, - "nullable": [] - }, - "hash": "25ef41cbeb95d10e4051b822769518daf76a5f283e4298fd12022b0c3db07319" -} diff --git a/core/lib/dal/.sqlx/query-26e0b7eb1871d94ddc98254fece6381a9c4165e2727542eaeef3bbedd13a4f20.json b/core/lib/dal/.sqlx/query-26e0b7eb1871d94ddc98254fece6381a9c4165e2727542eaeef3bbedd13a4f20.json deleted file mode 100644 index 30738bc2094a..000000000000 --- a/core/lib/dal/.sqlx/query-26e0b7eb1871d94ddc98254fece6381a9c4165e2727542eaeef3bbedd13a4f20.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE proof_generation_details\n SET\n status = $1,\n updated_at = NOW()\n WHERE\n l1_batch_number = $2\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Text", - "Int8" - ] - }, - "nullable": [] - }, - "hash": "26e0b7eb1871d94ddc98254fece6381a9c4165e2727542eaeef3bbedd13a4f20" -} diff --git a/core/lib/dal/.sqlx/query-27f58d66139d7fad29b2f31a4a1c836a8ffc0f71f082efca16d14ac0b897597d.json b/core/lib/dal/.sqlx/query-27f58d66139d7fad29b2f31a4a1c836a8ffc0f71f082efca16d14ac0b897597d.json new file mode 100644 index 000000000000..071c0349c2f5 --- /dev/null +++ b/core/lib/dal/.sqlx/query-27f58d66139d7fad29b2f31a4a1c836a8ffc0f71f082efca16d14ac0b897597d.json @@ -0,0 +1,16 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE\n tee_proof_generation_details\n SET\n status = $1,\n updated_at = NOW()\n WHERE\n l1_batch_number = $2\n AND tee_type = $3\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Text", + "Int8", + "Text" + ] + }, + "nullable": [] + }, + "hash": "27f58d66139d7fad29b2f31a4a1c836a8ffc0f71f082efca16d14ac0b897597d" +} diff --git a/core/lib/dal/.sqlx/query-281ccf6f99d9e3c5e9eb29de437aaf3a07530a8d8b6787e20ebafd344c01ba65.json b/core/lib/dal/.sqlx/query-281ccf6f99d9e3c5e9eb29de437aaf3a07530a8d8b6787e20ebafd344c01ba65.json new file mode 100644 index 000000000000..a2d0a0614886 --- /dev/null +++ b/core/lib/dal/.sqlx/query-281ccf6f99d9e3c5e9eb29de437aaf3a07530a8d8b6787e20ebafd344c01ba65.json @@ -0,0 +1,15 @@ +{ + "db_name": "PostgreSQL", + "query": "\n DELETE FROM\n EVENTS\n WHERE\n miniblock_number BETWEEN $1 AND $2\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8", + "Int8" + ] + }, + "nullable": [] + }, + "hash": "281ccf6f99d9e3c5e9eb29de437aaf3a07530a8d8b6787e20ebafd344c01ba65" +} diff --git a/core/lib/dal/.sqlx/query-293258ecb299be5f5e81696d14883f115cd97586bd795ee31f58fc14e56d58cb.json b/core/lib/dal/.sqlx/query-293258ecb299be5f5e81696d14883f115cd97586bd795ee31f58fc14e56d58cb.json deleted file mode 100644 index 2b07c3b02e04..000000000000 --- a/core/lib/dal/.sqlx/query-293258ecb299be5f5e81696d14883f115cd97586bd795ee31f58fc14e56d58cb.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n DELETE FROM events\n WHERE\n miniblock_number > $1\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8" - ] - }, - "nullable": [] - }, - "hash": "293258ecb299be5f5e81696d14883f115cd97586bd795ee31f58fc14e56d58cb" -} diff --git a/core/lib/dal/.sqlx/query-29a9350164fc0b2983f753e105a70e583b455383eec526eee3acfe6670e30f2f.json b/core/lib/dal/.sqlx/query-29a9350164fc0b2983f753e105a70e583b455383eec526eee3acfe6670e30f2f.json deleted file mode 100644 index 7582e0f64e75..000000000000 --- a/core/lib/dal/.sqlx/query-29a9350164fc0b2983f753e105a70e583b455383eec526eee3acfe6670e30f2f.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE miniblocks\n SET\n logs_bloom = data.logs_bloom\n FROM\n (\n SELECT\n UNNEST($1::BIGINT[]) AS number,\n UNNEST($2::BYTEA[]) AS logs_bloom\n ) AS data\n WHERE\n miniblocks.number = data.number\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8Array", - "ByteaArray" - ] - }, - "nullable": [] - }, - "hash": "29a9350164fc0b2983f753e105a70e583b455383eec526eee3acfe6670e30f2f" -} diff --git a/core/lib/dal/.sqlx/query-2af4a147c9172bcb6dfcd1c9808bfcde52f6856c4aaacb55fd7250823368c4a1.json b/core/lib/dal/.sqlx/query-2af4a147c9172bcb6dfcd1c9808bfcde52f6856c4aaacb55fd7250823368c4a1.json new file mode 100644 index 000000000000..2bf1354ffec5 --- /dev/null +++ b/core/lib/dal/.sqlx/query-2af4a147c9172bcb6dfcd1c9808bfcde52f6856c4aaacb55fd7250823368c4a1.json @@ -0,0 +1,14 @@ +{ + "db_name": "PostgreSQL", + "query": "\n DELETE FROM\n l2_to_l1_logs\n WHERE\n miniblock_number > $1\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8" + ] + }, + "nullable": [] + }, + "hash": "2af4a147c9172bcb6dfcd1c9808bfcde52f6856c4aaacb55fd7250823368c4a1" +} diff --git a/core/lib/dal/.sqlx/query-2b1aa207a058f66265acf2c21b8ed5d8007789c0fc1eab948f6d7339dfb69147.json b/core/lib/dal/.sqlx/query-2b1aa207a058f66265acf2c21b8ed5d8007789c0fc1eab948f6d7339dfb69147.json deleted file mode 100644 index 96b48892516d..000000000000 --- a/core/lib/dal/.sqlx/query-2b1aa207a058f66265acf2c21b8ed5d8007789c0fc1eab948f6d7339dfb69147.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n DELETE FROM transactions\n WHERE\n miniblock_number IS NULL\n AND received_at < NOW() - $1::INTERVAL\n AND is_priority = FALSE\n AND error IS NULL\n RETURNING\n hash\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "hash", - "type_info": "Bytea" - } - ], - "parameters": { - "Left": [ - "Interval" - ] - }, - "nullable": [ - false - ] - }, - "hash": "2b1aa207a058f66265acf2c21b8ed5d8007789c0fc1eab948f6d7339dfb69147" -} diff --git a/core/lib/dal/.sqlx/query-2bb702d1f3bb935fd0f447ffb6bfc5bccba61861c6f6a1e807d210b25c5af830.json b/core/lib/dal/.sqlx/query-2bb702d1f3bb935fd0f447ffb6bfc5bccba61861c6f6a1e807d210b25c5af830.json new file mode 100644 index 000000000000..aef1ae8fa945 --- /dev/null +++ b/core/lib/dal/.sqlx/query-2bb702d1f3bb935fd0f447ffb6bfc5bccba61861c6f6a1e807d210b25c5af830.json @@ -0,0 +1,14 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE\n transactions\n SET\n in_mempool = FALSE\n FROM\n UNNEST($1 :: bytea []) AS s (address)\n WHERE\n transactions.in_mempool = TRUE\n AND transactions.initiator_address = s.address\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "ByteaArray" + ] + }, + "nullable": [] + }, + "hash": "2bb702d1f3bb935fd0f447ffb6bfc5bccba61861c6f6a1e807d210b25c5af830" +} diff --git a/core/lib/dal/.sqlx/query-2c71a819c6ed22a3ab79675840e00f7b1176d59a83520288f5428b67ebd52130.json b/core/lib/dal/.sqlx/query-2c71a819c6ed22a3ab79675840e00f7b1176d59a83520288f5428b67ebd52130.json deleted file mode 100644 index e8e6d8e760b4..000000000000 --- a/core/lib/dal/.sqlx/query-2c71a819c6ed22a3ab79675840e00f7b1176d59a83520288f5428b67ebd52130.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n DELETE FROM initial_writes\n WHERE\n l1_batch_number > $1\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8" - ] - }, - "nullable": [] - }, - "hash": "2c71a819c6ed22a3ab79675840e00f7b1176d59a83520288f5428b67ebd52130" -} diff --git a/core/lib/dal/.sqlx/query-2ffa321700ef1f70a1c3f516f3162af196d586cc08ea0f23d2c568527e94b41d.json b/core/lib/dal/.sqlx/query-2ffa321700ef1f70a1c3f516f3162af196d586cc08ea0f23d2c568527e94b41d.json deleted file mode 100644 index a273eb249a4e..000000000000 --- a/core/lib/dal/.sqlx/query-2ffa321700ef1f70a1c3f516f3162af196d586cc08ea0f23d2c568527e94b41d.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n DELETE FROM tee_verifier_input_producer_jobs\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [] - }, - "nullable": [] - }, - "hash": "2ffa321700ef1f70a1c3f516f3162af196d586cc08ea0f23d2c568527e94b41d" -} diff --git a/core/lib/dal/.sqlx/query-307f15e00a97440868189f25e4487ed365c0369f94bc457cb162a5c876a123c7.json b/core/lib/dal/.sqlx/query-307f15e00a97440868189f25e4487ed365c0369f94bc457cb162a5c876a123c7.json deleted file mode 100644 index 6c55bf34eabb..000000000000 --- a/core/lib/dal/.sqlx/query-307f15e00a97440868189f25e4487ed365c0369f94bc457cb162a5c876a123c7.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n commitments (l1_batch_number, events_queue_commitment, bootloader_initial_content_commitment)\n VALUES\n ($1, $2, $3)\n ON CONFLICT (l1_batch_number) DO NOTHING\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8", - "Bytea", - "Bytea" - ] - }, - "nullable": [] - }, - "hash": "307f15e00a97440868189f25e4487ed365c0369f94bc457cb162a5c876a123c7" -} diff --git a/core/lib/dal/.sqlx/query-3099a2329d130d003bc781f5dcd2db755007951ab826147a7d5d001f12b991c6.json b/core/lib/dal/.sqlx/query-3099a2329d130d003bc781f5dcd2db755007951ab826147a7d5d001f12b991c6.json new file mode 100644 index 000000000000..88fce3bb84b3 --- /dev/null +++ b/core/lib/dal/.sqlx/query-3099a2329d130d003bc781f5dcd2db755007951ab826147a7d5d001f12b991c6.json @@ -0,0 +1,15 @@ +{ + "db_name": "PostgreSQL", + "query": "\n INSERT INTO\n l1_batches_consensus (\n l1_batch_number,\n certificate,\n updated_at,\n created_at\n )\n VALUES\n ($1, $2, NOW(), NOW())\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8", + "Jsonb" + ] + }, + "nullable": [] + }, + "hash": "3099a2329d130d003bc781f5dcd2db755007951ab826147a7d5d001f12b991c6" +} diff --git a/core/lib/dal/.sqlx/query-26bc9b315c4c57bcff1f46da956727233a36e018fe5c0651995b876053a6a054.json b/core/lib/dal/.sqlx/query-30ccd33a8bf7ac28fe510e15e360be225db5f8165acf1d617d0c31e8c47bab33.json similarity index 86% rename from core/lib/dal/.sqlx/query-26bc9b315c4c57bcff1f46da956727233a36e018fe5c0651995b876053a6a054.json rename to core/lib/dal/.sqlx/query-30ccd33a8bf7ac28fe510e15e360be225db5f8165acf1d617d0c31e8c47bab33.json index 8653732e45c1..8cbcb627d1c4 100644 --- a/core/lib/dal/.sqlx/query-26bc9b315c4c57bcff1f46da956727233a36e018fe5c0651995b876053a6a054.json +++ b/core/lib/dal/.sqlx/query-30ccd33a8bf7ac28fe510e15e360be225db5f8165acf1d617d0c31e8c47bab33.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT\n address,\n topic1,\n topic2,\n topic3,\n topic4,\n value,\n event_index_in_tx\n FROM\n events\n WHERE\n miniblock_number BETWEEN $1 AND $2\n ORDER BY\n miniblock_number ASC,\n event_index_in_block ASC\n ", + "query": "\n SELECT\n address,\n topic1,\n topic2,\n topic3,\n topic4,\n value,\n event_index_in_tx\n FROM\n EVENTS\n WHERE\n miniblock_number BETWEEN $1 AND $2\n ORDER BY\n miniblock_number ASC,\n event_index_in_block ASC\n ", "describe": { "columns": [ { @@ -55,5 +55,5 @@ false ] }, - "hash": "26bc9b315c4c57bcff1f46da956727233a36e018fe5c0651995b876053a6a054" + "hash": "30ccd33a8bf7ac28fe510e15e360be225db5f8165acf1d617d0c31e8c47bab33" } diff --git a/core/lib/dal/.sqlx/query-311d0357c22163b893dc91f2b080f2ede5e22b0bbd8bc910cb36a91ed992bde1.json b/core/lib/dal/.sqlx/query-311d0357c22163b893dc91f2b080f2ede5e22b0bbd8bc910cb36a91ed992bde1.json deleted file mode 100644 index cabe0a3dc557..000000000000 --- a/core/lib/dal/.sqlx/query-311d0357c22163b893dc91f2b080f2ede5e22b0bbd8bc910cb36a91ed992bde1.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n l1_batches_consensus (l1_batch_number, certificate, updated_at, created_at)\n VALUES\n ($1, $2, NOW(), NOW())\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8", - "Jsonb" - ] - }, - "nullable": [] - }, - "hash": "311d0357c22163b893dc91f2b080f2ede5e22b0bbd8bc910cb36a91ed992bde1" -} diff --git a/core/lib/dal/.sqlx/query-3125669226682212fdc06c0145614be23e4bde145064157427e7c74e7facda30.json b/core/lib/dal/.sqlx/query-3125669226682212fdc06c0145614be23e4bde145064157427e7c74e7facda30.json new file mode 100644 index 000000000000..5fa33bd7d188 --- /dev/null +++ b/core/lib/dal/.sqlx/query-3125669226682212fdc06c0145614be23e4bde145064157427e7c74e7facda30.json @@ -0,0 +1,14 @@ +{ + "db_name": "PostgreSQL", + "query": "\n DELETE FROM\n l1_batches\n WHERE\n number > $1\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8" + ] + }, + "nullable": [] + }, + "hash": "3125669226682212fdc06c0145614be23e4bde145064157427e7c74e7facda30" +} diff --git a/core/lib/dal/.sqlx/query-335474e43a63dd08d362f5c7122b57ecda488eb062fcacbb59bd6d00b2c7703e.json b/core/lib/dal/.sqlx/query-335474e43a63dd08d362f5c7122b57ecda488eb062fcacbb59bd6d00b2c7703e.json new file mode 100644 index 000000000000..68fc3dcf6ed8 --- /dev/null +++ b/core/lib/dal/.sqlx/query-335474e43a63dd08d362f5c7122b57ecda488eb062fcacbb59bd6d00b2c7703e.json @@ -0,0 +1,14 @@ +{ + "db_name": "PostgreSQL", + "query": "\n INSERT INTO\n vm_runner_bwip (\n l1_batch_number,\n created_at,\n updated_at,\n processing_started_at\n )\n VALUES\n ($1, NOW(), NOW(), NOW()) ON CONFLICT (l1_batch_number) DO\n UPDATE\n SET\n updated_at = NOW(),\n processing_started_at = NOW()\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8" + ] + }, + "nullable": [] + }, + "hash": "335474e43a63dd08d362f5c7122b57ecda488eb062fcacbb59bd6d00b2c7703e" +} diff --git a/core/lib/dal/.sqlx/query-33a78184559d0c0d13469fa799e2c5eeab06ff664141fa542229e7c9a46d4410.json b/core/lib/dal/.sqlx/query-33a78184559d0c0d13469fa799e2c5eeab06ff664141fa542229e7c9a46d4410.json deleted file mode 100644 index 6dcc1acfd358..000000000000 --- a/core/lib/dal/.sqlx/query-33a78184559d0c0d13469fa799e2c5eeab06ff664141fa542229e7c9a46d4410.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE transactions\n SET\n hash = data_table.hash,\n signature = data_table.signature,\n gas_limit = data_table.gas_limit,\n max_fee_per_gas = data_table.max_fee_per_gas,\n max_priority_fee_per_gas = data_table.max_priority_fee_per_gas,\n gas_per_pubdata_limit = data_table.gas_per_pubdata_limit,\n input = data_table.input,\n data = data_table.data,\n tx_format = data_table.tx_format,\n miniblock_number = $21,\n index_in_block = data_table.index_in_block,\n error = NULLIF(data_table.error, ''),\n effective_gas_price = data_table.effective_gas_price,\n execution_info = data_table.new_execution_info,\n refunded_gas = data_table.refunded_gas,\n value = data_table.value,\n contract_address = data_table.contract_address,\n paymaster = data_table.paymaster,\n paymaster_input = data_table.paymaster_input,\n in_mempool = FALSE,\n updated_at = NOW()\n FROM\n (\n SELECT\n data_table_temp.*\n FROM\n (\n SELECT\n UNNEST($1::bytea[]) AS initiator_address,\n UNNEST($2::INT[]) AS nonce,\n UNNEST($3::bytea[]) AS hash,\n UNNEST($4::bytea[]) AS signature,\n UNNEST($5::NUMERIC[]) AS gas_limit,\n UNNEST($6::NUMERIC[]) AS max_fee_per_gas,\n UNNEST($7::NUMERIC[]) AS max_priority_fee_per_gas,\n UNNEST($8::NUMERIC[]) AS gas_per_pubdata_limit,\n UNNEST($9::INT[]) AS tx_format,\n UNNEST($10::INTEGER[]) AS index_in_block,\n UNNEST($11::VARCHAR[]) AS error,\n UNNEST($12::NUMERIC[]) AS effective_gas_price,\n UNNEST($13::jsonb[]) AS new_execution_info,\n UNNEST($14::bytea[]) AS input,\n UNNEST($15::jsonb[]) AS data,\n UNNEST($16::BIGINT[]) AS refunded_gas,\n UNNEST($17::NUMERIC[]) AS value,\n UNNEST($18::bytea[]) AS contract_address,\n UNNEST($19::bytea[]) AS paymaster,\n UNNEST($20::bytea[]) AS paymaster_input\n ) AS data_table_temp\n JOIN transactions ON transactions.initiator_address = data_table_temp.initiator_address\n AND transactions.nonce = data_table_temp.nonce\n ORDER BY\n transactions.hash\n ) AS data_table\n WHERE\n transactions.initiator_address = data_table.initiator_address\n AND transactions.nonce = data_table.nonce\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "ByteaArray", - "Int4Array", - "ByteaArray", - "ByteaArray", - "NumericArray", - "NumericArray", - "NumericArray", - "NumericArray", - "Int4Array", - "Int4Array", - "VarcharArray", - "NumericArray", - "JsonbArray", - "ByteaArray", - "JsonbArray", - "Int8Array", - "NumericArray", - "ByteaArray", - "ByteaArray", - "ByteaArray", - "Int8" - ] - }, - "nullable": [] - }, - "hash": "33a78184559d0c0d13469fa799e2c5eeab06ff664141fa542229e7c9a46d4410" -} diff --git a/core/lib/dal/.sqlx/query-a71a87d91dcf0f624dbd64eb8828f65ff83204ebab2ea31847ae305a098823b0.json b/core/lib/dal/.sqlx/query-340c154ee5969dbcdf87b1f268236a186c539fe34c9893c51018687ae0ca01b5.json similarity index 70% rename from core/lib/dal/.sqlx/query-a71a87d91dcf0f624dbd64eb8828f65ff83204ebab2ea31847ae305a098823b0.json rename to core/lib/dal/.sqlx/query-340c154ee5969dbcdf87b1f268236a186c539fe34c9893c51018687ae0ca01b5.json index 272f20e5268a..b8230dbbb898 100644 --- a/core/lib/dal/.sqlx/query-a71a87d91dcf0f624dbd64eb8828f65ff83204ebab2ea31847ae305a098823b0.json +++ b/core/lib/dal/.sqlx/query-340c154ee5969dbcdf87b1f268236a186c539fe34c9893c51018687ae0ca01b5.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT\n *\n FROM\n eth_txs\n WHERE\n from_addr IS NOT DISTINCT FROM $1 -- can't just use equality as NULL != NULL\n AND confirmed_eth_tx_history_id IS NULL\n AND is_gateway = $2\n AND id <= (\n SELECT\n COALESCE(MAX(eth_tx_id), 0)\n FROM\n eth_txs_history\n JOIN eth_txs ON eth_txs.id = eth_txs_history.eth_tx_id\n WHERE\n eth_txs_history.sent_at_block IS NOT NULL\n AND eth_txs.from_addr IS NOT DISTINCT FROM $1\n AND is_gateway = $2\n )\n ORDER BY\n id\n ", + "query": "\n SELECT\n *\n FROM\n eth_txs\n WHERE\n from_addr IS NOT DISTINCT\n FROM\n $1 -- can't just use equality as NULL != NULL\n AND confirmed_eth_tx_history_id IS NULL\n AND is_gateway = $2\n AND id <= (\n SELECT\n COALESCE(MAX(eth_tx_id), 0)\n FROM\n eth_txs_history\n JOIN eth_txs ON eth_txs.id = eth_txs_history.eth_tx_id\n WHERE\n eth_txs_history.sent_at_block IS NOT NULL\n AND eth_txs.from_addr IS NOT DISTINCT\n FROM\n $1\n AND is_gateway = $2\n )\n ORDER BY\n id\n ", "describe": { "columns": [ { @@ -109,5 +109,5 @@ true ] }, - "hash": "a71a87d91dcf0f624dbd64eb8828f65ff83204ebab2ea31847ae305a098823b0" + "hash": "340c154ee5969dbcdf87b1f268236a186c539fe34c9893c51018687ae0ca01b5" } diff --git a/core/lib/dal/.sqlx/query-346d2bc8ba252a17d5d0918e1b7ae976ea533143b0eb0644612e926624d710f0.json b/core/lib/dal/.sqlx/query-346d2bc8ba252a17d5d0918e1b7ae976ea533143b0eb0644612e926624d710f0.json new file mode 100644 index 000000000000..5eb6fed45aec --- /dev/null +++ b/core/lib/dal/.sqlx/query-346d2bc8ba252a17d5d0918e1b7ae976ea533143b0eb0644612e926624d710f0.json @@ -0,0 +1,12 @@ +{ + "db_name": "PostgreSQL", + "query": "\n DELETE FROM\n eth_txs\n WHERE\n id >= (\n SELECT\n MIN(id)\n FROM\n eth_txs\n WHERE\n has_failed = TRUE\n )\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [] + }, + "nullable": [] + }, + "hash": "346d2bc8ba252a17d5d0918e1b7ae976ea533143b0eb0644612e926624d710f0" +} diff --git a/core/lib/dal/.sqlx/query-369736a602fe2ebf7392ca171581d5b68fb9450d17372701907905bb74af844a.json b/core/lib/dal/.sqlx/query-369736a602fe2ebf7392ca171581d5b68fb9450d17372701907905bb74af844a.json new file mode 100644 index 000000000000..2a8279ede649 --- /dev/null +++ b/core/lib/dal/.sqlx/query-369736a602fe2ebf7392ca171581d5b68fb9450d17372701907905bb74af844a.json @@ -0,0 +1,14 @@ +{ + "db_name": "PostgreSQL", + "query": "\n DELETE FROM\n transactions\n WHERE\n in_mempool = TRUE\n AND initiator_address = ANY ($1)\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "ByteaArray" + ] + }, + "nullable": [] + }, + "hash": "369736a602fe2ebf7392ca171581d5b68fb9450d17372701907905bb74af844a" +} diff --git a/core/lib/dal/.sqlx/query-ada54322a28012b1b761f3631c4cd6ca26aa2fa565fcf208b6985f461c1868f2.json b/core/lib/dal/.sqlx/query-37294ec4a7b7ac48ccaecaaf96166fc91f2969fd0f108d72debe703e95855298.json similarity index 50% rename from core/lib/dal/.sqlx/query-ada54322a28012b1b761f3631c4cd6ca26aa2fa565fcf208b6985f461c1868f2.json rename to core/lib/dal/.sqlx/query-37294ec4a7b7ac48ccaecaaf96166fc91f2969fd0f108d72debe703e95855298.json index 04fde45469fa..29080995d055 100644 --- a/core/lib/dal/.sqlx/query-ada54322a28012b1b761f3631c4cd6ca26aa2fa565fcf208b6985f461c1868f2.json +++ b/core/lib/dal/.sqlx/query-37294ec4a7b7ac48ccaecaaf96166fc91f2969fd0f108d72debe703e95855298.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n UPDATE eth_txs_history\n SET\n updated_at = NOW(),\n confirmed_at = NOW()\n WHERE\n tx_hash = $1\n RETURNING\n id,\n eth_tx_id\n ", + "query": "\n UPDATE\n eth_txs_history\n SET\n updated_at = NOW(),\n confirmed_at = NOW()\n WHERE\n tx_hash = $1\n RETURNING\n id,\n eth_tx_id\n ", "describe": { "columns": [ { @@ -24,5 +24,5 @@ false ] }, - "hash": "ada54322a28012b1b761f3631c4cd6ca26aa2fa565fcf208b6985f461c1868f2" + "hash": "37294ec4a7b7ac48ccaecaaf96166fc91f2969fd0f108d72debe703e95855298" } diff --git a/core/lib/dal/.sqlx/query-2d8da95804a7a300ff2b756e6785c0665ee3ea4086ddb91428fa1b6a00760737.json b/core/lib/dal/.sqlx/query-375bfcf94a885ea91295da97a8a8f9db6cd67629c9d987f1ed7da6bdb341edfd.json similarity index 90% rename from core/lib/dal/.sqlx/query-2d8da95804a7a300ff2b756e6785c0665ee3ea4086ddb91428fa1b6a00760737.json rename to core/lib/dal/.sqlx/query-375bfcf94a885ea91295da97a8a8f9db6cd67629c9d987f1ed7da6bdb341edfd.json index 8b8cef7dd77e..2968c1504b76 100644 --- a/core/lib/dal/.sqlx/query-2d8da95804a7a300ff2b756e6785c0665ee3ea4086ddb91428fa1b6a00760737.json +++ b/core/lib/dal/.sqlx/query-375bfcf94a885ea91295da97a8a8f9db6cd67629c9d987f1ed7da6bdb341edfd.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT DISTINCT\n ON (hashed_key) hashed_key,\n miniblock_number,\n value\n FROM\n storage_logs\n WHERE\n hashed_key = ANY ($1)\n AND miniblock_number <= $2\n AND miniblock_number <= COALESCE(\n (\n SELECT\n MAX(number)\n FROM\n miniblocks\n ),\n (\n SELECT\n miniblock_number\n FROM\n snapshot_recovery\n )\n )\n ORDER BY\n hashed_key,\n miniblock_number DESC,\n operation_number DESC\n ", + "query": "\n SELECT\n DISTINCT ON (hashed_key) hashed_key,\n miniblock_number,\n value\n FROM\n storage_logs\n WHERE\n hashed_key = ANY ($1)\n AND miniblock_number <= $2\n AND miniblock_number <= COALESCE(\n (\n SELECT\n MAX(number)\n FROM\n miniblocks\n ),\n (\n SELECT\n miniblock_number\n FROM\n snapshot_recovery\n )\n )\n ORDER BY\n hashed_key,\n miniblock_number DESC,\n operation_number DESC\n ", "describe": { "columns": [ { @@ -31,5 +31,5 @@ false ] }, - "hash": "2d8da95804a7a300ff2b756e6785c0665ee3ea4086ddb91428fa1b6a00760737" + "hash": "375bfcf94a885ea91295da97a8a8f9db6cd67629c9d987f1ed7da6bdb341edfd" } diff --git a/core/lib/dal/.sqlx/query-380b3a40db65f66f502cc7e696254682bd852c4a54387f92b3f633b5a5899c93.json b/core/lib/dal/.sqlx/query-380b3a40db65f66f502cc7e696254682bd852c4a54387f92b3f633b5a5899c93.json new file mode 100644 index 000000000000..58bee6e42eec --- /dev/null +++ b/core/lib/dal/.sqlx/query-380b3a40db65f66f502cc7e696254682bd852c4a54387f92b3f633b5a5899c93.json @@ -0,0 +1,14 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE\n tokens\n SET\n well_known = TRUE,\n updated_at = NOW()\n WHERE\n l1_address = $1\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Bytea" + ] + }, + "nullable": [] + }, + "hash": "380b3a40db65f66f502cc7e696254682bd852c4a54387f92b3f633b5a5899c93" +} diff --git a/core/lib/dal/.sqlx/query-39415f0debcf35d8cd85b04866861c816f583c69a64b7768887ecce434b829fd.json b/core/lib/dal/.sqlx/query-39415f0debcf35d8cd85b04866861c816f583c69a64b7768887ecce434b829fd.json new file mode 100644 index 000000000000..831782fdbd19 --- /dev/null +++ b/core/lib/dal/.sqlx/query-39415f0debcf35d8cd85b04866861c816f583c69a64b7768887ecce434b829fd.json @@ -0,0 +1,14 @@ +{ + "db_name": "PostgreSQL", + "query": "\n DELETE FROM\n tokens\n WHERE\n l2_address = ANY ($1)\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "ByteaArray" + ] + }, + "nullable": [] + }, + "hash": "39415f0debcf35d8cd85b04866861c816f583c69a64b7768887ecce434b829fd" +} diff --git a/core/lib/dal/.sqlx/query-3a6417f3ac8889a8db762d1f1820c1f7b0d68b747e3a75a63d60ccd0982c7fde.json b/core/lib/dal/.sqlx/query-3a6417f3ac8889a8db762d1f1820c1f7b0d68b747e3a75a63d60ccd0982c7fde.json new file mode 100644 index 000000000000..cff34c9d5af3 --- /dev/null +++ b/core/lib/dal/.sqlx/query-3a6417f3ac8889a8db762d1f1820c1f7b0d68b747e3a75a63d60ccd0982c7fde.json @@ -0,0 +1,14 @@ +{ + "db_name": "PostgreSQL", + "query": "\n DELETE FROM\n l1_batches\n WHERE\n number <= $1\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8" + ] + }, + "nullable": [] + }, + "hash": "3a6417f3ac8889a8db762d1f1820c1f7b0d68b747e3a75a63d60ccd0982c7fde" +} diff --git a/core/lib/dal/.sqlx/query-3a82d9a45f4a90b8baf82f3e281618217af059a796e4a3cc0f5269709f7ffd49.json b/core/lib/dal/.sqlx/query-3a82d9a45f4a90b8baf82f3e281618217af059a796e4a3cc0f5269709f7ffd49.json deleted file mode 100644 index cb33b4c64874..000000000000 --- a/core/lib/dal/.sqlx/query-3a82d9a45f4a90b8baf82f3e281618217af059a796e4a3cc0f5269709f7ffd49.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n DELETE FROM l1_batches\n WHERE\n number <= $1\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8" - ] - }, - "nullable": [] - }, - "hash": "3a82d9a45f4a90b8baf82f3e281618217af059a796e4a3cc0f5269709f7ffd49" -} diff --git a/core/lib/dal/.sqlx/query-3b4d5009ec22f54cc7d305aa11d96ec397767a063dc21aa3add974cb9b070361.json b/core/lib/dal/.sqlx/query-3b4d5009ec22f54cc7d305aa11d96ec397767a063dc21aa3add974cb9b070361.json deleted file mode 100644 index 38890ae58f2e..000000000000 --- a/core/lib/dal/.sqlx/query-3b4d5009ec22f54cc7d305aa11d96ec397767a063dc21aa3add974cb9b070361.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n factory_deps (bytecode_hash, bytecode, miniblock_number, created_at, updated_at)\n SELECT\n u.bytecode_hash,\n u.bytecode,\n $3,\n NOW(),\n NOW()\n FROM\n UNNEST($1::bytea[], $2::bytea[]) AS u (bytecode_hash, bytecode)\n ON CONFLICT (bytecode_hash) DO NOTHING\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "ByteaArray", - "ByteaArray", - "Int8" - ] - }, - "nullable": [] - }, - "hash": "3b4d5009ec22f54cc7d305aa11d96ec397767a063dc21aa3add974cb9b070361" -} diff --git a/core/lib/dal/.sqlx/query-bfc84bcf0985446b337467dd1da709dbee508ad6d1cae43e477cf1bef8cb4aa9.json b/core/lib/dal/.sqlx/query-3d19e75e0e224679c3f30e67a2a53ff4b3462b42ca731963eca0e46997527ae3.json similarity index 75% rename from core/lib/dal/.sqlx/query-bfc84bcf0985446b337467dd1da709dbee508ad6d1cae43e477cf1bef8cb4aa9.json rename to core/lib/dal/.sqlx/query-3d19e75e0e224679c3f30e67a2a53ff4b3462b42ca731963eca0e46997527ae3.json index 8079d52a7036..5eeb8fecdfde 100644 --- a/core/lib/dal/.sqlx/query-bfc84bcf0985446b337467dd1da709dbee508ad6d1cae43e477cf1bef8cb4aa9.json +++ b/core/lib/dal/.sqlx/query-3d19e75e0e224679c3f30e67a2a53ff4b3462b42ca731963eca0e46997527ae3.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT DISTINCT\n hashed_key\n FROM\n storage_logs\n WHERE\n miniblock_number BETWEEN $1 AND $2\n ", + "query": "\n SELECT\n DISTINCT hashed_key\n FROM\n storage_logs\n WHERE\n miniblock_number BETWEEN $1 AND $2\n ", "describe": { "columns": [ { @@ -19,5 +19,5 @@ false ] }, - "hash": "bfc84bcf0985446b337467dd1da709dbee508ad6d1cae43e477cf1bef8cb4aa9" + "hash": "3d19e75e0e224679c3f30e67a2a53ff4b3462b42ca731963eca0e46997527ae3" } diff --git a/core/lib/dal/.sqlx/query-3ea010bc3e3267e48decf025cb99b3253ea21b3eac3c1df1921e040e3f059aac.json b/core/lib/dal/.sqlx/query-3ea010bc3e3267e48decf025cb99b3253ea21b3eac3c1df1921e040e3f059aac.json new file mode 100644 index 000000000000..5b40796b21db --- /dev/null +++ b/core/lib/dal/.sqlx/query-3ea010bc3e3267e48decf025cb99b3253ea21b3eac3c1df1921e040e3f059aac.json @@ -0,0 +1,12 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE\n transactions\n SET\n in_mempool = FALSE\n WHERE\n in_mempool = TRUE\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [] + }, + "nullable": [] + }, + "hash": "3ea010bc3e3267e48decf025cb99b3253ea21b3eac3c1df1921e040e3f059aac" +} diff --git a/core/lib/dal/.sqlx/query-3f0966f082e9e7cdfa18c107a1283b7955a058705093d7372726c3fc7ce506ad.json b/core/lib/dal/.sqlx/query-3f0966f082e9e7cdfa18c107a1283b7955a058705093d7372726c3fc7ce506ad.json deleted file mode 100644 index 7b95614bfdff..000000000000 --- a/core/lib/dal/.sqlx/query-3f0966f082e9e7cdfa18c107a1283b7955a058705093d7372726c3fc7ce506ad.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE vm_runner_protective_reads\n SET\n time_taken = NOW() - processing_started_at\n WHERE\n l1_batch_number = $1\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8" - ] - }, - "nullable": [] - }, - "hash": "3f0966f082e9e7cdfa18c107a1283b7955a058705093d7372726c3fc7ce506ad" -} diff --git a/core/lib/dal/.sqlx/query-3f9543c622a3877dd8612f3fc5f31867b3c0bff34bbacbc31ff4cd786c97ca90.json b/core/lib/dal/.sqlx/query-3f9543c622a3877dd8612f3fc5f31867b3c0bff34bbacbc31ff4cd786c97ca90.json deleted file mode 100644 index 72d008c11475..000000000000 --- a/core/lib/dal/.sqlx/query-3f9543c622a3877dd8612f3fc5f31867b3c0bff34bbacbc31ff4cd786c97ca90.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n DELETE FROM l1_batches_consensus\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [] - }, - "nullable": [] - }, - "hash": "3f9543c622a3877dd8612f3fc5f31867b3c0bff34bbacbc31ff4cd786c97ca90" -} diff --git a/core/lib/dal/.sqlx/query-3fc77acab04760b40d49ffe42e616b8b569a196df3ebf75ee779665ec53d1187.json b/core/lib/dal/.sqlx/query-3fc77acab04760b40d49ffe42e616b8b569a196df3ebf75ee779665ec53d1187.json new file mode 100644 index 000000000000..57710d380a5a --- /dev/null +++ b/core/lib/dal/.sqlx/query-3fc77acab04760b40d49ffe42e616b8b569a196df3ebf75ee779665ec53d1187.json @@ -0,0 +1,38 @@ +{ + "db_name": "PostgreSQL", + "query": "\n WITH soft AS (\n SELECT\n pruned_l1_batch,\n pruned_miniblock\n FROM\n pruning_log\n WHERE\n TYPE = 'Soft'\n ORDER BY\n pruned_l1_batch DESC\n LIMIT\n 1\n ), hard AS (\n SELECT\n pruned_l1_batch,\n pruned_miniblock\n FROM\n pruning_log\n WHERE\n TYPE = 'Hard'\n ORDER BY\n pruned_l1_batch DESC\n LIMIT\n 1\n )\n SELECT\n soft.pruned_l1_batch AS last_soft_pruned_l1_batch,\n soft.pruned_miniblock AS last_soft_pruned_miniblock,\n hard.pruned_l1_batch AS last_hard_pruned_l1_batch,\n hard.pruned_miniblock AS last_hard_pruned_miniblock\n FROM\n soft FULL\n JOIN hard ON TRUE\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "last_soft_pruned_l1_batch", + "type_info": "Int8" + }, + { + "ordinal": 1, + "name": "last_soft_pruned_miniblock", + "type_info": "Int8" + }, + { + "ordinal": 2, + "name": "last_hard_pruned_l1_batch", + "type_info": "Int8" + }, + { + "ordinal": 3, + "name": "last_hard_pruned_miniblock", + "type_info": "Int8" + } + ], + "parameters": { + "Left": [] + }, + "nullable": [ + true, + true, + true, + true + ] + }, + "hash": "3fc77acab04760b40d49ffe42e616b8b569a196df3ebf75ee779665ec53d1187" +} diff --git a/core/lib/dal/.sqlx/query-404dca0439d8c2682848049026d6e4da6574f78094cbbc8eb27b9b273a96aa10.json b/core/lib/dal/.sqlx/query-404dca0439d8c2682848049026d6e4da6574f78094cbbc8eb27b9b273a96aa10.json new file mode 100644 index 000000000000..152eff7d7706 --- /dev/null +++ b/core/lib/dal/.sqlx/query-404dca0439d8c2682848049026d6e4da6574f78094cbbc8eb27b9b273a96aa10.json @@ -0,0 +1,14 @@ +{ + "db_name": "PostgreSQL", + "query": "\n DELETE FROM\n vm_runner_bwip\n WHERE\n l1_batch_number > $1\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8" + ] + }, + "nullable": [] + }, + "hash": "404dca0439d8c2682848049026d6e4da6574f78094cbbc8eb27b9b273a96aa10" +} diff --git a/core/lib/dal/.sqlx/query-414749a3d8d1ac4f2c66b386df47d113257cca7a7fc6c8036b61cc0e005099a8.json b/core/lib/dal/.sqlx/query-414749a3d8d1ac4f2c66b386df47d113257cca7a7fc6c8036b61cc0e005099a8.json deleted file mode 100644 index e0c5103fac90..000000000000 --- a/core/lib/dal/.sqlx/query-414749a3d8d1ac4f2c66b386df47d113257cca7a7fc6c8036b61cc0e005099a8.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE tee_proof_generation_details\n SET\n status = $1,\n updated_at = NOW()\n WHERE\n l1_batch_number = $2\n AND tee_type = $3\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Text", - "Int8", - "Text" - ] - }, - "nullable": [] - }, - "hash": "414749a3d8d1ac4f2c66b386df47d113257cca7a7fc6c8036b61cc0e005099a8" -} diff --git a/core/lib/dal/.sqlx/query-45372b701c23ce782695f11f846a75893ee5b1b94b6d0f25f1db5342888a2a30.json b/core/lib/dal/.sqlx/query-45372b701c23ce782695f11f846a75893ee5b1b94b6d0f25f1db5342888a2a30.json deleted file mode 100644 index 0567a415ac16..000000000000 --- a/core/lib/dal/.sqlx/query-45372b701c23ce782695f11f846a75893ee5b1b94b6d0f25f1db5342888a2a30.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE eth_txs\n SET\n chain_id = $1\n WHERE\n id = $2\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8", - "Int4" - ] - }, - "nullable": [] - }, - "hash": "45372b701c23ce782695f11f846a75893ee5b1b94b6d0f25f1db5342888a2a30" -} diff --git a/core/lib/dal/.sqlx/query-466c76cff08259849d87d3596dad590df2d0633fb5e58f600fe5a87012bc998d.json b/core/lib/dal/.sqlx/query-466c76cff08259849d87d3596dad590df2d0633fb5e58f600fe5a87012bc998d.json new file mode 100644 index 000000000000..a8a23f222060 --- /dev/null +++ b/core/lib/dal/.sqlx/query-466c76cff08259849d87d3596dad590df2d0633fb5e58f600fe5a87012bc998d.json @@ -0,0 +1,15 @@ +{ + "db_name": "PostgreSQL", + "query": "\n WITH new_logs AS MATERIALIZED (\n SELECT\n DISTINCT ON (hashed_key) hashed_key,\n miniblock_number,\n operation_number\n FROM\n storage_logs\n WHERE\n miniblock_number BETWEEN $1 AND $2\n ORDER BY\n hashed_key,\n miniblock_number DESC,\n operation_number DESC\n )\n DELETE FROM\n storage_logs USING new_logs\n WHERE\n storage_logs.hashed_key = new_logs.hashed_key\n AND storage_logs.miniblock_number <= $2\n AND (\n storage_logs.miniblock_number,\n storage_logs.operation_number\n ) < (\n new_logs.miniblock_number,\n new_logs.operation_number\n )\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8", + "Int8" + ] + }, + "nullable": [] + }, + "hash": "466c76cff08259849d87d3596dad590df2d0633fb5e58f600fe5a87012bc998d" +} diff --git a/core/lib/dal/.sqlx/query-4694e5534f7d2a3b9a49d097ec659d96738d6bccaa175362cc554eddb3b26262.json b/core/lib/dal/.sqlx/query-4694e5534f7d2a3b9a49d097ec659d96738d6bccaa175362cc554eddb3b26262.json new file mode 100644 index 000000000000..76e3e5d4df62 --- /dev/null +++ b/core/lib/dal/.sqlx/query-4694e5534f7d2a3b9a49d097ec659d96738d6bccaa175362cc554eddb3b26262.json @@ -0,0 +1,14 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE\n contract_verification_requests\n SET\n status = 'successful',\n updated_at = NOW()\n WHERE\n id = $1\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8" + ] + }, + "nullable": [] + }, + "hash": "4694e5534f7d2a3b9a49d097ec659d96738d6bccaa175362cc554eddb3b26262" +} diff --git a/core/lib/dal/.sqlx/query-469db79fcf8d692507317080e0d843620210aff3a9a7aa8a249db50c1c56d927.json b/core/lib/dal/.sqlx/query-469db79fcf8d692507317080e0d843620210aff3a9a7aa8a249db50c1c56d927.json deleted file mode 100644 index fe91d27abb11..000000000000 --- a/core/lib/dal/.sqlx/query-469db79fcf8d692507317080e0d843620210aff3a9a7aa8a249db50c1c56d927.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE transactions\n SET\n miniblock_number = $1,\n index_in_block = data_table.index_in_block,\n error = NULLIF(data_table.error, ''),\n in_mempool = FALSE,\n execution_info = execution_info || data_table.new_execution_info,\n refunded_gas = data_table.refunded_gas,\n effective_gas_price = data_table.effective_gas_price,\n updated_at = NOW()\n FROM\n (\n SELECT\n UNNEST($2::bytea[]) AS hash,\n UNNEST($3::INTEGER[]) AS index_in_block,\n UNNEST($4::VARCHAR[]) AS error,\n UNNEST($5::jsonb[]) AS new_execution_info,\n UNNEST($6::BIGINT[]) AS refunded_gas,\n UNNEST($7::NUMERIC[]) AS effective_gas_price\n ) AS data_table\n WHERE\n transactions.hash = data_table.hash\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8", - "ByteaArray", - "Int4Array", - "VarcharArray", - "JsonbArray", - "Int8Array", - "NumericArray" - ] - }, - "nullable": [] - }, - "hash": "469db79fcf8d692507317080e0d843620210aff3a9a7aa8a249db50c1c56d927" -} diff --git a/core/lib/dal/.sqlx/query-482bee9b383b17bddf819b977a012e49a65da26212e6d676abffb9d137aa3c2e.json b/core/lib/dal/.sqlx/query-482bee9b383b17bddf819b977a012e49a65da26212e6d676abffb9d137aa3c2e.json deleted file mode 100644 index f0fca373443a..000000000000 --- a/core/lib/dal/.sqlx/query-482bee9b383b17bddf819b977a012e49a65da26212e6d676abffb9d137aa3c2e.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE miniblocks\n SET\n logs_bloom = NULL\n WHERE\n number = $1\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8" - ] - }, - "nullable": [] - }, - "hash": "482bee9b383b17bddf819b977a012e49a65da26212e6d676abffb9d137aa3c2e" -} diff --git a/core/lib/dal/.sqlx/query-4ae097f244938d39a735735f75b3b18a1bd18b922640d3ae70ae0b9bfde8effc.json b/core/lib/dal/.sqlx/query-4ae097f244938d39a735735f75b3b18a1bd18b922640d3ae70ae0b9bfde8effc.json new file mode 100644 index 000000000000..85024ecd8b8b --- /dev/null +++ b/core/lib/dal/.sqlx/query-4ae097f244938d39a735735f75b3b18a1bd18b922640d3ae70ae0b9bfde8effc.json @@ -0,0 +1,14 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE\n proof_generation_details\n SET\n status = 'unpicked',\n updated_at = NOW()\n WHERE\n l1_batch_number = $1\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8" + ] + }, + "nullable": [] + }, + "hash": "4ae097f244938d39a735735f75b3b18a1bd18b922640d3ae70ae0b9bfde8effc" +} diff --git a/core/lib/dal/.sqlx/query-4c33e5cc065a4d92ae94e01eeda43895c9a3cf9e0c52bd65c5eace2445c2249f.json b/core/lib/dal/.sqlx/query-4c33e5cc065a4d92ae94e01eeda43895c9a3cf9e0c52bd65c5eace2445c2249f.json new file mode 100644 index 000000000000..03d17462b2a7 --- /dev/null +++ b/core/lib/dal/.sqlx/query-4c33e5cc065a4d92ae94e01eeda43895c9a3cf9e0c52bd65c5eace2445c2249f.json @@ -0,0 +1,15 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE\n transactions\n SET\n error = $1,\n updated_at = NOW()\n WHERE\n hash = $2\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Varchar", + "Bytea" + ] + }, + "nullable": [] + }, + "hash": "4c33e5cc065a4d92ae94e01eeda43895c9a3cf9e0c52bd65c5eace2445c2249f" +} diff --git a/core/lib/dal/.sqlx/query-4c80d74f23341a08320f50f2e923fb92c099f0b71ecfabd33325cfd107f2fecf.json b/core/lib/dal/.sqlx/query-4c80d74f23341a08320f50f2e923fb92c099f0b71ecfabd33325cfd107f2fecf.json new file mode 100644 index 000000000000..6ce4d6761f84 --- /dev/null +++ b/core/lib/dal/.sqlx/query-4c80d74f23341a08320f50f2e923fb92c099f0b71ecfabd33325cfd107f2fecf.json @@ -0,0 +1,16 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE\n miniblocks\n SET\n protocol_version = $1\n WHERE\n number BETWEEN $2 AND $3\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int4", + "Int8", + "Int8" + ] + }, + "nullable": [] + }, + "hash": "4c80d74f23341a08320f50f2e923fb92c099f0b71ecfabd33325cfd107f2fecf" +} diff --git a/core/lib/dal/.sqlx/query-4ec3bdb8a51f9e9dae77e545c4d182ca8e746122e42f448a7f349a234e6ab594.json b/core/lib/dal/.sqlx/query-4ec3bdb8a51f9e9dae77e545c4d182ca8e746122e42f448a7f349a234e6ab594.json new file mode 100644 index 000000000000..6400c2b70af3 --- /dev/null +++ b/core/lib/dal/.sqlx/query-4ec3bdb8a51f9e9dae77e545c4d182ca8e746122e42f448a7f349a234e6ab594.json @@ -0,0 +1,16 @@ +{ + "db_name": "PostgreSQL", + "query": "\n INSERT INTO\n data_availability (\n l1_batch_number,\n blob_id,\n sent_at,\n created_at,\n updated_at\n )\n VALUES\n ($1, $2, $3, NOW(), NOW()) ON CONFLICT DO NOTHING\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8", + "Text", + "Timestamp" + ] + }, + "nullable": [] + }, + "hash": "4ec3bdb8a51f9e9dae77e545c4d182ca8e746122e42f448a7f349a234e6ab594" +} diff --git a/core/lib/dal/.sqlx/query-0385576f1fb3836fc04a6cde3e92c03e1de8292eb0ea1e026ba1b32a3745c261.json b/core/lib/dal/.sqlx/query-5019e70efb40d983d3e99922b7415a8b4cb42b579f4e968664b6210c6058bfb5.json similarity index 55% rename from core/lib/dal/.sqlx/query-0385576f1fb3836fc04a6cde3e92c03e1de8292eb0ea1e026ba1b32a3745c261.json rename to core/lib/dal/.sqlx/query-5019e70efb40d983d3e99922b7415a8b4cb42b579f4e968664b6210c6058bfb5.json index a98cbb18034a..cfa0b18d4ba9 100644 --- a/core/lib/dal/.sqlx/query-0385576f1fb3836fc04a6cde3e92c03e1de8292eb0ea1e026ba1b32a3745c261.json +++ b/core/lib/dal/.sqlx/query-5019e70efb40d983d3e99922b7415a8b4cb42b579f4e968664b6210c6058bfb5.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT\n storage_logs.hashed_key AS \"hashed_key!\",\n storage_logs.value AS \"value!\",\n storage_logs.miniblock_number AS \"miniblock_number!\",\n initial_writes.l1_batch_number AS \"l1_batch_number!\",\n initial_writes.index\n FROM\n (\n SELECT\n hashed_key,\n MAX(ARRAY[miniblock_number, operation_number]::INT[]) AS op\n FROM\n storage_logs\n WHERE\n miniblock_number <= $1\n AND hashed_key >= $3\n AND hashed_key <= $4\n GROUP BY\n hashed_key\n ORDER BY\n hashed_key\n ) AS keys\n INNER JOIN storage_logs ON keys.hashed_key = storage_logs.hashed_key\n AND storage_logs.miniblock_number = keys.op[1]\n AND storage_logs.operation_number = keys.op[2]\n INNER JOIN initial_writes ON keys.hashed_key = initial_writes.hashed_key\n WHERE\n initial_writes.l1_batch_number <= $2\n ", + "query": "\n SELECT\n storage_logs.hashed_key AS \"hashed_key!\",\n storage_logs.value AS \"value!\",\n storage_logs.miniblock_number AS \"miniblock_number!\",\n initial_writes.l1_batch_number AS \"l1_batch_number!\",\n initial_writes.index\n FROM\n (\n SELECT\n hashed_key,\n MAX(\n ARRAY [miniblock_number, operation_number] :: INT []\n ) AS op\n FROM\n storage_logs\n WHERE\n miniblock_number <= $1\n AND hashed_key >= $3\n AND hashed_key <= $4\n GROUP BY\n hashed_key\n ORDER BY\n hashed_key\n ) AS KEYS\n INNER JOIN storage_logs ON KEYS.hashed_key = storage_logs.hashed_key\n AND storage_logs.miniblock_number = KEYS.op [1]\n AND storage_logs.operation_number = KEYS.op [2]\n INNER JOIN initial_writes ON KEYS.hashed_key = initial_writes.hashed_key\n WHERE\n initial_writes.l1_batch_number <= $2\n ", "describe": { "columns": [ { @@ -45,5 +45,5 @@ false ] }, - "hash": "0385576f1fb3836fc04a6cde3e92c03e1de8292eb0ea1e026ba1b32a3745c261" + "hash": "5019e70efb40d983d3e99922b7415a8b4cb42b579f4e968664b6210c6058bfb5" } diff --git a/core/lib/dal/.sqlx/query-5d341e334cbc2d38efc8a060325677d57040037da0e07cef2c7b7246851a3703.json b/core/lib/dal/.sqlx/query-507ba20e231ea2cf8ac15cb5a6bc8f02328de7f12c5e83609a477feddbbdd754.json similarity index 50% rename from core/lib/dal/.sqlx/query-5d341e334cbc2d38efc8a060325677d57040037da0e07cef2c7b7246851a3703.json rename to core/lib/dal/.sqlx/query-507ba20e231ea2cf8ac15cb5a6bc8f02328de7f12c5e83609a477feddbbdd754.json index f0d8b01d57c0..ec80b8c180d6 100644 --- a/core/lib/dal/.sqlx/query-5d341e334cbc2d38efc8a060325677d57040037da0e07cef2c7b7246851a3703.json +++ b/core/lib/dal/.sqlx/query-507ba20e231ea2cf8ac15cb5a6bc8f02328de7f12c5e83609a477feddbbdd754.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n UPDATE contract_verification_requests\n SET\n status = 'in_progress',\n attempts = attempts + 1,\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n id = (\n SELECT\n id\n FROM\n contract_verification_requests\n WHERE\n status = 'queued'\n OR (\n status = 'in_progress'\n AND processing_started_at < NOW() - $1::INTERVAL\n )\n ORDER BY\n created_at\n LIMIT\n 1\n FOR UPDATE\n SKIP LOCKED\n )\n RETURNING\n id,\n contract_address,\n source_code,\n contract_name,\n zk_compiler_version,\n compiler_version,\n optimization_used,\n optimizer_mode,\n constructor_arguments,\n is_system,\n force_evmla\n ", + "query": "\n UPDATE\n contract_verification_requests\n SET\n status = 'in_progress',\n attempts = attempts + 1,\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n id = (\n SELECT\n id\n FROM\n contract_verification_requests\n WHERE\n status = 'queued'\n OR (\n status = 'in_progress'\n AND processing_started_at < NOW() - $1 :: INTERVAL\n )\n ORDER BY\n created_at\n LIMIT\n 1 FOR\n UPDATE\n SKIP LOCKED\n )\n RETURNING\n id,\n contract_address,\n source_code,\n contract_name,\n zk_compiler_version,\n compiler_version,\n optimization_used,\n optimizer_mode,\n constructor_arguments,\n is_system,\n force_evmla\n ", "describe": { "columns": [ { @@ -78,5 +78,5 @@ false ] }, - "hash": "5d341e334cbc2d38efc8a060325677d57040037da0e07cef2c7b7246851a3703" + "hash": "507ba20e231ea2cf8ac15cb5a6bc8f02328de7f12c5e83609a477feddbbdd754" } diff --git a/core/lib/dal/.sqlx/query-532a80b0873871896dd318beba5ec427a099492905a1feee512dc43f39d10047.json b/core/lib/dal/.sqlx/query-532a80b0873871896dd318beba5ec427a099492905a1feee512dc43f39d10047.json deleted file mode 100644 index 629dca2ea7f0..000000000000 --- a/core/lib/dal/.sqlx/query-532a80b0873871896dd318beba5ec427a099492905a1feee512dc43f39d10047.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE eth_txs_history\n SET\n sent_at_block = $2,\n sent_at = NOW()\n WHERE\n id = $1\n AND sent_at_block IS NULL\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int4", - "Int4" - ] - }, - "nullable": [] - }, - "hash": "532a80b0873871896dd318beba5ec427a099492905a1feee512dc43f39d10047" -} diff --git a/core/lib/dal/.sqlx/query-546c729829083b7eba94fea742c162d717ffcf46fdf5d2ce5d32555353b6da6b.json b/core/lib/dal/.sqlx/query-546c729829083b7eba94fea742c162d717ffcf46fdf5d2ce5d32555353b6da6b.json deleted file mode 100644 index 70b94f739098..000000000000 --- a/core/lib/dal/.sqlx/query-546c729829083b7eba94fea742c162d717ffcf46fdf5d2ce5d32555353b6da6b.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE transactions\n SET\n in_mempool = FALSE\n FROM\n UNNEST($1::bytea[]) AS s (address)\n WHERE\n transactions.in_mempool = TRUE\n AND transactions.initiator_address = s.address\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "ByteaArray" - ] - }, - "nullable": [] - }, - "hash": "546c729829083b7eba94fea742c162d717ffcf46fdf5d2ce5d32555353b6da6b" -} diff --git a/core/lib/dal/.sqlx/query-549a74361713f1ad79b03a680815b2356e58f12a7af7539f2b75eb318941db6d.json b/core/lib/dal/.sqlx/query-549a74361713f1ad79b03a680815b2356e58f12a7af7539f2b75eb318941db6d.json new file mode 100644 index 000000000000..73e80bb2ea0c --- /dev/null +++ b/core/lib/dal/.sqlx/query-549a74361713f1ad79b03a680815b2356e58f12a7af7539f2b75eb318941db6d.json @@ -0,0 +1,14 @@ +{ + "db_name": "PostgreSQL", + "query": "\n DELETE FROM\n storage_logs\n WHERE\n miniblock_number > $1\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8" + ] + }, + "nullable": [] + }, + "hash": "549a74361713f1ad79b03a680815b2356e58f12a7af7539f2b75eb318941db6d" +} diff --git a/core/lib/dal/.sqlx/query-54c96dc5e0a78551ba713814f944c3262d5cab17e8f76bdc6672459e0091b1d8.json b/core/lib/dal/.sqlx/query-54c96dc5e0a78551ba713814f944c3262d5cab17e8f76bdc6672459e0091b1d8.json new file mode 100644 index 000000000000..c506b44154d6 --- /dev/null +++ b/core/lib/dal/.sqlx/query-54c96dc5e0a78551ba713814f944c3262d5cab17e8f76bdc6672459e0091b1d8.json @@ -0,0 +1,19 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE\n tee_proof_generation_details\n SET\n tee_type = $1,\n status = $2,\n pubkey = $3,\n signature = $4,\n proof = $5,\n updated_at = NOW()\n WHERE\n l1_batch_number = $6\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Text", + "Text", + "Bytea", + "Bytea", + "Bytea", + "Int8" + ] + }, + "nullable": [] + }, + "hash": "54c96dc5e0a78551ba713814f944c3262d5cab17e8f76bdc6672459e0091b1d8" +} diff --git a/core/lib/dal/.sqlx/query-5545ceadc462969a4557b5bc5db373147984aa3931df33a50de2bb2ed4367d51.json b/core/lib/dal/.sqlx/query-5545ceadc462969a4557b5bc5db373147984aa3931df33a50de2bb2ed4367d51.json new file mode 100644 index 000000000000..fcb47bdada20 --- /dev/null +++ b/core/lib/dal/.sqlx/query-5545ceadc462969a4557b5bc5db373147984aa3931df33a50de2bb2ed4367d51.json @@ -0,0 +1,14 @@ +{ + "db_name": "PostgreSQL", + "query": "\n DELETE FROM\n compiler_versions\n WHERE\n compiler = $1\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Text" + ] + }, + "nullable": [] + }, + "hash": "5545ceadc462969a4557b5bc5db373147984aa3931df33a50de2bb2ed4367d51" +} diff --git a/core/lib/dal/.sqlx/query-55b0b4c569c0aaf9741afc85400ecd50a04799ffd36be0e17c56f47fcdbc8f60.json b/core/lib/dal/.sqlx/query-55b0b4c569c0aaf9741afc85400ecd50a04799ffd36be0e17c56f47fcdbc8f60.json deleted file mode 100644 index 6478bb53538d..000000000000 --- a/core/lib/dal/.sqlx/query-55b0b4c569c0aaf9741afc85400ecd50a04799ffd36be0e17c56f47fcdbc8f60.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n DELETE FROM l1_batches\n WHERE\n number > $1\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8" - ] - }, - "nullable": [] - }, - "hash": "55b0b4c569c0aaf9741afc85400ecd50a04799ffd36be0e17c56f47fcdbc8f60" -} diff --git a/core/lib/dal/.sqlx/query-55b90277afa79835a01107536cd16369609c69bf8fed67f6fb96859844ed29b1.json b/core/lib/dal/.sqlx/query-55b90277afa79835a01107536cd16369609c69bf8fed67f6fb96859844ed29b1.json new file mode 100644 index 000000000000..e92e06f70f85 --- /dev/null +++ b/core/lib/dal/.sqlx/query-55b90277afa79835a01107536cd16369609c69bf8fed67f6fb96859844ed29b1.json @@ -0,0 +1,23 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE\n l1_batches\n SET\n commitment = $1,\n aux_data_hash = $2,\n pass_through_data_hash = $3,\n meta_parameters_hash = $4,\n l2_l1_merkle_root = $5,\n zkporter_is_available = $6,\n compressed_state_diffs = $7,\n compressed_initial_writes = $8,\n compressed_repeated_writes = $9,\n updated_at = NOW()\n WHERE\n number = $10\n AND commitment IS NULL\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Bytea", + "Bytea", + "Bytea", + "Bytea", + "Bytea", + "Bool", + "Bytea", + "Bytea", + "Bytea", + "Int8" + ] + }, + "nullable": [] + }, + "hash": "55b90277afa79835a01107536cd16369609c69bf8fed67f6fb96859844ed29b1" +} diff --git a/core/lib/dal/.sqlx/query-55f4585be3d0f1a147cb10f6e59325fad494a512ba92df95439d2d7fe0f3a285.json b/core/lib/dal/.sqlx/query-55f4585be3d0f1a147cb10f6e59325fad494a512ba92df95439d2d7fe0f3a285.json deleted file mode 100644 index ecf54f0417b8..000000000000 --- a/core/lib/dal/.sqlx/query-55f4585be3d0f1a147cb10f6e59325fad494a512ba92df95439d2d7fe0f3a285.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE l1_batches\n SET\n commitment = $1,\n aux_data_hash = $2,\n pass_through_data_hash = $3,\n meta_parameters_hash = $4,\n l2_l1_merkle_root = $5,\n zkporter_is_available = $6,\n compressed_state_diffs = $7,\n compressed_initial_writes = $8,\n compressed_repeated_writes = $9,\n updated_at = NOW()\n WHERE\n number = $10\n AND commitment IS NULL\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Bytea", - "Bytea", - "Bytea", - "Bytea", - "Bytea", - "Bool", - "Bytea", - "Bytea", - "Bytea", - "Int8" - ] - }, - "nullable": [] - }, - "hash": "55f4585be3d0f1a147cb10f6e59325fad494a512ba92df95439d2d7fe0f3a285" -} diff --git a/core/lib/dal/.sqlx/query-f3a049c7eb0d8903737f02fa154b50ebc862a133734382bad8fdfa3a93d8b743.json b/core/lib/dal/.sqlx/query-587a6fa944e122d4a045192f4f84ec30c53893af990a3158a7006904c7073b14.json similarity index 91% rename from core/lib/dal/.sqlx/query-f3a049c7eb0d8903737f02fa154b50ebc862a133734382bad8fdfa3a93d8b743.json rename to core/lib/dal/.sqlx/query-587a6fa944e122d4a045192f4f84ec30c53893af990a3158a7006904c7073b14.json index 6869b4f50b18..08d724c4112b 100644 --- a/core/lib/dal/.sqlx/query-f3a049c7eb0d8903737f02fa154b50ebc862a133734382bad8fdfa3a93d8b743.json +++ b/core/lib/dal/.sqlx/query-587a6fa944e122d4a045192f4f84ec30c53893af990a3158a7006904c7073b14.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n transactions (\n hash,\n is_priority,\n initiator_address,\n gas_limit,\n max_fee_per_gas,\n gas_per_pubdata_limit,\n data,\n upgrade_id,\n contract_address,\n l1_block_number,\n value,\n paymaster,\n paymaster_input,\n tx_format,\n l1_tx_mint,\n l1_tx_refund_recipient,\n received_at,\n created_at,\n updated_at\n )\n VALUES\n (\n $1,\n TRUE,\n $2,\n $3,\n $4,\n $5,\n $6,\n $7,\n $8,\n $9,\n $10,\n $11,\n $12,\n $13,\n $14,\n $15,\n $16,\n NOW(),\n NOW()\n )\n ON CONFLICT (hash) DO NOTHING\n ", + "query": "\n INSERT INTO\n transactions (\n hash,\n is_priority,\n initiator_address,\n gas_limit,\n max_fee_per_gas,\n gas_per_pubdata_limit,\n data,\n upgrade_id,\n contract_address,\n l1_block_number,\n value,\n paymaster,\n paymaster_input,\n tx_format,\n l1_tx_mint,\n l1_tx_refund_recipient,\n received_at,\n created_at,\n updated_at\n )\n VALUES\n (\n $1,\n TRUE,\n $2,\n $3,\n $4,\n $5,\n $6,\n $7,\n $8,\n $9,\n $10,\n $11,\n $12,\n $13,\n $14,\n $15,\n $16,\n NOW(),\n NOW()\n ) ON CONFLICT (hash) DO NOTHING\n ", "describe": { "columns": [], "parameters": { @@ -25,5 +25,5 @@ }, "nullable": [] }, - "hash": "f3a049c7eb0d8903737f02fa154b50ebc862a133734382bad8fdfa3a93d8b743" + "hash": "587a6fa944e122d4a045192f4f84ec30c53893af990a3158a7006904c7073b14" } diff --git a/core/lib/dal/.sqlx/query-5a20e458be6c6c90c1e6f9c2cfada959f3f2e5375d8f1687231f13d26a41cc68.json b/core/lib/dal/.sqlx/query-5a20e458be6c6c90c1e6f9c2cfada959f3f2e5375d8f1687231f13d26a41cc68.json new file mode 100644 index 000000000000..e8ca9efae0d9 --- /dev/null +++ b/core/lib/dal/.sqlx/query-5a20e458be6c6c90c1e6f9c2cfada959f3f2e5375d8f1687231f13d26a41cc68.json @@ -0,0 +1,14 @@ +{ + "db_name": "PostgreSQL", + "query": "\n DELETE FROM\n initial_writes\n WHERE\n l1_batch_number > $1\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8" + ] + }, + "nullable": [] + }, + "hash": "5a20e458be6c6c90c1e6f9c2cfada959f3f2e5375d8f1687231f13d26a41cc68" +} diff --git a/core/lib/dal/.sqlx/query-5c65e8b97f2fa2fda703f85d6c56228315e7aeed1c6b6f3989e043d6f4fd5f70.json b/core/lib/dal/.sqlx/query-5c65e8b97f2fa2fda703f85d6c56228315e7aeed1c6b6f3989e043d6f4fd5f70.json new file mode 100644 index 000000000000..740514c17baa --- /dev/null +++ b/core/lib/dal/.sqlx/query-5c65e8b97f2fa2fda703f85d6c56228315e7aeed1c6b6f3989e043d6f4fd5f70.json @@ -0,0 +1,16 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE\n l1_batches\n SET\n protocol_version = $1\n WHERE\n number BETWEEN $2 AND $3\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int4", + "Int8", + "Int8" + ] + }, + "nullable": [] + }, + "hash": "5c65e8b97f2fa2fda703f85d6c56228315e7aeed1c6b6f3989e043d6f4fd5f70" +} diff --git a/core/lib/dal/.sqlx/query-5c99342c4fbf36ccc8e9c9dafc76de37201091bfccd3caf922e766896c5a542b.json b/core/lib/dal/.sqlx/query-5c99342c4fbf36ccc8e9c9dafc76de37201091bfccd3caf922e766896c5a542b.json deleted file mode 100644 index 5d09a9c37f7a..000000000000 --- a/core/lib/dal/.sqlx/query-5c99342c4fbf36ccc8e9c9dafc76de37201091bfccd3caf922e766896c5a542b.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE data_availability\n SET\n inclusion_data = $1,\n updated_at = NOW()\n WHERE\n l1_batch_number = $2\n AND inclusion_data IS NULL\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Bytea", - "Int8" - ] - }, - "nullable": [] - }, - "hash": "5c99342c4fbf36ccc8e9c9dafc76de37201091bfccd3caf922e766896c5a542b" -} diff --git a/core/lib/dal/.sqlx/query-5d1f588b2b652105b4452be1cc6c7573fe040d47d17d9bd4e2a2b6d3131a4f9c.json b/core/lib/dal/.sqlx/query-5d1f588b2b652105b4452be1cc6c7573fe040d47d17d9bd4e2a2b6d3131a4f9c.json deleted file mode 100644 index 8d566e0c6cf2..000000000000 --- a/core/lib/dal/.sqlx/query-5d1f588b2b652105b4452be1cc6c7573fe040d47d17d9bd4e2a2b6d3131a4f9c.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE transactions\n SET\n l1_batch_number = $3,\n l1_batch_tx_index = data_table.l1_batch_tx_index,\n updated_at = NOW()\n FROM\n (\n SELECT\n UNNEST($1::INT[]) AS l1_batch_tx_index,\n UNNEST($2::bytea[]) AS hash\n ) AS data_table\n WHERE\n transactions.hash = data_table.hash\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int4Array", - "ByteaArray", - "Int8" - ] - }, - "nullable": [] - }, - "hash": "5d1f588b2b652105b4452be1cc6c7573fe040d47d17d9bd4e2a2b6d3131a4f9c" -} diff --git a/core/lib/dal/.sqlx/query-5d7fd6503caf4bf05d387e7214518890d009081b1c1cec8773e25c6621753372.json b/core/lib/dal/.sqlx/query-5d7fd6503caf4bf05d387e7214518890d009081b1c1cec8773e25c6621753372.json new file mode 100644 index 000000000000..50b017d4a79c --- /dev/null +++ b/core/lib/dal/.sqlx/query-5d7fd6503caf4bf05d387e7214518890d009081b1c1cec8773e25c6621753372.json @@ -0,0 +1,40 @@ +{ + "db_name": "PostgreSQL", + "query": "\n INSERT INTO\n transactions (\n hash,\n is_priority,\n initiator_address,\n nonce,\n signature,\n gas_limit,\n max_fee_per_gas,\n max_priority_fee_per_gas,\n gas_per_pubdata_limit,\n input,\n data,\n tx_format,\n contract_address,\n value,\n paymaster,\n paymaster_input,\n execution_info,\n received_at,\n created_at,\n updated_at\n )\n VALUES\n (\n $1,\n FALSE,\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 JSONB_BUILD_OBJECT(\n 'gas_used',\n $16 :: BIGINT,\n 'storage_writes',\n $17 :: INT,\n 'contracts_used',\n $18 :: INT\n ),\n $19,\n NOW(),\n NOW()\n ) ON CONFLICT (initiator_address, nonce) DO\n UPDATE\n SET\n hash = $1,\n signature = $4,\n gas_limit = $5,\n max_fee_per_gas = $6,\n max_priority_fee_per_gas = $7,\n gas_per_pubdata_limit = $8,\n input = $9,\n data = $10,\n tx_format = $11,\n contract_address = $12,\n value = $13,\n paymaster = $14,\n paymaster_input = $15,\n execution_info = JSONB_BUILD_OBJECT(\n 'gas_used',\n $16 :: BIGINT,\n 'storage_writes',\n $17 :: INT,\n 'contracts_used',\n $18 :: INT\n ),\n in_mempool = FALSE,\n received_at = $19,\n created_at = NOW(),\n updated_at = NOW(),\n error = NULL\n WHERE\n transactions.is_priority = FALSE\n AND transactions.miniblock_number IS NULL\n RETURNING\n (\n SELECT\n hash\n FROM\n transactions\n WHERE\n transactions.initiator_address = $2\n AND transactions.nonce = $3\n ) IS NOT NULL AS \"is_replaced!\"\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "is_replaced!", + "type_info": "Bool" + } + ], + "parameters": { + "Left": [ + "Bytea", + "Bytea", + "Int8", + "Bytea", + "Numeric", + "Numeric", + "Numeric", + "Numeric", + "Bytea", + "Jsonb", + "Int4", + "Bytea", + "Numeric", + "Bytea", + "Bytea", + "Int8", + "Int4", + "Int4", + "Timestamp" + ] + }, + "nullable": [ + null + ] + }, + "hash": "5d7fd6503caf4bf05d387e7214518890d009081b1c1cec8773e25c6621753372" +} diff --git a/core/lib/dal/.sqlx/query-5dc4ecdfac01e15e4d2fe7c124c3ee9ed6fd28c338ddadd9958f3bb0901ba454.json b/core/lib/dal/.sqlx/query-5dc4ecdfac01e15e4d2fe7c124c3ee9ed6fd28c338ddadd9958f3bb0901ba454.json new file mode 100644 index 000000000000..e0e2662ecd00 --- /dev/null +++ b/core/lib/dal/.sqlx/query-5dc4ecdfac01e15e4d2fe7c124c3ee9ed6fd28c338ddadd9958f3bb0901ba454.json @@ -0,0 +1,16 @@ +{ + "db_name": "PostgreSQL", + "query": "\n INSERT INTO\n factory_deps (\n bytecode_hash,\n bytecode,\n miniblock_number,\n created_at,\n updated_at\n )\n SELECT\n u.bytecode_hash,\n u.bytecode,\n $3,\n NOW(),\n NOW()\n FROM\n UNNEST($1 :: bytea [], $2 :: bytea []) AS u (bytecode_hash, bytecode) ON CONFLICT (bytecode_hash) DO NOTHING\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "ByteaArray", + "ByteaArray", + "Int8" + ] + }, + "nullable": [] + }, + "hash": "5dc4ecdfac01e15e4d2fe7c124c3ee9ed6fd28c338ddadd9958f3bb0901ba454" +} diff --git a/core/lib/dal/.sqlx/query-6292dc157e2b4c64c513b4b8f043ea4423fdaf5d03cb70e8c3a67b6d4a24d29e.json b/core/lib/dal/.sqlx/query-6292dc157e2b4c64c513b4b8f043ea4423fdaf5d03cb70e8c3a67b6d4a24d29e.json deleted file mode 100644 index 62b1be92c909..000000000000 --- a/core/lib/dal/.sqlx/query-6292dc157e2b4c64c513b4b8f043ea4423fdaf5d03cb70e8c3a67b6d4a24d29e.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE tee_proof_generation_details\n SET\n tee_type = $1,\n status = $2,\n pubkey = $3,\n signature = $4,\n proof = $5,\n updated_at = NOW()\n WHERE\n l1_batch_number = $6\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Text", - "Text", - "Bytea", - "Bytea", - "Bytea", - "Int8" - ] - }, - "nullable": [] - }, - "hash": "6292dc157e2b4c64c513b4b8f043ea4423fdaf5d03cb70e8c3a67b6d4a24d29e" -} diff --git a/core/lib/dal/.sqlx/query-662a3d53026e983fea3087099b8b9593ba6ff291db9868a1ad6df21440ef311a.json b/core/lib/dal/.sqlx/query-662a3d53026e983fea3087099b8b9593ba6ff291db9868a1ad6df21440ef311a.json new file mode 100644 index 000000000000..d2e3648352aa --- /dev/null +++ b/core/lib/dal/.sqlx/query-662a3d53026e983fea3087099b8b9593ba6ff291db9868a1ad6df21440ef311a.json @@ -0,0 +1,14 @@ +{ + "db_name": "PostgreSQL", + "query": "\n DELETE FROM\n miniblocks\n WHERE\n number <= $1\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8" + ] + }, + "nullable": [] + }, + "hash": "662a3d53026e983fea3087099b8b9593ba6ff291db9868a1ad6df21440ef311a" +} diff --git a/core/lib/dal/.sqlx/query-2d1e0f2e043c193052c9cc20f9efeb5f094160627bc09db4bda2dda9a8c11c44.json b/core/lib/dal/.sqlx/query-66e4b86d23a96174ef1edcee4da70bb5b8a0a5408ccd09465225f8bf3fee551a.json similarity index 55% rename from core/lib/dal/.sqlx/query-2d1e0f2e043c193052c9cc20f9efeb5f094160627bc09db4bda2dda9a8c11c44.json rename to core/lib/dal/.sqlx/query-66e4b86d23a96174ef1edcee4da70bb5b8a0a5408ccd09465225f8bf3fee551a.json index 1d9c276b0786..01666ff1eaaa 100644 --- a/core/lib/dal/.sqlx/query-2d1e0f2e043c193052c9cc20f9efeb5f094160627bc09db4bda2dda9a8c11c44.json +++ b/core/lib/dal/.sqlx/query-66e4b86d23a96174ef1edcee4da70bb5b8a0a5408ccd09465225f8bf3fee551a.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n contracts_verification_info (address, verification_info)\n VALUES\n ($1, $2)\n ON CONFLICT (address) DO\n UPDATE\n SET\n verification_info = $2\n ", + "query": "\n INSERT INTO\n contracts_verification_info (address, verification_info)\n VALUES\n ($1, $2) ON CONFLICT (address) DO\n UPDATE\n SET\n verification_info = $2\n ", "describe": { "columns": [], "parameters": { @@ -11,5 +11,5 @@ }, "nullable": [] }, - "hash": "2d1e0f2e043c193052c9cc20f9efeb5f094160627bc09db4bda2dda9a8c11c44" + "hash": "66e4b86d23a96174ef1edcee4da70bb5b8a0a5408ccd09465225f8bf3fee551a" } diff --git a/core/lib/dal/.sqlx/query-67f6a13a4c5bd16f77e449b5f0bc0798441543244f83b691783127979e02dd8c.json b/core/lib/dal/.sqlx/query-67f6a13a4c5bd16f77e449b5f0bc0798441543244f83b691783127979e02dd8c.json deleted file mode 100644 index 4873a861c00a..000000000000 --- a/core/lib/dal/.sqlx/query-67f6a13a4c5bd16f77e449b5f0bc0798441543244f83b691783127979e02dd8c.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE transactions\n SET\n error = $1,\n updated_at = NOW()\n WHERE\n hash = $2\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Varchar", - "Bytea" - ] - }, - "nullable": [] - }, - "hash": "67f6a13a4c5bd16f77e449b5f0bc0798441543244f83b691783127979e02dd8c" -} diff --git a/core/lib/dal/.sqlx/query-b42fc86726ac40d0ca38640884da192a143f6a7501b7da65bb7df40a0a4ead70.json b/core/lib/dal/.sqlx/query-683973e92438d8a16dd0a4fe46e884aaa174ea8a577dcc97e84680f4fd650c37.json similarity index 62% rename from core/lib/dal/.sqlx/query-b42fc86726ac40d0ca38640884da192a143f6a7501b7da65bb7df40a0a4ead70.json rename to core/lib/dal/.sqlx/query-683973e92438d8a16dd0a4fe46e884aaa174ea8a577dcc97e84680f4fd650c37.json index 625fa4ab36e6..b860c166192e 100644 --- a/core/lib/dal/.sqlx/query-b42fc86726ac40d0ca38640884da192a143f6a7501b7da65bb7df40a0a4ead70.json +++ b/core/lib/dal/.sqlx/query-683973e92438d8a16dd0a4fe46e884aaa174ea8a577dcc97e84680f4fd650c37.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n DELETE FROM snapshots\n WHERE\n l1_batch_number > $1\n RETURNING\n VERSION,\n l1_batch_number,\n factory_deps_filepath,\n storage_logs_filepaths\n ", + "query": "\n DELETE FROM\n snapshots\n WHERE\n l1_batch_number > $1\n RETURNING\n VERSION,\n l1_batch_number,\n factory_deps_filepath,\n storage_logs_filepaths\n ", "describe": { "columns": [ { @@ -36,5 +36,5 @@ false ] }, - "hash": "b42fc86726ac40d0ca38640884da192a143f6a7501b7da65bb7df40a0a4ead70" + "hash": "683973e92438d8a16dd0a4fe46e884aaa174ea8a577dcc97e84680f4fd650c37" } diff --git a/core/lib/dal/.sqlx/query-6849be0788a509e4e68acc2da4bfadbcfc343374fad173df0cc8db38419a9726.json b/core/lib/dal/.sqlx/query-6849be0788a509e4e68acc2da4bfadbcfc343374fad173df0cc8db38419a9726.json deleted file mode 100644 index 72dbb2a4178b..000000000000 --- a/core/lib/dal/.sqlx/query-6849be0788a509e4e68acc2da4bfadbcfc343374fad173df0cc8db38419a9726.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n DELETE FROM tokens\n WHERE\n l2_address = ANY ($1)\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "ByteaArray" - ] - }, - "nullable": [] - }, - "hash": "6849be0788a509e4e68acc2da4bfadbcfc343374fad173df0cc8db38419a9726" -} diff --git a/core/lib/dal/.sqlx/query-68e5240ab8c75e68c13efad97a628321969b8c5bce89a83b74ee08f9e2dfcf9b.json b/core/lib/dal/.sqlx/query-68e5240ab8c75e68c13efad97a628321969b8c5bce89a83b74ee08f9e2dfcf9b.json new file mode 100644 index 000000000000..833de0661fd0 --- /dev/null +++ b/core/lib/dal/.sqlx/query-68e5240ab8c75e68c13efad97a628321969b8c5bce89a83b74ee08f9e2dfcf9b.json @@ -0,0 +1,14 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE\n consistency_checker_info\n SET\n last_processed_l1_batch = $1,\n updated_at = NOW()\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8" + ] + }, + "nullable": [] + }, + "hash": "68e5240ab8c75e68c13efad97a628321969b8c5bce89a83b74ee08f9e2dfcf9b" +} diff --git a/core/lib/dal/.sqlx/query-69c885498b186f3b7cbb215112ec86783d7da0ec1d008680872f3619cf217923.json b/core/lib/dal/.sqlx/query-69c885498b186f3b7cbb215112ec86783d7da0ec1d008680872f3619cf217923.json deleted file mode 100644 index 82575c807fb3..000000000000 --- a/core/lib/dal/.sqlx/query-69c885498b186f3b7cbb215112ec86783d7da0ec1d008680872f3619cf217923.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n DELETE FROM transactions\n WHERE\n hash = ANY ($1)\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "ByteaArray" - ] - }, - "nullable": [] - }, - "hash": "69c885498b186f3b7cbb215112ec86783d7da0ec1d008680872f3619cf217923" -} diff --git a/core/lib/dal/.sqlx/query-6b327df84d2b3b31d02db35fd5d91a8d67abcdb743a619ed0d1b9c16206a3c20.json b/core/lib/dal/.sqlx/query-6b327df84d2b3b31d02db35fd5d91a8d67abcdb743a619ed0d1b9c16206a3c20.json deleted file mode 100644 index d00622a1f5fa..000000000000 --- a/core/lib/dal/.sqlx/query-6b327df84d2b3b31d02db35fd5d91a8d67abcdb743a619ed0d1b9c16206a3c20.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n DELETE FROM eth_txs\n WHERE\n id >= (\n SELECT\n MIN(id)\n FROM\n eth_txs\n WHERE\n has_failed = TRUE\n )\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [] - }, - "nullable": [] - }, - "hash": "6b327df84d2b3b31d02db35fd5d91a8d67abcdb743a619ed0d1b9c16206a3c20" -} diff --git a/core/lib/dal/.sqlx/query-6c0d03b1fbe6f47546bc34c6b2eab01cb2c55bf86d2c8c99abb1b7ca21cf75c0.json b/core/lib/dal/.sqlx/query-6c0d03b1fbe6f47546bc34c6b2eab01cb2c55bf86d2c8c99abb1b7ca21cf75c0.json deleted file mode 100644 index 0ad799dd49d8..000000000000 --- a/core/lib/dal/.sqlx/query-6c0d03b1fbe6f47546bc34c6b2eab01cb2c55bf86d2c8c99abb1b7ca21cf75c0.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE miniblocks\n SET\n protocol_version = $1\n WHERE\n l1_batch_number IS NULL\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int4" - ] - }, - "nullable": [] - }, - "hash": "6c0d03b1fbe6f47546bc34c6b2eab01cb2c55bf86d2c8c99abb1b7ca21cf75c0" -} diff --git a/core/lib/dal/.sqlx/query-6c46fb3d51aeb069c09ff0cae3ea82f1af696fcc8f7484eaf255d5311589ee39.json b/core/lib/dal/.sqlx/query-6c46fb3d51aeb069c09ff0cae3ea82f1af696fcc8f7484eaf255d5311589ee39.json deleted file mode 100644 index 35e1168dc8fe..000000000000 --- a/core/lib/dal/.sqlx/query-6c46fb3d51aeb069c09ff0cae3ea82f1af696fcc8f7484eaf255d5311589ee39.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE tokens\n SET\n well_known = TRUE,\n updated_at = NOW()\n WHERE\n l1_address = $1\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Bytea" - ] - }, - "nullable": [] - }, - "hash": "6c46fb3d51aeb069c09ff0cae3ea82f1af696fcc8f7484eaf255d5311589ee39" -} diff --git a/core/lib/dal/.sqlx/query-6f76da3d11930f44dc30884e6e3295a5f5d8ad9a1560d96bed1250c37ec9cb0e.json b/core/lib/dal/.sqlx/query-6f76da3d11930f44dc30884e6e3295a5f5d8ad9a1560d96bed1250c37ec9cb0e.json new file mode 100644 index 000000000000..f06fca8f1244 --- /dev/null +++ b/core/lib/dal/.sqlx/query-6f76da3d11930f44dc30884e6e3295a5f5d8ad9a1560d96bed1250c37ec9cb0e.json @@ -0,0 +1,15 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE\n proof_generation_details\n SET\n vm_run_data_blob_url = $1,\n updated_at = NOW()\n WHERE\n l1_batch_number = $2\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Text", + "Int8" + ] + }, + "nullable": [] + }, + "hash": "6f76da3d11930f44dc30884e6e3295a5f5d8ad9a1560d96bed1250c37ec9cb0e" +} diff --git a/core/lib/dal/.sqlx/query-703836a3f065b0aedf71ad0474cac5e5fccb3ec55aa1227f5f1ea5a11f9b36a9.json b/core/lib/dal/.sqlx/query-703836a3f065b0aedf71ad0474cac5e5fccb3ec55aa1227f5f1ea5a11f9b36a9.json deleted file mode 100644 index be9d5219665a..000000000000 --- a/core/lib/dal/.sqlx/query-703836a3f065b0aedf71ad0474cac5e5fccb3ec55aa1227f5f1ea5a11f9b36a9.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE proof_generation_details\n SET\n vm_run_data_blob_url = $1,\n updated_at = NOW()\n WHERE\n l1_batch_number = $2\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Text", - "Int8" - ] - }, - "nullable": [] - }, - "hash": "703836a3f065b0aedf71ad0474cac5e5fccb3ec55aa1227f5f1ea5a11f9b36a9" -} diff --git a/core/lib/dal/.sqlx/query-526a8e1c231e99faadd5dbbe9c49ed811faffcc108d04b59fdec5a0ab9d13fa3.json b/core/lib/dal/.sqlx/query-7168f5cf14cfaa35962c5a25b00e2ed3cba01cf9a816e8eea972020d4be8ad5e.json similarity index 75% rename from core/lib/dal/.sqlx/query-526a8e1c231e99faadd5dbbe9c49ed811faffcc108d04b59fdec5a0ab9d13fa3.json rename to core/lib/dal/.sqlx/query-7168f5cf14cfaa35962c5a25b00e2ed3cba01cf9a816e8eea972020d4be8ad5e.json index dbdec4ac5d65..5105e19b91fe 100644 --- a/core/lib/dal/.sqlx/query-526a8e1c231e99faadd5dbbe9c49ed811faffcc108d04b59fdec5a0ab9d13fa3.json +++ b/core/lib/dal/.sqlx/query-7168f5cf14cfaa35962c5a25b00e2ed3cba01cf9a816e8eea972020d4be8ad5e.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT\n address,\n topic1,\n topic2,\n topic3,\n topic4,\n value,\n NULL::bytea AS \"block_hash\",\n NULL::BIGINT AS \"l1_batch_number?\",\n miniblock_number,\n tx_hash,\n tx_index_in_block,\n event_index_in_block,\n event_index_in_tx,\n NULL::BIGINT AS \"block_timestamp?\"\n FROM\n events\n WHERE\n tx_hash = ANY ($1)\n ORDER BY\n miniblock_number ASC,\n event_index_in_block ASC\n ", + "query": "\n SELECT\n address,\n topic1,\n topic2,\n topic3,\n topic4,\n value,\n NULL :: bytea AS \"block_hash\",\n NULL :: BIGINT AS \"l1_batch_number?\",\n miniblock_number,\n tx_hash,\n tx_index_in_block,\n event_index_in_block,\n event_index_in_tx,\n NULL :: BIGINT AS \"block_timestamp?\"\n FROM\n EVENTS\n WHERE\n tx_hash = ANY ($1)\n ORDER BY\n miniblock_number ASC,\n event_index_in_block ASC\n ", "describe": { "columns": [ { @@ -96,5 +96,5 @@ null ] }, - "hash": "526a8e1c231e99faadd5dbbe9c49ed811faffcc108d04b59fdec5a0ab9d13fa3" + "hash": "7168f5cf14cfaa35962c5a25b00e2ed3cba01cf9a816e8eea972020d4be8ad5e" } diff --git a/core/lib/dal/.sqlx/query-25fb31277591dd7d5d783bd8777f1a855e76b37b6ed36ae612b551f9a6a55633.json b/core/lib/dal/.sqlx/query-729e09e0029b12156689ebe01e082cec15b0c574fd94917e82238d1294831197.json similarity index 74% rename from core/lib/dal/.sqlx/query-25fb31277591dd7d5d783bd8777f1a855e76b37b6ed36ae612b551f9a6a55633.json rename to core/lib/dal/.sqlx/query-729e09e0029b12156689ebe01e082cec15b0c574fd94917e82238d1294831197.json index ee88bcdf39bd..14b257b8bb72 100644 --- a/core/lib/dal/.sqlx/query-25fb31277591dd7d5d783bd8777f1a855e76b37b6ed36ae612b551f9a6a55633.json +++ b/core/lib/dal/.sqlx/query-729e09e0029b12156689ebe01e082cec15b0c574fd94917e82238d1294831197.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n protocol_versions (\n id,\n timestamp,\n bootloader_code_hash,\n default_account_code_hash,\n upgrade_tx_hash,\n created_at\n )\n VALUES\n ($1, $2, $3, $4, $5, NOW())\n ON CONFLICT DO NOTHING\n ", + "query": "\n INSERT INTO\n protocol_versions (\n id,\n timestamp,\n bootloader_code_hash,\n default_account_code_hash,\n upgrade_tx_hash,\n created_at\n )\n VALUES\n ($1, $2, $3, $4, $5, NOW()) ON CONFLICT DO NOTHING\n ", "describe": { "columns": [], "parameters": { @@ -14,5 +14,5 @@ }, "nullable": [] }, - "hash": "25fb31277591dd7d5d783bd8777f1a855e76b37b6ed36ae612b551f9a6a55633" + "hash": "729e09e0029b12156689ebe01e082cec15b0c574fd94917e82238d1294831197" } diff --git a/core/lib/dal/.sqlx/query-73a08b7a9eeadfabe4bcafaf03d4c4a82d399ca1c4c6da36d2ab98a7537de7aa.json b/core/lib/dal/.sqlx/query-73a08b7a9eeadfabe4bcafaf03d4c4a82d399ca1c4c6da36d2ab98a7537de7aa.json new file mode 100644 index 000000000000..a47a0657eb04 --- /dev/null +++ b/core/lib/dal/.sqlx/query-73a08b7a9eeadfabe4bcafaf03d4c4a82d399ca1c4c6da36d2ab98a7537de7aa.json @@ -0,0 +1,12 @@ +{ + "db_name": "PostgreSQL", + "query": "\n DELETE FROM\n miniblocks_consensus\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [] + }, + "nullable": [] + }, + "hash": "73a08b7a9eeadfabe4bcafaf03d4c4a82d399ca1c4c6da36d2ab98a7537de7aa" +} diff --git a/core/lib/dal/.sqlx/query-7560ba61643a8ec8eeefbe6034226313c255ce356a9a4e25c098484d3129c914.json b/core/lib/dal/.sqlx/query-7560ba61643a8ec8eeefbe6034226313c255ce356a9a4e25c098484d3129c914.json deleted file mode 100644 index 9ff3ab86250d..000000000000 --- a/core/lib/dal/.sqlx/query-7560ba61643a8ec8eeefbe6034226313c255ce356a9a4e25c098484d3129c914.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n DELETE FROM eth_txs_history\n WHERE\n id = $1\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int4" - ] - }, - "nullable": [] - }, - "hash": "7560ba61643a8ec8eeefbe6034226313c255ce356a9a4e25c098484d3129c914" -} diff --git a/core/lib/dal/.sqlx/query-77a43830ca31eac85a3c03d87696bf94a013e49bf50ce23f4de4968781df0796.json b/core/lib/dal/.sqlx/query-77a43830ca31eac85a3c03d87696bf94a013e49bf50ce23f4de4968781df0796.json deleted file mode 100644 index acff9eeebeeb..000000000000 --- a/core/lib/dal/.sqlx/query-77a43830ca31eac85a3c03d87696bf94a013e49bf50ce23f4de4968781df0796.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE l1_batches\n SET\n hash = $1\n WHERE\n number = $2\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Bytea", - "Int8" - ] - }, - "nullable": [] - }, - "hash": "77a43830ca31eac85a3c03d87696bf94a013e49bf50ce23f4de4968781df0796" -} diff --git a/core/lib/dal/.sqlx/query-788efaf2682ec81871738a943675217a1838cc7ea29b1f8fa394b62573884512.json b/core/lib/dal/.sqlx/query-788efaf2682ec81871738a943675217a1838cc7ea29b1f8fa394b62573884512.json new file mode 100644 index 000000000000..3f761b3adb8c --- /dev/null +++ b/core/lib/dal/.sqlx/query-788efaf2682ec81871738a943675217a1838cc7ea29b1f8fa394b62573884512.json @@ -0,0 +1,12 @@ +{ + "db_name": "PostgreSQL", + "query": "\n DELETE FROM\n consensus_replica_state\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [] + }, + "nullable": [] + }, + "hash": "788efaf2682ec81871738a943675217a1838cc7ea29b1f8fa394b62573884512" +} diff --git a/core/lib/dal/.sqlx/query-7af52a220958d790bd8b5b06a6e29bf769829991c7d732b13f96bcd1293263ea.json b/core/lib/dal/.sqlx/query-7af52a220958d790bd8b5b06a6e29bf769829991c7d732b13f96bcd1293263ea.json deleted file mode 100644 index 80d855d8d21a..000000000000 --- a/core/lib/dal/.sqlx/query-7af52a220958d790bd8b5b06a6e29bf769829991c7d732b13f96bcd1293263ea.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n DELETE FROM miniblocks_consensus\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [] - }, - "nullable": [] - }, - "hash": "7af52a220958d790bd8b5b06a6e29bf769829991c7d732b13f96bcd1293263ea" -} diff --git a/core/lib/dal/.sqlx/query-7dfd5e11546dc2b5ae02428e99e664b1106316347f0fc557afe7112d6fca7e3b.json b/core/lib/dal/.sqlx/query-7dfd5e11546dc2b5ae02428e99e664b1106316347f0fc557afe7112d6fca7e3b.json new file mode 100644 index 000000000000..3732955a3777 --- /dev/null +++ b/core/lib/dal/.sqlx/query-7dfd5e11546dc2b5ae02428e99e664b1106316347f0fc557afe7112d6fca7e3b.json @@ -0,0 +1,22 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE\n proof_generation_details\n SET\n status = 'picked_by_prover',\n updated_at = NOW(),\n prover_taken_at = NOW()\n WHERE\n l1_batch_number = (\n SELECT\n l1_batch_number\n FROM\n proof_generation_details\n LEFT JOIN l1_batches ON l1_batch_number = l1_batches.number\n WHERE\n (\n vm_run_data_blob_url IS NOT NULL\n AND proof_gen_data_blob_url IS NOT NULL\n AND l1_batches.hash IS NOT NULL\n AND l1_batches.aux_data_hash IS NOT NULL\n AND l1_batches.meta_parameters_hash IS NOT NULL\n AND status = 'unpicked'\n )\n OR (\n status = 'picked_by_prover'\n AND prover_taken_at < NOW() - $1 :: INTERVAL\n )\n ORDER BY\n l1_batch_number ASC\n LIMIT\n 1\n )\n RETURNING\n proof_generation_details.l1_batch_number\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "l1_batch_number", + "type_info": "Int8" + } + ], + "parameters": { + "Left": [ + "Interval" + ] + }, + "nullable": [ + false + ] + }, + "hash": "7dfd5e11546dc2b5ae02428e99e664b1106316347f0fc557afe7112d6fca7e3b" +} diff --git a/core/lib/dal/.sqlx/query-7fdc68c55f4860ce767a5e9d20d736ceef46d819394b7602218514b2e2a906eb.json b/core/lib/dal/.sqlx/query-7fdc68c55f4860ce767a5e9d20d736ceef46d819394b7602218514b2e2a906eb.json new file mode 100644 index 000000000000..77cfcb9d8539 --- /dev/null +++ b/core/lib/dal/.sqlx/query-7fdc68c55f4860ce767a5e9d20d736ceef46d819394b7602218514b2e2a906eb.json @@ -0,0 +1,14 @@ +{ + "db_name": "PostgreSQL", + "query": "\n DELETE FROM\n EVENTS\n WHERE\n miniblock_number > $1\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8" + ] + }, + "nullable": [] + }, + "hash": "7fdc68c55f4860ce767a5e9d20d736ceef46d819394b7602218514b2e2a906eb" +} diff --git a/core/lib/dal/.sqlx/query-811143c3607b1a06d1c88084c43d4c2f5800c37ac0715f6ae351cafb8afbb76a.json b/core/lib/dal/.sqlx/query-811143c3607b1a06d1c88084c43d4c2f5800c37ac0715f6ae351cafb8afbb76a.json new file mode 100644 index 000000000000..c3b12a557c36 --- /dev/null +++ b/core/lib/dal/.sqlx/query-811143c3607b1a06d1c88084c43d4c2f5800c37ac0715f6ae351cafb8afbb76a.json @@ -0,0 +1,12 @@ +{ + "db_name": "PostgreSQL", + "query": "\n DELETE FROM\n tee_verifier_input_producer_jobs\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [] + }, + "nullable": [] + }, + "hash": "811143c3607b1a06d1c88084c43d4c2f5800c37ac0715f6ae351cafb8afbb76a" +} diff --git a/core/lib/dal/.sqlx/query-83cb057f275c71da641d9b727abcf7f4d16593b0ed0b496c903d967efe5bb6a6.json b/core/lib/dal/.sqlx/query-83cb057f275c71da641d9b727abcf7f4d16593b0ed0b496c903d967efe5bb6a6.json new file mode 100644 index 000000000000..bf9c949ad5ea --- /dev/null +++ b/core/lib/dal/.sqlx/query-83cb057f275c71da641d9b727abcf7f4d16593b0ed0b496c903d967efe5bb6a6.json @@ -0,0 +1,17 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE\n contract_verification_requests\n SET\n status = 'failed',\n updated_at = NOW(),\n error = $2,\n compilation_errors = $3,\n panic_message = $4\n WHERE\n id = $1\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8", + "Text", + "Jsonb", + "Text" + ] + }, + "nullable": [] + }, + "hash": "83cb057f275c71da641d9b727abcf7f4d16593b0ed0b496c903d967efe5bb6a6" +} diff --git a/core/lib/dal/.sqlx/query-892c0f4aaedfb447eee63fecbcb31f9138b204f4bcd15f934e5b209f3dac0639.json b/core/lib/dal/.sqlx/query-892c0f4aaedfb447eee63fecbcb31f9138b204f4bcd15f934e5b209f3dac0639.json new file mode 100644 index 000000000000..550ea471002d --- /dev/null +++ b/core/lib/dal/.sqlx/query-892c0f4aaedfb447eee63fecbcb31f9138b204f4bcd15f934e5b209f3dac0639.json @@ -0,0 +1,16 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE\n l1_batches\n SET\n hash = $1,\n rollup_last_leaf_index = $2,\n updated_at = NOW()\n WHERE\n number = $3\n AND hash IS NULL\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Bytea", + "Int8", + "Int8" + ] + }, + "nullable": [] + }, + "hash": "892c0f4aaedfb447eee63fecbcb31f9138b204f4bcd15f934e5b209f3dac0639" +} diff --git a/core/lib/dal/.sqlx/query-8b103e7c6e2e0955b5bc283ceef3a203f640cb2279f3b75108c49b2527b19c8b.json b/core/lib/dal/.sqlx/query-8b103e7c6e2e0955b5bc283ceef3a203f640cb2279f3b75108c49b2527b19c8b.json new file mode 100644 index 000000000000..7b0409fd06a4 --- /dev/null +++ b/core/lib/dal/.sqlx/query-8b103e7c6e2e0955b5bc283ceef3a203f640cb2279f3b75108c49b2527b19c8b.json @@ -0,0 +1,15 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE\n l1_batches\n SET\n tree_writes = $1\n WHERE\n number = $2\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Bytea", + "Int8" + ] + }, + "nullable": [] + }, + "hash": "8b103e7c6e2e0955b5bc283ceef3a203f640cb2279f3b75108c49b2527b19c8b" +} diff --git a/core/lib/dal/.sqlx/query-8cc3cf441b12a8b6a2f25f4fe5581e33845ec68e386ef032715ad1222e2fdc8b.json b/core/lib/dal/.sqlx/query-8cc3cf441b12a8b6a2f25f4fe5581e33845ec68e386ef032715ad1222e2fdc8b.json deleted file mode 100644 index a048969f0123..000000000000 --- a/core/lib/dal/.sqlx/query-8cc3cf441b12a8b6a2f25f4fe5581e33845ec68e386ef032715ad1222e2fdc8b.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n DELETE FROM transactions\n WHERE\n initiator_address = $1\n AND nonce = $2\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Bytea", - "Int8" - ] - }, - "nullable": [] - }, - "hash": "8cc3cf441b12a8b6a2f25f4fe5581e33845ec68e386ef032715ad1222e2fdc8b" -} diff --git a/core/lib/dal/.sqlx/query-8e2b160a4d0de1573ecd486c91b8abd8d4e534e5c17e4ffbcf5c97ff920b12d6.json b/core/lib/dal/.sqlx/query-8e2b160a4d0de1573ecd486c91b8abd8d4e534e5c17e4ffbcf5c97ff920b12d6.json new file mode 100644 index 000000000000..ba056c30ac36 --- /dev/null +++ b/core/lib/dal/.sqlx/query-8e2b160a4d0de1573ecd486c91b8abd8d4e534e5c17e4ffbcf5c97ff920b12d6.json @@ -0,0 +1,14 @@ +{ + "db_name": "PostgreSQL", + "query": "\n DELETE FROM\n eth_txs\n WHERE\n id IN (\n (\n SELECT\n eth_commit_tx_id\n FROM\n l1_batches\n WHERE\n number > $1\n )\n UNION\n (\n SELECT\n eth_prove_tx_id\n FROM\n l1_batches\n WHERE\n number > $1\n )\n UNION\n (\n SELECT\n eth_execute_tx_id\n FROM\n l1_batches\n WHERE\n number > $1\n )\n )\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8" + ] + }, + "nullable": [] + }, + "hash": "8e2b160a4d0de1573ecd486c91b8abd8d4e534e5c17e4ffbcf5c97ff920b12d6" +} diff --git a/core/lib/dal/.sqlx/query-8f662682747a24fbe122533f421466f8a4efab1a52acc26f3a6c6b219a46390b.json b/core/lib/dal/.sqlx/query-8f662682747a24fbe122533f421466f8a4efab1a52acc26f3a6c6b219a46390b.json deleted file mode 100644 index 18c1bbd8a1ee..000000000000 --- a/core/lib/dal/.sqlx/query-8f662682747a24fbe122533f421466f8a4efab1a52acc26f3a6c6b219a46390b.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n DELETE FROM l2_to_l1_logs\n WHERE\n miniblock_number BETWEEN $1 AND $2\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8", - "Int8" - ] - }, - "nullable": [] - }, - "hash": "8f662682747a24fbe122533f421466f8a4efab1a52acc26f3a6c6b219a46390b" -} diff --git a/core/lib/dal/.sqlx/query-901b5259b9bfcb8469175a0a4ba9c7459db54dae9a2ea2db8595af4cb70c8aa9.json b/core/lib/dal/.sqlx/query-901b5259b9bfcb8469175a0a4ba9c7459db54dae9a2ea2db8595af4cb70c8aa9.json new file mode 100644 index 000000000000..cb67f695ec17 --- /dev/null +++ b/core/lib/dal/.sqlx/query-901b5259b9bfcb8469175a0a4ba9c7459db54dae9a2ea2db8595af4cb70c8aa9.json @@ -0,0 +1,22 @@ +{ + "db_name": "PostgreSQL", + "query": "\n DELETE FROM\n transactions\n WHERE\n miniblock_number IS NULL\n AND received_at < NOW() - $1 :: INTERVAL\n AND is_priority = FALSE\n AND error IS NULL\n RETURNING\n hash\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "hash", + "type_info": "Bytea" + } + ], + "parameters": { + "Left": [ + "Interval" + ] + }, + "nullable": [ + false + ] + }, + "hash": "901b5259b9bfcb8469175a0a4ba9c7459db54dae9a2ea2db8595af4cb70c8aa9" +} diff --git a/core/lib/dal/.sqlx/query-5137159db7d3ff456e368e6246b07554ce738a2d7005472e7e76a64a8fbd57ad.json b/core/lib/dal/.sqlx/query-90e69db5fce86f7735b550d0f60b0116e8dc7ad2cff1a746a4f3191ceadef0f5.json similarity index 69% rename from core/lib/dal/.sqlx/query-5137159db7d3ff456e368e6246b07554ce738a2d7005472e7e76a64a8fbd57ad.json rename to core/lib/dal/.sqlx/query-90e69db5fce86f7735b550d0f60b0116e8dc7ad2cff1a746a4f3191ceadef0f5.json index 07ef0aba074d..487aa4343b6c 100644 --- a/core/lib/dal/.sqlx/query-5137159db7d3ff456e368e6246b07554ce738a2d7005472e7e76a64a8fbd57ad.json +++ b/core/lib/dal/.sqlx/query-90e69db5fce86f7735b550d0f60b0116e8dc7ad2cff1a746a4f3191ceadef0f5.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n proof_generation_details (l1_batch_number, status, created_at, updated_at)\n VALUES\n ($1, 'unpicked', NOW(), NOW())\n ON CONFLICT (l1_batch_number) DO NOTHING\n ", + "query": "\n INSERT INTO\n proof_generation_details (l1_batch_number, status, created_at, updated_at)\n VALUES\n ($1, 'unpicked', NOW(), NOW()) ON CONFLICT (l1_batch_number) DO NOTHING\n ", "describe": { "columns": [], "parameters": { @@ -10,5 +10,5 @@ }, "nullable": [] }, - "hash": "5137159db7d3ff456e368e6246b07554ce738a2d7005472e7e76a64a8fbd57ad" + "hash": "90e69db5fce86f7735b550d0f60b0116e8dc7ad2cff1a746a4f3191ceadef0f5" } diff --git a/core/lib/dal/.sqlx/query-8b9e5d525c026de97c0a732b1adc8dc4bd57e32dfefe1017acba9a15fc14b895.json b/core/lib/dal/.sqlx/query-9583c10504ec214bc15eac407a7e6de657d21422fd1d46b1fc0d3e829393146c.json similarity index 77% rename from core/lib/dal/.sqlx/query-8b9e5d525c026de97c0a732b1adc8dc4bd57e32dfefe1017acba9a15fc14b895.json rename to core/lib/dal/.sqlx/query-9583c10504ec214bc15eac407a7e6de657d21422fd1d46b1fc0d3e829393146c.json index de369bccec54..a56a90c79f84 100644 --- a/core/lib/dal/.sqlx/query-8b9e5d525c026de97c0a732b1adc8dc4bd57e32dfefe1017acba9a15fc14b895.json +++ b/core/lib/dal/.sqlx/query-9583c10504ec214bc15eac407a7e6de657d21422fd1d46b1fc0d3e829393146c.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT\n storage_logs.hashed_key,\n storage_logs.value,\n initial_writes.index\n FROM\n storage_logs\n INNER JOIN initial_writes ON storage_logs.hashed_key = initial_writes.hashed_key\n WHERE\n storage_logs.miniblock_number = $1\n AND storage_logs.hashed_key >= $2::bytea\n AND storage_logs.hashed_key <= $3::bytea\n ORDER BY\n storage_logs.hashed_key\n ", + "query": "\n SELECT\n storage_logs.hashed_key,\n storage_logs.value,\n initial_writes.index\n FROM\n storage_logs\n INNER JOIN initial_writes ON storage_logs.hashed_key = initial_writes.hashed_key\n WHERE\n storage_logs.miniblock_number = $1\n AND storage_logs.hashed_key >= $2 :: bytea\n AND storage_logs.hashed_key <= $3 :: bytea\n ORDER BY\n storage_logs.hashed_key\n ", "describe": { "columns": [ { @@ -32,5 +32,5 @@ false ] }, - "hash": "8b9e5d525c026de97c0a732b1adc8dc4bd57e32dfefe1017acba9a15fc14b895" + "hash": "9583c10504ec214bc15eac407a7e6de657d21422fd1d46b1fc0d3e829393146c" } diff --git a/core/lib/dal/.sqlx/query-13b09ea7749530884233add59dee9906a81580f252b2260bfdaa46a25f45d1cd.json b/core/lib/dal/.sqlx/query-959e1b8231484611334d4441823ad49a080299632be9f41bc838d2e7416fce75.json similarity index 89% rename from core/lib/dal/.sqlx/query-13b09ea7749530884233add59dee9906a81580f252b2260bfdaa46a25f45d1cd.json rename to core/lib/dal/.sqlx/query-959e1b8231484611334d4441823ad49a080299632be9f41bc838d2e7416fce75.json index 45b58a1c833a..98c53313ad71 100644 --- a/core/lib/dal/.sqlx/query-13b09ea7749530884233add59dee9906a81580f252b2260bfdaa46a25f45d1cd.json +++ b/core/lib/dal/.sqlx/query-959e1b8231484611334d4441823ad49a080299632be9f41bc838d2e7416fce75.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT\n address,\n topic1,\n topic2,\n topic3,\n topic4,\n miniblock_number\n FROM\n events\n WHERE\n miniblock_number BETWEEN $1 AND $2\n ORDER BY\n miniblock_number\n ", + "query": "\n SELECT\n address,\n topic1,\n topic2,\n topic3,\n topic4,\n miniblock_number\n FROM\n EVENTS\n WHERE\n miniblock_number BETWEEN $1 AND $2\n ORDER BY\n miniblock_number\n ", "describe": { "columns": [ { @@ -49,5 +49,5 @@ false ] }, - "hash": "13b09ea7749530884233add59dee9906a81580f252b2260bfdaa46a25f45d1cd" + "hash": "959e1b8231484611334d4441823ad49a080299632be9f41bc838d2e7416fce75" } diff --git a/core/lib/dal/.sqlx/query-95ea0522a3eff6c0d2d0b1c58fd2767e112b95f4d103c27acd6f7ede108bd300.json b/core/lib/dal/.sqlx/query-95ea0522a3eff6c0d2d0b1c58fd2767e112b95f4d103c27acd6f7ede108bd300.json deleted file mode 100644 index 3c822fe50d17..000000000000 --- a/core/lib/dal/.sqlx/query-95ea0522a3eff6c0d2d0b1c58fd2767e112b95f4d103c27acd6f7ede108bd300.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE eth_txs\n SET\n gas_used = $1,\n confirmed_eth_tx_history_id = $2\n WHERE\n id = $3\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8", - "Int4", - "Int4" - ] - }, - "nullable": [] - }, - "hash": "95ea0522a3eff6c0d2d0b1c58fd2767e112b95f4d103c27acd6f7ede108bd300" -} diff --git a/core/lib/dal/.sqlx/query-b61b2545ff82bc3e2a198b21546735c1dcccdd6c439827fc4c3ba57e8767076e.json b/core/lib/dal/.sqlx/query-970fc9fe2ada8f862b8fe4dfd7cde5783f3df8ad73ef92b62bafc1a8b5e1046a.json similarity index 57% rename from core/lib/dal/.sqlx/query-b61b2545ff82bc3e2a198b21546735c1dcccdd6c439827fc4c3ba57e8767076e.json rename to core/lib/dal/.sqlx/query-970fc9fe2ada8f862b8fe4dfd7cde5783f3df8ad73ef92b62bafc1a8b5e1046a.json index 4f7101ed45e4..4e9cb6268a27 100644 --- a/core/lib/dal/.sqlx/query-b61b2545ff82bc3e2a198b21546735c1dcccdd6c439827fc4c3ba57e8767076e.json +++ b/core/lib/dal/.sqlx/query-970fc9fe2ada8f862b8fe4dfd7cde5783f3df8ad73ef92b62bafc1a8b5e1046a.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n UPDATE proof_generation_details\n SET\n proof_gen_data_blob_url = $1,\n updated_at = NOW()\n WHERE\n l1_batch_number = $2\n ", + "query": "\n UPDATE\n proof_generation_details\n SET\n status = $1,\n updated_at = NOW()\n WHERE\n l1_batch_number = $2\n ", "describe": { "columns": [], "parameters": { @@ -11,5 +11,5 @@ }, "nullable": [] }, - "hash": "b61b2545ff82bc3e2a198b21546735c1dcccdd6c439827fc4c3ba57e8767076e" + "hash": "970fc9fe2ada8f862b8fe4dfd7cde5783f3df8ad73ef92b62bafc1a8b5e1046a" } diff --git a/core/lib/dal/.sqlx/query-9a261b451c31d010b1b2bc0af25d2bd038257f7cf2ab51405dc05ccba3e33312.json b/core/lib/dal/.sqlx/query-9a261b451c31d010b1b2bc0af25d2bd038257f7cf2ab51405dc05ccba3e33312.json new file mode 100644 index 000000000000..a8acdfeffda5 --- /dev/null +++ b/core/lib/dal/.sqlx/query-9a261b451c31d010b1b2bc0af25d2bd038257f7cf2ab51405dc05ccba3e33312.json @@ -0,0 +1,16 @@ +{ + "db_name": "PostgreSQL", + "query": "\n INSERT INTO\n initial_writes (\n hashed_key,\n INDEX,\n l1_batch_number,\n created_at,\n updated_at\n )\n SELECT\n u.hashed_key,\n u.index,\n $3,\n NOW(),\n NOW()\n FROM\n UNNEST($1 :: bytea [], $2 :: BIGINT []) AS u (hashed_key, INDEX)\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "ByteaArray", + "Int8Array", + "Int8" + ] + }, + "nullable": [] + }, + "hash": "9a261b451c31d010b1b2bc0af25d2bd038257f7cf2ab51405dc05ccba3e33312" +} diff --git a/core/lib/dal/.sqlx/query-9cebabf4e4643a41452266a9d7c4e8901b631ff170733621ce3ece216d71205b.json b/core/lib/dal/.sqlx/query-9cebabf4e4643a41452266a9d7c4e8901b631ff170733621ce3ece216d71205b.json new file mode 100644 index 000000000000..e2e102bda4ba --- /dev/null +++ b/core/lib/dal/.sqlx/query-9cebabf4e4643a41452266a9d7c4e8901b631ff170733621ce3ece216d71205b.json @@ -0,0 +1,15 @@ +{ + "db_name": "PostgreSQL", + "query": "\n INSERT INTO\n l1_batches_consensus_committees (l1_batch_number, attesters, updated_at)\n VALUES\n ($1, $2, NOW()) ON CONFLICT (l1_batch_number) DO\n UPDATE\n SET\n l1_batch_number = $1,\n attesters = $2,\n updated_at = NOW()\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8", + "Jsonb" + ] + }, + "nullable": [] + }, + "hash": "9cebabf4e4643a41452266a9d7c4e8901b631ff170733621ce3ece216d71205b" +} diff --git a/core/lib/dal/.sqlx/query-66b3f476cf4487239190175d2940fd5e1330393d8b04c7cf03b8c7ab2edad5d1.json b/core/lib/dal/.sqlx/query-9cf8419746f9b86749c36d0a0d443ec6c9383b5cac5112569a77caa00747288c.json similarity index 51% rename from core/lib/dal/.sqlx/query-66b3f476cf4487239190175d2940fd5e1330393d8b04c7cf03b8c7ab2edad5d1.json rename to core/lib/dal/.sqlx/query-9cf8419746f9b86749c36d0a0d443ec6c9383b5cac5112569a77caa00747288c.json index 0cf4a1e32005..e2e6226e1836 100644 --- a/core/lib/dal/.sqlx/query-66b3f476cf4487239190175d2940fd5e1330393d8b04c7cf03b8c7ab2edad5d1.json +++ b/core/lib/dal/.sqlx/query-9cf8419746f9b86749c36d0a0d443ec6c9383b5cac5112569a77caa00747288c.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n transactions (\n hash,\n is_priority,\n initiator_address,\n gas_limit,\n max_fee_per_gas,\n gas_per_pubdata_limit,\n data,\n upgrade_id,\n contract_address,\n l1_block_number,\n value,\n paymaster,\n paymaster_input,\n tx_format,\n l1_tx_mint,\n l1_tx_refund_recipient,\n miniblock_number,\n index_in_block,\n error,\n execution_info,\n refunded_gas,\n effective_gas_price,\n received_at,\n created_at,\n updated_at\n )\n SELECT\n data_table.hash,\n TRUE,\n data_table.initiator_address,\n data_table.gas_limit,\n data_table.max_fee_per_gas,\n data_table.gas_per_pubdata_limit,\n data_table.data,\n data_table.upgrade_id,\n data_table.contract_address,\n data_table.l1_block_number,\n data_table.value,\n '\\x0000000000000000000000000000000000000000'::bytea,\n '\\x'::bytea,\n data_table.tx_format,\n data_table.l1_tx_mint,\n data_table.l1_tx_refund_recipient,\n $19,\n data_table.index_in_block,\n NULLIF(data_table.error, ''),\n data_table.execution_info,\n data_table.refunded_gas,\n data_table.effective_gas_price,\n NOW(),\n NOW(),\n NOW()\n FROM\n (\n SELECT\n UNNEST($1::BYTEA[]) AS hash,\n UNNEST($2::BYTEA[]) AS initiator_address,\n UNNEST($3::NUMERIC[]) AS gas_limit,\n UNNEST($4::NUMERIC[]) AS max_fee_per_gas,\n UNNEST($5::NUMERIC[]) AS gas_per_pubdata_limit,\n UNNEST($6::JSONB[]) AS data,\n UNNEST($7::INT[]) AS upgrade_id,\n UNNEST($8::BYTEA[]) AS contract_address,\n UNNEST($9::INT[]) AS l1_block_number,\n UNNEST($10::NUMERIC[]) AS value,\n UNNEST($11::INTEGER[]) AS tx_format,\n UNNEST($12::NUMERIC[]) AS l1_tx_mint,\n UNNEST($13::BYTEA[]) AS l1_tx_refund_recipient,\n UNNEST($14::INT[]) AS index_in_block,\n UNNEST($15::VARCHAR[]) AS error,\n UNNEST($16::JSONB[]) AS execution_info,\n UNNEST($17::BIGINT[]) AS refunded_gas,\n UNNEST($18::NUMERIC[]) AS effective_gas_price\n ) AS data_table\n ", + "query": "\n INSERT INTO\n transactions (\n hash,\n is_priority,\n initiator_address,\n gas_limit,\n max_fee_per_gas,\n gas_per_pubdata_limit,\n data,\n upgrade_id,\n contract_address,\n l1_block_number,\n value,\n paymaster,\n paymaster_input,\n tx_format,\n l1_tx_mint,\n l1_tx_refund_recipient,\n miniblock_number,\n index_in_block,\n error,\n execution_info,\n refunded_gas,\n effective_gas_price,\n received_at,\n created_at,\n updated_at\n )\n SELECT\n data_table.hash,\n TRUE,\n data_table.initiator_address,\n data_table.gas_limit,\n data_table.max_fee_per_gas,\n data_table.gas_per_pubdata_limit,\n data_table.data,\n data_table.upgrade_id,\n data_table.contract_address,\n data_table.l1_block_number,\n data_table.value,\n '\\x0000000000000000000000000000000000000000' :: bytea,\n '\\x' :: bytea,\n data_table.tx_format,\n data_table.l1_tx_mint,\n data_table.l1_tx_refund_recipient,\n $19,\n data_table.index_in_block,\n NULLIF(data_table.error, ''),\n data_table.execution_info,\n data_table.refunded_gas,\n data_table.effective_gas_price,\n NOW(),\n NOW(),\n NOW()\n FROM\n (\n SELECT\n UNNEST($1 :: BYTEA []) AS hash,\n UNNEST($2 :: BYTEA []) AS initiator_address,\n UNNEST($3 :: NUMERIC []) AS gas_limit,\n UNNEST($4 :: NUMERIC []) AS max_fee_per_gas,\n UNNEST($5 :: NUMERIC []) AS gas_per_pubdata_limit,\n UNNEST($6 :: JSONB []) AS data,\n UNNEST($7 :: INT []) AS upgrade_id,\n UNNEST($8 :: BYTEA []) AS contract_address,\n UNNEST($9 :: INT []) AS l1_block_number,\n UNNEST($10 :: NUMERIC []) AS value,\n UNNEST($11 :: INTEGER []) AS tx_format,\n UNNEST($12 :: NUMERIC []) AS l1_tx_mint,\n UNNEST($13 :: BYTEA []) AS l1_tx_refund_recipient,\n UNNEST($14 :: INT []) AS index_in_block,\n UNNEST($15 :: VARCHAR []) AS error,\n UNNEST($16 :: JSONB []) AS execution_info,\n UNNEST($17 :: BIGINT []) AS refunded_gas,\n UNNEST($18 :: NUMERIC []) AS effective_gas_price\n ) AS data_table\n ", "describe": { "columns": [], "parameters": { @@ -28,5 +28,5 @@ }, "nullable": [] }, - "hash": "66b3f476cf4487239190175d2940fd5e1330393d8b04c7cf03b8c7ab2edad5d1" + "hash": "9cf8419746f9b86749c36d0a0d443ec6c9383b5cac5112569a77caa00747288c" } diff --git a/core/lib/dal/.sqlx/query-9cfcde703a48b110791d2ae1103c9317c01d6e35db3b07d0a31f436e7e3c7c40.json b/core/lib/dal/.sqlx/query-9cfcde703a48b110791d2ae1103c9317c01d6e35db3b07d0a31f436e7e3c7c40.json deleted file mode 100644 index c4beef961733..000000000000 --- a/core/lib/dal/.sqlx/query-9cfcde703a48b110791d2ae1103c9317c01d6e35db3b07d0a31f436e7e3c7c40.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE contract_verification_requests\n SET\n status = 'successful',\n updated_at = NOW()\n WHERE\n id = $1\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8" - ] - }, - "nullable": [] - }, - "hash": "9cfcde703a48b110791d2ae1103c9317c01d6e35db3b07d0a31f436e7e3c7c40" -} diff --git a/core/lib/dal/.sqlx/query-9de5acb3de1b96ff8eb62a6324e8e221a8ef9014458cc7f1dbc60c056a0768a0.json b/core/lib/dal/.sqlx/query-9de5acb3de1b96ff8eb62a6324e8e221a8ef9014458cc7f1dbc60c056a0768a0.json deleted file mode 100644 index 674377635ced..000000000000 --- a/core/lib/dal/.sqlx/query-9de5acb3de1b96ff8eb62a6324e8e221a8ef9014458cc7f1dbc60c056a0768a0.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE snapshots\n SET\n storage_logs_filepaths[$2] = $3,\n updated_at = NOW()\n WHERE\n l1_batch_number = $1\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8", - "Int4", - "Text" - ] - }, - "nullable": [] - }, - "hash": "9de5acb3de1b96ff8eb62a6324e8e221a8ef9014458cc7f1dbc60c056a0768a0" -} diff --git a/core/lib/dal/.sqlx/query-a0fc795697398f22b45601f51a6d1910919b8b46e895ddaa4ba5bf411585dc6e.json b/core/lib/dal/.sqlx/query-a0fc795697398f22b45601f51a6d1910919b8b46e895ddaa4ba5bf411585dc6e.json new file mode 100644 index 000000000000..bb2c7a6f34b1 --- /dev/null +++ b/core/lib/dal/.sqlx/query-a0fc795697398f22b45601f51a6d1910919b8b46e895ddaa4ba5bf411585dc6e.json @@ -0,0 +1,16 @@ +{ + "db_name": "PostgreSQL", + "query": "\n INSERT INTO\n commitments (\n l1_batch_number,\n events_queue_commitment,\n bootloader_initial_content_commitment\n )\n VALUES\n ($1, $2, $3) ON CONFLICT (l1_batch_number) DO NOTHING\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8", + "Bytea", + "Bytea" + ] + }, + "nullable": [] + }, + "hash": "a0fc795697398f22b45601f51a6d1910919b8b46e895ddaa4ba5bf411585dc6e" +} diff --git a/core/lib/dal/.sqlx/query-a12b2f1fdd28f68a429f307d66259a410844c0e3cb5e190d1b8442da802825ad.json b/core/lib/dal/.sqlx/query-a12b2f1fdd28f68a429f307d66259a410844c0e3cb5e190d1b8442da802825ad.json new file mode 100644 index 000000000000..406de9f85cc1 --- /dev/null +++ b/core/lib/dal/.sqlx/query-a12b2f1fdd28f68a429f307d66259a410844c0e3cb5e190d1b8442da802825ad.json @@ -0,0 +1,14 @@ +{ + "db_name": "PostgreSQL", + "query": "\n DELETE FROM\n eth_txs_history\n WHERE\n id = $1\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int4" + ] + }, + "nullable": [] + }, + "hash": "a12b2f1fdd28f68a429f307d66259a410844c0e3cb5e190d1b8442da802825ad" +} diff --git a/core/lib/dal/.sqlx/query-a22e5f63ee08ee38efcba440364c08e57f95c6ee5a69f02f15eb1e886df4c882.json b/core/lib/dal/.sqlx/query-a22e5f63ee08ee38efcba440364c08e57f95c6ee5a69f02f15eb1e886df4c882.json new file mode 100644 index 000000000000..387ebfa0242b --- /dev/null +++ b/core/lib/dal/.sqlx/query-a22e5f63ee08ee38efcba440364c08e57f95c6ee5a69f02f15eb1e886df4c882.json @@ -0,0 +1,14 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE\n consensus_replica_state\n SET\n state = $1\n WHERE\n fake_key\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Jsonb" + ] + }, + "nullable": [] + }, + "hash": "a22e5f63ee08ee38efcba440364c08e57f95c6ee5a69f02f15eb1e886df4c882" +} diff --git a/core/lib/dal/.sqlx/query-a23d63b7c4264ee0f5b60c09f09f8fbd8fdaf23266412e2faffb7e3813213b98.json b/core/lib/dal/.sqlx/query-a23d63b7c4264ee0f5b60c09f09f8fbd8fdaf23266412e2faffb7e3813213b98.json deleted file mode 100644 index 257ce7050619..000000000000 --- a/core/lib/dal/.sqlx/query-a23d63b7c4264ee0f5b60c09f09f8fbd8fdaf23266412e2faffb7e3813213b98.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE proof_generation_details\n SET\n status = 'unpicked',\n updated_at = NOW()\n WHERE\n l1_batch_number = $1\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8" - ] - }, - "nullable": [] - }, - "hash": "a23d63b7c4264ee0f5b60c09f09f8fbd8fdaf23266412e2faffb7e3813213b98" -} diff --git a/core/lib/dal/.sqlx/query-a343c1ea8ad33350b21a820ba981719519938eccbea4a598d842bd75b9553880.json b/core/lib/dal/.sqlx/query-a343c1ea8ad33350b21a820ba981719519938eccbea4a598d842bd75b9553880.json new file mode 100644 index 000000000000..5280d28a8afd --- /dev/null +++ b/core/lib/dal/.sqlx/query-a343c1ea8ad33350b21a820ba981719519938eccbea4a598d842bd75b9553880.json @@ -0,0 +1,14 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE\n miniblocks\n SET\n logs_bloom = NULL\n WHERE\n number = $1\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8" + ] + }, + "nullable": [] + }, + "hash": "a343c1ea8ad33350b21a820ba981719519938eccbea4a598d842bd75b9553880" +} diff --git a/core/lib/dal/.sqlx/query-a3b4d8e4487dbc898277645524b8ad91e8653d01981640d2d068c9564393f7b9.json b/core/lib/dal/.sqlx/query-a3b4d8e4487dbc898277645524b8ad91e8653d01981640d2d068c9564393f7b9.json new file mode 100644 index 000000000000..485bac2d3195 --- /dev/null +++ b/core/lib/dal/.sqlx/query-a3b4d8e4487dbc898277645524b8ad91e8653d01981640d2d068c9564393f7b9.json @@ -0,0 +1,16 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE\n l1_batches\n SET\n eth_execute_tx_id = $1,\n updated_at = NOW()\n WHERE\n number BETWEEN $2 AND $3\n AND eth_execute_tx_id IS NULL\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int4", + "Int8", + "Int8" + ] + }, + "nullable": [] + }, + "hash": "a3b4d8e4487dbc898277645524b8ad91e8653d01981640d2d068c9564393f7b9" +} diff --git a/core/lib/dal/.sqlx/query-a4fcd075b68467bb119e49e6b20a69138206dfeb41f3daff4a3eef1de0bed4e4.json b/core/lib/dal/.sqlx/query-a4fcd075b68467bb119e49e6b20a69138206dfeb41f3daff4a3eef1de0bed4e4.json deleted file mode 100644 index 39b0c391ef59..000000000000 --- a/core/lib/dal/.sqlx/query-a4fcd075b68467bb119e49e6b20a69138206dfeb41f3daff4a3eef1de0bed4e4.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n initial_writes (hashed_key, INDEX, l1_batch_number, created_at, updated_at)\n SELECT\n u.hashed_key,\n u.index,\n $3,\n NOW(),\n NOW()\n FROM\n UNNEST($1::bytea[], $2::BIGINT[]) AS u (hashed_key, INDEX)\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "ByteaArray", - "Int8Array", - "Int8" - ] - }, - "nullable": [] - }, - "hash": "a4fcd075b68467bb119e49e6b20a69138206dfeb41f3daff4a3eef1de0bed4e4" -} diff --git a/core/lib/dal/.sqlx/query-a51b8f1eeb6ef6800619e7a5a91d10c23ab2924f6a3f0594f6990af8ea9146a6.json b/core/lib/dal/.sqlx/query-a51b8f1eeb6ef6800619e7a5a91d10c23ab2924f6a3f0594f6990af8ea9146a6.json deleted file mode 100644 index 9800b470795b..000000000000 --- a/core/lib/dal/.sqlx/query-a51b8f1eeb6ef6800619e7a5a91d10c23ab2924f6a3f0594f6990af8ea9146a6.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n DELETE FROM events\n WHERE\n miniblock_number BETWEEN $1 AND $2\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8", - "Int8" - ] - }, - "nullable": [] - }, - "hash": "a51b8f1eeb6ef6800619e7a5a91d10c23ab2924f6a3f0594f6990af8ea9146a6" -} diff --git a/core/lib/dal/.sqlx/query-acfd5a60fda5782bddb8cba033a5d3a0eed793f7b64ad3ed035f20e896371721.json b/core/lib/dal/.sqlx/query-a57b02104ce2fe58a6c8f7e946bcb94486499a3d5b380948cb94e4b5066fea9a.json similarity index 92% rename from core/lib/dal/.sqlx/query-acfd5a60fda5782bddb8cba033a5d3a0eed793f7b64ad3ed035f20e896371721.json rename to core/lib/dal/.sqlx/query-a57b02104ce2fe58a6c8f7e946bcb94486499a3d5b380948cb94e4b5066fea9a.json index 9232ef6d0096..ba258dc84fd5 100644 --- a/core/lib/dal/.sqlx/query-acfd5a60fda5782bddb8cba033a5d3a0eed793f7b64ad3ed035f20e896371721.json +++ b/core/lib/dal/.sqlx/query-a57b02104ce2fe58a6c8f7e946bcb94486499a3d5b380948cb94e4b5066fea9a.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n transactions (\n hash,\n is_priority,\n initiator_address,\n gas_limit,\n max_fee_per_gas,\n gas_per_pubdata_limit,\n data,\n priority_op_id,\n full_fee,\n layer_2_tip_fee,\n contract_address,\n l1_block_number,\n value,\n paymaster,\n paymaster_input,\n tx_format,\n l1_tx_mint,\n l1_tx_refund_recipient,\n received_at,\n created_at,\n updated_at\n )\n VALUES\n (\n $1,\n TRUE,\n $2,\n $3,\n $4,\n $5,\n $6,\n $7,\n $8,\n $9,\n $10,\n $11,\n $12,\n $13,\n $14,\n $15,\n $16,\n $17,\n $18,\n NOW(),\n NOW()\n )\n ON CONFLICT (hash) DO NOTHING\n ", + "query": "\n INSERT INTO\n transactions (\n hash,\n is_priority,\n initiator_address,\n gas_limit,\n max_fee_per_gas,\n gas_per_pubdata_limit,\n data,\n priority_op_id,\n full_fee,\n layer_2_tip_fee,\n contract_address,\n l1_block_number,\n value,\n paymaster,\n paymaster_input,\n tx_format,\n l1_tx_mint,\n l1_tx_refund_recipient,\n received_at,\n created_at,\n updated_at\n )\n VALUES\n (\n $1,\n TRUE,\n $2,\n $3,\n $4,\n $5,\n $6,\n $7,\n $8,\n $9,\n $10,\n $11,\n $12,\n $13,\n $14,\n $15,\n $16,\n $17,\n $18,\n NOW(),\n NOW()\n ) ON CONFLICT (hash) DO NOTHING\n ", "describe": { "columns": [], "parameters": { @@ -27,5 +27,5 @@ }, "nullable": [] }, - "hash": "acfd5a60fda5782bddb8cba033a5d3a0eed793f7b64ad3ed035f20e896371721" + "hash": "a57b02104ce2fe58a6c8f7e946bcb94486499a3d5b380948cb94e4b5066fea9a" } diff --git a/core/lib/dal/.sqlx/query-a74d029f58801ec05d8d14a3b065d93e391600ab9da2e5fd4e8b139ab3d77583.json b/core/lib/dal/.sqlx/query-a74d029f58801ec05d8d14a3b065d93e391600ab9da2e5fd4e8b139ab3d77583.json deleted file mode 100644 index c4f1f4bbcd0d..000000000000 --- a/core/lib/dal/.sqlx/query-a74d029f58801ec05d8d14a3b065d93e391600ab9da2e5fd4e8b139ab3d77583.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE proof_generation_details\n SET\n status = 'generated',\n proof_blob_url = $1,\n updated_at = NOW()\n WHERE\n l1_batch_number = $2\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Text", - "Int8" - ] - }, - "nullable": [] - }, - "hash": "a74d029f58801ec05d8d14a3b065d93e391600ab9da2e5fd4e8b139ab3d77583" -} diff --git a/core/lib/dal/.sqlx/query-a8dad09a54cc991706141da557dde45f8f3f3b6cf2e4136f25a1c3ab85d92668.json b/core/lib/dal/.sqlx/query-a8dad09a54cc991706141da557dde45f8f3f3b6cf2e4136f25a1c3ab85d92668.json deleted file mode 100644 index 1fd7b8fdf1b3..000000000000 --- a/core/lib/dal/.sqlx/query-a8dad09a54cc991706141da557dde45f8f3f3b6cf2e4136f25a1c3ab85d92668.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE protocol_versions\n SET\n upgrade_tx_hash = $1\n WHERE\n id = $2\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Bytea", - "Int4" - ] - }, - "nullable": [] - }, - "hash": "a8dad09a54cc991706141da557dde45f8f3f3b6cf2e4136f25a1c3ab85d92668" -} diff --git a/core/lib/dal/.sqlx/query-aab0254e6bf2c109d97e84053cb08f1ce816a56308fb9fe581b8683f76cbbbc3.json b/core/lib/dal/.sqlx/query-aab0254e6bf2c109d97e84053cb08f1ce816a56308fb9fe581b8683f76cbbbc3.json deleted file mode 100644 index 850dfc675743..000000000000 --- a/core/lib/dal/.sqlx/query-aab0254e6bf2c109d97e84053cb08f1ce816a56308fb9fe581b8683f76cbbbc3.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE vm_runner_bwip\n SET\n time_taken = NOW() - processing_started_at\n WHERE\n l1_batch_number = $1\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8" - ] - }, - "nullable": [] - }, - "hash": "aab0254e6bf2c109d97e84053cb08f1ce816a56308fb9fe581b8683f76cbbbc3" -} diff --git a/core/lib/dal/.sqlx/query-ab68f07dc6f3ec66200df109527877866bbdd1f8c359d97538125756fd05a2ab.json b/core/lib/dal/.sqlx/query-ab68f07dc6f3ec66200df109527877866bbdd1f8c359d97538125756fd05a2ab.json deleted file mode 100644 index 5560d6599320..000000000000 --- a/core/lib/dal/.sqlx/query-ab68f07dc6f3ec66200df109527877866bbdd1f8c359d97538125756fd05a2ab.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n DELETE FROM consensus_replica_state\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [] - }, - "nullable": [] - }, - "hash": "ab68f07dc6f3ec66200df109527877866bbdd1f8c359d97538125756fd05a2ab" -} diff --git a/core/lib/dal/.sqlx/query-406e51d7884cdff36632ccf97912484f0a0d76a8097b61ead5f1f20301ce524d.json b/core/lib/dal/.sqlx/query-abea8d1555215836299a2e640e8440e65af4ac1cbd81ae1bce16e74927ddfa7b.json similarity index 61% rename from core/lib/dal/.sqlx/query-406e51d7884cdff36632ccf97912484f0a0d76a8097b61ead5f1f20301ce524d.json rename to core/lib/dal/.sqlx/query-abea8d1555215836299a2e640e8440e65af4ac1cbd81ae1bce16e74927ddfa7b.json index cc3c2a344eb4..6b0bfd88cf42 100644 --- a/core/lib/dal/.sqlx/query-406e51d7884cdff36632ccf97912484f0a0d76a8097b61ead5f1f20301ce524d.json +++ b/core/lib/dal/.sqlx/query-abea8d1555215836299a2e640e8440e65af4ac1cbd81ae1bce16e74927ddfa7b.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n snapshots (\n VERSION,\n l1_batch_number,\n storage_logs_filepaths,\n factory_deps_filepath,\n created_at,\n updated_at\n )\n VALUES\n ($1, $2, ARRAY_FILL(''::TEXT, ARRAY[$3::INTEGER]), $4, NOW(), NOW())\n ", + "query": "\n INSERT INTO\n snapshots (\n VERSION,\n l1_batch_number,\n storage_logs_filepaths,\n factory_deps_filepath,\n created_at,\n updated_at\n )\n VALUES\n (\n $1,\n $2,\n ARRAY_FILL('' :: TEXT, ARRAY [$3::INTEGER]),\n $4,\n NOW(),\n NOW()\n )\n ", "describe": { "columns": [], "parameters": { @@ -13,5 +13,5 @@ }, "nullable": [] }, - "hash": "406e51d7884cdff36632ccf97912484f0a0d76a8097b61ead5f1f20301ce524d" + "hash": "abea8d1555215836299a2e640e8440e65af4ac1cbd81ae1bce16e74927ddfa7b" } diff --git a/core/lib/dal/.sqlx/query-ae204503b0a682a9edc4d7bd7430457113e073b392c569c077d719941d1e37aa.json b/core/lib/dal/.sqlx/query-ae204503b0a682a9edc4d7bd7430457113e073b392c569c077d719941d1e37aa.json deleted file mode 100644 index 252dfb23b4e8..000000000000 --- a/core/lib/dal/.sqlx/query-ae204503b0a682a9edc4d7bd7430457113e073b392c569c077d719941d1e37aa.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE consensus_replica_state\n SET\n state = $1\n WHERE\n fake_key\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Jsonb" - ] - }, - "nullable": [] - }, - "hash": "ae204503b0a682a9edc4d7bd7430457113e073b392c569c077d719941d1e37aa" -} diff --git a/core/lib/dal/.sqlx/query-aeda34b1beadca72e3e600ea9ae63f436a4f16dbeb784d0d28be392ad96b1c49.json b/core/lib/dal/.sqlx/query-aeda34b1beadca72e3e600ea9ae63f436a4f16dbeb784d0d28be392ad96b1c49.json deleted file mode 100644 index b411d3ce8309..000000000000 --- a/core/lib/dal/.sqlx/query-aeda34b1beadca72e3e600ea9ae63f436a4f16dbeb784d0d28be392ad96b1c49.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE eth_txs\n SET\n has_failed = TRUE\n WHERE\n id = $1\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int4" - ] - }, - "nullable": [] - }, - "hash": "aeda34b1beadca72e3e600ea9ae63f436a4f16dbeb784d0d28be392ad96b1c49" -} diff --git a/core/lib/dal/.sqlx/query-b313ab2b1e0a83136a202ea758c6d2b2e3f2497e6b5f26c72e220397cc0e62f7.json b/core/lib/dal/.sqlx/query-b313ab2b1e0a83136a202ea758c6d2b2e3f2497e6b5f26c72e220397cc0e62f7.json deleted file mode 100644 index 356fd8e9d999..000000000000 --- a/core/lib/dal/.sqlx/query-b313ab2b1e0a83136a202ea758c6d2b2e3f2497e6b5f26c72e220397cc0e62f7.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n l1_batches_consensus_committees (l1_batch_number, attesters, updated_at)\n VALUES\n ($1, $2, NOW())\n ON CONFLICT (l1_batch_number) DO\n UPDATE\n SET\n l1_batch_number = $1,\n attesters = $2,\n updated_at = NOW()\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8", - "Jsonb" - ] - }, - "nullable": [] - }, - "hash": "b313ab2b1e0a83136a202ea758c6d2b2e3f2497e6b5f26c72e220397cc0e62f7" -} diff --git a/core/lib/dal/.sqlx/query-b452354c888bfc19b5f4012582061b86b1abd915739533f9982fea9d8e21b9e9.json b/core/lib/dal/.sqlx/query-b452354c888bfc19b5f4012582061b86b1abd915739533f9982fea9d8e21b9e9.json deleted file mode 100644 index e87b9a2cddd6..000000000000 --- a/core/lib/dal/.sqlx/query-b452354c888bfc19b5f4012582061b86b1abd915739533f9982fea9d8e21b9e9.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n DELETE FROM factory_deps\n WHERE\n miniblock_number > $1\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8" - ] - }, - "nullable": [] - }, - "hash": "b452354c888bfc19b5f4012582061b86b1abd915739533f9982fea9d8e21b9e9" -} diff --git a/core/lib/dal/.sqlx/query-b47a2961dc2f1347864682c572dd1f5e03924dbf6dd1e824d4aca837e604b7e9.json b/core/lib/dal/.sqlx/query-b47a2961dc2f1347864682c572dd1f5e03924dbf6dd1e824d4aca837e604b7e9.json deleted file mode 100644 index 63acfcb30dc7..000000000000 --- a/core/lib/dal/.sqlx/query-b47a2961dc2f1347864682c572dd1f5e03924dbf6dd1e824d4aca837e604b7e9.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n SELECT\n table_name,\n PG_TABLE_SIZE(('public.' || QUOTE_IDENT(table_name))::regclass) AS table_size,\n PG_INDEXES_SIZE(('public.' || QUOTE_IDENT(table_name))::regclass) AS indexes_size,\n PG_RELATION_SIZE(('public.' || QUOTE_IDENT(table_name))::regclass) AS relation_size,\n PG_TOTAL_RELATION_SIZE(('public.' || QUOTE_IDENT(table_name))::regclass) AS total_size\n FROM\n information_schema.tables\n WHERE\n table_schema = 'public'\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "table_name", - "type_info": "Name" - }, - { - "ordinal": 1, - "name": "table_size", - "type_info": "Int8" - }, - { - "ordinal": 2, - "name": "indexes_size", - "type_info": "Int8" - }, - { - "ordinal": 3, - "name": "relation_size", - "type_info": "Int8" - }, - { - "ordinal": 4, - "name": "total_size", - "type_info": "Int8" - } - ], - "parameters": { - "Left": [] - }, - "nullable": [ - true, - null, - null, - null, - null - ] - }, - "hash": "b47a2961dc2f1347864682c572dd1f5e03924dbf6dd1e824d4aca837e604b7e9" -} diff --git a/core/lib/dal/.sqlx/query-b4a0444897b60c7061363a48b2b5386a2fd53492f3df05545edbfb0ec0f059d2.json b/core/lib/dal/.sqlx/query-b4a0444897b60c7061363a48b2b5386a2fd53492f3df05545edbfb0ec0f059d2.json deleted file mode 100644 index 804f6c5ac332..000000000000 --- a/core/lib/dal/.sqlx/query-b4a0444897b60c7061363a48b2b5386a2fd53492f3df05545edbfb0ec0f059d2.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE eth_txs\n SET\n confirmed_eth_tx_history_id = $1\n WHERE\n id = $2\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int4", - "Int4" - ] - }, - "nullable": [] - }, - "hash": "b4a0444897b60c7061363a48b2b5386a2fd53492f3df05545edbfb0ec0f059d2" -} diff --git a/core/lib/dal/.sqlx/query-b5cd80d579d87c610b16640166371a5609ca74432dcec3c169279bbbfce9fdae.json b/core/lib/dal/.sqlx/query-b5cd80d579d87c610b16640166371a5609ca74432dcec3c169279bbbfce9fdae.json new file mode 100644 index 000000000000..95428a733163 --- /dev/null +++ b/core/lib/dal/.sqlx/query-b5cd80d579d87c610b16640166371a5609ca74432dcec3c169279bbbfce9fdae.json @@ -0,0 +1,16 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE\n eth_txs\n SET\n gas_used = $1,\n confirmed_eth_tx_history_id = $2\n WHERE\n id = $3\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8", + "Int4", + "Int4" + ] + }, + "nullable": [] + }, + "hash": "b5cd80d579d87c610b16640166371a5609ca74432dcec3c169279bbbfce9fdae" +} diff --git a/core/lib/dal/.sqlx/query-b6ce3e762f37ab0d5b052f080715637fcf7f6c27d1238b17bc0f9bc50a0ffa7a.json b/core/lib/dal/.sqlx/query-b6ce3e762f37ab0d5b052f080715637fcf7f6c27d1238b17bc0f9bc50a0ffa7a.json new file mode 100644 index 000000000000..6434fb3d38c2 --- /dev/null +++ b/core/lib/dal/.sqlx/query-b6ce3e762f37ab0d5b052f080715637fcf7f6c27d1238b17bc0f9bc50a0ffa7a.json @@ -0,0 +1,14 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE\n miniblocks\n SET\n l1_batch_number = $1\n WHERE\n l1_batch_number IS NULL\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8" + ] + }, + "nullable": [] + }, + "hash": "b6ce3e762f37ab0d5b052f080715637fcf7f6c27d1238b17bc0f9bc50a0ffa7a" +} diff --git a/core/lib/dal/.sqlx/query-b73e874da2c1aa9de4fe700166458e579752dea7632e9422c2921a5d7e4d62ba.json b/core/lib/dal/.sqlx/query-b73e874da2c1aa9de4fe700166458e579752dea7632e9422c2921a5d7e4d62ba.json new file mode 100644 index 000000000000..399e75b0f6c8 --- /dev/null +++ b/core/lib/dal/.sqlx/query-b73e874da2c1aa9de4fe700166458e579752dea7632e9422c2921a5d7e4d62ba.json @@ -0,0 +1,16 @@ +{ + "db_name": "PostgreSQL", + "query": "\n INSERT INTO\n tee_proof_generation_details (\n l1_batch_number,\n tee_type,\n status,\n created_at,\n updated_at\n )\n VALUES\n ($1, $2, $3, NOW(), NOW()) ON CONFLICT (l1_batch_number, tee_type) DO NOTHING\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8", + "Text", + "Text" + ] + }, + "nullable": [] + }, + "hash": "b73e874da2c1aa9de4fe700166458e579752dea7632e9422c2921a5d7e4d62ba" +} diff --git a/core/lib/dal/.sqlx/query-b95b63f22afee3b186da4284a0a1cc9d3523a392fd2011491c6017400f313a16.json b/core/lib/dal/.sqlx/query-b95b63f22afee3b186da4284a0a1cc9d3523a392fd2011491c6017400f313a16.json deleted file mode 100644 index 5d8801137b92..000000000000 --- a/core/lib/dal/.sqlx/query-b95b63f22afee3b186da4284a0a1cc9d3523a392fd2011491c6017400f313a16.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n DELETE FROM storage_logs\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [] - }, - "nullable": [] - }, - "hash": "b95b63f22afee3b186da4284a0a1cc9d3523a392fd2011491c6017400f313a16" -} diff --git a/core/lib/dal/.sqlx/query-ba2343a38e37d104786f9276d91f67d2ef1428c61ae84003c9b52b03204d1f0a.json b/core/lib/dal/.sqlx/query-ba2343a38e37d104786f9276d91f67d2ef1428c61ae84003c9b52b03204d1f0a.json deleted file mode 100644 index ff6082651184..000000000000 --- a/core/lib/dal/.sqlx/query-ba2343a38e37d104786f9276d91f67d2ef1428c61ae84003c9b52b03204d1f0a.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n DELETE FROM transactions\n WHERE\n in_mempool = TRUE\n AND initiator_address = ANY ($1)\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "ByteaArray" - ] - }, - "nullable": [] - }, - "hash": "ba2343a38e37d104786f9276d91f67d2ef1428c61ae84003c9b52b03204d1f0a" -} diff --git a/core/lib/dal/.sqlx/query-ba978a517822c512a1a5bf9f9119d5cc099abb0e1ccac715094c46297aacb3f4.json b/core/lib/dal/.sqlx/query-ba978a517822c512a1a5bf9f9119d5cc099abb0e1ccac715094c46297aacb3f4.json new file mode 100644 index 000000000000..f5aa67f70b41 --- /dev/null +++ b/core/lib/dal/.sqlx/query-ba978a517822c512a1a5bf9f9119d5cc099abb0e1ccac715094c46297aacb3f4.json @@ -0,0 +1,100 @@ +{ + "db_name": "PostgreSQL", + "query": "\n WITH events_select AS (\n SELECT\n address,\n topic1,\n topic2,\n topic3,\n topic4,\n value,\n miniblock_number,\n tx_hash,\n tx_index_in_block,\n event_index_in_block,\n event_index_in_tx\n FROM\n EVENTS\n WHERE\n miniblock_number > $1\n ORDER BY\n miniblock_number ASC,\n event_index_in_block ASC\n )\n SELECT\n miniblocks.hash AS \"block_hash?\",\n address AS \"address!\",\n topic1 AS \"topic1!\",\n topic2 AS \"topic2!\",\n topic3 AS \"topic3!\",\n topic4 AS \"topic4!\",\n value AS \"value!\",\n miniblock_number AS \"miniblock_number!\",\n miniblocks.l1_batch_number AS \"l1_batch_number?\",\n tx_hash AS \"tx_hash!\",\n tx_index_in_block AS \"tx_index_in_block!\",\n event_index_in_block AS \"event_index_in_block!\",\n event_index_in_tx AS \"event_index_in_tx!\",\n miniblocks.timestamp AS \"block_timestamp\"\n FROM\n events_select\n INNER JOIN miniblocks ON events_select.miniblock_number = miniblocks.number\n ORDER BY\n miniblock_number ASC,\n event_index_in_block ASC\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "block_hash?", + "type_info": "Bytea" + }, + { + "ordinal": 1, + "name": "address!", + "type_info": "Bytea" + }, + { + "ordinal": 2, + "name": "topic1!", + "type_info": "Bytea" + }, + { + "ordinal": 3, + "name": "topic2!", + "type_info": "Bytea" + }, + { + "ordinal": 4, + "name": "topic3!", + "type_info": "Bytea" + }, + { + "ordinal": 5, + "name": "topic4!", + "type_info": "Bytea" + }, + { + "ordinal": 6, + "name": "value!", + "type_info": "Bytea" + }, + { + "ordinal": 7, + "name": "miniblock_number!", + "type_info": "Int8" + }, + { + "ordinal": 8, + "name": "l1_batch_number?", + "type_info": "Int8" + }, + { + "ordinal": 9, + "name": "tx_hash!", + "type_info": "Bytea" + }, + { + "ordinal": 10, + "name": "tx_index_in_block!", + "type_info": "Int4" + }, + { + "ordinal": 11, + "name": "event_index_in_block!", + "type_info": "Int4" + }, + { + "ordinal": 12, + "name": "event_index_in_tx!", + "type_info": "Int4" + }, + { + "ordinal": 13, + "name": "block_timestamp", + "type_info": "Int8" + } + ], + "parameters": { + "Left": [ + "Int8" + ] + }, + "nullable": [ + false, + false, + false, + false, + false, + false, + false, + false, + true, + false, + false, + false, + false, + false + ] + }, + "hash": "ba978a517822c512a1a5bf9f9119d5cc099abb0e1ccac715094c46297aacb3f4" +} diff --git a/core/lib/dal/.sqlx/query-040eaa878c3473f5edc73b77e572b5ea100f59295cd693d14ee0d5ee089c7981.json b/core/lib/dal/.sqlx/query-bb686779db0b9b0cb844702affbd5560139c2bc540cc7777da44c9585206382c.json similarity index 63% rename from core/lib/dal/.sqlx/query-040eaa878c3473f5edc73b77e572b5ea100f59295cd693d14ee0d5ee089c7981.json rename to core/lib/dal/.sqlx/query-bb686779db0b9b0cb844702affbd5560139c2bc540cc7777da44c9585206382c.json index c0e0c777cc52..02a30c5f4f71 100644 --- a/core/lib/dal/.sqlx/query-040eaa878c3473f5edc73b77e572b5ea100f59295cd693d14ee0d5ee089c7981.json +++ b/core/lib/dal/.sqlx/query-bb686779db0b9b0cb844702affbd5560139c2bc540cc7777da44c9585206382c.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT\n l1_batch_number\n FROM\n snapshots\n WHERE\n NOT (''::TEXT = ANY (storage_logs_filepaths))\n ORDER BY\n l1_batch_number DESC\n ", + "query": "\n SELECT\n l1_batch_number\n FROM\n snapshots\n WHERE\n NOT ('' :: TEXT = ANY (storage_logs_filepaths))\n ORDER BY\n l1_batch_number DESC\n ", "describe": { "columns": [ { @@ -16,5 +16,5 @@ false ] }, - "hash": "040eaa878c3473f5edc73b77e572b5ea100f59295cd693d14ee0d5ee089c7981" + "hash": "bb686779db0b9b0cb844702affbd5560139c2bc540cc7777da44c9585206382c" } diff --git a/core/lib/dal/.sqlx/query-a8d55f14de2f489fdc12c8da540e0d51f86d30d5ad92496e4aa087a3c4aae09f.json b/core/lib/dal/.sqlx/query-bb728bbbf89d3996b7412043ead62a7c60e89631bfe95611f156dac532218ca5.json similarity index 53% rename from core/lib/dal/.sqlx/query-a8d55f14de2f489fdc12c8da540e0d51f86d30d5ad92496e4aa087a3c4aae09f.json rename to core/lib/dal/.sqlx/query-bb728bbbf89d3996b7412043ead62a7c60e89631bfe95611f156dac532218ca5.json index b00999f21448..8f59ccb3f3d2 100644 --- a/core/lib/dal/.sqlx/query-a8d55f14de2f489fdc12c8da540e0d51f86d30d5ad92496e4aa087a3c4aae09f.json +++ b/core/lib/dal/.sqlx/query-bb728bbbf89d3996b7412043ead62a7c60e89631bfe95611f156dac532218ca5.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n transactions (\n hash,\n is_priority,\n initiator_address,\n gas_limit,\n max_fee_per_gas,\n gas_per_pubdata_limit,\n data,\n priority_op_id,\n full_fee,\n layer_2_tip_fee,\n contract_address,\n l1_block_number,\n value,\n paymaster,\n paymaster_input,\n tx_format,\n l1_tx_mint,\n l1_tx_refund_recipient,\n miniblock_number,\n index_in_block,\n error,\n execution_info,\n refunded_gas,\n effective_gas_price,\n received_at,\n created_at,\n updated_at\n )\n SELECT\n data_table.hash,\n TRUE,\n data_table.initiator_address,\n data_table.gas_limit,\n data_table.max_fee_per_gas,\n data_table.gas_per_pubdata_limit,\n data_table.data,\n data_table.priority_op_id,\n data_table.full_fee,\n data_table.layer_2_tip_fee,\n data_table.contract_address,\n data_table.l1_block_number,\n data_table.value,\n '\\x0000000000000000000000000000000000000000'::bytea,\n '\\x'::bytea,\n data_table.tx_format,\n data_table.l1_tx_mint,\n data_table.l1_tx_refund_recipient,\n $21,\n data_table.index_in_block,\n NULLIF(data_table.error, ''),\n data_table.execution_info,\n data_table.refunded_gas,\n data_table.effective_gas_price,\n NOW(),\n NOW(),\n NOW()\n FROM\n (\n SELECT\n UNNEST($1::BYTEA[]) AS hash,\n UNNEST($2::BYTEA[]) AS initiator_address,\n UNNEST($3::NUMERIC[]) AS gas_limit,\n UNNEST($4::NUMERIC[]) AS max_fee_per_gas,\n UNNEST($5::NUMERIC[]) AS gas_per_pubdata_limit,\n UNNEST($6::JSONB[]) AS data,\n UNNEST($7::BIGINT[]) AS priority_op_id,\n UNNEST($8::NUMERIC[]) AS full_fee,\n UNNEST($9::NUMERIC[]) AS layer_2_tip_fee,\n UNNEST($10::BYTEA[]) AS contract_address,\n UNNEST($11::INT[]) AS l1_block_number,\n UNNEST($12::NUMERIC[]) AS value,\n UNNEST($13::INTEGER[]) AS tx_format,\n UNNEST($14::NUMERIC[]) AS l1_tx_mint,\n UNNEST($15::BYTEA[]) AS l1_tx_refund_recipient,\n UNNEST($16::INT[]) AS index_in_block,\n UNNEST($17::VARCHAR[]) AS error,\n UNNEST($18::JSONB[]) AS execution_info,\n UNNEST($19::BIGINT[]) AS refunded_gas,\n UNNEST($20::NUMERIC[]) AS effective_gas_price\n ) AS data_table\n ", + "query": "\n INSERT INTO\n transactions (\n hash,\n is_priority,\n initiator_address,\n gas_limit,\n max_fee_per_gas,\n gas_per_pubdata_limit,\n data,\n priority_op_id,\n full_fee,\n layer_2_tip_fee,\n contract_address,\n l1_block_number,\n value,\n paymaster,\n paymaster_input,\n tx_format,\n l1_tx_mint,\n l1_tx_refund_recipient,\n miniblock_number,\n index_in_block,\n error,\n execution_info,\n refunded_gas,\n effective_gas_price,\n received_at,\n created_at,\n updated_at\n )\n SELECT\n data_table.hash,\n TRUE,\n data_table.initiator_address,\n data_table.gas_limit,\n data_table.max_fee_per_gas,\n data_table.gas_per_pubdata_limit,\n data_table.data,\n data_table.priority_op_id,\n data_table.full_fee,\n data_table.layer_2_tip_fee,\n data_table.contract_address,\n data_table.l1_block_number,\n data_table.value,\n '\\x0000000000000000000000000000000000000000' :: bytea,\n '\\x' :: bytea,\n data_table.tx_format,\n data_table.l1_tx_mint,\n data_table.l1_tx_refund_recipient,\n $21,\n data_table.index_in_block,\n NULLIF(data_table.error, ''),\n data_table.execution_info,\n data_table.refunded_gas,\n data_table.effective_gas_price,\n NOW(),\n NOW(),\n NOW()\n FROM\n (\n SELECT\n UNNEST($1 :: BYTEA []) AS hash,\n UNNEST($2 :: BYTEA []) AS initiator_address,\n UNNEST($3 :: NUMERIC []) AS gas_limit,\n UNNEST($4 :: NUMERIC []) AS max_fee_per_gas,\n UNNEST($5 :: NUMERIC []) AS gas_per_pubdata_limit,\n UNNEST($6 :: JSONB []) AS data,\n UNNEST($7 :: BIGINT []) AS priority_op_id,\n UNNEST($8 :: NUMERIC []) AS full_fee,\n UNNEST($9 :: NUMERIC []) AS layer_2_tip_fee,\n UNNEST($10 :: BYTEA []) AS contract_address,\n UNNEST($11 :: INT []) AS l1_block_number,\n UNNEST($12 :: NUMERIC []) AS value,\n UNNEST($13 :: INTEGER []) AS tx_format,\n UNNEST($14 :: NUMERIC []) AS l1_tx_mint,\n UNNEST($15 :: BYTEA []) AS l1_tx_refund_recipient,\n UNNEST($16 :: INT []) AS index_in_block,\n UNNEST($17 :: VARCHAR []) AS error,\n UNNEST($18 :: JSONB []) AS execution_info,\n UNNEST($19 :: BIGINT []) AS refunded_gas,\n UNNEST($20 :: NUMERIC []) AS effective_gas_price\n ) AS data_table\n ", "describe": { "columns": [], "parameters": { @@ -30,5 +30,5 @@ }, "nullable": [] }, - "hash": "a8d55f14de2f489fdc12c8da540e0d51f86d30d5ad92496e4aa087a3c4aae09f" + "hash": "bb728bbbf89d3996b7412043ead62a7c60e89631bfe95611f156dac532218ca5" } diff --git a/core/lib/dal/.sqlx/query-bd51c9d93b103292f5acbdb266ba4b4e2af48907fa9321064ddb24ac02ab17cd.json b/core/lib/dal/.sqlx/query-bd51c9d93b103292f5acbdb266ba4b4e2af48907fa9321064ddb24ac02ab17cd.json deleted file mode 100644 index 7f1fc9b176c5..000000000000 --- a/core/lib/dal/.sqlx/query-bd51c9d93b103292f5acbdb266ba4b4e2af48907fa9321064ddb24ac02ab17cd.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n SELECT\n number\n FROM\n l1_batches\n LEFT JOIN eth_txs_history AS commit_tx ON (l1_batches.eth_commit_tx_id = commit_tx.eth_tx_id)\n WHERE\n commit_tx.confirmed_at IS NOT NULL\n ORDER BY\n number DESC\n LIMIT\n 1\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "number", - "type_info": "Int8" - } - ], - "parameters": { - "Left": [] - }, - "nullable": [ - false - ] - }, - "hash": "bd51c9d93b103292f5acbdb266ba4b4e2af48907fa9321064ddb24ac02ab17cd" -} diff --git a/core/lib/dal/.sqlx/query-bd8a4057d6b0ece3298becbe143facec8c88629c4993f6c86a30193c7916fff6.json b/core/lib/dal/.sqlx/query-bd8a4057d6b0ece3298becbe143facec8c88629c4993f6c86a30193c7916fff6.json new file mode 100644 index 000000000000..5a06cedf6bbb --- /dev/null +++ b/core/lib/dal/.sqlx/query-bd8a4057d6b0ece3298becbe143facec8c88629c4993f6c86a30193c7916fff6.json @@ -0,0 +1,12 @@ +{ + "db_name": "PostgreSQL", + "query": "\n DELETE FROM\n l1_batches_consensus\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [] + }, + "nullable": [] + }, + "hash": "bd8a4057d6b0ece3298becbe143facec8c88629c4993f6c86a30193c7916fff6" +} diff --git a/core/lib/dal/.sqlx/query-bdd26a468254acd2ed54f17f37b4fdfd4e8aed4c63898af5b3c3d5ad2c6bec6c.json b/core/lib/dal/.sqlx/query-bdd26a468254acd2ed54f17f37b4fdfd4e8aed4c63898af5b3c3d5ad2c6bec6c.json new file mode 100644 index 000000000000..9ae7a5fe2471 --- /dev/null +++ b/core/lib/dal/.sqlx/query-bdd26a468254acd2ed54f17f37b4fdfd4e8aed4c63898af5b3c3d5ad2c6bec6c.json @@ -0,0 +1,15 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE\n transactions\n SET\n input = NULL,\n data = '{}',\n execution_info = '{}',\n updated_at = NOW()\n WHERE\n miniblock_number BETWEEN $1 AND $2\n AND upgrade_id IS NULL\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8", + "Int8" + ] + }, + "nullable": [] + }, + "hash": "bdd26a468254acd2ed54f17f37b4fdfd4e8aed4c63898af5b3c3d5ad2c6bec6c" +} diff --git a/core/lib/dal/.sqlx/query-bdf8b49f917e67009bb5f1d951575072106e943b76c17ef42a1138e291da86c6.json b/core/lib/dal/.sqlx/query-bdf8b49f917e67009bb5f1d951575072106e943b76c17ef42a1138e291da86c6.json new file mode 100644 index 000000000000..b22882ec86da --- /dev/null +++ b/core/lib/dal/.sqlx/query-bdf8b49f917e67009bb5f1d951575072106e943b76c17ef42a1138e291da86c6.json @@ -0,0 +1,112 @@ +{ + "db_name": "PostgreSQL", + "query": "\n WITH mb AS (\n SELECT\n l1_gas_price,\n l2_fair_gas_price,\n fair_pubdata_price\n FROM\n miniblocks\n WHERE\n l1_batch_number = $1\n LIMIT\n 1\n )\n SELECT\n l1_batches.number,\n l1_batches.timestamp,\n l1_batches.l1_tx_count,\n l1_batches.l2_tx_count,\n l1_batches.hash AS \"root_hash?\",\n commit_tx.tx_hash AS \"commit_tx_hash?\",\n commit_tx.confirmed_at AS \"committed_at?\",\n prove_tx.tx_hash AS \"prove_tx_hash?\",\n prove_tx.confirmed_at AS \"proven_at?\",\n execute_tx.tx_hash AS \"execute_tx_hash?\",\n execute_tx.confirmed_at AS \"executed_at?\",\n mb.l1_gas_price,\n mb.l2_fair_gas_price,\n mb.fair_pubdata_price,\n l1_batches.bootloader_code_hash,\n l1_batches.default_aa_code_hash\n FROM\n l1_batches\n INNER JOIN mb ON TRUE\n LEFT JOIN eth_txs_history AS commit_tx ON (\n l1_batches.eth_commit_tx_id = commit_tx.eth_tx_id\n AND commit_tx.confirmed_at IS NOT NULL\n )\n LEFT JOIN eth_txs_history AS prove_tx ON (\n l1_batches.eth_prove_tx_id = prove_tx.eth_tx_id\n AND prove_tx.confirmed_at IS NOT NULL\n )\n LEFT JOIN eth_txs_history AS execute_tx ON (\n l1_batches.eth_execute_tx_id = execute_tx.eth_tx_id\n AND execute_tx.confirmed_at IS NOT NULL\n )\n WHERE\n l1_batches.number = $1\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "number", + "type_info": "Int8" + }, + { + "ordinal": 1, + "name": "timestamp", + "type_info": "Int8" + }, + { + "ordinal": 2, + "name": "l1_tx_count", + "type_info": "Int4" + }, + { + "ordinal": 3, + "name": "l2_tx_count", + "type_info": "Int4" + }, + { + "ordinal": 4, + "name": "root_hash?", + "type_info": "Bytea" + }, + { + "ordinal": 5, + "name": "commit_tx_hash?", + "type_info": "Text" + }, + { + "ordinal": 6, + "name": "committed_at?", + "type_info": "Timestamp" + }, + { + "ordinal": 7, + "name": "prove_tx_hash?", + "type_info": "Text" + }, + { + "ordinal": 8, + "name": "proven_at?", + "type_info": "Timestamp" + }, + { + "ordinal": 9, + "name": "execute_tx_hash?", + "type_info": "Text" + }, + { + "ordinal": 10, + "name": "executed_at?", + "type_info": "Timestamp" + }, + { + "ordinal": 11, + "name": "l1_gas_price", + "type_info": "Int8" + }, + { + "ordinal": 12, + "name": "l2_fair_gas_price", + "type_info": "Int8" + }, + { + "ordinal": 13, + "name": "fair_pubdata_price", + "type_info": "Int8" + }, + { + "ordinal": 14, + "name": "bootloader_code_hash", + "type_info": "Bytea" + }, + { + "ordinal": 15, + "name": "default_aa_code_hash", + "type_info": "Bytea" + } + ], + "parameters": { + "Left": [ + "Int8" + ] + }, + "nullable": [ + false, + false, + false, + false, + true, + false, + true, + false, + true, + false, + true, + false, + false, + true, + true, + true + ] + }, + "hash": "bdf8b49f917e67009bb5f1d951575072106e943b76c17ef42a1138e291da86c6" +} diff --git a/core/lib/dal/.sqlx/query-c139df45a977290d1c2c7987fb9c1d66aeaeb6e2d36fddcf96775f01716a8a74.json b/core/lib/dal/.sqlx/query-c139df45a977290d1c2c7987fb9c1d66aeaeb6e2d36fddcf96775f01716a8a74.json deleted file mode 100644 index b04fb829dd6b..000000000000 --- a/core/lib/dal/.sqlx/query-c139df45a977290d1c2c7987fb9c1d66aeaeb6e2d36fddcf96775f01716a8a74.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n DELETE FROM storage_logs\n WHERE\n miniblock_number > $1\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8" - ] - }, - "nullable": [] - }, - "hash": "c139df45a977290d1c2c7987fb9c1d66aeaeb6e2d36fddcf96775f01716a8a74" -} diff --git a/core/lib/dal/.sqlx/query-c14837e92dbb02f2fde7109f524432d865852afe0c60e11a2c1800d30599aa61.json b/core/lib/dal/.sqlx/query-c14837e92dbb02f2fde7109f524432d865852afe0c60e11a2c1800d30599aa61.json deleted file mode 100644 index 8cac9f31ac05..000000000000 --- a/core/lib/dal/.sqlx/query-c14837e92dbb02f2fde7109f524432d865852afe0c60e11a2c1800d30599aa61.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n DELETE FROM compiler_versions\n WHERE\n compiler = $1\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Text" - ] - }, - "nullable": [] - }, - "hash": "c14837e92dbb02f2fde7109f524432d865852afe0c60e11a2c1800d30599aa61" -} diff --git a/core/lib/dal/.sqlx/query-bf481c2b498420f80765b837059cab02b0656d863dbfce4b5dad7bc72e52b05d.json b/core/lib/dal/.sqlx/query-c26690ee0bd897d83941300072c787f7a2aeb77058e409a57f8e62b8dd0b27ac.json similarity index 63% rename from core/lib/dal/.sqlx/query-bf481c2b498420f80765b837059cab02b0656d863dbfce4b5dad7bc72e52b05d.json rename to core/lib/dal/.sqlx/query-c26690ee0bd897d83941300072c787f7a2aeb77058e409a57f8e62b8dd0b27ac.json index c353a35ec5e1..84b152b2a84d 100644 --- a/core/lib/dal/.sqlx/query-bf481c2b498420f80765b837059cab02b0656d863dbfce4b5dad7bc72e52b05d.json +++ b/core/lib/dal/.sqlx/query-c26690ee0bd897d83941300072c787f7a2aeb77058e409a57f8e62b8dd0b27ac.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n transactions (\n hash,\n is_priority,\n initiator_address,\n nonce,\n signature,\n gas_limit,\n max_fee_per_gas,\n max_priority_fee_per_gas,\n gas_per_pubdata_limit,\n input,\n data,\n tx_format,\n contract_address,\n value,\n paymaster,\n paymaster_input,\n execution_info,\n miniblock_number,\n index_in_block,\n error,\n effective_gas_price,\n refunded_gas,\n received_at,\n created_at,\n updated_at\n )\n SELECT\n data_table.hash,\n FALSE,\n data_table.initiator_address,\n data_table.nonce,\n data_table.signature,\n data_table.gas_limit,\n data_table.max_fee_per_gas,\n data_table.max_priority_fee_per_gas,\n data_table.gas_per_pubdata_limit,\n data_table.input,\n data_table.data,\n data_table.tx_format,\n data_table.contract_address,\n data_table.value,\n data_table.paymaster,\n data_table.paymaster_input,\n data_table.new_execution_info,\n $21,\n data_table.index_in_block,\n NULLIF(data_table.error, ''),\n data_table.effective_gas_price,\n data_table.refunded_gas,\n NOW(),\n NOW(),\n NOW()\n FROM\n (\n SELECT\n UNNEST($1::bytea[]) AS hash,\n UNNEST($2::bytea[]) AS initiator_address,\n UNNEST($3::INT[]) AS nonce,\n UNNEST($4::bytea[]) AS signature,\n UNNEST($5::NUMERIC[]) AS gas_limit,\n UNNEST($6::NUMERIC[]) AS max_fee_per_gas,\n UNNEST($7::NUMERIC[]) AS max_priority_fee_per_gas,\n UNNEST($8::NUMERIC[]) AS gas_per_pubdata_limit,\n UNNEST($9::bytea[]) AS input,\n UNNEST($10::jsonb[]) AS data,\n UNNEST($11::INT[]) AS tx_format,\n UNNEST($12::bytea[]) AS contract_address,\n UNNEST($13::NUMERIC[]) AS value,\n UNNEST($14::bytea[]) AS paymaster,\n UNNEST($15::bytea[]) AS paymaster_input,\n UNNEST($16::jsonb[]) AS new_execution_info,\n UNNEST($17::INTEGER[]) AS index_in_block,\n UNNEST($18::VARCHAR[]) AS error,\n UNNEST($19::NUMERIC[]) AS effective_gas_price,\n UNNEST($20::BIGINT[]) AS refunded_gas\n ) AS data_table\n ", + "query": "\n INSERT INTO\n transactions (\n hash,\n is_priority,\n initiator_address,\n nonce,\n signature,\n gas_limit,\n max_fee_per_gas,\n max_priority_fee_per_gas,\n gas_per_pubdata_limit,\n input,\n data,\n tx_format,\n contract_address,\n value,\n paymaster,\n paymaster_input,\n execution_info,\n miniblock_number,\n index_in_block,\n error,\n effective_gas_price,\n refunded_gas,\n received_at,\n created_at,\n updated_at\n )\n SELECT\n data_table.hash,\n FALSE,\n data_table.initiator_address,\n data_table.nonce,\n data_table.signature,\n data_table.gas_limit,\n data_table.max_fee_per_gas,\n data_table.max_priority_fee_per_gas,\n data_table.gas_per_pubdata_limit,\n data_table.input,\n data_table.data,\n data_table.tx_format,\n data_table.contract_address,\n data_table.value,\n data_table.paymaster,\n data_table.paymaster_input,\n data_table.new_execution_info,\n $21,\n data_table.index_in_block,\n NULLIF(data_table.error, ''),\n data_table.effective_gas_price,\n data_table.refunded_gas,\n NOW(),\n NOW(),\n NOW()\n FROM\n (\n SELECT\n UNNEST($1 :: bytea []) AS hash,\n UNNEST($2 :: bytea []) AS initiator_address,\n UNNEST($3 :: INT []) AS nonce,\n UNNEST($4 :: bytea []) AS signature,\n UNNEST($5 :: NUMERIC []) AS gas_limit,\n UNNEST($6 :: NUMERIC []) AS max_fee_per_gas,\n UNNEST($7 :: NUMERIC []) AS max_priority_fee_per_gas,\n UNNEST($8 :: NUMERIC []) AS gas_per_pubdata_limit,\n UNNEST($9 :: bytea []) AS input,\n UNNEST($10 :: jsonb []) AS data,\n UNNEST($11 :: INT []) AS tx_format,\n UNNEST($12 :: bytea []) AS contract_address,\n UNNEST($13 :: NUMERIC []) AS value,\n UNNEST($14 :: bytea []) AS paymaster,\n UNNEST($15 :: bytea []) AS paymaster_input,\n UNNEST($16 :: jsonb []) AS new_execution_info,\n UNNEST($17 :: INTEGER []) AS index_in_block,\n UNNEST($18 :: VARCHAR []) AS error,\n UNNEST($19 :: NUMERIC []) AS effective_gas_price,\n UNNEST($20 :: BIGINT []) AS refunded_gas\n ) AS data_table\n ", "describe": { "columns": [], "parameters": { @@ -30,5 +30,5 @@ }, "nullable": [] }, - "hash": "bf481c2b498420f80765b837059cab02b0656d863dbfce4b5dad7bc72e52b05d" + "hash": "c26690ee0bd897d83941300072c787f7a2aeb77058e409a57f8e62b8dd0b27ac" } diff --git a/core/lib/dal/.sqlx/query-c29909fda6f1e4116a9a28407805a9a38a8d8ff1fba9a834d37927793f532b7d.json b/core/lib/dal/.sqlx/query-c29909fda6f1e4116a9a28407805a9a38a8d8ff1fba9a834d37927793f532b7d.json deleted file mode 100644 index f202744b8c00..000000000000 --- a/core/lib/dal/.sqlx/query-c29909fda6f1e4116a9a28407805a9a38a8d8ff1fba9a834d37927793f532b7d.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n DELETE FROM miniblocks\n WHERE\n number <= $1\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8" - ] - }, - "nullable": [] - }, - "hash": "c29909fda6f1e4116a9a28407805a9a38a8d8ff1fba9a834d37927793f532b7d" -} diff --git a/core/lib/dal/.sqlx/query-c2eac2a7c10ee56245b688b88d077fde74782e8849e84a2b699fe855946f8905.json b/core/lib/dal/.sqlx/query-c2eac2a7c10ee56245b688b88d077fde74782e8849e84a2b699fe855946f8905.json new file mode 100644 index 000000000000..bfc98732859c --- /dev/null +++ b/core/lib/dal/.sqlx/query-c2eac2a7c10ee56245b688b88d077fde74782e8849e84a2b699fe855946f8905.json @@ -0,0 +1,22 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE\n transactions\n SET\n l1_batch_number = NULL,\n miniblock_number = NULL,\n error = NULL,\n index_in_block = NULL,\n execution_info = '{}'\n WHERE\n miniblock_number > $1\n RETURNING\n hash\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "hash", + "type_info": "Bytea" + } + ], + "parameters": { + "Left": [ + "Int8" + ] + }, + "nullable": [ + false + ] + }, + "hash": "c2eac2a7c10ee56245b688b88d077fde74782e8849e84a2b699fe855946f8905" +} diff --git a/core/lib/dal/.sqlx/query-1e3c88b41bc02cb6a116fa930ae85b8b60165ed757ae1044e83fdc877d95cbd8.json b/core/lib/dal/.sqlx/query-c2ef57bcc2a2628618a6b292180e2188769ca8c52125e7739bb00e90eedc79af.json similarity index 73% rename from core/lib/dal/.sqlx/query-1e3c88b41bc02cb6a116fa930ae85b8b60165ed757ae1044e83fdc877d95cbd8.json rename to core/lib/dal/.sqlx/query-c2ef57bcc2a2628618a6b292180e2188769ca8c52125e7739bb00e90eedc79af.json index 206d2f91e3b1..b8d662f05386 100644 --- a/core/lib/dal/.sqlx/query-1e3c88b41bc02cb6a116fa930ae85b8b60165ed757ae1044e83fdc877d95cbd8.json +++ b/core/lib/dal/.sqlx/query-c2ef57bcc2a2628618a6b292180e2188769ca8c52125e7739bb00e90eedc79af.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::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": [ { @@ -84,5 +84,5 @@ false ] }, - "hash": "1e3c88b41bc02cb6a116fa930ae85b8b60165ed757ae1044e83fdc877d95cbd8" + "hash": "c2ef57bcc2a2628618a6b292180e2188769ca8c52125e7739bb00e90eedc79af" } diff --git a/core/lib/dal/.sqlx/query-c37e5e7ee96c2136fbe9e0e56602cb9aa7c0305378d758dfe9bce80912e59255.json b/core/lib/dal/.sqlx/query-c37e5e7ee96c2136fbe9e0e56602cb9aa7c0305378d758dfe9bce80912e59255.json new file mode 100644 index 000000000000..55ea5e182d96 --- /dev/null +++ b/core/lib/dal/.sqlx/query-c37e5e7ee96c2136fbe9e0e56602cb9aa7c0305378d758dfe9bce80912e59255.json @@ -0,0 +1,15 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE\n l1_batches\n SET\n hash = $1\n WHERE\n number = $2\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Bytea", + "Int8" + ] + }, + "nullable": [] + }, + "hash": "c37e5e7ee96c2136fbe9e0e56602cb9aa7c0305378d758dfe9bce80912e59255" +} diff --git a/core/lib/dal/.sqlx/query-c3af06cc232adb93f16456da07733acd2066a5e238088b39b982b10770f51479.json b/core/lib/dal/.sqlx/query-c3af06cc232adb93f16456da07733acd2066a5e238088b39b982b10770f51479.json deleted file mode 100644 index 1c15bde02fdf..000000000000 --- a/core/lib/dal/.sqlx/query-c3af06cc232adb93f16456da07733acd2066a5e238088b39b982b10770f51479.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n WITH\n events_select AS (\n SELECT\n address,\n topic1,\n topic2,\n topic3,\n topic4,\n value,\n miniblock_number,\n tx_hash,\n tx_index_in_block,\n event_index_in_block,\n event_index_in_tx\n FROM\n events\n WHERE\n miniblock_number > $1\n ORDER BY\n miniblock_number ASC,\n event_index_in_block ASC\n )\n SELECT\n miniblocks.hash AS \"block_hash?\",\n address AS \"address!\",\n topic1 AS \"topic1!\",\n topic2 AS \"topic2!\",\n topic3 AS \"topic3!\",\n topic4 AS \"topic4!\",\n value AS \"value!\",\n miniblock_number AS \"miniblock_number!\",\n miniblocks.l1_batch_number AS \"l1_batch_number?\",\n tx_hash AS \"tx_hash!\",\n tx_index_in_block AS \"tx_index_in_block!\",\n event_index_in_block AS \"event_index_in_block!\",\n event_index_in_tx AS \"event_index_in_tx!\",\n miniblocks.timestamp AS \"block_timestamp\"\n FROM\n events_select\n INNER JOIN miniblocks ON events_select.miniblock_number = miniblocks.number\n ORDER BY\n miniblock_number ASC,\n event_index_in_block ASC\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "block_hash?", - "type_info": "Bytea" - }, - { - "ordinal": 1, - "name": "address!", - "type_info": "Bytea" - }, - { - "ordinal": 2, - "name": "topic1!", - "type_info": "Bytea" - }, - { - "ordinal": 3, - "name": "topic2!", - "type_info": "Bytea" - }, - { - "ordinal": 4, - "name": "topic3!", - "type_info": "Bytea" - }, - { - "ordinal": 5, - "name": "topic4!", - "type_info": "Bytea" - }, - { - "ordinal": 6, - "name": "value!", - "type_info": "Bytea" - }, - { - "ordinal": 7, - "name": "miniblock_number!", - "type_info": "Int8" - }, - { - "ordinal": 8, - "name": "l1_batch_number?", - "type_info": "Int8" - }, - { - "ordinal": 9, - "name": "tx_hash!", - "type_info": "Bytea" - }, - { - "ordinal": 10, - "name": "tx_index_in_block!", - "type_info": "Int4" - }, - { - "ordinal": 11, - "name": "event_index_in_block!", - "type_info": "Int4" - }, - { - "ordinal": 12, - "name": "event_index_in_tx!", - "type_info": "Int4" - }, - { - "ordinal": 13, - "name": "block_timestamp", - "type_info": "Int8" - } - ], - "parameters": { - "Left": [ - "Int8" - ] - }, - "nullable": [ - false, - false, - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false - ] - }, - "hash": "c3af06cc232adb93f16456da07733acd2066a5e238088b39b982b10770f51479" -} diff --git a/core/lib/dal/.sqlx/query-c5aef75dbeb520c965a0996abed9713f437db492e2075ca69e11e2ef5728ccaa.json b/core/lib/dal/.sqlx/query-c5aef75dbeb520c965a0996abed9713f437db492e2075ca69e11e2ef5728ccaa.json deleted file mode 100644 index 6dd2f6cc7a9f..000000000000 --- a/core/lib/dal/.sqlx/query-c5aef75dbeb520c965a0996abed9713f437db492e2075ca69e11e2ef5728ccaa.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n base_token_ratios (numerator, denominator, ratio_timestamp, created_at, updated_at)\n VALUES\n ($1, $2, $3, NOW(), NOW())\n RETURNING\n id\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "id", - "type_info": "Int4" - } - ], - "parameters": { - "Left": [ - "Numeric", - "Numeric", - "Timestamp" - ] - }, - "nullable": [ - false - ] - }, - "hash": "c5aef75dbeb520c965a0996abed9713f437db492e2075ca69e11e2ef5728ccaa" -} diff --git a/core/lib/dal/.sqlx/query-3ddb13ffbafae2374527886e592b3c0210383d8698f6f84f694fece9fd59f3d5.json b/core/lib/dal/.sqlx/query-c6902d8bcfb4d04e11229683cd4295d973d60b5a02c628bb0f38dd00f3396b3b.json similarity index 63% rename from core/lib/dal/.sqlx/query-3ddb13ffbafae2374527886e592b3c0210383d8698f6f84f694fece9fd59f3d5.json rename to core/lib/dal/.sqlx/query-c6902d8bcfb4d04e11229683cd4295d973d60b5a02c628bb0f38dd00f3396b3b.json index 5652e186ceb9..5909adff5425 100644 --- a/core/lib/dal/.sqlx/query-3ddb13ffbafae2374527886e592b3c0210383d8698f6f84f694fece9fd59f3d5.json +++ b/core/lib/dal/.sqlx/query-c6902d8bcfb4d04e11229683cd4295d973d60b5a02c628bb0f38dd00f3396b3b.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n protocol_patches (minor, patch, snark_wrapper_vk_hash, created_at)\n VALUES\n ($1, $2, $3, NOW())\n ON CONFLICT DO NOTHING\n ", + "query": "\n INSERT INTO\n protocol_patches (minor, patch, snark_wrapper_vk_hash, created_at)\n VALUES\n ($1, $2, $3, NOW()) ON CONFLICT DO NOTHING\n ", "describe": { "columns": [], "parameters": { @@ -12,5 +12,5 @@ }, "nullable": [] }, - "hash": "3ddb13ffbafae2374527886e592b3c0210383d8698f6f84f694fece9fd59f3d5" + "hash": "c6902d8bcfb4d04e11229683cd4295d973d60b5a02c628bb0f38dd00f3396b3b" } diff --git a/core/lib/dal/.sqlx/query-c6d523c6ae857022318350a2f210d7eaeeb4549ed59b58f8d984be2a22a80355.json b/core/lib/dal/.sqlx/query-c6d523c6ae857022318350a2f210d7eaeeb4549ed59b58f8d984be2a22a80355.json deleted file mode 100644 index ebae1f42fbbb..000000000000 --- a/core/lib/dal/.sqlx/query-c6d523c6ae857022318350a2f210d7eaeeb4549ed59b58f8d984be2a22a80355.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n SELECT\n MAX(l1_batches.number)\n FROM\n l1_batches\n JOIN eth_txs ON (l1_batches.eth_commit_tx_id = eth_txs.id)\n JOIN eth_txs_history AS commit_tx ON (eth_txs.confirmed_eth_tx_history_id = commit_tx.id)\n WHERE\n commit_tx.confirmed_at IS NOT NULL\n AND eth_prove_tx_id IS NOT NULL\n AND eth_execute_tx_id IS NULL\n AND EXTRACT(\n epoch\n FROM\n commit_tx.confirmed_at\n ) < $1\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "max", - "type_info": "Int8" - } - ], - "parameters": { - "Left": [ - "Numeric" - ] - }, - "nullable": [ - null - ] - }, - "hash": "c6d523c6ae857022318350a2f210d7eaeeb4549ed59b58f8d984be2a22a80355" -} diff --git a/core/lib/dal/.sqlx/query-c767e485ef5a341faefe2c6c39a5668359e4b623876422cf6915d4888cdca31a.json b/core/lib/dal/.sqlx/query-c767e485ef5a341faefe2c6c39a5668359e4b623876422cf6915d4888cdca31a.json new file mode 100644 index 000000000000..7b17fb30b932 --- /dev/null +++ b/core/lib/dal/.sqlx/query-c767e485ef5a341faefe2c6c39a5668359e4b623876422cf6915d4888cdca31a.json @@ -0,0 +1,14 @@ +{ + "db_name": "PostgreSQL", + "query": "\n INSERT INTO\n vm_runner_protective_reads (\n l1_batch_number,\n created_at,\n updated_at,\n processing_started_at\n )\n VALUES\n ($1, NOW(), NOW(), NOW()) ON CONFLICT (l1_batch_number) DO\n UPDATE\n SET\n updated_at = NOW(),\n processing_started_at = NOW()\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8" + ] + }, + "nullable": [] + }, + "hash": "c767e485ef5a341faefe2c6c39a5668359e4b623876422cf6915d4888cdca31a" +} diff --git a/core/lib/dal/.sqlx/query-c81438eae5e2482c57c54941780864174f39e6011fdfdc56490397ce90233055.json b/core/lib/dal/.sqlx/query-c81438eae5e2482c57c54941780864174f39e6011fdfdc56490397ce90233055.json deleted file mode 100644 index eb09077290e3..000000000000 --- a/core/lib/dal/.sqlx/query-c81438eae5e2482c57c54941780864174f39e6011fdfdc56490397ce90233055.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE l1_batches\n SET\n eth_execute_tx_id = $1,\n updated_at = NOW()\n WHERE\n number BETWEEN $2 AND $3\n AND eth_execute_tx_id IS NULL\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int4", - "Int8", - "Int8" - ] - }, - "nullable": [] - }, - "hash": "c81438eae5e2482c57c54941780864174f39e6011fdfdc56490397ce90233055" -} diff --git a/core/lib/dal/.sqlx/query-c89076470d35115de7f5c68a5113f2f9edd3fb4e73b44d9fa2c2bb927acb99f0.json b/core/lib/dal/.sqlx/query-c89076470d35115de7f5c68a5113f2f9edd3fb4e73b44d9fa2c2bb927acb99f0.json new file mode 100644 index 000000000000..f5c6727bd685 --- /dev/null +++ b/core/lib/dal/.sqlx/query-c89076470d35115de7f5c68a5113f2f9edd3fb4e73b44d9fa2c2bb927acb99f0.json @@ -0,0 +1,20 @@ +{ + "db_name": "PostgreSQL", + "query": "\n SELECT\n number\n FROM\n l1_batches\n LEFT JOIN eth_txs_history AS commit_tx ON (\n l1_batches.eth_commit_tx_id = commit_tx.eth_tx_id\n )\n WHERE\n commit_tx.confirmed_at IS NOT NULL\n ORDER BY\n number DESC\n LIMIT\n 1\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "number", + "type_info": "Int8" + } + ], + "parameters": { + "Left": [] + }, + "nullable": [ + false + ] + }, + "hash": "c89076470d35115de7f5c68a5113f2f9edd3fb4e73b44d9fa2c2bb927acb99f0" +} diff --git a/core/lib/dal/.sqlx/query-c89cd551c59b54dd628c7e2339bc623866c3fd2e862c38c2af172c7c39620a49.json b/core/lib/dal/.sqlx/query-c89cd551c59b54dd628c7e2339bc623866c3fd2e862c38c2af172c7c39620a49.json new file mode 100644 index 000000000000..422ea854c7cb --- /dev/null +++ b/core/lib/dal/.sqlx/query-c89cd551c59b54dd628c7e2339bc623866c3fd2e862c38c2af172c7c39620a49.json @@ -0,0 +1,14 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE\n miniblocks\n SET\n protocol_version = $1\n WHERE\n l1_batch_number IS NULL\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int4" + ] + }, + "nullable": [] + }, + "hash": "c89cd551c59b54dd628c7e2339bc623866c3fd2e862c38c2af172c7c39620a49" +} diff --git a/core/lib/dal/.sqlx/query-c8d9aa5d11de37a35f421c0ff61825c64f43a819b9c787228b23814542f563d9.json b/core/lib/dal/.sqlx/query-c8d9aa5d11de37a35f421c0ff61825c64f43a819b9c787228b23814542f563d9.json new file mode 100644 index 000000000000..c2278cd28d22 --- /dev/null +++ b/core/lib/dal/.sqlx/query-c8d9aa5d11de37a35f421c0ff61825c64f43a819b9c787228b23814542f563d9.json @@ -0,0 +1,36 @@ +{ + "db_name": "PostgreSQL", + "query": "\n WITH sl AS (\n SELECT\n (\n SELECT\n ARRAY [hashed_key, value] AS kv\n FROM\n storage_logs\n WHERE\n storage_logs.miniblock_number = $1\n AND storage_logs.hashed_key >= u.start_key\n AND storage_logs.hashed_key <= u.end_key\n ORDER BY\n storage_logs.hashed_key\n LIMIT\n 1\n )\n FROM\n UNNEST($2 :: bytea [], $3 :: bytea []) AS u (start_key, end_key)\n )\n SELECT\n sl.kv [1] AS \"hashed_key?\",\n sl.kv [2] AS \"value?\",\n initial_writes.index\n FROM\n sl\n LEFT OUTER JOIN initial_writes ON initial_writes.hashed_key = sl.kv [1]\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "hashed_key?", + "type_info": "Bytea" + }, + { + "ordinal": 1, + "name": "value?", + "type_info": "Bytea" + }, + { + "ordinal": 2, + "name": "index", + "type_info": "Int8" + } + ], + "parameters": { + "Left": [ + "Int8", + "ByteaArray", + "ByteaArray" + ] + }, + "nullable": [ + null, + null, + true + ] + }, + "hash": "c8d9aa5d11de37a35f421c0ff61825c64f43a819b9c787228b23814542f563d9" +} diff --git a/core/lib/dal/.sqlx/query-c95612615946c403890e8a942e174a5ade5c1a472c4e5c9f5e9050e4136273b6.json b/core/lib/dal/.sqlx/query-c95612615946c403890e8a942e174a5ade5c1a472c4e5c9f5e9050e4136273b6.json new file mode 100644 index 000000000000..ac178bce44b5 --- /dev/null +++ b/core/lib/dal/.sqlx/query-c95612615946c403890e8a942e174a5ade5c1a472c4e5c9f5e9050e4136273b6.json @@ -0,0 +1,24 @@ +{ + "db_name": "PostgreSQL", + "query": "\n INSERT INTO\n base_token_ratios (\n numerator,\n denominator,\n ratio_timestamp,\n created_at,\n updated_at\n )\n VALUES\n ($1, $2, $3, NOW(), NOW())\n RETURNING\n id\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "id", + "type_info": "Int4" + } + ], + "parameters": { + "Left": [ + "Numeric", + "Numeric", + "Timestamp" + ] + }, + "nullable": [ + false + ] + }, + "hash": "c95612615946c403890e8a942e174a5ade5c1a472c4e5c9f5e9050e4136273b6" +} diff --git a/core/lib/dal/.sqlx/query-c98f19505792a4085bb5ddddb6d0e202da24ac3ca205154417e98ccfa7437379.json b/core/lib/dal/.sqlx/query-c98f19505792a4085bb5ddddb6d0e202da24ac3ca205154417e98ccfa7437379.json deleted file mode 100644 index cfb5c9aae147..000000000000 --- a/core/lib/dal/.sqlx/query-c98f19505792a4085bb5ddddb6d0e202da24ac3ca205154417e98ccfa7437379.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE l1_batches\n SET\n hash = $1,\n rollup_last_leaf_index = $2,\n updated_at = NOW()\n WHERE\n number = $3\n AND hash IS NULL\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Bytea", - "Int8", - "Int8" - ] - }, - "nullable": [] - }, - "hash": "c98f19505792a4085bb5ddddb6d0e202da24ac3ca205154417e98ccfa7437379" -} diff --git a/core/lib/dal/.sqlx/query-eab36591af61369e36e3dab79025ac6758a0a4e367f93a9bd48ec82c51e09755.json b/core/lib/dal/.sqlx/query-ca497322d6d5d80e8958a01f74fb8b424b2152a99a3cdff452218b6bb7f12840.json similarity index 71% rename from core/lib/dal/.sqlx/query-eab36591af61369e36e3dab79025ac6758a0a4e367f93a9bd48ec82c51e09755.json rename to core/lib/dal/.sqlx/query-ca497322d6d5d80e8958a01f74fb8b424b2152a99a3cdff452218b6bb7f12840.json index b9783f771a7a..e348af8e214d 100644 --- a/core/lib/dal/.sqlx/query-eab36591af61369e36e3dab79025ac6758a0a4e367f93a9bd48ec82c51e09755.json +++ b/core/lib/dal/.sqlx/query-ca497322d6d5d80e8958a01f74fb8b424b2152a99a3cdff452218b6bb7f12840.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT\n *\n FROM\n eth_txs\n WHERE\n from_addr IS NOT DISTINCT FROM $2 -- can't just use equality as NULL != NULL\n AND is_gateway = $3\n AND id > (\n SELECT\n COALESCE(MAX(eth_tx_id), 0)\n FROM\n eth_txs_history\n JOIN eth_txs ON eth_txs.id = eth_txs_history.eth_tx_id\n WHERE\n eth_txs_history.sent_at_block IS NOT NULL\n AND eth_txs.from_addr IS NOT DISTINCT FROM $2\n AND is_gateway = $3\n )\n ORDER BY\n id\n LIMIT\n $1\n ", + "query": "\n SELECT\n *\n FROM\n eth_txs\n WHERE\n from_addr IS NOT DISTINCT\n FROM\n $2 -- can't just use equality as NULL != NULL\n AND is_gateway = $3\n AND id > (\n SELECT\n COALESCE(MAX(eth_tx_id), 0)\n FROM\n eth_txs_history\n JOIN eth_txs ON eth_txs.id = eth_txs_history.eth_tx_id\n WHERE\n eth_txs_history.sent_at_block IS NOT NULL\n AND eth_txs.from_addr IS NOT DISTINCT\n FROM\n $2\n AND is_gateway = $3\n )\n ORDER BY\n id\n LIMIT\n $1\n ", "describe": { "columns": [ { @@ -110,5 +110,5 @@ true ] }, - "hash": "eab36591af61369e36e3dab79025ac6758a0a4e367f93a9bd48ec82c51e09755" + "hash": "ca497322d6d5d80e8958a01f74fb8b424b2152a99a3cdff452218b6bb7f12840" } diff --git a/core/lib/dal/.sqlx/query-cd882b7e8a8d76ed1438097b246d455f4043c60538687dec050c5b578d505ef8.json b/core/lib/dal/.sqlx/query-cd882b7e8a8d76ed1438097b246d455f4043c60538687dec050c5b578d505ef8.json new file mode 100644 index 000000000000..5cdd2d8649b9 --- /dev/null +++ b/core/lib/dal/.sqlx/query-cd882b7e8a8d76ed1438097b246d455f4043c60538687dec050c5b578d505ef8.json @@ -0,0 +1,23 @@ +{ + "db_name": "PostgreSQL", + "query": "\n WITH available_batches AS (\n SELECT\n MAX(number) AS \"last_batch\"\n FROM\n l1_batches\n ),\n processed_batches AS (\n SELECT\n COALESCE(MAX(l1_batch_number), $1) + $2 AS \"last_ready_batch\"\n FROM\n vm_runner_protective_reads\n WHERE\n time_taken IS NOT NULL\n )\n SELECT\n LEAST(last_batch, last_ready_batch) AS \"last_ready_batch!\"\n FROM\n available_batches FULL\n JOIN processed_batches ON TRUE\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "last_ready_batch!", + "type_info": "Int8" + } + ], + "parameters": { + "Left": [ + "Int8", + "Int8" + ] + }, + "nullable": [ + true + ] + }, + "hash": "cd882b7e8a8d76ed1438097b246d455f4043c60538687dec050c5b578d505ef8" +} diff --git a/core/lib/dal/.sqlx/query-ce0b54e6f5a805144ace2f0f9fba6b3e9bca996fa633005bc8eeb77341c8c893.json b/core/lib/dal/.sqlx/query-ce0b54e6f5a805144ace2f0f9fba6b3e9bca996fa633005bc8eeb77341c8c893.json deleted file mode 100644 index 77f5849bac64..000000000000 --- a/core/lib/dal/.sqlx/query-ce0b54e6f5a805144ace2f0f9fba6b3e9bca996fa633005bc8eeb77341c8c893.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n DELETE FROM vm_runner_bwip\n WHERE\n l1_batch_number > $1\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8" - ] - }, - "nullable": [] - }, - "hash": "ce0b54e6f5a805144ace2f0f9fba6b3e9bca996fa633005bc8eeb77341c8c893" -} diff --git a/core/lib/dal/.sqlx/query-ced682e16c616d26674c104caffbeea37512f1c5855579bdbb4cd8ba6d9977c3.json b/core/lib/dal/.sqlx/query-ced682e16c616d26674c104caffbeea37512f1c5855579bdbb4cd8ba6d9977c3.json new file mode 100644 index 000000000000..dc29da71f6c7 --- /dev/null +++ b/core/lib/dal/.sqlx/query-ced682e16c616d26674c104caffbeea37512f1c5855579bdbb4cd8ba6d9977c3.json @@ -0,0 +1,44 @@ +{ + "db_name": "PostgreSQL", + "query": "\n SELECT\n table_name,\n PG_TABLE_SIZE(\n ('public.' || QUOTE_IDENT(table_name)) :: regclass\n ) AS table_size,\n PG_INDEXES_SIZE(\n ('public.' || QUOTE_IDENT(table_name)) :: regclass\n ) AS indexes_size,\n PG_RELATION_SIZE(\n ('public.' || QUOTE_IDENT(table_name)) :: regclass\n ) AS relation_size,\n PG_TOTAL_RELATION_SIZE(\n ('public.' || QUOTE_IDENT(table_name)) :: regclass\n ) AS total_size\n FROM\n information_schema.tables\n WHERE\n table_schema = 'public'\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "table_name", + "type_info": "Name" + }, + { + "ordinal": 1, + "name": "table_size", + "type_info": "Int8" + }, + { + "ordinal": 2, + "name": "indexes_size", + "type_info": "Int8" + }, + { + "ordinal": 3, + "name": "relation_size", + "type_info": "Int8" + }, + { + "ordinal": 4, + "name": "total_size", + "type_info": "Int8" + } + ], + "parameters": { + "Left": [] + }, + "nullable": [ + true, + null, + null, + null, + null + ] + }, + "hash": "ced682e16c616d26674c104caffbeea37512f1c5855579bdbb4cd8ba6d9977c3" +} diff --git a/core/lib/dal/.sqlx/query-cf5e1c6912b432eeb9b9779bfc3700f9ae2a6e5a917b1a21f290d313d9d88dba.json b/core/lib/dal/.sqlx/query-cf5e1c6912b432eeb9b9779bfc3700f9ae2a6e5a917b1a21f290d313d9d88dba.json new file mode 100644 index 000000000000..cf8308202fb3 --- /dev/null +++ b/core/lib/dal/.sqlx/query-cf5e1c6912b432eeb9b9779bfc3700f9ae2a6e5a917b1a21f290d313d9d88dba.json @@ -0,0 +1,14 @@ +{ + "db_name": "PostgreSQL", + "query": "\n DELETE FROM\n call_traces\n WHERE\n tx_hash = ANY ($1)\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "ByteaArray" + ] + }, + "nullable": [] + }, + "hash": "cf5e1c6912b432eeb9b9779bfc3700f9ae2a6e5a917b1a21f290d313d9d88dba" +} diff --git a/core/lib/dal/.sqlx/query-cf8cff1e6d277088519ef7dfbdb1885d320c146cd8fad77c107ef12fa38e6c98.json b/core/lib/dal/.sqlx/query-cf8cff1e6d277088519ef7dfbdb1885d320c146cd8fad77c107ef12fa38e6c98.json deleted file mode 100644 index 1bd791a3f829..000000000000 --- a/core/lib/dal/.sqlx/query-cf8cff1e6d277088519ef7dfbdb1885d320c146cd8fad77c107ef12fa38e6c98.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n transactions (\n hash,\n is_priority,\n initiator_address,\n nonce,\n signature,\n gas_limit,\n max_fee_per_gas,\n max_priority_fee_per_gas,\n gas_per_pubdata_limit,\n input,\n data,\n tx_format,\n contract_address,\n value,\n paymaster,\n paymaster_input,\n execution_info,\n received_at,\n created_at,\n updated_at\n )\n VALUES\n (\n $1,\n FALSE,\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 JSONB_BUILD_OBJECT('gas_used', $16::BIGINT, 'storage_writes', $17::INT, 'contracts_used', $18::INT),\n $19,\n NOW(),\n NOW()\n )\n ON CONFLICT (initiator_address, nonce) DO\n UPDATE\n SET\n hash = $1,\n signature = $4,\n gas_limit = $5,\n max_fee_per_gas = $6,\n max_priority_fee_per_gas = $7,\n gas_per_pubdata_limit = $8,\n input = $9,\n data = $10,\n tx_format = $11,\n contract_address = $12,\n value = $13,\n paymaster = $14,\n paymaster_input = $15,\n execution_info = JSONB_BUILD_OBJECT('gas_used', $16::BIGINT, 'storage_writes', $17::INT, 'contracts_used', $18::INT),\n in_mempool = FALSE,\n received_at = $19,\n created_at = NOW(),\n updated_at = NOW(),\n error = NULL\n WHERE\n transactions.is_priority = FALSE\n AND transactions.miniblock_number IS NULL\n RETURNING\n (\n SELECT\n hash\n FROM\n transactions\n WHERE\n transactions.initiator_address = $2\n AND transactions.nonce = $3\n ) IS NOT NULL AS \"is_replaced!\"\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "is_replaced!", - "type_info": "Bool" - } - ], - "parameters": { - "Left": [ - "Bytea", - "Bytea", - "Int8", - "Bytea", - "Numeric", - "Numeric", - "Numeric", - "Numeric", - "Bytea", - "Jsonb", - "Int4", - "Bytea", - "Numeric", - "Bytea", - "Bytea", - "Int8", - "Int4", - "Int4", - "Timestamp" - ] - }, - "nullable": [ - null - ] - }, - "hash": "cf8cff1e6d277088519ef7dfbdb1885d320c146cd8fad77c107ef12fa38e6c98" -} diff --git a/core/lib/dal/.sqlx/query-718d29517c100ad9d258a7ee90c48449c1c4bed4d0236fcedc177c9478e72262.json b/core/lib/dal/.sqlx/query-d2b3332be1c559226a1782031cd289bd8a6a70e23feb489cebb14ba906865898.json similarity index 81% rename from core/lib/dal/.sqlx/query-718d29517c100ad9d258a7ee90c48449c1c4bed4d0236fcedc177c9478e72262.json rename to core/lib/dal/.sqlx/query-d2b3332be1c559226a1782031cd289bd8a6a70e23feb489cebb14ba906865898.json index 4e523efe3fc8..6c7177af8656 100644 --- a/core/lib/dal/.sqlx/query-718d29517c100ad9d258a7ee90c48449c1c4bed4d0236fcedc177c9478e72262.json +++ b/core/lib/dal/.sqlx/query-d2b3332be1c559226a1782031cd289bd8a6a70e23feb489cebb14ba906865898.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n tee_verifier_input_producer_jobs (l1_batch_number, status, created_at, updated_at)\n VALUES\n ($1, $2, NOW(), NOW())\n ON CONFLICT (l1_batch_number) DO NOTHING\n ", + "query": "\n INSERT INTO\n tee_verifier_input_producer_jobs (l1_batch_number, status, created_at, updated_at)\n VALUES\n ($1, $2, NOW(), NOW()) ON CONFLICT (l1_batch_number) DO NOTHING\n ", "describe": { "columns": [], "parameters": { @@ -24,5 +24,5 @@ }, "nullable": [] }, - "hash": "718d29517c100ad9d258a7ee90c48449c1c4bed4d0236fcedc177c9478e72262" + "hash": "d2b3332be1c559226a1782031cd289bd8a6a70e23feb489cebb14ba906865898" } diff --git a/core/lib/dal/.sqlx/query-d3abe74360732659a1a35a176679411ba30ac67080552279d821d66b1b804db3.json b/core/lib/dal/.sqlx/query-d3abe74360732659a1a35a176679411ba30ac67080552279d821d66b1b804db3.json deleted file mode 100644 index 2b5eeec2e638..000000000000 --- a/core/lib/dal/.sqlx/query-d3abe74360732659a1a35a176679411ba30ac67080552279d821d66b1b804db3.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n vm_runner_protective_reads (l1_batch_number, created_at, updated_at, processing_started_at)\n VALUES\n ($1, NOW(), NOW(), NOW())\n ON CONFLICT (l1_batch_number) DO\n UPDATE\n SET\n updated_at = NOW(),\n processing_started_at = NOW()\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8" - ] - }, - "nullable": [] - }, - "hash": "d3abe74360732659a1a35a176679411ba30ac67080552279d821d66b1b804db3" -} diff --git a/core/lib/dal/.sqlx/query-d3b09cbcddf6238b358d32d57678242aad3e9a47400f6d6837a35f4c54a216b9.json b/core/lib/dal/.sqlx/query-d3b09cbcddf6238b358d32d57678242aad3e9a47400f6d6837a35f4c54a216b9.json deleted file mode 100644 index 8770a9b596ea..000000000000 --- a/core/lib/dal/.sqlx/query-d3b09cbcddf6238b358d32d57678242aad3e9a47400f6d6837a35f4c54a216b9.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n SELECT\n number\n FROM\n l1_batches\n LEFT JOIN eth_txs_history AS execute_tx ON (l1_batches.eth_execute_tx_id = execute_tx.eth_tx_id)\n WHERE\n execute_tx.confirmed_at IS NOT NULL\n ORDER BY\n number DESC\n LIMIT\n 1\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "number", - "type_info": "Int8" - } - ], - "parameters": { - "Left": [] - }, - "nullable": [ - false - ] - }, - "hash": "d3b09cbcddf6238b358d32d57678242aad3e9a47400f6d6837a35f4c54a216b9" -} diff --git a/core/lib/dal/.sqlx/query-d3e4ee6677ce9de438abf7529aaf64c789d3a8a1d6c96c58213c23a055cde751.json b/core/lib/dal/.sqlx/query-d3e4ee6677ce9de438abf7529aaf64c789d3a8a1d6c96c58213c23a055cde751.json deleted file mode 100644 index bf1570deefc0..000000000000 --- a/core/lib/dal/.sqlx/query-d3e4ee6677ce9de438abf7529aaf64c789d3a8a1d6c96c58213c23a055cde751.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n DELETE FROM call_traces\n WHERE\n tx_hash IN (\n SELECT\n hash\n FROM\n transactions\n WHERE\n miniblock_number BETWEEN $1 AND $2\n )\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8", - "Int8" - ] - }, - "nullable": [] - }, - "hash": "d3e4ee6677ce9de438abf7529aaf64c789d3a8a1d6c96c58213c23a055cde751" -} diff --git a/core/lib/dal/.sqlx/query-2e5b9ae1b81b0abfe7a962c93b3119a0a60dc9804175b2baf8b45939c74bd583.json b/core/lib/dal/.sqlx/query-d4ae7c8a220920ef6a2d34d34b6966c69a183624bd5c982a36756ac57c4b49ba.json similarity index 68% rename from core/lib/dal/.sqlx/query-2e5b9ae1b81b0abfe7a962c93b3119a0a60dc9804175b2baf8b45939c74bd583.json rename to core/lib/dal/.sqlx/query-d4ae7c8a220920ef6a2d34d34b6966c69a183624bd5c982a36756ac57c4b49ba.json index 205487768306..e44206cd4a76 100644 --- a/core/lib/dal/.sqlx/query-2e5b9ae1b81b0abfe7a962c93b3119a0a60dc9804175b2baf8b45939c74bd583.json +++ b/core/lib/dal/.sqlx/query-d4ae7c8a220920ef6a2d34d34b6966c69a183624bd5c982a36756ac57c4b49ba.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n compiler_versions (VERSION, compiler, created_at, updated_at)\n SELECT\n u.version,\n $2,\n NOW(),\n NOW()\n FROM\n UNNEST($1::TEXT[]) AS u (VERSION)\n ON CONFLICT (VERSION, compiler) DO NOTHING\n ", + "query": "\n INSERT INTO\n compiler_versions (VERSION, compiler, created_at, updated_at)\n SELECT\n u.version,\n $2,\n NOW(),\n NOW()\n FROM\n UNNEST($1 :: TEXT []) AS u (VERSION) ON CONFLICT (VERSION, compiler) DO NOTHING\n ", "describe": { "columns": [], "parameters": { @@ -11,5 +11,5 @@ }, "nullable": [] }, - "hash": "2e5b9ae1b81b0abfe7a962c93b3119a0a60dc9804175b2baf8b45939c74bd583" + "hash": "d4ae7c8a220920ef6a2d34d34b6966c69a183624bd5c982a36756ac57c4b49ba" } diff --git a/core/lib/dal/.sqlx/query-d4da5af7b848e3354b66bbc7ed5e5da19947002e66110573e6fad9105f07413a.json b/core/lib/dal/.sqlx/query-d4da5af7b848e3354b66bbc7ed5e5da19947002e66110573e6fad9105f07413a.json new file mode 100644 index 000000000000..0c2b78a44bd4 --- /dev/null +++ b/core/lib/dal/.sqlx/query-d4da5af7b848e3354b66bbc7ed5e5da19947002e66110573e6fad9105f07413a.json @@ -0,0 +1,15 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE\n eth_txs\n SET\n confirmed_eth_tx_history_id = $1\n WHERE\n id = $2\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int4", + "Int4" + ] + }, + "nullable": [] + }, + "hash": "d4da5af7b848e3354b66bbc7ed5e5da19947002e66110573e6fad9105f07413a" +} diff --git a/core/lib/dal/.sqlx/query-d7e5ff78b2bc2e12fa5b17e6b555cadeff54160c1cc0b6b4fddecf090ebb30f1.json b/core/lib/dal/.sqlx/query-d7e5ff78b2bc2e12fa5b17e6b555cadeff54160c1cc0b6b4fddecf090ebb30f1.json new file mode 100644 index 000000000000..013c4eab7d28 --- /dev/null +++ b/core/lib/dal/.sqlx/query-d7e5ff78b2bc2e12fa5b17e6b555cadeff54160c1cc0b6b4fddecf090ebb30f1.json @@ -0,0 +1,20 @@ +{ + "db_name": "PostgreSQL", + "query": "\n SELECT\n number\n FROM\n l1_batches\n LEFT JOIN eth_txs_history AS execute_tx ON (\n l1_batches.eth_execute_tx_id = execute_tx.eth_tx_id\n )\n WHERE\n execute_tx.confirmed_at IS NOT NULL\n ORDER BY\n number DESC\n LIMIT\n 1\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "number", + "type_info": "Int8" + } + ], + "parameters": { + "Left": [] + }, + "nullable": [ + false + ] + }, + "hash": "d7e5ff78b2bc2e12fa5b17e6b555cadeff54160c1cc0b6b4fddecf090ebb30f1" +} diff --git a/core/lib/dal/.sqlx/query-d8a41829e3836ea05802ac7257f5dbc6f5ed92bc3d47b4dd91116dd6ec354d50.json b/core/lib/dal/.sqlx/query-d8a41829e3836ea05802ac7257f5dbc6f5ed92bc3d47b4dd91116dd6ec354d50.json new file mode 100644 index 000000000000..8c390048ad1a --- /dev/null +++ b/core/lib/dal/.sqlx/query-d8a41829e3836ea05802ac7257f5dbc6f5ed92bc3d47b4dd91116dd6ec354d50.json @@ -0,0 +1,12 @@ +{ + "db_name": "PostgreSQL", + "query": "\n DELETE FROM\n storage_logs\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [] + }, + "nullable": [] + }, + "hash": "d8a41829e3836ea05802ac7257f5dbc6f5ed92bc3d47b4dd91116dd6ec354d50" +} diff --git a/core/lib/dal/.sqlx/query-d92d99b940e439fa8942e1e8a4a98c18f29d3bebb42b0ae3fe7757eeea9ee175.json b/core/lib/dal/.sqlx/query-d92d99b940e439fa8942e1e8a4a98c18f29d3bebb42b0ae3fe7757eeea9ee175.json new file mode 100644 index 000000000000..bdaac583ed7d --- /dev/null +++ b/core/lib/dal/.sqlx/query-d92d99b940e439fa8942e1e8a4a98c18f29d3bebb42b0ae3fe7757eeea9ee175.json @@ -0,0 +1,40 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE\n tee_proof_generation_details\n SET\n status = $1,\n updated_at = NOW(),\n prover_taken_at = NOW()\n WHERE\n tee_type = $2\n AND l1_batch_number = (\n SELECT\n proofs.l1_batch_number\n FROM\n tee_proof_generation_details AS proofs\n JOIN tee_verifier_input_producer_jobs AS inputs ON proofs.l1_batch_number = inputs.l1_batch_number\n WHERE\n inputs.status = $3\n AND (\n proofs.status = $4\n OR (\n proofs.status = $1\n AND proofs.prover_taken_at < NOW() - $5 :: INTERVAL\n )\n )\n AND proofs.l1_batch_number >= $6\n ORDER BY\n l1_batch_number ASC\n LIMIT\n 1 FOR\n UPDATE\n SKIP LOCKED\n )\n RETURNING\n tee_proof_generation_details.l1_batch_number\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "l1_batch_number", + "type_info": "Int8" + } + ], + "parameters": { + "Left": [ + "Text", + "Text", + { + "Custom": { + "name": "tee_verifier_input_producer_job_status", + "kind": { + "Enum": [ + "Queued", + "ManuallySkipped", + "InProgress", + "Successful", + "Failed" + ] + } + } + }, + "Text", + "Interval", + "Int8" + ] + }, + "nullable": [ + false + ] + }, + "hash": "d92d99b940e439fa8942e1e8a4a98c18f29d3bebb42b0ae3fe7757eeea9ee175" +} diff --git a/core/lib/dal/.sqlx/query-da08c899a7c5243cfcda7fbbcd34675993ca0c7b2fb1d2be386101b78a995110.json b/core/lib/dal/.sqlx/query-da08c899a7c5243cfcda7fbbcd34675993ca0c7b2fb1d2be386101b78a995110.json new file mode 100644 index 000000000000..33529af4525f --- /dev/null +++ b/core/lib/dal/.sqlx/query-da08c899a7c5243cfcda7fbbcd34675993ca0c7b2fb1d2be386101b78a995110.json @@ -0,0 +1,14 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE\n eth_txs\n SET\n has_failed = TRUE\n WHERE\n id = $1\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int4" + ] + }, + "nullable": [] + }, + "hash": "da08c899a7c5243cfcda7fbbcd34675993ca0c7b2fb1d2be386101b78a995110" +} diff --git a/core/lib/dal/.sqlx/query-daa330d43f150824f2195cdbfb96862d6ad0de7c7ca1d5320800f317428f07e1.json b/core/lib/dal/.sqlx/query-daa330d43f150824f2195cdbfb96862d6ad0de7c7ca1d5320800f317428f07e1.json deleted file mode 100644 index 836bbc435f00..000000000000 --- a/core/lib/dal/.sqlx/query-daa330d43f150824f2195cdbfb96862d6ad0de7c7ca1d5320800f317428f07e1.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n DELETE FROM vm_runner_protective_reads\n WHERE\n l1_batch_number > $1\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8" - ] - }, - "nullable": [] - }, - "hash": "daa330d43f150824f2195cdbfb96862d6ad0de7c7ca1d5320800f317428f07e1" -} diff --git a/core/lib/dal/.sqlx/query-dac29d7eb16782713acb7aa68aaa8b12b67678e983dc2570be28fe9b1e016c28.json b/core/lib/dal/.sqlx/query-dac29d7eb16782713acb7aa68aaa8b12b67678e983dc2570be28fe9b1e016c28.json deleted file mode 100644 index c0258c12311b..000000000000 --- a/core/lib/dal/.sqlx/query-dac29d7eb16782713acb7aa68aaa8b12b67678e983dc2570be28fe9b1e016c28.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n DELETE FROM call_traces\n WHERE\n tx_hash = ANY ($1)\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "ByteaArray" - ] - }, - "nullable": [] - }, - "hash": "dac29d7eb16782713acb7aa68aaa8b12b67678e983dc2570be28fe9b1e016c28" -} diff --git a/core/lib/dal/.sqlx/query-45a968c6d667b13bbe9d895e7734fc05eaa158a6f38a87187d7f2c2068a0112a.json b/core/lib/dal/.sqlx/query-dae7b7ab08a3397a4e587ebe40e79903fb3c9eaed968af5638a6f94bae2e7bb3.json similarity index 81% rename from core/lib/dal/.sqlx/query-45a968c6d667b13bbe9d895e7734fc05eaa158a6f38a87187d7f2c2068a0112a.json rename to core/lib/dal/.sqlx/query-dae7b7ab08a3397a4e587ebe40e79903fb3c9eaed968af5638a6f94bae2e7bb3.json index 36da129b5b77..3f2990ef3567 100644 --- a/core/lib/dal/.sqlx/query-45a968c6d667b13bbe9d895e7734fc05eaa158a6f38a87187d7f2c2068a0112a.json +++ b/core/lib/dal/.sqlx/query-dae7b7ab08a3397a4e587ebe40e79903fb3c9eaed968af5638a6f94bae2e7bb3.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n eth_txs_history (\n eth_tx_id,\n base_fee_per_gas,\n priority_fee_per_gas,\n tx_hash,\n signed_raw_tx,\n created_at,\n updated_at,\n blob_base_fee_per_gas,\n sent_at_block,\n sent_at\n )\n VALUES\n ($1, $2, $3, $4, $5, NOW(), NOW(), $6, $7, NOW())\n ON CONFLICT (tx_hash) DO NOTHING\n RETURNING\n id\n ", + "query": "\n INSERT INTO\n eth_txs_history (\n eth_tx_id,\n base_fee_per_gas,\n priority_fee_per_gas,\n tx_hash,\n signed_raw_tx,\n created_at,\n updated_at,\n blob_base_fee_per_gas,\n sent_at_block,\n sent_at\n )\n VALUES\n ($1, $2, $3, $4, $5, NOW(), NOW(), $6, $7, NOW()) ON CONFLICT (tx_hash) DO NOTHING\n RETURNING\n id\n ", "describe": { "columns": [ { @@ -24,5 +24,5 @@ false ] }, - "hash": "45a968c6d667b13bbe9d895e7734fc05eaa158a6f38a87187d7f2c2068a0112a" + "hash": "dae7b7ab08a3397a4e587ebe40e79903fb3c9eaed968af5638a6f94bae2e7bb3" } diff --git a/core/lib/dal/.sqlx/query-dd0803aa12873b541ee88f3609d0b04a045f37cb9217ed0b17a78f9949f3d7ed.json b/core/lib/dal/.sqlx/query-dd0803aa12873b541ee88f3609d0b04a045f37cb9217ed0b17a78f9949f3d7ed.json new file mode 100644 index 000000000000..3a252916111f --- /dev/null +++ b/core/lib/dal/.sqlx/query-dd0803aa12873b541ee88f3609d0b04a045f37cb9217ed0b17a78f9949f3d7ed.json @@ -0,0 +1,22 @@ +{ + "db_name": "PostgreSQL", + "query": "\n SELECT\n MAX(l1_batches.number)\n FROM\n l1_batches\n JOIN eth_txs ON (l1_batches.eth_commit_tx_id = eth_txs.id)\n JOIN eth_txs_history AS commit_tx ON (\n eth_txs.confirmed_eth_tx_history_id = commit_tx.id\n )\n WHERE\n commit_tx.confirmed_at IS NOT NULL\n AND eth_prove_tx_id IS NOT NULL\n AND eth_execute_tx_id IS NULL\n AND EXTRACT(\n epoch\n FROM\n commit_tx.confirmed_at\n ) < $1\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "max", + "type_info": "Int8" + } + ], + "parameters": { + "Left": [ + "Numeric" + ] + }, + "nullable": [ + null + ] + }, + "hash": "dd0803aa12873b541ee88f3609d0b04a045f37cb9217ed0b17a78f9949f3d7ed" +} diff --git a/core/lib/dal/.sqlx/query-df8bfa2f1691f1c1aa683fa2821c1b0b2dd97b590d546c3c03dc1a97144a57ec.json b/core/lib/dal/.sqlx/query-df8bfa2f1691f1c1aa683fa2821c1b0b2dd97b590d546c3c03dc1a97144a57ec.json new file mode 100644 index 000000000000..281ca041ed17 --- /dev/null +++ b/core/lib/dal/.sqlx/query-df8bfa2f1691f1c1aa683fa2821c1b0b2dd97b590d546c3c03dc1a97144a57ec.json @@ -0,0 +1,15 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE\n data_availability\n SET\n inclusion_data = $1,\n updated_at = NOW()\n WHERE\n l1_batch_number = $2\n AND inclusion_data IS NULL\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Bytea", + "Int8" + ] + }, + "nullable": [] + }, + "hash": "df8bfa2f1691f1c1aa683fa2821c1b0b2dd97b590d546c3c03dc1a97144a57ec" +} diff --git a/core/lib/dal/.sqlx/query-9f29aa31d4698031e9f3fe2eb273724dcce382936af0d4c386143399995cd325.json b/core/lib/dal/.sqlx/query-e0aa620216ab8b1b209bc2b1079198deaa1ee92c9c7d608199673a8ed5558a17.json similarity index 56% rename from core/lib/dal/.sqlx/query-9f29aa31d4698031e9f3fe2eb273724dcce382936af0d4c386143399995cd325.json rename to core/lib/dal/.sqlx/query-e0aa620216ab8b1b209bc2b1079198deaa1ee92c9c7d608199673a8ed5558a17.json index 2e1bf7c3e61c..9b02da15aec0 100644 --- a/core/lib/dal/.sqlx/query-9f29aa31d4698031e9f3fe2eb273724dcce382936af0d4c386143399995cd325.json +++ b/core/lib/dal/.sqlx/query-e0aa620216ab8b1b209bc2b1079198deaa1ee92c9c7d608199673a8ed5558a17.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT\n storage_logs.address AS \"address!\",\n storage_logs.key AS \"key!\",\n storage_logs.value AS \"value!\",\n storage_logs.miniblock_number AS \"miniblock_number!\",\n initial_writes.l1_batch_number AS \"l1_batch_number!\",\n initial_writes.index\n FROM\n (\n SELECT\n hashed_key,\n MAX(ARRAY[miniblock_number, operation_number]::INT[]) AS op\n FROM\n storage_logs\n WHERE\n miniblock_number <= $1\n AND hashed_key >= $3\n AND hashed_key <= $4\n GROUP BY\n hashed_key\n ORDER BY\n hashed_key\n ) AS keys\n INNER JOIN storage_logs ON keys.hashed_key = storage_logs.hashed_key\n AND storage_logs.miniblock_number = keys.op[1]\n AND storage_logs.operation_number = keys.op[2]\n INNER JOIN initial_writes ON keys.hashed_key = initial_writes.hashed_key\n WHERE\n initial_writes.l1_batch_number <= $2\n ", + "query": "\n SELECT\n storage_logs.address AS \"address!\",\n storage_logs.key AS \"key!\",\n storage_logs.value AS \"value!\",\n storage_logs.miniblock_number AS \"miniblock_number!\",\n initial_writes.l1_batch_number AS \"l1_batch_number!\",\n initial_writes.index\n FROM\n (\n SELECT\n hashed_key,\n MAX(\n ARRAY [miniblock_number, operation_number] :: INT []\n ) AS op\n FROM\n storage_logs\n WHERE\n miniblock_number <= $1\n AND hashed_key >= $3\n AND hashed_key <= $4\n GROUP BY\n hashed_key\n ORDER BY\n hashed_key\n ) AS KEYS\n INNER JOIN storage_logs ON KEYS.hashed_key = storage_logs.hashed_key\n AND storage_logs.miniblock_number = KEYS.op [1]\n AND storage_logs.operation_number = KEYS.op [2]\n INNER JOIN initial_writes ON KEYS.hashed_key = initial_writes.hashed_key\n WHERE\n initial_writes.l1_batch_number <= $2\n ", "describe": { "columns": [ { @@ -51,5 +51,5 @@ false ] }, - "hash": "9f29aa31d4698031e9f3fe2eb273724dcce382936af0d4c386143399995cd325" + "hash": "e0aa620216ab8b1b209bc2b1079198deaa1ee92c9c7d608199673a8ed5558a17" } diff --git a/core/lib/dal/.sqlx/query-e210f3652790e82cc1f69a017dea683c2092560f59c8a6703d4ccc1715872ba9.json b/core/lib/dal/.sqlx/query-e210f3652790e82cc1f69a017dea683c2092560f59c8a6703d4ccc1715872ba9.json new file mode 100644 index 000000000000..2eebc0e9b889 --- /dev/null +++ b/core/lib/dal/.sqlx/query-e210f3652790e82cc1f69a017dea683c2092560f59c8a6703d4ccc1715872ba9.json @@ -0,0 +1,14 @@ +{ + "db_name": "PostgreSQL", + "query": "\n DELETE FROM\n vm_runner_protective_reads\n WHERE\n l1_batch_number > $1\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8" + ] + }, + "nullable": [] + }, + "hash": "e210f3652790e82cc1f69a017dea683c2092560f59c8a6703d4ccc1715872ba9" +} diff --git a/core/lib/dal/.sqlx/query-e3f4af790fca9149f4edff070170294ec464d184ad732692faa61d2ef99c84e9.json b/core/lib/dal/.sqlx/query-e3f4af790fca9149f4edff070170294ec464d184ad732692faa61d2ef99c84e9.json deleted file mode 100644 index abe74036f4c6..000000000000 --- a/core/lib/dal/.sqlx/query-e3f4af790fca9149f4edff070170294ec464d184ad732692faa61d2ef99c84e9.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE tee_proof_generation_details\n SET\n status = $1,\n updated_at = NOW(),\n prover_taken_at = NOW()\n WHERE\n tee_type = $2\n AND l1_batch_number = (\n SELECT\n proofs.l1_batch_number\n FROM\n tee_proof_generation_details AS proofs\n JOIN tee_verifier_input_producer_jobs AS inputs ON proofs.l1_batch_number = inputs.l1_batch_number\n WHERE\n inputs.status = $3\n AND (\n proofs.status = $4\n OR (\n proofs.status = $1\n AND proofs.prover_taken_at < NOW() - $5::INTERVAL\n )\n )\n AND proofs.l1_batch_number >= $6\n ORDER BY\n l1_batch_number ASC\n LIMIT\n 1\n FOR UPDATE\n SKIP LOCKED\n )\n RETURNING\n tee_proof_generation_details.l1_batch_number\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "l1_batch_number", - "type_info": "Int8" - } - ], - "parameters": { - "Left": [ - "Text", - "Text", - { - "Custom": { - "name": "tee_verifier_input_producer_job_status", - "kind": { - "Enum": [ - "Queued", - "ManuallySkipped", - "InProgress", - "Successful", - "Failed" - ] - } - } - }, - "Text", - "Interval", - "Int8" - ] - }, - "nullable": [ - false - ] - }, - "hash": "e3f4af790fca9149f4edff070170294ec464d184ad732692faa61d2ef99c84e9" -} diff --git a/core/lib/dal/.sqlx/query-82ed556807bcd7dd5872c220b3399f9b8679d770b3d1ca755c42ee264342da03.json b/core/lib/dal/.sqlx/query-e496794ed5fb282a64d8bd84f8a227bae6207b1a5ac294b2d84b6f69ddb14fa9.json similarity index 81% rename from core/lib/dal/.sqlx/query-82ed556807bcd7dd5872c220b3399f9b8679d770b3d1ca755c42ee264342da03.json rename to core/lib/dal/.sqlx/query-e496794ed5fb282a64d8bd84f8a227bae6207b1a5ac294b2d84b6f69ddb14fa9.json index 3c475186a390..8dbe652f319e 100644 --- a/core/lib/dal/.sqlx/query-82ed556807bcd7dd5872c220b3399f9b8679d770b3d1ca755c42ee264342da03.json +++ b/core/lib/dal/.sqlx/query-e496794ed5fb282a64d8bd84f8a227bae6207b1a5ac294b2d84b6f69ddb14fa9.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT\n value\n FROM\n events\n WHERE\n miniblock_number BETWEEN $1 AND $2\n AND address = $3\n AND topic1 = $4\n ORDER BY\n miniblock_number,\n event_index_in_block\n ", + "query": "\n SELECT\n value\n FROM\n EVENTS\n WHERE\n miniblock_number BETWEEN $1 AND $2\n AND address = $3\n AND topic1 = $4\n ORDER BY\n miniblock_number,\n event_index_in_block\n ", "describe": { "columns": [ { @@ -21,5 +21,5 @@ false ] }, - "hash": "82ed556807bcd7dd5872c220b3399f9b8679d770b3d1ca755c42ee264342da03" + "hash": "e496794ed5fb282a64d8bd84f8a227bae6207b1a5ac294b2d84b6f69ddb14fa9" } diff --git a/core/lib/dal/.sqlx/query-e673789d5b4a7aae11feccb085bf3f9dd37b771cf76261762ae18fd14cf0efc5.json b/core/lib/dal/.sqlx/query-e673789d5b4a7aae11feccb085bf3f9dd37b771cf76261762ae18fd14cf0efc5.json deleted file mode 100644 index 65803f089a8b..000000000000 --- a/core/lib/dal/.sqlx/query-e673789d5b4a7aae11feccb085bf3f9dd37b771cf76261762ae18fd14cf0efc5.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE miniblocks\n SET\n protocol_version = $1\n WHERE\n number BETWEEN $2 AND $3\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int4", - "Int8", - "Int8" - ] - }, - "nullable": [] - }, - "hash": "e673789d5b4a7aae11feccb085bf3f9dd37b771cf76261762ae18fd14cf0efc5" -} diff --git a/core/lib/dal/.sqlx/query-e7d0b7c132b80195dae7cbf50355eb148aa6d1dbd69bf3fe48522101a6ea0bcb.json b/core/lib/dal/.sqlx/query-e7d0b7c132b80195dae7cbf50355eb148aa6d1dbd69bf3fe48522101a6ea0bcb.json deleted file mode 100644 index 576484cd4206..000000000000 --- a/core/lib/dal/.sqlx/query-e7d0b7c132b80195dae7cbf50355eb148aa6d1dbd69bf3fe48522101a6ea0bcb.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n WITH\n available_batches AS (\n SELECT\n MAX(number) AS \"last_batch\"\n FROM\n l1_batches\n ),\n processed_batches AS (\n SELECT\n COALESCE(MAX(l1_batch_number), $1) + $2 AS \"last_ready_batch\"\n FROM\n vm_runner_bwip\n WHERE\n time_taken IS NOT NULL\n )\n SELECT\n LEAST(last_batch, last_ready_batch) AS \"last_ready_batch!\"\n FROM\n available_batches\n FULL JOIN processed_batches ON TRUE\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "last_ready_batch!", - "type_info": "Int8" - } - ], - "parameters": { - "Left": [ - "Int8", - "Int8" - ] - }, - "nullable": [ - true - ] - }, - "hash": "e7d0b7c132b80195dae7cbf50355eb148aa6d1dbd69bf3fe48522101a6ea0bcb" -} diff --git a/core/lib/dal/.sqlx/query-e7f05f081e989f104d0352b0ad0668929ceaaa66536248f4a0fc062e50d0d80c.json b/core/lib/dal/.sqlx/query-e7f05f081e989f104d0352b0ad0668929ceaaa66536248f4a0fc062e50d0d80c.json new file mode 100644 index 000000000000..1c8853b516a5 --- /dev/null +++ b/core/lib/dal/.sqlx/query-e7f05f081e989f104d0352b0ad0668929ceaaa66536248f4a0fc062e50d0d80c.json @@ -0,0 +1,23 @@ +{ + "db_name": "PostgreSQL", + "query": "\n WITH available_batches AS (\n SELECT\n MAX(number) AS \"last_batch\"\n FROM\n l1_batches\n ),\n processed_batches AS (\n SELECT\n COALESCE(MAX(l1_batch_number), $1) + $2 AS \"last_ready_batch\"\n FROM\n vm_runner_bwip\n WHERE\n time_taken IS NOT NULL\n )\n SELECT\n LEAST(last_batch, last_ready_batch) AS \"last_ready_batch!\"\n FROM\n available_batches FULL\n JOIN processed_batches ON TRUE\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "last_ready_batch!", + "type_info": "Int8" + } + ], + "parameters": { + "Left": [ + "Int8", + "Int8" + ] + }, + "nullable": [ + true + ] + }, + "hash": "e7f05f081e989f104d0352b0ad0668929ceaaa66536248f4a0fc062e50d0d80c" +} diff --git a/core/lib/dal/.sqlx/query-e1e8ab0cb11c6081d3525228eacbad74e1bab808c744fa14bf24332b39120767.json b/core/lib/dal/.sqlx/query-e8058944c2b1650ba831865aa62d1450fb1cb5219bcf68b920cf42c23628bd58.json similarity index 50% rename from core/lib/dal/.sqlx/query-e1e8ab0cb11c6081d3525228eacbad74e1bab808c744fa14bf24332b39120767.json rename to core/lib/dal/.sqlx/query-e8058944c2b1650ba831865aa62d1450fb1cb5219bcf68b920cf42c23628bd58.json index de9937ef7b95..aacfbb98fc51 100644 --- a/core/lib/dal/.sqlx/query-e1e8ab0cb11c6081d3525228eacbad74e1bab808c744fa14bf24332b39120767.json +++ b/core/lib/dal/.sqlx/query-e8058944c2b1650ba831865aa62d1450fb1cb5219bcf68b920cf42c23628bd58.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n WITH\n events AS (\n SELECT DISTINCT\n ON (events.tx_hash) *\n FROM\n events\n WHERE\n events.address = $1\n AND events.topic1 = $2\n AND events.tx_hash = ANY ($3)\n ORDER BY\n events.tx_hash,\n events.event_index_in_tx DESC\n )\n SELECT\n transactions.hash AS tx_hash,\n transactions.index_in_block AS index_in_block,\n transactions.l1_batch_tx_index AS l1_batch_tx_index,\n transactions.miniblock_number AS \"block_number!\",\n transactions.error AS error,\n transactions.effective_gas_price AS effective_gas_price,\n transactions.initiator_address AS initiator_address,\n transactions.data -> 'to' AS \"transfer_to?\",\n transactions.data -> 'contractAddress' AS \"execute_contract_address?\",\n transactions.tx_format AS \"tx_format?\",\n transactions.refunded_gas AS refunded_gas,\n transactions.gas_limit AS gas_limit,\n miniblocks.hash AS \"block_hash\",\n miniblocks.l1_batch_number AS \"l1_batch_number?\",\n events.topic4 AS \"contract_address?\",\n miniblocks.timestamp AS \"block_timestamp?\"\n FROM\n transactions\n JOIN miniblocks ON miniblocks.number = transactions.miniblock_number\n LEFT JOIN events ON events.tx_hash = transactions.hash\n WHERE\n transactions.hash = ANY ($3)\n AND transactions.data != '{}'::jsonb\n ", + "query": "\n WITH EVENTS AS (\n SELECT\n DISTINCT ON (EVENTS.tx_hash) *\n FROM\n EVENTS\n WHERE\n EVENTS.address = $1\n AND EVENTS.topic1 = $2\n AND EVENTS.tx_hash = ANY ($3)\n ORDER BY\n EVENTS.tx_hash,\n EVENTS.event_index_in_tx DESC\n )\n SELECT\n transactions.hash AS tx_hash,\n transactions.index_in_block AS index_in_block,\n transactions.l1_batch_tx_index AS l1_batch_tx_index,\n transactions.miniblock_number AS \"block_number!\",\n transactions.error AS error,\n transactions.effective_gas_price AS effective_gas_price,\n transactions.initiator_address AS initiator_address,\n transactions.data -> 'to' AS \"transfer_to?\",\n transactions.data -> 'contractAddress' AS \"execute_contract_address?\",\n transactions.tx_format AS \"tx_format?\",\n transactions.refunded_gas AS refunded_gas,\n transactions.gas_limit AS gas_limit,\n miniblocks.hash AS \"block_hash\",\n miniblocks.l1_batch_number AS \"l1_batch_number?\",\n EVENTS.topic4 AS \"contract_address?\",\n miniblocks.timestamp AS \"block_timestamp?\"\n FROM\n transactions\n JOIN miniblocks ON miniblocks.number = transactions.miniblock_number\n LEFT JOIN EVENTS ON EVENTS.tx_hash = transactions.hash\n WHERE\n transactions.hash = ANY ($3)\n AND transactions.data != '{}' :: jsonb\n ", "describe": { "columns": [ { @@ -110,5 +110,5 @@ false ] }, - "hash": "e1e8ab0cb11c6081d3525228eacbad74e1bab808c744fa14bf24332b39120767" + "hash": "e8058944c2b1650ba831865aa62d1450fb1cb5219bcf68b920cf42c23628bd58" } diff --git a/core/lib/dal/.sqlx/query-ea682d41219feda3514336f4c1ae6ecbe96475e83dfed603bd305e72460f52c2.json b/core/lib/dal/.sqlx/query-ea682d41219feda3514336f4c1ae6ecbe96475e83dfed603bd305e72460f52c2.json deleted file mode 100644 index 96a71d8f234e..000000000000 --- a/core/lib/dal/.sqlx/query-ea682d41219feda3514336f4c1ae6ecbe96475e83dfed603bd305e72460f52c2.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE consistency_checker_info\n SET\n last_processed_l1_batch = $1,\n updated_at = NOW()\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8" - ] - }, - "nullable": [] - }, - "hash": "ea682d41219feda3514336f4c1ae6ecbe96475e83dfed603bd305e72460f52c2" -} diff --git a/core/lib/dal/.sqlx/query-ea904aa930d602d33b6fbc1bf1178a8a0ec739f4ddec8ffeb3a87253aeb18d30.json b/core/lib/dal/.sqlx/query-ea904aa930d602d33b6fbc1bf1178a8a0ec739f4ddec8ffeb3a87253aeb18d30.json deleted file mode 100644 index 718b2a8f6872..000000000000 --- a/core/lib/dal/.sqlx/query-ea904aa930d602d33b6fbc1bf1178a8a0ec739f4ddec8ffeb3a87253aeb18d30.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n DELETE FROM miniblocks\n WHERE\n number > $1\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8" - ] - }, - "nullable": [] - }, - "hash": "ea904aa930d602d33b6fbc1bf1178a8a0ec739f4ddec8ffeb3a87253aeb18d30" -} diff --git a/core/lib/dal/.sqlx/query-ead71ae66fe4685132c03a973612fe98364aa684180dd6fbf540bb0b68d96a64.json b/core/lib/dal/.sqlx/query-ead71ae66fe4685132c03a973612fe98364aa684180dd6fbf540bb0b68d96a64.json deleted file mode 100644 index 02cd6733e811..000000000000 --- a/core/lib/dal/.sqlx/query-ead71ae66fe4685132c03a973612fe98364aa684180dd6fbf540bb0b68d96a64.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n WITH\n new_logs AS MATERIALIZED (\n SELECT DISTINCT\n ON (hashed_key) hashed_key,\n miniblock_number,\n operation_number\n FROM\n storage_logs\n WHERE\n miniblock_number BETWEEN $1 AND $2\n ORDER BY\n hashed_key,\n miniblock_number DESC,\n operation_number DESC\n )\n DELETE FROM storage_logs USING new_logs\n WHERE\n storage_logs.hashed_key = new_logs.hashed_key\n AND storage_logs.miniblock_number <= $2\n AND (storage_logs.miniblock_number, storage_logs.operation_number) < (new_logs.miniblock_number, new_logs.operation_number)\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8", - "Int8" - ] - }, - "nullable": [] - }, - "hash": "ead71ae66fe4685132c03a973612fe98364aa684180dd6fbf540bb0b68d96a64" -} diff --git a/core/lib/dal/.sqlx/query-ed39fb08c3ae2927c940d129ffd89268465b346af5da1a58cac850b687e5eb34.json b/core/lib/dal/.sqlx/query-ed39fb08c3ae2927c940d129ffd89268465b346af5da1a58cac850b687e5eb34.json new file mode 100644 index 000000000000..3bffb0af4f04 --- /dev/null +++ b/core/lib/dal/.sqlx/query-ed39fb08c3ae2927c940d129ffd89268465b346af5da1a58cac850b687e5eb34.json @@ -0,0 +1,15 @@ +{ + "db_name": "PostgreSQL", + "query": "\n DELETE FROM\n transactions\n WHERE\n initiator_address = $1\n AND nonce = $2\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Bytea", + "Int8" + ] + }, + "nullable": [] + }, + "hash": "ed39fb08c3ae2927c940d129ffd89268465b346af5da1a58cac850b687e5eb34" +} diff --git a/core/lib/dal/.sqlx/query-ededd1048db5b1696c42f8f7073ab318006e8b52570a72a89682435a92ca75f8.json b/core/lib/dal/.sqlx/query-ededd1048db5b1696c42f8f7073ab318006e8b52570a72a89682435a92ca75f8.json new file mode 100644 index 000000000000..372b189a0f3a --- /dev/null +++ b/core/lib/dal/.sqlx/query-ededd1048db5b1696c42f8f7073ab318006e8b52570a72a89682435a92ca75f8.json @@ -0,0 +1,14 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE\n vm_runner_bwip\n SET\n time_taken = NOW() - processing_started_at\n WHERE\n l1_batch_number = $1\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8" + ] + }, + "nullable": [] + }, + "hash": "ededd1048db5b1696c42f8f7073ab318006e8b52570a72a89682435a92ca75f8" +} diff --git a/core/lib/dal/.sqlx/query-2cba440c2925631655a7f67486a5a8869da8f10738ba77e3d8e048057b0e7b12.json b/core/lib/dal/.sqlx/query-ee4f40c9924b607226e60279e0c89d4ab965ab3e45badaf607af8e8787b5a8cb.json similarity index 91% rename from core/lib/dal/.sqlx/query-2cba440c2925631655a7f67486a5a8869da8f10738ba77e3d8e048057b0e7b12.json rename to core/lib/dal/.sqlx/query-ee4f40c9924b607226e60279e0c89d4ab965ab3e45badaf607af8e8787b5a8cb.json index b01a5b41649b..c08be0b90067 100644 --- a/core/lib/dal/.sqlx/query-2cba440c2925631655a7f67486a5a8869da8f10738ba77e3d8e048057b0e7b12.json +++ b/core/lib/dal/.sqlx/query-ee4f40c9924b607226e60279e0c89d4ab965ab3e45badaf607af8e8787b5a8cb.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT\n factory_deps.bytecode,\n transactions.data AS \"data?\",\n transactions.contract_address AS \"contract_address?\"\n FROM\n (\n SELECT\n miniblock_number,\n tx_hash,\n topic3\n FROM\n events\n WHERE\n address = $1\n AND topic1 = $2\n AND topic4 = $3\n LIMIT\n 1\n ) deploy_event\n JOIN factory_deps ON factory_deps.bytecode_hash = deploy_event.topic3\n LEFT JOIN transactions ON transactions.hash = deploy_event.tx_hash\n WHERE\n deploy_event.miniblock_number <= (\n SELECT\n MAX(number)\n FROM\n miniblocks\n )\n ", + "query": "\n SELECT\n factory_deps.bytecode,\n transactions.data AS \"data?\",\n transactions.contract_address AS \"contract_address?\"\n FROM\n (\n SELECT\n miniblock_number,\n tx_hash,\n topic3\n FROM\n EVENTS\n WHERE\n address = $1\n AND topic1 = $2\n AND topic4 = $3\n LIMIT\n 1\n ) deploy_event\n JOIN factory_deps ON factory_deps.bytecode_hash = deploy_event.topic3\n LEFT JOIN transactions ON transactions.hash = deploy_event.tx_hash\n WHERE\n deploy_event.miniblock_number <= (\n SELECT\n MAX(number)\n FROM\n miniblocks\n )\n ", "describe": { "columns": [ { @@ -32,5 +32,5 @@ true ] }, - "hash": "2cba440c2925631655a7f67486a5a8869da8f10738ba77e3d8e048057b0e7b12" + "hash": "ee4f40c9924b607226e60279e0c89d4ab965ab3e45badaf607af8e8787b5a8cb" } diff --git a/core/lib/dal/.sqlx/query-f012d0922265269746396dac8f25ff66f2c3b2b83d45360818a8782e56aa3d66.json b/core/lib/dal/.sqlx/query-f012d0922265269746396dac8f25ff66f2c3b2b83d45360818a8782e56aa3d66.json deleted file mode 100644 index 9815b5d3895e..000000000000 --- a/core/lib/dal/.sqlx/query-f012d0922265269746396dac8f25ff66f2c3b2b83d45360818a8782e56aa3d66.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n WITH\n sl AS (\n SELECT\n (\n SELECT\n ARRAY[hashed_key, value] AS kv\n FROM\n storage_logs\n WHERE\n storage_logs.miniblock_number = $1\n AND storage_logs.hashed_key >= u.start_key\n AND storage_logs.hashed_key <= u.end_key\n ORDER BY\n storage_logs.hashed_key\n LIMIT\n 1\n )\n FROM\n UNNEST($2::bytea[], $3::bytea[]) AS u (start_key, end_key)\n )\n SELECT\n sl.kv[1] AS \"hashed_key?\",\n sl.kv[2] AS \"value?\",\n initial_writes.index\n FROM\n sl\n LEFT OUTER JOIN initial_writes ON initial_writes.hashed_key = sl.kv[1]\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "hashed_key?", - "type_info": "Bytea" - }, - { - "ordinal": 1, - "name": "value?", - "type_info": "Bytea" - }, - { - "ordinal": 2, - "name": "index", - "type_info": "Int8" - } - ], - "parameters": { - "Left": [ - "Int8", - "ByteaArray", - "ByteaArray" - ] - }, - "nullable": [ - null, - null, - true - ] - }, - "hash": "f012d0922265269746396dac8f25ff66f2c3b2b83d45360818a8782e56aa3d66" -} diff --git a/core/lib/dal/.sqlx/query-f2f852a340c45ff69cbca42d7c592dfb0d28a797bee69872634f3105d2d51996.json b/core/lib/dal/.sqlx/query-f2f852a340c45ff69cbca42d7c592dfb0d28a797bee69872634f3105d2d51996.json deleted file mode 100644 index 11c409c21802..000000000000 --- a/core/lib/dal/.sqlx/query-f2f852a340c45ff69cbca42d7c592dfb0d28a797bee69872634f3105d2d51996.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE snapshot_recovery\n SET\n storage_logs_chunks_processed[$1] = TRUE,\n updated_at = NOW()\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int4" - ] - }, - "nullable": [] - }, - "hash": "f2f852a340c45ff69cbca42d7c592dfb0d28a797bee69872634f3105d2d51996" -} diff --git a/core/lib/dal/.sqlx/query-f3c651a3ecd2aefabef802f32c18779128de288484abea33d338c3304dd66e08.json b/core/lib/dal/.sqlx/query-f3c651a3ecd2aefabef802f32c18779128de288484abea33d338c3304dd66e08.json deleted file mode 100644 index 7d5467b4459c..000000000000 --- a/core/lib/dal/.sqlx/query-f3c651a3ecd2aefabef802f32c18779128de288484abea33d338c3304dd66e08.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE l1_batches\n SET\n eth_commit_tx_id = $1,\n updated_at = NOW()\n WHERE\n number BETWEEN $2 AND $3\n AND eth_commit_tx_id IS NULL\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int4", - "Int8", - "Int8" - ] - }, - "nullable": [] - }, - "hash": "f3c651a3ecd2aefabef802f32c18779128de288484abea33d338c3304dd66e08" -} diff --git a/core/lib/dal/.sqlx/query-f4761be1ff382f2d9bbafc971bf6109696737ae42ee1ee38e99ac07564816b5a.json b/core/lib/dal/.sqlx/query-f4761be1ff382f2d9bbafc971bf6109696737ae42ee1ee38e99ac07564816b5a.json new file mode 100644 index 000000000000..54c41db21a03 --- /dev/null +++ b/core/lib/dal/.sqlx/query-f4761be1ff382f2d9bbafc971bf6109696737ae42ee1ee38e99ac07564816b5a.json @@ -0,0 +1,16 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE\n transactions\n SET\n l1_batch_number = $3,\n l1_batch_tx_index = data_table.l1_batch_tx_index,\n updated_at = NOW()\n FROM\n (\n SELECT\n UNNEST($1 :: INT []) AS l1_batch_tx_index,\n UNNEST($2 :: bytea []) AS hash\n ) AS data_table\n WHERE\n transactions.hash = data_table.hash\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int4Array", + "ByteaArray", + "Int8" + ] + }, + "nullable": [] + }, + "hash": "f4761be1ff382f2d9bbafc971bf6109696737ae42ee1ee38e99ac07564816b5a" +} diff --git a/core/lib/dal/.sqlx/query-30e5c8710b1611872da06b72ac681aff512b3a9b2587b8e59848345c07dd8f3b.json b/core/lib/dal/.sqlx/query-f56a7eb6a82875d5151ec2c1b320328e19bed529d4bd71ca5bc7df0de1a0a463.json similarity index 66% rename from core/lib/dal/.sqlx/query-30e5c8710b1611872da06b72ac681aff512b3a9b2587b8e59848345c07dd8f3b.json rename to core/lib/dal/.sqlx/query-f56a7eb6a82875d5151ec2c1b320328e19bed529d4bd71ca5bc7df0de1a0a463.json index 1ddc86f29a0a..23c60a1a57c0 100644 --- a/core/lib/dal/.sqlx/query-30e5c8710b1611872da06b72ac681aff512b3a9b2587b8e59848345c07dd8f3b.json +++ b/core/lib/dal/.sqlx/query-f56a7eb6a82875d5151ec2c1b320328e19bed529d4bd71ca5bc7df0de1a0a463.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n UPDATE tee_verifier_input_producer_jobs\n SET\n status = $1,\n updated_at = NOW(),\n time_taken = $3,\n error = $4\n WHERE\n l1_batch_number = $2\n AND status != $5\n RETURNING\n tee_verifier_input_producer_jobs.attempts\n ", + "query": "\n UPDATE\n tee_verifier_input_producer_jobs\n SET\n status = $1,\n updated_at = NOW(),\n time_taken = $3,\n error = $4\n WHERE\n l1_batch_number = $2\n AND status != $5\n RETURNING\n tee_verifier_input_producer_jobs.attempts\n ", "describe": { "columns": [ { @@ -48,5 +48,5 @@ false ] }, - "hash": "30e5c8710b1611872da06b72ac681aff512b3a9b2587b8e59848345c07dd8f3b" + "hash": "f56a7eb6a82875d5151ec2c1b320328e19bed529d4bd71ca5bc7df0de1a0a463" } diff --git a/core/lib/dal/.sqlx/query-f6e3b19a18b5ee75805418563b9fd7144b05f75aa304bf217cf14b9625a09e64.json b/core/lib/dal/.sqlx/query-f6e3b19a18b5ee75805418563b9fd7144b05f75aa304bf217cf14b9625a09e64.json new file mode 100644 index 000000000000..d39f0b0c6236 --- /dev/null +++ b/core/lib/dal/.sqlx/query-f6e3b19a18b5ee75805418563b9fd7144b05f75aa304bf217cf14b9625a09e64.json @@ -0,0 +1,34 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE\n transactions\n SET\n hash = data_table.hash,\n signature = data_table.signature,\n gas_limit = data_table.gas_limit,\n max_fee_per_gas = data_table.max_fee_per_gas,\n max_priority_fee_per_gas = data_table.max_priority_fee_per_gas,\n gas_per_pubdata_limit = data_table.gas_per_pubdata_limit,\n input = data_table.input,\n data = data_table.data,\n tx_format = data_table.tx_format,\n miniblock_number = $21,\n index_in_block = data_table.index_in_block,\n error = NULLIF(data_table.error, ''),\n effective_gas_price = data_table.effective_gas_price,\n execution_info = data_table.new_execution_info,\n refunded_gas = data_table.refunded_gas,\n value = data_table.value,\n contract_address = data_table.contract_address,\n paymaster = data_table.paymaster,\n paymaster_input = data_table.paymaster_input,\n in_mempool = FALSE,\n updated_at = NOW()\n FROM\n (\n SELECT\n data_table_temp.*\n FROM\n (\n SELECT\n UNNEST($1 :: bytea []) AS initiator_address,\n UNNEST($2 :: INT []) AS nonce,\n UNNEST($3 :: bytea []) AS hash,\n UNNEST($4 :: bytea []) AS signature,\n UNNEST($5 :: NUMERIC []) AS gas_limit,\n UNNEST($6 :: NUMERIC []) AS max_fee_per_gas,\n UNNEST($7 :: NUMERIC []) AS max_priority_fee_per_gas,\n UNNEST($8 :: NUMERIC []) AS gas_per_pubdata_limit,\n UNNEST($9 :: INT []) AS tx_format,\n UNNEST($10 :: INTEGER []) AS index_in_block,\n UNNEST($11 :: VARCHAR []) AS error,\n UNNEST($12 :: NUMERIC []) AS effective_gas_price,\n UNNEST($13 :: jsonb []) AS new_execution_info,\n UNNEST($14 :: bytea []) AS input,\n UNNEST($15 :: jsonb []) AS data,\n UNNEST($16 :: BIGINT []) AS refunded_gas,\n UNNEST($17 :: NUMERIC []) AS value,\n UNNEST($18 :: bytea []) AS contract_address,\n UNNEST($19 :: bytea []) AS paymaster,\n UNNEST($20 :: bytea []) AS paymaster_input\n ) AS data_table_temp\n JOIN transactions ON transactions.initiator_address = data_table_temp.initiator_address\n AND transactions.nonce = data_table_temp.nonce\n ORDER BY\n transactions.hash\n ) AS data_table\n WHERE\n transactions.initiator_address = data_table.initiator_address\n AND transactions.nonce = data_table.nonce\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "ByteaArray", + "Int4Array", + "ByteaArray", + "ByteaArray", + "NumericArray", + "NumericArray", + "NumericArray", + "NumericArray", + "Int4Array", + "Int4Array", + "VarcharArray", + "NumericArray", + "JsonbArray", + "ByteaArray", + "JsonbArray", + "Int8Array", + "NumericArray", + "ByteaArray", + "ByteaArray", + "ByteaArray", + "Int8" + ] + }, + "nullable": [] + }, + "hash": "f6e3b19a18b5ee75805418563b9fd7144b05f75aa304bf217cf14b9625a09e64" +} diff --git a/core/lib/dal/.sqlx/query-3490fe0b778a03c73111bf8cbf426b0b3185a231bbf0b8b132a1a95bc157e827.json b/core/lib/dal/.sqlx/query-f773adbbc1587e69fa8665806fde81314e65b27790b9946a58c95f2fbe6fb664.json similarity index 83% rename from core/lib/dal/.sqlx/query-3490fe0b778a03c73111bf8cbf426b0b3185a231bbf0b8b132a1a95bc157e827.json rename to core/lib/dal/.sqlx/query-f773adbbc1587e69fa8665806fde81314e65b27790b9946a58c95f2fbe6fb664.json index 3275e94936a1..c9f136d3d5a7 100644 --- a/core/lib/dal/.sqlx/query-3490fe0b778a03c73111bf8cbf426b0b3185a231bbf0b8b132a1a95bc157e827.json +++ b/core/lib/dal/.sqlx/query-f773adbbc1587e69fa8665806fde81314e65b27790b9946a58c95f2fbe6fb664.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT\n hashed_key,\n l1_batch_number,\n INDEX\n FROM\n initial_writes\n WHERE\n hashed_key = ANY ($1::bytea[])\n ", + "query": "\n SELECT\n hashed_key,\n l1_batch_number,\n INDEX\n FROM\n initial_writes\n WHERE\n hashed_key = ANY ($1 :: bytea [])\n ", "describe": { "columns": [ { @@ -30,5 +30,5 @@ false ] }, - "hash": "3490fe0b778a03c73111bf8cbf426b0b3185a231bbf0b8b132a1a95bc157e827" + "hash": "f773adbbc1587e69fa8665806fde81314e65b27790b9946a58c95f2fbe6fb664" } diff --git a/core/lib/dal/.sqlx/query-fd4f2f6dbd0e2ab56faa91ff3ebbd48e2dc3cce5f3f40cea31eb3b27c6bff1c1.json b/core/lib/dal/.sqlx/query-fd4f2f6dbd0e2ab56faa91ff3ebbd48e2dc3cce5f3f40cea31eb3b27c6bff1c1.json new file mode 100644 index 000000000000..1ffc2b819479 --- /dev/null +++ b/core/lib/dal/.sqlx/query-fd4f2f6dbd0e2ab56faa91ff3ebbd48e2dc3cce5f3f40cea31eb3b27c6bff1c1.json @@ -0,0 +1,16 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE\n l1_batches\n SET\n eth_commit_tx_id = $1,\n updated_at = NOW()\n WHERE\n number BETWEEN $2 AND $3\n AND eth_commit_tx_id IS NULL\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int4", + "Int8", + "Int8" + ] + }, + "nullable": [] + }, + "hash": "fd4f2f6dbd0e2ab56faa91ff3ebbd48e2dc3cce5f3f40cea31eb3b27c6bff1c1" +} diff --git a/core/lib/dal/.sqlx/query-fdbf99a779c7c894bd5ab6ac142f01c2abe41c456d85787038ad0b3cc21b59f8.json b/core/lib/dal/.sqlx/query-fdbf99a779c7c894bd5ab6ac142f01c2abe41c456d85787038ad0b3cc21b59f8.json new file mode 100644 index 000000000000..697233abad14 --- /dev/null +++ b/core/lib/dal/.sqlx/query-fdbf99a779c7c894bd5ab6ac142f01c2abe41c456d85787038ad0b3cc21b59f8.json @@ -0,0 +1,14 @@ +{ + "db_name": "PostgreSQL", + "query": "\n DELETE FROM\n factory_deps\n WHERE\n miniblock_number > $1\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8" + ] + }, + "nullable": [] + }, + "hash": "fdbf99a779c7c894bd5ab6ac142f01c2abe41c456d85787038ad0b3cc21b59f8" +} diff --git a/core/lib/dal/.sqlx/query-fdffa5841554286a924b217b5885d9ec9b3f628c3a4cf5e10580ea6e5e3a2429.json b/core/lib/dal/.sqlx/query-fdffa5841554286a924b217b5885d9ec9b3f628c3a4cf5e10580ea6e5e3a2429.json deleted file mode 100644 index bdcf7e5f0371..000000000000 --- a/core/lib/dal/.sqlx/query-fdffa5841554286a924b217b5885d9ec9b3f628c3a4cf5e10580ea6e5e3a2429.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE miniblocks\n SET\n l1_batch_number = $1\n WHERE\n l1_batch_number IS NULL\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8" - ] - }, - "nullable": [] - }, - "hash": "fdffa5841554286a924b217b5885d9ec9b3f628c3a4cf5e10580ea6e5e3a2429" -} diff --git a/core/lib/dal/.sqlx/query-40c17194a2089a7d3fa6b7923c9e03def94f4bf4674def1893e2232be80f57a0.json b/core/lib/dal/.sqlx/query-ff38c42f0dc6fd3b3976a3b36f41c10b9ae1a80fe6b6a9bb50ee4bfe849f398d.json similarity index 64% rename from core/lib/dal/.sqlx/query-40c17194a2089a7d3fa6b7923c9e03def94f4bf4674def1893e2232be80f57a0.json rename to core/lib/dal/.sqlx/query-ff38c42f0dc6fd3b3976a3b36f41c10b9ae1a80fe6b6a9bb50ee4bfe849f398d.json index c655704fd842..4a34be40cca0 100644 --- a/core/lib/dal/.sqlx/query-40c17194a2089a7d3fa6b7923c9e03def94f4bf4674def1893e2232be80f57a0.json +++ b/core/lib/dal/.sqlx/query-ff38c42f0dc6fd3b3976a3b36f41c10b9ae1a80fe6b6a9bb50ee4bfe849f398d.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n contract_verification_requests (\n contract_address,\n source_code,\n contract_name,\n zk_compiler_version,\n compiler_version,\n optimization_used,\n optimizer_mode,\n constructor_arguments,\n is_system,\n force_evmla,\n status,\n created_at,\n updated_at\n )\n VALUES\n ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, 'queued', NOW(), NOW())\n RETURNING\n id\n ", + "query": "\n INSERT INTO\n contract_verification_requests (\n contract_address,\n source_code,\n contract_name,\n zk_compiler_version,\n compiler_version,\n optimization_used,\n optimizer_mode,\n constructor_arguments,\n is_system,\n force_evmla,\n status,\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 'queued',\n NOW(),\n NOW()\n )\n RETURNING\n id\n ", "describe": { "columns": [ { @@ -27,5 +27,5 @@ false ] }, - "hash": "40c17194a2089a7d3fa6b7923c9e03def94f4bf4674def1893e2232be80f57a0" + "hash": "ff38c42f0dc6fd3b3976a3b36f41c10b9ae1a80fe6b6a9bb50ee4bfe849f398d" } diff --git a/core/lib/dal/src/contract_verification_dal.rs b/core/lib/dal/src/contract_verification_dal.rs index 60430a4fef0b..14d141ecc33d 100644 --- a/core/lib/dal/src/contract_verification_dal.rs +++ b/core/lib/dal/src/contract_verification_dal.rs @@ -52,7 +52,7 @@ impl ContractVerificationDal<'_, '_> { FROM contract_verification_requests WHERE - STATUS = 'queued' + status = 'queued' "# ) .fetch_one(self.storage.conn()) @@ -78,7 +78,7 @@ impl ContractVerificationDal<'_, '_> { constructor_arguments, is_system, force_evmla, - STATUS, + status, created_at, updated_at ) @@ -137,7 +137,7 @@ impl ContractVerificationDal<'_, '_> { UPDATE contract_verification_requests SET - STATUS = 'in_progress', + status = 'in_progress', attempts = attempts + 1, updated_at = NOW(), processing_started_at = NOW() @@ -148,9 +148,9 @@ impl ContractVerificationDal<'_, '_> { FROM contract_verification_requests WHERE - STATUS = 'queued' + status = 'queued' OR ( - STATUS = 'in_progress' + status = 'in_progress' AND processing_started_at < NOW() - $1 :: INTERVAL ) ORDER BY @@ -197,7 +197,7 @@ impl ContractVerificationDal<'_, '_> { UPDATE contract_verification_requests SET - STATUS = 'successful', + status = 'successful', updated_at = NOW() WHERE id = $1 @@ -243,7 +243,7 @@ impl ContractVerificationDal<'_, '_> { UPDATE contract_verification_requests SET - STATUS = 'failed', + status = 'failed', updated_at = NOW(), error = $2, compilation_errors = $3, @@ -268,7 +268,7 @@ impl ContractVerificationDal<'_, '_> { let Some(row) = sqlx::query!( r#" SELECT - STATUS, + status, error, compilation_errors FROM @@ -505,7 +505,7 @@ impl ContractVerificationDal<'_, '_> { FROM contract_verification_requests WHERE - STATUS = 'successful' + status = 'successful' ORDER BY id "#, diff --git a/core/lib/dal/src/proof_generation_dal.rs b/core/lib/dal/src/proof_generation_dal.rs index d215065e8327..18899111a0c3 100644 --- a/core/lib/dal/src/proof_generation_dal.rs +++ b/core/lib/dal/src/proof_generation_dal.rs @@ -47,7 +47,7 @@ impl ProofGenerationDal<'_, '_> { UPDATE proof_generation_details SET - STATUS = 'picked_by_prover', + status = 'picked_by_prover', updated_at = NOW(), prover_taken_at = NOW() WHERE @@ -64,10 +64,10 @@ impl ProofGenerationDal<'_, '_> { AND l1_batches.hash IS NOT NULL AND l1_batches.aux_data_hash IS NOT NULL AND l1_batches.meta_parameters_hash IS NOT NULL - AND STATUS = 'unpicked' + AND status = 'unpicked' ) OR ( - STATUS = 'picked_by_prover' + status = 'picked_by_prover' AND prover_taken_at < NOW() - $1 :: INTERVAL ) ORDER BY @@ -121,7 +121,7 @@ impl ProofGenerationDal<'_, '_> { UPDATE proof_generation_details SET - STATUS = 'unpicked', + status = 'unpicked', updated_at = NOW() WHERE l1_batch_number = $1 @@ -147,7 +147,7 @@ impl ProofGenerationDal<'_, '_> { UPDATE proof_generation_details SET - STATUS = 'generated', + status = 'generated', proof_blob_url = $1, updated_at = NOW() WHERE @@ -259,7 +259,7 @@ impl ProofGenerationDal<'_, '_> { let result = sqlx::query!( r#" INSERT INTO - proof_generation_details (l1_batch_number, STATUS, created_at, updated_at) + proof_generation_details (l1_batch_number, status, created_at, updated_at) VALUES ($1, 'unpicked', NOW(), NOW()) ON CONFLICT (l1_batch_number) DO NOTHING "#, @@ -291,7 +291,7 @@ impl ProofGenerationDal<'_, '_> { UPDATE proof_generation_details SET - STATUS = $1, + status = $1, updated_at = NOW() WHERE l1_batch_number = $2 @@ -326,7 +326,7 @@ impl ProofGenerationDal<'_, '_> { FROM proof_generation_details WHERE - STATUS = 'unpicked' + status = 'unpicked' ORDER BY l1_batch_number ASC LIMIT @@ -349,7 +349,7 @@ impl ProofGenerationDal<'_, '_> { FROM proof_generation_details WHERE - STATUS NOT IN ('generated', 'skipped') + status NOT IN ('generated', 'skipped') ORDER BY l1_batch_number ASC LIMIT diff --git a/core/lib/dal/src/snapshots_creator_dal.rs b/core/lib/dal/src/snapshots_creator_dal.rs index b04a135cdfdd..da41e2c85e51 100644 --- a/core/lib/dal/src/snapshots_creator_dal.rs +++ b/core/lib/dal/src/snapshots_creator_dal.rs @@ -64,7 +64,9 @@ impl SnapshotsCreatorDal<'_, '_> { ( SELECT hashed_key, - MAX(ARRAY [miniblock_number, operation_number] :: INT []) AS op + MAX( + ARRAY [miniblock_number, operation_number] :: INT [] + ) AS op FROM storage_logs WHERE @@ -130,7 +132,9 @@ impl SnapshotsCreatorDal<'_, '_> { ( SELECT hashed_key, - MAX(ARRAY [miniblock_number, operation_number] :: INT []) AS op + MAX( + ARRAY [miniblock_number, operation_number] :: INT [] + ) AS op FROM storage_logs WHERE diff --git a/core/lib/dal/src/system_dal.rs b/core/lib/dal/src/system_dal.rs index 3e307ce23db3..9d9b3ddd23b2 100644 --- a/core/lib/dal/src/system_dal.rs +++ b/core/lib/dal/src/system_dal.rs @@ -49,10 +49,18 @@ impl SystemDal<'_, '_> { r#" SELECT table_name, - PG_TABLE_SIZE(('public.' || QUOTE_IDENT(table_name)) :: regclass) AS table_size, - PG_INDEXES_SIZE(('public.' || QUOTE_IDENT(table_name)) :: regclass) AS indexes_size, - PG_RELATION_SIZE(('public.' || QUOTE_IDENT(table_name)) :: regclass) AS relation_size, - PG_TOTAL_RELATION_SIZE(('public.' || QUOTE_IDENT(table_name)) :: regclass) AS total_size + PG_TABLE_SIZE( + ('public.' || QUOTE_IDENT(table_name)) :: regclass + ) AS table_size, + PG_INDEXES_SIZE( + ('public.' || QUOTE_IDENT(table_name)) :: regclass + ) AS indexes_size, + PG_RELATION_SIZE( + ('public.' || QUOTE_IDENT(table_name)) :: regclass + ) AS relation_size, + PG_TOTAL_RELATION_SIZE( + ('public.' || QUOTE_IDENT(table_name)) :: regclass + ) AS total_size FROM information_schema.tables WHERE diff --git a/core/lib/dal/src/tee_proof_generation_dal.rs b/core/lib/dal/src/tee_proof_generation_dal.rs index c40ea608fa55..77dda68f76a0 100644 --- a/core/lib/dal/src/tee_proof_generation_dal.rs +++ b/core/lib/dal/src/tee_proof_generation_dal.rs @@ -44,7 +44,7 @@ impl TeeProofGenerationDal<'_, '_> { UPDATE tee_proof_generation_details SET - STATUS = $1, + status = $1, updated_at = NOW(), prover_taken_at = NOW() WHERE @@ -106,7 +106,7 @@ impl TeeProofGenerationDal<'_, '_> { UPDATE tee_proof_generation_details SET - STATUS = $1, + status = $1, updated_at = NOW() WHERE l1_batch_number = $2 @@ -140,7 +140,7 @@ impl TeeProofGenerationDal<'_, '_> { tee_proof_generation_details SET tee_type = $1, - STATUS = $2, + status = $2, pubkey = $3, signature = $4, proof = $5, @@ -189,7 +189,7 @@ impl TeeProofGenerationDal<'_, '_> { tee_proof_generation_details ( l1_batch_number, tee_type, - STATUS, + status, created_at, updated_at ) diff --git a/core/lib/dal/src/tee_verifier_input_producer_dal.rs b/core/lib/dal/src/tee_verifier_input_producer_dal.rs index 89179e0baa3b..56e0b2d832fc 100644 --- a/core/lib/dal/src/tee_verifier_input_producer_dal.rs +++ b/core/lib/dal/src/tee_verifier_input_producer_dal.rs @@ -55,7 +55,7 @@ impl TeeVerifierInputProducerDal<'_, '_> { sqlx::query!( r#" INSERT INTO - tee_verifier_input_producer_jobs (l1_batch_number, STATUS, created_at, updated_at) + tee_verifier_input_producer_jobs (l1_batch_number, status, created_at, updated_at) VALUES ($1, $2, NOW(), NOW()) ON CONFLICT (l1_batch_number) DO NOTHING "#, @@ -79,7 +79,7 @@ impl TeeVerifierInputProducerDal<'_, '_> { UPDATE tee_verifier_input_producer_jobs SET - STATUS = $1, + status = $1, attempts = attempts + 1, updated_at = NOW(), processing_started_at = NOW() @@ -90,13 +90,13 @@ impl TeeVerifierInputProducerDal<'_, '_> { FROM tee_verifier_input_producer_jobs WHERE - STATUS = $2 + status = $2 OR ( - STATUS = $1 + status = $1 AND processing_started_at < NOW() - $4 :: INTERVAL ) OR ( - STATUS = $3 + status = $3 AND attempts < $5 ) ORDER BY @@ -159,7 +159,7 @@ impl TeeVerifierInputProducerDal<'_, '_> { UPDATE tee_verifier_input_producer_jobs SET - STATUS = $1, + status = $1, updated_at = NOW(), time_taken = $3, input_blob_url = $4 @@ -191,13 +191,13 @@ impl TeeVerifierInputProducerDal<'_, '_> { UPDATE tee_verifier_input_producer_jobs SET - STATUS = $1, + status = $1, updated_at = NOW(), time_taken = $3, error = $4 WHERE l1_batch_number = $2 - AND STATUS != $5 + AND status != $5 RETURNING tee_verifier_input_producer_jobs.attempts "#, diff --git a/prover/crates/lib/prover_dal/.sqlx/query-00b88ec7fcf40bb18e0018b7c76f6e1df560ab1e8935564355236e90b6147d2f.json b/prover/crates/lib/prover_dal/.sqlx/query-00b88ec7fcf40bb18e0018b7c76f6e1df560ab1e8935564355236e90b6147d2f.json deleted file mode 100644 index 49a533897ce3..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-00b88ec7fcf40bb18e0018b7c76f6e1df560ab1e8935564355236e90b6147d2f.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE scheduler_witness_jobs_fri\n SET\n status = 'successful',\n updated_at = NOW(),\n time_taken = $1\n WHERE\n l1_batch_number = $2\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Time", - "Int8" - ] - }, - "nullable": [] - }, - "hash": "00b88ec7fcf40bb18e0018b7c76f6e1df560ab1e8935564355236e90b6147d2f" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-08a97610cfe85ab84df2f2ca3ab7619d79075a2177b8f9b464565474b43afc21.json b/prover/crates/lib/prover_dal/.sqlx/query-08a97610cfe85ab84df2f2ca3ab7619d79075a2177b8f9b464565474b43afc21.json new file mode 100644 index 000000000000..8898750df25d --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-08a97610cfe85ab84df2f2ca3ab7619d79075a2177b8f9b464565474b43afc21.json @@ -0,0 +1,15 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE\n witness_inputs_fri\n SET\n status = 'successful',\n updated_at = NOW(),\n time_taken = $1\n WHERE\n l1_batch_number = $2\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Time", + "Int8" + ] + }, + "nullable": [] + }, + "hash": "08a97610cfe85ab84df2f2ca3ab7619d79075a2177b8f9b464565474b43afc21" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-0b3dcc054233e1269e067741394c252e5c82673e1595829b4b9f897b7df61e6a.json b/prover/crates/lib/prover_dal/.sqlx/query-0b3dcc054233e1269e067741394c252e5c82673e1595829b4b9f897b7df61e6a.json new file mode 100644 index 000000000000..b9cb7220b560 --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-0b3dcc054233e1269e067741394c252e5c82673e1595829b4b9f897b7df61e6a.json @@ -0,0 +1,15 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE\n prover_jobs_fri\n SET\n status = 'failed',\n error = $1,\n updated_at = NOW()\n WHERE\n id = $2\n AND status != 'successful'\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Text", + "Int8" + ] + }, + "nullable": [] + }, + "hash": "0b3dcc054233e1269e067741394c252e5c82673e1595829b4b9f897b7df61e6a" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-0b70c98c2edd8370ad09ac553c18dbc21cccb9a95e3db1c93da239845a5e9036.json b/prover/crates/lib/prover_dal/.sqlx/query-0b70c98c2edd8370ad09ac553c18dbc21cccb9a95e3db1c93da239845a5e9036.json deleted file mode 100644 index 8b49fa11e63b..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-0b70c98c2edd8370ad09ac553c18dbc21cccb9a95e3db1c93da239845a5e9036.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE proof_compression_jobs_fri\n SET\n status = $1,\n attempts = attempts + 1,\n updated_at = NOW(),\n processing_started_at = NOW(),\n picked_by = $3\n WHERE\n l1_batch_number = (\n SELECT\n l1_batch_number\n FROM\n proof_compression_jobs_fri\n WHERE\n status = $2\n AND protocol_version = $4\n AND protocol_version_patch = $5\n ORDER BY\n l1_batch_number ASC\n LIMIT\n 1\n FOR UPDATE\n SKIP LOCKED\n )\n RETURNING\n proof_compression_jobs_fri.l1_batch_number\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "l1_batch_number", - "type_info": "Int8" - } - ], - "parameters": { - "Left": [ - "Text", - "Text", - "Text", - "Int4", - "Int4" - ] - }, - "nullable": [ - false - ] - }, - "hash": "0b70c98c2edd8370ad09ac553c18dbc21cccb9a95e3db1c93da239845a5e9036" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-0c047f4e856486d039a21a5622652e0e45816db6ebc2c16a09350b99d87d5f27.json b/prover/crates/lib/prover_dal/.sqlx/query-0c047f4e856486d039a21a5622652e0e45816db6ebc2c16a09350b99d87d5f27.json new file mode 100644 index 000000000000..8d363816e9c5 --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-0c047f4e856486d039a21a5622652e0e45816db6ebc2c16a09350b99d87d5f27.json @@ -0,0 +1,26 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE\n proof_compression_jobs_fri\n SET\n status = $1,\n attempts = attempts + 1,\n updated_at = NOW(),\n processing_started_at = NOW(),\n picked_by = $3\n WHERE\n l1_batch_number = (\n SELECT\n l1_batch_number\n FROM\n proof_compression_jobs_fri\n WHERE\n status = $2\n AND protocol_version = $4\n AND protocol_version_patch = $5\n ORDER BY\n l1_batch_number ASC\n LIMIT\n 1 FOR\n UPDATE\n SKIP LOCKED\n )\n RETURNING\n proof_compression_jobs_fri.l1_batch_number\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "l1_batch_number", + "type_info": "Int8" + } + ], + "parameters": { + "Left": [ + "Text", + "Text", + "Text", + "Int4", + "Int4" + ] + }, + "nullable": [ + false + ] + }, + "hash": "0c047f4e856486d039a21a5622652e0e45816db6ebc2c16a09350b99d87d5f27" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-3a9ffd4d88f2cfac22835aac2512e61157bf58aec70903623afc9da24d46a336.json b/prover/crates/lib/prover_dal/.sqlx/query-0cc53f605989b99ad612d9a5353636ca3032cd5dcc5d3d1d4d5d0a16c38c20ef.json similarity index 67% rename from prover/crates/lib/prover_dal/.sqlx/query-3a9ffd4d88f2cfac22835aac2512e61157bf58aec70903623afc9da24d46a336.json rename to prover/crates/lib/prover_dal/.sqlx/query-0cc53f605989b99ad612d9a5353636ca3032cd5dcc5d3d1d4d5d0a16c38c20ef.json index 063ae8fc90a3..af5b2c758f86 100644 --- a/prover/crates/lib/prover_dal/.sqlx/query-3a9ffd4d88f2cfac22835aac2512e61157bf58aec70903623afc9da24d46a336.json +++ b/prover/crates/lib/prover_dal/.sqlx/query-0cc53f605989b99ad612d9a5353636ca3032cd5dcc5d3d1d4d5d0a16c38c20ef.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n node_aggregation_witness_jobs_fri (\n l1_batch_number,\n circuit_id,\n status,\n created_at,\n updated_at\n )\n VALUES\n ($1, $2, 'waiting_for_proofs', NOW(), NOW())\n ON CONFLICT (l1_batch_number, circuit_id, depth) DO\n UPDATE\n SET status = $3\n ", + "query": "\n INSERT INTO\n node_aggregation_witness_jobs_fri (\n l1_batch_number,\n circuit_id,\n status,\n created_at,\n updated_at\n )\n VALUES\n ($1, $2, 'waiting_for_proofs', NOW(), NOW()) ON CONFLICT (l1_batch_number, circuit_id, depth) DO\n UPDATE\n SET\n status = $3\n ", "describe": { "columns": [], "parameters": { @@ -12,5 +12,5 @@ }, "nullable": [] }, - "hash": "3a9ffd4d88f2cfac22835aac2512e61157bf58aec70903623afc9da24d46a336" + "hash": "0cc53f605989b99ad612d9a5353636ca3032cd5dcc5d3d1d4d5d0a16c38c20ef" } diff --git a/prover/crates/lib/prover_dal/.sqlx/query-7effbacbdcc4bd762386351755f4f32042dfead8a37401558f5fd3b03480f2dd.json b/prover/crates/lib/prover_dal/.sqlx/query-0d434d0e100bbcfaf56fdb598f9d1c5fa2958f06898a8c67079a7ccf0c340df2.json similarity index 64% rename from prover/crates/lib/prover_dal/.sqlx/query-7effbacbdcc4bd762386351755f4f32042dfead8a37401558f5fd3b03480f2dd.json rename to prover/crates/lib/prover_dal/.sqlx/query-0d434d0e100bbcfaf56fdb598f9d1c5fa2958f06898a8c67079a7ccf0c340df2.json index 3064489830d9..bdbb5d7c3ebc 100644 --- a/prover/crates/lib/prover_dal/.sqlx/query-7effbacbdcc4bd762386351755f4f32042dfead8a37401558f5fd3b03480f2dd.json +++ b/prover/crates/lib/prover_dal/.sqlx/query-0d434d0e100bbcfaf56fdb598f9d1c5fa2958f06898a8c67079a7ccf0c340df2.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n UPDATE node_aggregation_witness_jobs_fri\n SET\n status = 'in_progress',\n attempts = attempts + 1,\n updated_at = NOW(),\n processing_started_at = NOW(),\n picked_by = $3\n WHERE\n id = (\n SELECT\n id\n FROM\n node_aggregation_witness_jobs_fri\n WHERE\n status = 'queued'\n AND protocol_version = $1\n AND protocol_version_patch = $2\n ORDER BY\n l1_batch_number ASC,\n depth ASC,\n id ASC\n LIMIT\n 1\n FOR UPDATE\n SKIP LOCKED\n )\n RETURNING\n node_aggregation_witness_jobs_fri.*\n ", + "query": "\n UPDATE\n node_aggregation_witness_jobs_fri\n SET\n status = 'in_progress',\n attempts = attempts + 1,\n updated_at = NOW(),\n processing_started_at = NOW(),\n picked_by = $3\n WHERE\n id = (\n SELECT\n id\n FROM\n node_aggregation_witness_jobs_fri\n WHERE\n status = 'queued'\n AND protocol_version = $1\n AND protocol_version_patch = $2\n ORDER BY\n l1_batch_number ASC,\n depth ASC,\n id ASC\n LIMIT\n 1 FOR\n UPDATE\n SKIP LOCKED\n )\n RETURNING\n node_aggregation_witness_jobs_fri.*\n ", "describe": { "columns": [ { @@ -110,5 +110,5 @@ false ] }, - "hash": "7effbacbdcc4bd762386351755f4f32042dfead8a37401558f5fd3b03480f2dd" + "hash": "0d434d0e100bbcfaf56fdb598f9d1c5fa2958f06898a8c67079a7ccf0c340df2" } diff --git a/prover/crates/lib/prover_dal/.sqlx/query-0f42168a211b64df8f78031341e473766ab4f51dd399c879b4f7c3bc157ab77e.json b/prover/crates/lib/prover_dal/.sqlx/query-0f42168a211b64df8f78031341e473766ab4f51dd399c879b4f7c3bc157ab77e.json new file mode 100644 index 000000000000..eb3ea0f353d6 --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-0f42168a211b64df8f78031341e473766ab4f51dd399c879b4f7c3bc157ab77e.json @@ -0,0 +1,30 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE\n recursion_tip_witness_jobs_fri\n SET\n status = 'in_progress',\n attempts = attempts + 1,\n updated_at = NOW(),\n processing_started_at = NOW(),\n picked_by = $3\n WHERE\n l1_batch_number = (\n SELECT\n l1_batch_number\n FROM\n recursion_tip_witness_jobs_fri\n WHERE\n status = 'queued'\n AND protocol_version = $1\n AND protocol_version_patch = $2\n ORDER BY\n l1_batch_number ASC\n LIMIT\n 1 FOR\n UPDATE\n SKIP LOCKED\n )\n RETURNING\n recursion_tip_witness_jobs_fri.l1_batch_number,\n recursion_tip_witness_jobs_fri.number_of_final_node_jobs\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "l1_batch_number", + "type_info": "Int8" + }, + { + "ordinal": 1, + "name": "number_of_final_node_jobs", + "type_info": "Int4" + } + ], + "parameters": { + "Left": [ + "Int4", + "Int4", + "Text" + ] + }, + "nullable": [ + false, + false + ] + }, + "hash": "0f42168a211b64df8f78031341e473766ab4f51dd399c879b4f7c3bc157ab77e" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-102b79726652d9150c802350bdca80c233a9fd3e892b5a867a5517c2e04497a8.json b/prover/crates/lib/prover_dal/.sqlx/query-102b79726652d9150c802350bdca80c233a9fd3e892b5a867a5517c2e04497a8.json deleted file mode 100644 index f912d06de810..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-102b79726652d9150c802350bdca80c233a9fd3e892b5a867a5517c2e04497a8.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE proof_compression_jobs_fri\n SET\n status = 'queued',\n error = 'Manually requeued',\n attempts = 2,\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n l1_batch_number = $1\n AND attempts >= $2\n AND (\n status = 'in_progress'\n OR status = 'failed'\n )\n RETURNING\n status,\n attempts,\n error,\n picked_by\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "status", - "type_info": "Text" - }, - { - "ordinal": 1, - "name": "attempts", - "type_info": "Int2" - }, - { - "ordinal": 2, - "name": "error", - "type_info": "Text" - }, - { - "ordinal": 3, - "name": "picked_by", - "type_info": "Text" - } - ], - "parameters": { - "Left": [ - "Int8", - "Int2" - ] - }, - "nullable": [ - false, - false, - true, - true - ] - }, - "hash": "102b79726652d9150c802350bdca80c233a9fd3e892b5a867a5517c2e04497a8" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-10b5ee91c7995390603c2c9a253151b3f9a2285724c9dc1a044762f7ce6f8bb7.json b/prover/crates/lib/prover_dal/.sqlx/query-10b5ee91c7995390603c2c9a253151b3f9a2285724c9dc1a044762f7ce6f8bb7.json new file mode 100644 index 000000000000..0d582f664bc7 --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-10b5ee91c7995390603c2c9a253151b3f9a2285724c9dc1a044762f7ce6f8bb7.json @@ -0,0 +1,15 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE\n node_aggregation_witness_jobs_fri\n SET\n status = 'failed',\n error = $1,\n updated_at = NOW()\n WHERE\n id = $2\n AND status != 'successful'\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Text", + "Int8" + ] + }, + "nullable": [] + }, + "hash": "10b5ee91c7995390603c2c9a253151b3f9a2285724c9dc1a044762f7ce6f8bb7" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-16548daf69e9ff0528904be2e142254a457665179d9cf0a3c0b18c3fe09e4838.json b/prover/crates/lib/prover_dal/.sqlx/query-16548daf69e9ff0528904be2e142254a457665179d9cf0a3c0b18c3fe09e4838.json deleted file mode 100644 index 5fe5032746e9..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-16548daf69e9ff0528904be2e142254a457665179d9cf0a3c0b18c3fe09e4838.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE node_aggregation_witness_jobs_fri\n SET\n status = 'failed',\n error = $1,\n updated_at = NOW()\n WHERE\n id = $2\n AND status != 'successful'\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Text", - "Int8" - ] - }, - "nullable": [] - }, - "hash": "16548daf69e9ff0528904be2e142254a457665179d9cf0a3c0b18c3fe09e4838" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-1849cfa3167eed2809e7724a63198f5e2450cc4faee2f80b37fbd5626324dbeb.json b/prover/crates/lib/prover_dal/.sqlx/query-1849cfa3167eed2809e7724a63198f5e2450cc4faee2f80b37fbd5626324dbeb.json deleted file mode 100644 index 38db4847ddde..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-1849cfa3167eed2809e7724a63198f5e2450cc4faee2f80b37fbd5626324dbeb.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n DELETE FROM gpu_prover_queue_fri\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [] - }, - "nullable": [] - }, - "hash": "1849cfa3167eed2809e7724a63198f5e2450cc4faee2f80b37fbd5626324dbeb" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-39f60c638d445c5dbf23e01fd89a468057599be1e6c6c96a947c33df53a68224.json b/prover/crates/lib/prover_dal/.sqlx/query-1902180f79ffb2f9903e16752d0a4dab579b76ea65ea022505a3f57fc0a4a946.json similarity index 67% rename from prover/crates/lib/prover_dal/.sqlx/query-39f60c638d445c5dbf23e01fd89a468057599be1e6c6c96a947c33df53a68224.json rename to prover/crates/lib/prover_dal/.sqlx/query-1902180f79ffb2f9903e16752d0a4dab579b76ea65ea022505a3f57fc0a4a946.json index 5cec4d7d7d03..86769e51db86 100644 --- a/prover/crates/lib/prover_dal/.sqlx/query-39f60c638d445c5dbf23e01fd89a468057599be1e6c6c96a947c33df53a68224.json +++ b/prover/crates/lib/prover_dal/.sqlx/query-1902180f79ffb2f9903e16752d0a4dab579b76ea65ea022505a3f57fc0a4a946.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n recursion_tip_witness_jobs_fri (\n l1_batch_number,\n status,\n number_of_final_node_jobs,\n created_at,\n updated_at\n )\n VALUES\n ($1, 'waiting_for_proofs',1, NOW(), NOW())\n ON CONFLICT (l1_batch_number) DO\n UPDATE\n SET status = $2\n ", + "query": "\n INSERT INTO\n recursion_tip_witness_jobs_fri (\n l1_batch_number,\n status,\n number_of_final_node_jobs,\n created_at,\n updated_at\n )\n VALUES\n ($1, 'waiting_for_proofs', 1, NOW(), NOW()) ON CONFLICT (l1_batch_number) DO\n UPDATE\n SET\n status = $2\n ", "describe": { "columns": [], "parameters": { @@ -11,5 +11,5 @@ }, "nullable": [] }, - "hash": "39f60c638d445c5dbf23e01fd89a468057599be1e6c6c96a947c33df53a68224" + "hash": "1902180f79ffb2f9903e16752d0a4dab579b76ea65ea022505a3f57fc0a4a946" } diff --git a/prover/crates/lib/prover_dal/.sqlx/query-1926cf432237684de2383179a6d0d001cdf5bc7ba988b742571ec90a938434e3.json b/prover/crates/lib/prover_dal/.sqlx/query-1926cf432237684de2383179a6d0d001cdf5bc7ba988b742571ec90a938434e3.json deleted file mode 100644 index 4015a22ff3fd..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-1926cf432237684de2383179a6d0d001cdf5bc7ba988b742571ec90a938434e3.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "UPDATE leaf_aggregation_witness_jobs_fri \n SET status = $1, attempts = $2\n WHERE l1_batch_number = $3\n AND circuit_id = $4", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Text", - "Int2", - "Int8", - "Int2" - ] - }, - "nullable": [] - }, - "hash": "1926cf432237684de2383179a6d0d001cdf5bc7ba988b742571ec90a938434e3" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-1dc6a926ada3f13ab6c2a6f3cc16054d3fb4f4a5c014ef24f5cb0ac4cd3465eb.json b/prover/crates/lib/prover_dal/.sqlx/query-1dc6a926ada3f13ab6c2a6f3cc16054d3fb4f4a5c014ef24f5cb0ac4cd3465eb.json new file mode 100644 index 000000000000..efb290e6a0f8 --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-1dc6a926ada3f13ab6c2a6f3cc16054d3fb4f4a5c014ef24f5cb0ac4cd3465eb.json @@ -0,0 +1,17 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE\n leaf_aggregation_witness_jobs_fri\n SET\n status = $1,\n attempts = $2\n WHERE\n l1_batch_number = $3\n AND circuit_id = $4\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Text", + "Int2", + "Int8", + "Int2" + ] + }, + "nullable": [] + }, + "hash": "1dc6a926ada3f13ab6c2a6f3cc16054d3fb4f4a5c014ef24f5cb0ac4cd3465eb" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-216d0c263539739b53975a96a10332b826708800a2f72f09bd7aea08cf724e1a.json b/prover/crates/lib/prover_dal/.sqlx/query-216d0c263539739b53975a96a10332b826708800a2f72f09bd7aea08cf724e1a.json deleted file mode 100644 index ec503eabee01..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-216d0c263539739b53975a96a10332b826708800a2f72f09bd7aea08cf724e1a.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE scheduler_witness_jobs_fri\n SET\n status = 'queued',\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n (\n status = 'in_progress'\n AND processing_started_at <= NOW() - $1::INTERVAL\n AND attempts < $2\n )\n OR (\n status = 'failed'\n AND attempts < $2\n )\n RETURNING\n l1_batch_number,\n status,\n attempts,\n error,\n picked_by\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "l1_batch_number", - "type_info": "Int8" - }, - { - "ordinal": 1, - "name": "status", - "type_info": "Text" - }, - { - "ordinal": 2, - "name": "attempts", - "type_info": "Int2" - }, - { - "ordinal": 3, - "name": "error", - "type_info": "Text" - }, - { - "ordinal": 4, - "name": "picked_by", - "type_info": "Text" - } - ], - "parameters": { - "Left": [ - "Interval", - "Int2" - ] - }, - "nullable": [ - false, - false, - false, - true, - true - ] - }, - "hash": "216d0c263539739b53975a96a10332b826708800a2f72f09bd7aea08cf724e1a" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-23fab2481b7e7a30d4f8299e267431e3e266c84e1ef03cf4015202dbb9f54174.json b/prover/crates/lib/prover_dal/.sqlx/query-23fab2481b7e7a30d4f8299e267431e3e266c84e1ef03cf4015202dbb9f54174.json new file mode 100644 index 000000000000..f49b76580cae --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-23fab2481b7e7a30d4f8299e267431e3e266c84e1ef03cf4015202dbb9f54174.json @@ -0,0 +1,22 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE\n scheduler_witness_jobs_fri\n SET\n status = 'queued'\n WHERE\n l1_batch_number IN (\n SELECT\n prover_jobs_fri.l1_batch_number\n FROM\n prover_jobs_fri\n JOIN scheduler_witness_jobs_fri swj ON prover_jobs_fri.l1_batch_number = swj.l1_batch_number\n WHERE\n swj.status = 'waiting_for_proofs'\n AND prover_jobs_fri.status = 'successful'\n AND prover_jobs_fri.aggregation_round = $1\n )\n RETURNING\n l1_batch_number;\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "l1_batch_number", + "type_info": "Int8" + } + ], + "parameters": { + "Left": [ + "Int2" + ] + }, + "nullable": [ + false + ] + }, + "hash": "23fab2481b7e7a30d4f8299e267431e3e266c84e1ef03cf4015202dbb9f54174" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-23fd65c2640e9fabaa625da83da09c2c60fd2b91d376b924ec0089a721a2a640.json b/prover/crates/lib/prover_dal/.sqlx/query-23fd65c2640e9fabaa625da83da09c2c60fd2b91d376b924ec0089a721a2a640.json new file mode 100644 index 000000000000..46f5135433ed --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-23fd65c2640e9fabaa625da83da09c2c60fd2b91d376b924ec0089a721a2a640.json @@ -0,0 +1,15 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE\n scheduler_witness_jobs_fri\n SET\n status = 'failed',\n error = $1,\n updated_at = NOW()\n WHERE\n l1_batch_number = $2\n AND status != 'successful'\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Text", + "Int8" + ] + }, + "nullable": [] + }, + "hash": "23fd65c2640e9fabaa625da83da09c2c60fd2b91d376b924ec0089a721a2a640" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-25f599ed134f5866dace386fc34d1b98aa902e56d35f55c0d7e2a983ce1bdd80.json b/prover/crates/lib/prover_dal/.sqlx/query-25f599ed134f5866dace386fc34d1b98aa902e56d35f55c0d7e2a983ce1bdd80.json new file mode 100644 index 000000000000..423e2b1a07e2 --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-25f599ed134f5866dace386fc34d1b98aa902e56d35f55c0d7e2a983ce1bdd80.json @@ -0,0 +1,53 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE\n prover_jobs_fri\n SET\n status = 'queued',\n error = 'Manually requeued',\n attempts = 2,\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n l1_batch_number = $1\n AND attempts >= $2\n AND (\n status = 'in_progress'\n OR status = 'failed'\n )\n RETURNING\n id,\n status,\n attempts,\n circuit_id,\n error,\n picked_by\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "id", + "type_info": "Int8" + }, + { + "ordinal": 1, + "name": "status", + "type_info": "Text" + }, + { + "ordinal": 2, + "name": "attempts", + "type_info": "Int2" + }, + { + "ordinal": 3, + "name": "circuit_id", + "type_info": "Int2" + }, + { + "ordinal": 4, + "name": "error", + "type_info": "Text" + }, + { + "ordinal": 5, + "name": "picked_by", + "type_info": "Text" + } + ], + "parameters": { + "Left": [ + "Int8", + "Int2" + ] + }, + "nullable": [ + false, + false, + false, + false, + true, + true + ] + }, + "hash": "25f599ed134f5866dace386fc34d1b98aa902e56d35f55c0d7e2a983ce1bdd80" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-2764de4edfb998bb498127b072574aac9fa17a424d1f5c673e78a2a023bc2205.json b/prover/crates/lib/prover_dal/.sqlx/query-2764de4edfb998bb498127b072574aac9fa17a424d1f5c673e78a2a023bc2205.json new file mode 100644 index 000000000000..5729440831bb --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-2764de4edfb998bb498127b072574aac9fa17a424d1f5c673e78a2a023bc2205.json @@ -0,0 +1,15 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE\n leaf_aggregation_witness_jobs_fri\n SET\n status = 'successful',\n updated_at = NOW(),\n time_taken = $1\n WHERE\n id = $2\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Time", + "Int8" + ] + }, + "nullable": [] + }, + "hash": "2764de4edfb998bb498127b072574aac9fa17a424d1f5c673e78a2a023bc2205" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-28397b5a0b7af832d2a4d3d7011a68a48db6a64afcd41bbe0e17d98fa38fdb19.json b/prover/crates/lib/prover_dal/.sqlx/query-28397b5a0b7af832d2a4d3d7011a68a48db6a64afcd41bbe0e17d98fa38fdb19.json deleted file mode 100644 index d6e77daaa927..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-28397b5a0b7af832d2a4d3d7011a68a48db6a64afcd41bbe0e17d98fa38fdb19.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE scheduler_witness_jobs_fri\n SET\n status = 'queued'\n WHERE\n l1_batch_number IN (\n SELECT\n prover_jobs_fri.l1_batch_number\n FROM\n prover_jobs_fri\n JOIN scheduler_witness_jobs_fri swj ON prover_jobs_fri.l1_batch_number = swj.l1_batch_number\n WHERE\n swj.status = 'waiting_for_proofs'\n AND prover_jobs_fri.status = 'successful'\n AND prover_jobs_fri.aggregation_round = $1\n )\n RETURNING\n l1_batch_number;\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "l1_batch_number", - "type_info": "Int8" - } - ], - "parameters": { - "Left": [ - "Int2" - ] - }, - "nullable": [ - false - ] - }, - "hash": "28397b5a0b7af832d2a4d3d7011a68a48db6a64afcd41bbe0e17d98fa38fdb19" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-97adb49780c9edde6a3cfda09dadbd694e1781e013247d090a280a1f894de464.json b/prover/crates/lib/prover_dal/.sqlx/query-29f7a564a8373f7e44840e8e9e7d0cd5c6b1122c35d7ffdbbba30327ca3fb5a8.json similarity index 53% rename from prover/crates/lib/prover_dal/.sqlx/query-97adb49780c9edde6a3cfda09dadbd694e1781e013247d090a280a1f894de464.json rename to prover/crates/lib/prover_dal/.sqlx/query-29f7a564a8373f7e44840e8e9e7d0cd5c6b1122c35d7ffdbbba30327ca3fb5a8.json index ce9e492a7d4a..05163dcfa2e6 100644 --- a/prover/crates/lib/prover_dal/.sqlx/query-97adb49780c9edde6a3cfda09dadbd694e1781e013247d090a280a1f894de464.json +++ b/prover/crates/lib/prover_dal/.sqlx/query-29f7a564a8373f7e44840e8e9e7d0cd5c6b1122c35d7ffdbbba30327ca3fb5a8.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT\n protocol_version AS \"protocol_version!\",\n protocol_version_patch AS \"protocol_version_patch!\",\n COUNT(*) FILTER (WHERE status = 'queued') as queued,\n COUNT(*) FILTER (WHERE status = 'in_progress') as in_progress\n FROM\n prover_jobs_fri\n WHERE\n status IN ('queued', 'in_progress')\n AND protocol_version IS NOT NULL\n GROUP BY\n protocol_version,\n protocol_version_patch\n ", + "query": "\n SELECT\n protocol_version AS \"protocol_version!\",\n protocol_version_patch AS \"protocol_version_patch!\",\n COUNT(*) FILTER (\n WHERE\n status = 'queued'\n ) AS queued,\n COUNT(*) FILTER (\n WHERE\n status = 'in_progress'\n ) AS in_progress\n FROM\n prover_jobs_fri\n WHERE\n status IN ('queued', 'in_progress')\n AND protocol_version IS NOT NULL\n GROUP BY\n protocol_version,\n protocol_version_patch\n ", "describe": { "columns": [ { @@ -34,5 +34,5 @@ null ] }, - "hash": "97adb49780c9edde6a3cfda09dadbd694e1781e013247d090a280a1f894de464" + "hash": "29f7a564a8373f7e44840e8e9e7d0cd5c6b1122c35d7ffdbbba30327ca3fb5a8" } diff --git a/prover/crates/lib/prover_dal/.sqlx/query-2b9d06b673ac6bbc908227eff0ff19ec63114a652fdebce5a872a8eb694626fe.json b/prover/crates/lib/prover_dal/.sqlx/query-2b9d06b673ac6bbc908227eff0ff19ec63114a652fdebce5a872a8eb694626fe.json new file mode 100644 index 000000000000..90486fd90138 --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-2b9d06b673ac6bbc908227eff0ff19ec63114a652fdebce5a872a8eb694626fe.json @@ -0,0 +1,47 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE\n recursion_tip_witness_jobs_fri\n SET\n status = 'queued',\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n (\n status = 'in_progress'\n AND processing_started_at <= NOW() - $1 :: INTERVAL\n AND attempts < $2\n )\n OR (\n status = 'failed'\n AND attempts < $2\n )\n RETURNING\n l1_batch_number,\n status,\n attempts,\n error,\n picked_by\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "l1_batch_number", + "type_info": "Int8" + }, + { + "ordinal": 1, + "name": "status", + "type_info": "Text" + }, + { + "ordinal": 2, + "name": "attempts", + "type_info": "Int2" + }, + { + "ordinal": 3, + "name": "error", + "type_info": "Text" + }, + { + "ordinal": 4, + "name": "picked_by", + "type_info": "Text" + } + ], + "parameters": { + "Left": [ + "Interval", + "Int2" + ] + }, + "nullable": [ + false, + false, + false, + true, + true + ] + }, + "hash": "2b9d06b673ac6bbc908227eff0ff19ec63114a652fdebce5a872a8eb694626fe" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-2df88abaae97b6f916b104375bd7249ec09c0daf4368021788207370213a6d94.json b/prover/crates/lib/prover_dal/.sqlx/query-2df88abaae97b6f916b104375bd7249ec09c0daf4368021788207370213a6d94.json deleted file mode 100644 index 967f02586d7b..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-2df88abaae97b6f916b104375bd7249ec09c0daf4368021788207370213a6d94.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n DELETE FROM proof_compression_jobs_fri\n WHERE\n l1_batch_number = $1\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8" - ] - }, - "nullable": [] - }, - "hash": "2df88abaae97b6f916b104375bd7249ec09c0daf4368021788207370213a6d94" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-2e6e2b68efc28114f44616b68fcf1d4d9a4b83a8b42846d8373ea13b96d612cf.json b/prover/crates/lib/prover_dal/.sqlx/query-2e6e2b68efc28114f44616b68fcf1d4d9a4b83a8b42846d8373ea13b96d612cf.json deleted file mode 100644 index 41428e91feeb..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-2e6e2b68efc28114f44616b68fcf1d4d9a4b83a8b42846d8373ea13b96d612cf.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n gpu_prover_queue_fri (\n instance_host,\n instance_port,\n instance_status,\n specialized_prover_group_id,\n zone,\n created_at,\n updated_at,\n protocol_version,\n protocol_version_patch\n )\n VALUES\n (CAST($1::TEXT AS inet), $2, 'available', $3, $4, NOW(), NOW(), $5, $6)\n ON CONFLICT (instance_host, instance_port, zone) DO\n UPDATE\n SET\n instance_status = 'available',\n specialized_prover_group_id = $3,\n zone = $4,\n updated_at = NOW(),\n protocol_version = $5,\n protocol_version_patch = $6\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Text", - "Int4", - "Int2", - "Text", - "Int4", - "Int4" - ] - }, - "nullable": [] - }, - "hash": "2e6e2b68efc28114f44616b68fcf1d4d9a4b83a8b42846d8373ea13b96d612cf" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-3bb8fbd9e83703887e0a3c196031b931c0d8dbc6835dfac20107ea7412ce9fbb.json b/prover/crates/lib/prover_dal/.sqlx/query-34dfb800784c52812cdeb5ecbf08bea9465ef0f5732df44d1d50f792d5a4aef5.json similarity index 64% rename from prover/crates/lib/prover_dal/.sqlx/query-3bb8fbd9e83703887e0a3c196031b931c0d8dbc6835dfac20107ea7412ce9fbb.json rename to prover/crates/lib/prover_dal/.sqlx/query-34dfb800784c52812cdeb5ecbf08bea9465ef0f5732df44d1d50f792d5a4aef5.json index 693905084151..04b6fc17c091 100644 --- a/prover/crates/lib/prover_dal/.sqlx/query-3bb8fbd9e83703887e0a3c196031b931c0d8dbc6835dfac20107ea7412ce9fbb.json +++ b/prover/crates/lib/prover_dal/.sqlx/query-34dfb800784c52812cdeb5ecbf08bea9465ef0f5732df44d1d50f792d5a4aef5.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n proof_compression_jobs_fri (\n l1_batch_number,\n status,\n created_at,\n updated_at\n )\n VALUES\n ($1, $2, NOW(), NOW())\n ON CONFLICT (l1_batch_number) DO\n UPDATE\n SET status = $2\n ", + "query": "\n INSERT INTO\n proof_compression_jobs_fri (\n l1_batch_number,\n status,\n created_at,\n updated_at\n )\n VALUES\n ($1, $2, NOW(), NOW()) ON CONFLICT (l1_batch_number) DO\n UPDATE\n SET\n status = $2\n ", "describe": { "columns": [], "parameters": { @@ -11,5 +11,5 @@ }, "nullable": [] }, - "hash": "3bb8fbd9e83703887e0a3c196031b931c0d8dbc6835dfac20107ea7412ce9fbb" + "hash": "34dfb800784c52812cdeb5ecbf08bea9465ef0f5732df44d1d50f792d5a4aef5" } diff --git a/prover/crates/lib/prover_dal/.sqlx/query-36ab4be452fab7229a4b1c03675ec0b54094da72d2d9de5e3948001164bf739c.json b/prover/crates/lib/prover_dal/.sqlx/query-36ab4be452fab7229a4b1c03675ec0b54094da72d2d9de5e3948001164bf739c.json new file mode 100644 index 000000000000..4f63ae1444cf --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-36ab4be452fab7229a4b1c03675ec0b54094da72d2d9de5e3948001164bf739c.json @@ -0,0 +1,18 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE\n node_aggregation_witness_jobs_fri\n SET\n aggregations_url = $1,\n number_of_dependent_jobs = $5,\n updated_at = NOW()\n WHERE\n l1_batch_number = $2\n AND circuit_id = $3\n AND depth = $4\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Text", + "Int8", + "Int2", + "Int4", + "Int4" + ] + }, + "nullable": [] + }, + "hash": "36ab4be452fab7229a4b1c03675ec0b54094da72d2d9de5e3948001164bf739c" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-37030583321ef93fed35f88576639c62de28c585158497d9d1984fdc762f1440.json b/prover/crates/lib/prover_dal/.sqlx/query-37030583321ef93fed35f88576639c62de28c585158497d9d1984fdc762f1440.json new file mode 100644 index 000000000000..8c6ade6b3608 --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-37030583321ef93fed35f88576639c62de28c585158497d9d1984fdc762f1440.json @@ -0,0 +1,15 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE\n witness_inputs_fri\n SET\n status = 'failed',\n error = $1,\n updated_at = NOW()\n WHERE\n l1_batch_number = $2\n AND status != 'successful'\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Text", + "Int8" + ] + }, + "nullable": [] + }, + "hash": "37030583321ef93fed35f88576639c62de28c585158497d9d1984fdc762f1440" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-3941da180ee62a7c5d4e392ff4fe2d3a6ebb3657862b91e3ece34119f098fc2d.json b/prover/crates/lib/prover_dal/.sqlx/query-3941da180ee62a7c5d4e392ff4fe2d3a6ebb3657862b91e3ece34119f098fc2d.json deleted file mode 100644 index d0dd5f6976b5..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-3941da180ee62a7c5d4e392ff4fe2d3a6ebb3657862b91e3ece34119f098fc2d.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE node_aggregation_witness_jobs_fri\n SET\n status = 'queued'\n WHERE\n (l1_batch_number, circuit_id, depth) IN (\n SELECT\n prover_jobs_fri.l1_batch_number,\n prover_jobs_fri.circuit_id,\n prover_jobs_fri.depth\n FROM\n prover_jobs_fri\n JOIN node_aggregation_witness_jobs_fri nawj ON prover_jobs_fri.l1_batch_number = nawj.l1_batch_number\n AND prover_jobs_fri.circuit_id = nawj.circuit_id\n AND prover_jobs_fri.depth = nawj.depth\n WHERE\n nawj.status = 'waiting_for_proofs'\n AND prover_jobs_fri.status = 'successful'\n AND prover_jobs_fri.aggregation_round = 2\n GROUP BY\n prover_jobs_fri.l1_batch_number,\n prover_jobs_fri.circuit_id,\n prover_jobs_fri.depth,\n nawj.number_of_dependent_jobs\n HAVING\n COUNT(*) = nawj.number_of_dependent_jobs\n )\n RETURNING\n l1_batch_number,\n circuit_id,\n depth;\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "l1_batch_number", - "type_info": "Int8" - }, - { - "ordinal": 1, - "name": "circuit_id", - "type_info": "Int2" - }, - { - "ordinal": 2, - "name": "depth", - "type_info": "Int4" - } - ], - "parameters": { - "Left": [] - }, - "nullable": [ - false, - false, - false - ] - }, - "hash": "3941da180ee62a7c5d4e392ff4fe2d3a6ebb3657862b91e3ece34119f098fc2d" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-3df3c567f7f875cde9ea8c723b1fe6ee0c0c54e68daabbe2eab5c7ce9b1cd4bc.json b/prover/crates/lib/prover_dal/.sqlx/query-3df3c567f7f875cde9ea8c723b1fe6ee0c0c54e68daabbe2eab5c7ce9b1cd4bc.json new file mode 100644 index 000000000000..04f7fe256bc0 --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-3df3c567f7f875cde9ea8c723b1fe6ee0c0c54e68daabbe2eab5c7ce9b1cd4bc.json @@ -0,0 +1,60 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE\n prover_jobs_fri\n SET\n status = 'in_progress',\n attempts = attempts + 1,\n updated_at = NOW(),\n processing_started_at = NOW(),\n picked_by = $3\n WHERE\n id = (\n SELECT\n id\n FROM\n prover_jobs_fri\n WHERE\n status = 'queued'\n AND protocol_version = $1\n AND protocol_version_patch = $2\n ORDER BY\n l1_batch_number ASC,\n aggregation_round ASC,\n circuit_id ASC,\n id ASC\n LIMIT\n 1 FOR\n UPDATE\n SKIP LOCKED\n )\n RETURNING\n prover_jobs_fri.id,\n prover_jobs_fri.l1_batch_number,\n prover_jobs_fri.circuit_id,\n prover_jobs_fri.aggregation_round,\n prover_jobs_fri.sequence_number,\n prover_jobs_fri.depth,\n prover_jobs_fri.is_node_final_proof\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "id", + "type_info": "Int8" + }, + { + "ordinal": 1, + "name": "l1_batch_number", + "type_info": "Int8" + }, + { + "ordinal": 2, + "name": "circuit_id", + "type_info": "Int2" + }, + { + "ordinal": 3, + "name": "aggregation_round", + "type_info": "Int2" + }, + { + "ordinal": 4, + "name": "sequence_number", + "type_info": "Int4" + }, + { + "ordinal": 5, + "name": "depth", + "type_info": "Int4" + }, + { + "ordinal": 6, + "name": "is_node_final_proof", + "type_info": "Bool" + } + ], + "parameters": { + "Left": [ + "Int4", + "Int4", + "Text" + ] + }, + "nullable": [ + false, + false, + false, + false, + false, + false, + false + ] + }, + "hash": "3df3c567f7f875cde9ea8c723b1fe6ee0c0c54e68daabbe2eab5c7ce9b1cd4bc" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-3e0a1ebc684810c09ff83784bdd0ad195b0dd2a8ce56b1a9eb531103130b5e3e.json b/prover/crates/lib/prover_dal/.sqlx/query-3e0a1ebc684810c09ff83784bdd0ad195b0dd2a8ce56b1a9eb531103130b5e3e.json deleted file mode 100644 index 7646c87b847e..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-3e0a1ebc684810c09ff83784bdd0ad195b0dd2a8ce56b1a9eb531103130b5e3e.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE prover_jobs_fri\n SET\n status = 'in_progress',\n attempts = attempts + 1,\n processing_started_at = NOW(),\n updated_at = NOW(),\n picked_by = $5\n WHERE\n id = (\n SELECT\n pj.id\n FROM\n (\n SELECT\n *\n FROM\n UNNEST($1::SMALLINT[], $2::SMALLINT[])\n ) AS tuple (circuit_id, ROUND)\n JOIN LATERAL (\n SELECT\n *\n FROM\n prover_jobs_fri AS pj\n WHERE\n pj.status = 'queued'\n AND pj.protocol_version = $3\n AND pj.protocol_version_patch = $4\n AND pj.circuit_id = tuple.circuit_id\n AND pj.aggregation_round = tuple.round\n ORDER BY\n pj.l1_batch_number ASC,\n pj.id ASC\n LIMIT\n 1\n ) AS pj ON TRUE\n ORDER BY\n pj.l1_batch_number ASC,\n pj.aggregation_round DESC,\n pj.id ASC\n LIMIT\n 1\n FOR UPDATE\n SKIP LOCKED\n )\n RETURNING\n prover_jobs_fri.id,\n prover_jobs_fri.l1_batch_number,\n prover_jobs_fri.circuit_id,\n prover_jobs_fri.aggregation_round,\n prover_jobs_fri.sequence_number,\n prover_jobs_fri.depth,\n prover_jobs_fri.is_node_final_proof\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "id", - "type_info": "Int8" - }, - { - "ordinal": 1, - "name": "l1_batch_number", - "type_info": "Int8" - }, - { - "ordinal": 2, - "name": "circuit_id", - "type_info": "Int2" - }, - { - "ordinal": 3, - "name": "aggregation_round", - "type_info": "Int2" - }, - { - "ordinal": 4, - "name": "sequence_number", - "type_info": "Int4" - }, - { - "ordinal": 5, - "name": "depth", - "type_info": "Int4" - }, - { - "ordinal": 6, - "name": "is_node_final_proof", - "type_info": "Bool" - } - ], - "parameters": { - "Left": [ - "Int2Array", - "Int2Array", - "Int4", - "Int4", - "Text" - ] - }, - "nullable": [ - false, - false, - false, - false, - false, - false, - false - ] - }, - "hash": "3e0a1ebc684810c09ff83784bdd0ad195b0dd2a8ce56b1a9eb531103130b5e3e" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-3ec365c5c81f4678a905ae5bbd48b87ead36f593488437c6f67da629ca81e4fa.json b/prover/crates/lib/prover_dal/.sqlx/query-3ec365c5c81f4678a905ae5bbd48b87ead36f593488437c6f67da629ca81e4fa.json deleted file mode 100644 index 5815e65636cb..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-3ec365c5c81f4678a905ae5bbd48b87ead36f593488437c6f67da629ca81e4fa.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE scheduler_witness_jobs_fri\n SET\n status = 'queued'\n WHERE\n l1_batch_number = $1\n AND status != 'successful'\n AND status != 'in_progress'\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8" - ] - }, - "nullable": [] - }, - "hash": "3ec365c5c81f4678a905ae5bbd48b87ead36f593488437c6f67da629ca81e4fa" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-3fc24886802a354174796071f46aa0a0ad5fba0f6dbc4d8f36c79171a8be8f42.json b/prover/crates/lib/prover_dal/.sqlx/query-3fc24886802a354174796071f46aa0a0ad5fba0f6dbc4d8f36c79171a8be8f42.json new file mode 100644 index 000000000000..71456c7912e2 --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-3fc24886802a354174796071f46aa0a0ad5fba0f6dbc4d8f36c79171a8be8f42.json @@ -0,0 +1,17 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE\n gpu_prover_queue_fri\n SET\n instance_status = $1,\n updated_at = NOW()\n WHERE\n instance_host = $2 :: TEXT :: inet\n AND instance_port = $3\n AND zone = $4\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Text", + "Text", + "Int4", + "Text" + ] + }, + "nullable": [] + }, + "hash": "3fc24886802a354174796071f46aa0a0ad5fba0f6dbc4d8f36c79171a8be8f42" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-40e3b4646af1abe9c7b56206d73091e0d7c5ada67cb757b874a5c62e32184666.json b/prover/crates/lib/prover_dal/.sqlx/query-40e3b4646af1abe9c7b56206d73091e0d7c5ada67cb757b874a5c62e32184666.json new file mode 100644 index 000000000000..95c3539e6f41 --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-40e3b4646af1abe9c7b56206d73091e0d7c5ada67cb757b874a5c62e32184666.json @@ -0,0 +1,15 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE\n recursion_tip_witness_jobs_fri\n SET\n status = 'successful',\n updated_at = NOW(),\n time_taken = $1\n WHERE\n l1_batch_number = $2\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Time", + "Int8" + ] + }, + "nullable": [] + }, + "hash": "40e3b4646af1abe9c7b56206d73091e0d7c5ada67cb757b874a5c62e32184666" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-412ef600a2f6025d8c22c2df8a497ed410fa47b268a66f1fc56d469c06ae50af.json b/prover/crates/lib/prover_dal/.sqlx/query-412ef600a2f6025d8c22c2df8a497ed410fa47b268a66f1fc56d469c06ae50af.json deleted file mode 100644 index f4d5f62a2615..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-412ef600a2f6025d8c22c2df8a497ed410fa47b268a66f1fc56d469c06ae50af.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n DELETE FROM prover_fri_protocol_versions\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [] - }, - "nullable": [] - }, - "hash": "412ef600a2f6025d8c22c2df8a497ed410fa47b268a66f1fc56d469c06ae50af" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-41af30620f8a1f20b8a6c46be162601d35fd2881ac1fd070f0f1a8add4bc388d.json b/prover/crates/lib/prover_dal/.sqlx/query-41af30620f8a1f20b8a6c46be162601d35fd2881ac1fd070f0f1a8add4bc388d.json deleted file mode 100644 index b65633a904e3..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-41af30620f8a1f20b8a6c46be162601d35fd2881ac1fd070f0f1a8add4bc388d.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE recursion_tip_witness_jobs_fri\n SET\n status = 'in_progress',\n attempts = attempts + 1,\n updated_at = NOW(),\n processing_started_at = NOW(),\n picked_by = $3\n WHERE\n l1_batch_number = (\n SELECT\n l1_batch_number\n FROM\n recursion_tip_witness_jobs_fri\n WHERE\n status = 'queued'\n AND protocol_version = $1\n AND protocol_version_patch = $2\n ORDER BY\n l1_batch_number ASC\n LIMIT\n 1\n FOR UPDATE\n SKIP LOCKED\n )\n RETURNING\n recursion_tip_witness_jobs_fri.l1_batch_number,\n recursion_tip_witness_jobs_fri.number_of_final_node_jobs\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "l1_batch_number", - "type_info": "Int8" - }, - { - "ordinal": 1, - "name": "number_of_final_node_jobs", - "type_info": "Int4" - } - ], - "parameters": { - "Left": [ - "Int4", - "Int4", - "Text" - ] - }, - "nullable": [ - false, - false - ] - }, - "hash": "41af30620f8a1f20b8a6c46be162601d35fd2881ac1fd070f0f1a8add4bc388d" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-434f7cb51a7d22948cd26e962679a67936d572f8046d3a1c7a4f100ff209d81d.json b/prover/crates/lib/prover_dal/.sqlx/query-434f7cb51a7d22948cd26e962679a67936d572f8046d3a1c7a4f100ff209d81d.json deleted file mode 100644 index 7615523f92f1..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-434f7cb51a7d22948cd26e962679a67936d572f8046d3a1c7a4f100ff209d81d.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "UPDATE prover_jobs_fri SET status = $1\n WHERE l1_batch_number = $2\n AND sequence_number = $3\n AND aggregation_round = $4\n AND circuit_id = $5", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Text", - "Int8", - "Int4", - "Int2", - "Int2" - ] - }, - "nullable": [] - }, - "hash": "434f7cb51a7d22948cd26e962679a67936d572f8046d3a1c7a4f100ff209d81d" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-28f03acf565c4b50fe86f606c18a8b699386b3c5b4e02d5ce046f0f2e0ddc388.json b/prover/crates/lib/prover_dal/.sqlx/query-459705905af1c2928704ffb5dbc07d91e2cbbcb7ce02bfa14913d76cb946a57e.json similarity index 59% rename from prover/crates/lib/prover_dal/.sqlx/query-28f03acf565c4b50fe86f606c18a8b699386b3c5b4e02d5ce046f0f2e0ddc388.json rename to prover/crates/lib/prover_dal/.sqlx/query-459705905af1c2928704ffb5dbc07d91e2cbbcb7ce02bfa14913d76cb946a57e.json index 89e159989ae6..97952d1aaa0e 100644 --- a/prover/crates/lib/prover_dal/.sqlx/query-28f03acf565c4b50fe86f606c18a8b699386b3c5b4e02d5ce046f0f2e0ddc388.json +++ b/prover/crates/lib/prover_dal/.sqlx/query-459705905af1c2928704ffb5dbc07d91e2cbbcb7ce02bfa14913d76cb946a57e.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n UPDATE scheduler_witness_jobs_fri\n SET\n status = 'in_progress',\n attempts = attempts + 1,\n updated_at = NOW(),\n processing_started_at = NOW(),\n picked_by = $2\n WHERE\n l1_batch_number = (\n SELECT\n l1_batch_number\n FROM\n scheduler_witness_jobs_fri\n WHERE\n status = 'queued'\n AND protocol_version = $1\n AND protocol_version_patch = $3\n ORDER BY\n l1_batch_number ASC\n LIMIT\n 1\n FOR UPDATE\n SKIP LOCKED\n )\n RETURNING\n scheduler_witness_jobs_fri.*\n ", + "query": "\n UPDATE\n scheduler_witness_jobs_fri\n SET\n status = 'in_progress',\n attempts = attempts + 1,\n updated_at = NOW(),\n processing_started_at = NOW(),\n picked_by = $2\n WHERE\n l1_batch_number = (\n SELECT\n l1_batch_number\n FROM\n scheduler_witness_jobs_fri\n WHERE\n status = 'queued'\n AND protocol_version = $1\n AND protocol_version_patch = $3\n ORDER BY\n l1_batch_number ASC\n LIMIT\n 1 FOR\n UPDATE\n SKIP LOCKED\n )\n RETURNING\n scheduler_witness_jobs_fri.*\n ", "describe": { "columns": [ { @@ -86,5 +86,5 @@ false ] }, - "hash": "28f03acf565c4b50fe86f606c18a8b699386b3c5b4e02d5ce046f0f2e0ddc388" + "hash": "459705905af1c2928704ffb5dbc07d91e2cbbcb7ce02bfa14913d76cb946a57e" } diff --git a/prover/crates/lib/prover_dal/.sqlx/query-46c4696fff5a4b8cc5cb46b05645da82065836fe17687ffad04126a6a8b2b27c.json b/prover/crates/lib/prover_dal/.sqlx/query-46c4696fff5a4b8cc5cb46b05645da82065836fe17687ffad04126a6a8b2b27c.json deleted file mode 100644 index 5ebb1951966d..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-46c4696fff5a4b8cc5cb46b05645da82065836fe17687ffad04126a6a8b2b27c.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE leaf_aggregation_witness_jobs_fri\n SET\n status = 'successful',\n updated_at = NOW(),\n time_taken = $1\n WHERE\n id = $2\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Time", - "Int8" - ] - }, - "nullable": [] - }, - "hash": "46c4696fff5a4b8cc5cb46b05645da82065836fe17687ffad04126a6a8b2b27c" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-c19fc4c8e4b3a3ef4f9c0f4c22ed68c598eada8e60938a8e4b5cd32b53f5a574.json b/prover/crates/lib/prover_dal/.sqlx/query-4836d3766c6d31566a66ffb2b81874ec8fc1800b848951cf264b3f309701c52f.json similarity index 51% rename from prover/crates/lib/prover_dal/.sqlx/query-c19fc4c8e4b3a3ef4f9c0f4c22ed68c598eada8e60938a8e4b5cd32b53f5a574.json rename to prover/crates/lib/prover_dal/.sqlx/query-4836d3766c6d31566a66ffb2b81874ec8fc1800b848951cf264b3f309701c52f.json index 3c4c8d7a29f3..d8988ce8850b 100644 --- a/prover/crates/lib/prover_dal/.sqlx/query-c19fc4c8e4b3a3ef4f9c0f4c22ed68c598eada8e60938a8e4b5cd32b53f5a574.json +++ b/prover/crates/lib/prover_dal/.sqlx/query-4836d3766c6d31566a66ffb2b81874ec8fc1800b848951cf264b3f309701c52f.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n UPDATE recursion_tip_witness_jobs_fri\n SET\n status = 'queued',\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n l1_batch_number = $1\n AND attempts >= $2\n AND (status = 'in_progress' OR status = 'failed')\n RETURNING\n l1_batch_number,\n status,\n attempts,\n error,\n picked_by\n ", + "query": "\n UPDATE\n scheduler_witness_jobs_fri\n SET\n status = 'queued',\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n l1_batch_number = $1\n AND attempts >= $2\n AND (\n status = 'in_progress'\n OR status = 'failed'\n )\n RETURNING\n l1_batch_number,\n status,\n attempts,\n error,\n picked_by\n ", "describe": { "columns": [ { @@ -43,5 +43,5 @@ true ] }, - "hash": "c19fc4c8e4b3a3ef4f9c0f4c22ed68c598eada8e60938a8e4b5cd32b53f5a574" + "hash": "4836d3766c6d31566a66ffb2b81874ec8fc1800b848951cf264b3f309701c52f" } diff --git a/prover/crates/lib/prover_dal/.sqlx/query-4931bdce191a7d30d2887bb069b0ee050f09ae3886243c9af0677ad20e115a01.json b/prover/crates/lib/prover_dal/.sqlx/query-4931bdce191a7d30d2887bb069b0ee050f09ae3886243c9af0677ad20e115a01.json new file mode 100644 index 000000000000..2e6e5db6e8d6 --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-4931bdce191a7d30d2887bb069b0ee050f09ae3886243c9af0677ad20e115a01.json @@ -0,0 +1,15 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE\n node_aggregation_witness_jobs_fri\n SET\n status = 'successful',\n updated_at = NOW(),\n time_taken = $1\n WHERE\n id = $2\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Time", + "Int8" + ] + }, + "nullable": [] + }, + "hash": "4931bdce191a7d30d2887bb069b0ee050f09ae3886243c9af0677ad20e115a01" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-0a1ec4690d6b4a67d6ad16badcbf113a19feb73c4cf9876855523499998b99c0.json b/prover/crates/lib/prover_dal/.sqlx/query-4e851913270d32a72ebf654b8b7ba420c278e5771858d9de8d08a23e1fda97f5.json similarity index 56% rename from prover/crates/lib/prover_dal/.sqlx/query-0a1ec4690d6b4a67d6ad16badcbf113a19feb73c4cf9876855523499998b99c0.json rename to prover/crates/lib/prover_dal/.sqlx/query-4e851913270d32a72ebf654b8b7ba420c278e5771858d9de8d08a23e1fda97f5.json index b05230e1be44..b8647c2631b5 100644 --- a/prover/crates/lib/prover_dal/.sqlx/query-0a1ec4690d6b4a67d6ad16badcbf113a19feb73c4cf9876855523499998b99c0.json +++ b/prover/crates/lib/prover_dal/.sqlx/query-4e851913270d32a72ebf654b8b7ba420c278e5771858d9de8d08a23e1fda97f5.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n leaf_aggregation_witness_jobs_fri (\n l1_batch_number,\n circuit_id,\n closed_form_inputs_blob_url,\n number_of_basic_circuits,\n protocol_version,\n status,\n created_at,\n updated_at,\n protocol_version_patch\n )\n VALUES\n ($1, $2, $3, $4, $5, 'waiting_for_proofs', NOW(), NOW(), $6)\n ON CONFLICT (l1_batch_number, circuit_id) DO\n UPDATE\n SET\n updated_at = NOW()\n ", + "query": "\n INSERT INTO\n leaf_aggregation_witness_jobs_fri (\n l1_batch_number,\n circuit_id,\n closed_form_inputs_blob_url,\n number_of_basic_circuits,\n protocol_version,\n status,\n created_at,\n updated_at,\n protocol_version_patch\n )\n VALUES\n (\n $1,\n $2,\n $3,\n $4,\n $5,\n 'waiting_for_proofs',\n NOW(),\n NOW(),\n $6\n ) ON CONFLICT (l1_batch_number, circuit_id) DO\n UPDATE\n SET\n updated_at = NOW()\n ", "describe": { "columns": [], "parameters": { @@ -15,5 +15,5 @@ }, "nullable": [] }, - "hash": "0a1ec4690d6b4a67d6ad16badcbf113a19feb73c4cf9876855523499998b99c0" + "hash": "4e851913270d32a72ebf654b8b7ba420c278e5771858d9de8d08a23e1fda97f5" } diff --git a/prover/crates/lib/prover_dal/.sqlx/query-2dc6b7bf08cced8791354fc47e319d03f894f40d2ec528382b5643c3d51ec8e7.json b/prover/crates/lib/prover_dal/.sqlx/query-4e8ddaf3e4411bfcef4f353b4b310fc6b60b9a522b1a3134752c2ccca06f08cd.json similarity index 53% rename from prover/crates/lib/prover_dal/.sqlx/query-2dc6b7bf08cced8791354fc47e319d03f894f40d2ec528382b5643c3d51ec8e7.json rename to prover/crates/lib/prover_dal/.sqlx/query-4e8ddaf3e4411bfcef4f353b4b310fc6b60b9a522b1a3134752c2ccca06f08cd.json index 0ad6413e1ec1..d19c09fb3772 100644 --- a/prover/crates/lib/prover_dal/.sqlx/query-2dc6b7bf08cced8791354fc47e319d03f894f40d2ec528382b5643c3d51ec8e7.json +++ b/prover/crates/lib/prover_dal/.sqlx/query-4e8ddaf3e4411bfcef4f353b4b310fc6b60b9a522b1a3134752c2ccca06f08cd.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n UPDATE gpu_prover_queue_fri\n SET\n instance_status = 'reserved',\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n id IN (\n SELECT\n id\n FROM\n gpu_prover_queue_fri\n WHERE\n specialized_prover_group_id = $2\n AND zone = $3\n AND protocol_version = $4\n AND protocol_version_patch = $5\n AND (\n instance_status = 'available'\n OR (\n instance_status = 'reserved'\n AND processing_started_at < NOW() - $1::INTERVAL\n )\n )\n ORDER BY\n updated_at ASC\n LIMIT\n 1\n FOR UPDATE\n SKIP LOCKED\n )\n RETURNING\n gpu_prover_queue_fri.*\n ", + "query": "\n UPDATE\n gpu_prover_queue_fri\n SET\n instance_status = 'reserved',\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n id IN (\n SELECT\n id\n FROM\n gpu_prover_queue_fri\n WHERE\n specialized_prover_group_id = $2\n AND zone = $3\n AND protocol_version = $4\n AND protocol_version_patch = $5\n AND (\n instance_status = 'available'\n OR (\n instance_status = 'reserved'\n AND processing_started_at < NOW() - $1 :: INTERVAL\n )\n )\n ORDER BY\n updated_at ASC\n LIMIT\n 1 FOR\n UPDATE\n SKIP LOCKED\n )\n RETURNING\n gpu_prover_queue_fri.*\n ", "describe": { "columns": [ { @@ -82,5 +82,5 @@ false ] }, - "hash": "2dc6b7bf08cced8791354fc47e319d03f894f40d2ec528382b5643c3d51ec8e7" + "hash": "4e8ddaf3e4411bfcef4f353b4b310fc6b60b9a522b1a3134752c2ccca06f08cd" } diff --git a/prover/crates/lib/prover_dal/.sqlx/query-51ec4739f25b233efe6c2d67620b25b709ba99059f4a2f5e1bc5fd17f27c1244.json b/prover/crates/lib/prover_dal/.sqlx/query-51ec4739f25b233efe6c2d67620b25b709ba99059f4a2f5e1bc5fd17f27c1244.json new file mode 100644 index 000000000000..833457fbbd67 --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-51ec4739f25b233efe6c2d67620b25b709ba99059f4a2f5e1bc5fd17f27c1244.json @@ -0,0 +1,12 @@ +{ + "db_name": "PostgreSQL", + "query": "\n DELETE FROM\n prover_fri_protocol_versions\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [] + }, + "nullable": [] + }, + "hash": "51ec4739f25b233efe6c2d67620b25b709ba99059f4a2f5e1bc5fd17f27c1244" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-d272c91f1209c277189a31c59ee191a43dc8eafc33ee067bd41e20f25f7625f0.json b/prover/crates/lib/prover_dal/.sqlx/query-5207488b5e71395b700fb0f0ba8117729a81f999c81701c148a4d85f413f6e30.json similarity index 63% rename from prover/crates/lib/prover_dal/.sqlx/query-d272c91f1209c277189a31c59ee191a43dc8eafc33ee067bd41e20f25f7625f0.json rename to prover/crates/lib/prover_dal/.sqlx/query-5207488b5e71395b700fb0f0ba8117729a81f999c81701c148a4d85f413f6e30.json index 2c94853eacff..7042c4e728e0 100644 --- a/prover/crates/lib/prover_dal/.sqlx/query-d272c91f1209c277189a31c59ee191a43dc8eafc33ee067bd41e20f25f7625f0.json +++ b/prover/crates/lib/prover_dal/.sqlx/query-5207488b5e71395b700fb0f0ba8117729a81f999c81701c148a4d85f413f6e30.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n UPDATE leaf_aggregation_witness_jobs_fri\n SET\n status = 'in_progress',\n attempts = attempts + 1,\n updated_at = NOW(),\n processing_started_at = NOW(),\n picked_by = $3\n WHERE\n id = (\n SELECT\n id\n FROM\n leaf_aggregation_witness_jobs_fri\n WHERE\n status = 'queued'\n AND protocol_version = $1\n AND protocol_version_patch = $2\n ORDER BY\n l1_batch_number ASC,\n id ASC\n LIMIT\n 1\n FOR UPDATE\n SKIP LOCKED\n )\n RETURNING\n leaf_aggregation_witness_jobs_fri.*\n ", + "query": "\n UPDATE\n leaf_aggregation_witness_jobs_fri\n SET\n status = 'in_progress',\n attempts = attempts + 1,\n updated_at = NOW(),\n processing_started_at = NOW(),\n picked_by = $3\n WHERE\n id = (\n SELECT\n id\n FROM\n leaf_aggregation_witness_jobs_fri\n WHERE\n status = 'queued'\n AND protocol_version = $1\n AND protocol_version_patch = $2\n ORDER BY\n l1_batch_number ASC,\n id ASC\n LIMIT\n 1 FOR\n UPDATE\n SKIP LOCKED\n )\n RETURNING\n leaf_aggregation_witness_jobs_fri.*\n ", "describe": { "columns": [ { @@ -104,5 +104,5 @@ false ] }, - "hash": "d272c91f1209c277189a31c59ee191a43dc8eafc33ee067bd41e20f25f7625f0" + "hash": "5207488b5e71395b700fb0f0ba8117729a81f999c81701c148a4d85f413f6e30" } diff --git a/prover/crates/lib/prover_dal/.sqlx/query-534822a226068cde83ad8c30b569a8f447824a5ab466bb6eea1710e8aeaa2c56.json b/prover/crates/lib/prover_dal/.sqlx/query-534822a226068cde83ad8c30b569a8f447824a5ab466bb6eea1710e8aeaa2c56.json deleted file mode 100644 index a85b4895b451..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-534822a226068cde83ad8c30b569a8f447824a5ab466bb6eea1710e8aeaa2c56.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE proof_compression_jobs_fri\n SET\n status = $1,\n updated_at = NOW()\n WHERE\n l1_batch_number = $2\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Text", - "Int8" - ] - }, - "nullable": [] - }, - "hash": "534822a226068cde83ad8c30b569a8f447824a5ab466bb6eea1710e8aeaa2c56" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-53f99a67b05cc8f1150d5cff4731d22f984d4b063eeb9e92726a2afd86555277.json b/prover/crates/lib/prover_dal/.sqlx/query-53f99a67b05cc8f1150d5cff4731d22f984d4b063eeb9e92726a2afd86555277.json new file mode 100644 index 000000000000..4fe5cd7967c5 --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-53f99a67b05cc8f1150d5cff4731d22f984d4b063eeb9e92726a2afd86555277.json @@ -0,0 +1,15 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE\n leaf_aggregation_witness_jobs_fri\n SET\n status = 'failed',\n error = $1,\n updated_at = NOW()\n WHERE\n id = $2\n AND status != 'successful'\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Text", + "Int8" + ] + }, + "nullable": [] + }, + "hash": "53f99a67b05cc8f1150d5cff4731d22f984d4b063eeb9e92726a2afd86555277" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-57ac943c57d905575f5dcc9d94031c32226a54cd980aa99a38289452fbb100d4.json b/prover/crates/lib/prover_dal/.sqlx/query-57ac943c57d905575f5dcc9d94031c32226a54cd980aa99a38289452fbb100d4.json new file mode 100644 index 000000000000..dfa97e38db03 --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-57ac943c57d905575f5dcc9d94031c32226a54cd980aa99a38289452fbb100d4.json @@ -0,0 +1,14 @@ +{ + "db_name": "PostgreSQL", + "query": "\n DELETE FROM\n prover_jobs_fri\n WHERE\n l1_batch_number = $1;\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8" + ] + }, + "nullable": [] + }, + "hash": "57ac943c57d905575f5dcc9d94031c32226a54cd980aa99a38289452fbb100d4" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-5a782ff686ca6b194013af509c1c0094aba5c7966739d2d56ac74ed28ceb715f.json b/prover/crates/lib/prover_dal/.sqlx/query-5a782ff686ca6b194013af509c1c0094aba5c7966739d2d56ac74ed28ceb715f.json new file mode 100644 index 000000000000..653bc1320470 --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-5a782ff686ca6b194013af509c1c0094aba5c7966739d2d56ac74ed28ceb715f.json @@ -0,0 +1,16 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE\n gpu_prover_queue_fri\n SET\n instance_status = 'available',\n updated_at = NOW()\n WHERE\n instance_host = $1 :: TEXT :: inet\n AND instance_port = $2\n AND instance_status = 'full'\n AND zone = $3\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Text", + "Int4", + "Text" + ] + }, + "nullable": [] + }, + "hash": "5a782ff686ca6b194013af509c1c0094aba5c7966739d2d56ac74ed28ceb715f" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-0eac6f7b2d799059328584029b437891598dc79b5ed11258b2c90c3f282929ad.json b/prover/crates/lib/prover_dal/.sqlx/query-5cf5d667206438d3fcf478a6c79940d96210c6e7f1dc2f249741e45385e30e61.json similarity index 71% rename from prover/crates/lib/prover_dal/.sqlx/query-0eac6f7b2d799059328584029b437891598dc79b5ed11258b2c90c3f282929ad.json rename to prover/crates/lib/prover_dal/.sqlx/query-5cf5d667206438d3fcf478a6c79940d96210c6e7f1dc2f249741e45385e30e61.json index 61518273b4d3..a37c2bdf21d4 100644 --- a/prover/crates/lib/prover_dal/.sqlx/query-0eac6f7b2d799059328584029b437891598dc79b5ed11258b2c90c3f282929ad.json +++ b/prover/crates/lib/prover_dal/.sqlx/query-5cf5d667206438d3fcf478a6c79940d96210c6e7f1dc2f249741e45385e30e61.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n leaf_aggregation_witness_jobs_fri (\n l1_batch_number,\n circuit_id,\n status,\n number_of_basic_circuits,\n created_at,\n updated_at\n )\n VALUES\n ($1, $2, 'waiting_for_proofs', 2, NOW(), NOW())\n ON CONFLICT (l1_batch_number, circuit_id) DO\n UPDATE\n SET status = $3\n ", + "query": "\n INSERT INTO\n leaf_aggregation_witness_jobs_fri (\n l1_batch_number,\n circuit_id,\n status,\n number_of_basic_circuits,\n created_at,\n updated_at\n )\n VALUES\n ($1, $2, 'waiting_for_proofs', 2, NOW(), NOW()) ON CONFLICT (l1_batch_number, circuit_id) DO\n UPDATE\n SET\n status = $3\n ", "describe": { "columns": [], "parameters": { @@ -12,5 +12,5 @@ }, "nullable": [] }, - "hash": "0eac6f7b2d799059328584029b437891598dc79b5ed11258b2c90c3f282929ad" + "hash": "5cf5d667206438d3fcf478a6c79940d96210c6e7f1dc2f249741e45385e30e61" } diff --git a/prover/crates/lib/prover_dal/.sqlx/query-5db868e03dc6901a0afa06f82a37a1a04821495487a80595cc9b523dac6ac8e9.json b/prover/crates/lib/prover_dal/.sqlx/query-5db868e03dc6901a0afa06f82a37a1a04821495487a80595cc9b523dac6ac8e9.json deleted file mode 100644 index 94dbaa80a10e..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-5db868e03dc6901a0afa06f82a37a1a04821495487a80595cc9b523dac6ac8e9.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE scheduler_witness_jobs_fri\n SET\n status = 'failed',\n error = $1,\n updated_at = NOW()\n WHERE\n l1_batch_number = $2\n AND status != 'successful'\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Text", - "Int8" - ] - }, - "nullable": [] - }, - "hash": "5db868e03dc6901a0afa06f82a37a1a04821495487a80595cc9b523dac6ac8e9" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-5fe7345162c22fab6b2bb13e29d701950441fcbf9784a6634ce020262e170951.json b/prover/crates/lib/prover_dal/.sqlx/query-5fe7345162c22fab6b2bb13e29d701950441fcbf9784a6634ce020262e170951.json new file mode 100644 index 000000000000..fb3e3214462b --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-5fe7345162c22fab6b2bb13e29d701950441fcbf9784a6634ce020262e170951.json @@ -0,0 +1,19 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE\n prover_jobs_fri\n SET\n status = $1,\n attempts = $2\n WHERE\n l1_batch_number = $3\n AND sequence_number = $4\n AND aggregation_round = $5\n AND circuit_id = $6\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Text", + "Int2", + "Int8", + "Int4", + "Int2", + "Int2" + ] + }, + "nullable": [] + }, + "hash": "5fe7345162c22fab6b2bb13e29d701950441fcbf9784a6634ce020262e170951" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-eef1b56e87eff63fcf6ffb98791583a7526ae38ceb4bf80543cfd3fb60492fb9.json b/prover/crates/lib/prover_dal/.sqlx/query-6476cda32a4c54a5f68a73f9b02b7af8475cef49d0dc34c3d6ac79e1032f2a94.json similarity index 57% rename from prover/crates/lib/prover_dal/.sqlx/query-eef1b56e87eff63fcf6ffb98791583a7526ae38ceb4bf80543cfd3fb60492fb9.json rename to prover/crates/lib/prover_dal/.sqlx/query-6476cda32a4c54a5f68a73f9b02b7af8475cef49d0dc34c3d6ac79e1032f2a94.json index fe481b4e54db..5f3dc98751c1 100644 --- a/prover/crates/lib/prover_dal/.sqlx/query-eef1b56e87eff63fcf6ffb98791583a7526ae38ceb4bf80543cfd3fb60492fb9.json +++ b/prover/crates/lib/prover_dal/.sqlx/query-6476cda32a4c54a5f68a73f9b02b7af8475cef49d0dc34c3d6ac79e1032f2a94.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n recursion_tip_witness_jobs_fri (\n l1_batch_number,\n status,\n number_of_final_node_jobs,\n protocol_version,\n created_at,\n updated_at,\n protocol_version_patch\n )\n VALUES\n ($1, 'waiting_for_proofs', $2, $3, NOW(), NOW(), $4)\n ON CONFLICT (l1_batch_number) DO\n UPDATE\n SET\n updated_at = NOW()\n ", + "query": "\n INSERT INTO\n recursion_tip_witness_jobs_fri (\n l1_batch_number,\n status,\n number_of_final_node_jobs,\n protocol_version,\n created_at,\n updated_at,\n protocol_version_patch\n )\n VALUES\n (\n $1,\n 'waiting_for_proofs',\n $2,\n $3,\n NOW(),\n NOW(),\n $4\n ) ON CONFLICT (l1_batch_number) DO\n UPDATE\n SET\n updated_at = NOW()\n ", "describe": { "columns": [], "parameters": { @@ -13,5 +13,5 @@ }, "nullable": [] }, - "hash": "eef1b56e87eff63fcf6ffb98791583a7526ae38ceb4bf80543cfd3fb60492fb9" + "hash": "6476cda32a4c54a5f68a73f9b02b7af8475cef49d0dc34c3d6ac79e1032f2a94" } diff --git a/prover/crates/lib/prover_dal/.sqlx/query-67f5f3a015dc478f02f4f701c90d0fc9ac9a7f3dce2ba48c2d0e6f38b6ba455a.json b/prover/crates/lib/prover_dal/.sqlx/query-67f5f3a015dc478f02f4f701c90d0fc9ac9a7f3dce2ba48c2d0e6f38b6ba455a.json deleted file mode 100644 index 29838881a52c..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-67f5f3a015dc478f02f4f701c90d0fc9ac9a7f3dce2ba48c2d0e6f38b6ba455a.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE leaf_aggregation_witness_jobs_fri\n SET\n status = 'failed',\n error = $1,\n updated_at = NOW()\n WHERE\n id = $2\n AND status != 'successful'\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Text", - "Int8" - ] - }, - "nullable": [] - }, - "hash": "67f5f3a015dc478f02f4f701c90d0fc9ac9a7f3dce2ba48c2d0e6f38b6ba455a" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-6a77f68e7c3fa1d3bbf2fd6195e1810d85803da953bd7d5c46b34619e05374ed.json b/prover/crates/lib/prover_dal/.sqlx/query-6a77f68e7c3fa1d3bbf2fd6195e1810d85803da953bd7d5c46b34619e05374ed.json new file mode 100644 index 000000000000..10eb050ee9a6 --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-6a77f68e7c3fa1d3bbf2fd6195e1810d85803da953bd7d5c46b34619e05374ed.json @@ -0,0 +1,18 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE\n prover_jobs_fri\n SET\n status = $1\n WHERE\n l1_batch_number = $2\n AND sequence_number = $3\n AND aggregation_round = $4\n AND circuit_id = $5\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Text", + "Int8", + "Int4", + "Int2", + "Int2" + ] + }, + "nullable": [] + }, + "hash": "6a77f68e7c3fa1d3bbf2fd6195e1810d85803da953bd7d5c46b34619e05374ed" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-6de8db565e0604ca30cdf78d3d792dd0bec10a53fa6d9052f9aeeeed8080d304.json b/prover/crates/lib/prover_dal/.sqlx/query-6de8db565e0604ca30cdf78d3d792dd0bec10a53fa6d9052f9aeeeed8080d304.json new file mode 100644 index 000000000000..dcc294f98432 --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-6de8db565e0604ca30cdf78d3d792dd0bec10a53fa6d9052f9aeeeed8080d304.json @@ -0,0 +1,12 @@ +{ + "db_name": "PostgreSQL", + "query": "\n DELETE FROM\n proof_compression_jobs_fri\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [] + }, + "nullable": [] + }, + "hash": "6de8db565e0604ca30cdf78d3d792dd0bec10a53fa6d9052f9aeeeed8080d304" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-63cf7038e6c48af8ed9afc7d6ea07edd87cb16a79c13e7d4291d99736e51d3b9.json b/prover/crates/lib/prover_dal/.sqlx/query-6ff1dea12f696274a62338cb8b5928e90167f2051e1c9b3a4d63e11f3273cc7a.json similarity index 66% rename from prover/crates/lib/prover_dal/.sqlx/query-63cf7038e6c48af8ed9afc7d6ea07edd87cb16a79c13e7d4291d99736e51d3b9.json rename to prover/crates/lib/prover_dal/.sqlx/query-6ff1dea12f696274a62338cb8b5928e90167f2051e1c9b3a4d63e11f3273cc7a.json index 208b23d939f8..58b520f81c80 100644 --- a/prover/crates/lib/prover_dal/.sqlx/query-63cf7038e6c48af8ed9afc7d6ea07edd87cb16a79c13e7d4291d99736e51d3b9.json +++ b/prover/crates/lib/prover_dal/.sqlx/query-6ff1dea12f696274a62338cb8b5928e90167f2051e1c9b3a4d63e11f3273cc7a.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n scheduler_witness_jobs_fri (\n l1_batch_number,\n scheduler_partial_input_blob_url,\n status,\n created_at,\n updated_at\n )\n VALUES\n ($1, '', 'waiting_for_proofs', NOW(), NOW())\n ON CONFLICT (l1_batch_number) DO\n UPDATE\n SET status = $2\n ", + "query": "\n INSERT INTO\n scheduler_witness_jobs_fri (\n l1_batch_number,\n scheduler_partial_input_blob_url,\n status,\n created_at,\n updated_at\n )\n VALUES\n ($1, '', 'waiting_for_proofs', NOW(), NOW()) ON CONFLICT (l1_batch_number) DO\n UPDATE\n SET\n status = $2\n ", "describe": { "columns": [], "parameters": { @@ -11,5 +11,5 @@ }, "nullable": [] }, - "hash": "63cf7038e6c48af8ed9afc7d6ea07edd87cb16a79c13e7d4291d99736e51d3b9" + "hash": "6ff1dea12f696274a62338cb8b5928e90167f2051e1c9b3a4d63e11f3273cc7a" } diff --git a/prover/crates/lib/prover_dal/.sqlx/query-786246e83babf9c07589f6dc61ead2ccc0aeaaecbb8989eb738a01ea253a237b.json b/prover/crates/lib/prover_dal/.sqlx/query-786246e83babf9c07589f6dc61ead2ccc0aeaaecbb8989eb738a01ea253a237b.json new file mode 100644 index 000000000000..69e835287576 --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-786246e83babf9c07589f6dc61ead2ccc0aeaaecbb8989eb738a01ea253a237b.json @@ -0,0 +1,12 @@ +{ + "db_name": "PostgreSQL", + "query": "\n DELETE FROM\n prover_jobs_fri\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [] + }, + "nullable": [] + }, + "hash": "786246e83babf9c07589f6dc61ead2ccc0aeaaecbb8989eb738a01ea253a237b" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-7a2145e2234a7896031bbc1ce82715e903f3b399886c2c73e838bd924fed6776.json b/prover/crates/lib/prover_dal/.sqlx/query-7a2145e2234a7896031bbc1ce82715e903f3b399886c2c73e838bd924fed6776.json deleted file mode 100644 index 73a8c33695b1..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-7a2145e2234a7896031bbc1ce82715e903f3b399886c2c73e838bd924fed6776.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE node_aggregation_witness_jobs_fri\n SET\n aggregations_url = $1,\n number_of_dependent_jobs = $5,\n updated_at = NOW()\n WHERE\n l1_batch_number = $2\n AND circuit_id = $3\n AND depth = $4\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Text", - "Int8", - "Int2", - "Int4", - "Int4" - ] - }, - "nullable": [] - }, - "hash": "7a2145e2234a7896031bbc1ce82715e903f3b399886c2c73e838bd924fed6776" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-2b12c5d469e6220cc8ddc997c666e4aa4f797bcc6e05ec2f2e435a7e940d8cf9.json b/prover/crates/lib/prover_dal/.sqlx/query-7ae81e77402f0ce3d1fabc9884cd2723def558800cb1d56840886199c584294c.json similarity index 50% rename from prover/crates/lib/prover_dal/.sqlx/query-2b12c5d469e6220cc8ddc997c666e4aa4f797bcc6e05ec2f2e435a7e940d8cf9.json rename to prover/crates/lib/prover_dal/.sqlx/query-7ae81e77402f0ce3d1fabc9884cd2723def558800cb1d56840886199c584294c.json index 14b64e8122e5..9251e5b1aa22 100644 --- a/prover/crates/lib/prover_dal/.sqlx/query-2b12c5d469e6220cc8ddc997c666e4aa4f797bcc6e05ec2f2e435a7e940d8cf9.json +++ b/prover/crates/lib/prover_dal/.sqlx/query-7ae81e77402f0ce3d1fabc9884cd2723def558800cb1d56840886199c584294c.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n UPDATE node_aggregation_witness_jobs_fri\n SET\n status = 'queued',\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n (\n status = 'in_progress'\n AND processing_started_at <= NOW() - $1::INTERVAL\n AND attempts < $2\n )\n OR (\n status = 'failed'\n AND attempts < $2\n )\n RETURNING\n id,\n status,\n attempts,\n circuit_id,\n error,\n picked_by\n ", + "query": "\n UPDATE\n node_aggregation_witness_jobs_fri\n SET\n status = 'queued',\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n (\n status = 'in_progress'\n AND processing_started_at <= NOW() - $1 :: INTERVAL\n AND attempts < $2\n )\n OR (\n status = 'failed'\n AND attempts < $2\n )\n RETURNING\n id,\n status,\n attempts,\n circuit_id,\n error,\n picked_by\n ", "describe": { "columns": [ { @@ -49,5 +49,5 @@ true ] }, - "hash": "2b12c5d469e6220cc8ddc997c666e4aa4f797bcc6e05ec2f2e435a7e940d8cf9" + "hash": "7ae81e77402f0ce3d1fabc9884cd2723def558800cb1d56840886199c584294c" } diff --git a/prover/crates/lib/prover_dal/.sqlx/query-7bae6a889d785dc526970cf022fba7f33558aa20961f475823e0216873a9e8a4.json b/prover/crates/lib/prover_dal/.sqlx/query-7bae6a889d785dc526970cf022fba7f33558aa20961f475823e0216873a9e8a4.json new file mode 100644 index 000000000000..73cde1aba850 --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-7bae6a889d785dc526970cf022fba7f33558aa20961f475823e0216873a9e8a4.json @@ -0,0 +1,17 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE\n proof_compression_jobs_fri\n SET\n status = $1,\n updated_at = NOW(),\n time_taken = $2,\n l1_proof_blob_url = $3\n WHERE\n l1_batch_number = $4\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Text", + "Time", + "Text", + "Int8" + ] + }, + "nullable": [] + }, + "hash": "7bae6a889d785dc526970cf022fba7f33558aa20961f475823e0216873a9e8a4" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-7d20c0bf35625185c1f6c675aa8fcddbb47c5e9965443f118f8edd7d562734a2.json b/prover/crates/lib/prover_dal/.sqlx/query-7d20c0bf35625185c1f6c675aa8fcddbb47c5e9965443f118f8edd7d562734a2.json deleted file mode 100644 index 140b8f126750..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-7d20c0bf35625185c1f6c675aa8fcddbb47c5e9965443f118f8edd7d562734a2.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE prover_jobs_fri\n SET\n status = 'in_progress',\n attempts = attempts + 1,\n updated_at = NOW(),\n processing_started_at = NOW(),\n picked_by = $3\n WHERE\n id = (\n SELECT\n id\n FROM\n prover_jobs_fri\n WHERE\n status = 'queued'\n AND protocol_version = $1\n AND protocol_version_patch = $2\n ORDER BY\n l1_batch_number ASC,\n aggregation_round ASC,\n circuit_id ASC,\n id ASC\n LIMIT\n 1\n FOR UPDATE\n SKIP LOCKED\n )\n RETURNING\n prover_jobs_fri.id,\n prover_jobs_fri.l1_batch_number,\n prover_jobs_fri.circuit_id,\n prover_jobs_fri.aggregation_round,\n prover_jobs_fri.sequence_number,\n prover_jobs_fri.depth,\n prover_jobs_fri.is_node_final_proof\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "id", - "type_info": "Int8" - }, - { - "ordinal": 1, - "name": "l1_batch_number", - "type_info": "Int8" - }, - { - "ordinal": 2, - "name": "circuit_id", - "type_info": "Int2" - }, - { - "ordinal": 3, - "name": "aggregation_round", - "type_info": "Int2" - }, - { - "ordinal": 4, - "name": "sequence_number", - "type_info": "Int4" - }, - { - "ordinal": 5, - "name": "depth", - "type_info": "Int4" - }, - { - "ordinal": 6, - "name": "is_node_final_proof", - "type_info": "Bool" - } - ], - "parameters": { - "Left": [ - "Int4", - "Int4", - "Text" - ] - }, - "nullable": [ - false, - false, - false, - false, - false, - false, - false - ] - }, - "hash": "7d20c0bf35625185c1f6c675aa8fcddbb47c5e9965443f118f8edd7d562734a2" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-caff620ae66d7fbe3caff7505173b6da86d1e693be03936730c340121167341f.json b/prover/crates/lib/prover_dal/.sqlx/query-7e19bfe8f29b4c5921c7f3b24fdafb2d59c01a15172b2accc0cddc4e8326a792.json similarity index 57% rename from prover/crates/lib/prover_dal/.sqlx/query-caff620ae66d7fbe3caff7505173b6da86d1e693be03936730c340121167341f.json rename to prover/crates/lib/prover_dal/.sqlx/query-7e19bfe8f29b4c5921c7f3b24fdafb2d59c01a15172b2accc0cddc4e8326a792.json index 403e34bb91cd..ba59aacf8ccb 100644 --- a/prover/crates/lib/prover_dal/.sqlx/query-caff620ae66d7fbe3caff7505173b6da86d1e693be03936730c340121167341f.json +++ b/prover/crates/lib/prover_dal/.sqlx/query-7e19bfe8f29b4c5921c7f3b24fdafb2d59c01a15172b2accc0cddc4e8326a792.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n scheduler_witness_jobs_fri (\n l1_batch_number,\n scheduler_partial_input_blob_url,\n protocol_version,\n status,\n created_at,\n updated_at,\n protocol_version_patch\n )\n VALUES\n ($1, $2, $3, 'waiting_for_proofs', NOW(), NOW(), $4)\n ON CONFLICT (l1_batch_number) DO\n UPDATE\n SET\n updated_at = NOW()\n ", + "query": "\n INSERT INTO\n scheduler_witness_jobs_fri (\n l1_batch_number,\n scheduler_partial_input_blob_url,\n protocol_version,\n status,\n created_at,\n updated_at,\n protocol_version_patch\n )\n VALUES\n (\n $1,\n $2,\n $3,\n 'waiting_for_proofs',\n NOW(),\n NOW(),\n $4\n ) ON CONFLICT (l1_batch_number) DO\n UPDATE\n SET\n updated_at = NOW()\n ", "describe": { "columns": [], "parameters": { @@ -13,5 +13,5 @@ }, "nullable": [] }, - "hash": "caff620ae66d7fbe3caff7505173b6da86d1e693be03936730c340121167341f" + "hash": "7e19bfe8f29b4c5921c7f3b24fdafb2d59c01a15172b2accc0cddc4e8326a792" } diff --git a/prover/crates/lib/prover_dal/.sqlx/query-8357972a21b39644e4cbe4bedc3b6d9065bf4494daf8f7632ab2bfe055773f7b.json b/prover/crates/lib/prover_dal/.sqlx/query-8357972a21b39644e4cbe4bedc3b6d9065bf4494daf8f7632ab2bfe055773f7b.json deleted file mode 100644 index 54fba3bbeac0..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-8357972a21b39644e4cbe4bedc3b6d9065bf4494daf8f7632ab2bfe055773f7b.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE recursion_tip_witness_jobs_fri\n SET\n status = 'queued',\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n (\n status = 'in_progress'\n AND processing_started_at <= NOW() - $1::INTERVAL\n AND attempts < $2\n )\n OR (\n status = 'failed'\n AND attempts < $2\n )\n RETURNING\n l1_batch_number,\n status,\n attempts,\n error,\n picked_by\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "l1_batch_number", - "type_info": "Int8" - }, - { - "ordinal": 1, - "name": "status", - "type_info": "Text" - }, - { - "ordinal": 2, - "name": "attempts", - "type_info": "Int2" - }, - { - "ordinal": 3, - "name": "error", - "type_info": "Text" - }, - { - "ordinal": 4, - "name": "picked_by", - "type_info": "Text" - } - ], - "parameters": { - "Left": [ - "Interval", - "Int2" - ] - }, - "nullable": [ - false, - false, - false, - true, - true - ] - }, - "hash": "8357972a21b39644e4cbe4bedc3b6d9065bf4494daf8f7632ab2bfe055773f7b" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-f99c34313e2717ec74b4f274e33dae905acac53b46eeaeb059d23e48a71df3b4.json b/prover/crates/lib/prover_dal/.sqlx/query-863d1a8ddd28472dae2835032f8244a1e3248c7c0ce034ff41ba2070200195ad.json similarity index 51% rename from prover/crates/lib/prover_dal/.sqlx/query-f99c34313e2717ec74b4f274e33dae905acac53b46eeaeb059d23e48a71df3b4.json rename to prover/crates/lib/prover_dal/.sqlx/query-863d1a8ddd28472dae2835032f8244a1e3248c7c0ce034ff41ba2070200195ad.json index c0c2637fe5ae..c8bed73bbd5a 100644 --- a/prover/crates/lib/prover_dal/.sqlx/query-f99c34313e2717ec74b4f274e33dae905acac53b46eeaeb059d23e48a71df3b4.json +++ b/prover/crates/lib/prover_dal/.sqlx/query-863d1a8ddd28472dae2835032f8244a1e3248c7c0ce034ff41ba2070200195ad.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n prover_jobs_fri (\n l1_batch_number,\n circuit_id,\n circuit_blob_url,\n aggregation_round,\n sequence_number,\n depth,\n is_node_final_proof,\n protocol_version,\n status,\n created_at,\n updated_at,\n protocol_version_patch\n )\n VALUES\n ($1, $2, $3, $4, $5, $6, $7, $8, 'queued', NOW(), NOW(), $9)\n ON CONFLICT (l1_batch_number, aggregation_round, circuit_id, depth, sequence_number) DO\n UPDATE\n SET\n updated_at = NOW()\n ", + "query": "\n INSERT INTO\n prover_jobs_fri (\n l1_batch_number,\n circuit_id,\n circuit_blob_url,\n aggregation_round,\n sequence_number,\n depth,\n is_node_final_proof,\n protocol_version,\n status,\n created_at,\n updated_at,\n protocol_version_patch\n )\n VALUES\n (\n $1,\n $2,\n $3,\n $4,\n $5,\n $6,\n $7,\n $8,\n 'queued',\n NOW(),\n NOW(),\n $9\n ) ON CONFLICT (\n l1_batch_number,\n aggregation_round,\n circuit_id,\n depth,\n sequence_number\n ) DO\n UPDATE\n SET\n updated_at = NOW()\n ", "describe": { "columns": [], "parameters": { @@ -18,5 +18,5 @@ }, "nullable": [] }, - "hash": "f99c34313e2717ec74b4f274e33dae905acac53b46eeaeb059d23e48a71df3b4" + "hash": "863d1a8ddd28472dae2835032f8244a1e3248c7c0ce034ff41ba2070200195ad" } diff --git a/prover/crates/lib/prover_dal/.sqlx/query-8720d411e0c9640afd61e927a89c0b6c018e6a4d279acd24a4ea7d81b5cc5123.json b/prover/crates/lib/prover_dal/.sqlx/query-8720d411e0c9640afd61e927a89c0b6c018e6a4d279acd24a4ea7d81b5cc5123.json deleted file mode 100644 index 12146fb75a90..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-8720d411e0c9640afd61e927a89c0b6c018e6a4d279acd24a4ea7d81b5cc5123.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE prover_jobs_fri\n SET\n status = 'in_progress',\n attempts = attempts + 1,\n updated_at = NOW(),\n processing_started_at = NOW(),\n picked_by = $3\n WHERE\n id = (\n SELECT\n id\n FROM\n prover_jobs_fri\n WHERE\n status = 'queued'\n AND protocol_version = $1\n AND protocol_version_patch = $2\n ORDER BY\n aggregation_round DESC,\n l1_batch_number ASC,\n id ASC\n LIMIT\n 1\n FOR UPDATE\n SKIP LOCKED\n )\n RETURNING\n prover_jobs_fri.id,\n prover_jobs_fri.l1_batch_number,\n prover_jobs_fri.circuit_id,\n prover_jobs_fri.aggregation_round,\n prover_jobs_fri.sequence_number,\n prover_jobs_fri.depth,\n prover_jobs_fri.is_node_final_proof\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "id", - "type_info": "Int8" - }, - { - "ordinal": 1, - "name": "l1_batch_number", - "type_info": "Int8" - }, - { - "ordinal": 2, - "name": "circuit_id", - "type_info": "Int2" - }, - { - "ordinal": 3, - "name": "aggregation_round", - "type_info": "Int2" - }, - { - "ordinal": 4, - "name": "sequence_number", - "type_info": "Int4" - }, - { - "ordinal": 5, - "name": "depth", - "type_info": "Int4" - }, - { - "ordinal": 6, - "name": "is_node_final_proof", - "type_info": "Bool" - } - ], - "parameters": { - "Left": [ - "Int4", - "Int4", - "Text" - ] - }, - "nullable": [ - false, - false, - false, - false, - false, - false, - false - ] - }, - "hash": "8720d411e0c9640afd61e927a89c0b6c018e6a4d279acd24a4ea7d81b5cc5123" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-87a73aa95a85efeb065428f9e56e085ea80cf93c2fd66fd3949aab428bbdc560.json b/prover/crates/lib/prover_dal/.sqlx/query-87a73aa95a85efeb065428f9e56e085ea80cf93c2fd66fd3949aab428bbdc560.json deleted file mode 100644 index d95b4f7f6f20..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-87a73aa95a85efeb065428f9e56e085ea80cf93c2fd66fd3949aab428bbdc560.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n DELETE FROM prover_jobs_fri\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [] - }, - "nullable": [] - }, - "hash": "87a73aa95a85efeb065428f9e56e085ea80cf93c2fd66fd3949aab428bbdc560" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-89a25708d0b0a15e1e56ee8fd69f5a15d2fc5ad3e5ce738a2f6ee3eecfc96736.json b/prover/crates/lib/prover_dal/.sqlx/query-89a25708d0b0a15e1e56ee8fd69f5a15d2fc5ad3e5ce738a2f6ee3eecfc96736.json deleted file mode 100644 index d8bd3223905c..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-89a25708d0b0a15e1e56ee8fd69f5a15d2fc5ad3e5ce738a2f6ee3eecfc96736.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n prover_fri_protocol_versions (id, snark_wrapper_vk_hash, created_at, protocol_version_patch)\n VALUES\n ($1, $2, NOW(), $3)\n ON CONFLICT (id, protocol_version_patch) DO NOTHING\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int4", - "Bytea", - "Int4" - ] - }, - "nullable": [] - }, - "hash": "89a25708d0b0a15e1e56ee8fd69f5a15d2fc5ad3e5ce738a2f6ee3eecfc96736" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-ce5779092feb8a3d3e2c5e395783e67f08f2ead5f55bfb6594e50346bf9cf2ef.json b/prover/crates/lib/prover_dal/.sqlx/query-8abfb4b84de35e8e336d59389ca978649e228eecbbbf959a1e3b87c08faa60de.json similarity index 64% rename from prover/crates/lib/prover_dal/.sqlx/query-ce5779092feb8a3d3e2c5e395783e67f08f2ead5f55bfb6594e50346bf9cf2ef.json rename to prover/crates/lib/prover_dal/.sqlx/query-8abfb4b84de35e8e336d59389ca978649e228eecbbbf959a1e3b87c08faa60de.json index 6f83fd55064d..c4ecdebb2d95 100644 --- a/prover/crates/lib/prover_dal/.sqlx/query-ce5779092feb8a3d3e2c5e395783e67f08f2ead5f55bfb6594e50346bf9cf2ef.json +++ b/prover/crates/lib/prover_dal/.sqlx/query-8abfb4b84de35e8e336d59389ca978649e228eecbbbf959a1e3b87c08faa60de.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT\n MIN(l1_batch_number) AS \"l1_batch_number!\",\n circuit_id,\n aggregation_round\n FROM\n prover_jobs_fri\n WHERE\n status IN ('queued', 'in_gpu_proof', 'in_progress', 'failed')\n GROUP BY\n circuit_id,\n aggregation_round\n ", + "query": "\n SELECT\n MIN(l1_batch_number) AS \"l1_batch_number!\",\n circuit_id,\n aggregation_round\n FROM\n prover_jobs_fri\n WHERE\n status IN (\n 'queued',\n 'in_gpu_proof',\n 'in_progress',\n 'failed'\n )\n GROUP BY\n circuit_id,\n aggregation_round\n ", "describe": { "columns": [ { @@ -28,5 +28,5 @@ false ] }, - "hash": "ce5779092feb8a3d3e2c5e395783e67f08f2ead5f55bfb6594e50346bf9cf2ef" + "hash": "8abfb4b84de35e8e336d59389ca978649e228eecbbbf959a1e3b87c08faa60de" } diff --git a/prover/crates/lib/prover_dal/.sqlx/query-8bbe4a8fd46bee5ead5324029c9b7b5831361599874fc223dd389fcc3f9efee7.json b/prover/crates/lib/prover_dal/.sqlx/query-8bbe4a8fd46bee5ead5324029c9b7b5831361599874fc223dd389fcc3f9efee7.json new file mode 100644 index 000000000000..2717055650cc --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-8bbe4a8fd46bee5ead5324029c9b7b5831361599874fc223dd389fcc3f9efee7.json @@ -0,0 +1,41 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE\n proof_compression_jobs_fri\n SET\n status = 'queued',\n error = 'Manually requeued',\n attempts = 2,\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n l1_batch_number = $1\n AND attempts >= $2\n AND (\n status = 'in_progress'\n OR status = 'failed'\n )\n RETURNING\n status,\n attempts,\n error,\n picked_by\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "status", + "type_info": "Text" + }, + { + "ordinal": 1, + "name": "attempts", + "type_info": "Int2" + }, + { + "ordinal": 2, + "name": "error", + "type_info": "Text" + }, + { + "ordinal": 3, + "name": "picked_by", + "type_info": "Text" + } + ], + "parameters": { + "Left": [ + "Int8", + "Int2" + ] + }, + "nullable": [ + false, + false, + true, + true + ] + }, + "hash": "8bbe4a8fd46bee5ead5324029c9b7b5831361599874fc223dd389fcc3f9efee7" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-8bcad2be3dd29e36ea731417b68023678f31a1b7f5ee33b643dd551c40e88329.json b/prover/crates/lib/prover_dal/.sqlx/query-8bcad2be3dd29e36ea731417b68023678f31a1b7f5ee33b643dd551c40e88329.json deleted file mode 100644 index 9a6b55602d01..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-8bcad2be3dd29e36ea731417b68023678f31a1b7f5ee33b643dd551c40e88329.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE recursion_tip_witness_jobs_fri\n SET\n status = 'successful',\n updated_at = NOW(),\n time_taken = $1\n WHERE\n l1_batch_number = $2\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Time", - "Int8" - ] - }, - "nullable": [] - }, - "hash": "8bcad2be3dd29e36ea731417b68023678f31a1b7f5ee33b643dd551c40e88329" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-93b9706aa8eb840d574d7c156cc866e8f67a380302762c272bfb27307682d62e.json b/prover/crates/lib/prover_dal/.sqlx/query-93b9706aa8eb840d574d7c156cc866e8f67a380302762c272bfb27307682d62e.json deleted file mode 100644 index 90eface5350b..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-93b9706aa8eb840d574d7c156cc866e8f67a380302762c272bfb27307682d62e.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE proof_compression_jobs_fri\n SET\n status = $1,\n error = $2,\n updated_at = NOW()\n WHERE\n l1_batch_number = $3\n AND status != $4\n AND status != $5\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Text", - "Text", - "Int8", - "Text", - "Text" - ] - }, - "nullable": [] - }, - "hash": "93b9706aa8eb840d574d7c156cc866e8f67a380302762c272bfb27307682d62e" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-96c76bcbd40328c21c9d2795e48e2a39dd892793175e3d943487875367d220e6.json b/prover/crates/lib/prover_dal/.sqlx/query-96c76bcbd40328c21c9d2795e48e2a39dd892793175e3d943487875367d220e6.json new file mode 100644 index 000000000000..583c45641a10 --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-96c76bcbd40328c21c9d2795e48e2a39dd892793175e3d943487875367d220e6.json @@ -0,0 +1,14 @@ +{ + "db_name": "PostgreSQL", + "query": "\n DELETE FROM\n proof_compression_jobs_fri\n WHERE\n l1_batch_number = $1\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8" + ] + }, + "nullable": [] + }, + "hash": "96c76bcbd40328c21c9d2795e48e2a39dd892793175e3d943487875367d220e6" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-97c0634523806fa77776dc5dc296d119cc0df302fa2288d37741138cb4592156.json b/prover/crates/lib/prover_dal/.sqlx/query-97c0634523806fa77776dc5dc296d119cc0df302fa2288d37741138cb4592156.json new file mode 100644 index 000000000000..468047063e37 --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-97c0634523806fa77776dc5dc296d119cc0df302fa2288d37741138cb4592156.json @@ -0,0 +1,19 @@ +{ + "db_name": "PostgreSQL", + "query": "\n INSERT INTO\n gpu_prover_queue_fri (\n instance_host,\n instance_port,\n instance_status,\n specialized_prover_group_id,\n zone,\n created_at,\n updated_at,\n protocol_version,\n protocol_version_patch\n )\n VALUES\n (\n CAST($1 :: TEXT AS inet),\n $2,\n 'available',\n $3,\n $4,\n NOW(),\n NOW(),\n $5,\n $6\n ) ON CONFLICT (instance_host, instance_port, zone) DO\n UPDATE\n SET\n instance_status = 'available',\n specialized_prover_group_id = $3,\n zone = $4,\n updated_at = NOW(),\n protocol_version = $5,\n protocol_version_patch = $6\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Text", + "Int4", + "Int2", + "Text", + "Int4", + "Int4" + ] + }, + "nullable": [] + }, + "hash": "97c0634523806fa77776dc5dc296d119cc0df302fa2288d37741138cb4592156" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-9895b2ded08be3e81a5357decf76b4d3d6a762761e45af2a73fe96da804e627e.json b/prover/crates/lib/prover_dal/.sqlx/query-9895b2ded08be3e81a5357decf76b4d3d6a762761e45af2a73fe96da804e627e.json deleted file mode 100644 index 90ea99942062..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-9895b2ded08be3e81a5357decf76b4d3d6a762761e45af2a73fe96da804e627e.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE prover_jobs_fri\n SET\n status = 'queued',\n error = 'Manually requeued',\n attempts = 2,\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n l1_batch_number = $1\n AND attempts >= $2\n AND (\n status = 'in_progress'\n OR status = 'failed'\n )\n RETURNING\n id,\n status,\n attempts,\n circuit_id,\n error,\n picked_by\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "id", - "type_info": "Int8" - }, - { - "ordinal": 1, - "name": "status", - "type_info": "Text" - }, - { - "ordinal": 2, - "name": "attempts", - "type_info": "Int2" - }, - { - "ordinal": 3, - "name": "circuit_id", - "type_info": "Int2" - }, - { - "ordinal": 4, - "name": "error", - "type_info": "Text" - }, - { - "ordinal": 5, - "name": "picked_by", - "type_info": "Text" - } - ], - "parameters": { - "Left": [ - "Int8", - "Int2" - ] - }, - "nullable": [ - false, - false, - false, - false, - true, - true - ] - }, - "hash": "9895b2ded08be3e81a5357decf76b4d3d6a762761e45af2a73fe96da804e627e" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-9b713312b539b4eefa58346f0070767a2cd4488e670674cd9149f7a332c0198d.json b/prover/crates/lib/prover_dal/.sqlx/query-9b713312b539b4eefa58346f0070767a2cd4488e670674cd9149f7a332c0198d.json deleted file mode 100644 index 2609a2ee0cfc..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-9b713312b539b4eefa58346f0070767a2cd4488e670674cd9149f7a332c0198d.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE recursion_tip_witness_jobs_fri\n SET\n status = 'queued'\n WHERE\n l1_batch_number IN (\n SELECT\n prover_jobs_fri.l1_batch_number\n FROM\n prover_jobs_fri\n JOIN recursion_tip_witness_jobs_fri rtwj ON prover_jobs_fri.l1_batch_number = rtwj.l1_batch_number\n WHERE\n rtwj.status = 'waiting_for_proofs'\n AND prover_jobs_fri.status = 'successful'\n AND prover_jobs_fri.aggregation_round = $1\n AND prover_jobs_fri.is_node_final_proof = TRUE\n GROUP BY\n prover_jobs_fri.l1_batch_number,\n rtwj.number_of_final_node_jobs\n HAVING\n COUNT(*) = rtwj.number_of_final_node_jobs\n )\n RETURNING\n l1_batch_number;\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "l1_batch_number", - "type_info": "Int8" - } - ], - "parameters": { - "Left": [ - "Int2" - ] - }, - "nullable": [ - false - ] - }, - "hash": "9b713312b539b4eefa58346f0070767a2cd4488e670674cd9149f7a332c0198d" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-29ff260b02f7b955f9fe0b657b87def3a97275b66ad33d214054dc9048ddf584.json b/prover/crates/lib/prover_dal/.sqlx/query-9cf70c7776934252d45cb23eec5c023375273c2211dab39e1f28d51724b7d8ad.json similarity index 75% rename from prover/crates/lib/prover_dal/.sqlx/query-29ff260b02f7b955f9fe0b657b87def3a97275b66ad33d214054dc9048ddf584.json rename to prover/crates/lib/prover_dal/.sqlx/query-9cf70c7776934252d45cb23eec5c023375273c2211dab39e1f28d51724b7d8ad.json index 85e66ed78248..4c38c404de2e 100644 --- a/prover/crates/lib/prover_dal/.sqlx/query-29ff260b02f7b955f9fe0b657b87def3a97275b66ad33d214054dc9048ddf584.json +++ b/prover/crates/lib/prover_dal/.sqlx/query-9cf70c7776934252d45cb23eec5c023375273c2211dab39e1f28d51724b7d8ad.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n proof_compression_jobs_fri (\n l1_batch_number,\n fri_proof_blob_url,\n status,\n created_at,\n updated_at,\n protocol_version,\n protocol_version_patch\n )\n VALUES\n ($1, $2, $3, NOW(), NOW(), $4, $5)\n ON CONFLICT (l1_batch_number) DO NOTHING\n ", + "query": "\n INSERT INTO\n proof_compression_jobs_fri (\n l1_batch_number,\n fri_proof_blob_url,\n status,\n created_at,\n updated_at,\n protocol_version,\n protocol_version_patch\n )\n VALUES\n ($1, $2, $3, NOW(), NOW(), $4, $5) ON CONFLICT (l1_batch_number) DO NOTHING\n ", "describe": { "columns": [], "parameters": { @@ -14,5 +14,5 @@ }, "nullable": [] }, - "hash": "29ff260b02f7b955f9fe0b657b87def3a97275b66ad33d214054dc9048ddf584" + "hash": "9cf70c7776934252d45cb23eec5c023375273c2211dab39e1f28d51724b7d8ad" } diff --git a/prover/crates/lib/prover_dal/.sqlx/query-ec04b89218111a5dc8d5ade506ac3465e2211ef3013386feb12d4cc04e0eade9.json b/prover/crates/lib/prover_dal/.sqlx/query-a03c230ca6542578f5b8bc8c9de90aa5270bbe4e14e7608eb7f86f25b3337dfc.json similarity index 57% rename from prover/crates/lib/prover_dal/.sqlx/query-ec04b89218111a5dc8d5ade506ac3465e2211ef3013386feb12d4cc04e0eade9.json rename to prover/crates/lib/prover_dal/.sqlx/query-a03c230ca6542578f5b8bc8c9de90aa5270bbe4e14e7608eb7f86f25b3337dfc.json index 7c0264b5646b..69740e268603 100644 --- a/prover/crates/lib/prover_dal/.sqlx/query-ec04b89218111a5dc8d5ade506ac3465e2211ef3013386feb12d4cc04e0eade9.json +++ b/prover/crates/lib/prover_dal/.sqlx/query-a03c230ca6542578f5b8bc8c9de90aa5270bbe4e14e7608eb7f86f25b3337dfc.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n UPDATE prover_jobs_fri\n SET\n status = 'successful',\n updated_at = NOW(),\n time_taken = $1,\n proof_blob_url = $2\n WHERE\n id = $3\n RETURNING\n prover_jobs_fri.id,\n prover_jobs_fri.l1_batch_number,\n prover_jobs_fri.circuit_id,\n prover_jobs_fri.aggregation_round,\n prover_jobs_fri.sequence_number,\n prover_jobs_fri.depth,\n prover_jobs_fri.is_node_final_proof\n ", + "query": "\n UPDATE\n prover_jobs_fri\n SET\n status = 'successful',\n updated_at = NOW(),\n time_taken = $1,\n proof_blob_url = $2\n WHERE\n id = $3\n RETURNING\n prover_jobs_fri.id,\n prover_jobs_fri.l1_batch_number,\n prover_jobs_fri.circuit_id,\n prover_jobs_fri.aggregation_round,\n prover_jobs_fri.sequence_number,\n prover_jobs_fri.depth,\n prover_jobs_fri.is_node_final_proof\n ", "describe": { "columns": [ { @@ -56,5 +56,5 @@ false ] }, - "hash": "ec04b89218111a5dc8d5ade506ac3465e2211ef3013386feb12d4cc04e0eade9" + "hash": "a03c230ca6542578f5b8bc8c9de90aa5270bbe4e14e7608eb7f86f25b3337dfc" } diff --git a/prover/crates/lib/prover_dal/.sqlx/query-a089a2359b1ed513d20f02f395f10648e2870c18716c6cf30dbf3a704c137776.json b/prover/crates/lib/prover_dal/.sqlx/query-a089a2359b1ed513d20f02f395f10648e2870c18716c6cf30dbf3a704c137776.json new file mode 100644 index 000000000000..e923b90dbe03 --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-a089a2359b1ed513d20f02f395f10648e2870c18716c6cf30dbf3a704c137776.json @@ -0,0 +1,15 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE\n proof_compression_jobs_fri\n SET\n status = $1,\n updated_at = NOW()\n WHERE\n l1_batch_number = $2\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Text", + "Int8" + ] + }, + "nullable": [] + }, + "hash": "a089a2359b1ed513d20f02f395f10648e2870c18716c6cf30dbf3a704c137776" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-a2d3dd0dc61bcaeff337498d1803ced4deef9ea2f9699e8e173d5d2343f26cc3.json b/prover/crates/lib/prover_dal/.sqlx/query-a2d3dd0dc61bcaeff337498d1803ced4deef9ea2f9699e8e173d5d2343f26cc3.json new file mode 100644 index 000000000000..3221284f7606 --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-a2d3dd0dc61bcaeff337498d1803ced4deef9ea2f9699e8e173d5d2343f26cc3.json @@ -0,0 +1,14 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE\n scheduler_witness_jobs_fri\n SET\n status = 'queued'\n WHERE\n l1_batch_number = $1\n AND status != 'successful'\n AND status != 'in_progress'\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8" + ] + }, + "nullable": [] + }, + "hash": "a2d3dd0dc61bcaeff337498d1803ced4deef9ea2f9699e8e173d5d2343f26cc3" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-aabcfa9005b8e1d84cfa083a47a700302981be0afef31a8864613484f8521f9e.json b/prover/crates/lib/prover_dal/.sqlx/query-aabcfa9005b8e1d84cfa083a47a700302981be0afef31a8864613484f8521f9e.json deleted file mode 100644 index 3d60050c92ed..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-aabcfa9005b8e1d84cfa083a47a700302981be0afef31a8864613484f8521f9e.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "UPDATE prover_jobs_fri \n SET status = $1, attempts = $2\n WHERE l1_batch_number = $3\n AND sequence_number =$4\n AND aggregation_round = $5\n AND circuit_id = $6", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Text", - "Int2", - "Int8", - "Int4", - "Int2", - "Int2" - ] - }, - "nullable": [] - }, - "hash": "aabcfa9005b8e1d84cfa083a47a700302981be0afef31a8864613484f8521f9e" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-ab0c9b013d044a5f75b9f396ac1426777a8a76f02f528348bfe81f19ba5ebaa3.json b/prover/crates/lib/prover_dal/.sqlx/query-ab0c9b013d044a5f75b9f396ac1426777a8a76f02f528348bfe81f19ba5ebaa3.json new file mode 100644 index 000000000000..27d309667477 --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-ab0c9b013d044a5f75b9f396ac1426777a8a76f02f528348bfe81f19ba5ebaa3.json @@ -0,0 +1,15 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE\n scheduler_witness_jobs_fri\n SET\n status = 'successful',\n updated_at = NOW(),\n time_taken = $1\n WHERE\n l1_batch_number = $2\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Time", + "Int8" + ] + }, + "nullable": [] + }, + "hash": "ab0c9b013d044a5f75b9f396ac1426777a8a76f02f528348bfe81f19ba5ebaa3" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-abc93d27a8673b23e18d050e84c43c868c63c853edb5c4f41e48a3cc6378eca9.json b/prover/crates/lib/prover_dal/.sqlx/query-abc93d27a8673b23e18d050e84c43c868c63c853edb5c4f41e48a3cc6378eca9.json deleted file mode 100644 index fae5c1041a5d..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-abc93d27a8673b23e18d050e84c43c868c63c853edb5c4f41e48a3cc6378eca9.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE node_aggregation_witness_jobs_fri\n SET\n status = 'queued'\n WHERE\n (l1_batch_number, circuit_id, depth) IN (\n SELECT\n prover_jobs_fri.l1_batch_number,\n prover_jobs_fri.circuit_id,\n prover_jobs_fri.depth\n FROM\n prover_jobs_fri\n JOIN node_aggregation_witness_jobs_fri nawj ON prover_jobs_fri.l1_batch_number = nawj.l1_batch_number\n AND prover_jobs_fri.circuit_id = nawj.circuit_id\n AND prover_jobs_fri.depth = nawj.depth\n WHERE\n nawj.status = 'waiting_for_proofs'\n AND prover_jobs_fri.status = 'successful'\n AND prover_jobs_fri.aggregation_round = 1\n AND prover_jobs_fri.depth = 0\n GROUP BY\n prover_jobs_fri.l1_batch_number,\n prover_jobs_fri.circuit_id,\n prover_jobs_fri.depth,\n nawj.number_of_dependent_jobs\n HAVING\n COUNT(*) = nawj.number_of_dependent_jobs\n )\n RETURNING\n l1_batch_number,\n circuit_id,\n depth;\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "l1_batch_number", - "type_info": "Int8" - }, - { - "ordinal": 1, - "name": "circuit_id", - "type_info": "Int2" - }, - { - "ordinal": 2, - "name": "depth", - "type_info": "Int4" - } - ], - "parameters": { - "Left": [] - }, - "nullable": [ - false, - false, - false - ] - }, - "hash": "abc93d27a8673b23e18d050e84c43c868c63c853edb5c4f41e48a3cc6378eca9" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-b25c66b9705b3f2fb8a3492f1bd20222e177262292241bd8cb89dbb9c1e74c2d.json b/prover/crates/lib/prover_dal/.sqlx/query-aed6242f090b249a03a3d8c1d801cef7a213d52ec4d393e1e2f3a40aa9e1d7e9.json similarity index 52% rename from prover/crates/lib/prover_dal/.sqlx/query-b25c66b9705b3f2fb8a3492f1bd20222e177262292241bd8cb89dbb9c1e74c2d.json rename to prover/crates/lib/prover_dal/.sqlx/query-aed6242f090b249a03a3d8c1d801cef7a213d52ec4d393e1e2f3a40aa9e1d7e9.json index d0c5d31aa3ec..81c161e8d772 100644 --- a/prover/crates/lib/prover_dal/.sqlx/query-b25c66b9705b3f2fb8a3492f1bd20222e177262292241bd8cb89dbb9c1e74c2d.json +++ b/prover/crates/lib/prover_dal/.sqlx/query-aed6242f090b249a03a3d8c1d801cef7a213d52ec4d393e1e2f3a40aa9e1d7e9.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n UPDATE witness_inputs_fri\n SET\n status = $1,\n updated_at = NOW()\n WHERE\n l1_batch_number = $2\n AND status != 'successful'\n ", + "query": "\n UPDATE\n recursion_tip_witness_jobs_fri\n SET\n status = 'failed',\n error = $1,\n updated_at = NOW()\n WHERE\n l1_batch_number = $2\n AND status != 'successful'\n ", "describe": { "columns": [], "parameters": { @@ -11,5 +11,5 @@ }, "nullable": [] }, - "hash": "b25c66b9705b3f2fb8a3492f1bd20222e177262292241bd8cb89dbb9c1e74c2d" + "hash": "aed6242f090b249a03a3d8c1d801cef7a213d52ec4d393e1e2f3a40aa9e1d7e9" } diff --git a/prover/crates/lib/prover_dal/.sqlx/query-b41dc55dcb9789e8c2907f53e11bd791fce9a86b6cadb2c8a2b2834bbe71fbd4.json b/prover/crates/lib/prover_dal/.sqlx/query-b41dc55dcb9789e8c2907f53e11bd791fce9a86b6cadb2c8a2b2834bbe71fbd4.json new file mode 100644 index 000000000000..e440589077e2 --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-b41dc55dcb9789e8c2907f53e11bd791fce9a86b6cadb2c8a2b2834bbe71fbd4.json @@ -0,0 +1,62 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE\n prover_jobs_fri\n SET\n status = 'in_progress',\n attempts = attempts + 1,\n processing_started_at = NOW(),\n updated_at = NOW(),\n picked_by = $5\n WHERE\n id = (\n SELECT\n pj.id\n FROM\n (\n SELECT\n *\n FROM\n UNNEST($1 :: SMALLINT [], $2 :: SMALLINT [])\n ) AS tuple (circuit_id, ROUND)\n JOIN LATERAL (\n SELECT\n *\n FROM\n prover_jobs_fri AS pj\n WHERE\n pj.status = 'queued'\n AND pj.protocol_version = $3\n AND pj.protocol_version_patch = $4\n AND pj.circuit_id = tuple.circuit_id\n AND pj.aggregation_round = tuple.round\n ORDER BY\n pj.l1_batch_number ASC,\n pj.id ASC\n LIMIT\n 1\n ) AS pj ON TRUE\n ORDER BY\n pj.l1_batch_number ASC,\n pj.aggregation_round DESC,\n pj.id ASC\n LIMIT\n 1 FOR\n UPDATE\n SKIP LOCKED\n )\n RETURNING\n prover_jobs_fri.id,\n prover_jobs_fri.l1_batch_number,\n prover_jobs_fri.circuit_id,\n prover_jobs_fri.aggregation_round,\n prover_jobs_fri.sequence_number,\n prover_jobs_fri.depth,\n prover_jobs_fri.is_node_final_proof\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "id", + "type_info": "Int8" + }, + { + "ordinal": 1, + "name": "l1_batch_number", + "type_info": "Int8" + }, + { + "ordinal": 2, + "name": "circuit_id", + "type_info": "Int2" + }, + { + "ordinal": 3, + "name": "aggregation_round", + "type_info": "Int2" + }, + { + "ordinal": 4, + "name": "sequence_number", + "type_info": "Int4" + }, + { + "ordinal": 5, + "name": "depth", + "type_info": "Int4" + }, + { + "ordinal": 6, + "name": "is_node_final_proof", + "type_info": "Bool" + } + ], + "parameters": { + "Left": [ + "Int2Array", + "Int2Array", + "Int4", + "Int4", + "Text" + ] + }, + "nullable": [ + false, + false, + false, + false, + false, + false, + false + ] + }, + "hash": "b41dc55dcb9789e8c2907f53e11bd791fce9a86b6cadb2c8a2b2834bbe71fbd4" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-b4687c54ac45145bc6a27162949fa244d5b3c2ae22b4850c9a536e4d54ce38d3.json b/prover/crates/lib/prover_dal/.sqlx/query-b4687c54ac45145bc6a27162949fa244d5b3c2ae22b4850c9a536e4d54ce38d3.json new file mode 100644 index 000000000000..38778c466d01 --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-b4687c54ac45145bc6a27162949fa244d5b3c2ae22b4850c9a536e4d54ce38d3.json @@ -0,0 +1,15 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE\n prover_jobs_fri\n SET\n status = $1,\n updated_at = NOW()\n WHERE\n id = $2\n AND status != 'successful'\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Text", + "Int8" + ] + }, + "nullable": [] + }, + "hash": "b4687c54ac45145bc6a27162949fa244d5b3c2ae22b4850c9a536e4d54ce38d3" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-b4794e6a0c2366d5d95ab373c310103263af3ff5cb6c9dc5df59d3cd2a5e56b4.json b/prover/crates/lib/prover_dal/.sqlx/query-b4794e6a0c2366d5d95ab373c310103263af3ff5cb6c9dc5df59d3cd2a5e56b4.json deleted file mode 100644 index 14b4115b30e8..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-b4794e6a0c2366d5d95ab373c310103263af3ff5cb6c9dc5df59d3cd2a5e56b4.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE gpu_prover_queue_fri\n SET\n instance_status = $1,\n updated_at = NOW()\n WHERE\n instance_host = $2::TEXT::inet\n AND instance_port = $3\n AND zone = $4\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Text", - "Text", - "Int4", - "Text" - ] - }, - "nullable": [] - }, - "hash": "b4794e6a0c2366d5d95ab373c310103263af3ff5cb6c9dc5df59d3cd2a5e56b4" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-b568f9cb9c2bd53b5dcde15f368a9dc31c7d51476f18cffa80cad653298ad252.json b/prover/crates/lib/prover_dal/.sqlx/query-b568f9cb9c2bd53b5dcde15f368a9dc31c7d51476f18cffa80cad653298ad252.json deleted file mode 100644 index 03d268477904..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-b568f9cb9c2bd53b5dcde15f368a9dc31c7d51476f18cffa80cad653298ad252.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n DELETE FROM proof_compression_jobs_fri\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [] - }, - "nullable": [] - }, - "hash": "b568f9cb9c2bd53b5dcde15f368a9dc31c7d51476f18cffa80cad653298ad252" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-b6835c57f5468a65731b7ddbd25cb86bd28dbda3ee3444f300da9f7d25930cae.json b/prover/crates/lib/prover_dal/.sqlx/query-b6835c57f5468a65731b7ddbd25cb86bd28dbda3ee3444f300da9f7d25930cae.json new file mode 100644 index 000000000000..7f65bdd42d73 --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-b6835c57f5468a65731b7ddbd25cb86bd28dbda3ee3444f300da9f7d25930cae.json @@ -0,0 +1,47 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE\n proof_compression_jobs_fri\n SET\n status = 'queued',\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n (\n status = 'in_progress'\n AND processing_started_at <= NOW() - $1 :: INTERVAL\n AND attempts < $2\n )\n OR (\n status = 'failed'\n AND attempts < $2\n )\n RETURNING\n l1_batch_number,\n status,\n attempts,\n error,\n picked_by\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "l1_batch_number", + "type_info": "Int8" + }, + { + "ordinal": 1, + "name": "status", + "type_info": "Text" + }, + { + "ordinal": 2, + "name": "attempts", + "type_info": "Int2" + }, + { + "ordinal": 3, + "name": "error", + "type_info": "Text" + }, + { + "ordinal": 4, + "name": "picked_by", + "type_info": "Text" + } + ], + "parameters": { + "Left": [ + "Interval", + "Int2" + ] + }, + "nullable": [ + false, + false, + false, + true, + true + ] + }, + "hash": "b6835c57f5468a65731b7ddbd25cb86bd28dbda3ee3444f300da9f7d25930cae" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-b6db24ad38dcc89646fdf50b51c61698aeed3f3de0994908fd7a655ff465f250.json b/prover/crates/lib/prover_dal/.sqlx/query-b6db24ad38dcc89646fdf50b51c61698aeed3f3de0994908fd7a655ff465f250.json new file mode 100644 index 000000000000..7b4ad67a15cc --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-b6db24ad38dcc89646fdf50b51c61698aeed3f3de0994908fd7a655ff465f250.json @@ -0,0 +1,32 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE\n node_aggregation_witness_jobs_fri\n SET\n status = 'queued'\n WHERE\n (l1_batch_number, circuit_id, depth) IN (\n SELECT\n prover_jobs_fri.l1_batch_number,\n prover_jobs_fri.circuit_id,\n prover_jobs_fri.depth\n FROM\n prover_jobs_fri\n JOIN node_aggregation_witness_jobs_fri nawj ON prover_jobs_fri.l1_batch_number = nawj.l1_batch_number\n AND prover_jobs_fri.circuit_id = nawj.circuit_id\n AND prover_jobs_fri.depth = nawj.depth\n WHERE\n nawj.status = 'waiting_for_proofs'\n AND prover_jobs_fri.status = 'successful'\n AND prover_jobs_fri.aggregation_round = 1\n AND prover_jobs_fri.depth = 0\n GROUP BY\n prover_jobs_fri.l1_batch_number,\n prover_jobs_fri.circuit_id,\n prover_jobs_fri.depth,\n nawj.number_of_dependent_jobs\n HAVING\n COUNT(*) = nawj.number_of_dependent_jobs\n )\n RETURNING\n l1_batch_number,\n circuit_id,\n depth;\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "l1_batch_number", + "type_info": "Int8" + }, + { + "ordinal": 1, + "name": "circuit_id", + "type_info": "Int2" + }, + { + "ordinal": 2, + "name": "depth", + "type_info": "Int4" + } + ], + "parameters": { + "Left": [] + }, + "nullable": [ + false, + false, + false + ] + }, + "hash": "b6db24ad38dcc89646fdf50b51c61698aeed3f3de0994908fd7a655ff465f250" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-ba29cedd1fd713745a016c391f3ad70e48d1171fbdc1c929e1d004e73805d4e9.json b/prover/crates/lib/prover_dal/.sqlx/query-ba29cedd1fd713745a016c391f3ad70e48d1171fbdc1c929e1d004e73805d4e9.json new file mode 100644 index 000000000000..53f89affed3d --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-ba29cedd1fd713745a016c391f3ad70e48d1171fbdc1c929e1d004e73805d4e9.json @@ -0,0 +1,26 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE\n leaf_aggregation_witness_jobs_fri\n SET\n status = 'queued'\n WHERE\n (l1_batch_number, circuit_id) IN (\n SELECT\n prover_jobs_fri.l1_batch_number,\n prover_jobs_fri.circuit_id\n FROM\n prover_jobs_fri\n JOIN leaf_aggregation_witness_jobs_fri lawj ON prover_jobs_fri.l1_batch_number = lawj.l1_batch_number\n AND prover_jobs_fri.circuit_id = lawj.circuit_id\n WHERE\n lawj.status = 'waiting_for_proofs'\n AND prover_jobs_fri.status = 'successful'\n AND prover_jobs_fri.aggregation_round = 0\n GROUP BY\n prover_jobs_fri.l1_batch_number,\n prover_jobs_fri.circuit_id,\n lawj.number_of_basic_circuits\n HAVING\n COUNT(*) = lawj.number_of_basic_circuits\n )\n RETURNING\n l1_batch_number,\n circuit_id;\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "l1_batch_number", + "type_info": "Int8" + }, + { + "ordinal": 1, + "name": "circuit_id", + "type_info": "Int2" + } + ], + "parameters": { + "Left": [] + }, + "nullable": [ + false, + false + ] + }, + "hash": "ba29cedd1fd713745a016c391f3ad70e48d1171fbdc1c929e1d004e73805d4e9" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-bbced31c8d9ec17dd994c7de71b9e36eb532235d016c31ae8d86455506dd7a80.json b/prover/crates/lib/prover_dal/.sqlx/query-bbced31c8d9ec17dd994c7de71b9e36eb532235d016c31ae8d86455506dd7a80.json new file mode 100644 index 000000000000..27296cae3edf --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-bbced31c8d9ec17dd994c7de71b9e36eb532235d016c31ae8d86455506dd7a80.json @@ -0,0 +1,22 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE\n recursion_tip_witness_jobs_fri\n SET\n status = 'queued'\n WHERE\n l1_batch_number IN (\n SELECT\n prover_jobs_fri.l1_batch_number\n FROM\n prover_jobs_fri\n JOIN recursion_tip_witness_jobs_fri rtwj ON prover_jobs_fri.l1_batch_number = rtwj.l1_batch_number\n WHERE\n rtwj.status = 'waiting_for_proofs'\n AND prover_jobs_fri.status = 'successful'\n AND prover_jobs_fri.aggregation_round = $1\n AND prover_jobs_fri.is_node_final_proof = TRUE\n GROUP BY\n prover_jobs_fri.l1_batch_number,\n rtwj.number_of_final_node_jobs\n HAVING\n COUNT(*) = rtwj.number_of_final_node_jobs\n )\n RETURNING\n l1_batch_number;\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "l1_batch_number", + "type_info": "Int8" + } + ], + "parameters": { + "Left": [ + "Int2" + ] + }, + "nullable": [ + false + ] + }, + "hash": "bbced31c8d9ec17dd994c7de71b9e36eb532235d016c31ae8d86455506dd7a80" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-bc0b9c8d1bc2e1c782bd1fb8df16682c19f3f44dd424c81e0f8e94c59f4a8780.json b/prover/crates/lib/prover_dal/.sqlx/query-bc0b9c8d1bc2e1c782bd1fb8df16682c19f3f44dd424c81e0f8e94c59f4a8780.json new file mode 100644 index 000000000000..2e1e9f499ff7 --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-bc0b9c8d1bc2e1c782bd1fb8df16682c19f3f44dd424c81e0f8e94c59f4a8780.json @@ -0,0 +1,47 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE\n scheduler_witness_jobs_fri\n SET\n status = 'queued',\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n (\n status = 'in_progress'\n AND processing_started_at <= NOW() - $1 :: INTERVAL\n AND attempts < $2\n )\n OR (\n status = 'failed'\n AND attempts < $2\n )\n RETURNING\n l1_batch_number,\n status,\n attempts,\n error,\n picked_by\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "l1_batch_number", + "type_info": "Int8" + }, + { + "ordinal": 1, + "name": "status", + "type_info": "Text" + }, + { + "ordinal": 2, + "name": "attempts", + "type_info": "Int2" + }, + { + "ordinal": 3, + "name": "error", + "type_info": "Text" + }, + { + "ordinal": 4, + "name": "picked_by", + "type_info": "Text" + } + ], + "parameters": { + "Left": [ + "Interval", + "Int2" + ] + }, + "nullable": [ + false, + false, + false, + true, + true + ] + }, + "hash": "bc0b9c8d1bc2e1c782bd1fb8df16682c19f3f44dd424c81e0f8e94c59f4a8780" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-bc9ddab523f9a35809cfded7b18a13c70062609adca4c60274ba19cde990727c.json b/prover/crates/lib/prover_dal/.sqlx/query-bc9ddab523f9a35809cfded7b18a13c70062609adca4c60274ba19cde990727c.json new file mode 100644 index 000000000000..b47a30ac584b --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-bc9ddab523f9a35809cfded7b18a13c70062609adca4c60274ba19cde990727c.json @@ -0,0 +1,53 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE\n prover_jobs_fri\n SET\n status = 'queued',\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n id IN (\n SELECT\n id\n FROM\n prover_jobs_fri\n WHERE\n (\n status IN ('in_progress', 'in_gpu_proof')\n AND processing_started_at <= NOW() - $1 :: INTERVAL\n AND attempts < $2\n )\n OR (\n status = 'failed'\n AND attempts < $2\n ) FOR\n UPDATE\n SKIP LOCKED\n )\n RETURNING\n id,\n status,\n attempts,\n circuit_id,\n error,\n picked_by\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "id", + "type_info": "Int8" + }, + { + "ordinal": 1, + "name": "status", + "type_info": "Text" + }, + { + "ordinal": 2, + "name": "attempts", + "type_info": "Int2" + }, + { + "ordinal": 3, + "name": "circuit_id", + "type_info": "Int2" + }, + { + "ordinal": 4, + "name": "error", + "type_info": "Text" + }, + { + "ordinal": 5, + "name": "picked_by", + "type_info": "Text" + } + ], + "parameters": { + "Left": [ + "Interval", + "Int2" + ] + }, + "nullable": [ + false, + false, + false, + false, + true, + true + ] + }, + "hash": "bc9ddab523f9a35809cfded7b18a13c70062609adca4c60274ba19cde990727c" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-bcc5d3d35652f49b41d4ee673b171570fc88c17822bebd5b92e3b2f726d9af3a.json b/prover/crates/lib/prover_dal/.sqlx/query-bcc5d3d35652f49b41d4ee673b171570fc88c17822bebd5b92e3b2f726d9af3a.json deleted file mode 100644 index ab1c2dd6552a..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-bcc5d3d35652f49b41d4ee673b171570fc88c17822bebd5b92e3b2f726d9af3a.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE witness_inputs_fri\n SET\n status = 'queued',\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n (\n status = 'in_progress'\n AND processing_started_at <= NOW() - $1::INTERVAL\n AND attempts < $2\n )\n OR (\n status = 'failed'\n AND attempts < $2\n )\n RETURNING\n l1_batch_number,\n status,\n attempts,\n error,\n picked_by\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "l1_batch_number", - "type_info": "Int8" - }, - { - "ordinal": 1, - "name": "status", - "type_info": "Text" - }, - { - "ordinal": 2, - "name": "attempts", - "type_info": "Int2" - }, - { - "ordinal": 3, - "name": "error", - "type_info": "Text" - }, - { - "ordinal": 4, - "name": "picked_by", - "type_info": "Text" - } - ], - "parameters": { - "Left": [ - "Interval", - "Int2" - ] - }, - "nullable": [ - false, - false, - false, - true, - true - ] - }, - "hash": "bcc5d3d35652f49b41d4ee673b171570fc88c17822bebd5b92e3b2f726d9af3a" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-bf06bd08d8ccf67fc00bbc364715263556f258565f79cbb40f5ecc1a4f6402f5.json b/prover/crates/lib/prover_dal/.sqlx/query-bf06bd08d8ccf67fc00bbc364715263556f258565f79cbb40f5ecc1a4f6402f5.json deleted file mode 100644 index c1f9806625dd..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-bf06bd08d8ccf67fc00bbc364715263556f258565f79cbb40f5ecc1a4f6402f5.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE recursion_tip_witness_jobs_fri\n SET\n status = 'failed',\n error = $1,\n updated_at = NOW()\n WHERE\n l1_batch_number = $2\n AND status != 'successful'\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Text", - "Int8" - ] - }, - "nullable": [] - }, - "hash": "bf06bd08d8ccf67fc00bbc364715263556f258565f79cbb40f5ecc1a4f6402f5" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-bfbc5a8bc212991873fbf722b6f3c0c5544cb14cc06baa46cd7ecc329bba7b49.json b/prover/crates/lib/prover_dal/.sqlx/query-bfbc5a8bc212991873fbf722b6f3c0c5544cb14cc06baa46cd7ecc329bba7b49.json new file mode 100644 index 000000000000..9f5d3fc7921d --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-bfbc5a8bc212991873fbf722b6f3c0c5544cb14cc06baa46cd7ecc329bba7b49.json @@ -0,0 +1,60 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE\n prover_jobs_fri\n SET\n status = 'in_progress',\n attempts = attempts + 1,\n updated_at = NOW(),\n processing_started_at = NOW(),\n picked_by = $3\n WHERE\n id = (\n SELECT\n id\n FROM\n prover_jobs_fri\n WHERE\n status = 'queued'\n AND protocol_version = $1\n AND protocol_version_patch = $2\n ORDER BY\n aggregation_round DESC,\n l1_batch_number ASC,\n id ASC\n LIMIT\n 1 FOR\n UPDATE\n SKIP LOCKED\n )\n RETURNING\n prover_jobs_fri.id,\n prover_jobs_fri.l1_batch_number,\n prover_jobs_fri.circuit_id,\n prover_jobs_fri.aggregation_round,\n prover_jobs_fri.sequence_number,\n prover_jobs_fri.depth,\n prover_jobs_fri.is_node_final_proof\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "id", + "type_info": "Int8" + }, + { + "ordinal": 1, + "name": "l1_batch_number", + "type_info": "Int8" + }, + { + "ordinal": 2, + "name": "circuit_id", + "type_info": "Int2" + }, + { + "ordinal": 3, + "name": "aggregation_round", + "type_info": "Int2" + }, + { + "ordinal": 4, + "name": "sequence_number", + "type_info": "Int4" + }, + { + "ordinal": 5, + "name": "depth", + "type_info": "Int4" + }, + { + "ordinal": 6, + "name": "is_node_final_proof", + "type_info": "Bool" + } + ], + "parameters": { + "Left": [ + "Int4", + "Int4", + "Text" + ] + }, + "nullable": [ + false, + false, + false, + false, + false, + false, + false + ] + }, + "hash": "bfbc5a8bc212991873fbf722b6f3c0c5544cb14cc06baa46cd7ecc329bba7b49" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-548414f8148740c991c345e5fd46ea738d209eb07e7a6bcbdb33e25b3347a08c.json b/prover/crates/lib/prover_dal/.sqlx/query-c0effa8e455c1a09c205994e58569f22d450a0fb0f10eb391b058f650d99ef71.json similarity index 51% rename from prover/crates/lib/prover_dal/.sqlx/query-548414f8148740c991c345e5fd46ea738d209eb07e7a6bcbdb33e25b3347a08c.json rename to prover/crates/lib/prover_dal/.sqlx/query-c0effa8e455c1a09c205994e58569f22d450a0fb0f10eb391b058f650d99ef71.json index 8f5b046b974f..060dfd435264 100644 --- a/prover/crates/lib/prover_dal/.sqlx/query-548414f8148740c991c345e5fd46ea738d209eb07e7a6bcbdb33e25b3347a08c.json +++ b/prover/crates/lib/prover_dal/.sqlx/query-c0effa8e455c1a09c205994e58569f22d450a0fb0f10eb391b058f650d99ef71.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n UPDATE witness_inputs_fri\n SET\n status = 'queued',\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n l1_batch_number = $1\n AND attempts >= $2\n AND (status = 'in_progress' OR status = 'failed')\n RETURNING\n l1_batch_number,\n status,\n attempts,\n error,\n picked_by\n ", + "query": "\n UPDATE\n witness_inputs_fri\n SET\n status = 'queued',\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n l1_batch_number = $1\n AND attempts >= $2\n AND (\n status = 'in_progress'\n OR status = 'failed'\n )\n RETURNING\n l1_batch_number,\n status,\n attempts,\n error,\n picked_by\n ", "describe": { "columns": [ { @@ -43,5 +43,5 @@ true ] }, - "hash": "548414f8148740c991c345e5fd46ea738d209eb07e7a6bcbdb33e25b3347a08c" + "hash": "c0effa8e455c1a09c205994e58569f22d450a0fb0f10eb391b058f650d99ef71" } diff --git a/prover/crates/lib/prover_dal/.sqlx/query-c340c043c938bf5f4b63d57a1654775c6f7414c7bed75d33b61de00fdbabc349.json b/prover/crates/lib/prover_dal/.sqlx/query-c340c043c938bf5f4b63d57a1654775c6f7414c7bed75d33b61de00fdbabc349.json deleted file mode 100644 index 41edb649e7c9..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-c340c043c938bf5f4b63d57a1654775c6f7414c7bed75d33b61de00fdbabc349.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE prover_jobs_fri\n SET\n status = $1,\n updated_at = NOW()\n WHERE\n id = $2\n AND status != 'successful'\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Text", - "Int8" - ] - }, - "nullable": [] - }, - "hash": "c340c043c938bf5f4b63d57a1654775c6f7414c7bed75d33b61de00fdbabc349" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-764693ceeb45f8478a20242b592d419667f11d80036cda021ecbf23b0b5f7f42.json b/prover/crates/lib/prover_dal/.sqlx/query-c5ddcf14f794c0b329efc7802c201f40b839fecf8c4388ec0c0089b1548fef08.json similarity index 54% rename from prover/crates/lib/prover_dal/.sqlx/query-764693ceeb45f8478a20242b592d419667f11d80036cda021ecbf23b0b5f7f42.json rename to prover/crates/lib/prover_dal/.sqlx/query-c5ddcf14f794c0b329efc7802c201f40b839fecf8c4388ec0c0089b1548fef08.json index aac0fcd420cd..c115530d8aa7 100644 --- a/prover/crates/lib/prover_dal/.sqlx/query-764693ceeb45f8478a20242b592d419667f11d80036cda021ecbf23b0b5f7f42.json +++ b/prover/crates/lib/prover_dal/.sqlx/query-c5ddcf14f794c0b329efc7802c201f40b839fecf8c4388ec0c0089b1548fef08.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n node_aggregation_witness_jobs_fri (\n l1_batch_number,\n circuit_id,\n depth,\n aggregations_url,\n number_of_dependent_jobs,\n protocol_version,\n status,\n created_at,\n updated_at,\n protocol_version_patch\n )\n VALUES\n ($1, $2, $3, $4, $5, $6, 'waiting_for_proofs', NOW(), NOW(), $7)\n ON CONFLICT (l1_batch_number, circuit_id, depth) DO\n UPDATE\n SET\n updated_at = NOW()\n ", + "query": "\n INSERT INTO\n node_aggregation_witness_jobs_fri (\n l1_batch_number,\n circuit_id,\n depth,\n aggregations_url,\n number_of_dependent_jobs,\n protocol_version,\n status,\n created_at,\n updated_at,\n protocol_version_patch\n )\n VALUES\n (\n $1,\n $2,\n $3,\n $4,\n $5,\n $6,\n 'waiting_for_proofs',\n NOW(),\n NOW(),\n $7\n ) ON CONFLICT (l1_batch_number, circuit_id, depth) DO\n UPDATE\n SET\n updated_at = NOW()\n ", "describe": { "columns": [], "parameters": { @@ -16,5 +16,5 @@ }, "nullable": [] }, - "hash": "764693ceeb45f8478a20242b592d419667f11d80036cda021ecbf23b0b5f7f42" + "hash": "c5ddcf14f794c0b329efc7802c201f40b839fecf8c4388ec0c0089b1548fef08" } diff --git a/prover/crates/lib/prover_dal/.sqlx/query-c706a49ff54f6b424e24d061fe7ac429aac3c030f7e226a1264243d8cdae038d.json b/prover/crates/lib/prover_dal/.sqlx/query-c706a49ff54f6b424e24d061fe7ac429aac3c030f7e226a1264243d8cdae038d.json deleted file mode 100644 index 95ae04bed503..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-c706a49ff54f6b424e24d061fe7ac429aac3c030f7e226a1264243d8cdae038d.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE proof_compression_jobs_fri\n SET\n status = $1,\n updated_at = NOW(),\n time_taken = $2,\n l1_proof_blob_url = $3\n WHERE\n l1_batch_number = $4\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Text", - "Time", - "Text", - "Int8" - ] - }, - "nullable": [] - }, - "hash": "c706a49ff54f6b424e24d061fe7ac429aac3c030f7e226a1264243d8cdae038d" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-ca219864909a8b41ea5d4438235d24b3f001a2d4ea0da817e69f3816d43ce73b.json b/prover/crates/lib/prover_dal/.sqlx/query-ca219864909a8b41ea5d4438235d24b3f001a2d4ea0da817e69f3816d43ce73b.json new file mode 100644 index 000000000000..aa3e418ffc96 --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-ca219864909a8b41ea5d4438235d24b3f001a2d4ea0da817e69f3816d43ce73b.json @@ -0,0 +1,12 @@ +{ + "db_name": "PostgreSQL", + "query": "\n DELETE FROM\n gpu_prover_queue_fri\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [] + }, + "nullable": [] + }, + "hash": "ca219864909a8b41ea5d4438235d24b3f001a2d4ea0da817e69f3816d43ce73b" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-cc686271a43d1ba657630e1eb702f85ac05423fdcd31c7e27c42cfd2e85b6cb1.json b/prover/crates/lib/prover_dal/.sqlx/query-cc686271a43d1ba657630e1eb702f85ac05423fdcd31c7e27c42cfd2e85b6cb1.json new file mode 100644 index 000000000000..885384b04d45 --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-cc686271a43d1ba657630e1eb702f85ac05423fdcd31c7e27c42cfd2e85b6cb1.json @@ -0,0 +1,25 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE\n witness_inputs_fri\n SET\n status = 'in_progress',\n attempts = attempts + 1,\n updated_at = NOW(),\n processing_started_at = NOW(),\n picked_by = $3\n WHERE\n l1_batch_number = (\n SELECT\n l1_batch_number\n FROM\n witness_inputs_fri\n WHERE\n l1_batch_number <= $1\n AND status = 'queued'\n AND protocol_version = $2\n AND protocol_version_patch = $4\n ORDER BY\n l1_batch_number ASC\n LIMIT\n 1 FOR\n UPDATE\n SKIP LOCKED\n )\n RETURNING\n witness_inputs_fri.l1_batch_number\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "l1_batch_number", + "type_info": "Int8" + } + ], + "parameters": { + "Left": [ + "Int8", + "Int4", + "Text", + "Int4" + ] + }, + "nullable": [ + false + ] + }, + "hash": "cc686271a43d1ba657630e1eb702f85ac05423fdcd31c7e27c42cfd2e85b6cb1" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-d0be28042b50199075cb0eca26f6b93bfd5d96fdc68732fe38c79ccd44b84def.json b/prover/crates/lib/prover_dal/.sqlx/query-d0be28042b50199075cb0eca26f6b93bfd5d96fdc68732fe38c79ccd44b84def.json deleted file mode 100644 index 3943480b896d..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-d0be28042b50199075cb0eca26f6b93bfd5d96fdc68732fe38c79ccd44b84def.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE prover_jobs_fri\n SET\n status = 'queued',\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n id IN (\n SELECT\n id\n FROM\n prover_jobs_fri\n WHERE\n (\n status IN ('in_progress', 'in_gpu_proof')\n AND processing_started_at <= NOW() - $1::INTERVAL\n AND attempts < $2\n )\n OR (\n status = 'failed'\n AND attempts < $2\n )\n FOR UPDATE\n SKIP LOCKED\n )\n RETURNING\n id,\n status,\n attempts,\n circuit_id,\n error,\n picked_by\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "id", - "type_info": "Int8" - }, - { - "ordinal": 1, - "name": "status", - "type_info": "Text" - }, - { - "ordinal": 2, - "name": "attempts", - "type_info": "Int2" - }, - { - "ordinal": 3, - "name": "circuit_id", - "type_info": "Int2" - }, - { - "ordinal": 4, - "name": "error", - "type_info": "Text" - }, - { - "ordinal": 5, - "name": "picked_by", - "type_info": "Text" - } - ], - "parameters": { - "Left": [ - "Interval", - "Int2" - ] - }, - "nullable": [ - false, - false, - false, - false, - true, - true - ] - }, - "hash": "d0be28042b50199075cb0eca26f6b93bfd5d96fdc68732fe38c79ccd44b84def" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-75c1affbca0901edd5d0e2f12ef4d935674a5aff2f34421d753b4d1a9dea5b12.json b/prover/crates/lib/prover_dal/.sqlx/query-d21a3d43542ffbd22d6b55c5787b86ce94a1379a01ec3ebb41aa9a210d589d08.json similarity index 51% rename from prover/crates/lib/prover_dal/.sqlx/query-75c1affbca0901edd5d0e2f12ef4d935674a5aff2f34421d753b4d1a9dea5b12.json rename to prover/crates/lib/prover_dal/.sqlx/query-d21a3d43542ffbd22d6b55c5787b86ce94a1379a01ec3ebb41aa9a210d589d08.json index 14463ecbe426..beb24cf6a578 100644 --- a/prover/crates/lib/prover_dal/.sqlx/query-75c1affbca0901edd5d0e2f12ef4d935674a5aff2f34421d753b4d1a9dea5b12.json +++ b/prover/crates/lib/prover_dal/.sqlx/query-d21a3d43542ffbd22d6b55c5787b86ce94a1379a01ec3ebb41aa9a210d589d08.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n UPDATE scheduler_witness_jobs_fri\n SET\n status = 'queued',\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n l1_batch_number = $1\n AND attempts >= $2\n AND (status = 'in_progress' OR status = 'failed')\n RETURNING\n l1_batch_number,\n status,\n attempts,\n error,\n picked_by\n ", + "query": "\n UPDATE\n recursion_tip_witness_jobs_fri\n SET\n status = 'queued',\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n l1_batch_number = $1\n AND attempts >= $2\n AND (\n status = 'in_progress'\n OR status = 'failed'\n )\n RETURNING\n l1_batch_number,\n status,\n attempts,\n error,\n picked_by\n ", "describe": { "columns": [ { @@ -43,5 +43,5 @@ true ] }, - "hash": "75c1affbca0901edd5d0e2f12ef4d935674a5aff2f34421d753b4d1a9dea5b12" + "hash": "d21a3d43542ffbd22d6b55c5787b86ce94a1379a01ec3ebb41aa9a210d589d08" } diff --git a/prover/crates/lib/prover_dal/.sqlx/query-d4949debfe0dc5112204cd196c68b02c44b099e27e3c45c5c810cd5fcd8884ed.json b/prover/crates/lib/prover_dal/.sqlx/query-d4949debfe0dc5112204cd196c68b02c44b099e27e3c45c5c810cd5fcd8884ed.json deleted file mode 100644 index 9121539b3179..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-d4949debfe0dc5112204cd196c68b02c44b099e27e3c45c5c810cd5fcd8884ed.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE witness_inputs_fri\n SET\n status = 'failed',\n error = $1,\n updated_at = NOW()\n WHERE\n l1_batch_number = $2\n AND status != 'successful'\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Text", - "Int8" - ] - }, - "nullable": [] - }, - "hash": "d4949debfe0dc5112204cd196c68b02c44b099e27e3c45c5c810cd5fcd8884ed" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-d91c931e2a14cf1183a608d041fc6fadb8e12a9218399d189b4d95e2ca4fcc48.json b/prover/crates/lib/prover_dal/.sqlx/query-d91c931e2a14cf1183a608d041fc6fadb8e12a9218399d189b4d95e2ca4fcc48.json deleted file mode 100644 index c353ecf1bad3..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-d91c931e2a14cf1183a608d041fc6fadb8e12a9218399d189b4d95e2ca4fcc48.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE witness_inputs_fri\n SET\n status = 'in_progress',\n attempts = attempts + 1,\n updated_at = NOW(),\n processing_started_at = NOW(),\n picked_by = $3\n WHERE\n l1_batch_number = (\n SELECT\n l1_batch_number\n FROM\n witness_inputs_fri\n WHERE\n l1_batch_number <= $1\n AND status = 'queued'\n AND protocol_version = $2\n AND protocol_version_patch = $4\n ORDER BY\n l1_batch_number ASC\n LIMIT\n 1\n FOR UPDATE\n SKIP LOCKED\n )\n RETURNING\n witness_inputs_fri.l1_batch_number\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "l1_batch_number", - "type_info": "Int8" - } - ], - "parameters": { - "Left": [ - "Int8", - "Int4", - "Text", - "Int4" - ] - }, - "nullable": [ - false - ] - }, - "hash": "d91c931e2a14cf1183a608d041fc6fadb8e12a9218399d189b4d95e2ca4fcc48" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-db3e74f0e83ffbf84a6d61e560f2060fbea775dc185f639139fbfd23e4d5f3c6.json b/prover/crates/lib/prover_dal/.sqlx/query-db3e74f0e83ffbf84a6d61e560f2060fbea775dc185f639139fbfd23e4d5f3c6.json deleted file mode 100644 index d9f7527dfa00..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-db3e74f0e83ffbf84a6d61e560f2060fbea775dc185f639139fbfd23e4d5f3c6.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE node_aggregation_witness_jobs_fri\n SET\n status = 'successful',\n updated_at = NOW(),\n time_taken = $1\n WHERE\n id = $2\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Time", - "Int8" - ] - }, - "nullable": [] - }, - "hash": "db3e74f0e83ffbf84a6d61e560f2060fbea775dc185f639139fbfd23e4d5f3c6" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-dcd3fdf29bb629a4398df652b016b80c122699e003028b14a0530e2fba5f5b23.json b/prover/crates/lib/prover_dal/.sqlx/query-dcd3fdf29bb629a4398df652b016b80c122699e003028b14a0530e2fba5f5b23.json new file mode 100644 index 000000000000..ea6c6e13a873 --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-dcd3fdf29bb629a4398df652b016b80c122699e003028b14a0530e2fba5f5b23.json @@ -0,0 +1,16 @@ +{ + "db_name": "PostgreSQL", + "query": "\n INSERT INTO\n prover_fri_protocol_versions (\n id,\n snark_wrapper_vk_hash,\n created_at,\n protocol_version_patch\n )\n VALUES\n ($1, $2, NOW(), $3) ON CONFLICT (id, protocol_version_patch) DO NOTHING\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int4", + "Bytea", + "Int4" + ] + }, + "nullable": [] + }, + "hash": "dcd3fdf29bb629a4398df652b016b80c122699e003028b14a0530e2fba5f5b23" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-deb56a8ff986f469a19db676be79ad7df6c6b0e29981439d94dc081d4fad3cba.json b/prover/crates/lib/prover_dal/.sqlx/query-deb56a8ff986f469a19db676be79ad7df6c6b0e29981439d94dc081d4fad3cba.json new file mode 100644 index 000000000000..719e31d94042 --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-deb56a8ff986f469a19db676be79ad7df6c6b0e29981439d94dc081d4fad3cba.json @@ -0,0 +1,32 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE\n node_aggregation_witness_jobs_fri\n SET\n status = 'queued'\n WHERE\n (l1_batch_number, circuit_id, depth) IN (\n SELECT\n prover_jobs_fri.l1_batch_number,\n prover_jobs_fri.circuit_id,\n prover_jobs_fri.depth\n FROM\n prover_jobs_fri\n JOIN node_aggregation_witness_jobs_fri nawj ON prover_jobs_fri.l1_batch_number = nawj.l1_batch_number\n AND prover_jobs_fri.circuit_id = nawj.circuit_id\n AND prover_jobs_fri.depth = nawj.depth\n WHERE\n nawj.status = 'waiting_for_proofs'\n AND prover_jobs_fri.status = 'successful'\n AND prover_jobs_fri.aggregation_round = 2\n GROUP BY\n prover_jobs_fri.l1_batch_number,\n prover_jobs_fri.circuit_id,\n prover_jobs_fri.depth,\n nawj.number_of_dependent_jobs\n HAVING\n COUNT(*) = nawj.number_of_dependent_jobs\n )\n RETURNING\n l1_batch_number,\n circuit_id,\n depth;\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "l1_batch_number", + "type_info": "Int8" + }, + { + "ordinal": 1, + "name": "circuit_id", + "type_info": "Int2" + }, + { + "ordinal": 2, + "name": "depth", + "type_info": "Int4" + } + ], + "parameters": { + "Left": [] + }, + "nullable": [ + false, + false, + false + ] + }, + "hash": "deb56a8ff986f469a19db676be79ad7df6c6b0e29981439d94dc081d4fad3cba" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-e068fc601d0e579f1ada02665aa4e83cc39c941282257e0c9a488bcb52f63dd2.json b/prover/crates/lib/prover_dal/.sqlx/query-e068fc601d0e579f1ada02665aa4e83cc39c941282257e0c9a488bcb52f63dd2.json new file mode 100644 index 000000000000..4f09270666ba --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-e068fc601d0e579f1ada02665aa4e83cc39c941282257e0c9a488bcb52f63dd2.json @@ -0,0 +1,18 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE\n proof_compression_jobs_fri\n SET\n status = $1,\n error = $2,\n updated_at = NOW()\n WHERE\n l1_batch_number = $3\n AND status != $4\n AND status != $5\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Text", + "Text", + "Int8", + "Text", + "Text" + ] + }, + "nullable": [] + }, + "hash": "e068fc601d0e579f1ada02665aa4e83cc39c941282257e0c9a488bcb52f63dd2" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-e09cff7ded7376ab0cec94e05e24f3fe0a8d05c55536b230594c1e1f17e0d9d8.json b/prover/crates/lib/prover_dal/.sqlx/query-e09cff7ded7376ab0cec94e05e24f3fe0a8d05c55536b230594c1e1f17e0d9d8.json new file mode 100644 index 000000000000..0381ba2ca208 --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-e09cff7ded7376ab0cec94e05e24f3fe0a8d05c55536b230594c1e1f17e0d9d8.json @@ -0,0 +1,47 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE\n witness_inputs_fri\n SET\n status = 'queued',\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n (\n status = 'in_progress'\n AND processing_started_at <= NOW() - $1 :: INTERVAL\n AND attempts < $2\n )\n OR (\n status = 'failed'\n AND attempts < $2\n )\n RETURNING\n l1_batch_number,\n status,\n attempts,\n error,\n picked_by\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "l1_batch_number", + "type_info": "Int8" + }, + { + "ordinal": 1, + "name": "status", + "type_info": "Text" + }, + { + "ordinal": 2, + "name": "attempts", + "type_info": "Int2" + }, + { + "ordinal": 3, + "name": "error", + "type_info": "Text" + }, + { + "ordinal": 4, + "name": "picked_by", + "type_info": "Text" + } + ], + "parameters": { + "Left": [ + "Interval", + "Int2" + ] + }, + "nullable": [ + false, + false, + false, + true, + true + ] + }, + "hash": "e09cff7ded7376ab0cec94e05e24f3fe0a8d05c55536b230594c1e1f17e0d9d8" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-e2e7991f27b4d58911cb7c6daa568f529dce53a9e2b37adf73c88e3dd64d461a.json b/prover/crates/lib/prover_dal/.sqlx/query-e2e7991f27b4d58911cb7c6daa568f529dce53a9e2b37adf73c88e3dd64d461a.json new file mode 100644 index 000000000000..32f7bd9851eb --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-e2e7991f27b4d58911cb7c6daa568f529dce53a9e2b37adf73c88e3dd64d461a.json @@ -0,0 +1,15 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE\n witness_inputs_fri\n SET\n status = $1,\n updated_at = NOW()\n WHERE\n l1_batch_number = $2\n AND status != 'successful'\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Text", + "Int8" + ] + }, + "nullable": [] + }, + "hash": "e2e7991f27b4d58911cb7c6daa568f529dce53a9e2b37adf73c88e3dd64d461a" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-e495b78add1c942d89d806e228093a4eb2ee0284aa89bca1ba958f470a2d6254.json b/prover/crates/lib/prover_dal/.sqlx/query-e495b78add1c942d89d806e228093a4eb2ee0284aa89bca1ba958f470a2d6254.json deleted file mode 100644 index 6594b6ee76c9..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-e495b78add1c942d89d806e228093a4eb2ee0284aa89bca1ba958f470a2d6254.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n DELETE FROM prover_jobs_fri\n WHERE\n l1_batch_number = $1;\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8" - ] - }, - "nullable": [] - }, - "hash": "e495b78add1c942d89d806e228093a4eb2ee0284aa89bca1ba958f470a2d6254" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-e743af4c18ec91eb46db5a19556fba74ec2cfc3c89c7e4e2ea475c3ce4092849.json b/prover/crates/lib/prover_dal/.sqlx/query-e743af4c18ec91eb46db5a19556fba74ec2cfc3c89c7e4e2ea475c3ce4092849.json deleted file mode 100644 index af6210ae91e4..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-e743af4c18ec91eb46db5a19556fba74ec2cfc3c89c7e4e2ea475c3ce4092849.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE leaf_aggregation_witness_jobs_fri\n SET\n status = 'queued'\n WHERE\n (l1_batch_number, circuit_id) IN (\n SELECT\n prover_jobs_fri.l1_batch_number,\n prover_jobs_fri.circuit_id\n FROM\n prover_jobs_fri\n JOIN leaf_aggregation_witness_jobs_fri lawj ON prover_jobs_fri.l1_batch_number = lawj.l1_batch_number\n AND prover_jobs_fri.circuit_id = lawj.circuit_id\n WHERE\n lawj.status = 'waiting_for_proofs'\n AND prover_jobs_fri.status = 'successful'\n AND prover_jobs_fri.aggregation_round = 0\n GROUP BY\n prover_jobs_fri.l1_batch_number,\n prover_jobs_fri.circuit_id,\n lawj.number_of_basic_circuits\n HAVING\n COUNT(*) = lawj.number_of_basic_circuits\n )\n RETURNING\n l1_batch_number,\n circuit_id;\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "l1_batch_number", - "type_info": "Int8" - }, - { - "ordinal": 1, - "name": "circuit_id", - "type_info": "Int2" - } - ], - "parameters": { - "Left": [] - }, - "nullable": [ - false, - false - ] - }, - "hash": "e743af4c18ec91eb46db5a19556fba74ec2cfc3c89c7e4e2ea475c3ce4092849" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-e8066db420e075306235f728d57567878f347bdaf36294e9b24ee9c0aa1e861b.json b/prover/crates/lib/prover_dal/.sqlx/query-e8066db420e075306235f728d57567878f347bdaf36294e9b24ee9c0aa1e861b.json deleted file mode 100644 index 422036ebb115..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-e8066db420e075306235f728d57567878f347bdaf36294e9b24ee9c0aa1e861b.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE prover_jobs_fri\n SET\n status = 'failed',\n error = $1,\n updated_at = NOW()\n WHERE\n id = $2\n AND status != 'successful'\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Text", - "Int8" - ] - }, - "nullable": [] - }, - "hash": "e8066db420e075306235f728d57567878f347bdaf36294e9b24ee9c0aa1e861b" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-929419ad8dcc70e8ce986f17075cd21d4645563f93afd4428734196c2b212276.json b/prover/crates/lib/prover_dal/.sqlx/query-e8db5d17dd2218bb34777ecf406fa78c1118063b2a1cda34bb49e9365219c32d.json similarity index 74% rename from prover/crates/lib/prover_dal/.sqlx/query-929419ad8dcc70e8ce986f17075cd21d4645563f93afd4428734196c2b212276.json rename to prover/crates/lib/prover_dal/.sqlx/query-e8db5d17dd2218bb34777ecf406fa78c1118063b2a1cda34bb49e9365219c32d.json index cf5fe8117b14..7cf81a13d57f 100644 --- a/prover/crates/lib/prover_dal/.sqlx/query-929419ad8dcc70e8ce986f17075cd21d4645563f93afd4428734196c2b212276.json +++ b/prover/crates/lib/prover_dal/.sqlx/query-e8db5d17dd2218bb34777ecf406fa78c1118063b2a1cda34bb49e9365219c32d.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n witness_inputs_fri (\n l1_batch_number,\n witness_inputs_blob_url,\n protocol_version,\n status,\n created_at,\n updated_at,\n protocol_version_patch\n )\n VALUES\n ($1, $2, $3, 'queued', NOW(), NOW(), $4)\n ON CONFLICT (l1_batch_number) DO NOTHING\n ", + "query": "\n INSERT INTO\n witness_inputs_fri (\n l1_batch_number,\n witness_inputs_blob_url,\n protocol_version,\n status,\n created_at,\n updated_at,\n protocol_version_patch\n )\n VALUES\n ($1, $2, $3, 'queued', NOW(), NOW(), $4) ON CONFLICT (l1_batch_number) DO NOTHING\n ", "describe": { "columns": [], "parameters": { @@ -13,5 +13,5 @@ }, "nullable": [] }, - "hash": "929419ad8dcc70e8ce986f17075cd21d4645563f93afd4428734196c2b212276" + "hash": "e8db5d17dd2218bb34777ecf406fa78c1118063b2a1cda34bb49e9365219c32d" } diff --git a/prover/crates/lib/prover_dal/.sqlx/query-eb2a85cb60c680a71203769db7baf89bbd72934e1405e320e746158e6d395d96.json b/prover/crates/lib/prover_dal/.sqlx/query-eb2a85cb60c680a71203769db7baf89bbd72934e1405e320e746158e6d395d96.json deleted file mode 100644 index 27680c0bb46e..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-eb2a85cb60c680a71203769db7baf89bbd72934e1405e320e746158e6d395d96.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE proof_compression_jobs_fri\n SET\n status = 'queued',\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n (\n status = 'in_progress'\n AND processing_started_at <= NOW() - $1::INTERVAL\n AND attempts < $2\n )\n OR (\n status = 'failed'\n AND attempts < $2\n )\n RETURNING\n l1_batch_number,\n status,\n attempts,\n error,\n picked_by\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "l1_batch_number", - "type_info": "Int8" - }, - { - "ordinal": 1, - "name": "status", - "type_info": "Text" - }, - { - "ordinal": 2, - "name": "attempts", - "type_info": "Int2" - }, - { - "ordinal": 3, - "name": "error", - "type_info": "Text" - }, - { - "ordinal": 4, - "name": "picked_by", - "type_info": "Text" - } - ], - "parameters": { - "Left": [ - "Interval", - "Int2" - ] - }, - "nullable": [ - false, - false, - false, - true, - true - ] - }, - "hash": "eb2a85cb60c680a71203769db7baf89bbd72934e1405e320e746158e6d395d96" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-edc61e1285bf6d3837acc67af4f15aaade450980719933089824eb8c494d64a4.json b/prover/crates/lib/prover_dal/.sqlx/query-edc61e1285bf6d3837acc67af4f15aaade450980719933089824eb8c494d64a4.json deleted file mode 100644 index 2c7d7f1da5f0..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-edc61e1285bf6d3837acc67af4f15aaade450980719933089824eb8c494d64a4.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE witness_inputs_fri\n SET\n status = 'successful',\n updated_at = NOW(),\n time_taken = $1\n WHERE\n l1_batch_number = $2\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Time", - "Int8" - ] - }, - "nullable": [] - }, - "hash": "edc61e1285bf6d3837acc67af4f15aaade450980719933089824eb8c494d64a4" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-d5bb897092bce2788fe02f31c9de6dde4142e09330557cc627fee2db278ace50.json b/prover/crates/lib/prover_dal/.sqlx/query-f49e345ad92e35acd40bcd097f77861eea20a381f6451ca82b4f1319364f77a9.json similarity index 50% rename from prover/crates/lib/prover_dal/.sqlx/query-d5bb897092bce2788fe02f31c9de6dde4142e09330557cc627fee2db278ace50.json rename to prover/crates/lib/prover_dal/.sqlx/query-f49e345ad92e35acd40bcd097f77861eea20a381f6451ca82b4f1319364f77a9.json index 9df8f1c849cb..d039dd57be7f 100644 --- a/prover/crates/lib/prover_dal/.sqlx/query-d5bb897092bce2788fe02f31c9de6dde4142e09330557cc627fee2db278ace50.json +++ b/prover/crates/lib/prover_dal/.sqlx/query-f49e345ad92e35acd40bcd097f77861eea20a381f6451ca82b4f1319364f77a9.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n UPDATE leaf_aggregation_witness_jobs_fri\n SET\n status = 'queued',\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n (\n status = 'in_progress'\n AND processing_started_at <= NOW() - $1::INTERVAL\n AND attempts < $2\n )\n OR (\n status = 'failed'\n AND attempts < $2\n )\n RETURNING\n id,\n status,\n attempts,\n circuit_id,\n error,\n picked_by\n ", + "query": "\n UPDATE\n leaf_aggregation_witness_jobs_fri\n SET\n status = 'queued',\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n (\n status = 'in_progress'\n AND processing_started_at <= NOW() - $1 :: INTERVAL\n AND attempts < $2\n )\n OR (\n status = 'failed'\n AND attempts < $2\n )\n RETURNING\n id,\n status,\n attempts,\n circuit_id,\n error,\n picked_by\n ", "describe": { "columns": [ { @@ -49,5 +49,5 @@ true ] }, - "hash": "d5bb897092bce2788fe02f31c9de6dde4142e09330557cc627fee2db278ace50" + "hash": "f49e345ad92e35acd40bcd097f77861eea20a381f6451ca82b4f1319364f77a9" } diff --git a/prover/crates/lib/prover_dal/.sqlx/query-2095e5646c382ccbc6e3bafdeddaae31358088e142dff51c9f0bde8f386900d3.json b/prover/crates/lib/prover_dal/.sqlx/query-f907bd746d0d085e4612c01b7a90d5c40935ed7b37013c9c608bfdcffd9611d8.json similarity index 65% rename from prover/crates/lib/prover_dal/.sqlx/query-2095e5646c382ccbc6e3bafdeddaae31358088e142dff51c9f0bde8f386900d3.json rename to prover/crates/lib/prover_dal/.sqlx/query-f907bd746d0d085e4612c01b7a90d5c40935ed7b37013c9c608bfdcffd9611d8.json index fd7c7c7874db..4b0950e4e672 100644 --- a/prover/crates/lib/prover_dal/.sqlx/query-2095e5646c382ccbc6e3bafdeddaae31358088e142dff51c9f0bde8f386900d3.json +++ b/prover/crates/lib/prover_dal/.sqlx/query-f907bd746d0d085e4612c01b7a90d5c40935ed7b37013c9c608bfdcffd9611d8.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT\n instance_status\n FROM\n gpu_prover_queue_fri\n WHERE\n instance_host = $1::TEXT::inet\n AND instance_port = $2\n AND zone = $3\n ", + "query": "\n SELECT\n instance_status\n FROM\n gpu_prover_queue_fri\n WHERE\n instance_host = $1 :: TEXT :: inet\n AND instance_port = $2\n AND zone = $3\n ", "describe": { "columns": [ { @@ -20,5 +20,5 @@ false ] }, - "hash": "2095e5646c382ccbc6e3bafdeddaae31358088e142dff51c9f0bde8f386900d3" + "hash": "f907bd746d0d085e4612c01b7a90d5c40935ed7b37013c9c608bfdcffd9611d8" } diff --git a/prover/crates/lib/prover_dal/.sqlx/query-fcddeb96dcd1611dedb2091c1be304e8a35fd65bf37e976b7106f57c57e70b9b.json b/prover/crates/lib/prover_dal/.sqlx/query-fcddeb96dcd1611dedb2091c1be304e8a35fd65bf37e976b7106f57c57e70b9b.json deleted file mode 100644 index effc22d6a43b..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-fcddeb96dcd1611dedb2091c1be304e8a35fd65bf37e976b7106f57c57e70b9b.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE gpu_prover_queue_fri\n SET\n instance_status = 'available',\n updated_at = NOW()\n WHERE\n instance_host = $1::TEXT::inet\n AND instance_port = $2\n AND instance_status = 'full'\n AND zone = $3\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Text", - "Int4", - "Text" - ] - }, - "nullable": [] - }, - "hash": "fcddeb96dcd1611dedb2091c1be304e8a35fd65bf37e976b7106f57c57e70b9b" -} diff --git a/prover/crates/lib/prover_dal/src/cli_test_dal.rs b/prover/crates/lib/prover_dal/src/cli_test_dal.rs index c441bde7df9b..99272736965b 100644 --- a/prover/crates/lib/prover_dal/src/cli_test_dal.rs +++ b/prover/crates/lib/prover_dal/src/cli_test_dal.rs @@ -25,7 +25,7 @@ impl CliTestDal<'_, '_> { UPDATE prover_jobs_fri SET - STATUS = $1 + status = $1 WHERE l1_batch_number = $2 AND sequence_number = $3 @@ -55,7 +55,7 @@ impl CliTestDal<'_, '_> { leaf_aggregation_witness_jobs_fri ( l1_batch_number, circuit_id, - STATUS, + status, number_of_basic_circuits, created_at, updated_at @@ -64,7 +64,7 @@ impl CliTestDal<'_, '_> { ($1, $2, 'waiting_for_proofs', 2, NOW(), NOW()) ON CONFLICT (l1_batch_number, circuit_id) DO UPDATE SET - STATUS = $3 + status = $3 "#, batch_number.0 as i64, circuit_id as i16, @@ -87,7 +87,7 @@ impl CliTestDal<'_, '_> { node_aggregation_witness_jobs_fri ( l1_batch_number, circuit_id, - STATUS, + status, created_at, updated_at ) @@ -95,7 +95,7 @@ impl CliTestDal<'_, '_> { ($1, $2, 'waiting_for_proofs', NOW(), NOW()) ON CONFLICT (l1_batch_number, circuit_id, depth) DO UPDATE SET - STATUS = $3 + status = $3 "#, batch_number.0 as i64, circuit_id as i16, @@ -112,7 +112,7 @@ impl CliTestDal<'_, '_> { INSERT INTO recursion_tip_witness_jobs_fri ( l1_batch_number, - STATUS, + status, number_of_final_node_jobs, created_at, updated_at @@ -121,7 +121,7 @@ impl CliTestDal<'_, '_> { ($1, 'waiting_for_proofs', 1, NOW(), NOW()) ON CONFLICT (l1_batch_number) DO UPDATE SET - STATUS = $2 + status = $2 "#, batch_number.0 as i64, status.to_string(), @@ -142,7 +142,7 @@ impl CliTestDal<'_, '_> { scheduler_witness_jobs_fri ( l1_batch_number, scheduler_partial_input_blob_url, - STATUS, + status, created_at, updated_at ) @@ -150,7 +150,7 @@ impl CliTestDal<'_, '_> { ($1, '', 'waiting_for_proofs', NOW(), NOW()) ON CONFLICT (l1_batch_number) DO UPDATE SET - STATUS = $2 + status = $2 "#, batch_number.0 as i64, status.to_string(), @@ -170,7 +170,7 @@ impl CliTestDal<'_, '_> { INSERT INTO proof_compression_jobs_fri ( l1_batch_number, - STATUS, + status, created_at, updated_at ) @@ -178,7 +178,7 @@ impl CliTestDal<'_, '_> { ($1, $2, NOW(), NOW()) ON CONFLICT (l1_batch_number) DO UPDATE SET - STATUS = $2 + status = $2 "#, batch_number.0 as i64, status.to_string(), @@ -202,7 +202,7 @@ impl CliTestDal<'_, '_> { UPDATE prover_jobs_fri SET - STATUS = $1, + status = $1, attempts = $2 WHERE l1_batch_number = $3 @@ -234,7 +234,7 @@ impl CliTestDal<'_, '_> { UPDATE leaf_aggregation_witness_jobs_fri SET - STATUS = $1, + status = $1, attempts = $2 WHERE l1_batch_number = $3 diff --git a/prover/crates/lib/prover_dal/src/fri_proof_compressor_dal.rs b/prover/crates/lib/prover_dal/src/fri_proof_compressor_dal.rs index faf9e29ef100..9582e483d688 100644 --- a/prover/crates/lib/prover_dal/src/fri_proof_compressor_dal.rs +++ b/prover/crates/lib/prover_dal/src/fri_proof_compressor_dal.rs @@ -30,7 +30,7 @@ impl FriProofCompressorDal<'_, '_> { proof_compression_jobs_fri ( l1_batch_number, fri_proof_blob_url, - STATUS, + status, created_at, updated_at, protocol_version, @@ -60,7 +60,7 @@ impl FriProofCompressorDal<'_, '_> { UPDATE proof_compression_jobs_fri SET - STATUS = $1, + status = $1, attempts = attempts + 1, updated_at = NOW(), processing_started_at = NOW(), @@ -72,7 +72,7 @@ impl FriProofCompressorDal<'_, '_> { FROM proof_compression_jobs_fri WHERE - STATUS = $2 + status = $2 AND protocol_version = $4 AND protocol_version_patch = $5 ORDER BY @@ -130,7 +130,7 @@ impl FriProofCompressorDal<'_, '_> { UPDATE proof_compression_jobs_fri SET - STATUS = $1, + status = $1, updated_at = NOW(), time_taken = $2, l1_proof_blob_url = $3 @@ -157,13 +157,13 @@ impl FriProofCompressorDal<'_, '_> { UPDATE proof_compression_jobs_fri SET - STATUS = $1, + status = $1, error = $2, updated_at = NOW() WHERE l1_batch_number = $3 - AND STATUS != $4 - AND STATUS != $5 + AND status != $4 + AND status != $5 "#, ProofCompressionJobStatus::Failed.to_string(), error, @@ -187,7 +187,7 @@ impl FriProofCompressorDal<'_, '_> { r#" SELECT l1_batch_number, - STATUS, + status, protocol_version, protocol_version_patch FROM @@ -199,8 +199,8 @@ impl FriProofCompressorDal<'_, '_> { FROM proof_compression_jobs_fri WHERE - STATUS = $1 - OR STATUS = $2 + status = $1 + OR status = $2 ) "#, ProofCompressionJobStatus::Successful.to_string(), @@ -228,7 +228,7 @@ impl FriProofCompressorDal<'_, '_> { UPDATE proof_compression_jobs_fri SET - STATUS = $1, + status = $1, updated_at = NOW() WHERE l1_batch_number = $2 @@ -249,11 +249,11 @@ impl FriProofCompressorDal<'_, '_> { protocol_version_patch, COUNT(*) FILTER ( WHERE - STATUS = 'queued' + status = 'queued' ) AS queued, COUNT(*) FILTER ( WHERE - STATUS = 'in_progress' + status = 'in_progress' ) AS in_progress FROM proof_compression_jobs_fri @@ -290,8 +290,8 @@ impl FriProofCompressorDal<'_, '_> { FROM proof_compression_jobs_fri WHERE - STATUS <> 'successful' - AND STATUS <> 'sent_to_server' + status <> 'successful' + AND status <> 'sent_to_server' ORDER BY l1_batch_number ASC LIMIT @@ -318,22 +318,22 @@ impl FriProofCompressorDal<'_, '_> { UPDATE proof_compression_jobs_fri SET - STATUS = 'queued', + status = 'queued', updated_at = NOW(), processing_started_at = NOW() WHERE ( - STATUS = 'in_progress' + status = 'in_progress' AND processing_started_at <= NOW() - $1 :: INTERVAL AND attempts < $2 ) OR ( - STATUS = 'failed' + status = 'failed' AND attempts < $2 ) RETURNING l1_batch_number, - STATUS, + status, attempts, error, picked_by @@ -429,7 +429,7 @@ impl FriProofCompressorDal<'_, '_> { UPDATE proof_compression_jobs_fri SET - STATUS = 'queued', + status = 'queued', error = 'Manually requeued', attempts = 2, updated_at = NOW(), @@ -438,11 +438,11 @@ impl FriProofCompressorDal<'_, '_> { l1_batch_number = $1 AND attempts >= $2 AND ( - STATUS = 'in_progress' - OR STATUS = 'failed' + status = 'in_progress' + OR status = 'failed' ) RETURNING - STATUS, + status, attempts, error, picked_by diff --git a/prover/crates/lib/prover_dal/src/fri_prover_dal.rs b/prover/crates/lib/prover_dal/src/fri_prover_dal.rs index b15fb2672e58..3543ebb58cc1 100644 --- a/prover/crates/lib/prover_dal/src/fri_prover_dal.rs +++ b/prover/crates/lib/prover_dal/src/fri_prover_dal.rs @@ -71,7 +71,7 @@ impl FriProverDal<'_, '_> { UPDATE prover_jobs_fri SET - STATUS = 'in_progress', + status = 'in_progress', attempts = attempts + 1, updated_at = NOW(), processing_started_at = NOW(), @@ -83,7 +83,7 @@ impl FriProverDal<'_, '_> { FROM prover_jobs_fri WHERE - STATUS = 'queued' + status = 'queued' AND protocol_version = $1 AND protocol_version_patch = $2 ORDER BY @@ -134,7 +134,7 @@ impl FriProverDal<'_, '_> { UPDATE prover_jobs_fri SET - STATUS = 'in_progress', + status = 'in_progress', attempts = attempts + 1, updated_at = NOW(), processing_started_at = NOW(), @@ -146,7 +146,7 @@ impl FriProverDal<'_, '_> { FROM prover_jobs_fri WHERE - STATUS = 'queued' + status = 'queued' AND protocol_version = $1 AND protocol_version_patch = $2 ORDER BY @@ -205,7 +205,7 @@ impl FriProverDal<'_, '_> { UPDATE prover_jobs_fri SET - STATUS = 'in_progress', + status = 'in_progress', attempts = attempts + 1, processing_started_at = NOW(), updated_at = NOW(), @@ -284,12 +284,12 @@ impl FriProverDal<'_, '_> { UPDATE prover_jobs_fri SET - STATUS = 'failed', + status = 'failed', error = $1, updated_at = NOW() WHERE id = $2 - AND STATUS != 'successful' + AND status != 'successful' "#, error, i64::from(id) @@ -330,7 +330,7 @@ impl FriProverDal<'_, '_> { UPDATE prover_jobs_fri SET - STATUS = 'successful', + status = 'successful', updated_at = NOW(), time_taken = $1, proof_blob_url = $2 @@ -380,7 +380,7 @@ impl FriProverDal<'_, '_> { UPDATE prover_jobs_fri SET - STATUS = 'queued', + status = 'queued', updated_at = NOW(), processing_started_at = NOW() WHERE @@ -391,12 +391,12 @@ impl FriProverDal<'_, '_> { prover_jobs_fri WHERE ( - STATUS IN ('in_progress', 'in_gpu_proof') + status IN ('in_progress', 'in_gpu_proof') AND processing_started_at <= NOW() - $1 :: INTERVAL AND attempts < $2 ) OR ( - STATUS = 'failed' + status = 'failed' AND attempts < $2 ) FOR UPDATE @@ -404,7 +404,7 @@ impl FriProverDal<'_, '_> { ) RETURNING id, - STATUS, + status, attempts, circuit_id, error, @@ -453,7 +453,7 @@ impl FriProverDal<'_, '_> { depth, is_node_final_proof, protocol_version, - STATUS, + status, created_at, updated_at, protocol_version_patch @@ -506,21 +506,21 @@ impl FriProverDal<'_, '_> { COUNT(*) AS "count!", circuit_id AS "circuit_id!", aggregation_round AS "aggregation_round!", - STATUS AS "status!", + status AS "status!", protocol_version AS "protocol_version!", protocol_version_patch AS "protocol_version_patch!" FROM prover_jobs_fri WHERE ( - STATUS = 'queued' - OR STATUS = 'in_progress' + status = 'queued' + OR status = 'in_progress' ) AND protocol_version IS NOT NULL GROUP BY circuit_id, aggregation_round, - STATUS, + status, protocol_version, protocol_version_patch "# @@ -554,16 +554,16 @@ impl FriProverDal<'_, '_> { protocol_version_patch AS "protocol_version_patch!", COUNT(*) FILTER ( WHERE - STATUS = 'queued' + status = 'queued' ) AS queued, COUNT(*) FILTER ( WHERE - STATUS = 'in_progress' + status = 'in_progress' ) AS in_progress FROM prover_jobs_fri WHERE - STATUS IN ('queued', 'in_progress') + status IN ('queued', 'in_progress') AND protocol_version IS NOT NULL GROUP BY protocol_version, @@ -601,7 +601,7 @@ impl FriProverDal<'_, '_> { FROM prover_jobs_fri WHERE - STATUS IN ( + status IN ( 'queued', 'in_gpu_proof', 'in_progress', @@ -632,11 +632,11 @@ impl FriProverDal<'_, '_> { UPDATE prover_jobs_fri SET - STATUS = $1, + status = $1, updated_at = NOW() WHERE id = $2 - AND STATUS != 'successful' + AND status != 'successful' "#, status, i64::from(id) @@ -658,7 +658,7 @@ impl FriProverDal<'_, '_> { prover_jobs_fri WHERE l1_batch_number = $1 - AND STATUS = 'successful' + AND status = 'successful' AND aggregation_round = $2 "#, i64::from(l1_batch_number.0), @@ -682,7 +682,7 @@ impl FriProverDal<'_, '_> { prover_jobs_fri WHERE l1_batch_number = $1 - AND STATUS = 'successful' + AND status = 'successful' AND aggregation_round = $2 "#, l1_batch_number.0 as i64, @@ -736,7 +736,7 @@ impl FriProverDal<'_, '_> { WHERE l1_batch_number = $1 AND is_node_final_proof = TRUE - AND STATUS = 'successful' + AND status = 'successful' ORDER BY circuit_id ASC "#, @@ -848,7 +848,7 @@ impl FriProverDal<'_, '_> { UPDATE prover_jobs_fri SET - STATUS = 'queued', + status = 'queued', error = 'Manually requeued', attempts = 2, updated_at = NOW(), @@ -857,12 +857,12 @@ impl FriProverDal<'_, '_> { l1_batch_number = $1 AND attempts >= $2 AND ( - STATUS = 'in_progress' - OR STATUS = 'failed' + status = 'in_progress' + OR status = 'failed' ) RETURNING id, - STATUS, + status, attempts, circuit_id, error, diff --git a/prover/crates/lib/prover_dal/src/fri_witness_generator_dal.rs b/prover/crates/lib/prover_dal/src/fri_witness_generator_dal.rs index d38409631adc..391e82637c8a 100644 --- a/prover/crates/lib/prover_dal/src/fri_witness_generator_dal.rs +++ b/prover/crates/lib/prover_dal/src/fri_witness_generator_dal.rs @@ -53,7 +53,7 @@ impl FriWitnessGeneratorDal<'_, '_> { l1_batch_number, witness_inputs_blob_url, protocol_version, - STATUS, + status, created_at, updated_at, protocol_version_patch @@ -84,7 +84,7 @@ impl FriWitnessGeneratorDal<'_, '_> { UPDATE witness_inputs_fri SET - STATUS = 'in_progress', + status = 'in_progress', attempts = attempts + 1, updated_at = NOW(), processing_started_at = NOW(), @@ -97,7 +97,7 @@ impl FriWitnessGeneratorDal<'_, '_> { witness_inputs_fri WHERE l1_batch_number <= $1 - AND STATUS = 'queued' + AND status = 'queued' AND protocol_version = $2 AND protocol_version_patch = $4 ORDER BY @@ -153,11 +153,11 @@ impl FriWitnessGeneratorDal<'_, '_> { UPDATE witness_inputs_fri SET - STATUS = $1, + status = $1, updated_at = NOW() WHERE l1_batch_number = $2 - AND STATUS != 'successful' + AND status != 'successful' "#, status.to_string(), i64::from(block_number.0) @@ -177,7 +177,7 @@ impl FriWitnessGeneratorDal<'_, '_> { UPDATE witness_inputs_fri SET - STATUS = 'successful', + status = 'successful', updated_at = NOW(), time_taken = $1 WHERE @@ -197,12 +197,12 @@ impl FriWitnessGeneratorDal<'_, '_> { UPDATE witness_inputs_fri SET - STATUS = 'failed', + status = 'failed', error = $1, updated_at = NOW() WHERE l1_batch_number = $2 - AND STATUS != 'successful' + AND status != 'successful' "#, error, i64::from(block_number.0) @@ -218,12 +218,12 @@ impl FriWitnessGeneratorDal<'_, '_> { UPDATE leaf_aggregation_witness_jobs_fri SET - STATUS = 'failed', + status = 'failed', error = $1, updated_at = NOW() WHERE id = $2 - AND STATUS != 'successful' + AND status != 'successful' "#, error, i64::from(id) @@ -239,7 +239,7 @@ impl FriWitnessGeneratorDal<'_, '_> { UPDATE leaf_aggregation_witness_jobs_fri SET - STATUS = 'successful', + status = 'successful', updated_at = NOW(), time_taken = $1 WHERE @@ -264,22 +264,22 @@ impl FriWitnessGeneratorDal<'_, '_> { UPDATE witness_inputs_fri SET - STATUS = 'queued', + status = 'queued', updated_at = NOW(), processing_started_at = NOW() WHERE ( - STATUS = 'in_progress' + status = 'in_progress' AND processing_started_at <= NOW() - $1 :: INTERVAL AND attempts < $2 ) OR ( - STATUS = 'failed' + status = 'failed' AND attempts < $2 ) RETURNING l1_batch_number, - STATUS, + status, attempts, error, picked_by @@ -333,7 +333,7 @@ impl FriWitnessGeneratorDal<'_, '_> { closed_form_inputs_blob_url, number_of_basic_circuits, protocol_version, - STATUS, + status, created_at, updated_at, protocol_version_patch @@ -381,7 +381,7 @@ impl FriWitnessGeneratorDal<'_, '_> { INSERT INTO recursion_tip_witness_jobs_fri ( l1_batch_number, - STATUS, + status, number_of_final_node_jobs, protocol_version, created_at, @@ -418,7 +418,7 @@ impl FriWitnessGeneratorDal<'_, '_> { l1_batch_number, scheduler_partial_input_blob_url, protocol_version, - STATUS, + status, created_at, updated_at, protocol_version_patch @@ -460,7 +460,7 @@ impl FriWitnessGeneratorDal<'_, '_> { UPDATE leaf_aggregation_witness_jobs_fri SET - STATUS = 'in_progress', + status = 'in_progress', attempts = attempts + 1, updated_at = NOW(), processing_started_at = NOW(), @@ -472,7 +472,7 @@ impl FriWitnessGeneratorDal<'_, '_> { FROM leaf_aggregation_witness_jobs_fri WHERE - STATUS = 'queued' + status = 'queued' AND protocol_version = $1 AND protocol_version_patch = $2 ORDER BY @@ -552,7 +552,7 @@ impl FriWitnessGeneratorDal<'_, '_> { AND circuit_id = $2 AND aggregation_round = $3 AND depth = $4 - AND STATUS = 'successful' + AND status = 'successful' ORDER BY sequence_number ASC; "#, @@ -575,7 +575,7 @@ impl FriWitnessGeneratorDal<'_, '_> { UPDATE leaf_aggregation_witness_jobs_fri SET - STATUS = 'queued' + status = 'queued' WHERE (l1_batch_number, circuit_id) IN ( SELECT @@ -651,7 +651,7 @@ impl FriWitnessGeneratorDal<'_, '_> { UPDATE node_aggregation_witness_jobs_fri SET - STATUS = 'in_progress', + status = 'in_progress', attempts = attempts + 1, updated_at = NOW(), processing_started_at = NOW(), @@ -663,7 +663,7 @@ impl FriWitnessGeneratorDal<'_, '_> { FROM node_aggregation_witness_jobs_fri WHERE - STATUS = 'queued' + status = 'queued' AND protocol_version = $1 AND protocol_version_patch = $2 ORDER BY @@ -736,12 +736,12 @@ impl FriWitnessGeneratorDal<'_, '_> { UPDATE node_aggregation_witness_jobs_fri SET - STATUS = 'failed', + status = 'failed', error = $1, updated_at = NOW() WHERE id = $2 - AND STATUS != 'successful' + AND status != 'successful' "#, error, i64::from(id) @@ -757,7 +757,7 @@ impl FriWitnessGeneratorDal<'_, '_> { UPDATE node_aggregation_witness_jobs_fri SET - STATUS = 'successful', + status = 'successful', updated_at = NOW(), time_taken = $1 WHERE @@ -790,7 +790,7 @@ impl FriWitnessGeneratorDal<'_, '_> { aggregations_url, number_of_dependent_jobs, protocol_version, - STATUS, + status, created_at, updated_at, protocol_version_patch @@ -831,7 +831,7 @@ impl FriWitnessGeneratorDal<'_, '_> { UPDATE node_aggregation_witness_jobs_fri SET - STATUS = 'queued' + status = 'queued' WHERE (l1_batch_number, circuit_id, depth) IN ( SELECT @@ -876,7 +876,7 @@ impl FriWitnessGeneratorDal<'_, '_> { UPDATE node_aggregation_witness_jobs_fri SET - STATUS = 'queued' + status = 'queued' WHERE (l1_batch_number, circuit_id, depth) IN ( SELECT @@ -920,7 +920,7 @@ impl FriWitnessGeneratorDal<'_, '_> { UPDATE recursion_tip_witness_jobs_fri SET - STATUS = 'queued' + status = 'queued' WHERE l1_batch_number IN ( SELECT @@ -958,7 +958,7 @@ impl FriWitnessGeneratorDal<'_, '_> { UPDATE scheduler_witness_jobs_fri SET - STATUS = 'queued' + status = 'queued' WHERE l1_batch_number IN ( SELECT @@ -995,22 +995,22 @@ impl FriWitnessGeneratorDal<'_, '_> { UPDATE leaf_aggregation_witness_jobs_fri SET - STATUS = 'queued', + status = 'queued', updated_at = NOW(), processing_started_at = NOW() WHERE ( - STATUS = 'in_progress' + status = 'in_progress' AND processing_started_at <= NOW() - $1 :: INTERVAL AND attempts < $2 ) OR ( - STATUS = 'failed' + status = 'failed' AND attempts < $2 ) RETURNING id, - STATUS, + status, attempts, circuit_id, error, @@ -1045,22 +1045,22 @@ impl FriWitnessGeneratorDal<'_, '_> { UPDATE node_aggregation_witness_jobs_fri SET - STATUS = 'queued', + status = 'queued', updated_at = NOW(), processing_started_at = NOW() WHERE ( - STATUS = 'in_progress' + status = 'in_progress' AND processing_started_at <= NOW() - $1 :: INTERVAL AND attempts < $2 ) OR ( - STATUS = 'failed' + status = 'failed' AND attempts < $2 ) RETURNING id, - STATUS, + status, attempts, circuit_id, error, @@ -1095,22 +1095,22 @@ impl FriWitnessGeneratorDal<'_, '_> { UPDATE recursion_tip_witness_jobs_fri SET - STATUS = 'queued', + status = 'queued', updated_at = NOW(), processing_started_at = NOW() WHERE ( - STATUS = 'in_progress' + status = 'in_progress' AND processing_started_at <= NOW() - $1 :: INTERVAL AND attempts < $2 ) OR ( - STATUS = 'failed' + status = 'failed' AND attempts < $2 ) RETURNING l1_batch_number, - STATUS, + status, attempts, error, picked_by @@ -1143,7 +1143,7 @@ impl FriWitnessGeneratorDal<'_, '_> { UPDATE recursion_tip_witness_jobs_fri SET - STATUS = 'in_progress', + status = 'in_progress', attempts = attempts + 1, updated_at = NOW(), processing_started_at = NOW(), @@ -1155,7 +1155,7 @@ impl FriWitnessGeneratorDal<'_, '_> { FROM recursion_tip_witness_jobs_fri WHERE - STATUS = 'queued' + status = 'queued' AND protocol_version = $1 AND protocol_version_patch = $2 ORDER BY @@ -1190,11 +1190,11 @@ impl FriWitnessGeneratorDal<'_, '_> { UPDATE scheduler_witness_jobs_fri SET - STATUS = 'queued' + status = 'queued' WHERE l1_batch_number = $1 - AND STATUS != 'successful' - AND STATUS != 'in_progress' + AND status != 'successful' + AND status != 'in_progress' "#, l1_batch_number ) @@ -1214,22 +1214,22 @@ impl FriWitnessGeneratorDal<'_, '_> { UPDATE scheduler_witness_jobs_fri SET - STATUS = 'queued', + status = 'queued', updated_at = NOW(), processing_started_at = NOW() WHERE ( - STATUS = 'in_progress' + status = 'in_progress' AND processing_started_at <= NOW() - $1 :: INTERVAL AND attempts < $2 ) OR ( - STATUS = 'failed' + status = 'failed' AND attempts < $2 ) RETURNING l1_batch_number, - STATUS, + status, attempts, error, picked_by @@ -1262,7 +1262,7 @@ impl FriWitnessGeneratorDal<'_, '_> { UPDATE scheduler_witness_jobs_fri SET - STATUS = 'in_progress', + status = 'in_progress', attempts = attempts + 1, updated_at = NOW(), processing_started_at = NOW(), @@ -1274,7 +1274,7 @@ impl FriWitnessGeneratorDal<'_, '_> { FROM scheduler_witness_jobs_fri WHERE - STATUS = 'queued' + status = 'queued' AND protocol_version = $1 AND protocol_version_patch = $3 ORDER BY @@ -1351,7 +1351,7 @@ impl FriWitnessGeneratorDal<'_, '_> { UPDATE recursion_tip_witness_jobs_fri SET - STATUS = 'successful', + status = 'successful', updated_at = NOW(), time_taken = $1 WHERE @@ -1375,7 +1375,7 @@ impl FriWitnessGeneratorDal<'_, '_> { UPDATE scheduler_witness_jobs_fri SET - STATUS = 'successful', + status = 'successful', updated_at = NOW(), time_taken = $1 WHERE @@ -1399,12 +1399,12 @@ impl FriWitnessGeneratorDal<'_, '_> { UPDATE recursion_tip_witness_jobs_fri SET - STATUS = 'failed', + status = 'failed', error = $1, updated_at = NOW() WHERE l1_batch_number = $2 - AND STATUS != 'successful' + AND status != 'successful' "#, error, l1_batch_number.0 as i64 @@ -1420,12 +1420,12 @@ impl FriWitnessGeneratorDal<'_, '_> { UPDATE scheduler_witness_jobs_fri SET - STATUS = 'failed', + status = 'failed', error = $1, updated_at = NOW() WHERE l1_batch_number = $2 - AND STATUS != 'successful' + AND status != 'successful' "#, error, i64::from(block_number.0) @@ -1774,19 +1774,19 @@ impl FriWitnessGeneratorDal<'_, '_> { UPDATE witness_inputs_fri SET - STATUS = 'queued', + status = 'queued', updated_at = NOW(), processing_started_at = NOW() WHERE l1_batch_number = $1 AND attempts >= $2 AND ( - STATUS = 'in_progress' - OR STATUS = 'failed' + status = 'in_progress' + OR status = 'failed' ) RETURNING l1_batch_number, - STATUS, + status, attempts, error, picked_by @@ -1845,19 +1845,19 @@ impl FriWitnessGeneratorDal<'_, '_> { UPDATE recursion_tip_witness_jobs_fri SET - STATUS = 'queued', + status = 'queued', updated_at = NOW(), processing_started_at = NOW() WHERE l1_batch_number = $1 AND attempts >= $2 AND ( - STATUS = 'in_progress' - OR STATUS = 'failed' + status = 'in_progress' + OR status = 'failed' ) RETURNING l1_batch_number, - STATUS, + status, attempts, error, picked_by @@ -1890,19 +1890,19 @@ impl FriWitnessGeneratorDal<'_, '_> { UPDATE scheduler_witness_jobs_fri SET - STATUS = 'queued', + status = 'queued', updated_at = NOW(), processing_started_at = NOW() WHERE l1_batch_number = $1 AND attempts >= $2 AND ( - STATUS = 'in_progress' - OR STATUS = 'failed' + status = 'in_progress' + OR status = 'failed' ) RETURNING l1_batch_number, - STATUS, + status, attempts, error, picked_by diff --git a/yarn.lock b/yarn.lock index b70e64f148a1..3c764c7c7b7f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6903,7 +6903,7 @@ jest-each@^29.7.0: jest-util "^29.7.0" pretty-format "^29.7.0" -jest-environment-node@^29.7.0: +jest-environment-node@^29.0.3, jest-environment-node@^29.7.0: version "29.7.0" resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-29.7.0.tgz#0b93e111dda8ec120bc8300e6d1fb9576e164376" integrity sha512-DOSwCRqXirTOyheM+4d5YZOrWcdu0LNZ87ewUoywbcb2XR4wKgqiG8vNeYwhjFMbEkfju7wx2GYH0P2gevGvFw== diff --git a/zk_toolbox/crates/zk_supervisor/src/commands/sql_fmt.rs b/zk_toolbox/crates/zk_supervisor/src/commands/sql_fmt.rs index 72b88fa7628a..bcc1d730d3e5 100644 --- a/zk_toolbox/crates/zk_supervisor/src/commands/sql_fmt.rs +++ b/zk_toolbox/crates/zk_supervisor/src/commands/sql_fmt.rs @@ -24,6 +24,7 @@ fn format_query(query: &str) -> anyhow::Result { "VALUE", "DEPTH", "KEY", + "STATUS", ]; for keyword in keywords { let regex = Regex::new(&format!(r"\b{}\b", keyword))?; From 71f2645c5f7ecf8ed84f141510f7235ca97e8b48 Mon Sep 17 00:00:00 2001 From: matias-gonz Date: Tue, 24 Sep 2024 15:42:00 -0300 Subject: [PATCH 07/19] lint --- zk_toolbox/crates/zk_supervisor/src/commands/sql_fmt.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zk_toolbox/crates/zk_supervisor/src/commands/sql_fmt.rs b/zk_toolbox/crates/zk_supervisor/src/commands/sql_fmt.rs index bcc1d730d3e5..e61b15e5f2e1 100644 --- a/zk_toolbox/crates/zk_supervisor/src/commands/sql_fmt.rs +++ b/zk_toolbox/crates/zk_supervisor/src/commands/sql_fmt.rs @@ -179,7 +179,7 @@ fn fmt_file(shell: &Shell, file_path: &str, check: bool) -> Result<()> { is_inside_query = false; let ended_with_comma = built_query.trim_end().ends_with(','); modified_file - .push_str(&format_rust_string_query(&built_query, is_raw_string)?.trim_end()); + .push_str(format_rust_string_query(&built_query, is_raw_string)?.trim_end()); if ended_with_comma { modified_file.push(','); } From ee431804a779629ae0acfea122702c814b70603b Mon Sep 17 00:00:00 2001 From: matias-gonz Date: Tue, 24 Sep 2024 15:57:43 -0300 Subject: [PATCH 08/19] Exctract messages --- .../zk_supervisor/src/commands/sql_fmt.rs | 27 +++++++++++-------- .../crates/zk_supervisor/src/messages.rs | 11 ++++++++ 2 files changed, 27 insertions(+), 11 deletions(-) diff --git a/zk_toolbox/crates/zk_supervisor/src/commands/sql_fmt.rs b/zk_toolbox/crates/zk_supervisor/src/commands/sql_fmt.rs index e61b15e5f2e1..f4f270555ca1 100644 --- a/zk_toolbox/crates/zk_supervisor/src/commands/sql_fmt.rs +++ b/zk_toolbox/crates/zk_supervisor/src/commands/sql_fmt.rs @@ -3,6 +3,12 @@ use common::spinner::Spinner; use regex::Regex; use xshell::Shell; +use crate::messages::{ + msg_file_is_not_formatted, MSG_FAILED_TO_DETERMINE_BASE_INDENT, + MSG_FAILED_TO_FIND_END_OF_REGULAR_STRING_QUERY, + MSG_FAILED_TO_FIND_START_OF_REGULAR_STRING_QUERY, MSG_RUNNING_SQL_FMT_SPINNER, +}; + use super::lint_utils::{get_unignored_files, IgnoredData, Target}; fn format_query(query: &str) -> anyhow::Result { @@ -54,9 +60,9 @@ fn extract_query_from_rust_string(query: &str, is_raw: bool) -> String { } // Removing quotes if !is_raw { - query = query[1..query.len() - 1].to_string(); // normal string + query = query[1..query.len() - 1].to_string(); } else { - query = query[3..query.len() - 2].to_string(); // raw string + query = query[3..query.len() - 2].to_string(); } // Remove all escape characters @@ -91,29 +97,28 @@ fn format_one_line_query(line: &str) -> anyhow::Result { let is_raw_string = line.contains("sqlx::query!(r"); let query_start = if is_raw_string { - line.find(r#"r#""#).context(format!( - "Failed to find the start of the raw string query: {line}" - ))? + line.find(r#"r#""#) + .context(MSG_FAILED_TO_FIND_START_OF_REGULAR_STRING_QUERY)? } else { line.find('"') - .context("Failed to find the start of the regular string query")? + .context(MSG_FAILED_TO_FIND_START_OF_REGULAR_STRING_QUERY)? }; let base_indent = line .find(|c: char| !c.is_whitespace()) - .context("Failed to determine base indent")? + .context(MSG_FAILED_TO_DETERMINE_BASE_INDENT)? + 4; let prefix = &line[..query_start]; let query_end = if is_raw_string { line.find(r#""#) - .context("Failed to find the end of the raw string query")? + .context(MSG_FAILED_TO_FIND_END_OF_REGULAR_STRING_QUERY)? + 2 } else { line[1..] .find('"') - .context("Failed to find the end of the regular string query")? + .context(MSG_FAILED_TO_FIND_END_OF_REGULAR_STRING_QUERY)? + 3 }; @@ -193,7 +198,7 @@ fn fmt_file(shell: &Shell, file_path: &str, check: bool) -> Result<()> { if content != modified_file { if check { - bail!("File {} is not formatted", file_path); + bail!(msg_file_is_not_formatted(file_path)); } else { shell.write_file(file_path, &modified_file)?; } @@ -203,7 +208,7 @@ fn fmt_file(shell: &Shell, file_path: &str, check: bool) -> Result<()> { } pub async fn format_sql(shell: Shell, check: bool) -> anyhow::Result<()> { - let spinner = Spinner::new("Running SQL formatter"); + let spinner = Spinner::new(MSG_RUNNING_SQL_FMT_SPINNER); let ignored_data = Some(IgnoredData { files: vec![], dirs: vec!["zk_toolbox".to_string()], diff --git a/zk_toolbox/crates/zk_supervisor/src/messages.rs b/zk_toolbox/crates/zk_supervisor/src/messages.rs index 5f68630f7562..de7ad1c10d02 100644 --- a/zk_toolbox/crates/zk_supervisor/src/messages.rs +++ b/zk_toolbox/crates/zk_supervisor/src/messages.rs @@ -197,6 +197,17 @@ pub(super) const MSG_LINT_CONFIG_PATH_ERR: &str = "Lint config path error"; pub(super) const MSG_RUNNING_CONTRACTS_LINTER_SPINNER: &str = "Running contracts linter.."; pub(super) const MSG_RUNNING_CONTRACTS_FMT_SPINNER: &str = "Running prettier for contracts.."; +pub(super) const MSG_RUNNING_SQL_FMT_SPINNER: &str = "Running SQL formatter.."; +pub(super) const MSG_FAILED_TO_FIND_END_OF_REGULAR_STRING_QUERY: &str = + "Failed to find the end of the regular string query"; +pub(super) const MSG_FAILED_TO_FIND_START_OF_REGULAR_STRING_QUERY: &str = + "Failed to find the start of the regular string query"; +pub(super) const MSG_FAILED_TO_DETERMINE_BASE_INDENT: &str = "Failed to determine base indent"; + +pub(super) fn msg_file_is_not_formatted(file: &str) -> String { + format!("File {} is not formatted", file) +} + // Test wallets related messages pub(super) const MSG_TEST_WALLETS_INFO: &str = "Print test wallets information"; pub(super) const MSG_DESERIALIZE_TEST_WALLETS_ERR: &str = "Impossible to deserialize test wallets"; From 0e7a3b504acd8c6ee4d462dc789438c252acbdd9 Mon Sep 17 00:00:00 2001 From: matias-gonz Date: Mon, 30 Sep 2024 08:08:23 -0300 Subject: [PATCH 09/19] merge --- ...151b3f9a2285724c9dc1a044762f7ce6f8bb7.json | 15 --- ...6054d3fb4f4a5c014ef24f5cb0ac4cd3465eb.json | 17 --- ...09c2c60fd2b91d376b924ec0089a721a2a640.json | 15 --- ...f1f5f1afadd54e1751ec59da39ac18811b3d.json} | 4 +- ...c761977ca7fe9a822d8318caffcf8882d4b1.json} | 5 +- ...5adefab0bf3abf6853a6d36123c8adcaf813b.json | 55 -------- ...39c62de28c585158497d9d1984fdc762f1440.json | 15 --- ...cd48c95ca5b4520dde415a2b5ff32ece47c86.json | 55 -------- ...a8d4cc59246dda91b19526e73f27a17c8e3da.json | 55 -------- ...874ec8fc1800b848951cf264b3f309701c52f.json | 8 -- ...1d22f984d4b063eeb9e92726a2afd86555277.json | 15 --- ...940d96210c6e7f1dc2f249741e45385e30e61.json | 8 -- ...701950441fcbf9784a6634ce020262e170951.json | 19 --- ...1810d85803da953bd7d5c46b34619e05374ed.json | 18 --- ...928e90167f2051e1c9b3a4d63e11f3273cc7a.json | 8 -- ...1cef7a213d52ec4d393e1e2f3a40aa9e1d7e9.json | 15 --- ...69f22d450a0fb0f10eb391b058f650d99ef71.json | 8 -- ...b86ce94a1379a01ec3ebb41aa9a210d589d08.json | 8 -- ...297bf9e6da07f09aa20d4923c953ddf87397.json} | 4 +- ...5d005d8760c4809b7aef902155196873da66e.json | 23 ---- ...38e1010d7389457b3c97e9b238a3a0291a54e.json | 24 ---- .../src/fri_witness_generator_dal.rs | 119 ------------------ 22 files changed, 6 insertions(+), 507 deletions(-) delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-10b5ee91c7995390603c2c9a253151b3f9a2285724c9dc1a044762f7ce6f8bb7.json delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-1dc6a926ada3f13ab6c2a6f3cc16054d3fb4f4a5c014ef24f5cb0ac4cd3465eb.json delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-23fd65c2640e9fabaa625da83da09c2c60fd2b91d376b924ec0089a721a2a640.json rename prover/crates/lib/prover_dal/.sqlx/{query-a817f0fec85388b3e2510ce259208a01b63ae4aa03c983c3a52c802d585e5a80.json => query-2677e0e54b2e3e9c14723aca65faf1f5f1afadd54e1751ec59da39ac18811b3d.json} (52%) rename prover/crates/lib/prover_dal/.sqlx/{query-cc686271a43d1ba657630e1eb702f85ac05423fdcd31c7e27c42cfd2e85b6cb1.json => query-2df5a59eb22ae25dcfc3364e736dc761977ca7fe9a822d8318caffcf8882d4b1.json} (53%) delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-35a76415cb746d03da31481edc65adefab0bf3abf6853a6d36123c8adcaf813b.json delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-37030583321ef93fed35f88576639c62de28c585158497d9d1984fdc762f1440.json delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-3727d5614d2fe2a4d96f880eb72cd48c95ca5b4520dde415a2b5ff32ece47c86.json delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-37ad15f54f4a6f4f79c71a857f3a8d4cc59246dda91b19526e73f27a17c8e3da.json delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-53f99a67b05cc8f1150d5cff4731d22f984d4b063eeb9e92726a2afd86555277.json delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-5fe7345162c22fab6b2bb13e29d701950441fcbf9784a6634ce020262e170951.json delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-6a77f68e7c3fa1d3bbf2fd6195e1810d85803da953bd7d5c46b34619e05374ed.json delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-aed6242f090b249a03a3d8c1d801cef7a213d52ec4d393e1e2f3a40aa9e1d7e9.json rename prover/crates/lib/prover_dal/.sqlx/{query-c8daa62b3835c15fafb3f83deabb5a4672ad50a9de92c84d939ac4c69842e355.json => query-e189d124956e4190c1a5d0cbd32a297bf9e6da07f09aa20d4923c953ddf87397.json} (58%) delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-e875dcbbdaed6998dbea45d4eab5d005d8760c4809b7aef902155196873da66e.json delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-eec29cbff034818f4fb5ec1e6ad38e1010d7389457b3c97e9b238a3a0291a54e.json diff --git a/prover/crates/lib/prover_dal/.sqlx/query-10b5ee91c7995390603c2c9a253151b3f9a2285724c9dc1a044762f7ce6f8bb7.json b/prover/crates/lib/prover_dal/.sqlx/query-10b5ee91c7995390603c2c9a253151b3f9a2285724c9dc1a044762f7ce6f8bb7.json deleted file mode 100644 index 0d582f664bc7..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-10b5ee91c7995390603c2c9a253151b3f9a2285724c9dc1a044762f7ce6f8bb7.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE\n node_aggregation_witness_jobs_fri\n SET\n status = 'failed',\n error = $1,\n updated_at = NOW()\n WHERE\n id = $2\n AND status != 'successful'\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Text", - "Int8" - ] - }, - "nullable": [] - }, - "hash": "10b5ee91c7995390603c2c9a253151b3f9a2285724c9dc1a044762f7ce6f8bb7" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-1dc6a926ada3f13ab6c2a6f3cc16054d3fb4f4a5c014ef24f5cb0ac4cd3465eb.json b/prover/crates/lib/prover_dal/.sqlx/query-1dc6a926ada3f13ab6c2a6f3cc16054d3fb4f4a5c014ef24f5cb0ac4cd3465eb.json deleted file mode 100644 index efb290e6a0f8..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-1dc6a926ada3f13ab6c2a6f3cc16054d3fb4f4a5c014ef24f5cb0ac4cd3465eb.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE\n leaf_aggregation_witness_jobs_fri\n SET\n status = $1,\n attempts = $2\n WHERE\n l1_batch_number = $3\n AND circuit_id = $4\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Text", - "Int2", - "Int8", - "Int2" - ] - }, - "nullable": [] - }, - "hash": "1dc6a926ada3f13ab6c2a6f3cc16054d3fb4f4a5c014ef24f5cb0ac4cd3465eb" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-23fd65c2640e9fabaa625da83da09c2c60fd2b91d376b924ec0089a721a2a640.json b/prover/crates/lib/prover_dal/.sqlx/query-23fd65c2640e9fabaa625da83da09c2c60fd2b91d376b924ec0089a721a2a640.json deleted file mode 100644 index 46f5135433ed..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-23fd65c2640e9fabaa625da83da09c2c60fd2b91d376b924ec0089a721a2a640.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE\n scheduler_witness_jobs_fri\n SET\n status = 'failed',\n error = $1,\n updated_at = NOW()\n WHERE\n l1_batch_number = $2\n AND status != 'successful'\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Text", - "Int8" - ] - }, - "nullable": [] - }, - "hash": "23fd65c2640e9fabaa625da83da09c2c60fd2b91d376b924ec0089a721a2a640" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-a817f0fec85388b3e2510ce259208a01b63ae4aa03c983c3a52c802d585e5a80.json b/prover/crates/lib/prover_dal/.sqlx/query-2677e0e54b2e3e9c14723aca65faf1f5f1afadd54e1751ec59da39ac18811b3d.json similarity index 52% rename from prover/crates/lib/prover_dal/.sqlx/query-a817f0fec85388b3e2510ce259208a01b63ae4aa03c983c3a52c802d585e5a80.json rename to prover/crates/lib/prover_dal/.sqlx/query-2677e0e54b2e3e9c14723aca65faf1f5f1afadd54e1751ec59da39ac18811b3d.json index 93532150f7f8..0eb756c36447 100644 --- a/prover/crates/lib/prover_dal/.sqlx/query-a817f0fec85388b3e2510ce259208a01b63ae4aa03c983c3a52c802d585e5a80.json +++ b/prover/crates/lib/prover_dal/.sqlx/query-2677e0e54b2e3e9c14723aca65faf1f5f1afadd54e1751ec59da39ac18811b3d.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n proof_compression_jobs_fri (l1_batch_number, status, created_at, updated_at)\n VALUES\n ($1, $2, NOW(), NOW())\n ON CONFLICT (l1_batch_number) DO\n UPDATE\n SET\n status = $2\n ", + "query": "\n INSERT INTO\n proof_compression_jobs_fri (l1_batch_number, status, created_at, updated_at)\n VALUES\n ($1, $2, NOW(), NOW()) ON CONFLICT (l1_batch_number) DO\n UPDATE\n SET\n status = $2\n ", "describe": { "columns": [], "parameters": { @@ -11,5 +11,5 @@ }, "nullable": [] }, - "hash": "a817f0fec85388b3e2510ce259208a01b63ae4aa03c983c3a52c802d585e5a80" + "hash": "2677e0e54b2e3e9c14723aca65faf1f5f1afadd54e1751ec59da39ac18811b3d" } diff --git a/prover/crates/lib/prover_dal/.sqlx/query-cc686271a43d1ba657630e1eb702f85ac05423fdcd31c7e27c42cfd2e85b6cb1.json b/prover/crates/lib/prover_dal/.sqlx/query-2df5a59eb22ae25dcfc3364e736dc761977ca7fe9a822d8318caffcf8882d4b1.json similarity index 53% rename from prover/crates/lib/prover_dal/.sqlx/query-cc686271a43d1ba657630e1eb702f85ac05423fdcd31c7e27c42cfd2e85b6cb1.json rename to prover/crates/lib/prover_dal/.sqlx/query-2df5a59eb22ae25dcfc3364e736dc761977ca7fe9a822d8318caffcf8882d4b1.json index 885384b04d45..f9e3eeeb3649 100644 --- a/prover/crates/lib/prover_dal/.sqlx/query-cc686271a43d1ba657630e1eb702f85ac05423fdcd31c7e27c42cfd2e85b6cb1.json +++ b/prover/crates/lib/prover_dal/.sqlx/query-2df5a59eb22ae25dcfc3364e736dc761977ca7fe9a822d8318caffcf8882d4b1.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n UPDATE\n witness_inputs_fri\n SET\n status = 'in_progress',\n attempts = attempts + 1,\n updated_at = NOW(),\n processing_started_at = NOW(),\n picked_by = $3\n WHERE\n l1_batch_number = (\n SELECT\n l1_batch_number\n FROM\n witness_inputs_fri\n WHERE\n l1_batch_number <= $1\n AND status = 'queued'\n AND protocol_version = $2\n AND protocol_version_patch = $4\n ORDER BY\n l1_batch_number ASC\n LIMIT\n 1 FOR\n UPDATE\n SKIP LOCKED\n )\n RETURNING\n witness_inputs_fri.l1_batch_number\n ", + "query": "\n UPDATE\n witness_inputs_fri\n SET\n status = 'in_progress',\n attempts = attempts + 1,\n updated_at = NOW(),\n processing_started_at = NOW(),\n picked_by = $2\n WHERE\n l1_batch_number = (\n SELECT\n l1_batch_number\n FROM\n witness_inputs_fri\n WHERE\n status = 'queued'\n AND protocol_version = $1\n AND protocol_version_patch = $3\n ORDER BY\n l1_batch_number ASC\n LIMIT\n 1 FOR\n UPDATE\n SKIP LOCKED\n )\n RETURNING\n witness_inputs_fri.l1_batch_number\n ", "describe": { "columns": [ { @@ -11,7 +11,6 @@ ], "parameters": { "Left": [ - "Int8", "Int4", "Text", "Int4" @@ -21,5 +20,5 @@ false ] }, - "hash": "cc686271a43d1ba657630e1eb702f85ac05423fdcd31c7e27c42cfd2e85b6cb1" + "hash": "2df5a59eb22ae25dcfc3364e736dc761977ca7fe9a822d8318caffcf8882d4b1" } diff --git a/prover/crates/lib/prover_dal/.sqlx/query-35a76415cb746d03da31481edc65adefab0bf3abf6853a6d36123c8adcaf813b.json b/prover/crates/lib/prover_dal/.sqlx/query-35a76415cb746d03da31481edc65adefab0bf3abf6853a6d36123c8adcaf813b.json deleted file mode 100644 index 8daf4883e3be..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-35a76415cb746d03da31481edc65adefab0bf3abf6853a6d36123c8adcaf813b.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "db_name": "PostgreSQL", -<<<<<<<< HEAD:prover/crates/lib/prover_dal/.sqlx/query-c0effa8e455c1a09c205994e58569f22d450a0fb0f10eb391b058f650d99ef71.json - "query": "\n UPDATE\n witness_inputs_fri\n SET\n status = 'queued',\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n l1_batch_number = $1\n AND attempts >= $2\n AND (\n status = 'in_progress'\n OR status = 'failed'\n )\n RETURNING\n l1_batch_number,\n status,\n attempts,\n error,\n picked_by\n ", -======== - "query": "\n UPDATE scheduler_witness_jobs_fri\n SET\n status = 'queued',\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n l1_batch_number = $1\n AND attempts >= $2\n AND (\n status = 'in_progress'\n OR status = 'failed'\n )\n RETURNING\n l1_batch_number,\n status,\n attempts,\n error,\n picked_by\n ", ->>>>>>>> 79b6fcf8b5d10a0ccdceb846370dd6870b6a32b5:prover/crates/lib/prover_dal/.sqlx/query-35a76415cb746d03da31481edc65adefab0bf3abf6853a6d36123c8adcaf813b.json - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "l1_batch_number", - "type_info": "Int8" - }, - { - "ordinal": 1, - "name": "status", - "type_info": "Text" - }, - { - "ordinal": 2, - "name": "attempts", - "type_info": "Int2" - }, - { - "ordinal": 3, - "name": "error", - "type_info": "Text" - }, - { - "ordinal": 4, - "name": "picked_by", - "type_info": "Text" - } - ], - "parameters": { - "Left": [ - "Int8", - "Int2" - ] - }, - "nullable": [ - false, - false, - false, - true, - true - ] - }, -<<<<<<<< HEAD:prover/crates/lib/prover_dal/.sqlx/query-c0effa8e455c1a09c205994e58569f22d450a0fb0f10eb391b058f650d99ef71.json - "hash": "c0effa8e455c1a09c205994e58569f22d450a0fb0f10eb391b058f650d99ef71" -======== - "hash": "35a76415cb746d03da31481edc65adefab0bf3abf6853a6d36123c8adcaf813b" ->>>>>>>> 79b6fcf8b5d10a0ccdceb846370dd6870b6a32b5:prover/crates/lib/prover_dal/.sqlx/query-35a76415cb746d03da31481edc65adefab0bf3abf6853a6d36123c8adcaf813b.json -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-37030583321ef93fed35f88576639c62de28c585158497d9d1984fdc762f1440.json b/prover/crates/lib/prover_dal/.sqlx/query-37030583321ef93fed35f88576639c62de28c585158497d9d1984fdc762f1440.json deleted file mode 100644 index 8c6ade6b3608..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-37030583321ef93fed35f88576639c62de28c585158497d9d1984fdc762f1440.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE\n witness_inputs_fri\n SET\n status = 'failed',\n error = $1,\n updated_at = NOW()\n WHERE\n l1_batch_number = $2\n AND status != 'successful'\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Text", - "Int8" - ] - }, - "nullable": [] - }, - "hash": "37030583321ef93fed35f88576639c62de28c585158497d9d1984fdc762f1440" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-3727d5614d2fe2a4d96f880eb72cd48c95ca5b4520dde415a2b5ff32ece47c86.json b/prover/crates/lib/prover_dal/.sqlx/query-3727d5614d2fe2a4d96f880eb72cd48c95ca5b4520dde415a2b5ff32ece47c86.json deleted file mode 100644 index 0abc4b4de772..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-3727d5614d2fe2a4d96f880eb72cd48c95ca5b4520dde415a2b5ff32ece47c86.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "db_name": "PostgreSQL", -<<<<<<<< HEAD:prover/crates/lib/prover_dal/.sqlx/query-4836d3766c6d31566a66ffb2b81874ec8fc1800b848951cf264b3f309701c52f.json - "query": "\n UPDATE\n scheduler_witness_jobs_fri\n SET\n status = 'queued',\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n l1_batch_number = $1\n AND attempts >= $2\n AND (\n status = 'in_progress'\n OR status = 'failed'\n )\n RETURNING\n l1_batch_number,\n status,\n attempts,\n error,\n picked_by\n ", -======== - "query": "\n UPDATE witness_inputs_fri\n SET\n status = 'queued',\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n l1_batch_number = $1\n AND attempts >= $2\n AND (\n status = 'in_progress'\n OR status = 'failed'\n )\n RETURNING\n l1_batch_number,\n status,\n attempts,\n error,\n picked_by\n ", ->>>>>>>> 79b6fcf8b5d10a0ccdceb846370dd6870b6a32b5:prover/crates/lib/prover_dal/.sqlx/query-3727d5614d2fe2a4d96f880eb72cd48c95ca5b4520dde415a2b5ff32ece47c86.json - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "l1_batch_number", - "type_info": "Int8" - }, - { - "ordinal": 1, - "name": "status", - "type_info": "Text" - }, - { - "ordinal": 2, - "name": "attempts", - "type_info": "Int2" - }, - { - "ordinal": 3, - "name": "error", - "type_info": "Text" - }, - { - "ordinal": 4, - "name": "picked_by", - "type_info": "Text" - } - ], - "parameters": { - "Left": [ - "Int8", - "Int2" - ] - }, - "nullable": [ - false, - false, - false, - true, - true - ] - }, -<<<<<<<< HEAD:prover/crates/lib/prover_dal/.sqlx/query-4836d3766c6d31566a66ffb2b81874ec8fc1800b848951cf264b3f309701c52f.json - "hash": "4836d3766c6d31566a66ffb2b81874ec8fc1800b848951cf264b3f309701c52f" -======== - "hash": "3727d5614d2fe2a4d96f880eb72cd48c95ca5b4520dde415a2b5ff32ece47c86" ->>>>>>>> 79b6fcf8b5d10a0ccdceb846370dd6870b6a32b5:prover/crates/lib/prover_dal/.sqlx/query-3727d5614d2fe2a4d96f880eb72cd48c95ca5b4520dde415a2b5ff32ece47c86.json -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-37ad15f54f4a6f4f79c71a857f3a8d4cc59246dda91b19526e73f27a17c8e3da.json b/prover/crates/lib/prover_dal/.sqlx/query-37ad15f54f4a6f4f79c71a857f3a8d4cc59246dda91b19526e73f27a17c8e3da.json deleted file mode 100644 index 1ae1cdfd4e7c..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-37ad15f54f4a6f4f79c71a857f3a8d4cc59246dda91b19526e73f27a17c8e3da.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "db_name": "PostgreSQL", -<<<<<<<< HEAD:prover/crates/lib/prover_dal/.sqlx/query-d21a3d43542ffbd22d6b55c5787b86ce94a1379a01ec3ebb41aa9a210d589d08.json - "query": "\n UPDATE\n recursion_tip_witness_jobs_fri\n SET\n status = 'queued',\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n l1_batch_number = $1\n AND attempts >= $2\n AND (\n status = 'in_progress'\n OR status = 'failed'\n )\n RETURNING\n l1_batch_number,\n status,\n attempts,\n error,\n picked_by\n ", -======== - "query": "\n UPDATE recursion_tip_witness_jobs_fri\n SET\n status = 'queued',\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n l1_batch_number = $1\n AND attempts >= $2\n AND (\n status = 'in_progress'\n OR status = 'failed'\n )\n RETURNING\n l1_batch_number,\n status,\n attempts,\n error,\n picked_by\n ", ->>>>>>>> 79b6fcf8b5d10a0ccdceb846370dd6870b6a32b5:prover/crates/lib/prover_dal/.sqlx/query-37ad15f54f4a6f4f79c71a857f3a8d4cc59246dda91b19526e73f27a17c8e3da.json - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "l1_batch_number", - "type_info": "Int8" - }, - { - "ordinal": 1, - "name": "status", - "type_info": "Text" - }, - { - "ordinal": 2, - "name": "attempts", - "type_info": "Int2" - }, - { - "ordinal": 3, - "name": "error", - "type_info": "Text" - }, - { - "ordinal": 4, - "name": "picked_by", - "type_info": "Text" - } - ], - "parameters": { - "Left": [ - "Int8", - "Int2" - ] - }, - "nullable": [ - false, - false, - false, - true, - true - ] - }, -<<<<<<<< HEAD:prover/crates/lib/prover_dal/.sqlx/query-d21a3d43542ffbd22d6b55c5787b86ce94a1379a01ec3ebb41aa9a210d589d08.json - "hash": "d21a3d43542ffbd22d6b55c5787b86ce94a1379a01ec3ebb41aa9a210d589d08" -======== - "hash": "37ad15f54f4a6f4f79c71a857f3a8d4cc59246dda91b19526e73f27a17c8e3da" ->>>>>>>> 79b6fcf8b5d10a0ccdceb846370dd6870b6a32b5:prover/crates/lib/prover_dal/.sqlx/query-37ad15f54f4a6f4f79c71a857f3a8d4cc59246dda91b19526e73f27a17c8e3da.json -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-4836d3766c6d31566a66ffb2b81874ec8fc1800b848951cf264b3f309701c52f.json b/prover/crates/lib/prover_dal/.sqlx/query-4836d3766c6d31566a66ffb2b81874ec8fc1800b848951cf264b3f309701c52f.json index 0abc4b4de772..d8988ce8850b 100644 --- a/prover/crates/lib/prover_dal/.sqlx/query-4836d3766c6d31566a66ffb2b81874ec8fc1800b848951cf264b3f309701c52f.json +++ b/prover/crates/lib/prover_dal/.sqlx/query-4836d3766c6d31566a66ffb2b81874ec8fc1800b848951cf264b3f309701c52f.json @@ -1,10 +1,6 @@ { "db_name": "PostgreSQL", -<<<<<<<< HEAD:prover/crates/lib/prover_dal/.sqlx/query-4836d3766c6d31566a66ffb2b81874ec8fc1800b848951cf264b3f309701c52f.json "query": "\n UPDATE\n scheduler_witness_jobs_fri\n SET\n status = 'queued',\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n l1_batch_number = $1\n AND attempts >= $2\n AND (\n status = 'in_progress'\n OR status = 'failed'\n )\n RETURNING\n l1_batch_number,\n status,\n attempts,\n error,\n picked_by\n ", -======== - "query": "\n UPDATE witness_inputs_fri\n SET\n status = 'queued',\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n l1_batch_number = $1\n AND attempts >= $2\n AND (\n status = 'in_progress'\n OR status = 'failed'\n )\n RETURNING\n l1_batch_number,\n status,\n attempts,\n error,\n picked_by\n ", ->>>>>>>> 79b6fcf8b5d10a0ccdceb846370dd6870b6a32b5:prover/crates/lib/prover_dal/.sqlx/query-3727d5614d2fe2a4d96f880eb72cd48c95ca5b4520dde415a2b5ff32ece47c86.json "describe": { "columns": [ { @@ -47,9 +43,5 @@ true ] }, -<<<<<<<< HEAD:prover/crates/lib/prover_dal/.sqlx/query-4836d3766c6d31566a66ffb2b81874ec8fc1800b848951cf264b3f309701c52f.json "hash": "4836d3766c6d31566a66ffb2b81874ec8fc1800b848951cf264b3f309701c52f" -======== - "hash": "3727d5614d2fe2a4d96f880eb72cd48c95ca5b4520dde415a2b5ff32ece47c86" ->>>>>>>> 79b6fcf8b5d10a0ccdceb846370dd6870b6a32b5:prover/crates/lib/prover_dal/.sqlx/query-3727d5614d2fe2a4d96f880eb72cd48c95ca5b4520dde415a2b5ff32ece47c86.json } diff --git a/prover/crates/lib/prover_dal/.sqlx/query-53f99a67b05cc8f1150d5cff4731d22f984d4b063eeb9e92726a2afd86555277.json b/prover/crates/lib/prover_dal/.sqlx/query-53f99a67b05cc8f1150d5cff4731d22f984d4b063eeb9e92726a2afd86555277.json deleted file mode 100644 index 4fe5cd7967c5..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-53f99a67b05cc8f1150d5cff4731d22f984d4b063eeb9e92726a2afd86555277.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE\n leaf_aggregation_witness_jobs_fri\n SET\n status = 'failed',\n error = $1,\n updated_at = NOW()\n WHERE\n id = $2\n AND status != 'successful'\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Text", - "Int8" - ] - }, - "nullable": [] - }, - "hash": "53f99a67b05cc8f1150d5cff4731d22f984d4b063eeb9e92726a2afd86555277" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-5cf5d667206438d3fcf478a6c79940d96210c6e7f1dc2f249741e45385e30e61.json b/prover/crates/lib/prover_dal/.sqlx/query-5cf5d667206438d3fcf478a6c79940d96210c6e7f1dc2f249741e45385e30e61.json index ac7ff78411e8..a37c2bdf21d4 100644 --- a/prover/crates/lib/prover_dal/.sqlx/query-5cf5d667206438d3fcf478a6c79940d96210c6e7f1dc2f249741e45385e30e61.json +++ b/prover/crates/lib/prover_dal/.sqlx/query-5cf5d667206438d3fcf478a6c79940d96210c6e7f1dc2f249741e45385e30e61.json @@ -1,10 +1,6 @@ { "db_name": "PostgreSQL", -<<<<<<<< HEAD:prover/crates/lib/prover_dal/.sqlx/query-5cf5d667206438d3fcf478a6c79940d96210c6e7f1dc2f249741e45385e30e61.json "query": "\n INSERT INTO\n leaf_aggregation_witness_jobs_fri (\n l1_batch_number,\n circuit_id,\n status,\n number_of_basic_circuits,\n created_at,\n updated_at\n )\n VALUES\n ($1, $2, 'waiting_for_proofs', 2, NOW(), NOW()) ON CONFLICT (l1_batch_number, circuit_id) DO\n UPDATE\n SET\n status = $3\n ", -======== - "query": "\n INSERT INTO\n leaf_aggregation_witness_jobs_fri (\n l1_batch_number,\n circuit_id,\n status,\n number_of_basic_circuits,\n created_at,\n updated_at\n )\n VALUES\n ($1, $2, 'waiting_for_proofs', 2, NOW(), NOW())\n ON CONFLICT (l1_batch_number, circuit_id) DO\n UPDATE\n SET\n status = $3\n ", ->>>>>>>> 79b6fcf8b5d10a0ccdceb846370dd6870b6a32b5:prover/crates/lib/prover_dal/.sqlx/query-eec29cbff034818f4fb5ec1e6ad38e1010d7389457b3c97e9b238a3a0291a54e.json "describe": { "columns": [], "parameters": { @@ -16,9 +12,5 @@ }, "nullable": [] }, -<<<<<<<< HEAD:prover/crates/lib/prover_dal/.sqlx/query-5cf5d667206438d3fcf478a6c79940d96210c6e7f1dc2f249741e45385e30e61.json "hash": "5cf5d667206438d3fcf478a6c79940d96210c6e7f1dc2f249741e45385e30e61" -======== - "hash": "eec29cbff034818f4fb5ec1e6ad38e1010d7389457b3c97e9b238a3a0291a54e" ->>>>>>>> 79b6fcf8b5d10a0ccdceb846370dd6870b6a32b5:prover/crates/lib/prover_dal/.sqlx/query-eec29cbff034818f4fb5ec1e6ad38e1010d7389457b3c97e9b238a3a0291a54e.json } diff --git a/prover/crates/lib/prover_dal/.sqlx/query-5fe7345162c22fab6b2bb13e29d701950441fcbf9784a6634ce020262e170951.json b/prover/crates/lib/prover_dal/.sqlx/query-5fe7345162c22fab6b2bb13e29d701950441fcbf9784a6634ce020262e170951.json deleted file mode 100644 index fb3e3214462b..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-5fe7345162c22fab6b2bb13e29d701950441fcbf9784a6634ce020262e170951.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE\n prover_jobs_fri\n SET\n status = $1,\n attempts = $2\n WHERE\n l1_batch_number = $3\n AND sequence_number = $4\n AND aggregation_round = $5\n AND circuit_id = $6\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Text", - "Int2", - "Int8", - "Int4", - "Int2", - "Int2" - ] - }, - "nullable": [] - }, - "hash": "5fe7345162c22fab6b2bb13e29d701950441fcbf9784a6634ce020262e170951" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-6a77f68e7c3fa1d3bbf2fd6195e1810d85803da953bd7d5c46b34619e05374ed.json b/prover/crates/lib/prover_dal/.sqlx/query-6a77f68e7c3fa1d3bbf2fd6195e1810d85803da953bd7d5c46b34619e05374ed.json deleted file mode 100644 index 10eb050ee9a6..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-6a77f68e7c3fa1d3bbf2fd6195e1810d85803da953bd7d5c46b34619e05374ed.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE\n prover_jobs_fri\n SET\n status = $1\n WHERE\n l1_batch_number = $2\n AND sequence_number = $3\n AND aggregation_round = $4\n AND circuit_id = $5\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Text", - "Int8", - "Int4", - "Int2", - "Int2" - ] - }, - "nullable": [] - }, - "hash": "6a77f68e7c3fa1d3bbf2fd6195e1810d85803da953bd7d5c46b34619e05374ed" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-6ff1dea12f696274a62338cb8b5928e90167f2051e1c9b3a4d63e11f3273cc7a.json b/prover/crates/lib/prover_dal/.sqlx/query-6ff1dea12f696274a62338cb8b5928e90167f2051e1c9b3a4d63e11f3273cc7a.json index fd4796903246..58b520f81c80 100644 --- a/prover/crates/lib/prover_dal/.sqlx/query-6ff1dea12f696274a62338cb8b5928e90167f2051e1c9b3a4d63e11f3273cc7a.json +++ b/prover/crates/lib/prover_dal/.sqlx/query-6ff1dea12f696274a62338cb8b5928e90167f2051e1c9b3a4d63e11f3273cc7a.json @@ -1,10 +1,6 @@ { "db_name": "PostgreSQL", -<<<<<<<< HEAD:prover/crates/lib/prover_dal/.sqlx/query-6ff1dea12f696274a62338cb8b5928e90167f2051e1c9b3a4d63e11f3273cc7a.json "query": "\n INSERT INTO\n scheduler_witness_jobs_fri (\n l1_batch_number,\n scheduler_partial_input_blob_url,\n status,\n created_at,\n updated_at\n )\n VALUES\n ($1, '', 'waiting_for_proofs', NOW(), NOW()) ON CONFLICT (l1_batch_number) DO\n UPDATE\n SET\n status = $2\n ", -======== - "query": "\n INSERT INTO\n scheduler_witness_jobs_fri (\n l1_batch_number,\n scheduler_partial_input_blob_url,\n status,\n created_at,\n updated_at\n )\n VALUES\n ($1, '', 'waiting_for_proofs', NOW(), NOW())\n ON CONFLICT (l1_batch_number) DO\n UPDATE\n SET\n status = $2\n ", ->>>>>>>> 79b6fcf8b5d10a0ccdceb846370dd6870b6a32b5:prover/crates/lib/prover_dal/.sqlx/query-e875dcbbdaed6998dbea45d4eab5d005d8760c4809b7aef902155196873da66e.json "describe": { "columns": [], "parameters": { @@ -15,9 +11,5 @@ }, "nullable": [] }, -<<<<<<<< HEAD:prover/crates/lib/prover_dal/.sqlx/query-6ff1dea12f696274a62338cb8b5928e90167f2051e1c9b3a4d63e11f3273cc7a.json "hash": "6ff1dea12f696274a62338cb8b5928e90167f2051e1c9b3a4d63e11f3273cc7a" -======== - "hash": "e875dcbbdaed6998dbea45d4eab5d005d8760c4809b7aef902155196873da66e" ->>>>>>>> 79b6fcf8b5d10a0ccdceb846370dd6870b6a32b5:prover/crates/lib/prover_dal/.sqlx/query-e875dcbbdaed6998dbea45d4eab5d005d8760c4809b7aef902155196873da66e.json } diff --git a/prover/crates/lib/prover_dal/.sqlx/query-aed6242f090b249a03a3d8c1d801cef7a213d52ec4d393e1e2f3a40aa9e1d7e9.json b/prover/crates/lib/prover_dal/.sqlx/query-aed6242f090b249a03a3d8c1d801cef7a213d52ec4d393e1e2f3a40aa9e1d7e9.json deleted file mode 100644 index 81c161e8d772..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-aed6242f090b249a03a3d8c1d801cef7a213d52ec4d393e1e2f3a40aa9e1d7e9.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE\n recursion_tip_witness_jobs_fri\n SET\n status = 'failed',\n error = $1,\n updated_at = NOW()\n WHERE\n l1_batch_number = $2\n AND status != 'successful'\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Text", - "Int8" - ] - }, - "nullable": [] - }, - "hash": "aed6242f090b249a03a3d8c1d801cef7a213d52ec4d393e1e2f3a40aa9e1d7e9" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-c0effa8e455c1a09c205994e58569f22d450a0fb0f10eb391b058f650d99ef71.json b/prover/crates/lib/prover_dal/.sqlx/query-c0effa8e455c1a09c205994e58569f22d450a0fb0f10eb391b058f650d99ef71.json index 8daf4883e3be..060dfd435264 100644 --- a/prover/crates/lib/prover_dal/.sqlx/query-c0effa8e455c1a09c205994e58569f22d450a0fb0f10eb391b058f650d99ef71.json +++ b/prover/crates/lib/prover_dal/.sqlx/query-c0effa8e455c1a09c205994e58569f22d450a0fb0f10eb391b058f650d99ef71.json @@ -1,10 +1,6 @@ { "db_name": "PostgreSQL", -<<<<<<<< HEAD:prover/crates/lib/prover_dal/.sqlx/query-c0effa8e455c1a09c205994e58569f22d450a0fb0f10eb391b058f650d99ef71.json "query": "\n UPDATE\n witness_inputs_fri\n SET\n status = 'queued',\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n l1_batch_number = $1\n AND attempts >= $2\n AND (\n status = 'in_progress'\n OR status = 'failed'\n )\n RETURNING\n l1_batch_number,\n status,\n attempts,\n error,\n picked_by\n ", -======== - "query": "\n UPDATE scheduler_witness_jobs_fri\n SET\n status = 'queued',\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n l1_batch_number = $1\n AND attempts >= $2\n AND (\n status = 'in_progress'\n OR status = 'failed'\n )\n RETURNING\n l1_batch_number,\n status,\n attempts,\n error,\n picked_by\n ", ->>>>>>>> 79b6fcf8b5d10a0ccdceb846370dd6870b6a32b5:prover/crates/lib/prover_dal/.sqlx/query-35a76415cb746d03da31481edc65adefab0bf3abf6853a6d36123c8adcaf813b.json "describe": { "columns": [ { @@ -47,9 +43,5 @@ true ] }, -<<<<<<<< HEAD:prover/crates/lib/prover_dal/.sqlx/query-c0effa8e455c1a09c205994e58569f22d450a0fb0f10eb391b058f650d99ef71.json "hash": "c0effa8e455c1a09c205994e58569f22d450a0fb0f10eb391b058f650d99ef71" -======== - "hash": "35a76415cb746d03da31481edc65adefab0bf3abf6853a6d36123c8adcaf813b" ->>>>>>>> 79b6fcf8b5d10a0ccdceb846370dd6870b6a32b5:prover/crates/lib/prover_dal/.sqlx/query-35a76415cb746d03da31481edc65adefab0bf3abf6853a6d36123c8adcaf813b.json } diff --git a/prover/crates/lib/prover_dal/.sqlx/query-d21a3d43542ffbd22d6b55c5787b86ce94a1379a01ec3ebb41aa9a210d589d08.json b/prover/crates/lib/prover_dal/.sqlx/query-d21a3d43542ffbd22d6b55c5787b86ce94a1379a01ec3ebb41aa9a210d589d08.json index 1ae1cdfd4e7c..beb24cf6a578 100644 --- a/prover/crates/lib/prover_dal/.sqlx/query-d21a3d43542ffbd22d6b55c5787b86ce94a1379a01ec3ebb41aa9a210d589d08.json +++ b/prover/crates/lib/prover_dal/.sqlx/query-d21a3d43542ffbd22d6b55c5787b86ce94a1379a01ec3ebb41aa9a210d589d08.json @@ -1,10 +1,6 @@ { "db_name": "PostgreSQL", -<<<<<<<< HEAD:prover/crates/lib/prover_dal/.sqlx/query-d21a3d43542ffbd22d6b55c5787b86ce94a1379a01ec3ebb41aa9a210d589d08.json "query": "\n UPDATE\n recursion_tip_witness_jobs_fri\n SET\n status = 'queued',\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n l1_batch_number = $1\n AND attempts >= $2\n AND (\n status = 'in_progress'\n OR status = 'failed'\n )\n RETURNING\n l1_batch_number,\n status,\n attempts,\n error,\n picked_by\n ", -======== - "query": "\n UPDATE recursion_tip_witness_jobs_fri\n SET\n status = 'queued',\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n l1_batch_number = $1\n AND attempts >= $2\n AND (\n status = 'in_progress'\n OR status = 'failed'\n )\n RETURNING\n l1_batch_number,\n status,\n attempts,\n error,\n picked_by\n ", ->>>>>>>> 79b6fcf8b5d10a0ccdceb846370dd6870b6a32b5:prover/crates/lib/prover_dal/.sqlx/query-37ad15f54f4a6f4f79c71a857f3a8d4cc59246dda91b19526e73f27a17c8e3da.json "describe": { "columns": [ { @@ -47,9 +43,5 @@ true ] }, -<<<<<<<< HEAD:prover/crates/lib/prover_dal/.sqlx/query-d21a3d43542ffbd22d6b55c5787b86ce94a1379a01ec3ebb41aa9a210d589d08.json "hash": "d21a3d43542ffbd22d6b55c5787b86ce94a1379a01ec3ebb41aa9a210d589d08" -======== - "hash": "37ad15f54f4a6f4f79c71a857f3a8d4cc59246dda91b19526e73f27a17c8e3da" ->>>>>>>> 79b6fcf8b5d10a0ccdceb846370dd6870b6a32b5:prover/crates/lib/prover_dal/.sqlx/query-37ad15f54f4a6f4f79c71a857f3a8d4cc59246dda91b19526e73f27a17c8e3da.json } diff --git a/prover/crates/lib/prover_dal/.sqlx/query-c8daa62b3835c15fafb3f83deabb5a4672ad50a9de92c84d939ac4c69842e355.json b/prover/crates/lib/prover_dal/.sqlx/query-e189d124956e4190c1a5d0cbd32a297bf9e6da07f09aa20d4923c953ddf87397.json similarity index 58% rename from prover/crates/lib/prover_dal/.sqlx/query-c8daa62b3835c15fafb3f83deabb5a4672ad50a9de92c84d939ac4c69842e355.json rename to prover/crates/lib/prover_dal/.sqlx/query-e189d124956e4190c1a5d0cbd32a297bf9e6da07f09aa20d4923c953ddf87397.json index cadc931fa1ca..e989cb51f9bd 100644 --- a/prover/crates/lib/prover_dal/.sqlx/query-c8daa62b3835c15fafb3f83deabb5a4672ad50a9de92c84d939ac4c69842e355.json +++ b/prover/crates/lib/prover_dal/.sqlx/query-e189d124956e4190c1a5d0cbd32a297bf9e6da07f09aa20d4923c953ddf87397.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n node_aggregation_witness_jobs_fri (l1_batch_number, circuit_id, status, created_at, updated_at)\n VALUES\n ($1, $2, 'waiting_for_proofs', NOW(), NOW())\n ON CONFLICT (l1_batch_number, circuit_id, depth) DO\n UPDATE\n SET\n status = $3\n ", + "query": "\n INSERT INTO\n node_aggregation_witness_jobs_fri (l1_batch_number, circuit_id, status, created_at, updated_at)\n VALUES\n ($1, $2, 'waiting_for_proofs', NOW(), NOW()) ON CONFLICT (l1_batch_number, circuit_id, depth) DO\n UPDATE\n SET\n status = $3\n ", "describe": { "columns": [], "parameters": { @@ -12,5 +12,5 @@ }, "nullable": [] }, - "hash": "c8daa62b3835c15fafb3f83deabb5a4672ad50a9de92c84d939ac4c69842e355" + "hash": "e189d124956e4190c1a5d0cbd32a297bf9e6da07f09aa20d4923c953ddf87397" } diff --git a/prover/crates/lib/prover_dal/.sqlx/query-e875dcbbdaed6998dbea45d4eab5d005d8760c4809b7aef902155196873da66e.json b/prover/crates/lib/prover_dal/.sqlx/query-e875dcbbdaed6998dbea45d4eab5d005d8760c4809b7aef902155196873da66e.json deleted file mode 100644 index fd4796903246..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-e875dcbbdaed6998dbea45d4eab5d005d8760c4809b7aef902155196873da66e.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "db_name": "PostgreSQL", -<<<<<<<< HEAD:prover/crates/lib/prover_dal/.sqlx/query-6ff1dea12f696274a62338cb8b5928e90167f2051e1c9b3a4d63e11f3273cc7a.json - "query": "\n INSERT INTO\n scheduler_witness_jobs_fri (\n l1_batch_number,\n scheduler_partial_input_blob_url,\n status,\n created_at,\n updated_at\n )\n VALUES\n ($1, '', 'waiting_for_proofs', NOW(), NOW()) ON CONFLICT (l1_batch_number) DO\n UPDATE\n SET\n status = $2\n ", -======== - "query": "\n INSERT INTO\n scheduler_witness_jobs_fri (\n l1_batch_number,\n scheduler_partial_input_blob_url,\n status,\n created_at,\n updated_at\n )\n VALUES\n ($1, '', 'waiting_for_proofs', NOW(), NOW())\n ON CONFLICT (l1_batch_number) DO\n UPDATE\n SET\n status = $2\n ", ->>>>>>>> 79b6fcf8b5d10a0ccdceb846370dd6870b6a32b5:prover/crates/lib/prover_dal/.sqlx/query-e875dcbbdaed6998dbea45d4eab5d005d8760c4809b7aef902155196873da66e.json - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8", - "Text" - ] - }, - "nullable": [] - }, -<<<<<<<< HEAD:prover/crates/lib/prover_dal/.sqlx/query-6ff1dea12f696274a62338cb8b5928e90167f2051e1c9b3a4d63e11f3273cc7a.json - "hash": "6ff1dea12f696274a62338cb8b5928e90167f2051e1c9b3a4d63e11f3273cc7a" -======== - "hash": "e875dcbbdaed6998dbea45d4eab5d005d8760c4809b7aef902155196873da66e" ->>>>>>>> 79b6fcf8b5d10a0ccdceb846370dd6870b6a32b5:prover/crates/lib/prover_dal/.sqlx/query-e875dcbbdaed6998dbea45d4eab5d005d8760c4809b7aef902155196873da66e.json -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-eec29cbff034818f4fb5ec1e6ad38e1010d7389457b3c97e9b238a3a0291a54e.json b/prover/crates/lib/prover_dal/.sqlx/query-eec29cbff034818f4fb5ec1e6ad38e1010d7389457b3c97e9b238a3a0291a54e.json deleted file mode 100644 index ac7ff78411e8..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-eec29cbff034818f4fb5ec1e6ad38e1010d7389457b3c97e9b238a3a0291a54e.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "db_name": "PostgreSQL", -<<<<<<<< HEAD:prover/crates/lib/prover_dal/.sqlx/query-5cf5d667206438d3fcf478a6c79940d96210c6e7f1dc2f249741e45385e30e61.json - "query": "\n INSERT INTO\n leaf_aggregation_witness_jobs_fri (\n l1_batch_number,\n circuit_id,\n status,\n number_of_basic_circuits,\n created_at,\n updated_at\n )\n VALUES\n ($1, $2, 'waiting_for_proofs', 2, NOW(), NOW()) ON CONFLICT (l1_batch_number, circuit_id) DO\n UPDATE\n SET\n status = $3\n ", -======== - "query": "\n INSERT INTO\n leaf_aggregation_witness_jobs_fri (\n l1_batch_number,\n circuit_id,\n status,\n number_of_basic_circuits,\n created_at,\n updated_at\n )\n VALUES\n ($1, $2, 'waiting_for_proofs', 2, NOW(), NOW())\n ON CONFLICT (l1_batch_number, circuit_id) DO\n UPDATE\n SET\n status = $3\n ", ->>>>>>>> 79b6fcf8b5d10a0ccdceb846370dd6870b6a32b5:prover/crates/lib/prover_dal/.sqlx/query-eec29cbff034818f4fb5ec1e6ad38e1010d7389457b3c97e9b238a3a0291a54e.json - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8", - "Int2", - "Text" - ] - }, - "nullable": [] - }, -<<<<<<<< HEAD:prover/crates/lib/prover_dal/.sqlx/query-5cf5d667206438d3fcf478a6c79940d96210c6e7f1dc2f249741e45385e30e61.json - "hash": "5cf5d667206438d3fcf478a6c79940d96210c6e7f1dc2f249741e45385e30e61" -======== - "hash": "eec29cbff034818f4fb5ec1e6ad38e1010d7389457b3c97e9b238a3a0291a54e" ->>>>>>>> 79b6fcf8b5d10a0ccdceb846370dd6870b6a32b5:prover/crates/lib/prover_dal/.sqlx/query-eec29cbff034818f4fb5ec1e6ad38e1010d7389457b3c97e9b238a3a0291a54e.json -} diff --git a/prover/crates/lib/prover_dal/src/fri_witness_generator_dal.rs b/prover/crates/lib/prover_dal/src/fri_witness_generator_dal.rs index edbe49b51e81..9a5bab107cbd 100644 --- a/prover/crates/lib/prover_dal/src/fri_witness_generator_dal.rs +++ b/prover/crates/lib/prover_dal/src/fri_witness_generator_dal.rs @@ -166,51 +166,6 @@ impl FriWitnessGeneratorDal<'_, '_> { .unwrap(); } -<<<<<<< HEAD - pub async fn mark_witness_job_failed(&mut self, error: &str, block_number: L1BatchNumber) { - sqlx::query!( - r#" - UPDATE - witness_inputs_fri - SET - status = 'failed', - error = $1, - updated_at = NOW() - WHERE - l1_batch_number = $2 - AND status != 'successful' - "#, - error, - i64::from(block_number.0) - ) - .execute(self.storage.conn()) - .await - .unwrap(); - } - - pub async fn mark_leaf_aggregation_job_failed(&mut self, error: &str, id: u32) { - sqlx::query!( - r#" - UPDATE - leaf_aggregation_witness_jobs_fri - SET - status = 'failed', - error = $1, - updated_at = NOW() - WHERE - id = $2 - AND status != 'successful' - "#, - error, - i64::from(id) - ) - .execute(self.storage.conn()) - .await - .unwrap(); - } - -======= ->>>>>>> 79b6fcf8b5d10a0ccdceb846370dd6870b6a32b5 pub async fn mark_leaf_aggregation_as_successful(&mut self, id: u32, time_taken: Duration) { sqlx::query!( r#" @@ -662,53 +617,6 @@ impl FriWitnessGeneratorDal<'_, '_> { }) } -<<<<<<< HEAD - pub async fn get_node_aggregation_job_attempts( - &mut self, - id: u32, - ) -> sqlx::Result> { - let attempts = sqlx::query!( - r#" - SELECT - attempts - FROM - node_aggregation_witness_jobs_fri - WHERE - id = $1 - "#, - i64::from(id) - ) - .fetch_optional(self.storage.conn()) - .await - .unwrap() - .map(|row| row.attempts as u32); - - Ok(attempts) - } - - pub async fn mark_node_aggregation_job_failed(&mut self, error: &str, id: u32) { - sqlx::query!( - r#" - UPDATE - node_aggregation_witness_jobs_fri - SET - status = 'failed', - error = $1, - updated_at = NOW() - WHERE - id = $2 - AND status != 'successful' - "#, - error, - i64::from(id) - ) - .execute(self.storage.conn()) - .await - .unwrap(); - } - -======= ->>>>>>> 79b6fcf8b5d10a0ccdceb846370dd6870b6a32b5 pub async fn mark_node_aggregation_as_successful(&mut self, id: u32, time_taken: Duration) { sqlx::query!( r#" @@ -1349,27 +1257,6 @@ impl FriWitnessGeneratorDal<'_, '_> { job_id: u32, aggregation_round: AggregationRound, ) { -<<<<<<< HEAD - sqlx::query!( - r#" - UPDATE - recursion_tip_witness_jobs_fri - SET - status = 'failed', - error = $1, - updated_at = NOW() - WHERE - l1_batch_number = $2 - AND status != 'successful' - "#, - error, - l1_batch_number.0 as i64 - ) - .execute(self.storage.conn()) - .await - .unwrap(); - } -======= let table = match aggregation_round { AggregationRound::BasicCircuits => "witness_inputs_fri", AggregationRound::LeafAggregation => "leaf_aggregation_witness_jobs_fri", @@ -1377,7 +1264,6 @@ impl FriWitnessGeneratorDal<'_, '_> { AggregationRound::RecursionTip => "recursion_tip_witness_jobs_fri", AggregationRound::Scheduler => "scheduler_witness_jobs_fri", }; ->>>>>>> 79b6fcf8b5d10a0ccdceb846370dd6870b6a32b5 let job_id_column = match aggregation_round { AggregationRound::BasicCircuits => "l1_batch_number", @@ -1389,12 +1275,7 @@ impl FriWitnessGeneratorDal<'_, '_> { let query = format!( r#" -<<<<<<< HEAD - UPDATE - scheduler_witness_jobs_fri -======= UPDATE {table} ->>>>>>> 79b6fcf8b5d10a0ccdceb846370dd6870b6a32b5 SET status = 'failed', error = {error}, From d54653fca389db64ecb3ab0ee267de7ccf92ae14 Mon Sep 17 00:00:00 2001 From: matias-gonz Date: Mon, 30 Sep 2024 08:11:08 -0300 Subject: [PATCH 10/19] Fix keywords --- zk_toolbox/crates/zk_supervisor/src/commands/sql_fmt.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/zk_toolbox/crates/zk_supervisor/src/commands/sql_fmt.rs b/zk_toolbox/crates/zk_supervisor/src/commands/sql_fmt.rs index f4f270555ca1..c953982d58bd 100644 --- a/zk_toolbox/crates/zk_supervisor/src/commands/sql_fmt.rs +++ b/zk_toolbox/crates/zk_supervisor/src/commands/sql_fmt.rs @@ -3,14 +3,13 @@ use common::spinner::Spinner; use regex::Regex; use xshell::Shell; +use super::lint_utils::{get_unignored_files, IgnoredData, Target}; use crate::messages::{ msg_file_is_not_formatted, MSG_FAILED_TO_DETERMINE_BASE_INDENT, MSG_FAILED_TO_FIND_END_OF_REGULAR_STRING_QUERY, MSG_FAILED_TO_FIND_START_OF_REGULAR_STRING_QUERY, MSG_RUNNING_SQL_FMT_SPINNER, }; -use super::lint_utils::{get_unignored_files, IgnoredData, Target}; - fn format_query(query: &str) -> anyhow::Result { let options = sqlformat::FormatOptions { indent: sqlformat::Indent::Spaces(4), @@ -30,7 +29,9 @@ fn format_query(query: &str) -> anyhow::Result { "VALUE", "DEPTH", "KEY", + "KEYS", "STATUS", + "EVENTS", ]; for keyword in keywords { let regex = Regex::new(&format!(r"\b{}\b", keyword))?; From f4e20c55d31850e8760218dabdebd029b0eb7b60 Mon Sep 17 00:00:00 2001 From: matias-gonz Date: Mon, 30 Sep 2024 08:16:09 -0300 Subject: [PATCH 11/19] Fix uppercase --- ...9906a81580f252b2260bfdaa46a25f45d1cd.json} | 4 +-- ...27233a36e018fe5c0651995b876053a6a054.json} | 4 +-- ...df547011412e89a1fa8f6bc26ca6a03709bb.json} | 4 +-- ...a8869da8f10738ba77e3d8e048057b0e7b12.json} | 4 +-- ...1ef4ad58ff942f3dad4fb87e5a105fbfcd13.json} | 4 +-- ...7445aa3148d8abdd4e5fb50947ce512f53690.json | 14 ---------- ...54f72cdbdc00487a42a42b4c15584e601e261.json | 14 ++++++++++ ...21df4deb486211260ea86d272fc69a447385.json} | 4 +-- ...1bffbb123e71e0334c17a3f334789f420ad3.json} | 4 +-- ...fe6910fce4cf57c0959dc4dad4d93129ec1b.json} | 4 +-- ...9f9b8679d770b3d1ca755c42ee264342da03.json} | 4 +-- ...d02dea5720c940818242b7476cd57ffc9af8.json} | 4 +-- ...d0e0d6d235b05441fc306dbf70d27f1b728c.json} | 4 +-- ...1c6c341e2122d40b8dd8d7e1de6a3cf14d3d.json} | 4 +-- ...9305636d5c692804f08e96f913a877798ccb.json} | 4 +-- core/lib/dal/src/consensus_dal.rs | 3 +- core/lib/dal/src/contract_verification_dal.rs | 2 +- core/lib/dal/src/eth_watcher_dal.rs | 11 ++++---- core/lib/dal/src/events_dal.rs | 10 +++---- core/lib/dal/src/events_web3_dal.rs | 2 +- core/lib/dal/src/pruning_dal/mod.rs | 2 +- core/lib/dal/src/snapshots_creator_dal.rs | 20 ++++++------- core/lib/dal/src/transactions_web3_dal.rs | 20 ++++++------- ...636ca3032cd5dcc5d3d1d4d5d0a16c38c20ef.json | 16 +++++++++++ ...f1cdac8b194f09926c133985479c533a651f2.json | 18 ------------ ...a4dab579b76ea65ea022505a3f57fc0a4a946.json | 15 ++++++++++ ...6054d3fb4f4a5c014ef24f5cb0ac4cd3465eb.json | 17 +++++++++++ ...cf8c93630d529ec96e67aac078f18196f61a5.json | 19 ------------- ...701950441fcbf9784a6634ce020262e170951.json | 19 +++++++++++++ ...1810d85803da953bd7d5c46b34619e05374ed.json | 18 ++++++++++++ ...41976a264759c4060c1a38e466ee2052fc17d.json | 15 ---------- ...2a4a98ec63eb942c73ce4448d0957346047cd.json | 17 ----------- ...a297bf9e6da07f09aa20d4923c953ddf87397.json | 16 ----------- .../crates/lib/prover_dal/src/cli_test_dal.rs | 28 ++++++++++++++----- 34 files changed, 182 insertions(+), 166 deletions(-) rename core/lib/dal/.sqlx/{query-959e1b8231484611334d4441823ad49a080299632be9f41bc838d2e7416fce75.json => query-13b09ea7749530884233add59dee9906a81580f252b2260bfdaa46a25f45d1cd.json} (89%) rename core/lib/dal/.sqlx/{query-30ccd33a8bf7ac28fe510e15e360be225db5f8165acf1d617d0c31e8c47bab33.json => query-26bc9b315c4c57bcff1f46da956727233a36e018fe5c0651995b876053a6a054.json} (86%) rename core/lib/dal/.sqlx/{query-7168f5cf14cfaa35962c5a25b00e2ed3cba01cf9a816e8eea972020d4be8ad5e.json => query-2952bedc1c6320a643c42cc6d58fdf547011412e89a1fa8f6bc26ca6a03709bb.json} (94%) rename core/lib/dal/.sqlx/{query-ee4f40c9924b607226e60279e0c89d4ab965ab3e45badaf607af8e8787b5a8cb.json => query-2cba440c2925631655a7f67486a5a8869da8f10738ba77e3d8e048057b0e7b12.json} (91%) rename core/lib/dal/.sqlx/{query-e8058944c2b1650ba831865aa62d1450fb1cb5219bcf68b920cf42c23628bd58.json => query-3f83c528378dda7b8ddc6ceeedca1ef4ad58ff942f3dad4fb87e5a105fbfcd13.json} (83%) delete mode 100644 core/lib/dal/.sqlx/query-44ec5b4d2218099da30aa8d654f7445aa3148d8abdd4e5fb50947ce512f53690.json create mode 100644 core/lib/dal/.sqlx/query-50eecd5b068f4ee20bff603853854f72cdbdc00487a42a42b4c15584e601e261.json rename core/lib/dal/.sqlx/{query-7fdc68c55f4860ce767a5e9d20d736ceef46d819394b7602218514b2e2a906eb.json => query-700be354c97bfdfd9385e0f4e47821df4deb486211260ea86d272fc69a447385.json} (61%) rename core/lib/dal/.sqlx/{query-281ccf6f99d9e3c5e9eb29de437aaf3a07530a8d8b6787e20ebafd344c01ba65.json => query-78de0a295e3a2a5412810b1cfa1f1bffbb123e71e0334c17a3f334789f420ad3.json} (64%) rename core/lib/dal/.sqlx/{query-e0aa620216ab8b1b209bc2b1079198deaa1ee92c9c7d608199673a8ed5558a17.json => query-7b41633745312d0580634c3017e5fe6910fce4cf57c0959dc4dad4d93129ec1b.json} (83%) rename core/lib/dal/.sqlx/{query-e496794ed5fb282a64d8bd84f8a227bae6207b1a5ac294b2d84b6f69ddb14fa9.json => query-82ed556807bcd7dd5872c220b3399f9b8679d770b3d1ca755c42ee264342da03.json} (81%) rename core/lib/dal/.sqlx/{query-c61682ed92c1a43855a991598d593639a63047f46dc8e605ff37b78f43f5cef5.json => query-8f614b620326386fce83afd162a5d02dea5720c940818242b7476cd57ffc9af8.json} (57%) rename core/lib/dal/.sqlx/{query-ba978a517822c512a1a5bf9f9119d5cc099abb0e1ccac715094c46297aacb3f4.json => query-ebe7e4fba7a9d63e2824ff890d9ad0e0d6d235b05441fc306dbf70d27f1b728c.json} (95%) rename core/lib/dal/.sqlx/{query-5019e70efb40d983d3e99922b7415a8b4cb42b579f4e968664b6210c6058bfb5.json => query-f4c3a8e5cf0079a3cc0392692b521c6c341e2122d40b8dd8d7e1de6a3cf14d3d.json} (84%) rename core/lib/dal/.sqlx/{query-26c80e9bafcf7989e7d40c6e424240b34ce29aad3ac6571116e084d45574c448.json => query-fc1d15b1a952b050eb80db38c65e9305636d5c692804f08e96f913a877798ccb.json} (79%) create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-0cc53f605989b99ad612d9a5353636ca3032cd5dcc5d3d1d4d5d0a16c38c20ef.json delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-1297f0977132185d6bd4501f490f1cdac8b194f09926c133985479c533a651f2.json create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-1902180f79ffb2f9903e16752d0a4dab579b76ea65ea022505a3f57fc0a4a946.json create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-1dc6a926ada3f13ab6c2a6f3cc16054d3fb4f4a5c014ef24f5cb0ac4cd3465eb.json delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-2d1461e068e43fd16714610b383cf8c93630d529ec96e67aac078f18196f61a5.json create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-5fe7345162c22fab6b2bb13e29d701950441fcbf9784a6634ce020262e170951.json create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-6a77f68e7c3fa1d3bbf2fd6195e1810d85803da953bd7d5c46b34619e05374ed.json delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-73266a8526c6adc315900e2e95441976a264759c4060c1a38e466ee2052fc17d.json delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-9730c8225ff2cf3111185e81f602a4a98ec63eb942c73ce4448d0957346047cd.json delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-e189d124956e4190c1a5d0cbd32a297bf9e6da07f09aa20d4923c953ddf87397.json diff --git a/core/lib/dal/.sqlx/query-959e1b8231484611334d4441823ad49a080299632be9f41bc838d2e7416fce75.json b/core/lib/dal/.sqlx/query-13b09ea7749530884233add59dee9906a81580f252b2260bfdaa46a25f45d1cd.json similarity index 89% rename from core/lib/dal/.sqlx/query-959e1b8231484611334d4441823ad49a080299632be9f41bc838d2e7416fce75.json rename to core/lib/dal/.sqlx/query-13b09ea7749530884233add59dee9906a81580f252b2260bfdaa46a25f45d1cd.json index 98c53313ad71..45b58a1c833a 100644 --- a/core/lib/dal/.sqlx/query-959e1b8231484611334d4441823ad49a080299632be9f41bc838d2e7416fce75.json +++ b/core/lib/dal/.sqlx/query-13b09ea7749530884233add59dee9906a81580f252b2260bfdaa46a25f45d1cd.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT\n address,\n topic1,\n topic2,\n topic3,\n topic4,\n miniblock_number\n FROM\n EVENTS\n WHERE\n miniblock_number BETWEEN $1 AND $2\n ORDER BY\n miniblock_number\n ", + "query": "\n SELECT\n address,\n topic1,\n topic2,\n topic3,\n topic4,\n miniblock_number\n FROM\n events\n WHERE\n miniblock_number BETWEEN $1 AND $2\n ORDER BY\n miniblock_number\n ", "describe": { "columns": [ { @@ -49,5 +49,5 @@ false ] }, - "hash": "959e1b8231484611334d4441823ad49a080299632be9f41bc838d2e7416fce75" + "hash": "13b09ea7749530884233add59dee9906a81580f252b2260bfdaa46a25f45d1cd" } diff --git a/core/lib/dal/.sqlx/query-30ccd33a8bf7ac28fe510e15e360be225db5f8165acf1d617d0c31e8c47bab33.json b/core/lib/dal/.sqlx/query-26bc9b315c4c57bcff1f46da956727233a36e018fe5c0651995b876053a6a054.json similarity index 86% rename from core/lib/dal/.sqlx/query-30ccd33a8bf7ac28fe510e15e360be225db5f8165acf1d617d0c31e8c47bab33.json rename to core/lib/dal/.sqlx/query-26bc9b315c4c57bcff1f46da956727233a36e018fe5c0651995b876053a6a054.json index 8cbcb627d1c4..8653732e45c1 100644 --- a/core/lib/dal/.sqlx/query-30ccd33a8bf7ac28fe510e15e360be225db5f8165acf1d617d0c31e8c47bab33.json +++ b/core/lib/dal/.sqlx/query-26bc9b315c4c57bcff1f46da956727233a36e018fe5c0651995b876053a6a054.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT\n address,\n topic1,\n topic2,\n topic3,\n topic4,\n value,\n event_index_in_tx\n FROM\n EVENTS\n WHERE\n miniblock_number BETWEEN $1 AND $2\n ORDER BY\n miniblock_number ASC,\n event_index_in_block ASC\n ", + "query": "\n SELECT\n address,\n topic1,\n topic2,\n topic3,\n topic4,\n value,\n event_index_in_tx\n FROM\n events\n WHERE\n miniblock_number BETWEEN $1 AND $2\n ORDER BY\n miniblock_number ASC,\n event_index_in_block ASC\n ", "describe": { "columns": [ { @@ -55,5 +55,5 @@ false ] }, - "hash": "30ccd33a8bf7ac28fe510e15e360be225db5f8165acf1d617d0c31e8c47bab33" + "hash": "26bc9b315c4c57bcff1f46da956727233a36e018fe5c0651995b876053a6a054" } diff --git a/core/lib/dal/.sqlx/query-7168f5cf14cfaa35962c5a25b00e2ed3cba01cf9a816e8eea972020d4be8ad5e.json b/core/lib/dal/.sqlx/query-2952bedc1c6320a643c42cc6d58fdf547011412e89a1fa8f6bc26ca6a03709bb.json similarity index 94% rename from core/lib/dal/.sqlx/query-7168f5cf14cfaa35962c5a25b00e2ed3cba01cf9a816e8eea972020d4be8ad5e.json rename to core/lib/dal/.sqlx/query-2952bedc1c6320a643c42cc6d58fdf547011412e89a1fa8f6bc26ca6a03709bb.json index 5105e19b91fe..918732de5dbc 100644 --- a/core/lib/dal/.sqlx/query-7168f5cf14cfaa35962c5a25b00e2ed3cba01cf9a816e8eea972020d4be8ad5e.json +++ b/core/lib/dal/.sqlx/query-2952bedc1c6320a643c42cc6d58fdf547011412e89a1fa8f6bc26ca6a03709bb.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT\n address,\n topic1,\n topic2,\n topic3,\n topic4,\n value,\n NULL :: bytea AS \"block_hash\",\n NULL :: BIGINT AS \"l1_batch_number?\",\n miniblock_number,\n tx_hash,\n tx_index_in_block,\n event_index_in_block,\n event_index_in_tx,\n NULL :: BIGINT AS \"block_timestamp?\"\n FROM\n EVENTS\n WHERE\n tx_hash = ANY ($1)\n ORDER BY\n miniblock_number ASC,\n event_index_in_block ASC\n ", + "query": "\n SELECT\n address,\n topic1,\n topic2,\n topic3,\n topic4,\n value,\n NULL :: bytea AS \"block_hash\",\n NULL :: BIGINT AS \"l1_batch_number?\",\n miniblock_number,\n tx_hash,\n tx_index_in_block,\n event_index_in_block,\n event_index_in_tx,\n NULL :: BIGINT AS \"block_timestamp?\"\n FROM\n events\n WHERE\n tx_hash = ANY ($1)\n ORDER BY\n miniblock_number ASC,\n event_index_in_block ASC\n ", "describe": { "columns": [ { @@ -96,5 +96,5 @@ null ] }, - "hash": "7168f5cf14cfaa35962c5a25b00e2ed3cba01cf9a816e8eea972020d4be8ad5e" + "hash": "2952bedc1c6320a643c42cc6d58fdf547011412e89a1fa8f6bc26ca6a03709bb" } diff --git a/core/lib/dal/.sqlx/query-ee4f40c9924b607226e60279e0c89d4ab965ab3e45badaf607af8e8787b5a8cb.json b/core/lib/dal/.sqlx/query-2cba440c2925631655a7f67486a5a8869da8f10738ba77e3d8e048057b0e7b12.json similarity index 91% rename from core/lib/dal/.sqlx/query-ee4f40c9924b607226e60279e0c89d4ab965ab3e45badaf607af8e8787b5a8cb.json rename to core/lib/dal/.sqlx/query-2cba440c2925631655a7f67486a5a8869da8f10738ba77e3d8e048057b0e7b12.json index c08be0b90067..b01a5b41649b 100644 --- a/core/lib/dal/.sqlx/query-ee4f40c9924b607226e60279e0c89d4ab965ab3e45badaf607af8e8787b5a8cb.json +++ b/core/lib/dal/.sqlx/query-2cba440c2925631655a7f67486a5a8869da8f10738ba77e3d8e048057b0e7b12.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT\n factory_deps.bytecode,\n transactions.data AS \"data?\",\n transactions.contract_address AS \"contract_address?\"\n FROM\n (\n SELECT\n miniblock_number,\n tx_hash,\n topic3\n FROM\n EVENTS\n WHERE\n address = $1\n AND topic1 = $2\n AND topic4 = $3\n LIMIT\n 1\n ) deploy_event\n JOIN factory_deps ON factory_deps.bytecode_hash = deploy_event.topic3\n LEFT JOIN transactions ON transactions.hash = deploy_event.tx_hash\n WHERE\n deploy_event.miniblock_number <= (\n SELECT\n MAX(number)\n FROM\n miniblocks\n )\n ", + "query": "\n SELECT\n factory_deps.bytecode,\n transactions.data AS \"data?\",\n transactions.contract_address AS \"contract_address?\"\n FROM\n (\n SELECT\n miniblock_number,\n tx_hash,\n topic3\n FROM\n events\n WHERE\n address = $1\n AND topic1 = $2\n AND topic4 = $3\n LIMIT\n 1\n ) deploy_event\n JOIN factory_deps ON factory_deps.bytecode_hash = deploy_event.topic3\n LEFT JOIN transactions ON transactions.hash = deploy_event.tx_hash\n WHERE\n deploy_event.miniblock_number <= (\n SELECT\n MAX(number)\n FROM\n miniblocks\n )\n ", "describe": { "columns": [ { @@ -32,5 +32,5 @@ true ] }, - "hash": "ee4f40c9924b607226e60279e0c89d4ab965ab3e45badaf607af8e8787b5a8cb" + "hash": "2cba440c2925631655a7f67486a5a8869da8f10738ba77e3d8e048057b0e7b12" } diff --git a/core/lib/dal/.sqlx/query-e8058944c2b1650ba831865aa62d1450fb1cb5219bcf68b920cf42c23628bd58.json b/core/lib/dal/.sqlx/query-3f83c528378dda7b8ddc6ceeedca1ef4ad58ff942f3dad4fb87e5a105fbfcd13.json similarity index 83% rename from core/lib/dal/.sqlx/query-e8058944c2b1650ba831865aa62d1450fb1cb5219bcf68b920cf42c23628bd58.json rename to core/lib/dal/.sqlx/query-3f83c528378dda7b8ddc6ceeedca1ef4ad58ff942f3dad4fb87e5a105fbfcd13.json index aacfbb98fc51..f54509433b31 100644 --- a/core/lib/dal/.sqlx/query-e8058944c2b1650ba831865aa62d1450fb1cb5219bcf68b920cf42c23628bd58.json +++ b/core/lib/dal/.sqlx/query-3f83c528378dda7b8ddc6ceeedca1ef4ad58ff942f3dad4fb87e5a105fbfcd13.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n WITH EVENTS AS (\n SELECT\n DISTINCT ON (EVENTS.tx_hash) *\n FROM\n EVENTS\n WHERE\n EVENTS.address = $1\n AND EVENTS.topic1 = $2\n AND EVENTS.tx_hash = ANY ($3)\n ORDER BY\n EVENTS.tx_hash,\n EVENTS.event_index_in_tx DESC\n )\n SELECT\n transactions.hash AS tx_hash,\n transactions.index_in_block AS index_in_block,\n transactions.l1_batch_tx_index AS l1_batch_tx_index,\n transactions.miniblock_number AS \"block_number!\",\n transactions.error AS error,\n transactions.effective_gas_price AS effective_gas_price,\n transactions.initiator_address AS initiator_address,\n transactions.data -> 'to' AS \"transfer_to?\",\n transactions.data -> 'contractAddress' AS \"execute_contract_address?\",\n transactions.tx_format AS \"tx_format?\",\n transactions.refunded_gas AS refunded_gas,\n transactions.gas_limit AS gas_limit,\n miniblocks.hash AS \"block_hash\",\n miniblocks.l1_batch_number AS \"l1_batch_number?\",\n EVENTS.topic4 AS \"contract_address?\",\n miniblocks.timestamp AS \"block_timestamp?\"\n FROM\n transactions\n JOIN miniblocks ON miniblocks.number = transactions.miniblock_number\n LEFT JOIN EVENTS ON EVENTS.tx_hash = transactions.hash\n WHERE\n transactions.hash = ANY ($3)\n AND transactions.data != '{}' :: jsonb\n ", + "query": "\n WITH events AS (\n SELECT\n DISTINCT ON (events.tx_hash) *\n FROM\n events\n WHERE\n events.address = $1\n AND events.topic1 = $2\n AND events.tx_hash = ANY ($3)\n ORDER BY\n events.tx_hash,\n events.event_index_in_tx DESC\n )\n SELECT\n transactions.hash AS tx_hash,\n transactions.index_in_block AS index_in_block,\n transactions.l1_batch_tx_index AS l1_batch_tx_index,\n transactions.miniblock_number AS \"block_number!\",\n transactions.error AS error,\n transactions.effective_gas_price AS effective_gas_price,\n transactions.initiator_address AS initiator_address,\n transactions.data -> 'to' AS \"transfer_to?\",\n transactions.data -> 'contractAddress' AS \"execute_contract_address?\",\n transactions.tx_format AS \"tx_format?\",\n transactions.refunded_gas AS refunded_gas,\n transactions.gas_limit AS gas_limit,\n miniblocks.hash AS \"block_hash\",\n miniblocks.l1_batch_number AS \"l1_batch_number?\",\n events.topic4 AS \"contract_address?\",\n miniblocks.timestamp AS \"block_timestamp?\"\n FROM\n transactions\n JOIN miniblocks ON miniblocks.number = transactions.miniblock_number\n LEFT JOIN events ON events.tx_hash = transactions.hash\n WHERE\n transactions.hash = ANY ($3)\n AND transactions.data != '{}' :: jsonb\n ", "describe": { "columns": [ { @@ -110,5 +110,5 @@ false ] }, - "hash": "e8058944c2b1650ba831865aa62d1450fb1cb5219bcf68b920cf42c23628bd58" + "hash": "3f83c528378dda7b8ddc6ceeedca1ef4ad58ff942f3dad4fb87e5a105fbfcd13" } diff --git a/core/lib/dal/.sqlx/query-44ec5b4d2218099da30aa8d654f7445aa3148d8abdd4e5fb50947ce512f53690.json b/core/lib/dal/.sqlx/query-44ec5b4d2218099da30aa8d654f7445aa3148d8abdd4e5fb50947ce512f53690.json deleted file mode 100644 index 43b00071bd4c..000000000000 --- a/core/lib/dal/.sqlx/query-44ec5b4d2218099da30aa8d654f7445aa3148d8abdd4e5fb50947ce512f53690.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE consensus_replica_state\n SET\n global_config = $1\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Jsonb" - ] - }, - "nullable": [] - }, - "hash": "44ec5b4d2218099da30aa8d654f7445aa3148d8abdd4e5fb50947ce512f53690" -} diff --git a/core/lib/dal/.sqlx/query-50eecd5b068f4ee20bff603853854f72cdbdc00487a42a42b4c15584e601e261.json b/core/lib/dal/.sqlx/query-50eecd5b068f4ee20bff603853854f72cdbdc00487a42a42b4c15584e601e261.json new file mode 100644 index 000000000000..3393a0e30061 --- /dev/null +++ b/core/lib/dal/.sqlx/query-50eecd5b068f4ee20bff603853854f72cdbdc00487a42a42b4c15584e601e261.json @@ -0,0 +1,14 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE\n consensus_replica_state\n SET\n global_config = $1\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Jsonb" + ] + }, + "nullable": [] + }, + "hash": "50eecd5b068f4ee20bff603853854f72cdbdc00487a42a42b4c15584e601e261" +} diff --git a/core/lib/dal/.sqlx/query-7fdc68c55f4860ce767a5e9d20d736ceef46d819394b7602218514b2e2a906eb.json b/core/lib/dal/.sqlx/query-700be354c97bfdfd9385e0f4e47821df4deb486211260ea86d272fc69a447385.json similarity index 61% rename from core/lib/dal/.sqlx/query-7fdc68c55f4860ce767a5e9d20d736ceef46d819394b7602218514b2e2a906eb.json rename to core/lib/dal/.sqlx/query-700be354c97bfdfd9385e0f4e47821df4deb486211260ea86d272fc69a447385.json index 77cfcb9d8539..baaa516eaaf8 100644 --- a/core/lib/dal/.sqlx/query-7fdc68c55f4860ce767a5e9d20d736ceef46d819394b7602218514b2e2a906eb.json +++ b/core/lib/dal/.sqlx/query-700be354c97bfdfd9385e0f4e47821df4deb486211260ea86d272fc69a447385.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n DELETE FROM\n EVENTS\n WHERE\n miniblock_number > $1\n ", + "query": "\n DELETE FROM\n events\n WHERE\n miniblock_number > $1\n ", "describe": { "columns": [], "parameters": { @@ -10,5 +10,5 @@ }, "nullable": [] }, - "hash": "7fdc68c55f4860ce767a5e9d20d736ceef46d819394b7602218514b2e2a906eb" + "hash": "700be354c97bfdfd9385e0f4e47821df4deb486211260ea86d272fc69a447385" } diff --git a/core/lib/dal/.sqlx/query-281ccf6f99d9e3c5e9eb29de437aaf3a07530a8d8b6787e20ebafd344c01ba65.json b/core/lib/dal/.sqlx/query-78de0a295e3a2a5412810b1cfa1f1bffbb123e71e0334c17a3f334789f420ad3.json similarity index 64% rename from core/lib/dal/.sqlx/query-281ccf6f99d9e3c5e9eb29de437aaf3a07530a8d8b6787e20ebafd344c01ba65.json rename to core/lib/dal/.sqlx/query-78de0a295e3a2a5412810b1cfa1f1bffbb123e71e0334c17a3f334789f420ad3.json index a2d0a0614886..64b36086ee1c 100644 --- a/core/lib/dal/.sqlx/query-281ccf6f99d9e3c5e9eb29de437aaf3a07530a8d8b6787e20ebafd344c01ba65.json +++ b/core/lib/dal/.sqlx/query-78de0a295e3a2a5412810b1cfa1f1bffbb123e71e0334c17a3f334789f420ad3.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n DELETE FROM\n EVENTS\n WHERE\n miniblock_number BETWEEN $1 AND $2\n ", + "query": "\n DELETE FROM\n events\n WHERE\n miniblock_number BETWEEN $1 AND $2\n ", "describe": { "columns": [], "parameters": { @@ -11,5 +11,5 @@ }, "nullable": [] }, - "hash": "281ccf6f99d9e3c5e9eb29de437aaf3a07530a8d8b6787e20ebafd344c01ba65" + "hash": "78de0a295e3a2a5412810b1cfa1f1bffbb123e71e0334c17a3f334789f420ad3" } diff --git a/core/lib/dal/.sqlx/query-e0aa620216ab8b1b209bc2b1079198deaa1ee92c9c7d608199673a8ed5558a17.json b/core/lib/dal/.sqlx/query-7b41633745312d0580634c3017e5fe6910fce4cf57c0959dc4dad4d93129ec1b.json similarity index 83% rename from core/lib/dal/.sqlx/query-e0aa620216ab8b1b209bc2b1079198deaa1ee92c9c7d608199673a8ed5558a17.json rename to core/lib/dal/.sqlx/query-7b41633745312d0580634c3017e5fe6910fce4cf57c0959dc4dad4d93129ec1b.json index 9b02da15aec0..e9126cbc5f20 100644 --- a/core/lib/dal/.sqlx/query-e0aa620216ab8b1b209bc2b1079198deaa1ee92c9c7d608199673a8ed5558a17.json +++ b/core/lib/dal/.sqlx/query-7b41633745312d0580634c3017e5fe6910fce4cf57c0959dc4dad4d93129ec1b.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT\n storage_logs.address AS \"address!\",\n storage_logs.key AS \"key!\",\n storage_logs.value AS \"value!\",\n storage_logs.miniblock_number AS \"miniblock_number!\",\n initial_writes.l1_batch_number AS \"l1_batch_number!\",\n initial_writes.index\n FROM\n (\n SELECT\n hashed_key,\n MAX(\n ARRAY [miniblock_number, operation_number] :: INT []\n ) AS op\n FROM\n storage_logs\n WHERE\n miniblock_number <= $1\n AND hashed_key >= $3\n AND hashed_key <= $4\n GROUP BY\n hashed_key\n ORDER BY\n hashed_key\n ) AS KEYS\n INNER JOIN storage_logs ON KEYS.hashed_key = storage_logs.hashed_key\n AND storage_logs.miniblock_number = KEYS.op [1]\n AND storage_logs.operation_number = KEYS.op [2]\n INNER JOIN initial_writes ON KEYS.hashed_key = initial_writes.hashed_key\n WHERE\n initial_writes.l1_batch_number <= $2\n ", + "query": "\n SELECT\n storage_logs.address AS \"address!\",\n storage_logs.key AS \"key!\",\n storage_logs.value AS \"value!\",\n storage_logs.miniblock_number AS \"miniblock_number!\",\n initial_writes.l1_batch_number AS \"l1_batch_number!\",\n initial_writes.index\n FROM\n (\n SELECT\n hashed_key,\n MAX(\n ARRAY [miniblock_number, operation_number] :: INT []\n ) AS op\n FROM\n storage_logs\n WHERE\n miniblock_number <= $1\n AND hashed_key >= $3\n AND hashed_key <= $4\n GROUP BY\n hashed_key\n ORDER BY\n hashed_key\n ) AS keys\n INNER JOIN storage_logs ON keys.hashed_key = storage_logs.hashed_key\n AND storage_logs.miniblock_number = keys.op [1]\n AND storage_logs.operation_number = keys.op [2]\n INNER JOIN initial_writes ON keys.hashed_key = initial_writes.hashed_key\n WHERE\n initial_writes.l1_batch_number <= $2\n ", "describe": { "columns": [ { @@ -51,5 +51,5 @@ false ] }, - "hash": "e0aa620216ab8b1b209bc2b1079198deaa1ee92c9c7d608199673a8ed5558a17" + "hash": "7b41633745312d0580634c3017e5fe6910fce4cf57c0959dc4dad4d93129ec1b" } diff --git a/core/lib/dal/.sqlx/query-e496794ed5fb282a64d8bd84f8a227bae6207b1a5ac294b2d84b6f69ddb14fa9.json b/core/lib/dal/.sqlx/query-82ed556807bcd7dd5872c220b3399f9b8679d770b3d1ca755c42ee264342da03.json similarity index 81% rename from core/lib/dal/.sqlx/query-e496794ed5fb282a64d8bd84f8a227bae6207b1a5ac294b2d84b6f69ddb14fa9.json rename to core/lib/dal/.sqlx/query-82ed556807bcd7dd5872c220b3399f9b8679d770b3d1ca755c42ee264342da03.json index 8dbe652f319e..3c475186a390 100644 --- a/core/lib/dal/.sqlx/query-e496794ed5fb282a64d8bd84f8a227bae6207b1a5ac294b2d84b6f69ddb14fa9.json +++ b/core/lib/dal/.sqlx/query-82ed556807bcd7dd5872c220b3399f9b8679d770b3d1ca755c42ee264342da03.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT\n value\n FROM\n EVENTS\n WHERE\n miniblock_number BETWEEN $1 AND $2\n AND address = $3\n AND topic1 = $4\n ORDER BY\n miniblock_number,\n event_index_in_block\n ", + "query": "\n SELECT\n value\n FROM\n events\n WHERE\n miniblock_number BETWEEN $1 AND $2\n AND address = $3\n AND topic1 = $4\n ORDER BY\n miniblock_number,\n event_index_in_block\n ", "describe": { "columns": [ { @@ -21,5 +21,5 @@ false ] }, - "hash": "e496794ed5fb282a64d8bd84f8a227bae6207b1a5ac294b2d84b6f69ddb14fa9" + "hash": "82ed556807bcd7dd5872c220b3399f9b8679d770b3d1ca755c42ee264342da03" } diff --git a/core/lib/dal/.sqlx/query-c61682ed92c1a43855a991598d593639a63047f46dc8e605ff37b78f43f5cef5.json b/core/lib/dal/.sqlx/query-8f614b620326386fce83afd162a5d02dea5720c940818242b7476cd57ffc9af8.json similarity index 57% rename from core/lib/dal/.sqlx/query-c61682ed92c1a43855a991598d593639a63047f46dc8e605ff37b78f43f5cef5.json rename to core/lib/dal/.sqlx/query-8f614b620326386fce83afd162a5d02dea5720c940818242b7476cd57ffc9af8.json index b797ccb46045..e4ab1acc9bd2 100644 --- a/core/lib/dal/.sqlx/query-c61682ed92c1a43855a991598d593639a63047f46dc8e605ff37b78f43f5cef5.json +++ b/core/lib/dal/.sqlx/query-8f614b620326386fce83afd162a5d02dea5720c940818242b7476cd57ffc9af8.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n UPDATE processed_events\n SET\n next_block_to_process = $3\n WHERE\n TYPE = $1\n AND chain_id = $2\n ", + "query": "\n UPDATE\n processed_events\n SET\n next_block_to_process = $3\n WHERE\n TYPE = $1\n AND chain_id = $2\n ", "describe": { "columns": [], "parameters": { @@ -22,5 +22,5 @@ }, "nullable": [] }, - "hash": "c61682ed92c1a43855a991598d593639a63047f46dc8e605ff37b78f43f5cef5" + "hash": "8f614b620326386fce83afd162a5d02dea5720c940818242b7476cd57ffc9af8" } diff --git a/core/lib/dal/.sqlx/query-ba978a517822c512a1a5bf9f9119d5cc099abb0e1ccac715094c46297aacb3f4.json b/core/lib/dal/.sqlx/query-ebe7e4fba7a9d63e2824ff890d9ad0e0d6d235b05441fc306dbf70d27f1b728c.json similarity index 95% rename from core/lib/dal/.sqlx/query-ba978a517822c512a1a5bf9f9119d5cc099abb0e1ccac715094c46297aacb3f4.json rename to core/lib/dal/.sqlx/query-ebe7e4fba7a9d63e2824ff890d9ad0e0d6d235b05441fc306dbf70d27f1b728c.json index f5aa67f70b41..ff8dd563fd73 100644 --- a/core/lib/dal/.sqlx/query-ba978a517822c512a1a5bf9f9119d5cc099abb0e1ccac715094c46297aacb3f4.json +++ b/core/lib/dal/.sqlx/query-ebe7e4fba7a9d63e2824ff890d9ad0e0d6d235b05441fc306dbf70d27f1b728c.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n WITH events_select AS (\n SELECT\n address,\n topic1,\n topic2,\n topic3,\n topic4,\n value,\n miniblock_number,\n tx_hash,\n tx_index_in_block,\n event_index_in_block,\n event_index_in_tx\n FROM\n EVENTS\n WHERE\n miniblock_number > $1\n ORDER BY\n miniblock_number ASC,\n event_index_in_block ASC\n )\n SELECT\n miniblocks.hash AS \"block_hash?\",\n address AS \"address!\",\n topic1 AS \"topic1!\",\n topic2 AS \"topic2!\",\n topic3 AS \"topic3!\",\n topic4 AS \"topic4!\",\n value AS \"value!\",\n miniblock_number AS \"miniblock_number!\",\n miniblocks.l1_batch_number AS \"l1_batch_number?\",\n tx_hash AS \"tx_hash!\",\n tx_index_in_block AS \"tx_index_in_block!\",\n event_index_in_block AS \"event_index_in_block!\",\n event_index_in_tx AS \"event_index_in_tx!\",\n miniblocks.timestamp AS \"block_timestamp\"\n FROM\n events_select\n INNER JOIN miniblocks ON events_select.miniblock_number = miniblocks.number\n ORDER BY\n miniblock_number ASC,\n event_index_in_block ASC\n ", + "query": "\n WITH events_select AS (\n SELECT\n address,\n topic1,\n topic2,\n topic3,\n topic4,\n value,\n miniblock_number,\n tx_hash,\n tx_index_in_block,\n event_index_in_block,\n event_index_in_tx\n FROM\n events\n WHERE\n miniblock_number > $1\n ORDER BY\n miniblock_number ASC,\n event_index_in_block ASC\n )\n SELECT\n miniblocks.hash AS \"block_hash?\",\n address AS \"address!\",\n topic1 AS \"topic1!\",\n topic2 AS \"topic2!\",\n topic3 AS \"topic3!\",\n topic4 AS \"topic4!\",\n value AS \"value!\",\n miniblock_number AS \"miniblock_number!\",\n miniblocks.l1_batch_number AS \"l1_batch_number?\",\n tx_hash AS \"tx_hash!\",\n tx_index_in_block AS \"tx_index_in_block!\",\n event_index_in_block AS \"event_index_in_block!\",\n event_index_in_tx AS \"event_index_in_tx!\",\n miniblocks.timestamp AS \"block_timestamp\"\n FROM\n events_select\n INNER JOIN miniblocks ON events_select.miniblock_number = miniblocks.number\n ORDER BY\n miniblock_number ASC,\n event_index_in_block ASC\n ", "describe": { "columns": [ { @@ -96,5 +96,5 @@ false ] }, - "hash": "ba978a517822c512a1a5bf9f9119d5cc099abb0e1ccac715094c46297aacb3f4" + "hash": "ebe7e4fba7a9d63e2824ff890d9ad0e0d6d235b05441fc306dbf70d27f1b728c" } diff --git a/core/lib/dal/.sqlx/query-5019e70efb40d983d3e99922b7415a8b4cb42b579f4e968664b6210c6058bfb5.json b/core/lib/dal/.sqlx/query-f4c3a8e5cf0079a3cc0392692b521c6c341e2122d40b8dd8d7e1de6a3cf14d3d.json similarity index 84% rename from core/lib/dal/.sqlx/query-5019e70efb40d983d3e99922b7415a8b4cb42b579f4e968664b6210c6058bfb5.json rename to core/lib/dal/.sqlx/query-f4c3a8e5cf0079a3cc0392692b521c6c341e2122d40b8dd8d7e1de6a3cf14d3d.json index cfa0b18d4ba9..8c128c961b8b 100644 --- a/core/lib/dal/.sqlx/query-5019e70efb40d983d3e99922b7415a8b4cb42b579f4e968664b6210c6058bfb5.json +++ b/core/lib/dal/.sqlx/query-f4c3a8e5cf0079a3cc0392692b521c6c341e2122d40b8dd8d7e1de6a3cf14d3d.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT\n storage_logs.hashed_key AS \"hashed_key!\",\n storage_logs.value AS \"value!\",\n storage_logs.miniblock_number AS \"miniblock_number!\",\n initial_writes.l1_batch_number AS \"l1_batch_number!\",\n initial_writes.index\n FROM\n (\n SELECT\n hashed_key,\n MAX(\n ARRAY [miniblock_number, operation_number] :: INT []\n ) AS op\n FROM\n storage_logs\n WHERE\n miniblock_number <= $1\n AND hashed_key >= $3\n AND hashed_key <= $4\n GROUP BY\n hashed_key\n ORDER BY\n hashed_key\n ) AS KEYS\n INNER JOIN storage_logs ON KEYS.hashed_key = storage_logs.hashed_key\n AND storage_logs.miniblock_number = KEYS.op [1]\n AND storage_logs.operation_number = KEYS.op [2]\n INNER JOIN initial_writes ON KEYS.hashed_key = initial_writes.hashed_key\n WHERE\n initial_writes.l1_batch_number <= $2\n ", + "query": "\n SELECT\n storage_logs.hashed_key AS \"hashed_key!\",\n storage_logs.value AS \"value!\",\n storage_logs.miniblock_number AS \"miniblock_number!\",\n initial_writes.l1_batch_number AS \"l1_batch_number!\",\n initial_writes.index\n FROM\n (\n SELECT\n hashed_key,\n MAX(\n ARRAY [miniblock_number, operation_number] :: INT []\n ) AS op\n FROM\n storage_logs\n WHERE\n miniblock_number <= $1\n AND hashed_key >= $3\n AND hashed_key <= $4\n GROUP BY\n hashed_key\n ORDER BY\n hashed_key\n ) AS keys\n INNER JOIN storage_logs ON keys.hashed_key = storage_logs.hashed_key\n AND storage_logs.miniblock_number = keys.op [1]\n AND storage_logs.operation_number = keys.op [2]\n INNER JOIN initial_writes ON keys.hashed_key = initial_writes.hashed_key\n WHERE\n initial_writes.l1_batch_number <= $2\n ", "describe": { "columns": [ { @@ -45,5 +45,5 @@ false ] }, - "hash": "5019e70efb40d983d3e99922b7415a8b4cb42b579f4e968664b6210c6058bfb5" + "hash": "f4c3a8e5cf0079a3cc0392692b521c6c341e2122d40b8dd8d7e1de6a3cf14d3d" } diff --git a/core/lib/dal/.sqlx/query-26c80e9bafcf7989e7d40c6e424240b34ce29aad3ac6571116e084d45574c448.json b/core/lib/dal/.sqlx/query-fc1d15b1a952b050eb80db38c65e9305636d5c692804f08e96f913a877798ccb.json similarity index 79% rename from core/lib/dal/.sqlx/query-26c80e9bafcf7989e7d40c6e424240b34ce29aad3ac6571116e084d45574c448.json rename to core/lib/dal/.sqlx/query-fc1d15b1a952b050eb80db38c65e9305636d5c692804f08e96f913a877798ccb.json index ee5de53d6e65..bacacc211880 100644 --- a/core/lib/dal/.sqlx/query-26c80e9bafcf7989e7d40c6e424240b34ce29aad3ac6571116e084d45574c448.json +++ b/core/lib/dal/.sqlx/query-fc1d15b1a952b050eb80db38c65e9305636d5c692804f08e96f913a877798ccb.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT\n next_block_to_process\n FROM\n processed_events\n WHERE\n TYPE = $1\n AND chain_id = $2\n ", + "query": "\n SELECT\n next_block_to_process\n FROM\n processed_events\n WHERE\n TYPE = $1\n AND chain_id = $2\n ", "describe": { "columns": [ { @@ -29,5 +29,5 @@ false ] }, - "hash": "26c80e9bafcf7989e7d40c6e424240b34ce29aad3ac6571116e084d45574c448" + "hash": "fc1d15b1a952b050eb80db38c65e9305636d5c692804f08e96f913a877798ccb" } diff --git a/core/lib/dal/src/consensus_dal.rs b/core/lib/dal/src/consensus_dal.rs index fc1234e7057f..2e4d876a2bd6 100644 --- a/core/lib/dal/src/consensus_dal.rs +++ b/core/lib/dal/src/consensus_dal.rs @@ -91,7 +91,8 @@ impl ConsensusDal<'_, '_> { let global_config = s.proto_fmt(want, serde_json::value::Serializer).unwrap(); sqlx::query!( r#" - UPDATE consensus_replica_state + UPDATE + consensus_replica_state SET global_config = $1 "#, diff --git a/core/lib/dal/src/contract_verification_dal.rs b/core/lib/dal/src/contract_verification_dal.rs index 14d141ecc33d..9e3a32f3124a 100644 --- a/core/lib/dal/src/contract_verification_dal.rs +++ b/core/lib/dal/src/contract_verification_dal.rs @@ -321,7 +321,7 @@ impl ContractVerificationDal<'_, '_> { tx_hash, topic3 FROM - EVENTS + events WHERE address = $1 AND topic1 = $2 diff --git a/core/lib/dal/src/eth_watcher_dal.rs b/core/lib/dal/src/eth_watcher_dal.rs index 3220868decf6..efdbb09803e7 100644 --- a/core/lib/dal/src/eth_watcher_dal.rs +++ b/core/lib/dal/src/eth_watcher_dal.rs @@ -30,8 +30,8 @@ impl EthWatcherDal<'_, '_> { FROM processed_events WHERE - TYPE = $1 - AND chain_id = $2 + TYPE = $1 + AND chain_id = $2 "#, event_type as EventType, chain_id.0 as i64 @@ -78,12 +78,13 @@ impl EthWatcherDal<'_, '_> { ) -> DalResult<()> { sqlx::query!( r#" - UPDATE processed_events + UPDATE + processed_events SET next_block_to_process = $3 WHERE - TYPE = $1 - AND chain_id = $2 + TYPE = $1 + AND chain_id = $2 "#, event_type as EventType, chain_id.0 as i64, diff --git a/core/lib/dal/src/events_dal.rs b/core/lib/dal/src/events_dal.rs index 889ec8a9fa17..abd2262c52dd 100644 --- a/core/lib/dal/src/events_dal.rs +++ b/core/lib/dal/src/events_dal.rs @@ -106,7 +106,7 @@ impl EventsDal<'_, '_> { sqlx::query!( r#" DELETE FROM - EVENTS + events WHERE miniblock_number > $1 "#, @@ -227,7 +227,7 @@ impl EventsDal<'_, '_> { event_index_in_tx, NULL :: BIGINT AS "block_timestamp?" FROM - EVENTS + events WHERE tx_hash = ANY ($1) ORDER BY @@ -268,7 +268,7 @@ impl EventsDal<'_, '_> { SELECT value FROM - EVENTS + events WHERE miniblock_number BETWEEN $1 AND $2 AND address = $3 @@ -369,7 +369,7 @@ impl EventsDal<'_, '_> { value, event_index_in_tx FROM - EVENTS + events WHERE miniblock_number BETWEEN $1 AND $2 ORDER BY @@ -426,7 +426,7 @@ impl EventsDal<'_, '_> { topic4, miniblock_number FROM - EVENTS + events WHERE miniblock_number BETWEEN $1 AND $2 ORDER BY diff --git a/core/lib/dal/src/events_web3_dal.rs b/core/lib/dal/src/events_web3_dal.rs index d8f7f9402fc0..5f9c895d03ce 100644 --- a/core/lib/dal/src/events_web3_dal.rs +++ b/core/lib/dal/src/events_web3_dal.rs @@ -202,7 +202,7 @@ impl EventsWeb3Dal<'_, '_> { event_index_in_block, event_index_in_tx FROM - EVENTS + events WHERE miniblock_number > $1 ORDER BY diff --git a/core/lib/dal/src/pruning_dal/mod.rs b/core/lib/dal/src/pruning_dal/mod.rs index 3e2459e93c6b..4ce0ec518eed 100644 --- a/core/lib/dal/src/pruning_dal/mod.rs +++ b/core/lib/dal/src/pruning_dal/mod.rs @@ -201,7 +201,7 @@ impl PruningDal<'_, '_> { let execution_result = sqlx::query!( r#" DELETE FROM - EVENTS + events WHERE miniblock_number BETWEEN $1 AND $2 "#, diff --git a/core/lib/dal/src/snapshots_creator_dal.rs b/core/lib/dal/src/snapshots_creator_dal.rs index da41e2c85e51..0a9062640cf2 100644 --- a/core/lib/dal/src/snapshots_creator_dal.rs +++ b/core/lib/dal/src/snapshots_creator_dal.rs @@ -77,11 +77,11 @@ impl SnapshotsCreatorDal<'_, '_> { hashed_key ORDER BY hashed_key - ) AS KEYS - INNER JOIN storage_logs ON KEYS.hashed_key = storage_logs.hashed_key - AND storage_logs.miniblock_number = KEYS.op [1] - AND storage_logs.operation_number = KEYS.op [2] - INNER JOIN initial_writes ON KEYS.hashed_key = initial_writes.hashed_key + ) AS keys + INNER JOIN storage_logs ON keys.hashed_key = storage_logs.hashed_key + AND storage_logs.miniblock_number = keys.op [1] + AND storage_logs.operation_number = keys.op [2] + INNER JOIN initial_writes ON keys.hashed_key = initial_writes.hashed_key WHERE initial_writes.l1_batch_number <= $2 "#, @@ -145,11 +145,11 @@ impl SnapshotsCreatorDal<'_, '_> { hashed_key ORDER BY hashed_key - ) AS KEYS - INNER JOIN storage_logs ON KEYS.hashed_key = storage_logs.hashed_key - AND storage_logs.miniblock_number = KEYS.op [1] - AND storage_logs.operation_number = KEYS.op [2] - INNER JOIN initial_writes ON KEYS.hashed_key = initial_writes.hashed_key + ) AS keys + INNER JOIN storage_logs ON keys.hashed_key = storage_logs.hashed_key + AND storage_logs.miniblock_number = keys.op [1] + AND storage_logs.operation_number = keys.op [2] + INNER JOIN initial_writes ON keys.hashed_key = initial_writes.hashed_key WHERE initial_writes.l1_batch_number <= $2 "#, diff --git a/core/lib/dal/src/transactions_web3_dal.rs b/core/lib/dal/src/transactions_web3_dal.rs index ff50628f691c..e015e1179aae 100644 --- a/core/lib/dal/src/transactions_web3_dal.rs +++ b/core/lib/dal/src/transactions_web3_dal.rs @@ -48,18 +48,18 @@ impl TransactionsWeb3Dal<'_, '_> { let st_receipts: Vec = sqlx::query_as!( StorageTransactionReceipt, r#" - WITH EVENTS AS ( + WITH events AS ( SELECT - DISTINCT ON (EVENTS.tx_hash) * + DISTINCT ON (events.tx_hash) * FROM - EVENTS + events WHERE - EVENTS.address = $1 - AND EVENTS.topic1 = $2 - AND EVENTS.tx_hash = ANY ($3) + events.address = $1 + AND events.topic1 = $2 + AND events.tx_hash = ANY ($3) ORDER BY - EVENTS.tx_hash, - EVENTS.event_index_in_tx DESC + events.tx_hash, + events.event_index_in_tx DESC ) SELECT transactions.hash AS tx_hash, @@ -76,12 +76,12 @@ impl TransactionsWeb3Dal<'_, '_> { transactions.gas_limit AS gas_limit, miniblocks.hash AS "block_hash", miniblocks.l1_batch_number AS "l1_batch_number?", - EVENTS.topic4 AS "contract_address?", + events.topic4 AS "contract_address?", miniblocks.timestamp AS "block_timestamp?" FROM transactions JOIN miniblocks ON miniblocks.number = transactions.miniblock_number - LEFT JOIN EVENTS ON EVENTS.tx_hash = transactions.hash + LEFT JOIN events ON events.tx_hash = transactions.hash WHERE transactions.hash = ANY ($3) AND transactions.data != '{}' :: jsonb diff --git a/prover/crates/lib/prover_dal/.sqlx/query-0cc53f605989b99ad612d9a5353636ca3032cd5dcc5d3d1d4d5d0a16c38c20ef.json b/prover/crates/lib/prover_dal/.sqlx/query-0cc53f605989b99ad612d9a5353636ca3032cd5dcc5d3d1d4d5d0a16c38c20ef.json new file mode 100644 index 000000000000..af5b2c758f86 --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-0cc53f605989b99ad612d9a5353636ca3032cd5dcc5d3d1d4d5d0a16c38c20ef.json @@ -0,0 +1,16 @@ +{ + "db_name": "PostgreSQL", + "query": "\n INSERT INTO\n node_aggregation_witness_jobs_fri (\n l1_batch_number,\n circuit_id,\n status,\n created_at,\n updated_at\n )\n VALUES\n ($1, $2, 'waiting_for_proofs', NOW(), NOW()) ON CONFLICT (l1_batch_number, circuit_id, depth) DO\n UPDATE\n SET\n status = $3\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8", + "Int2", + "Text" + ] + }, + "nullable": [] + }, + "hash": "0cc53f605989b99ad612d9a5353636ca3032cd5dcc5d3d1d4d5d0a16c38c20ef" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-1297f0977132185d6bd4501f490f1cdac8b194f09926c133985479c533a651f2.json b/prover/crates/lib/prover_dal/.sqlx/query-1297f0977132185d6bd4501f490f1cdac8b194f09926c133985479c533a651f2.json deleted file mode 100644 index c99572bcc8e5..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-1297f0977132185d6bd4501f490f1cdac8b194f09926c133985479c533a651f2.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE prover_jobs_fri\n SET\n status = $1\n WHERE\n l1_batch_number = $2\n AND sequence_number = $3\n AND aggregation_round = $4\n AND circuit_id = $5\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Text", - "Int8", - "Int4", - "Int2", - "Int2" - ] - }, - "nullable": [] - }, - "hash": "1297f0977132185d6bd4501f490f1cdac8b194f09926c133985479c533a651f2" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-1902180f79ffb2f9903e16752d0a4dab579b76ea65ea022505a3f57fc0a4a946.json b/prover/crates/lib/prover_dal/.sqlx/query-1902180f79ffb2f9903e16752d0a4dab579b76ea65ea022505a3f57fc0a4a946.json new file mode 100644 index 000000000000..86769e51db86 --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-1902180f79ffb2f9903e16752d0a4dab579b76ea65ea022505a3f57fc0a4a946.json @@ -0,0 +1,15 @@ +{ + "db_name": "PostgreSQL", + "query": "\n INSERT INTO\n recursion_tip_witness_jobs_fri (\n l1_batch_number,\n status,\n number_of_final_node_jobs,\n created_at,\n updated_at\n )\n VALUES\n ($1, 'waiting_for_proofs', 1, NOW(), NOW()) ON CONFLICT (l1_batch_number) DO\n UPDATE\n SET\n status = $2\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8", + "Text" + ] + }, + "nullable": [] + }, + "hash": "1902180f79ffb2f9903e16752d0a4dab579b76ea65ea022505a3f57fc0a4a946" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-1dc6a926ada3f13ab6c2a6f3cc16054d3fb4f4a5c014ef24f5cb0ac4cd3465eb.json b/prover/crates/lib/prover_dal/.sqlx/query-1dc6a926ada3f13ab6c2a6f3cc16054d3fb4f4a5c014ef24f5cb0ac4cd3465eb.json new file mode 100644 index 000000000000..efb290e6a0f8 --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-1dc6a926ada3f13ab6c2a6f3cc16054d3fb4f4a5c014ef24f5cb0ac4cd3465eb.json @@ -0,0 +1,17 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE\n leaf_aggregation_witness_jobs_fri\n SET\n status = $1,\n attempts = $2\n WHERE\n l1_batch_number = $3\n AND circuit_id = $4\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Text", + "Int2", + "Int8", + "Int2" + ] + }, + "nullable": [] + }, + "hash": "1dc6a926ada3f13ab6c2a6f3cc16054d3fb4f4a5c014ef24f5cb0ac4cd3465eb" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-2d1461e068e43fd16714610b383cf8c93630d529ec96e67aac078f18196f61a5.json b/prover/crates/lib/prover_dal/.sqlx/query-2d1461e068e43fd16714610b383cf8c93630d529ec96e67aac078f18196f61a5.json deleted file mode 100644 index 50d121213fb9..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-2d1461e068e43fd16714610b383cf8c93630d529ec96e67aac078f18196f61a5.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE prover_jobs_fri\n SET\n status = $1,\n attempts = $2\n WHERE\n l1_batch_number = $3\n AND sequence_number = $4\n AND aggregation_round = $5\n AND circuit_id = $6\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Text", - "Int2", - "Int8", - "Int4", - "Int2", - "Int2" - ] - }, - "nullable": [] - }, - "hash": "2d1461e068e43fd16714610b383cf8c93630d529ec96e67aac078f18196f61a5" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-5fe7345162c22fab6b2bb13e29d701950441fcbf9784a6634ce020262e170951.json b/prover/crates/lib/prover_dal/.sqlx/query-5fe7345162c22fab6b2bb13e29d701950441fcbf9784a6634ce020262e170951.json new file mode 100644 index 000000000000..fb3e3214462b --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-5fe7345162c22fab6b2bb13e29d701950441fcbf9784a6634ce020262e170951.json @@ -0,0 +1,19 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE\n prover_jobs_fri\n SET\n status = $1,\n attempts = $2\n WHERE\n l1_batch_number = $3\n AND sequence_number = $4\n AND aggregation_round = $5\n AND circuit_id = $6\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Text", + "Int2", + "Int8", + "Int4", + "Int2", + "Int2" + ] + }, + "nullable": [] + }, + "hash": "5fe7345162c22fab6b2bb13e29d701950441fcbf9784a6634ce020262e170951" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-6a77f68e7c3fa1d3bbf2fd6195e1810d85803da953bd7d5c46b34619e05374ed.json b/prover/crates/lib/prover_dal/.sqlx/query-6a77f68e7c3fa1d3bbf2fd6195e1810d85803da953bd7d5c46b34619e05374ed.json new file mode 100644 index 000000000000..10eb050ee9a6 --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-6a77f68e7c3fa1d3bbf2fd6195e1810d85803da953bd7d5c46b34619e05374ed.json @@ -0,0 +1,18 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE\n prover_jobs_fri\n SET\n status = $1\n WHERE\n l1_batch_number = $2\n AND sequence_number = $3\n AND aggregation_round = $4\n AND circuit_id = $5\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Text", + "Int8", + "Int4", + "Int2", + "Int2" + ] + }, + "nullable": [] + }, + "hash": "6a77f68e7c3fa1d3bbf2fd6195e1810d85803da953bd7d5c46b34619e05374ed" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-73266a8526c6adc315900e2e95441976a264759c4060c1a38e466ee2052fc17d.json b/prover/crates/lib/prover_dal/.sqlx/query-73266a8526c6adc315900e2e95441976a264759c4060c1a38e466ee2052fc17d.json deleted file mode 100644 index f8b141a8dac9..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-73266a8526c6adc315900e2e95441976a264759c4060c1a38e466ee2052fc17d.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n recursion_tip_witness_jobs_fri (l1_batch_number, status, number_of_final_node_jobs, created_at, updated_at)\n VALUES\n ($1, 'waiting_for_proofs', 1, NOW(), NOW())\n ON CONFLICT (l1_batch_number) DO\n UPDATE\n SET\n status = $2\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8", - "Text" - ] - }, - "nullable": [] - }, - "hash": "73266a8526c6adc315900e2e95441976a264759c4060c1a38e466ee2052fc17d" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-9730c8225ff2cf3111185e81f602a4a98ec63eb942c73ce4448d0957346047cd.json b/prover/crates/lib/prover_dal/.sqlx/query-9730c8225ff2cf3111185e81f602a4a98ec63eb942c73ce4448d0957346047cd.json deleted file mode 100644 index d23ed8d9fc8a..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-9730c8225ff2cf3111185e81f602a4a98ec63eb942c73ce4448d0957346047cd.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE leaf_aggregation_witness_jobs_fri\n SET\n status = $1,\n attempts = $2\n WHERE\n l1_batch_number = $3\n AND circuit_id = $4\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Text", - "Int2", - "Int8", - "Int2" - ] - }, - "nullable": [] - }, - "hash": "9730c8225ff2cf3111185e81f602a4a98ec63eb942c73ce4448d0957346047cd" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-e189d124956e4190c1a5d0cbd32a297bf9e6da07f09aa20d4923c953ddf87397.json b/prover/crates/lib/prover_dal/.sqlx/query-e189d124956e4190c1a5d0cbd32a297bf9e6da07f09aa20d4923c953ddf87397.json deleted file mode 100644 index e989cb51f9bd..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-e189d124956e4190c1a5d0cbd32a297bf9e6da07f09aa20d4923c953ddf87397.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n node_aggregation_witness_jobs_fri (l1_batch_number, circuit_id, status, created_at, updated_at)\n VALUES\n ($1, $2, 'waiting_for_proofs', NOW(), NOW()) ON CONFLICT (l1_batch_number, circuit_id, depth) DO\n UPDATE\n SET\n status = $3\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8", - "Int2", - "Text" - ] - }, - "nullable": [] - }, - "hash": "e189d124956e4190c1a5d0cbd32a297bf9e6da07f09aa20d4923c953ddf87397" -} diff --git a/prover/crates/lib/prover_dal/src/cli_test_dal.rs b/prover/crates/lib/prover_dal/src/cli_test_dal.rs index dce8e9c463e5..ef0cd6db0da2 100644 --- a/prover/crates/lib/prover_dal/src/cli_test_dal.rs +++ b/prover/crates/lib/prover_dal/src/cli_test_dal.rs @@ -22,7 +22,8 @@ impl CliTestDal<'_, '_> { ) { sqlx::query!( r#" - UPDATE prover_jobs_fri + UPDATE + prover_jobs_fri SET status = $1 WHERE @@ -83,7 +84,13 @@ impl CliTestDal<'_, '_> { sqlx::query!( r#" INSERT INTO - node_aggregation_witness_jobs_fri (l1_batch_number, circuit_id, status, created_at, updated_at) + node_aggregation_witness_jobs_fri ( + l1_batch_number, + circuit_id, + status, + created_at, + updated_at + ) VALUES ($1, $2, 'waiting_for_proofs', NOW(), NOW()) ON CONFLICT (l1_batch_number, circuit_id, depth) DO UPDATE @@ -103,10 +110,15 @@ impl CliTestDal<'_, '_> { sqlx::query!( r#" INSERT INTO - recursion_tip_witness_jobs_fri (l1_batch_number, status, number_of_final_node_jobs, created_at, updated_at) + recursion_tip_witness_jobs_fri ( + l1_batch_number, + status, + number_of_final_node_jobs, + created_at, + updated_at + ) VALUES - ($1, 'waiting_for_proofs', 1, NOW(), NOW()) - ON CONFLICT (l1_batch_number) DO + ($1, 'waiting_for_proofs', 1, NOW(), NOW()) ON CONFLICT (l1_batch_number) DO UPDATE SET status = $2 @@ -182,7 +194,8 @@ impl CliTestDal<'_, '_> { ) { sqlx::query!( r#" - UPDATE prover_jobs_fri + UPDATE + prover_jobs_fri SET status = $1, attempts = $2 @@ -213,7 +226,8 @@ impl CliTestDal<'_, '_> { ) { sqlx::query!( r#" - UPDATE leaf_aggregation_witness_jobs_fri + UPDATE + leaf_aggregation_witness_jobs_fri SET status = $1, attempts = $2 From 05fece73e62065a13475db2e76c380f928e941d1 Mon Sep 17 00:00:00 2001 From: matias-gonz Date: Mon, 30 Sep 2024 08:18:54 -0300 Subject: [PATCH 12/19] Rollback sql fmt --- ...a7db7673811ac181e801a16a7aefc984d60b0.json | 16 ++ ...db7dbe0bb23c4fc87a78be2d01b77da2ecbd3.json | 23 ++ ...d58ab63035cdda861ff7566a9b1f6a68b9162.json | 15 - ...c03e1de8292eb0ea1e026ba1b32a3745c261.json} | 4 +- ...c42cfea253a182ca5df143a183cd522ecac33.json | 22 ++ ...b5ea100f59295cd693d14ee0d5ee089c7981.json} | 4 +- ...c3bdae18b88c4c223e374df9a997c271b091b.json | 38 +++ ...50e42abbaf365a1b041d0e7a809796ef0fe63.json | 22 ++ ...57db0a54d476b78dc0e36e3ef94dcc17099ae.json | 15 - ...a6acecaaffde2e922fb384ecc96571bd9e786.json | 16 -- ...1f5dd0730d1a8e111892025f1c2688e338fbc.json | 15 - ...3897edf8c868094ad029e2e8fcf286d44fd55.json | 16 ++ ...7fb9102b175047588ec1cca515ff31ae131c3.json | 20 -- ...760b8368dd5532caa5fb8b4310a96d44d8530.json | 15 + ...2b3266e5e0140e6d04819be4a5997d193d1de.json | 14 - ...b96b711e8667df7a3c87a5ddf062842a0da6c.json | 14 + ...d2574cd1310dff1d1bf06825d5634ba25f04.json} | 4 +- ...8e34818a86cbc50fb5a509f4072ca97db926c.json | 15 - ...aa9b94d398c635c37746736e98f1f18fcca7.json} | 4 +- ...dc9216ee7df28e08c7eb4899c2e7df4078c50.json | 16 -- ...3db7a71aca15698bafba051a8d9a91a4dbc76.json | 112 ++++++++ ...854f613c3267b983a031998856873740c9bff.json | 15 - ...44a0202265d741912125f7865e570411997d7.json | 15 + ...0f58093cdfe21871592876b9a2a73ec8c1b10.json | 15 - ...97d1fef3dc39e95d98dbdfe49c9121e58ecf2.json | 14 - ...78e96ac6f94edb2983a7e68a3d650a091da1a.json | 15 - ...6b04cd475386497611ed5664a281c66917afc.json | 14 - ...7ea964610e131d45f720f7a7b2a130fe9ed89.json | 17 ++ ...74e68843b551901c83dcf74901cc78e9bdb1c.json | 14 - ...6d922fa1fc9c202072fbc04cae1bbf97195aa.json | 14 + ...68cee71742b732112038a642e2a07305053c2.json | 12 + ...4d26e48e968c79834858c98b7a7f9dfc81910.json | 14 + ...5b8b60165ed757ae1044e83fdc877d95cbd8.json} | 4 +- ...ec7eefa0edd3cefd7eb6025c2c1456f2a6095.json | 15 - ...6e7a755c4bc6c25c7e6caff5fd6142813d349.json | 16 ++ ...518daf76a5f283e4298fd12022b0c3db07319.json | 16 ++ ...1a855e76b37b6ed36ae612b551f9a6a55633.json} | 4 +- ...40b34ce29aad3ac6571116e084d45574c448.json} | 4 +- ...6381a9c4165e2727542eaeef3bbedd13a4f20.json | 15 + ...c836a8ffc0f71f082efca16d14ac0b897597d.json | 16 -- ...83f115cd97586bd795ee31f58fc14e56d58cb.json | 14 + ...70e583b455383eec526eee3acfe6670e30f2f.json | 15 + ...bfcde52f6856c4aaacb55fd7250823368c4a1.json | 14 - ...ed5d8007789c0fc1eab948f6d7339dfb69147.json | 22 ++ ...fc5bccba61861c6f6a1e807d210b25c5af830.json | 14 - ...00f7b1176d59a83520288f5428b67ebd52130.json | 14 + ...eb5f094160627bc09db4bda2dda9a8c11c44.json} | 4 +- ...c0665ee3ea4086ddb91428fa1b6a00760737.json} | 4 +- ...19a0a60dc9804175b2baf8b45939c74bd583.json} | 4 +- ...62af196d586cc08ea0f23d2c568527e94b41d.json | 12 + ...87ed365c0369f94bc457cb162a5c876a123c7.json | 16 ++ ...2db755007951ab826147a7d5d001f12b991c6.json | 15 - ...1aff512b3a9b2587b8e59848345c07dd8f3b.json} | 4 +- ...0f2ede5e22b0bbd8bc910cb36a91ed992bde1.json | 15 + ...14be23e4bde145064157427e7c74e7facda30.json | 14 - ...b57ecda488eb062fcacbb59bd6d00b2c7703e.json | 14 - ...2c5eeab06ff664141fa542229e7c9a46d4410.json | 34 +++ ...ae976ea533143b0eb0644612e926624d710f0.json | 12 - ...6b0b3185a231bbf0b8b132a1a95bc157e827.json} | 4 +- ...800383e6b73a8b48dc3e589a29a4367cbb5a.json} | 4 +- ...1d5b68fb9450d17372701907905bb74af844a.json | 14 - ...6618914d6dedb39a9a40d36484741e8b01f4.json} | 4 +- ...54682bd852c4a54387f92b3f633b5a5899c93.json | 14 - ...61c816f583c69a64b7768887ecce434b829fd.json | 14 - ...0c1f7b0d68b747e3a75a63d60ccd0982c7fde.json | 14 - ...618217af059a796e4a3cc0f5269709f7ffd49.json | 14 + ...96ec397767a063dc21aa3add974cb9b070361.json | 16 ++ ...3c0210383d8698f6f84f694fece9fd59f3d5.json} | 4 +- ...9b3253ea21b3eac3c1df1921e040e3f059aac.json | 12 - ...83b7955a058705093d7372726c3fc7ce506ad.json | 14 + ...31867b3c0bff34bbacbc31ff4cd786c97ca90.json | 12 + ...16b8b569a196df3ebf75ee779665ec53d1187.json | 38 --- ...6e4da6574f78094cbbc8eb27b9b273a96aa10.json | 14 - ...484f0a0d76a8097b61ead5f1f20301ce524d.json} | 4 +- ...03def94f4bf4674def1893e2232be80f57a0.json} | 4 +- ...7d113257cca7a7fc6c8036b61cc0e005099a8.json | 16 ++ ...7445aa3148d8abdd4e5fb50947ce512f53690.json | 14 + ...a75893ee5b1b94b6d0f25f1db5342888a2a30.json | 15 + ...fc05eaa158a6f38a87187d7f2c2068a0112a.json} | 4 +- ...d590df2d0633fb5e58f600fe5a87012bc998d.json | 15 - ...59d96738d6bccaa175362cc554eddb3b26262.json | 14 - ...843620210aff3a9a7aa8a249db50c1c56d927.json | 20 ++ ...12e49a65da26212e6d676abffb9d137aa3c2e.json | 14 + ...3b18a1bd18b922640d3ae70ae0b9bfde8effc.json | 14 - ...ab71005d70f13ed32172e47166f71b3aef80.json} | 4 +- ...43895c9a3cf9e0c52bd65c5eace2445c2249f.json | 15 - ...3fb92c099f0b71ecfabd33325cfd107f2fecf.json | 16 -- ...182ca8e746122e42f448a7f349a234e6ab594.json | 16 -- ...54f72cdbdc00487a42a42b4c15584e601e261.json | 14 - ...7554ce738a2d7005472e7e76a64a8fbd57ad.json} | 4 +- ...ed811faffcc108d04b59fdec5a0ab9d13fa3.json} | 4 +- ...ec427a099492905a1feee512dc43f39d10047.json | 15 + ...162d717ffcf46fdf5d2ce5d32555353b6da6b.json | 14 + ...5b2356e58f12a7af7539f2b75eb318941db6d.json | 14 - ...4c3262d5cab17e8f76bdc6672459e0091b1d8.json | 19 -- ...373147984aa3931df33a50de2bb2ed4367d51.json | 14 - ...ecd50a04799ffd36be0e17c56f47fcdbc8f60.json | 14 + ...16369609c69bf8fed67f6fb96859844ed29b1.json | 23 -- ...325fad494a512ba92df95439d2d7fe0f3a285.json | 23 ++ ...da959f3f2e5375d8f1687231f13d26a41cc68.json | 14 - ...6228315e7aeed1c6b6f3989e043d6f4fd5f70.json | 16 -- ...6de37201091bfccd3caf922e766896c5a542b.json | 15 + ...c7573fe040d47d17d9bd4e2a2b6d3131a4f9c.json | 16 ++ ...77d57040037da0e07cef2c7b7246851a3703.json} | 4 +- ...18890d009081b1c1cec8773e25c6621753372.json | 40 --- ...3ee9ed6fd28c338ddadd9958f3bb0901ba454.json | 16 -- ...3ea4423fdaf5d03cb70e8c3a67b6d4a24d29e.json | 19 ++ ...171cd0e4d38bd6e9cfec58b2d7f53a3204e1.json} | 4 +- ...b9593ba6ff291db9868a1ad6df21440ef311a.json | 14 - ...fd5e1330393d8b04c7cf03b8c7ab2edad5d1.json} | 4 +- ...c0798441543244f83b691783127979e02dd8c.json | 15 + ...fadbcfc343374fad173df0cc8db38419a9726.json | 14 + ...28321969b8c5bce89a83b74ee08f9e2dfcf9b.json | 14 - ...c86783d7da0ec1d008680872f3619cf217923.json | 14 + ...91a8d67abcdb743a619ed0d1b9c16206a3c20.json | 12 + ...ab01cb2c55bf86d2c8c99abb1b7ca21cf75c0.json | 14 + ...a82f1af696fcc8f7484eaf255d5311589ee39.json | 14 + ...c8ff11775885aebaf457075c6825305244e5.json} | 4 +- ...295a5f5d8ad9a1560d96bed1250c37ec9cb0e.json | 15 - ...821df4deb486211260ea86d272fc69a447385.json | 14 - ...ac5e5fccb3ec55aa1227f5f1ea5a11f9b36a9.json | 15 + ...8449c1c4bed4d0236fcedc177c9478e72262.json} | 4 +- ...4c4a82d399ca1c4c6da36d2ab98a7537de7aa.json | 12 - ...26313c255ce356a9a4e25c098484d3129c914.json | 14 + ...6bf94a013e49bf50ce23f4de4968781df0796.json | 15 + ...5217a1838cc7ea29b1f8fa394b62573884512.json | 12 - ...f1bffbb123e71e0334c17a3f334789f420ad3.json | 15 - ...29bf769829991c7d732b13f96bcd1293263ea.json | 12 + ...664b1106316347f0fc557afe7112d6fca7e3b.json | 22 -- ...d4c2f5800c37ac0715f6ae351cafb8afbb76a.json | 12 - ...cf7f4d16593b0ed0b496c903d967efe5bb6a6.json | 17 -- ...31f9138b204f4bcd15f934e5b209f3dac0639.json | 16 -- ...3a203f640cb2279f3b75108c49b2527b19c8b.json | 15 - ...8dc4bd57e32dfefe1017acba9a15fc14b895.json} | 4 +- ...81e33845ec68e386ef032715ad1222e2fdc8b.json | 15 + ...8abd8d4e534e5c17e4ffbcf5c97ff920b12d6.json | 14 - ...466f8a4efab1a52acc26f3a6c6b219a46390b.json | 15 + ...9c7459db54dae9a2ea2db8595af4cb70c8aa9.json | 22 -- ...2767e112b95f4d103c27acd6f7ede108bd300.json | 16 ++ ...d2bd038257f7cf2ab51405dc05ccba3e33312.json | 16 -- ...4e8901b631ff170733621ce3ece216d71205b.json | 15 - ...c9317c01d6e35db3b07d0a31f436e7e3c7c40.json | 14 + ...8e221a8ef9014458cc7f1dbc60c056a0768a0.json | 16 ++ ...724dcce382936af0d4c386143399995cd325.json} | 4 +- ...d1910919b8b46e895ddaa4ba5bf411585dc6e.json | 16 -- ...59a410844c0e3cb5e190d1b8442da802825ad.json | 14 - ...c08e57f95c6ee5a69f02f15eb1e886df4c882.json | 14 - ...f8fbd8fdaf23266412e2faffb7e3813213b98.json | 14 + ...1719519938eccbea4a598d842bd75b9553880.json | 14 - ...8ad91e8653d01981640d2d068c9564393f7b9.json | 16 -- ...a69138206dfeb41f3daff4a3eef1de0bed4e4.json | 16 ++ ...d10c23ab2924f6a3f0594f6990af8ea9146a6.json | 15 + ...f65ff83204ebab2ea31847ae305a098823b0.json} | 4 +- ...5d93e391600ab9da2e5fd4e8b139ab3d77583.json | 15 + ...0d51f86d30d5ad92496e4aa087a3c4aae09f.json} | 4 +- ...de45f8f3f3b6cf2e4136f25a1c3ab85d92668.json | 15 + ...08f1ce816a56308fb9fe581b8683f76cbbbc3.json | 14 + ...877866bbdd1f8c359d97538125756fd05a2ab.json | 12 + ...d3a0eed793f7b64ad3ed035f20e896371721.json} | 4 +- ...d6ca26aa2fa565fcf208b6985f461c1868f2.json} | 4 +- ...0457113e073b392c569c077d719941d1e37aa.json | 14 + ...63f436a4f16dbeb784d0d28be392ad96b1c49.json | 14 + ...6d2b2e3f2497e6b5f26c72e220397cc0e62f7.json | 15 + ...192a143f6a7501b7da65bb7df40a0a4ead70.json} | 4 +- ...61b86b1abd915739533f9982fea9d8e21b9e9.json | 14 + ...d1f5e03924dbf6dd1e824d4aca837e604b7e9.json | 44 +++ ...5386a2fd53492f3df05545edbfb0ec0f059d2.json | 15 + ...71a5609ca74432dcec3c169279bbbfce9fdae.json | 16 -- ...35c1dcccdd6c439827fc4c3ba57e8767076e.json} | 4 +- ...5637fcf7f6c27d1238b17bc0f9bc50a0ffa7a.json | 14 - ...58e579752dea7632e9422c2921a5d7e4d62ba.json | 16 -- ...1cc9d3523a392fd2011491c6017400f313a16.json | 12 + ...f67d2ef1428c61ae84003c9b52b03204d1f0a.json | 14 + ...a4b4e2af48907fa9321064ddb24ac02ab17cd.json | 20 ++ ...facec8c88629c4993f6c86a30193c7916fff6.json | 12 - ...4fdfd4e8aed4c63898af5b3c3d5ad2c6bec6c.json | 15 - ...75072106e943b76c17ef42a1138e291da86c6.json | 112 -------- ...ab02b0656d863dbfce4b5dad7bc72e52b05d.json} | 4 +- ...09dbee508ad6d1cae43e477cf1bef8cb4aa9.json} | 4 +- ...c1d66aeaeb6e2d36fddcf96775f01716a8a74.json | 14 + ...432d865852afe0c60e11a2c1800d30599aa61.json | 14 + ...5a9a38a8d8ff1fba9a834d37927793f532b7d.json | 14 + ...77fde74782e8849e84a2b699fe855946f8905.json | 22 -- ...2cb9aa7c0305378d758dfe9bce80912e59255.json | 15 - ...33acd2066a5e238088b39b982b10770f51479.json | 100 +++++++ ...9713f437db492e2075ca69e11e2ef5728ccaa.json | 24 ++ ...3639a63047f46dc8e605ff37b78f43f5cef5.json} | 4 +- ...0d7eaeeb4549ed59b58f8d984be2a22a80355.json | 22 ++ ...5668359e4b623876422cf6915d4888cdca31a.json | 14 - ...864174f39e6011fdfdc56490397ce90233055.json | 16 ++ ...3f2f9edd3fb4e73b44d9fa2c2bb927acb99f0.json | 20 -- ...c623866c3fd2e862c38c2af172c7c39620a49.json | 14 - ...825c64f43a819b9c787228b23814542f563d9.json | 36 --- ...74a5ade5c1a472c4e5c9f5e9050e4136273b6.json | 24 -- ...0e202da24ac3ca205154417e98ccfa7437379.json | 16 ++ ...d455f4043c60538687dec050c5b578d505ef8.json | 23 -- ...a6b3e9bca996fa633005bc8eeb77341c8c893.json | 14 + ...2432295b2f7ee40bf13522a6edbd236f1970.json} | 4 +- ...beea37512f1c5855579bdbb4cd8ba6d9977c3.json | 44 --- ...700f9ae2a6e5a917b1a21f290d313d9d88dba.json | 14 - ...1885d320c146cd8fad77c107ef12fa38e6c98.json | 40 +++ ...9411ba30ac67080552279d821d66b1b804db3.json | 14 + ...8242aad3e9a47400f6d6837a35f4c54a216b9.json | 20 ++ ...f64c789d3a8a1d6c96c58213c23a055cde751.json | 15 + ...e5da19947002e66110573e6fad9105f07413a.json | 15 - ...5cadeff54160c1cc0b6b4fddecf090ebb30f1.json | 20 -- ...5dbc6f5ed92bc3d47b4dd91116dd6ec354d50.json | 12 - ...98c18f29d3bebb42b0ae3fe7757eeea9ee175.json | 40 --- ...4675993ca0c7b2fb1d2be386101b78a995110.json | 14 - ...6862d6ad0de7c7ca1d5320800f317428f07e1.json | 14 + ...a8b12b67678e983dc2570be28fe9b1e016c28.json | 14 + ...0b04a045f37cb9217ed0b17a78f9949f3d7ed.json | 22 -- ...c1b0b2dd97b590d546c3c03dc1a97144a57ec.json | 15 - ...ad74e1bab808c744fa14bf24332b39120767.json} | 4 +- ...a683c2092560f59c8a6703d4ccc1715872ba9.json | 14 - ...0294ec464d184ad732692faa61d2ef99c84e9.json | 40 +++ ...f3f9dd37b771cf76261762ae18fd14cf0efc5.json | 16 ++ ...5eb148aa6d1dbd69bf3fe48522101a6ea0bcb.json | 23 ++ ...668929ceaaa66536248f4a0fc062e50d0d80c.json | 23 -- ...e6ecbe96475e83dfed603bd305e72460f52c2.json | 14 + ...78a8a0ec739f4ddec8ffeb3a87253aeb18d30.json | 14 + ...ac6758a0a4e367f93a9bd48ec82c51e09755.json} | 4 +- ...2fe98364aa684180dd6fbf540bb0b68d96a64.json | 15 + ...ad0e0d6d235b05441fc306dbf70d27f1b728c.json | 100 ------- ...89268465b346af5da1a58cac850b687e5eb34.json | 15 - ...ab318006e8b52570a72a89682435a92ca75f8.json | 14 - ...5ff66f2c3b2b83d45360818a8782e56aa3d66.json | 36 +++ ...92dfb0d28a797bee69872634f3105d2d51996.json | 14 + ...50ebc862a133734382bad8fdfa3a93d8b743.json} | 4 +- ...8779128de288484abea33d338c3304dd66e08.json | 16 ++ ...6109696737ae42ee1ee38e99ac07564816b5a.json | 16 -- ...780c75468aa36615bcfcf7f7d8ace23cd1aa.json} | 4 +- ...fd7144b05f75aa304bf217cf14b9625a09e64.json | 34 --- ...bd48e2dc3cce5f3f40cea31eb3b27c6bff1c1.json | 16 -- ...f01c2abe41c456d85787038ad0b3cc21b59f8.json | 14 - ...5d9ec9b3f628c3a4cf5e10580ea6e5e3a2429.json | 14 + core/lib/dal/src/base_token_dal.rs | 8 +- core/lib/dal/src/blocks_dal.rs | 79 ++---- core/lib/dal/src/blocks_web3_dal.rs | 25 +- core/lib/dal/src/consensus_dal.rs | 25 +- core/lib/dal/src/contract_verification_dal.rs | 40 +-- core/lib/dal/src/data_availability_dal.rs | 14 +- core/lib/dal/src/eth_sender_dal.rs | 50 ++-- core/lib/dal/src/eth_watcher_dal.rs | 11 +- core/lib/dal/src/events_dal.rs | 14 +- core/lib/dal/src/events_web3_dal.rs | 43 +-- core/lib/dal/src/factory_deps_dal.rs | 14 +- core/lib/dal/src/proof_generation_dal.rs | 23 +- core/lib/dal/src/protocol_versions_dal.rs | 9 +- core/lib/dal/src/pruning_dal/mod.rs | 110 ++++---- core/lib/dal/src/snapshot_recovery_dal.rs | 5 +- core/lib/dal/src/snapshots_creator_dal.rs | 16 +- core/lib/dal/src/snapshots_dal.rs | 19 +- core/lib/dal/src/storage_logs_dal.rs | 64 ++--- core/lib/dal/src/storage_logs_dedup_dal.rs | 10 +- core/lib/dal/src/system_dal.rs | 18 +- core/lib/dal/src/tee_proof_generation_dal.rs | 29 +- .../src/tee_verifier_input_producer_dal.rs | 21 +- core/lib/dal/src/tokens_dal.rs | 6 +- core/lib/dal/src/transactions_dal.rs | 267 ++++++++---------- core/lib/dal/src/transactions_web3_dal.rs | 31 +- core/lib/dal/src/vm_runner_dal.rs | 98 +++---- ...f6e1df560ab1e8935564355236e90b6147d2f.json | 15 + ...7619d79075a2177b8f9b464565474b43afc21.json | 15 - ...113a19feb73c4cf9876855523499998b99c0.json} | 4 +- ...c252e5c82673e1595829b4b9f897b7df61e6a.json | 15 - ...8dbc21cccb9a95e3db1c93da239845a5e9036.json | 26 ++ ...52e0e45816db6ebc2c16a09350b99d87d5f27.json | 26 -- ...636ca3032cd5dcc5d3d1d4d5d0a16c38c20ef.json | 16 -- ...473766ab4f51dd399c879b4f7c3bc157ab77e.json | 30 -- ...a80c233a9fd3e892b5a867a5517c2e04497a8.json | 41 +++ ...f1cdac8b194f09926c133985479c533a651f2.json | 18 ++ ...98f5e2450cc4faee2f80b37fbd5626324dbeb.json | 12 + ...a4dab579b76ea65ea022505a3f57fc0a4a946.json | 15 - ...6054d3fb4f4a5c014ef24f5cb0ac4cd3465eb.json | 17 -- ...ae31358088e142dff51c9f0bde8f386900d3.json} | 4 +- ...332b826708800a2f72f09bd7aea08cf724e1a.json | 47 +++ ...431e3e266c84e1ef03cf4015202dbb9f54174.json | 22 -- ...d1b98aa902e56d35f55c0d7e2a983ce1bdd80.json | 53 ---- ...74aac9fa17a424d1f5c673e78a2a023bc2205.json | 15 - ...a68a48db6a64afcd41bbe0e17d98fa38fdb19.json | 22 ++ ...8b699386b3c5b4e02d5ce046f0f2e0ddc388.json} | 4 +- ...def3a97275b66ad33d214054dc9048ddf584.json} | 4 +- ...e4aa4f797bcc6e05ec2f2e435a7e940d8cf9.json} | 4 +- ...cf8c93630d529ec96e67aac078f18196f61a5.json | 19 ++ ...9d03f894f40d2ec528382b5643c3d51ec8e7.json} | 4 +- ...dc761977ca7fe9a822d8318caffcf8882d4b1.json | 24 -- ...7249ec09c0daf4368021788207370213a6d94.json | 14 + ...f1d4d9a4b83a8b42846d8373ea13b96d612cf.json | 19 ++ ...adefab0bf3abf6853a6d36123c8adcaf813b.json} | 6 +- ...ec0b54094da72d2d9de5e3948001164bf739c.json | 18 -- ...d48c95ca5b4520dde415a2b5ff32ece47c86.json} | 6 +- ...8d4cc59246dda91b19526e73f27a17c8e3da.json} | 6 +- ...e2d3a6ebb3657862b91e3ece34119f098fc2d.json | 32 +++ ...fe6ee0c0c54e68daabbe2eab5c7ce9b1cd4bc.json | 60 ---- ...0ad195b0dd2a8ce56b1a9eb531103130b5e3e.json | 62 ++++ ...8b87ead36f593488437c6f67da629ca81e4fa.json | 14 + ...aa0a0ad5fba0f6dbc4d8f36c79171a8be8f42.json | 17 -- ...091e0d7c5ada67cb757b874a5c62e32184666.json | 15 - ...97ed410fa47b268a66f1fc56d469c06ae50af.json | 12 + ...2601d35fd2881ac1fd070f0f1a8add4bc388d.json | 30 ++ ...5da82065836fe17687ffad04126a6a8b2b27c.json | 15 + ...874ec8fc1800b848951cf264b3f309701c52f.json | 47 --- ...0ee050f09ae3886243c9af0677ad20e115a01.json | 15 - ...b25b709ba99059f4a2f5e1bc5fd17f27c1244.json | 12 - ...9a8f447824a5ab466bb6eea1710e8aeaa2c56.json | 15 + ...31c32226a54cd980aa99a38289452fbb100d4.json | 14 - ...c0094aba5c7966739d2d56ac74ed28ceb715f.json | 16 -- ...701950441fcbf9784a6634ce020262e170951.json | 19 -- ...1810d85803da953bd7d5c46b34619e05374ed.json | 18 -- ...92dd0bec10a53fa6d9052f9aeeeed8080d304.json | 12 - ...41976a264759c4060c1a38e466ee2052fc17d.json | 15 + ...419667f11d80036cda021ecbf23b0b5f7f42.json} | 4 +- ...ad2ccc0aeaaecbb8989eb738a01ea253a237b.json | 12 - ...715e903f3b399886c2c73e838bd924fed6776.json | 18 ++ ...ba7f33558aa20961f475823e0216873a9e8a4.json | 17 -- ...fcddbb47c5e9965443f118f8edd7d562734a2.json | 60 ++++ ...f32042dfead8a37401558f5fd3b03480f2dd.json} | 4 +- ...b6d9065bf4494daf8f7632ab2bfe055773f7b.json | 47 +++ ...c0b6c018e6a4d279acd24a4ea7d81b5cc5123.json | 60 ++++ ...e085ea80cf93c2fd66fd3949aab428bbdc560.json | 12 + ...f5a15d2fc5ad3e5ce738a2f6ee3eecfc96736.json | 16 ++ ...b7b5831361599874fc223dd389fcc3f9efee7.json | 41 --- ...023678f31a1b7f5ee33b643dd551c40e88329.json | 15 + ...d21d4645563f93afd4428734196c2b212276.json} | 4 +- ...866e8f67a380302762c272bfb27307682d62e.json | 18 ++ ...e2a39dd892793175e3d943487875367d220e6.json | 14 - ...2a4a98ec63eb942c73ce4448d0957346047cd.json | 17 ++ ...6d119cc0df302fa2288d37741138cb4592156.json | 19 -- ...6b4d3d6a762761e45af2a73fe96da804e627e.json | 53 ++++ ...0767a2cd4488e670674cd9149f7a332c0198d.json | 22 ++ ...10648e2870c18716c6cf30dbf3a704c137776.json | 15 - ...3ced4deef9ea2f9699e8e173d5d2343f26cc3.json | 14 - ...8a01b63ae4aa03c983c3a52c802d585e5a80.json} | 4 +- ...426777a8a76f02f528348bfe81f19ba5ebaa3.json | 15 - ...43c868c63c853edb5c4f41e48a3cc6378eca9.json | 32 +++ ...20222e177262292241bd8cb89dbb9c1e74c2d.json | 15 + ...bd791fce9a86b6cadb2c8a2b2834bbe71fbd4.json | 62 ---- ...fa244d5b3c2ae22b4850c9a536e4d54ce38d3.json | 15 - ...0103263af3ff5cb6c9dc5df59d3cd2a5e56b4.json | 17 ++ ...a9dc31c7d51476f18cffa80cad653298ad252.json | 12 + ...cb86bd28dbda3ee3444f300da9f7d25930cae.json | 47 --- ...61698aeed3f3de0994908fd7a655ff465f250.json | 32 --- ...ad70e48d1171fbdc1c929e1d004e73805d4e9.json | 26 -- ...9e36eb532235d016c31ae8d86455506dd7a80.json | 22 -- ...a13c70062609adca4c60274ba19cde990727c.json | 53 ---- ...71570fc88c17822bebd5b92e3b2f726d9af3a.json | 47 +++ ...3c0c5544cb14cc06baa46cd7ecc329bba7b49.json | 60 ---- ...69f22d450a0fb0f10eb391b058f650d99ef71.json | 47 --- ...4775c6f7414c7bed75d33b61de00fdbabc349.json | 15 + ...ac429aac3c030f7e226a1264243d8cdae038d.json | 17 ++ ...b5a4672ad50a9de92c84d939ac4c69842e355.json | 16 ++ ...d24b3f001a2d4ea0da817e69f3816d43ce73b.json | 12 - ...b6da86d1e693be03936730c340121167341f.json} | 4 +- ...e67f08f2ead5f55bfb6594e50346bf9cf2ef.json} | 4 +- ...6b93bfd5d96fdc68732fe38c79ccd44b84def.json | 53 ++++ ...b86ce94a1379a01ec3ebb41aa9a210d589d08.json | 47 --- ...91a43dc8eafc33ee067bd41e20f25f7625f0.json} | 4 +- ...6dde4142e09330557cc627fee2db278ace50.json} | 4 +- ...2060fbea775dc185f639139fbfd23e4d5f3c6.json | 15 + ...6b80c122699e003028b14a0530e2fba5f5b23.json | 16 -- ...9ad7df6c6b0e29981439d94dc081d4fad3cba.json | 32 --- ...4e83cc39c941282257e0c9a488bcb52f63dd2.json | 18 -- ...68f529dce53a9e2b37adf73c88e3dd64d461a.json | 15 - ...e1bb675a86ae14a863fa31eb513af65d606ed.json | 24 ++ ...93a4eb2ee0284aa89bca1ba958f470a2d6254.json | 14 + ...fba74ec2cfc3c89c7e4e2ea475c3ce4092849.json | 26 ++ ...567878f347bdaf36294e9b24ee9c0aa1e861b.json | 15 + ...d005d8760c4809b7aef902155196873da66e.json} | 4 +- ...af89bbd72934e1405e320e746158e6d395d96.json | 47 +++ ...3465e2211ef3013386feb12d4cc04e0eade9.json} | 4 +- ...15aaade450980719933089824eb8c494d64a4.json | 15 + ...8e1010d7389457b3c97e9b238a3a0291a54e.json} | 4 +- ...83a7526ae38ceb4bf80543cfd3fb60492fb9.json} | 4 +- ...ae905acac53b46eeaeb059d23e48a71df3b4.json} | 4 +- ...304e8a35fd65bf37e976b7106f57c57e70b9b.json | 16 ++ .../crates/lib/prover_dal/src/cli_test_dal.rs | 40 +-- .../src/fri_gpu_prover_queue_dal.rs | 37 +-- .../src/fri_proof_compressor_dal.rs | 33 +-- .../src/fri_protocol_versions_dal.rs | 13 +- .../lib/prover_dal/src/fri_prover_dal.rs | 79 ++---- .../src/fri_witness_generator_dal.rs | 160 ++++------- 382 files changed, 3668 insertions(+), 3971 deletions(-) create mode 100644 core/lib/dal/.sqlx/query-00220170d8f9e577321a0522337a7db7673811ac181e801a16a7aefc984d60b0.json create mode 100644 core/lib/dal/.sqlx/query-00c0389f4cde049078885cdf05bdb7dbe0bb23c4fc87a78be2d01b77da2ecbd3.json delete mode 100644 core/lib/dal/.sqlx/query-02cd10bd405bb3150478ef98d9dd58ab63035cdda861ff7566a9b1f6a68b9162.json rename core/lib/dal/.sqlx/{query-f4c3a8e5cf0079a3cc0392692b521c6c341e2122d40b8dd8d7e1de6a3cf14d3d.json => query-0385576f1fb3836fc04a6cde3e92c03e1de8292eb0ea1e026ba1b32a3745c261.json} (55%) create mode 100644 core/lib/dal/.sqlx/query-03e00f422f991f8f12aad0083e1c42cfea253a182ca5df143a183cd522ecac33.json rename core/lib/dal/.sqlx/{query-bb686779db0b9b0cb844702affbd5560139c2bc540cc7777da44c9585206382c.json => query-040eaa878c3473f5edc73b77e572b5ea100f59295cd693d14ee0d5ee089c7981.json} (63%) create mode 100644 core/lib/dal/.sqlx/query-046590a310cc7bbfa421d0d8e20c3bdae18b88c4c223e374df9a997c271b091b.json create mode 100644 core/lib/dal/.sqlx/query-05c2a77d9f65d435e2df63a300850e42abbaf365a1b041d0e7a809796ef0fe63.json delete mode 100644 core/lib/dal/.sqlx/query-05e94c9609efb0e4e0c96f3ee7f57db0a54d476b78dc0e36e3ef94dcc17099ae.json delete mode 100644 core/lib/dal/.sqlx/query-079da9dcd3f65b8fad7465a5cb5a6acecaaffde2e922fb384ecc96571bd9e786.json delete mode 100644 core/lib/dal/.sqlx/query-0a55ee6934920b29262040064261f5dd0730d1a8e111892025f1c2688e338fbc.json create mode 100644 core/lib/dal/.sqlx/query-0b5d5efeac95d429cf6a5be22153897edf8c868094ad029e2e8fcf286d44fd55.json delete mode 100644 core/lib/dal/.sqlx/query-0c2be3c7bd278d24d3a155203067fb9102b175047588ec1cca515ff31ae131c3.json create mode 100644 core/lib/dal/.sqlx/query-0d60eb7536b49716fa01a14b0be760b8368dd5532caa5fb8b4310a96d44d8530.json delete mode 100644 core/lib/dal/.sqlx/query-0e9727e6537ef08e65b8868e7a22b3266e5e0140e6d04819be4a5997d193d1de.json create mode 100644 core/lib/dal/.sqlx/query-0f381418ac79762b4573bf5b440b96b711e8667df7a3c87a5ddf062842a0da6c.json rename core/lib/dal/.sqlx/{query-08cd0d21cc831cd54f55d6e02daddb6978a6c1e80bbaa5f8fded39a82f8e50e0.json => query-0fbdf8da9a000c433c5475d57f6ad2574cd1310dff1d1bf06825d5634ba25f04.json} (57%) delete mode 100644 core/lib/dal/.sqlx/query-0fc5c017a21f1ed897d9856e7318e34818a86cbc50fb5a509f4072ca97db926c.json rename core/lib/dal/.sqlx/{query-0bd951ee87fe42893321894594cca22b17e75cb6778168d230d9ccd263caca23.json => query-0fef49a649d20c9fd263c1dfa40daa9b94d398c635c37746736e98f1f18fcca7.json} (51%) delete mode 100644 core/lib/dal/.sqlx/query-105ea691e4022cf707db0707a42dc9216ee7df28e08c7eb4899c2e7df4078c50.json create mode 100644 core/lib/dal/.sqlx/query-1074d0a2e4a4afb9a92f3822e133db7a71aca15698bafba051a8d9a91a4dbc76.json delete mode 100644 core/lib/dal/.sqlx/query-11960ee50e5cb3a2f1e8150e1e6854f613c3267b983a031998856873740c9bff.json create mode 100644 core/lib/dal/.sqlx/query-120970162104e0560784ee4b8fa44a0202265d741912125f7865e570411997d7.json delete mode 100644 core/lib/dal/.sqlx/query-137702c69220666ec5c1c4dc0fd0f58093cdfe21871592876b9a2a73ec8c1b10.json delete mode 100644 core/lib/dal/.sqlx/query-14cd4cad9c69985b59cb924339297d1fef3dc39e95d98dbdfe49c9121e58ecf2.json delete mode 100644 core/lib/dal/.sqlx/query-1656c38e85e1f7e1164aec5d5ee78e96ac6f94edb2983a7e68a3d650a091da1a.json delete mode 100644 core/lib/dal/.sqlx/query-1854e92462e839e741fdfef196f6b04cd475386497611ed5664a281c66917afc.json create mode 100644 core/lib/dal/.sqlx/query-19314d74e94b610e2da6d728ca37ea964610e131d45f720f7a7b2a130fe9ed89.json delete mode 100644 core/lib/dal/.sqlx/query-19a4025388ec9dd14de5f8d794b74e68843b551901c83dcf74901cc78e9bdb1c.json create mode 100644 core/lib/dal/.sqlx/query-1bbfac481c402bcb3bb888b84146d922fa1fc9c202072fbc04cae1bbf97195aa.json create mode 100644 core/lib/dal/.sqlx/query-1c14d2def60fa5ff91788ddb55e68cee71742b732112038a642e2a07305053c2.json create mode 100644 core/lib/dal/.sqlx/query-1c994d418ada78586de829fc2d34d26e48e968c79834858c98b7a7f9dfc81910.json rename core/lib/dal/.sqlx/{query-c2ef57bcc2a2628618a6b292180e2188769ca8c52125e7739bb00e90eedc79af.json => query-1e3c88b41bc02cb6a116fa930ae85b8b60165ed757ae1044e83fdc877d95cbd8.json} (73%) delete mode 100644 core/lib/dal/.sqlx/query-1fba74c9aa8760adf71bd98b278ec7eefa0edd3cefd7eb6025c2c1456f2a6095.json create mode 100644 core/lib/dal/.sqlx/query-2169cc7dfb074566ceb0bd5754d6e7a755c4bc6c25c7e6caff5fd6142813d349.json create mode 100644 core/lib/dal/.sqlx/query-25ef41cbeb95d10e4051b822769518daf76a5f283e4298fd12022b0c3db07319.json rename core/lib/dal/.sqlx/{query-729e09e0029b12156689ebe01e082cec15b0c574fd94917e82238d1294831197.json => query-25fb31277591dd7d5d783bd8777f1a855e76b37b6ed36ae612b551f9a6a55633.json} (74%) rename core/lib/dal/.sqlx/{query-fc1d15b1a952b050eb80db38c65e9305636d5c692804f08e96f913a877798ccb.json => query-26c80e9bafcf7989e7d40c6e424240b34ce29aad3ac6571116e084d45574c448.json} (79%) create mode 100644 core/lib/dal/.sqlx/query-26e0b7eb1871d94ddc98254fece6381a9c4165e2727542eaeef3bbedd13a4f20.json delete mode 100644 core/lib/dal/.sqlx/query-27f58d66139d7fad29b2f31a4a1c836a8ffc0f71f082efca16d14ac0b897597d.json create mode 100644 core/lib/dal/.sqlx/query-293258ecb299be5f5e81696d14883f115cd97586bd795ee31f58fc14e56d58cb.json create mode 100644 core/lib/dal/.sqlx/query-29a9350164fc0b2983f753e105a70e583b455383eec526eee3acfe6670e30f2f.json delete mode 100644 core/lib/dal/.sqlx/query-2af4a147c9172bcb6dfcd1c9808bfcde52f6856c4aaacb55fd7250823368c4a1.json create mode 100644 core/lib/dal/.sqlx/query-2b1aa207a058f66265acf2c21b8ed5d8007789c0fc1eab948f6d7339dfb69147.json delete mode 100644 core/lib/dal/.sqlx/query-2bb702d1f3bb935fd0f447ffb6bfc5bccba61861c6f6a1e807d210b25c5af830.json create mode 100644 core/lib/dal/.sqlx/query-2c71a819c6ed22a3ab79675840e00f7b1176d59a83520288f5428b67ebd52130.json rename core/lib/dal/.sqlx/{query-66e4b86d23a96174ef1edcee4da70bb5b8a0a5408ccd09465225f8bf3fee551a.json => query-2d1e0f2e043c193052c9cc20f9efeb5f094160627bc09db4bda2dda9a8c11c44.json} (55%) rename core/lib/dal/.sqlx/{query-375bfcf94a885ea91295da97a8a8f9db6cd67629c9d987f1ed7da6bdb341edfd.json => query-2d8da95804a7a300ff2b756e6785c0665ee3ea4086ddb91428fa1b6a00760737.json} (90%) rename core/lib/dal/.sqlx/{query-d4ae7c8a220920ef6a2d34d34b6966c69a183624bd5c982a36756ac57c4b49ba.json => query-2e5b9ae1b81b0abfe7a962c93b3119a0a60dc9804175b2baf8b45939c74bd583.json} (68%) create mode 100644 core/lib/dal/.sqlx/query-2ffa321700ef1f70a1c3f516f3162af196d586cc08ea0f23d2c568527e94b41d.json create mode 100644 core/lib/dal/.sqlx/query-307f15e00a97440868189f25e4487ed365c0369f94bc457cb162a5c876a123c7.json delete mode 100644 core/lib/dal/.sqlx/query-3099a2329d130d003bc781f5dcd2db755007951ab826147a7d5d001f12b991c6.json rename core/lib/dal/.sqlx/{query-f56a7eb6a82875d5151ec2c1b320328e19bed529d4bd71ca5bc7df0de1a0a463.json => query-30e5c8710b1611872da06b72ac681aff512b3a9b2587b8e59848345c07dd8f3b.json} (66%) create mode 100644 core/lib/dal/.sqlx/query-311d0357c22163b893dc91f2b080f2ede5e22b0bbd8bc910cb36a91ed992bde1.json delete mode 100644 core/lib/dal/.sqlx/query-3125669226682212fdc06c0145614be23e4bde145064157427e7c74e7facda30.json delete mode 100644 core/lib/dal/.sqlx/query-335474e43a63dd08d362f5c7122b57ecda488eb062fcacbb59bd6d00b2c7703e.json create mode 100644 core/lib/dal/.sqlx/query-33a78184559d0c0d13469fa799e2c5eeab06ff664141fa542229e7c9a46d4410.json delete mode 100644 core/lib/dal/.sqlx/query-346d2bc8ba252a17d5d0918e1b7ae976ea533143b0eb0644612e926624d710f0.json rename core/lib/dal/.sqlx/{query-f773adbbc1587e69fa8665806fde81314e65b27790b9946a58c95f2fbe6fb664.json => query-3490fe0b778a03c73111bf8cbf426b0b3185a231bbf0b8b132a1a95bc157e827.json} (83%) rename core/lib/dal/.sqlx/{query-0feeb221b1d18eb2331c88696d1f3c13834347e2bf7a90d2113a2e0d623c6122.json => query-3518a3e93da8115b54426d72aea0800383e6b73a8b48dc3e589a29a4367cbb5a.json} (65%) delete mode 100644 core/lib/dal/.sqlx/query-369736a602fe2ebf7392ca171581d5b68fb9450d17372701907905bb74af844a.json rename core/lib/dal/.sqlx/{query-19188b9e92b0cc5660c851baccc6f9ce57c51198af167ec2b98944659ba0c53a.json => query-37890022be6b5e893cf051266fa16618914d6dedb39a9a40d36484741e8b01f4.json} (66%) delete mode 100644 core/lib/dal/.sqlx/query-380b3a40db65f66f502cc7e696254682bd852c4a54387f92b3f633b5a5899c93.json delete mode 100644 core/lib/dal/.sqlx/query-39415f0debcf35d8cd85b04866861c816f583c69a64b7768887ecce434b829fd.json delete mode 100644 core/lib/dal/.sqlx/query-3a6417f3ac8889a8db762d1f1820c1f7b0d68b747e3a75a63d60ccd0982c7fde.json create mode 100644 core/lib/dal/.sqlx/query-3a82d9a45f4a90b8baf82f3e281618217af059a796e4a3cc0f5269709f7ffd49.json create mode 100644 core/lib/dal/.sqlx/query-3b4d5009ec22f54cc7d305aa11d96ec397767a063dc21aa3add974cb9b070361.json rename core/lib/dal/.sqlx/{query-c6902d8bcfb4d04e11229683cd4295d973d60b5a02c628bb0f38dd00f3396b3b.json => query-3ddb13ffbafae2374527886e592b3c0210383d8698f6f84f694fece9fd59f3d5.json} (63%) delete mode 100644 core/lib/dal/.sqlx/query-3ea010bc3e3267e48decf025cb99b3253ea21b3eac3c1df1921e040e3f059aac.json create mode 100644 core/lib/dal/.sqlx/query-3f0966f082e9e7cdfa18c107a1283b7955a058705093d7372726c3fc7ce506ad.json create mode 100644 core/lib/dal/.sqlx/query-3f9543c622a3877dd8612f3fc5f31867b3c0bff34bbacbc31ff4cd786c97ca90.json delete mode 100644 core/lib/dal/.sqlx/query-3fc77acab04760b40d49ffe42e616b8b569a196df3ebf75ee779665ec53d1187.json delete mode 100644 core/lib/dal/.sqlx/query-404dca0439d8c2682848049026d6e4da6574f78094cbbc8eb27b9b273a96aa10.json rename core/lib/dal/.sqlx/{query-abea8d1555215836299a2e640e8440e65af4ac1cbd81ae1bce16e74927ddfa7b.json => query-406e51d7884cdff36632ccf97912484f0a0d76a8097b61ead5f1f20301ce524d.json} (61%) rename core/lib/dal/.sqlx/{query-ff38c42f0dc6fd3b3976a3b36f41c10b9ae1a80fe6b6a9bb50ee4bfe849f398d.json => query-40c17194a2089a7d3fa6b7923c9e03def94f4bf4674def1893e2232be80f57a0.json} (64%) create mode 100644 core/lib/dal/.sqlx/query-414749a3d8d1ac4f2c66b386df47d113257cca7a7fc6c8036b61cc0e005099a8.json create mode 100644 core/lib/dal/.sqlx/query-44ec5b4d2218099da30aa8d654f7445aa3148d8abdd4e5fb50947ce512f53690.json create mode 100644 core/lib/dal/.sqlx/query-45372b701c23ce782695f11f846a75893ee5b1b94b6d0f25f1db5342888a2a30.json rename core/lib/dal/.sqlx/{query-dae7b7ab08a3397a4e587ebe40e79903fb3c9eaed968af5638a6f94bae2e7bb3.json => query-45a968c6d667b13bbe9d895e7734fc05eaa158a6f38a87187d7f2c2068a0112a.json} (81%) delete mode 100644 core/lib/dal/.sqlx/query-466c76cff08259849d87d3596dad590df2d0633fb5e58f600fe5a87012bc998d.json delete mode 100644 core/lib/dal/.sqlx/query-4694e5534f7d2a3b9a49d097ec659d96738d6bccaa175362cc554eddb3b26262.json create mode 100644 core/lib/dal/.sqlx/query-469db79fcf8d692507317080e0d843620210aff3a9a7aa8a249db50c1c56d927.json create mode 100644 core/lib/dal/.sqlx/query-482bee9b383b17bddf819b977a012e49a65da26212e6d676abffb9d137aa3c2e.json delete mode 100644 core/lib/dal/.sqlx/query-4ae097f244938d39a735735f75b3b18a1bd18b922640d3ae70ae0b9bfde8effc.json rename core/lib/dal/.sqlx/{query-0f4a7d7c5e737a1f232a2db675557ae62a53e1fa4834acc82c18e265867b69d9.json => query-4aeb7dcd79000540c03fb12c0608ab71005d70f13ed32172e47166f71b3aef80.json} (55%) delete mode 100644 core/lib/dal/.sqlx/query-4c33e5cc065a4d92ae94e01eeda43895c9a3cf9e0c52bd65c5eace2445c2249f.json delete mode 100644 core/lib/dal/.sqlx/query-4c80d74f23341a08320f50f2e923fb92c099f0b71ecfabd33325cfd107f2fecf.json delete mode 100644 core/lib/dal/.sqlx/query-4ec3bdb8a51f9e9dae77e545c4d182ca8e746122e42f448a7f349a234e6ab594.json delete mode 100644 core/lib/dal/.sqlx/query-50eecd5b068f4ee20bff603853854f72cdbdc00487a42a42b4c15584e601e261.json rename core/lib/dal/.sqlx/{query-90e69db5fce86f7735b550d0f60b0116e8dc7ad2cff1a746a4f3191ceadef0f5.json => query-5137159db7d3ff456e368e6246b07554ce738a2d7005472e7e76a64a8fbd57ad.json} (69%) rename core/lib/dal/.sqlx/{query-2952bedc1c6320a643c42cc6d58fdf547011412e89a1fa8f6bc26ca6a03709bb.json => query-526a8e1c231e99faadd5dbbe9c49ed811faffcc108d04b59fdec5a0ab9d13fa3.json} (75%) create mode 100644 core/lib/dal/.sqlx/query-532a80b0873871896dd318beba5ec427a099492905a1feee512dc43f39d10047.json create mode 100644 core/lib/dal/.sqlx/query-546c729829083b7eba94fea742c162d717ffcf46fdf5d2ce5d32555353b6da6b.json delete mode 100644 core/lib/dal/.sqlx/query-549a74361713f1ad79b03a680815b2356e58f12a7af7539f2b75eb318941db6d.json delete mode 100644 core/lib/dal/.sqlx/query-54c96dc5e0a78551ba713814f944c3262d5cab17e8f76bdc6672459e0091b1d8.json delete mode 100644 core/lib/dal/.sqlx/query-5545ceadc462969a4557b5bc5db373147984aa3931df33a50de2bb2ed4367d51.json create mode 100644 core/lib/dal/.sqlx/query-55b0b4c569c0aaf9741afc85400ecd50a04799ffd36be0e17c56f47fcdbc8f60.json delete mode 100644 core/lib/dal/.sqlx/query-55b90277afa79835a01107536cd16369609c69bf8fed67f6fb96859844ed29b1.json create mode 100644 core/lib/dal/.sqlx/query-55f4585be3d0f1a147cb10f6e59325fad494a512ba92df95439d2d7fe0f3a285.json delete mode 100644 core/lib/dal/.sqlx/query-5a20e458be6c6c90c1e6f9c2cfada959f3f2e5375d8f1687231f13d26a41cc68.json delete mode 100644 core/lib/dal/.sqlx/query-5c65e8b97f2fa2fda703f85d6c56228315e7aeed1c6b6f3989e043d6f4fd5f70.json create mode 100644 core/lib/dal/.sqlx/query-5c99342c4fbf36ccc8e9c9dafc76de37201091bfccd3caf922e766896c5a542b.json create mode 100644 core/lib/dal/.sqlx/query-5d1f588b2b652105b4452be1cc6c7573fe040d47d17d9bd4e2a2b6d3131a4f9c.json rename core/lib/dal/.sqlx/{query-507ba20e231ea2cf8ac15cb5a6bc8f02328de7f12c5e83609a477feddbbdd754.json => query-5d341e334cbc2d38efc8a060325677d57040037da0e07cef2c7b7246851a3703.json} (50%) delete mode 100644 core/lib/dal/.sqlx/query-5d7fd6503caf4bf05d387e7214518890d009081b1c1cec8773e25c6621753372.json delete mode 100644 core/lib/dal/.sqlx/query-5dc4ecdfac01e15e4d2fe7c124c3ee9ed6fd28c338ddadd9958f3bb0901ba454.json create mode 100644 core/lib/dal/.sqlx/query-6292dc157e2b4c64c513b4b8f043ea4423fdaf5d03cb70e8c3a67b6d4a24d29e.json rename core/lib/dal/.sqlx/{query-1dc66c13020087cc74c84bd731134129e2abdfa088c8089ec3765d771d130133.json => query-6621de90a024cc85946f17948e5c171cd0e4d38bd6e9cfec58b2d7f53a3204e1.json} (73%) delete mode 100644 core/lib/dal/.sqlx/query-662a3d53026e983fea3087099b8b9593ba6ff291db9868a1ad6df21440ef311a.json rename core/lib/dal/.sqlx/{query-9cf8419746f9b86749c36d0a0d443ec6c9383b5cac5112569a77caa00747288c.json => query-66b3f476cf4487239190175d2940fd5e1330393d8b04c7cf03b8c7ab2edad5d1.json} (51%) create mode 100644 core/lib/dal/.sqlx/query-67f6a13a4c5bd16f77e449b5f0bc0798441543244f83b691783127979e02dd8c.json create mode 100644 core/lib/dal/.sqlx/query-6849be0788a509e4e68acc2da4bfadbcfc343374fad173df0cc8db38419a9726.json delete mode 100644 core/lib/dal/.sqlx/query-68e5240ab8c75e68c13efad97a628321969b8c5bce89a83b74ee08f9e2dfcf9b.json create mode 100644 core/lib/dal/.sqlx/query-69c885498b186f3b7cbb215112ec86783d7da0ec1d008680872f3619cf217923.json create mode 100644 core/lib/dal/.sqlx/query-6b327df84d2b3b31d02db35fd5d91a8d67abcdb743a619ed0d1b9c16206a3c20.json create mode 100644 core/lib/dal/.sqlx/query-6c0d03b1fbe6f47546bc34c6b2eab01cb2c55bf86d2c8c99abb1b7ca21cf75c0.json create mode 100644 core/lib/dal/.sqlx/query-6c46fb3d51aeb069c09ff0cae3ea82f1af696fcc8f7484eaf255d5311589ee39.json rename core/lib/dal/.sqlx/{query-2520d5065659546dcd50d4be8733af15a5a69d936e0b33000e3035cd1af92bf8.json => query-6e3a3ef443ce8aab55b10eea55f9c8ff11775885aebaf457075c6825305244e5.json} (96%) delete mode 100644 core/lib/dal/.sqlx/query-6f76da3d11930f44dc30884e6e3295a5f5d8ad9a1560d96bed1250c37ec9cb0e.json delete mode 100644 core/lib/dal/.sqlx/query-700be354c97bfdfd9385e0f4e47821df4deb486211260ea86d272fc69a447385.json create mode 100644 core/lib/dal/.sqlx/query-703836a3f065b0aedf71ad0474cac5e5fccb3ec55aa1227f5f1ea5a11f9b36a9.json rename core/lib/dal/.sqlx/{query-d2b3332be1c559226a1782031cd289bd8a6a70e23feb489cebb14ba906865898.json => query-718d29517c100ad9d258a7ee90c48449c1c4bed4d0236fcedc177c9478e72262.json} (81%) delete mode 100644 core/lib/dal/.sqlx/query-73a08b7a9eeadfabe4bcafaf03d4c4a82d399ca1c4c6da36d2ab98a7537de7aa.json create mode 100644 core/lib/dal/.sqlx/query-7560ba61643a8ec8eeefbe6034226313c255ce356a9a4e25c098484d3129c914.json create mode 100644 core/lib/dal/.sqlx/query-77a43830ca31eac85a3c03d87696bf94a013e49bf50ce23f4de4968781df0796.json delete mode 100644 core/lib/dal/.sqlx/query-788efaf2682ec81871738a943675217a1838cc7ea29b1f8fa394b62573884512.json delete mode 100644 core/lib/dal/.sqlx/query-78de0a295e3a2a5412810b1cfa1f1bffbb123e71e0334c17a3f334789f420ad3.json create mode 100644 core/lib/dal/.sqlx/query-7af52a220958d790bd8b5b06a6e29bf769829991c7d732b13f96bcd1293263ea.json delete mode 100644 core/lib/dal/.sqlx/query-7dfd5e11546dc2b5ae02428e99e664b1106316347f0fc557afe7112d6fca7e3b.json delete mode 100644 core/lib/dal/.sqlx/query-811143c3607b1a06d1c88084c43d4c2f5800c37ac0715f6ae351cafb8afbb76a.json delete mode 100644 core/lib/dal/.sqlx/query-83cb057f275c71da641d9b727abcf7f4d16593b0ed0b496c903d967efe5bb6a6.json delete mode 100644 core/lib/dal/.sqlx/query-892c0f4aaedfb447eee63fecbcb31f9138b204f4bcd15f934e5b209f3dac0639.json delete mode 100644 core/lib/dal/.sqlx/query-8b103e7c6e2e0955b5bc283ceef3a203f640cb2279f3b75108c49b2527b19c8b.json rename core/lib/dal/.sqlx/{query-9583c10504ec214bc15eac407a7e6de657d21422fd1d46b1fc0d3e829393146c.json => query-8b9e5d525c026de97c0a732b1adc8dc4bd57e32dfefe1017acba9a15fc14b895.json} (77%) create mode 100644 core/lib/dal/.sqlx/query-8cc3cf441b12a8b6a2f25f4fe5581e33845ec68e386ef032715ad1222e2fdc8b.json delete mode 100644 core/lib/dal/.sqlx/query-8e2b160a4d0de1573ecd486c91b8abd8d4e534e5c17e4ffbcf5c97ff920b12d6.json create mode 100644 core/lib/dal/.sqlx/query-8f662682747a24fbe122533f421466f8a4efab1a52acc26f3a6c6b219a46390b.json delete mode 100644 core/lib/dal/.sqlx/query-901b5259b9bfcb8469175a0a4ba9c7459db54dae9a2ea2db8595af4cb70c8aa9.json create mode 100644 core/lib/dal/.sqlx/query-95ea0522a3eff6c0d2d0b1c58fd2767e112b95f4d103c27acd6f7ede108bd300.json delete mode 100644 core/lib/dal/.sqlx/query-9a261b451c31d010b1b2bc0af25d2bd038257f7cf2ab51405dc05ccba3e33312.json delete mode 100644 core/lib/dal/.sqlx/query-9cebabf4e4643a41452266a9d7c4e8901b631ff170733621ce3ece216d71205b.json create mode 100644 core/lib/dal/.sqlx/query-9cfcde703a48b110791d2ae1103c9317c01d6e35db3b07d0a31f436e7e3c7c40.json create mode 100644 core/lib/dal/.sqlx/query-9de5acb3de1b96ff8eb62a6324e8e221a8ef9014458cc7f1dbc60c056a0768a0.json rename core/lib/dal/.sqlx/{query-7b41633745312d0580634c3017e5fe6910fce4cf57c0959dc4dad4d93129ec1b.json => query-9f29aa31d4698031e9f3fe2eb273724dcce382936af0d4c386143399995cd325.json} (56%) delete mode 100644 core/lib/dal/.sqlx/query-a0fc795697398f22b45601f51a6d1910919b8b46e895ddaa4ba5bf411585dc6e.json delete mode 100644 core/lib/dal/.sqlx/query-a12b2f1fdd28f68a429f307d66259a410844c0e3cb5e190d1b8442da802825ad.json delete mode 100644 core/lib/dal/.sqlx/query-a22e5f63ee08ee38efcba440364c08e57f95c6ee5a69f02f15eb1e886df4c882.json create mode 100644 core/lib/dal/.sqlx/query-a23d63b7c4264ee0f5b60c09f09f8fbd8fdaf23266412e2faffb7e3813213b98.json delete mode 100644 core/lib/dal/.sqlx/query-a343c1ea8ad33350b21a820ba981719519938eccbea4a598d842bd75b9553880.json delete mode 100644 core/lib/dal/.sqlx/query-a3b4d8e4487dbc898277645524b8ad91e8653d01981640d2d068c9564393f7b9.json create mode 100644 core/lib/dal/.sqlx/query-a4fcd075b68467bb119e49e6b20a69138206dfeb41f3daff4a3eef1de0bed4e4.json create mode 100644 core/lib/dal/.sqlx/query-a51b8f1eeb6ef6800619e7a5a91d10c23ab2924f6a3f0594f6990af8ea9146a6.json rename core/lib/dal/.sqlx/{query-340c154ee5969dbcdf87b1f268236a186c539fe34c9893c51018687ae0ca01b5.json => query-a71a87d91dcf0f624dbd64eb8828f65ff83204ebab2ea31847ae305a098823b0.json} (70%) create mode 100644 core/lib/dal/.sqlx/query-a74d029f58801ec05d8d14a3b065d93e391600ab9da2e5fd4e8b139ab3d77583.json rename core/lib/dal/.sqlx/{query-bb728bbbf89d3996b7412043ead62a7c60e89631bfe95611f156dac532218ca5.json => query-a8d55f14de2f489fdc12c8da540e0d51f86d30d5ad92496e4aa087a3c4aae09f.json} (53%) create mode 100644 core/lib/dal/.sqlx/query-a8dad09a54cc991706141da557dde45f8f3f3b6cf2e4136f25a1c3ab85d92668.json create mode 100644 core/lib/dal/.sqlx/query-aab0254e6bf2c109d97e84053cb08f1ce816a56308fb9fe581b8683f76cbbbc3.json create mode 100644 core/lib/dal/.sqlx/query-ab68f07dc6f3ec66200df109527877866bbdd1f8c359d97538125756fd05a2ab.json rename core/lib/dal/.sqlx/{query-a57b02104ce2fe58a6c8f7e946bcb94486499a3d5b380948cb94e4b5066fea9a.json => query-acfd5a60fda5782bddb8cba033a5d3a0eed793f7b64ad3ed035f20e896371721.json} (92%) rename core/lib/dal/.sqlx/{query-37294ec4a7b7ac48ccaecaaf96166fc91f2969fd0f108d72debe703e95855298.json => query-ada54322a28012b1b761f3631c4cd6ca26aa2fa565fcf208b6985f461c1868f2.json} (50%) create mode 100644 core/lib/dal/.sqlx/query-ae204503b0a682a9edc4d7bd7430457113e073b392c569c077d719941d1e37aa.json create mode 100644 core/lib/dal/.sqlx/query-aeda34b1beadca72e3e600ea9ae63f436a4f16dbeb784d0d28be392ad96b1c49.json create mode 100644 core/lib/dal/.sqlx/query-b313ab2b1e0a83136a202ea758c6d2b2e3f2497e6b5f26c72e220397cc0e62f7.json rename core/lib/dal/.sqlx/{query-683973e92438d8a16dd0a4fe46e884aaa174ea8a577dcc97e84680f4fd650c37.json => query-b42fc86726ac40d0ca38640884da192a143f6a7501b7da65bb7df40a0a4ead70.json} (62%) create mode 100644 core/lib/dal/.sqlx/query-b452354c888bfc19b5f4012582061b86b1abd915739533f9982fea9d8e21b9e9.json create mode 100644 core/lib/dal/.sqlx/query-b47a2961dc2f1347864682c572dd1f5e03924dbf6dd1e824d4aca837e604b7e9.json create mode 100644 core/lib/dal/.sqlx/query-b4a0444897b60c7061363a48b2b5386a2fd53492f3df05545edbfb0ec0f059d2.json delete mode 100644 core/lib/dal/.sqlx/query-b5cd80d579d87c610b16640166371a5609ca74432dcec3c169279bbbfce9fdae.json rename core/lib/dal/.sqlx/{query-970fc9fe2ada8f862b8fe4dfd7cde5783f3df8ad73ef92b62bafc1a8b5e1046a.json => query-b61b2545ff82bc3e2a198b21546735c1dcccdd6c439827fc4c3ba57e8767076e.json} (57%) delete mode 100644 core/lib/dal/.sqlx/query-b6ce3e762f37ab0d5b052f080715637fcf7f6c27d1238b17bc0f9bc50a0ffa7a.json delete mode 100644 core/lib/dal/.sqlx/query-b73e874da2c1aa9de4fe700166458e579752dea7632e9422c2921a5d7e4d62ba.json create mode 100644 core/lib/dal/.sqlx/query-b95b63f22afee3b186da4284a0a1cc9d3523a392fd2011491c6017400f313a16.json create mode 100644 core/lib/dal/.sqlx/query-ba2343a38e37d104786f9276d91f67d2ef1428c61ae84003c9b52b03204d1f0a.json create mode 100644 core/lib/dal/.sqlx/query-bd51c9d93b103292f5acbdb266ba4b4e2af48907fa9321064ddb24ac02ab17cd.json delete mode 100644 core/lib/dal/.sqlx/query-bd8a4057d6b0ece3298becbe143facec8c88629c4993f6c86a30193c7916fff6.json delete mode 100644 core/lib/dal/.sqlx/query-bdd26a468254acd2ed54f17f37b4fdfd4e8aed4c63898af5b3c3d5ad2c6bec6c.json delete mode 100644 core/lib/dal/.sqlx/query-bdf8b49f917e67009bb5f1d951575072106e943b76c17ef42a1138e291da86c6.json rename core/lib/dal/.sqlx/{query-c26690ee0bd897d83941300072c787f7a2aeb77058e409a57f8e62b8dd0b27ac.json => query-bf481c2b498420f80765b837059cab02b0656d863dbfce4b5dad7bc72e52b05d.json} (63%) rename core/lib/dal/.sqlx/{query-3d19e75e0e224679c3f30e67a2a53ff4b3462b42ca731963eca0e46997527ae3.json => query-bfc84bcf0985446b337467dd1da709dbee508ad6d1cae43e477cf1bef8cb4aa9.json} (75%) create mode 100644 core/lib/dal/.sqlx/query-c139df45a977290d1c2c7987fb9c1d66aeaeb6e2d36fddcf96775f01716a8a74.json create mode 100644 core/lib/dal/.sqlx/query-c14837e92dbb02f2fde7109f524432d865852afe0c60e11a2c1800d30599aa61.json create mode 100644 core/lib/dal/.sqlx/query-c29909fda6f1e4116a9a28407805a9a38a8d8ff1fba9a834d37927793f532b7d.json delete mode 100644 core/lib/dal/.sqlx/query-c2eac2a7c10ee56245b688b88d077fde74782e8849e84a2b699fe855946f8905.json delete mode 100644 core/lib/dal/.sqlx/query-c37e5e7ee96c2136fbe9e0e56602cb9aa7c0305378d758dfe9bce80912e59255.json create mode 100644 core/lib/dal/.sqlx/query-c3af06cc232adb93f16456da07733acd2066a5e238088b39b982b10770f51479.json create mode 100644 core/lib/dal/.sqlx/query-c5aef75dbeb520c965a0996abed9713f437db492e2075ca69e11e2ef5728ccaa.json rename core/lib/dal/.sqlx/{query-8f614b620326386fce83afd162a5d02dea5720c940818242b7476cd57ffc9af8.json => query-c61682ed92c1a43855a991598d593639a63047f46dc8e605ff37b78f43f5cef5.json} (57%) create mode 100644 core/lib/dal/.sqlx/query-c6d523c6ae857022318350a2f210d7eaeeb4549ed59b58f8d984be2a22a80355.json delete mode 100644 core/lib/dal/.sqlx/query-c767e485ef5a341faefe2c6c39a5668359e4b623876422cf6915d4888cdca31a.json create mode 100644 core/lib/dal/.sqlx/query-c81438eae5e2482c57c54941780864174f39e6011fdfdc56490397ce90233055.json delete mode 100644 core/lib/dal/.sqlx/query-c89076470d35115de7f5c68a5113f2f9edd3fb4e73b44d9fa2c2bb927acb99f0.json delete mode 100644 core/lib/dal/.sqlx/query-c89cd551c59b54dd628c7e2339bc623866c3fd2e862c38c2af172c7c39620a49.json delete mode 100644 core/lib/dal/.sqlx/query-c8d9aa5d11de37a35f421c0ff61825c64f43a819b9c787228b23814542f563d9.json delete mode 100644 core/lib/dal/.sqlx/query-c95612615946c403890e8a942e174a5ade5c1a472c4e5c9f5e9050e4136273b6.json create mode 100644 core/lib/dal/.sqlx/query-c98f19505792a4085bb5ddddb6d0e202da24ac3ca205154417e98ccfa7437379.json delete mode 100644 core/lib/dal/.sqlx/query-cd882b7e8a8d76ed1438097b246d455f4043c60538687dec050c5b578d505ef8.json create mode 100644 core/lib/dal/.sqlx/query-ce0b54e6f5a805144ace2f0f9fba6b3e9bca996fa633005bc8eeb77341c8c893.json rename core/lib/dal/.sqlx/{query-044bbd6c7926890b642c906167307c7497d418325ac0f24468fb3d9bcc99f9c1.json => query-cea9fe027a6a0ada827f23b48ac32432295b2f7ee40bf13522a6edbd236f1970.json} (85%) delete mode 100644 core/lib/dal/.sqlx/query-ced682e16c616d26674c104caffbeea37512f1c5855579bdbb4cd8ba6d9977c3.json delete mode 100644 core/lib/dal/.sqlx/query-cf5e1c6912b432eeb9b9779bfc3700f9ae2a6e5a917b1a21f290d313d9d88dba.json create mode 100644 core/lib/dal/.sqlx/query-cf8cff1e6d277088519ef7dfbdb1885d320c146cd8fad77c107ef12fa38e6c98.json create mode 100644 core/lib/dal/.sqlx/query-d3abe74360732659a1a35a176679411ba30ac67080552279d821d66b1b804db3.json create mode 100644 core/lib/dal/.sqlx/query-d3b09cbcddf6238b358d32d57678242aad3e9a47400f6d6837a35f4c54a216b9.json create mode 100644 core/lib/dal/.sqlx/query-d3e4ee6677ce9de438abf7529aaf64c789d3a8a1d6c96c58213c23a055cde751.json delete mode 100644 core/lib/dal/.sqlx/query-d4da5af7b848e3354b66bbc7ed5e5da19947002e66110573e6fad9105f07413a.json delete mode 100644 core/lib/dal/.sqlx/query-d7e5ff78b2bc2e12fa5b17e6b555cadeff54160c1cc0b6b4fddecf090ebb30f1.json delete mode 100644 core/lib/dal/.sqlx/query-d8a41829e3836ea05802ac7257f5dbc6f5ed92bc3d47b4dd91116dd6ec354d50.json delete mode 100644 core/lib/dal/.sqlx/query-d92d99b940e439fa8942e1e8a4a98c18f29d3bebb42b0ae3fe7757eeea9ee175.json delete mode 100644 core/lib/dal/.sqlx/query-da08c899a7c5243cfcda7fbbcd34675993ca0c7b2fb1d2be386101b78a995110.json create mode 100644 core/lib/dal/.sqlx/query-daa330d43f150824f2195cdbfb96862d6ad0de7c7ca1d5320800f317428f07e1.json create mode 100644 core/lib/dal/.sqlx/query-dac29d7eb16782713acb7aa68aaa8b12b67678e983dc2570be28fe9b1e016c28.json delete mode 100644 core/lib/dal/.sqlx/query-dd0803aa12873b541ee88f3609d0b04a045f37cb9217ed0b17a78f9949f3d7ed.json delete mode 100644 core/lib/dal/.sqlx/query-df8bfa2f1691f1c1aa683fa2821c1b0b2dd97b590d546c3c03dc1a97144a57ec.json rename core/lib/dal/.sqlx/{query-3f83c528378dda7b8ddc6ceeedca1ef4ad58ff942f3dad4fb87e5a105fbfcd13.json => query-e1e8ab0cb11c6081d3525228eacbad74e1bab808c744fa14bf24332b39120767.json} (50%) delete mode 100644 core/lib/dal/.sqlx/query-e210f3652790e82cc1f69a017dea683c2092560f59c8a6703d4ccc1715872ba9.json create mode 100644 core/lib/dal/.sqlx/query-e3f4af790fca9149f4edff070170294ec464d184ad732692faa61d2ef99c84e9.json create mode 100644 core/lib/dal/.sqlx/query-e673789d5b4a7aae11feccb085bf3f9dd37b771cf76261762ae18fd14cf0efc5.json create mode 100644 core/lib/dal/.sqlx/query-e7d0b7c132b80195dae7cbf50355eb148aa6d1dbd69bf3fe48522101a6ea0bcb.json delete mode 100644 core/lib/dal/.sqlx/query-e7f05f081e989f104d0352b0ad0668929ceaaa66536248f4a0fc062e50d0d80c.json create mode 100644 core/lib/dal/.sqlx/query-ea682d41219feda3514336f4c1ae6ecbe96475e83dfed603bd305e72460f52c2.json create mode 100644 core/lib/dal/.sqlx/query-ea904aa930d602d33b6fbc1bf1178a8a0ec739f4ddec8ffeb3a87253aeb18d30.json rename core/lib/dal/.sqlx/{query-ca497322d6d5d80e8958a01f74fb8b424b2152a99a3cdff452218b6bb7f12840.json => query-eab36591af61369e36e3dab79025ac6758a0a4e367f93a9bd48ec82c51e09755.json} (71%) create mode 100644 core/lib/dal/.sqlx/query-ead71ae66fe4685132c03a973612fe98364aa684180dd6fbf540bb0b68d96a64.json delete mode 100644 core/lib/dal/.sqlx/query-ebe7e4fba7a9d63e2824ff890d9ad0e0d6d235b05441fc306dbf70d27f1b728c.json delete mode 100644 core/lib/dal/.sqlx/query-ed39fb08c3ae2927c940d129ffd89268465b346af5da1a58cac850b687e5eb34.json delete mode 100644 core/lib/dal/.sqlx/query-ededd1048db5b1696c42f8f7073ab318006e8b52570a72a89682435a92ca75f8.json create mode 100644 core/lib/dal/.sqlx/query-f012d0922265269746396dac8f25ff66f2c3b2b83d45360818a8782e56aa3d66.json create mode 100644 core/lib/dal/.sqlx/query-f2f852a340c45ff69cbca42d7c592dfb0d28a797bee69872634f3105d2d51996.json rename core/lib/dal/.sqlx/{query-587a6fa944e122d4a045192f4f84ec30c53893af990a3158a7006904c7073b14.json => query-f3a049c7eb0d8903737f02fa154b50ebc862a133734382bad8fdfa3a93d8b743.json} (91%) create mode 100644 core/lib/dal/.sqlx/query-f3c651a3ecd2aefabef802f32c18779128de288484abea33d338c3304dd66e08.json delete mode 100644 core/lib/dal/.sqlx/query-f4761be1ff382f2d9bbafc971bf6109696737ae42ee1ee38e99ac07564816b5a.json rename core/lib/dal/.sqlx/{query-02494e0846398040749aa89c7051a23ccc0a18b0a4c8ee281f5f0ad131d25b33.json => query-f4e7e2dd109aab2714845b028eba780c75468aa36615bcfcf7f7d8ace23cd1aa.json} (82%) delete mode 100644 core/lib/dal/.sqlx/query-f6e3b19a18b5ee75805418563b9fd7144b05f75aa304bf217cf14b9625a09e64.json delete mode 100644 core/lib/dal/.sqlx/query-fd4f2f6dbd0e2ab56faa91ff3ebbd48e2dc3cce5f3f40cea31eb3b27c6bff1c1.json delete mode 100644 core/lib/dal/.sqlx/query-fdbf99a779c7c894bd5ab6ac142f01c2abe41c456d85787038ad0b3cc21b59f8.json create mode 100644 core/lib/dal/.sqlx/query-fdffa5841554286a924b217b5885d9ec9b3f628c3a4cf5e10580ea6e5e3a2429.json create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-00b88ec7fcf40bb18e0018b7c76f6e1df560ab1e8935564355236e90b6147d2f.json delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-08a97610cfe85ab84df2f2ca3ab7619d79075a2177b8f9b464565474b43afc21.json rename prover/crates/lib/prover_dal/.sqlx/{query-4e851913270d32a72ebf654b8b7ba420c278e5771858d9de8d08a23e1fda97f5.json => query-0a1ec4690d6b4a67d6ad16badcbf113a19feb73c4cf9876855523499998b99c0.json} (56%) delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-0b3dcc054233e1269e067741394c252e5c82673e1595829b4b9f897b7df61e6a.json create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-0b70c98c2edd8370ad09ac553c18dbc21cccb9a95e3db1c93da239845a5e9036.json delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-0c047f4e856486d039a21a5622652e0e45816db6ebc2c16a09350b99d87d5f27.json delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-0cc53f605989b99ad612d9a5353636ca3032cd5dcc5d3d1d4d5d0a16c38c20ef.json delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-0f42168a211b64df8f78031341e473766ab4f51dd399c879b4f7c3bc157ab77e.json create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-102b79726652d9150c802350bdca80c233a9fd3e892b5a867a5517c2e04497a8.json create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-1297f0977132185d6bd4501f490f1cdac8b194f09926c133985479c533a651f2.json create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-1849cfa3167eed2809e7724a63198f5e2450cc4faee2f80b37fbd5626324dbeb.json delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-1902180f79ffb2f9903e16752d0a4dab579b76ea65ea022505a3f57fc0a4a946.json delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-1dc6a926ada3f13ab6c2a6f3cc16054d3fb4f4a5c014ef24f5cb0ac4cd3465eb.json rename prover/crates/lib/prover_dal/.sqlx/{query-f907bd746d0d085e4612c01b7a90d5c40935ed7b37013c9c608bfdcffd9611d8.json => query-2095e5646c382ccbc6e3bafdeddaae31358088e142dff51c9f0bde8f386900d3.json} (65%) create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-216d0c263539739b53975a96a10332b826708800a2f72f09bd7aea08cf724e1a.json delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-23fab2481b7e7a30d4f8299e267431e3e266c84e1ef03cf4015202dbb9f54174.json delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-25f599ed134f5866dace386fc34d1b98aa902e56d35f55c0d7e2a983ce1bdd80.json delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-2764de4edfb998bb498127b072574aac9fa17a424d1f5c673e78a2a023bc2205.json create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-28397b5a0b7af832d2a4d3d7011a68a48db6a64afcd41bbe0e17d98fa38fdb19.json rename prover/crates/lib/prover_dal/.sqlx/{query-459705905af1c2928704ffb5dbc07d91e2cbbcb7ce02bfa14913d76cb946a57e.json => query-28f03acf565c4b50fe86f606c18a8b699386b3c5b4e02d5ce046f0f2e0ddc388.json} (59%) rename prover/crates/lib/prover_dal/.sqlx/{query-9cf70c7776934252d45cb23eec5c023375273c2211dab39e1f28d51724b7d8ad.json => query-29ff260b02f7b955f9fe0b657b87def3a97275b66ad33d214054dc9048ddf584.json} (75%) rename prover/crates/lib/prover_dal/.sqlx/{query-f49e345ad92e35acd40bcd097f77861eea20a381f6451ca82b4f1319364f77a9.json => query-2b12c5d469e6220cc8ddc997c666e4aa4f797bcc6e05ec2f2e435a7e940d8cf9.json} (50%) create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-2d1461e068e43fd16714610b383cf8c93630d529ec96e67aac078f18196f61a5.json rename prover/crates/lib/prover_dal/.sqlx/{query-4e8ddaf3e4411bfcef4f353b4b310fc6b60b9a522b1a3134752c2ccca06f08cd.json => query-2dc6b7bf08cced8791354fc47e319d03f894f40d2ec528382b5643c3d51ec8e7.json} (53%) delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-2df5a59eb22ae25dcfc3364e736dc761977ca7fe9a822d8318caffcf8882d4b1.json create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-2df88abaae97b6f916b104375bd7249ec09c0daf4368021788207370213a6d94.json create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-2e6e2b68efc28114f44616b68fcf1d4d9a4b83a8b42846d8373ea13b96d612cf.json rename prover/crates/lib/prover_dal/.sqlx/{query-bc0b9c8d1bc2e1c782bd1fb8df16682c19f3f44dd424c81e0f8e94c59f4a8780.json => query-35a76415cb746d03da31481edc65adefab0bf3abf6853a6d36123c8adcaf813b.json} (55%) delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-36ab4be452fab7229a4b1c03675ec0b54094da72d2d9de5e3948001164bf739c.json rename prover/crates/lib/prover_dal/.sqlx/{query-e09cff7ded7376ab0cec94e05e24f3fe0a8d05c55536b230594c1e1f17e0d9d8.json => query-3727d5614d2fe2a4d96f880eb72cd48c95ca5b4520dde415a2b5ff32ece47c86.json} (55%) rename prover/crates/lib/prover_dal/.sqlx/{query-2b9d06b673ac6bbc908227eff0ff19ec63114a652fdebce5a872a8eb694626fe.json => query-37ad15f54f4a6f4f79c71a857f3a8d4cc59246dda91b19526e73f27a17c8e3da.json} (55%) create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-3941da180ee62a7c5d4e392ff4fe2d3a6ebb3657862b91e3ece34119f098fc2d.json delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-3df3c567f7f875cde9ea8c723b1fe6ee0c0c54e68daabbe2eab5c7ce9b1cd4bc.json create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-3e0a1ebc684810c09ff83784bdd0ad195b0dd2a8ce56b1a9eb531103130b5e3e.json create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-3ec365c5c81f4678a905ae5bbd48b87ead36f593488437c6f67da629ca81e4fa.json delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-3fc24886802a354174796071f46aa0a0ad5fba0f6dbc4d8f36c79171a8be8f42.json delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-40e3b4646af1abe9c7b56206d73091e0d7c5ada67cb757b874a5c62e32184666.json create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-412ef600a2f6025d8c22c2df8a497ed410fa47b268a66f1fc56d469c06ae50af.json create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-41af30620f8a1f20b8a6c46be162601d35fd2881ac1fd070f0f1a8add4bc388d.json create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-46c4696fff5a4b8cc5cb46b05645da82065836fe17687ffad04126a6a8b2b27c.json delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-4836d3766c6d31566a66ffb2b81874ec8fc1800b848951cf264b3f309701c52f.json delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-4931bdce191a7d30d2887bb069b0ee050f09ae3886243c9af0677ad20e115a01.json delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-51ec4739f25b233efe6c2d67620b25b709ba99059f4a2f5e1bc5fd17f27c1244.json create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-534822a226068cde83ad8c30b569a8f447824a5ab466bb6eea1710e8aeaa2c56.json delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-57ac943c57d905575f5dcc9d94031c32226a54cd980aa99a38289452fbb100d4.json delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-5a782ff686ca6b194013af509c1c0094aba5c7966739d2d56ac74ed28ceb715f.json delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-5fe7345162c22fab6b2bb13e29d701950441fcbf9784a6634ce020262e170951.json delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-6a77f68e7c3fa1d3bbf2fd6195e1810d85803da953bd7d5c46b34619e05374ed.json delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-6de8db565e0604ca30cdf78d3d792dd0bec10a53fa6d9052f9aeeeed8080d304.json create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-73266a8526c6adc315900e2e95441976a264759c4060c1a38e466ee2052fc17d.json rename prover/crates/lib/prover_dal/.sqlx/{query-c5ddcf14f794c0b329efc7802c201f40b839fecf8c4388ec0c0089b1548fef08.json => query-764693ceeb45f8478a20242b592d419667f11d80036cda021ecbf23b0b5f7f42.json} (54%) delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-786246e83babf9c07589f6dc61ead2ccc0aeaaecbb8989eb738a01ea253a237b.json create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-7a2145e2234a7896031bbc1ce82715e903f3b399886c2c73e838bd924fed6776.json delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-7bae6a889d785dc526970cf022fba7f33558aa20961f475823e0216873a9e8a4.json create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-7d20c0bf35625185c1f6c675aa8fcddbb47c5e9965443f118f8edd7d562734a2.json rename prover/crates/lib/prover_dal/.sqlx/{query-0d434d0e100bbcfaf56fdb598f9d1c5fa2958f06898a8c67079a7ccf0c340df2.json => query-7effbacbdcc4bd762386351755f4f32042dfead8a37401558f5fd3b03480f2dd.json} (64%) create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-8357972a21b39644e4cbe4bedc3b6d9065bf4494daf8f7632ab2bfe055773f7b.json create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-8720d411e0c9640afd61e927a89c0b6c018e6a4d279acd24a4ea7d81b5cc5123.json create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-87a73aa95a85efeb065428f9e56e085ea80cf93c2fd66fd3949aab428bbdc560.json create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-89a25708d0b0a15e1e56ee8fd69f5a15d2fc5ad3e5ce738a2f6ee3eecfc96736.json delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-8bbe4a8fd46bee5ead5324029c9b7b5831361599874fc223dd389fcc3f9efee7.json create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-8bcad2be3dd29e36ea731417b68023678f31a1b7f5ee33b643dd551c40e88329.json rename prover/crates/lib/prover_dal/.sqlx/{query-e8db5d17dd2218bb34777ecf406fa78c1118063b2a1cda34bb49e9365219c32d.json => query-929419ad8dcc70e8ce986f17075cd21d4645563f93afd4428734196c2b212276.json} (74%) create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-93b9706aa8eb840d574d7c156cc866e8f67a380302762c272bfb27307682d62e.json delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-96c76bcbd40328c21c9d2795e48e2a39dd892793175e3d943487875367d220e6.json create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-9730c8225ff2cf3111185e81f602a4a98ec63eb942c73ce4448d0957346047cd.json delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-97c0634523806fa77776dc5dc296d119cc0df302fa2288d37741138cb4592156.json create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-9895b2ded08be3e81a5357decf76b4d3d6a762761e45af2a73fe96da804e627e.json create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-9b713312b539b4eefa58346f0070767a2cd4488e670674cd9149f7a332c0198d.json delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-a089a2359b1ed513d20f02f395f10648e2870c18716c6cf30dbf3a704c137776.json delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-a2d3dd0dc61bcaeff337498d1803ced4deef9ea2f9699e8e173d5d2343f26cc3.json rename prover/crates/lib/prover_dal/.sqlx/{query-2677e0e54b2e3e9c14723aca65faf1f5f1afadd54e1751ec59da39ac18811b3d.json => query-a817f0fec85388b3e2510ce259208a01b63ae4aa03c983c3a52c802d585e5a80.json} (52%) delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-ab0c9b013d044a5f75b9f396ac1426777a8a76f02f528348bfe81f19ba5ebaa3.json create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-abc93d27a8673b23e18d050e84c43c868c63c853edb5c4f41e48a3cc6378eca9.json create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-b25c66b9705b3f2fb8a3492f1bd20222e177262292241bd8cb89dbb9c1e74c2d.json delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-b41dc55dcb9789e8c2907f53e11bd791fce9a86b6cadb2c8a2b2834bbe71fbd4.json delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-b4687c54ac45145bc6a27162949fa244d5b3c2ae22b4850c9a536e4d54ce38d3.json create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-b4794e6a0c2366d5d95ab373c310103263af3ff5cb6c9dc5df59d3cd2a5e56b4.json create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-b568f9cb9c2bd53b5dcde15f368a9dc31c7d51476f18cffa80cad653298ad252.json delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-b6835c57f5468a65731b7ddbd25cb86bd28dbda3ee3444f300da9f7d25930cae.json delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-b6db24ad38dcc89646fdf50b51c61698aeed3f3de0994908fd7a655ff465f250.json delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-ba29cedd1fd713745a016c391f3ad70e48d1171fbdc1c929e1d004e73805d4e9.json delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-bbced31c8d9ec17dd994c7de71b9e36eb532235d016c31ae8d86455506dd7a80.json delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-bc9ddab523f9a35809cfded7b18a13c70062609adca4c60274ba19cde990727c.json create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-bcc5d3d35652f49b41d4ee673b171570fc88c17822bebd5b92e3b2f726d9af3a.json delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-bfbc5a8bc212991873fbf722b6f3c0c5544cb14cc06baa46cd7ecc329bba7b49.json delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-c0effa8e455c1a09c205994e58569f22d450a0fb0f10eb391b058f650d99ef71.json create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-c340c043c938bf5f4b63d57a1654775c6f7414c7bed75d33b61de00fdbabc349.json create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-c706a49ff54f6b424e24d061fe7ac429aac3c030f7e226a1264243d8cdae038d.json create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-c8daa62b3835c15fafb3f83deabb5a4672ad50a9de92c84d939ac4c69842e355.json delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-ca219864909a8b41ea5d4438235d24b3f001a2d4ea0da817e69f3816d43ce73b.json rename prover/crates/lib/prover_dal/.sqlx/{query-7e19bfe8f29b4c5921c7f3b24fdafb2d59c01a15172b2accc0cddc4e8326a792.json => query-caff620ae66d7fbe3caff7505173b6da86d1e693be03936730c340121167341f.json} (57%) rename prover/crates/lib/prover_dal/.sqlx/{query-8abfb4b84de35e8e336d59389ca978649e228eecbbbf959a1e3b87c08faa60de.json => query-ce5779092feb8a3d3e2c5e395783e67f08f2ead5f55bfb6594e50346bf9cf2ef.json} (64%) create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-d0be28042b50199075cb0eca26f6b93bfd5d96fdc68732fe38c79ccd44b84def.json delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-d21a3d43542ffbd22d6b55c5787b86ce94a1379a01ec3ebb41aa9a210d589d08.json rename prover/crates/lib/prover_dal/.sqlx/{query-5207488b5e71395b700fb0f0ba8117729a81f999c81701c148a4d85f413f6e30.json => query-d272c91f1209c277189a31c59ee191a43dc8eafc33ee067bd41e20f25f7625f0.json} (63%) rename prover/crates/lib/prover_dal/.sqlx/{query-7ae81e77402f0ce3d1fabc9884cd2723def558800cb1d56840886199c584294c.json => query-d5bb897092bce2788fe02f31c9de6dde4142e09330557cc627fee2db278ace50.json} (50%) create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-db3e74f0e83ffbf84a6d61e560f2060fbea775dc185f639139fbfd23e4d5f3c6.json delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-dcd3fdf29bb629a4398df652b016b80c122699e003028b14a0530e2fba5f5b23.json delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-deb56a8ff986f469a19db676be79ad7df6c6b0e29981439d94dc081d4fad3cba.json delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-e068fc601d0e579f1ada02665aa4e83cc39c941282257e0c9a488bcb52f63dd2.json delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-e2e7991f27b4d58911cb7c6daa568f529dce53a9e2b37adf73c88e3dd64d461a.json create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-e438a4f0c705fcb39e017912ce8e1bb675a86ae14a863fa31eb513af65d606ed.json create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-e495b78add1c942d89d806e228093a4eb2ee0284aa89bca1ba958f470a2d6254.json create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-e743af4c18ec91eb46db5a19556fba74ec2cfc3c89c7e4e2ea475c3ce4092849.json create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-e8066db420e075306235f728d57567878f347bdaf36294e9b24ee9c0aa1e861b.json rename prover/crates/lib/prover_dal/.sqlx/{query-6ff1dea12f696274a62338cb8b5928e90167f2051e1c9b3a4d63e11f3273cc7a.json => query-e875dcbbdaed6998dbea45d4eab5d005d8760c4809b7aef902155196873da66e.json} (65%) create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-eb2a85cb60c680a71203769db7baf89bbd72934e1405e320e746158e6d395d96.json rename prover/crates/lib/prover_dal/.sqlx/{query-a03c230ca6542578f5b8bc8c9de90aa5270bbe4e14e7608eb7f86f25b3337dfc.json => query-ec04b89218111a5dc8d5ade506ac3465e2211ef3013386feb12d4cc04e0eade9.json} (57%) create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-edc61e1285bf6d3837acc67af4f15aaade450980719933089824eb8c494d64a4.json rename prover/crates/lib/prover_dal/.sqlx/{query-5cf5d667206438d3fcf478a6c79940d96210c6e7f1dc2f249741e45385e30e61.json => query-eec29cbff034818f4fb5ec1e6ad38e1010d7389457b3c97e9b238a3a0291a54e.json} (70%) rename prover/crates/lib/prover_dal/.sqlx/{query-6476cda32a4c54a5f68a73f9b02b7af8475cef49d0dc34c3d6ac79e1032f2a94.json => query-eef1b56e87eff63fcf6ffb98791583a7526ae38ceb4bf80543cfd3fb60492fb9.json} (57%) rename prover/crates/lib/prover_dal/.sqlx/{query-863d1a8ddd28472dae2835032f8244a1e3248c7c0ce034ff41ba2070200195ad.json => query-f99c34313e2717ec74b4f274e33dae905acac53b46eeaeb059d23e48a71df3b4.json} (51%) create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-fcddeb96dcd1611dedb2091c1be304e8a35fd65bf37e976b7106f57c57e70b9b.json diff --git a/core/lib/dal/.sqlx/query-00220170d8f9e577321a0522337a7db7673811ac181e801a16a7aefc984d60b0.json b/core/lib/dal/.sqlx/query-00220170d8f9e577321a0522337a7db7673811ac181e801a16a7aefc984d60b0.json new file mode 100644 index 000000000000..7676cdc25018 --- /dev/null +++ b/core/lib/dal/.sqlx/query-00220170d8f9e577321a0522337a7db7673811ac181e801a16a7aefc984d60b0.json @@ -0,0 +1,16 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE l1_batches\n SET\n protocol_version = $1\n WHERE\n number BETWEEN $2 AND $3\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int4", + "Int8", + "Int8" + ] + }, + "nullable": [] + }, + "hash": "00220170d8f9e577321a0522337a7db7673811ac181e801a16a7aefc984d60b0" +} diff --git a/core/lib/dal/.sqlx/query-00c0389f4cde049078885cdf05bdb7dbe0bb23c4fc87a78be2d01b77da2ecbd3.json b/core/lib/dal/.sqlx/query-00c0389f4cde049078885cdf05bdb7dbe0bb23c4fc87a78be2d01b77da2ecbd3.json new file mode 100644 index 000000000000..d83713192cb4 --- /dev/null +++ b/core/lib/dal/.sqlx/query-00c0389f4cde049078885cdf05bdb7dbe0bb23c4fc87a78be2d01b77da2ecbd3.json @@ -0,0 +1,23 @@ +{ + "db_name": "PostgreSQL", + "query": "\n WITH\n available_batches AS (\n SELECT\n MAX(number) AS \"last_batch\"\n FROM\n l1_batches\n ),\n processed_batches AS (\n SELECT\n COALESCE(MAX(l1_batch_number), $1) + $2 AS \"last_ready_batch\"\n FROM\n vm_runner_protective_reads\n WHERE\n time_taken IS NOT NULL\n )\n SELECT\n LEAST(last_batch, last_ready_batch) AS \"last_ready_batch!\"\n FROM\n available_batches\n FULL JOIN processed_batches ON TRUE\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "last_ready_batch!", + "type_info": "Int8" + } + ], + "parameters": { + "Left": [ + "Int8", + "Int8" + ] + }, + "nullable": [ + true + ] + }, + "hash": "00c0389f4cde049078885cdf05bdb7dbe0bb23c4fc87a78be2d01b77da2ecbd3" +} diff --git a/core/lib/dal/.sqlx/query-02cd10bd405bb3150478ef98d9dd58ab63035cdda861ff7566a9b1f6a68b9162.json b/core/lib/dal/.sqlx/query-02cd10bd405bb3150478ef98d9dd58ab63035cdda861ff7566a9b1f6a68b9162.json deleted file mode 100644 index 9fe301f846b0..000000000000 --- a/core/lib/dal/.sqlx/query-02cd10bd405bb3150478ef98d9dd58ab63035cdda861ff7566a9b1f6a68b9162.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n DELETE FROM\n l2_to_l1_logs\n WHERE\n miniblock_number BETWEEN $1 AND $2\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8", - "Int8" - ] - }, - "nullable": [] - }, - "hash": "02cd10bd405bb3150478ef98d9dd58ab63035cdda861ff7566a9b1f6a68b9162" -} diff --git a/core/lib/dal/.sqlx/query-f4c3a8e5cf0079a3cc0392692b521c6c341e2122d40b8dd8d7e1de6a3cf14d3d.json b/core/lib/dal/.sqlx/query-0385576f1fb3836fc04a6cde3e92c03e1de8292eb0ea1e026ba1b32a3745c261.json similarity index 55% rename from core/lib/dal/.sqlx/query-f4c3a8e5cf0079a3cc0392692b521c6c341e2122d40b8dd8d7e1de6a3cf14d3d.json rename to core/lib/dal/.sqlx/query-0385576f1fb3836fc04a6cde3e92c03e1de8292eb0ea1e026ba1b32a3745c261.json index 8c128c961b8b..a98cbb18034a 100644 --- a/core/lib/dal/.sqlx/query-f4c3a8e5cf0079a3cc0392692b521c6c341e2122d40b8dd8d7e1de6a3cf14d3d.json +++ b/core/lib/dal/.sqlx/query-0385576f1fb3836fc04a6cde3e92c03e1de8292eb0ea1e026ba1b32a3745c261.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT\n storage_logs.hashed_key AS \"hashed_key!\",\n storage_logs.value AS \"value!\",\n storage_logs.miniblock_number AS \"miniblock_number!\",\n initial_writes.l1_batch_number AS \"l1_batch_number!\",\n initial_writes.index\n FROM\n (\n SELECT\n hashed_key,\n MAX(\n ARRAY [miniblock_number, operation_number] :: INT []\n ) AS op\n FROM\n storage_logs\n WHERE\n miniblock_number <= $1\n AND hashed_key >= $3\n AND hashed_key <= $4\n GROUP BY\n hashed_key\n ORDER BY\n hashed_key\n ) AS keys\n INNER JOIN storage_logs ON keys.hashed_key = storage_logs.hashed_key\n AND storage_logs.miniblock_number = keys.op [1]\n AND storage_logs.operation_number = keys.op [2]\n INNER JOIN initial_writes ON keys.hashed_key = initial_writes.hashed_key\n WHERE\n initial_writes.l1_batch_number <= $2\n ", + "query": "\n SELECT\n storage_logs.hashed_key AS \"hashed_key!\",\n storage_logs.value AS \"value!\",\n storage_logs.miniblock_number AS \"miniblock_number!\",\n initial_writes.l1_batch_number AS \"l1_batch_number!\",\n initial_writes.index\n FROM\n (\n SELECT\n hashed_key,\n MAX(ARRAY[miniblock_number, operation_number]::INT[]) AS op\n FROM\n storage_logs\n WHERE\n miniblock_number <= $1\n AND hashed_key >= $3\n AND hashed_key <= $4\n GROUP BY\n hashed_key\n ORDER BY\n hashed_key\n ) AS keys\n INNER JOIN storage_logs ON keys.hashed_key = storage_logs.hashed_key\n AND storage_logs.miniblock_number = keys.op[1]\n AND storage_logs.operation_number = keys.op[2]\n INNER JOIN initial_writes ON keys.hashed_key = initial_writes.hashed_key\n WHERE\n initial_writes.l1_batch_number <= $2\n ", "describe": { "columns": [ { @@ -45,5 +45,5 @@ false ] }, - "hash": "f4c3a8e5cf0079a3cc0392692b521c6c341e2122d40b8dd8d7e1de6a3cf14d3d" + "hash": "0385576f1fb3836fc04a6cde3e92c03e1de8292eb0ea1e026ba1b32a3745c261" } diff --git a/core/lib/dal/.sqlx/query-03e00f422f991f8f12aad0083e1c42cfea253a182ca5df143a183cd522ecac33.json b/core/lib/dal/.sqlx/query-03e00f422f991f8f12aad0083e1c42cfea253a182ca5df143a183cd522ecac33.json new file mode 100644 index 000000000000..12498582adaa --- /dev/null +++ b/core/lib/dal/.sqlx/query-03e00f422f991f8f12aad0083e1c42cfea253a182ca5df143a183cd522ecac33.json @@ -0,0 +1,22 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE transactions\n SET\n l1_batch_number = NULL,\n miniblock_number = NULL,\n error = NULL,\n index_in_block = NULL,\n execution_info = '{}'\n WHERE\n miniblock_number > $1\n RETURNING\n hash\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "hash", + "type_info": "Bytea" + } + ], + "parameters": { + "Left": [ + "Int8" + ] + }, + "nullable": [ + false + ] + }, + "hash": "03e00f422f991f8f12aad0083e1c42cfea253a182ca5df143a183cd522ecac33" +} diff --git a/core/lib/dal/.sqlx/query-bb686779db0b9b0cb844702affbd5560139c2bc540cc7777da44c9585206382c.json b/core/lib/dal/.sqlx/query-040eaa878c3473f5edc73b77e572b5ea100f59295cd693d14ee0d5ee089c7981.json similarity index 63% rename from core/lib/dal/.sqlx/query-bb686779db0b9b0cb844702affbd5560139c2bc540cc7777da44c9585206382c.json rename to core/lib/dal/.sqlx/query-040eaa878c3473f5edc73b77e572b5ea100f59295cd693d14ee0d5ee089c7981.json index 02a30c5f4f71..c0e0c777cc52 100644 --- a/core/lib/dal/.sqlx/query-bb686779db0b9b0cb844702affbd5560139c2bc540cc7777da44c9585206382c.json +++ b/core/lib/dal/.sqlx/query-040eaa878c3473f5edc73b77e572b5ea100f59295cd693d14ee0d5ee089c7981.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT\n l1_batch_number\n FROM\n snapshots\n WHERE\n NOT ('' :: TEXT = ANY (storage_logs_filepaths))\n ORDER BY\n l1_batch_number DESC\n ", + "query": "\n SELECT\n l1_batch_number\n FROM\n snapshots\n WHERE\n NOT (''::TEXT = ANY (storage_logs_filepaths))\n ORDER BY\n l1_batch_number DESC\n ", "describe": { "columns": [ { @@ -16,5 +16,5 @@ false ] }, - "hash": "bb686779db0b9b0cb844702affbd5560139c2bc540cc7777da44c9585206382c" + "hash": "040eaa878c3473f5edc73b77e572b5ea100f59295cd693d14ee0d5ee089c7981" } diff --git a/core/lib/dal/.sqlx/query-046590a310cc7bbfa421d0d8e20c3bdae18b88c4c223e374df9a997c271b091b.json b/core/lib/dal/.sqlx/query-046590a310cc7bbfa421d0d8e20c3bdae18b88c4c223e374df9a997c271b091b.json new file mode 100644 index 000000000000..950d72a3e238 --- /dev/null +++ b/core/lib/dal/.sqlx/query-046590a310cc7bbfa421d0d8e20c3bdae18b88c4c223e374df9a997c271b091b.json @@ -0,0 +1,38 @@ +{ + "db_name": "PostgreSQL", + "query": "\n WITH\n soft AS (\n SELECT\n pruned_l1_batch,\n pruned_miniblock\n FROM\n pruning_log\n WHERE\n TYPE = 'Soft'\n ORDER BY\n pruned_l1_batch DESC\n LIMIT\n 1\n ),\n hard AS (\n SELECT\n pruned_l1_batch,\n pruned_miniblock\n FROM\n pruning_log\n WHERE\n TYPE = 'Hard'\n ORDER BY\n pruned_l1_batch DESC\n LIMIT\n 1\n )\n SELECT\n soft.pruned_l1_batch AS last_soft_pruned_l1_batch,\n soft.pruned_miniblock AS last_soft_pruned_miniblock,\n hard.pruned_l1_batch AS last_hard_pruned_l1_batch,\n hard.pruned_miniblock AS last_hard_pruned_miniblock\n FROM\n soft\n FULL JOIN hard ON TRUE\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "last_soft_pruned_l1_batch", + "type_info": "Int8" + }, + { + "ordinal": 1, + "name": "last_soft_pruned_miniblock", + "type_info": "Int8" + }, + { + "ordinal": 2, + "name": "last_hard_pruned_l1_batch", + "type_info": "Int8" + }, + { + "ordinal": 3, + "name": "last_hard_pruned_miniblock", + "type_info": "Int8" + } + ], + "parameters": { + "Left": [] + }, + "nullable": [ + true, + true, + true, + true + ] + }, + "hash": "046590a310cc7bbfa421d0d8e20c3bdae18b88c4c223e374df9a997c271b091b" +} diff --git a/core/lib/dal/.sqlx/query-05c2a77d9f65d435e2df63a300850e42abbaf365a1b041d0e7a809796ef0fe63.json b/core/lib/dal/.sqlx/query-05c2a77d9f65d435e2df63a300850e42abbaf365a1b041d0e7a809796ef0fe63.json new file mode 100644 index 000000000000..f3c85b9b43dc --- /dev/null +++ b/core/lib/dal/.sqlx/query-05c2a77d9f65d435e2df63a300850e42abbaf365a1b041d0e7a809796ef0fe63.json @@ -0,0 +1,22 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE proof_generation_details\n SET\n status = 'picked_by_prover',\n updated_at = NOW(),\n prover_taken_at = NOW()\n WHERE\n l1_batch_number = (\n SELECT\n l1_batch_number\n FROM\n proof_generation_details\n LEFT JOIN l1_batches ON l1_batch_number = l1_batches.number\n WHERE\n (\n vm_run_data_blob_url IS NOT NULL\n AND proof_gen_data_blob_url IS NOT NULL\n AND l1_batches.hash IS NOT NULL\n AND l1_batches.aux_data_hash IS NOT NULL\n AND l1_batches.meta_parameters_hash IS NOT NULL\n AND status = 'unpicked'\n )\n OR (\n status = 'picked_by_prover'\n AND prover_taken_at < NOW() - $1::INTERVAL\n )\n ORDER BY\n l1_batch_number ASC\n LIMIT\n 1\n )\n RETURNING\n proof_generation_details.l1_batch_number\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "l1_batch_number", + "type_info": "Int8" + } + ], + "parameters": { + "Left": [ + "Interval" + ] + }, + "nullable": [ + false + ] + }, + "hash": "05c2a77d9f65d435e2df63a300850e42abbaf365a1b041d0e7a809796ef0fe63" +} diff --git a/core/lib/dal/.sqlx/query-05e94c9609efb0e4e0c96f3ee7f57db0a54d476b78dc0e36e3ef94dcc17099ae.json b/core/lib/dal/.sqlx/query-05e94c9609efb0e4e0c96f3ee7f57db0a54d476b78dc0e36e3ef94dcc17099ae.json deleted file mode 100644 index c1b3932dfe2f..000000000000 --- a/core/lib/dal/.sqlx/query-05e94c9609efb0e4e0c96f3ee7f57db0a54d476b78dc0e36e3ef94dcc17099ae.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE\n eth_txs_history\n SET\n sent_at_block = $2,\n sent_at = NOW()\n WHERE\n id = $1\n AND sent_at_block IS NULL\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int4", - "Int4" - ] - }, - "nullable": [] - }, - "hash": "05e94c9609efb0e4e0c96f3ee7f57db0a54d476b78dc0e36e3ef94dcc17099ae" -} diff --git a/core/lib/dal/.sqlx/query-079da9dcd3f65b8fad7465a5cb5a6acecaaffde2e922fb384ecc96571bd9e786.json b/core/lib/dal/.sqlx/query-079da9dcd3f65b8fad7465a5cb5a6acecaaffde2e922fb384ecc96571bd9e786.json deleted file mode 100644 index 45974f8f4a9d..000000000000 --- a/core/lib/dal/.sqlx/query-079da9dcd3f65b8fad7465a5cb5a6acecaaffde2e922fb384ecc96571bd9e786.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE\n l1_batches\n SET\n eth_prove_tx_id = $1,\n updated_at = NOW()\n WHERE\n number BETWEEN $2 AND $3\n AND eth_prove_tx_id IS NULL\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int4", - "Int8", - "Int8" - ] - }, - "nullable": [] - }, - "hash": "079da9dcd3f65b8fad7465a5cb5a6acecaaffde2e922fb384ecc96571bd9e786" -} diff --git a/core/lib/dal/.sqlx/query-0a55ee6934920b29262040064261f5dd0730d1a8e111892025f1c2688e338fbc.json b/core/lib/dal/.sqlx/query-0a55ee6934920b29262040064261f5dd0730d1a8e111892025f1c2688e338fbc.json deleted file mode 100644 index b2f7da1d8dec..000000000000 --- a/core/lib/dal/.sqlx/query-0a55ee6934920b29262040064261f5dd0730d1a8e111892025f1c2688e338fbc.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE\n proof_generation_details\n SET\n status = 'generated',\n proof_blob_url = $1,\n updated_at = NOW()\n WHERE\n l1_batch_number = $2\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Text", - "Int8" - ] - }, - "nullable": [] - }, - "hash": "0a55ee6934920b29262040064261f5dd0730d1a8e111892025f1c2688e338fbc" -} diff --git a/core/lib/dal/.sqlx/query-0b5d5efeac95d429cf6a5be22153897edf8c868094ad029e2e8fcf286d44fd55.json b/core/lib/dal/.sqlx/query-0b5d5efeac95d429cf6a5be22153897edf8c868094ad029e2e8fcf286d44fd55.json new file mode 100644 index 000000000000..822a6967f6db --- /dev/null +++ b/core/lib/dal/.sqlx/query-0b5d5efeac95d429cf6a5be22153897edf8c868094ad029e2e8fcf286d44fd55.json @@ -0,0 +1,16 @@ +{ + "db_name": "PostgreSQL", + "query": "\n INSERT INTO\n data_availability (l1_batch_number, blob_id, sent_at, created_at, updated_at)\n VALUES\n ($1, $2, $3, NOW(), NOW())\n ON CONFLICT DO NOTHING\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8", + "Text", + "Timestamp" + ] + }, + "nullable": [] + }, + "hash": "0b5d5efeac95d429cf6a5be22153897edf8c868094ad029e2e8fcf286d44fd55" +} diff --git a/core/lib/dal/.sqlx/query-0c2be3c7bd278d24d3a155203067fb9102b175047588ec1cca515ff31ae131c3.json b/core/lib/dal/.sqlx/query-0c2be3c7bd278d24d3a155203067fb9102b175047588ec1cca515ff31ae131c3.json deleted file mode 100644 index 4c5950576be2..000000000000 --- a/core/lib/dal/.sqlx/query-0c2be3c7bd278d24d3a155203067fb9102b175047588ec1cca515ff31ae131c3.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE\n transactions\n SET\n miniblock_number = $1,\n index_in_block = data_table.index_in_block,\n error = NULLIF(data_table.error, ''),\n in_mempool = FALSE,\n execution_info = execution_info || data_table.new_execution_info,\n refunded_gas = data_table.refunded_gas,\n effective_gas_price = data_table.effective_gas_price,\n updated_at = NOW()\n FROM\n (\n SELECT\n UNNEST($2 :: bytea []) AS hash,\n UNNEST($3 :: INTEGER []) AS index_in_block,\n UNNEST($4 :: VARCHAR []) AS error,\n UNNEST($5 :: jsonb []) AS new_execution_info,\n UNNEST($6 :: BIGINT []) AS refunded_gas,\n UNNEST($7 :: NUMERIC []) AS effective_gas_price\n ) AS data_table\n WHERE\n transactions.hash = data_table.hash\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8", - "ByteaArray", - "Int4Array", - "VarcharArray", - "JsonbArray", - "Int8Array", - "NumericArray" - ] - }, - "nullable": [] - }, - "hash": "0c2be3c7bd278d24d3a155203067fb9102b175047588ec1cca515ff31ae131c3" -} diff --git a/core/lib/dal/.sqlx/query-0d60eb7536b49716fa01a14b0be760b8368dd5532caa5fb8b4310a96d44d8530.json b/core/lib/dal/.sqlx/query-0d60eb7536b49716fa01a14b0be760b8368dd5532caa5fb8b4310a96d44d8530.json new file mode 100644 index 000000000000..fcb753088e98 --- /dev/null +++ b/core/lib/dal/.sqlx/query-0d60eb7536b49716fa01a14b0be760b8368dd5532caa5fb8b4310a96d44d8530.json @@ -0,0 +1,15 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE transactions\n SET\n input = NULL,\n data = '{}',\n execution_info = '{}',\n updated_at = NOW()\n WHERE\n miniblock_number BETWEEN $1 AND $2\n AND upgrade_id IS NULL\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8", + "Int8" + ] + }, + "nullable": [] + }, + "hash": "0d60eb7536b49716fa01a14b0be760b8368dd5532caa5fb8b4310a96d44d8530" +} diff --git a/core/lib/dal/.sqlx/query-0e9727e6537ef08e65b8868e7a22b3266e5e0140e6d04819be4a5997d193d1de.json b/core/lib/dal/.sqlx/query-0e9727e6537ef08e65b8868e7a22b3266e5e0140e6d04819be4a5997d193d1de.json deleted file mode 100644 index e71b6fad77d9..000000000000 --- a/core/lib/dal/.sqlx/query-0e9727e6537ef08e65b8868e7a22b3266e5e0140e6d04819be4a5997d193d1de.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n DELETE FROM\n miniblocks\n WHERE\n number > $1\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8" - ] - }, - "nullable": [] - }, - "hash": "0e9727e6537ef08e65b8868e7a22b3266e5e0140e6d04819be4a5997d193d1de" -} diff --git a/core/lib/dal/.sqlx/query-0f381418ac79762b4573bf5b440b96b711e8667df7a3c87a5ddf062842a0da6c.json b/core/lib/dal/.sqlx/query-0f381418ac79762b4573bf5b440b96b711e8667df7a3c87a5ddf062842a0da6c.json new file mode 100644 index 000000000000..38d7a2ab64d1 --- /dev/null +++ b/core/lib/dal/.sqlx/query-0f381418ac79762b4573bf5b440b96b711e8667df7a3c87a5ddf062842a0da6c.json @@ -0,0 +1,14 @@ +{ + "db_name": "PostgreSQL", + "query": "\n DELETE FROM eth_txs\n WHERE\n id IN (\n (\n SELECT\n eth_commit_tx_id\n FROM\n l1_batches\n WHERE\n number > $1\n )\n UNION\n (\n SELECT\n eth_prove_tx_id\n FROM\n l1_batches\n WHERE\n number > $1\n )\n UNION\n (\n SELECT\n eth_execute_tx_id\n FROM\n l1_batches\n WHERE\n number > $1\n )\n )\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8" + ] + }, + "nullable": [] + }, + "hash": "0f381418ac79762b4573bf5b440b96b711e8667df7a3c87a5ddf062842a0da6c" +} diff --git a/core/lib/dal/.sqlx/query-08cd0d21cc831cd54f55d6e02daddb6978a6c1e80bbaa5f8fded39a82f8e50e0.json b/core/lib/dal/.sqlx/query-0fbdf8da9a000c433c5475d57f6ad2574cd1310dff1d1bf06825d5634ba25f04.json similarity index 57% rename from core/lib/dal/.sqlx/query-08cd0d21cc831cd54f55d6e02daddb6978a6c1e80bbaa5f8fded39a82f8e50e0.json rename to core/lib/dal/.sqlx/query-0fbdf8da9a000c433c5475d57f6ad2574cd1310dff1d1bf06825d5634ba25f04.json index 6ad0b6d0daac..05b94ad249ac 100644 --- a/core/lib/dal/.sqlx/query-08cd0d21cc831cd54f55d6e02daddb6978a6c1e80bbaa5f8fded39a82f8e50e0.json +++ b/core/lib/dal/.sqlx/query-0fbdf8da9a000c433c5475d57f6ad2574cd1310dff1d1bf06825d5634ba25f04.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n UPDATE\n tee_verifier_input_producer_jobs\n SET\n status = $1,\n updated_at = NOW(),\n time_taken = $3,\n input_blob_url = $4\n WHERE\n l1_batch_number = $2\n ", + "query": "\n UPDATE tee_verifier_input_producer_jobs\n SET\n status = $1,\n updated_at = NOW(),\n time_taken = $3,\n input_blob_url = $4\n WHERE\n l1_batch_number = $2\n ", "describe": { "columns": [], "parameters": { @@ -26,5 +26,5 @@ }, "nullable": [] }, - "hash": "08cd0d21cc831cd54f55d6e02daddb6978a6c1e80bbaa5f8fded39a82f8e50e0" + "hash": "0fbdf8da9a000c433c5475d57f6ad2574cd1310dff1d1bf06825d5634ba25f04" } diff --git a/core/lib/dal/.sqlx/query-0fc5c017a21f1ed897d9856e7318e34818a86cbc50fb5a509f4072ca97db926c.json b/core/lib/dal/.sqlx/query-0fc5c017a21f1ed897d9856e7318e34818a86cbc50fb5a509f4072ca97db926c.json deleted file mode 100644 index c3739b763cb0..000000000000 --- a/core/lib/dal/.sqlx/query-0fc5c017a21f1ed897d9856e7318e34818a86cbc50fb5a509f4072ca97db926c.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE\n eth_txs\n SET\n chain_id = $1\n WHERE\n id = $2\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8", - "Int4" - ] - }, - "nullable": [] - }, - "hash": "0fc5c017a21f1ed897d9856e7318e34818a86cbc50fb5a509f4072ca97db926c" -} diff --git a/core/lib/dal/.sqlx/query-0bd951ee87fe42893321894594cca22b17e75cb6778168d230d9ccd263caca23.json b/core/lib/dal/.sqlx/query-0fef49a649d20c9fd263c1dfa40daa9b94d398c635c37746736e98f1f18fcca7.json similarity index 51% rename from core/lib/dal/.sqlx/query-0bd951ee87fe42893321894594cca22b17e75cb6778168d230d9ccd263caca23.json rename to core/lib/dal/.sqlx/query-0fef49a649d20c9fd263c1dfa40daa9b94d398c635c37746736e98f1f18fcca7.json index 26698a036f41..adfd1919db51 100644 --- a/core/lib/dal/.sqlx/query-0bd951ee87fe42893321894594cca22b17e75cb6778168d230d9ccd263caca23.json +++ b/core/lib/dal/.sqlx/query-0fef49a649d20c9fd263c1dfa40daa9b94d398c635c37746736e98f1f18fcca7.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n UPDATE\n tee_verifier_input_producer_jobs\n SET\n status = $1,\n attempts = attempts + 1,\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n l1_batch_number = (\n SELECT\n l1_batch_number\n FROM\n tee_verifier_input_producer_jobs\n WHERE\n status = $2\n OR (\n status = $1\n AND processing_started_at < NOW() - $4 :: INTERVAL\n )\n OR (\n status = $3\n AND attempts < $5\n )\n ORDER BY\n l1_batch_number ASC\n LIMIT\n 1 FOR\n UPDATE\n SKIP LOCKED\n )\n RETURNING\n tee_verifier_input_producer_jobs.l1_batch_number\n ", + "query": "\n UPDATE tee_verifier_input_producer_jobs\n SET\n status = $1,\n attempts = attempts + 1,\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n l1_batch_number = (\n SELECT\n l1_batch_number\n FROM\n tee_verifier_input_producer_jobs\n WHERE\n status = $2\n OR (\n status = $1\n AND processing_started_at < NOW() - $4::INTERVAL\n )\n OR (\n status = $3\n AND attempts < $5\n )\n ORDER BY\n l1_batch_number ASC\n LIMIT\n 1\n FOR UPDATE\n SKIP LOCKED\n )\n RETURNING\n tee_verifier_input_producer_jobs.l1_batch_number\n ", "describe": { "columns": [ { @@ -61,5 +61,5 @@ false ] }, - "hash": "0bd951ee87fe42893321894594cca22b17e75cb6778168d230d9ccd263caca23" + "hash": "0fef49a649d20c9fd263c1dfa40daa9b94d398c635c37746736e98f1f18fcca7" } diff --git a/core/lib/dal/.sqlx/query-105ea691e4022cf707db0707a42dc9216ee7df28e08c7eb4899c2e7df4078c50.json b/core/lib/dal/.sqlx/query-105ea691e4022cf707db0707a42dc9216ee7df28e08c7eb4899c2e7df4078c50.json deleted file mode 100644 index fef7e1cb45df..000000000000 --- a/core/lib/dal/.sqlx/query-105ea691e4022cf707db0707a42dc9216ee7df28e08c7eb4899c2e7df4078c50.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE\n snapshots\n SET\n storage_logs_filepaths [$2] = $3,\n updated_at = NOW()\n WHERE\n l1_batch_number = $1\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8", - "Int4", - "Text" - ] - }, - "nullable": [] - }, - "hash": "105ea691e4022cf707db0707a42dc9216ee7df28e08c7eb4899c2e7df4078c50" -} diff --git a/core/lib/dal/.sqlx/query-1074d0a2e4a4afb9a92f3822e133db7a71aca15698bafba051a8d9a91a4dbc76.json b/core/lib/dal/.sqlx/query-1074d0a2e4a4afb9a92f3822e133db7a71aca15698bafba051a8d9a91a4dbc76.json new file mode 100644 index 000000000000..13e4cdb9431d --- /dev/null +++ b/core/lib/dal/.sqlx/query-1074d0a2e4a4afb9a92f3822e133db7a71aca15698bafba051a8d9a91a4dbc76.json @@ -0,0 +1,112 @@ +{ + "db_name": "PostgreSQL", + "query": "\n WITH\n mb AS (\n SELECT\n l1_gas_price,\n l2_fair_gas_price,\n fair_pubdata_price\n FROM\n miniblocks\n WHERE\n l1_batch_number = $1\n LIMIT\n 1\n )\n SELECT\n l1_batches.number,\n l1_batches.timestamp,\n l1_batches.l1_tx_count,\n l1_batches.l2_tx_count,\n l1_batches.hash AS \"root_hash?\",\n commit_tx.tx_hash AS \"commit_tx_hash?\",\n commit_tx.confirmed_at AS \"committed_at?\",\n prove_tx.tx_hash AS \"prove_tx_hash?\",\n prove_tx.confirmed_at AS \"proven_at?\",\n execute_tx.tx_hash AS \"execute_tx_hash?\",\n execute_tx.confirmed_at AS \"executed_at?\",\n mb.l1_gas_price,\n mb.l2_fair_gas_price,\n mb.fair_pubdata_price,\n l1_batches.bootloader_code_hash,\n l1_batches.default_aa_code_hash\n FROM\n l1_batches\n INNER JOIN mb ON TRUE\n LEFT JOIN eth_txs_history AS commit_tx ON (\n l1_batches.eth_commit_tx_id = commit_tx.eth_tx_id\n AND commit_tx.confirmed_at IS NOT NULL\n )\n LEFT JOIN eth_txs_history AS prove_tx ON (\n l1_batches.eth_prove_tx_id = prove_tx.eth_tx_id\n AND prove_tx.confirmed_at IS NOT NULL\n )\n LEFT JOIN eth_txs_history AS execute_tx ON (\n l1_batches.eth_execute_tx_id = execute_tx.eth_tx_id\n AND execute_tx.confirmed_at IS NOT NULL\n )\n WHERE\n l1_batches.number = $1\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "number", + "type_info": "Int8" + }, + { + "ordinal": 1, + "name": "timestamp", + "type_info": "Int8" + }, + { + "ordinal": 2, + "name": "l1_tx_count", + "type_info": "Int4" + }, + { + "ordinal": 3, + "name": "l2_tx_count", + "type_info": "Int4" + }, + { + "ordinal": 4, + "name": "root_hash?", + "type_info": "Bytea" + }, + { + "ordinal": 5, + "name": "commit_tx_hash?", + "type_info": "Text" + }, + { + "ordinal": 6, + "name": "committed_at?", + "type_info": "Timestamp" + }, + { + "ordinal": 7, + "name": "prove_tx_hash?", + "type_info": "Text" + }, + { + "ordinal": 8, + "name": "proven_at?", + "type_info": "Timestamp" + }, + { + "ordinal": 9, + "name": "execute_tx_hash?", + "type_info": "Text" + }, + { + "ordinal": 10, + "name": "executed_at?", + "type_info": "Timestamp" + }, + { + "ordinal": 11, + "name": "l1_gas_price", + "type_info": "Int8" + }, + { + "ordinal": 12, + "name": "l2_fair_gas_price", + "type_info": "Int8" + }, + { + "ordinal": 13, + "name": "fair_pubdata_price", + "type_info": "Int8" + }, + { + "ordinal": 14, + "name": "bootloader_code_hash", + "type_info": "Bytea" + }, + { + "ordinal": 15, + "name": "default_aa_code_hash", + "type_info": "Bytea" + } + ], + "parameters": { + "Left": [ + "Int8" + ] + }, + "nullable": [ + false, + false, + false, + false, + true, + false, + true, + false, + true, + false, + true, + false, + false, + true, + true, + true + ] + }, + "hash": "1074d0a2e4a4afb9a92f3822e133db7a71aca15698bafba051a8d9a91a4dbc76" +} diff --git a/core/lib/dal/.sqlx/query-11960ee50e5cb3a2f1e8150e1e6854f613c3267b983a031998856873740c9bff.json b/core/lib/dal/.sqlx/query-11960ee50e5cb3a2f1e8150e1e6854f613c3267b983a031998856873740c9bff.json deleted file mode 100644 index f36d04be52c9..000000000000 --- a/core/lib/dal/.sqlx/query-11960ee50e5cb3a2f1e8150e1e6854f613c3267b983a031998856873740c9bff.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE\n proof_generation_details\n SET\n proof_gen_data_blob_url = $1,\n updated_at = NOW()\n WHERE\n l1_batch_number = $2\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Text", - "Int8" - ] - }, - "nullable": [] - }, - "hash": "11960ee50e5cb3a2f1e8150e1e6854f613c3267b983a031998856873740c9bff" -} diff --git a/core/lib/dal/.sqlx/query-120970162104e0560784ee4b8fa44a0202265d741912125f7865e570411997d7.json b/core/lib/dal/.sqlx/query-120970162104e0560784ee4b8fa44a0202265d741912125f7865e570411997d7.json new file mode 100644 index 000000000000..00e558b13628 --- /dev/null +++ b/core/lib/dal/.sqlx/query-120970162104e0560784ee4b8fa44a0202265d741912125f7865e570411997d7.json @@ -0,0 +1,15 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE l1_batches\n SET\n tree_writes = $1\n WHERE\n number = $2\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Bytea", + "Int8" + ] + }, + "nullable": [] + }, + "hash": "120970162104e0560784ee4b8fa44a0202265d741912125f7865e570411997d7" +} diff --git a/core/lib/dal/.sqlx/query-137702c69220666ec5c1c4dc0fd0f58093cdfe21871592876b9a2a73ec8c1b10.json b/core/lib/dal/.sqlx/query-137702c69220666ec5c1c4dc0fd0f58093cdfe21871592876b9a2a73ec8c1b10.json deleted file mode 100644 index aa7b6552f874..000000000000 --- a/core/lib/dal/.sqlx/query-137702c69220666ec5c1c4dc0fd0f58093cdfe21871592876b9a2a73ec8c1b10.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE\n protocol_versions\n SET\n upgrade_tx_hash = $1\n WHERE\n id = $2\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Bytea", - "Int4" - ] - }, - "nullable": [] - }, - "hash": "137702c69220666ec5c1c4dc0fd0f58093cdfe21871592876b9a2a73ec8c1b10" -} diff --git a/core/lib/dal/.sqlx/query-14cd4cad9c69985b59cb924339297d1fef3dc39e95d98dbdfe49c9121e58ecf2.json b/core/lib/dal/.sqlx/query-14cd4cad9c69985b59cb924339297d1fef3dc39e95d98dbdfe49c9121e58ecf2.json deleted file mode 100644 index 982f5d9643f4..000000000000 --- a/core/lib/dal/.sqlx/query-14cd4cad9c69985b59cb924339297d1fef3dc39e95d98dbdfe49c9121e58ecf2.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE\n snapshot_recovery\n SET\n storage_logs_chunks_processed [$1] = TRUE,\n updated_at = NOW()\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int4" - ] - }, - "nullable": [] - }, - "hash": "14cd4cad9c69985b59cb924339297d1fef3dc39e95d98dbdfe49c9121e58ecf2" -} diff --git a/core/lib/dal/.sqlx/query-1656c38e85e1f7e1164aec5d5ee78e96ac6f94edb2983a7e68a3d650a091da1a.json b/core/lib/dal/.sqlx/query-1656c38e85e1f7e1164aec5d5ee78e96ac6f94edb2983a7e68a3d650a091da1a.json deleted file mode 100644 index 8ee3126901c3..000000000000 --- a/core/lib/dal/.sqlx/query-1656c38e85e1f7e1164aec5d5ee78e96ac6f94edb2983a7e68a3d650a091da1a.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n DELETE FROM\n call_traces\n WHERE\n tx_hash IN (\n SELECT\n hash\n FROM\n transactions\n WHERE\n miniblock_number BETWEEN $1 AND $2\n )\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8", - "Int8" - ] - }, - "nullable": [] - }, - "hash": "1656c38e85e1f7e1164aec5d5ee78e96ac6f94edb2983a7e68a3d650a091da1a" -} diff --git a/core/lib/dal/.sqlx/query-1854e92462e839e741fdfef196f6b04cd475386497611ed5664a281c66917afc.json b/core/lib/dal/.sqlx/query-1854e92462e839e741fdfef196f6b04cd475386497611ed5664a281c66917afc.json deleted file mode 100644 index c62c9a4cd631..000000000000 --- a/core/lib/dal/.sqlx/query-1854e92462e839e741fdfef196f6b04cd475386497611ed5664a281c66917afc.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE\n vm_runner_protective_reads\n SET\n time_taken = NOW() - processing_started_at\n WHERE\n l1_batch_number = $1\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8" - ] - }, - "nullable": [] - }, - "hash": "1854e92462e839e741fdfef196f6b04cd475386497611ed5664a281c66917afc" -} diff --git a/core/lib/dal/.sqlx/query-19314d74e94b610e2da6d728ca37ea964610e131d45f720f7a7b2a130fe9ed89.json b/core/lib/dal/.sqlx/query-19314d74e94b610e2da6d728ca37ea964610e131d45f720f7a7b2a130fe9ed89.json new file mode 100644 index 000000000000..88093dcee18e --- /dev/null +++ b/core/lib/dal/.sqlx/query-19314d74e94b610e2da6d728ca37ea964610e131d45f720f7a7b2a130fe9ed89.json @@ -0,0 +1,17 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE contract_verification_requests\n SET\n status = 'failed',\n updated_at = NOW(),\n error = $2,\n compilation_errors = $3,\n panic_message = $4\n WHERE\n id = $1\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8", + "Text", + "Jsonb", + "Text" + ] + }, + "nullable": [] + }, + "hash": "19314d74e94b610e2da6d728ca37ea964610e131d45f720f7a7b2a130fe9ed89" +} diff --git a/core/lib/dal/.sqlx/query-19a4025388ec9dd14de5f8d794b74e68843b551901c83dcf74901cc78e9bdb1c.json b/core/lib/dal/.sqlx/query-19a4025388ec9dd14de5f8d794b74e68843b551901c83dcf74901cc78e9bdb1c.json deleted file mode 100644 index 28c3b555a253..000000000000 --- a/core/lib/dal/.sqlx/query-19a4025388ec9dd14de5f8d794b74e68843b551901c83dcf74901cc78e9bdb1c.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n DELETE FROM\n transactions\n WHERE\n hash = ANY ($1)\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "ByteaArray" - ] - }, - "nullable": [] - }, - "hash": "19a4025388ec9dd14de5f8d794b74e68843b551901c83dcf74901cc78e9bdb1c" -} diff --git a/core/lib/dal/.sqlx/query-1bbfac481c402bcb3bb888b84146d922fa1fc9c202072fbc04cae1bbf97195aa.json b/core/lib/dal/.sqlx/query-1bbfac481c402bcb3bb888b84146d922fa1fc9c202072fbc04cae1bbf97195aa.json new file mode 100644 index 000000000000..f24a28ffdc28 --- /dev/null +++ b/core/lib/dal/.sqlx/query-1bbfac481c402bcb3bb888b84146d922fa1fc9c202072fbc04cae1bbf97195aa.json @@ -0,0 +1,14 @@ +{ + "db_name": "PostgreSQL", + "query": "\n INSERT INTO\n vm_runner_bwip (l1_batch_number, created_at, updated_at, processing_started_at)\n VALUES\n ($1, NOW(), NOW(), NOW())\n ON CONFLICT (l1_batch_number) DO\n UPDATE\n SET\n updated_at = NOW(),\n processing_started_at = NOW()\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8" + ] + }, + "nullable": [] + }, + "hash": "1bbfac481c402bcb3bb888b84146d922fa1fc9c202072fbc04cae1bbf97195aa" +} diff --git a/core/lib/dal/.sqlx/query-1c14d2def60fa5ff91788ddb55e68cee71742b732112038a642e2a07305053c2.json b/core/lib/dal/.sqlx/query-1c14d2def60fa5ff91788ddb55e68cee71742b732112038a642e2a07305053c2.json new file mode 100644 index 000000000000..71dfada3d59a --- /dev/null +++ b/core/lib/dal/.sqlx/query-1c14d2def60fa5ff91788ddb55e68cee71742b732112038a642e2a07305053c2.json @@ -0,0 +1,12 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE transactions\n SET\n in_mempool = FALSE\n WHERE\n in_mempool = TRUE\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [] + }, + "nullable": [] + }, + "hash": "1c14d2def60fa5ff91788ddb55e68cee71742b732112038a642e2a07305053c2" +} diff --git a/core/lib/dal/.sqlx/query-1c994d418ada78586de829fc2d34d26e48e968c79834858c98b7a7f9dfc81910.json b/core/lib/dal/.sqlx/query-1c994d418ada78586de829fc2d34d26e48e968c79834858c98b7a7f9dfc81910.json new file mode 100644 index 000000000000..747105fb444b --- /dev/null +++ b/core/lib/dal/.sqlx/query-1c994d418ada78586de829fc2d34d26e48e968c79834858c98b7a7f9dfc81910.json @@ -0,0 +1,14 @@ +{ + "db_name": "PostgreSQL", + "query": "\n DELETE FROM l2_to_l1_logs\n WHERE\n miniblock_number > $1\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8" + ] + }, + "nullable": [] + }, + "hash": "1c994d418ada78586de829fc2d34d26e48e968c79834858c98b7a7f9dfc81910" +} diff --git a/core/lib/dal/.sqlx/query-c2ef57bcc2a2628618a6b292180e2188769ca8c52125e7739bb00e90eedc79af.json b/core/lib/dal/.sqlx/query-1e3c88b41bc02cb6a116fa930ae85b8b60165ed757ae1044e83fdc877d95cbd8.json similarity index 73% rename from core/lib/dal/.sqlx/query-c2ef57bcc2a2628618a6b292180e2188769ca8c52125e7739bb00e90eedc79af.json rename to core/lib/dal/.sqlx/query-1e3c88b41bc02cb6a116fa930ae85b8b60165ed757ae1044e83fdc877d95cbd8.json index b8d662f05386..206d2f91e3b1 100644 --- a/core/lib/dal/.sqlx/query-c2ef57bcc2a2628618a6b292180e2188769ca8c52125e7739bb00e90eedc79af.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 :: 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": [ { @@ -84,5 +84,5 @@ false ] }, - "hash": "c2ef57bcc2a2628618a6b292180e2188769ca8c52125e7739bb00e90eedc79af" + "hash": "1e3c88b41bc02cb6a116fa930ae85b8b60165ed757ae1044e83fdc877d95cbd8" } diff --git a/core/lib/dal/.sqlx/query-1fba74c9aa8760adf71bd98b278ec7eefa0edd3cefd7eb6025c2c1456f2a6095.json b/core/lib/dal/.sqlx/query-1fba74c9aa8760adf71bd98b278ec7eefa0edd3cefd7eb6025c2c1456f2a6095.json deleted file mode 100644 index 761bf043f98a..000000000000 --- a/core/lib/dal/.sqlx/query-1fba74c9aa8760adf71bd98b278ec7eefa0edd3cefd7eb6025c2c1456f2a6095.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE\n miniblocks\n SET\n logs_bloom = data.logs_bloom\n FROM\n (\n SELECT\n UNNEST($1 :: BIGINT []) AS number,\n UNNEST($2 :: BYTEA []) AS logs_bloom\n ) AS data\n WHERE\n miniblocks.number = data.number\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8Array", - "ByteaArray" - ] - }, - "nullable": [] - }, - "hash": "1fba74c9aa8760adf71bd98b278ec7eefa0edd3cefd7eb6025c2c1456f2a6095" -} diff --git a/core/lib/dal/.sqlx/query-2169cc7dfb074566ceb0bd5754d6e7a755c4bc6c25c7e6caff5fd6142813d349.json b/core/lib/dal/.sqlx/query-2169cc7dfb074566ceb0bd5754d6e7a755c4bc6c25c7e6caff5fd6142813d349.json new file mode 100644 index 000000000000..e48fddcf6175 --- /dev/null +++ b/core/lib/dal/.sqlx/query-2169cc7dfb074566ceb0bd5754d6e7a755c4bc6c25c7e6caff5fd6142813d349.json @@ -0,0 +1,16 @@ +{ + "db_name": "PostgreSQL", + "query": "\n INSERT INTO\n tee_proof_generation_details (l1_batch_number, tee_type, status, created_at, updated_at)\n VALUES\n ($1, $2, $3, NOW(), NOW())\n ON CONFLICT (l1_batch_number, tee_type) DO NOTHING\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8", + "Text", + "Text" + ] + }, + "nullable": [] + }, + "hash": "2169cc7dfb074566ceb0bd5754d6e7a755c4bc6c25c7e6caff5fd6142813d349" +} diff --git a/core/lib/dal/.sqlx/query-25ef41cbeb95d10e4051b822769518daf76a5f283e4298fd12022b0c3db07319.json b/core/lib/dal/.sqlx/query-25ef41cbeb95d10e4051b822769518daf76a5f283e4298fd12022b0c3db07319.json new file mode 100644 index 000000000000..079246791a98 --- /dev/null +++ b/core/lib/dal/.sqlx/query-25ef41cbeb95d10e4051b822769518daf76a5f283e4298fd12022b0c3db07319.json @@ -0,0 +1,16 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE l1_batches\n SET\n eth_prove_tx_id = $1,\n updated_at = NOW()\n WHERE\n number BETWEEN $2 AND $3\n AND eth_prove_tx_id IS NULL\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int4", + "Int8", + "Int8" + ] + }, + "nullable": [] + }, + "hash": "25ef41cbeb95d10e4051b822769518daf76a5f283e4298fd12022b0c3db07319" +} diff --git a/core/lib/dal/.sqlx/query-729e09e0029b12156689ebe01e082cec15b0c574fd94917e82238d1294831197.json b/core/lib/dal/.sqlx/query-25fb31277591dd7d5d783bd8777f1a855e76b37b6ed36ae612b551f9a6a55633.json similarity index 74% rename from core/lib/dal/.sqlx/query-729e09e0029b12156689ebe01e082cec15b0c574fd94917e82238d1294831197.json rename to core/lib/dal/.sqlx/query-25fb31277591dd7d5d783bd8777f1a855e76b37b6ed36ae612b551f9a6a55633.json index 14b257b8bb72..ee88bcdf39bd 100644 --- a/core/lib/dal/.sqlx/query-729e09e0029b12156689ebe01e082cec15b0c574fd94917e82238d1294831197.json +++ b/core/lib/dal/.sqlx/query-25fb31277591dd7d5d783bd8777f1a855e76b37b6ed36ae612b551f9a6a55633.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n protocol_versions (\n id,\n timestamp,\n bootloader_code_hash,\n default_account_code_hash,\n upgrade_tx_hash,\n created_at\n )\n VALUES\n ($1, $2, $3, $4, $5, NOW()) ON CONFLICT DO NOTHING\n ", + "query": "\n INSERT INTO\n protocol_versions (\n id,\n timestamp,\n bootloader_code_hash,\n default_account_code_hash,\n upgrade_tx_hash,\n created_at\n )\n VALUES\n ($1, $2, $3, $4, $5, NOW())\n ON CONFLICT DO NOTHING\n ", "describe": { "columns": [], "parameters": { @@ -14,5 +14,5 @@ }, "nullable": [] }, - "hash": "729e09e0029b12156689ebe01e082cec15b0c574fd94917e82238d1294831197" + "hash": "25fb31277591dd7d5d783bd8777f1a855e76b37b6ed36ae612b551f9a6a55633" } diff --git a/core/lib/dal/.sqlx/query-fc1d15b1a952b050eb80db38c65e9305636d5c692804f08e96f913a877798ccb.json b/core/lib/dal/.sqlx/query-26c80e9bafcf7989e7d40c6e424240b34ce29aad3ac6571116e084d45574c448.json similarity index 79% rename from core/lib/dal/.sqlx/query-fc1d15b1a952b050eb80db38c65e9305636d5c692804f08e96f913a877798ccb.json rename to core/lib/dal/.sqlx/query-26c80e9bafcf7989e7d40c6e424240b34ce29aad3ac6571116e084d45574c448.json index bacacc211880..ee5de53d6e65 100644 --- a/core/lib/dal/.sqlx/query-fc1d15b1a952b050eb80db38c65e9305636d5c692804f08e96f913a877798ccb.json +++ b/core/lib/dal/.sqlx/query-26c80e9bafcf7989e7d40c6e424240b34ce29aad3ac6571116e084d45574c448.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT\n next_block_to_process\n FROM\n processed_events\n WHERE\n TYPE = $1\n AND chain_id = $2\n ", + "query": "\n SELECT\n next_block_to_process\n FROM\n processed_events\n WHERE\n TYPE = $1\n AND chain_id = $2\n ", "describe": { "columns": [ { @@ -29,5 +29,5 @@ false ] }, - "hash": "fc1d15b1a952b050eb80db38c65e9305636d5c692804f08e96f913a877798ccb" + "hash": "26c80e9bafcf7989e7d40c6e424240b34ce29aad3ac6571116e084d45574c448" } diff --git a/core/lib/dal/.sqlx/query-26e0b7eb1871d94ddc98254fece6381a9c4165e2727542eaeef3bbedd13a4f20.json b/core/lib/dal/.sqlx/query-26e0b7eb1871d94ddc98254fece6381a9c4165e2727542eaeef3bbedd13a4f20.json new file mode 100644 index 000000000000..30738bc2094a --- /dev/null +++ b/core/lib/dal/.sqlx/query-26e0b7eb1871d94ddc98254fece6381a9c4165e2727542eaeef3bbedd13a4f20.json @@ -0,0 +1,15 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE proof_generation_details\n SET\n status = $1,\n updated_at = NOW()\n WHERE\n l1_batch_number = $2\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Text", + "Int8" + ] + }, + "nullable": [] + }, + "hash": "26e0b7eb1871d94ddc98254fece6381a9c4165e2727542eaeef3bbedd13a4f20" +} diff --git a/core/lib/dal/.sqlx/query-27f58d66139d7fad29b2f31a4a1c836a8ffc0f71f082efca16d14ac0b897597d.json b/core/lib/dal/.sqlx/query-27f58d66139d7fad29b2f31a4a1c836a8ffc0f71f082efca16d14ac0b897597d.json deleted file mode 100644 index 071c0349c2f5..000000000000 --- a/core/lib/dal/.sqlx/query-27f58d66139d7fad29b2f31a4a1c836a8ffc0f71f082efca16d14ac0b897597d.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE\n tee_proof_generation_details\n SET\n status = $1,\n updated_at = NOW()\n WHERE\n l1_batch_number = $2\n AND tee_type = $3\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Text", - "Int8", - "Text" - ] - }, - "nullable": [] - }, - "hash": "27f58d66139d7fad29b2f31a4a1c836a8ffc0f71f082efca16d14ac0b897597d" -} diff --git a/core/lib/dal/.sqlx/query-293258ecb299be5f5e81696d14883f115cd97586bd795ee31f58fc14e56d58cb.json b/core/lib/dal/.sqlx/query-293258ecb299be5f5e81696d14883f115cd97586bd795ee31f58fc14e56d58cb.json new file mode 100644 index 000000000000..2b07c3b02e04 --- /dev/null +++ b/core/lib/dal/.sqlx/query-293258ecb299be5f5e81696d14883f115cd97586bd795ee31f58fc14e56d58cb.json @@ -0,0 +1,14 @@ +{ + "db_name": "PostgreSQL", + "query": "\n DELETE FROM events\n WHERE\n miniblock_number > $1\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8" + ] + }, + "nullable": [] + }, + "hash": "293258ecb299be5f5e81696d14883f115cd97586bd795ee31f58fc14e56d58cb" +} diff --git a/core/lib/dal/.sqlx/query-29a9350164fc0b2983f753e105a70e583b455383eec526eee3acfe6670e30f2f.json b/core/lib/dal/.sqlx/query-29a9350164fc0b2983f753e105a70e583b455383eec526eee3acfe6670e30f2f.json new file mode 100644 index 000000000000..7582e0f64e75 --- /dev/null +++ b/core/lib/dal/.sqlx/query-29a9350164fc0b2983f753e105a70e583b455383eec526eee3acfe6670e30f2f.json @@ -0,0 +1,15 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE miniblocks\n SET\n logs_bloom = data.logs_bloom\n FROM\n (\n SELECT\n UNNEST($1::BIGINT[]) AS number,\n UNNEST($2::BYTEA[]) AS logs_bloom\n ) AS data\n WHERE\n miniblocks.number = data.number\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8Array", + "ByteaArray" + ] + }, + "nullable": [] + }, + "hash": "29a9350164fc0b2983f753e105a70e583b455383eec526eee3acfe6670e30f2f" +} diff --git a/core/lib/dal/.sqlx/query-2af4a147c9172bcb6dfcd1c9808bfcde52f6856c4aaacb55fd7250823368c4a1.json b/core/lib/dal/.sqlx/query-2af4a147c9172bcb6dfcd1c9808bfcde52f6856c4aaacb55fd7250823368c4a1.json deleted file mode 100644 index 2bf1354ffec5..000000000000 --- a/core/lib/dal/.sqlx/query-2af4a147c9172bcb6dfcd1c9808bfcde52f6856c4aaacb55fd7250823368c4a1.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n DELETE FROM\n l2_to_l1_logs\n WHERE\n miniblock_number > $1\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8" - ] - }, - "nullable": [] - }, - "hash": "2af4a147c9172bcb6dfcd1c9808bfcde52f6856c4aaacb55fd7250823368c4a1" -} diff --git a/core/lib/dal/.sqlx/query-2b1aa207a058f66265acf2c21b8ed5d8007789c0fc1eab948f6d7339dfb69147.json b/core/lib/dal/.sqlx/query-2b1aa207a058f66265acf2c21b8ed5d8007789c0fc1eab948f6d7339dfb69147.json new file mode 100644 index 000000000000..96b48892516d --- /dev/null +++ b/core/lib/dal/.sqlx/query-2b1aa207a058f66265acf2c21b8ed5d8007789c0fc1eab948f6d7339dfb69147.json @@ -0,0 +1,22 @@ +{ + "db_name": "PostgreSQL", + "query": "\n DELETE FROM transactions\n WHERE\n miniblock_number IS NULL\n AND received_at < NOW() - $1::INTERVAL\n AND is_priority = FALSE\n AND error IS NULL\n RETURNING\n hash\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "hash", + "type_info": "Bytea" + } + ], + "parameters": { + "Left": [ + "Interval" + ] + }, + "nullable": [ + false + ] + }, + "hash": "2b1aa207a058f66265acf2c21b8ed5d8007789c0fc1eab948f6d7339dfb69147" +} diff --git a/core/lib/dal/.sqlx/query-2bb702d1f3bb935fd0f447ffb6bfc5bccba61861c6f6a1e807d210b25c5af830.json b/core/lib/dal/.sqlx/query-2bb702d1f3bb935fd0f447ffb6bfc5bccba61861c6f6a1e807d210b25c5af830.json deleted file mode 100644 index aef1ae8fa945..000000000000 --- a/core/lib/dal/.sqlx/query-2bb702d1f3bb935fd0f447ffb6bfc5bccba61861c6f6a1e807d210b25c5af830.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE\n transactions\n SET\n in_mempool = FALSE\n FROM\n UNNEST($1 :: bytea []) AS s (address)\n WHERE\n transactions.in_mempool = TRUE\n AND transactions.initiator_address = s.address\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "ByteaArray" - ] - }, - "nullable": [] - }, - "hash": "2bb702d1f3bb935fd0f447ffb6bfc5bccba61861c6f6a1e807d210b25c5af830" -} diff --git a/core/lib/dal/.sqlx/query-2c71a819c6ed22a3ab79675840e00f7b1176d59a83520288f5428b67ebd52130.json b/core/lib/dal/.sqlx/query-2c71a819c6ed22a3ab79675840e00f7b1176d59a83520288f5428b67ebd52130.json new file mode 100644 index 000000000000..e8e6d8e760b4 --- /dev/null +++ b/core/lib/dal/.sqlx/query-2c71a819c6ed22a3ab79675840e00f7b1176d59a83520288f5428b67ebd52130.json @@ -0,0 +1,14 @@ +{ + "db_name": "PostgreSQL", + "query": "\n DELETE FROM initial_writes\n WHERE\n l1_batch_number > $1\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8" + ] + }, + "nullable": [] + }, + "hash": "2c71a819c6ed22a3ab79675840e00f7b1176d59a83520288f5428b67ebd52130" +} diff --git a/core/lib/dal/.sqlx/query-66e4b86d23a96174ef1edcee4da70bb5b8a0a5408ccd09465225f8bf3fee551a.json b/core/lib/dal/.sqlx/query-2d1e0f2e043c193052c9cc20f9efeb5f094160627bc09db4bda2dda9a8c11c44.json similarity index 55% rename from core/lib/dal/.sqlx/query-66e4b86d23a96174ef1edcee4da70bb5b8a0a5408ccd09465225f8bf3fee551a.json rename to core/lib/dal/.sqlx/query-2d1e0f2e043c193052c9cc20f9efeb5f094160627bc09db4bda2dda9a8c11c44.json index 01666ff1eaaa..1d9c276b0786 100644 --- a/core/lib/dal/.sqlx/query-66e4b86d23a96174ef1edcee4da70bb5b8a0a5408ccd09465225f8bf3fee551a.json +++ b/core/lib/dal/.sqlx/query-2d1e0f2e043c193052c9cc20f9efeb5f094160627bc09db4bda2dda9a8c11c44.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n contracts_verification_info (address, verification_info)\n VALUES\n ($1, $2) ON CONFLICT (address) DO\n UPDATE\n SET\n verification_info = $2\n ", + "query": "\n INSERT INTO\n contracts_verification_info (address, verification_info)\n VALUES\n ($1, $2)\n ON CONFLICT (address) DO\n UPDATE\n SET\n verification_info = $2\n ", "describe": { "columns": [], "parameters": { @@ -11,5 +11,5 @@ }, "nullable": [] }, - "hash": "66e4b86d23a96174ef1edcee4da70bb5b8a0a5408ccd09465225f8bf3fee551a" + "hash": "2d1e0f2e043c193052c9cc20f9efeb5f094160627bc09db4bda2dda9a8c11c44" } diff --git a/core/lib/dal/.sqlx/query-375bfcf94a885ea91295da97a8a8f9db6cd67629c9d987f1ed7da6bdb341edfd.json b/core/lib/dal/.sqlx/query-2d8da95804a7a300ff2b756e6785c0665ee3ea4086ddb91428fa1b6a00760737.json similarity index 90% rename from core/lib/dal/.sqlx/query-375bfcf94a885ea91295da97a8a8f9db6cd67629c9d987f1ed7da6bdb341edfd.json rename to core/lib/dal/.sqlx/query-2d8da95804a7a300ff2b756e6785c0665ee3ea4086ddb91428fa1b6a00760737.json index 2968c1504b76..8b8cef7dd77e 100644 --- a/core/lib/dal/.sqlx/query-375bfcf94a885ea91295da97a8a8f9db6cd67629c9d987f1ed7da6bdb341edfd.json +++ b/core/lib/dal/.sqlx/query-2d8da95804a7a300ff2b756e6785c0665ee3ea4086ddb91428fa1b6a00760737.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT\n DISTINCT ON (hashed_key) hashed_key,\n miniblock_number,\n value\n FROM\n storage_logs\n WHERE\n hashed_key = ANY ($1)\n AND miniblock_number <= $2\n AND miniblock_number <= COALESCE(\n (\n SELECT\n MAX(number)\n FROM\n miniblocks\n ),\n (\n SELECT\n miniblock_number\n FROM\n snapshot_recovery\n )\n )\n ORDER BY\n hashed_key,\n miniblock_number DESC,\n operation_number DESC\n ", + "query": "\n SELECT DISTINCT\n ON (hashed_key) hashed_key,\n miniblock_number,\n value\n FROM\n storage_logs\n WHERE\n hashed_key = ANY ($1)\n AND miniblock_number <= $2\n AND miniblock_number <= COALESCE(\n (\n SELECT\n MAX(number)\n FROM\n miniblocks\n ),\n (\n SELECT\n miniblock_number\n FROM\n snapshot_recovery\n )\n )\n ORDER BY\n hashed_key,\n miniblock_number DESC,\n operation_number DESC\n ", "describe": { "columns": [ { @@ -31,5 +31,5 @@ false ] }, - "hash": "375bfcf94a885ea91295da97a8a8f9db6cd67629c9d987f1ed7da6bdb341edfd" + "hash": "2d8da95804a7a300ff2b756e6785c0665ee3ea4086ddb91428fa1b6a00760737" } diff --git a/core/lib/dal/.sqlx/query-d4ae7c8a220920ef6a2d34d34b6966c69a183624bd5c982a36756ac57c4b49ba.json b/core/lib/dal/.sqlx/query-2e5b9ae1b81b0abfe7a962c93b3119a0a60dc9804175b2baf8b45939c74bd583.json similarity index 68% rename from core/lib/dal/.sqlx/query-d4ae7c8a220920ef6a2d34d34b6966c69a183624bd5c982a36756ac57c4b49ba.json rename to core/lib/dal/.sqlx/query-2e5b9ae1b81b0abfe7a962c93b3119a0a60dc9804175b2baf8b45939c74bd583.json index e44206cd4a76..205487768306 100644 --- a/core/lib/dal/.sqlx/query-d4ae7c8a220920ef6a2d34d34b6966c69a183624bd5c982a36756ac57c4b49ba.json +++ b/core/lib/dal/.sqlx/query-2e5b9ae1b81b0abfe7a962c93b3119a0a60dc9804175b2baf8b45939c74bd583.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n compiler_versions (VERSION, compiler, created_at, updated_at)\n SELECT\n u.version,\n $2,\n NOW(),\n NOW()\n FROM\n UNNEST($1 :: TEXT []) AS u (VERSION) ON CONFLICT (VERSION, compiler) DO NOTHING\n ", + "query": "\n INSERT INTO\n compiler_versions (VERSION, compiler, created_at, updated_at)\n SELECT\n u.version,\n $2,\n NOW(),\n NOW()\n FROM\n UNNEST($1::TEXT[]) AS u (VERSION)\n ON CONFLICT (VERSION, compiler) DO NOTHING\n ", "describe": { "columns": [], "parameters": { @@ -11,5 +11,5 @@ }, "nullable": [] }, - "hash": "d4ae7c8a220920ef6a2d34d34b6966c69a183624bd5c982a36756ac57c4b49ba" + "hash": "2e5b9ae1b81b0abfe7a962c93b3119a0a60dc9804175b2baf8b45939c74bd583" } diff --git a/core/lib/dal/.sqlx/query-2ffa321700ef1f70a1c3f516f3162af196d586cc08ea0f23d2c568527e94b41d.json b/core/lib/dal/.sqlx/query-2ffa321700ef1f70a1c3f516f3162af196d586cc08ea0f23d2c568527e94b41d.json new file mode 100644 index 000000000000..a273eb249a4e --- /dev/null +++ b/core/lib/dal/.sqlx/query-2ffa321700ef1f70a1c3f516f3162af196d586cc08ea0f23d2c568527e94b41d.json @@ -0,0 +1,12 @@ +{ + "db_name": "PostgreSQL", + "query": "\n DELETE FROM tee_verifier_input_producer_jobs\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [] + }, + "nullable": [] + }, + "hash": "2ffa321700ef1f70a1c3f516f3162af196d586cc08ea0f23d2c568527e94b41d" +} diff --git a/core/lib/dal/.sqlx/query-307f15e00a97440868189f25e4487ed365c0369f94bc457cb162a5c876a123c7.json b/core/lib/dal/.sqlx/query-307f15e00a97440868189f25e4487ed365c0369f94bc457cb162a5c876a123c7.json new file mode 100644 index 000000000000..6c55bf34eabb --- /dev/null +++ b/core/lib/dal/.sqlx/query-307f15e00a97440868189f25e4487ed365c0369f94bc457cb162a5c876a123c7.json @@ -0,0 +1,16 @@ +{ + "db_name": "PostgreSQL", + "query": "\n INSERT INTO\n commitments (l1_batch_number, events_queue_commitment, bootloader_initial_content_commitment)\n VALUES\n ($1, $2, $3)\n ON CONFLICT (l1_batch_number) DO NOTHING\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8", + "Bytea", + "Bytea" + ] + }, + "nullable": [] + }, + "hash": "307f15e00a97440868189f25e4487ed365c0369f94bc457cb162a5c876a123c7" +} diff --git a/core/lib/dal/.sqlx/query-3099a2329d130d003bc781f5dcd2db755007951ab826147a7d5d001f12b991c6.json b/core/lib/dal/.sqlx/query-3099a2329d130d003bc781f5dcd2db755007951ab826147a7d5d001f12b991c6.json deleted file mode 100644 index 88fce3bb84b3..000000000000 --- a/core/lib/dal/.sqlx/query-3099a2329d130d003bc781f5dcd2db755007951ab826147a7d5d001f12b991c6.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n l1_batches_consensus (\n l1_batch_number,\n certificate,\n updated_at,\n created_at\n )\n VALUES\n ($1, $2, NOW(), NOW())\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8", - "Jsonb" - ] - }, - "nullable": [] - }, - "hash": "3099a2329d130d003bc781f5dcd2db755007951ab826147a7d5d001f12b991c6" -} diff --git a/core/lib/dal/.sqlx/query-f56a7eb6a82875d5151ec2c1b320328e19bed529d4bd71ca5bc7df0de1a0a463.json b/core/lib/dal/.sqlx/query-30e5c8710b1611872da06b72ac681aff512b3a9b2587b8e59848345c07dd8f3b.json similarity index 66% rename from core/lib/dal/.sqlx/query-f56a7eb6a82875d5151ec2c1b320328e19bed529d4bd71ca5bc7df0de1a0a463.json rename to core/lib/dal/.sqlx/query-30e5c8710b1611872da06b72ac681aff512b3a9b2587b8e59848345c07dd8f3b.json index 23c60a1a57c0..1ddc86f29a0a 100644 --- a/core/lib/dal/.sqlx/query-f56a7eb6a82875d5151ec2c1b320328e19bed529d4bd71ca5bc7df0de1a0a463.json +++ b/core/lib/dal/.sqlx/query-30e5c8710b1611872da06b72ac681aff512b3a9b2587b8e59848345c07dd8f3b.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n UPDATE\n tee_verifier_input_producer_jobs\n SET\n status = $1,\n updated_at = NOW(),\n time_taken = $3,\n error = $4\n WHERE\n l1_batch_number = $2\n AND status != $5\n RETURNING\n tee_verifier_input_producer_jobs.attempts\n ", + "query": "\n UPDATE tee_verifier_input_producer_jobs\n SET\n status = $1,\n updated_at = NOW(),\n time_taken = $3,\n error = $4\n WHERE\n l1_batch_number = $2\n AND status != $5\n RETURNING\n tee_verifier_input_producer_jobs.attempts\n ", "describe": { "columns": [ { @@ -48,5 +48,5 @@ false ] }, - "hash": "f56a7eb6a82875d5151ec2c1b320328e19bed529d4bd71ca5bc7df0de1a0a463" + "hash": "30e5c8710b1611872da06b72ac681aff512b3a9b2587b8e59848345c07dd8f3b" } diff --git a/core/lib/dal/.sqlx/query-311d0357c22163b893dc91f2b080f2ede5e22b0bbd8bc910cb36a91ed992bde1.json b/core/lib/dal/.sqlx/query-311d0357c22163b893dc91f2b080f2ede5e22b0bbd8bc910cb36a91ed992bde1.json new file mode 100644 index 000000000000..cabe0a3dc557 --- /dev/null +++ b/core/lib/dal/.sqlx/query-311d0357c22163b893dc91f2b080f2ede5e22b0bbd8bc910cb36a91ed992bde1.json @@ -0,0 +1,15 @@ +{ + "db_name": "PostgreSQL", + "query": "\n INSERT INTO\n l1_batches_consensus (l1_batch_number, certificate, updated_at, created_at)\n VALUES\n ($1, $2, NOW(), NOW())\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8", + "Jsonb" + ] + }, + "nullable": [] + }, + "hash": "311d0357c22163b893dc91f2b080f2ede5e22b0bbd8bc910cb36a91ed992bde1" +} diff --git a/core/lib/dal/.sqlx/query-3125669226682212fdc06c0145614be23e4bde145064157427e7c74e7facda30.json b/core/lib/dal/.sqlx/query-3125669226682212fdc06c0145614be23e4bde145064157427e7c74e7facda30.json deleted file mode 100644 index 5fa33bd7d188..000000000000 --- a/core/lib/dal/.sqlx/query-3125669226682212fdc06c0145614be23e4bde145064157427e7c74e7facda30.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n DELETE FROM\n l1_batches\n WHERE\n number > $1\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8" - ] - }, - "nullable": [] - }, - "hash": "3125669226682212fdc06c0145614be23e4bde145064157427e7c74e7facda30" -} diff --git a/core/lib/dal/.sqlx/query-335474e43a63dd08d362f5c7122b57ecda488eb062fcacbb59bd6d00b2c7703e.json b/core/lib/dal/.sqlx/query-335474e43a63dd08d362f5c7122b57ecda488eb062fcacbb59bd6d00b2c7703e.json deleted file mode 100644 index 68fc3dcf6ed8..000000000000 --- a/core/lib/dal/.sqlx/query-335474e43a63dd08d362f5c7122b57ecda488eb062fcacbb59bd6d00b2c7703e.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n vm_runner_bwip (\n l1_batch_number,\n created_at,\n updated_at,\n processing_started_at\n )\n VALUES\n ($1, NOW(), NOW(), NOW()) ON CONFLICT (l1_batch_number) DO\n UPDATE\n SET\n updated_at = NOW(),\n processing_started_at = NOW()\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8" - ] - }, - "nullable": [] - }, - "hash": "335474e43a63dd08d362f5c7122b57ecda488eb062fcacbb59bd6d00b2c7703e" -} diff --git a/core/lib/dal/.sqlx/query-33a78184559d0c0d13469fa799e2c5eeab06ff664141fa542229e7c9a46d4410.json b/core/lib/dal/.sqlx/query-33a78184559d0c0d13469fa799e2c5eeab06ff664141fa542229e7c9a46d4410.json new file mode 100644 index 000000000000..6dcc1acfd358 --- /dev/null +++ b/core/lib/dal/.sqlx/query-33a78184559d0c0d13469fa799e2c5eeab06ff664141fa542229e7c9a46d4410.json @@ -0,0 +1,34 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE transactions\n SET\n hash = data_table.hash,\n signature = data_table.signature,\n gas_limit = data_table.gas_limit,\n max_fee_per_gas = data_table.max_fee_per_gas,\n max_priority_fee_per_gas = data_table.max_priority_fee_per_gas,\n gas_per_pubdata_limit = data_table.gas_per_pubdata_limit,\n input = data_table.input,\n data = data_table.data,\n tx_format = data_table.tx_format,\n miniblock_number = $21,\n index_in_block = data_table.index_in_block,\n error = NULLIF(data_table.error, ''),\n effective_gas_price = data_table.effective_gas_price,\n execution_info = data_table.new_execution_info,\n refunded_gas = data_table.refunded_gas,\n value = data_table.value,\n contract_address = data_table.contract_address,\n paymaster = data_table.paymaster,\n paymaster_input = data_table.paymaster_input,\n in_mempool = FALSE,\n updated_at = NOW()\n FROM\n (\n SELECT\n data_table_temp.*\n FROM\n (\n SELECT\n UNNEST($1::bytea[]) AS initiator_address,\n UNNEST($2::INT[]) AS nonce,\n UNNEST($3::bytea[]) AS hash,\n UNNEST($4::bytea[]) AS signature,\n UNNEST($5::NUMERIC[]) AS gas_limit,\n UNNEST($6::NUMERIC[]) AS max_fee_per_gas,\n UNNEST($7::NUMERIC[]) AS max_priority_fee_per_gas,\n UNNEST($8::NUMERIC[]) AS gas_per_pubdata_limit,\n UNNEST($9::INT[]) AS tx_format,\n UNNEST($10::INTEGER[]) AS index_in_block,\n UNNEST($11::VARCHAR[]) AS error,\n UNNEST($12::NUMERIC[]) AS effective_gas_price,\n UNNEST($13::jsonb[]) AS new_execution_info,\n UNNEST($14::bytea[]) AS input,\n UNNEST($15::jsonb[]) AS data,\n UNNEST($16::BIGINT[]) AS refunded_gas,\n UNNEST($17::NUMERIC[]) AS value,\n UNNEST($18::bytea[]) AS contract_address,\n UNNEST($19::bytea[]) AS paymaster,\n UNNEST($20::bytea[]) AS paymaster_input\n ) AS data_table_temp\n JOIN transactions ON transactions.initiator_address = data_table_temp.initiator_address\n AND transactions.nonce = data_table_temp.nonce\n ORDER BY\n transactions.hash\n ) AS data_table\n WHERE\n transactions.initiator_address = data_table.initiator_address\n AND transactions.nonce = data_table.nonce\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "ByteaArray", + "Int4Array", + "ByteaArray", + "ByteaArray", + "NumericArray", + "NumericArray", + "NumericArray", + "NumericArray", + "Int4Array", + "Int4Array", + "VarcharArray", + "NumericArray", + "JsonbArray", + "ByteaArray", + "JsonbArray", + "Int8Array", + "NumericArray", + "ByteaArray", + "ByteaArray", + "ByteaArray", + "Int8" + ] + }, + "nullable": [] + }, + "hash": "33a78184559d0c0d13469fa799e2c5eeab06ff664141fa542229e7c9a46d4410" +} diff --git a/core/lib/dal/.sqlx/query-346d2bc8ba252a17d5d0918e1b7ae976ea533143b0eb0644612e926624d710f0.json b/core/lib/dal/.sqlx/query-346d2bc8ba252a17d5d0918e1b7ae976ea533143b0eb0644612e926624d710f0.json deleted file mode 100644 index 5eb6fed45aec..000000000000 --- a/core/lib/dal/.sqlx/query-346d2bc8ba252a17d5d0918e1b7ae976ea533143b0eb0644612e926624d710f0.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n DELETE FROM\n eth_txs\n WHERE\n id >= (\n SELECT\n MIN(id)\n FROM\n eth_txs\n WHERE\n has_failed = TRUE\n )\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [] - }, - "nullable": [] - }, - "hash": "346d2bc8ba252a17d5d0918e1b7ae976ea533143b0eb0644612e926624d710f0" -} diff --git a/core/lib/dal/.sqlx/query-f773adbbc1587e69fa8665806fde81314e65b27790b9946a58c95f2fbe6fb664.json b/core/lib/dal/.sqlx/query-3490fe0b778a03c73111bf8cbf426b0b3185a231bbf0b8b132a1a95bc157e827.json similarity index 83% rename from core/lib/dal/.sqlx/query-f773adbbc1587e69fa8665806fde81314e65b27790b9946a58c95f2fbe6fb664.json rename to core/lib/dal/.sqlx/query-3490fe0b778a03c73111bf8cbf426b0b3185a231bbf0b8b132a1a95bc157e827.json index c9f136d3d5a7..3275e94936a1 100644 --- a/core/lib/dal/.sqlx/query-f773adbbc1587e69fa8665806fde81314e65b27790b9946a58c95f2fbe6fb664.json +++ b/core/lib/dal/.sqlx/query-3490fe0b778a03c73111bf8cbf426b0b3185a231bbf0b8b132a1a95bc157e827.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT\n hashed_key,\n l1_batch_number,\n INDEX\n FROM\n initial_writes\n WHERE\n hashed_key = ANY ($1 :: bytea [])\n ", + "query": "\n SELECT\n hashed_key,\n l1_batch_number,\n INDEX\n FROM\n initial_writes\n WHERE\n hashed_key = ANY ($1::bytea[])\n ", "describe": { "columns": [ { @@ -30,5 +30,5 @@ false ] }, - "hash": "f773adbbc1587e69fa8665806fde81314e65b27790b9946a58c95f2fbe6fb664" + "hash": "3490fe0b778a03c73111bf8cbf426b0b3185a231bbf0b8b132a1a95bc157e827" } diff --git a/core/lib/dal/.sqlx/query-0feeb221b1d18eb2331c88696d1f3c13834347e2bf7a90d2113a2e0d623c6122.json b/core/lib/dal/.sqlx/query-3518a3e93da8115b54426d72aea0800383e6b73a8b48dc3e589a29a4367cbb5a.json similarity index 65% rename from core/lib/dal/.sqlx/query-0feeb221b1d18eb2331c88696d1f3c13834347e2bf7a90d2113a2e0d623c6122.json rename to core/lib/dal/.sqlx/query-3518a3e93da8115b54426d72aea0800383e6b73a8b48dc3e589a29a4367cbb5a.json index e2dde4b61943..a2351b5eef86 100644 --- a/core/lib/dal/.sqlx/query-0feeb221b1d18eb2331c88696d1f3c13834347e2bf7a90d2113a2e0d623c6122.json +++ b/core/lib/dal/.sqlx/query-3518a3e93da8115b54426d72aea0800383e6b73a8b48dc3e589a29a4367cbb5a.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n call_traces (tx_hash, call_trace)\n SELECT\n u.tx_hash,\n u.call_trace\n FROM\n UNNEST($1 :: bytea [], $2 :: bytea []) AS u (tx_hash, call_trace)\n ", + "query": "\n INSERT INTO\n call_traces (tx_hash, call_trace)\n SELECT\n u.tx_hash,\n u.call_trace\n FROM\n UNNEST($1::bytea[], $2::bytea[]) AS u (tx_hash, call_trace)\n ", "describe": { "columns": [], "parameters": { @@ -11,5 +11,5 @@ }, "nullable": [] }, - "hash": "0feeb221b1d18eb2331c88696d1f3c13834347e2bf7a90d2113a2e0d623c6122" + "hash": "3518a3e93da8115b54426d72aea0800383e6b73a8b48dc3e589a29a4367cbb5a" } diff --git a/core/lib/dal/.sqlx/query-369736a602fe2ebf7392ca171581d5b68fb9450d17372701907905bb74af844a.json b/core/lib/dal/.sqlx/query-369736a602fe2ebf7392ca171581d5b68fb9450d17372701907905bb74af844a.json deleted file mode 100644 index 2a8279ede649..000000000000 --- a/core/lib/dal/.sqlx/query-369736a602fe2ebf7392ca171581d5b68fb9450d17372701907905bb74af844a.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n DELETE FROM\n transactions\n WHERE\n in_mempool = TRUE\n AND initiator_address = ANY ($1)\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "ByteaArray" - ] - }, - "nullable": [] - }, - "hash": "369736a602fe2ebf7392ca171581d5b68fb9450d17372701907905bb74af844a" -} diff --git a/core/lib/dal/.sqlx/query-19188b9e92b0cc5660c851baccc6f9ce57c51198af167ec2b98944659ba0c53a.json b/core/lib/dal/.sqlx/query-37890022be6b5e893cf051266fa16618914d6dedb39a9a40d36484741e8b01f4.json similarity index 66% rename from core/lib/dal/.sqlx/query-19188b9e92b0cc5660c851baccc6f9ce57c51198af167ec2b98944659ba0c53a.json rename to core/lib/dal/.sqlx/query-37890022be6b5e893cf051266fa16618914d6dedb39a9a40d36484741e8b01f4.json index 1a8e517096db..a39a1bdb07b8 100644 --- a/core/lib/dal/.sqlx/query-19188b9e92b0cc5660c851baccc6f9ce57c51198af167ec2b98944659ba0c53a.json +++ b/core/lib/dal/.sqlx/query-37890022be6b5e893cf051266fa16618914d6dedb39a9a40d36484741e8b01f4.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n tee_attestations (pubkey, attestation)\n VALUES\n ($1, $2) ON CONFLICT (pubkey) DO NOTHING\n ", + "query": "\n INSERT INTO\n tee_attestations (pubkey, attestation)\n VALUES\n ($1, $2)\n ON CONFLICT (pubkey) DO NOTHING\n ", "describe": { "columns": [], "parameters": { @@ -11,5 +11,5 @@ }, "nullable": [] }, - "hash": "19188b9e92b0cc5660c851baccc6f9ce57c51198af167ec2b98944659ba0c53a" + "hash": "37890022be6b5e893cf051266fa16618914d6dedb39a9a40d36484741e8b01f4" } diff --git a/core/lib/dal/.sqlx/query-380b3a40db65f66f502cc7e696254682bd852c4a54387f92b3f633b5a5899c93.json b/core/lib/dal/.sqlx/query-380b3a40db65f66f502cc7e696254682bd852c4a54387f92b3f633b5a5899c93.json deleted file mode 100644 index 58bee6e42eec..000000000000 --- a/core/lib/dal/.sqlx/query-380b3a40db65f66f502cc7e696254682bd852c4a54387f92b3f633b5a5899c93.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE\n tokens\n SET\n well_known = TRUE,\n updated_at = NOW()\n WHERE\n l1_address = $1\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Bytea" - ] - }, - "nullable": [] - }, - "hash": "380b3a40db65f66f502cc7e696254682bd852c4a54387f92b3f633b5a5899c93" -} diff --git a/core/lib/dal/.sqlx/query-39415f0debcf35d8cd85b04866861c816f583c69a64b7768887ecce434b829fd.json b/core/lib/dal/.sqlx/query-39415f0debcf35d8cd85b04866861c816f583c69a64b7768887ecce434b829fd.json deleted file mode 100644 index 831782fdbd19..000000000000 --- a/core/lib/dal/.sqlx/query-39415f0debcf35d8cd85b04866861c816f583c69a64b7768887ecce434b829fd.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n DELETE FROM\n tokens\n WHERE\n l2_address = ANY ($1)\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "ByteaArray" - ] - }, - "nullable": [] - }, - "hash": "39415f0debcf35d8cd85b04866861c816f583c69a64b7768887ecce434b829fd" -} diff --git a/core/lib/dal/.sqlx/query-3a6417f3ac8889a8db762d1f1820c1f7b0d68b747e3a75a63d60ccd0982c7fde.json b/core/lib/dal/.sqlx/query-3a6417f3ac8889a8db762d1f1820c1f7b0d68b747e3a75a63d60ccd0982c7fde.json deleted file mode 100644 index cff34c9d5af3..000000000000 --- a/core/lib/dal/.sqlx/query-3a6417f3ac8889a8db762d1f1820c1f7b0d68b747e3a75a63d60ccd0982c7fde.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n DELETE FROM\n l1_batches\n WHERE\n number <= $1\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8" - ] - }, - "nullable": [] - }, - "hash": "3a6417f3ac8889a8db762d1f1820c1f7b0d68b747e3a75a63d60ccd0982c7fde" -} diff --git a/core/lib/dal/.sqlx/query-3a82d9a45f4a90b8baf82f3e281618217af059a796e4a3cc0f5269709f7ffd49.json b/core/lib/dal/.sqlx/query-3a82d9a45f4a90b8baf82f3e281618217af059a796e4a3cc0f5269709f7ffd49.json new file mode 100644 index 000000000000..cb33b4c64874 --- /dev/null +++ b/core/lib/dal/.sqlx/query-3a82d9a45f4a90b8baf82f3e281618217af059a796e4a3cc0f5269709f7ffd49.json @@ -0,0 +1,14 @@ +{ + "db_name": "PostgreSQL", + "query": "\n DELETE FROM l1_batches\n WHERE\n number <= $1\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8" + ] + }, + "nullable": [] + }, + "hash": "3a82d9a45f4a90b8baf82f3e281618217af059a796e4a3cc0f5269709f7ffd49" +} diff --git a/core/lib/dal/.sqlx/query-3b4d5009ec22f54cc7d305aa11d96ec397767a063dc21aa3add974cb9b070361.json b/core/lib/dal/.sqlx/query-3b4d5009ec22f54cc7d305aa11d96ec397767a063dc21aa3add974cb9b070361.json new file mode 100644 index 000000000000..38890ae58f2e --- /dev/null +++ b/core/lib/dal/.sqlx/query-3b4d5009ec22f54cc7d305aa11d96ec397767a063dc21aa3add974cb9b070361.json @@ -0,0 +1,16 @@ +{ + "db_name": "PostgreSQL", + "query": "\n INSERT INTO\n factory_deps (bytecode_hash, bytecode, miniblock_number, created_at, updated_at)\n SELECT\n u.bytecode_hash,\n u.bytecode,\n $3,\n NOW(),\n NOW()\n FROM\n UNNEST($1::bytea[], $2::bytea[]) AS u (bytecode_hash, bytecode)\n ON CONFLICT (bytecode_hash) DO NOTHING\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "ByteaArray", + "ByteaArray", + "Int8" + ] + }, + "nullable": [] + }, + "hash": "3b4d5009ec22f54cc7d305aa11d96ec397767a063dc21aa3add974cb9b070361" +} diff --git a/core/lib/dal/.sqlx/query-c6902d8bcfb4d04e11229683cd4295d973d60b5a02c628bb0f38dd00f3396b3b.json b/core/lib/dal/.sqlx/query-3ddb13ffbafae2374527886e592b3c0210383d8698f6f84f694fece9fd59f3d5.json similarity index 63% rename from core/lib/dal/.sqlx/query-c6902d8bcfb4d04e11229683cd4295d973d60b5a02c628bb0f38dd00f3396b3b.json rename to core/lib/dal/.sqlx/query-3ddb13ffbafae2374527886e592b3c0210383d8698f6f84f694fece9fd59f3d5.json index 5909adff5425..5652e186ceb9 100644 --- a/core/lib/dal/.sqlx/query-c6902d8bcfb4d04e11229683cd4295d973d60b5a02c628bb0f38dd00f3396b3b.json +++ b/core/lib/dal/.sqlx/query-3ddb13ffbafae2374527886e592b3c0210383d8698f6f84f694fece9fd59f3d5.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n protocol_patches (minor, patch, snark_wrapper_vk_hash, created_at)\n VALUES\n ($1, $2, $3, NOW()) ON CONFLICT DO NOTHING\n ", + "query": "\n INSERT INTO\n protocol_patches (minor, patch, snark_wrapper_vk_hash, created_at)\n VALUES\n ($1, $2, $3, NOW())\n ON CONFLICT DO NOTHING\n ", "describe": { "columns": [], "parameters": { @@ -12,5 +12,5 @@ }, "nullable": [] }, - "hash": "c6902d8bcfb4d04e11229683cd4295d973d60b5a02c628bb0f38dd00f3396b3b" + "hash": "3ddb13ffbafae2374527886e592b3c0210383d8698f6f84f694fece9fd59f3d5" } diff --git a/core/lib/dal/.sqlx/query-3ea010bc3e3267e48decf025cb99b3253ea21b3eac3c1df1921e040e3f059aac.json b/core/lib/dal/.sqlx/query-3ea010bc3e3267e48decf025cb99b3253ea21b3eac3c1df1921e040e3f059aac.json deleted file mode 100644 index 5b40796b21db..000000000000 --- a/core/lib/dal/.sqlx/query-3ea010bc3e3267e48decf025cb99b3253ea21b3eac3c1df1921e040e3f059aac.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE\n transactions\n SET\n in_mempool = FALSE\n WHERE\n in_mempool = TRUE\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [] - }, - "nullable": [] - }, - "hash": "3ea010bc3e3267e48decf025cb99b3253ea21b3eac3c1df1921e040e3f059aac" -} diff --git a/core/lib/dal/.sqlx/query-3f0966f082e9e7cdfa18c107a1283b7955a058705093d7372726c3fc7ce506ad.json b/core/lib/dal/.sqlx/query-3f0966f082e9e7cdfa18c107a1283b7955a058705093d7372726c3fc7ce506ad.json new file mode 100644 index 000000000000..7b95614bfdff --- /dev/null +++ b/core/lib/dal/.sqlx/query-3f0966f082e9e7cdfa18c107a1283b7955a058705093d7372726c3fc7ce506ad.json @@ -0,0 +1,14 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE vm_runner_protective_reads\n SET\n time_taken = NOW() - processing_started_at\n WHERE\n l1_batch_number = $1\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8" + ] + }, + "nullable": [] + }, + "hash": "3f0966f082e9e7cdfa18c107a1283b7955a058705093d7372726c3fc7ce506ad" +} diff --git a/core/lib/dal/.sqlx/query-3f9543c622a3877dd8612f3fc5f31867b3c0bff34bbacbc31ff4cd786c97ca90.json b/core/lib/dal/.sqlx/query-3f9543c622a3877dd8612f3fc5f31867b3c0bff34bbacbc31ff4cd786c97ca90.json new file mode 100644 index 000000000000..72d008c11475 --- /dev/null +++ b/core/lib/dal/.sqlx/query-3f9543c622a3877dd8612f3fc5f31867b3c0bff34bbacbc31ff4cd786c97ca90.json @@ -0,0 +1,12 @@ +{ + "db_name": "PostgreSQL", + "query": "\n DELETE FROM l1_batches_consensus\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [] + }, + "nullable": [] + }, + "hash": "3f9543c622a3877dd8612f3fc5f31867b3c0bff34bbacbc31ff4cd786c97ca90" +} diff --git a/core/lib/dal/.sqlx/query-3fc77acab04760b40d49ffe42e616b8b569a196df3ebf75ee779665ec53d1187.json b/core/lib/dal/.sqlx/query-3fc77acab04760b40d49ffe42e616b8b569a196df3ebf75ee779665ec53d1187.json deleted file mode 100644 index 57710d380a5a..000000000000 --- a/core/lib/dal/.sqlx/query-3fc77acab04760b40d49ffe42e616b8b569a196df3ebf75ee779665ec53d1187.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n WITH soft AS (\n SELECT\n pruned_l1_batch,\n pruned_miniblock\n FROM\n pruning_log\n WHERE\n TYPE = 'Soft'\n ORDER BY\n pruned_l1_batch DESC\n LIMIT\n 1\n ), hard AS (\n SELECT\n pruned_l1_batch,\n pruned_miniblock\n FROM\n pruning_log\n WHERE\n TYPE = 'Hard'\n ORDER BY\n pruned_l1_batch DESC\n LIMIT\n 1\n )\n SELECT\n soft.pruned_l1_batch AS last_soft_pruned_l1_batch,\n soft.pruned_miniblock AS last_soft_pruned_miniblock,\n hard.pruned_l1_batch AS last_hard_pruned_l1_batch,\n hard.pruned_miniblock AS last_hard_pruned_miniblock\n FROM\n soft FULL\n JOIN hard ON TRUE\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "last_soft_pruned_l1_batch", - "type_info": "Int8" - }, - { - "ordinal": 1, - "name": "last_soft_pruned_miniblock", - "type_info": "Int8" - }, - { - "ordinal": 2, - "name": "last_hard_pruned_l1_batch", - "type_info": "Int8" - }, - { - "ordinal": 3, - "name": "last_hard_pruned_miniblock", - "type_info": "Int8" - } - ], - "parameters": { - "Left": [] - }, - "nullable": [ - true, - true, - true, - true - ] - }, - "hash": "3fc77acab04760b40d49ffe42e616b8b569a196df3ebf75ee779665ec53d1187" -} diff --git a/core/lib/dal/.sqlx/query-404dca0439d8c2682848049026d6e4da6574f78094cbbc8eb27b9b273a96aa10.json b/core/lib/dal/.sqlx/query-404dca0439d8c2682848049026d6e4da6574f78094cbbc8eb27b9b273a96aa10.json deleted file mode 100644 index 152eff7d7706..000000000000 --- a/core/lib/dal/.sqlx/query-404dca0439d8c2682848049026d6e4da6574f78094cbbc8eb27b9b273a96aa10.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n DELETE FROM\n vm_runner_bwip\n WHERE\n l1_batch_number > $1\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8" - ] - }, - "nullable": [] - }, - "hash": "404dca0439d8c2682848049026d6e4da6574f78094cbbc8eb27b9b273a96aa10" -} diff --git a/core/lib/dal/.sqlx/query-abea8d1555215836299a2e640e8440e65af4ac1cbd81ae1bce16e74927ddfa7b.json b/core/lib/dal/.sqlx/query-406e51d7884cdff36632ccf97912484f0a0d76a8097b61ead5f1f20301ce524d.json similarity index 61% rename from core/lib/dal/.sqlx/query-abea8d1555215836299a2e640e8440e65af4ac1cbd81ae1bce16e74927ddfa7b.json rename to core/lib/dal/.sqlx/query-406e51d7884cdff36632ccf97912484f0a0d76a8097b61ead5f1f20301ce524d.json index 6b0bfd88cf42..cc3c2a344eb4 100644 --- a/core/lib/dal/.sqlx/query-abea8d1555215836299a2e640e8440e65af4ac1cbd81ae1bce16e74927ddfa7b.json +++ b/core/lib/dal/.sqlx/query-406e51d7884cdff36632ccf97912484f0a0d76a8097b61ead5f1f20301ce524d.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n snapshots (\n VERSION,\n l1_batch_number,\n storage_logs_filepaths,\n factory_deps_filepath,\n created_at,\n updated_at\n )\n VALUES\n (\n $1,\n $2,\n ARRAY_FILL('' :: TEXT, ARRAY [$3::INTEGER]),\n $4,\n NOW(),\n NOW()\n )\n ", + "query": "\n INSERT INTO\n snapshots (\n VERSION,\n l1_batch_number,\n storage_logs_filepaths,\n factory_deps_filepath,\n created_at,\n updated_at\n )\n VALUES\n ($1, $2, ARRAY_FILL(''::TEXT, ARRAY[$3::INTEGER]), $4, NOW(), NOW())\n ", "describe": { "columns": [], "parameters": { @@ -13,5 +13,5 @@ }, "nullable": [] }, - "hash": "abea8d1555215836299a2e640e8440e65af4ac1cbd81ae1bce16e74927ddfa7b" + "hash": "406e51d7884cdff36632ccf97912484f0a0d76a8097b61ead5f1f20301ce524d" } diff --git a/core/lib/dal/.sqlx/query-ff38c42f0dc6fd3b3976a3b36f41c10b9ae1a80fe6b6a9bb50ee4bfe849f398d.json b/core/lib/dal/.sqlx/query-40c17194a2089a7d3fa6b7923c9e03def94f4bf4674def1893e2232be80f57a0.json similarity index 64% rename from core/lib/dal/.sqlx/query-ff38c42f0dc6fd3b3976a3b36f41c10b9ae1a80fe6b6a9bb50ee4bfe849f398d.json rename to core/lib/dal/.sqlx/query-40c17194a2089a7d3fa6b7923c9e03def94f4bf4674def1893e2232be80f57a0.json index 4a34be40cca0..c655704fd842 100644 --- a/core/lib/dal/.sqlx/query-ff38c42f0dc6fd3b3976a3b36f41c10b9ae1a80fe6b6a9bb50ee4bfe849f398d.json +++ b/core/lib/dal/.sqlx/query-40c17194a2089a7d3fa6b7923c9e03def94f4bf4674def1893e2232be80f57a0.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n contract_verification_requests (\n contract_address,\n source_code,\n contract_name,\n zk_compiler_version,\n compiler_version,\n optimization_used,\n optimizer_mode,\n constructor_arguments,\n is_system,\n force_evmla,\n status,\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 'queued',\n NOW(),\n NOW()\n )\n RETURNING\n id\n ", + "query": "\n INSERT INTO\n contract_verification_requests (\n contract_address,\n source_code,\n contract_name,\n zk_compiler_version,\n compiler_version,\n optimization_used,\n optimizer_mode,\n constructor_arguments,\n is_system,\n force_evmla,\n status,\n created_at,\n updated_at\n )\n VALUES\n ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, 'queued', NOW(), NOW())\n RETURNING\n id\n ", "describe": { "columns": [ { @@ -27,5 +27,5 @@ false ] }, - "hash": "ff38c42f0dc6fd3b3976a3b36f41c10b9ae1a80fe6b6a9bb50ee4bfe849f398d" + "hash": "40c17194a2089a7d3fa6b7923c9e03def94f4bf4674def1893e2232be80f57a0" } diff --git a/core/lib/dal/.sqlx/query-414749a3d8d1ac4f2c66b386df47d113257cca7a7fc6c8036b61cc0e005099a8.json b/core/lib/dal/.sqlx/query-414749a3d8d1ac4f2c66b386df47d113257cca7a7fc6c8036b61cc0e005099a8.json new file mode 100644 index 000000000000..e0c5103fac90 --- /dev/null +++ b/core/lib/dal/.sqlx/query-414749a3d8d1ac4f2c66b386df47d113257cca7a7fc6c8036b61cc0e005099a8.json @@ -0,0 +1,16 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE tee_proof_generation_details\n SET\n status = $1,\n updated_at = NOW()\n WHERE\n l1_batch_number = $2\n AND tee_type = $3\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Text", + "Int8", + "Text" + ] + }, + "nullable": [] + }, + "hash": "414749a3d8d1ac4f2c66b386df47d113257cca7a7fc6c8036b61cc0e005099a8" +} diff --git a/core/lib/dal/.sqlx/query-44ec5b4d2218099da30aa8d654f7445aa3148d8abdd4e5fb50947ce512f53690.json b/core/lib/dal/.sqlx/query-44ec5b4d2218099da30aa8d654f7445aa3148d8abdd4e5fb50947ce512f53690.json new file mode 100644 index 000000000000..43b00071bd4c --- /dev/null +++ b/core/lib/dal/.sqlx/query-44ec5b4d2218099da30aa8d654f7445aa3148d8abdd4e5fb50947ce512f53690.json @@ -0,0 +1,14 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE consensus_replica_state\n SET\n global_config = $1\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Jsonb" + ] + }, + "nullable": [] + }, + "hash": "44ec5b4d2218099da30aa8d654f7445aa3148d8abdd4e5fb50947ce512f53690" +} diff --git a/core/lib/dal/.sqlx/query-45372b701c23ce782695f11f846a75893ee5b1b94b6d0f25f1db5342888a2a30.json b/core/lib/dal/.sqlx/query-45372b701c23ce782695f11f846a75893ee5b1b94b6d0f25f1db5342888a2a30.json new file mode 100644 index 000000000000..0567a415ac16 --- /dev/null +++ b/core/lib/dal/.sqlx/query-45372b701c23ce782695f11f846a75893ee5b1b94b6d0f25f1db5342888a2a30.json @@ -0,0 +1,15 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE eth_txs\n SET\n chain_id = $1\n WHERE\n id = $2\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8", + "Int4" + ] + }, + "nullable": [] + }, + "hash": "45372b701c23ce782695f11f846a75893ee5b1b94b6d0f25f1db5342888a2a30" +} diff --git a/core/lib/dal/.sqlx/query-dae7b7ab08a3397a4e587ebe40e79903fb3c9eaed968af5638a6f94bae2e7bb3.json b/core/lib/dal/.sqlx/query-45a968c6d667b13bbe9d895e7734fc05eaa158a6f38a87187d7f2c2068a0112a.json similarity index 81% rename from core/lib/dal/.sqlx/query-dae7b7ab08a3397a4e587ebe40e79903fb3c9eaed968af5638a6f94bae2e7bb3.json rename to core/lib/dal/.sqlx/query-45a968c6d667b13bbe9d895e7734fc05eaa158a6f38a87187d7f2c2068a0112a.json index 3f2990ef3567..36da129b5b77 100644 --- a/core/lib/dal/.sqlx/query-dae7b7ab08a3397a4e587ebe40e79903fb3c9eaed968af5638a6f94bae2e7bb3.json +++ b/core/lib/dal/.sqlx/query-45a968c6d667b13bbe9d895e7734fc05eaa158a6f38a87187d7f2c2068a0112a.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n eth_txs_history (\n eth_tx_id,\n base_fee_per_gas,\n priority_fee_per_gas,\n tx_hash,\n signed_raw_tx,\n created_at,\n updated_at,\n blob_base_fee_per_gas,\n sent_at_block,\n sent_at\n )\n VALUES\n ($1, $2, $3, $4, $5, NOW(), NOW(), $6, $7, NOW()) ON CONFLICT (tx_hash) DO NOTHING\n RETURNING\n id\n ", + "query": "\n INSERT INTO\n eth_txs_history (\n eth_tx_id,\n base_fee_per_gas,\n priority_fee_per_gas,\n tx_hash,\n signed_raw_tx,\n created_at,\n updated_at,\n blob_base_fee_per_gas,\n sent_at_block,\n sent_at\n )\n VALUES\n ($1, $2, $3, $4, $5, NOW(), NOW(), $6, $7, NOW())\n ON CONFLICT (tx_hash) DO NOTHING\n RETURNING\n id\n ", "describe": { "columns": [ { @@ -24,5 +24,5 @@ false ] }, - "hash": "dae7b7ab08a3397a4e587ebe40e79903fb3c9eaed968af5638a6f94bae2e7bb3" + "hash": "45a968c6d667b13bbe9d895e7734fc05eaa158a6f38a87187d7f2c2068a0112a" } diff --git a/core/lib/dal/.sqlx/query-466c76cff08259849d87d3596dad590df2d0633fb5e58f600fe5a87012bc998d.json b/core/lib/dal/.sqlx/query-466c76cff08259849d87d3596dad590df2d0633fb5e58f600fe5a87012bc998d.json deleted file mode 100644 index a8a23f222060..000000000000 --- a/core/lib/dal/.sqlx/query-466c76cff08259849d87d3596dad590df2d0633fb5e58f600fe5a87012bc998d.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n WITH new_logs AS MATERIALIZED (\n SELECT\n DISTINCT ON (hashed_key) hashed_key,\n miniblock_number,\n operation_number\n FROM\n storage_logs\n WHERE\n miniblock_number BETWEEN $1 AND $2\n ORDER BY\n hashed_key,\n miniblock_number DESC,\n operation_number DESC\n )\n DELETE FROM\n storage_logs USING new_logs\n WHERE\n storage_logs.hashed_key = new_logs.hashed_key\n AND storage_logs.miniblock_number <= $2\n AND (\n storage_logs.miniblock_number,\n storage_logs.operation_number\n ) < (\n new_logs.miniblock_number,\n new_logs.operation_number\n )\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8", - "Int8" - ] - }, - "nullable": [] - }, - "hash": "466c76cff08259849d87d3596dad590df2d0633fb5e58f600fe5a87012bc998d" -} diff --git a/core/lib/dal/.sqlx/query-4694e5534f7d2a3b9a49d097ec659d96738d6bccaa175362cc554eddb3b26262.json b/core/lib/dal/.sqlx/query-4694e5534f7d2a3b9a49d097ec659d96738d6bccaa175362cc554eddb3b26262.json deleted file mode 100644 index 76e3e5d4df62..000000000000 --- a/core/lib/dal/.sqlx/query-4694e5534f7d2a3b9a49d097ec659d96738d6bccaa175362cc554eddb3b26262.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE\n contract_verification_requests\n SET\n status = 'successful',\n updated_at = NOW()\n WHERE\n id = $1\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8" - ] - }, - "nullable": [] - }, - "hash": "4694e5534f7d2a3b9a49d097ec659d96738d6bccaa175362cc554eddb3b26262" -} diff --git a/core/lib/dal/.sqlx/query-469db79fcf8d692507317080e0d843620210aff3a9a7aa8a249db50c1c56d927.json b/core/lib/dal/.sqlx/query-469db79fcf8d692507317080e0d843620210aff3a9a7aa8a249db50c1c56d927.json new file mode 100644 index 000000000000..fe91d27abb11 --- /dev/null +++ b/core/lib/dal/.sqlx/query-469db79fcf8d692507317080e0d843620210aff3a9a7aa8a249db50c1c56d927.json @@ -0,0 +1,20 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE transactions\n SET\n miniblock_number = $1,\n index_in_block = data_table.index_in_block,\n error = NULLIF(data_table.error, ''),\n in_mempool = FALSE,\n execution_info = execution_info || data_table.new_execution_info,\n refunded_gas = data_table.refunded_gas,\n effective_gas_price = data_table.effective_gas_price,\n updated_at = NOW()\n FROM\n (\n SELECT\n UNNEST($2::bytea[]) AS hash,\n UNNEST($3::INTEGER[]) AS index_in_block,\n UNNEST($4::VARCHAR[]) AS error,\n UNNEST($5::jsonb[]) AS new_execution_info,\n UNNEST($6::BIGINT[]) AS refunded_gas,\n UNNEST($7::NUMERIC[]) AS effective_gas_price\n ) AS data_table\n WHERE\n transactions.hash = data_table.hash\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8", + "ByteaArray", + "Int4Array", + "VarcharArray", + "JsonbArray", + "Int8Array", + "NumericArray" + ] + }, + "nullable": [] + }, + "hash": "469db79fcf8d692507317080e0d843620210aff3a9a7aa8a249db50c1c56d927" +} diff --git a/core/lib/dal/.sqlx/query-482bee9b383b17bddf819b977a012e49a65da26212e6d676abffb9d137aa3c2e.json b/core/lib/dal/.sqlx/query-482bee9b383b17bddf819b977a012e49a65da26212e6d676abffb9d137aa3c2e.json new file mode 100644 index 000000000000..f0fca373443a --- /dev/null +++ b/core/lib/dal/.sqlx/query-482bee9b383b17bddf819b977a012e49a65da26212e6d676abffb9d137aa3c2e.json @@ -0,0 +1,14 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE miniblocks\n SET\n logs_bloom = NULL\n WHERE\n number = $1\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8" + ] + }, + "nullable": [] + }, + "hash": "482bee9b383b17bddf819b977a012e49a65da26212e6d676abffb9d137aa3c2e" +} diff --git a/core/lib/dal/.sqlx/query-4ae097f244938d39a735735f75b3b18a1bd18b922640d3ae70ae0b9bfde8effc.json b/core/lib/dal/.sqlx/query-4ae097f244938d39a735735f75b3b18a1bd18b922640d3ae70ae0b9bfde8effc.json deleted file mode 100644 index 85024ecd8b8b..000000000000 --- a/core/lib/dal/.sqlx/query-4ae097f244938d39a735735f75b3b18a1bd18b922640d3ae70ae0b9bfde8effc.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE\n proof_generation_details\n SET\n status = 'unpicked',\n updated_at = NOW()\n WHERE\n l1_batch_number = $1\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8" - ] - }, - "nullable": [] - }, - "hash": "4ae097f244938d39a735735f75b3b18a1bd18b922640d3ae70ae0b9bfde8effc" -} diff --git a/core/lib/dal/.sqlx/query-0f4a7d7c5e737a1f232a2db675557ae62a53e1fa4834acc82c18e265867b69d9.json b/core/lib/dal/.sqlx/query-4aeb7dcd79000540c03fb12c0608ab71005d70f13ed32172e47166f71b3aef80.json similarity index 55% rename from core/lib/dal/.sqlx/query-0f4a7d7c5e737a1f232a2db675557ae62a53e1fa4834acc82c18e265867b69d9.json rename to core/lib/dal/.sqlx/query-4aeb7dcd79000540c03fb12c0608ab71005d70f13ed32172e47166f71b3aef80.json index 5d12a9d122ae..feb8f29855e4 100644 --- a/core/lib/dal/.sqlx/query-0f4a7d7c5e737a1f232a2db675557ae62a53e1fa4834acc82c18e265867b69d9.json +++ b/core/lib/dal/.sqlx/query-4aeb7dcd79000540c03fb12c0608ab71005d70f13ed32172e47166f71b3aef80.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT\n nonce\n FROM\n eth_txs\n WHERE\n from_addr IS NOT DISTINCT\n FROM\n $1 -- can't just use equality as NULL != NULL\\\n AND is_gateway = $2\n ORDER BY\n id DESC\n LIMIT\n 1\n ", + "query": "\n SELECT\n nonce\n FROM\n eth_txs\n WHERE\n from_addr IS NOT DISTINCT FROM $1 -- can't just use equality as NULL != NULL\\\n AND is_gateway = $2\n ORDER BY\n id DESC\n LIMIT\n 1\n ", "describe": { "columns": [ { @@ -19,5 +19,5 @@ false ] }, - "hash": "0f4a7d7c5e737a1f232a2db675557ae62a53e1fa4834acc82c18e265867b69d9" + "hash": "4aeb7dcd79000540c03fb12c0608ab71005d70f13ed32172e47166f71b3aef80" } diff --git a/core/lib/dal/.sqlx/query-4c33e5cc065a4d92ae94e01eeda43895c9a3cf9e0c52bd65c5eace2445c2249f.json b/core/lib/dal/.sqlx/query-4c33e5cc065a4d92ae94e01eeda43895c9a3cf9e0c52bd65c5eace2445c2249f.json deleted file mode 100644 index 03d17462b2a7..000000000000 --- a/core/lib/dal/.sqlx/query-4c33e5cc065a4d92ae94e01eeda43895c9a3cf9e0c52bd65c5eace2445c2249f.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE\n transactions\n SET\n error = $1,\n updated_at = NOW()\n WHERE\n hash = $2\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Varchar", - "Bytea" - ] - }, - "nullable": [] - }, - "hash": "4c33e5cc065a4d92ae94e01eeda43895c9a3cf9e0c52bd65c5eace2445c2249f" -} diff --git a/core/lib/dal/.sqlx/query-4c80d74f23341a08320f50f2e923fb92c099f0b71ecfabd33325cfd107f2fecf.json b/core/lib/dal/.sqlx/query-4c80d74f23341a08320f50f2e923fb92c099f0b71ecfabd33325cfd107f2fecf.json deleted file mode 100644 index 6ce4d6761f84..000000000000 --- a/core/lib/dal/.sqlx/query-4c80d74f23341a08320f50f2e923fb92c099f0b71ecfabd33325cfd107f2fecf.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE\n miniblocks\n SET\n protocol_version = $1\n WHERE\n number BETWEEN $2 AND $3\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int4", - "Int8", - "Int8" - ] - }, - "nullable": [] - }, - "hash": "4c80d74f23341a08320f50f2e923fb92c099f0b71ecfabd33325cfd107f2fecf" -} diff --git a/core/lib/dal/.sqlx/query-4ec3bdb8a51f9e9dae77e545c4d182ca8e746122e42f448a7f349a234e6ab594.json b/core/lib/dal/.sqlx/query-4ec3bdb8a51f9e9dae77e545c4d182ca8e746122e42f448a7f349a234e6ab594.json deleted file mode 100644 index 6400c2b70af3..000000000000 --- a/core/lib/dal/.sqlx/query-4ec3bdb8a51f9e9dae77e545c4d182ca8e746122e42f448a7f349a234e6ab594.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n data_availability (\n l1_batch_number,\n blob_id,\n sent_at,\n created_at,\n updated_at\n )\n VALUES\n ($1, $2, $3, NOW(), NOW()) ON CONFLICT DO NOTHING\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8", - "Text", - "Timestamp" - ] - }, - "nullable": [] - }, - "hash": "4ec3bdb8a51f9e9dae77e545c4d182ca8e746122e42f448a7f349a234e6ab594" -} diff --git a/core/lib/dal/.sqlx/query-50eecd5b068f4ee20bff603853854f72cdbdc00487a42a42b4c15584e601e261.json b/core/lib/dal/.sqlx/query-50eecd5b068f4ee20bff603853854f72cdbdc00487a42a42b4c15584e601e261.json deleted file mode 100644 index 3393a0e30061..000000000000 --- a/core/lib/dal/.sqlx/query-50eecd5b068f4ee20bff603853854f72cdbdc00487a42a42b4c15584e601e261.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE\n consensus_replica_state\n SET\n global_config = $1\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Jsonb" - ] - }, - "nullable": [] - }, - "hash": "50eecd5b068f4ee20bff603853854f72cdbdc00487a42a42b4c15584e601e261" -} diff --git a/core/lib/dal/.sqlx/query-90e69db5fce86f7735b550d0f60b0116e8dc7ad2cff1a746a4f3191ceadef0f5.json b/core/lib/dal/.sqlx/query-5137159db7d3ff456e368e6246b07554ce738a2d7005472e7e76a64a8fbd57ad.json similarity index 69% rename from core/lib/dal/.sqlx/query-90e69db5fce86f7735b550d0f60b0116e8dc7ad2cff1a746a4f3191ceadef0f5.json rename to core/lib/dal/.sqlx/query-5137159db7d3ff456e368e6246b07554ce738a2d7005472e7e76a64a8fbd57ad.json index 487aa4343b6c..07ef0aba074d 100644 --- a/core/lib/dal/.sqlx/query-90e69db5fce86f7735b550d0f60b0116e8dc7ad2cff1a746a4f3191ceadef0f5.json +++ b/core/lib/dal/.sqlx/query-5137159db7d3ff456e368e6246b07554ce738a2d7005472e7e76a64a8fbd57ad.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n proof_generation_details (l1_batch_number, status, created_at, updated_at)\n VALUES\n ($1, 'unpicked', NOW(), NOW()) ON CONFLICT (l1_batch_number) DO NOTHING\n ", + "query": "\n INSERT INTO\n proof_generation_details (l1_batch_number, status, created_at, updated_at)\n VALUES\n ($1, 'unpicked', NOW(), NOW())\n ON CONFLICT (l1_batch_number) DO NOTHING\n ", "describe": { "columns": [], "parameters": { @@ -10,5 +10,5 @@ }, "nullable": [] }, - "hash": "90e69db5fce86f7735b550d0f60b0116e8dc7ad2cff1a746a4f3191ceadef0f5" + "hash": "5137159db7d3ff456e368e6246b07554ce738a2d7005472e7e76a64a8fbd57ad" } diff --git a/core/lib/dal/.sqlx/query-2952bedc1c6320a643c42cc6d58fdf547011412e89a1fa8f6bc26ca6a03709bb.json b/core/lib/dal/.sqlx/query-526a8e1c231e99faadd5dbbe9c49ed811faffcc108d04b59fdec5a0ab9d13fa3.json similarity index 75% rename from core/lib/dal/.sqlx/query-2952bedc1c6320a643c42cc6d58fdf547011412e89a1fa8f6bc26ca6a03709bb.json rename to core/lib/dal/.sqlx/query-526a8e1c231e99faadd5dbbe9c49ed811faffcc108d04b59fdec5a0ab9d13fa3.json index 918732de5dbc..dbdec4ac5d65 100644 --- a/core/lib/dal/.sqlx/query-2952bedc1c6320a643c42cc6d58fdf547011412e89a1fa8f6bc26ca6a03709bb.json +++ b/core/lib/dal/.sqlx/query-526a8e1c231e99faadd5dbbe9c49ed811faffcc108d04b59fdec5a0ab9d13fa3.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT\n address,\n topic1,\n topic2,\n topic3,\n topic4,\n value,\n NULL :: bytea AS \"block_hash\",\n NULL :: BIGINT AS \"l1_batch_number?\",\n miniblock_number,\n tx_hash,\n tx_index_in_block,\n event_index_in_block,\n event_index_in_tx,\n NULL :: BIGINT AS \"block_timestamp?\"\n FROM\n events\n WHERE\n tx_hash = ANY ($1)\n ORDER BY\n miniblock_number ASC,\n event_index_in_block ASC\n ", + "query": "\n SELECT\n address,\n topic1,\n topic2,\n topic3,\n topic4,\n value,\n NULL::bytea AS \"block_hash\",\n NULL::BIGINT AS \"l1_batch_number?\",\n miniblock_number,\n tx_hash,\n tx_index_in_block,\n event_index_in_block,\n event_index_in_tx,\n NULL::BIGINT AS \"block_timestamp?\"\n FROM\n events\n WHERE\n tx_hash = ANY ($1)\n ORDER BY\n miniblock_number ASC,\n event_index_in_block ASC\n ", "describe": { "columns": [ { @@ -96,5 +96,5 @@ null ] }, - "hash": "2952bedc1c6320a643c42cc6d58fdf547011412e89a1fa8f6bc26ca6a03709bb" + "hash": "526a8e1c231e99faadd5dbbe9c49ed811faffcc108d04b59fdec5a0ab9d13fa3" } diff --git a/core/lib/dal/.sqlx/query-532a80b0873871896dd318beba5ec427a099492905a1feee512dc43f39d10047.json b/core/lib/dal/.sqlx/query-532a80b0873871896dd318beba5ec427a099492905a1feee512dc43f39d10047.json new file mode 100644 index 000000000000..629dca2ea7f0 --- /dev/null +++ b/core/lib/dal/.sqlx/query-532a80b0873871896dd318beba5ec427a099492905a1feee512dc43f39d10047.json @@ -0,0 +1,15 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE eth_txs_history\n SET\n sent_at_block = $2,\n sent_at = NOW()\n WHERE\n id = $1\n AND sent_at_block IS NULL\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int4", + "Int4" + ] + }, + "nullable": [] + }, + "hash": "532a80b0873871896dd318beba5ec427a099492905a1feee512dc43f39d10047" +} diff --git a/core/lib/dal/.sqlx/query-546c729829083b7eba94fea742c162d717ffcf46fdf5d2ce5d32555353b6da6b.json b/core/lib/dal/.sqlx/query-546c729829083b7eba94fea742c162d717ffcf46fdf5d2ce5d32555353b6da6b.json new file mode 100644 index 000000000000..70b94f739098 --- /dev/null +++ b/core/lib/dal/.sqlx/query-546c729829083b7eba94fea742c162d717ffcf46fdf5d2ce5d32555353b6da6b.json @@ -0,0 +1,14 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE transactions\n SET\n in_mempool = FALSE\n FROM\n UNNEST($1::bytea[]) AS s (address)\n WHERE\n transactions.in_mempool = TRUE\n AND transactions.initiator_address = s.address\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "ByteaArray" + ] + }, + "nullable": [] + }, + "hash": "546c729829083b7eba94fea742c162d717ffcf46fdf5d2ce5d32555353b6da6b" +} diff --git a/core/lib/dal/.sqlx/query-549a74361713f1ad79b03a680815b2356e58f12a7af7539f2b75eb318941db6d.json b/core/lib/dal/.sqlx/query-549a74361713f1ad79b03a680815b2356e58f12a7af7539f2b75eb318941db6d.json deleted file mode 100644 index 73e80bb2ea0c..000000000000 --- a/core/lib/dal/.sqlx/query-549a74361713f1ad79b03a680815b2356e58f12a7af7539f2b75eb318941db6d.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n DELETE FROM\n storage_logs\n WHERE\n miniblock_number > $1\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8" - ] - }, - "nullable": [] - }, - "hash": "549a74361713f1ad79b03a680815b2356e58f12a7af7539f2b75eb318941db6d" -} diff --git a/core/lib/dal/.sqlx/query-54c96dc5e0a78551ba713814f944c3262d5cab17e8f76bdc6672459e0091b1d8.json b/core/lib/dal/.sqlx/query-54c96dc5e0a78551ba713814f944c3262d5cab17e8f76bdc6672459e0091b1d8.json deleted file mode 100644 index c506b44154d6..000000000000 --- a/core/lib/dal/.sqlx/query-54c96dc5e0a78551ba713814f944c3262d5cab17e8f76bdc6672459e0091b1d8.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE\n tee_proof_generation_details\n SET\n tee_type = $1,\n status = $2,\n pubkey = $3,\n signature = $4,\n proof = $5,\n updated_at = NOW()\n WHERE\n l1_batch_number = $6\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Text", - "Text", - "Bytea", - "Bytea", - "Bytea", - "Int8" - ] - }, - "nullable": [] - }, - "hash": "54c96dc5e0a78551ba713814f944c3262d5cab17e8f76bdc6672459e0091b1d8" -} diff --git a/core/lib/dal/.sqlx/query-5545ceadc462969a4557b5bc5db373147984aa3931df33a50de2bb2ed4367d51.json b/core/lib/dal/.sqlx/query-5545ceadc462969a4557b5bc5db373147984aa3931df33a50de2bb2ed4367d51.json deleted file mode 100644 index fcb47bdada20..000000000000 --- a/core/lib/dal/.sqlx/query-5545ceadc462969a4557b5bc5db373147984aa3931df33a50de2bb2ed4367d51.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n DELETE FROM\n compiler_versions\n WHERE\n compiler = $1\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Text" - ] - }, - "nullable": [] - }, - "hash": "5545ceadc462969a4557b5bc5db373147984aa3931df33a50de2bb2ed4367d51" -} diff --git a/core/lib/dal/.sqlx/query-55b0b4c569c0aaf9741afc85400ecd50a04799ffd36be0e17c56f47fcdbc8f60.json b/core/lib/dal/.sqlx/query-55b0b4c569c0aaf9741afc85400ecd50a04799ffd36be0e17c56f47fcdbc8f60.json new file mode 100644 index 000000000000..6478bb53538d --- /dev/null +++ b/core/lib/dal/.sqlx/query-55b0b4c569c0aaf9741afc85400ecd50a04799ffd36be0e17c56f47fcdbc8f60.json @@ -0,0 +1,14 @@ +{ + "db_name": "PostgreSQL", + "query": "\n DELETE FROM l1_batches\n WHERE\n number > $1\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8" + ] + }, + "nullable": [] + }, + "hash": "55b0b4c569c0aaf9741afc85400ecd50a04799ffd36be0e17c56f47fcdbc8f60" +} diff --git a/core/lib/dal/.sqlx/query-55b90277afa79835a01107536cd16369609c69bf8fed67f6fb96859844ed29b1.json b/core/lib/dal/.sqlx/query-55b90277afa79835a01107536cd16369609c69bf8fed67f6fb96859844ed29b1.json deleted file mode 100644 index e92e06f70f85..000000000000 --- a/core/lib/dal/.sqlx/query-55b90277afa79835a01107536cd16369609c69bf8fed67f6fb96859844ed29b1.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE\n l1_batches\n SET\n commitment = $1,\n aux_data_hash = $2,\n pass_through_data_hash = $3,\n meta_parameters_hash = $4,\n l2_l1_merkle_root = $5,\n zkporter_is_available = $6,\n compressed_state_diffs = $7,\n compressed_initial_writes = $8,\n compressed_repeated_writes = $9,\n updated_at = NOW()\n WHERE\n number = $10\n AND commitment IS NULL\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Bytea", - "Bytea", - "Bytea", - "Bytea", - "Bytea", - "Bool", - "Bytea", - "Bytea", - "Bytea", - "Int8" - ] - }, - "nullable": [] - }, - "hash": "55b90277afa79835a01107536cd16369609c69bf8fed67f6fb96859844ed29b1" -} diff --git a/core/lib/dal/.sqlx/query-55f4585be3d0f1a147cb10f6e59325fad494a512ba92df95439d2d7fe0f3a285.json b/core/lib/dal/.sqlx/query-55f4585be3d0f1a147cb10f6e59325fad494a512ba92df95439d2d7fe0f3a285.json new file mode 100644 index 000000000000..ecf54f0417b8 --- /dev/null +++ b/core/lib/dal/.sqlx/query-55f4585be3d0f1a147cb10f6e59325fad494a512ba92df95439d2d7fe0f3a285.json @@ -0,0 +1,23 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE l1_batches\n SET\n commitment = $1,\n aux_data_hash = $2,\n pass_through_data_hash = $3,\n meta_parameters_hash = $4,\n l2_l1_merkle_root = $5,\n zkporter_is_available = $6,\n compressed_state_diffs = $7,\n compressed_initial_writes = $8,\n compressed_repeated_writes = $9,\n updated_at = NOW()\n WHERE\n number = $10\n AND commitment IS NULL\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Bytea", + "Bytea", + "Bytea", + "Bytea", + "Bytea", + "Bool", + "Bytea", + "Bytea", + "Bytea", + "Int8" + ] + }, + "nullable": [] + }, + "hash": "55f4585be3d0f1a147cb10f6e59325fad494a512ba92df95439d2d7fe0f3a285" +} diff --git a/core/lib/dal/.sqlx/query-5a20e458be6c6c90c1e6f9c2cfada959f3f2e5375d8f1687231f13d26a41cc68.json b/core/lib/dal/.sqlx/query-5a20e458be6c6c90c1e6f9c2cfada959f3f2e5375d8f1687231f13d26a41cc68.json deleted file mode 100644 index e8ca9efae0d9..000000000000 --- a/core/lib/dal/.sqlx/query-5a20e458be6c6c90c1e6f9c2cfada959f3f2e5375d8f1687231f13d26a41cc68.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n DELETE FROM\n initial_writes\n WHERE\n l1_batch_number > $1\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8" - ] - }, - "nullable": [] - }, - "hash": "5a20e458be6c6c90c1e6f9c2cfada959f3f2e5375d8f1687231f13d26a41cc68" -} diff --git a/core/lib/dal/.sqlx/query-5c65e8b97f2fa2fda703f85d6c56228315e7aeed1c6b6f3989e043d6f4fd5f70.json b/core/lib/dal/.sqlx/query-5c65e8b97f2fa2fda703f85d6c56228315e7aeed1c6b6f3989e043d6f4fd5f70.json deleted file mode 100644 index 740514c17baa..000000000000 --- a/core/lib/dal/.sqlx/query-5c65e8b97f2fa2fda703f85d6c56228315e7aeed1c6b6f3989e043d6f4fd5f70.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE\n l1_batches\n SET\n protocol_version = $1\n WHERE\n number BETWEEN $2 AND $3\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int4", - "Int8", - "Int8" - ] - }, - "nullable": [] - }, - "hash": "5c65e8b97f2fa2fda703f85d6c56228315e7aeed1c6b6f3989e043d6f4fd5f70" -} diff --git a/core/lib/dal/.sqlx/query-5c99342c4fbf36ccc8e9c9dafc76de37201091bfccd3caf922e766896c5a542b.json b/core/lib/dal/.sqlx/query-5c99342c4fbf36ccc8e9c9dafc76de37201091bfccd3caf922e766896c5a542b.json new file mode 100644 index 000000000000..5d09a9c37f7a --- /dev/null +++ b/core/lib/dal/.sqlx/query-5c99342c4fbf36ccc8e9c9dafc76de37201091bfccd3caf922e766896c5a542b.json @@ -0,0 +1,15 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE data_availability\n SET\n inclusion_data = $1,\n updated_at = NOW()\n WHERE\n l1_batch_number = $2\n AND inclusion_data IS NULL\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Bytea", + "Int8" + ] + }, + "nullable": [] + }, + "hash": "5c99342c4fbf36ccc8e9c9dafc76de37201091bfccd3caf922e766896c5a542b" +} diff --git a/core/lib/dal/.sqlx/query-5d1f588b2b652105b4452be1cc6c7573fe040d47d17d9bd4e2a2b6d3131a4f9c.json b/core/lib/dal/.sqlx/query-5d1f588b2b652105b4452be1cc6c7573fe040d47d17d9bd4e2a2b6d3131a4f9c.json new file mode 100644 index 000000000000..8d566e0c6cf2 --- /dev/null +++ b/core/lib/dal/.sqlx/query-5d1f588b2b652105b4452be1cc6c7573fe040d47d17d9bd4e2a2b6d3131a4f9c.json @@ -0,0 +1,16 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE transactions\n SET\n l1_batch_number = $3,\n l1_batch_tx_index = data_table.l1_batch_tx_index,\n updated_at = NOW()\n FROM\n (\n SELECT\n UNNEST($1::INT[]) AS l1_batch_tx_index,\n UNNEST($2::bytea[]) AS hash\n ) AS data_table\n WHERE\n transactions.hash = data_table.hash\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int4Array", + "ByteaArray", + "Int8" + ] + }, + "nullable": [] + }, + "hash": "5d1f588b2b652105b4452be1cc6c7573fe040d47d17d9bd4e2a2b6d3131a4f9c" +} diff --git a/core/lib/dal/.sqlx/query-507ba20e231ea2cf8ac15cb5a6bc8f02328de7f12c5e83609a477feddbbdd754.json b/core/lib/dal/.sqlx/query-5d341e334cbc2d38efc8a060325677d57040037da0e07cef2c7b7246851a3703.json similarity index 50% rename from core/lib/dal/.sqlx/query-507ba20e231ea2cf8ac15cb5a6bc8f02328de7f12c5e83609a477feddbbdd754.json rename to core/lib/dal/.sqlx/query-5d341e334cbc2d38efc8a060325677d57040037da0e07cef2c7b7246851a3703.json index ec80b8c180d6..f0d8b01d57c0 100644 --- a/core/lib/dal/.sqlx/query-507ba20e231ea2cf8ac15cb5a6bc8f02328de7f12c5e83609a477feddbbdd754.json +++ b/core/lib/dal/.sqlx/query-5d341e334cbc2d38efc8a060325677d57040037da0e07cef2c7b7246851a3703.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n UPDATE\n contract_verification_requests\n SET\n status = 'in_progress',\n attempts = attempts + 1,\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n id = (\n SELECT\n id\n FROM\n contract_verification_requests\n WHERE\n status = 'queued'\n OR (\n status = 'in_progress'\n AND processing_started_at < NOW() - $1 :: INTERVAL\n )\n ORDER BY\n created_at\n LIMIT\n 1 FOR\n UPDATE\n SKIP LOCKED\n )\n RETURNING\n id,\n contract_address,\n source_code,\n contract_name,\n zk_compiler_version,\n compiler_version,\n optimization_used,\n optimizer_mode,\n constructor_arguments,\n is_system,\n force_evmla\n ", + "query": "\n UPDATE contract_verification_requests\n SET\n status = 'in_progress',\n attempts = attempts + 1,\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n id = (\n SELECT\n id\n FROM\n contract_verification_requests\n WHERE\n status = 'queued'\n OR (\n status = 'in_progress'\n AND processing_started_at < NOW() - $1::INTERVAL\n )\n ORDER BY\n created_at\n LIMIT\n 1\n FOR UPDATE\n SKIP LOCKED\n )\n RETURNING\n id,\n contract_address,\n source_code,\n contract_name,\n zk_compiler_version,\n compiler_version,\n optimization_used,\n optimizer_mode,\n constructor_arguments,\n is_system,\n force_evmla\n ", "describe": { "columns": [ { @@ -78,5 +78,5 @@ false ] }, - "hash": "507ba20e231ea2cf8ac15cb5a6bc8f02328de7f12c5e83609a477feddbbdd754" + "hash": "5d341e334cbc2d38efc8a060325677d57040037da0e07cef2c7b7246851a3703" } diff --git a/core/lib/dal/.sqlx/query-5d7fd6503caf4bf05d387e7214518890d009081b1c1cec8773e25c6621753372.json b/core/lib/dal/.sqlx/query-5d7fd6503caf4bf05d387e7214518890d009081b1c1cec8773e25c6621753372.json deleted file mode 100644 index 50b017d4a79c..000000000000 --- a/core/lib/dal/.sqlx/query-5d7fd6503caf4bf05d387e7214518890d009081b1c1cec8773e25c6621753372.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n transactions (\n hash,\n is_priority,\n initiator_address,\n nonce,\n signature,\n gas_limit,\n max_fee_per_gas,\n max_priority_fee_per_gas,\n gas_per_pubdata_limit,\n input,\n data,\n tx_format,\n contract_address,\n value,\n paymaster,\n paymaster_input,\n execution_info,\n received_at,\n created_at,\n updated_at\n )\n VALUES\n (\n $1,\n FALSE,\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 JSONB_BUILD_OBJECT(\n 'gas_used',\n $16 :: BIGINT,\n 'storage_writes',\n $17 :: INT,\n 'contracts_used',\n $18 :: INT\n ),\n $19,\n NOW(),\n NOW()\n ) ON CONFLICT (initiator_address, nonce) DO\n UPDATE\n SET\n hash = $1,\n signature = $4,\n gas_limit = $5,\n max_fee_per_gas = $6,\n max_priority_fee_per_gas = $7,\n gas_per_pubdata_limit = $8,\n input = $9,\n data = $10,\n tx_format = $11,\n contract_address = $12,\n value = $13,\n paymaster = $14,\n paymaster_input = $15,\n execution_info = JSONB_BUILD_OBJECT(\n 'gas_used',\n $16 :: BIGINT,\n 'storage_writes',\n $17 :: INT,\n 'contracts_used',\n $18 :: INT\n ),\n in_mempool = FALSE,\n received_at = $19,\n created_at = NOW(),\n updated_at = NOW(),\n error = NULL\n WHERE\n transactions.is_priority = FALSE\n AND transactions.miniblock_number IS NULL\n RETURNING\n (\n SELECT\n hash\n FROM\n transactions\n WHERE\n transactions.initiator_address = $2\n AND transactions.nonce = $3\n ) IS NOT NULL AS \"is_replaced!\"\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "is_replaced!", - "type_info": "Bool" - } - ], - "parameters": { - "Left": [ - "Bytea", - "Bytea", - "Int8", - "Bytea", - "Numeric", - "Numeric", - "Numeric", - "Numeric", - "Bytea", - "Jsonb", - "Int4", - "Bytea", - "Numeric", - "Bytea", - "Bytea", - "Int8", - "Int4", - "Int4", - "Timestamp" - ] - }, - "nullable": [ - null - ] - }, - "hash": "5d7fd6503caf4bf05d387e7214518890d009081b1c1cec8773e25c6621753372" -} diff --git a/core/lib/dal/.sqlx/query-5dc4ecdfac01e15e4d2fe7c124c3ee9ed6fd28c338ddadd9958f3bb0901ba454.json b/core/lib/dal/.sqlx/query-5dc4ecdfac01e15e4d2fe7c124c3ee9ed6fd28c338ddadd9958f3bb0901ba454.json deleted file mode 100644 index e0e2662ecd00..000000000000 --- a/core/lib/dal/.sqlx/query-5dc4ecdfac01e15e4d2fe7c124c3ee9ed6fd28c338ddadd9958f3bb0901ba454.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n factory_deps (\n bytecode_hash,\n bytecode,\n miniblock_number,\n created_at,\n updated_at\n )\n SELECT\n u.bytecode_hash,\n u.bytecode,\n $3,\n NOW(),\n NOW()\n FROM\n UNNEST($1 :: bytea [], $2 :: bytea []) AS u (bytecode_hash, bytecode) ON CONFLICT (bytecode_hash) DO NOTHING\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "ByteaArray", - "ByteaArray", - "Int8" - ] - }, - "nullable": [] - }, - "hash": "5dc4ecdfac01e15e4d2fe7c124c3ee9ed6fd28c338ddadd9958f3bb0901ba454" -} diff --git a/core/lib/dal/.sqlx/query-6292dc157e2b4c64c513b4b8f043ea4423fdaf5d03cb70e8c3a67b6d4a24d29e.json b/core/lib/dal/.sqlx/query-6292dc157e2b4c64c513b4b8f043ea4423fdaf5d03cb70e8c3a67b6d4a24d29e.json new file mode 100644 index 000000000000..62b1be92c909 --- /dev/null +++ b/core/lib/dal/.sqlx/query-6292dc157e2b4c64c513b4b8f043ea4423fdaf5d03cb70e8c3a67b6d4a24d29e.json @@ -0,0 +1,19 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE tee_proof_generation_details\n SET\n tee_type = $1,\n status = $2,\n pubkey = $3,\n signature = $4,\n proof = $5,\n updated_at = NOW()\n WHERE\n l1_batch_number = $6\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Text", + "Text", + "Bytea", + "Bytea", + "Bytea", + "Int8" + ] + }, + "nullable": [] + }, + "hash": "6292dc157e2b4c64c513b4b8f043ea4423fdaf5d03cb70e8c3a67b6d4a24d29e" +} diff --git a/core/lib/dal/.sqlx/query-1dc66c13020087cc74c84bd731134129e2abdfa088c8089ec3765d771d130133.json b/core/lib/dal/.sqlx/query-6621de90a024cc85946f17948e5c171cd0e4d38bd6e9cfec58b2d7f53a3204e1.json similarity index 73% rename from core/lib/dal/.sqlx/query-1dc66c13020087cc74c84bd731134129e2abdfa088c8089ec3765d771d130133.json rename to core/lib/dal/.sqlx/query-6621de90a024cc85946f17948e5c171cd0e4d38bd6e9cfec58b2d7f53a3204e1.json index afd927e03f45..8ba437fe2cee 100644 --- a/core/lib/dal/.sqlx/query-1dc66c13020087cc74c84bd731134129e2abdfa088c8089ec3765d771d130133.json +++ b/core/lib/dal/.sqlx/query-6621de90a024cc85946f17948e5c171cd0e4d38bd6e9cfec58b2d7f53a3204e1.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n UPDATE\n transactions\n SET\n in_mempool = TRUE\n FROM\n (\n SELECT\n hash\n FROM\n (\n SELECT\n hash\n FROM\n transactions\n WHERE\n miniblock_number IS NULL\n AND in_mempool = FALSE\n AND error IS NULL\n AND (\n is_priority = TRUE\n OR (\n max_fee_per_gas >= $2\n AND gas_per_pubdata_limit >= $3\n )\n )\n AND tx_format != $4\n ORDER BY\n is_priority DESC,\n priority_op_id,\n received_at\n LIMIT\n $1\n ) AS subquery1\n ORDER BY\n hash\n ) AS subquery2\n WHERE\n transactions.hash = subquery2.hash\n RETURNING\n transactions.*\n ", + "query": "\n UPDATE transactions\n SET\n in_mempool = TRUE\n FROM\n (\n SELECT\n hash\n FROM\n (\n SELECT\n hash\n FROM\n transactions\n WHERE\n miniblock_number IS NULL\n AND in_mempool = FALSE\n AND error IS NULL\n AND (\n is_priority = TRUE\n OR (\n max_fee_per_gas >= $2\n AND gas_per_pubdata_limit >= $3\n )\n )\n AND tx_format != $4\n ORDER BY\n is_priority DESC,\n priority_op_id,\n received_at\n LIMIT\n $1\n ) AS subquery1\n ORDER BY\n hash\n ) AS subquery2\n WHERE\n transactions.hash = subquery2.hash\n RETURNING\n transactions.*\n ", "describe": { "columns": [ { @@ -231,5 +231,5 @@ true ] }, - "hash": "1dc66c13020087cc74c84bd731134129e2abdfa088c8089ec3765d771d130133" + "hash": "6621de90a024cc85946f17948e5c171cd0e4d38bd6e9cfec58b2d7f53a3204e1" } diff --git a/core/lib/dal/.sqlx/query-662a3d53026e983fea3087099b8b9593ba6ff291db9868a1ad6df21440ef311a.json b/core/lib/dal/.sqlx/query-662a3d53026e983fea3087099b8b9593ba6ff291db9868a1ad6df21440ef311a.json deleted file mode 100644 index d2e3648352aa..000000000000 --- a/core/lib/dal/.sqlx/query-662a3d53026e983fea3087099b8b9593ba6ff291db9868a1ad6df21440ef311a.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n DELETE FROM\n miniblocks\n WHERE\n number <= $1\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8" - ] - }, - "nullable": [] - }, - "hash": "662a3d53026e983fea3087099b8b9593ba6ff291db9868a1ad6df21440ef311a" -} diff --git a/core/lib/dal/.sqlx/query-9cf8419746f9b86749c36d0a0d443ec6c9383b5cac5112569a77caa00747288c.json b/core/lib/dal/.sqlx/query-66b3f476cf4487239190175d2940fd5e1330393d8b04c7cf03b8c7ab2edad5d1.json similarity index 51% rename from core/lib/dal/.sqlx/query-9cf8419746f9b86749c36d0a0d443ec6c9383b5cac5112569a77caa00747288c.json rename to core/lib/dal/.sqlx/query-66b3f476cf4487239190175d2940fd5e1330393d8b04c7cf03b8c7ab2edad5d1.json index e2e6226e1836..0cf4a1e32005 100644 --- a/core/lib/dal/.sqlx/query-9cf8419746f9b86749c36d0a0d443ec6c9383b5cac5112569a77caa00747288c.json +++ b/core/lib/dal/.sqlx/query-66b3f476cf4487239190175d2940fd5e1330393d8b04c7cf03b8c7ab2edad5d1.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n transactions (\n hash,\n is_priority,\n initiator_address,\n gas_limit,\n max_fee_per_gas,\n gas_per_pubdata_limit,\n data,\n upgrade_id,\n contract_address,\n l1_block_number,\n value,\n paymaster,\n paymaster_input,\n tx_format,\n l1_tx_mint,\n l1_tx_refund_recipient,\n miniblock_number,\n index_in_block,\n error,\n execution_info,\n refunded_gas,\n effective_gas_price,\n received_at,\n created_at,\n updated_at\n )\n SELECT\n data_table.hash,\n TRUE,\n data_table.initiator_address,\n data_table.gas_limit,\n data_table.max_fee_per_gas,\n data_table.gas_per_pubdata_limit,\n data_table.data,\n data_table.upgrade_id,\n data_table.contract_address,\n data_table.l1_block_number,\n data_table.value,\n '\\x0000000000000000000000000000000000000000' :: bytea,\n '\\x' :: bytea,\n data_table.tx_format,\n data_table.l1_tx_mint,\n data_table.l1_tx_refund_recipient,\n $19,\n data_table.index_in_block,\n NULLIF(data_table.error, ''),\n data_table.execution_info,\n data_table.refunded_gas,\n data_table.effective_gas_price,\n NOW(),\n NOW(),\n NOW()\n FROM\n (\n SELECT\n UNNEST($1 :: BYTEA []) AS hash,\n UNNEST($2 :: BYTEA []) AS initiator_address,\n UNNEST($3 :: NUMERIC []) AS gas_limit,\n UNNEST($4 :: NUMERIC []) AS max_fee_per_gas,\n UNNEST($5 :: NUMERIC []) AS gas_per_pubdata_limit,\n UNNEST($6 :: JSONB []) AS data,\n UNNEST($7 :: INT []) AS upgrade_id,\n UNNEST($8 :: BYTEA []) AS contract_address,\n UNNEST($9 :: INT []) AS l1_block_number,\n UNNEST($10 :: NUMERIC []) AS value,\n UNNEST($11 :: INTEGER []) AS tx_format,\n UNNEST($12 :: NUMERIC []) AS l1_tx_mint,\n UNNEST($13 :: BYTEA []) AS l1_tx_refund_recipient,\n UNNEST($14 :: INT []) AS index_in_block,\n UNNEST($15 :: VARCHAR []) AS error,\n UNNEST($16 :: JSONB []) AS execution_info,\n UNNEST($17 :: BIGINT []) AS refunded_gas,\n UNNEST($18 :: NUMERIC []) AS effective_gas_price\n ) AS data_table\n ", + "query": "\n INSERT INTO\n transactions (\n hash,\n is_priority,\n initiator_address,\n gas_limit,\n max_fee_per_gas,\n gas_per_pubdata_limit,\n data,\n upgrade_id,\n contract_address,\n l1_block_number,\n value,\n paymaster,\n paymaster_input,\n tx_format,\n l1_tx_mint,\n l1_tx_refund_recipient,\n miniblock_number,\n index_in_block,\n error,\n execution_info,\n refunded_gas,\n effective_gas_price,\n received_at,\n created_at,\n updated_at\n )\n SELECT\n data_table.hash,\n TRUE,\n data_table.initiator_address,\n data_table.gas_limit,\n data_table.max_fee_per_gas,\n data_table.gas_per_pubdata_limit,\n data_table.data,\n data_table.upgrade_id,\n data_table.contract_address,\n data_table.l1_block_number,\n data_table.value,\n '\\x0000000000000000000000000000000000000000'::bytea,\n '\\x'::bytea,\n data_table.tx_format,\n data_table.l1_tx_mint,\n data_table.l1_tx_refund_recipient,\n $19,\n data_table.index_in_block,\n NULLIF(data_table.error, ''),\n data_table.execution_info,\n data_table.refunded_gas,\n data_table.effective_gas_price,\n NOW(),\n NOW(),\n NOW()\n FROM\n (\n SELECT\n UNNEST($1::BYTEA[]) AS hash,\n UNNEST($2::BYTEA[]) AS initiator_address,\n UNNEST($3::NUMERIC[]) AS gas_limit,\n UNNEST($4::NUMERIC[]) AS max_fee_per_gas,\n UNNEST($5::NUMERIC[]) AS gas_per_pubdata_limit,\n UNNEST($6::JSONB[]) AS data,\n UNNEST($7::INT[]) AS upgrade_id,\n UNNEST($8::BYTEA[]) AS contract_address,\n UNNEST($9::INT[]) AS l1_block_number,\n UNNEST($10::NUMERIC[]) AS value,\n UNNEST($11::INTEGER[]) AS tx_format,\n UNNEST($12::NUMERIC[]) AS l1_tx_mint,\n UNNEST($13::BYTEA[]) AS l1_tx_refund_recipient,\n UNNEST($14::INT[]) AS index_in_block,\n UNNEST($15::VARCHAR[]) AS error,\n UNNEST($16::JSONB[]) AS execution_info,\n UNNEST($17::BIGINT[]) AS refunded_gas,\n UNNEST($18::NUMERIC[]) AS effective_gas_price\n ) AS data_table\n ", "describe": { "columns": [], "parameters": { @@ -28,5 +28,5 @@ }, "nullable": [] }, - "hash": "9cf8419746f9b86749c36d0a0d443ec6c9383b5cac5112569a77caa00747288c" + "hash": "66b3f476cf4487239190175d2940fd5e1330393d8b04c7cf03b8c7ab2edad5d1" } diff --git a/core/lib/dal/.sqlx/query-67f6a13a4c5bd16f77e449b5f0bc0798441543244f83b691783127979e02dd8c.json b/core/lib/dal/.sqlx/query-67f6a13a4c5bd16f77e449b5f0bc0798441543244f83b691783127979e02dd8c.json new file mode 100644 index 000000000000..4873a861c00a --- /dev/null +++ b/core/lib/dal/.sqlx/query-67f6a13a4c5bd16f77e449b5f0bc0798441543244f83b691783127979e02dd8c.json @@ -0,0 +1,15 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE transactions\n SET\n error = $1,\n updated_at = NOW()\n WHERE\n hash = $2\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Varchar", + "Bytea" + ] + }, + "nullable": [] + }, + "hash": "67f6a13a4c5bd16f77e449b5f0bc0798441543244f83b691783127979e02dd8c" +} diff --git a/core/lib/dal/.sqlx/query-6849be0788a509e4e68acc2da4bfadbcfc343374fad173df0cc8db38419a9726.json b/core/lib/dal/.sqlx/query-6849be0788a509e4e68acc2da4bfadbcfc343374fad173df0cc8db38419a9726.json new file mode 100644 index 000000000000..72dbb2a4178b --- /dev/null +++ b/core/lib/dal/.sqlx/query-6849be0788a509e4e68acc2da4bfadbcfc343374fad173df0cc8db38419a9726.json @@ -0,0 +1,14 @@ +{ + "db_name": "PostgreSQL", + "query": "\n DELETE FROM tokens\n WHERE\n l2_address = ANY ($1)\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "ByteaArray" + ] + }, + "nullable": [] + }, + "hash": "6849be0788a509e4e68acc2da4bfadbcfc343374fad173df0cc8db38419a9726" +} diff --git a/core/lib/dal/.sqlx/query-68e5240ab8c75e68c13efad97a628321969b8c5bce89a83b74ee08f9e2dfcf9b.json b/core/lib/dal/.sqlx/query-68e5240ab8c75e68c13efad97a628321969b8c5bce89a83b74ee08f9e2dfcf9b.json deleted file mode 100644 index 833de0661fd0..000000000000 --- a/core/lib/dal/.sqlx/query-68e5240ab8c75e68c13efad97a628321969b8c5bce89a83b74ee08f9e2dfcf9b.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE\n consistency_checker_info\n SET\n last_processed_l1_batch = $1,\n updated_at = NOW()\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8" - ] - }, - "nullable": [] - }, - "hash": "68e5240ab8c75e68c13efad97a628321969b8c5bce89a83b74ee08f9e2dfcf9b" -} diff --git a/core/lib/dal/.sqlx/query-69c885498b186f3b7cbb215112ec86783d7da0ec1d008680872f3619cf217923.json b/core/lib/dal/.sqlx/query-69c885498b186f3b7cbb215112ec86783d7da0ec1d008680872f3619cf217923.json new file mode 100644 index 000000000000..82575c807fb3 --- /dev/null +++ b/core/lib/dal/.sqlx/query-69c885498b186f3b7cbb215112ec86783d7da0ec1d008680872f3619cf217923.json @@ -0,0 +1,14 @@ +{ + "db_name": "PostgreSQL", + "query": "\n DELETE FROM transactions\n WHERE\n hash = ANY ($1)\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "ByteaArray" + ] + }, + "nullable": [] + }, + "hash": "69c885498b186f3b7cbb215112ec86783d7da0ec1d008680872f3619cf217923" +} diff --git a/core/lib/dal/.sqlx/query-6b327df84d2b3b31d02db35fd5d91a8d67abcdb743a619ed0d1b9c16206a3c20.json b/core/lib/dal/.sqlx/query-6b327df84d2b3b31d02db35fd5d91a8d67abcdb743a619ed0d1b9c16206a3c20.json new file mode 100644 index 000000000000..d00622a1f5fa --- /dev/null +++ b/core/lib/dal/.sqlx/query-6b327df84d2b3b31d02db35fd5d91a8d67abcdb743a619ed0d1b9c16206a3c20.json @@ -0,0 +1,12 @@ +{ + "db_name": "PostgreSQL", + "query": "\n DELETE FROM eth_txs\n WHERE\n id >= (\n SELECT\n MIN(id)\n FROM\n eth_txs\n WHERE\n has_failed = TRUE\n )\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [] + }, + "nullable": [] + }, + "hash": "6b327df84d2b3b31d02db35fd5d91a8d67abcdb743a619ed0d1b9c16206a3c20" +} diff --git a/core/lib/dal/.sqlx/query-6c0d03b1fbe6f47546bc34c6b2eab01cb2c55bf86d2c8c99abb1b7ca21cf75c0.json b/core/lib/dal/.sqlx/query-6c0d03b1fbe6f47546bc34c6b2eab01cb2c55bf86d2c8c99abb1b7ca21cf75c0.json new file mode 100644 index 000000000000..0ad799dd49d8 --- /dev/null +++ b/core/lib/dal/.sqlx/query-6c0d03b1fbe6f47546bc34c6b2eab01cb2c55bf86d2c8c99abb1b7ca21cf75c0.json @@ -0,0 +1,14 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE miniblocks\n SET\n protocol_version = $1\n WHERE\n l1_batch_number IS NULL\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int4" + ] + }, + "nullable": [] + }, + "hash": "6c0d03b1fbe6f47546bc34c6b2eab01cb2c55bf86d2c8c99abb1b7ca21cf75c0" +} diff --git a/core/lib/dal/.sqlx/query-6c46fb3d51aeb069c09ff0cae3ea82f1af696fcc8f7484eaf255d5311589ee39.json b/core/lib/dal/.sqlx/query-6c46fb3d51aeb069c09ff0cae3ea82f1af696fcc8f7484eaf255d5311589ee39.json new file mode 100644 index 000000000000..35e1168dc8fe --- /dev/null +++ b/core/lib/dal/.sqlx/query-6c46fb3d51aeb069c09ff0cae3ea82f1af696fcc8f7484eaf255d5311589ee39.json @@ -0,0 +1,14 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE tokens\n SET\n well_known = TRUE,\n updated_at = NOW()\n WHERE\n l1_address = $1\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Bytea" + ] + }, + "nullable": [] + }, + "hash": "6c46fb3d51aeb069c09ff0cae3ea82f1af696fcc8f7484eaf255d5311589ee39" +} diff --git a/core/lib/dal/.sqlx/query-2520d5065659546dcd50d4be8733af15a5a69d936e0b33000e3035cd1af92bf8.json b/core/lib/dal/.sqlx/query-6e3a3ef443ce8aab55b10eea55f9c8ff11775885aebaf457075c6825305244e5.json similarity index 96% rename from core/lib/dal/.sqlx/query-2520d5065659546dcd50d4be8733af15a5a69d936e0b33000e3035cd1af92bf8.json rename to core/lib/dal/.sqlx/query-6e3a3ef443ce8aab55b10eea55f9c8ff11775885aebaf457075c6825305244e5.json index b8f9d910a3d3..de474897307a 100644 --- a/core/lib/dal/.sqlx/query-2520d5065659546dcd50d4be8733af15a5a69d936e0b33000e3035cd1af92bf8.json +++ b/core/lib/dal/.sqlx/query-6e3a3ef443ce8aab55b10eea55f9c8ff11775885aebaf457075c6825305244e5.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT\n transactions.is_priority,\n transactions.initiator_address,\n transactions.gas_limit,\n transactions.gas_per_pubdata_limit,\n transactions.received_at,\n miniblocks.number AS \"miniblock_number?\",\n transactions.error,\n transactions.effective_gas_price,\n transactions.refunded_gas,\n commit_tx.tx_hash AS \"eth_commit_tx_hash?\",\n prove_tx.tx_hash AS \"eth_prove_tx_hash?\",\n execute_tx.tx_hash AS \"eth_execute_tx_hash?\"\n FROM\n transactions\n LEFT JOIN miniblocks ON miniblocks.number = transactions.miniblock_number\n LEFT JOIN l1_batches ON l1_batches.number = miniblocks.l1_batch_number\n LEFT JOIN eth_txs_history AS commit_tx ON (\n l1_batches.eth_commit_tx_id = commit_tx.eth_tx_id\n AND commit_tx.confirmed_at IS NOT NULL\n )\n LEFT JOIN eth_txs_history AS prove_tx ON (\n l1_batches.eth_prove_tx_id = prove_tx.eth_tx_id\n AND prove_tx.confirmed_at IS NOT NULL\n )\n LEFT JOIN eth_txs_history AS execute_tx ON (\n l1_batches.eth_execute_tx_id = execute_tx.eth_tx_id\n AND execute_tx.confirmed_at IS NOT NULL\n )\n WHERE\n transactions.hash = $1\n AND transactions.data != '{}' :: jsonb\n ", + "query": "\n SELECT\n transactions.is_priority,\n transactions.initiator_address,\n transactions.gas_limit,\n transactions.gas_per_pubdata_limit,\n transactions.received_at,\n miniblocks.number AS \"miniblock_number?\",\n transactions.error,\n transactions.effective_gas_price,\n transactions.refunded_gas,\n commit_tx.tx_hash AS \"eth_commit_tx_hash?\",\n prove_tx.tx_hash AS \"eth_prove_tx_hash?\",\n execute_tx.tx_hash AS \"eth_execute_tx_hash?\"\n FROM\n transactions\n LEFT JOIN miniblocks ON miniblocks.number = transactions.miniblock_number\n LEFT JOIN l1_batches ON l1_batches.number = miniblocks.l1_batch_number\n LEFT JOIN eth_txs_history AS commit_tx ON (\n l1_batches.eth_commit_tx_id = commit_tx.eth_tx_id\n AND commit_tx.confirmed_at IS NOT NULL\n )\n LEFT JOIN eth_txs_history AS prove_tx ON (\n l1_batches.eth_prove_tx_id = prove_tx.eth_tx_id\n AND prove_tx.confirmed_at IS NOT NULL\n )\n LEFT JOIN eth_txs_history AS execute_tx ON (\n l1_batches.eth_execute_tx_id = execute_tx.eth_tx_id\n AND execute_tx.confirmed_at IS NOT NULL\n )\n WHERE\n transactions.hash = $1\n AND transactions.data != '{}'::jsonb\n ", "describe": { "columns": [ { @@ -84,5 +84,5 @@ false ] }, - "hash": "2520d5065659546dcd50d4be8733af15a5a69d936e0b33000e3035cd1af92bf8" + "hash": "6e3a3ef443ce8aab55b10eea55f9c8ff11775885aebaf457075c6825305244e5" } diff --git a/core/lib/dal/.sqlx/query-6f76da3d11930f44dc30884e6e3295a5f5d8ad9a1560d96bed1250c37ec9cb0e.json b/core/lib/dal/.sqlx/query-6f76da3d11930f44dc30884e6e3295a5f5d8ad9a1560d96bed1250c37ec9cb0e.json deleted file mode 100644 index f06fca8f1244..000000000000 --- a/core/lib/dal/.sqlx/query-6f76da3d11930f44dc30884e6e3295a5f5d8ad9a1560d96bed1250c37ec9cb0e.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE\n proof_generation_details\n SET\n vm_run_data_blob_url = $1,\n updated_at = NOW()\n WHERE\n l1_batch_number = $2\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Text", - "Int8" - ] - }, - "nullable": [] - }, - "hash": "6f76da3d11930f44dc30884e6e3295a5f5d8ad9a1560d96bed1250c37ec9cb0e" -} diff --git a/core/lib/dal/.sqlx/query-700be354c97bfdfd9385e0f4e47821df4deb486211260ea86d272fc69a447385.json b/core/lib/dal/.sqlx/query-700be354c97bfdfd9385e0f4e47821df4deb486211260ea86d272fc69a447385.json deleted file mode 100644 index baaa516eaaf8..000000000000 --- a/core/lib/dal/.sqlx/query-700be354c97bfdfd9385e0f4e47821df4deb486211260ea86d272fc69a447385.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n DELETE FROM\n events\n WHERE\n miniblock_number > $1\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8" - ] - }, - "nullable": [] - }, - "hash": "700be354c97bfdfd9385e0f4e47821df4deb486211260ea86d272fc69a447385" -} diff --git a/core/lib/dal/.sqlx/query-703836a3f065b0aedf71ad0474cac5e5fccb3ec55aa1227f5f1ea5a11f9b36a9.json b/core/lib/dal/.sqlx/query-703836a3f065b0aedf71ad0474cac5e5fccb3ec55aa1227f5f1ea5a11f9b36a9.json new file mode 100644 index 000000000000..be9d5219665a --- /dev/null +++ b/core/lib/dal/.sqlx/query-703836a3f065b0aedf71ad0474cac5e5fccb3ec55aa1227f5f1ea5a11f9b36a9.json @@ -0,0 +1,15 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE proof_generation_details\n SET\n vm_run_data_blob_url = $1,\n updated_at = NOW()\n WHERE\n l1_batch_number = $2\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Text", + "Int8" + ] + }, + "nullable": [] + }, + "hash": "703836a3f065b0aedf71ad0474cac5e5fccb3ec55aa1227f5f1ea5a11f9b36a9" +} diff --git a/core/lib/dal/.sqlx/query-d2b3332be1c559226a1782031cd289bd8a6a70e23feb489cebb14ba906865898.json b/core/lib/dal/.sqlx/query-718d29517c100ad9d258a7ee90c48449c1c4bed4d0236fcedc177c9478e72262.json similarity index 81% rename from core/lib/dal/.sqlx/query-d2b3332be1c559226a1782031cd289bd8a6a70e23feb489cebb14ba906865898.json rename to core/lib/dal/.sqlx/query-718d29517c100ad9d258a7ee90c48449c1c4bed4d0236fcedc177c9478e72262.json index 6c7177af8656..4e523efe3fc8 100644 --- a/core/lib/dal/.sqlx/query-d2b3332be1c559226a1782031cd289bd8a6a70e23feb489cebb14ba906865898.json +++ b/core/lib/dal/.sqlx/query-718d29517c100ad9d258a7ee90c48449c1c4bed4d0236fcedc177c9478e72262.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n tee_verifier_input_producer_jobs (l1_batch_number, status, created_at, updated_at)\n VALUES\n ($1, $2, NOW(), NOW()) ON CONFLICT (l1_batch_number) DO NOTHING\n ", + "query": "\n INSERT INTO\n tee_verifier_input_producer_jobs (l1_batch_number, status, created_at, updated_at)\n VALUES\n ($1, $2, NOW(), NOW())\n ON CONFLICT (l1_batch_number) DO NOTHING\n ", "describe": { "columns": [], "parameters": { @@ -24,5 +24,5 @@ }, "nullable": [] }, - "hash": "d2b3332be1c559226a1782031cd289bd8a6a70e23feb489cebb14ba906865898" + "hash": "718d29517c100ad9d258a7ee90c48449c1c4bed4d0236fcedc177c9478e72262" } diff --git a/core/lib/dal/.sqlx/query-73a08b7a9eeadfabe4bcafaf03d4c4a82d399ca1c4c6da36d2ab98a7537de7aa.json b/core/lib/dal/.sqlx/query-73a08b7a9eeadfabe4bcafaf03d4c4a82d399ca1c4c6da36d2ab98a7537de7aa.json deleted file mode 100644 index a47a0657eb04..000000000000 --- a/core/lib/dal/.sqlx/query-73a08b7a9eeadfabe4bcafaf03d4c4a82d399ca1c4c6da36d2ab98a7537de7aa.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n DELETE FROM\n miniblocks_consensus\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [] - }, - "nullable": [] - }, - "hash": "73a08b7a9eeadfabe4bcafaf03d4c4a82d399ca1c4c6da36d2ab98a7537de7aa" -} diff --git a/core/lib/dal/.sqlx/query-7560ba61643a8ec8eeefbe6034226313c255ce356a9a4e25c098484d3129c914.json b/core/lib/dal/.sqlx/query-7560ba61643a8ec8eeefbe6034226313c255ce356a9a4e25c098484d3129c914.json new file mode 100644 index 000000000000..9ff3ab86250d --- /dev/null +++ b/core/lib/dal/.sqlx/query-7560ba61643a8ec8eeefbe6034226313c255ce356a9a4e25c098484d3129c914.json @@ -0,0 +1,14 @@ +{ + "db_name": "PostgreSQL", + "query": "\n DELETE FROM eth_txs_history\n WHERE\n id = $1\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int4" + ] + }, + "nullable": [] + }, + "hash": "7560ba61643a8ec8eeefbe6034226313c255ce356a9a4e25c098484d3129c914" +} diff --git a/core/lib/dal/.sqlx/query-77a43830ca31eac85a3c03d87696bf94a013e49bf50ce23f4de4968781df0796.json b/core/lib/dal/.sqlx/query-77a43830ca31eac85a3c03d87696bf94a013e49bf50ce23f4de4968781df0796.json new file mode 100644 index 000000000000..acff9eeebeeb --- /dev/null +++ b/core/lib/dal/.sqlx/query-77a43830ca31eac85a3c03d87696bf94a013e49bf50ce23f4de4968781df0796.json @@ -0,0 +1,15 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE l1_batches\n SET\n hash = $1\n WHERE\n number = $2\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Bytea", + "Int8" + ] + }, + "nullable": [] + }, + "hash": "77a43830ca31eac85a3c03d87696bf94a013e49bf50ce23f4de4968781df0796" +} diff --git a/core/lib/dal/.sqlx/query-788efaf2682ec81871738a943675217a1838cc7ea29b1f8fa394b62573884512.json b/core/lib/dal/.sqlx/query-788efaf2682ec81871738a943675217a1838cc7ea29b1f8fa394b62573884512.json deleted file mode 100644 index 3f761b3adb8c..000000000000 --- a/core/lib/dal/.sqlx/query-788efaf2682ec81871738a943675217a1838cc7ea29b1f8fa394b62573884512.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n DELETE FROM\n consensus_replica_state\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [] - }, - "nullable": [] - }, - "hash": "788efaf2682ec81871738a943675217a1838cc7ea29b1f8fa394b62573884512" -} diff --git a/core/lib/dal/.sqlx/query-78de0a295e3a2a5412810b1cfa1f1bffbb123e71e0334c17a3f334789f420ad3.json b/core/lib/dal/.sqlx/query-78de0a295e3a2a5412810b1cfa1f1bffbb123e71e0334c17a3f334789f420ad3.json deleted file mode 100644 index 64b36086ee1c..000000000000 --- a/core/lib/dal/.sqlx/query-78de0a295e3a2a5412810b1cfa1f1bffbb123e71e0334c17a3f334789f420ad3.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n DELETE FROM\n events\n WHERE\n miniblock_number BETWEEN $1 AND $2\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8", - "Int8" - ] - }, - "nullable": [] - }, - "hash": "78de0a295e3a2a5412810b1cfa1f1bffbb123e71e0334c17a3f334789f420ad3" -} diff --git a/core/lib/dal/.sqlx/query-7af52a220958d790bd8b5b06a6e29bf769829991c7d732b13f96bcd1293263ea.json b/core/lib/dal/.sqlx/query-7af52a220958d790bd8b5b06a6e29bf769829991c7d732b13f96bcd1293263ea.json new file mode 100644 index 000000000000..80d855d8d21a --- /dev/null +++ b/core/lib/dal/.sqlx/query-7af52a220958d790bd8b5b06a6e29bf769829991c7d732b13f96bcd1293263ea.json @@ -0,0 +1,12 @@ +{ + "db_name": "PostgreSQL", + "query": "\n DELETE FROM miniblocks_consensus\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [] + }, + "nullable": [] + }, + "hash": "7af52a220958d790bd8b5b06a6e29bf769829991c7d732b13f96bcd1293263ea" +} diff --git a/core/lib/dal/.sqlx/query-7dfd5e11546dc2b5ae02428e99e664b1106316347f0fc557afe7112d6fca7e3b.json b/core/lib/dal/.sqlx/query-7dfd5e11546dc2b5ae02428e99e664b1106316347f0fc557afe7112d6fca7e3b.json deleted file mode 100644 index 3732955a3777..000000000000 --- a/core/lib/dal/.sqlx/query-7dfd5e11546dc2b5ae02428e99e664b1106316347f0fc557afe7112d6fca7e3b.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE\n proof_generation_details\n SET\n status = 'picked_by_prover',\n updated_at = NOW(),\n prover_taken_at = NOW()\n WHERE\n l1_batch_number = (\n SELECT\n l1_batch_number\n FROM\n proof_generation_details\n LEFT JOIN l1_batches ON l1_batch_number = l1_batches.number\n WHERE\n (\n vm_run_data_blob_url IS NOT NULL\n AND proof_gen_data_blob_url IS NOT NULL\n AND l1_batches.hash IS NOT NULL\n AND l1_batches.aux_data_hash IS NOT NULL\n AND l1_batches.meta_parameters_hash IS NOT NULL\n AND status = 'unpicked'\n )\n OR (\n status = 'picked_by_prover'\n AND prover_taken_at < NOW() - $1 :: INTERVAL\n )\n ORDER BY\n l1_batch_number ASC\n LIMIT\n 1\n )\n RETURNING\n proof_generation_details.l1_batch_number\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "l1_batch_number", - "type_info": "Int8" - } - ], - "parameters": { - "Left": [ - "Interval" - ] - }, - "nullable": [ - false - ] - }, - "hash": "7dfd5e11546dc2b5ae02428e99e664b1106316347f0fc557afe7112d6fca7e3b" -} diff --git a/core/lib/dal/.sqlx/query-811143c3607b1a06d1c88084c43d4c2f5800c37ac0715f6ae351cafb8afbb76a.json b/core/lib/dal/.sqlx/query-811143c3607b1a06d1c88084c43d4c2f5800c37ac0715f6ae351cafb8afbb76a.json deleted file mode 100644 index c3b12a557c36..000000000000 --- a/core/lib/dal/.sqlx/query-811143c3607b1a06d1c88084c43d4c2f5800c37ac0715f6ae351cafb8afbb76a.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n DELETE FROM\n tee_verifier_input_producer_jobs\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [] - }, - "nullable": [] - }, - "hash": "811143c3607b1a06d1c88084c43d4c2f5800c37ac0715f6ae351cafb8afbb76a" -} diff --git a/core/lib/dal/.sqlx/query-83cb057f275c71da641d9b727abcf7f4d16593b0ed0b496c903d967efe5bb6a6.json b/core/lib/dal/.sqlx/query-83cb057f275c71da641d9b727abcf7f4d16593b0ed0b496c903d967efe5bb6a6.json deleted file mode 100644 index bf9c949ad5ea..000000000000 --- a/core/lib/dal/.sqlx/query-83cb057f275c71da641d9b727abcf7f4d16593b0ed0b496c903d967efe5bb6a6.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE\n contract_verification_requests\n SET\n status = 'failed',\n updated_at = NOW(),\n error = $2,\n compilation_errors = $3,\n panic_message = $4\n WHERE\n id = $1\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8", - "Text", - "Jsonb", - "Text" - ] - }, - "nullable": [] - }, - "hash": "83cb057f275c71da641d9b727abcf7f4d16593b0ed0b496c903d967efe5bb6a6" -} diff --git a/core/lib/dal/.sqlx/query-892c0f4aaedfb447eee63fecbcb31f9138b204f4bcd15f934e5b209f3dac0639.json b/core/lib/dal/.sqlx/query-892c0f4aaedfb447eee63fecbcb31f9138b204f4bcd15f934e5b209f3dac0639.json deleted file mode 100644 index 550ea471002d..000000000000 --- a/core/lib/dal/.sqlx/query-892c0f4aaedfb447eee63fecbcb31f9138b204f4bcd15f934e5b209f3dac0639.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE\n l1_batches\n SET\n hash = $1,\n rollup_last_leaf_index = $2,\n updated_at = NOW()\n WHERE\n number = $3\n AND hash IS NULL\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Bytea", - "Int8", - "Int8" - ] - }, - "nullable": [] - }, - "hash": "892c0f4aaedfb447eee63fecbcb31f9138b204f4bcd15f934e5b209f3dac0639" -} diff --git a/core/lib/dal/.sqlx/query-8b103e7c6e2e0955b5bc283ceef3a203f640cb2279f3b75108c49b2527b19c8b.json b/core/lib/dal/.sqlx/query-8b103e7c6e2e0955b5bc283ceef3a203f640cb2279f3b75108c49b2527b19c8b.json deleted file mode 100644 index 7b0409fd06a4..000000000000 --- a/core/lib/dal/.sqlx/query-8b103e7c6e2e0955b5bc283ceef3a203f640cb2279f3b75108c49b2527b19c8b.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE\n l1_batches\n SET\n tree_writes = $1\n WHERE\n number = $2\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Bytea", - "Int8" - ] - }, - "nullable": [] - }, - "hash": "8b103e7c6e2e0955b5bc283ceef3a203f640cb2279f3b75108c49b2527b19c8b" -} diff --git a/core/lib/dal/.sqlx/query-9583c10504ec214bc15eac407a7e6de657d21422fd1d46b1fc0d3e829393146c.json b/core/lib/dal/.sqlx/query-8b9e5d525c026de97c0a732b1adc8dc4bd57e32dfefe1017acba9a15fc14b895.json similarity index 77% rename from core/lib/dal/.sqlx/query-9583c10504ec214bc15eac407a7e6de657d21422fd1d46b1fc0d3e829393146c.json rename to core/lib/dal/.sqlx/query-8b9e5d525c026de97c0a732b1adc8dc4bd57e32dfefe1017acba9a15fc14b895.json index a56a90c79f84..de369bccec54 100644 --- a/core/lib/dal/.sqlx/query-9583c10504ec214bc15eac407a7e6de657d21422fd1d46b1fc0d3e829393146c.json +++ b/core/lib/dal/.sqlx/query-8b9e5d525c026de97c0a732b1adc8dc4bd57e32dfefe1017acba9a15fc14b895.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT\n storage_logs.hashed_key,\n storage_logs.value,\n initial_writes.index\n FROM\n storage_logs\n INNER JOIN initial_writes ON storage_logs.hashed_key = initial_writes.hashed_key\n WHERE\n storage_logs.miniblock_number = $1\n AND storage_logs.hashed_key >= $2 :: bytea\n AND storage_logs.hashed_key <= $3 :: bytea\n ORDER BY\n storage_logs.hashed_key\n ", + "query": "\n SELECT\n storage_logs.hashed_key,\n storage_logs.value,\n initial_writes.index\n FROM\n storage_logs\n INNER JOIN initial_writes ON storage_logs.hashed_key = initial_writes.hashed_key\n WHERE\n storage_logs.miniblock_number = $1\n AND storage_logs.hashed_key >= $2::bytea\n AND storage_logs.hashed_key <= $3::bytea\n ORDER BY\n storage_logs.hashed_key\n ", "describe": { "columns": [ { @@ -32,5 +32,5 @@ false ] }, - "hash": "9583c10504ec214bc15eac407a7e6de657d21422fd1d46b1fc0d3e829393146c" + "hash": "8b9e5d525c026de97c0a732b1adc8dc4bd57e32dfefe1017acba9a15fc14b895" } diff --git a/core/lib/dal/.sqlx/query-8cc3cf441b12a8b6a2f25f4fe5581e33845ec68e386ef032715ad1222e2fdc8b.json b/core/lib/dal/.sqlx/query-8cc3cf441b12a8b6a2f25f4fe5581e33845ec68e386ef032715ad1222e2fdc8b.json new file mode 100644 index 000000000000..a048969f0123 --- /dev/null +++ b/core/lib/dal/.sqlx/query-8cc3cf441b12a8b6a2f25f4fe5581e33845ec68e386ef032715ad1222e2fdc8b.json @@ -0,0 +1,15 @@ +{ + "db_name": "PostgreSQL", + "query": "\n DELETE FROM transactions\n WHERE\n initiator_address = $1\n AND nonce = $2\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Bytea", + "Int8" + ] + }, + "nullable": [] + }, + "hash": "8cc3cf441b12a8b6a2f25f4fe5581e33845ec68e386ef032715ad1222e2fdc8b" +} diff --git a/core/lib/dal/.sqlx/query-8e2b160a4d0de1573ecd486c91b8abd8d4e534e5c17e4ffbcf5c97ff920b12d6.json b/core/lib/dal/.sqlx/query-8e2b160a4d0de1573ecd486c91b8abd8d4e534e5c17e4ffbcf5c97ff920b12d6.json deleted file mode 100644 index ba056c30ac36..000000000000 --- a/core/lib/dal/.sqlx/query-8e2b160a4d0de1573ecd486c91b8abd8d4e534e5c17e4ffbcf5c97ff920b12d6.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n DELETE FROM\n eth_txs\n WHERE\n id IN (\n (\n SELECT\n eth_commit_tx_id\n FROM\n l1_batches\n WHERE\n number > $1\n )\n UNION\n (\n SELECT\n eth_prove_tx_id\n FROM\n l1_batches\n WHERE\n number > $1\n )\n UNION\n (\n SELECT\n eth_execute_tx_id\n FROM\n l1_batches\n WHERE\n number > $1\n )\n )\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8" - ] - }, - "nullable": [] - }, - "hash": "8e2b160a4d0de1573ecd486c91b8abd8d4e534e5c17e4ffbcf5c97ff920b12d6" -} diff --git a/core/lib/dal/.sqlx/query-8f662682747a24fbe122533f421466f8a4efab1a52acc26f3a6c6b219a46390b.json b/core/lib/dal/.sqlx/query-8f662682747a24fbe122533f421466f8a4efab1a52acc26f3a6c6b219a46390b.json new file mode 100644 index 000000000000..18c1bbd8a1ee --- /dev/null +++ b/core/lib/dal/.sqlx/query-8f662682747a24fbe122533f421466f8a4efab1a52acc26f3a6c6b219a46390b.json @@ -0,0 +1,15 @@ +{ + "db_name": "PostgreSQL", + "query": "\n DELETE FROM l2_to_l1_logs\n WHERE\n miniblock_number BETWEEN $1 AND $2\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8", + "Int8" + ] + }, + "nullable": [] + }, + "hash": "8f662682747a24fbe122533f421466f8a4efab1a52acc26f3a6c6b219a46390b" +} diff --git a/core/lib/dal/.sqlx/query-901b5259b9bfcb8469175a0a4ba9c7459db54dae9a2ea2db8595af4cb70c8aa9.json b/core/lib/dal/.sqlx/query-901b5259b9bfcb8469175a0a4ba9c7459db54dae9a2ea2db8595af4cb70c8aa9.json deleted file mode 100644 index cb67f695ec17..000000000000 --- a/core/lib/dal/.sqlx/query-901b5259b9bfcb8469175a0a4ba9c7459db54dae9a2ea2db8595af4cb70c8aa9.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n DELETE FROM\n transactions\n WHERE\n miniblock_number IS NULL\n AND received_at < NOW() - $1 :: INTERVAL\n AND is_priority = FALSE\n AND error IS NULL\n RETURNING\n hash\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "hash", - "type_info": "Bytea" - } - ], - "parameters": { - "Left": [ - "Interval" - ] - }, - "nullable": [ - false - ] - }, - "hash": "901b5259b9bfcb8469175a0a4ba9c7459db54dae9a2ea2db8595af4cb70c8aa9" -} diff --git a/core/lib/dal/.sqlx/query-95ea0522a3eff6c0d2d0b1c58fd2767e112b95f4d103c27acd6f7ede108bd300.json b/core/lib/dal/.sqlx/query-95ea0522a3eff6c0d2d0b1c58fd2767e112b95f4d103c27acd6f7ede108bd300.json new file mode 100644 index 000000000000..3c822fe50d17 --- /dev/null +++ b/core/lib/dal/.sqlx/query-95ea0522a3eff6c0d2d0b1c58fd2767e112b95f4d103c27acd6f7ede108bd300.json @@ -0,0 +1,16 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE eth_txs\n SET\n gas_used = $1,\n confirmed_eth_tx_history_id = $2\n WHERE\n id = $3\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8", + "Int4", + "Int4" + ] + }, + "nullable": [] + }, + "hash": "95ea0522a3eff6c0d2d0b1c58fd2767e112b95f4d103c27acd6f7ede108bd300" +} diff --git a/core/lib/dal/.sqlx/query-9a261b451c31d010b1b2bc0af25d2bd038257f7cf2ab51405dc05ccba3e33312.json b/core/lib/dal/.sqlx/query-9a261b451c31d010b1b2bc0af25d2bd038257f7cf2ab51405dc05ccba3e33312.json deleted file mode 100644 index a8acdfeffda5..000000000000 --- a/core/lib/dal/.sqlx/query-9a261b451c31d010b1b2bc0af25d2bd038257f7cf2ab51405dc05ccba3e33312.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n initial_writes (\n hashed_key,\n INDEX,\n l1_batch_number,\n created_at,\n updated_at\n )\n SELECT\n u.hashed_key,\n u.index,\n $3,\n NOW(),\n NOW()\n FROM\n UNNEST($1 :: bytea [], $2 :: BIGINT []) AS u (hashed_key, INDEX)\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "ByteaArray", - "Int8Array", - "Int8" - ] - }, - "nullable": [] - }, - "hash": "9a261b451c31d010b1b2bc0af25d2bd038257f7cf2ab51405dc05ccba3e33312" -} diff --git a/core/lib/dal/.sqlx/query-9cebabf4e4643a41452266a9d7c4e8901b631ff170733621ce3ece216d71205b.json b/core/lib/dal/.sqlx/query-9cebabf4e4643a41452266a9d7c4e8901b631ff170733621ce3ece216d71205b.json deleted file mode 100644 index e2e102bda4ba..000000000000 --- a/core/lib/dal/.sqlx/query-9cebabf4e4643a41452266a9d7c4e8901b631ff170733621ce3ece216d71205b.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n l1_batches_consensus_committees (l1_batch_number, attesters, updated_at)\n VALUES\n ($1, $2, NOW()) ON CONFLICT (l1_batch_number) DO\n UPDATE\n SET\n l1_batch_number = $1,\n attesters = $2,\n updated_at = NOW()\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8", - "Jsonb" - ] - }, - "nullable": [] - }, - "hash": "9cebabf4e4643a41452266a9d7c4e8901b631ff170733621ce3ece216d71205b" -} diff --git a/core/lib/dal/.sqlx/query-9cfcde703a48b110791d2ae1103c9317c01d6e35db3b07d0a31f436e7e3c7c40.json b/core/lib/dal/.sqlx/query-9cfcde703a48b110791d2ae1103c9317c01d6e35db3b07d0a31f436e7e3c7c40.json new file mode 100644 index 000000000000..c4beef961733 --- /dev/null +++ b/core/lib/dal/.sqlx/query-9cfcde703a48b110791d2ae1103c9317c01d6e35db3b07d0a31f436e7e3c7c40.json @@ -0,0 +1,14 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE contract_verification_requests\n SET\n status = 'successful',\n updated_at = NOW()\n WHERE\n id = $1\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8" + ] + }, + "nullable": [] + }, + "hash": "9cfcde703a48b110791d2ae1103c9317c01d6e35db3b07d0a31f436e7e3c7c40" +} diff --git a/core/lib/dal/.sqlx/query-9de5acb3de1b96ff8eb62a6324e8e221a8ef9014458cc7f1dbc60c056a0768a0.json b/core/lib/dal/.sqlx/query-9de5acb3de1b96ff8eb62a6324e8e221a8ef9014458cc7f1dbc60c056a0768a0.json new file mode 100644 index 000000000000..674377635ced --- /dev/null +++ b/core/lib/dal/.sqlx/query-9de5acb3de1b96ff8eb62a6324e8e221a8ef9014458cc7f1dbc60c056a0768a0.json @@ -0,0 +1,16 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE snapshots\n SET\n storage_logs_filepaths[$2] = $3,\n updated_at = NOW()\n WHERE\n l1_batch_number = $1\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8", + "Int4", + "Text" + ] + }, + "nullable": [] + }, + "hash": "9de5acb3de1b96ff8eb62a6324e8e221a8ef9014458cc7f1dbc60c056a0768a0" +} diff --git a/core/lib/dal/.sqlx/query-7b41633745312d0580634c3017e5fe6910fce4cf57c0959dc4dad4d93129ec1b.json b/core/lib/dal/.sqlx/query-9f29aa31d4698031e9f3fe2eb273724dcce382936af0d4c386143399995cd325.json similarity index 56% rename from core/lib/dal/.sqlx/query-7b41633745312d0580634c3017e5fe6910fce4cf57c0959dc4dad4d93129ec1b.json rename to core/lib/dal/.sqlx/query-9f29aa31d4698031e9f3fe2eb273724dcce382936af0d4c386143399995cd325.json index e9126cbc5f20..2e1bf7c3e61c 100644 --- a/core/lib/dal/.sqlx/query-7b41633745312d0580634c3017e5fe6910fce4cf57c0959dc4dad4d93129ec1b.json +++ b/core/lib/dal/.sqlx/query-9f29aa31d4698031e9f3fe2eb273724dcce382936af0d4c386143399995cd325.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT\n storage_logs.address AS \"address!\",\n storage_logs.key AS \"key!\",\n storage_logs.value AS \"value!\",\n storage_logs.miniblock_number AS \"miniblock_number!\",\n initial_writes.l1_batch_number AS \"l1_batch_number!\",\n initial_writes.index\n FROM\n (\n SELECT\n hashed_key,\n MAX(\n ARRAY [miniblock_number, operation_number] :: INT []\n ) AS op\n FROM\n storage_logs\n WHERE\n miniblock_number <= $1\n AND hashed_key >= $3\n AND hashed_key <= $4\n GROUP BY\n hashed_key\n ORDER BY\n hashed_key\n ) AS keys\n INNER JOIN storage_logs ON keys.hashed_key = storage_logs.hashed_key\n AND storage_logs.miniblock_number = keys.op [1]\n AND storage_logs.operation_number = keys.op [2]\n INNER JOIN initial_writes ON keys.hashed_key = initial_writes.hashed_key\n WHERE\n initial_writes.l1_batch_number <= $2\n ", + "query": "\n SELECT\n storage_logs.address AS \"address!\",\n storage_logs.key AS \"key!\",\n storage_logs.value AS \"value!\",\n storage_logs.miniblock_number AS \"miniblock_number!\",\n initial_writes.l1_batch_number AS \"l1_batch_number!\",\n initial_writes.index\n FROM\n (\n SELECT\n hashed_key,\n MAX(ARRAY[miniblock_number, operation_number]::INT[]) AS op\n FROM\n storage_logs\n WHERE\n miniblock_number <= $1\n AND hashed_key >= $3\n AND hashed_key <= $4\n GROUP BY\n hashed_key\n ORDER BY\n hashed_key\n ) AS keys\n INNER JOIN storage_logs ON keys.hashed_key = storage_logs.hashed_key\n AND storage_logs.miniblock_number = keys.op[1]\n AND storage_logs.operation_number = keys.op[2]\n INNER JOIN initial_writes ON keys.hashed_key = initial_writes.hashed_key\n WHERE\n initial_writes.l1_batch_number <= $2\n ", "describe": { "columns": [ { @@ -51,5 +51,5 @@ false ] }, - "hash": "7b41633745312d0580634c3017e5fe6910fce4cf57c0959dc4dad4d93129ec1b" + "hash": "9f29aa31d4698031e9f3fe2eb273724dcce382936af0d4c386143399995cd325" } diff --git a/core/lib/dal/.sqlx/query-a0fc795697398f22b45601f51a6d1910919b8b46e895ddaa4ba5bf411585dc6e.json b/core/lib/dal/.sqlx/query-a0fc795697398f22b45601f51a6d1910919b8b46e895ddaa4ba5bf411585dc6e.json deleted file mode 100644 index bb2c7a6f34b1..000000000000 --- a/core/lib/dal/.sqlx/query-a0fc795697398f22b45601f51a6d1910919b8b46e895ddaa4ba5bf411585dc6e.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n commitments (\n l1_batch_number,\n events_queue_commitment,\n bootloader_initial_content_commitment\n )\n VALUES\n ($1, $2, $3) ON CONFLICT (l1_batch_number) DO NOTHING\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8", - "Bytea", - "Bytea" - ] - }, - "nullable": [] - }, - "hash": "a0fc795697398f22b45601f51a6d1910919b8b46e895ddaa4ba5bf411585dc6e" -} diff --git a/core/lib/dal/.sqlx/query-a12b2f1fdd28f68a429f307d66259a410844c0e3cb5e190d1b8442da802825ad.json b/core/lib/dal/.sqlx/query-a12b2f1fdd28f68a429f307d66259a410844c0e3cb5e190d1b8442da802825ad.json deleted file mode 100644 index 406de9f85cc1..000000000000 --- a/core/lib/dal/.sqlx/query-a12b2f1fdd28f68a429f307d66259a410844c0e3cb5e190d1b8442da802825ad.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n DELETE FROM\n eth_txs_history\n WHERE\n id = $1\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int4" - ] - }, - "nullable": [] - }, - "hash": "a12b2f1fdd28f68a429f307d66259a410844c0e3cb5e190d1b8442da802825ad" -} diff --git a/core/lib/dal/.sqlx/query-a22e5f63ee08ee38efcba440364c08e57f95c6ee5a69f02f15eb1e886df4c882.json b/core/lib/dal/.sqlx/query-a22e5f63ee08ee38efcba440364c08e57f95c6ee5a69f02f15eb1e886df4c882.json deleted file mode 100644 index 387ebfa0242b..000000000000 --- a/core/lib/dal/.sqlx/query-a22e5f63ee08ee38efcba440364c08e57f95c6ee5a69f02f15eb1e886df4c882.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE\n consensus_replica_state\n SET\n state = $1\n WHERE\n fake_key\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Jsonb" - ] - }, - "nullable": [] - }, - "hash": "a22e5f63ee08ee38efcba440364c08e57f95c6ee5a69f02f15eb1e886df4c882" -} diff --git a/core/lib/dal/.sqlx/query-a23d63b7c4264ee0f5b60c09f09f8fbd8fdaf23266412e2faffb7e3813213b98.json b/core/lib/dal/.sqlx/query-a23d63b7c4264ee0f5b60c09f09f8fbd8fdaf23266412e2faffb7e3813213b98.json new file mode 100644 index 000000000000..257ce7050619 --- /dev/null +++ b/core/lib/dal/.sqlx/query-a23d63b7c4264ee0f5b60c09f09f8fbd8fdaf23266412e2faffb7e3813213b98.json @@ -0,0 +1,14 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE proof_generation_details\n SET\n status = 'unpicked',\n updated_at = NOW()\n WHERE\n l1_batch_number = $1\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8" + ] + }, + "nullable": [] + }, + "hash": "a23d63b7c4264ee0f5b60c09f09f8fbd8fdaf23266412e2faffb7e3813213b98" +} diff --git a/core/lib/dal/.sqlx/query-a343c1ea8ad33350b21a820ba981719519938eccbea4a598d842bd75b9553880.json b/core/lib/dal/.sqlx/query-a343c1ea8ad33350b21a820ba981719519938eccbea4a598d842bd75b9553880.json deleted file mode 100644 index 5280d28a8afd..000000000000 --- a/core/lib/dal/.sqlx/query-a343c1ea8ad33350b21a820ba981719519938eccbea4a598d842bd75b9553880.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE\n miniblocks\n SET\n logs_bloom = NULL\n WHERE\n number = $1\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8" - ] - }, - "nullable": [] - }, - "hash": "a343c1ea8ad33350b21a820ba981719519938eccbea4a598d842bd75b9553880" -} diff --git a/core/lib/dal/.sqlx/query-a3b4d8e4487dbc898277645524b8ad91e8653d01981640d2d068c9564393f7b9.json b/core/lib/dal/.sqlx/query-a3b4d8e4487dbc898277645524b8ad91e8653d01981640d2d068c9564393f7b9.json deleted file mode 100644 index 485bac2d3195..000000000000 --- a/core/lib/dal/.sqlx/query-a3b4d8e4487dbc898277645524b8ad91e8653d01981640d2d068c9564393f7b9.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE\n l1_batches\n SET\n eth_execute_tx_id = $1,\n updated_at = NOW()\n WHERE\n number BETWEEN $2 AND $3\n AND eth_execute_tx_id IS NULL\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int4", - "Int8", - "Int8" - ] - }, - "nullable": [] - }, - "hash": "a3b4d8e4487dbc898277645524b8ad91e8653d01981640d2d068c9564393f7b9" -} diff --git a/core/lib/dal/.sqlx/query-a4fcd075b68467bb119e49e6b20a69138206dfeb41f3daff4a3eef1de0bed4e4.json b/core/lib/dal/.sqlx/query-a4fcd075b68467bb119e49e6b20a69138206dfeb41f3daff4a3eef1de0bed4e4.json new file mode 100644 index 000000000000..39b0c391ef59 --- /dev/null +++ b/core/lib/dal/.sqlx/query-a4fcd075b68467bb119e49e6b20a69138206dfeb41f3daff4a3eef1de0bed4e4.json @@ -0,0 +1,16 @@ +{ + "db_name": "PostgreSQL", + "query": "\n INSERT INTO\n initial_writes (hashed_key, INDEX, l1_batch_number, created_at, updated_at)\n SELECT\n u.hashed_key,\n u.index,\n $3,\n NOW(),\n NOW()\n FROM\n UNNEST($1::bytea[], $2::BIGINT[]) AS u (hashed_key, INDEX)\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "ByteaArray", + "Int8Array", + "Int8" + ] + }, + "nullable": [] + }, + "hash": "a4fcd075b68467bb119e49e6b20a69138206dfeb41f3daff4a3eef1de0bed4e4" +} diff --git a/core/lib/dal/.sqlx/query-a51b8f1eeb6ef6800619e7a5a91d10c23ab2924f6a3f0594f6990af8ea9146a6.json b/core/lib/dal/.sqlx/query-a51b8f1eeb6ef6800619e7a5a91d10c23ab2924f6a3f0594f6990af8ea9146a6.json new file mode 100644 index 000000000000..9800b470795b --- /dev/null +++ b/core/lib/dal/.sqlx/query-a51b8f1eeb6ef6800619e7a5a91d10c23ab2924f6a3f0594f6990af8ea9146a6.json @@ -0,0 +1,15 @@ +{ + "db_name": "PostgreSQL", + "query": "\n DELETE FROM events\n WHERE\n miniblock_number BETWEEN $1 AND $2\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8", + "Int8" + ] + }, + "nullable": [] + }, + "hash": "a51b8f1eeb6ef6800619e7a5a91d10c23ab2924f6a3f0594f6990af8ea9146a6" +} diff --git a/core/lib/dal/.sqlx/query-340c154ee5969dbcdf87b1f268236a186c539fe34c9893c51018687ae0ca01b5.json b/core/lib/dal/.sqlx/query-a71a87d91dcf0f624dbd64eb8828f65ff83204ebab2ea31847ae305a098823b0.json similarity index 70% rename from core/lib/dal/.sqlx/query-340c154ee5969dbcdf87b1f268236a186c539fe34c9893c51018687ae0ca01b5.json rename to core/lib/dal/.sqlx/query-a71a87d91dcf0f624dbd64eb8828f65ff83204ebab2ea31847ae305a098823b0.json index b8230dbbb898..272f20e5268a 100644 --- a/core/lib/dal/.sqlx/query-340c154ee5969dbcdf87b1f268236a186c539fe34c9893c51018687ae0ca01b5.json +++ b/core/lib/dal/.sqlx/query-a71a87d91dcf0f624dbd64eb8828f65ff83204ebab2ea31847ae305a098823b0.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT\n *\n FROM\n eth_txs\n WHERE\n from_addr IS NOT DISTINCT\n FROM\n $1 -- can't just use equality as NULL != NULL\n AND confirmed_eth_tx_history_id IS NULL\n AND is_gateway = $2\n AND id <= (\n SELECT\n COALESCE(MAX(eth_tx_id), 0)\n FROM\n eth_txs_history\n JOIN eth_txs ON eth_txs.id = eth_txs_history.eth_tx_id\n WHERE\n eth_txs_history.sent_at_block IS NOT NULL\n AND eth_txs.from_addr IS NOT DISTINCT\n FROM\n $1\n AND is_gateway = $2\n )\n ORDER BY\n id\n ", + "query": "\n SELECT\n *\n FROM\n eth_txs\n WHERE\n from_addr IS NOT DISTINCT FROM $1 -- can't just use equality as NULL != NULL\n AND confirmed_eth_tx_history_id IS NULL\n AND is_gateway = $2\n AND id <= (\n SELECT\n COALESCE(MAX(eth_tx_id), 0)\n FROM\n eth_txs_history\n JOIN eth_txs ON eth_txs.id = eth_txs_history.eth_tx_id\n WHERE\n eth_txs_history.sent_at_block IS NOT NULL\n AND eth_txs.from_addr IS NOT DISTINCT FROM $1\n AND is_gateway = $2\n )\n ORDER BY\n id\n ", "describe": { "columns": [ { @@ -109,5 +109,5 @@ true ] }, - "hash": "340c154ee5969dbcdf87b1f268236a186c539fe34c9893c51018687ae0ca01b5" + "hash": "a71a87d91dcf0f624dbd64eb8828f65ff83204ebab2ea31847ae305a098823b0" } diff --git a/core/lib/dal/.sqlx/query-a74d029f58801ec05d8d14a3b065d93e391600ab9da2e5fd4e8b139ab3d77583.json b/core/lib/dal/.sqlx/query-a74d029f58801ec05d8d14a3b065d93e391600ab9da2e5fd4e8b139ab3d77583.json new file mode 100644 index 000000000000..c4f1f4bbcd0d --- /dev/null +++ b/core/lib/dal/.sqlx/query-a74d029f58801ec05d8d14a3b065d93e391600ab9da2e5fd4e8b139ab3d77583.json @@ -0,0 +1,15 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE proof_generation_details\n SET\n status = 'generated',\n proof_blob_url = $1,\n updated_at = NOW()\n WHERE\n l1_batch_number = $2\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Text", + "Int8" + ] + }, + "nullable": [] + }, + "hash": "a74d029f58801ec05d8d14a3b065d93e391600ab9da2e5fd4e8b139ab3d77583" +} diff --git a/core/lib/dal/.sqlx/query-bb728bbbf89d3996b7412043ead62a7c60e89631bfe95611f156dac532218ca5.json b/core/lib/dal/.sqlx/query-a8d55f14de2f489fdc12c8da540e0d51f86d30d5ad92496e4aa087a3c4aae09f.json similarity index 53% rename from core/lib/dal/.sqlx/query-bb728bbbf89d3996b7412043ead62a7c60e89631bfe95611f156dac532218ca5.json rename to core/lib/dal/.sqlx/query-a8d55f14de2f489fdc12c8da540e0d51f86d30d5ad92496e4aa087a3c4aae09f.json index 8f59ccb3f3d2..b00999f21448 100644 --- a/core/lib/dal/.sqlx/query-bb728bbbf89d3996b7412043ead62a7c60e89631bfe95611f156dac532218ca5.json +++ b/core/lib/dal/.sqlx/query-a8d55f14de2f489fdc12c8da540e0d51f86d30d5ad92496e4aa087a3c4aae09f.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n transactions (\n hash,\n is_priority,\n initiator_address,\n gas_limit,\n max_fee_per_gas,\n gas_per_pubdata_limit,\n data,\n priority_op_id,\n full_fee,\n layer_2_tip_fee,\n contract_address,\n l1_block_number,\n value,\n paymaster,\n paymaster_input,\n tx_format,\n l1_tx_mint,\n l1_tx_refund_recipient,\n miniblock_number,\n index_in_block,\n error,\n execution_info,\n refunded_gas,\n effective_gas_price,\n received_at,\n created_at,\n updated_at\n )\n SELECT\n data_table.hash,\n TRUE,\n data_table.initiator_address,\n data_table.gas_limit,\n data_table.max_fee_per_gas,\n data_table.gas_per_pubdata_limit,\n data_table.data,\n data_table.priority_op_id,\n data_table.full_fee,\n data_table.layer_2_tip_fee,\n data_table.contract_address,\n data_table.l1_block_number,\n data_table.value,\n '\\x0000000000000000000000000000000000000000' :: bytea,\n '\\x' :: bytea,\n data_table.tx_format,\n data_table.l1_tx_mint,\n data_table.l1_tx_refund_recipient,\n $21,\n data_table.index_in_block,\n NULLIF(data_table.error, ''),\n data_table.execution_info,\n data_table.refunded_gas,\n data_table.effective_gas_price,\n NOW(),\n NOW(),\n NOW()\n FROM\n (\n SELECT\n UNNEST($1 :: BYTEA []) AS hash,\n UNNEST($2 :: BYTEA []) AS initiator_address,\n UNNEST($3 :: NUMERIC []) AS gas_limit,\n UNNEST($4 :: NUMERIC []) AS max_fee_per_gas,\n UNNEST($5 :: NUMERIC []) AS gas_per_pubdata_limit,\n UNNEST($6 :: JSONB []) AS data,\n UNNEST($7 :: BIGINT []) AS priority_op_id,\n UNNEST($8 :: NUMERIC []) AS full_fee,\n UNNEST($9 :: NUMERIC []) AS layer_2_tip_fee,\n UNNEST($10 :: BYTEA []) AS contract_address,\n UNNEST($11 :: INT []) AS l1_block_number,\n UNNEST($12 :: NUMERIC []) AS value,\n UNNEST($13 :: INTEGER []) AS tx_format,\n UNNEST($14 :: NUMERIC []) AS l1_tx_mint,\n UNNEST($15 :: BYTEA []) AS l1_tx_refund_recipient,\n UNNEST($16 :: INT []) AS index_in_block,\n UNNEST($17 :: VARCHAR []) AS error,\n UNNEST($18 :: JSONB []) AS execution_info,\n UNNEST($19 :: BIGINT []) AS refunded_gas,\n UNNEST($20 :: NUMERIC []) AS effective_gas_price\n ) AS data_table\n ", + "query": "\n INSERT INTO\n transactions (\n hash,\n is_priority,\n initiator_address,\n gas_limit,\n max_fee_per_gas,\n gas_per_pubdata_limit,\n data,\n priority_op_id,\n full_fee,\n layer_2_tip_fee,\n contract_address,\n l1_block_number,\n value,\n paymaster,\n paymaster_input,\n tx_format,\n l1_tx_mint,\n l1_tx_refund_recipient,\n miniblock_number,\n index_in_block,\n error,\n execution_info,\n refunded_gas,\n effective_gas_price,\n received_at,\n created_at,\n updated_at\n )\n SELECT\n data_table.hash,\n TRUE,\n data_table.initiator_address,\n data_table.gas_limit,\n data_table.max_fee_per_gas,\n data_table.gas_per_pubdata_limit,\n data_table.data,\n data_table.priority_op_id,\n data_table.full_fee,\n data_table.layer_2_tip_fee,\n data_table.contract_address,\n data_table.l1_block_number,\n data_table.value,\n '\\x0000000000000000000000000000000000000000'::bytea,\n '\\x'::bytea,\n data_table.tx_format,\n data_table.l1_tx_mint,\n data_table.l1_tx_refund_recipient,\n $21,\n data_table.index_in_block,\n NULLIF(data_table.error, ''),\n data_table.execution_info,\n data_table.refunded_gas,\n data_table.effective_gas_price,\n NOW(),\n NOW(),\n NOW()\n FROM\n (\n SELECT\n UNNEST($1::BYTEA[]) AS hash,\n UNNEST($2::BYTEA[]) AS initiator_address,\n UNNEST($3::NUMERIC[]) AS gas_limit,\n UNNEST($4::NUMERIC[]) AS max_fee_per_gas,\n UNNEST($5::NUMERIC[]) AS gas_per_pubdata_limit,\n UNNEST($6::JSONB[]) AS data,\n UNNEST($7::BIGINT[]) AS priority_op_id,\n UNNEST($8::NUMERIC[]) AS full_fee,\n UNNEST($9::NUMERIC[]) AS layer_2_tip_fee,\n UNNEST($10::BYTEA[]) AS contract_address,\n UNNEST($11::INT[]) AS l1_block_number,\n UNNEST($12::NUMERIC[]) AS value,\n UNNEST($13::INTEGER[]) AS tx_format,\n UNNEST($14::NUMERIC[]) AS l1_tx_mint,\n UNNEST($15::BYTEA[]) AS l1_tx_refund_recipient,\n UNNEST($16::INT[]) AS index_in_block,\n UNNEST($17::VARCHAR[]) AS error,\n UNNEST($18::JSONB[]) AS execution_info,\n UNNEST($19::BIGINT[]) AS refunded_gas,\n UNNEST($20::NUMERIC[]) AS effective_gas_price\n ) AS data_table\n ", "describe": { "columns": [], "parameters": { @@ -30,5 +30,5 @@ }, "nullable": [] }, - "hash": "bb728bbbf89d3996b7412043ead62a7c60e89631bfe95611f156dac532218ca5" + "hash": "a8d55f14de2f489fdc12c8da540e0d51f86d30d5ad92496e4aa087a3c4aae09f" } diff --git a/core/lib/dal/.sqlx/query-a8dad09a54cc991706141da557dde45f8f3f3b6cf2e4136f25a1c3ab85d92668.json b/core/lib/dal/.sqlx/query-a8dad09a54cc991706141da557dde45f8f3f3b6cf2e4136f25a1c3ab85d92668.json new file mode 100644 index 000000000000..1fd7b8fdf1b3 --- /dev/null +++ b/core/lib/dal/.sqlx/query-a8dad09a54cc991706141da557dde45f8f3f3b6cf2e4136f25a1c3ab85d92668.json @@ -0,0 +1,15 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE protocol_versions\n SET\n upgrade_tx_hash = $1\n WHERE\n id = $2\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Bytea", + "Int4" + ] + }, + "nullable": [] + }, + "hash": "a8dad09a54cc991706141da557dde45f8f3f3b6cf2e4136f25a1c3ab85d92668" +} diff --git a/core/lib/dal/.sqlx/query-aab0254e6bf2c109d97e84053cb08f1ce816a56308fb9fe581b8683f76cbbbc3.json b/core/lib/dal/.sqlx/query-aab0254e6bf2c109d97e84053cb08f1ce816a56308fb9fe581b8683f76cbbbc3.json new file mode 100644 index 000000000000..850dfc675743 --- /dev/null +++ b/core/lib/dal/.sqlx/query-aab0254e6bf2c109d97e84053cb08f1ce816a56308fb9fe581b8683f76cbbbc3.json @@ -0,0 +1,14 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE vm_runner_bwip\n SET\n time_taken = NOW() - processing_started_at\n WHERE\n l1_batch_number = $1\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8" + ] + }, + "nullable": [] + }, + "hash": "aab0254e6bf2c109d97e84053cb08f1ce816a56308fb9fe581b8683f76cbbbc3" +} diff --git a/core/lib/dal/.sqlx/query-ab68f07dc6f3ec66200df109527877866bbdd1f8c359d97538125756fd05a2ab.json b/core/lib/dal/.sqlx/query-ab68f07dc6f3ec66200df109527877866bbdd1f8c359d97538125756fd05a2ab.json new file mode 100644 index 000000000000..5560d6599320 --- /dev/null +++ b/core/lib/dal/.sqlx/query-ab68f07dc6f3ec66200df109527877866bbdd1f8c359d97538125756fd05a2ab.json @@ -0,0 +1,12 @@ +{ + "db_name": "PostgreSQL", + "query": "\n DELETE FROM consensus_replica_state\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [] + }, + "nullable": [] + }, + "hash": "ab68f07dc6f3ec66200df109527877866bbdd1f8c359d97538125756fd05a2ab" +} diff --git a/core/lib/dal/.sqlx/query-a57b02104ce2fe58a6c8f7e946bcb94486499a3d5b380948cb94e4b5066fea9a.json b/core/lib/dal/.sqlx/query-acfd5a60fda5782bddb8cba033a5d3a0eed793f7b64ad3ed035f20e896371721.json similarity index 92% rename from core/lib/dal/.sqlx/query-a57b02104ce2fe58a6c8f7e946bcb94486499a3d5b380948cb94e4b5066fea9a.json rename to core/lib/dal/.sqlx/query-acfd5a60fda5782bddb8cba033a5d3a0eed793f7b64ad3ed035f20e896371721.json index ba258dc84fd5..9232ef6d0096 100644 --- a/core/lib/dal/.sqlx/query-a57b02104ce2fe58a6c8f7e946bcb94486499a3d5b380948cb94e4b5066fea9a.json +++ b/core/lib/dal/.sqlx/query-acfd5a60fda5782bddb8cba033a5d3a0eed793f7b64ad3ed035f20e896371721.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n transactions (\n hash,\n is_priority,\n initiator_address,\n gas_limit,\n max_fee_per_gas,\n gas_per_pubdata_limit,\n data,\n priority_op_id,\n full_fee,\n layer_2_tip_fee,\n contract_address,\n l1_block_number,\n value,\n paymaster,\n paymaster_input,\n tx_format,\n l1_tx_mint,\n l1_tx_refund_recipient,\n received_at,\n created_at,\n updated_at\n )\n VALUES\n (\n $1,\n TRUE,\n $2,\n $3,\n $4,\n $5,\n $6,\n $7,\n $8,\n $9,\n $10,\n $11,\n $12,\n $13,\n $14,\n $15,\n $16,\n $17,\n $18,\n NOW(),\n NOW()\n ) ON CONFLICT (hash) DO NOTHING\n ", + "query": "\n INSERT INTO\n transactions (\n hash,\n is_priority,\n initiator_address,\n gas_limit,\n max_fee_per_gas,\n gas_per_pubdata_limit,\n data,\n priority_op_id,\n full_fee,\n layer_2_tip_fee,\n contract_address,\n l1_block_number,\n value,\n paymaster,\n paymaster_input,\n tx_format,\n l1_tx_mint,\n l1_tx_refund_recipient,\n received_at,\n created_at,\n updated_at\n )\n VALUES\n (\n $1,\n TRUE,\n $2,\n $3,\n $4,\n $5,\n $6,\n $7,\n $8,\n $9,\n $10,\n $11,\n $12,\n $13,\n $14,\n $15,\n $16,\n $17,\n $18,\n NOW(),\n NOW()\n )\n ON CONFLICT (hash) DO NOTHING\n ", "describe": { "columns": [], "parameters": { @@ -27,5 +27,5 @@ }, "nullable": [] }, - "hash": "a57b02104ce2fe58a6c8f7e946bcb94486499a3d5b380948cb94e4b5066fea9a" + "hash": "acfd5a60fda5782bddb8cba033a5d3a0eed793f7b64ad3ed035f20e896371721" } diff --git a/core/lib/dal/.sqlx/query-37294ec4a7b7ac48ccaecaaf96166fc91f2969fd0f108d72debe703e95855298.json b/core/lib/dal/.sqlx/query-ada54322a28012b1b761f3631c4cd6ca26aa2fa565fcf208b6985f461c1868f2.json similarity index 50% rename from core/lib/dal/.sqlx/query-37294ec4a7b7ac48ccaecaaf96166fc91f2969fd0f108d72debe703e95855298.json rename to core/lib/dal/.sqlx/query-ada54322a28012b1b761f3631c4cd6ca26aa2fa565fcf208b6985f461c1868f2.json index 29080995d055..04fde45469fa 100644 --- a/core/lib/dal/.sqlx/query-37294ec4a7b7ac48ccaecaaf96166fc91f2969fd0f108d72debe703e95855298.json +++ b/core/lib/dal/.sqlx/query-ada54322a28012b1b761f3631c4cd6ca26aa2fa565fcf208b6985f461c1868f2.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n UPDATE\n eth_txs_history\n SET\n updated_at = NOW(),\n confirmed_at = NOW()\n WHERE\n tx_hash = $1\n RETURNING\n id,\n eth_tx_id\n ", + "query": "\n UPDATE eth_txs_history\n SET\n updated_at = NOW(),\n confirmed_at = NOW()\n WHERE\n tx_hash = $1\n RETURNING\n id,\n eth_tx_id\n ", "describe": { "columns": [ { @@ -24,5 +24,5 @@ false ] }, - "hash": "37294ec4a7b7ac48ccaecaaf96166fc91f2969fd0f108d72debe703e95855298" + "hash": "ada54322a28012b1b761f3631c4cd6ca26aa2fa565fcf208b6985f461c1868f2" } diff --git a/core/lib/dal/.sqlx/query-ae204503b0a682a9edc4d7bd7430457113e073b392c569c077d719941d1e37aa.json b/core/lib/dal/.sqlx/query-ae204503b0a682a9edc4d7bd7430457113e073b392c569c077d719941d1e37aa.json new file mode 100644 index 000000000000..252dfb23b4e8 --- /dev/null +++ b/core/lib/dal/.sqlx/query-ae204503b0a682a9edc4d7bd7430457113e073b392c569c077d719941d1e37aa.json @@ -0,0 +1,14 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE consensus_replica_state\n SET\n state = $1\n WHERE\n fake_key\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Jsonb" + ] + }, + "nullable": [] + }, + "hash": "ae204503b0a682a9edc4d7bd7430457113e073b392c569c077d719941d1e37aa" +} diff --git a/core/lib/dal/.sqlx/query-aeda34b1beadca72e3e600ea9ae63f436a4f16dbeb784d0d28be392ad96b1c49.json b/core/lib/dal/.sqlx/query-aeda34b1beadca72e3e600ea9ae63f436a4f16dbeb784d0d28be392ad96b1c49.json new file mode 100644 index 000000000000..b411d3ce8309 --- /dev/null +++ b/core/lib/dal/.sqlx/query-aeda34b1beadca72e3e600ea9ae63f436a4f16dbeb784d0d28be392ad96b1c49.json @@ -0,0 +1,14 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE eth_txs\n SET\n has_failed = TRUE\n WHERE\n id = $1\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int4" + ] + }, + "nullable": [] + }, + "hash": "aeda34b1beadca72e3e600ea9ae63f436a4f16dbeb784d0d28be392ad96b1c49" +} diff --git a/core/lib/dal/.sqlx/query-b313ab2b1e0a83136a202ea758c6d2b2e3f2497e6b5f26c72e220397cc0e62f7.json b/core/lib/dal/.sqlx/query-b313ab2b1e0a83136a202ea758c6d2b2e3f2497e6b5f26c72e220397cc0e62f7.json new file mode 100644 index 000000000000..356fd8e9d999 --- /dev/null +++ b/core/lib/dal/.sqlx/query-b313ab2b1e0a83136a202ea758c6d2b2e3f2497e6b5f26c72e220397cc0e62f7.json @@ -0,0 +1,15 @@ +{ + "db_name": "PostgreSQL", + "query": "\n INSERT INTO\n l1_batches_consensus_committees (l1_batch_number, attesters, updated_at)\n VALUES\n ($1, $2, NOW())\n ON CONFLICT (l1_batch_number) DO\n UPDATE\n SET\n l1_batch_number = $1,\n attesters = $2,\n updated_at = NOW()\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8", + "Jsonb" + ] + }, + "nullable": [] + }, + "hash": "b313ab2b1e0a83136a202ea758c6d2b2e3f2497e6b5f26c72e220397cc0e62f7" +} diff --git a/core/lib/dal/.sqlx/query-683973e92438d8a16dd0a4fe46e884aaa174ea8a577dcc97e84680f4fd650c37.json b/core/lib/dal/.sqlx/query-b42fc86726ac40d0ca38640884da192a143f6a7501b7da65bb7df40a0a4ead70.json similarity index 62% rename from core/lib/dal/.sqlx/query-683973e92438d8a16dd0a4fe46e884aaa174ea8a577dcc97e84680f4fd650c37.json rename to core/lib/dal/.sqlx/query-b42fc86726ac40d0ca38640884da192a143f6a7501b7da65bb7df40a0a4ead70.json index b860c166192e..625fa4ab36e6 100644 --- a/core/lib/dal/.sqlx/query-683973e92438d8a16dd0a4fe46e884aaa174ea8a577dcc97e84680f4fd650c37.json +++ b/core/lib/dal/.sqlx/query-b42fc86726ac40d0ca38640884da192a143f6a7501b7da65bb7df40a0a4ead70.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n DELETE FROM\n snapshots\n WHERE\n l1_batch_number > $1\n RETURNING\n VERSION,\n l1_batch_number,\n factory_deps_filepath,\n storage_logs_filepaths\n ", + "query": "\n DELETE FROM snapshots\n WHERE\n l1_batch_number > $1\n RETURNING\n VERSION,\n l1_batch_number,\n factory_deps_filepath,\n storage_logs_filepaths\n ", "describe": { "columns": [ { @@ -36,5 +36,5 @@ false ] }, - "hash": "683973e92438d8a16dd0a4fe46e884aaa174ea8a577dcc97e84680f4fd650c37" + "hash": "b42fc86726ac40d0ca38640884da192a143f6a7501b7da65bb7df40a0a4ead70" } diff --git a/core/lib/dal/.sqlx/query-b452354c888bfc19b5f4012582061b86b1abd915739533f9982fea9d8e21b9e9.json b/core/lib/dal/.sqlx/query-b452354c888bfc19b5f4012582061b86b1abd915739533f9982fea9d8e21b9e9.json new file mode 100644 index 000000000000..e87b9a2cddd6 --- /dev/null +++ b/core/lib/dal/.sqlx/query-b452354c888bfc19b5f4012582061b86b1abd915739533f9982fea9d8e21b9e9.json @@ -0,0 +1,14 @@ +{ + "db_name": "PostgreSQL", + "query": "\n DELETE FROM factory_deps\n WHERE\n miniblock_number > $1\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8" + ] + }, + "nullable": [] + }, + "hash": "b452354c888bfc19b5f4012582061b86b1abd915739533f9982fea9d8e21b9e9" +} diff --git a/core/lib/dal/.sqlx/query-b47a2961dc2f1347864682c572dd1f5e03924dbf6dd1e824d4aca837e604b7e9.json b/core/lib/dal/.sqlx/query-b47a2961dc2f1347864682c572dd1f5e03924dbf6dd1e824d4aca837e604b7e9.json new file mode 100644 index 000000000000..63acfcb30dc7 --- /dev/null +++ b/core/lib/dal/.sqlx/query-b47a2961dc2f1347864682c572dd1f5e03924dbf6dd1e824d4aca837e604b7e9.json @@ -0,0 +1,44 @@ +{ + "db_name": "PostgreSQL", + "query": "\n SELECT\n table_name,\n PG_TABLE_SIZE(('public.' || QUOTE_IDENT(table_name))::regclass) AS table_size,\n PG_INDEXES_SIZE(('public.' || QUOTE_IDENT(table_name))::regclass) AS indexes_size,\n PG_RELATION_SIZE(('public.' || QUOTE_IDENT(table_name))::regclass) AS relation_size,\n PG_TOTAL_RELATION_SIZE(('public.' || QUOTE_IDENT(table_name))::regclass) AS total_size\n FROM\n information_schema.tables\n WHERE\n table_schema = 'public'\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "table_name", + "type_info": "Name" + }, + { + "ordinal": 1, + "name": "table_size", + "type_info": "Int8" + }, + { + "ordinal": 2, + "name": "indexes_size", + "type_info": "Int8" + }, + { + "ordinal": 3, + "name": "relation_size", + "type_info": "Int8" + }, + { + "ordinal": 4, + "name": "total_size", + "type_info": "Int8" + } + ], + "parameters": { + "Left": [] + }, + "nullable": [ + true, + null, + null, + null, + null + ] + }, + "hash": "b47a2961dc2f1347864682c572dd1f5e03924dbf6dd1e824d4aca837e604b7e9" +} diff --git a/core/lib/dal/.sqlx/query-b4a0444897b60c7061363a48b2b5386a2fd53492f3df05545edbfb0ec0f059d2.json b/core/lib/dal/.sqlx/query-b4a0444897b60c7061363a48b2b5386a2fd53492f3df05545edbfb0ec0f059d2.json new file mode 100644 index 000000000000..804f6c5ac332 --- /dev/null +++ b/core/lib/dal/.sqlx/query-b4a0444897b60c7061363a48b2b5386a2fd53492f3df05545edbfb0ec0f059d2.json @@ -0,0 +1,15 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE eth_txs\n SET\n confirmed_eth_tx_history_id = $1\n WHERE\n id = $2\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int4", + "Int4" + ] + }, + "nullable": [] + }, + "hash": "b4a0444897b60c7061363a48b2b5386a2fd53492f3df05545edbfb0ec0f059d2" +} diff --git a/core/lib/dal/.sqlx/query-b5cd80d579d87c610b16640166371a5609ca74432dcec3c169279bbbfce9fdae.json b/core/lib/dal/.sqlx/query-b5cd80d579d87c610b16640166371a5609ca74432dcec3c169279bbbfce9fdae.json deleted file mode 100644 index 95428a733163..000000000000 --- a/core/lib/dal/.sqlx/query-b5cd80d579d87c610b16640166371a5609ca74432dcec3c169279bbbfce9fdae.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE\n eth_txs\n SET\n gas_used = $1,\n confirmed_eth_tx_history_id = $2\n WHERE\n id = $3\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8", - "Int4", - "Int4" - ] - }, - "nullable": [] - }, - "hash": "b5cd80d579d87c610b16640166371a5609ca74432dcec3c169279bbbfce9fdae" -} diff --git a/core/lib/dal/.sqlx/query-970fc9fe2ada8f862b8fe4dfd7cde5783f3df8ad73ef92b62bafc1a8b5e1046a.json b/core/lib/dal/.sqlx/query-b61b2545ff82bc3e2a198b21546735c1dcccdd6c439827fc4c3ba57e8767076e.json similarity index 57% rename from core/lib/dal/.sqlx/query-970fc9fe2ada8f862b8fe4dfd7cde5783f3df8ad73ef92b62bafc1a8b5e1046a.json rename to core/lib/dal/.sqlx/query-b61b2545ff82bc3e2a198b21546735c1dcccdd6c439827fc4c3ba57e8767076e.json index 4e9cb6268a27..4f7101ed45e4 100644 --- a/core/lib/dal/.sqlx/query-970fc9fe2ada8f862b8fe4dfd7cde5783f3df8ad73ef92b62bafc1a8b5e1046a.json +++ b/core/lib/dal/.sqlx/query-b61b2545ff82bc3e2a198b21546735c1dcccdd6c439827fc4c3ba57e8767076e.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n UPDATE\n proof_generation_details\n SET\n status = $1,\n updated_at = NOW()\n WHERE\n l1_batch_number = $2\n ", + "query": "\n UPDATE proof_generation_details\n SET\n proof_gen_data_blob_url = $1,\n updated_at = NOW()\n WHERE\n l1_batch_number = $2\n ", "describe": { "columns": [], "parameters": { @@ -11,5 +11,5 @@ }, "nullable": [] }, - "hash": "970fc9fe2ada8f862b8fe4dfd7cde5783f3df8ad73ef92b62bafc1a8b5e1046a" + "hash": "b61b2545ff82bc3e2a198b21546735c1dcccdd6c439827fc4c3ba57e8767076e" } diff --git a/core/lib/dal/.sqlx/query-b6ce3e762f37ab0d5b052f080715637fcf7f6c27d1238b17bc0f9bc50a0ffa7a.json b/core/lib/dal/.sqlx/query-b6ce3e762f37ab0d5b052f080715637fcf7f6c27d1238b17bc0f9bc50a0ffa7a.json deleted file mode 100644 index 6434fb3d38c2..000000000000 --- a/core/lib/dal/.sqlx/query-b6ce3e762f37ab0d5b052f080715637fcf7f6c27d1238b17bc0f9bc50a0ffa7a.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE\n miniblocks\n SET\n l1_batch_number = $1\n WHERE\n l1_batch_number IS NULL\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8" - ] - }, - "nullable": [] - }, - "hash": "b6ce3e762f37ab0d5b052f080715637fcf7f6c27d1238b17bc0f9bc50a0ffa7a" -} diff --git a/core/lib/dal/.sqlx/query-b73e874da2c1aa9de4fe700166458e579752dea7632e9422c2921a5d7e4d62ba.json b/core/lib/dal/.sqlx/query-b73e874da2c1aa9de4fe700166458e579752dea7632e9422c2921a5d7e4d62ba.json deleted file mode 100644 index 399e75b0f6c8..000000000000 --- a/core/lib/dal/.sqlx/query-b73e874da2c1aa9de4fe700166458e579752dea7632e9422c2921a5d7e4d62ba.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n tee_proof_generation_details (\n l1_batch_number,\n tee_type,\n status,\n created_at,\n updated_at\n )\n VALUES\n ($1, $2, $3, NOW(), NOW()) ON CONFLICT (l1_batch_number, tee_type) DO NOTHING\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8", - "Text", - "Text" - ] - }, - "nullable": [] - }, - "hash": "b73e874da2c1aa9de4fe700166458e579752dea7632e9422c2921a5d7e4d62ba" -} diff --git a/core/lib/dal/.sqlx/query-b95b63f22afee3b186da4284a0a1cc9d3523a392fd2011491c6017400f313a16.json b/core/lib/dal/.sqlx/query-b95b63f22afee3b186da4284a0a1cc9d3523a392fd2011491c6017400f313a16.json new file mode 100644 index 000000000000..5d8801137b92 --- /dev/null +++ b/core/lib/dal/.sqlx/query-b95b63f22afee3b186da4284a0a1cc9d3523a392fd2011491c6017400f313a16.json @@ -0,0 +1,12 @@ +{ + "db_name": "PostgreSQL", + "query": "\n DELETE FROM storage_logs\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [] + }, + "nullable": [] + }, + "hash": "b95b63f22afee3b186da4284a0a1cc9d3523a392fd2011491c6017400f313a16" +} diff --git a/core/lib/dal/.sqlx/query-ba2343a38e37d104786f9276d91f67d2ef1428c61ae84003c9b52b03204d1f0a.json b/core/lib/dal/.sqlx/query-ba2343a38e37d104786f9276d91f67d2ef1428c61ae84003c9b52b03204d1f0a.json new file mode 100644 index 000000000000..ff6082651184 --- /dev/null +++ b/core/lib/dal/.sqlx/query-ba2343a38e37d104786f9276d91f67d2ef1428c61ae84003c9b52b03204d1f0a.json @@ -0,0 +1,14 @@ +{ + "db_name": "PostgreSQL", + "query": "\n DELETE FROM transactions\n WHERE\n in_mempool = TRUE\n AND initiator_address = ANY ($1)\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "ByteaArray" + ] + }, + "nullable": [] + }, + "hash": "ba2343a38e37d104786f9276d91f67d2ef1428c61ae84003c9b52b03204d1f0a" +} diff --git a/core/lib/dal/.sqlx/query-bd51c9d93b103292f5acbdb266ba4b4e2af48907fa9321064ddb24ac02ab17cd.json b/core/lib/dal/.sqlx/query-bd51c9d93b103292f5acbdb266ba4b4e2af48907fa9321064ddb24ac02ab17cd.json new file mode 100644 index 000000000000..7f1fc9b176c5 --- /dev/null +++ b/core/lib/dal/.sqlx/query-bd51c9d93b103292f5acbdb266ba4b4e2af48907fa9321064ddb24ac02ab17cd.json @@ -0,0 +1,20 @@ +{ + "db_name": "PostgreSQL", + "query": "\n SELECT\n number\n FROM\n l1_batches\n LEFT JOIN eth_txs_history AS commit_tx ON (l1_batches.eth_commit_tx_id = commit_tx.eth_tx_id)\n WHERE\n commit_tx.confirmed_at IS NOT NULL\n ORDER BY\n number DESC\n LIMIT\n 1\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "number", + "type_info": "Int8" + } + ], + "parameters": { + "Left": [] + }, + "nullable": [ + false + ] + }, + "hash": "bd51c9d93b103292f5acbdb266ba4b4e2af48907fa9321064ddb24ac02ab17cd" +} diff --git a/core/lib/dal/.sqlx/query-bd8a4057d6b0ece3298becbe143facec8c88629c4993f6c86a30193c7916fff6.json b/core/lib/dal/.sqlx/query-bd8a4057d6b0ece3298becbe143facec8c88629c4993f6c86a30193c7916fff6.json deleted file mode 100644 index 5a06cedf6bbb..000000000000 --- a/core/lib/dal/.sqlx/query-bd8a4057d6b0ece3298becbe143facec8c88629c4993f6c86a30193c7916fff6.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n DELETE FROM\n l1_batches_consensus\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [] - }, - "nullable": [] - }, - "hash": "bd8a4057d6b0ece3298becbe143facec8c88629c4993f6c86a30193c7916fff6" -} diff --git a/core/lib/dal/.sqlx/query-bdd26a468254acd2ed54f17f37b4fdfd4e8aed4c63898af5b3c3d5ad2c6bec6c.json b/core/lib/dal/.sqlx/query-bdd26a468254acd2ed54f17f37b4fdfd4e8aed4c63898af5b3c3d5ad2c6bec6c.json deleted file mode 100644 index 9ae7a5fe2471..000000000000 --- a/core/lib/dal/.sqlx/query-bdd26a468254acd2ed54f17f37b4fdfd4e8aed4c63898af5b3c3d5ad2c6bec6c.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE\n transactions\n SET\n input = NULL,\n data = '{}',\n execution_info = '{}',\n updated_at = NOW()\n WHERE\n miniblock_number BETWEEN $1 AND $2\n AND upgrade_id IS NULL\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8", - "Int8" - ] - }, - "nullable": [] - }, - "hash": "bdd26a468254acd2ed54f17f37b4fdfd4e8aed4c63898af5b3c3d5ad2c6bec6c" -} diff --git a/core/lib/dal/.sqlx/query-bdf8b49f917e67009bb5f1d951575072106e943b76c17ef42a1138e291da86c6.json b/core/lib/dal/.sqlx/query-bdf8b49f917e67009bb5f1d951575072106e943b76c17ef42a1138e291da86c6.json deleted file mode 100644 index b22882ec86da..000000000000 --- a/core/lib/dal/.sqlx/query-bdf8b49f917e67009bb5f1d951575072106e943b76c17ef42a1138e291da86c6.json +++ /dev/null @@ -1,112 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n WITH mb AS (\n SELECT\n l1_gas_price,\n l2_fair_gas_price,\n fair_pubdata_price\n FROM\n miniblocks\n WHERE\n l1_batch_number = $1\n LIMIT\n 1\n )\n SELECT\n l1_batches.number,\n l1_batches.timestamp,\n l1_batches.l1_tx_count,\n l1_batches.l2_tx_count,\n l1_batches.hash AS \"root_hash?\",\n commit_tx.tx_hash AS \"commit_tx_hash?\",\n commit_tx.confirmed_at AS \"committed_at?\",\n prove_tx.tx_hash AS \"prove_tx_hash?\",\n prove_tx.confirmed_at AS \"proven_at?\",\n execute_tx.tx_hash AS \"execute_tx_hash?\",\n execute_tx.confirmed_at AS \"executed_at?\",\n mb.l1_gas_price,\n mb.l2_fair_gas_price,\n mb.fair_pubdata_price,\n l1_batches.bootloader_code_hash,\n l1_batches.default_aa_code_hash\n FROM\n l1_batches\n INNER JOIN mb ON TRUE\n LEFT JOIN eth_txs_history AS commit_tx ON (\n l1_batches.eth_commit_tx_id = commit_tx.eth_tx_id\n AND commit_tx.confirmed_at IS NOT NULL\n )\n LEFT JOIN eth_txs_history AS prove_tx ON (\n l1_batches.eth_prove_tx_id = prove_tx.eth_tx_id\n AND prove_tx.confirmed_at IS NOT NULL\n )\n LEFT JOIN eth_txs_history AS execute_tx ON (\n l1_batches.eth_execute_tx_id = execute_tx.eth_tx_id\n AND execute_tx.confirmed_at IS NOT NULL\n )\n WHERE\n l1_batches.number = $1\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "number", - "type_info": "Int8" - }, - { - "ordinal": 1, - "name": "timestamp", - "type_info": "Int8" - }, - { - "ordinal": 2, - "name": "l1_tx_count", - "type_info": "Int4" - }, - { - "ordinal": 3, - "name": "l2_tx_count", - "type_info": "Int4" - }, - { - "ordinal": 4, - "name": "root_hash?", - "type_info": "Bytea" - }, - { - "ordinal": 5, - "name": "commit_tx_hash?", - "type_info": "Text" - }, - { - "ordinal": 6, - "name": "committed_at?", - "type_info": "Timestamp" - }, - { - "ordinal": 7, - "name": "prove_tx_hash?", - "type_info": "Text" - }, - { - "ordinal": 8, - "name": "proven_at?", - "type_info": "Timestamp" - }, - { - "ordinal": 9, - "name": "execute_tx_hash?", - "type_info": "Text" - }, - { - "ordinal": 10, - "name": "executed_at?", - "type_info": "Timestamp" - }, - { - "ordinal": 11, - "name": "l1_gas_price", - "type_info": "Int8" - }, - { - "ordinal": 12, - "name": "l2_fair_gas_price", - "type_info": "Int8" - }, - { - "ordinal": 13, - "name": "fair_pubdata_price", - "type_info": "Int8" - }, - { - "ordinal": 14, - "name": "bootloader_code_hash", - "type_info": "Bytea" - }, - { - "ordinal": 15, - "name": "default_aa_code_hash", - "type_info": "Bytea" - } - ], - "parameters": { - "Left": [ - "Int8" - ] - }, - "nullable": [ - false, - false, - false, - false, - true, - false, - true, - false, - true, - false, - true, - false, - false, - true, - true, - true - ] - }, - "hash": "bdf8b49f917e67009bb5f1d951575072106e943b76c17ef42a1138e291da86c6" -} diff --git a/core/lib/dal/.sqlx/query-c26690ee0bd897d83941300072c787f7a2aeb77058e409a57f8e62b8dd0b27ac.json b/core/lib/dal/.sqlx/query-bf481c2b498420f80765b837059cab02b0656d863dbfce4b5dad7bc72e52b05d.json similarity index 63% rename from core/lib/dal/.sqlx/query-c26690ee0bd897d83941300072c787f7a2aeb77058e409a57f8e62b8dd0b27ac.json rename to core/lib/dal/.sqlx/query-bf481c2b498420f80765b837059cab02b0656d863dbfce4b5dad7bc72e52b05d.json index 84b152b2a84d..c353a35ec5e1 100644 --- a/core/lib/dal/.sqlx/query-c26690ee0bd897d83941300072c787f7a2aeb77058e409a57f8e62b8dd0b27ac.json +++ b/core/lib/dal/.sqlx/query-bf481c2b498420f80765b837059cab02b0656d863dbfce4b5dad7bc72e52b05d.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n transactions (\n hash,\n is_priority,\n initiator_address,\n nonce,\n signature,\n gas_limit,\n max_fee_per_gas,\n max_priority_fee_per_gas,\n gas_per_pubdata_limit,\n input,\n data,\n tx_format,\n contract_address,\n value,\n paymaster,\n paymaster_input,\n execution_info,\n miniblock_number,\n index_in_block,\n error,\n effective_gas_price,\n refunded_gas,\n received_at,\n created_at,\n updated_at\n )\n SELECT\n data_table.hash,\n FALSE,\n data_table.initiator_address,\n data_table.nonce,\n data_table.signature,\n data_table.gas_limit,\n data_table.max_fee_per_gas,\n data_table.max_priority_fee_per_gas,\n data_table.gas_per_pubdata_limit,\n data_table.input,\n data_table.data,\n data_table.tx_format,\n data_table.contract_address,\n data_table.value,\n data_table.paymaster,\n data_table.paymaster_input,\n data_table.new_execution_info,\n $21,\n data_table.index_in_block,\n NULLIF(data_table.error, ''),\n data_table.effective_gas_price,\n data_table.refunded_gas,\n NOW(),\n NOW(),\n NOW()\n FROM\n (\n SELECT\n UNNEST($1 :: bytea []) AS hash,\n UNNEST($2 :: bytea []) AS initiator_address,\n UNNEST($3 :: INT []) AS nonce,\n UNNEST($4 :: bytea []) AS signature,\n UNNEST($5 :: NUMERIC []) AS gas_limit,\n UNNEST($6 :: NUMERIC []) AS max_fee_per_gas,\n UNNEST($7 :: NUMERIC []) AS max_priority_fee_per_gas,\n UNNEST($8 :: NUMERIC []) AS gas_per_pubdata_limit,\n UNNEST($9 :: bytea []) AS input,\n UNNEST($10 :: jsonb []) AS data,\n UNNEST($11 :: INT []) AS tx_format,\n UNNEST($12 :: bytea []) AS contract_address,\n UNNEST($13 :: NUMERIC []) AS value,\n UNNEST($14 :: bytea []) AS paymaster,\n UNNEST($15 :: bytea []) AS paymaster_input,\n UNNEST($16 :: jsonb []) AS new_execution_info,\n UNNEST($17 :: INTEGER []) AS index_in_block,\n UNNEST($18 :: VARCHAR []) AS error,\n UNNEST($19 :: NUMERIC []) AS effective_gas_price,\n UNNEST($20 :: BIGINT []) AS refunded_gas\n ) AS data_table\n ", + "query": "\n INSERT INTO\n transactions (\n hash,\n is_priority,\n initiator_address,\n nonce,\n signature,\n gas_limit,\n max_fee_per_gas,\n max_priority_fee_per_gas,\n gas_per_pubdata_limit,\n input,\n data,\n tx_format,\n contract_address,\n value,\n paymaster,\n paymaster_input,\n execution_info,\n miniblock_number,\n index_in_block,\n error,\n effective_gas_price,\n refunded_gas,\n received_at,\n created_at,\n updated_at\n )\n SELECT\n data_table.hash,\n FALSE,\n data_table.initiator_address,\n data_table.nonce,\n data_table.signature,\n data_table.gas_limit,\n data_table.max_fee_per_gas,\n data_table.max_priority_fee_per_gas,\n data_table.gas_per_pubdata_limit,\n data_table.input,\n data_table.data,\n data_table.tx_format,\n data_table.contract_address,\n data_table.value,\n data_table.paymaster,\n data_table.paymaster_input,\n data_table.new_execution_info,\n $21,\n data_table.index_in_block,\n NULLIF(data_table.error, ''),\n data_table.effective_gas_price,\n data_table.refunded_gas,\n NOW(),\n NOW(),\n NOW()\n FROM\n (\n SELECT\n UNNEST($1::bytea[]) AS hash,\n UNNEST($2::bytea[]) AS initiator_address,\n UNNEST($3::INT[]) AS nonce,\n UNNEST($4::bytea[]) AS signature,\n UNNEST($5::NUMERIC[]) AS gas_limit,\n UNNEST($6::NUMERIC[]) AS max_fee_per_gas,\n UNNEST($7::NUMERIC[]) AS max_priority_fee_per_gas,\n UNNEST($8::NUMERIC[]) AS gas_per_pubdata_limit,\n UNNEST($9::bytea[]) AS input,\n UNNEST($10::jsonb[]) AS data,\n UNNEST($11::INT[]) AS tx_format,\n UNNEST($12::bytea[]) AS contract_address,\n UNNEST($13::NUMERIC[]) AS value,\n UNNEST($14::bytea[]) AS paymaster,\n UNNEST($15::bytea[]) AS paymaster_input,\n UNNEST($16::jsonb[]) AS new_execution_info,\n UNNEST($17::INTEGER[]) AS index_in_block,\n UNNEST($18::VARCHAR[]) AS error,\n UNNEST($19::NUMERIC[]) AS effective_gas_price,\n UNNEST($20::BIGINT[]) AS refunded_gas\n ) AS data_table\n ", "describe": { "columns": [], "parameters": { @@ -30,5 +30,5 @@ }, "nullable": [] }, - "hash": "c26690ee0bd897d83941300072c787f7a2aeb77058e409a57f8e62b8dd0b27ac" + "hash": "bf481c2b498420f80765b837059cab02b0656d863dbfce4b5dad7bc72e52b05d" } diff --git a/core/lib/dal/.sqlx/query-3d19e75e0e224679c3f30e67a2a53ff4b3462b42ca731963eca0e46997527ae3.json b/core/lib/dal/.sqlx/query-bfc84bcf0985446b337467dd1da709dbee508ad6d1cae43e477cf1bef8cb4aa9.json similarity index 75% rename from core/lib/dal/.sqlx/query-3d19e75e0e224679c3f30e67a2a53ff4b3462b42ca731963eca0e46997527ae3.json rename to core/lib/dal/.sqlx/query-bfc84bcf0985446b337467dd1da709dbee508ad6d1cae43e477cf1bef8cb4aa9.json index 5eeb8fecdfde..8079d52a7036 100644 --- a/core/lib/dal/.sqlx/query-3d19e75e0e224679c3f30e67a2a53ff4b3462b42ca731963eca0e46997527ae3.json +++ b/core/lib/dal/.sqlx/query-bfc84bcf0985446b337467dd1da709dbee508ad6d1cae43e477cf1bef8cb4aa9.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT\n DISTINCT hashed_key\n FROM\n storage_logs\n WHERE\n miniblock_number BETWEEN $1 AND $2\n ", + "query": "\n SELECT DISTINCT\n hashed_key\n FROM\n storage_logs\n WHERE\n miniblock_number BETWEEN $1 AND $2\n ", "describe": { "columns": [ { @@ -19,5 +19,5 @@ false ] }, - "hash": "3d19e75e0e224679c3f30e67a2a53ff4b3462b42ca731963eca0e46997527ae3" + "hash": "bfc84bcf0985446b337467dd1da709dbee508ad6d1cae43e477cf1bef8cb4aa9" } diff --git a/core/lib/dal/.sqlx/query-c139df45a977290d1c2c7987fb9c1d66aeaeb6e2d36fddcf96775f01716a8a74.json b/core/lib/dal/.sqlx/query-c139df45a977290d1c2c7987fb9c1d66aeaeb6e2d36fddcf96775f01716a8a74.json new file mode 100644 index 000000000000..b04fb829dd6b --- /dev/null +++ b/core/lib/dal/.sqlx/query-c139df45a977290d1c2c7987fb9c1d66aeaeb6e2d36fddcf96775f01716a8a74.json @@ -0,0 +1,14 @@ +{ + "db_name": "PostgreSQL", + "query": "\n DELETE FROM storage_logs\n WHERE\n miniblock_number > $1\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8" + ] + }, + "nullable": [] + }, + "hash": "c139df45a977290d1c2c7987fb9c1d66aeaeb6e2d36fddcf96775f01716a8a74" +} diff --git a/core/lib/dal/.sqlx/query-c14837e92dbb02f2fde7109f524432d865852afe0c60e11a2c1800d30599aa61.json b/core/lib/dal/.sqlx/query-c14837e92dbb02f2fde7109f524432d865852afe0c60e11a2c1800d30599aa61.json new file mode 100644 index 000000000000..8cac9f31ac05 --- /dev/null +++ b/core/lib/dal/.sqlx/query-c14837e92dbb02f2fde7109f524432d865852afe0c60e11a2c1800d30599aa61.json @@ -0,0 +1,14 @@ +{ + "db_name": "PostgreSQL", + "query": "\n DELETE FROM compiler_versions\n WHERE\n compiler = $1\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Text" + ] + }, + "nullable": [] + }, + "hash": "c14837e92dbb02f2fde7109f524432d865852afe0c60e11a2c1800d30599aa61" +} diff --git a/core/lib/dal/.sqlx/query-c29909fda6f1e4116a9a28407805a9a38a8d8ff1fba9a834d37927793f532b7d.json b/core/lib/dal/.sqlx/query-c29909fda6f1e4116a9a28407805a9a38a8d8ff1fba9a834d37927793f532b7d.json new file mode 100644 index 000000000000..f202744b8c00 --- /dev/null +++ b/core/lib/dal/.sqlx/query-c29909fda6f1e4116a9a28407805a9a38a8d8ff1fba9a834d37927793f532b7d.json @@ -0,0 +1,14 @@ +{ + "db_name": "PostgreSQL", + "query": "\n DELETE FROM miniblocks\n WHERE\n number <= $1\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8" + ] + }, + "nullable": [] + }, + "hash": "c29909fda6f1e4116a9a28407805a9a38a8d8ff1fba9a834d37927793f532b7d" +} diff --git a/core/lib/dal/.sqlx/query-c2eac2a7c10ee56245b688b88d077fde74782e8849e84a2b699fe855946f8905.json b/core/lib/dal/.sqlx/query-c2eac2a7c10ee56245b688b88d077fde74782e8849e84a2b699fe855946f8905.json deleted file mode 100644 index bfc98732859c..000000000000 --- a/core/lib/dal/.sqlx/query-c2eac2a7c10ee56245b688b88d077fde74782e8849e84a2b699fe855946f8905.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE\n transactions\n SET\n l1_batch_number = NULL,\n miniblock_number = NULL,\n error = NULL,\n index_in_block = NULL,\n execution_info = '{}'\n WHERE\n miniblock_number > $1\n RETURNING\n hash\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "hash", - "type_info": "Bytea" - } - ], - "parameters": { - "Left": [ - "Int8" - ] - }, - "nullable": [ - false - ] - }, - "hash": "c2eac2a7c10ee56245b688b88d077fde74782e8849e84a2b699fe855946f8905" -} diff --git a/core/lib/dal/.sqlx/query-c37e5e7ee96c2136fbe9e0e56602cb9aa7c0305378d758dfe9bce80912e59255.json b/core/lib/dal/.sqlx/query-c37e5e7ee96c2136fbe9e0e56602cb9aa7c0305378d758dfe9bce80912e59255.json deleted file mode 100644 index 55ea5e182d96..000000000000 --- a/core/lib/dal/.sqlx/query-c37e5e7ee96c2136fbe9e0e56602cb9aa7c0305378d758dfe9bce80912e59255.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE\n l1_batches\n SET\n hash = $1\n WHERE\n number = $2\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Bytea", - "Int8" - ] - }, - "nullable": [] - }, - "hash": "c37e5e7ee96c2136fbe9e0e56602cb9aa7c0305378d758dfe9bce80912e59255" -} diff --git a/core/lib/dal/.sqlx/query-c3af06cc232adb93f16456da07733acd2066a5e238088b39b982b10770f51479.json b/core/lib/dal/.sqlx/query-c3af06cc232adb93f16456da07733acd2066a5e238088b39b982b10770f51479.json new file mode 100644 index 000000000000..1c15bde02fdf --- /dev/null +++ b/core/lib/dal/.sqlx/query-c3af06cc232adb93f16456da07733acd2066a5e238088b39b982b10770f51479.json @@ -0,0 +1,100 @@ +{ + "db_name": "PostgreSQL", + "query": "\n WITH\n events_select AS (\n SELECT\n address,\n topic1,\n topic2,\n topic3,\n topic4,\n value,\n miniblock_number,\n tx_hash,\n tx_index_in_block,\n event_index_in_block,\n event_index_in_tx\n FROM\n events\n WHERE\n miniblock_number > $1\n ORDER BY\n miniblock_number ASC,\n event_index_in_block ASC\n )\n SELECT\n miniblocks.hash AS \"block_hash?\",\n address AS \"address!\",\n topic1 AS \"topic1!\",\n topic2 AS \"topic2!\",\n topic3 AS \"topic3!\",\n topic4 AS \"topic4!\",\n value AS \"value!\",\n miniblock_number AS \"miniblock_number!\",\n miniblocks.l1_batch_number AS \"l1_batch_number?\",\n tx_hash AS \"tx_hash!\",\n tx_index_in_block AS \"tx_index_in_block!\",\n event_index_in_block AS \"event_index_in_block!\",\n event_index_in_tx AS \"event_index_in_tx!\",\n miniblocks.timestamp AS \"block_timestamp\"\n FROM\n events_select\n INNER JOIN miniblocks ON events_select.miniblock_number = miniblocks.number\n ORDER BY\n miniblock_number ASC,\n event_index_in_block ASC\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "block_hash?", + "type_info": "Bytea" + }, + { + "ordinal": 1, + "name": "address!", + "type_info": "Bytea" + }, + { + "ordinal": 2, + "name": "topic1!", + "type_info": "Bytea" + }, + { + "ordinal": 3, + "name": "topic2!", + "type_info": "Bytea" + }, + { + "ordinal": 4, + "name": "topic3!", + "type_info": "Bytea" + }, + { + "ordinal": 5, + "name": "topic4!", + "type_info": "Bytea" + }, + { + "ordinal": 6, + "name": "value!", + "type_info": "Bytea" + }, + { + "ordinal": 7, + "name": "miniblock_number!", + "type_info": "Int8" + }, + { + "ordinal": 8, + "name": "l1_batch_number?", + "type_info": "Int8" + }, + { + "ordinal": 9, + "name": "tx_hash!", + "type_info": "Bytea" + }, + { + "ordinal": 10, + "name": "tx_index_in_block!", + "type_info": "Int4" + }, + { + "ordinal": 11, + "name": "event_index_in_block!", + "type_info": "Int4" + }, + { + "ordinal": 12, + "name": "event_index_in_tx!", + "type_info": "Int4" + }, + { + "ordinal": 13, + "name": "block_timestamp", + "type_info": "Int8" + } + ], + "parameters": { + "Left": [ + "Int8" + ] + }, + "nullable": [ + false, + false, + false, + false, + false, + false, + false, + false, + true, + false, + false, + false, + false, + false + ] + }, + "hash": "c3af06cc232adb93f16456da07733acd2066a5e238088b39b982b10770f51479" +} diff --git a/core/lib/dal/.sqlx/query-c5aef75dbeb520c965a0996abed9713f437db492e2075ca69e11e2ef5728ccaa.json b/core/lib/dal/.sqlx/query-c5aef75dbeb520c965a0996abed9713f437db492e2075ca69e11e2ef5728ccaa.json new file mode 100644 index 000000000000..6dd2f6cc7a9f --- /dev/null +++ b/core/lib/dal/.sqlx/query-c5aef75dbeb520c965a0996abed9713f437db492e2075ca69e11e2ef5728ccaa.json @@ -0,0 +1,24 @@ +{ + "db_name": "PostgreSQL", + "query": "\n INSERT INTO\n base_token_ratios (numerator, denominator, ratio_timestamp, created_at, updated_at)\n VALUES\n ($1, $2, $3, NOW(), NOW())\n RETURNING\n id\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "id", + "type_info": "Int4" + } + ], + "parameters": { + "Left": [ + "Numeric", + "Numeric", + "Timestamp" + ] + }, + "nullable": [ + false + ] + }, + "hash": "c5aef75dbeb520c965a0996abed9713f437db492e2075ca69e11e2ef5728ccaa" +} diff --git a/core/lib/dal/.sqlx/query-8f614b620326386fce83afd162a5d02dea5720c940818242b7476cd57ffc9af8.json b/core/lib/dal/.sqlx/query-c61682ed92c1a43855a991598d593639a63047f46dc8e605ff37b78f43f5cef5.json similarity index 57% rename from core/lib/dal/.sqlx/query-8f614b620326386fce83afd162a5d02dea5720c940818242b7476cd57ffc9af8.json rename to core/lib/dal/.sqlx/query-c61682ed92c1a43855a991598d593639a63047f46dc8e605ff37b78f43f5cef5.json index e4ab1acc9bd2..b797ccb46045 100644 --- a/core/lib/dal/.sqlx/query-8f614b620326386fce83afd162a5d02dea5720c940818242b7476cd57ffc9af8.json +++ b/core/lib/dal/.sqlx/query-c61682ed92c1a43855a991598d593639a63047f46dc8e605ff37b78f43f5cef5.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n UPDATE\n processed_events\n SET\n next_block_to_process = $3\n WHERE\n TYPE = $1\n AND chain_id = $2\n ", + "query": "\n UPDATE processed_events\n SET\n next_block_to_process = $3\n WHERE\n TYPE = $1\n AND chain_id = $2\n ", "describe": { "columns": [], "parameters": { @@ -22,5 +22,5 @@ }, "nullable": [] }, - "hash": "8f614b620326386fce83afd162a5d02dea5720c940818242b7476cd57ffc9af8" + "hash": "c61682ed92c1a43855a991598d593639a63047f46dc8e605ff37b78f43f5cef5" } diff --git a/core/lib/dal/.sqlx/query-c6d523c6ae857022318350a2f210d7eaeeb4549ed59b58f8d984be2a22a80355.json b/core/lib/dal/.sqlx/query-c6d523c6ae857022318350a2f210d7eaeeb4549ed59b58f8d984be2a22a80355.json new file mode 100644 index 000000000000..ebae1f42fbbb --- /dev/null +++ b/core/lib/dal/.sqlx/query-c6d523c6ae857022318350a2f210d7eaeeb4549ed59b58f8d984be2a22a80355.json @@ -0,0 +1,22 @@ +{ + "db_name": "PostgreSQL", + "query": "\n SELECT\n MAX(l1_batches.number)\n FROM\n l1_batches\n JOIN eth_txs ON (l1_batches.eth_commit_tx_id = eth_txs.id)\n JOIN eth_txs_history AS commit_tx ON (eth_txs.confirmed_eth_tx_history_id = commit_tx.id)\n WHERE\n commit_tx.confirmed_at IS NOT NULL\n AND eth_prove_tx_id IS NOT NULL\n AND eth_execute_tx_id IS NULL\n AND EXTRACT(\n epoch\n FROM\n commit_tx.confirmed_at\n ) < $1\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "max", + "type_info": "Int8" + } + ], + "parameters": { + "Left": [ + "Numeric" + ] + }, + "nullable": [ + null + ] + }, + "hash": "c6d523c6ae857022318350a2f210d7eaeeb4549ed59b58f8d984be2a22a80355" +} diff --git a/core/lib/dal/.sqlx/query-c767e485ef5a341faefe2c6c39a5668359e4b623876422cf6915d4888cdca31a.json b/core/lib/dal/.sqlx/query-c767e485ef5a341faefe2c6c39a5668359e4b623876422cf6915d4888cdca31a.json deleted file mode 100644 index 7b17fb30b932..000000000000 --- a/core/lib/dal/.sqlx/query-c767e485ef5a341faefe2c6c39a5668359e4b623876422cf6915d4888cdca31a.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n vm_runner_protective_reads (\n l1_batch_number,\n created_at,\n updated_at,\n processing_started_at\n )\n VALUES\n ($1, NOW(), NOW(), NOW()) ON CONFLICT (l1_batch_number) DO\n UPDATE\n SET\n updated_at = NOW(),\n processing_started_at = NOW()\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8" - ] - }, - "nullable": [] - }, - "hash": "c767e485ef5a341faefe2c6c39a5668359e4b623876422cf6915d4888cdca31a" -} diff --git a/core/lib/dal/.sqlx/query-c81438eae5e2482c57c54941780864174f39e6011fdfdc56490397ce90233055.json b/core/lib/dal/.sqlx/query-c81438eae5e2482c57c54941780864174f39e6011fdfdc56490397ce90233055.json new file mode 100644 index 000000000000..eb09077290e3 --- /dev/null +++ b/core/lib/dal/.sqlx/query-c81438eae5e2482c57c54941780864174f39e6011fdfdc56490397ce90233055.json @@ -0,0 +1,16 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE l1_batches\n SET\n eth_execute_tx_id = $1,\n updated_at = NOW()\n WHERE\n number BETWEEN $2 AND $3\n AND eth_execute_tx_id IS NULL\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int4", + "Int8", + "Int8" + ] + }, + "nullable": [] + }, + "hash": "c81438eae5e2482c57c54941780864174f39e6011fdfdc56490397ce90233055" +} diff --git a/core/lib/dal/.sqlx/query-c89076470d35115de7f5c68a5113f2f9edd3fb4e73b44d9fa2c2bb927acb99f0.json b/core/lib/dal/.sqlx/query-c89076470d35115de7f5c68a5113f2f9edd3fb4e73b44d9fa2c2bb927acb99f0.json deleted file mode 100644 index f5c6727bd685..000000000000 --- a/core/lib/dal/.sqlx/query-c89076470d35115de7f5c68a5113f2f9edd3fb4e73b44d9fa2c2bb927acb99f0.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n SELECT\n number\n FROM\n l1_batches\n LEFT JOIN eth_txs_history AS commit_tx ON (\n l1_batches.eth_commit_tx_id = commit_tx.eth_tx_id\n )\n WHERE\n commit_tx.confirmed_at IS NOT NULL\n ORDER BY\n number DESC\n LIMIT\n 1\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "number", - "type_info": "Int8" - } - ], - "parameters": { - "Left": [] - }, - "nullable": [ - false - ] - }, - "hash": "c89076470d35115de7f5c68a5113f2f9edd3fb4e73b44d9fa2c2bb927acb99f0" -} diff --git a/core/lib/dal/.sqlx/query-c89cd551c59b54dd628c7e2339bc623866c3fd2e862c38c2af172c7c39620a49.json b/core/lib/dal/.sqlx/query-c89cd551c59b54dd628c7e2339bc623866c3fd2e862c38c2af172c7c39620a49.json deleted file mode 100644 index 422ea854c7cb..000000000000 --- a/core/lib/dal/.sqlx/query-c89cd551c59b54dd628c7e2339bc623866c3fd2e862c38c2af172c7c39620a49.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE\n miniblocks\n SET\n protocol_version = $1\n WHERE\n l1_batch_number IS NULL\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int4" - ] - }, - "nullable": [] - }, - "hash": "c89cd551c59b54dd628c7e2339bc623866c3fd2e862c38c2af172c7c39620a49" -} diff --git a/core/lib/dal/.sqlx/query-c8d9aa5d11de37a35f421c0ff61825c64f43a819b9c787228b23814542f563d9.json b/core/lib/dal/.sqlx/query-c8d9aa5d11de37a35f421c0ff61825c64f43a819b9c787228b23814542f563d9.json deleted file mode 100644 index c2278cd28d22..000000000000 --- a/core/lib/dal/.sqlx/query-c8d9aa5d11de37a35f421c0ff61825c64f43a819b9c787228b23814542f563d9.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n WITH sl AS (\n SELECT\n (\n SELECT\n ARRAY [hashed_key, value] AS kv\n FROM\n storage_logs\n WHERE\n storage_logs.miniblock_number = $1\n AND storage_logs.hashed_key >= u.start_key\n AND storage_logs.hashed_key <= u.end_key\n ORDER BY\n storage_logs.hashed_key\n LIMIT\n 1\n )\n FROM\n UNNEST($2 :: bytea [], $3 :: bytea []) AS u (start_key, end_key)\n )\n SELECT\n sl.kv [1] AS \"hashed_key?\",\n sl.kv [2] AS \"value?\",\n initial_writes.index\n FROM\n sl\n LEFT OUTER JOIN initial_writes ON initial_writes.hashed_key = sl.kv [1]\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "hashed_key?", - "type_info": "Bytea" - }, - { - "ordinal": 1, - "name": "value?", - "type_info": "Bytea" - }, - { - "ordinal": 2, - "name": "index", - "type_info": "Int8" - } - ], - "parameters": { - "Left": [ - "Int8", - "ByteaArray", - "ByteaArray" - ] - }, - "nullable": [ - null, - null, - true - ] - }, - "hash": "c8d9aa5d11de37a35f421c0ff61825c64f43a819b9c787228b23814542f563d9" -} diff --git a/core/lib/dal/.sqlx/query-c95612615946c403890e8a942e174a5ade5c1a472c4e5c9f5e9050e4136273b6.json b/core/lib/dal/.sqlx/query-c95612615946c403890e8a942e174a5ade5c1a472c4e5c9f5e9050e4136273b6.json deleted file mode 100644 index ac178bce44b5..000000000000 --- a/core/lib/dal/.sqlx/query-c95612615946c403890e8a942e174a5ade5c1a472c4e5c9f5e9050e4136273b6.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n base_token_ratios (\n numerator,\n denominator,\n ratio_timestamp,\n created_at,\n updated_at\n )\n VALUES\n ($1, $2, $3, NOW(), NOW())\n RETURNING\n id\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "id", - "type_info": "Int4" - } - ], - "parameters": { - "Left": [ - "Numeric", - "Numeric", - "Timestamp" - ] - }, - "nullable": [ - false - ] - }, - "hash": "c95612615946c403890e8a942e174a5ade5c1a472c4e5c9f5e9050e4136273b6" -} diff --git a/core/lib/dal/.sqlx/query-c98f19505792a4085bb5ddddb6d0e202da24ac3ca205154417e98ccfa7437379.json b/core/lib/dal/.sqlx/query-c98f19505792a4085bb5ddddb6d0e202da24ac3ca205154417e98ccfa7437379.json new file mode 100644 index 000000000000..cfb5c9aae147 --- /dev/null +++ b/core/lib/dal/.sqlx/query-c98f19505792a4085bb5ddddb6d0e202da24ac3ca205154417e98ccfa7437379.json @@ -0,0 +1,16 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE l1_batches\n SET\n hash = $1,\n rollup_last_leaf_index = $2,\n updated_at = NOW()\n WHERE\n number = $3\n AND hash IS NULL\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Bytea", + "Int8", + "Int8" + ] + }, + "nullable": [] + }, + "hash": "c98f19505792a4085bb5ddddb6d0e202da24ac3ca205154417e98ccfa7437379" +} diff --git a/core/lib/dal/.sqlx/query-cd882b7e8a8d76ed1438097b246d455f4043c60538687dec050c5b578d505ef8.json b/core/lib/dal/.sqlx/query-cd882b7e8a8d76ed1438097b246d455f4043c60538687dec050c5b578d505ef8.json deleted file mode 100644 index 5cdd2d8649b9..000000000000 --- a/core/lib/dal/.sqlx/query-cd882b7e8a8d76ed1438097b246d455f4043c60538687dec050c5b578d505ef8.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n WITH available_batches AS (\n SELECT\n MAX(number) AS \"last_batch\"\n FROM\n l1_batches\n ),\n processed_batches AS (\n SELECT\n COALESCE(MAX(l1_batch_number), $1) + $2 AS \"last_ready_batch\"\n FROM\n vm_runner_protective_reads\n WHERE\n time_taken IS NOT NULL\n )\n SELECT\n LEAST(last_batch, last_ready_batch) AS \"last_ready_batch!\"\n FROM\n available_batches FULL\n JOIN processed_batches ON TRUE\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "last_ready_batch!", - "type_info": "Int8" - } - ], - "parameters": { - "Left": [ - "Int8", - "Int8" - ] - }, - "nullable": [ - true - ] - }, - "hash": "cd882b7e8a8d76ed1438097b246d455f4043c60538687dec050c5b578d505ef8" -} diff --git a/core/lib/dal/.sqlx/query-ce0b54e6f5a805144ace2f0f9fba6b3e9bca996fa633005bc8eeb77341c8c893.json b/core/lib/dal/.sqlx/query-ce0b54e6f5a805144ace2f0f9fba6b3e9bca996fa633005bc8eeb77341c8c893.json new file mode 100644 index 000000000000..77f5849bac64 --- /dev/null +++ b/core/lib/dal/.sqlx/query-ce0b54e6f5a805144ace2f0f9fba6b3e9bca996fa633005bc8eeb77341c8c893.json @@ -0,0 +1,14 @@ +{ + "db_name": "PostgreSQL", + "query": "\n DELETE FROM vm_runner_bwip\n WHERE\n l1_batch_number > $1\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8" + ] + }, + "nullable": [] + }, + "hash": "ce0b54e6f5a805144ace2f0f9fba6b3e9bca996fa633005bc8eeb77341c8c893" +} diff --git a/core/lib/dal/.sqlx/query-044bbd6c7926890b642c906167307c7497d418325ac0f24468fb3d9bcc99f9c1.json b/core/lib/dal/.sqlx/query-cea9fe027a6a0ada827f23b48ac32432295b2f7ee40bf13522a6edbd236f1970.json similarity index 85% rename from core/lib/dal/.sqlx/query-044bbd6c7926890b642c906167307c7497d418325ac0f24468fb3d9bcc99f9c1.json rename to core/lib/dal/.sqlx/query-cea9fe027a6a0ada827f23b48ac32432295b2f7ee40bf13522a6edbd236f1970.json index 05d0bf939434..b1eae968a897 100644 --- a/core/lib/dal/.sqlx/query-044bbd6c7926890b642c906167307c7497d418325ac0f24468fb3d9bcc99f9c1.json +++ b/core/lib/dal/.sqlx/query-cea9fe027a6a0ada827f23b48ac32432295b2f7ee40bf13522a6edbd236f1970.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT\n u.hashed_key AS \"hashed_key!\",\n (\n SELECT\n value\n FROM\n storage_logs\n WHERE\n hashed_key = u.hashed_key\n AND miniblock_number <= $2\n ORDER BY\n miniblock_number DESC,\n operation_number DESC\n LIMIT\n 1\n ) AS \"value?\"\n FROM\n UNNEST($1 :: bytea []) AS u (hashed_key)\n ", + "query": "\n SELECT\n u.hashed_key AS \"hashed_key!\",\n (\n SELECT\n value\n FROM\n storage_logs\n WHERE\n hashed_key = u.hashed_key\n AND miniblock_number <= $2\n ORDER BY\n miniblock_number DESC,\n operation_number DESC\n LIMIT\n 1\n ) AS \"value?\"\n FROM\n UNNEST($1::bytea[]) AS u (hashed_key)\n ", "describe": { "columns": [ { @@ -25,5 +25,5 @@ null ] }, - "hash": "044bbd6c7926890b642c906167307c7497d418325ac0f24468fb3d9bcc99f9c1" + "hash": "cea9fe027a6a0ada827f23b48ac32432295b2f7ee40bf13522a6edbd236f1970" } diff --git a/core/lib/dal/.sqlx/query-ced682e16c616d26674c104caffbeea37512f1c5855579bdbb4cd8ba6d9977c3.json b/core/lib/dal/.sqlx/query-ced682e16c616d26674c104caffbeea37512f1c5855579bdbb4cd8ba6d9977c3.json deleted file mode 100644 index dc29da71f6c7..000000000000 --- a/core/lib/dal/.sqlx/query-ced682e16c616d26674c104caffbeea37512f1c5855579bdbb4cd8ba6d9977c3.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n SELECT\n table_name,\n PG_TABLE_SIZE(\n ('public.' || QUOTE_IDENT(table_name)) :: regclass\n ) AS table_size,\n PG_INDEXES_SIZE(\n ('public.' || QUOTE_IDENT(table_name)) :: regclass\n ) AS indexes_size,\n PG_RELATION_SIZE(\n ('public.' || QUOTE_IDENT(table_name)) :: regclass\n ) AS relation_size,\n PG_TOTAL_RELATION_SIZE(\n ('public.' || QUOTE_IDENT(table_name)) :: regclass\n ) AS total_size\n FROM\n information_schema.tables\n WHERE\n table_schema = 'public'\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "table_name", - "type_info": "Name" - }, - { - "ordinal": 1, - "name": "table_size", - "type_info": "Int8" - }, - { - "ordinal": 2, - "name": "indexes_size", - "type_info": "Int8" - }, - { - "ordinal": 3, - "name": "relation_size", - "type_info": "Int8" - }, - { - "ordinal": 4, - "name": "total_size", - "type_info": "Int8" - } - ], - "parameters": { - "Left": [] - }, - "nullable": [ - true, - null, - null, - null, - null - ] - }, - "hash": "ced682e16c616d26674c104caffbeea37512f1c5855579bdbb4cd8ba6d9977c3" -} diff --git a/core/lib/dal/.sqlx/query-cf5e1c6912b432eeb9b9779bfc3700f9ae2a6e5a917b1a21f290d313d9d88dba.json b/core/lib/dal/.sqlx/query-cf5e1c6912b432eeb9b9779bfc3700f9ae2a6e5a917b1a21f290d313d9d88dba.json deleted file mode 100644 index cf8308202fb3..000000000000 --- a/core/lib/dal/.sqlx/query-cf5e1c6912b432eeb9b9779bfc3700f9ae2a6e5a917b1a21f290d313d9d88dba.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n DELETE FROM\n call_traces\n WHERE\n tx_hash = ANY ($1)\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "ByteaArray" - ] - }, - "nullable": [] - }, - "hash": "cf5e1c6912b432eeb9b9779bfc3700f9ae2a6e5a917b1a21f290d313d9d88dba" -} diff --git a/core/lib/dal/.sqlx/query-cf8cff1e6d277088519ef7dfbdb1885d320c146cd8fad77c107ef12fa38e6c98.json b/core/lib/dal/.sqlx/query-cf8cff1e6d277088519ef7dfbdb1885d320c146cd8fad77c107ef12fa38e6c98.json new file mode 100644 index 000000000000..1bd791a3f829 --- /dev/null +++ b/core/lib/dal/.sqlx/query-cf8cff1e6d277088519ef7dfbdb1885d320c146cd8fad77c107ef12fa38e6c98.json @@ -0,0 +1,40 @@ +{ + "db_name": "PostgreSQL", + "query": "\n INSERT INTO\n transactions (\n hash,\n is_priority,\n initiator_address,\n nonce,\n signature,\n gas_limit,\n max_fee_per_gas,\n max_priority_fee_per_gas,\n gas_per_pubdata_limit,\n input,\n data,\n tx_format,\n contract_address,\n value,\n paymaster,\n paymaster_input,\n execution_info,\n received_at,\n created_at,\n updated_at\n )\n VALUES\n (\n $1,\n FALSE,\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 JSONB_BUILD_OBJECT('gas_used', $16::BIGINT, 'storage_writes', $17::INT, 'contracts_used', $18::INT),\n $19,\n NOW(),\n NOW()\n )\n ON CONFLICT (initiator_address, nonce) DO\n UPDATE\n SET\n hash = $1,\n signature = $4,\n gas_limit = $5,\n max_fee_per_gas = $6,\n max_priority_fee_per_gas = $7,\n gas_per_pubdata_limit = $8,\n input = $9,\n data = $10,\n tx_format = $11,\n contract_address = $12,\n value = $13,\n paymaster = $14,\n paymaster_input = $15,\n execution_info = JSONB_BUILD_OBJECT('gas_used', $16::BIGINT, 'storage_writes', $17::INT, 'contracts_used', $18::INT),\n in_mempool = FALSE,\n received_at = $19,\n created_at = NOW(),\n updated_at = NOW(),\n error = NULL\n WHERE\n transactions.is_priority = FALSE\n AND transactions.miniblock_number IS NULL\n RETURNING\n (\n SELECT\n hash\n FROM\n transactions\n WHERE\n transactions.initiator_address = $2\n AND transactions.nonce = $3\n ) IS NOT NULL AS \"is_replaced!\"\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "is_replaced!", + "type_info": "Bool" + } + ], + "parameters": { + "Left": [ + "Bytea", + "Bytea", + "Int8", + "Bytea", + "Numeric", + "Numeric", + "Numeric", + "Numeric", + "Bytea", + "Jsonb", + "Int4", + "Bytea", + "Numeric", + "Bytea", + "Bytea", + "Int8", + "Int4", + "Int4", + "Timestamp" + ] + }, + "nullable": [ + null + ] + }, + "hash": "cf8cff1e6d277088519ef7dfbdb1885d320c146cd8fad77c107ef12fa38e6c98" +} diff --git a/core/lib/dal/.sqlx/query-d3abe74360732659a1a35a176679411ba30ac67080552279d821d66b1b804db3.json b/core/lib/dal/.sqlx/query-d3abe74360732659a1a35a176679411ba30ac67080552279d821d66b1b804db3.json new file mode 100644 index 000000000000..2b5eeec2e638 --- /dev/null +++ b/core/lib/dal/.sqlx/query-d3abe74360732659a1a35a176679411ba30ac67080552279d821d66b1b804db3.json @@ -0,0 +1,14 @@ +{ + "db_name": "PostgreSQL", + "query": "\n INSERT INTO\n vm_runner_protective_reads (l1_batch_number, created_at, updated_at, processing_started_at)\n VALUES\n ($1, NOW(), NOW(), NOW())\n ON CONFLICT (l1_batch_number) DO\n UPDATE\n SET\n updated_at = NOW(),\n processing_started_at = NOW()\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8" + ] + }, + "nullable": [] + }, + "hash": "d3abe74360732659a1a35a176679411ba30ac67080552279d821d66b1b804db3" +} diff --git a/core/lib/dal/.sqlx/query-d3b09cbcddf6238b358d32d57678242aad3e9a47400f6d6837a35f4c54a216b9.json b/core/lib/dal/.sqlx/query-d3b09cbcddf6238b358d32d57678242aad3e9a47400f6d6837a35f4c54a216b9.json new file mode 100644 index 000000000000..8770a9b596ea --- /dev/null +++ b/core/lib/dal/.sqlx/query-d3b09cbcddf6238b358d32d57678242aad3e9a47400f6d6837a35f4c54a216b9.json @@ -0,0 +1,20 @@ +{ + "db_name": "PostgreSQL", + "query": "\n SELECT\n number\n FROM\n l1_batches\n LEFT JOIN eth_txs_history AS execute_tx ON (l1_batches.eth_execute_tx_id = execute_tx.eth_tx_id)\n WHERE\n execute_tx.confirmed_at IS NOT NULL\n ORDER BY\n number DESC\n LIMIT\n 1\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "number", + "type_info": "Int8" + } + ], + "parameters": { + "Left": [] + }, + "nullable": [ + false + ] + }, + "hash": "d3b09cbcddf6238b358d32d57678242aad3e9a47400f6d6837a35f4c54a216b9" +} diff --git a/core/lib/dal/.sqlx/query-d3e4ee6677ce9de438abf7529aaf64c789d3a8a1d6c96c58213c23a055cde751.json b/core/lib/dal/.sqlx/query-d3e4ee6677ce9de438abf7529aaf64c789d3a8a1d6c96c58213c23a055cde751.json new file mode 100644 index 000000000000..bf1570deefc0 --- /dev/null +++ b/core/lib/dal/.sqlx/query-d3e4ee6677ce9de438abf7529aaf64c789d3a8a1d6c96c58213c23a055cde751.json @@ -0,0 +1,15 @@ +{ + "db_name": "PostgreSQL", + "query": "\n DELETE FROM call_traces\n WHERE\n tx_hash IN (\n SELECT\n hash\n FROM\n transactions\n WHERE\n miniblock_number BETWEEN $1 AND $2\n )\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8", + "Int8" + ] + }, + "nullable": [] + }, + "hash": "d3e4ee6677ce9de438abf7529aaf64c789d3a8a1d6c96c58213c23a055cde751" +} diff --git a/core/lib/dal/.sqlx/query-d4da5af7b848e3354b66bbc7ed5e5da19947002e66110573e6fad9105f07413a.json b/core/lib/dal/.sqlx/query-d4da5af7b848e3354b66bbc7ed5e5da19947002e66110573e6fad9105f07413a.json deleted file mode 100644 index 0c2b78a44bd4..000000000000 --- a/core/lib/dal/.sqlx/query-d4da5af7b848e3354b66bbc7ed5e5da19947002e66110573e6fad9105f07413a.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE\n eth_txs\n SET\n confirmed_eth_tx_history_id = $1\n WHERE\n id = $2\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int4", - "Int4" - ] - }, - "nullable": [] - }, - "hash": "d4da5af7b848e3354b66bbc7ed5e5da19947002e66110573e6fad9105f07413a" -} diff --git a/core/lib/dal/.sqlx/query-d7e5ff78b2bc2e12fa5b17e6b555cadeff54160c1cc0b6b4fddecf090ebb30f1.json b/core/lib/dal/.sqlx/query-d7e5ff78b2bc2e12fa5b17e6b555cadeff54160c1cc0b6b4fddecf090ebb30f1.json deleted file mode 100644 index 013c4eab7d28..000000000000 --- a/core/lib/dal/.sqlx/query-d7e5ff78b2bc2e12fa5b17e6b555cadeff54160c1cc0b6b4fddecf090ebb30f1.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n SELECT\n number\n FROM\n l1_batches\n LEFT JOIN eth_txs_history AS execute_tx ON (\n l1_batches.eth_execute_tx_id = execute_tx.eth_tx_id\n )\n WHERE\n execute_tx.confirmed_at IS NOT NULL\n ORDER BY\n number DESC\n LIMIT\n 1\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "number", - "type_info": "Int8" - } - ], - "parameters": { - "Left": [] - }, - "nullable": [ - false - ] - }, - "hash": "d7e5ff78b2bc2e12fa5b17e6b555cadeff54160c1cc0b6b4fddecf090ebb30f1" -} diff --git a/core/lib/dal/.sqlx/query-d8a41829e3836ea05802ac7257f5dbc6f5ed92bc3d47b4dd91116dd6ec354d50.json b/core/lib/dal/.sqlx/query-d8a41829e3836ea05802ac7257f5dbc6f5ed92bc3d47b4dd91116dd6ec354d50.json deleted file mode 100644 index 8c390048ad1a..000000000000 --- a/core/lib/dal/.sqlx/query-d8a41829e3836ea05802ac7257f5dbc6f5ed92bc3d47b4dd91116dd6ec354d50.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n DELETE FROM\n storage_logs\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [] - }, - "nullable": [] - }, - "hash": "d8a41829e3836ea05802ac7257f5dbc6f5ed92bc3d47b4dd91116dd6ec354d50" -} diff --git a/core/lib/dal/.sqlx/query-d92d99b940e439fa8942e1e8a4a98c18f29d3bebb42b0ae3fe7757eeea9ee175.json b/core/lib/dal/.sqlx/query-d92d99b940e439fa8942e1e8a4a98c18f29d3bebb42b0ae3fe7757eeea9ee175.json deleted file mode 100644 index bdaac583ed7d..000000000000 --- a/core/lib/dal/.sqlx/query-d92d99b940e439fa8942e1e8a4a98c18f29d3bebb42b0ae3fe7757eeea9ee175.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE\n tee_proof_generation_details\n SET\n status = $1,\n updated_at = NOW(),\n prover_taken_at = NOW()\n WHERE\n tee_type = $2\n AND l1_batch_number = (\n SELECT\n proofs.l1_batch_number\n FROM\n tee_proof_generation_details AS proofs\n JOIN tee_verifier_input_producer_jobs AS inputs ON proofs.l1_batch_number = inputs.l1_batch_number\n WHERE\n inputs.status = $3\n AND (\n proofs.status = $4\n OR (\n proofs.status = $1\n AND proofs.prover_taken_at < NOW() - $5 :: INTERVAL\n )\n )\n AND proofs.l1_batch_number >= $6\n ORDER BY\n l1_batch_number ASC\n LIMIT\n 1 FOR\n UPDATE\n SKIP LOCKED\n )\n RETURNING\n tee_proof_generation_details.l1_batch_number\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "l1_batch_number", - "type_info": "Int8" - } - ], - "parameters": { - "Left": [ - "Text", - "Text", - { - "Custom": { - "name": "tee_verifier_input_producer_job_status", - "kind": { - "Enum": [ - "Queued", - "ManuallySkipped", - "InProgress", - "Successful", - "Failed" - ] - } - } - }, - "Text", - "Interval", - "Int8" - ] - }, - "nullable": [ - false - ] - }, - "hash": "d92d99b940e439fa8942e1e8a4a98c18f29d3bebb42b0ae3fe7757eeea9ee175" -} diff --git a/core/lib/dal/.sqlx/query-da08c899a7c5243cfcda7fbbcd34675993ca0c7b2fb1d2be386101b78a995110.json b/core/lib/dal/.sqlx/query-da08c899a7c5243cfcda7fbbcd34675993ca0c7b2fb1d2be386101b78a995110.json deleted file mode 100644 index 33529af4525f..000000000000 --- a/core/lib/dal/.sqlx/query-da08c899a7c5243cfcda7fbbcd34675993ca0c7b2fb1d2be386101b78a995110.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE\n eth_txs\n SET\n has_failed = TRUE\n WHERE\n id = $1\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int4" - ] - }, - "nullable": [] - }, - "hash": "da08c899a7c5243cfcda7fbbcd34675993ca0c7b2fb1d2be386101b78a995110" -} diff --git a/core/lib/dal/.sqlx/query-daa330d43f150824f2195cdbfb96862d6ad0de7c7ca1d5320800f317428f07e1.json b/core/lib/dal/.sqlx/query-daa330d43f150824f2195cdbfb96862d6ad0de7c7ca1d5320800f317428f07e1.json new file mode 100644 index 000000000000..836bbc435f00 --- /dev/null +++ b/core/lib/dal/.sqlx/query-daa330d43f150824f2195cdbfb96862d6ad0de7c7ca1d5320800f317428f07e1.json @@ -0,0 +1,14 @@ +{ + "db_name": "PostgreSQL", + "query": "\n DELETE FROM vm_runner_protective_reads\n WHERE\n l1_batch_number > $1\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8" + ] + }, + "nullable": [] + }, + "hash": "daa330d43f150824f2195cdbfb96862d6ad0de7c7ca1d5320800f317428f07e1" +} diff --git a/core/lib/dal/.sqlx/query-dac29d7eb16782713acb7aa68aaa8b12b67678e983dc2570be28fe9b1e016c28.json b/core/lib/dal/.sqlx/query-dac29d7eb16782713acb7aa68aaa8b12b67678e983dc2570be28fe9b1e016c28.json new file mode 100644 index 000000000000..c0258c12311b --- /dev/null +++ b/core/lib/dal/.sqlx/query-dac29d7eb16782713acb7aa68aaa8b12b67678e983dc2570be28fe9b1e016c28.json @@ -0,0 +1,14 @@ +{ + "db_name": "PostgreSQL", + "query": "\n DELETE FROM call_traces\n WHERE\n tx_hash = ANY ($1)\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "ByteaArray" + ] + }, + "nullable": [] + }, + "hash": "dac29d7eb16782713acb7aa68aaa8b12b67678e983dc2570be28fe9b1e016c28" +} diff --git a/core/lib/dal/.sqlx/query-dd0803aa12873b541ee88f3609d0b04a045f37cb9217ed0b17a78f9949f3d7ed.json b/core/lib/dal/.sqlx/query-dd0803aa12873b541ee88f3609d0b04a045f37cb9217ed0b17a78f9949f3d7ed.json deleted file mode 100644 index 3a252916111f..000000000000 --- a/core/lib/dal/.sqlx/query-dd0803aa12873b541ee88f3609d0b04a045f37cb9217ed0b17a78f9949f3d7ed.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n SELECT\n MAX(l1_batches.number)\n FROM\n l1_batches\n JOIN eth_txs ON (l1_batches.eth_commit_tx_id = eth_txs.id)\n JOIN eth_txs_history AS commit_tx ON (\n eth_txs.confirmed_eth_tx_history_id = commit_tx.id\n )\n WHERE\n commit_tx.confirmed_at IS NOT NULL\n AND eth_prove_tx_id IS NOT NULL\n AND eth_execute_tx_id IS NULL\n AND EXTRACT(\n epoch\n FROM\n commit_tx.confirmed_at\n ) < $1\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "max", - "type_info": "Int8" - } - ], - "parameters": { - "Left": [ - "Numeric" - ] - }, - "nullable": [ - null - ] - }, - "hash": "dd0803aa12873b541ee88f3609d0b04a045f37cb9217ed0b17a78f9949f3d7ed" -} diff --git a/core/lib/dal/.sqlx/query-df8bfa2f1691f1c1aa683fa2821c1b0b2dd97b590d546c3c03dc1a97144a57ec.json b/core/lib/dal/.sqlx/query-df8bfa2f1691f1c1aa683fa2821c1b0b2dd97b590d546c3c03dc1a97144a57ec.json deleted file mode 100644 index 281ca041ed17..000000000000 --- a/core/lib/dal/.sqlx/query-df8bfa2f1691f1c1aa683fa2821c1b0b2dd97b590d546c3c03dc1a97144a57ec.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE\n data_availability\n SET\n inclusion_data = $1,\n updated_at = NOW()\n WHERE\n l1_batch_number = $2\n AND inclusion_data IS NULL\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Bytea", - "Int8" - ] - }, - "nullable": [] - }, - "hash": "df8bfa2f1691f1c1aa683fa2821c1b0b2dd97b590d546c3c03dc1a97144a57ec" -} diff --git a/core/lib/dal/.sqlx/query-3f83c528378dda7b8ddc6ceeedca1ef4ad58ff942f3dad4fb87e5a105fbfcd13.json b/core/lib/dal/.sqlx/query-e1e8ab0cb11c6081d3525228eacbad74e1bab808c744fa14bf24332b39120767.json similarity index 50% rename from core/lib/dal/.sqlx/query-3f83c528378dda7b8ddc6ceeedca1ef4ad58ff942f3dad4fb87e5a105fbfcd13.json rename to core/lib/dal/.sqlx/query-e1e8ab0cb11c6081d3525228eacbad74e1bab808c744fa14bf24332b39120767.json index f54509433b31..de9937ef7b95 100644 --- a/core/lib/dal/.sqlx/query-3f83c528378dda7b8ddc6ceeedca1ef4ad58ff942f3dad4fb87e5a105fbfcd13.json +++ b/core/lib/dal/.sqlx/query-e1e8ab0cb11c6081d3525228eacbad74e1bab808c744fa14bf24332b39120767.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n WITH events AS (\n SELECT\n DISTINCT ON (events.tx_hash) *\n FROM\n events\n WHERE\n events.address = $1\n AND events.topic1 = $2\n AND events.tx_hash = ANY ($3)\n ORDER BY\n events.tx_hash,\n events.event_index_in_tx DESC\n )\n SELECT\n transactions.hash AS tx_hash,\n transactions.index_in_block AS index_in_block,\n transactions.l1_batch_tx_index AS l1_batch_tx_index,\n transactions.miniblock_number AS \"block_number!\",\n transactions.error AS error,\n transactions.effective_gas_price AS effective_gas_price,\n transactions.initiator_address AS initiator_address,\n transactions.data -> 'to' AS \"transfer_to?\",\n transactions.data -> 'contractAddress' AS \"execute_contract_address?\",\n transactions.tx_format AS \"tx_format?\",\n transactions.refunded_gas AS refunded_gas,\n transactions.gas_limit AS gas_limit,\n miniblocks.hash AS \"block_hash\",\n miniblocks.l1_batch_number AS \"l1_batch_number?\",\n events.topic4 AS \"contract_address?\",\n miniblocks.timestamp AS \"block_timestamp?\"\n FROM\n transactions\n JOIN miniblocks ON miniblocks.number = transactions.miniblock_number\n LEFT JOIN events ON events.tx_hash = transactions.hash\n WHERE\n transactions.hash = ANY ($3)\n AND transactions.data != '{}' :: jsonb\n ", + "query": "\n WITH\n events AS (\n SELECT DISTINCT\n ON (events.tx_hash) *\n FROM\n events\n WHERE\n events.address = $1\n AND events.topic1 = $2\n AND events.tx_hash = ANY ($3)\n ORDER BY\n events.tx_hash,\n events.event_index_in_tx DESC\n )\n SELECT\n transactions.hash AS tx_hash,\n transactions.index_in_block AS index_in_block,\n transactions.l1_batch_tx_index AS l1_batch_tx_index,\n transactions.miniblock_number AS \"block_number!\",\n transactions.error AS error,\n transactions.effective_gas_price AS effective_gas_price,\n transactions.initiator_address AS initiator_address,\n transactions.data -> 'to' AS \"transfer_to?\",\n transactions.data -> 'contractAddress' AS \"execute_contract_address?\",\n transactions.tx_format AS \"tx_format?\",\n transactions.refunded_gas AS refunded_gas,\n transactions.gas_limit AS gas_limit,\n miniblocks.hash AS \"block_hash\",\n miniblocks.l1_batch_number AS \"l1_batch_number?\",\n events.topic4 AS \"contract_address?\",\n miniblocks.timestamp AS \"block_timestamp?\"\n FROM\n transactions\n JOIN miniblocks ON miniblocks.number = transactions.miniblock_number\n LEFT JOIN events ON events.tx_hash = transactions.hash\n WHERE\n transactions.hash = ANY ($3)\n AND transactions.data != '{}'::jsonb\n ", "describe": { "columns": [ { @@ -110,5 +110,5 @@ false ] }, - "hash": "3f83c528378dda7b8ddc6ceeedca1ef4ad58ff942f3dad4fb87e5a105fbfcd13" + "hash": "e1e8ab0cb11c6081d3525228eacbad74e1bab808c744fa14bf24332b39120767" } diff --git a/core/lib/dal/.sqlx/query-e210f3652790e82cc1f69a017dea683c2092560f59c8a6703d4ccc1715872ba9.json b/core/lib/dal/.sqlx/query-e210f3652790e82cc1f69a017dea683c2092560f59c8a6703d4ccc1715872ba9.json deleted file mode 100644 index 2eebc0e9b889..000000000000 --- a/core/lib/dal/.sqlx/query-e210f3652790e82cc1f69a017dea683c2092560f59c8a6703d4ccc1715872ba9.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n DELETE FROM\n vm_runner_protective_reads\n WHERE\n l1_batch_number > $1\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8" - ] - }, - "nullable": [] - }, - "hash": "e210f3652790e82cc1f69a017dea683c2092560f59c8a6703d4ccc1715872ba9" -} diff --git a/core/lib/dal/.sqlx/query-e3f4af790fca9149f4edff070170294ec464d184ad732692faa61d2ef99c84e9.json b/core/lib/dal/.sqlx/query-e3f4af790fca9149f4edff070170294ec464d184ad732692faa61d2ef99c84e9.json new file mode 100644 index 000000000000..abe74036f4c6 --- /dev/null +++ b/core/lib/dal/.sqlx/query-e3f4af790fca9149f4edff070170294ec464d184ad732692faa61d2ef99c84e9.json @@ -0,0 +1,40 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE tee_proof_generation_details\n SET\n status = $1,\n updated_at = NOW(),\n prover_taken_at = NOW()\n WHERE\n tee_type = $2\n AND l1_batch_number = (\n SELECT\n proofs.l1_batch_number\n FROM\n tee_proof_generation_details AS proofs\n JOIN tee_verifier_input_producer_jobs AS inputs ON proofs.l1_batch_number = inputs.l1_batch_number\n WHERE\n inputs.status = $3\n AND (\n proofs.status = $4\n OR (\n proofs.status = $1\n AND proofs.prover_taken_at < NOW() - $5::INTERVAL\n )\n )\n AND proofs.l1_batch_number >= $6\n ORDER BY\n l1_batch_number ASC\n LIMIT\n 1\n FOR UPDATE\n SKIP LOCKED\n )\n RETURNING\n tee_proof_generation_details.l1_batch_number\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "l1_batch_number", + "type_info": "Int8" + } + ], + "parameters": { + "Left": [ + "Text", + "Text", + { + "Custom": { + "name": "tee_verifier_input_producer_job_status", + "kind": { + "Enum": [ + "Queued", + "ManuallySkipped", + "InProgress", + "Successful", + "Failed" + ] + } + } + }, + "Text", + "Interval", + "Int8" + ] + }, + "nullable": [ + false + ] + }, + "hash": "e3f4af790fca9149f4edff070170294ec464d184ad732692faa61d2ef99c84e9" +} diff --git a/core/lib/dal/.sqlx/query-e673789d5b4a7aae11feccb085bf3f9dd37b771cf76261762ae18fd14cf0efc5.json b/core/lib/dal/.sqlx/query-e673789d5b4a7aae11feccb085bf3f9dd37b771cf76261762ae18fd14cf0efc5.json new file mode 100644 index 000000000000..65803f089a8b --- /dev/null +++ b/core/lib/dal/.sqlx/query-e673789d5b4a7aae11feccb085bf3f9dd37b771cf76261762ae18fd14cf0efc5.json @@ -0,0 +1,16 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE miniblocks\n SET\n protocol_version = $1\n WHERE\n number BETWEEN $2 AND $3\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int4", + "Int8", + "Int8" + ] + }, + "nullable": [] + }, + "hash": "e673789d5b4a7aae11feccb085bf3f9dd37b771cf76261762ae18fd14cf0efc5" +} diff --git a/core/lib/dal/.sqlx/query-e7d0b7c132b80195dae7cbf50355eb148aa6d1dbd69bf3fe48522101a6ea0bcb.json b/core/lib/dal/.sqlx/query-e7d0b7c132b80195dae7cbf50355eb148aa6d1dbd69bf3fe48522101a6ea0bcb.json new file mode 100644 index 000000000000..576484cd4206 --- /dev/null +++ b/core/lib/dal/.sqlx/query-e7d0b7c132b80195dae7cbf50355eb148aa6d1dbd69bf3fe48522101a6ea0bcb.json @@ -0,0 +1,23 @@ +{ + "db_name": "PostgreSQL", + "query": "\n WITH\n available_batches AS (\n SELECT\n MAX(number) AS \"last_batch\"\n FROM\n l1_batches\n ),\n processed_batches AS (\n SELECT\n COALESCE(MAX(l1_batch_number), $1) + $2 AS \"last_ready_batch\"\n FROM\n vm_runner_bwip\n WHERE\n time_taken IS NOT NULL\n )\n SELECT\n LEAST(last_batch, last_ready_batch) AS \"last_ready_batch!\"\n FROM\n available_batches\n FULL JOIN processed_batches ON TRUE\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "last_ready_batch!", + "type_info": "Int8" + } + ], + "parameters": { + "Left": [ + "Int8", + "Int8" + ] + }, + "nullable": [ + true + ] + }, + "hash": "e7d0b7c132b80195dae7cbf50355eb148aa6d1dbd69bf3fe48522101a6ea0bcb" +} diff --git a/core/lib/dal/.sqlx/query-e7f05f081e989f104d0352b0ad0668929ceaaa66536248f4a0fc062e50d0d80c.json b/core/lib/dal/.sqlx/query-e7f05f081e989f104d0352b0ad0668929ceaaa66536248f4a0fc062e50d0d80c.json deleted file mode 100644 index 1c8853b516a5..000000000000 --- a/core/lib/dal/.sqlx/query-e7f05f081e989f104d0352b0ad0668929ceaaa66536248f4a0fc062e50d0d80c.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n WITH available_batches AS (\n SELECT\n MAX(number) AS \"last_batch\"\n FROM\n l1_batches\n ),\n processed_batches AS (\n SELECT\n COALESCE(MAX(l1_batch_number), $1) + $2 AS \"last_ready_batch\"\n FROM\n vm_runner_bwip\n WHERE\n time_taken IS NOT NULL\n )\n SELECT\n LEAST(last_batch, last_ready_batch) AS \"last_ready_batch!\"\n FROM\n available_batches FULL\n JOIN processed_batches ON TRUE\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "last_ready_batch!", - "type_info": "Int8" - } - ], - "parameters": { - "Left": [ - "Int8", - "Int8" - ] - }, - "nullable": [ - true - ] - }, - "hash": "e7f05f081e989f104d0352b0ad0668929ceaaa66536248f4a0fc062e50d0d80c" -} diff --git a/core/lib/dal/.sqlx/query-ea682d41219feda3514336f4c1ae6ecbe96475e83dfed603bd305e72460f52c2.json b/core/lib/dal/.sqlx/query-ea682d41219feda3514336f4c1ae6ecbe96475e83dfed603bd305e72460f52c2.json new file mode 100644 index 000000000000..96a71d8f234e --- /dev/null +++ b/core/lib/dal/.sqlx/query-ea682d41219feda3514336f4c1ae6ecbe96475e83dfed603bd305e72460f52c2.json @@ -0,0 +1,14 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE consistency_checker_info\n SET\n last_processed_l1_batch = $1,\n updated_at = NOW()\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8" + ] + }, + "nullable": [] + }, + "hash": "ea682d41219feda3514336f4c1ae6ecbe96475e83dfed603bd305e72460f52c2" +} diff --git a/core/lib/dal/.sqlx/query-ea904aa930d602d33b6fbc1bf1178a8a0ec739f4ddec8ffeb3a87253aeb18d30.json b/core/lib/dal/.sqlx/query-ea904aa930d602d33b6fbc1bf1178a8a0ec739f4ddec8ffeb3a87253aeb18d30.json new file mode 100644 index 000000000000..718b2a8f6872 --- /dev/null +++ b/core/lib/dal/.sqlx/query-ea904aa930d602d33b6fbc1bf1178a8a0ec739f4ddec8ffeb3a87253aeb18d30.json @@ -0,0 +1,14 @@ +{ + "db_name": "PostgreSQL", + "query": "\n DELETE FROM miniblocks\n WHERE\n number > $1\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8" + ] + }, + "nullable": [] + }, + "hash": "ea904aa930d602d33b6fbc1bf1178a8a0ec739f4ddec8ffeb3a87253aeb18d30" +} diff --git a/core/lib/dal/.sqlx/query-ca497322d6d5d80e8958a01f74fb8b424b2152a99a3cdff452218b6bb7f12840.json b/core/lib/dal/.sqlx/query-eab36591af61369e36e3dab79025ac6758a0a4e367f93a9bd48ec82c51e09755.json similarity index 71% rename from core/lib/dal/.sqlx/query-ca497322d6d5d80e8958a01f74fb8b424b2152a99a3cdff452218b6bb7f12840.json rename to core/lib/dal/.sqlx/query-eab36591af61369e36e3dab79025ac6758a0a4e367f93a9bd48ec82c51e09755.json index e348af8e214d..b9783f771a7a 100644 --- a/core/lib/dal/.sqlx/query-ca497322d6d5d80e8958a01f74fb8b424b2152a99a3cdff452218b6bb7f12840.json +++ b/core/lib/dal/.sqlx/query-eab36591af61369e36e3dab79025ac6758a0a4e367f93a9bd48ec82c51e09755.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT\n *\n FROM\n eth_txs\n WHERE\n from_addr IS NOT DISTINCT\n FROM\n $2 -- can't just use equality as NULL != NULL\n AND is_gateway = $3\n AND id > (\n SELECT\n COALESCE(MAX(eth_tx_id), 0)\n FROM\n eth_txs_history\n JOIN eth_txs ON eth_txs.id = eth_txs_history.eth_tx_id\n WHERE\n eth_txs_history.sent_at_block IS NOT NULL\n AND eth_txs.from_addr IS NOT DISTINCT\n FROM\n $2\n AND is_gateway = $3\n )\n ORDER BY\n id\n LIMIT\n $1\n ", + "query": "\n SELECT\n *\n FROM\n eth_txs\n WHERE\n from_addr IS NOT DISTINCT FROM $2 -- can't just use equality as NULL != NULL\n AND is_gateway = $3\n AND id > (\n SELECT\n COALESCE(MAX(eth_tx_id), 0)\n FROM\n eth_txs_history\n JOIN eth_txs ON eth_txs.id = eth_txs_history.eth_tx_id\n WHERE\n eth_txs_history.sent_at_block IS NOT NULL\n AND eth_txs.from_addr IS NOT DISTINCT FROM $2\n AND is_gateway = $3\n )\n ORDER BY\n id\n LIMIT\n $1\n ", "describe": { "columns": [ { @@ -110,5 +110,5 @@ true ] }, - "hash": "ca497322d6d5d80e8958a01f74fb8b424b2152a99a3cdff452218b6bb7f12840" + "hash": "eab36591af61369e36e3dab79025ac6758a0a4e367f93a9bd48ec82c51e09755" } diff --git a/core/lib/dal/.sqlx/query-ead71ae66fe4685132c03a973612fe98364aa684180dd6fbf540bb0b68d96a64.json b/core/lib/dal/.sqlx/query-ead71ae66fe4685132c03a973612fe98364aa684180dd6fbf540bb0b68d96a64.json new file mode 100644 index 000000000000..02cd6733e811 --- /dev/null +++ b/core/lib/dal/.sqlx/query-ead71ae66fe4685132c03a973612fe98364aa684180dd6fbf540bb0b68d96a64.json @@ -0,0 +1,15 @@ +{ + "db_name": "PostgreSQL", + "query": "\n WITH\n new_logs AS MATERIALIZED (\n SELECT DISTINCT\n ON (hashed_key) hashed_key,\n miniblock_number,\n operation_number\n FROM\n storage_logs\n WHERE\n miniblock_number BETWEEN $1 AND $2\n ORDER BY\n hashed_key,\n miniblock_number DESC,\n operation_number DESC\n )\n DELETE FROM storage_logs USING new_logs\n WHERE\n storage_logs.hashed_key = new_logs.hashed_key\n AND storage_logs.miniblock_number <= $2\n AND (storage_logs.miniblock_number, storage_logs.operation_number) < (new_logs.miniblock_number, new_logs.operation_number)\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8", + "Int8" + ] + }, + "nullable": [] + }, + "hash": "ead71ae66fe4685132c03a973612fe98364aa684180dd6fbf540bb0b68d96a64" +} diff --git a/core/lib/dal/.sqlx/query-ebe7e4fba7a9d63e2824ff890d9ad0e0d6d235b05441fc306dbf70d27f1b728c.json b/core/lib/dal/.sqlx/query-ebe7e4fba7a9d63e2824ff890d9ad0e0d6d235b05441fc306dbf70d27f1b728c.json deleted file mode 100644 index ff8dd563fd73..000000000000 --- a/core/lib/dal/.sqlx/query-ebe7e4fba7a9d63e2824ff890d9ad0e0d6d235b05441fc306dbf70d27f1b728c.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n WITH events_select AS (\n SELECT\n address,\n topic1,\n topic2,\n topic3,\n topic4,\n value,\n miniblock_number,\n tx_hash,\n tx_index_in_block,\n event_index_in_block,\n event_index_in_tx\n FROM\n events\n WHERE\n miniblock_number > $1\n ORDER BY\n miniblock_number ASC,\n event_index_in_block ASC\n )\n SELECT\n miniblocks.hash AS \"block_hash?\",\n address AS \"address!\",\n topic1 AS \"topic1!\",\n topic2 AS \"topic2!\",\n topic3 AS \"topic3!\",\n topic4 AS \"topic4!\",\n value AS \"value!\",\n miniblock_number AS \"miniblock_number!\",\n miniblocks.l1_batch_number AS \"l1_batch_number?\",\n tx_hash AS \"tx_hash!\",\n tx_index_in_block AS \"tx_index_in_block!\",\n event_index_in_block AS \"event_index_in_block!\",\n event_index_in_tx AS \"event_index_in_tx!\",\n miniblocks.timestamp AS \"block_timestamp\"\n FROM\n events_select\n INNER JOIN miniblocks ON events_select.miniblock_number = miniblocks.number\n ORDER BY\n miniblock_number ASC,\n event_index_in_block ASC\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "block_hash?", - "type_info": "Bytea" - }, - { - "ordinal": 1, - "name": "address!", - "type_info": "Bytea" - }, - { - "ordinal": 2, - "name": "topic1!", - "type_info": "Bytea" - }, - { - "ordinal": 3, - "name": "topic2!", - "type_info": "Bytea" - }, - { - "ordinal": 4, - "name": "topic3!", - "type_info": "Bytea" - }, - { - "ordinal": 5, - "name": "topic4!", - "type_info": "Bytea" - }, - { - "ordinal": 6, - "name": "value!", - "type_info": "Bytea" - }, - { - "ordinal": 7, - "name": "miniblock_number!", - "type_info": "Int8" - }, - { - "ordinal": 8, - "name": "l1_batch_number?", - "type_info": "Int8" - }, - { - "ordinal": 9, - "name": "tx_hash!", - "type_info": "Bytea" - }, - { - "ordinal": 10, - "name": "tx_index_in_block!", - "type_info": "Int4" - }, - { - "ordinal": 11, - "name": "event_index_in_block!", - "type_info": "Int4" - }, - { - "ordinal": 12, - "name": "event_index_in_tx!", - "type_info": "Int4" - }, - { - "ordinal": 13, - "name": "block_timestamp", - "type_info": "Int8" - } - ], - "parameters": { - "Left": [ - "Int8" - ] - }, - "nullable": [ - false, - false, - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false - ] - }, - "hash": "ebe7e4fba7a9d63e2824ff890d9ad0e0d6d235b05441fc306dbf70d27f1b728c" -} diff --git a/core/lib/dal/.sqlx/query-ed39fb08c3ae2927c940d129ffd89268465b346af5da1a58cac850b687e5eb34.json b/core/lib/dal/.sqlx/query-ed39fb08c3ae2927c940d129ffd89268465b346af5da1a58cac850b687e5eb34.json deleted file mode 100644 index 3bffb0af4f04..000000000000 --- a/core/lib/dal/.sqlx/query-ed39fb08c3ae2927c940d129ffd89268465b346af5da1a58cac850b687e5eb34.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n DELETE FROM\n transactions\n WHERE\n initiator_address = $1\n AND nonce = $2\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Bytea", - "Int8" - ] - }, - "nullable": [] - }, - "hash": "ed39fb08c3ae2927c940d129ffd89268465b346af5da1a58cac850b687e5eb34" -} diff --git a/core/lib/dal/.sqlx/query-ededd1048db5b1696c42f8f7073ab318006e8b52570a72a89682435a92ca75f8.json b/core/lib/dal/.sqlx/query-ededd1048db5b1696c42f8f7073ab318006e8b52570a72a89682435a92ca75f8.json deleted file mode 100644 index 372b189a0f3a..000000000000 --- a/core/lib/dal/.sqlx/query-ededd1048db5b1696c42f8f7073ab318006e8b52570a72a89682435a92ca75f8.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE\n vm_runner_bwip\n SET\n time_taken = NOW() - processing_started_at\n WHERE\n l1_batch_number = $1\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8" - ] - }, - "nullable": [] - }, - "hash": "ededd1048db5b1696c42f8f7073ab318006e8b52570a72a89682435a92ca75f8" -} diff --git a/core/lib/dal/.sqlx/query-f012d0922265269746396dac8f25ff66f2c3b2b83d45360818a8782e56aa3d66.json b/core/lib/dal/.sqlx/query-f012d0922265269746396dac8f25ff66f2c3b2b83d45360818a8782e56aa3d66.json new file mode 100644 index 000000000000..9815b5d3895e --- /dev/null +++ b/core/lib/dal/.sqlx/query-f012d0922265269746396dac8f25ff66f2c3b2b83d45360818a8782e56aa3d66.json @@ -0,0 +1,36 @@ +{ + "db_name": "PostgreSQL", + "query": "\n WITH\n sl AS (\n SELECT\n (\n SELECT\n ARRAY[hashed_key, value] AS kv\n FROM\n storage_logs\n WHERE\n storage_logs.miniblock_number = $1\n AND storage_logs.hashed_key >= u.start_key\n AND storage_logs.hashed_key <= u.end_key\n ORDER BY\n storage_logs.hashed_key\n LIMIT\n 1\n )\n FROM\n UNNEST($2::bytea[], $3::bytea[]) AS u (start_key, end_key)\n )\n SELECT\n sl.kv[1] AS \"hashed_key?\",\n sl.kv[2] AS \"value?\",\n initial_writes.index\n FROM\n sl\n LEFT OUTER JOIN initial_writes ON initial_writes.hashed_key = sl.kv[1]\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "hashed_key?", + "type_info": "Bytea" + }, + { + "ordinal": 1, + "name": "value?", + "type_info": "Bytea" + }, + { + "ordinal": 2, + "name": "index", + "type_info": "Int8" + } + ], + "parameters": { + "Left": [ + "Int8", + "ByteaArray", + "ByteaArray" + ] + }, + "nullable": [ + null, + null, + true + ] + }, + "hash": "f012d0922265269746396dac8f25ff66f2c3b2b83d45360818a8782e56aa3d66" +} diff --git a/core/lib/dal/.sqlx/query-f2f852a340c45ff69cbca42d7c592dfb0d28a797bee69872634f3105d2d51996.json b/core/lib/dal/.sqlx/query-f2f852a340c45ff69cbca42d7c592dfb0d28a797bee69872634f3105d2d51996.json new file mode 100644 index 000000000000..11c409c21802 --- /dev/null +++ b/core/lib/dal/.sqlx/query-f2f852a340c45ff69cbca42d7c592dfb0d28a797bee69872634f3105d2d51996.json @@ -0,0 +1,14 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE snapshot_recovery\n SET\n storage_logs_chunks_processed[$1] = TRUE,\n updated_at = NOW()\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int4" + ] + }, + "nullable": [] + }, + "hash": "f2f852a340c45ff69cbca42d7c592dfb0d28a797bee69872634f3105d2d51996" +} diff --git a/core/lib/dal/.sqlx/query-587a6fa944e122d4a045192f4f84ec30c53893af990a3158a7006904c7073b14.json b/core/lib/dal/.sqlx/query-f3a049c7eb0d8903737f02fa154b50ebc862a133734382bad8fdfa3a93d8b743.json similarity index 91% rename from core/lib/dal/.sqlx/query-587a6fa944e122d4a045192f4f84ec30c53893af990a3158a7006904c7073b14.json rename to core/lib/dal/.sqlx/query-f3a049c7eb0d8903737f02fa154b50ebc862a133734382bad8fdfa3a93d8b743.json index 08d724c4112b..6869b4f50b18 100644 --- a/core/lib/dal/.sqlx/query-587a6fa944e122d4a045192f4f84ec30c53893af990a3158a7006904c7073b14.json +++ b/core/lib/dal/.sqlx/query-f3a049c7eb0d8903737f02fa154b50ebc862a133734382bad8fdfa3a93d8b743.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n transactions (\n hash,\n is_priority,\n initiator_address,\n gas_limit,\n max_fee_per_gas,\n gas_per_pubdata_limit,\n data,\n upgrade_id,\n contract_address,\n l1_block_number,\n value,\n paymaster,\n paymaster_input,\n tx_format,\n l1_tx_mint,\n l1_tx_refund_recipient,\n received_at,\n created_at,\n updated_at\n )\n VALUES\n (\n $1,\n TRUE,\n $2,\n $3,\n $4,\n $5,\n $6,\n $7,\n $8,\n $9,\n $10,\n $11,\n $12,\n $13,\n $14,\n $15,\n $16,\n NOW(),\n NOW()\n ) ON CONFLICT (hash) DO NOTHING\n ", + "query": "\n INSERT INTO\n transactions (\n hash,\n is_priority,\n initiator_address,\n gas_limit,\n max_fee_per_gas,\n gas_per_pubdata_limit,\n data,\n upgrade_id,\n contract_address,\n l1_block_number,\n value,\n paymaster,\n paymaster_input,\n tx_format,\n l1_tx_mint,\n l1_tx_refund_recipient,\n received_at,\n created_at,\n updated_at\n )\n VALUES\n (\n $1,\n TRUE,\n $2,\n $3,\n $4,\n $5,\n $6,\n $7,\n $8,\n $9,\n $10,\n $11,\n $12,\n $13,\n $14,\n $15,\n $16,\n NOW(),\n NOW()\n )\n ON CONFLICT (hash) DO NOTHING\n ", "describe": { "columns": [], "parameters": { @@ -25,5 +25,5 @@ }, "nullable": [] }, - "hash": "587a6fa944e122d4a045192f4f84ec30c53893af990a3158a7006904c7073b14" + "hash": "f3a049c7eb0d8903737f02fa154b50ebc862a133734382bad8fdfa3a93d8b743" } diff --git a/core/lib/dal/.sqlx/query-f3c651a3ecd2aefabef802f32c18779128de288484abea33d338c3304dd66e08.json b/core/lib/dal/.sqlx/query-f3c651a3ecd2aefabef802f32c18779128de288484abea33d338c3304dd66e08.json new file mode 100644 index 000000000000..7d5467b4459c --- /dev/null +++ b/core/lib/dal/.sqlx/query-f3c651a3ecd2aefabef802f32c18779128de288484abea33d338c3304dd66e08.json @@ -0,0 +1,16 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE l1_batches\n SET\n eth_commit_tx_id = $1,\n updated_at = NOW()\n WHERE\n number BETWEEN $2 AND $3\n AND eth_commit_tx_id IS NULL\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int4", + "Int8", + "Int8" + ] + }, + "nullable": [] + }, + "hash": "f3c651a3ecd2aefabef802f32c18779128de288484abea33d338c3304dd66e08" +} diff --git a/core/lib/dal/.sqlx/query-f4761be1ff382f2d9bbafc971bf6109696737ae42ee1ee38e99ac07564816b5a.json b/core/lib/dal/.sqlx/query-f4761be1ff382f2d9bbafc971bf6109696737ae42ee1ee38e99ac07564816b5a.json deleted file mode 100644 index 54c41db21a03..000000000000 --- a/core/lib/dal/.sqlx/query-f4761be1ff382f2d9bbafc971bf6109696737ae42ee1ee38e99ac07564816b5a.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE\n transactions\n SET\n l1_batch_number = $3,\n l1_batch_tx_index = data_table.l1_batch_tx_index,\n updated_at = NOW()\n FROM\n (\n SELECT\n UNNEST($1 :: INT []) AS l1_batch_tx_index,\n UNNEST($2 :: bytea []) AS hash\n ) AS data_table\n WHERE\n transactions.hash = data_table.hash\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int4Array", - "ByteaArray", - "Int8" - ] - }, - "nullable": [] - }, - "hash": "f4761be1ff382f2d9bbafc971bf6109696737ae42ee1ee38e99ac07564816b5a" -} diff --git a/core/lib/dal/.sqlx/query-02494e0846398040749aa89c7051a23ccc0a18b0a4c8ee281f5f0ad131d25b33.json b/core/lib/dal/.sqlx/query-f4e7e2dd109aab2714845b028eba780c75468aa36615bcfcf7f7d8ace23cd1aa.json similarity index 82% rename from core/lib/dal/.sqlx/query-02494e0846398040749aa89c7051a23ccc0a18b0a4c8ee281f5f0ad131d25b33.json rename to core/lib/dal/.sqlx/query-f4e7e2dd109aab2714845b028eba780c75468aa36615bcfcf7f7d8ace23cd1aa.json index 3a0d1f28d082..a8e5dbf66d5e 100644 --- a/core/lib/dal/.sqlx/query-02494e0846398040749aa89c7051a23ccc0a18b0a4c8ee281f5f0ad131d25b33.json +++ b/core/lib/dal/.sqlx/query-f4e7e2dd109aab2714845b028eba780c75468aa36615bcfcf7f7d8ace23cd1aa.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT\n PG_LAST_WAL_RECEIVE_LSN() = PG_LAST_WAL_REPLAY_LSN() AS synced,\n EXTRACT(\n SECONDS\n FROM\n NOW() - PG_LAST_XACT_REPLAY_TIMESTAMP()\n ) :: INT AS LAG\n ", + "query": "\n SELECT\n PG_LAST_WAL_RECEIVE_LSN() = PG_LAST_WAL_REPLAY_LSN() AS synced,\n EXTRACT(\n SECONDS\n FROM\n NOW() - PG_LAST_XACT_REPLAY_TIMESTAMP()\n )::INT AS LAG\n ", "describe": { "columns": [ { @@ -22,5 +22,5 @@ null ] }, - "hash": "02494e0846398040749aa89c7051a23ccc0a18b0a4c8ee281f5f0ad131d25b33" + "hash": "f4e7e2dd109aab2714845b028eba780c75468aa36615bcfcf7f7d8ace23cd1aa" } diff --git a/core/lib/dal/.sqlx/query-f6e3b19a18b5ee75805418563b9fd7144b05f75aa304bf217cf14b9625a09e64.json b/core/lib/dal/.sqlx/query-f6e3b19a18b5ee75805418563b9fd7144b05f75aa304bf217cf14b9625a09e64.json deleted file mode 100644 index d39f0b0c6236..000000000000 --- a/core/lib/dal/.sqlx/query-f6e3b19a18b5ee75805418563b9fd7144b05f75aa304bf217cf14b9625a09e64.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE\n transactions\n SET\n hash = data_table.hash,\n signature = data_table.signature,\n gas_limit = data_table.gas_limit,\n max_fee_per_gas = data_table.max_fee_per_gas,\n max_priority_fee_per_gas = data_table.max_priority_fee_per_gas,\n gas_per_pubdata_limit = data_table.gas_per_pubdata_limit,\n input = data_table.input,\n data = data_table.data,\n tx_format = data_table.tx_format,\n miniblock_number = $21,\n index_in_block = data_table.index_in_block,\n error = NULLIF(data_table.error, ''),\n effective_gas_price = data_table.effective_gas_price,\n execution_info = data_table.new_execution_info,\n refunded_gas = data_table.refunded_gas,\n value = data_table.value,\n contract_address = data_table.contract_address,\n paymaster = data_table.paymaster,\n paymaster_input = data_table.paymaster_input,\n in_mempool = FALSE,\n updated_at = NOW()\n FROM\n (\n SELECT\n data_table_temp.*\n FROM\n (\n SELECT\n UNNEST($1 :: bytea []) AS initiator_address,\n UNNEST($2 :: INT []) AS nonce,\n UNNEST($3 :: bytea []) AS hash,\n UNNEST($4 :: bytea []) AS signature,\n UNNEST($5 :: NUMERIC []) AS gas_limit,\n UNNEST($6 :: NUMERIC []) AS max_fee_per_gas,\n UNNEST($7 :: NUMERIC []) AS max_priority_fee_per_gas,\n UNNEST($8 :: NUMERIC []) AS gas_per_pubdata_limit,\n UNNEST($9 :: INT []) AS tx_format,\n UNNEST($10 :: INTEGER []) AS index_in_block,\n UNNEST($11 :: VARCHAR []) AS error,\n UNNEST($12 :: NUMERIC []) AS effective_gas_price,\n UNNEST($13 :: jsonb []) AS new_execution_info,\n UNNEST($14 :: bytea []) AS input,\n UNNEST($15 :: jsonb []) AS data,\n UNNEST($16 :: BIGINT []) AS refunded_gas,\n UNNEST($17 :: NUMERIC []) AS value,\n UNNEST($18 :: bytea []) AS contract_address,\n UNNEST($19 :: bytea []) AS paymaster,\n UNNEST($20 :: bytea []) AS paymaster_input\n ) AS data_table_temp\n JOIN transactions ON transactions.initiator_address = data_table_temp.initiator_address\n AND transactions.nonce = data_table_temp.nonce\n ORDER BY\n transactions.hash\n ) AS data_table\n WHERE\n transactions.initiator_address = data_table.initiator_address\n AND transactions.nonce = data_table.nonce\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "ByteaArray", - "Int4Array", - "ByteaArray", - "ByteaArray", - "NumericArray", - "NumericArray", - "NumericArray", - "NumericArray", - "Int4Array", - "Int4Array", - "VarcharArray", - "NumericArray", - "JsonbArray", - "ByteaArray", - "JsonbArray", - "Int8Array", - "NumericArray", - "ByteaArray", - "ByteaArray", - "ByteaArray", - "Int8" - ] - }, - "nullable": [] - }, - "hash": "f6e3b19a18b5ee75805418563b9fd7144b05f75aa304bf217cf14b9625a09e64" -} diff --git a/core/lib/dal/.sqlx/query-fd4f2f6dbd0e2ab56faa91ff3ebbd48e2dc3cce5f3f40cea31eb3b27c6bff1c1.json b/core/lib/dal/.sqlx/query-fd4f2f6dbd0e2ab56faa91ff3ebbd48e2dc3cce5f3f40cea31eb3b27c6bff1c1.json deleted file mode 100644 index 1ffc2b819479..000000000000 --- a/core/lib/dal/.sqlx/query-fd4f2f6dbd0e2ab56faa91ff3ebbd48e2dc3cce5f3f40cea31eb3b27c6bff1c1.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE\n l1_batches\n SET\n eth_commit_tx_id = $1,\n updated_at = NOW()\n WHERE\n number BETWEEN $2 AND $3\n AND eth_commit_tx_id IS NULL\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int4", - "Int8", - "Int8" - ] - }, - "nullable": [] - }, - "hash": "fd4f2f6dbd0e2ab56faa91ff3ebbd48e2dc3cce5f3f40cea31eb3b27c6bff1c1" -} diff --git a/core/lib/dal/.sqlx/query-fdbf99a779c7c894bd5ab6ac142f01c2abe41c456d85787038ad0b3cc21b59f8.json b/core/lib/dal/.sqlx/query-fdbf99a779c7c894bd5ab6ac142f01c2abe41c456d85787038ad0b3cc21b59f8.json deleted file mode 100644 index 697233abad14..000000000000 --- a/core/lib/dal/.sqlx/query-fdbf99a779c7c894bd5ab6ac142f01c2abe41c456d85787038ad0b3cc21b59f8.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n DELETE FROM\n factory_deps\n WHERE\n miniblock_number > $1\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8" - ] - }, - "nullable": [] - }, - "hash": "fdbf99a779c7c894bd5ab6ac142f01c2abe41c456d85787038ad0b3cc21b59f8" -} diff --git a/core/lib/dal/.sqlx/query-fdffa5841554286a924b217b5885d9ec9b3f628c3a4cf5e10580ea6e5e3a2429.json b/core/lib/dal/.sqlx/query-fdffa5841554286a924b217b5885d9ec9b3f628c3a4cf5e10580ea6e5e3a2429.json new file mode 100644 index 000000000000..bdcf7e5f0371 --- /dev/null +++ b/core/lib/dal/.sqlx/query-fdffa5841554286a924b217b5885d9ec9b3f628c3a4cf5e10580ea6e5e3a2429.json @@ -0,0 +1,14 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE miniblocks\n SET\n l1_batch_number = $1\n WHERE\n l1_batch_number IS NULL\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8" + ] + }, + "nullable": [] + }, + "hash": "fdffa5841554286a924b217b5885d9ec9b3f628c3a4cf5e10580ea6e5e3a2429" +} diff --git a/core/lib/dal/src/base_token_dal.rs b/core/lib/dal/src/base_token_dal.rs index 8155f2987a0e..a8bf51d0c603 100644 --- a/core/lib/dal/src/base_token_dal.rs +++ b/core/lib/dal/src/base_token_dal.rs @@ -21,13 +21,7 @@ impl BaseTokenDal<'_, '_> { let row = sqlx::query!( r#" INSERT INTO - base_token_ratios ( - numerator, - denominator, - ratio_timestamp, - created_at, - updated_at - ) + base_token_ratios (numerator, denominator, ratio_timestamp, created_at, updated_at) VALUES ($1, $2, $3, NOW(), NOW()) RETURNING diff --git a/core/lib/dal/src/blocks_dal.rs b/core/lib/dal/src/blocks_dal.rs index f15b5f7da242..fc2e6cad062d 100644 --- a/core/lib/dal/src/blocks_dal.rs +++ b/core/lib/dal/src/blocks_dal.rs @@ -67,8 +67,7 @@ impl BlocksDal<'_, '_> { ) -> DalResult<()> { sqlx::query!( r#" - UPDATE - consistency_checker_info + UPDATE consistency_checker_info SET last_processed_l1_batch = $1, updated_at = NOW() @@ -464,8 +463,7 @@ impl BlocksDal<'_, '_> { let query = sqlx::query!( r#" - UPDATE - l1_batches + UPDATE l1_batches SET eth_commit_tx_id = $1, updated_at = NOW() @@ -496,8 +494,7 @@ impl BlocksDal<'_, '_> { .with_arg("eth_tx_id", ð_tx_id); let query = sqlx::query!( r#" - UPDATE - l1_batches + UPDATE l1_batches SET eth_prove_tx_id = $1, updated_at = NOW() @@ -530,8 +527,7 @@ impl BlocksDal<'_, '_> { let query = sqlx::query!( r#" - UPDATE - l1_batches + UPDATE l1_batches SET eth_execute_tx_id = $1, updated_at = NOW() @@ -850,8 +846,7 @@ impl BlocksDal<'_, '_> { ) -> DalResult<()> { sqlx::query!( r#" - UPDATE - miniblocks + UPDATE miniblocks SET l1_batch_number = $1 WHERE @@ -873,8 +868,7 @@ impl BlocksDal<'_, '_> { ) -> anyhow::Result<()> { let update_result = sqlx::query!( r#" - UPDATE - l1_batches + UPDATE l1_batches SET hash = $1, rollup_last_leaf_index = $2, @@ -916,8 +910,7 @@ impl BlocksDal<'_, '_> { let update_result = sqlx::query!( r#" - UPDATE - l1_batches + UPDATE l1_batches SET commitment = $1, aux_data_hash = $2, @@ -993,13 +986,10 @@ impl BlocksDal<'_, '_> { sqlx::query!( r#" INSERT INTO - commitments ( - l1_batch_number, - events_queue_commitment, - bootloader_initial_content_commitment - ) + commitments (l1_batch_number, events_queue_commitment, bootloader_initial_content_commitment) VALUES - ($1, $2, $3) ON CONFLICT (l1_batch_number) DO NOTHING + ($1, $2, $3) + ON CONFLICT (l1_batch_number) DO NOTHING "#, i64::from(number.0), commitment_artifacts @@ -1087,9 +1077,7 @@ impl BlocksDal<'_, '_> { number FROM l1_batches - LEFT JOIN eth_txs_history AS commit_tx ON ( - l1_batches.eth_commit_tx_id = commit_tx.eth_tx_id - ) + LEFT JOIN eth_txs_history AS commit_tx ON (l1_batches.eth_commit_tx_id = commit_tx.eth_tx_id) WHERE commit_tx.confirmed_at IS NOT NULL ORDER BY @@ -1181,9 +1169,7 @@ impl BlocksDal<'_, '_> { number FROM l1_batches - LEFT JOIN eth_txs_history AS execute_tx ON ( - l1_batches.eth_execute_tx_id = execute_tx.eth_tx_id - ) + LEFT JOIN eth_txs_history AS execute_tx ON (l1_batches.eth_execute_tx_id = execute_tx.eth_tx_id) WHERE execute_tx.confirmed_at IS NOT NULL ORDER BY @@ -1465,9 +1451,7 @@ impl BlocksDal<'_, '_> { FROM l1_batches JOIN eth_txs ON (l1_batches.eth_commit_tx_id = eth_txs.id) - JOIN eth_txs_history AS commit_tx ON ( - eth_txs.confirmed_eth_tx_history_id = commit_tx.id - ) + JOIN eth_txs_history AS commit_tx ON (eth_txs.confirmed_eth_tx_history_id = commit_tx.id) WHERE commit_tx.confirmed_at IS NOT NULL AND eth_prove_tx_id IS NOT NULL @@ -1892,8 +1876,7 @@ impl BlocksDal<'_, '_> { let l1_batch_number = last_batch_to_keep.map_or(-1, |number| i64::from(number.0)); sqlx::query!( r#" - DELETE FROM - initial_writes + DELETE FROM initial_writes WHERE l1_batch_number > $1 "#, @@ -1918,8 +1901,7 @@ impl BlocksDal<'_, '_> { let l1_batch_number = last_batch_to_keep.map_or(-1, |number| i64::from(number.0)); sqlx::query!( r#" - DELETE FROM - l1_batches + DELETE FROM l1_batches WHERE number > $1 "#, @@ -1948,8 +1930,7 @@ impl BlocksDal<'_, '_> { let block_number = last_l2_block_to_keep.map_or(-1, |number| i64::from(number.0)); sqlx::query!( r#" - DELETE FROM - miniblocks + DELETE FROM miniblocks WHERE number > $1 "#, @@ -1965,8 +1946,7 @@ impl BlocksDal<'_, '_> { async fn delete_logs_inner(&mut self) -> DalResult<()> { sqlx::query!( r#" - DELETE FROM - storage_logs + DELETE FROM storage_logs "#, ) .instrument("delete_logs") @@ -2146,8 +2126,7 @@ impl BlocksDal<'_, '_> { ) -> DalResult<()> { sqlx::query!( r#" - UPDATE - miniblocks + UPDATE miniblocks SET protocol_version = $1 WHERE @@ -2218,8 +2197,7 @@ impl BlocksDal<'_, '_> { ) -> DalResult<()> { sqlx::query!( r#" - UPDATE - l1_batches + UPDATE l1_batches SET protocol_version = $1 WHERE @@ -2244,8 +2222,7 @@ impl BlocksDal<'_, '_> { ) -> DalResult<()> { sqlx::query!( r#" - UPDATE - miniblocks + UPDATE miniblocks SET protocol_version = $1 WHERE @@ -2275,8 +2252,7 @@ impl BlocksDal<'_, '_> { let query = sqlx::query!( r#" - UPDATE - l1_batches + UPDATE l1_batches SET tree_writes = $1 WHERE @@ -2458,15 +2434,14 @@ impl BlocksDal<'_, '_> { .collect::>(); sqlx::query!( r#" - UPDATE - miniblocks + UPDATE miniblocks SET logs_bloom = data.logs_bloom FROM ( SELECT - UNNEST($1 :: BIGINT []) AS number, - UNNEST($2 :: BYTEA []) AS logs_bloom + UNNEST($1::BIGINT[]) AS number, + UNNEST($2::BYTEA[]) AS logs_bloom ) AS data WHERE miniblocks.number = data.number @@ -2492,8 +2467,7 @@ impl BlocksDal<'_, '_> { ) -> DalResult<()> { sqlx::query!( r#" - UPDATE - l1_batches + UPDATE l1_batches SET hash = $1 WHERE @@ -2567,8 +2541,7 @@ impl BlocksDal<'_, '_> { pub async fn drop_l2_block_bloom(&mut self, l2_block_number: L2BlockNumber) -> DalResult<()> { sqlx::query!( r#" - UPDATE - miniblocks + UPDATE miniblocks SET logs_bloom = NULL WHERE diff --git a/core/lib/dal/src/blocks_web3_dal.rs b/core/lib/dal/src/blocks_web3_dal.rs index d49b2f1cdcf8..3d17a919a073 100644 --- a/core/lib/dal/src/blocks_web3_dal.rs +++ b/core/lib/dal/src/blocks_web3_dal.rs @@ -707,18 +707,19 @@ impl BlocksWeb3Dal<'_, '_> { let l1_batch_details: Option = sqlx::query_as!( StorageL1BatchDetails, r#" - WITH mb AS ( - SELECT - l1_gas_price, - l2_fair_gas_price, - fair_pubdata_price - FROM - miniblocks - WHERE - l1_batch_number = $1 - LIMIT - 1 - ) + WITH + mb AS ( + SELECT + l1_gas_price, + l2_fair_gas_price, + fair_pubdata_price + FROM + miniblocks + WHERE + l1_batch_number = $1 + LIMIT + 1 + ) SELECT l1_batches.number, l1_batches.timestamp, diff --git a/core/lib/dal/src/consensus_dal.rs b/core/lib/dal/src/consensus_dal.rs index 2e4d876a2bd6..f2e499ce562e 100644 --- a/core/lib/dal/src/consensus_dal.rs +++ b/core/lib/dal/src/consensus_dal.rs @@ -91,8 +91,7 @@ impl ConsensusDal<'_, '_> { let global_config = s.proto_fmt(want, serde_json::value::Serializer).unwrap(); sqlx::query!( r#" - UPDATE - consensus_replica_state + UPDATE consensus_replica_state SET global_config = $1 "#, @@ -141,8 +140,7 @@ impl ConsensusDal<'_, '_> { .unwrap(); sqlx::query!( r#" - DELETE FROM - l1_batches_consensus + DELETE FROM l1_batches_consensus "# ) .instrument("try_update_genesis#DELETE FROM l1_batches_consensus") @@ -150,8 +148,7 @@ impl ConsensusDal<'_, '_> { .await?; sqlx::query!( r#" - DELETE FROM - miniblocks_consensus + DELETE FROM miniblocks_consensus "# ) .instrument("try_update_genesis#DELETE FROM miniblock_consensus") @@ -159,8 +156,7 @@ impl ConsensusDal<'_, '_> { .await?; sqlx::query!( r#" - DELETE FROM - consensus_replica_state + DELETE FROM consensus_replica_state "# ) .instrument("try_update_genesis#DELETE FROM consensus_replica_state") @@ -256,8 +252,7 @@ impl ConsensusDal<'_, '_> { .unwrap(); sqlx::query!( r#" - UPDATE - consensus_replica_state + UPDATE consensus_replica_state SET state = $1 WHERE @@ -514,7 +509,8 @@ impl ConsensusDal<'_, '_> { INSERT INTO l1_batches_consensus_committees (l1_batch_number, attesters, updated_at) VALUES - ($1, $2, NOW()) ON CONFLICT (l1_batch_number) DO + ($1, $2, NOW()) + ON CONFLICT (l1_batch_number) DO UPDATE SET l1_batch_number = $1, @@ -586,12 +582,7 @@ impl ConsensusDal<'_, '_> { sqlx::query!( r#" INSERT INTO - l1_batches_consensus ( - l1_batch_number, - certificate, - updated_at, - created_at - ) + l1_batches_consensus (l1_batch_number, certificate, updated_at, created_at) VALUES ($1, $2, NOW(), NOW()) "#, diff --git a/core/lib/dal/src/contract_verification_dal.rs b/core/lib/dal/src/contract_verification_dal.rs index 9e3a32f3124a..194d85323b61 100644 --- a/core/lib/dal/src/contract_verification_dal.rs +++ b/core/lib/dal/src/contract_verification_dal.rs @@ -83,21 +83,7 @@ impl ContractVerificationDal<'_, '_> { updated_at ) VALUES - ( - $1, - $2, - $3, - $4, - $5, - $6, - $7, - $8, - $9, - $10, - 'queued', - NOW(), - NOW() - ) + ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, 'queued', NOW(), NOW()) RETURNING id "#, @@ -134,8 +120,7 @@ impl ContractVerificationDal<'_, '_> { let result = sqlx::query_as!( StorageVerificationRequest, r#" - UPDATE - contract_verification_requests + UPDATE contract_verification_requests SET status = 'in_progress', attempts = attempts + 1, @@ -151,13 +136,13 @@ impl ContractVerificationDal<'_, '_> { status = 'queued' OR ( status = 'in_progress' - AND processing_started_at < NOW() - $1 :: INTERVAL + AND processing_started_at < NOW() - $1::INTERVAL ) ORDER BY created_at LIMIT - 1 FOR - UPDATE + 1 + FOR UPDATE SKIP LOCKED ) RETURNING @@ -194,8 +179,7 @@ impl ContractVerificationDal<'_, '_> { sqlx::query!( r#" - UPDATE - contract_verification_requests + UPDATE contract_verification_requests SET status = 'successful', updated_at = NOW() @@ -216,7 +200,8 @@ impl ContractVerificationDal<'_, '_> { INSERT INTO contracts_verification_info (address, verification_info) VALUES - ($1, $2) ON CONFLICT (address) DO + ($1, $2) + ON CONFLICT (address) DO UPDATE SET verification_info = $2 @@ -240,8 +225,7 @@ impl ContractVerificationDal<'_, '_> { ) -> sqlx::Result<()> { sqlx::query!( r#" - UPDATE - contract_verification_requests + UPDATE contract_verification_requests SET status = 'failed', updated_at = NOW(), @@ -437,8 +421,7 @@ impl ContractVerificationDal<'_, '_> { sqlx::query!( r#" - DELETE FROM - compiler_versions + DELETE FROM compiler_versions WHERE compiler = $1 "#, @@ -457,7 +440,8 @@ impl ContractVerificationDal<'_, '_> { NOW(), NOW() FROM - UNNEST($1 :: TEXT []) AS u (VERSION) ON CONFLICT (VERSION, compiler) DO NOTHING + UNNEST($1::TEXT[]) AS u (VERSION) + ON CONFLICT (VERSION, compiler) DO NOTHING "#, &versions, &compiler, diff --git a/core/lib/dal/src/data_availability_dal.rs b/core/lib/dal/src/data_availability_dal.rs index fb5370a5e81c..24048ec4fa19 100644 --- a/core/lib/dal/src/data_availability_dal.rs +++ b/core/lib/dal/src/data_availability_dal.rs @@ -28,15 +28,10 @@ impl DataAvailabilityDal<'_, '_> { let update_result = sqlx::query!( r#" INSERT INTO - data_availability ( - l1_batch_number, - blob_id, - sent_at, - created_at, - updated_at - ) + data_availability (l1_batch_number, blob_id, sent_at, created_at, updated_at) VALUES - ($1, $2, $3, NOW(), NOW()) ON CONFLICT DO NOTHING + ($1, $2, $3, NOW(), NOW()) + ON CONFLICT DO NOTHING "#, i64::from(number.0), blob_id, @@ -98,8 +93,7 @@ impl DataAvailabilityDal<'_, '_> { ) -> DalResult<()> { let update_result = sqlx::query!( r#" - UPDATE - data_availability + UPDATE data_availability SET inclusion_data = $1, updated_at = NOW() diff --git a/core/lib/dal/src/eth_sender_dal.rs b/core/lib/dal/src/eth_sender_dal.rs index f3c73c839470..2266d6fb60f9 100644 --- a/core/lib/dal/src/eth_sender_dal.rs +++ b/core/lib/dal/src/eth_sender_dal.rs @@ -35,9 +35,7 @@ impl EthSenderDal<'_, '_> { FROM eth_txs WHERE - from_addr IS NOT DISTINCT - FROM - $1 -- can't just use equality as NULL != NULL + from_addr IS NOT DISTINCT FROM $1 -- can't just use equality as NULL != NULL AND confirmed_eth_tx_history_id IS NULL AND is_gateway = $2 AND id <= ( @@ -48,9 +46,7 @@ impl EthSenderDal<'_, '_> { JOIN eth_txs ON eth_txs.id = eth_txs_history.eth_tx_id WHERE eth_txs_history.sent_at_block IS NOT NULL - AND eth_txs.from_addr IS NOT DISTINCT - FROM - $1 + AND eth_txs.from_addr IS NOT DISTINCT FROM $1 AND is_gateway = $2 ) ORDER BY @@ -171,9 +167,7 @@ impl EthSenderDal<'_, '_> { FROM eth_txs WHERE - from_addr IS NOT DISTINCT - FROM - $2 -- can't just use equality as NULL != NULL + from_addr IS NOT DISTINCT FROM $2 -- can't just use equality as NULL != NULL AND is_gateway = $3 AND id > ( SELECT @@ -183,9 +177,7 @@ impl EthSenderDal<'_, '_> { JOIN eth_txs ON eth_txs.id = eth_txs_history.eth_tx_id WHERE eth_txs_history.sent_at_block IS NOT NULL - AND eth_txs.from_addr IS NOT DISTINCT - FROM - $2 + AND eth_txs.from_addr IS NOT DISTINCT FROM $2 AND is_gateway = $3 ) ORDER BY @@ -311,7 +303,8 @@ impl EthSenderDal<'_, '_> { sent_at ) VALUES - ($1, $2, $3, $4, $5, NOW(), NOW(), $6, $7, NOW()) ON CONFLICT (tx_hash) DO NOTHING + ($1, $2, $3, $4, $5, NOW(), NOW(), $6, $7, NOW()) + ON CONFLICT (tx_hash) DO NOTHING RETURNING id "#, @@ -335,8 +328,7 @@ impl EthSenderDal<'_, '_> { ) -> sqlx::Result<()> { sqlx::query!( r#" - UPDATE - eth_txs_history + UPDATE eth_txs_history SET sent_at_block = $2, sent_at = NOW() @@ -355,8 +347,7 @@ impl EthSenderDal<'_, '_> { pub async fn remove_tx_history(&mut self, eth_txs_history_id: u32) -> sqlx::Result<()> { sqlx::query!( r#" - DELETE FROM - eth_txs_history + DELETE FROM eth_txs_history WHERE id = $1 "#, @@ -378,8 +369,7 @@ impl EthSenderDal<'_, '_> { let tx_hash = format!("{:#x}", tx_hash); let ids = sqlx::query!( r#" - UPDATE - eth_txs_history + UPDATE eth_txs_history SET updated_at = NOW(), confirmed_at = NOW() @@ -396,8 +386,7 @@ impl EthSenderDal<'_, '_> { sqlx::query!( r#" - UPDATE - eth_txs + UPDATE eth_txs SET gas_used = $1, confirmed_eth_tx_history_id = $2 @@ -418,8 +407,7 @@ impl EthSenderDal<'_, '_> { pub async fn set_chain_id(&mut self, eth_tx_id: u32, chain_id: u64) -> anyhow::Result<()> { sqlx::query!( r#" - UPDATE - eth_txs + UPDATE eth_txs SET chain_id = $1 WHERE @@ -525,8 +513,7 @@ impl EthSenderDal<'_, '_> { // Mark general entry as confirmed. sqlx::query!( r#" - UPDATE - eth_txs + UPDATE eth_txs SET confirmed_eth_tx_history_id = $1 WHERE @@ -649,9 +636,7 @@ impl EthSenderDal<'_, '_> { FROM eth_txs WHERE - from_addr IS NOT DISTINCT - FROM - $1 -- can't just use equality as NULL != NULL\ + from_addr IS NOT DISTINCT FROM $1 -- can't just use equality as NULL != NULL\ AND is_gateway = $2 ORDER BY id DESC @@ -670,8 +655,7 @@ impl EthSenderDal<'_, '_> { pub async fn mark_failed_transaction(&mut self, eth_tx_id: u32) -> sqlx::Result<()> { sqlx::query!( r#" - UPDATE - eth_txs + UPDATE eth_txs SET has_failed = TRUE WHERE @@ -704,8 +688,7 @@ impl EthSenderDal<'_, '_> { pub async fn clear_failed_transactions(&mut self) -> sqlx::Result<()> { sqlx::query!( r#" - DELETE FROM - eth_txs + DELETE FROM eth_txs WHERE id >= ( SELECT @@ -725,8 +708,7 @@ impl EthSenderDal<'_, '_> { pub async fn delete_eth_txs(&mut self, last_batch_to_keep: L1BatchNumber) -> sqlx::Result<()> { sqlx::query!( r#" - DELETE FROM - eth_txs + DELETE FROM eth_txs WHERE id IN ( ( diff --git a/core/lib/dal/src/eth_watcher_dal.rs b/core/lib/dal/src/eth_watcher_dal.rs index efdbb09803e7..3220868decf6 100644 --- a/core/lib/dal/src/eth_watcher_dal.rs +++ b/core/lib/dal/src/eth_watcher_dal.rs @@ -30,8 +30,8 @@ impl EthWatcherDal<'_, '_> { FROM processed_events WHERE - TYPE = $1 - AND chain_id = $2 + TYPE = $1 + AND chain_id = $2 "#, event_type as EventType, chain_id.0 as i64 @@ -78,13 +78,12 @@ impl EthWatcherDal<'_, '_> { ) -> DalResult<()> { sqlx::query!( r#" - UPDATE - processed_events + UPDATE processed_events SET next_block_to_process = $3 WHERE - TYPE = $1 - AND chain_id = $2 + TYPE = $1 + AND chain_id = $2 "#, event_type as EventType, chain_id.0 as i64, diff --git a/core/lib/dal/src/events_dal.rs b/core/lib/dal/src/events_dal.rs index abd2262c52dd..4050acf7135b 100644 --- a/core/lib/dal/src/events_dal.rs +++ b/core/lib/dal/src/events_dal.rs @@ -105,8 +105,7 @@ impl EventsDal<'_, '_> { pub async fn roll_back_events(&mut self, block_number: L2BlockNumber) -> DalResult<()> { sqlx::query!( r#" - DELETE FROM - events + DELETE FROM events WHERE miniblock_number > $1 "#, @@ -186,8 +185,7 @@ impl EventsDal<'_, '_> { pub async fn roll_back_l2_to_l1_logs(&mut self, block_number: L2BlockNumber) -> DalResult<()> { sqlx::query!( r#" - DELETE FROM - l2_to_l1_logs + DELETE FROM l2_to_l1_logs WHERE miniblock_number > $1 "#, @@ -218,14 +216,14 @@ impl EventsDal<'_, '_> { topic3, topic4, value, - NULL :: bytea AS "block_hash", - NULL :: BIGINT AS "l1_batch_number?", + NULL::bytea AS "block_hash", + NULL::BIGINT AS "l1_batch_number?", miniblock_number, tx_hash, tx_index_in_block, event_index_in_block, event_index_in_tx, - NULL :: BIGINT AS "block_timestamp?" + NULL::BIGINT AS "block_timestamp?" FROM events WHERE @@ -310,7 +308,7 @@ impl EventsDal<'_, '_> { log_index_in_miniblock, log_index_in_tx, tx_hash, - NULL :: BIGINT AS "l1_batch_number?", + NULL::BIGINT AS "l1_batch_number?", shard_id, is_service, tx_index_in_miniblock, diff --git a/core/lib/dal/src/events_web3_dal.rs b/core/lib/dal/src/events_web3_dal.rs index 5f9c895d03ce..fc21cc36460c 100644 --- a/core/lib/dal/src/events_web3_dal.rs +++ b/core/lib/dal/src/events_web3_dal.rs @@ -188,27 +188,28 @@ impl EventsWeb3Dal<'_, '_> { let db_logs: Vec = sqlx::query_as!( StorageWeb3Log, r#" - WITH events_select AS ( - SELECT - address, - topic1, - topic2, - topic3, - topic4, - value, - miniblock_number, - tx_hash, - tx_index_in_block, - event_index_in_block, - event_index_in_tx - FROM - events - WHERE - miniblock_number > $1 - ORDER BY - miniblock_number ASC, - event_index_in_block ASC - ) + WITH + events_select AS ( + SELECT + address, + topic1, + topic2, + topic3, + topic4, + value, + miniblock_number, + tx_hash, + tx_index_in_block, + event_index_in_block, + event_index_in_tx + FROM + events + WHERE + miniblock_number > $1 + ORDER BY + miniblock_number ASC, + event_index_in_block ASC + ) SELECT miniblocks.hash AS "block_hash?", address AS "address!", diff --git a/core/lib/dal/src/factory_deps_dal.rs b/core/lib/dal/src/factory_deps_dal.rs index dd699f613fed..02ce32306cfb 100644 --- a/core/lib/dal/src/factory_deps_dal.rs +++ b/core/lib/dal/src/factory_deps_dal.rs @@ -31,13 +31,7 @@ impl FactoryDepsDal<'_, '_> { sqlx::query!( r#" INSERT INTO - factory_deps ( - bytecode_hash, - bytecode, - miniblock_number, - created_at, - updated_at - ) + factory_deps (bytecode_hash, bytecode, miniblock_number, created_at, updated_at) SELECT u.bytecode_hash, u.bytecode, @@ -45,7 +39,8 @@ impl FactoryDepsDal<'_, '_> { NOW(), NOW() FROM - UNNEST($1 :: bytea [], $2 :: bytea []) AS u (bytecode_hash, bytecode) ON CONFLICT (bytecode_hash) DO NOTHING + UNNEST($1::bytea[], $2::bytea[]) AS u (bytecode_hash, bytecode) + ON CONFLICT (bytecode_hash) DO NOTHING "#, &bytecode_hashes as &[&[u8]], &bytecodes as &[&[u8]], @@ -188,8 +183,7 @@ impl FactoryDepsDal<'_, '_> { pub async fn roll_back_factory_deps(&mut self, block_number: L2BlockNumber) -> DalResult<()> { sqlx::query!( r#" - DELETE FROM - factory_deps + DELETE FROM factory_deps WHERE miniblock_number > $1 "#, diff --git a/core/lib/dal/src/proof_generation_dal.rs b/core/lib/dal/src/proof_generation_dal.rs index 18899111a0c3..dada6c69ed34 100644 --- a/core/lib/dal/src/proof_generation_dal.rs +++ b/core/lib/dal/src/proof_generation_dal.rs @@ -44,8 +44,7 @@ impl ProofGenerationDal<'_, '_> { let processing_timeout = pg_interval_from_duration(processing_timeout); let result: Option = sqlx::query!( r#" - UPDATE - proof_generation_details + UPDATE proof_generation_details SET status = 'picked_by_prover', updated_at = NOW(), @@ -68,7 +67,7 @@ impl ProofGenerationDal<'_, '_> { ) OR ( status = 'picked_by_prover' - AND prover_taken_at < NOW() - $1 :: INTERVAL + AND prover_taken_at < NOW() - $1::INTERVAL ) ORDER BY l1_batch_number ASC @@ -118,8 +117,7 @@ impl ProofGenerationDal<'_, '_> { let batch_number = i64::from(l1_batch_number.0); sqlx::query!( r#" - UPDATE - proof_generation_details + UPDATE proof_generation_details SET status = 'unpicked', updated_at = NOW() @@ -144,8 +142,7 @@ impl ProofGenerationDal<'_, '_> { let batch_number = i64::from(batch_number.0); let query = sqlx::query!( r#" - UPDATE - proof_generation_details + UPDATE proof_generation_details SET status = 'generated', proof_blob_url = $1, @@ -183,8 +180,7 @@ impl ProofGenerationDal<'_, '_> { let batch_number = i64::from(batch_number.0); let query = sqlx::query!( r#" - UPDATE - proof_generation_details + UPDATE proof_generation_details SET vm_run_data_blob_url = $1, updated_at = NOW() @@ -221,8 +217,7 @@ impl ProofGenerationDal<'_, '_> { let batch_number = i64::from(batch_number.0); let query = sqlx::query!( r#" - UPDATE - proof_generation_details + UPDATE proof_generation_details SET proof_gen_data_blob_url = $1, updated_at = NOW() @@ -261,7 +256,8 @@ impl ProofGenerationDal<'_, '_> { INSERT INTO proof_generation_details (l1_batch_number, status, created_at, updated_at) VALUES - ($1, 'unpicked', NOW(), NOW()) ON CONFLICT (l1_batch_number) DO NOTHING + ($1, 'unpicked', NOW(), NOW()) + ON CONFLICT (l1_batch_number) DO NOTHING "#, i64::from(l1_batch_number.0), ) @@ -288,8 +284,7 @@ impl ProofGenerationDal<'_, '_> { let l1_batch_number = i64::from(block_number.0); let query = sqlx::query!( r#" - UPDATE - proof_generation_details + UPDATE proof_generation_details SET status = $1, updated_at = NOW() diff --git a/core/lib/dal/src/protocol_versions_dal.rs b/core/lib/dal/src/protocol_versions_dal.rs index 52dfc26ac9f9..8cb5094fd49e 100644 --- a/core/lib/dal/src/protocol_versions_dal.rs +++ b/core/lib/dal/src/protocol_versions_dal.rs @@ -49,7 +49,8 @@ impl ProtocolVersionsDal<'_, '_> { created_at ) VALUES - ($1, $2, $3, $4, $5, NOW()) ON CONFLICT DO NOTHING + ($1, $2, $3, $4, $5, NOW()) + ON CONFLICT DO NOTHING "#, version.minor as i32, timestamp as i64, @@ -72,7 +73,8 @@ impl ProtocolVersionsDal<'_, '_> { INSERT INTO protocol_patches (minor, patch, snark_wrapper_vk_hash, created_at) VALUES - ($1, $2, $3, NOW()) ON CONFLICT DO NOTHING + ($1, $2, $3, NOW()) + ON CONFLICT DO NOTHING "#, version.minor as i32, version.patch.0 as i32, @@ -121,8 +123,7 @@ impl ProtocolVersionsDal<'_, '_> { ) -> DalResult<()> { sqlx::query!( r#" - UPDATE - protocol_versions + UPDATE protocol_versions SET upgrade_tx_hash = $1 WHERE diff --git a/core/lib/dal/src/pruning_dal/mod.rs b/core/lib/dal/src/pruning_dal/mod.rs index 4ce0ec518eed..0d1584ebba36 100644 --- a/core/lib/dal/src/pruning_dal/mod.rs +++ b/core/lib/dal/src/pruning_dal/mod.rs @@ -44,39 +44,41 @@ impl PruningDal<'_, '_> { pub async fn get_pruning_info(&mut self) -> DalResult { let pruning_info = sqlx::query!( r#" - WITH soft AS ( - SELECT - pruned_l1_batch, - pruned_miniblock - FROM - pruning_log - WHERE + WITH + soft AS ( + SELECT + pruned_l1_batch, + pruned_miniblock + FROM + pruning_log + WHERE TYPE = 'Soft' - ORDER BY - pruned_l1_batch DESC - LIMIT - 1 - ), hard AS ( - SELECT - pruned_l1_batch, - pruned_miniblock - FROM - pruning_log - WHERE + ORDER BY + pruned_l1_batch DESC + LIMIT + 1 + ), + hard AS ( + SELECT + pruned_l1_batch, + pruned_miniblock + FROM + pruning_log + WHERE TYPE = 'Hard' - ORDER BY - pruned_l1_batch DESC - LIMIT - 1 - ) + ORDER BY + pruned_l1_batch DESC + LIMIT + 1 + ) SELECT soft.pruned_l1_batch AS last_soft_pruned_l1_batch, soft.pruned_miniblock AS last_soft_pruned_miniblock, hard.pruned_l1_batch AS last_hard_pruned_l1_batch, hard.pruned_miniblock AS last_hard_pruned_miniblock FROM - soft FULL - JOIN hard ON TRUE + soft + FULL JOIN hard ON TRUE "# ) .map(|row| PruningInfo { @@ -200,8 +202,7 @@ impl PruningDal<'_, '_> { ) -> DalResult { let execution_result = sqlx::query!( r#" - DELETE FROM - events + DELETE FROM events WHERE miniblock_number BETWEEN $1 AND $2 "#, @@ -222,8 +223,7 @@ impl PruningDal<'_, '_> { ) -> DalResult { let execution_result = sqlx::query!( r#" - DELETE FROM - l2_to_l1_logs + DELETE FROM l2_to_l1_logs WHERE miniblock_number BETWEEN $1 AND $2 "#, @@ -247,8 +247,7 @@ impl PruningDal<'_, '_> { ) -> DalResult { let execution_result = sqlx::query!( r#" - DELETE FROM - call_traces + DELETE FROM call_traces WHERE tx_hash IN ( SELECT @@ -284,8 +283,7 @@ impl PruningDal<'_, '_> { ) -> DalResult { let execution_result = sqlx::query!( r#" - UPDATE - transactions + UPDATE transactions SET input = NULL, data = '{}', @@ -320,32 +318,26 @@ impl PruningDal<'_, '_> { // Using more sophisticated queries leads to fluctuating performance due to unpredictable indexes being used. let execution_result = sqlx::query!( r#" - WITH new_logs AS MATERIALIZED ( - SELECT - DISTINCT ON (hashed_key) hashed_key, - miniblock_number, - operation_number - FROM - storage_logs - WHERE - miniblock_number BETWEEN $1 AND $2 - ORDER BY - hashed_key, - miniblock_number DESC, - operation_number DESC - ) - DELETE FROM - storage_logs USING new_logs + WITH + new_logs AS MATERIALIZED ( + SELECT DISTINCT + ON (hashed_key) hashed_key, + miniblock_number, + operation_number + FROM + storage_logs + WHERE + miniblock_number BETWEEN $1 AND $2 + ORDER BY + hashed_key, + miniblock_number DESC, + operation_number DESC + ) + DELETE FROM storage_logs USING new_logs WHERE storage_logs.hashed_key = new_logs.hashed_key AND storage_logs.miniblock_number <= $2 - AND ( - storage_logs.miniblock_number, - storage_logs.operation_number - ) < ( - new_logs.miniblock_number, - new_logs.operation_number - ) + AND (storage_logs.miniblock_number, storage_logs.operation_number) < (new_logs.miniblock_number, new_logs.operation_number) "#, i64::from(l2_blocks_to_prune.start().0), i64::from(l2_blocks_to_prune.end().0) @@ -361,8 +353,7 @@ impl PruningDal<'_, '_> { async fn delete_l1_batches(&mut self, last_l1_batch_to_prune: L1BatchNumber) -> DalResult { let execution_result = sqlx::query!( r#" - DELETE FROM - l1_batches + DELETE FROM l1_batches WHERE number <= $1 "#, @@ -379,8 +370,7 @@ impl PruningDal<'_, '_> { async fn delete_l2_blocks(&mut self, last_l2_block_to_prune: L2BlockNumber) -> DalResult { let execution_result = sqlx::query!( r#" - DELETE FROM - miniblocks + DELETE FROM miniblocks WHERE number <= $1 "#, diff --git a/core/lib/dal/src/snapshot_recovery_dal.rs b/core/lib/dal/src/snapshot_recovery_dal.rs index 512411f56121..0b0c0e1735fd 100644 --- a/core/lib/dal/src/snapshot_recovery_dal.rs +++ b/core/lib/dal/src/snapshot_recovery_dal.rs @@ -53,10 +53,9 @@ impl SnapshotRecoveryDal<'_, '_> { pub async fn mark_storage_logs_chunk_as_processed(&mut self, chunk_id: u64) -> DalResult<()> { sqlx::query!( r#" - UPDATE - snapshot_recovery + UPDATE snapshot_recovery SET - storage_logs_chunks_processed [$1] = TRUE, + storage_logs_chunks_processed[$1] = TRUE, updated_at = NOW() "#, chunk_id as i32 + 1 diff --git a/core/lib/dal/src/snapshots_creator_dal.rs b/core/lib/dal/src/snapshots_creator_dal.rs index 0a9062640cf2..b076240173b1 100644 --- a/core/lib/dal/src/snapshots_creator_dal.rs +++ b/core/lib/dal/src/snapshots_creator_dal.rs @@ -64,9 +64,7 @@ impl SnapshotsCreatorDal<'_, '_> { ( SELECT hashed_key, - MAX( - ARRAY [miniblock_number, operation_number] :: INT [] - ) AS op + MAX(ARRAY[miniblock_number, operation_number]::INT[]) AS op FROM storage_logs WHERE @@ -79,8 +77,8 @@ impl SnapshotsCreatorDal<'_, '_> { hashed_key ) AS keys INNER JOIN storage_logs ON keys.hashed_key = storage_logs.hashed_key - AND storage_logs.miniblock_number = keys.op [1] - AND storage_logs.operation_number = keys.op [2] + AND storage_logs.miniblock_number = keys.op[1] + AND storage_logs.operation_number = keys.op[2] INNER JOIN initial_writes ON keys.hashed_key = initial_writes.hashed_key WHERE initial_writes.l1_batch_number <= $2 @@ -132,9 +130,7 @@ impl SnapshotsCreatorDal<'_, '_> { ( SELECT hashed_key, - MAX( - ARRAY [miniblock_number, operation_number] :: INT [] - ) AS op + MAX(ARRAY[miniblock_number, operation_number]::INT[]) AS op FROM storage_logs WHERE @@ -147,8 +143,8 @@ impl SnapshotsCreatorDal<'_, '_> { hashed_key ) AS keys INNER JOIN storage_logs ON keys.hashed_key = storage_logs.hashed_key - AND storage_logs.miniblock_number = keys.op [1] - AND storage_logs.operation_number = keys.op [2] + AND storage_logs.miniblock_number = keys.op[1] + AND storage_logs.operation_number = keys.op[2] INNER JOIN initial_writes ON keys.hashed_key = initial_writes.hashed_key WHERE initial_writes.l1_batch_number <= $2 diff --git a/core/lib/dal/src/snapshots_dal.rs b/core/lib/dal/src/snapshots_dal.rs index 11e9204dc39c..009efd3da078 100644 --- a/core/lib/dal/src/snapshots_dal.rs +++ b/core/lib/dal/src/snapshots_dal.rs @@ -63,14 +63,7 @@ impl SnapshotsDal<'_, '_> { updated_at ) VALUES - ( - $1, - $2, - ARRAY_FILL('' :: TEXT, ARRAY [$3::INTEGER]), - $4, - NOW(), - NOW() - ) + ($1, $2, ARRAY_FILL(''::TEXT, ARRAY[$3::INTEGER]), $4, NOW(), NOW()) "#, version as i32, l1_batch_number.0 as i32, @@ -94,10 +87,9 @@ impl SnapshotsDal<'_, '_> { ) -> DalResult<()> { sqlx::query!( r#" - UPDATE - snapshots + UPDATE snapshots SET - storage_logs_filepaths [$2] = $3, + storage_logs_filepaths[$2] = $3, updated_at = NOW() WHERE l1_batch_number = $1 @@ -123,7 +115,7 @@ impl SnapshotsDal<'_, '_> { FROM snapshots WHERE - NOT ('' :: TEXT = ANY (storage_logs_filepaths)) + NOT (''::TEXT = ANY (storage_logs_filepaths)) ORDER BY l1_batch_number DESC "# @@ -202,8 +194,7 @@ impl SnapshotsDal<'_, '_> { sqlx::query_as!( StorageSnapshotMetadata, r#" - DELETE FROM - snapshots + DELETE FROM snapshots WHERE l1_batch_number > $1 RETURNING diff --git a/core/lib/dal/src/storage_logs_dal.rs b/core/lib/dal/src/storage_logs_dal.rs index 89f8773dd11f..d5de66037b49 100644 --- a/core/lib/dal/src/storage_logs_dal.rs +++ b/core/lib/dal/src/storage_logs_dal.rs @@ -186,8 +186,8 @@ impl StorageLogsDal<'_, '_> { ) -> DalResult> { let rows = sqlx::query!( r#" - SELECT - DISTINCT hashed_key + SELECT DISTINCT + hashed_key FROM storage_logs WHERE @@ -211,8 +211,7 @@ impl StorageLogsDal<'_, '_> { pub async fn roll_back_storage_logs(&mut self, block_number: L2BlockNumber) -> DalResult<()> { sqlx::query!( r#" - DELETE FROM - storage_logs + DELETE FROM storage_logs WHERE miniblock_number > $1 "#, @@ -290,8 +289,8 @@ impl StorageLogsDal<'_, '_> { // this value will equal `FAILED_CONTRACT_DEPLOYMENT_BYTECODE_HASH`, so that they can be easily filtered. let rows = sqlx::query!( r#" - SELECT - DISTINCT ON (hashed_key) hashed_key, + SELECT DISTINCT + ON (hashed_key) hashed_key, miniblock_number, value FROM @@ -544,7 +543,7 @@ impl StorageLogsDal<'_, '_> { FROM initial_writes WHERE - hashed_key = ANY ($1 :: bytea []) + hashed_key = ANY ($1::bytea[]) "#, &hashed_keys as &[&[u8]], ) @@ -622,7 +621,7 @@ impl StorageLogsDal<'_, '_> { 1 ) AS "value?" FROM - UNNEST($1 :: bytea []) AS u (hashed_key) + UNNEST($1::bytea[]) AS u (hashed_key) "#, &hashed_keys as &[&[u8]], i64::from(l2_block_number.0) @@ -717,32 +716,33 @@ impl StorageLogsDal<'_, '_> { .unzip(); let rows = sqlx::query!( r#" - WITH sl AS ( - SELECT - ( - SELECT - ARRAY [hashed_key, value] AS kv - FROM - storage_logs - WHERE - storage_logs.miniblock_number = $1 - AND storage_logs.hashed_key >= u.start_key - AND storage_logs.hashed_key <= u.end_key - ORDER BY - storage_logs.hashed_key - LIMIT - 1 - ) - FROM - UNNEST($2 :: bytea [], $3 :: bytea []) AS u (start_key, end_key) - ) + WITH + sl AS ( + SELECT + ( + SELECT + ARRAY[hashed_key, value] AS kv + FROM + storage_logs + WHERE + storage_logs.miniblock_number = $1 + AND storage_logs.hashed_key >= u.start_key + AND storage_logs.hashed_key <= u.end_key + ORDER BY + storage_logs.hashed_key + LIMIT + 1 + ) + FROM + UNNEST($2::bytea[], $3::bytea[]) AS u (start_key, end_key) + ) SELECT - sl.kv [1] AS "hashed_key?", - sl.kv [2] AS "value?", + sl.kv[1] AS "hashed_key?", + sl.kv[2] AS "value?", initial_writes.index FROM sl - LEFT OUTER JOIN initial_writes ON initial_writes.hashed_key = sl.kv [1] + LEFT OUTER JOIN initial_writes ON initial_writes.hashed_key = sl.kv[1] "#, i64::from(l2_block_number.0), &start_keys as &[&[u8]], @@ -782,8 +782,8 @@ impl StorageLogsDal<'_, '_> { INNER JOIN initial_writes ON storage_logs.hashed_key = initial_writes.hashed_key WHERE storage_logs.miniblock_number = $1 - AND storage_logs.hashed_key >= $2 :: bytea - AND storage_logs.hashed_key <= $3 :: bytea + AND storage_logs.hashed_key >= $2::bytea + AND storage_logs.hashed_key <= $3::bytea ORDER BY storage_logs.hashed_key "#, diff --git a/core/lib/dal/src/storage_logs_dedup_dal.rs b/core/lib/dal/src/storage_logs_dedup_dal.rs index 3b464e596120..02049f3e9ade 100644 --- a/core/lib/dal/src/storage_logs_dedup_dal.rs +++ b/core/lib/dal/src/storage_logs_dedup_dal.rs @@ -93,13 +93,7 @@ impl StorageLogsDedupDal<'_, '_> { sqlx::query!( r#" INSERT INTO - initial_writes ( - hashed_key, - INDEX, - l1_batch_number, - created_at, - updated_at - ) + initial_writes (hashed_key, INDEX, l1_batch_number, created_at, updated_at) SELECT u.hashed_key, u.index, @@ -107,7 +101,7 @@ impl StorageLogsDedupDal<'_, '_> { NOW(), NOW() FROM - UNNEST($1 :: bytea [], $2 :: BIGINT []) AS u (hashed_key, INDEX) + UNNEST($1::bytea[], $2::BIGINT[]) AS u (hashed_key, INDEX) "#, &hashed_keys as &[&[u8]], &indices, diff --git a/core/lib/dal/src/system_dal.rs b/core/lib/dal/src/system_dal.rs index 9d9b3ddd23b2..f6dda53b1584 100644 --- a/core/lib/dal/src/system_dal.rs +++ b/core/lib/dal/src/system_dal.rs @@ -31,7 +31,7 @@ impl SystemDal<'_, '_> { SECONDS FROM NOW() - PG_LAST_XACT_REPLAY_TIMESTAMP() - ) :: INT AS LAG + )::INT AS LAG "# ) .instrument("get_replication_lag") @@ -49,18 +49,10 @@ impl SystemDal<'_, '_> { r#" SELECT table_name, - PG_TABLE_SIZE( - ('public.' || QUOTE_IDENT(table_name)) :: regclass - ) AS table_size, - PG_INDEXES_SIZE( - ('public.' || QUOTE_IDENT(table_name)) :: regclass - ) AS indexes_size, - PG_RELATION_SIZE( - ('public.' || QUOTE_IDENT(table_name)) :: regclass - ) AS relation_size, - PG_TOTAL_RELATION_SIZE( - ('public.' || QUOTE_IDENT(table_name)) :: regclass - ) AS total_size + PG_TABLE_SIZE(('public.' || QUOTE_IDENT(table_name))::regclass) AS table_size, + PG_INDEXES_SIZE(('public.' || QUOTE_IDENT(table_name))::regclass) AS indexes_size, + PG_RELATION_SIZE(('public.' || QUOTE_IDENT(table_name))::regclass) AS relation_size, + PG_TOTAL_RELATION_SIZE(('public.' || QUOTE_IDENT(table_name))::regclass) AS total_size FROM information_schema.tables WHERE diff --git a/core/lib/dal/src/tee_proof_generation_dal.rs b/core/lib/dal/src/tee_proof_generation_dal.rs index 77dda68f76a0..cc6b87a07aca 100644 --- a/core/lib/dal/src/tee_proof_generation_dal.rs +++ b/core/lib/dal/src/tee_proof_generation_dal.rs @@ -41,8 +41,7 @@ impl TeeProofGenerationDal<'_, '_> { let min_batch_number = min_batch_number.map_or(0, |num| i64::from(num.0)); let query = sqlx::query!( r#" - UPDATE - tee_proof_generation_details + UPDATE tee_proof_generation_details SET status = $1, updated_at = NOW(), @@ -61,15 +60,15 @@ impl TeeProofGenerationDal<'_, '_> { proofs.status = $4 OR ( proofs.status = $1 - AND proofs.prover_taken_at < NOW() - $5 :: INTERVAL + AND proofs.prover_taken_at < NOW() - $5::INTERVAL ) ) AND proofs.l1_batch_number >= $6 ORDER BY l1_batch_number ASC LIMIT - 1 FOR - UPDATE + 1 + FOR UPDATE SKIP LOCKED ) RETURNING @@ -103,8 +102,7 @@ impl TeeProofGenerationDal<'_, '_> { let batch_number = i64::from(l1_batch_number.0); sqlx::query!( r#" - UPDATE - tee_proof_generation_details + UPDATE tee_proof_generation_details SET status = $1, updated_at = NOW() @@ -136,8 +134,7 @@ impl TeeProofGenerationDal<'_, '_> { let batch_number = i64::from(batch_number.0); let query = sqlx::query!( r#" - UPDATE - tee_proof_generation_details + UPDATE tee_proof_generation_details SET tee_type = $1, status = $2, @@ -186,15 +183,10 @@ impl TeeProofGenerationDal<'_, '_> { let query = sqlx::query!( r#" INSERT INTO - tee_proof_generation_details ( - l1_batch_number, - tee_type, - status, - created_at, - updated_at - ) + tee_proof_generation_details (l1_batch_number, tee_type, status, created_at, updated_at) VALUES - ($1, $2, $3, NOW(), NOW()) ON CONFLICT (l1_batch_number, tee_type) DO NOTHING + ($1, $2, $3, NOW(), NOW()) + ON CONFLICT (l1_batch_number, tee_type) DO NOTHING "#, batch_number, tee_type.to_string(), @@ -218,7 +210,8 @@ impl TeeProofGenerationDal<'_, '_> { INSERT INTO tee_attestations (pubkey, attestation) VALUES - ($1, $2) ON CONFLICT (pubkey) DO NOTHING + ($1, $2) + ON CONFLICT (pubkey) DO NOTHING "#, pubkey, attestation diff --git a/core/lib/dal/src/tee_verifier_input_producer_dal.rs b/core/lib/dal/src/tee_verifier_input_producer_dal.rs index 56e0b2d832fc..4a178fd52253 100644 --- a/core/lib/dal/src/tee_verifier_input_producer_dal.rs +++ b/core/lib/dal/src/tee_verifier_input_producer_dal.rs @@ -57,7 +57,8 @@ impl TeeVerifierInputProducerDal<'_, '_> { INSERT INTO tee_verifier_input_producer_jobs (l1_batch_number, status, created_at, updated_at) VALUES - ($1, $2, NOW(), NOW()) ON CONFLICT (l1_batch_number) DO NOTHING + ($1, $2, NOW(), NOW()) + ON CONFLICT (l1_batch_number) DO NOTHING "#, i64::from(l1_batch_number.0), TeeVerifierInputProducerJobStatus::Queued as TeeVerifierInputProducerJobStatus, @@ -76,8 +77,7 @@ impl TeeVerifierInputProducerDal<'_, '_> { ) -> DalResult> { let l1_batch_number = sqlx::query!( r#" - UPDATE - tee_verifier_input_producer_jobs + UPDATE tee_verifier_input_producer_jobs SET status = $1, attempts = attempts + 1, @@ -93,7 +93,7 @@ impl TeeVerifierInputProducerDal<'_, '_> { status = $2 OR ( status = $1 - AND processing_started_at < NOW() - $4 :: INTERVAL + AND processing_started_at < NOW() - $4::INTERVAL ) OR ( status = $3 @@ -102,8 +102,8 @@ impl TeeVerifierInputProducerDal<'_, '_> { ORDER BY l1_batch_number ASC LIMIT - 1 FOR - UPDATE + 1 + FOR UPDATE SKIP LOCKED ) RETURNING @@ -156,8 +156,7 @@ impl TeeVerifierInputProducerDal<'_, '_> { ) -> DalResult<()> { sqlx::query!( r#" - UPDATE - tee_verifier_input_producer_jobs + UPDATE tee_verifier_input_producer_jobs SET status = $1, updated_at = NOW(), @@ -188,8 +187,7 @@ impl TeeVerifierInputProducerDal<'_, '_> { ) -> DalResult> { let attempts = sqlx::query!( r#" - UPDATE - tee_verifier_input_producer_jobs + UPDATE tee_verifier_input_producer_jobs SET status = $1, updated_at = NOW(), @@ -223,8 +221,7 @@ impl TeeVerifierInputProducerDal<'_, '_> { pub async fn delete_all_jobs(&mut self) -> DalResult<()> { sqlx::query!( r#" - DELETE FROM - tee_verifier_input_producer_jobs + DELETE FROM tee_verifier_input_producer_jobs "# ) .instrument("delete_all_tee_verifier_jobs") diff --git a/core/lib/dal/src/tokens_dal.rs b/core/lib/dal/src/tokens_dal.rs index 54d976aa0762..b34b913c45c3 100644 --- a/core/lib/dal/src/tokens_dal.rs +++ b/core/lib/dal/src/tokens_dal.rs @@ -49,8 +49,7 @@ impl TokensDal<'_, '_> { pub async fn mark_token_as_well_known(&mut self, l1_address: Address) -> DalResult<()> { sqlx::query!( r#" - UPDATE - tokens + UPDATE tokens SET well_known = TRUE, updated_at = NOW() @@ -109,8 +108,7 @@ impl TokensDal<'_, '_> { .collect(); sqlx::query!( r#" - DELETE FROM - tokens + DELETE FROM tokens WHERE l2_address = ANY ($1) "#, diff --git a/core/lib/dal/src/transactions_dal.rs b/core/lib/dal/src/transactions_dal.rs index 3322c6cd075c..408837d699e6 100644 --- a/core/lib/dal/src/transactions_dal.rs +++ b/core/lib/dal/src/transactions_dal.rs @@ -134,7 +134,8 @@ impl TransactionsDal<'_, '_> { $18, NOW(), NOW() - ) ON CONFLICT (hash) DO NOTHING + ) + ON CONFLICT (hash) DO NOTHING "#, tx_hash_bytes, sender, @@ -231,7 +232,8 @@ impl TransactionsDal<'_, '_> { $16, NOW(), NOW() - ) ON CONFLICT (hash) DO NOTHING + ) + ON CONFLICT (hash) DO NOTHING "#, tx_hash, sender, @@ -364,18 +366,12 @@ impl TransactionsDal<'_, '_> { $13, $14, $15, - JSONB_BUILD_OBJECT( - 'gas_used', - $16 :: BIGINT, - 'storage_writes', - $17 :: INT, - 'contracts_used', - $18 :: INT - ), + JSONB_BUILD_OBJECT('gas_used', $16::BIGINT, 'storage_writes', $17::INT, 'contracts_used', $18::INT), $19, NOW(), NOW() - ) ON CONFLICT (initiator_address, nonce) DO + ) + ON CONFLICT (initiator_address, nonce) DO UPDATE SET hash = $1, @@ -391,14 +387,7 @@ impl TransactionsDal<'_, '_> { value = $13, paymaster = $14, paymaster_input = $15, - execution_info = JSONB_BUILD_OBJECT( - 'gas_used', - $16 :: BIGINT, - 'storage_writes', - $17 :: INT, - 'contracts_used', - $18 :: INT - ), + execution_info = JSONB_BUILD_OBJECT('gas_used', $16::BIGINT, 'storage_writes', $17::INT, 'contracts_used', $18::INT), in_mempool = FALSE, received_at = $19, created_at = NOW(), @@ -492,8 +481,7 @@ impl TransactionsDal<'_, '_> { let l1_batch_tx_indexes: Vec<_> = (0..transactions.len() as i32).collect(); sqlx::query!( r#" - UPDATE - transactions + UPDATE transactions SET l1_batch_number = $3, l1_batch_tx_index = data_table.l1_batch_tx_index, @@ -501,8 +489,8 @@ impl TransactionsDal<'_, '_> { FROM ( SELECT - UNNEST($1 :: INT []) AS l1_batch_tx_index, - UNNEST($2 :: bytea []) AS hash + UNNEST($1::INT[]) AS l1_batch_tx_index, + UNNEST($2::bytea[]) AS hash ) AS data_table WHERE transactions.hash = data_table.hash @@ -545,8 +533,7 @@ impl TransactionsDal<'_, '_> { let tx_hashes: Vec<_> = transactions.iter().map(|tx| tx.hash.as_bytes()).collect(); sqlx::query!( r#" - DELETE FROM - transactions + DELETE FROM transactions WHERE hash = ANY ($1) "#, @@ -563,8 +550,7 @@ impl TransactionsDal<'_, '_> { let initiator = tx.transaction.initiator_account(); sqlx::query!( r#" - DELETE FROM - transactions + DELETE FROM transactions WHERE initiator_address = $1 AND nonce = $2 @@ -623,7 +609,7 @@ impl TransactionsDal<'_, '_> { u.tx_hash, u.call_trace FROM - UNNEST($1 :: bytea [], $2 :: bytea []) AS u (tx_hash, call_trace) + UNNEST($1::bytea[], $2::bytea[]) AS u (tx_hash, call_trace) "#, &call_traces_tx_hashes as &[&[u8]], &bytea_call_traces @@ -805,26 +791,26 @@ impl TransactionsDal<'_, '_> { FROM ( SELECT - UNNEST($1 :: bytea []) AS hash, - UNNEST($2 :: bytea []) AS initiator_address, - UNNEST($3 :: INT []) AS nonce, - UNNEST($4 :: bytea []) AS signature, - UNNEST($5 :: NUMERIC []) AS gas_limit, - UNNEST($6 :: NUMERIC []) AS max_fee_per_gas, - UNNEST($7 :: NUMERIC []) AS max_priority_fee_per_gas, - UNNEST($8 :: NUMERIC []) AS gas_per_pubdata_limit, - UNNEST($9 :: bytea []) AS input, - UNNEST($10 :: jsonb []) AS data, - UNNEST($11 :: INT []) AS tx_format, - UNNEST($12 :: bytea []) AS contract_address, - UNNEST($13 :: NUMERIC []) AS value, - UNNEST($14 :: bytea []) AS paymaster, - UNNEST($15 :: bytea []) AS paymaster_input, - UNNEST($16 :: jsonb []) AS new_execution_info, - UNNEST($17 :: INTEGER []) AS index_in_block, - UNNEST($18 :: VARCHAR []) AS error, - UNNEST($19 :: NUMERIC []) AS effective_gas_price, - UNNEST($20 :: BIGINT []) AS refunded_gas + UNNEST($1::bytea[]) AS hash, + UNNEST($2::bytea[]) AS initiator_address, + UNNEST($3::INT[]) AS nonce, + UNNEST($4::bytea[]) AS signature, + UNNEST($5::NUMERIC[]) AS gas_limit, + UNNEST($6::NUMERIC[]) AS max_fee_per_gas, + UNNEST($7::NUMERIC[]) AS max_priority_fee_per_gas, + UNNEST($8::NUMERIC[]) AS gas_per_pubdata_limit, + UNNEST($9::bytea[]) AS input, + UNNEST($10::jsonb[]) AS data, + UNNEST($11::INT[]) AS tx_format, + UNNEST($12::bytea[]) AS contract_address, + UNNEST($13::NUMERIC[]) AS value, + UNNEST($14::bytea[]) AS paymaster, + UNNEST($15::bytea[]) AS paymaster_input, + UNNEST($16::jsonb[]) AS new_execution_info, + UNNEST($17::INTEGER[]) AS index_in_block, + UNNEST($18::VARCHAR[]) AS error, + UNNEST($19::NUMERIC[]) AS effective_gas_price, + UNNEST($20::BIGINT[]) AS refunded_gas ) AS data_table "#, &l2_hashes as &[&[u8]], @@ -958,8 +944,7 @@ impl TransactionsDal<'_, '_> { // Note, that transactions are updated in order of their hashes to avoid deadlocks with other UPDATE queries. let query = sqlx::query!( r#" - UPDATE - transactions + UPDATE transactions SET hash = data_table.hash, signature = data_table.signature, @@ -989,26 +974,26 @@ impl TransactionsDal<'_, '_> { FROM ( SELECT - UNNEST($1 :: bytea []) AS initiator_address, - UNNEST($2 :: INT []) AS nonce, - UNNEST($3 :: bytea []) AS hash, - UNNEST($4 :: bytea []) AS signature, - UNNEST($5 :: NUMERIC []) AS gas_limit, - UNNEST($6 :: NUMERIC []) AS max_fee_per_gas, - UNNEST($7 :: NUMERIC []) AS max_priority_fee_per_gas, - UNNEST($8 :: NUMERIC []) AS gas_per_pubdata_limit, - UNNEST($9 :: INT []) AS tx_format, - UNNEST($10 :: INTEGER []) AS index_in_block, - UNNEST($11 :: VARCHAR []) AS error, - UNNEST($12 :: NUMERIC []) AS effective_gas_price, - UNNEST($13 :: jsonb []) AS new_execution_info, - UNNEST($14 :: bytea []) AS input, - UNNEST($15 :: jsonb []) AS data, - UNNEST($16 :: BIGINT []) AS refunded_gas, - UNNEST($17 :: NUMERIC []) AS value, - UNNEST($18 :: bytea []) AS contract_address, - UNNEST($19 :: bytea []) AS paymaster, - UNNEST($20 :: bytea []) AS paymaster_input + UNNEST($1::bytea[]) AS initiator_address, + UNNEST($2::INT[]) AS nonce, + UNNEST($3::bytea[]) AS hash, + UNNEST($4::bytea[]) AS signature, + UNNEST($5::NUMERIC[]) AS gas_limit, + UNNEST($6::NUMERIC[]) AS max_fee_per_gas, + UNNEST($7::NUMERIC[]) AS max_priority_fee_per_gas, + UNNEST($8::NUMERIC[]) AS gas_per_pubdata_limit, + UNNEST($9::INT[]) AS tx_format, + UNNEST($10::INTEGER[]) AS index_in_block, + UNNEST($11::VARCHAR[]) AS error, + UNNEST($12::NUMERIC[]) AS effective_gas_price, + UNNEST($13::jsonb[]) AS new_execution_info, + UNNEST($14::bytea[]) AS input, + UNNEST($15::jsonb[]) AS data, + UNNEST($16::BIGINT[]) AS refunded_gas, + UNNEST($17::NUMERIC[]) AS value, + UNNEST($18::bytea[]) AS contract_address, + UNNEST($19::bytea[]) AS paymaster, + UNNEST($20::bytea[]) AS paymaster_input ) AS data_table_temp JOIN transactions ON transactions.initiator_address = data_table_temp.initiator_address AND transactions.nonce = data_table_temp.nonce @@ -1180,8 +1165,8 @@ impl TransactionsDal<'_, '_> { data_table.contract_address, data_table.l1_block_number, data_table.value, - '\x0000000000000000000000000000000000000000' :: bytea, - '\x' :: bytea, + '\x0000000000000000000000000000000000000000'::bytea, + '\x'::bytea, data_table.tx_format, data_table.l1_tx_mint, data_table.l1_tx_refund_recipient, @@ -1197,26 +1182,26 @@ impl TransactionsDal<'_, '_> { FROM ( SELECT - UNNEST($1 :: BYTEA []) AS hash, - UNNEST($2 :: BYTEA []) AS initiator_address, - UNNEST($3 :: NUMERIC []) AS gas_limit, - UNNEST($4 :: NUMERIC []) AS max_fee_per_gas, - UNNEST($5 :: NUMERIC []) AS gas_per_pubdata_limit, - UNNEST($6 :: JSONB []) AS data, - UNNEST($7 :: BIGINT []) AS priority_op_id, - UNNEST($8 :: NUMERIC []) AS full_fee, - UNNEST($9 :: NUMERIC []) AS layer_2_tip_fee, - UNNEST($10 :: BYTEA []) AS contract_address, - UNNEST($11 :: INT []) AS l1_block_number, - UNNEST($12 :: NUMERIC []) AS value, - UNNEST($13 :: INTEGER []) AS tx_format, - UNNEST($14 :: NUMERIC []) AS l1_tx_mint, - UNNEST($15 :: BYTEA []) AS l1_tx_refund_recipient, - UNNEST($16 :: INT []) AS index_in_block, - UNNEST($17 :: VARCHAR []) AS error, - UNNEST($18 :: JSONB []) AS execution_info, - UNNEST($19 :: BIGINT []) AS refunded_gas, - UNNEST($20 :: NUMERIC []) AS effective_gas_price + UNNEST($1::BYTEA[]) AS hash, + UNNEST($2::BYTEA[]) AS initiator_address, + UNNEST($3::NUMERIC[]) AS gas_limit, + UNNEST($4::NUMERIC[]) AS max_fee_per_gas, + UNNEST($5::NUMERIC[]) AS gas_per_pubdata_limit, + UNNEST($6::JSONB[]) AS data, + UNNEST($7::BIGINT[]) AS priority_op_id, + UNNEST($8::NUMERIC[]) AS full_fee, + UNNEST($9::NUMERIC[]) AS layer_2_tip_fee, + UNNEST($10::BYTEA[]) AS contract_address, + UNNEST($11::INT[]) AS l1_block_number, + UNNEST($12::NUMERIC[]) AS value, + UNNEST($13::INTEGER[]) AS tx_format, + UNNEST($14::NUMERIC[]) AS l1_tx_mint, + UNNEST($15::BYTEA[]) AS l1_tx_refund_recipient, + UNNEST($16::INT[]) AS index_in_block, + UNNEST($17::VARCHAR[]) AS error, + UNNEST($18::JSONB[]) AS execution_info, + UNNEST($19::BIGINT[]) AS refunded_gas, + UNNEST($20::NUMERIC[]) AS effective_gas_price ) AS data_table "#, &l1_hashes as &[&[u8]], @@ -1302,8 +1287,7 @@ impl TransactionsDal<'_, '_> { let query = sqlx::query!( r#" - UPDATE - transactions + UPDATE transactions SET miniblock_number = $1, index_in_block = data_table.index_in_block, @@ -1316,12 +1300,12 @@ impl TransactionsDal<'_, '_> { FROM ( SELECT - UNNEST($2 :: bytea []) AS hash, - UNNEST($3 :: INTEGER []) AS index_in_block, - UNNEST($4 :: VARCHAR []) AS error, - UNNEST($5 :: jsonb []) AS new_execution_info, - UNNEST($6 :: BIGINT []) AS refunded_gas, - UNNEST($7 :: NUMERIC []) AS effective_gas_price + UNNEST($2::bytea[]) AS hash, + UNNEST($3::INTEGER[]) AS index_in_block, + UNNEST($4::VARCHAR[]) AS error, + UNNEST($5::jsonb[]) AS new_execution_info, + UNNEST($6::BIGINT[]) AS refunded_gas, + UNNEST($7::NUMERIC[]) AS effective_gas_price ) AS data_table WHERE transactions.hash = data_table.hash @@ -1468,8 +1452,8 @@ impl TransactionsDal<'_, '_> { data_table.contract_address, data_table.l1_block_number, data_table.value, - '\x0000000000000000000000000000000000000000' :: bytea, - '\x' :: bytea, + '\x0000000000000000000000000000000000000000'::bytea, + '\x'::bytea, data_table.tx_format, data_table.l1_tx_mint, data_table.l1_tx_refund_recipient, @@ -1485,24 +1469,24 @@ impl TransactionsDal<'_, '_> { FROM ( SELECT - UNNEST($1 :: BYTEA []) AS hash, - UNNEST($2 :: BYTEA []) AS initiator_address, - UNNEST($3 :: NUMERIC []) AS gas_limit, - UNNEST($4 :: NUMERIC []) AS max_fee_per_gas, - UNNEST($5 :: NUMERIC []) AS gas_per_pubdata_limit, - UNNEST($6 :: JSONB []) AS data, - UNNEST($7 :: INT []) AS upgrade_id, - UNNEST($8 :: BYTEA []) AS contract_address, - UNNEST($9 :: INT []) AS l1_block_number, - UNNEST($10 :: NUMERIC []) AS value, - UNNEST($11 :: INTEGER []) AS tx_format, - UNNEST($12 :: NUMERIC []) AS l1_tx_mint, - UNNEST($13 :: BYTEA []) AS l1_tx_refund_recipient, - UNNEST($14 :: INT []) AS index_in_block, - UNNEST($15 :: VARCHAR []) AS error, - UNNEST($16 :: JSONB []) AS execution_info, - UNNEST($17 :: BIGINT []) AS refunded_gas, - UNNEST($18 :: NUMERIC []) AS effective_gas_price + UNNEST($1::BYTEA[]) AS hash, + UNNEST($2::BYTEA[]) AS initiator_address, + UNNEST($3::NUMERIC[]) AS gas_limit, + UNNEST($4::NUMERIC[]) AS max_fee_per_gas, + UNNEST($5::NUMERIC[]) AS gas_per_pubdata_limit, + UNNEST($6::JSONB[]) AS data, + UNNEST($7::INT[]) AS upgrade_id, + UNNEST($8::BYTEA[]) AS contract_address, + UNNEST($9::INT[]) AS l1_block_number, + UNNEST($10::NUMERIC[]) AS value, + UNNEST($11::INTEGER[]) AS tx_format, + UNNEST($12::NUMERIC[]) AS l1_tx_mint, + UNNEST($13::BYTEA[]) AS l1_tx_refund_recipient, + UNNEST($14::INT[]) AS index_in_block, + UNNEST($15::VARCHAR[]) AS error, + UNNEST($16::JSONB[]) AS execution_info, + UNNEST($17::BIGINT[]) AS refunded_gas, + UNNEST($18::NUMERIC[]) AS effective_gas_price ) AS data_table "#, &upgrade_hashes as &[&[u8]], @@ -1588,8 +1572,7 @@ impl TransactionsDal<'_, '_> { let query = sqlx::query!( r#" - UPDATE - transactions + UPDATE transactions SET miniblock_number = $1, index_in_block = data_table.index_in_block, @@ -1602,12 +1585,12 @@ impl TransactionsDal<'_, '_> { FROM ( SELECT - UNNEST($2 :: bytea []) AS hash, - UNNEST($3 :: INTEGER []) AS index_in_block, - UNNEST($4 :: VARCHAR []) AS error, - UNNEST($5 :: jsonb []) AS new_execution_info, - UNNEST($6 :: BIGINT []) AS refunded_gas, - UNNEST($7 :: NUMERIC []) AS effective_gas_price + UNNEST($2::bytea[]) AS hash, + UNNEST($3::INTEGER[]) AS index_in_block, + UNNEST($4::VARCHAR[]) AS error, + UNNEST($5::jsonb[]) AS new_execution_info, + UNNEST($6::BIGINT[]) AS refunded_gas, + UNNEST($7::NUMERIC[]) AS effective_gas_price ) AS data_table WHERE transactions.hash = data_table.hash @@ -1635,8 +1618,7 @@ impl TransactionsDal<'_, '_> { // These txs don't affect the state, so we can just easily skip this update. sqlx::query!( r#" - UPDATE - transactions + UPDATE transactions SET error = $1, updated_at = NOW() @@ -1659,8 +1641,7 @@ impl TransactionsDal<'_, '_> { ) -> DalResult<()> { let hash_rows = sqlx::query!( r#" - UPDATE - transactions + UPDATE transactions SET l1_batch_number = NULL, miniblock_number = NULL, @@ -1682,8 +1663,7 @@ impl TransactionsDal<'_, '_> { let tx_hashes: Vec<_> = hash_rows.iter().map(|row| &row.hash[..]).collect(); sqlx::query!( r#" - DELETE FROM - call_traces + DELETE FROM call_traces WHERE tx_hash = ANY ($1) "#, @@ -1701,11 +1681,10 @@ impl TransactionsDal<'_, '_> { let stuck_tx_timeout = pg_interval_from_duration(stuck_tx_timeout); let rows = sqlx::query!( r#" - DELETE FROM - transactions + DELETE FROM transactions WHERE miniblock_number IS NULL - AND received_at < NOW() - $1 :: INTERVAL + AND received_at < NOW() - $1::INTERVAL AND is_priority = FALSE AND error IS NULL RETURNING @@ -1734,12 +1713,11 @@ impl TransactionsDal<'_, '_> { let stashed_addresses: Vec<_> = stashed_accounts.iter().map(Address::as_bytes).collect(); sqlx::query!( r#" - UPDATE - transactions + UPDATE transactions SET in_mempool = FALSE FROM - UNNEST($1 :: bytea []) AS s (address) + UNNEST($1::bytea[]) AS s (address) WHERE transactions.in_mempool = TRUE AND transactions.initiator_address = s.address @@ -1754,8 +1732,7 @@ impl TransactionsDal<'_, '_> { let purged_addresses: Vec<_> = purged_accounts.iter().map(Address::as_bytes).collect(); sqlx::query!( r#" - DELETE FROM - transactions + DELETE FROM transactions WHERE in_mempool = TRUE AND initiator_address = ANY ($1) @@ -1771,8 +1748,7 @@ impl TransactionsDal<'_, '_> { let transactions = sqlx::query_as!( StorageTransaction, r#" - UPDATE - transactions + UPDATE transactions SET in_mempool = TRUE FROM @@ -1831,8 +1807,7 @@ impl TransactionsDal<'_, '_> { pub async fn reset_mempool(&mut self) -> DalResult<()> { sqlx::query!( r#" - UPDATE - transactions + UPDATE transactions SET in_mempool = FALSE WHERE diff --git a/core/lib/dal/src/transactions_web3_dal.rs b/core/lib/dal/src/transactions_web3_dal.rs index e015e1179aae..f5a3c492f8af 100644 --- a/core/lib/dal/src/transactions_web3_dal.rs +++ b/core/lib/dal/src/transactions_web3_dal.rs @@ -48,19 +48,20 @@ impl TransactionsWeb3Dal<'_, '_> { let st_receipts: Vec = sqlx::query_as!( StorageTransactionReceipt, r#" - WITH events AS ( - SELECT - DISTINCT ON (events.tx_hash) * - FROM - events - WHERE - events.address = $1 - AND events.topic1 = $2 - AND events.tx_hash = ANY ($3) - ORDER BY - events.tx_hash, - events.event_index_in_tx DESC - ) + WITH + events AS ( + SELECT DISTINCT + ON (events.tx_hash) * + FROM + events + WHERE + events.address = $1 + AND events.topic1 = $2 + AND events.tx_hash = ANY ($3) + ORDER BY + events.tx_hash, + events.event_index_in_tx DESC + ) SELECT transactions.hash AS tx_hash, transactions.index_in_block AS index_in_block, @@ -84,7 +85,7 @@ impl TransactionsWeb3Dal<'_, '_> { LEFT JOIN events ON events.tx_hash = transactions.hash WHERE transactions.hash = ANY ($3) - AND transactions.data != '{}' :: jsonb + AND transactions.data != '{}'::jsonb "#, // ^ Filter out transactions with pruned data, which would lead to potentially incomplete / bogus // transaction info. @@ -317,7 +318,7 @@ impl TransactionsWeb3Dal<'_, '_> { ) WHERE transactions.hash = $1 - AND transactions.data != '{}' :: jsonb + AND transactions.data != '{}'::jsonb "#, // ^ Filter out transactions with pruned data, which would lead to potentially incomplete / bogus // transaction info. diff --git a/core/lib/dal/src/vm_runner_dal.rs b/core/lib/dal/src/vm_runner_dal.rs index c6884cc35b00..37ef1517d54a 100644 --- a/core/lib/dal/src/vm_runner_dal.rs +++ b/core/lib/dal/src/vm_runner_dal.rs @@ -36,25 +36,26 @@ impl VmRunnerDal<'_, '_> { ) -> DalResult { let row = sqlx::query!( r#" - WITH available_batches AS ( - SELECT - MAX(number) AS "last_batch" - FROM - l1_batches - ), - processed_batches AS ( - SELECT - COALESCE(MAX(l1_batch_number), $1) + $2 AS "last_ready_batch" - FROM - vm_runner_protective_reads - WHERE - time_taken IS NOT NULL - ) + WITH + available_batches AS ( + SELECT + MAX(number) AS "last_batch" + FROM + l1_batches + ), + processed_batches AS ( + SELECT + COALESCE(MAX(l1_batch_number), $1) + $2 AS "last_ready_batch" + FROM + vm_runner_protective_reads + WHERE + time_taken IS NOT NULL + ) SELECT LEAST(last_batch, last_ready_batch) AS "last_ready_batch!" FROM - available_batches FULL - JOIN processed_batches ON TRUE + available_batches + FULL JOIN processed_batches ON TRUE "#, default_batch.0 as i32, window_size as i32 @@ -73,14 +74,10 @@ impl VmRunnerDal<'_, '_> { sqlx::query!( r#" INSERT INTO - vm_runner_protective_reads ( - l1_batch_number, - created_at, - updated_at, - processing_started_at - ) + vm_runner_protective_reads (l1_batch_number, created_at, updated_at, processing_started_at) VALUES - ($1, NOW(), NOW(), NOW()) ON CONFLICT (l1_batch_number) DO + ($1, NOW(), NOW(), NOW()) + ON CONFLICT (l1_batch_number) DO UPDATE SET updated_at = NOW(), @@ -101,8 +98,7 @@ impl VmRunnerDal<'_, '_> { ) -> anyhow::Result<()> { let update_result = sqlx::query!( r#" - UPDATE - vm_runner_protective_reads + UPDATE vm_runner_protective_reads SET time_taken = NOW() - processing_started_at WHERE @@ -137,8 +133,7 @@ impl VmRunnerDal<'_, '_> { let l1_batch_number = last_batch_to_keep.map_or(-1, |number| i64::from(number.0)); sqlx::query!( r#" - DELETE FROM - vm_runner_protective_reads + DELETE FROM vm_runner_protective_reads WHERE l1_batch_number > $1 "#, @@ -162,8 +157,7 @@ impl VmRunnerDal<'_, '_> { let l1_batch_number = last_batch_to_keep.map_or(-1, |number| i64::from(number.0)); sqlx::query!( r#" - DELETE FROM - vm_runner_bwip + DELETE FROM vm_runner_bwip WHERE l1_batch_number > $1 "#, @@ -201,25 +195,26 @@ impl VmRunnerDal<'_, '_> { ) -> DalResult { let row = sqlx::query!( r#" - WITH available_batches AS ( - SELECT - MAX(number) AS "last_batch" - FROM - l1_batches - ), - processed_batches AS ( - SELECT - COALESCE(MAX(l1_batch_number), $1) + $2 AS "last_ready_batch" - FROM - vm_runner_bwip - WHERE - time_taken IS NOT NULL - ) + WITH + available_batches AS ( + SELECT + MAX(number) AS "last_batch" + FROM + l1_batches + ), + processed_batches AS ( + SELECT + COALESCE(MAX(l1_batch_number), $1) + $2 AS "last_ready_batch" + FROM + vm_runner_bwip + WHERE + time_taken IS NOT NULL + ) SELECT LEAST(last_batch, last_ready_batch) AS "last_ready_batch!" FROM - available_batches FULL - JOIN processed_batches ON TRUE + available_batches + FULL JOIN processed_batches ON TRUE "#, default_batch.0 as i32, window_size as i32 @@ -238,14 +233,10 @@ impl VmRunnerDal<'_, '_> { sqlx::query!( r#" INSERT INTO - vm_runner_bwip ( - l1_batch_number, - created_at, - updated_at, - processing_started_at - ) + vm_runner_bwip (l1_batch_number, created_at, updated_at, processing_started_at) VALUES - ($1, NOW(), NOW(), NOW()) ON CONFLICT (l1_batch_number) DO + ($1, NOW(), NOW(), NOW()) + ON CONFLICT (l1_batch_number) DO UPDATE SET updated_at = NOW(), @@ -266,8 +257,7 @@ impl VmRunnerDal<'_, '_> { ) -> anyhow::Result<()> { let update_result = sqlx::query!( r#" - UPDATE - vm_runner_bwip + UPDATE vm_runner_bwip SET time_taken = NOW() - processing_started_at WHERE diff --git a/prover/crates/lib/prover_dal/.sqlx/query-00b88ec7fcf40bb18e0018b7c76f6e1df560ab1e8935564355236e90b6147d2f.json b/prover/crates/lib/prover_dal/.sqlx/query-00b88ec7fcf40bb18e0018b7c76f6e1df560ab1e8935564355236e90b6147d2f.json new file mode 100644 index 000000000000..49a533897ce3 --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-00b88ec7fcf40bb18e0018b7c76f6e1df560ab1e8935564355236e90b6147d2f.json @@ -0,0 +1,15 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE scheduler_witness_jobs_fri\n SET\n status = 'successful',\n updated_at = NOW(),\n time_taken = $1\n WHERE\n l1_batch_number = $2\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Time", + "Int8" + ] + }, + "nullable": [] + }, + "hash": "00b88ec7fcf40bb18e0018b7c76f6e1df560ab1e8935564355236e90b6147d2f" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-08a97610cfe85ab84df2f2ca3ab7619d79075a2177b8f9b464565474b43afc21.json b/prover/crates/lib/prover_dal/.sqlx/query-08a97610cfe85ab84df2f2ca3ab7619d79075a2177b8f9b464565474b43afc21.json deleted file mode 100644 index 8898750df25d..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-08a97610cfe85ab84df2f2ca3ab7619d79075a2177b8f9b464565474b43afc21.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE\n witness_inputs_fri\n SET\n status = 'successful',\n updated_at = NOW(),\n time_taken = $1\n WHERE\n l1_batch_number = $2\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Time", - "Int8" - ] - }, - "nullable": [] - }, - "hash": "08a97610cfe85ab84df2f2ca3ab7619d79075a2177b8f9b464565474b43afc21" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-4e851913270d32a72ebf654b8b7ba420c278e5771858d9de8d08a23e1fda97f5.json b/prover/crates/lib/prover_dal/.sqlx/query-0a1ec4690d6b4a67d6ad16badcbf113a19feb73c4cf9876855523499998b99c0.json similarity index 56% rename from prover/crates/lib/prover_dal/.sqlx/query-4e851913270d32a72ebf654b8b7ba420c278e5771858d9de8d08a23e1fda97f5.json rename to prover/crates/lib/prover_dal/.sqlx/query-0a1ec4690d6b4a67d6ad16badcbf113a19feb73c4cf9876855523499998b99c0.json index b8647c2631b5..b05230e1be44 100644 --- a/prover/crates/lib/prover_dal/.sqlx/query-4e851913270d32a72ebf654b8b7ba420c278e5771858d9de8d08a23e1fda97f5.json +++ b/prover/crates/lib/prover_dal/.sqlx/query-0a1ec4690d6b4a67d6ad16badcbf113a19feb73c4cf9876855523499998b99c0.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n leaf_aggregation_witness_jobs_fri (\n l1_batch_number,\n circuit_id,\n closed_form_inputs_blob_url,\n number_of_basic_circuits,\n protocol_version,\n status,\n created_at,\n updated_at,\n protocol_version_patch\n )\n VALUES\n (\n $1,\n $2,\n $3,\n $4,\n $5,\n 'waiting_for_proofs',\n NOW(),\n NOW(),\n $6\n ) ON CONFLICT (l1_batch_number, circuit_id) DO\n UPDATE\n SET\n updated_at = NOW()\n ", + "query": "\n INSERT INTO\n leaf_aggregation_witness_jobs_fri (\n l1_batch_number,\n circuit_id,\n closed_form_inputs_blob_url,\n number_of_basic_circuits,\n protocol_version,\n status,\n created_at,\n updated_at,\n protocol_version_patch\n )\n VALUES\n ($1, $2, $3, $4, $5, 'waiting_for_proofs', NOW(), NOW(), $6)\n ON CONFLICT (l1_batch_number, circuit_id) DO\n UPDATE\n SET\n updated_at = NOW()\n ", "describe": { "columns": [], "parameters": { @@ -15,5 +15,5 @@ }, "nullable": [] }, - "hash": "4e851913270d32a72ebf654b8b7ba420c278e5771858d9de8d08a23e1fda97f5" + "hash": "0a1ec4690d6b4a67d6ad16badcbf113a19feb73c4cf9876855523499998b99c0" } diff --git a/prover/crates/lib/prover_dal/.sqlx/query-0b3dcc054233e1269e067741394c252e5c82673e1595829b4b9f897b7df61e6a.json b/prover/crates/lib/prover_dal/.sqlx/query-0b3dcc054233e1269e067741394c252e5c82673e1595829b4b9f897b7df61e6a.json deleted file mode 100644 index b9cb7220b560..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-0b3dcc054233e1269e067741394c252e5c82673e1595829b4b9f897b7df61e6a.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE\n prover_jobs_fri\n SET\n status = 'failed',\n error = $1,\n updated_at = NOW()\n WHERE\n id = $2\n AND status != 'successful'\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Text", - "Int8" - ] - }, - "nullable": [] - }, - "hash": "0b3dcc054233e1269e067741394c252e5c82673e1595829b4b9f897b7df61e6a" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-0b70c98c2edd8370ad09ac553c18dbc21cccb9a95e3db1c93da239845a5e9036.json b/prover/crates/lib/prover_dal/.sqlx/query-0b70c98c2edd8370ad09ac553c18dbc21cccb9a95e3db1c93da239845a5e9036.json new file mode 100644 index 000000000000..8b49fa11e63b --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-0b70c98c2edd8370ad09ac553c18dbc21cccb9a95e3db1c93da239845a5e9036.json @@ -0,0 +1,26 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE proof_compression_jobs_fri\n SET\n status = $1,\n attempts = attempts + 1,\n updated_at = NOW(),\n processing_started_at = NOW(),\n picked_by = $3\n WHERE\n l1_batch_number = (\n SELECT\n l1_batch_number\n FROM\n proof_compression_jobs_fri\n WHERE\n status = $2\n AND protocol_version = $4\n AND protocol_version_patch = $5\n ORDER BY\n l1_batch_number ASC\n LIMIT\n 1\n FOR UPDATE\n SKIP LOCKED\n )\n RETURNING\n proof_compression_jobs_fri.l1_batch_number\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "l1_batch_number", + "type_info": "Int8" + } + ], + "parameters": { + "Left": [ + "Text", + "Text", + "Text", + "Int4", + "Int4" + ] + }, + "nullable": [ + false + ] + }, + "hash": "0b70c98c2edd8370ad09ac553c18dbc21cccb9a95e3db1c93da239845a5e9036" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-0c047f4e856486d039a21a5622652e0e45816db6ebc2c16a09350b99d87d5f27.json b/prover/crates/lib/prover_dal/.sqlx/query-0c047f4e856486d039a21a5622652e0e45816db6ebc2c16a09350b99d87d5f27.json deleted file mode 100644 index 8d363816e9c5..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-0c047f4e856486d039a21a5622652e0e45816db6ebc2c16a09350b99d87d5f27.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE\n proof_compression_jobs_fri\n SET\n status = $1,\n attempts = attempts + 1,\n updated_at = NOW(),\n processing_started_at = NOW(),\n picked_by = $3\n WHERE\n l1_batch_number = (\n SELECT\n l1_batch_number\n FROM\n proof_compression_jobs_fri\n WHERE\n status = $2\n AND protocol_version = $4\n AND protocol_version_patch = $5\n ORDER BY\n l1_batch_number ASC\n LIMIT\n 1 FOR\n UPDATE\n SKIP LOCKED\n )\n RETURNING\n proof_compression_jobs_fri.l1_batch_number\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "l1_batch_number", - "type_info": "Int8" - } - ], - "parameters": { - "Left": [ - "Text", - "Text", - "Text", - "Int4", - "Int4" - ] - }, - "nullable": [ - false - ] - }, - "hash": "0c047f4e856486d039a21a5622652e0e45816db6ebc2c16a09350b99d87d5f27" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-0cc53f605989b99ad612d9a5353636ca3032cd5dcc5d3d1d4d5d0a16c38c20ef.json b/prover/crates/lib/prover_dal/.sqlx/query-0cc53f605989b99ad612d9a5353636ca3032cd5dcc5d3d1d4d5d0a16c38c20ef.json deleted file mode 100644 index af5b2c758f86..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-0cc53f605989b99ad612d9a5353636ca3032cd5dcc5d3d1d4d5d0a16c38c20ef.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n node_aggregation_witness_jobs_fri (\n l1_batch_number,\n circuit_id,\n status,\n created_at,\n updated_at\n )\n VALUES\n ($1, $2, 'waiting_for_proofs', NOW(), NOW()) ON CONFLICT (l1_batch_number, circuit_id, depth) DO\n UPDATE\n SET\n status = $3\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8", - "Int2", - "Text" - ] - }, - "nullable": [] - }, - "hash": "0cc53f605989b99ad612d9a5353636ca3032cd5dcc5d3d1d4d5d0a16c38c20ef" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-0f42168a211b64df8f78031341e473766ab4f51dd399c879b4f7c3bc157ab77e.json b/prover/crates/lib/prover_dal/.sqlx/query-0f42168a211b64df8f78031341e473766ab4f51dd399c879b4f7c3bc157ab77e.json deleted file mode 100644 index eb3ea0f353d6..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-0f42168a211b64df8f78031341e473766ab4f51dd399c879b4f7c3bc157ab77e.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE\n recursion_tip_witness_jobs_fri\n SET\n status = 'in_progress',\n attempts = attempts + 1,\n updated_at = NOW(),\n processing_started_at = NOW(),\n picked_by = $3\n WHERE\n l1_batch_number = (\n SELECT\n l1_batch_number\n FROM\n recursion_tip_witness_jobs_fri\n WHERE\n status = 'queued'\n AND protocol_version = $1\n AND protocol_version_patch = $2\n ORDER BY\n l1_batch_number ASC\n LIMIT\n 1 FOR\n UPDATE\n SKIP LOCKED\n )\n RETURNING\n recursion_tip_witness_jobs_fri.l1_batch_number,\n recursion_tip_witness_jobs_fri.number_of_final_node_jobs\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "l1_batch_number", - "type_info": "Int8" - }, - { - "ordinal": 1, - "name": "number_of_final_node_jobs", - "type_info": "Int4" - } - ], - "parameters": { - "Left": [ - "Int4", - "Int4", - "Text" - ] - }, - "nullable": [ - false, - false - ] - }, - "hash": "0f42168a211b64df8f78031341e473766ab4f51dd399c879b4f7c3bc157ab77e" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-102b79726652d9150c802350bdca80c233a9fd3e892b5a867a5517c2e04497a8.json b/prover/crates/lib/prover_dal/.sqlx/query-102b79726652d9150c802350bdca80c233a9fd3e892b5a867a5517c2e04497a8.json new file mode 100644 index 000000000000..f912d06de810 --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-102b79726652d9150c802350bdca80c233a9fd3e892b5a867a5517c2e04497a8.json @@ -0,0 +1,41 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE proof_compression_jobs_fri\n SET\n status = 'queued',\n error = 'Manually requeued',\n attempts = 2,\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n l1_batch_number = $1\n AND attempts >= $2\n AND (\n status = 'in_progress'\n OR status = 'failed'\n )\n RETURNING\n status,\n attempts,\n error,\n picked_by\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "status", + "type_info": "Text" + }, + { + "ordinal": 1, + "name": "attempts", + "type_info": "Int2" + }, + { + "ordinal": 2, + "name": "error", + "type_info": "Text" + }, + { + "ordinal": 3, + "name": "picked_by", + "type_info": "Text" + } + ], + "parameters": { + "Left": [ + "Int8", + "Int2" + ] + }, + "nullable": [ + false, + false, + true, + true + ] + }, + "hash": "102b79726652d9150c802350bdca80c233a9fd3e892b5a867a5517c2e04497a8" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-1297f0977132185d6bd4501f490f1cdac8b194f09926c133985479c533a651f2.json b/prover/crates/lib/prover_dal/.sqlx/query-1297f0977132185d6bd4501f490f1cdac8b194f09926c133985479c533a651f2.json new file mode 100644 index 000000000000..c99572bcc8e5 --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-1297f0977132185d6bd4501f490f1cdac8b194f09926c133985479c533a651f2.json @@ -0,0 +1,18 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE prover_jobs_fri\n SET\n status = $1\n WHERE\n l1_batch_number = $2\n AND sequence_number = $3\n AND aggregation_round = $4\n AND circuit_id = $5\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Text", + "Int8", + "Int4", + "Int2", + "Int2" + ] + }, + "nullable": [] + }, + "hash": "1297f0977132185d6bd4501f490f1cdac8b194f09926c133985479c533a651f2" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-1849cfa3167eed2809e7724a63198f5e2450cc4faee2f80b37fbd5626324dbeb.json b/prover/crates/lib/prover_dal/.sqlx/query-1849cfa3167eed2809e7724a63198f5e2450cc4faee2f80b37fbd5626324dbeb.json new file mode 100644 index 000000000000..38db4847ddde --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-1849cfa3167eed2809e7724a63198f5e2450cc4faee2f80b37fbd5626324dbeb.json @@ -0,0 +1,12 @@ +{ + "db_name": "PostgreSQL", + "query": "\n DELETE FROM gpu_prover_queue_fri\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [] + }, + "nullable": [] + }, + "hash": "1849cfa3167eed2809e7724a63198f5e2450cc4faee2f80b37fbd5626324dbeb" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-1902180f79ffb2f9903e16752d0a4dab579b76ea65ea022505a3f57fc0a4a946.json b/prover/crates/lib/prover_dal/.sqlx/query-1902180f79ffb2f9903e16752d0a4dab579b76ea65ea022505a3f57fc0a4a946.json deleted file mode 100644 index 86769e51db86..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-1902180f79ffb2f9903e16752d0a4dab579b76ea65ea022505a3f57fc0a4a946.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n recursion_tip_witness_jobs_fri (\n l1_batch_number,\n status,\n number_of_final_node_jobs,\n created_at,\n updated_at\n )\n VALUES\n ($1, 'waiting_for_proofs', 1, NOW(), NOW()) ON CONFLICT (l1_batch_number) DO\n UPDATE\n SET\n status = $2\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8", - "Text" - ] - }, - "nullable": [] - }, - "hash": "1902180f79ffb2f9903e16752d0a4dab579b76ea65ea022505a3f57fc0a4a946" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-1dc6a926ada3f13ab6c2a6f3cc16054d3fb4f4a5c014ef24f5cb0ac4cd3465eb.json b/prover/crates/lib/prover_dal/.sqlx/query-1dc6a926ada3f13ab6c2a6f3cc16054d3fb4f4a5c014ef24f5cb0ac4cd3465eb.json deleted file mode 100644 index efb290e6a0f8..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-1dc6a926ada3f13ab6c2a6f3cc16054d3fb4f4a5c014ef24f5cb0ac4cd3465eb.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE\n leaf_aggregation_witness_jobs_fri\n SET\n status = $1,\n attempts = $2\n WHERE\n l1_batch_number = $3\n AND circuit_id = $4\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Text", - "Int2", - "Int8", - "Int2" - ] - }, - "nullable": [] - }, - "hash": "1dc6a926ada3f13ab6c2a6f3cc16054d3fb4f4a5c014ef24f5cb0ac4cd3465eb" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-f907bd746d0d085e4612c01b7a90d5c40935ed7b37013c9c608bfdcffd9611d8.json b/prover/crates/lib/prover_dal/.sqlx/query-2095e5646c382ccbc6e3bafdeddaae31358088e142dff51c9f0bde8f386900d3.json similarity index 65% rename from prover/crates/lib/prover_dal/.sqlx/query-f907bd746d0d085e4612c01b7a90d5c40935ed7b37013c9c608bfdcffd9611d8.json rename to prover/crates/lib/prover_dal/.sqlx/query-2095e5646c382ccbc6e3bafdeddaae31358088e142dff51c9f0bde8f386900d3.json index 4b0950e4e672..fd7c7c7874db 100644 --- a/prover/crates/lib/prover_dal/.sqlx/query-f907bd746d0d085e4612c01b7a90d5c40935ed7b37013c9c608bfdcffd9611d8.json +++ b/prover/crates/lib/prover_dal/.sqlx/query-2095e5646c382ccbc6e3bafdeddaae31358088e142dff51c9f0bde8f386900d3.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT\n instance_status\n FROM\n gpu_prover_queue_fri\n WHERE\n instance_host = $1 :: TEXT :: inet\n AND instance_port = $2\n AND zone = $3\n ", + "query": "\n SELECT\n instance_status\n FROM\n gpu_prover_queue_fri\n WHERE\n instance_host = $1::TEXT::inet\n AND instance_port = $2\n AND zone = $3\n ", "describe": { "columns": [ { @@ -20,5 +20,5 @@ false ] }, - "hash": "f907bd746d0d085e4612c01b7a90d5c40935ed7b37013c9c608bfdcffd9611d8" + "hash": "2095e5646c382ccbc6e3bafdeddaae31358088e142dff51c9f0bde8f386900d3" } diff --git a/prover/crates/lib/prover_dal/.sqlx/query-216d0c263539739b53975a96a10332b826708800a2f72f09bd7aea08cf724e1a.json b/prover/crates/lib/prover_dal/.sqlx/query-216d0c263539739b53975a96a10332b826708800a2f72f09bd7aea08cf724e1a.json new file mode 100644 index 000000000000..ec503eabee01 --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-216d0c263539739b53975a96a10332b826708800a2f72f09bd7aea08cf724e1a.json @@ -0,0 +1,47 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE scheduler_witness_jobs_fri\n SET\n status = 'queued',\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n (\n status = 'in_progress'\n AND processing_started_at <= NOW() - $1::INTERVAL\n AND attempts < $2\n )\n OR (\n status = 'failed'\n AND attempts < $2\n )\n RETURNING\n l1_batch_number,\n status,\n attempts,\n error,\n picked_by\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "l1_batch_number", + "type_info": "Int8" + }, + { + "ordinal": 1, + "name": "status", + "type_info": "Text" + }, + { + "ordinal": 2, + "name": "attempts", + "type_info": "Int2" + }, + { + "ordinal": 3, + "name": "error", + "type_info": "Text" + }, + { + "ordinal": 4, + "name": "picked_by", + "type_info": "Text" + } + ], + "parameters": { + "Left": [ + "Interval", + "Int2" + ] + }, + "nullable": [ + false, + false, + false, + true, + true + ] + }, + "hash": "216d0c263539739b53975a96a10332b826708800a2f72f09bd7aea08cf724e1a" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-23fab2481b7e7a30d4f8299e267431e3e266c84e1ef03cf4015202dbb9f54174.json b/prover/crates/lib/prover_dal/.sqlx/query-23fab2481b7e7a30d4f8299e267431e3e266c84e1ef03cf4015202dbb9f54174.json deleted file mode 100644 index f49b76580cae..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-23fab2481b7e7a30d4f8299e267431e3e266c84e1ef03cf4015202dbb9f54174.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE\n scheduler_witness_jobs_fri\n SET\n status = 'queued'\n WHERE\n l1_batch_number IN (\n SELECT\n prover_jobs_fri.l1_batch_number\n FROM\n prover_jobs_fri\n JOIN scheduler_witness_jobs_fri swj ON prover_jobs_fri.l1_batch_number = swj.l1_batch_number\n WHERE\n swj.status = 'waiting_for_proofs'\n AND prover_jobs_fri.status = 'successful'\n AND prover_jobs_fri.aggregation_round = $1\n )\n RETURNING\n l1_batch_number;\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "l1_batch_number", - "type_info": "Int8" - } - ], - "parameters": { - "Left": [ - "Int2" - ] - }, - "nullable": [ - false - ] - }, - "hash": "23fab2481b7e7a30d4f8299e267431e3e266c84e1ef03cf4015202dbb9f54174" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-25f599ed134f5866dace386fc34d1b98aa902e56d35f55c0d7e2a983ce1bdd80.json b/prover/crates/lib/prover_dal/.sqlx/query-25f599ed134f5866dace386fc34d1b98aa902e56d35f55c0d7e2a983ce1bdd80.json deleted file mode 100644 index 423e2b1a07e2..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-25f599ed134f5866dace386fc34d1b98aa902e56d35f55c0d7e2a983ce1bdd80.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE\n prover_jobs_fri\n SET\n status = 'queued',\n error = 'Manually requeued',\n attempts = 2,\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n l1_batch_number = $1\n AND attempts >= $2\n AND (\n status = 'in_progress'\n OR status = 'failed'\n )\n RETURNING\n id,\n status,\n attempts,\n circuit_id,\n error,\n picked_by\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "id", - "type_info": "Int8" - }, - { - "ordinal": 1, - "name": "status", - "type_info": "Text" - }, - { - "ordinal": 2, - "name": "attempts", - "type_info": "Int2" - }, - { - "ordinal": 3, - "name": "circuit_id", - "type_info": "Int2" - }, - { - "ordinal": 4, - "name": "error", - "type_info": "Text" - }, - { - "ordinal": 5, - "name": "picked_by", - "type_info": "Text" - } - ], - "parameters": { - "Left": [ - "Int8", - "Int2" - ] - }, - "nullable": [ - false, - false, - false, - false, - true, - true - ] - }, - "hash": "25f599ed134f5866dace386fc34d1b98aa902e56d35f55c0d7e2a983ce1bdd80" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-2764de4edfb998bb498127b072574aac9fa17a424d1f5c673e78a2a023bc2205.json b/prover/crates/lib/prover_dal/.sqlx/query-2764de4edfb998bb498127b072574aac9fa17a424d1f5c673e78a2a023bc2205.json deleted file mode 100644 index 5729440831bb..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-2764de4edfb998bb498127b072574aac9fa17a424d1f5c673e78a2a023bc2205.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE\n leaf_aggregation_witness_jobs_fri\n SET\n status = 'successful',\n updated_at = NOW(),\n time_taken = $1\n WHERE\n id = $2\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Time", - "Int8" - ] - }, - "nullable": [] - }, - "hash": "2764de4edfb998bb498127b072574aac9fa17a424d1f5c673e78a2a023bc2205" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-28397b5a0b7af832d2a4d3d7011a68a48db6a64afcd41bbe0e17d98fa38fdb19.json b/prover/crates/lib/prover_dal/.sqlx/query-28397b5a0b7af832d2a4d3d7011a68a48db6a64afcd41bbe0e17d98fa38fdb19.json new file mode 100644 index 000000000000..d6e77daaa927 --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-28397b5a0b7af832d2a4d3d7011a68a48db6a64afcd41bbe0e17d98fa38fdb19.json @@ -0,0 +1,22 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE scheduler_witness_jobs_fri\n SET\n status = 'queued'\n WHERE\n l1_batch_number IN (\n SELECT\n prover_jobs_fri.l1_batch_number\n FROM\n prover_jobs_fri\n JOIN scheduler_witness_jobs_fri swj ON prover_jobs_fri.l1_batch_number = swj.l1_batch_number\n WHERE\n swj.status = 'waiting_for_proofs'\n AND prover_jobs_fri.status = 'successful'\n AND prover_jobs_fri.aggregation_round = $1\n )\n RETURNING\n l1_batch_number;\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "l1_batch_number", + "type_info": "Int8" + } + ], + "parameters": { + "Left": [ + "Int2" + ] + }, + "nullable": [ + false + ] + }, + "hash": "28397b5a0b7af832d2a4d3d7011a68a48db6a64afcd41bbe0e17d98fa38fdb19" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-459705905af1c2928704ffb5dbc07d91e2cbbcb7ce02bfa14913d76cb946a57e.json b/prover/crates/lib/prover_dal/.sqlx/query-28f03acf565c4b50fe86f606c18a8b699386b3c5b4e02d5ce046f0f2e0ddc388.json similarity index 59% rename from prover/crates/lib/prover_dal/.sqlx/query-459705905af1c2928704ffb5dbc07d91e2cbbcb7ce02bfa14913d76cb946a57e.json rename to prover/crates/lib/prover_dal/.sqlx/query-28f03acf565c4b50fe86f606c18a8b699386b3c5b4e02d5ce046f0f2e0ddc388.json index 97952d1aaa0e..89e159989ae6 100644 --- a/prover/crates/lib/prover_dal/.sqlx/query-459705905af1c2928704ffb5dbc07d91e2cbbcb7ce02bfa14913d76cb946a57e.json +++ b/prover/crates/lib/prover_dal/.sqlx/query-28f03acf565c4b50fe86f606c18a8b699386b3c5b4e02d5ce046f0f2e0ddc388.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n UPDATE\n scheduler_witness_jobs_fri\n SET\n status = 'in_progress',\n attempts = attempts + 1,\n updated_at = NOW(),\n processing_started_at = NOW(),\n picked_by = $2\n WHERE\n l1_batch_number = (\n SELECT\n l1_batch_number\n FROM\n scheduler_witness_jobs_fri\n WHERE\n status = 'queued'\n AND protocol_version = $1\n AND protocol_version_patch = $3\n ORDER BY\n l1_batch_number ASC\n LIMIT\n 1 FOR\n UPDATE\n SKIP LOCKED\n )\n RETURNING\n scheduler_witness_jobs_fri.*\n ", + "query": "\n UPDATE scheduler_witness_jobs_fri\n SET\n status = 'in_progress',\n attempts = attempts + 1,\n updated_at = NOW(),\n processing_started_at = NOW(),\n picked_by = $2\n WHERE\n l1_batch_number = (\n SELECT\n l1_batch_number\n FROM\n scheduler_witness_jobs_fri\n WHERE\n status = 'queued'\n AND protocol_version = $1\n AND protocol_version_patch = $3\n ORDER BY\n l1_batch_number ASC\n LIMIT\n 1\n FOR UPDATE\n SKIP LOCKED\n )\n RETURNING\n scheduler_witness_jobs_fri.*\n ", "describe": { "columns": [ { @@ -86,5 +86,5 @@ false ] }, - "hash": "459705905af1c2928704ffb5dbc07d91e2cbbcb7ce02bfa14913d76cb946a57e" + "hash": "28f03acf565c4b50fe86f606c18a8b699386b3c5b4e02d5ce046f0f2e0ddc388" } diff --git a/prover/crates/lib/prover_dal/.sqlx/query-9cf70c7776934252d45cb23eec5c023375273c2211dab39e1f28d51724b7d8ad.json b/prover/crates/lib/prover_dal/.sqlx/query-29ff260b02f7b955f9fe0b657b87def3a97275b66ad33d214054dc9048ddf584.json similarity index 75% rename from prover/crates/lib/prover_dal/.sqlx/query-9cf70c7776934252d45cb23eec5c023375273c2211dab39e1f28d51724b7d8ad.json rename to prover/crates/lib/prover_dal/.sqlx/query-29ff260b02f7b955f9fe0b657b87def3a97275b66ad33d214054dc9048ddf584.json index 4c38c404de2e..85e66ed78248 100644 --- a/prover/crates/lib/prover_dal/.sqlx/query-9cf70c7776934252d45cb23eec5c023375273c2211dab39e1f28d51724b7d8ad.json +++ b/prover/crates/lib/prover_dal/.sqlx/query-29ff260b02f7b955f9fe0b657b87def3a97275b66ad33d214054dc9048ddf584.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n proof_compression_jobs_fri (\n l1_batch_number,\n fri_proof_blob_url,\n status,\n created_at,\n updated_at,\n protocol_version,\n protocol_version_patch\n )\n VALUES\n ($1, $2, $3, NOW(), NOW(), $4, $5) ON CONFLICT (l1_batch_number) DO NOTHING\n ", + "query": "\n INSERT INTO\n proof_compression_jobs_fri (\n l1_batch_number,\n fri_proof_blob_url,\n status,\n created_at,\n updated_at,\n protocol_version,\n protocol_version_patch\n )\n VALUES\n ($1, $2, $3, NOW(), NOW(), $4, $5)\n ON CONFLICT (l1_batch_number) DO NOTHING\n ", "describe": { "columns": [], "parameters": { @@ -14,5 +14,5 @@ }, "nullable": [] }, - "hash": "9cf70c7776934252d45cb23eec5c023375273c2211dab39e1f28d51724b7d8ad" + "hash": "29ff260b02f7b955f9fe0b657b87def3a97275b66ad33d214054dc9048ddf584" } diff --git a/prover/crates/lib/prover_dal/.sqlx/query-f49e345ad92e35acd40bcd097f77861eea20a381f6451ca82b4f1319364f77a9.json b/prover/crates/lib/prover_dal/.sqlx/query-2b12c5d469e6220cc8ddc997c666e4aa4f797bcc6e05ec2f2e435a7e940d8cf9.json similarity index 50% rename from prover/crates/lib/prover_dal/.sqlx/query-f49e345ad92e35acd40bcd097f77861eea20a381f6451ca82b4f1319364f77a9.json rename to prover/crates/lib/prover_dal/.sqlx/query-2b12c5d469e6220cc8ddc997c666e4aa4f797bcc6e05ec2f2e435a7e940d8cf9.json index d039dd57be7f..14b64e8122e5 100644 --- a/prover/crates/lib/prover_dal/.sqlx/query-f49e345ad92e35acd40bcd097f77861eea20a381f6451ca82b4f1319364f77a9.json +++ b/prover/crates/lib/prover_dal/.sqlx/query-2b12c5d469e6220cc8ddc997c666e4aa4f797bcc6e05ec2f2e435a7e940d8cf9.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n UPDATE\n leaf_aggregation_witness_jobs_fri\n SET\n status = 'queued',\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n (\n status = 'in_progress'\n AND processing_started_at <= NOW() - $1 :: INTERVAL\n AND attempts < $2\n )\n OR (\n status = 'failed'\n AND attempts < $2\n )\n RETURNING\n id,\n status,\n attempts,\n circuit_id,\n error,\n picked_by\n ", + "query": "\n UPDATE node_aggregation_witness_jobs_fri\n SET\n status = 'queued',\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n (\n status = 'in_progress'\n AND processing_started_at <= NOW() - $1::INTERVAL\n AND attempts < $2\n )\n OR (\n status = 'failed'\n AND attempts < $2\n )\n RETURNING\n id,\n status,\n attempts,\n circuit_id,\n error,\n picked_by\n ", "describe": { "columns": [ { @@ -49,5 +49,5 @@ true ] }, - "hash": "f49e345ad92e35acd40bcd097f77861eea20a381f6451ca82b4f1319364f77a9" + "hash": "2b12c5d469e6220cc8ddc997c666e4aa4f797bcc6e05ec2f2e435a7e940d8cf9" } diff --git a/prover/crates/lib/prover_dal/.sqlx/query-2d1461e068e43fd16714610b383cf8c93630d529ec96e67aac078f18196f61a5.json b/prover/crates/lib/prover_dal/.sqlx/query-2d1461e068e43fd16714610b383cf8c93630d529ec96e67aac078f18196f61a5.json new file mode 100644 index 000000000000..50d121213fb9 --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-2d1461e068e43fd16714610b383cf8c93630d529ec96e67aac078f18196f61a5.json @@ -0,0 +1,19 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE prover_jobs_fri\n SET\n status = $1,\n attempts = $2\n WHERE\n l1_batch_number = $3\n AND sequence_number = $4\n AND aggregation_round = $5\n AND circuit_id = $6\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Text", + "Int2", + "Int8", + "Int4", + "Int2", + "Int2" + ] + }, + "nullable": [] + }, + "hash": "2d1461e068e43fd16714610b383cf8c93630d529ec96e67aac078f18196f61a5" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-4e8ddaf3e4411bfcef4f353b4b310fc6b60b9a522b1a3134752c2ccca06f08cd.json b/prover/crates/lib/prover_dal/.sqlx/query-2dc6b7bf08cced8791354fc47e319d03f894f40d2ec528382b5643c3d51ec8e7.json similarity index 53% rename from prover/crates/lib/prover_dal/.sqlx/query-4e8ddaf3e4411bfcef4f353b4b310fc6b60b9a522b1a3134752c2ccca06f08cd.json rename to prover/crates/lib/prover_dal/.sqlx/query-2dc6b7bf08cced8791354fc47e319d03f894f40d2ec528382b5643c3d51ec8e7.json index d19c09fb3772..0ad6413e1ec1 100644 --- a/prover/crates/lib/prover_dal/.sqlx/query-4e8ddaf3e4411bfcef4f353b4b310fc6b60b9a522b1a3134752c2ccca06f08cd.json +++ b/prover/crates/lib/prover_dal/.sqlx/query-2dc6b7bf08cced8791354fc47e319d03f894f40d2ec528382b5643c3d51ec8e7.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n UPDATE\n gpu_prover_queue_fri\n SET\n instance_status = 'reserved',\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n id IN (\n SELECT\n id\n FROM\n gpu_prover_queue_fri\n WHERE\n specialized_prover_group_id = $2\n AND zone = $3\n AND protocol_version = $4\n AND protocol_version_patch = $5\n AND (\n instance_status = 'available'\n OR (\n instance_status = 'reserved'\n AND processing_started_at < NOW() - $1 :: INTERVAL\n )\n )\n ORDER BY\n updated_at ASC\n LIMIT\n 1 FOR\n UPDATE\n SKIP LOCKED\n )\n RETURNING\n gpu_prover_queue_fri.*\n ", + "query": "\n UPDATE gpu_prover_queue_fri\n SET\n instance_status = 'reserved',\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n id IN (\n SELECT\n id\n FROM\n gpu_prover_queue_fri\n WHERE\n specialized_prover_group_id = $2\n AND zone = $3\n AND protocol_version = $4\n AND protocol_version_patch = $5\n AND (\n instance_status = 'available'\n OR (\n instance_status = 'reserved'\n AND processing_started_at < NOW() - $1::INTERVAL\n )\n )\n ORDER BY\n updated_at ASC\n LIMIT\n 1\n FOR UPDATE\n SKIP LOCKED\n )\n RETURNING\n gpu_prover_queue_fri.*\n ", "describe": { "columns": [ { @@ -82,5 +82,5 @@ false ] }, - "hash": "4e8ddaf3e4411bfcef4f353b4b310fc6b60b9a522b1a3134752c2ccca06f08cd" + "hash": "2dc6b7bf08cced8791354fc47e319d03f894f40d2ec528382b5643c3d51ec8e7" } diff --git a/prover/crates/lib/prover_dal/.sqlx/query-2df5a59eb22ae25dcfc3364e736dc761977ca7fe9a822d8318caffcf8882d4b1.json b/prover/crates/lib/prover_dal/.sqlx/query-2df5a59eb22ae25dcfc3364e736dc761977ca7fe9a822d8318caffcf8882d4b1.json deleted file mode 100644 index f9e3eeeb3649..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-2df5a59eb22ae25dcfc3364e736dc761977ca7fe9a822d8318caffcf8882d4b1.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE\n witness_inputs_fri\n SET\n status = 'in_progress',\n attempts = attempts + 1,\n updated_at = NOW(),\n processing_started_at = NOW(),\n picked_by = $2\n WHERE\n l1_batch_number = (\n SELECT\n l1_batch_number\n FROM\n witness_inputs_fri\n WHERE\n status = 'queued'\n AND protocol_version = $1\n AND protocol_version_patch = $3\n ORDER BY\n l1_batch_number ASC\n LIMIT\n 1 FOR\n UPDATE\n SKIP LOCKED\n )\n RETURNING\n witness_inputs_fri.l1_batch_number\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "l1_batch_number", - "type_info": "Int8" - } - ], - "parameters": { - "Left": [ - "Int4", - "Text", - "Int4" - ] - }, - "nullable": [ - false - ] - }, - "hash": "2df5a59eb22ae25dcfc3364e736dc761977ca7fe9a822d8318caffcf8882d4b1" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-2df88abaae97b6f916b104375bd7249ec09c0daf4368021788207370213a6d94.json b/prover/crates/lib/prover_dal/.sqlx/query-2df88abaae97b6f916b104375bd7249ec09c0daf4368021788207370213a6d94.json new file mode 100644 index 000000000000..967f02586d7b --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-2df88abaae97b6f916b104375bd7249ec09c0daf4368021788207370213a6d94.json @@ -0,0 +1,14 @@ +{ + "db_name": "PostgreSQL", + "query": "\n DELETE FROM proof_compression_jobs_fri\n WHERE\n l1_batch_number = $1\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8" + ] + }, + "nullable": [] + }, + "hash": "2df88abaae97b6f916b104375bd7249ec09c0daf4368021788207370213a6d94" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-2e6e2b68efc28114f44616b68fcf1d4d9a4b83a8b42846d8373ea13b96d612cf.json b/prover/crates/lib/prover_dal/.sqlx/query-2e6e2b68efc28114f44616b68fcf1d4d9a4b83a8b42846d8373ea13b96d612cf.json new file mode 100644 index 000000000000..41428e91feeb --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-2e6e2b68efc28114f44616b68fcf1d4d9a4b83a8b42846d8373ea13b96d612cf.json @@ -0,0 +1,19 @@ +{ + "db_name": "PostgreSQL", + "query": "\n INSERT INTO\n gpu_prover_queue_fri (\n instance_host,\n instance_port,\n instance_status,\n specialized_prover_group_id,\n zone,\n created_at,\n updated_at,\n protocol_version,\n protocol_version_patch\n )\n VALUES\n (CAST($1::TEXT AS inet), $2, 'available', $3, $4, NOW(), NOW(), $5, $6)\n ON CONFLICT (instance_host, instance_port, zone) DO\n UPDATE\n SET\n instance_status = 'available',\n specialized_prover_group_id = $3,\n zone = $4,\n updated_at = NOW(),\n protocol_version = $5,\n protocol_version_patch = $6\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Text", + "Int4", + "Int2", + "Text", + "Int4", + "Int4" + ] + }, + "nullable": [] + }, + "hash": "2e6e2b68efc28114f44616b68fcf1d4d9a4b83a8b42846d8373ea13b96d612cf" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-bc0b9c8d1bc2e1c782bd1fb8df16682c19f3f44dd424c81e0f8e94c59f4a8780.json b/prover/crates/lib/prover_dal/.sqlx/query-35a76415cb746d03da31481edc65adefab0bf3abf6853a6d36123c8adcaf813b.json similarity index 55% rename from prover/crates/lib/prover_dal/.sqlx/query-bc0b9c8d1bc2e1c782bd1fb8df16682c19f3f44dd424c81e0f8e94c59f4a8780.json rename to prover/crates/lib/prover_dal/.sqlx/query-35a76415cb746d03da31481edc65adefab0bf3abf6853a6d36123c8adcaf813b.json index 2e1e9f499ff7..bf8db798e7d4 100644 --- a/prover/crates/lib/prover_dal/.sqlx/query-bc0b9c8d1bc2e1c782bd1fb8df16682c19f3f44dd424c81e0f8e94c59f4a8780.json +++ b/prover/crates/lib/prover_dal/.sqlx/query-35a76415cb746d03da31481edc65adefab0bf3abf6853a6d36123c8adcaf813b.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n UPDATE\n scheduler_witness_jobs_fri\n SET\n status = 'queued',\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n (\n status = 'in_progress'\n AND processing_started_at <= NOW() - $1 :: INTERVAL\n AND attempts < $2\n )\n OR (\n status = 'failed'\n AND attempts < $2\n )\n RETURNING\n l1_batch_number,\n status,\n attempts,\n error,\n picked_by\n ", + "query": "\n UPDATE scheduler_witness_jobs_fri\n SET\n status = 'queued',\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n l1_batch_number = $1\n AND attempts >= $2\n AND (\n status = 'in_progress'\n OR status = 'failed'\n )\n RETURNING\n l1_batch_number,\n status,\n attempts,\n error,\n picked_by\n ", "describe": { "columns": [ { @@ -31,7 +31,7 @@ ], "parameters": { "Left": [ - "Interval", + "Int8", "Int2" ] }, @@ -43,5 +43,5 @@ true ] }, - "hash": "bc0b9c8d1bc2e1c782bd1fb8df16682c19f3f44dd424c81e0f8e94c59f4a8780" + "hash": "35a76415cb746d03da31481edc65adefab0bf3abf6853a6d36123c8adcaf813b" } diff --git a/prover/crates/lib/prover_dal/.sqlx/query-36ab4be452fab7229a4b1c03675ec0b54094da72d2d9de5e3948001164bf739c.json b/prover/crates/lib/prover_dal/.sqlx/query-36ab4be452fab7229a4b1c03675ec0b54094da72d2d9de5e3948001164bf739c.json deleted file mode 100644 index 4f63ae1444cf..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-36ab4be452fab7229a4b1c03675ec0b54094da72d2d9de5e3948001164bf739c.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE\n node_aggregation_witness_jobs_fri\n SET\n aggregations_url = $1,\n number_of_dependent_jobs = $5,\n updated_at = NOW()\n WHERE\n l1_batch_number = $2\n AND circuit_id = $3\n AND depth = $4\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Text", - "Int8", - "Int2", - "Int4", - "Int4" - ] - }, - "nullable": [] - }, - "hash": "36ab4be452fab7229a4b1c03675ec0b54094da72d2d9de5e3948001164bf739c" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-e09cff7ded7376ab0cec94e05e24f3fe0a8d05c55536b230594c1e1f17e0d9d8.json b/prover/crates/lib/prover_dal/.sqlx/query-3727d5614d2fe2a4d96f880eb72cd48c95ca5b4520dde415a2b5ff32ece47c86.json similarity index 55% rename from prover/crates/lib/prover_dal/.sqlx/query-e09cff7ded7376ab0cec94e05e24f3fe0a8d05c55536b230594c1e1f17e0d9d8.json rename to prover/crates/lib/prover_dal/.sqlx/query-3727d5614d2fe2a4d96f880eb72cd48c95ca5b4520dde415a2b5ff32ece47c86.json index 0381ba2ca208..d7eb6a32b421 100644 --- a/prover/crates/lib/prover_dal/.sqlx/query-e09cff7ded7376ab0cec94e05e24f3fe0a8d05c55536b230594c1e1f17e0d9d8.json +++ b/prover/crates/lib/prover_dal/.sqlx/query-3727d5614d2fe2a4d96f880eb72cd48c95ca5b4520dde415a2b5ff32ece47c86.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n UPDATE\n witness_inputs_fri\n SET\n status = 'queued',\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n (\n status = 'in_progress'\n AND processing_started_at <= NOW() - $1 :: INTERVAL\n AND attempts < $2\n )\n OR (\n status = 'failed'\n AND attempts < $2\n )\n RETURNING\n l1_batch_number,\n status,\n attempts,\n error,\n picked_by\n ", + "query": "\n UPDATE witness_inputs_fri\n SET\n status = 'queued',\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n l1_batch_number = $1\n AND attempts >= $2\n AND (\n status = 'in_progress'\n OR status = 'failed'\n )\n RETURNING\n l1_batch_number,\n status,\n attempts,\n error,\n picked_by\n ", "describe": { "columns": [ { @@ -31,7 +31,7 @@ ], "parameters": { "Left": [ - "Interval", + "Int8", "Int2" ] }, @@ -43,5 +43,5 @@ true ] }, - "hash": "e09cff7ded7376ab0cec94e05e24f3fe0a8d05c55536b230594c1e1f17e0d9d8" + "hash": "3727d5614d2fe2a4d96f880eb72cd48c95ca5b4520dde415a2b5ff32ece47c86" } diff --git a/prover/crates/lib/prover_dal/.sqlx/query-2b9d06b673ac6bbc908227eff0ff19ec63114a652fdebce5a872a8eb694626fe.json b/prover/crates/lib/prover_dal/.sqlx/query-37ad15f54f4a6f4f79c71a857f3a8d4cc59246dda91b19526e73f27a17c8e3da.json similarity index 55% rename from prover/crates/lib/prover_dal/.sqlx/query-2b9d06b673ac6bbc908227eff0ff19ec63114a652fdebce5a872a8eb694626fe.json rename to prover/crates/lib/prover_dal/.sqlx/query-37ad15f54f4a6f4f79c71a857f3a8d4cc59246dda91b19526e73f27a17c8e3da.json index 90486fd90138..c97fe7f4042b 100644 --- a/prover/crates/lib/prover_dal/.sqlx/query-2b9d06b673ac6bbc908227eff0ff19ec63114a652fdebce5a872a8eb694626fe.json +++ b/prover/crates/lib/prover_dal/.sqlx/query-37ad15f54f4a6f4f79c71a857f3a8d4cc59246dda91b19526e73f27a17c8e3da.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n UPDATE\n recursion_tip_witness_jobs_fri\n SET\n status = 'queued',\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n (\n status = 'in_progress'\n AND processing_started_at <= NOW() - $1 :: INTERVAL\n AND attempts < $2\n )\n OR (\n status = 'failed'\n AND attempts < $2\n )\n RETURNING\n l1_batch_number,\n status,\n attempts,\n error,\n picked_by\n ", + "query": "\n UPDATE recursion_tip_witness_jobs_fri\n SET\n status = 'queued',\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n l1_batch_number = $1\n AND attempts >= $2\n AND (\n status = 'in_progress'\n OR status = 'failed'\n )\n RETURNING\n l1_batch_number,\n status,\n attempts,\n error,\n picked_by\n ", "describe": { "columns": [ { @@ -31,7 +31,7 @@ ], "parameters": { "Left": [ - "Interval", + "Int8", "Int2" ] }, @@ -43,5 +43,5 @@ true ] }, - "hash": "2b9d06b673ac6bbc908227eff0ff19ec63114a652fdebce5a872a8eb694626fe" + "hash": "37ad15f54f4a6f4f79c71a857f3a8d4cc59246dda91b19526e73f27a17c8e3da" } diff --git a/prover/crates/lib/prover_dal/.sqlx/query-3941da180ee62a7c5d4e392ff4fe2d3a6ebb3657862b91e3ece34119f098fc2d.json b/prover/crates/lib/prover_dal/.sqlx/query-3941da180ee62a7c5d4e392ff4fe2d3a6ebb3657862b91e3ece34119f098fc2d.json new file mode 100644 index 000000000000..d0dd5f6976b5 --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-3941da180ee62a7c5d4e392ff4fe2d3a6ebb3657862b91e3ece34119f098fc2d.json @@ -0,0 +1,32 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE node_aggregation_witness_jobs_fri\n SET\n status = 'queued'\n WHERE\n (l1_batch_number, circuit_id, depth) IN (\n SELECT\n prover_jobs_fri.l1_batch_number,\n prover_jobs_fri.circuit_id,\n prover_jobs_fri.depth\n FROM\n prover_jobs_fri\n JOIN node_aggregation_witness_jobs_fri nawj ON prover_jobs_fri.l1_batch_number = nawj.l1_batch_number\n AND prover_jobs_fri.circuit_id = nawj.circuit_id\n AND prover_jobs_fri.depth = nawj.depth\n WHERE\n nawj.status = 'waiting_for_proofs'\n AND prover_jobs_fri.status = 'successful'\n AND prover_jobs_fri.aggregation_round = 2\n GROUP BY\n prover_jobs_fri.l1_batch_number,\n prover_jobs_fri.circuit_id,\n prover_jobs_fri.depth,\n nawj.number_of_dependent_jobs\n HAVING\n COUNT(*) = nawj.number_of_dependent_jobs\n )\n RETURNING\n l1_batch_number,\n circuit_id,\n depth;\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "l1_batch_number", + "type_info": "Int8" + }, + { + "ordinal": 1, + "name": "circuit_id", + "type_info": "Int2" + }, + { + "ordinal": 2, + "name": "depth", + "type_info": "Int4" + } + ], + "parameters": { + "Left": [] + }, + "nullable": [ + false, + false, + false + ] + }, + "hash": "3941da180ee62a7c5d4e392ff4fe2d3a6ebb3657862b91e3ece34119f098fc2d" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-3df3c567f7f875cde9ea8c723b1fe6ee0c0c54e68daabbe2eab5c7ce9b1cd4bc.json b/prover/crates/lib/prover_dal/.sqlx/query-3df3c567f7f875cde9ea8c723b1fe6ee0c0c54e68daabbe2eab5c7ce9b1cd4bc.json deleted file mode 100644 index 04f7fe256bc0..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-3df3c567f7f875cde9ea8c723b1fe6ee0c0c54e68daabbe2eab5c7ce9b1cd4bc.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE\n prover_jobs_fri\n SET\n status = 'in_progress',\n attempts = attempts + 1,\n updated_at = NOW(),\n processing_started_at = NOW(),\n picked_by = $3\n WHERE\n id = (\n SELECT\n id\n FROM\n prover_jobs_fri\n WHERE\n status = 'queued'\n AND protocol_version = $1\n AND protocol_version_patch = $2\n ORDER BY\n l1_batch_number ASC,\n aggregation_round ASC,\n circuit_id ASC,\n id ASC\n LIMIT\n 1 FOR\n UPDATE\n SKIP LOCKED\n )\n RETURNING\n prover_jobs_fri.id,\n prover_jobs_fri.l1_batch_number,\n prover_jobs_fri.circuit_id,\n prover_jobs_fri.aggregation_round,\n prover_jobs_fri.sequence_number,\n prover_jobs_fri.depth,\n prover_jobs_fri.is_node_final_proof\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "id", - "type_info": "Int8" - }, - { - "ordinal": 1, - "name": "l1_batch_number", - "type_info": "Int8" - }, - { - "ordinal": 2, - "name": "circuit_id", - "type_info": "Int2" - }, - { - "ordinal": 3, - "name": "aggregation_round", - "type_info": "Int2" - }, - { - "ordinal": 4, - "name": "sequence_number", - "type_info": "Int4" - }, - { - "ordinal": 5, - "name": "depth", - "type_info": "Int4" - }, - { - "ordinal": 6, - "name": "is_node_final_proof", - "type_info": "Bool" - } - ], - "parameters": { - "Left": [ - "Int4", - "Int4", - "Text" - ] - }, - "nullable": [ - false, - false, - false, - false, - false, - false, - false - ] - }, - "hash": "3df3c567f7f875cde9ea8c723b1fe6ee0c0c54e68daabbe2eab5c7ce9b1cd4bc" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-3e0a1ebc684810c09ff83784bdd0ad195b0dd2a8ce56b1a9eb531103130b5e3e.json b/prover/crates/lib/prover_dal/.sqlx/query-3e0a1ebc684810c09ff83784bdd0ad195b0dd2a8ce56b1a9eb531103130b5e3e.json new file mode 100644 index 000000000000..7646c87b847e --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-3e0a1ebc684810c09ff83784bdd0ad195b0dd2a8ce56b1a9eb531103130b5e3e.json @@ -0,0 +1,62 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE prover_jobs_fri\n SET\n status = 'in_progress',\n attempts = attempts + 1,\n processing_started_at = NOW(),\n updated_at = NOW(),\n picked_by = $5\n WHERE\n id = (\n SELECT\n pj.id\n FROM\n (\n SELECT\n *\n FROM\n UNNEST($1::SMALLINT[], $2::SMALLINT[])\n ) AS tuple (circuit_id, ROUND)\n JOIN LATERAL (\n SELECT\n *\n FROM\n prover_jobs_fri AS pj\n WHERE\n pj.status = 'queued'\n AND pj.protocol_version = $3\n AND pj.protocol_version_patch = $4\n AND pj.circuit_id = tuple.circuit_id\n AND pj.aggregation_round = tuple.round\n ORDER BY\n pj.l1_batch_number ASC,\n pj.id ASC\n LIMIT\n 1\n ) AS pj ON TRUE\n ORDER BY\n pj.l1_batch_number ASC,\n pj.aggregation_round DESC,\n pj.id ASC\n LIMIT\n 1\n FOR UPDATE\n SKIP LOCKED\n )\n RETURNING\n prover_jobs_fri.id,\n prover_jobs_fri.l1_batch_number,\n prover_jobs_fri.circuit_id,\n prover_jobs_fri.aggregation_round,\n prover_jobs_fri.sequence_number,\n prover_jobs_fri.depth,\n prover_jobs_fri.is_node_final_proof\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "id", + "type_info": "Int8" + }, + { + "ordinal": 1, + "name": "l1_batch_number", + "type_info": "Int8" + }, + { + "ordinal": 2, + "name": "circuit_id", + "type_info": "Int2" + }, + { + "ordinal": 3, + "name": "aggregation_round", + "type_info": "Int2" + }, + { + "ordinal": 4, + "name": "sequence_number", + "type_info": "Int4" + }, + { + "ordinal": 5, + "name": "depth", + "type_info": "Int4" + }, + { + "ordinal": 6, + "name": "is_node_final_proof", + "type_info": "Bool" + } + ], + "parameters": { + "Left": [ + "Int2Array", + "Int2Array", + "Int4", + "Int4", + "Text" + ] + }, + "nullable": [ + false, + false, + false, + false, + false, + false, + false + ] + }, + "hash": "3e0a1ebc684810c09ff83784bdd0ad195b0dd2a8ce56b1a9eb531103130b5e3e" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-3ec365c5c81f4678a905ae5bbd48b87ead36f593488437c6f67da629ca81e4fa.json b/prover/crates/lib/prover_dal/.sqlx/query-3ec365c5c81f4678a905ae5bbd48b87ead36f593488437c6f67da629ca81e4fa.json new file mode 100644 index 000000000000..5815e65636cb --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-3ec365c5c81f4678a905ae5bbd48b87ead36f593488437c6f67da629ca81e4fa.json @@ -0,0 +1,14 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE scheduler_witness_jobs_fri\n SET\n status = 'queued'\n WHERE\n l1_batch_number = $1\n AND status != 'successful'\n AND status != 'in_progress'\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8" + ] + }, + "nullable": [] + }, + "hash": "3ec365c5c81f4678a905ae5bbd48b87ead36f593488437c6f67da629ca81e4fa" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-3fc24886802a354174796071f46aa0a0ad5fba0f6dbc4d8f36c79171a8be8f42.json b/prover/crates/lib/prover_dal/.sqlx/query-3fc24886802a354174796071f46aa0a0ad5fba0f6dbc4d8f36c79171a8be8f42.json deleted file mode 100644 index 71456c7912e2..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-3fc24886802a354174796071f46aa0a0ad5fba0f6dbc4d8f36c79171a8be8f42.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE\n gpu_prover_queue_fri\n SET\n instance_status = $1,\n updated_at = NOW()\n WHERE\n instance_host = $2 :: TEXT :: inet\n AND instance_port = $3\n AND zone = $4\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Text", - "Text", - "Int4", - "Text" - ] - }, - "nullable": [] - }, - "hash": "3fc24886802a354174796071f46aa0a0ad5fba0f6dbc4d8f36c79171a8be8f42" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-40e3b4646af1abe9c7b56206d73091e0d7c5ada67cb757b874a5c62e32184666.json b/prover/crates/lib/prover_dal/.sqlx/query-40e3b4646af1abe9c7b56206d73091e0d7c5ada67cb757b874a5c62e32184666.json deleted file mode 100644 index 95c3539e6f41..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-40e3b4646af1abe9c7b56206d73091e0d7c5ada67cb757b874a5c62e32184666.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE\n recursion_tip_witness_jobs_fri\n SET\n status = 'successful',\n updated_at = NOW(),\n time_taken = $1\n WHERE\n l1_batch_number = $2\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Time", - "Int8" - ] - }, - "nullable": [] - }, - "hash": "40e3b4646af1abe9c7b56206d73091e0d7c5ada67cb757b874a5c62e32184666" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-412ef600a2f6025d8c22c2df8a497ed410fa47b268a66f1fc56d469c06ae50af.json b/prover/crates/lib/prover_dal/.sqlx/query-412ef600a2f6025d8c22c2df8a497ed410fa47b268a66f1fc56d469c06ae50af.json new file mode 100644 index 000000000000..f4d5f62a2615 --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-412ef600a2f6025d8c22c2df8a497ed410fa47b268a66f1fc56d469c06ae50af.json @@ -0,0 +1,12 @@ +{ + "db_name": "PostgreSQL", + "query": "\n DELETE FROM prover_fri_protocol_versions\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [] + }, + "nullable": [] + }, + "hash": "412ef600a2f6025d8c22c2df8a497ed410fa47b268a66f1fc56d469c06ae50af" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-41af30620f8a1f20b8a6c46be162601d35fd2881ac1fd070f0f1a8add4bc388d.json b/prover/crates/lib/prover_dal/.sqlx/query-41af30620f8a1f20b8a6c46be162601d35fd2881ac1fd070f0f1a8add4bc388d.json new file mode 100644 index 000000000000..b65633a904e3 --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-41af30620f8a1f20b8a6c46be162601d35fd2881ac1fd070f0f1a8add4bc388d.json @@ -0,0 +1,30 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE recursion_tip_witness_jobs_fri\n SET\n status = 'in_progress',\n attempts = attempts + 1,\n updated_at = NOW(),\n processing_started_at = NOW(),\n picked_by = $3\n WHERE\n l1_batch_number = (\n SELECT\n l1_batch_number\n FROM\n recursion_tip_witness_jobs_fri\n WHERE\n status = 'queued'\n AND protocol_version = $1\n AND protocol_version_patch = $2\n ORDER BY\n l1_batch_number ASC\n LIMIT\n 1\n FOR UPDATE\n SKIP LOCKED\n )\n RETURNING\n recursion_tip_witness_jobs_fri.l1_batch_number,\n recursion_tip_witness_jobs_fri.number_of_final_node_jobs\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "l1_batch_number", + "type_info": "Int8" + }, + { + "ordinal": 1, + "name": "number_of_final_node_jobs", + "type_info": "Int4" + } + ], + "parameters": { + "Left": [ + "Int4", + "Int4", + "Text" + ] + }, + "nullable": [ + false, + false + ] + }, + "hash": "41af30620f8a1f20b8a6c46be162601d35fd2881ac1fd070f0f1a8add4bc388d" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-46c4696fff5a4b8cc5cb46b05645da82065836fe17687ffad04126a6a8b2b27c.json b/prover/crates/lib/prover_dal/.sqlx/query-46c4696fff5a4b8cc5cb46b05645da82065836fe17687ffad04126a6a8b2b27c.json new file mode 100644 index 000000000000..5ebb1951966d --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-46c4696fff5a4b8cc5cb46b05645da82065836fe17687ffad04126a6a8b2b27c.json @@ -0,0 +1,15 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE leaf_aggregation_witness_jobs_fri\n SET\n status = 'successful',\n updated_at = NOW(),\n time_taken = $1\n WHERE\n id = $2\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Time", + "Int8" + ] + }, + "nullable": [] + }, + "hash": "46c4696fff5a4b8cc5cb46b05645da82065836fe17687ffad04126a6a8b2b27c" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-4836d3766c6d31566a66ffb2b81874ec8fc1800b848951cf264b3f309701c52f.json b/prover/crates/lib/prover_dal/.sqlx/query-4836d3766c6d31566a66ffb2b81874ec8fc1800b848951cf264b3f309701c52f.json deleted file mode 100644 index d8988ce8850b..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-4836d3766c6d31566a66ffb2b81874ec8fc1800b848951cf264b3f309701c52f.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE\n scheduler_witness_jobs_fri\n SET\n status = 'queued',\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n l1_batch_number = $1\n AND attempts >= $2\n AND (\n status = 'in_progress'\n OR status = 'failed'\n )\n RETURNING\n l1_batch_number,\n status,\n attempts,\n error,\n picked_by\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "l1_batch_number", - "type_info": "Int8" - }, - { - "ordinal": 1, - "name": "status", - "type_info": "Text" - }, - { - "ordinal": 2, - "name": "attempts", - "type_info": "Int2" - }, - { - "ordinal": 3, - "name": "error", - "type_info": "Text" - }, - { - "ordinal": 4, - "name": "picked_by", - "type_info": "Text" - } - ], - "parameters": { - "Left": [ - "Int8", - "Int2" - ] - }, - "nullable": [ - false, - false, - false, - true, - true - ] - }, - "hash": "4836d3766c6d31566a66ffb2b81874ec8fc1800b848951cf264b3f309701c52f" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-4931bdce191a7d30d2887bb069b0ee050f09ae3886243c9af0677ad20e115a01.json b/prover/crates/lib/prover_dal/.sqlx/query-4931bdce191a7d30d2887bb069b0ee050f09ae3886243c9af0677ad20e115a01.json deleted file mode 100644 index 2e6e5db6e8d6..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-4931bdce191a7d30d2887bb069b0ee050f09ae3886243c9af0677ad20e115a01.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE\n node_aggregation_witness_jobs_fri\n SET\n status = 'successful',\n updated_at = NOW(),\n time_taken = $1\n WHERE\n id = $2\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Time", - "Int8" - ] - }, - "nullable": [] - }, - "hash": "4931bdce191a7d30d2887bb069b0ee050f09ae3886243c9af0677ad20e115a01" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-51ec4739f25b233efe6c2d67620b25b709ba99059f4a2f5e1bc5fd17f27c1244.json b/prover/crates/lib/prover_dal/.sqlx/query-51ec4739f25b233efe6c2d67620b25b709ba99059f4a2f5e1bc5fd17f27c1244.json deleted file mode 100644 index 833457fbbd67..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-51ec4739f25b233efe6c2d67620b25b709ba99059f4a2f5e1bc5fd17f27c1244.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n DELETE FROM\n prover_fri_protocol_versions\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [] - }, - "nullable": [] - }, - "hash": "51ec4739f25b233efe6c2d67620b25b709ba99059f4a2f5e1bc5fd17f27c1244" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-534822a226068cde83ad8c30b569a8f447824a5ab466bb6eea1710e8aeaa2c56.json b/prover/crates/lib/prover_dal/.sqlx/query-534822a226068cde83ad8c30b569a8f447824a5ab466bb6eea1710e8aeaa2c56.json new file mode 100644 index 000000000000..a85b4895b451 --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-534822a226068cde83ad8c30b569a8f447824a5ab466bb6eea1710e8aeaa2c56.json @@ -0,0 +1,15 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE proof_compression_jobs_fri\n SET\n status = $1,\n updated_at = NOW()\n WHERE\n l1_batch_number = $2\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Text", + "Int8" + ] + }, + "nullable": [] + }, + "hash": "534822a226068cde83ad8c30b569a8f447824a5ab466bb6eea1710e8aeaa2c56" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-57ac943c57d905575f5dcc9d94031c32226a54cd980aa99a38289452fbb100d4.json b/prover/crates/lib/prover_dal/.sqlx/query-57ac943c57d905575f5dcc9d94031c32226a54cd980aa99a38289452fbb100d4.json deleted file mode 100644 index dfa97e38db03..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-57ac943c57d905575f5dcc9d94031c32226a54cd980aa99a38289452fbb100d4.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n DELETE FROM\n prover_jobs_fri\n WHERE\n l1_batch_number = $1;\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8" - ] - }, - "nullable": [] - }, - "hash": "57ac943c57d905575f5dcc9d94031c32226a54cd980aa99a38289452fbb100d4" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-5a782ff686ca6b194013af509c1c0094aba5c7966739d2d56ac74ed28ceb715f.json b/prover/crates/lib/prover_dal/.sqlx/query-5a782ff686ca6b194013af509c1c0094aba5c7966739d2d56ac74ed28ceb715f.json deleted file mode 100644 index 653bc1320470..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-5a782ff686ca6b194013af509c1c0094aba5c7966739d2d56ac74ed28ceb715f.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE\n gpu_prover_queue_fri\n SET\n instance_status = 'available',\n updated_at = NOW()\n WHERE\n instance_host = $1 :: TEXT :: inet\n AND instance_port = $2\n AND instance_status = 'full'\n AND zone = $3\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Text", - "Int4", - "Text" - ] - }, - "nullable": [] - }, - "hash": "5a782ff686ca6b194013af509c1c0094aba5c7966739d2d56ac74ed28ceb715f" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-5fe7345162c22fab6b2bb13e29d701950441fcbf9784a6634ce020262e170951.json b/prover/crates/lib/prover_dal/.sqlx/query-5fe7345162c22fab6b2bb13e29d701950441fcbf9784a6634ce020262e170951.json deleted file mode 100644 index fb3e3214462b..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-5fe7345162c22fab6b2bb13e29d701950441fcbf9784a6634ce020262e170951.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE\n prover_jobs_fri\n SET\n status = $1,\n attempts = $2\n WHERE\n l1_batch_number = $3\n AND sequence_number = $4\n AND aggregation_round = $5\n AND circuit_id = $6\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Text", - "Int2", - "Int8", - "Int4", - "Int2", - "Int2" - ] - }, - "nullable": [] - }, - "hash": "5fe7345162c22fab6b2bb13e29d701950441fcbf9784a6634ce020262e170951" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-6a77f68e7c3fa1d3bbf2fd6195e1810d85803da953bd7d5c46b34619e05374ed.json b/prover/crates/lib/prover_dal/.sqlx/query-6a77f68e7c3fa1d3bbf2fd6195e1810d85803da953bd7d5c46b34619e05374ed.json deleted file mode 100644 index 10eb050ee9a6..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-6a77f68e7c3fa1d3bbf2fd6195e1810d85803da953bd7d5c46b34619e05374ed.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE\n prover_jobs_fri\n SET\n status = $1\n WHERE\n l1_batch_number = $2\n AND sequence_number = $3\n AND aggregation_round = $4\n AND circuit_id = $5\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Text", - "Int8", - "Int4", - "Int2", - "Int2" - ] - }, - "nullable": [] - }, - "hash": "6a77f68e7c3fa1d3bbf2fd6195e1810d85803da953bd7d5c46b34619e05374ed" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-6de8db565e0604ca30cdf78d3d792dd0bec10a53fa6d9052f9aeeeed8080d304.json b/prover/crates/lib/prover_dal/.sqlx/query-6de8db565e0604ca30cdf78d3d792dd0bec10a53fa6d9052f9aeeeed8080d304.json deleted file mode 100644 index dcc294f98432..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-6de8db565e0604ca30cdf78d3d792dd0bec10a53fa6d9052f9aeeeed8080d304.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n DELETE FROM\n proof_compression_jobs_fri\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [] - }, - "nullable": [] - }, - "hash": "6de8db565e0604ca30cdf78d3d792dd0bec10a53fa6d9052f9aeeeed8080d304" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-73266a8526c6adc315900e2e95441976a264759c4060c1a38e466ee2052fc17d.json b/prover/crates/lib/prover_dal/.sqlx/query-73266a8526c6adc315900e2e95441976a264759c4060c1a38e466ee2052fc17d.json new file mode 100644 index 000000000000..f8b141a8dac9 --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-73266a8526c6adc315900e2e95441976a264759c4060c1a38e466ee2052fc17d.json @@ -0,0 +1,15 @@ +{ + "db_name": "PostgreSQL", + "query": "\n INSERT INTO\n recursion_tip_witness_jobs_fri (l1_batch_number, status, number_of_final_node_jobs, created_at, updated_at)\n VALUES\n ($1, 'waiting_for_proofs', 1, NOW(), NOW())\n ON CONFLICT (l1_batch_number) DO\n UPDATE\n SET\n status = $2\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8", + "Text" + ] + }, + "nullable": [] + }, + "hash": "73266a8526c6adc315900e2e95441976a264759c4060c1a38e466ee2052fc17d" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-c5ddcf14f794c0b329efc7802c201f40b839fecf8c4388ec0c0089b1548fef08.json b/prover/crates/lib/prover_dal/.sqlx/query-764693ceeb45f8478a20242b592d419667f11d80036cda021ecbf23b0b5f7f42.json similarity index 54% rename from prover/crates/lib/prover_dal/.sqlx/query-c5ddcf14f794c0b329efc7802c201f40b839fecf8c4388ec0c0089b1548fef08.json rename to prover/crates/lib/prover_dal/.sqlx/query-764693ceeb45f8478a20242b592d419667f11d80036cda021ecbf23b0b5f7f42.json index c115530d8aa7..aac0fcd420cd 100644 --- a/prover/crates/lib/prover_dal/.sqlx/query-c5ddcf14f794c0b329efc7802c201f40b839fecf8c4388ec0c0089b1548fef08.json +++ b/prover/crates/lib/prover_dal/.sqlx/query-764693ceeb45f8478a20242b592d419667f11d80036cda021ecbf23b0b5f7f42.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n node_aggregation_witness_jobs_fri (\n l1_batch_number,\n circuit_id,\n depth,\n aggregations_url,\n number_of_dependent_jobs,\n protocol_version,\n status,\n created_at,\n updated_at,\n protocol_version_patch\n )\n VALUES\n (\n $1,\n $2,\n $3,\n $4,\n $5,\n $6,\n 'waiting_for_proofs',\n NOW(),\n NOW(),\n $7\n ) ON CONFLICT (l1_batch_number, circuit_id, depth) DO\n UPDATE\n SET\n updated_at = NOW()\n ", + "query": "\n INSERT INTO\n node_aggregation_witness_jobs_fri (\n l1_batch_number,\n circuit_id,\n depth,\n aggregations_url,\n number_of_dependent_jobs,\n protocol_version,\n status,\n created_at,\n updated_at,\n protocol_version_patch\n )\n VALUES\n ($1, $2, $3, $4, $5, $6, 'waiting_for_proofs', NOW(), NOW(), $7)\n ON CONFLICT (l1_batch_number, circuit_id, depth) DO\n UPDATE\n SET\n updated_at = NOW()\n ", "describe": { "columns": [], "parameters": { @@ -16,5 +16,5 @@ }, "nullable": [] }, - "hash": "c5ddcf14f794c0b329efc7802c201f40b839fecf8c4388ec0c0089b1548fef08" + "hash": "764693ceeb45f8478a20242b592d419667f11d80036cda021ecbf23b0b5f7f42" } diff --git a/prover/crates/lib/prover_dal/.sqlx/query-786246e83babf9c07589f6dc61ead2ccc0aeaaecbb8989eb738a01ea253a237b.json b/prover/crates/lib/prover_dal/.sqlx/query-786246e83babf9c07589f6dc61ead2ccc0aeaaecbb8989eb738a01ea253a237b.json deleted file mode 100644 index 69e835287576..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-786246e83babf9c07589f6dc61ead2ccc0aeaaecbb8989eb738a01ea253a237b.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n DELETE FROM\n prover_jobs_fri\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [] - }, - "nullable": [] - }, - "hash": "786246e83babf9c07589f6dc61ead2ccc0aeaaecbb8989eb738a01ea253a237b" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-7a2145e2234a7896031bbc1ce82715e903f3b399886c2c73e838bd924fed6776.json b/prover/crates/lib/prover_dal/.sqlx/query-7a2145e2234a7896031bbc1ce82715e903f3b399886c2c73e838bd924fed6776.json new file mode 100644 index 000000000000..73a8c33695b1 --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-7a2145e2234a7896031bbc1ce82715e903f3b399886c2c73e838bd924fed6776.json @@ -0,0 +1,18 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE node_aggregation_witness_jobs_fri\n SET\n aggregations_url = $1,\n number_of_dependent_jobs = $5,\n updated_at = NOW()\n WHERE\n l1_batch_number = $2\n AND circuit_id = $3\n AND depth = $4\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Text", + "Int8", + "Int2", + "Int4", + "Int4" + ] + }, + "nullable": [] + }, + "hash": "7a2145e2234a7896031bbc1ce82715e903f3b399886c2c73e838bd924fed6776" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-7bae6a889d785dc526970cf022fba7f33558aa20961f475823e0216873a9e8a4.json b/prover/crates/lib/prover_dal/.sqlx/query-7bae6a889d785dc526970cf022fba7f33558aa20961f475823e0216873a9e8a4.json deleted file mode 100644 index 73cde1aba850..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-7bae6a889d785dc526970cf022fba7f33558aa20961f475823e0216873a9e8a4.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE\n proof_compression_jobs_fri\n SET\n status = $1,\n updated_at = NOW(),\n time_taken = $2,\n l1_proof_blob_url = $3\n WHERE\n l1_batch_number = $4\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Text", - "Time", - "Text", - "Int8" - ] - }, - "nullable": [] - }, - "hash": "7bae6a889d785dc526970cf022fba7f33558aa20961f475823e0216873a9e8a4" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-7d20c0bf35625185c1f6c675aa8fcddbb47c5e9965443f118f8edd7d562734a2.json b/prover/crates/lib/prover_dal/.sqlx/query-7d20c0bf35625185c1f6c675aa8fcddbb47c5e9965443f118f8edd7d562734a2.json new file mode 100644 index 000000000000..140b8f126750 --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-7d20c0bf35625185c1f6c675aa8fcddbb47c5e9965443f118f8edd7d562734a2.json @@ -0,0 +1,60 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE prover_jobs_fri\n SET\n status = 'in_progress',\n attempts = attempts + 1,\n updated_at = NOW(),\n processing_started_at = NOW(),\n picked_by = $3\n WHERE\n id = (\n SELECT\n id\n FROM\n prover_jobs_fri\n WHERE\n status = 'queued'\n AND protocol_version = $1\n AND protocol_version_patch = $2\n ORDER BY\n l1_batch_number ASC,\n aggregation_round ASC,\n circuit_id ASC,\n id ASC\n LIMIT\n 1\n FOR UPDATE\n SKIP LOCKED\n )\n RETURNING\n prover_jobs_fri.id,\n prover_jobs_fri.l1_batch_number,\n prover_jobs_fri.circuit_id,\n prover_jobs_fri.aggregation_round,\n prover_jobs_fri.sequence_number,\n prover_jobs_fri.depth,\n prover_jobs_fri.is_node_final_proof\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "id", + "type_info": "Int8" + }, + { + "ordinal": 1, + "name": "l1_batch_number", + "type_info": "Int8" + }, + { + "ordinal": 2, + "name": "circuit_id", + "type_info": "Int2" + }, + { + "ordinal": 3, + "name": "aggregation_round", + "type_info": "Int2" + }, + { + "ordinal": 4, + "name": "sequence_number", + "type_info": "Int4" + }, + { + "ordinal": 5, + "name": "depth", + "type_info": "Int4" + }, + { + "ordinal": 6, + "name": "is_node_final_proof", + "type_info": "Bool" + } + ], + "parameters": { + "Left": [ + "Int4", + "Int4", + "Text" + ] + }, + "nullable": [ + false, + false, + false, + false, + false, + false, + false + ] + }, + "hash": "7d20c0bf35625185c1f6c675aa8fcddbb47c5e9965443f118f8edd7d562734a2" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-0d434d0e100bbcfaf56fdb598f9d1c5fa2958f06898a8c67079a7ccf0c340df2.json b/prover/crates/lib/prover_dal/.sqlx/query-7effbacbdcc4bd762386351755f4f32042dfead8a37401558f5fd3b03480f2dd.json similarity index 64% rename from prover/crates/lib/prover_dal/.sqlx/query-0d434d0e100bbcfaf56fdb598f9d1c5fa2958f06898a8c67079a7ccf0c340df2.json rename to prover/crates/lib/prover_dal/.sqlx/query-7effbacbdcc4bd762386351755f4f32042dfead8a37401558f5fd3b03480f2dd.json index bdbb5d7c3ebc..3064489830d9 100644 --- a/prover/crates/lib/prover_dal/.sqlx/query-0d434d0e100bbcfaf56fdb598f9d1c5fa2958f06898a8c67079a7ccf0c340df2.json +++ b/prover/crates/lib/prover_dal/.sqlx/query-7effbacbdcc4bd762386351755f4f32042dfead8a37401558f5fd3b03480f2dd.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n UPDATE\n node_aggregation_witness_jobs_fri\n SET\n status = 'in_progress',\n attempts = attempts + 1,\n updated_at = NOW(),\n processing_started_at = NOW(),\n picked_by = $3\n WHERE\n id = (\n SELECT\n id\n FROM\n node_aggregation_witness_jobs_fri\n WHERE\n status = 'queued'\n AND protocol_version = $1\n AND protocol_version_patch = $2\n ORDER BY\n l1_batch_number ASC,\n depth ASC,\n id ASC\n LIMIT\n 1 FOR\n UPDATE\n SKIP LOCKED\n )\n RETURNING\n node_aggregation_witness_jobs_fri.*\n ", + "query": "\n UPDATE node_aggregation_witness_jobs_fri\n SET\n status = 'in_progress',\n attempts = attempts + 1,\n updated_at = NOW(),\n processing_started_at = NOW(),\n picked_by = $3\n WHERE\n id = (\n SELECT\n id\n FROM\n node_aggregation_witness_jobs_fri\n WHERE\n status = 'queued'\n AND protocol_version = $1\n AND protocol_version_patch = $2\n ORDER BY\n l1_batch_number ASC,\n depth ASC,\n id ASC\n LIMIT\n 1\n FOR UPDATE\n SKIP LOCKED\n )\n RETURNING\n node_aggregation_witness_jobs_fri.*\n ", "describe": { "columns": [ { @@ -110,5 +110,5 @@ false ] }, - "hash": "0d434d0e100bbcfaf56fdb598f9d1c5fa2958f06898a8c67079a7ccf0c340df2" + "hash": "7effbacbdcc4bd762386351755f4f32042dfead8a37401558f5fd3b03480f2dd" } diff --git a/prover/crates/lib/prover_dal/.sqlx/query-8357972a21b39644e4cbe4bedc3b6d9065bf4494daf8f7632ab2bfe055773f7b.json b/prover/crates/lib/prover_dal/.sqlx/query-8357972a21b39644e4cbe4bedc3b6d9065bf4494daf8f7632ab2bfe055773f7b.json new file mode 100644 index 000000000000..54fba3bbeac0 --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-8357972a21b39644e4cbe4bedc3b6d9065bf4494daf8f7632ab2bfe055773f7b.json @@ -0,0 +1,47 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE recursion_tip_witness_jobs_fri\n SET\n status = 'queued',\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n (\n status = 'in_progress'\n AND processing_started_at <= NOW() - $1::INTERVAL\n AND attempts < $2\n )\n OR (\n status = 'failed'\n AND attempts < $2\n )\n RETURNING\n l1_batch_number,\n status,\n attempts,\n error,\n picked_by\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "l1_batch_number", + "type_info": "Int8" + }, + { + "ordinal": 1, + "name": "status", + "type_info": "Text" + }, + { + "ordinal": 2, + "name": "attempts", + "type_info": "Int2" + }, + { + "ordinal": 3, + "name": "error", + "type_info": "Text" + }, + { + "ordinal": 4, + "name": "picked_by", + "type_info": "Text" + } + ], + "parameters": { + "Left": [ + "Interval", + "Int2" + ] + }, + "nullable": [ + false, + false, + false, + true, + true + ] + }, + "hash": "8357972a21b39644e4cbe4bedc3b6d9065bf4494daf8f7632ab2bfe055773f7b" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-8720d411e0c9640afd61e927a89c0b6c018e6a4d279acd24a4ea7d81b5cc5123.json b/prover/crates/lib/prover_dal/.sqlx/query-8720d411e0c9640afd61e927a89c0b6c018e6a4d279acd24a4ea7d81b5cc5123.json new file mode 100644 index 000000000000..12146fb75a90 --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-8720d411e0c9640afd61e927a89c0b6c018e6a4d279acd24a4ea7d81b5cc5123.json @@ -0,0 +1,60 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE prover_jobs_fri\n SET\n status = 'in_progress',\n attempts = attempts + 1,\n updated_at = NOW(),\n processing_started_at = NOW(),\n picked_by = $3\n WHERE\n id = (\n SELECT\n id\n FROM\n prover_jobs_fri\n WHERE\n status = 'queued'\n AND protocol_version = $1\n AND protocol_version_patch = $2\n ORDER BY\n aggregation_round DESC,\n l1_batch_number ASC,\n id ASC\n LIMIT\n 1\n FOR UPDATE\n SKIP LOCKED\n )\n RETURNING\n prover_jobs_fri.id,\n prover_jobs_fri.l1_batch_number,\n prover_jobs_fri.circuit_id,\n prover_jobs_fri.aggregation_round,\n prover_jobs_fri.sequence_number,\n prover_jobs_fri.depth,\n prover_jobs_fri.is_node_final_proof\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "id", + "type_info": "Int8" + }, + { + "ordinal": 1, + "name": "l1_batch_number", + "type_info": "Int8" + }, + { + "ordinal": 2, + "name": "circuit_id", + "type_info": "Int2" + }, + { + "ordinal": 3, + "name": "aggregation_round", + "type_info": "Int2" + }, + { + "ordinal": 4, + "name": "sequence_number", + "type_info": "Int4" + }, + { + "ordinal": 5, + "name": "depth", + "type_info": "Int4" + }, + { + "ordinal": 6, + "name": "is_node_final_proof", + "type_info": "Bool" + } + ], + "parameters": { + "Left": [ + "Int4", + "Int4", + "Text" + ] + }, + "nullable": [ + false, + false, + false, + false, + false, + false, + false + ] + }, + "hash": "8720d411e0c9640afd61e927a89c0b6c018e6a4d279acd24a4ea7d81b5cc5123" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-87a73aa95a85efeb065428f9e56e085ea80cf93c2fd66fd3949aab428bbdc560.json b/prover/crates/lib/prover_dal/.sqlx/query-87a73aa95a85efeb065428f9e56e085ea80cf93c2fd66fd3949aab428bbdc560.json new file mode 100644 index 000000000000..d95b4f7f6f20 --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-87a73aa95a85efeb065428f9e56e085ea80cf93c2fd66fd3949aab428bbdc560.json @@ -0,0 +1,12 @@ +{ + "db_name": "PostgreSQL", + "query": "\n DELETE FROM prover_jobs_fri\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [] + }, + "nullable": [] + }, + "hash": "87a73aa95a85efeb065428f9e56e085ea80cf93c2fd66fd3949aab428bbdc560" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-89a25708d0b0a15e1e56ee8fd69f5a15d2fc5ad3e5ce738a2f6ee3eecfc96736.json b/prover/crates/lib/prover_dal/.sqlx/query-89a25708d0b0a15e1e56ee8fd69f5a15d2fc5ad3e5ce738a2f6ee3eecfc96736.json new file mode 100644 index 000000000000..d8bd3223905c --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-89a25708d0b0a15e1e56ee8fd69f5a15d2fc5ad3e5ce738a2f6ee3eecfc96736.json @@ -0,0 +1,16 @@ +{ + "db_name": "PostgreSQL", + "query": "\n INSERT INTO\n prover_fri_protocol_versions (id, snark_wrapper_vk_hash, created_at, protocol_version_patch)\n VALUES\n ($1, $2, NOW(), $3)\n ON CONFLICT (id, protocol_version_patch) DO NOTHING\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int4", + "Bytea", + "Int4" + ] + }, + "nullable": [] + }, + "hash": "89a25708d0b0a15e1e56ee8fd69f5a15d2fc5ad3e5ce738a2f6ee3eecfc96736" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-8bbe4a8fd46bee5ead5324029c9b7b5831361599874fc223dd389fcc3f9efee7.json b/prover/crates/lib/prover_dal/.sqlx/query-8bbe4a8fd46bee5ead5324029c9b7b5831361599874fc223dd389fcc3f9efee7.json deleted file mode 100644 index 2717055650cc..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-8bbe4a8fd46bee5ead5324029c9b7b5831361599874fc223dd389fcc3f9efee7.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE\n proof_compression_jobs_fri\n SET\n status = 'queued',\n error = 'Manually requeued',\n attempts = 2,\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n l1_batch_number = $1\n AND attempts >= $2\n AND (\n status = 'in_progress'\n OR status = 'failed'\n )\n RETURNING\n status,\n attempts,\n error,\n picked_by\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "status", - "type_info": "Text" - }, - { - "ordinal": 1, - "name": "attempts", - "type_info": "Int2" - }, - { - "ordinal": 2, - "name": "error", - "type_info": "Text" - }, - { - "ordinal": 3, - "name": "picked_by", - "type_info": "Text" - } - ], - "parameters": { - "Left": [ - "Int8", - "Int2" - ] - }, - "nullable": [ - false, - false, - true, - true - ] - }, - "hash": "8bbe4a8fd46bee5ead5324029c9b7b5831361599874fc223dd389fcc3f9efee7" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-8bcad2be3dd29e36ea731417b68023678f31a1b7f5ee33b643dd551c40e88329.json b/prover/crates/lib/prover_dal/.sqlx/query-8bcad2be3dd29e36ea731417b68023678f31a1b7f5ee33b643dd551c40e88329.json new file mode 100644 index 000000000000..9a6b55602d01 --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-8bcad2be3dd29e36ea731417b68023678f31a1b7f5ee33b643dd551c40e88329.json @@ -0,0 +1,15 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE recursion_tip_witness_jobs_fri\n SET\n status = 'successful',\n updated_at = NOW(),\n time_taken = $1\n WHERE\n l1_batch_number = $2\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Time", + "Int8" + ] + }, + "nullable": [] + }, + "hash": "8bcad2be3dd29e36ea731417b68023678f31a1b7f5ee33b643dd551c40e88329" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-e8db5d17dd2218bb34777ecf406fa78c1118063b2a1cda34bb49e9365219c32d.json b/prover/crates/lib/prover_dal/.sqlx/query-929419ad8dcc70e8ce986f17075cd21d4645563f93afd4428734196c2b212276.json similarity index 74% rename from prover/crates/lib/prover_dal/.sqlx/query-e8db5d17dd2218bb34777ecf406fa78c1118063b2a1cda34bb49e9365219c32d.json rename to prover/crates/lib/prover_dal/.sqlx/query-929419ad8dcc70e8ce986f17075cd21d4645563f93afd4428734196c2b212276.json index 7cf81a13d57f..cf5fe8117b14 100644 --- a/prover/crates/lib/prover_dal/.sqlx/query-e8db5d17dd2218bb34777ecf406fa78c1118063b2a1cda34bb49e9365219c32d.json +++ b/prover/crates/lib/prover_dal/.sqlx/query-929419ad8dcc70e8ce986f17075cd21d4645563f93afd4428734196c2b212276.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n witness_inputs_fri (\n l1_batch_number,\n witness_inputs_blob_url,\n protocol_version,\n status,\n created_at,\n updated_at,\n protocol_version_patch\n )\n VALUES\n ($1, $2, $3, 'queued', NOW(), NOW(), $4) ON CONFLICT (l1_batch_number) DO NOTHING\n ", + "query": "\n INSERT INTO\n witness_inputs_fri (\n l1_batch_number,\n witness_inputs_blob_url,\n protocol_version,\n status,\n created_at,\n updated_at,\n protocol_version_patch\n )\n VALUES\n ($1, $2, $3, 'queued', NOW(), NOW(), $4)\n ON CONFLICT (l1_batch_number) DO NOTHING\n ", "describe": { "columns": [], "parameters": { @@ -13,5 +13,5 @@ }, "nullable": [] }, - "hash": "e8db5d17dd2218bb34777ecf406fa78c1118063b2a1cda34bb49e9365219c32d" + "hash": "929419ad8dcc70e8ce986f17075cd21d4645563f93afd4428734196c2b212276" } diff --git a/prover/crates/lib/prover_dal/.sqlx/query-93b9706aa8eb840d574d7c156cc866e8f67a380302762c272bfb27307682d62e.json b/prover/crates/lib/prover_dal/.sqlx/query-93b9706aa8eb840d574d7c156cc866e8f67a380302762c272bfb27307682d62e.json new file mode 100644 index 000000000000..90eface5350b --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-93b9706aa8eb840d574d7c156cc866e8f67a380302762c272bfb27307682d62e.json @@ -0,0 +1,18 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE proof_compression_jobs_fri\n SET\n status = $1,\n error = $2,\n updated_at = NOW()\n WHERE\n l1_batch_number = $3\n AND status != $4\n AND status != $5\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Text", + "Text", + "Int8", + "Text", + "Text" + ] + }, + "nullable": [] + }, + "hash": "93b9706aa8eb840d574d7c156cc866e8f67a380302762c272bfb27307682d62e" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-96c76bcbd40328c21c9d2795e48e2a39dd892793175e3d943487875367d220e6.json b/prover/crates/lib/prover_dal/.sqlx/query-96c76bcbd40328c21c9d2795e48e2a39dd892793175e3d943487875367d220e6.json deleted file mode 100644 index 583c45641a10..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-96c76bcbd40328c21c9d2795e48e2a39dd892793175e3d943487875367d220e6.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n DELETE FROM\n proof_compression_jobs_fri\n WHERE\n l1_batch_number = $1\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8" - ] - }, - "nullable": [] - }, - "hash": "96c76bcbd40328c21c9d2795e48e2a39dd892793175e3d943487875367d220e6" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-9730c8225ff2cf3111185e81f602a4a98ec63eb942c73ce4448d0957346047cd.json b/prover/crates/lib/prover_dal/.sqlx/query-9730c8225ff2cf3111185e81f602a4a98ec63eb942c73ce4448d0957346047cd.json new file mode 100644 index 000000000000..d23ed8d9fc8a --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-9730c8225ff2cf3111185e81f602a4a98ec63eb942c73ce4448d0957346047cd.json @@ -0,0 +1,17 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE leaf_aggregation_witness_jobs_fri\n SET\n status = $1,\n attempts = $2\n WHERE\n l1_batch_number = $3\n AND circuit_id = $4\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Text", + "Int2", + "Int8", + "Int2" + ] + }, + "nullable": [] + }, + "hash": "9730c8225ff2cf3111185e81f602a4a98ec63eb942c73ce4448d0957346047cd" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-97c0634523806fa77776dc5dc296d119cc0df302fa2288d37741138cb4592156.json b/prover/crates/lib/prover_dal/.sqlx/query-97c0634523806fa77776dc5dc296d119cc0df302fa2288d37741138cb4592156.json deleted file mode 100644 index 468047063e37..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-97c0634523806fa77776dc5dc296d119cc0df302fa2288d37741138cb4592156.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n gpu_prover_queue_fri (\n instance_host,\n instance_port,\n instance_status,\n specialized_prover_group_id,\n zone,\n created_at,\n updated_at,\n protocol_version,\n protocol_version_patch\n )\n VALUES\n (\n CAST($1 :: TEXT AS inet),\n $2,\n 'available',\n $3,\n $4,\n NOW(),\n NOW(),\n $5,\n $6\n ) ON CONFLICT (instance_host, instance_port, zone) DO\n UPDATE\n SET\n instance_status = 'available',\n specialized_prover_group_id = $3,\n zone = $4,\n updated_at = NOW(),\n protocol_version = $5,\n protocol_version_patch = $6\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Text", - "Int4", - "Int2", - "Text", - "Int4", - "Int4" - ] - }, - "nullable": [] - }, - "hash": "97c0634523806fa77776dc5dc296d119cc0df302fa2288d37741138cb4592156" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-9895b2ded08be3e81a5357decf76b4d3d6a762761e45af2a73fe96da804e627e.json b/prover/crates/lib/prover_dal/.sqlx/query-9895b2ded08be3e81a5357decf76b4d3d6a762761e45af2a73fe96da804e627e.json new file mode 100644 index 000000000000..90ea99942062 --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-9895b2ded08be3e81a5357decf76b4d3d6a762761e45af2a73fe96da804e627e.json @@ -0,0 +1,53 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE prover_jobs_fri\n SET\n status = 'queued',\n error = 'Manually requeued',\n attempts = 2,\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n l1_batch_number = $1\n AND attempts >= $2\n AND (\n status = 'in_progress'\n OR status = 'failed'\n )\n RETURNING\n id,\n status,\n attempts,\n circuit_id,\n error,\n picked_by\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "id", + "type_info": "Int8" + }, + { + "ordinal": 1, + "name": "status", + "type_info": "Text" + }, + { + "ordinal": 2, + "name": "attempts", + "type_info": "Int2" + }, + { + "ordinal": 3, + "name": "circuit_id", + "type_info": "Int2" + }, + { + "ordinal": 4, + "name": "error", + "type_info": "Text" + }, + { + "ordinal": 5, + "name": "picked_by", + "type_info": "Text" + } + ], + "parameters": { + "Left": [ + "Int8", + "Int2" + ] + }, + "nullable": [ + false, + false, + false, + false, + true, + true + ] + }, + "hash": "9895b2ded08be3e81a5357decf76b4d3d6a762761e45af2a73fe96da804e627e" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-9b713312b539b4eefa58346f0070767a2cd4488e670674cd9149f7a332c0198d.json b/prover/crates/lib/prover_dal/.sqlx/query-9b713312b539b4eefa58346f0070767a2cd4488e670674cd9149f7a332c0198d.json new file mode 100644 index 000000000000..2609a2ee0cfc --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-9b713312b539b4eefa58346f0070767a2cd4488e670674cd9149f7a332c0198d.json @@ -0,0 +1,22 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE recursion_tip_witness_jobs_fri\n SET\n status = 'queued'\n WHERE\n l1_batch_number IN (\n SELECT\n prover_jobs_fri.l1_batch_number\n FROM\n prover_jobs_fri\n JOIN recursion_tip_witness_jobs_fri rtwj ON prover_jobs_fri.l1_batch_number = rtwj.l1_batch_number\n WHERE\n rtwj.status = 'waiting_for_proofs'\n AND prover_jobs_fri.status = 'successful'\n AND prover_jobs_fri.aggregation_round = $1\n AND prover_jobs_fri.is_node_final_proof = TRUE\n GROUP BY\n prover_jobs_fri.l1_batch_number,\n rtwj.number_of_final_node_jobs\n HAVING\n COUNT(*) = rtwj.number_of_final_node_jobs\n )\n RETURNING\n l1_batch_number;\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "l1_batch_number", + "type_info": "Int8" + } + ], + "parameters": { + "Left": [ + "Int2" + ] + }, + "nullable": [ + false + ] + }, + "hash": "9b713312b539b4eefa58346f0070767a2cd4488e670674cd9149f7a332c0198d" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-a089a2359b1ed513d20f02f395f10648e2870c18716c6cf30dbf3a704c137776.json b/prover/crates/lib/prover_dal/.sqlx/query-a089a2359b1ed513d20f02f395f10648e2870c18716c6cf30dbf3a704c137776.json deleted file mode 100644 index e923b90dbe03..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-a089a2359b1ed513d20f02f395f10648e2870c18716c6cf30dbf3a704c137776.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE\n proof_compression_jobs_fri\n SET\n status = $1,\n updated_at = NOW()\n WHERE\n l1_batch_number = $2\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Text", - "Int8" - ] - }, - "nullable": [] - }, - "hash": "a089a2359b1ed513d20f02f395f10648e2870c18716c6cf30dbf3a704c137776" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-a2d3dd0dc61bcaeff337498d1803ced4deef9ea2f9699e8e173d5d2343f26cc3.json b/prover/crates/lib/prover_dal/.sqlx/query-a2d3dd0dc61bcaeff337498d1803ced4deef9ea2f9699e8e173d5d2343f26cc3.json deleted file mode 100644 index 3221284f7606..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-a2d3dd0dc61bcaeff337498d1803ced4deef9ea2f9699e8e173d5d2343f26cc3.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE\n scheduler_witness_jobs_fri\n SET\n status = 'queued'\n WHERE\n l1_batch_number = $1\n AND status != 'successful'\n AND status != 'in_progress'\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8" - ] - }, - "nullable": [] - }, - "hash": "a2d3dd0dc61bcaeff337498d1803ced4deef9ea2f9699e8e173d5d2343f26cc3" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-2677e0e54b2e3e9c14723aca65faf1f5f1afadd54e1751ec59da39ac18811b3d.json b/prover/crates/lib/prover_dal/.sqlx/query-a817f0fec85388b3e2510ce259208a01b63ae4aa03c983c3a52c802d585e5a80.json similarity index 52% rename from prover/crates/lib/prover_dal/.sqlx/query-2677e0e54b2e3e9c14723aca65faf1f5f1afadd54e1751ec59da39ac18811b3d.json rename to prover/crates/lib/prover_dal/.sqlx/query-a817f0fec85388b3e2510ce259208a01b63ae4aa03c983c3a52c802d585e5a80.json index 0eb756c36447..93532150f7f8 100644 --- a/prover/crates/lib/prover_dal/.sqlx/query-2677e0e54b2e3e9c14723aca65faf1f5f1afadd54e1751ec59da39ac18811b3d.json +++ b/prover/crates/lib/prover_dal/.sqlx/query-a817f0fec85388b3e2510ce259208a01b63ae4aa03c983c3a52c802d585e5a80.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n proof_compression_jobs_fri (l1_batch_number, status, created_at, updated_at)\n VALUES\n ($1, $2, NOW(), NOW()) ON CONFLICT (l1_batch_number) DO\n UPDATE\n SET\n status = $2\n ", + "query": "\n INSERT INTO\n proof_compression_jobs_fri (l1_batch_number, status, created_at, updated_at)\n VALUES\n ($1, $2, NOW(), NOW())\n ON CONFLICT (l1_batch_number) DO\n UPDATE\n SET\n status = $2\n ", "describe": { "columns": [], "parameters": { @@ -11,5 +11,5 @@ }, "nullable": [] }, - "hash": "2677e0e54b2e3e9c14723aca65faf1f5f1afadd54e1751ec59da39ac18811b3d" + "hash": "a817f0fec85388b3e2510ce259208a01b63ae4aa03c983c3a52c802d585e5a80" } diff --git a/prover/crates/lib/prover_dal/.sqlx/query-ab0c9b013d044a5f75b9f396ac1426777a8a76f02f528348bfe81f19ba5ebaa3.json b/prover/crates/lib/prover_dal/.sqlx/query-ab0c9b013d044a5f75b9f396ac1426777a8a76f02f528348bfe81f19ba5ebaa3.json deleted file mode 100644 index 27d309667477..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-ab0c9b013d044a5f75b9f396ac1426777a8a76f02f528348bfe81f19ba5ebaa3.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE\n scheduler_witness_jobs_fri\n SET\n status = 'successful',\n updated_at = NOW(),\n time_taken = $1\n WHERE\n l1_batch_number = $2\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Time", - "Int8" - ] - }, - "nullable": [] - }, - "hash": "ab0c9b013d044a5f75b9f396ac1426777a8a76f02f528348bfe81f19ba5ebaa3" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-abc93d27a8673b23e18d050e84c43c868c63c853edb5c4f41e48a3cc6378eca9.json b/prover/crates/lib/prover_dal/.sqlx/query-abc93d27a8673b23e18d050e84c43c868c63c853edb5c4f41e48a3cc6378eca9.json new file mode 100644 index 000000000000..fae5c1041a5d --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-abc93d27a8673b23e18d050e84c43c868c63c853edb5c4f41e48a3cc6378eca9.json @@ -0,0 +1,32 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE node_aggregation_witness_jobs_fri\n SET\n status = 'queued'\n WHERE\n (l1_batch_number, circuit_id, depth) IN (\n SELECT\n prover_jobs_fri.l1_batch_number,\n prover_jobs_fri.circuit_id,\n prover_jobs_fri.depth\n FROM\n prover_jobs_fri\n JOIN node_aggregation_witness_jobs_fri nawj ON prover_jobs_fri.l1_batch_number = nawj.l1_batch_number\n AND prover_jobs_fri.circuit_id = nawj.circuit_id\n AND prover_jobs_fri.depth = nawj.depth\n WHERE\n nawj.status = 'waiting_for_proofs'\n AND prover_jobs_fri.status = 'successful'\n AND prover_jobs_fri.aggregation_round = 1\n AND prover_jobs_fri.depth = 0\n GROUP BY\n prover_jobs_fri.l1_batch_number,\n prover_jobs_fri.circuit_id,\n prover_jobs_fri.depth,\n nawj.number_of_dependent_jobs\n HAVING\n COUNT(*) = nawj.number_of_dependent_jobs\n )\n RETURNING\n l1_batch_number,\n circuit_id,\n depth;\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "l1_batch_number", + "type_info": "Int8" + }, + { + "ordinal": 1, + "name": "circuit_id", + "type_info": "Int2" + }, + { + "ordinal": 2, + "name": "depth", + "type_info": "Int4" + } + ], + "parameters": { + "Left": [] + }, + "nullable": [ + false, + false, + false + ] + }, + "hash": "abc93d27a8673b23e18d050e84c43c868c63c853edb5c4f41e48a3cc6378eca9" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-b25c66b9705b3f2fb8a3492f1bd20222e177262292241bd8cb89dbb9c1e74c2d.json b/prover/crates/lib/prover_dal/.sqlx/query-b25c66b9705b3f2fb8a3492f1bd20222e177262292241bd8cb89dbb9c1e74c2d.json new file mode 100644 index 000000000000..d0c5d31aa3ec --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-b25c66b9705b3f2fb8a3492f1bd20222e177262292241bd8cb89dbb9c1e74c2d.json @@ -0,0 +1,15 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE witness_inputs_fri\n SET\n status = $1,\n updated_at = NOW()\n WHERE\n l1_batch_number = $2\n AND status != 'successful'\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Text", + "Int8" + ] + }, + "nullable": [] + }, + "hash": "b25c66b9705b3f2fb8a3492f1bd20222e177262292241bd8cb89dbb9c1e74c2d" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-b41dc55dcb9789e8c2907f53e11bd791fce9a86b6cadb2c8a2b2834bbe71fbd4.json b/prover/crates/lib/prover_dal/.sqlx/query-b41dc55dcb9789e8c2907f53e11bd791fce9a86b6cadb2c8a2b2834bbe71fbd4.json deleted file mode 100644 index e440589077e2..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-b41dc55dcb9789e8c2907f53e11bd791fce9a86b6cadb2c8a2b2834bbe71fbd4.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE\n prover_jobs_fri\n SET\n status = 'in_progress',\n attempts = attempts + 1,\n processing_started_at = NOW(),\n updated_at = NOW(),\n picked_by = $5\n WHERE\n id = (\n SELECT\n pj.id\n FROM\n (\n SELECT\n *\n FROM\n UNNEST($1 :: SMALLINT [], $2 :: SMALLINT [])\n ) AS tuple (circuit_id, ROUND)\n JOIN LATERAL (\n SELECT\n *\n FROM\n prover_jobs_fri AS pj\n WHERE\n pj.status = 'queued'\n AND pj.protocol_version = $3\n AND pj.protocol_version_patch = $4\n AND pj.circuit_id = tuple.circuit_id\n AND pj.aggregation_round = tuple.round\n ORDER BY\n pj.l1_batch_number ASC,\n pj.id ASC\n LIMIT\n 1\n ) AS pj ON TRUE\n ORDER BY\n pj.l1_batch_number ASC,\n pj.aggregation_round DESC,\n pj.id ASC\n LIMIT\n 1 FOR\n UPDATE\n SKIP LOCKED\n )\n RETURNING\n prover_jobs_fri.id,\n prover_jobs_fri.l1_batch_number,\n prover_jobs_fri.circuit_id,\n prover_jobs_fri.aggregation_round,\n prover_jobs_fri.sequence_number,\n prover_jobs_fri.depth,\n prover_jobs_fri.is_node_final_proof\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "id", - "type_info": "Int8" - }, - { - "ordinal": 1, - "name": "l1_batch_number", - "type_info": "Int8" - }, - { - "ordinal": 2, - "name": "circuit_id", - "type_info": "Int2" - }, - { - "ordinal": 3, - "name": "aggregation_round", - "type_info": "Int2" - }, - { - "ordinal": 4, - "name": "sequence_number", - "type_info": "Int4" - }, - { - "ordinal": 5, - "name": "depth", - "type_info": "Int4" - }, - { - "ordinal": 6, - "name": "is_node_final_proof", - "type_info": "Bool" - } - ], - "parameters": { - "Left": [ - "Int2Array", - "Int2Array", - "Int4", - "Int4", - "Text" - ] - }, - "nullable": [ - false, - false, - false, - false, - false, - false, - false - ] - }, - "hash": "b41dc55dcb9789e8c2907f53e11bd791fce9a86b6cadb2c8a2b2834bbe71fbd4" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-b4687c54ac45145bc6a27162949fa244d5b3c2ae22b4850c9a536e4d54ce38d3.json b/prover/crates/lib/prover_dal/.sqlx/query-b4687c54ac45145bc6a27162949fa244d5b3c2ae22b4850c9a536e4d54ce38d3.json deleted file mode 100644 index 38778c466d01..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-b4687c54ac45145bc6a27162949fa244d5b3c2ae22b4850c9a536e4d54ce38d3.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE\n prover_jobs_fri\n SET\n status = $1,\n updated_at = NOW()\n WHERE\n id = $2\n AND status != 'successful'\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Text", - "Int8" - ] - }, - "nullable": [] - }, - "hash": "b4687c54ac45145bc6a27162949fa244d5b3c2ae22b4850c9a536e4d54ce38d3" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-b4794e6a0c2366d5d95ab373c310103263af3ff5cb6c9dc5df59d3cd2a5e56b4.json b/prover/crates/lib/prover_dal/.sqlx/query-b4794e6a0c2366d5d95ab373c310103263af3ff5cb6c9dc5df59d3cd2a5e56b4.json new file mode 100644 index 000000000000..14b4115b30e8 --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-b4794e6a0c2366d5d95ab373c310103263af3ff5cb6c9dc5df59d3cd2a5e56b4.json @@ -0,0 +1,17 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE gpu_prover_queue_fri\n SET\n instance_status = $1,\n updated_at = NOW()\n WHERE\n instance_host = $2::TEXT::inet\n AND instance_port = $3\n AND zone = $4\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Text", + "Text", + "Int4", + "Text" + ] + }, + "nullable": [] + }, + "hash": "b4794e6a0c2366d5d95ab373c310103263af3ff5cb6c9dc5df59d3cd2a5e56b4" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-b568f9cb9c2bd53b5dcde15f368a9dc31c7d51476f18cffa80cad653298ad252.json b/prover/crates/lib/prover_dal/.sqlx/query-b568f9cb9c2bd53b5dcde15f368a9dc31c7d51476f18cffa80cad653298ad252.json new file mode 100644 index 000000000000..03d268477904 --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-b568f9cb9c2bd53b5dcde15f368a9dc31c7d51476f18cffa80cad653298ad252.json @@ -0,0 +1,12 @@ +{ + "db_name": "PostgreSQL", + "query": "\n DELETE FROM proof_compression_jobs_fri\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [] + }, + "nullable": [] + }, + "hash": "b568f9cb9c2bd53b5dcde15f368a9dc31c7d51476f18cffa80cad653298ad252" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-b6835c57f5468a65731b7ddbd25cb86bd28dbda3ee3444f300da9f7d25930cae.json b/prover/crates/lib/prover_dal/.sqlx/query-b6835c57f5468a65731b7ddbd25cb86bd28dbda3ee3444f300da9f7d25930cae.json deleted file mode 100644 index 7f65bdd42d73..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-b6835c57f5468a65731b7ddbd25cb86bd28dbda3ee3444f300da9f7d25930cae.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE\n proof_compression_jobs_fri\n SET\n status = 'queued',\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n (\n status = 'in_progress'\n AND processing_started_at <= NOW() - $1 :: INTERVAL\n AND attempts < $2\n )\n OR (\n status = 'failed'\n AND attempts < $2\n )\n RETURNING\n l1_batch_number,\n status,\n attempts,\n error,\n picked_by\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "l1_batch_number", - "type_info": "Int8" - }, - { - "ordinal": 1, - "name": "status", - "type_info": "Text" - }, - { - "ordinal": 2, - "name": "attempts", - "type_info": "Int2" - }, - { - "ordinal": 3, - "name": "error", - "type_info": "Text" - }, - { - "ordinal": 4, - "name": "picked_by", - "type_info": "Text" - } - ], - "parameters": { - "Left": [ - "Interval", - "Int2" - ] - }, - "nullable": [ - false, - false, - false, - true, - true - ] - }, - "hash": "b6835c57f5468a65731b7ddbd25cb86bd28dbda3ee3444f300da9f7d25930cae" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-b6db24ad38dcc89646fdf50b51c61698aeed3f3de0994908fd7a655ff465f250.json b/prover/crates/lib/prover_dal/.sqlx/query-b6db24ad38dcc89646fdf50b51c61698aeed3f3de0994908fd7a655ff465f250.json deleted file mode 100644 index 7b4ad67a15cc..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-b6db24ad38dcc89646fdf50b51c61698aeed3f3de0994908fd7a655ff465f250.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE\n node_aggregation_witness_jobs_fri\n SET\n status = 'queued'\n WHERE\n (l1_batch_number, circuit_id, depth) IN (\n SELECT\n prover_jobs_fri.l1_batch_number,\n prover_jobs_fri.circuit_id,\n prover_jobs_fri.depth\n FROM\n prover_jobs_fri\n JOIN node_aggregation_witness_jobs_fri nawj ON prover_jobs_fri.l1_batch_number = nawj.l1_batch_number\n AND prover_jobs_fri.circuit_id = nawj.circuit_id\n AND prover_jobs_fri.depth = nawj.depth\n WHERE\n nawj.status = 'waiting_for_proofs'\n AND prover_jobs_fri.status = 'successful'\n AND prover_jobs_fri.aggregation_round = 1\n AND prover_jobs_fri.depth = 0\n GROUP BY\n prover_jobs_fri.l1_batch_number,\n prover_jobs_fri.circuit_id,\n prover_jobs_fri.depth,\n nawj.number_of_dependent_jobs\n HAVING\n COUNT(*) = nawj.number_of_dependent_jobs\n )\n RETURNING\n l1_batch_number,\n circuit_id,\n depth;\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "l1_batch_number", - "type_info": "Int8" - }, - { - "ordinal": 1, - "name": "circuit_id", - "type_info": "Int2" - }, - { - "ordinal": 2, - "name": "depth", - "type_info": "Int4" - } - ], - "parameters": { - "Left": [] - }, - "nullable": [ - false, - false, - false - ] - }, - "hash": "b6db24ad38dcc89646fdf50b51c61698aeed3f3de0994908fd7a655ff465f250" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-ba29cedd1fd713745a016c391f3ad70e48d1171fbdc1c929e1d004e73805d4e9.json b/prover/crates/lib/prover_dal/.sqlx/query-ba29cedd1fd713745a016c391f3ad70e48d1171fbdc1c929e1d004e73805d4e9.json deleted file mode 100644 index 53f89affed3d..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-ba29cedd1fd713745a016c391f3ad70e48d1171fbdc1c929e1d004e73805d4e9.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE\n leaf_aggregation_witness_jobs_fri\n SET\n status = 'queued'\n WHERE\n (l1_batch_number, circuit_id) IN (\n SELECT\n prover_jobs_fri.l1_batch_number,\n prover_jobs_fri.circuit_id\n FROM\n prover_jobs_fri\n JOIN leaf_aggregation_witness_jobs_fri lawj ON prover_jobs_fri.l1_batch_number = lawj.l1_batch_number\n AND prover_jobs_fri.circuit_id = lawj.circuit_id\n WHERE\n lawj.status = 'waiting_for_proofs'\n AND prover_jobs_fri.status = 'successful'\n AND prover_jobs_fri.aggregation_round = 0\n GROUP BY\n prover_jobs_fri.l1_batch_number,\n prover_jobs_fri.circuit_id,\n lawj.number_of_basic_circuits\n HAVING\n COUNT(*) = lawj.number_of_basic_circuits\n )\n RETURNING\n l1_batch_number,\n circuit_id;\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "l1_batch_number", - "type_info": "Int8" - }, - { - "ordinal": 1, - "name": "circuit_id", - "type_info": "Int2" - } - ], - "parameters": { - "Left": [] - }, - "nullable": [ - false, - false - ] - }, - "hash": "ba29cedd1fd713745a016c391f3ad70e48d1171fbdc1c929e1d004e73805d4e9" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-bbced31c8d9ec17dd994c7de71b9e36eb532235d016c31ae8d86455506dd7a80.json b/prover/crates/lib/prover_dal/.sqlx/query-bbced31c8d9ec17dd994c7de71b9e36eb532235d016c31ae8d86455506dd7a80.json deleted file mode 100644 index 27296cae3edf..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-bbced31c8d9ec17dd994c7de71b9e36eb532235d016c31ae8d86455506dd7a80.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE\n recursion_tip_witness_jobs_fri\n SET\n status = 'queued'\n WHERE\n l1_batch_number IN (\n SELECT\n prover_jobs_fri.l1_batch_number\n FROM\n prover_jobs_fri\n JOIN recursion_tip_witness_jobs_fri rtwj ON prover_jobs_fri.l1_batch_number = rtwj.l1_batch_number\n WHERE\n rtwj.status = 'waiting_for_proofs'\n AND prover_jobs_fri.status = 'successful'\n AND prover_jobs_fri.aggregation_round = $1\n AND prover_jobs_fri.is_node_final_proof = TRUE\n GROUP BY\n prover_jobs_fri.l1_batch_number,\n rtwj.number_of_final_node_jobs\n HAVING\n COUNT(*) = rtwj.number_of_final_node_jobs\n )\n RETURNING\n l1_batch_number;\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "l1_batch_number", - "type_info": "Int8" - } - ], - "parameters": { - "Left": [ - "Int2" - ] - }, - "nullable": [ - false - ] - }, - "hash": "bbced31c8d9ec17dd994c7de71b9e36eb532235d016c31ae8d86455506dd7a80" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-bc9ddab523f9a35809cfded7b18a13c70062609adca4c60274ba19cde990727c.json b/prover/crates/lib/prover_dal/.sqlx/query-bc9ddab523f9a35809cfded7b18a13c70062609adca4c60274ba19cde990727c.json deleted file mode 100644 index b47a30ac584b..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-bc9ddab523f9a35809cfded7b18a13c70062609adca4c60274ba19cde990727c.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE\n prover_jobs_fri\n SET\n status = 'queued',\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n id IN (\n SELECT\n id\n FROM\n prover_jobs_fri\n WHERE\n (\n status IN ('in_progress', 'in_gpu_proof')\n AND processing_started_at <= NOW() - $1 :: INTERVAL\n AND attempts < $2\n )\n OR (\n status = 'failed'\n AND attempts < $2\n ) FOR\n UPDATE\n SKIP LOCKED\n )\n RETURNING\n id,\n status,\n attempts,\n circuit_id,\n error,\n picked_by\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "id", - "type_info": "Int8" - }, - { - "ordinal": 1, - "name": "status", - "type_info": "Text" - }, - { - "ordinal": 2, - "name": "attempts", - "type_info": "Int2" - }, - { - "ordinal": 3, - "name": "circuit_id", - "type_info": "Int2" - }, - { - "ordinal": 4, - "name": "error", - "type_info": "Text" - }, - { - "ordinal": 5, - "name": "picked_by", - "type_info": "Text" - } - ], - "parameters": { - "Left": [ - "Interval", - "Int2" - ] - }, - "nullable": [ - false, - false, - false, - false, - true, - true - ] - }, - "hash": "bc9ddab523f9a35809cfded7b18a13c70062609adca4c60274ba19cde990727c" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-bcc5d3d35652f49b41d4ee673b171570fc88c17822bebd5b92e3b2f726d9af3a.json b/prover/crates/lib/prover_dal/.sqlx/query-bcc5d3d35652f49b41d4ee673b171570fc88c17822bebd5b92e3b2f726d9af3a.json new file mode 100644 index 000000000000..ab1c2dd6552a --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-bcc5d3d35652f49b41d4ee673b171570fc88c17822bebd5b92e3b2f726d9af3a.json @@ -0,0 +1,47 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE witness_inputs_fri\n SET\n status = 'queued',\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n (\n status = 'in_progress'\n AND processing_started_at <= NOW() - $1::INTERVAL\n AND attempts < $2\n )\n OR (\n status = 'failed'\n AND attempts < $2\n )\n RETURNING\n l1_batch_number,\n status,\n attempts,\n error,\n picked_by\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "l1_batch_number", + "type_info": "Int8" + }, + { + "ordinal": 1, + "name": "status", + "type_info": "Text" + }, + { + "ordinal": 2, + "name": "attempts", + "type_info": "Int2" + }, + { + "ordinal": 3, + "name": "error", + "type_info": "Text" + }, + { + "ordinal": 4, + "name": "picked_by", + "type_info": "Text" + } + ], + "parameters": { + "Left": [ + "Interval", + "Int2" + ] + }, + "nullable": [ + false, + false, + false, + true, + true + ] + }, + "hash": "bcc5d3d35652f49b41d4ee673b171570fc88c17822bebd5b92e3b2f726d9af3a" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-bfbc5a8bc212991873fbf722b6f3c0c5544cb14cc06baa46cd7ecc329bba7b49.json b/prover/crates/lib/prover_dal/.sqlx/query-bfbc5a8bc212991873fbf722b6f3c0c5544cb14cc06baa46cd7ecc329bba7b49.json deleted file mode 100644 index 9f5d3fc7921d..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-bfbc5a8bc212991873fbf722b6f3c0c5544cb14cc06baa46cd7ecc329bba7b49.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE\n prover_jobs_fri\n SET\n status = 'in_progress',\n attempts = attempts + 1,\n updated_at = NOW(),\n processing_started_at = NOW(),\n picked_by = $3\n WHERE\n id = (\n SELECT\n id\n FROM\n prover_jobs_fri\n WHERE\n status = 'queued'\n AND protocol_version = $1\n AND protocol_version_patch = $2\n ORDER BY\n aggregation_round DESC,\n l1_batch_number ASC,\n id ASC\n LIMIT\n 1 FOR\n UPDATE\n SKIP LOCKED\n )\n RETURNING\n prover_jobs_fri.id,\n prover_jobs_fri.l1_batch_number,\n prover_jobs_fri.circuit_id,\n prover_jobs_fri.aggregation_round,\n prover_jobs_fri.sequence_number,\n prover_jobs_fri.depth,\n prover_jobs_fri.is_node_final_proof\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "id", - "type_info": "Int8" - }, - { - "ordinal": 1, - "name": "l1_batch_number", - "type_info": "Int8" - }, - { - "ordinal": 2, - "name": "circuit_id", - "type_info": "Int2" - }, - { - "ordinal": 3, - "name": "aggregation_round", - "type_info": "Int2" - }, - { - "ordinal": 4, - "name": "sequence_number", - "type_info": "Int4" - }, - { - "ordinal": 5, - "name": "depth", - "type_info": "Int4" - }, - { - "ordinal": 6, - "name": "is_node_final_proof", - "type_info": "Bool" - } - ], - "parameters": { - "Left": [ - "Int4", - "Int4", - "Text" - ] - }, - "nullable": [ - false, - false, - false, - false, - false, - false, - false - ] - }, - "hash": "bfbc5a8bc212991873fbf722b6f3c0c5544cb14cc06baa46cd7ecc329bba7b49" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-c0effa8e455c1a09c205994e58569f22d450a0fb0f10eb391b058f650d99ef71.json b/prover/crates/lib/prover_dal/.sqlx/query-c0effa8e455c1a09c205994e58569f22d450a0fb0f10eb391b058f650d99ef71.json deleted file mode 100644 index 060dfd435264..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-c0effa8e455c1a09c205994e58569f22d450a0fb0f10eb391b058f650d99ef71.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE\n witness_inputs_fri\n SET\n status = 'queued',\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n l1_batch_number = $1\n AND attempts >= $2\n AND (\n status = 'in_progress'\n OR status = 'failed'\n )\n RETURNING\n l1_batch_number,\n status,\n attempts,\n error,\n picked_by\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "l1_batch_number", - "type_info": "Int8" - }, - { - "ordinal": 1, - "name": "status", - "type_info": "Text" - }, - { - "ordinal": 2, - "name": "attempts", - "type_info": "Int2" - }, - { - "ordinal": 3, - "name": "error", - "type_info": "Text" - }, - { - "ordinal": 4, - "name": "picked_by", - "type_info": "Text" - } - ], - "parameters": { - "Left": [ - "Int8", - "Int2" - ] - }, - "nullable": [ - false, - false, - false, - true, - true - ] - }, - "hash": "c0effa8e455c1a09c205994e58569f22d450a0fb0f10eb391b058f650d99ef71" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-c340c043c938bf5f4b63d57a1654775c6f7414c7bed75d33b61de00fdbabc349.json b/prover/crates/lib/prover_dal/.sqlx/query-c340c043c938bf5f4b63d57a1654775c6f7414c7bed75d33b61de00fdbabc349.json new file mode 100644 index 000000000000..41edb649e7c9 --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-c340c043c938bf5f4b63d57a1654775c6f7414c7bed75d33b61de00fdbabc349.json @@ -0,0 +1,15 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE prover_jobs_fri\n SET\n status = $1,\n updated_at = NOW()\n WHERE\n id = $2\n AND status != 'successful'\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Text", + "Int8" + ] + }, + "nullable": [] + }, + "hash": "c340c043c938bf5f4b63d57a1654775c6f7414c7bed75d33b61de00fdbabc349" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-c706a49ff54f6b424e24d061fe7ac429aac3c030f7e226a1264243d8cdae038d.json b/prover/crates/lib/prover_dal/.sqlx/query-c706a49ff54f6b424e24d061fe7ac429aac3c030f7e226a1264243d8cdae038d.json new file mode 100644 index 000000000000..95ae04bed503 --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-c706a49ff54f6b424e24d061fe7ac429aac3c030f7e226a1264243d8cdae038d.json @@ -0,0 +1,17 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE proof_compression_jobs_fri\n SET\n status = $1,\n updated_at = NOW(),\n time_taken = $2,\n l1_proof_blob_url = $3\n WHERE\n l1_batch_number = $4\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Text", + "Time", + "Text", + "Int8" + ] + }, + "nullable": [] + }, + "hash": "c706a49ff54f6b424e24d061fe7ac429aac3c030f7e226a1264243d8cdae038d" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-c8daa62b3835c15fafb3f83deabb5a4672ad50a9de92c84d939ac4c69842e355.json b/prover/crates/lib/prover_dal/.sqlx/query-c8daa62b3835c15fafb3f83deabb5a4672ad50a9de92c84d939ac4c69842e355.json new file mode 100644 index 000000000000..cadc931fa1ca --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-c8daa62b3835c15fafb3f83deabb5a4672ad50a9de92c84d939ac4c69842e355.json @@ -0,0 +1,16 @@ +{ + "db_name": "PostgreSQL", + "query": "\n INSERT INTO\n node_aggregation_witness_jobs_fri (l1_batch_number, circuit_id, status, created_at, updated_at)\n VALUES\n ($1, $2, 'waiting_for_proofs', NOW(), NOW())\n ON CONFLICT (l1_batch_number, circuit_id, depth) DO\n UPDATE\n SET\n status = $3\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8", + "Int2", + "Text" + ] + }, + "nullable": [] + }, + "hash": "c8daa62b3835c15fafb3f83deabb5a4672ad50a9de92c84d939ac4c69842e355" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-ca219864909a8b41ea5d4438235d24b3f001a2d4ea0da817e69f3816d43ce73b.json b/prover/crates/lib/prover_dal/.sqlx/query-ca219864909a8b41ea5d4438235d24b3f001a2d4ea0da817e69f3816d43ce73b.json deleted file mode 100644 index aa3e418ffc96..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-ca219864909a8b41ea5d4438235d24b3f001a2d4ea0da817e69f3816d43ce73b.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n DELETE FROM\n gpu_prover_queue_fri\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [] - }, - "nullable": [] - }, - "hash": "ca219864909a8b41ea5d4438235d24b3f001a2d4ea0da817e69f3816d43ce73b" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-7e19bfe8f29b4c5921c7f3b24fdafb2d59c01a15172b2accc0cddc4e8326a792.json b/prover/crates/lib/prover_dal/.sqlx/query-caff620ae66d7fbe3caff7505173b6da86d1e693be03936730c340121167341f.json similarity index 57% rename from prover/crates/lib/prover_dal/.sqlx/query-7e19bfe8f29b4c5921c7f3b24fdafb2d59c01a15172b2accc0cddc4e8326a792.json rename to prover/crates/lib/prover_dal/.sqlx/query-caff620ae66d7fbe3caff7505173b6da86d1e693be03936730c340121167341f.json index ba59aacf8ccb..403e34bb91cd 100644 --- a/prover/crates/lib/prover_dal/.sqlx/query-7e19bfe8f29b4c5921c7f3b24fdafb2d59c01a15172b2accc0cddc4e8326a792.json +++ b/prover/crates/lib/prover_dal/.sqlx/query-caff620ae66d7fbe3caff7505173b6da86d1e693be03936730c340121167341f.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n scheduler_witness_jobs_fri (\n l1_batch_number,\n scheduler_partial_input_blob_url,\n protocol_version,\n status,\n created_at,\n updated_at,\n protocol_version_patch\n )\n VALUES\n (\n $1,\n $2,\n $3,\n 'waiting_for_proofs',\n NOW(),\n NOW(),\n $4\n ) ON CONFLICT (l1_batch_number) DO\n UPDATE\n SET\n updated_at = NOW()\n ", + "query": "\n INSERT INTO\n scheduler_witness_jobs_fri (\n l1_batch_number,\n scheduler_partial_input_blob_url,\n protocol_version,\n status,\n created_at,\n updated_at,\n protocol_version_patch\n )\n VALUES\n ($1, $2, $3, 'waiting_for_proofs', NOW(), NOW(), $4)\n ON CONFLICT (l1_batch_number) DO\n UPDATE\n SET\n updated_at = NOW()\n ", "describe": { "columns": [], "parameters": { @@ -13,5 +13,5 @@ }, "nullable": [] }, - "hash": "7e19bfe8f29b4c5921c7f3b24fdafb2d59c01a15172b2accc0cddc4e8326a792" + "hash": "caff620ae66d7fbe3caff7505173b6da86d1e693be03936730c340121167341f" } diff --git a/prover/crates/lib/prover_dal/.sqlx/query-8abfb4b84de35e8e336d59389ca978649e228eecbbbf959a1e3b87c08faa60de.json b/prover/crates/lib/prover_dal/.sqlx/query-ce5779092feb8a3d3e2c5e395783e67f08f2ead5f55bfb6594e50346bf9cf2ef.json similarity index 64% rename from prover/crates/lib/prover_dal/.sqlx/query-8abfb4b84de35e8e336d59389ca978649e228eecbbbf959a1e3b87c08faa60de.json rename to prover/crates/lib/prover_dal/.sqlx/query-ce5779092feb8a3d3e2c5e395783e67f08f2ead5f55bfb6594e50346bf9cf2ef.json index c4ecdebb2d95..6f83fd55064d 100644 --- a/prover/crates/lib/prover_dal/.sqlx/query-8abfb4b84de35e8e336d59389ca978649e228eecbbbf959a1e3b87c08faa60de.json +++ b/prover/crates/lib/prover_dal/.sqlx/query-ce5779092feb8a3d3e2c5e395783e67f08f2ead5f55bfb6594e50346bf9cf2ef.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT\n MIN(l1_batch_number) AS \"l1_batch_number!\",\n circuit_id,\n aggregation_round\n FROM\n prover_jobs_fri\n WHERE\n status IN (\n 'queued',\n 'in_gpu_proof',\n 'in_progress',\n 'failed'\n )\n GROUP BY\n circuit_id,\n aggregation_round\n ", + "query": "\n SELECT\n MIN(l1_batch_number) AS \"l1_batch_number!\",\n circuit_id,\n aggregation_round\n FROM\n prover_jobs_fri\n WHERE\n status IN ('queued', 'in_gpu_proof', 'in_progress', 'failed')\n GROUP BY\n circuit_id,\n aggregation_round\n ", "describe": { "columns": [ { @@ -28,5 +28,5 @@ false ] }, - "hash": "8abfb4b84de35e8e336d59389ca978649e228eecbbbf959a1e3b87c08faa60de" + "hash": "ce5779092feb8a3d3e2c5e395783e67f08f2ead5f55bfb6594e50346bf9cf2ef" } diff --git a/prover/crates/lib/prover_dal/.sqlx/query-d0be28042b50199075cb0eca26f6b93bfd5d96fdc68732fe38c79ccd44b84def.json b/prover/crates/lib/prover_dal/.sqlx/query-d0be28042b50199075cb0eca26f6b93bfd5d96fdc68732fe38c79ccd44b84def.json new file mode 100644 index 000000000000..3943480b896d --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-d0be28042b50199075cb0eca26f6b93bfd5d96fdc68732fe38c79ccd44b84def.json @@ -0,0 +1,53 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE prover_jobs_fri\n SET\n status = 'queued',\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n id IN (\n SELECT\n id\n FROM\n prover_jobs_fri\n WHERE\n (\n status IN ('in_progress', 'in_gpu_proof')\n AND processing_started_at <= NOW() - $1::INTERVAL\n AND attempts < $2\n )\n OR (\n status = 'failed'\n AND attempts < $2\n )\n FOR UPDATE\n SKIP LOCKED\n )\n RETURNING\n id,\n status,\n attempts,\n circuit_id,\n error,\n picked_by\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "id", + "type_info": "Int8" + }, + { + "ordinal": 1, + "name": "status", + "type_info": "Text" + }, + { + "ordinal": 2, + "name": "attempts", + "type_info": "Int2" + }, + { + "ordinal": 3, + "name": "circuit_id", + "type_info": "Int2" + }, + { + "ordinal": 4, + "name": "error", + "type_info": "Text" + }, + { + "ordinal": 5, + "name": "picked_by", + "type_info": "Text" + } + ], + "parameters": { + "Left": [ + "Interval", + "Int2" + ] + }, + "nullable": [ + false, + false, + false, + false, + true, + true + ] + }, + "hash": "d0be28042b50199075cb0eca26f6b93bfd5d96fdc68732fe38c79ccd44b84def" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-d21a3d43542ffbd22d6b55c5787b86ce94a1379a01ec3ebb41aa9a210d589d08.json b/prover/crates/lib/prover_dal/.sqlx/query-d21a3d43542ffbd22d6b55c5787b86ce94a1379a01ec3ebb41aa9a210d589d08.json deleted file mode 100644 index beb24cf6a578..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-d21a3d43542ffbd22d6b55c5787b86ce94a1379a01ec3ebb41aa9a210d589d08.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE\n recursion_tip_witness_jobs_fri\n SET\n status = 'queued',\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n l1_batch_number = $1\n AND attempts >= $2\n AND (\n status = 'in_progress'\n OR status = 'failed'\n )\n RETURNING\n l1_batch_number,\n status,\n attempts,\n error,\n picked_by\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "l1_batch_number", - "type_info": "Int8" - }, - { - "ordinal": 1, - "name": "status", - "type_info": "Text" - }, - { - "ordinal": 2, - "name": "attempts", - "type_info": "Int2" - }, - { - "ordinal": 3, - "name": "error", - "type_info": "Text" - }, - { - "ordinal": 4, - "name": "picked_by", - "type_info": "Text" - } - ], - "parameters": { - "Left": [ - "Int8", - "Int2" - ] - }, - "nullable": [ - false, - false, - false, - true, - true - ] - }, - "hash": "d21a3d43542ffbd22d6b55c5787b86ce94a1379a01ec3ebb41aa9a210d589d08" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-5207488b5e71395b700fb0f0ba8117729a81f999c81701c148a4d85f413f6e30.json b/prover/crates/lib/prover_dal/.sqlx/query-d272c91f1209c277189a31c59ee191a43dc8eafc33ee067bd41e20f25f7625f0.json similarity index 63% rename from prover/crates/lib/prover_dal/.sqlx/query-5207488b5e71395b700fb0f0ba8117729a81f999c81701c148a4d85f413f6e30.json rename to prover/crates/lib/prover_dal/.sqlx/query-d272c91f1209c277189a31c59ee191a43dc8eafc33ee067bd41e20f25f7625f0.json index 7042c4e728e0..2c94853eacff 100644 --- a/prover/crates/lib/prover_dal/.sqlx/query-5207488b5e71395b700fb0f0ba8117729a81f999c81701c148a4d85f413f6e30.json +++ b/prover/crates/lib/prover_dal/.sqlx/query-d272c91f1209c277189a31c59ee191a43dc8eafc33ee067bd41e20f25f7625f0.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n UPDATE\n leaf_aggregation_witness_jobs_fri\n SET\n status = 'in_progress',\n attempts = attempts + 1,\n updated_at = NOW(),\n processing_started_at = NOW(),\n picked_by = $3\n WHERE\n id = (\n SELECT\n id\n FROM\n leaf_aggregation_witness_jobs_fri\n WHERE\n status = 'queued'\n AND protocol_version = $1\n AND protocol_version_patch = $2\n ORDER BY\n l1_batch_number ASC,\n id ASC\n LIMIT\n 1 FOR\n UPDATE\n SKIP LOCKED\n )\n RETURNING\n leaf_aggregation_witness_jobs_fri.*\n ", + "query": "\n UPDATE leaf_aggregation_witness_jobs_fri\n SET\n status = 'in_progress',\n attempts = attempts + 1,\n updated_at = NOW(),\n processing_started_at = NOW(),\n picked_by = $3\n WHERE\n id = (\n SELECT\n id\n FROM\n leaf_aggregation_witness_jobs_fri\n WHERE\n status = 'queued'\n AND protocol_version = $1\n AND protocol_version_patch = $2\n ORDER BY\n l1_batch_number ASC,\n id ASC\n LIMIT\n 1\n FOR UPDATE\n SKIP LOCKED\n )\n RETURNING\n leaf_aggregation_witness_jobs_fri.*\n ", "describe": { "columns": [ { @@ -104,5 +104,5 @@ false ] }, - "hash": "5207488b5e71395b700fb0f0ba8117729a81f999c81701c148a4d85f413f6e30" + "hash": "d272c91f1209c277189a31c59ee191a43dc8eafc33ee067bd41e20f25f7625f0" } diff --git a/prover/crates/lib/prover_dal/.sqlx/query-7ae81e77402f0ce3d1fabc9884cd2723def558800cb1d56840886199c584294c.json b/prover/crates/lib/prover_dal/.sqlx/query-d5bb897092bce2788fe02f31c9de6dde4142e09330557cc627fee2db278ace50.json similarity index 50% rename from prover/crates/lib/prover_dal/.sqlx/query-7ae81e77402f0ce3d1fabc9884cd2723def558800cb1d56840886199c584294c.json rename to prover/crates/lib/prover_dal/.sqlx/query-d5bb897092bce2788fe02f31c9de6dde4142e09330557cc627fee2db278ace50.json index 9251e5b1aa22..9df8f1c849cb 100644 --- a/prover/crates/lib/prover_dal/.sqlx/query-7ae81e77402f0ce3d1fabc9884cd2723def558800cb1d56840886199c584294c.json +++ b/prover/crates/lib/prover_dal/.sqlx/query-d5bb897092bce2788fe02f31c9de6dde4142e09330557cc627fee2db278ace50.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n UPDATE\n node_aggregation_witness_jobs_fri\n SET\n status = 'queued',\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n (\n status = 'in_progress'\n AND processing_started_at <= NOW() - $1 :: INTERVAL\n AND attempts < $2\n )\n OR (\n status = 'failed'\n AND attempts < $2\n )\n RETURNING\n id,\n status,\n attempts,\n circuit_id,\n error,\n picked_by\n ", + "query": "\n UPDATE leaf_aggregation_witness_jobs_fri\n SET\n status = 'queued',\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n (\n status = 'in_progress'\n AND processing_started_at <= NOW() - $1::INTERVAL\n AND attempts < $2\n )\n OR (\n status = 'failed'\n AND attempts < $2\n )\n RETURNING\n id,\n status,\n attempts,\n circuit_id,\n error,\n picked_by\n ", "describe": { "columns": [ { @@ -49,5 +49,5 @@ true ] }, - "hash": "7ae81e77402f0ce3d1fabc9884cd2723def558800cb1d56840886199c584294c" + "hash": "d5bb897092bce2788fe02f31c9de6dde4142e09330557cc627fee2db278ace50" } diff --git a/prover/crates/lib/prover_dal/.sqlx/query-db3e74f0e83ffbf84a6d61e560f2060fbea775dc185f639139fbfd23e4d5f3c6.json b/prover/crates/lib/prover_dal/.sqlx/query-db3e74f0e83ffbf84a6d61e560f2060fbea775dc185f639139fbfd23e4d5f3c6.json new file mode 100644 index 000000000000..d9f7527dfa00 --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-db3e74f0e83ffbf84a6d61e560f2060fbea775dc185f639139fbfd23e4d5f3c6.json @@ -0,0 +1,15 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE node_aggregation_witness_jobs_fri\n SET\n status = 'successful',\n updated_at = NOW(),\n time_taken = $1\n WHERE\n id = $2\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Time", + "Int8" + ] + }, + "nullable": [] + }, + "hash": "db3e74f0e83ffbf84a6d61e560f2060fbea775dc185f639139fbfd23e4d5f3c6" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-dcd3fdf29bb629a4398df652b016b80c122699e003028b14a0530e2fba5f5b23.json b/prover/crates/lib/prover_dal/.sqlx/query-dcd3fdf29bb629a4398df652b016b80c122699e003028b14a0530e2fba5f5b23.json deleted file mode 100644 index ea6c6e13a873..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-dcd3fdf29bb629a4398df652b016b80c122699e003028b14a0530e2fba5f5b23.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n prover_fri_protocol_versions (\n id,\n snark_wrapper_vk_hash,\n created_at,\n protocol_version_patch\n )\n VALUES\n ($1, $2, NOW(), $3) ON CONFLICT (id, protocol_version_patch) DO NOTHING\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int4", - "Bytea", - "Int4" - ] - }, - "nullable": [] - }, - "hash": "dcd3fdf29bb629a4398df652b016b80c122699e003028b14a0530e2fba5f5b23" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-deb56a8ff986f469a19db676be79ad7df6c6b0e29981439d94dc081d4fad3cba.json b/prover/crates/lib/prover_dal/.sqlx/query-deb56a8ff986f469a19db676be79ad7df6c6b0e29981439d94dc081d4fad3cba.json deleted file mode 100644 index 719e31d94042..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-deb56a8ff986f469a19db676be79ad7df6c6b0e29981439d94dc081d4fad3cba.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE\n node_aggregation_witness_jobs_fri\n SET\n status = 'queued'\n WHERE\n (l1_batch_number, circuit_id, depth) IN (\n SELECT\n prover_jobs_fri.l1_batch_number,\n prover_jobs_fri.circuit_id,\n prover_jobs_fri.depth\n FROM\n prover_jobs_fri\n JOIN node_aggregation_witness_jobs_fri nawj ON prover_jobs_fri.l1_batch_number = nawj.l1_batch_number\n AND prover_jobs_fri.circuit_id = nawj.circuit_id\n AND prover_jobs_fri.depth = nawj.depth\n WHERE\n nawj.status = 'waiting_for_proofs'\n AND prover_jobs_fri.status = 'successful'\n AND prover_jobs_fri.aggregation_round = 2\n GROUP BY\n prover_jobs_fri.l1_batch_number,\n prover_jobs_fri.circuit_id,\n prover_jobs_fri.depth,\n nawj.number_of_dependent_jobs\n HAVING\n COUNT(*) = nawj.number_of_dependent_jobs\n )\n RETURNING\n l1_batch_number,\n circuit_id,\n depth;\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "l1_batch_number", - "type_info": "Int8" - }, - { - "ordinal": 1, - "name": "circuit_id", - "type_info": "Int2" - }, - { - "ordinal": 2, - "name": "depth", - "type_info": "Int4" - } - ], - "parameters": { - "Left": [] - }, - "nullable": [ - false, - false, - false - ] - }, - "hash": "deb56a8ff986f469a19db676be79ad7df6c6b0e29981439d94dc081d4fad3cba" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-e068fc601d0e579f1ada02665aa4e83cc39c941282257e0c9a488bcb52f63dd2.json b/prover/crates/lib/prover_dal/.sqlx/query-e068fc601d0e579f1ada02665aa4e83cc39c941282257e0c9a488bcb52f63dd2.json deleted file mode 100644 index 4f09270666ba..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-e068fc601d0e579f1ada02665aa4e83cc39c941282257e0c9a488bcb52f63dd2.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE\n proof_compression_jobs_fri\n SET\n status = $1,\n error = $2,\n updated_at = NOW()\n WHERE\n l1_batch_number = $3\n AND status != $4\n AND status != $5\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Text", - "Text", - "Int8", - "Text", - "Text" - ] - }, - "nullable": [] - }, - "hash": "e068fc601d0e579f1ada02665aa4e83cc39c941282257e0c9a488bcb52f63dd2" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-e2e7991f27b4d58911cb7c6daa568f529dce53a9e2b37adf73c88e3dd64d461a.json b/prover/crates/lib/prover_dal/.sqlx/query-e2e7991f27b4d58911cb7c6daa568f529dce53a9e2b37adf73c88e3dd64d461a.json deleted file mode 100644 index 32f7bd9851eb..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-e2e7991f27b4d58911cb7c6daa568f529dce53a9e2b37adf73c88e3dd64d461a.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE\n witness_inputs_fri\n SET\n status = $1,\n updated_at = NOW()\n WHERE\n l1_batch_number = $2\n AND status != 'successful'\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Text", - "Int8" - ] - }, - "nullable": [] - }, - "hash": "e2e7991f27b4d58911cb7c6daa568f529dce53a9e2b37adf73c88e3dd64d461a" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-e438a4f0c705fcb39e017912ce8e1bb675a86ae14a863fa31eb513af65d606ed.json b/prover/crates/lib/prover_dal/.sqlx/query-e438a4f0c705fcb39e017912ce8e1bb675a86ae14a863fa31eb513af65d606ed.json new file mode 100644 index 000000000000..cf9ff8396eff --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-e438a4f0c705fcb39e017912ce8e1bb675a86ae14a863fa31eb513af65d606ed.json @@ -0,0 +1,24 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE witness_inputs_fri\n SET\n status = 'in_progress',\n attempts = attempts + 1,\n updated_at = NOW(),\n processing_started_at = NOW(),\n picked_by = $2\n WHERE\n l1_batch_number = (\n SELECT\n l1_batch_number\n FROM\n witness_inputs_fri\n WHERE\n status = 'queued'\n AND protocol_version = $1\n AND protocol_version_patch = $3\n ORDER BY\n l1_batch_number ASC\n LIMIT\n 1\n FOR UPDATE\n SKIP LOCKED\n )\n RETURNING\n witness_inputs_fri.l1_batch_number\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "l1_batch_number", + "type_info": "Int8" + } + ], + "parameters": { + "Left": [ + "Int4", + "Text", + "Int4" + ] + }, + "nullable": [ + false + ] + }, + "hash": "e438a4f0c705fcb39e017912ce8e1bb675a86ae14a863fa31eb513af65d606ed" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-e495b78add1c942d89d806e228093a4eb2ee0284aa89bca1ba958f470a2d6254.json b/prover/crates/lib/prover_dal/.sqlx/query-e495b78add1c942d89d806e228093a4eb2ee0284aa89bca1ba958f470a2d6254.json new file mode 100644 index 000000000000..6594b6ee76c9 --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-e495b78add1c942d89d806e228093a4eb2ee0284aa89bca1ba958f470a2d6254.json @@ -0,0 +1,14 @@ +{ + "db_name": "PostgreSQL", + "query": "\n DELETE FROM prover_jobs_fri\n WHERE\n l1_batch_number = $1;\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8" + ] + }, + "nullable": [] + }, + "hash": "e495b78add1c942d89d806e228093a4eb2ee0284aa89bca1ba958f470a2d6254" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-e743af4c18ec91eb46db5a19556fba74ec2cfc3c89c7e4e2ea475c3ce4092849.json b/prover/crates/lib/prover_dal/.sqlx/query-e743af4c18ec91eb46db5a19556fba74ec2cfc3c89c7e4e2ea475c3ce4092849.json new file mode 100644 index 000000000000..af6210ae91e4 --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-e743af4c18ec91eb46db5a19556fba74ec2cfc3c89c7e4e2ea475c3ce4092849.json @@ -0,0 +1,26 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE leaf_aggregation_witness_jobs_fri\n SET\n status = 'queued'\n WHERE\n (l1_batch_number, circuit_id) IN (\n SELECT\n prover_jobs_fri.l1_batch_number,\n prover_jobs_fri.circuit_id\n FROM\n prover_jobs_fri\n JOIN leaf_aggregation_witness_jobs_fri lawj ON prover_jobs_fri.l1_batch_number = lawj.l1_batch_number\n AND prover_jobs_fri.circuit_id = lawj.circuit_id\n WHERE\n lawj.status = 'waiting_for_proofs'\n AND prover_jobs_fri.status = 'successful'\n AND prover_jobs_fri.aggregation_round = 0\n GROUP BY\n prover_jobs_fri.l1_batch_number,\n prover_jobs_fri.circuit_id,\n lawj.number_of_basic_circuits\n HAVING\n COUNT(*) = lawj.number_of_basic_circuits\n )\n RETURNING\n l1_batch_number,\n circuit_id;\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "l1_batch_number", + "type_info": "Int8" + }, + { + "ordinal": 1, + "name": "circuit_id", + "type_info": "Int2" + } + ], + "parameters": { + "Left": [] + }, + "nullable": [ + false, + false + ] + }, + "hash": "e743af4c18ec91eb46db5a19556fba74ec2cfc3c89c7e4e2ea475c3ce4092849" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-e8066db420e075306235f728d57567878f347bdaf36294e9b24ee9c0aa1e861b.json b/prover/crates/lib/prover_dal/.sqlx/query-e8066db420e075306235f728d57567878f347bdaf36294e9b24ee9c0aa1e861b.json new file mode 100644 index 000000000000..422036ebb115 --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-e8066db420e075306235f728d57567878f347bdaf36294e9b24ee9c0aa1e861b.json @@ -0,0 +1,15 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE prover_jobs_fri\n SET\n status = 'failed',\n error = $1,\n updated_at = NOW()\n WHERE\n id = $2\n AND status != 'successful'\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Text", + "Int8" + ] + }, + "nullable": [] + }, + "hash": "e8066db420e075306235f728d57567878f347bdaf36294e9b24ee9c0aa1e861b" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-6ff1dea12f696274a62338cb8b5928e90167f2051e1c9b3a4d63e11f3273cc7a.json b/prover/crates/lib/prover_dal/.sqlx/query-e875dcbbdaed6998dbea45d4eab5d005d8760c4809b7aef902155196873da66e.json similarity index 65% rename from prover/crates/lib/prover_dal/.sqlx/query-6ff1dea12f696274a62338cb8b5928e90167f2051e1c9b3a4d63e11f3273cc7a.json rename to prover/crates/lib/prover_dal/.sqlx/query-e875dcbbdaed6998dbea45d4eab5d005d8760c4809b7aef902155196873da66e.json index 58b520f81c80..4ee9278fe42a 100644 --- a/prover/crates/lib/prover_dal/.sqlx/query-6ff1dea12f696274a62338cb8b5928e90167f2051e1c9b3a4d63e11f3273cc7a.json +++ b/prover/crates/lib/prover_dal/.sqlx/query-e875dcbbdaed6998dbea45d4eab5d005d8760c4809b7aef902155196873da66e.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n scheduler_witness_jobs_fri (\n l1_batch_number,\n scheduler_partial_input_blob_url,\n status,\n created_at,\n updated_at\n )\n VALUES\n ($1, '', 'waiting_for_proofs', NOW(), NOW()) ON CONFLICT (l1_batch_number) DO\n UPDATE\n SET\n status = $2\n ", + "query": "\n INSERT INTO\n scheduler_witness_jobs_fri (\n l1_batch_number,\n scheduler_partial_input_blob_url,\n status,\n created_at,\n updated_at\n )\n VALUES\n ($1, '', 'waiting_for_proofs', NOW(), NOW())\n ON CONFLICT (l1_batch_number) DO\n UPDATE\n SET\n status = $2\n ", "describe": { "columns": [], "parameters": { @@ -11,5 +11,5 @@ }, "nullable": [] }, - "hash": "6ff1dea12f696274a62338cb8b5928e90167f2051e1c9b3a4d63e11f3273cc7a" + "hash": "e875dcbbdaed6998dbea45d4eab5d005d8760c4809b7aef902155196873da66e" } diff --git a/prover/crates/lib/prover_dal/.sqlx/query-eb2a85cb60c680a71203769db7baf89bbd72934e1405e320e746158e6d395d96.json b/prover/crates/lib/prover_dal/.sqlx/query-eb2a85cb60c680a71203769db7baf89bbd72934e1405e320e746158e6d395d96.json new file mode 100644 index 000000000000..27680c0bb46e --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-eb2a85cb60c680a71203769db7baf89bbd72934e1405e320e746158e6d395d96.json @@ -0,0 +1,47 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE proof_compression_jobs_fri\n SET\n status = 'queued',\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n (\n status = 'in_progress'\n AND processing_started_at <= NOW() - $1::INTERVAL\n AND attempts < $2\n )\n OR (\n status = 'failed'\n AND attempts < $2\n )\n RETURNING\n l1_batch_number,\n status,\n attempts,\n error,\n picked_by\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "l1_batch_number", + "type_info": "Int8" + }, + { + "ordinal": 1, + "name": "status", + "type_info": "Text" + }, + { + "ordinal": 2, + "name": "attempts", + "type_info": "Int2" + }, + { + "ordinal": 3, + "name": "error", + "type_info": "Text" + }, + { + "ordinal": 4, + "name": "picked_by", + "type_info": "Text" + } + ], + "parameters": { + "Left": [ + "Interval", + "Int2" + ] + }, + "nullable": [ + false, + false, + false, + true, + true + ] + }, + "hash": "eb2a85cb60c680a71203769db7baf89bbd72934e1405e320e746158e6d395d96" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-a03c230ca6542578f5b8bc8c9de90aa5270bbe4e14e7608eb7f86f25b3337dfc.json b/prover/crates/lib/prover_dal/.sqlx/query-ec04b89218111a5dc8d5ade506ac3465e2211ef3013386feb12d4cc04e0eade9.json similarity index 57% rename from prover/crates/lib/prover_dal/.sqlx/query-a03c230ca6542578f5b8bc8c9de90aa5270bbe4e14e7608eb7f86f25b3337dfc.json rename to prover/crates/lib/prover_dal/.sqlx/query-ec04b89218111a5dc8d5ade506ac3465e2211ef3013386feb12d4cc04e0eade9.json index 69740e268603..7c0264b5646b 100644 --- a/prover/crates/lib/prover_dal/.sqlx/query-a03c230ca6542578f5b8bc8c9de90aa5270bbe4e14e7608eb7f86f25b3337dfc.json +++ b/prover/crates/lib/prover_dal/.sqlx/query-ec04b89218111a5dc8d5ade506ac3465e2211ef3013386feb12d4cc04e0eade9.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n UPDATE\n prover_jobs_fri\n SET\n status = 'successful',\n updated_at = NOW(),\n time_taken = $1,\n proof_blob_url = $2\n WHERE\n id = $3\n RETURNING\n prover_jobs_fri.id,\n prover_jobs_fri.l1_batch_number,\n prover_jobs_fri.circuit_id,\n prover_jobs_fri.aggregation_round,\n prover_jobs_fri.sequence_number,\n prover_jobs_fri.depth,\n prover_jobs_fri.is_node_final_proof\n ", + "query": "\n UPDATE prover_jobs_fri\n SET\n status = 'successful',\n updated_at = NOW(),\n time_taken = $1,\n proof_blob_url = $2\n WHERE\n id = $3\n RETURNING\n prover_jobs_fri.id,\n prover_jobs_fri.l1_batch_number,\n prover_jobs_fri.circuit_id,\n prover_jobs_fri.aggregation_round,\n prover_jobs_fri.sequence_number,\n prover_jobs_fri.depth,\n prover_jobs_fri.is_node_final_proof\n ", "describe": { "columns": [ { @@ -56,5 +56,5 @@ false ] }, - "hash": "a03c230ca6542578f5b8bc8c9de90aa5270bbe4e14e7608eb7f86f25b3337dfc" + "hash": "ec04b89218111a5dc8d5ade506ac3465e2211ef3013386feb12d4cc04e0eade9" } diff --git a/prover/crates/lib/prover_dal/.sqlx/query-edc61e1285bf6d3837acc67af4f15aaade450980719933089824eb8c494d64a4.json b/prover/crates/lib/prover_dal/.sqlx/query-edc61e1285bf6d3837acc67af4f15aaade450980719933089824eb8c494d64a4.json new file mode 100644 index 000000000000..2c7d7f1da5f0 --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-edc61e1285bf6d3837acc67af4f15aaade450980719933089824eb8c494d64a4.json @@ -0,0 +1,15 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE witness_inputs_fri\n SET\n status = 'successful',\n updated_at = NOW(),\n time_taken = $1\n WHERE\n l1_batch_number = $2\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Time", + "Int8" + ] + }, + "nullable": [] + }, + "hash": "edc61e1285bf6d3837acc67af4f15aaade450980719933089824eb8c494d64a4" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-5cf5d667206438d3fcf478a6c79940d96210c6e7f1dc2f249741e45385e30e61.json b/prover/crates/lib/prover_dal/.sqlx/query-eec29cbff034818f4fb5ec1e6ad38e1010d7389457b3c97e9b238a3a0291a54e.json similarity index 70% rename from prover/crates/lib/prover_dal/.sqlx/query-5cf5d667206438d3fcf478a6c79940d96210c6e7f1dc2f249741e45385e30e61.json rename to prover/crates/lib/prover_dal/.sqlx/query-eec29cbff034818f4fb5ec1e6ad38e1010d7389457b3c97e9b238a3a0291a54e.json index a37c2bdf21d4..f8e92b1ad666 100644 --- a/prover/crates/lib/prover_dal/.sqlx/query-5cf5d667206438d3fcf478a6c79940d96210c6e7f1dc2f249741e45385e30e61.json +++ b/prover/crates/lib/prover_dal/.sqlx/query-eec29cbff034818f4fb5ec1e6ad38e1010d7389457b3c97e9b238a3a0291a54e.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n leaf_aggregation_witness_jobs_fri (\n l1_batch_number,\n circuit_id,\n status,\n number_of_basic_circuits,\n created_at,\n updated_at\n )\n VALUES\n ($1, $2, 'waiting_for_proofs', 2, NOW(), NOW()) ON CONFLICT (l1_batch_number, circuit_id) DO\n UPDATE\n SET\n status = $3\n ", + "query": "\n INSERT INTO\n leaf_aggregation_witness_jobs_fri (\n l1_batch_number,\n circuit_id,\n status,\n number_of_basic_circuits,\n created_at,\n updated_at\n )\n VALUES\n ($1, $2, 'waiting_for_proofs', 2, NOW(), NOW())\n ON CONFLICT (l1_batch_number, circuit_id) DO\n UPDATE\n SET\n status = $3\n ", "describe": { "columns": [], "parameters": { @@ -12,5 +12,5 @@ }, "nullable": [] }, - "hash": "5cf5d667206438d3fcf478a6c79940d96210c6e7f1dc2f249741e45385e30e61" + "hash": "eec29cbff034818f4fb5ec1e6ad38e1010d7389457b3c97e9b238a3a0291a54e" } diff --git a/prover/crates/lib/prover_dal/.sqlx/query-6476cda32a4c54a5f68a73f9b02b7af8475cef49d0dc34c3d6ac79e1032f2a94.json b/prover/crates/lib/prover_dal/.sqlx/query-eef1b56e87eff63fcf6ffb98791583a7526ae38ceb4bf80543cfd3fb60492fb9.json similarity index 57% rename from prover/crates/lib/prover_dal/.sqlx/query-6476cda32a4c54a5f68a73f9b02b7af8475cef49d0dc34c3d6ac79e1032f2a94.json rename to prover/crates/lib/prover_dal/.sqlx/query-eef1b56e87eff63fcf6ffb98791583a7526ae38ceb4bf80543cfd3fb60492fb9.json index 5f3dc98751c1..fe481b4e54db 100644 --- a/prover/crates/lib/prover_dal/.sqlx/query-6476cda32a4c54a5f68a73f9b02b7af8475cef49d0dc34c3d6ac79e1032f2a94.json +++ b/prover/crates/lib/prover_dal/.sqlx/query-eef1b56e87eff63fcf6ffb98791583a7526ae38ceb4bf80543cfd3fb60492fb9.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n recursion_tip_witness_jobs_fri (\n l1_batch_number,\n status,\n number_of_final_node_jobs,\n protocol_version,\n created_at,\n updated_at,\n protocol_version_patch\n )\n VALUES\n (\n $1,\n 'waiting_for_proofs',\n $2,\n $3,\n NOW(),\n NOW(),\n $4\n ) ON CONFLICT (l1_batch_number) DO\n UPDATE\n SET\n updated_at = NOW()\n ", + "query": "\n INSERT INTO\n recursion_tip_witness_jobs_fri (\n l1_batch_number,\n status,\n number_of_final_node_jobs,\n protocol_version,\n created_at,\n updated_at,\n protocol_version_patch\n )\n VALUES\n ($1, 'waiting_for_proofs', $2, $3, NOW(), NOW(), $4)\n ON CONFLICT (l1_batch_number) DO\n UPDATE\n SET\n updated_at = NOW()\n ", "describe": { "columns": [], "parameters": { @@ -13,5 +13,5 @@ }, "nullable": [] }, - "hash": "6476cda32a4c54a5f68a73f9b02b7af8475cef49d0dc34c3d6ac79e1032f2a94" + "hash": "eef1b56e87eff63fcf6ffb98791583a7526ae38ceb4bf80543cfd3fb60492fb9" } diff --git a/prover/crates/lib/prover_dal/.sqlx/query-863d1a8ddd28472dae2835032f8244a1e3248c7c0ce034ff41ba2070200195ad.json b/prover/crates/lib/prover_dal/.sqlx/query-f99c34313e2717ec74b4f274e33dae905acac53b46eeaeb059d23e48a71df3b4.json similarity index 51% rename from prover/crates/lib/prover_dal/.sqlx/query-863d1a8ddd28472dae2835032f8244a1e3248c7c0ce034ff41ba2070200195ad.json rename to prover/crates/lib/prover_dal/.sqlx/query-f99c34313e2717ec74b4f274e33dae905acac53b46eeaeb059d23e48a71df3b4.json index c8bed73bbd5a..c0c2637fe5ae 100644 --- a/prover/crates/lib/prover_dal/.sqlx/query-863d1a8ddd28472dae2835032f8244a1e3248c7c0ce034ff41ba2070200195ad.json +++ b/prover/crates/lib/prover_dal/.sqlx/query-f99c34313e2717ec74b4f274e33dae905acac53b46eeaeb059d23e48a71df3b4.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n prover_jobs_fri (\n l1_batch_number,\n circuit_id,\n circuit_blob_url,\n aggregation_round,\n sequence_number,\n depth,\n is_node_final_proof,\n protocol_version,\n status,\n created_at,\n updated_at,\n protocol_version_patch\n )\n VALUES\n (\n $1,\n $2,\n $3,\n $4,\n $5,\n $6,\n $7,\n $8,\n 'queued',\n NOW(),\n NOW(),\n $9\n ) ON CONFLICT (\n l1_batch_number,\n aggregation_round,\n circuit_id,\n depth,\n sequence_number\n ) DO\n UPDATE\n SET\n updated_at = NOW()\n ", + "query": "\n INSERT INTO\n prover_jobs_fri (\n l1_batch_number,\n circuit_id,\n circuit_blob_url,\n aggregation_round,\n sequence_number,\n depth,\n is_node_final_proof,\n protocol_version,\n status,\n created_at,\n updated_at,\n protocol_version_patch\n )\n VALUES\n ($1, $2, $3, $4, $5, $6, $7, $8, 'queued', NOW(), NOW(), $9)\n ON CONFLICT (l1_batch_number, aggregation_round, circuit_id, depth, sequence_number) DO\n UPDATE\n SET\n updated_at = NOW()\n ", "describe": { "columns": [], "parameters": { @@ -18,5 +18,5 @@ }, "nullable": [] }, - "hash": "863d1a8ddd28472dae2835032f8244a1e3248c7c0ce034ff41ba2070200195ad" + "hash": "f99c34313e2717ec74b4f274e33dae905acac53b46eeaeb059d23e48a71df3b4" } diff --git a/prover/crates/lib/prover_dal/.sqlx/query-fcddeb96dcd1611dedb2091c1be304e8a35fd65bf37e976b7106f57c57e70b9b.json b/prover/crates/lib/prover_dal/.sqlx/query-fcddeb96dcd1611dedb2091c1be304e8a35fd65bf37e976b7106f57c57e70b9b.json new file mode 100644 index 000000000000..effc22d6a43b --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-fcddeb96dcd1611dedb2091c1be304e8a35fd65bf37e976b7106f57c57e70b9b.json @@ -0,0 +1,16 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE gpu_prover_queue_fri\n SET\n instance_status = 'available',\n updated_at = NOW()\n WHERE\n instance_host = $1::TEXT::inet\n AND instance_port = $2\n AND instance_status = 'full'\n AND zone = $3\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Text", + "Int4", + "Text" + ] + }, + "nullable": [] + }, + "hash": "fcddeb96dcd1611dedb2091c1be304e8a35fd65bf37e976b7106f57c57e70b9b" +} diff --git a/prover/crates/lib/prover_dal/src/cli_test_dal.rs b/prover/crates/lib/prover_dal/src/cli_test_dal.rs index ef0cd6db0da2..d08418203378 100644 --- a/prover/crates/lib/prover_dal/src/cli_test_dal.rs +++ b/prover/crates/lib/prover_dal/src/cli_test_dal.rs @@ -22,8 +22,7 @@ impl CliTestDal<'_, '_> { ) { sqlx::query!( r#" - UPDATE - prover_jobs_fri + UPDATE prover_jobs_fri SET status = $1 WHERE @@ -61,7 +60,8 @@ impl CliTestDal<'_, '_> { updated_at ) VALUES - ($1, $2, 'waiting_for_proofs', 2, NOW(), NOW()) ON CONFLICT (l1_batch_number, circuit_id) DO + ($1, $2, 'waiting_for_proofs', 2, NOW(), NOW()) + ON CONFLICT (l1_batch_number, circuit_id) DO UPDATE SET status = $3 @@ -84,15 +84,10 @@ impl CliTestDal<'_, '_> { sqlx::query!( r#" INSERT INTO - node_aggregation_witness_jobs_fri ( - l1_batch_number, - circuit_id, - status, - created_at, - updated_at - ) + node_aggregation_witness_jobs_fri (l1_batch_number, circuit_id, status, created_at, updated_at) VALUES - ($1, $2, 'waiting_for_proofs', NOW(), NOW()) ON CONFLICT (l1_batch_number, circuit_id, depth) DO + ($1, $2, 'waiting_for_proofs', NOW(), NOW()) + ON CONFLICT (l1_batch_number, circuit_id, depth) DO UPDATE SET status = $3 @@ -110,15 +105,10 @@ impl CliTestDal<'_, '_> { sqlx::query!( r#" INSERT INTO - recursion_tip_witness_jobs_fri ( - l1_batch_number, - status, - number_of_final_node_jobs, - created_at, - updated_at - ) + recursion_tip_witness_jobs_fri (l1_batch_number, status, number_of_final_node_jobs, created_at, updated_at) VALUES - ($1, 'waiting_for_proofs', 1, NOW(), NOW()) ON CONFLICT (l1_batch_number) DO + ($1, 'waiting_for_proofs', 1, NOW(), NOW()) + ON CONFLICT (l1_batch_number) DO UPDATE SET status = $2 @@ -147,7 +137,8 @@ impl CliTestDal<'_, '_> { updated_at ) VALUES - ($1, '', 'waiting_for_proofs', NOW(), NOW()) ON CONFLICT (l1_batch_number) DO + ($1, '', 'waiting_for_proofs', NOW(), NOW()) + ON CONFLICT (l1_batch_number) DO UPDATE SET status = $2 @@ -170,7 +161,8 @@ impl CliTestDal<'_, '_> { INSERT INTO proof_compression_jobs_fri (l1_batch_number, status, created_at, updated_at) VALUES - ($1, $2, NOW(), NOW()) ON CONFLICT (l1_batch_number) DO + ($1, $2, NOW(), NOW()) + ON CONFLICT (l1_batch_number) DO UPDATE SET status = $2 @@ -194,8 +186,7 @@ impl CliTestDal<'_, '_> { ) { sqlx::query!( r#" - UPDATE - prover_jobs_fri + UPDATE prover_jobs_fri SET status = $1, attempts = $2 @@ -226,8 +217,7 @@ impl CliTestDal<'_, '_> { ) { sqlx::query!( r#" - UPDATE - leaf_aggregation_witness_jobs_fri + UPDATE leaf_aggregation_witness_jobs_fri SET status = $1, attempts = $2 diff --git a/prover/crates/lib/prover_dal/src/fri_gpu_prover_queue_dal.rs b/prover/crates/lib/prover_dal/src/fri_gpu_prover_queue_dal.rs index 7cc424e35c50..aa4810ad2f6f 100644 --- a/prover/crates/lib/prover_dal/src/fri_gpu_prover_queue_dal.rs +++ b/prover/crates/lib/prover_dal/src/fri_gpu_prover_queue_dal.rs @@ -24,8 +24,7 @@ impl FriGpuProverQueueDal<'_, '_> { let processing_timeout = pg_interval_from_duration(processing_timeout); let result: Option = sqlx::query!( r#" - UPDATE - gpu_prover_queue_fri + UPDATE gpu_prover_queue_fri SET instance_status = 'reserved', updated_at = NOW(), @@ -45,14 +44,14 @@ impl FriGpuProverQueueDal<'_, '_> { instance_status = 'available' OR ( instance_status = 'reserved' - AND processing_started_at < NOW() - $1 :: INTERVAL + AND processing_started_at < NOW() - $1::INTERVAL ) ) ORDER BY updated_at ASC LIMIT - 1 FOR - UPDATE + 1 + FOR UPDATE SKIP LOCKED ) RETURNING @@ -97,17 +96,8 @@ impl FriGpuProverQueueDal<'_, '_> { protocol_version_patch ) VALUES - ( - CAST($1 :: TEXT AS inet), - $2, - 'available', - $3, - $4, - NOW(), - NOW(), - $5, - $6 - ) ON CONFLICT (instance_host, instance_port, zone) DO + (CAST($1::TEXT AS inet), $2, 'available', $3, $4, NOW(), NOW(), $5, $6) + ON CONFLICT (instance_host, instance_port, zone) DO UPDATE SET instance_status = 'available', @@ -137,13 +127,12 @@ impl FriGpuProverQueueDal<'_, '_> { ) { sqlx::query!( r#" - UPDATE - gpu_prover_queue_fri + UPDATE gpu_prover_queue_fri SET instance_status = $1, updated_at = NOW() WHERE - instance_host = $2 :: TEXT :: inet + instance_host = $2::TEXT::inet AND instance_port = $3 AND zone = $4 "#, @@ -164,13 +153,12 @@ impl FriGpuProverQueueDal<'_, '_> { ) { sqlx::query!( r#" - UPDATE - gpu_prover_queue_fri + UPDATE gpu_prover_queue_fri SET instance_status = 'available', updated_at = NOW() WHERE - instance_host = $1 :: TEXT :: inet + instance_host = $1::TEXT::inet AND instance_port = $2 AND instance_status = 'full' AND zone = $3 @@ -196,7 +184,7 @@ impl FriGpuProverQueueDal<'_, '_> { FROM gpu_prover_queue_fri WHERE - instance_host = $1 :: TEXT :: inet + instance_host = $1::TEXT::inet AND instance_port = $2 AND zone = $3 "#, @@ -252,8 +240,7 @@ impl FriGpuProverQueueDal<'_, '_> { ) -> sqlx::Result { sqlx::query!( r#" - DELETE FROM - gpu_prover_queue_fri + DELETE FROM gpu_prover_queue_fri "# ) .execute(self.storage.conn()) diff --git a/prover/crates/lib/prover_dal/src/fri_proof_compressor_dal.rs b/prover/crates/lib/prover_dal/src/fri_proof_compressor_dal.rs index 9582e483d688..31b121e51e42 100644 --- a/prover/crates/lib/prover_dal/src/fri_proof_compressor_dal.rs +++ b/prover/crates/lib/prover_dal/src/fri_proof_compressor_dal.rs @@ -37,7 +37,8 @@ impl FriProofCompressorDal<'_, '_> { protocol_version_patch ) VALUES - ($1, $2, $3, NOW(), NOW(), $4, $5) ON CONFLICT (l1_batch_number) DO NOTHING + ($1, $2, $3, NOW(), NOW(), $4, $5) + ON CONFLICT (l1_batch_number) DO NOTHING "#, i64::from(block_number.0), fri_proof_blob_url, @@ -57,8 +58,7 @@ impl FriProofCompressorDal<'_, '_> { ) -> Option { sqlx::query!( r#" - UPDATE - proof_compression_jobs_fri + UPDATE proof_compression_jobs_fri SET status = $1, attempts = attempts + 1, @@ -78,8 +78,8 @@ impl FriProofCompressorDal<'_, '_> { ORDER BY l1_batch_number ASC LIMIT - 1 FOR - UPDATE + 1 + FOR UPDATE SKIP LOCKED ) RETURNING @@ -127,8 +127,7 @@ impl FriProofCompressorDal<'_, '_> { ) { sqlx::query!( r#" - UPDATE - proof_compression_jobs_fri + UPDATE proof_compression_jobs_fri SET status = $1, updated_at = NOW(), @@ -154,8 +153,7 @@ impl FriProofCompressorDal<'_, '_> { ) { sqlx::query!( r#" - UPDATE - proof_compression_jobs_fri + UPDATE proof_compression_jobs_fri SET status = $1, error = $2, @@ -225,8 +223,7 @@ impl FriProofCompressorDal<'_, '_> { pub async fn mark_proof_sent_to_server(&mut self, block_number: L1BatchNumber) { sqlx::query!( r#" - UPDATE - proof_compression_jobs_fri + UPDATE proof_compression_jobs_fri SET status = $1, updated_at = NOW() @@ -315,8 +312,7 @@ impl FriProofCompressorDal<'_, '_> { { sqlx::query!( r#" - UPDATE - proof_compression_jobs_fri + UPDATE proof_compression_jobs_fri SET status = 'queued', updated_at = NOW(), @@ -324,7 +320,7 @@ impl FriProofCompressorDal<'_, '_> { WHERE ( status = 'in_progress' - AND processing_started_at <= NOW() - $1 :: INTERVAL + AND processing_started_at <= NOW() - $1::INTERVAL AND attempts < $2 ) OR ( @@ -396,8 +392,7 @@ impl FriProofCompressorDal<'_, '_> { ) -> sqlx::Result { sqlx::query!( r#" - DELETE FROM - proof_compression_jobs_fri + DELETE FROM proof_compression_jobs_fri WHERE l1_batch_number = $1 "#, @@ -410,8 +405,7 @@ impl FriProofCompressorDal<'_, '_> { pub async fn delete(&mut self) -> sqlx::Result { sqlx::query!( r#" - DELETE FROM - proof_compression_jobs_fri + DELETE FROM proof_compression_jobs_fri "# ) .execute(self.storage.conn()) @@ -426,8 +420,7 @@ impl FriProofCompressorDal<'_, '_> { { sqlx::query!( r#" - UPDATE - proof_compression_jobs_fri + UPDATE proof_compression_jobs_fri SET status = 'queued', error = 'Manually requeued', diff --git a/prover/crates/lib/prover_dal/src/fri_protocol_versions_dal.rs b/prover/crates/lib/prover_dal/src/fri_protocol_versions_dal.rs index 7de6e3f7c6fd..8c1c497eeded 100644 --- a/prover/crates/lib/prover_dal/src/fri_protocol_versions_dal.rs +++ b/prover/crates/lib/prover_dal/src/fri_protocol_versions_dal.rs @@ -20,14 +20,10 @@ impl FriProtocolVersionsDal<'_, '_> { sqlx::query!( r#" INSERT INTO - prover_fri_protocol_versions ( - id, - snark_wrapper_vk_hash, - created_at, - protocol_version_patch - ) + prover_fri_protocol_versions (id, snark_wrapper_vk_hash, created_at, protocol_version_patch) VALUES - ($1, $2, NOW(), $3) ON CONFLICT (id, protocol_version_patch) DO NOTHING + ($1, $2, NOW(), $3) + ON CONFLICT (id, protocol_version_patch) DO NOTHING "#, id.minor as i32, l1_verifier_config.snark_wrapper_vk_hash.as_bytes(), @@ -87,8 +83,7 @@ impl FriProtocolVersionsDal<'_, '_> { pub async fn delete(&mut self) -> sqlx::Result { sqlx::query!( r#" - DELETE FROM - prover_fri_protocol_versions + DELETE FROM prover_fri_protocol_versions "# ) .execute(self.storage.conn()) diff --git a/prover/crates/lib/prover_dal/src/fri_prover_dal.rs b/prover/crates/lib/prover_dal/src/fri_prover_dal.rs index 3543ebb58cc1..71d0c11728b1 100644 --- a/prover/crates/lib/prover_dal/src/fri_prover_dal.rs +++ b/prover/crates/lib/prover_dal/src/fri_prover_dal.rs @@ -68,8 +68,7 @@ impl FriProverDal<'_, '_> { ) -> Option { sqlx::query!( r#" - UPDATE - prover_jobs_fri + UPDATE prover_jobs_fri SET status = 'in_progress', attempts = attempts + 1, @@ -92,8 +91,8 @@ impl FriProverDal<'_, '_> { circuit_id ASC, id ASC LIMIT - 1 FOR - UPDATE + 1 + FOR UPDATE SKIP LOCKED ) RETURNING @@ -131,8 +130,7 @@ impl FriProverDal<'_, '_> { ) -> Option { sqlx::query!( r#" - UPDATE - prover_jobs_fri + UPDATE prover_jobs_fri SET status = 'in_progress', attempts = attempts + 1, @@ -154,8 +152,8 @@ impl FriProverDal<'_, '_> { l1_batch_number ASC, id ASC LIMIT - 1 FOR - UPDATE + 1 + FOR UPDATE SKIP LOCKED ) RETURNING @@ -202,8 +200,7 @@ impl FriProverDal<'_, '_> { .collect(); sqlx::query!( r#" - UPDATE - prover_jobs_fri + UPDATE prover_jobs_fri SET status = 'in_progress', attempts = attempts + 1, @@ -219,7 +216,7 @@ impl FriProverDal<'_, '_> { SELECT * FROM - UNNEST($1 :: SMALLINT [], $2 :: SMALLINT []) + UNNEST($1::SMALLINT[], $2::SMALLINT[]) ) AS tuple (circuit_id, ROUND) JOIN LATERAL ( SELECT @@ -243,8 +240,8 @@ impl FriProverDal<'_, '_> { pj.aggregation_round DESC, pj.id ASC LIMIT - 1 FOR - UPDATE + 1 + FOR UPDATE SKIP LOCKED ) RETURNING @@ -281,8 +278,7 @@ impl FriProverDal<'_, '_> { { sqlx::query!( r#" - UPDATE - prover_jobs_fri + UPDATE prover_jobs_fri SET status = 'failed', error = $1, @@ -327,8 +323,7 @@ impl FriProverDal<'_, '_> { ) -> FriProverJobMetadata { sqlx::query!( r#" - UPDATE - prover_jobs_fri + UPDATE prover_jobs_fri SET status = 'successful', updated_at = NOW(), @@ -377,8 +372,7 @@ impl FriProverDal<'_, '_> { { sqlx::query!( r#" - UPDATE - prover_jobs_fri + UPDATE prover_jobs_fri SET status = 'queued', updated_at = NOW(), @@ -392,14 +386,14 @@ impl FriProverDal<'_, '_> { WHERE ( status IN ('in_progress', 'in_gpu_proof') - AND processing_started_at <= NOW() - $1 :: INTERVAL + AND processing_started_at <= NOW() - $1::INTERVAL AND attempts < $2 ) OR ( status = 'failed' AND attempts < $2 - ) FOR - UPDATE + ) + FOR UPDATE SKIP LOCKED ) RETURNING @@ -459,26 +453,8 @@ impl FriProverDal<'_, '_> { protocol_version_patch ) VALUES - ( - $1, - $2, - $3, - $4, - $5, - $6, - $7, - $8, - 'queued', - NOW(), - NOW(), - $9 - ) ON CONFLICT ( - l1_batch_number, - aggregation_round, - circuit_id, - depth, - sequence_number - ) DO + ($1, $2, $3, $4, $5, $6, $7, $8, 'queued', NOW(), NOW(), $9) + ON CONFLICT (l1_batch_number, aggregation_round, circuit_id, depth, sequence_number) DO UPDATE SET updated_at = NOW() @@ -601,12 +577,7 @@ impl FriProverDal<'_, '_> { FROM prover_jobs_fri WHERE - status IN ( - 'queued', - 'in_gpu_proof', - 'in_progress', - 'failed' - ) + status IN ('queued', 'in_gpu_proof', 'in_progress', 'failed') GROUP BY circuit_id, aggregation_round @@ -629,8 +600,7 @@ impl FriProverDal<'_, '_> { pub async fn update_status(&mut self, id: u32, status: &str) { sqlx::query!( r#" - UPDATE - prover_jobs_fri + UPDATE prover_jobs_fri SET status = $1, updated_at = NOW() @@ -803,8 +773,7 @@ impl FriProverDal<'_, '_> { ) -> sqlx::Result { sqlx::query!( r#" - DELETE FROM - prover_jobs_fri + DELETE FROM prover_jobs_fri WHERE l1_batch_number = $1; "#, @@ -825,8 +794,7 @@ impl FriProverDal<'_, '_> { pub async fn delete_prover_jobs_fri(&mut self) -> sqlx::Result { sqlx::query!( r#" - DELETE FROM - prover_jobs_fri + DELETE FROM prover_jobs_fri "# ) .execute(self.storage.conn()) @@ -845,8 +813,7 @@ impl FriProverDal<'_, '_> { { sqlx::query!( r#" - UPDATE - prover_jobs_fri + UPDATE prover_jobs_fri SET status = 'queued', error = 'Manually requeued', diff --git a/prover/crates/lib/prover_dal/src/fri_witness_generator_dal.rs b/prover/crates/lib/prover_dal/src/fri_witness_generator_dal.rs index 9a5bab107cbd..2040b444044e 100644 --- a/prover/crates/lib/prover_dal/src/fri_witness_generator_dal.rs +++ b/prover/crates/lib/prover_dal/src/fri_witness_generator_dal.rs @@ -59,7 +59,8 @@ impl FriWitnessGeneratorDal<'_, '_> { protocol_version_patch ) VALUES - ($1, $2, $3, 'queued', NOW(), NOW(), $4) ON CONFLICT (l1_batch_number) DO NOTHING + ($1, $2, $3, 'queued', NOW(), NOW(), $4) + ON CONFLICT (l1_batch_number) DO NOTHING "#, i64::from(block_number.0), witness_inputs_blob_url, @@ -80,8 +81,7 @@ impl FriWitnessGeneratorDal<'_, '_> { ) -> Option { sqlx::query!( r#" - UPDATE - witness_inputs_fri + UPDATE witness_inputs_fri SET status = 'in_progress', attempts = attempts + 1, @@ -101,8 +101,8 @@ impl FriWitnessGeneratorDal<'_, '_> { ORDER BY l1_batch_number ASC LIMIT - 1 FOR - UPDATE + 1 + FOR UPDATE SKIP LOCKED ) RETURNING @@ -125,8 +125,7 @@ impl FriWitnessGeneratorDal<'_, '_> { ) { sqlx::query!( r#" - UPDATE - witness_inputs_fri + UPDATE witness_inputs_fri SET status = $1, updated_at = NOW() @@ -149,8 +148,7 @@ impl FriWitnessGeneratorDal<'_, '_> { ) { sqlx::query!( r#" - UPDATE - witness_inputs_fri + UPDATE witness_inputs_fri SET status = 'successful', updated_at = NOW(), @@ -169,8 +167,7 @@ impl FriWitnessGeneratorDal<'_, '_> { pub async fn mark_leaf_aggregation_as_successful(&mut self, id: u32, time_taken: Duration) { sqlx::query!( r#" - UPDATE - leaf_aggregation_witness_jobs_fri + UPDATE leaf_aggregation_witness_jobs_fri SET status = 'successful', updated_at = NOW(), @@ -194,8 +191,7 @@ impl FriWitnessGeneratorDal<'_, '_> { let processing_timeout = pg_interval_from_duration(processing_timeout); sqlx::query!( r#" - UPDATE - witness_inputs_fri + UPDATE witness_inputs_fri SET status = 'queued', updated_at = NOW(), @@ -203,7 +199,7 @@ impl FriWitnessGeneratorDal<'_, '_> { WHERE ( status = 'in_progress' - AND processing_started_at <= NOW() - $1 :: INTERVAL + AND processing_started_at <= NOW() - $1::INTERVAL AND attempts < $2 ) OR ( @@ -272,17 +268,8 @@ impl FriWitnessGeneratorDal<'_, '_> { protocol_version_patch ) VALUES - ( - $1, - $2, - $3, - $4, - $5, - 'waiting_for_proofs', - NOW(), - NOW(), - $6 - ) ON CONFLICT (l1_batch_number, circuit_id) DO + ($1, $2, $3, $4, $5, 'waiting_for_proofs', NOW(), NOW(), $6) + ON CONFLICT (l1_batch_number, circuit_id) DO UPDATE SET updated_at = NOW() @@ -322,15 +309,8 @@ impl FriWitnessGeneratorDal<'_, '_> { protocol_version_patch ) VALUES - ( - $1, - 'waiting_for_proofs', - $2, - $3, - NOW(), - NOW(), - $4 - ) ON CONFLICT (l1_batch_number) DO + ($1, 'waiting_for_proofs', $2, $3, NOW(), NOW(), $4) + ON CONFLICT (l1_batch_number) DO UPDATE SET updated_at = NOW() @@ -357,15 +337,8 @@ impl FriWitnessGeneratorDal<'_, '_> { protocol_version_patch ) VALUES - ( - $1, - $2, - $3, - 'waiting_for_proofs', - NOW(), - NOW(), - $4 - ) ON CONFLICT (l1_batch_number) DO + ($1, $2, $3, 'waiting_for_proofs', NOW(), NOW(), $4) + ON CONFLICT (l1_batch_number) DO UPDATE SET updated_at = NOW() @@ -390,8 +363,7 @@ impl FriWitnessGeneratorDal<'_, '_> { ) -> Option { let row = sqlx::query!( r#" - UPDATE - leaf_aggregation_witness_jobs_fri + UPDATE leaf_aggregation_witness_jobs_fri SET status = 'in_progress', attempts = attempts + 1, @@ -412,8 +384,8 @@ impl FriWitnessGeneratorDal<'_, '_> { l1_batch_number ASC, id ASC LIMIT - 1 FOR - UPDATE + 1 + FOR UPDATE SKIP LOCKED ) RETURNING @@ -482,8 +454,7 @@ impl FriWitnessGeneratorDal<'_, '_> { pub async fn move_leaf_aggregation_jobs_from_waiting_to_queued(&mut self) -> Vec<(i64, u8)> { sqlx::query!( r#" - UPDATE - leaf_aggregation_witness_jobs_fri + UPDATE leaf_aggregation_witness_jobs_fri SET status = 'queued' WHERE @@ -529,8 +500,7 @@ impl FriWitnessGeneratorDal<'_, '_> { ) { sqlx::query!( r#" - UPDATE - node_aggregation_witness_jobs_fri + UPDATE node_aggregation_witness_jobs_fri SET aggregations_url = $1, number_of_dependent_jobs = $5, @@ -558,8 +528,7 @@ impl FriWitnessGeneratorDal<'_, '_> { ) -> Option { let row = sqlx::query!( r#" - UPDATE - node_aggregation_witness_jobs_fri + UPDATE node_aggregation_witness_jobs_fri SET status = 'in_progress', attempts = attempts + 1, @@ -581,8 +550,8 @@ impl FriWitnessGeneratorDal<'_, '_> { depth ASC, id ASC LIMIT - 1 FOR - UPDATE + 1 + FOR UPDATE SKIP LOCKED ) RETURNING @@ -620,8 +589,7 @@ impl FriWitnessGeneratorDal<'_, '_> { pub async fn mark_node_aggregation_as_successful(&mut self, id: u32, time_taken: Duration) { sqlx::query!( r#" - UPDATE - node_aggregation_witness_jobs_fri + UPDATE node_aggregation_witness_jobs_fri SET status = 'successful', updated_at = NOW(), @@ -662,18 +630,8 @@ impl FriWitnessGeneratorDal<'_, '_> { protocol_version_patch ) VALUES - ( - $1, - $2, - $3, - $4, - $5, - $6, - 'waiting_for_proofs', - NOW(), - NOW(), - $7 - ) ON CONFLICT (l1_batch_number, circuit_id, depth) DO + ($1, $2, $3, $4, $5, $6, 'waiting_for_proofs', NOW(), NOW(), $7) + ON CONFLICT (l1_batch_number, circuit_id, depth) DO UPDATE SET updated_at = NOW() @@ -694,8 +652,7 @@ impl FriWitnessGeneratorDal<'_, '_> { pub async fn move_depth_zero_node_aggregation_jobs(&mut self) -> Vec<(i64, u8, u16)> { sqlx::query!( r#" - UPDATE - node_aggregation_witness_jobs_fri + UPDATE node_aggregation_witness_jobs_fri SET status = 'queued' WHERE @@ -739,8 +696,7 @@ impl FriWitnessGeneratorDal<'_, '_> { pub async fn move_depth_non_zero_node_aggregation_jobs(&mut self) -> Vec<(i64, u8, u16)> { sqlx::query!( r#" - UPDATE - node_aggregation_witness_jobs_fri + UPDATE node_aggregation_witness_jobs_fri SET status = 'queued' WHERE @@ -783,8 +739,7 @@ impl FriWitnessGeneratorDal<'_, '_> { pub async fn move_recursion_tip_jobs_from_waiting_to_queued(&mut self) -> Vec { sqlx::query!( r#" - UPDATE - recursion_tip_witness_jobs_fri + UPDATE recursion_tip_witness_jobs_fri SET status = 'queued' WHERE @@ -821,8 +776,7 @@ impl FriWitnessGeneratorDal<'_, '_> { pub async fn move_scheduler_jobs_from_waiting_to_queued(&mut self) -> Vec { sqlx::query!( r#" - UPDATE - scheduler_witness_jobs_fri + UPDATE scheduler_witness_jobs_fri SET status = 'queued' WHERE @@ -858,8 +812,7 @@ impl FriWitnessGeneratorDal<'_, '_> { let processing_timeout = pg_interval_from_duration(processing_timeout); sqlx::query!( r#" - UPDATE - leaf_aggregation_witness_jobs_fri + UPDATE leaf_aggregation_witness_jobs_fri SET status = 'queued', updated_at = NOW(), @@ -867,7 +820,7 @@ impl FriWitnessGeneratorDal<'_, '_> { WHERE ( status = 'in_progress' - AND processing_started_at <= NOW() - $1 :: INTERVAL + AND processing_started_at <= NOW() - $1::INTERVAL AND attempts < $2 ) OR ( @@ -908,8 +861,7 @@ impl FriWitnessGeneratorDal<'_, '_> { let processing_timeout = pg_interval_from_duration(processing_timeout); sqlx::query!( r#" - UPDATE - node_aggregation_witness_jobs_fri + UPDATE node_aggregation_witness_jobs_fri SET status = 'queued', updated_at = NOW(), @@ -917,7 +869,7 @@ impl FriWitnessGeneratorDal<'_, '_> { WHERE ( status = 'in_progress' - AND processing_started_at <= NOW() - $1 :: INTERVAL + AND processing_started_at <= NOW() - $1::INTERVAL AND attempts < $2 ) OR ( @@ -958,8 +910,7 @@ impl FriWitnessGeneratorDal<'_, '_> { let processing_timeout = pg_interval_from_duration(processing_timeout); sqlx::query!( r#" - UPDATE - recursion_tip_witness_jobs_fri + UPDATE recursion_tip_witness_jobs_fri SET status = 'queued', updated_at = NOW(), @@ -967,7 +918,7 @@ impl FriWitnessGeneratorDal<'_, '_> { WHERE ( status = 'in_progress' - AND processing_started_at <= NOW() - $1 :: INTERVAL + AND processing_started_at <= NOW() - $1::INTERVAL AND attempts < $2 ) OR ( @@ -1006,8 +957,7 @@ impl FriWitnessGeneratorDal<'_, '_> { ) -> Option<(L1BatchNumber, i32)> { sqlx::query!( r#" - UPDATE - recursion_tip_witness_jobs_fri + UPDATE recursion_tip_witness_jobs_fri SET status = 'in_progress', attempts = attempts + 1, @@ -1027,8 +977,8 @@ impl FriWitnessGeneratorDal<'_, '_> { ORDER BY l1_batch_number ASC LIMIT - 1 FOR - UPDATE + 1 + FOR UPDATE SKIP LOCKED ) RETURNING @@ -1053,8 +1003,7 @@ impl FriWitnessGeneratorDal<'_, '_> { pub async fn mark_scheduler_jobs_as_queued(&mut self, l1_batch_number: i64) { sqlx::query!( r#" - UPDATE - scheduler_witness_jobs_fri + UPDATE scheduler_witness_jobs_fri SET status = 'queued' WHERE @@ -1077,8 +1026,7 @@ impl FriWitnessGeneratorDal<'_, '_> { let processing_timeout = pg_interval_from_duration(processing_timeout); sqlx::query!( r#" - UPDATE - scheduler_witness_jobs_fri + UPDATE scheduler_witness_jobs_fri SET status = 'queued', updated_at = NOW(), @@ -1086,7 +1034,7 @@ impl FriWitnessGeneratorDal<'_, '_> { WHERE ( status = 'in_progress' - AND processing_started_at <= NOW() - $1 :: INTERVAL + AND processing_started_at <= NOW() - $1::INTERVAL AND attempts < $2 ) OR ( @@ -1125,8 +1073,7 @@ impl FriWitnessGeneratorDal<'_, '_> { ) -> Option { sqlx::query!( r#" - UPDATE - scheduler_witness_jobs_fri + UPDATE scheduler_witness_jobs_fri SET status = 'in_progress', attempts = attempts + 1, @@ -1146,8 +1093,8 @@ impl FriWitnessGeneratorDal<'_, '_> { ORDER BY l1_batch_number ASC LIMIT - 1 FOR - UPDATE + 1 + FOR UPDATE SKIP LOCKED ) RETURNING @@ -1210,8 +1157,7 @@ impl FriWitnessGeneratorDal<'_, '_> { ) { sqlx::query!( r#" - UPDATE - recursion_tip_witness_jobs_fri + UPDATE recursion_tip_witness_jobs_fri SET status = 'successful', updated_at = NOW(), @@ -1234,8 +1180,7 @@ impl FriWitnessGeneratorDal<'_, '_> { ) { sqlx::query!( r#" - UPDATE - scheduler_witness_jobs_fri + UPDATE scheduler_witness_jobs_fri SET status = 'successful', updated_at = NOW(), @@ -1628,8 +1573,7 @@ impl FriWitnessGeneratorDal<'_, '_> { ) -> Vec { sqlx::query!( r#" - UPDATE - witness_inputs_fri + UPDATE witness_inputs_fri SET status = 'queued', updated_at = NOW(), @@ -1699,8 +1643,7 @@ impl FriWitnessGeneratorDal<'_, '_> { ) -> Vec { sqlx::query!( r#" - UPDATE - recursion_tip_witness_jobs_fri + UPDATE recursion_tip_witness_jobs_fri SET status = 'queued', updated_at = NOW(), @@ -1744,8 +1687,7 @@ impl FriWitnessGeneratorDal<'_, '_> { ) -> Vec { sqlx::query!( r#" - UPDATE - scheduler_witness_jobs_fri + UPDATE scheduler_witness_jobs_fri SET status = 'queued', updated_at = NOW(), From a3390ad0ea2925400a49e8bc8c8175dd0d8f7f12 Mon Sep 17 00:00:00 2001 From: matias-gonz Date: Mon, 30 Sep 2024 09:02:46 -0300 Subject: [PATCH 13/19] Add sqruff formatter --- zk_toolbox/Cargo.lock | 301 +++++++++++++++++- zk_toolbox/crates/zk_supervisor/Cargo.toml | 2 +- .../zk_supervisor/src/commands/sql_fmt.rs | 38 +-- zk_toolbox/rust-toolchain | 2 +- 4 files changed, 297 insertions(+), 46 deletions(-) diff --git a/zk_toolbox/Cargo.lock b/zk_toolbox/Cargo.lock index 070af3c04fc8..11526372c07d 100644 --- a/zk_toolbox/Cargo.lock +++ b/zk_toolbox/Cargo.lock @@ -45,7 +45,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" dependencies = [ "cfg-if", + "const-random", + "getrandom", "once_cell", + "serde", "version_check", "zerocopy", ] @@ -135,6 +138,12 @@ version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" +[[package]] +name = "append-only-vec" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bb8633986ce6db557d8a568b0b874d840db9946e589a3de4cf84fb02130745f" + [[package]] name = "arrayvec" version = "0.7.4" @@ -421,6 +430,15 @@ dependencies = [ "zeroize", ] +[[package]] +name = "borsh" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6362ed55def622cddc70a4746a68554d7b687713770de539e59a739b249f8ed" +dependencies = [ + "cfg_aliases", +] + [[package]] name = "bs58" version = "0.5.1" @@ -528,6 +546,12 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +[[package]] +name = "cfg_aliases" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" + [[package]] name = "chrono" version = "0.4.38" @@ -699,6 +723,12 @@ dependencies = [ "xshell", ] +[[package]] +name = "common-path" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2382f75942f4b3be3690fe4f86365e9c853c1587d6ee58212cebf6e2a9ccd101" + [[package]] name = "compile-fmt" version = "0.1.0" @@ -737,6 +767,12 @@ dependencies = [ "zksync_protobuf_config", ] +[[package]] +name = "configparser" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e57e3272f0190c3f1584272d613719ba5fc7df7f4942fe542e63d949cf3a649b" + [[package]] name = "console" version = "0.15.8" @@ -769,6 +805,26 @@ version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" +[[package]] +name = "const-random" +version = "0.1.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87e00182fe74b066627d63b85fd550ac2998d4b0bd86bfed477a0ae4c7c71359" +dependencies = [ + "const-random-macro", +] + +[[package]] +name = "const-random-macro" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9d839f2a20b0aee515dc581a6172f2321f96cab76c1a38a4c584a194955390e" +dependencies = [ + "getrandom", + "once_cell", + "tiny-keccak", +] + [[package]] name = "constant_time_eq" version = "0.1.5" @@ -1063,6 +1119,12 @@ version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "339544cc9e2c4dc3fc7149fd630c5f22263a4fdf18a98afd0075784968b5cf00" +[[package]] +name = "diff" +version = "0.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56254986775e3233ffa9c4d7d3faaf6d36a2c09d30b20687e9f88bc8bafc16c8" + [[package]] name = "digest" version = "0.10.7" @@ -1135,6 +1197,12 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "56ce8c6da7551ec6c462cbaf3bfbc75131ebbfa1c944aeaa9dab51ca1c5f0c3b" +[[package]] +name = "dyn-clone" +version = "1.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d6ef0072f8a535281e4876be788938b528e9a1d43900b82c2569af7da799125" + [[package]] name = "ecdsa" version = "0.14.8" @@ -1285,6 +1353,18 @@ dependencies = [ "zeroize", ] +[[package]] +name = "enum_dispatch" +version = "0.3.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa18ce2bc66555b3218614519ac839ddb759a7d6720732f979ef8d13be147ecd" +dependencies = [ + "once_cell", + "proc-macro2", + "quote", + "syn 2.0.68", +] + [[package]] name = "envy" version = "0.4.2" @@ -1636,7 +1716,7 @@ dependencies = [ "tokio", "tracing", "walkdir", - "yansi", + "yansi 0.5.1", ] [[package]] @@ -1660,6 +1740,17 @@ dependencies = [ "once_cell", ] +[[package]] +name = "fancy-regex" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "531e46835a22af56d1e3b66f04844bed63158bc094a628bec1d321d9b4c44bf2" +dependencies = [ + "bit-set", + "regex-automata 0.4.7", + "regex-syntax 0.8.4", +] + [[package]] name = "fastrand" version = "2.1.0" @@ -1936,8 +2027,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if", + "js-sys", "libc", "wasi", + "wasm-bindgen", ] [[package]] @@ -2005,7 +2098,7 @@ dependencies = [ "futures-sink", "futures-util", "http 0.2.12", - "indexmap 2.2.6", + "indexmap 2.5.0", "slab", "tokio", "tokio-util", @@ -2024,7 +2117,7 @@ dependencies = [ "futures-core", "futures-sink", "http 1.1.0", - "indexmap 2.2.6", + "indexmap 2.5.0", "slab", "tokio", "tokio-util", @@ -2438,9 +2531,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.2.6" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +checksum = "68b900aa2f7301e21c36462b170ee99994de34dff39a4a6a528e80e7376d07e5" dependencies = [ "equivalent", "hashbrown 0.14.5", @@ -2516,6 +2609,15 @@ dependencies = [ "either", ] +[[package]] +name = "itertools" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" +dependencies = [ + "either", +] + [[package]] name = "itoa" version = "1.0.11" @@ -2619,6 +2721,29 @@ dependencies = [ "regex-automata 0.4.7", ] +[[package]] +name = "lazy-regex" +version = "3.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d8e41c97e6bc7ecb552016274b99fbb5d035e8de288c582d9b933af6677bfda" +dependencies = [ + "lazy-regex-proc_macros", + "once_cell", + "regex", +] + +[[package]] +name = "lazy-regex-proc_macros" +version = "3.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76e1d8b05d672c53cb9c7b920bbba8783845ae4f0b076e02a3db1d02c81b4163" +dependencies = [ + "proc-macro2", + "quote", + "regex", + "syn 2.0.68", +] + [[package]] name = "lazy_static" version = "1.5.0" @@ -2845,6 +2970,12 @@ version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086" +[[package]] +name = "nohash-hasher" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bf50223579dc7cdcfb3bfcacf7069ff68243f8c363f62ffa99cf000a6b9c451" + [[package]] name = "nom" version = "7.1.3" @@ -3368,7 +3499,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db" dependencies = [ "fixedbitset", - "indexmap 2.2.6", + "indexmap 2.5.0", ] [[package]] @@ -3412,6 +3543,7 @@ dependencies = [ "proc-macro2", "quote", "syn 2.0.68", + "unicase", ] [[package]] @@ -3430,6 +3562,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "90fcb95eef784c2ac79119d1dd819e162b5da872ce6f3c3abe1e8ca1c082f72b" dependencies = [ "siphasher", + "unicase", ] [[package]] @@ -3525,6 +3658,16 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" +[[package]] +name = "pretty_assertions" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ae130e2f271fbc2ac3a40fb1d07180839cdbbe443c7a27e1e3c13c5cac0116d" +dependencies = [ + "diff", + "yansi 1.0.1", +] + [[package]] name = "prettyplease" version = "0.2.20" @@ -4087,6 +4230,12 @@ version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" +[[package]] +name = "rustc-hash" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "583034fd73374156e66797ed8e5b0d5690409c9226b22d87cb7f19821c05d152" + [[package]] name = "rustc-hex" version = "2.1.0" @@ -4516,11 +4665,12 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.120" +version = "1.0.128" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e0d21c9a8cae1235ad58a00c11cb40d4b1e5c784f1ef2c537876ed6ffd8b7c5" +checksum = "6ff5456707a1de34e7e37f2a6fd3d3f808c318259cbd01ab6377795054b483d8" dependencies = [ "itoa", + "memchr", "ryu", "serde", ] @@ -4575,7 +4725,7 @@ version = "0.9.34+deprecated" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47" dependencies = [ - "indexmap 2.2.6", + "indexmap 2.5.0", "itoa", "ryu", "serde", @@ -4716,6 +4866,12 @@ dependencies = [ "nanoid", ] +[[package]] +name = "slyce" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "046d1c67b37db818d93f1d04a924ddbd7396c96cf9cfaa593d038259ae484729" + [[package]] name = "smallvec" version = "1.13.2" @@ -4731,6 +4887,16 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b7c388c1b5e93756d0c740965c41e8822f866621d41acbdf6336a6a168f8840c" +[[package]] +name = "smol_str" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "66eaf762c5af19db3108300515c8aa7a50efc90ff745f4c62288052ebf9fdd25" +dependencies = [ + "borsh", + "serde", +] + [[package]] name = "socket2" version = "0.5.7" @@ -4790,6 +4956,12 @@ dependencies = [ "der 0.7.9", ] +[[package]] +name = "sptr" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b9b39299b249ad65f3b7e96443bad61c02ca5cd3589f46cb6d610a0fd6c0d6a" + [[package]] name = "sqlformat" version = "0.2.6" @@ -4834,7 +5006,7 @@ dependencies = [ "hashbrown 0.14.5", "hashlink", "hex", - "indexmap 2.2.6", + "indexmap 2.5.0", "log", "memchr", "once_cell", @@ -4994,6 +5166,72 @@ dependencies = [ "url", ] +[[package]] +name = "sqruff-lib" +version = "0.18.2" +source = "git+https://github.com/quarylabs/sqruff#1ccf18a620b93438c0c6b4f9fc88f402f45a1b29" +dependencies = [ + "ahash", + "anstyle", + "append-only-vec", + "common-path", + "configparser", + "dyn-clone", + "enum_dispatch", + "fancy-regex", + "getrandom", + "indexmap 2.5.0", + "itertools 0.13.0", + "lazy-regex", + "nohash-hasher", + "phf", + "pretty_assertions", + "rayon", + "regex", + "rustc-hash", + "smol_str", + "sqruff-lib-core", + "sqruff-lib-dialects", + "strum", + "strum_macros", + "tikv-jemallocator", + "tracing", + "unicase", + "walkdir", +] + +[[package]] +name = "sqruff-lib-core" +version = "0.18.2" +source = "git+https://github.com/quarylabs/sqruff#1ccf18a620b93438c0c6b4f9fc88f402f45a1b29" +dependencies = [ + "ahash", + "enum_dispatch", + "fancy-regex", + "indexmap 2.5.0", + "itertools 0.13.0", + "nohash-hasher", + "pretty_assertions", + "rustc-hash", + "slyce", + "smol_str", + "sptr", + "strum", + "strum_macros", +] + +[[package]] +name = "sqruff-lib-dialects" +version = "0.18.2" +source = "git+https://github.com/quarylabs/sqruff#1ccf18a620b93438c0c6b4f9fc88f402f45a1b29" +dependencies = [ + "ahash", + "itertools 0.13.0", + "serde_yaml", + "sqruff-lib-core", + "strum", +] + [[package]] name = "stable_deref_trait" version = "1.2.0" @@ -5234,6 +5472,26 @@ dependencies = [ "num_cpus", ] +[[package]] +name = "tikv-jemalloc-sys" +version = "0.6.0+5.3.0-1-ge13ca993e8ccb9ba9847cc330696e02839f328f7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd3c60906412afa9c2b5b5a48ca6a5abe5736aec9eb48ad05037a677e52e4e2d" +dependencies = [ + "cc", + "libc", +] + +[[package]] +name = "tikv-jemallocator" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cec5ff18518d81584f477e9bfdf957f5bb0979b0bac3af4ca30b5b3ae2d2865" +dependencies = [ + "libc", + "tikv-jemalloc-sys", +] + [[package]] name = "time" version = "0.3.36" @@ -5416,7 +5674,7 @@ version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.2.6", + "indexmap 2.5.0", "toml_datetime", "winnow 0.5.40", ] @@ -5427,7 +5685,7 @@ version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" dependencies = [ - "indexmap 2.2.6", + "indexmap 2.5.0", "toml_datetime", "winnow 0.5.40", ] @@ -5438,7 +5696,7 @@ version = "0.22.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f21c7aaf97f1bd9ca9d4f9e73b0a6c74bd5afef56f2bc931943a6e1c37e04e38" dependencies = [ - "indexmap 2.2.6", + "indexmap 2.5.0", "serde", "serde_spanned", "toml_datetime", @@ -5682,6 +5940,15 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" +[[package]] +name = "unicase" +version = "2.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7d2d4dafb69621809a81864c9c1b864479e1235c0dd4e199924b9742439ed89" +dependencies = [ + "version_check", +] + [[package]] name = "unicode-bidi" version = "0.3.15" @@ -6263,6 +6530,12 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" +[[package]] +name = "yansi" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfe53a6657fd280eaa890a3bc59152892ffa3e30101319d168b781ed6529b049" + [[package]] name = "zerocopy" version = "0.7.34" @@ -6401,7 +6674,7 @@ dependencies = [ "serde", "serde_json", "serde_yaml", - "sqlformat", + "sqruff-lib", "strum", "tokio", "types", diff --git a/zk_toolbox/crates/zk_supervisor/Cargo.toml b/zk_toolbox/crates/zk_supervisor/Cargo.toml index 81142d53d6ac..b40f9e18af20 100644 --- a/zk_toolbox/crates/zk_supervisor/Cargo.toml +++ b/zk_toolbox/crates/zk_supervisor/Cargo.toml @@ -29,5 +29,5 @@ futures.workspace = true types.workspace = true serde_yaml.workspace = true zksync_basic_types.workspace = true -sqlformat = "0.2.6" regex = "1.10.6" +sqruff-lib = { git = "https://github.com/quarylabs/sqruff", version = "0.18.2" } diff --git a/zk_toolbox/crates/zk_supervisor/src/commands/sql_fmt.rs b/zk_toolbox/crates/zk_supervisor/src/commands/sql_fmt.rs index c953982d58bd..b2780b3e697a 100644 --- a/zk_toolbox/crates/zk_supervisor/src/commands/sql_fmt.rs +++ b/zk_toolbox/crates/zk_supervisor/src/commands/sql_fmt.rs @@ -1,6 +1,5 @@ use anyhow::{bail, Context, Result}; use common::spinner::Spinner; -use regex::Regex; use xshell::Shell; use super::lint_utils::{get_unignored_files, IgnoredData, Target}; @@ -11,34 +10,7 @@ use crate::messages::{ }; fn format_query(query: &str) -> anyhow::Result { - let options = sqlformat::FormatOptions { - indent: sqlformat::Indent::Spaces(4), - uppercase: true, - lines_between_queries: 1, - }; - - let mut formatted_query = sqlformat::format(query, &sqlformat::QueryParams::None, options); - - // Replace certain keywords with lowercase versions - let keywords = vec![ - "STORAGE", - "TIMESTAMP", - "INPUT", - "DATA", - "ZONE", - "VALUE", - "DEPTH", - "KEY", - "KEYS", - "STATUS", - "EVENTS", - ]; - for keyword in keywords { - let regex = Regex::new(&format!(r"\b{}\b", keyword))?; - formatted_query = regex - .replace_all(&formatted_query, keyword.to_lowercase()) - .to_string(); - } + let formatted_query = sqruff_lib::api::simple::fix(query); // Remove minimum indent from the formatted query let formatted_lines: Vec<&str> = formatted_query.lines().collect(); @@ -47,9 +19,15 @@ fn format_query(query: &str) -> anyhow::Result { .filter_map(|line| line.find(|c: char| !c.is_whitespace())) .min() .unwrap_or(0); + Ok(formatted_query .lines() - .map(|line| line[min_indent..].to_string()) + .map(|line| { + if line.trim().is_empty() { + return "".to_string(); + } + line[min_indent..].to_string() + }) .collect::>() .join("\n")) } diff --git a/zk_toolbox/rust-toolchain b/zk_toolbox/rust-toolchain index aaceec04e040..dbd41264aa9f 100644 --- a/zk_toolbox/rust-toolchain +++ b/zk_toolbox/rust-toolchain @@ -1 +1 @@ -1.80.0 +1.81.0 From 6c2c4012cf607de56709ff1954baa72c41554af7 Mon Sep 17 00:00:00 2001 From: matias-gonz Date: Mon, 30 Sep 2024 09:18:08 -0300 Subject: [PATCH 14/19] format sql --- ...db7dbe0bb23c4fc87a78be2d01b77da2ecbd3.json | 23 - ...772b3002289a05ab23b7dafde2af10c7d88da.json | 24 + ...c2563a3e061bcc6505d8c295b1b2517f85f1b.json | 20 - ...69d57dbfda4be1f70232afffca82a895d43e0.json | 36 + ...c3bdae18b88c4c223e374df9a997c271b091b.json | 38 - ...b0dd75acbe4248159d2fb62d9e9878c158016.json | 18 + ...6f5521c888c5bc9050333dd18a88c098b2d12.json | 15 + ...50e42abbaf365a1b041d0e7a809796ef0fe63.json | 22 - ...95254f94dddb4ed84a675c2655421758b049.json} | 4 +- ...74ddd4f2422089604768b19e0b6d948c0cf1b.json | 100 +++ ...3897edf8c868094ad029e2e8fcf286d44fd55.json | 16 - ...8275cef018c7060c49b9f7a387a14f6a5be8.json} | 4 +- ...3db7a71aca15698bafba051a8d9a91a4dbc76.json | 112 --- ...4032f3d900b74e62dfdec0c9f61bf2bacb595.json | 21 + ...154185671d13f3b234ce1f16aaeeab54b2a16.json | 16 + ...cb2685cda1ae7ecca83062ede7320c3b4a427.json | 15 + ...6e94d0b4f902c84e31fca606773cf4c9d17fc.json | 16 + ...ecbc877c8e04d47bf16b9c2e59ba652d2955f.json | 14 + ...6d922fa1fc9c202072fbc04cae1bbf97195aa.json | 14 - ...2f75a4055a9c1e7c3b767455df804f09f7d4c.json | 20 + ...6a12866726e1f3ca9cf9d89f61c4e97373361.json | 16 + ...6b22abb03e2a9b2d3b53dc858e5c5a08bfb85.json | 16 - ...6e7a755c4bc6c25c7e6caff5fd6142813d349.json | 16 - ...3b54a1965e100e0949006212f97e6d11a18b.json} | 4 +- ...aafe4b1aa2250fc535bfcdff39172551d42b.json} | 4 +- ...0ded732839b9f5bf16042205a730fac07c3a.json} | 4 +- ...ddbee82a65c00c5740e9017382c57c279b18.json} | 4 +- ...84d2fcc5d436e52cc82ed2aba664bde3ee6b.json} | 4 +- ...4ec52b3eb68c346492a8fed98f20f2a0381d.json} | 4 +- ...f1a855e76b37b6ed36ae612b551f9a6a55633.json | 18 - ...3dcb740d1d2750fe17fb5330e50323b96b49.json} | 4 +- ...b9086ba42bac53629793a42d67b353c30210.json} | 4 +- ...3f71664dcb5ebbc35005a18c5251c3d902f62.json | 22 - ...62f3339768a85aaff9a509901e9f42b09097b.json | 28 + ...1eda9057c7fb71b8f0d96f69fda78662ecec5.json | 20 + ...feb5f094160627bc09db4bda2dda9a8c11c44.json | 15 - ...f8dcb1642688940bc52831498479b250de2b1.json | 112 +++ ...5c0665ee3ea4086ddb91428fa1b6a00760737.json | 35 - ...2e93066a5cffbb3857dfd3c6fe00c307eada.json} | 4 +- ...119a0a60dc9804175b2baf8b45939c74bd583.json | 15 - ...b602aa0cf9b0c5b1ef39b7d07d6309454fcd.json} | 4 +- ...de8ba36685dde66d1b3fcf549a52c5001d06.json} | 4 +- ...494ce1d8e3b6cfb0b897745fb596f283be79.json} | 4 +- ...3ee5d5140714297401b4bde1e950ed6e971e.json} | 4 +- ...87ed365c0369f94bc457cb162a5c876a123c7.json | 16 - ...7116562896314c4d413847854c09c4a14d4e.json} | 4 +- ...0f2ede5e22b0bbd8bc910cb36a91ed992bde1.json | 15 - ...eee66178533c3c0f51e2bfa9ff201e17e4014.json | 44 ++ ...47e1ed84929bf75bb814ee2280d241912d38f.json | 15 + ...2c5eeab06ff664141fa542229e7c9a46d4410.json | 34 - ...b9764b5b4b840573c35b57e011330bd132a3.json} | 4 +- ...0800383e6b73a8b48dc3e589a29a4367cbb5a.json | 15 - ...717e73c5e6b063be3553d82bfecb98334980.json} | 4 +- ...16618914d6dedb39a9a40d36484741e8b01f4.json | 15 - ...1e4657024c66a42e1bbc261c92c9e1c79930.json} | 4 +- ...96ec397767a063dc21aa3add974cb9b070361.json | 16 - ...b3c0210383d8698f6f84f694fece9fd59f3d5.json | 16 - ...98ded0ad3e59e6de69c2b13d92d8ab1a07dd.json} | 4 +- ...c32170ea4b47051a100f71a41dd6ed9bb1a9.json} | 4 +- ...d656e2a26752fa71ae936ff2eb821b0734b61.json | 14 + ...2484f0a0d76a8097b61ead5f1f20301ce524d.json | 17 - ...e03def94f4bf4674def1893e2232be80f57a0.json | 31 - ...36d50db45560befec6418020b01c55d94a98.json} | 4 +- ...944b2acedce201da4454aadb79f3545713ae.json} | 4 +- ...4fc05eaa158a6f38a87187d7f2c2068a0112a.json | 28 - ...375d56609cd6b7f425361acfd0a411dc48bd.json} | 4 +- ...3bb67bd12f2b635af783897f9d2a4f4ead2e.json} | 4 +- ...9250962832a0d95d0d82bdd56271d6a07e497.json | 15 + ...afa9cf50eafc7ac542975edea9bd592ce862.json} | 4 +- ...6aaa0430eeeb48c19ec3eabe78996baa9b140.json | 28 + ...80eef9af91f5b4fcaebb7beb3a415d4b231d.json} | 4 +- ...07554ce738a2d7005472e7e76a64a8fbd57ad.json | 14 - ...0ae6c8a26f425429116a62892be84c2ff9fb.json} | 4 +- ...3a2976d6c4fd581e66dd27439ae42a04b7f5.json} | 4 +- ...1b74555863b0cc8281ef2e9c830fa1d38e227.json | 16 + ...e7053fe3ba7ec852cfb43b249eed9af8209b.json} | 4 +- ...5e94ad6bdd84c31e4b2e0c629e51857533974.json | 23 + ...1edf3965f7ce67341d957ec680a18a0c39ea.json} | 4 +- ...3681759272f74c47836d34e0ee6de1f639f7.json} | 4 +- ...d0651174fd63cf6a8950fa6e7c4838ac5abbf.json | 26 - ...aea6710351dea1f1e57d73447476c3fcd199.json} | 4 +- ...528f012c2ecaebf6622ca1ae481045604e58d.json | 21 - ...0fd5e1330393d8b04c7cf03b8c7ab2edad5d1.json | 32 - ...6bd6ec3a1cd9db6187e99af40ca8fea4c6ace.json | 35 + ...aaad910ca46830c470f8fc1d4265f9ed8631.json} | 4 +- ...9973527841e234d8b4635fb337e4b659b7f71.json | 15 + ...abfb146e9932d4142139a49599c4bdbd659f.json} | 4 +- ...b671fa559dfdb29b315b17ae2f86533d247e9.json | 16 + ...ccc7108538405743fe1ad71451d0f1842561.json} | 4 +- ...0ff145ac2f388a246b9c7b32193e2d4208dd.json} | 4 +- ...51dfd285628a75a35b152bccb3c73e9cc057.json} | 4 +- ...3be52d97128642d8528535975f8dea798e6c.json} | 4 +- ...84b0dd496700a61569929dcc7602ec678b09.json} | 4 +- ...af767e790a54957218de908c7144658b4681.json} | 4 +- ...c5de2c9f8f3cf22d0f1145ae67879039e28d.json} | 4 +- ...139300ad3b80ac9e70c00864c3d9f6521b028.json | 28 - ...d14963cbfc84261824e47fbab1323895371d.json} | 4 +- ...0b623d73e1b33024023f4bce7985e58be99e.json} | 4 +- ...7d8bbdbee28d4ac2a2c0a331298c5e39b71d.json} | 4 +- ...b84a6dfe1976b4ddb64cc288a846a0a7fda4.json} | 4 +- ...7ca44a1f6cb5e46bf9e5ffe38741bf61c5cc0.json | 23 + ...d23f83a260adf56000748c4b19752e2948ab5.json | 34 + ...63f500b8358757e5a453cf0a87d5cd9620d7e.json | 33 + ...994cc05ebeb4e5aeeaee50b7c4d8baf58ca44.json | 33 - ...ec87cf78f40429222b3163f3c5235c87e007f.json | 31 + ...0c8fdca5c5731d490c1ac3ed56266b1d5a8a5.json | 32 + ...77a428820fdcea9969aff3b29ca16727357b.json} | 4 +- ...a69138206dfeb41f3daff4a3eef1de0bed4e4.json | 16 - ...d0a586ce73d09ee28887cb1ad1c0392250629.json | 34 + ...e0d51f86d30d5ad92496e4aa087a3c4aae09f.json | 34 - ...372281e8502002ff9fec82294ea6b972447d8.json | 16 + ...c39e774c405508e73e77cdd0c01f924c97c0.json} | 4 +- ...0a02a40c9f37be949bd4d088744f9c842ef3.json} | 4 +- ...5d3a0eed793f7b64ad3ed035f20e896371721.json | 31 - ...bd2225e57ae8d42042ac107b35a36c522f0d8.json | 34 + ...e604958488a41d3ee2bcbd05d269bcdfc7aa.json} | 4 +- ...21c9bacd8badc624de7664b82dba97d6c9b9.json} | 4 +- ...dd13a572f665e0a5c0edba8076438ba9f044c.json | 15 + ...6d2b2e3f2497e6b5f26c72e220397cc0e62f7.json | 15 - ...ddab6569d897e748d39abca9538872d986ad.json} | 4 +- ...d1f5e03924dbf6dd1e824d4aca837e604b7e9.json | 44 -- ...99bf19b587a16ad70a671b0de48fd608bf31c.json | 23 + ...6d19f7ba92c40566e1d098c435da41e95274.json} | 4 +- ...a4b4e2af48907fa9321064ddb24ac02ab17cd.json | 20 - ...cab02b0656d863dbfce4b5dad7bc72e52b05d.json | 34 - ...709dbee508ad6d1cae43e477cf1bef8cb4aa9.json | 23 - ...c5e9dc50b533524bf856740215aacb8ff5bd.json} | 4 +- ...db71f3457e1619a170683e03ddf0e78abaf29.json | 22 + ...e5a6cca1524adfe99b0cb35662746479dcc1.json} | 4 +- ...9d0e2d571533d4d5f683919987b6f8cbb00e0.json | 15 - ...33acd2066a5e238088b39b982b10770f51479.json | 100 --- ...ba3af74e8e7b5944cb2943b5badb906167046.json | 30 - ...8997f003e26768c5de663160d89af54a1ee7.json} | 4 +- ...9f1fd7606fdf3e6d4c882cea76eb579c24a93.json | 30 + ...9713f437db492e2075ca69e11e2ef5728ccaa.json | 24 - ...19da280e72546298b615b88662fa4a19f2bdf.json | 14 + ...9442f610a6c57280615eb8c982a4afb847aff.json | 17 + ...0d7eaeeb4549ed59b58f8d984be2a22a80355.json | 22 - ...d5cfa6c8498e8a58b8ae6fe3a1584401d3b4b.json | 16 + ...309c1b45d0134a6c6e15533443353db3bee6.json} | 4 +- ...dc766262b5bdc58be0444e164b1bd9feed02d.json | 38 + ...c5223c9d5e2e42d89bb456d24c601edc06a05.json | 40 + ...3c5b416cbb2c1a1e2712dce1f01835181c3b.json} | 4 +- ...acdfc5af364d7271c06db0c95e0f1b0e33f9.json} | 4 +- ...1885d320c146cd8fad77c107ef12fa38e6c98.json | 40 - ...d6542fd54ceac41dd41b995a8409c5ab046c.json} | 4 +- ...7fbb13c7719f73dba603053044b794d786eb.json} | 4 +- ...ac9ff144a09e68db07e4ca1c1de105765711f.json | 15 + ...eb0539849f7fd590712103db7d45d119caca2.json | 15 + ...9411ba30ac67080552279d821d66b1b804db3.json | 14 - ...8242aad3e9a47400f6d6837a35f4c54a216b9.json | 20 - ...2687cfe890fe89c748f836bad6eb0cc0fcf5.json} | 4 +- ...abe3514e755546ac39a5fddae03a3a435e3d.json} | 4 +- ...3a61bf579a0dbeb01c545fa61b10a0047297b.json | 26 + ...d79cde6d6d0a75702953b16df1a9748b11f5.json} | 4 +- ...29b9149fee37c5ef7d69e259ee33cb8ca860.json} | 4 +- ...5320b4081c66e965f359d70fba7670b88a5f6.json | 22 + ...8e7265828e3ae78e391ef235b700f0adfe5e4.json | 22 + ...7be93b12319c041751bc4138fa64258ecd5c.json} | 4 +- ...5eb148aa6d1dbd69bf3fe48522101a6ea0bcb.json | 23 - ...1063eae38da5d4b874f74c57b26f188fdeea.json} | 4 +- ...2fe98364aa684180dd6fbf540bb0b68d96a64.json | 15 - ...4a8e245ecee4866264d38146938595b07f37.json} | 4 +- ...020b1036f002312271eec76ec3d40f77eb71.json} | 4 +- ...8ed14ea4ed363db1501e7268909bc18f2043.json} | 4 +- ...5ff66f2c3b2b83d45360818a8782e56aa3d66.json | 36 - ...b50ebc862a133734382bad8fdfa3a93d8b743.json | 29 - ...ce3d957afdb5f9809929dbe7a67a4a164e741.json | 20 + ...5371292d0bfbb23eaa2db163ef6fd1e1374d9.json | 31 + ...2745b90c68ebec5706b106ef69cb61333466e.json | 29 + ...c3cec1dbc3e9af406bb900c3ec52590978bc.json} | 4 +- ...ea2b254fed4b5437ee2968707dffe6e6869d.json} | 4 +- ...f6cb289fdec08f4db49ee40ba67371df1927.json} | 4 +- core/lib/dal/src/base_token_dal.rs | 8 +- core/lib/dal/src/blocks_dal.rs | 246 +++--- core/lib/dal/src/blocks_web3_dal.rs | 63 +- core/lib/dal/src/consensus_dal.rs | 22 +- core/lib/dal/src/contract_verification_dal.rs | 78 +- core/lib/dal/src/data_availability_dal.rs | 8 +- core/lib/dal/src/eth_sender_dal.rs | 73 +- core/lib/dal/src/eth_watcher_dal.rs | 20 +- core/lib/dal/src/events_dal.rs | 8 +- core/lib/dal/src/events_web3_dal.rs | 45 +- core/lib/dal/src/factory_deps_dal.rs | 6 +- core/lib/dal/src/proof_generation_dal.rs | 8 +- core/lib/dal/src/protocol_versions_dal.rs | 24 +- core/lib/dal/src/pruning_dal/mod.rs | 121 +-- core/lib/dal/src/snapshot_recovery_dal.rs | 26 +- core/lib/dal/src/snapshots_creator_dal.rs | 30 +- core/lib/dal/src/snapshots_dal.rs | 48 +- core/lib/dal/src/storage_logs_dal.rs | 61 +- core/lib/dal/src/storage_logs_dedup_dal.rs | 34 +- core/lib/dal/src/storage_web3_dal.rs | 2 +- core/lib/dal/src/system_dal.rs | 22 +- core/lib/dal/src/tee_proof_generation_dal.rs | 22 +- .../src/tee_verifier_input_producer_dal.rs | 12 +- core/lib/dal/src/tokens_dal.rs | 2 +- core/lib/dal/src/tokens_web3_dal.rs | 4 +- core/lib/dal/src/transactions_dal.rs | 716 +++++++++--------- core/lib/dal/src/transactions_web3_dal.rs | 62 +- core/lib/dal/src/vm_runner_dal.rs | 82 +- ...52314178f8ab2aea7efb69ae18fbf40e8994.json} | 4 +- ...f113a19feb73c4cf9876855523499998b99c0.json | 19 - ...c43ffc5f519d35c90c60f89579f0689906df5.json | 18 + ...e4b3d55a0fee71105df880ff4f599844d06f.json} | 4 +- ...72f6c620f86bf6c53334878490c7004331f4.json} | 4 +- ...7def3a97275b66ad33d214054dc9048ddf584.json | 18 - ...7fadffc1d3091e8c050835d4f178a328fcc8.json} | 4 +- ...f1d4d9a4b83a8b42846d8373ea13b96d612cf.json | 19 - ...c0a4dbcc7b955132056b5ff10f00cf5844874.json | 19 + ...2fd05e27e9df6d760173bba37446988d1b8e.json} | 4 +- ...91e08d28ca6796c0bbba95016d1899cf84fe.json} | 4 +- ...68ba43ba128a00a194dce65015bd9eeb1b42f.json | 17 + ...ffd15b636d553794900596528e8fb03ca5aed.json | 17 + ...e2d3a6ebb3657862b91e3ece34119f098fc2d.json | 32 - ...234c19578572973094b21ddbb3876da6bb95.json} | 4 +- ...0ad195b0dd2a8ce56b1a9eb531103130b5e3e.json | 62 -- ...ad4da8f523aa84cd047216d8e3cf69c92106.json} | 4 +- ...10c3b232bbaaa12747f72e3b8c5ad64702a79.json | 32 + ...03782558380c48caf8734cacee350e3841dd.json} | 4 +- ...e40978966fb2ad8b342907580dd17c0a52779.json | 17 + ...42fde93ffb610bff173f04f1b80e30754ad5.json} | 4 +- ...9f8bea0033f6727c2582f7f141330a47f440.json} | 4 +- ...35d9a865ecbd87d38008a649e8943fdf8a43.json} | 4 +- ...2186aa86751cb3b4de26a60af1cf987ca636.json} | 4 +- ...2c0214469edff6fc74965f1ec1366f8b46b8e.json | 20 + ...41976a264759c4060c1a38e466ee2052fc17d.json | 15 - ...86d3521faa0fbbfc7ca810c818ca9720b121.json} | 4 +- ...43d01cff938d3aed44c9bb1d864bfdf69e39a.json | 22 + ...d419667f11d80036cda021ecbf23b0b5f7f42.json | 20 - ...846983cb3f693c02159ba41c1a875aed7e03d.json | 62 ++ ...a5aec09b39b9d0367b0c29167f8a6a166d18.json} | 4 +- ...c765b3be3958cab0f3bde03f51e03777afd4.json} | 4 +- ...f5a15d2fc5ad3e5ce738a2f6ee3eecfc96736.json | 16 - ...1426d60c56b526af5ed2e0c602f881c3bbf0.json} | 4 +- ...8594776d64b8b5a4094fef979e35ab76d5bcd.json | 15 + ...cd21d4645563f93afd4428734196c2b212276.json | 17 - ...0767a2cd4488e670674cd9149f7a332c0198d.json | 22 - ...3e804b9c2af8c98ae64ccace8c5035b3c499.json} | 4 +- ...ac1e4ed2a372922e55728de083bffb533e11.json} | 4 +- ...c0d0f55630a33b69c9a0fefd9cb8be9356ee.json} | 4 +- ...8c88cdb52125daedbade044934761fe2147d.json} | 4 +- ...77313681560f538c6524c54648d6308533744.json | 32 + ...08a01b63ae4aa03c983c3a52c802d585e5a80.json | 15 - ...43c868c63c853edb5c4f41e48a3cc6378eca9.json | 32 - ...3027b4c2ce405d3bcc9821440408a394d7f5.json} | 4 +- ...165108e64cc8cf1a2a5604cb180f6d8ac4fe.json} | 4 +- ...23bb83b9fb0422b396cbd201f02ebce7b921.json} | 4 +- ...9314a2ce0180c20126ad22ddaa20c7c32c2c.json} | 4 +- ...b5a4672ad50a9de92c84d939ac4c69842e355.json | 16 - ...3b6da86d1e693be03936730c340121167341f.json | 17 - ...599bf65cbf2fd7c27a2dcad43e41a0f43cba0.json | 26 + ...d023d9cce8cd66ad684475ece209832babd5e.json | 16 + ...29d1227a213b6cacb4c30a1f94c56f56cb4af.json | 15 + ...fb9c8674344921b98b8b26e4d85994b3d72af.json | 22 + ...2757fe394fa096f09c62faa26f728a69d1ae.json} | 4 +- ...fba74ec2cfc3c89c7e4e2ea475c3ce4092849.json | 26 - ...5d005d8760c4809b7aef902155196873da66e.json | 15 - ...38e1010d7389457b3c97e9b238a3a0291a54e.json | 16 - ...583a7526ae38ceb4bf80543cfd3fb60492fb9.json | 17 - ...bcaf4e7f673e9d9827427aa4bbedb3cae8b8f.json | 15 + ...ea8e04c2c28771aa50a9e3ebb95c5e428be0e.json | 19 + ...92d6496147f6425c2485fc8a8f2739e65f80.json} | 4 +- ...bf0344b237bf1914657d36f44b9d21ae966a6.json | 16 + ...cbb33d511e07d80a5acd79bc559abdbda49bc.json | 16 + ...4f3cc4f9c96c2a51a157b83fff9b411beeb9.json} | 4 +- ...dae905acac53b46eeaeb059d23e48a71df3b4.json | 22 - ...218d106d5852fa6f65aca22e12b3a4b7f9c2.json} | 4 +- .../crates/lib/prover_dal/src/cli_test_dal.rs | 60 +- .../src/fri_gpu_prover_queue_dal.rs | 46 +- .../src/fri_proof_compressor_dal.rs | 46 +- .../src/fri_protocol_versions_dal.rs | 6 +- .../lib/prover_dal/src/fri_prover_dal.rs | 166 ++-- .../src/fri_witness_generator_dal.rs | 276 +++---- .../zk_supervisor/src/commands/sql_fmt.rs | 21 +- 275 files changed, 3243 insertions(+), 3119 deletions(-) delete mode 100644 core/lib/dal/.sqlx/query-00c0389f4cde049078885cdf05bdb7dbe0bb23c4fc87a78be2d01b77da2ecbd3.json create mode 100644 core/lib/dal/.sqlx/query-0124bad591f7ed156000c515cb0772b3002289a05ab23b7dafde2af10c7d88da.json delete mode 100644 core/lib/dal/.sqlx/query-026ab7dd7407f10074a2966b5eac2563a3e061bcc6505d8c295b1b2517f85f1b.json create mode 100644 core/lib/dal/.sqlx/query-0429f2fa683bdff6fc1ff5069de69d57dbfda4be1f70232afffca82a895d43e0.json delete mode 100644 core/lib/dal/.sqlx/query-046590a310cc7bbfa421d0d8e20c3bdae18b88c4c223e374df9a997c271b091b.json create mode 100644 core/lib/dal/.sqlx/query-048f255042f0a75c04bc19369c4b0dd75acbe4248159d2fb62d9e9878c158016.json create mode 100644 core/lib/dal/.sqlx/query-05891e039a54b70ac406a63b73b6f5521c888c5bc9050333dd18a88c098b2d12.json delete mode 100644 core/lib/dal/.sqlx/query-05c2a77d9f65d435e2df63a300850e42abbaf365a1b041d0e7a809796ef0fe63.json rename core/lib/dal/.sqlx/{query-2b1aa207a058f66265acf2c21b8ed5d8007789c0fc1eab948f6d7339dfb69147.json => query-08740b96c883fce75b6238bb6bdc95254f94dddb4ed84a675c2655421758b049.json} (80%) create mode 100644 core/lib/dal/.sqlx/query-0a0dd4a98128c2ef60d385f5c0674ddd4f2422089604768b19e0b6d948c0cf1b.json delete mode 100644 core/lib/dal/.sqlx/query-0b5d5efeac95d429cf6a5be22153897edf8c868094ad029e2e8fcf286d44fd55.json rename core/lib/dal/.sqlx/{query-dcfc3c0df11b923116af194a26c122dbdbf650edfec6d9c18f96c3bd0064d18d.json => query-0bae50601f2dc3ea7ba9ab6b9f508275cef018c7060c49b9f7a387a14f6a5be8.json} (80%) delete mode 100644 core/lib/dal/.sqlx/query-1074d0a2e4a4afb9a92f3822e133db7a71aca15698bafba051a8d9a91a4dbc76.json create mode 100644 core/lib/dal/.sqlx/query-150d0219cabbabcc9d0e97e3fd94032f3d900b74e62dfdec0c9f61bf2bacb595.json create mode 100644 core/lib/dal/.sqlx/query-1767de83aa4ef34f080da6d30d6154185671d13f3b234ce1f16aaeeab54b2a16.json create mode 100644 core/lib/dal/.sqlx/query-1823e1ac602ce4ba1db06543af9cb2685cda1ae7ecca83062ede7320c3b4a427.json create mode 100644 core/lib/dal/.sqlx/query-18d507f6c9fe051da9899e2e4346e94d0b4f902c84e31fca606773cf4c9d17fc.json create mode 100644 core/lib/dal/.sqlx/query-1a6f4db7fb5ad9b54367c7f9d87ecbc877c8e04d47bf16b9c2e59ba652d2955f.json delete mode 100644 core/lib/dal/.sqlx/query-1bbfac481c402bcb3bb888b84146d922fa1fc9c202072fbc04cae1bbf97195aa.json create mode 100644 core/lib/dal/.sqlx/query-1c9468bead5b80f209c4e94ab652f75a4055a9c1e7c3b767455df804f09f7d4c.json create mode 100644 core/lib/dal/.sqlx/query-1ed6c99dcaa47f1525499362e316a12866726e1f3ca9cf9d89f61c4e97373361.json delete mode 100644 core/lib/dal/.sqlx/query-1f43731fa0736a91ba8da41f52b6b22abb03e2a9b2d3b53dc858e5c5a08bfb85.json delete mode 100644 core/lib/dal/.sqlx/query-2169cc7dfb074566ceb0bd5754d6e7a755c4bc6c25c7e6caff5fd6142813d349.json rename core/lib/dal/.sqlx/{query-3490fe0b778a03c73111bf8cbf426b0b3185a231bbf0b8b132a1a95bc157e827.json => query-21acded689c24b653d149ff169f53b54a1965e100e0949006212f97e6d11a18b.json} (75%) rename core/lib/dal/.sqlx/{query-eab36591af61369e36e3dab79025ac6758a0a4e367f93a9bd48ec82c51e09755.json => query-2234d7728d91cefaee792c900448aafe4b1aa2250fc535bfcdff39172551d42b.json} (81%) rename core/lib/dal/.sqlx/{query-c61682ed92c1a43855a991598d593639a63047f46dc8e605ff37b78f43f5cef5.json => query-228aa5ec4c4eb56143823b96a8190ded732839b9f5bf16042205a730fac07c3a.json} (77%) rename core/lib/dal/.sqlx/{query-040eaa878c3473f5edc73b77e572b5ea100f59295cd693d14ee0d5ee089c7981.json => query-229db646c85461858689b81d80f5ddbee82a65c00c5740e9017382c57c279b18.json} (63%) rename core/lib/dal/.sqlx/{query-24722ee4ced7f03e60b1b5ecaaa5234d536b064951a67d826ac49b7a3a095a1a.json => query-24865315c100f495a6e2cefb3b0e84d2fcc5d436e52cc82ed2aba664bde3ee6b.json} (71%) rename core/lib/dal/.sqlx/{query-86dbcf93abdd4206d2d62b140cf5dd11537925d02f5a7f2bae23c8dc48204e3f.json => query-2589f98459979f776ce5fd6e3ff94ec52b3eb68c346492a8fed98f20f2a0381d.json} (62%) delete mode 100644 core/lib/dal/.sqlx/query-25fb31277591dd7d5d783bd8777f1a855e76b37b6ed36ae612b551f9a6a55633.json rename core/lib/dal/.sqlx/{query-1e3c88b41bc02cb6a116fa930ae85b8b60165ed757ae1044e83fdc877d95cbd8.json => query-2719fa6e4f282535526ef6c3c7c73dcb740d1d2750fe17fb5330e50323b96b49.json} (90%) rename core/lib/dal/.sqlx/{query-69c885498b186f3b7cbb215112ec86783d7da0ec1d008680872f3619cf217923.json => query-28c5a9f99af4d2857346e0df73c9b9086ba42bac53629793a42d67b353c30210.json} (60%) delete mode 100644 core/lib/dal/.sqlx/query-294005d0b9445cc8b9c8e4ce7453f71664dcb5ebbc35005a18c5251c3d902f62.json create mode 100644 core/lib/dal/.sqlx/query-2a2083fd04ebd006eb0aa4e0e5f62f3339768a85aaff9a509901e9f42b09097b.json create mode 100644 core/lib/dal/.sqlx/query-2a4bfb1ed34f0d508352a5f3f761eda9057c7fb71b8f0d96f69fda78662ecec5.json delete mode 100644 core/lib/dal/.sqlx/query-2d1e0f2e043c193052c9cc20f9efeb5f094160627bc09db4bda2dda9a8c11c44.json create mode 100644 core/lib/dal/.sqlx/query-2d467a96fd065137d1038998ae5f8dcb1642688940bc52831498479b250de2b1.json delete mode 100644 core/lib/dal/.sqlx/query-2d8da95804a7a300ff2b756e6785c0665ee3ea4086ddb91428fa1b6a00760737.json rename core/lib/dal/.sqlx/{query-b7cd7c40282c2ca2287eef93ee79c69a9e494bf1f873291b4ae7bf68b7e3c549.json => query-2dc550a35fb0f0ddb1aded83d54a2e93066a5cffbb3857dfd3c6fe00c307eada.json} (84%) delete mode 100644 core/lib/dal/.sqlx/query-2e5b9ae1b81b0abfe7a962c93b3119a0a60dc9804175b2baf8b45939c74bd583.json rename core/lib/dal/.sqlx/{query-5d341e334cbc2d38efc8a060325677d57040037da0e07cef2c7b7246851a3703.json => query-2fa2ba4a62f79d780d239409d426b602aa0cf9b0c5b1ef39b7d07d6309454fcd.json} (80%) rename core/lib/dal/.sqlx/{query-2506e9edfd4b41ca1e187909631ae942bab5d71daaed7017e3fa62dc5e42ab0a.json => query-2fc088b319ff8f197e50bb379b77de8ba36685dde66d1b3fcf549a52c5001d06.json} (80%) rename core/lib/dal/.sqlx/{query-30e5c8710b1611872da06b72ac681aff512b3a9b2587b8e59848345c07dd8f3b.json => query-3010d02e02391732c622a7515e1e494ce1d8e3b6cfb0b897745fb596f283be79.json} (89%) rename core/lib/dal/.sqlx/{query-de255be5d2e5ef215428e9a886e7c9dc036873c60b8b916ce8c446e310447b66.json => query-30268c71e4bd0d08015af6ae130d3ee5d5140714297401b4bde1e950ed6e971e.json} (91%) delete mode 100644 core/lib/dal/.sqlx/query-307f15e00a97440868189f25e4487ed365c0369f94bc457cb162a5c876a123c7.json rename core/lib/dal/.sqlx/{query-6c6b8045f9dd7bdb9ada0d71974f28f7b515cf894e63fc95165c9211f71daa36.json => query-30e7d640a731e5c7dccc6d34b94f7116562896314c4d413847854c09c4a14d4e.json} (69%) delete mode 100644 core/lib/dal/.sqlx/query-311d0357c22163b893dc91f2b080f2ede5e22b0bbd8bc910cb36a91ed992bde1.json create mode 100644 core/lib/dal/.sqlx/query-32e8bdbf16fdd2b7617d7a909c3eee66178533c3c0f51e2bfa9ff201e17e4014.json create mode 100644 core/lib/dal/.sqlx/query-3353dd735addf184732843151dd47e1ed84929bf75bb814ee2280d241912d38f.json delete mode 100644 core/lib/dal/.sqlx/query-33a78184559d0c0d13469fa799e2c5eeab06ff664141fa542229e7c9a46d4410.json rename core/lib/dal/.sqlx/{query-8ce0812420fbf35cbbbb0f77f850a54653a5c06c665433718f7ccbbf936f76ca.json => query-33bfa40b6519f05ec2ee8c7a2372b9764b5b4b840573c35b57e011330bd132a3.json} (61%) delete mode 100644 core/lib/dal/.sqlx/query-3518a3e93da8115b54426d72aea0800383e6b73a8b48dc3e589a29a4367cbb5a.json rename core/lib/dal/.sqlx/{query-be2c8e525d6867c0d2bd254c73ef1719fd1284af1dbb60ea128550224b52da93.json => query-369f8f652335176ab22ee45fd6f1717e73c5e6b063be3553d82bfecb98334980.json} (79%) delete mode 100644 core/lib/dal/.sqlx/query-37890022be6b5e893cf051266fa16618914d6dedb39a9a40d36484741e8b01f4.json rename core/lib/dal/.sqlx/{query-469db79fcf8d692507317080e0d843620210aff3a9a7aa8a249db50c1c56d927.json => query-37b653ba8a544224ef6fb88e073d1e4657024c66a42e1bbc261c92c9e1c79930.json} (60%) delete mode 100644 core/lib/dal/.sqlx/query-3b4d5009ec22f54cc7d305aa11d96ec397767a063dc21aa3add974cb9b070361.json delete mode 100644 core/lib/dal/.sqlx/query-3ddb13ffbafae2374527886e592b3c0210383d8698f6f84f694fece9fd59f3d5.json rename core/lib/dal/.sqlx/{query-26c80e9bafcf7989e7d40c6e424240b34ce29aad3ac6571116e084d45574c448.json => query-3ee6c2a87c65eaece7048da53c9f98ded0ad3e59e6de69c2b13d92d8ab1a07dd.json} (79%) rename core/lib/dal/.sqlx/{query-0fede71ed258790cf70d6d6a32dcf9654c06dfef57863281601c947830ad448a.json => query-400457c97449097837d5e31d4476c32170ea4b47051a100f71a41dd6ed9bb1a9.json} (76%) create mode 100644 core/lib/dal/.sqlx/query-403b0b1c93f973aedb41aad7700d656e2a26752fa71ae936ff2eb821b0734b61.json delete mode 100644 core/lib/dal/.sqlx/query-406e51d7884cdff36632ccf97912484f0a0d76a8097b61ead5f1f20301ce524d.json delete mode 100644 core/lib/dal/.sqlx/query-40c17194a2089a7d3fa6b7923c9e03def94f4bf4674def1893e2232be80f57a0.json rename core/lib/dal/.sqlx/{query-546c729829083b7eba94fea742c162d717ffcf46fdf5d2ce5d32555353b6da6b.json => query-41b2d575151bff136037d6f1d75f36d50db45560befec6418020b01c55d94a98.json} (52%) rename core/lib/dal/.sqlx/{query-8b9e5d525c026de97c0a732b1adc8dc4bd57e32dfefe1017acba9a15fc14b895.json => query-442212bb5f28f234cd624f2acc27944b2acedce201da4454aadb79f3545713ae.json} (61%) delete mode 100644 core/lib/dal/.sqlx/query-45a968c6d667b13bbe9d895e7734fc05eaa158a6f38a87187d7f2c2068a0112a.json rename core/lib/dal/.sqlx/{query-ada54322a28012b1b761f3631c4cd6ca26aa2fa565fcf208b6985f461c1868f2.json => query-497e1c08e8460be6e838a47dada8375d56609cd6b7f425361acfd0a411dc48bd.json} (77%) rename core/lib/dal/.sqlx/{query-03e00f422f991f8f12aad0083e1c42cfea253a182ca5df143a183cd522ecac33.json => query-499571f0484f4a54541450f935853bb67bd12f2b635af783897f9d2a4f4ead2e.json} (81%) create mode 100644 core/lib/dal/.sqlx/query-4b6fdc5021c536e622373dca8729250962832a0d95d0d82bdd56271d6a07e497.json rename core/lib/dal/.sqlx/{query-38dea171e4c49f54bf1db5ac9bfb3be9cf3928755be5f5fcfcdc086e73fb15e2.json => query-4ef330359df85ad6e0110a068ef3afa9cf50eafc7ac542975edea9bd592ce862.json} (90%) create mode 100644 core/lib/dal/.sqlx/query-5017fb273e532be3a093d682d916aaa0430eeeb48c19ec3eabe78996baa9b140.json rename core/lib/dal/.sqlx/{query-e073cfdc7a00559994ce04eca15f35d55901fb1e6805f23413ea43e3637540a0.json => query-50687903977b973d72acac96b08880eef9af91f5b4fcaebb7beb3a415d4b231d.json} (85%) delete mode 100644 core/lib/dal/.sqlx/query-5137159db7d3ff456e368e6246b07554ce738a2d7005472e7e76a64a8fbd57ad.json rename core/lib/dal/.sqlx/{query-05b0050aa9d2944542abbcef31af3fe8d35800340d1c6e9d02c15226b699c93b.json => query-5250341acd42582e41570b6d7e380ae6c8a26f425429116a62892be84c2ff9fb.json} (91%) rename core/lib/dal/.sqlx/{query-8903ba5db3f87851c12da133573b4207b69cc48b4ba648e797211631be612b69.json => query-5730de5e37535cf126667b89da6e3a2976d6c4fd581e66dd27439ae42a04b7f5.json} (66%) create mode 100644 core/lib/dal/.sqlx/query-57851c16dce02999bf386e549791b74555863b0cc8281ef2e9c830fa1d38e227.json rename core/lib/dal/.sqlx/{query-2d862097cfae49a1fb28ec0a05176085385c3a79d72f49669b4215a9454323c2.json => query-5b25851e01f30307391412ced12ee7053fe3ba7ec852cfb43b249eed9af8209b.json} (58%) create mode 100644 core/lib/dal/.sqlx/query-5dba5f8b178decfd77db0ca4f415e94ad6bdd84c31e4b2e0c629e51857533974.json rename core/lib/dal/.sqlx/{query-5d1f588b2b652105b4452be1cc6c7573fe040d47d17d9bd4e2a2b6d3131a4f9c.json => query-6083e429948c139e36cfce2c5ed41edf3965f7ce67341d957ec680a18a0c39ea.json} (57%) rename core/lib/dal/.sqlx/{query-52bb6de515e1edf4dcf34a31600edb31cfd855014dfca5041833b9d5d9f7a55e.json => query-60e68195b375775fc8bc293f6a053681759272f74c47836d34e0ee6de1f639f7.json} (94%) delete mode 100644 core/lib/dal/.sqlx/query-6179c3c1a0b2aeb01c0527f6ca4d0651174fd63cf6a8950fa6e7c4838ac5abbf.json rename core/lib/dal/.sqlx/{query-718d29517c100ad9d258a7ee90c48449c1c4bed4d0236fcedc177c9478e72262.json => query-6307b42717586a13ac8bc30fc3e5aea6710351dea1f1e57d73447476c3fcd199.json} (57%) delete mode 100644 core/lib/dal/.sqlx/query-66510caa7683ed90729cb545ac8528f012c2ecaebf6622ca1ae481045604e58d.json delete mode 100644 core/lib/dal/.sqlx/query-66b3f476cf4487239190175d2940fd5e1330393d8b04c7cf03b8c7ab2edad5d1.json create mode 100644 core/lib/dal/.sqlx/query-68327709a740a09b198770ec1746bd6ec3a1cd9db6187e99af40ca8fea4c6ace.json rename core/lib/dal/.sqlx/{query-b42fc86726ac40d0ca38640884da192a143f6a7501b7da65bb7df40a0a4ead70.json => query-6da05c9ac3d0f30b856177e28d28aaad910ca46830c470f8fc1d4265f9ed8631.json} (76%) create mode 100644 core/lib/dal/.sqlx/query-6e725f38a8f04ca5516ba3128569973527841e234d8b4635fb337e4b659b7f71.json rename core/lib/dal/.sqlx/{query-6e3a3ef443ce8aab55b10eea55f9c8ff11775885aebaf457075c6825305244e5.json => query-6f4463a2f95fec4f8b511d28566babfb146e9932d4142139a49599c4bdbd659f.json} (68%) create mode 100644 core/lib/dal/.sqlx/query-7204d08f6fb83c83c09eb2942ecb671fa559dfdb29b315b17ae2f86533d247e9.json rename core/lib/dal/.sqlx/{query-6171f2d631f69dba52cd913742a46bd1b7b9269375f11f050099cb6d3c1427aa.json => query-7235e50f9ce4b5c4f6f8325117eaccc7108538405743fe1ad71451d0f1842561.json} (67%) rename core/lib/dal/.sqlx/{query-dac29d7eb16782713acb7aa68aaa8b12b67678e983dc2570be28fe9b1e016c28.json => query-7f3ca3f1d0b3414575e71af98b810ff145ac2f388a246b9c7b32193e2d4208dd.json} (62%) rename core/lib/dal/.sqlx/{query-a71a87d91dcf0f624dbd64eb8828f65ff83204ebab2ea31847ae305a098823b0.json => query-868bfdc5d8ee5eab395fa690891751dfd285628a75a35b152bccb3c73e9cc057.json} (83%) rename core/lib/dal/.sqlx/{query-cb0a9f6137fb6bee5d17d644714b3b22ea2cd184932fcd59f5931239c7a78003.json => query-87e968b1ef6b95203b5d1e41ddf73be52d97128642d8528535975f8dea798e6c.json} (85%) rename core/lib/dal/.sqlx/{query-2cba440c2925631655a7f67486a5a8869da8f10738ba77e3d8e048057b0e7b12.json => query-8ab1634beba74aaef952562a3bcc84b0dd496700a61569929dcc7602ec678b09.json} (70%) rename core/lib/dal/.sqlx/{query-526a8e1c231e99faadd5dbbe9c49ed811faffcc108d04b59fdec5a0ab9d13fa3.json => query-8dd9596258c4e9eeb9178b32ffefaf767e790a54957218de908c7144658b4681.json} (83%) rename core/lib/dal/.sqlx/{query-41c9f45d6eb727aafad0d8c18024cee5c602d275bb812022cc8fdabf0a60e151.json => query-8de8fd9aa54e2285a14daf95af18c5de2c9f8f3cf22d0f1145ae67879039e28d.json} (77%) delete mode 100644 core/lib/dal/.sqlx/query-928139bf23bd0d57b8dbdb3283b139300ad3b80ac9e70c00864c3d9f6521b028.json rename core/lib/dal/.sqlx/{query-2486f8404e8cfcb9c178acd6dccae32e8812becbe5ce85e63694385f015f2cfe.json => query-932ec4483be7ebf34579f17694f6d14963cbfc84261824e47fbab1323895371d.json} (91%) rename core/lib/dal/.sqlx/{query-39849c30cdfa1827d69313357f92c495462e5aa430fe135d1db1f9bad1e72156.json => query-96936c827caf26f93532bab309020b623d73e1b33024023f4bce7985e58be99e.json} (67%) rename core/lib/dal/.sqlx/{query-bdfd7e9d4462ac9cf6f91fced84355e6aec05ba4af297a03169e3122a67ae53e.json => query-96adbd0c9a5786a6cca74324353c7d8bbdbee28d4ac2a2c0a331298c5e39b71d.json} (66%) rename core/lib/dal/.sqlx/{query-443b5c62c2c274369764ac5279d8f6f962ff3f07aa1cf7f0ffcefffccb633cdd.json => query-99915c717193ff872b9cf8f5e9d1b84a6dfe1976b4ddb64cc288a846a0a7fda4.json} (60%) create mode 100644 core/lib/dal/.sqlx/query-99c6597a6edfb8736a9f2f5a5d77ca44a1f6cb5e46bf9e5ffe38741bf61c5cc0.json create mode 100644 core/lib/dal/.sqlx/query-9badf9f287fd5f8a11cc855b230d23f83a260adf56000748c4b19752e2948ab5.json create mode 100644 core/lib/dal/.sqlx/query-9c6e1d3bd95d03ef32835dc454663f500b8358757e5a453cf0a87d5cd9620d7e.json delete mode 100644 core/lib/dal/.sqlx/query-9f2c06e6b14434ac4f3b556dc97994cc05ebeb4e5aeeaee50b7c4d8baf58ca44.json create mode 100644 core/lib/dal/.sqlx/query-9f7b35311f0afff1be7dc489348ec87cf78f40429222b3163f3c5235c87e007f.json create mode 100644 core/lib/dal/.sqlx/query-a329c468b25d6d5533766b8ad3d0c8fdca5c5731d490c1ac3ed56266b1d5a8a5.json rename core/lib/dal/.sqlx/{query-6621de90a024cc85946f17948e5c171cd0e4d38bd6e9cfec58b2d7f53a3204e1.json => query-a36135b5908992324c4308f549ea77a428820fdcea9969aff3b29ca16727357b.json} (97%) delete mode 100644 core/lib/dal/.sqlx/query-a4fcd075b68467bb119e49e6b20a69138206dfeb41f3daff4a3eef1de0bed4e4.json create mode 100644 core/lib/dal/.sqlx/query-a65364d10a20420211022dc8234d0a586ce73d09ee28887cb1ad1c0392250629.json delete mode 100644 core/lib/dal/.sqlx/query-a8d55f14de2f489fdc12c8da540e0d51f86d30d5ad92496e4aa087a3c4aae09f.json create mode 100644 core/lib/dal/.sqlx/query-a8fcb4d43b702d561a573a30790372281e8502002ff9fec82294ea6b972447d8.json rename core/lib/dal/.sqlx/{query-e3f4af790fca9149f4edff070170294ec464d184ad732692faa61d2ef99c84e9.json => query-aa68653ef4ff7e0cfddfc0a7c8f3c39e774c405508e73e77cdd0c01f924c97c0.json} (53%) rename core/lib/dal/.sqlx/{query-63f95c6cdcfd933e2cf8f62c0d408f2dce89f7b700896fcc0f242e0e15ba058e.json => query-ac4f1e7af7d866daf45b6997a8ce0a02a40c9f37be949bd4d088744f9c842ef3.json} (78%) delete mode 100644 core/lib/dal/.sqlx/query-acfd5a60fda5782bddb8cba033a5d3a0eed793f7b64ad3ed035f20e896371721.json create mode 100644 core/lib/dal/.sqlx/query-ad8cbc084ef8bc5995031c807bbbd2225e57ae8d42042ac107b35a36c522f0d8.json rename core/lib/dal/.sqlx/{query-659f616d3af4a79f898e84f890e06de9633d1086da972a467d89831e7a07c67e.json => query-ae30067056fe29febd68408c2ca2e604958488a41d3ee2bcbd05d269bcdfc7aa.json} (93%) rename core/lib/dal/.sqlx/{query-a1f4334b6bc1642c1bc0ff4ffa34470914b52e2d714e9deb903d62a5d66f0e04.json => query-afe66b4684f2ab1187b49f64f16f21c9bacd8badc624de7664b82dba97d6c9b9.json} (86%) create mode 100644 core/lib/dal/.sqlx/query-b1486215ce220d6d2faa7690a5cdd13a572f665e0a5c0edba8076438ba9f044c.json delete mode 100644 core/lib/dal/.sqlx/query-b313ab2b1e0a83136a202ea758c6d2b2e3f2497e6b5f26c72e220397cc0e62f7.json rename core/lib/dal/.sqlx/{query-ef70506e90e8add3b95940a7333f8222bd9fbe8ce82d8963f7da03fe6fcf9225.json => query-b3bccd33945c657856f12b9ced6addab6569d897e748d39abca9538872d986ad.json} (79%) delete mode 100644 core/lib/dal/.sqlx/query-b47a2961dc2f1347864682c572dd1f5e03924dbf6dd1e824d4aca837e604b7e9.json create mode 100644 core/lib/dal/.sqlx/query-b6bfb2d998857f165ee04e282e299bf19b587a16ad70a671b0de48fd608bf31c.json rename core/lib/dal/.sqlx/{query-e1e8ab0cb11c6081d3525228eacbad74e1bab808c744fa14bf24332b39120767.json => query-bba037e1fcffc4415afe3016ff266d19f7ba92c40566e1d098c435da41e95274.json} (50%) delete mode 100644 core/lib/dal/.sqlx/query-bd51c9d93b103292f5acbdb266ba4b4e2af48907fa9321064ddb24ac02ab17cd.json delete mode 100644 core/lib/dal/.sqlx/query-bf481c2b498420f80765b837059cab02b0656d863dbfce4b5dad7bc72e52b05d.json delete mode 100644 core/lib/dal/.sqlx/query-bfc84bcf0985446b337467dd1da709dbee508ad6d1cae43e477cf1bef8cb4aa9.json rename core/lib/dal/.sqlx/{query-c02f404ce9b0f92b8052ef6f3eaabda70cb9c56ae3e30dc0a8257e43d6714155.json => query-c013947660883612b83bfd207c26c5e9dc50b533524bf856740215aacb8ff5bd.json} (83%) create mode 100644 core/lib/dal/.sqlx/query-c138d84e1af2e2ef20395201f55db71f3457e1619a170683e03ddf0e78abaf29.json rename core/lib/dal/.sqlx/{query-afdeecb78e3af802c2b8ffb0f5ab9863082ccd1ce45b2d20e1119f1e78171d66.json => query-c2c40d5aae2e0276de453c78a39ce5a6cca1524adfe99b0cb35662746479dcc1.json} (52%) delete mode 100644 core/lib/dal/.sqlx/query-c2fe6a5476e69c9588eec73baba9d0e2d571533d4d5f683919987b6f8cbb00e0.json delete mode 100644 core/lib/dal/.sqlx/query-c3af06cc232adb93f16456da07733acd2066a5e238088b39b982b10770f51479.json delete mode 100644 core/lib/dal/.sqlx/query-c4835d40921af47bfb4f60102bbba3af74e8e7b5944cb2943b5badb906167046.json rename core/lib/dal/.sqlx/{query-85576fdbb4bd6e3a6e43511c065a2e3eaf72dfe0fa96b335b76c9506cb1ebdcc.json => query-c4e81f78ef078cbed2d588be91418997f003e26768c5de663160d89af54a1ee7.json} (78%) create mode 100644 core/lib/dal/.sqlx/query-c5480ba88a93bb7da027e36e0939f1fd7606fdf3e6d4c882cea76eb579c24a93.json delete mode 100644 core/lib/dal/.sqlx/query-c5aef75dbeb520c965a0996abed9713f437db492e2075ca69e11e2ef5728ccaa.json create mode 100644 core/lib/dal/.sqlx/query-c5dfe49f8042f773ced96f8363819da280e72546298b615b88662fa4a19f2bdf.json create mode 100644 core/lib/dal/.sqlx/query-c69d19005dd28bd0abfc84e29fd9442f610a6c57280615eb8c982a4afb847aff.json delete mode 100644 core/lib/dal/.sqlx/query-c6d523c6ae857022318350a2f210d7eaeeb4549ed59b58f8d984be2a22a80355.json create mode 100644 core/lib/dal/.sqlx/query-c8dd57fb86247e67896485c6295d5cfa6c8498e8a58b8ae6fe3a1584401d3b4b.json rename core/lib/dal/.sqlx/{query-6849be0788a509e4e68acc2da4bfadbcfc343374fad173df0cc8db38419a9726.json => query-c9742c7f58c5c0f676cee0d0d3a9309c1b45d0134a6c6e15533443353db3bee6.json} (63%) create mode 100644 core/lib/dal/.sqlx/query-c9a842d04e8b225e43f07f76541dc766262b5bdc58be0444e164b1bd9feed02d.json create mode 100644 core/lib/dal/.sqlx/query-ca428423f278feea2942fd2c78fc5223c9d5e2e42d89bb456d24c601edc06a05.json rename core/lib/dal/.sqlx/{query-58f900812efdb615f6286eb4212c3252680594256dccb0d7e51444f613011980.json => query-cda64a69c8df8eaf67d09324f8283c5b416cbb2c1a1e2712dce1f01835181c3b.json} (85%) rename core/lib/dal/.sqlx/{query-29a9350164fc0b2983f753e105a70e583b455383eec526eee3acfe6670e30f2f.json => query-cda66c56ab9ff1dcb1b2882a23c4acdfc5af364d7271c06db0c95e0f1b0e33f9.json} (56%) delete mode 100644 core/lib/dal/.sqlx/query-cf8cff1e6d277088519ef7dfbdb1885d320c146cd8fad77c107ef12fa38e6c98.json rename core/lib/dal/.sqlx/{query-0385576f1fb3836fc04a6cde3e92c03e1de8292eb0ea1e026ba1b32a3745c261.json => query-cff500ffe0b6586dd96eb2d3620dd6542fd54ceac41dd41b995a8409c5ab046c.json} (55%) rename core/lib/dal/.sqlx/{query-4aeb7dcd79000540c03fb12c0608ab71005d70f13ed32172e47166f71b3aef80.json => query-d08cb5418fe30fd7417f8bf0505c7fbb13c7719f73dba603053044b794d786eb.json} (56%) create mode 100644 core/lib/dal/.sqlx/query-d0db89030ed6979ecba6786aef1ac9ff144a09e68db07e4ca1c1de105765711f.json create mode 100644 core/lib/dal/.sqlx/query-d1490262c7a2a583928a611ae69eb0539849f7fd590712103db7d45d119caca2.json delete mode 100644 core/lib/dal/.sqlx/query-d3abe74360732659a1a35a176679411ba30ac67080552279d821d66b1b804db3.json delete mode 100644 core/lib/dal/.sqlx/query-d3b09cbcddf6238b358d32d57678242aad3e9a47400f6d6837a35f4c54a216b9.json rename core/lib/dal/.sqlx/{query-ba2343a38e37d104786f9276d91f67d2ef1428c61ae84003c9b52b03204d1f0a.json => query-d43ae07cf1539826363573d121392687cfe890fe89c748f836bad6eb0cc0fcf5.json} (70%) rename core/lib/dal/.sqlx/{query-b75e3d2fecbf5d85e93848b7a35180abbd76956e073432af8d8500327b74e488.json => query-d46fcdcb100b240aa5f2b23d07e6abe3514e755546ac39a5fddae03a3a435e3d.json} (64%) create mode 100644 core/lib/dal/.sqlx/query-d47574939bdfb157a621f86a3ea3a61bf579a0dbeb01c545fa61b10a0047297b.json rename core/lib/dal/.sqlx/{query-f1a90090c192d68367e799188356efe8d41759bbdcdd6d39db93208f2664f03a.json => query-d7bd14e6550df54657c37d389c4ed79cde6d6d0a75702953b16df1a9748b11f5.json} (64%) rename core/lib/dal/.sqlx/{query-0fef49a649d20c9fd263c1dfa40daa9b94d398c635c37746736e98f1f18fcca7.json => query-d89eabd1edb4ee4657249f9f4ab729b9149fee37c5ef7d69e259ee33cb8ca860.json} (89%) create mode 100644 core/lib/dal/.sqlx/query-dcfe6ef35a598098276d2cc69a05320b4081c66e965f359d70fba7670b88a5f6.json create mode 100644 core/lib/dal/.sqlx/query-ddfb7ba0592f1e6714a4496cee18e7265828e3ae78e391ef235b700f0adfe5e4.json rename core/lib/dal/.sqlx/{query-5f7034d22251a893249208c5ff8fa5c8bf46bc0cea4ac2b25ecde236c30ae32d.json => query-de784f549ceda62e37459519b52e7be93b12319c041751bc4138fa64258ecd5c.json} (87%) delete mode 100644 core/lib/dal/.sqlx/query-e7d0b7c132b80195dae7cbf50355eb148aa6d1dbd69bf3fe48522101a6ea0bcb.json rename core/lib/dal/.sqlx/{query-a48c92f557e5e3a2674ce0dee9cd92f5a547150590b8c221c4065eab11175c7a.json => query-ea4a4f5e0b2abe5e8f2745cf42e51063eae38da5d4b874f74c57b26f188fdeea.json} (69%) delete mode 100644 core/lib/dal/.sqlx/query-ead71ae66fe4685132c03a973612fe98364aa684180dd6fbf540bb0b68d96a64.json rename core/lib/dal/.sqlx/{query-0f1856e55a370280a078d048f09e2d457914c737660b37e9f66b576bbc9a7904.json => query-eb27e1b82b8ecbb9711c417888564a8e245ecee4866264d38146938595b07f37.json} (91%) rename core/lib/dal/.sqlx/{query-cea9fe027a6a0ada827f23b48ac32432295b2f7ee40bf13522a6edbd236f1970.json => query-ec2942fecedb7ee47279bf0418eb020b1036f002312271eec76ec3d40f77eb71.json} (86%) rename core/lib/dal/.sqlx/{query-4cfdfb32d808e33779ea4566e9cf9bb44a0952d475c3e6f207443b72ebddb0cd.json => query-ee50258050e7a08be67335cddf258ed14ea4ed363db1501e7268909bc18f2043.json} (78%) delete mode 100644 core/lib/dal/.sqlx/query-f012d0922265269746396dac8f25ff66f2c3b2b83d45360818a8782e56aa3d66.json delete mode 100644 core/lib/dal/.sqlx/query-f3a049c7eb0d8903737f02fa154b50ebc862a133734382bad8fdfa3a93d8b743.json create mode 100644 core/lib/dal/.sqlx/query-f551ac609521345b0dbcce65df2ce3d957afdb5f9809929dbe7a67a4a164e741.json create mode 100644 core/lib/dal/.sqlx/query-f90a87a0c8a3ad95d722fbcf1b05371292d0bfbb23eaa2db163ef6fd1e1374d9.json create mode 100644 core/lib/dal/.sqlx/query-fce6fff384875df689dc422153a2745b90c68ebec5706b106ef69cb61333466e.json rename core/lib/dal/.sqlx/{query-f4e7e2dd109aab2714845b028eba780c75468aa36615bcfcf7f7d8ace23cd1aa.json => query-fd4b42f90ffe24f76a35a005460cc3cec1dbc3e9af406bb900c3ec52590978bc.json} (65%) rename core/lib/dal/.sqlx/{query-99d9ee2a0d0450acefa0d9b6c031e30606fddf6631c859ab03819ec476bcf005.json => query-fd8aaef58e1b9bf4f389fb2943adea2b254fed4b5437ee2968707dffe6e6869d.json} (75%) rename core/lib/dal/.sqlx/{query-9f29aa31d4698031e9f3fe2eb273724dcce382936af0d4c386143399995cd325.json => query-febd2b039a686631e3c943882864f6cb289fdec08f4db49ee40ba67371df1927.json} (59%) rename prover/crates/lib/prover_dal/.sqlx/{query-41af30620f8a1f20b8a6c46be162601d35fd2881ac1fd070f0f1a8add4bc388d.json => query-095c459e05aa4c7fad0d1fa74b2d52314178f8ab2aea7efb69ae18fbf40e8994.json} (80%) delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-0a1ec4690d6b4a67d6ad16badcbf113a19feb73c4cf9876855523499998b99c0.json create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-1080b95755b3047747a9fabc7c7c43ffc5f519d35c90c60f89579f0689906df5.json rename prover/crates/lib/prover_dal/.sqlx/{query-eb2a85cb60c680a71203769db7baf89bbd72934e1405e320e746158e6d395d96.json => query-128b9be7a480a1ef132e5d477a43e4b3d55a0fee71105df880ff4f599844d06f.json} (81%) rename prover/crates/lib/prover_dal/.sqlx/{query-fcddeb96dcd1611dedb2091c1be304e8a35fd65bf37e976b7106f57c57e70b9b.json => query-1a1b8595ccf645981050fdeb87c572f6c620f86bf6c53334878490c7004331f4.json} (77%) delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-29ff260b02f7b955f9fe0b657b87def3a97275b66ad33d214054dc9048ddf584.json rename prover/crates/lib/prover_dal/.sqlx/{query-d0be28042b50199075cb0eca26f6b93bfd5d96fdc68732fe38c79ccd44b84def.json => query-2d11a834e177596113b5ffd634067fadffc1d3091e8c050835d4f178a328fcc8.json} (82%) delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-2e6e2b68efc28114f44616b68fcf1d4d9a4b83a8b42846d8373ea13b96d612cf.json create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-2f194183f0140eee0dd801b2087c0a4dbcc7b955132056b5ff10f00cf5844874.json rename prover/crates/lib/prover_dal/.sqlx/{query-102b79726652d9150c802350bdca80c233a9fd3e892b5a867a5517c2e04497a8.json => query-30128c0642524295ab05c37c60db2fd05e27e9df6d760173bba37446988d1b8e.json} (84%) rename prover/crates/lib/prover_dal/.sqlx/{query-9895b2ded08be3e81a5357decf76b4d3d6a762761e45af2a73fe96da804e627e.json => query-332f1363f19160f9a7708635fd1691e08d28ca6796c0bbba95016d1899cf84fe.json} (84%) create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-340a84063719f9b837a61cbc63368ba43ba128a00a194dce65015bd9eeb1b42f.json create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-37fa629a87113f13c89ce5c1a8fffd15b636d553794900596528e8fb03ca5aed.json delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-3941da180ee62a7c5d4e392ff4fe2d3a6ebb3657862b91e3ece34119f098fc2d.json rename prover/crates/lib/prover_dal/.sqlx/{query-7d20c0bf35625185c1f6c675aa8fcddbb47c5e9965443f118f8edd7d562734a2.json => query-3b3193bfac70b5fe69bf3bb7ba5a234c19578572973094b21ddbb3876da6bb95.json} (79%) delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-3e0a1ebc684810c09ff83784bdd0ad195b0dd2a8ce56b1a9eb531103130b5e3e.json rename prover/crates/lib/prover_dal/.sqlx/{query-216d0c263539739b53975a96a10332b826708800a2f72f09bd7aea08cf724e1a.json => query-3fead9a82ea277785a9ee5c075a2ad4da8f523aa84cd047216d8e3cf69c92106.json} (82%) create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-3ffc042b13c185ca6963fcb2d4d10c3b232bbaaa12747f72e3b8c5ad64702a79.json rename prover/crates/lib/prover_dal/.sqlx/{query-bcc5d3d35652f49b41d4ee673b171570fc88c17822bebd5b92e3b2f726d9af3a.json => query-4580503b825352de7691478a5de103782558380c48caf8734cacee350e3841dd.json} (82%) create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-48b57a279bfff34d44d1f5a6501e40978966fb2ad8b342907580dd17c0a52779.json rename prover/crates/lib/prover_dal/.sqlx/{query-d5bb897092bce2788fe02f31c9de6dde4142e09330557cc627fee2db278ace50.json => query-54cc92f95c07effcb08fa0b174c742fde93ffb610bff173f04f1b80e30754ad5.json} (82%) rename prover/crates/lib/prover_dal/.sqlx/{query-2b12c5d469e6220cc8ddc997c666e4aa4f797bcc6e05ec2f2e435a7e940d8cf9.json => query-6b7cf7ae3c66c46f4ecec2b0710f9f8bea0033f6727c2582f7f141330a47f440.json} (82%) rename prover/crates/lib/prover_dal/.sqlx/{query-d272c91f1209c277189a31c59ee191a43dc8eafc33ee067bd41e20f25f7625f0.json => query-6c37c8a0a921408e3b812adf77d835d9a865ecbd87d38008a649e8943fdf8a43.json} (92%) rename prover/crates/lib/prover_dal/.sqlx/{query-2dc6b7bf08cced8791354fc47e319d03f894f40d2ec528382b5643c3d51ec8e7.json => query-705e3880df382c3c25f41630d83f2186aa86751cb3b4de26a60af1cf987ca636.json} (92%) create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-7238cfe04ba59967fe5589665ad2c0214469edff6fc74965f1ec1366f8b46b8e.json delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-73266a8526c6adc315900e2e95441976a264759c4060c1a38e466ee2052fc17d.json rename prover/crates/lib/prover_dal/.sqlx/{query-8720d411e0c9640afd61e927a89c0b6c018e6a4d279acd24a4ea7d81b5cc5123.json => query-7493571411ee2cb4f7b09bcfc4eb86d3521faa0fbbfc7ca810c818ca9720b121.json} (77%) create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-749d18c0fdae16ce0ed4e3c23e543d01cff938d3aed44c9bb1d864bfdf69e39a.json delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-764693ceeb45f8478a20242b592d419667f11d80036cda021ecbf23b0b5f7f42.json create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-7ab760de174d37c04373cf48489846983cb3f693c02159ba41c1a875aed7e03d.json rename prover/crates/lib/prover_dal/.sqlx/{query-37ad15f54f4a6f4f79c71a857f3a8d4cc59246dda91b19526e73f27a17c8e3da.json => query-866bffdc527c079d128c1d21595ca5aec09b39b9d0367b0c29167f8a6a166d18.json} (83%) rename prover/crates/lib/prover_dal/.sqlx/{query-b4794e6a0c2366d5d95ab373c310103263af3ff5cb6c9dc5df59d3cd2a5e56b4.json => query-88b83c02ef8e3129ff6a416f5d71c765b3be3958cab0f3bde03f51e03777afd4.json} (75%) delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-89a25708d0b0a15e1e56ee8fd69f5a15d2fc5ad3e5ce738a2f6ee3eecfc96736.json rename prover/crates/lib/prover_dal/.sqlx/{query-28397b5a0b7af832d2a4d3d7011a68a48db6a64afcd41bbe0e17d98fa38fdb19.json => query-8c5aba6ce584c1671f2d65fb47701426d60c56b526af5ed2e0c602f881c3bbf0.json} (52%) create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-926cddf712322b476064a6efb2a8594776d64b8b5a4094fef979e35ab76d5bcd.json delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-929419ad8dcc70e8ce986f17075cd21d4645563f93afd4428734196c2b212276.json delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-9b713312b539b4eefa58346f0070767a2cd4488e670674cd9149f7a332c0198d.json rename prover/crates/lib/prover_dal/.sqlx/{query-e438a4f0c705fcb39e017912ce8e1bb675a86ae14a863fa31eb513af65d606ed.json => query-9f5f6d6da7dbb7292b7fe60283993e804b9c2af8c98ae64ccace8c5035b3c499.json} (80%) rename prover/crates/lib/prover_dal/.sqlx/{query-e9c9b69852fa68f463f17b6d63ab99cf505662036f2dd7a9f1807c4c1bad7c7b.json => query-a4407ac701423bc91505af3e7250ac1e4ed2a372922e55728de083bffb533e11.json} (60%) rename prover/crates/lib/prover_dal/.sqlx/{query-2095e5646c382ccbc6e3bafdeddaae31358088e142dff51c9f0bde8f386900d3.json => query-a471aeb02911569bc201db0aa017c0d0f55630a33b69c9a0fefd9cb8be9356ee.json} (78%) rename prover/crates/lib/prover_dal/.sqlx/{query-35a76415cb746d03da31481edc65adefab0bf3abf6853a6d36123c8adcaf813b.json => query-a6848b0c4cb256ca1d79d83dc5cb8c88cdb52125daedbade044934761fe2147d.json} (83%) create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-a6eb7a1f1aa2f6f5d90fbe3b8c777313681560f538c6524c54648d6308533744.json delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-a817f0fec85388b3e2510ce259208a01b63ae4aa03c983c3a52c802d585e5a80.json delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-abc93d27a8673b23e18d050e84c43c868c63c853edb5c4f41e48a3cc6378eca9.json rename prover/crates/lib/prover_dal/.sqlx/{query-ec04b89218111a5dc8d5ade506ac3465e2211ef3013386feb12d4cc04e0eade9.json => query-b9aaf5fe4d0261f7b05c8601a96b3027b4c2ce405d3bcc9821440408a394d7f5.json} (73%) rename prover/crates/lib/prover_dal/.sqlx/{query-29f7a564a8373f7e44840e8e9e7d0cd5c6b1122c35d7ffdbbba30327ca3fb5a8.json => query-c01337f381828818b2b23a7fcc3d165108e64cc8cf1a2a5604cb180f6d8ac4fe.json} (57%) rename prover/crates/lib/prover_dal/.sqlx/{query-7effbacbdcc4bd762386351755f4f32042dfead8a37401558f5fd3b03480f2dd.json => query-c5569d55d77296b8c7180c95682423bb83b9fb0422b396cbd201f02ebce7b921.json} (93%) rename prover/crates/lib/prover_dal/.sqlx/{query-081e2b928f0816c41d6645c1dedbb3402044d201e85e114ff4582394c32bd2bf.json => query-c6d02dc9cb9908a57c79729c759b9314a2ce0180c20126ad22ddaa20c7c32c2c.json} (66%) delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-c8daa62b3835c15fafb3f83deabb5a4672ad50a9de92c84d939ac4c69842e355.json delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-caff620ae66d7fbe3caff7505173b6da86d1e693be03936730c340121167341f.json create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-cb453f0677b92539747e175e796599bf65cbf2fd7c27a2dcad43e41a0f43cba0.json create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-cebbd80998bf2be10c735f6c414d023d9cce8cd66ad684475ece209832babd5e.json create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-e2aceb9b86e74a3d119d383dcc729d1227a213b6cacb4c30a1f94c56f56cb4af.json create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-e65d9d8389b60f48468561984f0fb9c8674344921b98b8b26e4d85994b3d72af.json rename prover/crates/lib/prover_dal/.sqlx/{query-3727d5614d2fe2a4d96f880eb72cd48c95ca5b4520dde415a2b5ff32ece47c86.json => query-e6ddecc79d55bf5bd3e348a735b02757fe394fa096f09c62faa26f728a69d1ae.json} (79%) delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-e743af4c18ec91eb46db5a19556fba74ec2cfc3c89c7e4e2ea475c3ce4092849.json delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-e875dcbbdaed6998dbea45d4eab5d005d8760c4809b7aef902155196873da66e.json delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-eec29cbff034818f4fb5ec1e6ad38e1010d7389457b3c97e9b238a3a0291a54e.json delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-eef1b56e87eff63fcf6ffb98791583a7526ae38ceb4bf80543cfd3fb60492fb9.json create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-f05ea1f0ee0be1ac50c35f5dbf4bcaf4e7f673e9d9827427aa4bbedb3cae8b8f.json create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-f294a1c32ffb957c901dcdfa942ea8e04c2c28771aa50a9e3ebb95c5e428be0e.json rename prover/crates/lib/prover_dal/.sqlx/{query-8357972a21b39644e4cbe4bedc3b6d9065bf4494daf8f7632ab2bfe055773f7b.json => query-f2ed1acf57927528cf978ad759ac92d6496147f6425c2485fc8a8f2739e65f80.json} (81%) create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-f3280a144a9aea48dae9b2914f0bf0344b237bf1914657d36f44b9d21ae966a6.json create mode 100644 prover/crates/lib/prover_dal/.sqlx/query-f68afde603675b0853547c61a74cbb33d511e07d80a5acd79bc559abdbda49bc.json rename prover/crates/lib/prover_dal/.sqlx/{query-0b70c98c2edd8370ad09ac553c18dbc21cccb9a95e3db1c93da239845a5e9036.json => query-f70306e92c2a2d69e0e75eb0cf614f3cc4f9c96c2a51a157b83fff9b411beeb9.json} (80%) delete mode 100644 prover/crates/lib/prover_dal/.sqlx/query-f99c34313e2717ec74b4f274e33dae905acac53b46eeaeb059d23e48a71df3b4.json rename prover/crates/lib/prover_dal/.sqlx/{query-28f03acf565c4b50fe86f606c18a8b699386b3c5b4e02d5ce046f0f2e0ddc388.json => query-fd29394931eed5b99d2fb4fac907218d106d5852fa6f65aca22e12b3a4b7f9c2.json} (92%) diff --git a/core/lib/dal/.sqlx/query-00c0389f4cde049078885cdf05bdb7dbe0bb23c4fc87a78be2d01b77da2ecbd3.json b/core/lib/dal/.sqlx/query-00c0389f4cde049078885cdf05bdb7dbe0bb23c4fc87a78be2d01b77da2ecbd3.json deleted file mode 100644 index d83713192cb4..000000000000 --- a/core/lib/dal/.sqlx/query-00c0389f4cde049078885cdf05bdb7dbe0bb23c4fc87a78be2d01b77da2ecbd3.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n WITH\n available_batches AS (\n SELECT\n MAX(number) AS \"last_batch\"\n FROM\n l1_batches\n ),\n processed_batches AS (\n SELECT\n COALESCE(MAX(l1_batch_number), $1) + $2 AS \"last_ready_batch\"\n FROM\n vm_runner_protective_reads\n WHERE\n time_taken IS NOT NULL\n )\n SELECT\n LEAST(last_batch, last_ready_batch) AS \"last_ready_batch!\"\n FROM\n available_batches\n FULL JOIN processed_batches ON TRUE\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "last_ready_batch!", - "type_info": "Int8" - } - ], - "parameters": { - "Left": [ - "Int8", - "Int8" - ] - }, - "nullable": [ - true - ] - }, - "hash": "00c0389f4cde049078885cdf05bdb7dbe0bb23c4fc87a78be2d01b77da2ecbd3" -} diff --git a/core/lib/dal/.sqlx/query-0124bad591f7ed156000c515cb0772b3002289a05ab23b7dafde2af10c7d88da.json b/core/lib/dal/.sqlx/query-0124bad591f7ed156000c515cb0772b3002289a05ab23b7dafde2af10c7d88da.json new file mode 100644 index 000000000000..5cd56fee6b78 --- /dev/null +++ b/core/lib/dal/.sqlx/query-0124bad591f7ed156000c515cb0772b3002289a05ab23b7dafde2af10c7d88da.json @@ -0,0 +1,24 @@ +{ + "db_name": "PostgreSQL", + "query": "\n INSERT INTO\n base_token_ratios (\n numerator, denominator, ratio_timestamp, created_at, updated_at\n )\n VALUES\n ($1, $2, $3, NOW(), NOW())\n RETURNING\n id\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "id", + "type_info": "Int4" + } + ], + "parameters": { + "Left": [ + "Numeric", + "Numeric", + "Timestamp" + ] + }, + "nullable": [ + false + ] + }, + "hash": "0124bad591f7ed156000c515cb0772b3002289a05ab23b7dafde2af10c7d88da" +} diff --git a/core/lib/dal/.sqlx/query-026ab7dd7407f10074a2966b5eac2563a3e061bcc6505d8c295b1b2517f85f1b.json b/core/lib/dal/.sqlx/query-026ab7dd7407f10074a2966b5eac2563a3e061bcc6505d8c295b1b2517f85f1b.json deleted file mode 100644 index d98798241f7e..000000000000 --- a/core/lib/dal/.sqlx/query-026ab7dd7407f10074a2966b5eac2563a3e061bcc6505d8c295b1b2517f85f1b.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n SELECT\n number\n FROM\n l1_batches\n LEFT JOIN eth_txs_history AS prove_tx ON (l1_batches.eth_prove_tx_id = prove_tx.eth_tx_id)\n WHERE\n prove_tx.confirmed_at IS NOT NULL\n ORDER BY\n number DESC\n LIMIT\n 1\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "number", - "type_info": "Int8" - } - ], - "parameters": { - "Left": [] - }, - "nullable": [ - false - ] - }, - "hash": "026ab7dd7407f10074a2966b5eac2563a3e061bcc6505d8c295b1b2517f85f1b" -} diff --git a/core/lib/dal/.sqlx/query-0429f2fa683bdff6fc1ff5069de69d57dbfda4be1f70232afffca82a895d43e0.json b/core/lib/dal/.sqlx/query-0429f2fa683bdff6fc1ff5069de69d57dbfda4be1f70232afffca82a895d43e0.json new file mode 100644 index 000000000000..5693bdf987e5 --- /dev/null +++ b/core/lib/dal/.sqlx/query-0429f2fa683bdff6fc1ff5069de69d57dbfda4be1f70232afffca82a895d43e0.json @@ -0,0 +1,36 @@ +{ + "db_name": "PostgreSQL", + "query": "\n WITH\n sl AS (\n SELECT\n (\n SELECT\n ARRAY[hashed_key, value] AS kv\n FROM\n storage_logs\n WHERE\n storage_logs.miniblock_number = $1\n AND storage_logs.hashed_key >= u.start_key\n AND storage_logs.hashed_key <= u.end_key\n ORDER BY\n storage_logs.hashed_key\n LIMIT\n 1\n )\n FROM\n UNNEST($2::bytea [], $3::bytea []) AS u (start_key, end_key)\n )\n \n SELECT\n sl.kv[1] AS \"hashed_key?\",\n sl.kv[2] AS \"value?\",\n initial_writes.index\n FROM\n sl\n LEFT OUTER JOIN initial_writes ON initial_writes.hashed_key = sl.kv[1]\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "hashed_key?", + "type_info": "Bytea" + }, + { + "ordinal": 1, + "name": "value?", + "type_info": "Bytea" + }, + { + "ordinal": 2, + "name": "index", + "type_info": "Int8" + } + ], + "parameters": { + "Left": [ + "Int8", + "ByteaArray", + "ByteaArray" + ] + }, + "nullable": [ + null, + null, + true + ] + }, + "hash": "0429f2fa683bdff6fc1ff5069de69d57dbfda4be1f70232afffca82a895d43e0" +} diff --git a/core/lib/dal/.sqlx/query-046590a310cc7bbfa421d0d8e20c3bdae18b88c4c223e374df9a997c271b091b.json b/core/lib/dal/.sqlx/query-046590a310cc7bbfa421d0d8e20c3bdae18b88c4c223e374df9a997c271b091b.json deleted file mode 100644 index 950d72a3e238..000000000000 --- a/core/lib/dal/.sqlx/query-046590a310cc7bbfa421d0d8e20c3bdae18b88c4c223e374df9a997c271b091b.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n WITH\n soft AS (\n SELECT\n pruned_l1_batch,\n pruned_miniblock\n FROM\n pruning_log\n WHERE\n TYPE = 'Soft'\n ORDER BY\n pruned_l1_batch DESC\n LIMIT\n 1\n ),\n hard AS (\n SELECT\n pruned_l1_batch,\n pruned_miniblock\n FROM\n pruning_log\n WHERE\n TYPE = 'Hard'\n ORDER BY\n pruned_l1_batch DESC\n LIMIT\n 1\n )\n SELECT\n soft.pruned_l1_batch AS last_soft_pruned_l1_batch,\n soft.pruned_miniblock AS last_soft_pruned_miniblock,\n hard.pruned_l1_batch AS last_hard_pruned_l1_batch,\n hard.pruned_miniblock AS last_hard_pruned_miniblock\n FROM\n soft\n FULL JOIN hard ON TRUE\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "last_soft_pruned_l1_batch", - "type_info": "Int8" - }, - { - "ordinal": 1, - "name": "last_soft_pruned_miniblock", - "type_info": "Int8" - }, - { - "ordinal": 2, - "name": "last_hard_pruned_l1_batch", - "type_info": "Int8" - }, - { - "ordinal": 3, - "name": "last_hard_pruned_miniblock", - "type_info": "Int8" - } - ], - "parameters": { - "Left": [] - }, - "nullable": [ - true, - true, - true, - true - ] - }, - "hash": "046590a310cc7bbfa421d0d8e20c3bdae18b88c4c223e374df9a997c271b091b" -} diff --git a/core/lib/dal/.sqlx/query-048f255042f0a75c04bc19369c4b0dd75acbe4248159d2fb62d9e9878c158016.json b/core/lib/dal/.sqlx/query-048f255042f0a75c04bc19369c4b0dd75acbe4248159d2fb62d9e9878c158016.json new file mode 100644 index 000000000000..8c41c0ab9763 --- /dev/null +++ b/core/lib/dal/.sqlx/query-048f255042f0a75c04bc19369c4b0dd75acbe4248159d2fb62d9e9878c158016.json @@ -0,0 +1,18 @@ +{ + "db_name": "PostgreSQL", + "query": "\n INSERT INTO\n protocol_versions (\n id,\n timestamp,\n bootloader_code_hash,\n default_account_code_hash,\n upgrade_tx_hash,\n created_at\n )\n VALUES\n ($1, $2, $3, $4, $5, NOW())\n ON CONFLICT DO NOTHING\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int4", + "Int8", + "Bytea", + "Bytea", + "Bytea" + ] + }, + "nullable": [] + }, + "hash": "048f255042f0a75c04bc19369c4b0dd75acbe4248159d2fb62d9e9878c158016" +} diff --git a/core/lib/dal/.sqlx/query-05891e039a54b70ac406a63b73b6f5521c888c5bc9050333dd18a88c098b2d12.json b/core/lib/dal/.sqlx/query-05891e039a54b70ac406a63b73b6f5521c888c5bc9050333dd18a88c098b2d12.json new file mode 100644 index 000000000000..735d04d2053a --- /dev/null +++ b/core/lib/dal/.sqlx/query-05891e039a54b70ac406a63b73b6f5521c888c5bc9050333dd18a88c098b2d12.json @@ -0,0 +1,15 @@ +{ + "db_name": "PostgreSQL", + "query": "\n WITH\n new_logs AS MATERIALIZED (\n SELECT DISTINCT\n ON (hashed_key)\n hashed_key,\n miniblock_number,\n operation_number\n FROM\n storage_logs\n WHERE\n miniblock_number BETWEEN $1 AND $2\n ORDER BY\n hashed_key,\n miniblock_number DESC,\n operation_number DESC\n )\n \n DELETE FROM storage_logs USING new_logs\n WHERE\n storage_logs.hashed_key = new_logs.hashed_key\n AND storage_logs.miniblock_number <= $2\n AND (storage_logs.miniblock_number, storage_logs.operation_number)\n < (new_logs.miniblock_number, new_logs.operation_number)\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8", + "Int8" + ] + }, + "nullable": [] + }, + "hash": "05891e039a54b70ac406a63b73b6f5521c888c5bc9050333dd18a88c098b2d12" +} diff --git a/core/lib/dal/.sqlx/query-05c2a77d9f65d435e2df63a300850e42abbaf365a1b041d0e7a809796ef0fe63.json b/core/lib/dal/.sqlx/query-05c2a77d9f65d435e2df63a300850e42abbaf365a1b041d0e7a809796ef0fe63.json deleted file mode 100644 index f3c85b9b43dc..000000000000 --- a/core/lib/dal/.sqlx/query-05c2a77d9f65d435e2df63a300850e42abbaf365a1b041d0e7a809796ef0fe63.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE proof_generation_details\n SET\n status = 'picked_by_prover',\n updated_at = NOW(),\n prover_taken_at = NOW()\n WHERE\n l1_batch_number = (\n SELECT\n l1_batch_number\n FROM\n proof_generation_details\n LEFT JOIN l1_batches ON l1_batch_number = l1_batches.number\n WHERE\n (\n vm_run_data_blob_url IS NOT NULL\n AND proof_gen_data_blob_url IS NOT NULL\n AND l1_batches.hash IS NOT NULL\n AND l1_batches.aux_data_hash IS NOT NULL\n AND l1_batches.meta_parameters_hash IS NOT NULL\n AND status = 'unpicked'\n )\n OR (\n status = 'picked_by_prover'\n AND prover_taken_at < NOW() - $1::INTERVAL\n )\n ORDER BY\n l1_batch_number ASC\n LIMIT\n 1\n )\n RETURNING\n proof_generation_details.l1_batch_number\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "l1_batch_number", - "type_info": "Int8" - } - ], - "parameters": { - "Left": [ - "Interval" - ] - }, - "nullable": [ - false - ] - }, - "hash": "05c2a77d9f65d435e2df63a300850e42abbaf365a1b041d0e7a809796ef0fe63" -} diff --git a/core/lib/dal/.sqlx/query-2b1aa207a058f66265acf2c21b8ed5d8007789c0fc1eab948f6d7339dfb69147.json b/core/lib/dal/.sqlx/query-08740b96c883fce75b6238bb6bdc95254f94dddb4ed84a675c2655421758b049.json similarity index 80% rename from core/lib/dal/.sqlx/query-2b1aa207a058f66265acf2c21b8ed5d8007789c0fc1eab948f6d7339dfb69147.json rename to core/lib/dal/.sqlx/query-08740b96c883fce75b6238bb6bdc95254f94dddb4ed84a675c2655421758b049.json index 96b48892516d..51392a6ed8f8 100644 --- a/core/lib/dal/.sqlx/query-2b1aa207a058f66265acf2c21b8ed5d8007789c0fc1eab948f6d7339dfb69147.json +++ b/core/lib/dal/.sqlx/query-08740b96c883fce75b6238bb6bdc95254f94dddb4ed84a675c2655421758b049.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n DELETE FROM transactions\n WHERE\n miniblock_number IS NULL\n AND received_at < NOW() - $1::INTERVAL\n AND is_priority = FALSE\n AND error IS NULL\n RETURNING\n hash\n ", + "query": "\n DELETE FROM transactions\n WHERE\n miniblock_number IS NULL\n AND received_at < NOW() - $1::INTERVAL\n AND is_priority = FALSE\n AND error IS NULL\n RETURNING\n hash\n ", "describe": { "columns": [ { @@ -18,5 +18,5 @@ false ] }, - "hash": "2b1aa207a058f66265acf2c21b8ed5d8007789c0fc1eab948f6d7339dfb69147" + "hash": "08740b96c883fce75b6238bb6bdc95254f94dddb4ed84a675c2655421758b049" } diff --git a/core/lib/dal/.sqlx/query-0a0dd4a98128c2ef60d385f5c0674ddd4f2422089604768b19e0b6d948c0cf1b.json b/core/lib/dal/.sqlx/query-0a0dd4a98128c2ef60d385f5c0674ddd4f2422089604768b19e0b6d948c0cf1b.json new file mode 100644 index 000000000000..0d4d8c0dc745 --- /dev/null +++ b/core/lib/dal/.sqlx/query-0a0dd4a98128c2ef60d385f5c0674ddd4f2422089604768b19e0b6d948c0cf1b.json @@ -0,0 +1,100 @@ +{ + "db_name": "PostgreSQL", + "query": "\n WITH\n events_select AS (\n SELECT\n address,\n topic1,\n topic2,\n topic3,\n topic4,\n value,\n miniblock_number,\n tx_hash,\n tx_index_in_block,\n event_index_in_block,\n event_index_in_tx\n FROM\n events\n WHERE\n miniblock_number > $1\n ORDER BY\n miniblock_number ASC,\n event_index_in_block ASC\n )\n \n SELECT\n miniblocks.hash AS \"block_hash?\",\n address AS \"address!\",\n topic1 AS \"topic1!\",\n topic2 AS \"topic2!\",\n topic3 AS \"topic3!\",\n topic4 AS \"topic4!\",\n value AS \"value!\",\n miniblock_number AS \"miniblock_number!\",\n miniblocks.l1_batch_number AS \"l1_batch_number?\",\n tx_hash AS \"tx_hash!\",\n tx_index_in_block AS \"tx_index_in_block!\",\n event_index_in_block AS \"event_index_in_block!\",\n event_index_in_tx AS \"event_index_in_tx!\",\n miniblocks.timestamp AS \"block_timestamp\"\n FROM\n events_select\n INNER JOIN miniblocks ON events_select.miniblock_number = miniblocks.number\n ORDER BY\n miniblock_number ASC,\n event_index_in_block ASC\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "block_hash?", + "type_info": "Bytea" + }, + { + "ordinal": 1, + "name": "address!", + "type_info": "Bytea" + }, + { + "ordinal": 2, + "name": "topic1!", + "type_info": "Bytea" + }, + { + "ordinal": 3, + "name": "topic2!", + "type_info": "Bytea" + }, + { + "ordinal": 4, + "name": "topic3!", + "type_info": "Bytea" + }, + { + "ordinal": 5, + "name": "topic4!", + "type_info": "Bytea" + }, + { + "ordinal": 6, + "name": "value!", + "type_info": "Bytea" + }, + { + "ordinal": 7, + "name": "miniblock_number!", + "type_info": "Int8" + }, + { + "ordinal": 8, + "name": "l1_batch_number?", + "type_info": "Int8" + }, + { + "ordinal": 9, + "name": "tx_hash!", + "type_info": "Bytea" + }, + { + "ordinal": 10, + "name": "tx_index_in_block!", + "type_info": "Int4" + }, + { + "ordinal": 11, + "name": "event_index_in_block!", + "type_info": "Int4" + }, + { + "ordinal": 12, + "name": "event_index_in_tx!", + "type_info": "Int4" + }, + { + "ordinal": 13, + "name": "block_timestamp", + "type_info": "Int8" + } + ], + "parameters": { + "Left": [ + "Int8" + ] + }, + "nullable": [ + false, + false, + false, + false, + false, + false, + false, + false, + true, + false, + false, + false, + false, + false + ] + }, + "hash": "0a0dd4a98128c2ef60d385f5c0674ddd4f2422089604768b19e0b6d948c0cf1b" +} diff --git a/core/lib/dal/.sqlx/query-0b5d5efeac95d429cf6a5be22153897edf8c868094ad029e2e8fcf286d44fd55.json b/core/lib/dal/.sqlx/query-0b5d5efeac95d429cf6a5be22153897edf8c868094ad029e2e8fcf286d44fd55.json deleted file mode 100644 index 822a6967f6db..000000000000 --- a/core/lib/dal/.sqlx/query-0b5d5efeac95d429cf6a5be22153897edf8c868094ad029e2e8fcf286d44fd55.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n data_availability (l1_batch_number, blob_id, sent_at, created_at, updated_at)\n VALUES\n ($1, $2, $3, NOW(), NOW())\n ON CONFLICT DO NOTHING\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8", - "Text", - "Timestamp" - ] - }, - "nullable": [] - }, - "hash": "0b5d5efeac95d429cf6a5be22153897edf8c868094ad029e2e8fcf286d44fd55" -} diff --git a/core/lib/dal/.sqlx/query-dcfc3c0df11b923116af194a26c122dbdbf650edfec6d9c18f96c3bd0064d18d.json b/core/lib/dal/.sqlx/query-0bae50601f2dc3ea7ba9ab6b9f508275cef018c7060c49b9f7a387a14f6a5be8.json similarity index 80% rename from core/lib/dal/.sqlx/query-dcfc3c0df11b923116af194a26c122dbdbf650edfec6d9c18f96c3bd0064d18d.json rename to core/lib/dal/.sqlx/query-0bae50601f2dc3ea7ba9ab6b9f508275cef018c7060c49b9f7a387a14f6a5be8.json index 36e56da404ee..ca0578f338fd 100644 --- a/core/lib/dal/.sqlx/query-dcfc3c0df11b923116af194a26c122dbdbf650edfec6d9c18f96c3bd0064d18d.json +++ b/core/lib/dal/.sqlx/query-0bae50601f2dc3ea7ba9ab6b9f508275cef018c7060c49b9f7a387a14f6a5be8.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT\n miniblocks.hash AS block_hash,\n miniblocks.number,\n miniblocks.l1_batch_number,\n miniblocks.timestamp,\n miniblocks.base_fee_per_gas,\n miniblocks.gas_limit AS \"block_gas_limit?\",\n miniblocks.logs_bloom,\n prev_miniblock.hash AS \"parent_hash?\",\n l1_batches.timestamp AS \"l1_batch_timestamp?\",\n transactions.gas_limit AS \"transaction_gas_limit?\",\n transactions.refunded_gas AS \"refunded_gas?\",\n transactions.hash AS \"tx_hash?\"\n FROM\n miniblocks\n LEFT JOIN miniblocks prev_miniblock ON prev_miniblock.number = miniblocks.number - 1\n LEFT JOIN l1_batches ON l1_batches.number = miniblocks.l1_batch_number\n LEFT JOIN transactions ON transactions.miniblock_number = miniblocks.number\n WHERE\n miniblocks.number = $1\n ORDER BY\n transactions.index_in_block ASC\n ", + "query": "\n SELECT\n miniblocks.hash AS block_hash,\n miniblocks.number,\n miniblocks.l1_batch_number,\n miniblocks.timestamp,\n miniblocks.base_fee_per_gas,\n miniblocks.gas_limit AS \"block_gas_limit?\",\n miniblocks.logs_bloom,\n prev_miniblock.hash AS \"parent_hash?\",\n l1_batches.timestamp AS \"l1_batch_timestamp?\",\n transactions.gas_limit AS \"transaction_gas_limit?\",\n transactions.refunded_gas AS \"refunded_gas?\",\n transactions.hash AS \"tx_hash?\"\n FROM\n miniblocks\n LEFT JOIN\n miniblocks prev_miniblock\n ON prev_miniblock.number = miniblocks.number - 1\n LEFT JOIN l1_batches ON l1_batches.number = miniblocks.l1_batch_number\n LEFT JOIN transactions ON transactions.miniblock_number = miniblocks.number\n WHERE\n miniblocks.number = $1\n ORDER BY\n transactions.index_in_block ASC\n ", "describe": { "columns": [ { @@ -84,5 +84,5 @@ false ] }, - "hash": "dcfc3c0df11b923116af194a26c122dbdbf650edfec6d9c18f96c3bd0064d18d" + "hash": "0bae50601f2dc3ea7ba9ab6b9f508275cef018c7060c49b9f7a387a14f6a5be8" } diff --git a/core/lib/dal/.sqlx/query-1074d0a2e4a4afb9a92f3822e133db7a71aca15698bafba051a8d9a91a4dbc76.json b/core/lib/dal/.sqlx/query-1074d0a2e4a4afb9a92f3822e133db7a71aca15698bafba051a8d9a91a4dbc76.json deleted file mode 100644 index 13e4cdb9431d..000000000000 --- a/core/lib/dal/.sqlx/query-1074d0a2e4a4afb9a92f3822e133db7a71aca15698bafba051a8d9a91a4dbc76.json +++ /dev/null @@ -1,112 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n WITH\n mb AS (\n SELECT\n l1_gas_price,\n l2_fair_gas_price,\n fair_pubdata_price\n FROM\n miniblocks\n WHERE\n l1_batch_number = $1\n LIMIT\n 1\n )\n SELECT\n l1_batches.number,\n l1_batches.timestamp,\n l1_batches.l1_tx_count,\n l1_batches.l2_tx_count,\n l1_batches.hash AS \"root_hash?\",\n commit_tx.tx_hash AS \"commit_tx_hash?\",\n commit_tx.confirmed_at AS \"committed_at?\",\n prove_tx.tx_hash AS \"prove_tx_hash?\",\n prove_tx.confirmed_at AS \"proven_at?\",\n execute_tx.tx_hash AS \"execute_tx_hash?\",\n execute_tx.confirmed_at AS \"executed_at?\",\n mb.l1_gas_price,\n mb.l2_fair_gas_price,\n mb.fair_pubdata_price,\n l1_batches.bootloader_code_hash,\n l1_batches.default_aa_code_hash\n FROM\n l1_batches\n INNER JOIN mb ON TRUE\n LEFT JOIN eth_txs_history AS commit_tx ON (\n l1_batches.eth_commit_tx_id = commit_tx.eth_tx_id\n AND commit_tx.confirmed_at IS NOT NULL\n )\n LEFT JOIN eth_txs_history AS prove_tx ON (\n l1_batches.eth_prove_tx_id = prove_tx.eth_tx_id\n AND prove_tx.confirmed_at IS NOT NULL\n )\n LEFT JOIN eth_txs_history AS execute_tx ON (\n l1_batches.eth_execute_tx_id = execute_tx.eth_tx_id\n AND execute_tx.confirmed_at IS NOT NULL\n )\n WHERE\n l1_batches.number = $1\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "number", - "type_info": "Int8" - }, - { - "ordinal": 1, - "name": "timestamp", - "type_info": "Int8" - }, - { - "ordinal": 2, - "name": "l1_tx_count", - "type_info": "Int4" - }, - { - "ordinal": 3, - "name": "l2_tx_count", - "type_info": "Int4" - }, - { - "ordinal": 4, - "name": "root_hash?", - "type_info": "Bytea" - }, - { - "ordinal": 5, - "name": "commit_tx_hash?", - "type_info": "Text" - }, - { - "ordinal": 6, - "name": "committed_at?", - "type_info": "Timestamp" - }, - { - "ordinal": 7, - "name": "prove_tx_hash?", - "type_info": "Text" - }, - { - "ordinal": 8, - "name": "proven_at?", - "type_info": "Timestamp" - }, - { - "ordinal": 9, - "name": "execute_tx_hash?", - "type_info": "Text" - }, - { - "ordinal": 10, - "name": "executed_at?", - "type_info": "Timestamp" - }, - { - "ordinal": 11, - "name": "l1_gas_price", - "type_info": "Int8" - }, - { - "ordinal": 12, - "name": "l2_fair_gas_price", - "type_info": "Int8" - }, - { - "ordinal": 13, - "name": "fair_pubdata_price", - "type_info": "Int8" - }, - { - "ordinal": 14, - "name": "bootloader_code_hash", - "type_info": "Bytea" - }, - { - "ordinal": 15, - "name": "default_aa_code_hash", - "type_info": "Bytea" - } - ], - "parameters": { - "Left": [ - "Int8" - ] - }, - "nullable": [ - false, - false, - false, - false, - true, - false, - true, - false, - true, - false, - true, - false, - false, - true, - true, - true - ] - }, - "hash": "1074d0a2e4a4afb9a92f3822e133db7a71aca15698bafba051a8d9a91a4dbc76" -} diff --git a/core/lib/dal/.sqlx/query-150d0219cabbabcc9d0e97e3fd94032f3d900b74e62dfdec0c9f61bf2bacb595.json b/core/lib/dal/.sqlx/query-150d0219cabbabcc9d0e97e3fd94032f3d900b74e62dfdec0c9f61bf2bacb595.json new file mode 100644 index 000000000000..e3a8399ca285 --- /dev/null +++ b/core/lib/dal/.sqlx/query-150d0219cabbabcc9d0e97e3fd94032f3d900b74e62dfdec0c9f61bf2bacb595.json @@ -0,0 +1,21 @@ +{ + "db_name": "PostgreSQL", + "query": "\n INSERT INTO\n snapshot_recovery (\n l1_batch_number,\n l1_batch_timestamp,\n l1_batch_root_hash,\n miniblock_number,\n miniblock_timestamp,\n miniblock_hash,\n protocol_version,\n storage_logs_chunks_processed,\n updated_at,\n created_at\n )\n VALUES\n ($1, $2, $3, $4, $5, $6, $7, $8, NOW(), NOW())\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8", + "Int8", + "Bytea", + "Int8", + "Int8", + "Bytea", + "Int4", + "BoolArray" + ] + }, + "nullable": [] + }, + "hash": "150d0219cabbabcc9d0e97e3fd94032f3d900b74e62dfdec0c9f61bf2bacb595" +} diff --git a/core/lib/dal/.sqlx/query-1767de83aa4ef34f080da6d30d6154185671d13f3b234ce1f16aaeeab54b2a16.json b/core/lib/dal/.sqlx/query-1767de83aa4ef34f080da6d30d6154185671d13f3b234ce1f16aaeeab54b2a16.json new file mode 100644 index 000000000000..84fc44f7b5f9 --- /dev/null +++ b/core/lib/dal/.sqlx/query-1767de83aa4ef34f080da6d30d6154185671d13f3b234ce1f16aaeeab54b2a16.json @@ -0,0 +1,16 @@ +{ + "db_name": "PostgreSQL", + "query": "\n INSERT INTO\n commitments (\n l1_batch_number,\n events_queue_commitment,\n bootloader_initial_content_commitment\n )\n VALUES\n ($1, $2, $3)\n ON CONFLICT (l1_batch_number) DO NOTHING\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8", + "Bytea", + "Bytea" + ] + }, + "nullable": [] + }, + "hash": "1767de83aa4ef34f080da6d30d6154185671d13f3b234ce1f16aaeeab54b2a16" +} diff --git a/core/lib/dal/.sqlx/query-1823e1ac602ce4ba1db06543af9cb2685cda1ae7ecca83062ede7320c3b4a427.json b/core/lib/dal/.sqlx/query-1823e1ac602ce4ba1db06543af9cb2685cda1ae7ecca83062ede7320c3b4a427.json new file mode 100644 index 000000000000..1e20a9151b98 --- /dev/null +++ b/core/lib/dal/.sqlx/query-1823e1ac602ce4ba1db06543af9cb2685cda1ae7ecca83062ede7320c3b4a427.json @@ -0,0 +1,15 @@ +{ + "db_name": "PostgreSQL", + "query": "\n INSERT INTO\n contracts_verification_info (address, verification_info)\n VALUES\n ($1, $2)\n ON CONFLICT (address) DO\n UPDATE\n SET\n verification_info = $2\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Bytea", + "Jsonb" + ] + }, + "nullable": [] + }, + "hash": "1823e1ac602ce4ba1db06543af9cb2685cda1ae7ecca83062ede7320c3b4a427" +} diff --git a/core/lib/dal/.sqlx/query-18d507f6c9fe051da9899e2e4346e94d0b4f902c84e31fca606773cf4c9d17fc.json b/core/lib/dal/.sqlx/query-18d507f6c9fe051da9899e2e4346e94d0b4f902c84e31fca606773cf4c9d17fc.json new file mode 100644 index 000000000000..dc913c570053 --- /dev/null +++ b/core/lib/dal/.sqlx/query-18d507f6c9fe051da9899e2e4346e94d0b4f902c84e31fca606773cf4c9d17fc.json @@ -0,0 +1,16 @@ +{ + "db_name": "PostgreSQL", + "query": "\n INSERT INTO\n initial_writes (hashed_key, index, l1_batch_number, created_at, updated_at)\n SELECT\n u.hashed_key,\n u.index,\n $3,\n NOW(),\n NOW()\n FROM\n UNNEST($1::bytea [], $2::bigint []) AS u (hashed_key, index)\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "ByteaArray", + "Int8Array", + "Int8" + ] + }, + "nullable": [] + }, + "hash": "18d507f6c9fe051da9899e2e4346e94d0b4f902c84e31fca606773cf4c9d17fc" +} diff --git a/core/lib/dal/.sqlx/query-1a6f4db7fb5ad9b54367c7f9d87ecbc877c8e04d47bf16b9c2e59ba652d2955f.json b/core/lib/dal/.sqlx/query-1a6f4db7fb5ad9b54367c7f9d87ecbc877c8e04d47bf16b9c2e59ba652d2955f.json new file mode 100644 index 000000000000..a9ec3c779060 --- /dev/null +++ b/core/lib/dal/.sqlx/query-1a6f4db7fb5ad9b54367c7f9d87ecbc877c8e04d47bf16b9c2e59ba652d2955f.json @@ -0,0 +1,14 @@ +{ + "db_name": "PostgreSQL", + "query": "\n INSERT INTO\n vm_runner_protective_reads (\n l1_batch_number, created_at, updated_at, processing_started_at\n )\n VALUES\n ($1, NOW(), NOW(), NOW())\n ON CONFLICT (l1_batch_number) DO\n UPDATE\n SET\n updated_at = NOW(),\n processing_started_at = NOW()\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8" + ] + }, + "nullable": [] + }, + "hash": "1a6f4db7fb5ad9b54367c7f9d87ecbc877c8e04d47bf16b9c2e59ba652d2955f" +} diff --git a/core/lib/dal/.sqlx/query-1bbfac481c402bcb3bb888b84146d922fa1fc9c202072fbc04cae1bbf97195aa.json b/core/lib/dal/.sqlx/query-1bbfac481c402bcb3bb888b84146d922fa1fc9c202072fbc04cae1bbf97195aa.json deleted file mode 100644 index f24a28ffdc28..000000000000 --- a/core/lib/dal/.sqlx/query-1bbfac481c402bcb3bb888b84146d922fa1fc9c202072fbc04cae1bbf97195aa.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n vm_runner_bwip (l1_batch_number, created_at, updated_at, processing_started_at)\n VALUES\n ($1, NOW(), NOW(), NOW())\n ON CONFLICT (l1_batch_number) DO\n UPDATE\n SET\n updated_at = NOW(),\n processing_started_at = NOW()\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8" - ] - }, - "nullable": [] - }, - "hash": "1bbfac481c402bcb3bb888b84146d922fa1fc9c202072fbc04cae1bbf97195aa" -} diff --git a/core/lib/dal/.sqlx/query-1c9468bead5b80f209c4e94ab652f75a4055a9c1e7c3b767455df804f09f7d4c.json b/core/lib/dal/.sqlx/query-1c9468bead5b80f209c4e94ab652f75a4055a9c1e7c3b767455df804f09f7d4c.json new file mode 100644 index 000000000000..39eaca5a9434 --- /dev/null +++ b/core/lib/dal/.sqlx/query-1c9468bead5b80f209c4e94ab652f75a4055a9c1e7c3b767455df804f09f7d4c.json @@ -0,0 +1,20 @@ +{ + "db_name": "PostgreSQL", + "query": "\n SELECT\n number\n FROM\n l1_batches\n LEFT JOIN\n eth_txs_history AS prove_tx\n ON (l1_batches.eth_prove_tx_id = prove_tx.eth_tx_id)\n WHERE\n prove_tx.confirmed_at IS NOT NULL\n ORDER BY\n number DESC\n LIMIT\n 1\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "number", + "type_info": "Int8" + } + ], + "parameters": { + "Left": [] + }, + "nullable": [ + false + ] + }, + "hash": "1c9468bead5b80f209c4e94ab652f75a4055a9c1e7c3b767455df804f09f7d4c" +} diff --git a/core/lib/dal/.sqlx/query-1ed6c99dcaa47f1525499362e316a12866726e1f3ca9cf9d89f61c4e97373361.json b/core/lib/dal/.sqlx/query-1ed6c99dcaa47f1525499362e316a12866726e1f3ca9cf9d89f61c4e97373361.json new file mode 100644 index 000000000000..86256d4d0a0c --- /dev/null +++ b/core/lib/dal/.sqlx/query-1ed6c99dcaa47f1525499362e316a12866726e1f3ca9cf9d89f61c4e97373361.json @@ -0,0 +1,16 @@ +{ + "db_name": "PostgreSQL", + "query": "\n INSERT INTO\n data_availability (l1_batch_number, blob_id, sent_at, created_at, updated_at)\n VALUES\n ($1, $2, $3, NOW(), NOW())\n ON CONFLICT DO NOTHING\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8", + "Text", + "Timestamp" + ] + }, + "nullable": [] + }, + "hash": "1ed6c99dcaa47f1525499362e316a12866726e1f3ca9cf9d89f61c4e97373361" +} diff --git a/core/lib/dal/.sqlx/query-1f43731fa0736a91ba8da41f52b6b22abb03e2a9b2d3b53dc858e5c5a08bfb85.json b/core/lib/dal/.sqlx/query-1f43731fa0736a91ba8da41f52b6b22abb03e2a9b2d3b53dc858e5c5a08bfb85.json deleted file mode 100644 index 3817369ecc16..000000000000 --- a/core/lib/dal/.sqlx/query-1f43731fa0736a91ba8da41f52b6b22abb03e2a9b2d3b53dc858e5c5a08bfb85.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n consensus_replica_state (fake_key, global_config, genesis, state)\n VALUES\n (TRUE, $1, $2, $3)\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Jsonb", - "Jsonb", - "Jsonb" - ] - }, - "nullable": [] - }, - "hash": "1f43731fa0736a91ba8da41f52b6b22abb03e2a9b2d3b53dc858e5c5a08bfb85" -} diff --git a/core/lib/dal/.sqlx/query-2169cc7dfb074566ceb0bd5754d6e7a755c4bc6c25c7e6caff5fd6142813d349.json b/core/lib/dal/.sqlx/query-2169cc7dfb074566ceb0bd5754d6e7a755c4bc6c25c7e6caff5fd6142813d349.json deleted file mode 100644 index e48fddcf6175..000000000000 --- a/core/lib/dal/.sqlx/query-2169cc7dfb074566ceb0bd5754d6e7a755c4bc6c25c7e6caff5fd6142813d349.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n tee_proof_generation_details (l1_batch_number, tee_type, status, created_at, updated_at)\n VALUES\n ($1, $2, $3, NOW(), NOW())\n ON CONFLICT (l1_batch_number, tee_type) DO NOTHING\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8", - "Text", - "Text" - ] - }, - "nullable": [] - }, - "hash": "2169cc7dfb074566ceb0bd5754d6e7a755c4bc6c25c7e6caff5fd6142813d349" -} diff --git a/core/lib/dal/.sqlx/query-3490fe0b778a03c73111bf8cbf426b0b3185a231bbf0b8b132a1a95bc157e827.json b/core/lib/dal/.sqlx/query-21acded689c24b653d149ff169f53b54a1965e100e0949006212f97e6d11a18b.json similarity index 75% rename from core/lib/dal/.sqlx/query-3490fe0b778a03c73111bf8cbf426b0b3185a231bbf0b8b132a1a95bc157e827.json rename to core/lib/dal/.sqlx/query-21acded689c24b653d149ff169f53b54a1965e100e0949006212f97e6d11a18b.json index 3275e94936a1..b613aa8d71b3 100644 --- a/core/lib/dal/.sqlx/query-3490fe0b778a03c73111bf8cbf426b0b3185a231bbf0b8b132a1a95bc157e827.json +++ b/core/lib/dal/.sqlx/query-21acded689c24b653d149ff169f53b54a1965e100e0949006212f97e6d11a18b.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT\n hashed_key,\n l1_batch_number,\n INDEX\n FROM\n initial_writes\n WHERE\n hashed_key = ANY ($1::bytea[])\n ", + "query": "\n SELECT\n hashed_key,\n l1_batch_number,\n index\n FROM\n initial_writes\n WHERE\n hashed_key = ANY($1::bytea [])\n ", "describe": { "columns": [ { @@ -30,5 +30,5 @@ false ] }, - "hash": "3490fe0b778a03c73111bf8cbf426b0b3185a231bbf0b8b132a1a95bc157e827" + "hash": "21acded689c24b653d149ff169f53b54a1965e100e0949006212f97e6d11a18b" } diff --git a/core/lib/dal/.sqlx/query-eab36591af61369e36e3dab79025ac6758a0a4e367f93a9bd48ec82c51e09755.json b/core/lib/dal/.sqlx/query-2234d7728d91cefaee792c900448aafe4b1aa2250fc535bfcdff39172551d42b.json similarity index 81% rename from core/lib/dal/.sqlx/query-eab36591af61369e36e3dab79025ac6758a0a4e367f93a9bd48ec82c51e09755.json rename to core/lib/dal/.sqlx/query-2234d7728d91cefaee792c900448aafe4b1aa2250fc535bfcdff39172551d42b.json index b9783f771a7a..48fa673b2c91 100644 --- a/core/lib/dal/.sqlx/query-eab36591af61369e36e3dab79025ac6758a0a4e367f93a9bd48ec82c51e09755.json +++ b/core/lib/dal/.sqlx/query-2234d7728d91cefaee792c900448aafe4b1aa2250fc535bfcdff39172551d42b.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT\n *\n FROM\n eth_txs\n WHERE\n from_addr IS NOT DISTINCT FROM $2 -- can't just use equality as NULL != NULL\n AND is_gateway = $3\n AND id > (\n SELECT\n COALESCE(MAX(eth_tx_id), 0)\n FROM\n eth_txs_history\n JOIN eth_txs ON eth_txs.id = eth_txs_history.eth_tx_id\n WHERE\n eth_txs_history.sent_at_block IS NOT NULL\n AND eth_txs.from_addr IS NOT DISTINCT FROM $2\n AND is_gateway = $3\n )\n ORDER BY\n id\n LIMIT\n $1\n ", + "query": "\n SELECT\n *\n FROM\n eth_txs\n WHERE\n from_addr IS NOT DISTINCT FROM $2 -- can't just use equality as NULL != NULL\n AND is_gateway = $3\n AND id > (\n SELECT\n COALESCE(MAX(eth_tx_id), 0)\n FROM\n eth_txs_history\n JOIN eth_txs ON eth_txs.id = eth_txs_history.eth_tx_id\n WHERE\n eth_txs_history.sent_at_block IS NOT NULL\n AND eth_txs.from_addr IS NOT DISTINCT FROM $2\n AND is_gateway = $3\n )\n ORDER BY\n id\n LIMIT\n $1\n ", "describe": { "columns": [ { @@ -110,5 +110,5 @@ true ] }, - "hash": "eab36591af61369e36e3dab79025ac6758a0a4e367f93a9bd48ec82c51e09755" + "hash": "2234d7728d91cefaee792c900448aafe4b1aa2250fc535bfcdff39172551d42b" } diff --git a/core/lib/dal/.sqlx/query-c61682ed92c1a43855a991598d593639a63047f46dc8e605ff37b78f43f5cef5.json b/core/lib/dal/.sqlx/query-228aa5ec4c4eb56143823b96a8190ded732839b9f5bf16042205a730fac07c3a.json similarity index 77% rename from core/lib/dal/.sqlx/query-c61682ed92c1a43855a991598d593639a63047f46dc8e605ff37b78f43f5cef5.json rename to core/lib/dal/.sqlx/query-228aa5ec4c4eb56143823b96a8190ded732839b9f5bf16042205a730fac07c3a.json index b797ccb46045..b8d6482ea744 100644 --- a/core/lib/dal/.sqlx/query-c61682ed92c1a43855a991598d593639a63047f46dc8e605ff37b78f43f5cef5.json +++ b/core/lib/dal/.sqlx/query-228aa5ec4c4eb56143823b96a8190ded732839b9f5bf16042205a730fac07c3a.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n UPDATE processed_events\n SET\n next_block_to_process = $3\n WHERE\n TYPE = $1\n AND chain_id = $2\n ", + "query": "\n UPDATE processed_events\n SET\n next_block_to_process = $3\n WHERE\n type = $1\n AND chain_id = $2\n ", "describe": { "columns": [], "parameters": { @@ -22,5 +22,5 @@ }, "nullable": [] }, - "hash": "c61682ed92c1a43855a991598d593639a63047f46dc8e605ff37b78f43f5cef5" + "hash": "228aa5ec4c4eb56143823b96a8190ded732839b9f5bf16042205a730fac07c3a" } diff --git a/core/lib/dal/.sqlx/query-040eaa878c3473f5edc73b77e572b5ea100f59295cd693d14ee0d5ee089c7981.json b/core/lib/dal/.sqlx/query-229db646c85461858689b81d80f5ddbee82a65c00c5740e9017382c57c279b18.json similarity index 63% rename from core/lib/dal/.sqlx/query-040eaa878c3473f5edc73b77e572b5ea100f59295cd693d14ee0d5ee089c7981.json rename to core/lib/dal/.sqlx/query-229db646c85461858689b81d80f5ddbee82a65c00c5740e9017382c57c279b18.json index c0e0c777cc52..3a21023c4da8 100644 --- a/core/lib/dal/.sqlx/query-040eaa878c3473f5edc73b77e572b5ea100f59295cd693d14ee0d5ee089c7981.json +++ b/core/lib/dal/.sqlx/query-229db646c85461858689b81d80f5ddbee82a65c00c5740e9017382c57c279b18.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT\n l1_batch_number\n FROM\n snapshots\n WHERE\n NOT (''::TEXT = ANY (storage_logs_filepaths))\n ORDER BY\n l1_batch_number DESC\n ", + "query": "\n SELECT\n l1_batch_number\n FROM\n snapshots\n WHERE\n NOT (''::TEXT = ANY(storage_logs_filepaths))\n ORDER BY\n l1_batch_number DESC\n ", "describe": { "columns": [ { @@ -16,5 +16,5 @@ false ] }, - "hash": "040eaa878c3473f5edc73b77e572b5ea100f59295cd693d14ee0d5ee089c7981" + "hash": "229db646c85461858689b81d80f5ddbee82a65c00c5740e9017382c57c279b18" } diff --git a/core/lib/dal/.sqlx/query-24722ee4ced7f03e60b1b5ecaaa5234d536b064951a67d826ac49b7a3a095a1a.json b/core/lib/dal/.sqlx/query-24865315c100f495a6e2cefb3b0e84d2fcc5d436e52cc82ed2aba664bde3ee6b.json similarity index 71% rename from core/lib/dal/.sqlx/query-24722ee4ced7f03e60b1b5ecaaa5234d536b064951a67d826ac49b7a3a095a1a.json rename to core/lib/dal/.sqlx/query-24865315c100f495a6e2cefb3b0e84d2fcc5d436e52cc82ed2aba664bde3ee6b.json index 194f4faedb1b..d343cd5a7107 100644 --- a/core/lib/dal/.sqlx/query-24722ee4ced7f03e60b1b5ecaaa5234d536b064951a67d826ac49b7a3a095a1a.json +++ b/core/lib/dal/.sqlx/query-24865315c100f495a6e2cefb3b0e84d2fcc5d436e52cc82ed2aba664bde3ee6b.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT\n hashed_key,\n INDEX\n FROM\n initial_writes\n WHERE\n l1_batch_number = $1\n ORDER BY\n INDEX\n ", + "query": "\n SELECT\n hashed_key,\n index\n FROM\n initial_writes\n WHERE\n l1_batch_number = $1\n ORDER BY\n index\n ", "describe": { "columns": [ { @@ -24,5 +24,5 @@ false ] }, - "hash": "24722ee4ced7f03e60b1b5ecaaa5234d536b064951a67d826ac49b7a3a095a1a" + "hash": "24865315c100f495a6e2cefb3b0e84d2fcc5d436e52cc82ed2aba664bde3ee6b" } diff --git a/core/lib/dal/.sqlx/query-86dbcf93abdd4206d2d62b140cf5dd11537925d02f5a7f2bae23c8dc48204e3f.json b/core/lib/dal/.sqlx/query-2589f98459979f776ce5fd6e3ff94ec52b3eb68c346492a8fed98f20f2a0381d.json similarity index 62% rename from core/lib/dal/.sqlx/query-86dbcf93abdd4206d2d62b140cf5dd11537925d02f5a7f2bae23c8dc48204e3f.json rename to core/lib/dal/.sqlx/query-2589f98459979f776ce5fd6e3ff94ec52b3eb68c346492a8fed98f20f2a0381d.json index 42cf55bd939e..9d8cc36189fc 100644 --- a/core/lib/dal/.sqlx/query-86dbcf93abdd4206d2d62b140cf5dd11537925d02f5a7f2bae23c8dc48204e3f.json +++ b/core/lib/dal/.sqlx/query-2589f98459979f776ce5fd6e3ff94ec52b3eb68c346492a8fed98f20f2a0381d.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT\n proofs.l1_batch_number\n FROM\n tee_proof_generation_details AS proofs\n JOIN tee_verifier_input_producer_jobs AS inputs ON proofs.l1_batch_number = inputs.l1_batch_number\n WHERE\n inputs.status = $1\n AND proofs.status = $2\n ORDER BY\n proofs.l1_batch_number ASC\n LIMIT\n 1\n ", + "query": "\n SELECT\n proofs.l1_batch_number\n FROM\n tee_proof_generation_details AS proofs\n JOIN\n tee_verifier_input_producer_jobs AS inputs\n ON proofs.l1_batch_number = inputs.l1_batch_number\n WHERE\n inputs.status = $1\n AND proofs.status = $2\n ORDER BY\n proofs.l1_batch_number ASC\n LIMIT\n 1\n ", "describe": { "columns": [ { @@ -32,5 +32,5 @@ false ] }, - "hash": "86dbcf93abdd4206d2d62b140cf5dd11537925d02f5a7f2bae23c8dc48204e3f" + "hash": "2589f98459979f776ce5fd6e3ff94ec52b3eb68c346492a8fed98f20f2a0381d" } diff --git a/core/lib/dal/.sqlx/query-25fb31277591dd7d5d783bd8777f1a855e76b37b6ed36ae612b551f9a6a55633.json b/core/lib/dal/.sqlx/query-25fb31277591dd7d5d783bd8777f1a855e76b37b6ed36ae612b551f9a6a55633.json deleted file mode 100644 index ee88bcdf39bd..000000000000 --- a/core/lib/dal/.sqlx/query-25fb31277591dd7d5d783bd8777f1a855e76b37b6ed36ae612b551f9a6a55633.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n protocol_versions (\n id,\n timestamp,\n bootloader_code_hash,\n default_account_code_hash,\n upgrade_tx_hash,\n created_at\n )\n VALUES\n ($1, $2, $3, $4, $5, NOW())\n ON CONFLICT DO NOTHING\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int4", - "Int8", - "Bytea", - "Bytea", - "Bytea" - ] - }, - "nullable": [] - }, - "hash": "25fb31277591dd7d5d783bd8777f1a855e76b37b6ed36ae612b551f9a6a55633" -} diff --git a/core/lib/dal/.sqlx/query-1e3c88b41bc02cb6a116fa930ae85b8b60165ed757ae1044e83fdc877d95cbd8.json b/core/lib/dal/.sqlx/query-2719fa6e4f282535526ef6c3c7c73dcb740d1d2750fe17fb5330e50323b96b49.json similarity index 90% rename from core/lib/dal/.sqlx/query-1e3c88b41bc02cb6a116fa930ae85b8b60165ed757ae1044e83fdc877d95cbd8.json rename to core/lib/dal/.sqlx/query-2719fa6e4f282535526ef6c3c7c73dcb740d1d2750fe17fb5330e50323b96b49.json index 206d2f91e3b1..0fcc6b457003 100644 --- a/core/lib/dal/.sqlx/query-1e3c88b41bc02cb6a116fa930ae85b8b60165ed757ae1044e83fdc877d95cbd8.json +++ b/core/lib/dal/.sqlx/query-2719fa6e4f282535526ef6c3c7c73dcb740d1d2750fe17fb5330e50323b96b49.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::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": [ { @@ -84,5 +84,5 @@ false ] }, - "hash": "1e3c88b41bc02cb6a116fa930ae85b8b60165ed757ae1044e83fdc877d95cbd8" + "hash": "2719fa6e4f282535526ef6c3c7c73dcb740d1d2750fe17fb5330e50323b96b49" } diff --git a/core/lib/dal/.sqlx/query-69c885498b186f3b7cbb215112ec86783d7da0ec1d008680872f3619cf217923.json b/core/lib/dal/.sqlx/query-28c5a9f99af4d2857346e0df73c9b9086ba42bac53629793a42d67b353c30210.json similarity index 60% rename from core/lib/dal/.sqlx/query-69c885498b186f3b7cbb215112ec86783d7da0ec1d008680872f3619cf217923.json rename to core/lib/dal/.sqlx/query-28c5a9f99af4d2857346e0df73c9b9086ba42bac53629793a42d67b353c30210.json index 82575c807fb3..93520d4ded3e 100644 --- a/core/lib/dal/.sqlx/query-69c885498b186f3b7cbb215112ec86783d7da0ec1d008680872f3619cf217923.json +++ b/core/lib/dal/.sqlx/query-28c5a9f99af4d2857346e0df73c9b9086ba42bac53629793a42d67b353c30210.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n DELETE FROM transactions\n WHERE\n hash = ANY ($1)\n ", + "query": "\n DELETE FROM transactions\n WHERE\n hash = ANY($1)\n ", "describe": { "columns": [], "parameters": { @@ -10,5 +10,5 @@ }, "nullable": [] }, - "hash": "69c885498b186f3b7cbb215112ec86783d7da0ec1d008680872f3619cf217923" + "hash": "28c5a9f99af4d2857346e0df73c9b9086ba42bac53629793a42d67b353c30210" } diff --git a/core/lib/dal/.sqlx/query-294005d0b9445cc8b9c8e4ce7453f71664dcb5ebbc35005a18c5251c3d902f62.json b/core/lib/dal/.sqlx/query-294005d0b9445cc8b9c8e4ce7453f71664dcb5ebbc35005a18c5251c3d902f62.json deleted file mode 100644 index e2aeb15b19af..000000000000 --- a/core/lib/dal/.sqlx/query-294005d0b9445cc8b9c8e4ce7453f71664dcb5ebbc35005a18c5251c3d902f62.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n SELECT\n MAX(INDEX) AS \"max?\"\n FROM\n initial_writes\n WHERE\n l1_batch_number = (\n SELECT\n MAX(l1_batch_number) AS \"max?\"\n FROM\n initial_writes\n WHERE\n l1_batch_number <= $1\n )\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "max?", - "type_info": "Int8" - } - ], - "parameters": { - "Left": [ - "Int8" - ] - }, - "nullable": [ - null - ] - }, - "hash": "294005d0b9445cc8b9c8e4ce7453f71664dcb5ebbc35005a18c5251c3d902f62" -} diff --git a/core/lib/dal/.sqlx/query-2a2083fd04ebd006eb0aa4e0e5f62f3339768a85aaff9a509901e9f42b09097b.json b/core/lib/dal/.sqlx/query-2a2083fd04ebd006eb0aa4e0e5f62f3339768a85aaff9a509901e9f42b09097b.json new file mode 100644 index 000000000000..a713616d582c --- /dev/null +++ b/core/lib/dal/.sqlx/query-2a2083fd04ebd006eb0aa4e0e5f62f3339768a85aaff9a509901e9f42b09097b.json @@ -0,0 +1,28 @@ +{ + "db_name": "PostgreSQL", + "query": "\n SELECT\n number,\n pubdata_input\n FROM\n l1_batches\n LEFT JOIN\n data_availability\n ON data_availability.l1_batch_number = l1_batches.number\n WHERE\n eth_commit_tx_id IS NULL\n AND number != 0\n AND data_availability.blob_id IS NULL\n AND pubdata_input IS NOT NULL\n ORDER BY\n number\n LIMIT\n $1\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "number", + "type_info": "Int8" + }, + { + "ordinal": 1, + "name": "pubdata_input", + "type_info": "Bytea" + } + ], + "parameters": { + "Left": [ + "Int8" + ] + }, + "nullable": [ + false, + true + ] + }, + "hash": "2a2083fd04ebd006eb0aa4e0e5f62f3339768a85aaff9a509901e9f42b09097b" +} diff --git a/core/lib/dal/.sqlx/query-2a4bfb1ed34f0d508352a5f3f761eda9057c7fb71b8f0d96f69fda78662ecec5.json b/core/lib/dal/.sqlx/query-2a4bfb1ed34f0d508352a5f3f761eda9057c7fb71b8f0d96f69fda78662ecec5.json new file mode 100644 index 000000000000..7444f11734a8 --- /dev/null +++ b/core/lib/dal/.sqlx/query-2a4bfb1ed34f0d508352a5f3f761eda9057c7fb71b8f0d96f69fda78662ecec5.json @@ -0,0 +1,20 @@ +{ + "db_name": "PostgreSQL", + "query": "\n SELECT\n number\n FROM\n l1_batches\n LEFT JOIN\n eth_txs_history AS commit_tx\n ON (l1_batches.eth_commit_tx_id = commit_tx.eth_tx_id)\n WHERE\n commit_tx.confirmed_at IS NOT NULL\n ORDER BY\n number DESC\n LIMIT\n 1\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "number", + "type_info": "Int8" + } + ], + "parameters": { + "Left": [] + }, + "nullable": [ + false + ] + }, + "hash": "2a4bfb1ed34f0d508352a5f3f761eda9057c7fb71b8f0d96f69fda78662ecec5" +} diff --git a/core/lib/dal/.sqlx/query-2d1e0f2e043c193052c9cc20f9efeb5f094160627bc09db4bda2dda9a8c11c44.json b/core/lib/dal/.sqlx/query-2d1e0f2e043c193052c9cc20f9efeb5f094160627bc09db4bda2dda9a8c11c44.json deleted file mode 100644 index 1d9c276b0786..000000000000 --- a/core/lib/dal/.sqlx/query-2d1e0f2e043c193052c9cc20f9efeb5f094160627bc09db4bda2dda9a8c11c44.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n contracts_verification_info (address, verification_info)\n VALUES\n ($1, $2)\n ON CONFLICT (address) DO\n UPDATE\n SET\n verification_info = $2\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Bytea", - "Jsonb" - ] - }, - "nullable": [] - }, - "hash": "2d1e0f2e043c193052c9cc20f9efeb5f094160627bc09db4bda2dda9a8c11c44" -} diff --git a/core/lib/dal/.sqlx/query-2d467a96fd065137d1038998ae5f8dcb1642688940bc52831498479b250de2b1.json b/core/lib/dal/.sqlx/query-2d467a96fd065137d1038998ae5f8dcb1642688940bc52831498479b250de2b1.json new file mode 100644 index 000000000000..81ae6c590f95 --- /dev/null +++ b/core/lib/dal/.sqlx/query-2d467a96fd065137d1038998ae5f8dcb1642688940bc52831498479b250de2b1.json @@ -0,0 +1,112 @@ +{ + "db_name": "PostgreSQL", + "query": "\n WITH\n mb AS (\n SELECT\n l1_gas_price,\n l2_fair_gas_price,\n fair_pubdata_price\n FROM\n miniblocks\n WHERE\n l1_batch_number = $1\n LIMIT\n 1\n )\n \n SELECT\n l1_batches.number,\n l1_batches.timestamp,\n l1_batches.l1_tx_count,\n l1_batches.l2_tx_count,\n l1_batches.hash AS \"root_hash?\",\n commit_tx.tx_hash AS \"commit_tx_hash?\",\n commit_tx.confirmed_at AS \"committed_at?\",\n prove_tx.tx_hash AS \"prove_tx_hash?\",\n prove_tx.confirmed_at AS \"proven_at?\",\n execute_tx.tx_hash AS \"execute_tx_hash?\",\n execute_tx.confirmed_at AS \"executed_at?\",\n mb.l1_gas_price,\n mb.l2_fair_gas_price,\n mb.fair_pubdata_price,\n l1_batches.bootloader_code_hash,\n l1_batches.default_aa_code_hash\n FROM\n l1_batches\n INNER JOIN mb ON TRUE\n LEFT JOIN eth_txs_history AS commit_tx\n ON (\n l1_batches.eth_commit_tx_id = commit_tx.eth_tx_id\n AND commit_tx.confirmed_at IS NOT NULL\n )\n LEFT JOIN eth_txs_history AS prove_tx\n ON (\n l1_batches.eth_prove_tx_id = prove_tx.eth_tx_id\n AND prove_tx.confirmed_at IS NOT NULL\n )\n LEFT JOIN eth_txs_history AS execute_tx\n ON (\n l1_batches.eth_execute_tx_id = execute_tx.eth_tx_id\n AND execute_tx.confirmed_at IS NOT NULL\n )\n WHERE\n l1_batches.number = $1\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "number", + "type_info": "Int8" + }, + { + "ordinal": 1, + "name": "timestamp", + "type_info": "Int8" + }, + { + "ordinal": 2, + "name": "l1_tx_count", + "type_info": "Int4" + }, + { + "ordinal": 3, + "name": "l2_tx_count", + "type_info": "Int4" + }, + { + "ordinal": 4, + "name": "root_hash?", + "type_info": "Bytea" + }, + { + "ordinal": 5, + "name": "commit_tx_hash?", + "type_info": "Text" + }, + { + "ordinal": 6, + "name": "committed_at?", + "type_info": "Timestamp" + }, + { + "ordinal": 7, + "name": "prove_tx_hash?", + "type_info": "Text" + }, + { + "ordinal": 8, + "name": "proven_at?", + "type_info": "Timestamp" + }, + { + "ordinal": 9, + "name": "execute_tx_hash?", + "type_info": "Text" + }, + { + "ordinal": 10, + "name": "executed_at?", + "type_info": "Timestamp" + }, + { + "ordinal": 11, + "name": "l1_gas_price", + "type_info": "Int8" + }, + { + "ordinal": 12, + "name": "l2_fair_gas_price", + "type_info": "Int8" + }, + { + "ordinal": 13, + "name": "fair_pubdata_price", + "type_info": "Int8" + }, + { + "ordinal": 14, + "name": "bootloader_code_hash", + "type_info": "Bytea" + }, + { + "ordinal": 15, + "name": "default_aa_code_hash", + "type_info": "Bytea" + } + ], + "parameters": { + "Left": [ + "Int8" + ] + }, + "nullable": [ + false, + false, + false, + false, + true, + false, + true, + false, + true, + false, + true, + false, + false, + true, + true, + true + ] + }, + "hash": "2d467a96fd065137d1038998ae5f8dcb1642688940bc52831498479b250de2b1" +} diff --git a/core/lib/dal/.sqlx/query-2d8da95804a7a300ff2b756e6785c0665ee3ea4086ddb91428fa1b6a00760737.json b/core/lib/dal/.sqlx/query-2d8da95804a7a300ff2b756e6785c0665ee3ea4086ddb91428fa1b6a00760737.json deleted file mode 100644 index 8b8cef7dd77e..000000000000 --- a/core/lib/dal/.sqlx/query-2d8da95804a7a300ff2b756e6785c0665ee3ea4086ddb91428fa1b6a00760737.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n SELECT DISTINCT\n ON (hashed_key) hashed_key,\n miniblock_number,\n value\n FROM\n storage_logs\n WHERE\n hashed_key = ANY ($1)\n AND miniblock_number <= $2\n AND miniblock_number <= COALESCE(\n (\n SELECT\n MAX(number)\n FROM\n miniblocks\n ),\n (\n SELECT\n miniblock_number\n FROM\n snapshot_recovery\n )\n )\n ORDER BY\n hashed_key,\n miniblock_number DESC,\n operation_number DESC\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "hashed_key", - "type_info": "Bytea" - }, - { - "ordinal": 1, - "name": "miniblock_number", - "type_info": "Int8" - }, - { - "ordinal": 2, - "name": "value", - "type_info": "Bytea" - } - ], - "parameters": { - "Left": [ - "ByteaArray", - "Int8" - ] - }, - "nullable": [ - false, - false, - false - ] - }, - "hash": "2d8da95804a7a300ff2b756e6785c0665ee3ea4086ddb91428fa1b6a00760737" -} diff --git a/core/lib/dal/.sqlx/query-b7cd7c40282c2ca2287eef93ee79c69a9e494bf1f873291b4ae7bf68b7e3c549.json b/core/lib/dal/.sqlx/query-2dc550a35fb0f0ddb1aded83d54a2e93066a5cffbb3857dfd3c6fe00c307eada.json similarity index 84% rename from core/lib/dal/.sqlx/query-b7cd7c40282c2ca2287eef93ee79c69a9e494bf1f873291b4ae7bf68b7e3c549.json rename to core/lib/dal/.sqlx/query-2dc550a35fb0f0ddb1aded83d54a2e93066a5cffbb3857dfd3c6fe00c307eada.json index ed4744206a48..8bf22e1b6fb7 100644 --- a/core/lib/dal/.sqlx/query-b7cd7c40282c2ca2287eef93ee79c69a9e494bf1f873291b4ae7bf68b7e3c549.json +++ b/core/lib/dal/.sqlx/query-2dc550a35fb0f0ddb1aded83d54a2e93066a5cffbb3857dfd3c6fe00c307eada.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_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": [ { @@ -171,5 +171,5 @@ true ] }, - "hash": "b7cd7c40282c2ca2287eef93ee79c69a9e494bf1f873291b4ae7bf68b7e3c549" + "hash": "2dc550a35fb0f0ddb1aded83d54a2e93066a5cffbb3857dfd3c6fe00c307eada" } diff --git a/core/lib/dal/.sqlx/query-2e5b9ae1b81b0abfe7a962c93b3119a0a60dc9804175b2baf8b45939c74bd583.json b/core/lib/dal/.sqlx/query-2e5b9ae1b81b0abfe7a962c93b3119a0a60dc9804175b2baf8b45939c74bd583.json deleted file mode 100644 index 205487768306..000000000000 --- a/core/lib/dal/.sqlx/query-2e5b9ae1b81b0abfe7a962c93b3119a0a60dc9804175b2baf8b45939c74bd583.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n compiler_versions (VERSION, compiler, created_at, updated_at)\n SELECT\n u.version,\n $2,\n NOW(),\n NOW()\n FROM\n UNNEST($1::TEXT[]) AS u (VERSION)\n ON CONFLICT (VERSION, compiler) DO NOTHING\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "TextArray", - "Text" - ] - }, - "nullable": [] - }, - "hash": "2e5b9ae1b81b0abfe7a962c93b3119a0a60dc9804175b2baf8b45939c74bd583" -} diff --git a/core/lib/dal/.sqlx/query-5d341e334cbc2d38efc8a060325677d57040037da0e07cef2c7b7246851a3703.json b/core/lib/dal/.sqlx/query-2fa2ba4a62f79d780d239409d426b602aa0cf9b0c5b1ef39b7d07d6309454fcd.json similarity index 80% rename from core/lib/dal/.sqlx/query-5d341e334cbc2d38efc8a060325677d57040037da0e07cef2c7b7246851a3703.json rename to core/lib/dal/.sqlx/query-2fa2ba4a62f79d780d239409d426b602aa0cf9b0c5b1ef39b7d07d6309454fcd.json index f0d8b01d57c0..1d515edba819 100644 --- a/core/lib/dal/.sqlx/query-5d341e334cbc2d38efc8a060325677d57040037da0e07cef2c7b7246851a3703.json +++ b/core/lib/dal/.sqlx/query-2fa2ba4a62f79d780d239409d426b602aa0cf9b0c5b1ef39b7d07d6309454fcd.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n UPDATE contract_verification_requests\n SET\n status = 'in_progress',\n attempts = attempts + 1,\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n id = (\n SELECT\n id\n FROM\n contract_verification_requests\n WHERE\n status = 'queued'\n OR (\n status = 'in_progress'\n AND processing_started_at < NOW() - $1::INTERVAL\n )\n ORDER BY\n created_at\n LIMIT\n 1\n FOR UPDATE\n SKIP LOCKED\n )\n RETURNING\n id,\n contract_address,\n source_code,\n contract_name,\n zk_compiler_version,\n compiler_version,\n optimization_used,\n optimizer_mode,\n constructor_arguments,\n is_system,\n force_evmla\n ", + "query": "\n UPDATE contract_verification_requests\n SET\n status = 'in_progress',\n attempts = attempts + 1,\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n id = (\n SELECT\n id\n FROM\n contract_verification_requests\n WHERE\n status = 'queued'\n OR (\n status = 'in_progress'\n AND processing_started_at < NOW() - $1::INTERVAL\n )\n ORDER BY\n created_at\n LIMIT\n 1\n FOR UPDATE\n SKIP LOCKED\n )\n RETURNING\n id,\n contract_address,\n source_code,\n contract_name,\n zk_compiler_version,\n compiler_version,\n optimization_used,\n optimizer_mode,\n constructor_arguments,\n is_system,\n force_evmla\n ", "describe": { "columns": [ { @@ -78,5 +78,5 @@ false ] }, - "hash": "5d341e334cbc2d38efc8a060325677d57040037da0e07cef2c7b7246851a3703" + "hash": "2fa2ba4a62f79d780d239409d426b602aa0cf9b0c5b1ef39b7d07d6309454fcd" } diff --git a/core/lib/dal/.sqlx/query-2506e9edfd4b41ca1e187909631ae942bab5d71daaed7017e3fa62dc5e42ab0a.json b/core/lib/dal/.sqlx/query-2fc088b319ff8f197e50bb379b77de8ba36685dde66d1b3fcf549a52c5001d06.json similarity index 80% rename from core/lib/dal/.sqlx/query-2506e9edfd4b41ca1e187909631ae942bab5d71daaed7017e3fa62dc5e42ab0a.json rename to core/lib/dal/.sqlx/query-2fc088b319ff8f197e50bb379b77de8ba36685dde66d1b3fcf549a52c5001d06.json index c4f8057011d4..679d2ff917d9 100644 --- a/core/lib/dal/.sqlx/query-2506e9edfd4b41ca1e187909631ae942bab5d71daaed7017e3fa62dc5e42ab0a.json +++ b/core/lib/dal/.sqlx/query-2fc088b319ff8f197e50bb379b77de8ba36685dde66d1b3fcf549a52c5001d06.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT\n hashed_key,\n l1_batch_number,\n INDEX\n FROM\n initial_writes\n ", + "query": "\n SELECT\n hashed_key,\n l1_batch_number,\n index\n FROM\n initial_writes\n ", "describe": { "columns": [ { @@ -28,5 +28,5 @@ false ] }, - "hash": "2506e9edfd4b41ca1e187909631ae942bab5d71daaed7017e3fa62dc5e42ab0a" + "hash": "2fc088b319ff8f197e50bb379b77de8ba36685dde66d1b3fcf549a52c5001d06" } diff --git a/core/lib/dal/.sqlx/query-30e5c8710b1611872da06b72ac681aff512b3a9b2587b8e59848345c07dd8f3b.json b/core/lib/dal/.sqlx/query-3010d02e02391732c622a7515e1e494ce1d8e3b6cfb0b897745fb596f283be79.json similarity index 89% rename from core/lib/dal/.sqlx/query-30e5c8710b1611872da06b72ac681aff512b3a9b2587b8e59848345c07dd8f3b.json rename to core/lib/dal/.sqlx/query-3010d02e02391732c622a7515e1e494ce1d8e3b6cfb0b897745fb596f283be79.json index 1ddc86f29a0a..6012c6326515 100644 --- a/core/lib/dal/.sqlx/query-30e5c8710b1611872da06b72ac681aff512b3a9b2587b8e59848345c07dd8f3b.json +++ b/core/lib/dal/.sqlx/query-3010d02e02391732c622a7515e1e494ce1d8e3b6cfb0b897745fb596f283be79.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n UPDATE tee_verifier_input_producer_jobs\n SET\n status = $1,\n updated_at = NOW(),\n time_taken = $3,\n error = $4\n WHERE\n l1_batch_number = $2\n AND status != $5\n RETURNING\n tee_verifier_input_producer_jobs.attempts\n ", + "query": "\n UPDATE tee_verifier_input_producer_jobs\n SET\n status = $1,\n updated_at = NOW(),\n time_taken = $3,\n error = $4\n WHERE\n l1_batch_number = $2\n AND status != $5\n RETURNING\n tee_verifier_input_producer_jobs.attempts\n ", "describe": { "columns": [ { @@ -48,5 +48,5 @@ false ] }, - "hash": "30e5c8710b1611872da06b72ac681aff512b3a9b2587b8e59848345c07dd8f3b" + "hash": "3010d02e02391732c622a7515e1e494ce1d8e3b6cfb0b897745fb596f283be79" } diff --git a/core/lib/dal/.sqlx/query-de255be5d2e5ef215428e9a886e7c9dc036873c60b8b916ce8c446e310447b66.json b/core/lib/dal/.sqlx/query-30268c71e4bd0d08015af6ae130d3ee5d5140714297401b4bde1e950ed6e971e.json similarity index 91% rename from core/lib/dal/.sqlx/query-de255be5d2e5ef215428e9a886e7c9dc036873c60b8b916ce8c446e310447b66.json rename to core/lib/dal/.sqlx/query-30268c71e4bd0d08015af6ae130d3ee5d5140714297401b4bde1e950ed6e971e.json index 8a492376557b..a96d94a5c55f 100644 --- a/core/lib/dal/.sqlx/query-de255be5d2e5ef215428e9a886e7c9dc036873c60b8b916ce8c446e310447b66.json +++ b/core/lib/dal/.sqlx/query-30268c71e4bd0d08015af6ae130d3ee5d5140714297401b4bde1e950ed6e971e.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_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": [ { @@ -166,5 +166,5 @@ true ] }, - "hash": "de255be5d2e5ef215428e9a886e7c9dc036873c60b8b916ce8c446e310447b66" + "hash": "30268c71e4bd0d08015af6ae130d3ee5d5140714297401b4bde1e950ed6e971e" } diff --git a/core/lib/dal/.sqlx/query-307f15e00a97440868189f25e4487ed365c0369f94bc457cb162a5c876a123c7.json b/core/lib/dal/.sqlx/query-307f15e00a97440868189f25e4487ed365c0369f94bc457cb162a5c876a123c7.json deleted file mode 100644 index 6c55bf34eabb..000000000000 --- a/core/lib/dal/.sqlx/query-307f15e00a97440868189f25e4487ed365c0369f94bc457cb162a5c876a123c7.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n commitments (l1_batch_number, events_queue_commitment, bootloader_initial_content_commitment)\n VALUES\n ($1, $2, $3)\n ON CONFLICT (l1_batch_number) DO NOTHING\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8", - "Bytea", - "Bytea" - ] - }, - "nullable": [] - }, - "hash": "307f15e00a97440868189f25e4487ed365c0369f94bc457cb162a5c876a123c7" -} diff --git a/core/lib/dal/.sqlx/query-6c6b8045f9dd7bdb9ada0d71974f28f7b515cf894e63fc95165c9211f71daa36.json b/core/lib/dal/.sqlx/query-30e7d640a731e5c7dccc6d34b94f7116562896314c4d413847854c09c4a14d4e.json similarity index 69% rename from core/lib/dal/.sqlx/query-6c6b8045f9dd7bdb9ada0d71974f28f7b515cf894e63fc95165c9211f71daa36.json rename to core/lib/dal/.sqlx/query-30e7d640a731e5c7dccc6d34b94f7116562896314c4d413847854c09c4a14d4e.json index 1a538831c96f..09e0a9360eea 100644 --- a/core/lib/dal/.sqlx/query-6c6b8045f9dd7bdb9ada0d71974f28f7b515cf894e63fc95165c9211f71daa36.json +++ b/core/lib/dal/.sqlx/query-30e7d640a731e5c7dccc6d34b94f7116562896314c4d413847854c09c4a14d4e.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT\n VERSION,\n l1_batch_number,\n factory_deps_filepath,\n storage_logs_filepaths\n FROM\n snapshots\n WHERE\n l1_batch_number = $1\n ", + "query": "\n SELECT\n VERSION,\n L1_BATCH_NUMBER,\n FACTORY_DEPS_FILEPATH,\n STORAGE_LOGS_FILEPATHS\n FROM\n SNAPSHOTS\n WHERE\n L1_BATCH_NUMBER = $1\n ", "describe": { "columns": [ { @@ -36,5 +36,5 @@ false ] }, - "hash": "6c6b8045f9dd7bdb9ada0d71974f28f7b515cf894e63fc95165c9211f71daa36" + "hash": "30e7d640a731e5c7dccc6d34b94f7116562896314c4d413847854c09c4a14d4e" } diff --git a/core/lib/dal/.sqlx/query-311d0357c22163b893dc91f2b080f2ede5e22b0bbd8bc910cb36a91ed992bde1.json b/core/lib/dal/.sqlx/query-311d0357c22163b893dc91f2b080f2ede5e22b0bbd8bc910cb36a91ed992bde1.json deleted file mode 100644 index cabe0a3dc557..000000000000 --- a/core/lib/dal/.sqlx/query-311d0357c22163b893dc91f2b080f2ede5e22b0bbd8bc910cb36a91ed992bde1.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n l1_batches_consensus (l1_batch_number, certificate, updated_at, created_at)\n VALUES\n ($1, $2, NOW(), NOW())\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8", - "Jsonb" - ] - }, - "nullable": [] - }, - "hash": "311d0357c22163b893dc91f2b080f2ede5e22b0bbd8bc910cb36a91ed992bde1" -} diff --git a/core/lib/dal/.sqlx/query-32e8bdbf16fdd2b7617d7a909c3eee66178533c3c0f51e2bfa9ff201e17e4014.json b/core/lib/dal/.sqlx/query-32e8bdbf16fdd2b7617d7a909c3eee66178533c3c0f51e2bfa9ff201e17e4014.json new file mode 100644 index 000000000000..f2fdebd416cd --- /dev/null +++ b/core/lib/dal/.sqlx/query-32e8bdbf16fdd2b7617d7a909c3eee66178533c3c0f51e2bfa9ff201e17e4014.json @@ -0,0 +1,44 @@ +{ + "db_name": "PostgreSQL", + "query": "\n SELECT\n table_name,\n PG_TABLE_SIZE(\n ('public.' || QUOTE_IDENT(table_name))::regclass\n ) AS table_size,\n PG_INDEXES_SIZE(\n ('public.' || QUOTE_IDENT(table_name))::regclass\n ) AS indexes_size,\n PG_RELATION_SIZE(\n ('public.' || QUOTE_IDENT(table_name))::regclass\n ) AS relation_size,\n PG_TOTAL_RELATION_SIZE(\n ('public.' || QUOTE_IDENT(table_name))::regclass\n ) AS total_size\n FROM\n information_schema.tables\n WHERE\n table_schema = 'public'\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "table_name", + "type_info": "Name" + }, + { + "ordinal": 1, + "name": "table_size", + "type_info": "Int8" + }, + { + "ordinal": 2, + "name": "indexes_size", + "type_info": "Int8" + }, + { + "ordinal": 3, + "name": "relation_size", + "type_info": "Int8" + }, + { + "ordinal": 4, + "name": "total_size", + "type_info": "Int8" + } + ], + "parameters": { + "Left": [] + }, + "nullable": [ + true, + null, + null, + null, + null + ] + }, + "hash": "32e8bdbf16fdd2b7617d7a909c3eee66178533c3c0f51e2bfa9ff201e17e4014" +} diff --git a/core/lib/dal/.sqlx/query-3353dd735addf184732843151dd47e1ed84929bf75bb814ee2280d241912d38f.json b/core/lib/dal/.sqlx/query-3353dd735addf184732843151dd47e1ed84929bf75bb814ee2280d241912d38f.json new file mode 100644 index 000000000000..aea0d7128575 --- /dev/null +++ b/core/lib/dal/.sqlx/query-3353dd735addf184732843151dd47e1ed84929bf75bb814ee2280d241912d38f.json @@ -0,0 +1,15 @@ +{ + "db_name": "PostgreSQL", + "query": "\n INSERT INTO\n l1_batches_consensus_committees (l1_batch_number, attesters, updated_at)\n VALUES\n ($1, $2, NOW())\n ON CONFLICT (l1_batch_number) DO\n UPDATE\n SET\n l1_batch_number = $1,\n attesters = $2,\n updated_at = NOW()\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8", + "Jsonb" + ] + }, + "nullable": [] + }, + "hash": "3353dd735addf184732843151dd47e1ed84929bf75bb814ee2280d241912d38f" +} diff --git a/core/lib/dal/.sqlx/query-33a78184559d0c0d13469fa799e2c5eeab06ff664141fa542229e7c9a46d4410.json b/core/lib/dal/.sqlx/query-33a78184559d0c0d13469fa799e2c5eeab06ff664141fa542229e7c9a46d4410.json deleted file mode 100644 index 6dcc1acfd358..000000000000 --- a/core/lib/dal/.sqlx/query-33a78184559d0c0d13469fa799e2c5eeab06ff664141fa542229e7c9a46d4410.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE transactions\n SET\n hash = data_table.hash,\n signature = data_table.signature,\n gas_limit = data_table.gas_limit,\n max_fee_per_gas = data_table.max_fee_per_gas,\n max_priority_fee_per_gas = data_table.max_priority_fee_per_gas,\n gas_per_pubdata_limit = data_table.gas_per_pubdata_limit,\n input = data_table.input,\n data = data_table.data,\n tx_format = data_table.tx_format,\n miniblock_number = $21,\n index_in_block = data_table.index_in_block,\n error = NULLIF(data_table.error, ''),\n effective_gas_price = data_table.effective_gas_price,\n execution_info = data_table.new_execution_info,\n refunded_gas = data_table.refunded_gas,\n value = data_table.value,\n contract_address = data_table.contract_address,\n paymaster = data_table.paymaster,\n paymaster_input = data_table.paymaster_input,\n in_mempool = FALSE,\n updated_at = NOW()\n FROM\n (\n SELECT\n data_table_temp.*\n FROM\n (\n SELECT\n UNNEST($1::bytea[]) AS initiator_address,\n UNNEST($2::INT[]) AS nonce,\n UNNEST($3::bytea[]) AS hash,\n UNNEST($4::bytea[]) AS signature,\n UNNEST($5::NUMERIC[]) AS gas_limit,\n UNNEST($6::NUMERIC[]) AS max_fee_per_gas,\n UNNEST($7::NUMERIC[]) AS max_priority_fee_per_gas,\n UNNEST($8::NUMERIC[]) AS gas_per_pubdata_limit,\n UNNEST($9::INT[]) AS tx_format,\n UNNEST($10::INTEGER[]) AS index_in_block,\n UNNEST($11::VARCHAR[]) AS error,\n UNNEST($12::NUMERIC[]) AS effective_gas_price,\n UNNEST($13::jsonb[]) AS new_execution_info,\n UNNEST($14::bytea[]) AS input,\n UNNEST($15::jsonb[]) AS data,\n UNNEST($16::BIGINT[]) AS refunded_gas,\n UNNEST($17::NUMERIC[]) AS value,\n UNNEST($18::bytea[]) AS contract_address,\n UNNEST($19::bytea[]) AS paymaster,\n UNNEST($20::bytea[]) AS paymaster_input\n ) AS data_table_temp\n JOIN transactions ON transactions.initiator_address = data_table_temp.initiator_address\n AND transactions.nonce = data_table_temp.nonce\n ORDER BY\n transactions.hash\n ) AS data_table\n WHERE\n transactions.initiator_address = data_table.initiator_address\n AND transactions.nonce = data_table.nonce\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "ByteaArray", - "Int4Array", - "ByteaArray", - "ByteaArray", - "NumericArray", - "NumericArray", - "NumericArray", - "NumericArray", - "Int4Array", - "Int4Array", - "VarcharArray", - "NumericArray", - "JsonbArray", - "ByteaArray", - "JsonbArray", - "Int8Array", - "NumericArray", - "ByteaArray", - "ByteaArray", - "ByteaArray", - "Int8" - ] - }, - "nullable": [] - }, - "hash": "33a78184559d0c0d13469fa799e2c5eeab06ff664141fa542229e7c9a46d4410" -} diff --git a/core/lib/dal/.sqlx/query-8ce0812420fbf35cbbbb0f77f850a54653a5c06c665433718f7ccbbf936f76ca.json b/core/lib/dal/.sqlx/query-33bfa40b6519f05ec2ee8c7a2372b9764b5b4b840573c35b57e011330bd132a3.json similarity index 61% rename from core/lib/dal/.sqlx/query-8ce0812420fbf35cbbbb0f77f850a54653a5c06c665433718f7ccbbf936f76ca.json rename to core/lib/dal/.sqlx/query-33bfa40b6519f05ec2ee8c7a2372b9764b5b4b840573c35b57e011330bd132a3.json index 7ad183d57e56..b17fcff6d61e 100644 --- a/core/lib/dal/.sqlx/query-8ce0812420fbf35cbbbb0f77f850a54653a5c06c665433718f7ccbbf936f76ca.json +++ b/core/lib/dal/.sqlx/query-33bfa40b6519f05ec2ee8c7a2372b9764b5b4b840573c35b57e011330bd132a3.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT\n COUNT(*) AS COUNT\n FROM\n storage_logs\n WHERE\n miniblock_number <= $1\n ", + "query": "\n SELECT\n COUNT(*) AS COUNT\n FROM\n STORAGE_LOGS\n WHERE\n MINIBLOCK_NUMBER <= $1\n ", "describe": { "columns": [ { @@ -18,5 +18,5 @@ null ] }, - "hash": "8ce0812420fbf35cbbbb0f77f850a54653a5c06c665433718f7ccbbf936f76ca" + "hash": "33bfa40b6519f05ec2ee8c7a2372b9764b5b4b840573c35b57e011330bd132a3" } diff --git a/core/lib/dal/.sqlx/query-3518a3e93da8115b54426d72aea0800383e6b73a8b48dc3e589a29a4367cbb5a.json b/core/lib/dal/.sqlx/query-3518a3e93da8115b54426d72aea0800383e6b73a8b48dc3e589a29a4367cbb5a.json deleted file mode 100644 index a2351b5eef86..000000000000 --- a/core/lib/dal/.sqlx/query-3518a3e93da8115b54426d72aea0800383e6b73a8b48dc3e589a29a4367cbb5a.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n call_traces (tx_hash, call_trace)\n SELECT\n u.tx_hash,\n u.call_trace\n FROM\n UNNEST($1::bytea[], $2::bytea[]) AS u (tx_hash, call_trace)\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "ByteaArray", - "ByteaArray" - ] - }, - "nullable": [] - }, - "hash": "3518a3e93da8115b54426d72aea0800383e6b73a8b48dc3e589a29a4367cbb5a" -} diff --git a/core/lib/dal/.sqlx/query-be2c8e525d6867c0d2bd254c73ef1719fd1284af1dbb60ea128550224b52da93.json b/core/lib/dal/.sqlx/query-369f8f652335176ab22ee45fd6f1717e73c5e6b063be3553d82bfecb98334980.json similarity index 79% rename from core/lib/dal/.sqlx/query-be2c8e525d6867c0d2bd254c73ef1719fd1284af1dbb60ea128550224b52da93.json rename to core/lib/dal/.sqlx/query-369f8f652335176ab22ee45fd6f1717e73c5e6b063be3553d82bfecb98334980.json index 21964d27d60a..7245fa3059ed 100644 --- a/core/lib/dal/.sqlx/query-be2c8e525d6867c0d2bd254c73ef1719fd1284af1dbb60ea128550224b52da93.json +++ b/core/lib/dal/.sqlx/query-369f8f652335176ab22ee45fd6f1717e73c5e6b063be3553d82bfecb98334980.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT\n bytecode\n FROM\n (\n SELECT\n *\n FROM\n storage_logs\n WHERE\n storage_logs.hashed_key = $1\n AND storage_logs.miniblock_number <= $2\n ORDER BY\n storage_logs.miniblock_number DESC,\n storage_logs.operation_number DESC\n LIMIT\n 1\n ) t\n JOIN factory_deps ON value = factory_deps.bytecode_hash\n WHERE\n value != $3\n ", + "query": "\n SELECT\n bytecode\n FROM\n (\n SELECT\n *\n FROM\n storage_logs\n WHERE\n storage_logs.hashed_key = $1\n AND storage_logs.miniblock_number <= $2\n ORDER BY\n storage_logs.miniblock_number DESC,\n storage_logs.operation_number DESC\n LIMIT\n 1\n ) t\n JOIN factory_deps ON value = factory_deps.bytecode_hash\n WHERE\n value != $3\n ", "describe": { "columns": [ { @@ -20,5 +20,5 @@ false ] }, - "hash": "be2c8e525d6867c0d2bd254c73ef1719fd1284af1dbb60ea128550224b52da93" + "hash": "369f8f652335176ab22ee45fd6f1717e73c5e6b063be3553d82bfecb98334980" } diff --git a/core/lib/dal/.sqlx/query-37890022be6b5e893cf051266fa16618914d6dedb39a9a40d36484741e8b01f4.json b/core/lib/dal/.sqlx/query-37890022be6b5e893cf051266fa16618914d6dedb39a9a40d36484741e8b01f4.json deleted file mode 100644 index a39a1bdb07b8..000000000000 --- a/core/lib/dal/.sqlx/query-37890022be6b5e893cf051266fa16618914d6dedb39a9a40d36484741e8b01f4.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n tee_attestations (pubkey, attestation)\n VALUES\n ($1, $2)\n ON CONFLICT (pubkey) DO NOTHING\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Bytea", - "Bytea" - ] - }, - "nullable": [] - }, - "hash": "37890022be6b5e893cf051266fa16618914d6dedb39a9a40d36484741e8b01f4" -} diff --git a/core/lib/dal/.sqlx/query-469db79fcf8d692507317080e0d843620210aff3a9a7aa8a249db50c1c56d927.json b/core/lib/dal/.sqlx/query-37b653ba8a544224ef6fb88e073d1e4657024c66a42e1bbc261c92c9e1c79930.json similarity index 60% rename from core/lib/dal/.sqlx/query-469db79fcf8d692507317080e0d843620210aff3a9a7aa8a249db50c1c56d927.json rename to core/lib/dal/.sqlx/query-37b653ba8a544224ef6fb88e073d1e4657024c66a42e1bbc261c92c9e1c79930.json index fe91d27abb11..f4b52c688cb0 100644 --- a/core/lib/dal/.sqlx/query-469db79fcf8d692507317080e0d843620210aff3a9a7aa8a249db50c1c56d927.json +++ b/core/lib/dal/.sqlx/query-37b653ba8a544224ef6fb88e073d1e4657024c66a42e1bbc261c92c9e1c79930.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n UPDATE transactions\n SET\n miniblock_number = $1,\n index_in_block = data_table.index_in_block,\n error = NULLIF(data_table.error, ''),\n in_mempool = FALSE,\n execution_info = execution_info || data_table.new_execution_info,\n refunded_gas = data_table.refunded_gas,\n effective_gas_price = data_table.effective_gas_price,\n updated_at = NOW()\n FROM\n (\n SELECT\n UNNEST($2::bytea[]) AS hash,\n UNNEST($3::INTEGER[]) AS index_in_block,\n UNNEST($4::VARCHAR[]) AS error,\n UNNEST($5::jsonb[]) AS new_execution_info,\n UNNEST($6::BIGINT[]) AS refunded_gas,\n UNNEST($7::NUMERIC[]) AS effective_gas_price\n ) AS data_table\n WHERE\n transactions.hash = data_table.hash\n ", + "query": "\n UPDATE transactions\n SET\n miniblock_number = $1,\n index_in_block = data_table.index_in_block,\n error = NULLIF(data_table.error, ''),\n in_mempool = FALSE,\n execution_info = execution_info || data_table.new_execution_info,\n refunded_gas = data_table.refunded_gas,\n effective_gas_price = data_table.effective_gas_price,\n updated_at = NOW()\n FROM\n (\n SELECT\n UNNEST($2::bytea []) AS hash,\n UNNEST($3::integer []) AS index_in_block,\n UNNEST($4::varchar []) AS error,\n UNNEST($5::jsonb []) AS new_execution_info,\n UNNEST($6::bigint []) AS refunded_gas,\n UNNEST($7::numeric []) AS effective_gas_price\n ) AS data_table\n WHERE\n transactions.hash = data_table.hash\n ", "describe": { "columns": [], "parameters": { @@ -16,5 +16,5 @@ }, "nullable": [] }, - "hash": "469db79fcf8d692507317080e0d843620210aff3a9a7aa8a249db50c1c56d927" + "hash": "37b653ba8a544224ef6fb88e073d1e4657024c66a42e1bbc261c92c9e1c79930" } diff --git a/core/lib/dal/.sqlx/query-3b4d5009ec22f54cc7d305aa11d96ec397767a063dc21aa3add974cb9b070361.json b/core/lib/dal/.sqlx/query-3b4d5009ec22f54cc7d305aa11d96ec397767a063dc21aa3add974cb9b070361.json deleted file mode 100644 index 38890ae58f2e..000000000000 --- a/core/lib/dal/.sqlx/query-3b4d5009ec22f54cc7d305aa11d96ec397767a063dc21aa3add974cb9b070361.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n factory_deps (bytecode_hash, bytecode, miniblock_number, created_at, updated_at)\n SELECT\n u.bytecode_hash,\n u.bytecode,\n $3,\n NOW(),\n NOW()\n FROM\n UNNEST($1::bytea[], $2::bytea[]) AS u (bytecode_hash, bytecode)\n ON CONFLICT (bytecode_hash) DO NOTHING\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "ByteaArray", - "ByteaArray", - "Int8" - ] - }, - "nullable": [] - }, - "hash": "3b4d5009ec22f54cc7d305aa11d96ec397767a063dc21aa3add974cb9b070361" -} diff --git a/core/lib/dal/.sqlx/query-3ddb13ffbafae2374527886e592b3c0210383d8698f6f84f694fece9fd59f3d5.json b/core/lib/dal/.sqlx/query-3ddb13ffbafae2374527886e592b3c0210383d8698f6f84f694fece9fd59f3d5.json deleted file mode 100644 index 5652e186ceb9..000000000000 --- a/core/lib/dal/.sqlx/query-3ddb13ffbafae2374527886e592b3c0210383d8698f6f84f694fece9fd59f3d5.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n protocol_patches (minor, patch, snark_wrapper_vk_hash, created_at)\n VALUES\n ($1, $2, $3, NOW())\n ON CONFLICT DO NOTHING\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int4", - "Int4", - "Bytea" - ] - }, - "nullable": [] - }, - "hash": "3ddb13ffbafae2374527886e592b3c0210383d8698f6f84f694fece9fd59f3d5" -} diff --git a/core/lib/dal/.sqlx/query-26c80e9bafcf7989e7d40c6e424240b34ce29aad3ac6571116e084d45574c448.json b/core/lib/dal/.sqlx/query-3ee6c2a87c65eaece7048da53c9f98ded0ad3e59e6de69c2b13d92d8ab1a07dd.json similarity index 79% rename from core/lib/dal/.sqlx/query-26c80e9bafcf7989e7d40c6e424240b34ce29aad3ac6571116e084d45574c448.json rename to core/lib/dal/.sqlx/query-3ee6c2a87c65eaece7048da53c9f98ded0ad3e59e6de69c2b13d92d8ab1a07dd.json index ee5de53d6e65..e2a808d41f89 100644 --- a/core/lib/dal/.sqlx/query-26c80e9bafcf7989e7d40c6e424240b34ce29aad3ac6571116e084d45574c448.json +++ b/core/lib/dal/.sqlx/query-3ee6c2a87c65eaece7048da53c9f98ded0ad3e59e6de69c2b13d92d8ab1a07dd.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT\n next_block_to_process\n FROM\n processed_events\n WHERE\n TYPE = $1\n AND chain_id = $2\n ", + "query": "\n SELECT\n next_block_to_process\n FROM\n processed_events\n WHERE\n type = $1\n AND chain_id = $2\n ", "describe": { "columns": [ { @@ -29,5 +29,5 @@ false ] }, - "hash": "26c80e9bafcf7989e7d40c6e424240b34ce29aad3ac6571116e084d45574c448" + "hash": "3ee6c2a87c65eaece7048da53c9f98ded0ad3e59e6de69c2b13d92d8ab1a07dd" } diff --git a/core/lib/dal/.sqlx/query-0fede71ed258790cf70d6d6a32dcf9654c06dfef57863281601c947830ad448a.json b/core/lib/dal/.sqlx/query-400457c97449097837d5e31d4476c32170ea4b47051a100f71a41dd6ed9bb1a9.json similarity index 76% rename from core/lib/dal/.sqlx/query-0fede71ed258790cf70d6d6a32dcf9654c06dfef57863281601c947830ad448a.json rename to core/lib/dal/.sqlx/query-400457c97449097837d5e31d4476c32170ea4b47051a100f71a41dd6ed9bb1a9.json index 6a3174958db8..3e64cc5f5b2f 100644 --- a/core/lib/dal/.sqlx/query-0fede71ed258790cf70d6d6a32dcf9654c06dfef57863281601c947830ad448a.json +++ b/core/lib/dal/.sqlx/query-400457c97449097837d5e31d4476c32170ea4b47051a100f71a41dd6ed9bb1a9.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n eth_txs (\n raw_tx,\n nonce,\n tx_type,\n contract_address,\n predicted_gas_cost,\n created_at,\n updated_at,\n from_addr,\n blob_sidecar,\n is_gateway\n )\n VALUES\n ($1, $2, $3, $4, $5, NOW(), NOW(), $6, $7, $8)\n RETURNING\n *\n ", + "query": "\n INSERT INTO\n eth_txs (\n raw_tx,\n nonce,\n tx_type,\n contract_address,\n predicted_gas_cost,\n created_at,\n updated_at,\n from_addr,\n blob_sidecar,\n is_gateway\n )\n VALUES\n ($1, $2, $3, $4, $5, NOW(), NOW(), $6, $7, $8)\n RETURNING\n *\n ", "describe": { "columns": [ { @@ -115,5 +115,5 @@ true ] }, - "hash": "0fede71ed258790cf70d6d6a32dcf9654c06dfef57863281601c947830ad448a" + "hash": "400457c97449097837d5e31d4476c32170ea4b47051a100f71a41dd6ed9bb1a9" } diff --git a/core/lib/dal/.sqlx/query-403b0b1c93f973aedb41aad7700d656e2a26752fa71ae936ff2eb821b0734b61.json b/core/lib/dal/.sqlx/query-403b0b1c93f973aedb41aad7700d656e2a26752fa71ae936ff2eb821b0734b61.json new file mode 100644 index 000000000000..6cb9dec6838c --- /dev/null +++ b/core/lib/dal/.sqlx/query-403b0b1c93f973aedb41aad7700d656e2a26752fa71ae936ff2eb821b0734b61.json @@ -0,0 +1,14 @@ +{ + "db_name": "PostgreSQL", + "query": "\n INSERT INTO\n proof_generation_details (l1_batch_number, status, created_at, updated_at)\n VALUES\n ($1, 'unpicked', NOW(), NOW())\n ON CONFLICT (l1_batch_number) DO NOTHING\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8" + ] + }, + "nullable": [] + }, + "hash": "403b0b1c93f973aedb41aad7700d656e2a26752fa71ae936ff2eb821b0734b61" +} diff --git a/core/lib/dal/.sqlx/query-406e51d7884cdff36632ccf97912484f0a0d76a8097b61ead5f1f20301ce524d.json b/core/lib/dal/.sqlx/query-406e51d7884cdff36632ccf97912484f0a0d76a8097b61ead5f1f20301ce524d.json deleted file mode 100644 index cc3c2a344eb4..000000000000 --- a/core/lib/dal/.sqlx/query-406e51d7884cdff36632ccf97912484f0a0d76a8097b61ead5f1f20301ce524d.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n snapshots (\n VERSION,\n l1_batch_number,\n storage_logs_filepaths,\n factory_deps_filepath,\n created_at,\n updated_at\n )\n VALUES\n ($1, $2, ARRAY_FILL(''::TEXT, ARRAY[$3::INTEGER]), $4, NOW(), NOW())\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int4", - "Int8", - "Int4", - "Text" - ] - }, - "nullable": [] - }, - "hash": "406e51d7884cdff36632ccf97912484f0a0d76a8097b61ead5f1f20301ce524d" -} diff --git a/core/lib/dal/.sqlx/query-40c17194a2089a7d3fa6b7923c9e03def94f4bf4674def1893e2232be80f57a0.json b/core/lib/dal/.sqlx/query-40c17194a2089a7d3fa6b7923c9e03def94f4bf4674def1893e2232be80f57a0.json deleted file mode 100644 index c655704fd842..000000000000 --- a/core/lib/dal/.sqlx/query-40c17194a2089a7d3fa6b7923c9e03def94f4bf4674def1893e2232be80f57a0.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n contract_verification_requests (\n contract_address,\n source_code,\n contract_name,\n zk_compiler_version,\n compiler_version,\n optimization_used,\n optimizer_mode,\n constructor_arguments,\n is_system,\n force_evmla,\n status,\n created_at,\n updated_at\n )\n VALUES\n ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, 'queued', NOW(), NOW())\n RETURNING\n id\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "id", - "type_info": "Int8" - } - ], - "parameters": { - "Left": [ - "Bytea", - "Text", - "Text", - "Text", - "Text", - "Bool", - "Text", - "Bytea", - "Bool", - "Bool" - ] - }, - "nullable": [ - false - ] - }, - "hash": "40c17194a2089a7d3fa6b7923c9e03def94f4bf4674def1893e2232be80f57a0" -} diff --git a/core/lib/dal/.sqlx/query-546c729829083b7eba94fea742c162d717ffcf46fdf5d2ce5d32555353b6da6b.json b/core/lib/dal/.sqlx/query-41b2d575151bff136037d6f1d75f36d50db45560befec6418020b01c55d94a98.json similarity index 52% rename from core/lib/dal/.sqlx/query-546c729829083b7eba94fea742c162d717ffcf46fdf5d2ce5d32555353b6da6b.json rename to core/lib/dal/.sqlx/query-41b2d575151bff136037d6f1d75f36d50db45560befec6418020b01c55d94a98.json index 70b94f739098..f5dccac1a01c 100644 --- a/core/lib/dal/.sqlx/query-546c729829083b7eba94fea742c162d717ffcf46fdf5d2ce5d32555353b6da6b.json +++ b/core/lib/dal/.sqlx/query-41b2d575151bff136037d6f1d75f36d50db45560befec6418020b01c55d94a98.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n UPDATE transactions\n SET\n in_mempool = FALSE\n FROM\n UNNEST($1::bytea[]) AS s (address)\n WHERE\n transactions.in_mempool = TRUE\n AND transactions.initiator_address = s.address\n ", + "query": "\n UPDATE transactions\n SET\n in_mempool = FALSE\n FROM\n UNNEST($1::bytea []) AS s (address)\n WHERE\n transactions.in_mempool = TRUE\n AND transactions.initiator_address = s.address\n ", "describe": { "columns": [], "parameters": { @@ -10,5 +10,5 @@ }, "nullable": [] }, - "hash": "546c729829083b7eba94fea742c162d717ffcf46fdf5d2ce5d32555353b6da6b" + "hash": "41b2d575151bff136037d6f1d75f36d50db45560befec6418020b01c55d94a98" } diff --git a/core/lib/dal/.sqlx/query-8b9e5d525c026de97c0a732b1adc8dc4bd57e32dfefe1017acba9a15fc14b895.json b/core/lib/dal/.sqlx/query-442212bb5f28f234cd624f2acc27944b2acedce201da4454aadb79f3545713ae.json similarity index 61% rename from core/lib/dal/.sqlx/query-8b9e5d525c026de97c0a732b1adc8dc4bd57e32dfefe1017acba9a15fc14b895.json rename to core/lib/dal/.sqlx/query-442212bb5f28f234cd624f2acc27944b2acedce201da4454aadb79f3545713ae.json index de369bccec54..621295d4ab81 100644 --- a/core/lib/dal/.sqlx/query-8b9e5d525c026de97c0a732b1adc8dc4bd57e32dfefe1017acba9a15fc14b895.json +++ b/core/lib/dal/.sqlx/query-442212bb5f28f234cd624f2acc27944b2acedce201da4454aadb79f3545713ae.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT\n storage_logs.hashed_key,\n storage_logs.value,\n initial_writes.index\n FROM\n storage_logs\n INNER JOIN initial_writes ON storage_logs.hashed_key = initial_writes.hashed_key\n WHERE\n storage_logs.miniblock_number = $1\n AND storage_logs.hashed_key >= $2::bytea\n AND storage_logs.hashed_key <= $3::bytea\n ORDER BY\n storage_logs.hashed_key\n ", + "query": "\n SELECT\n storage_logs.hashed_key,\n storage_logs.value,\n initial_writes.index\n FROM\n storage_logs\n INNER JOIN initial_writes ON storage_logs.hashed_key = initial_writes.hashed_key\n WHERE\n storage_logs.miniblock_number = $1\n AND storage_logs.hashed_key >= $2::bytea\n AND storage_logs.hashed_key <= $3::bytea\n ORDER BY\n storage_logs.hashed_key\n ", "describe": { "columns": [ { @@ -32,5 +32,5 @@ false ] }, - "hash": "8b9e5d525c026de97c0a732b1adc8dc4bd57e32dfefe1017acba9a15fc14b895" + "hash": "442212bb5f28f234cd624f2acc27944b2acedce201da4454aadb79f3545713ae" } diff --git a/core/lib/dal/.sqlx/query-45a968c6d667b13bbe9d895e7734fc05eaa158a6f38a87187d7f2c2068a0112a.json b/core/lib/dal/.sqlx/query-45a968c6d667b13bbe9d895e7734fc05eaa158a6f38a87187d7f2c2068a0112a.json deleted file mode 100644 index 36da129b5b77..000000000000 --- a/core/lib/dal/.sqlx/query-45a968c6d667b13bbe9d895e7734fc05eaa158a6f38a87187d7f2c2068a0112a.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n eth_txs_history (\n eth_tx_id,\n base_fee_per_gas,\n priority_fee_per_gas,\n tx_hash,\n signed_raw_tx,\n created_at,\n updated_at,\n blob_base_fee_per_gas,\n sent_at_block,\n sent_at\n )\n VALUES\n ($1, $2, $3, $4, $5, NOW(), NOW(), $6, $7, NOW())\n ON CONFLICT (tx_hash) DO NOTHING\n RETURNING\n id\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "id", - "type_info": "Int4" - } - ], - "parameters": { - "Left": [ - "Int4", - "Int8", - "Int8", - "Text", - "Bytea", - "Int8", - "Int4" - ] - }, - "nullable": [ - false - ] - }, - "hash": "45a968c6d667b13bbe9d895e7734fc05eaa158a6f38a87187d7f2c2068a0112a" -} diff --git a/core/lib/dal/.sqlx/query-ada54322a28012b1b761f3631c4cd6ca26aa2fa565fcf208b6985f461c1868f2.json b/core/lib/dal/.sqlx/query-497e1c08e8460be6e838a47dada8375d56609cd6b7f425361acfd0a411dc48bd.json similarity index 77% rename from core/lib/dal/.sqlx/query-ada54322a28012b1b761f3631c4cd6ca26aa2fa565fcf208b6985f461c1868f2.json rename to core/lib/dal/.sqlx/query-497e1c08e8460be6e838a47dada8375d56609cd6b7f425361acfd0a411dc48bd.json index 04fde45469fa..4a47d5b560ad 100644 --- a/core/lib/dal/.sqlx/query-ada54322a28012b1b761f3631c4cd6ca26aa2fa565fcf208b6985f461c1868f2.json +++ b/core/lib/dal/.sqlx/query-497e1c08e8460be6e838a47dada8375d56609cd6b7f425361acfd0a411dc48bd.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n UPDATE eth_txs_history\n SET\n updated_at = NOW(),\n confirmed_at = NOW()\n WHERE\n tx_hash = $1\n RETURNING\n id,\n eth_tx_id\n ", + "query": "\n UPDATE eth_txs_history\n SET\n updated_at = NOW(),\n confirmed_at = NOW()\n WHERE\n tx_hash = $1\n RETURNING\n id,\n eth_tx_id\n ", "describe": { "columns": [ { @@ -24,5 +24,5 @@ false ] }, - "hash": "ada54322a28012b1b761f3631c4cd6ca26aa2fa565fcf208b6985f461c1868f2" + "hash": "497e1c08e8460be6e838a47dada8375d56609cd6b7f425361acfd0a411dc48bd" } diff --git a/core/lib/dal/.sqlx/query-03e00f422f991f8f12aad0083e1c42cfea253a182ca5df143a183cd522ecac33.json b/core/lib/dal/.sqlx/query-499571f0484f4a54541450f935853bb67bd12f2b635af783897f9d2a4f4ead2e.json similarity index 81% rename from core/lib/dal/.sqlx/query-03e00f422f991f8f12aad0083e1c42cfea253a182ca5df143a183cd522ecac33.json rename to core/lib/dal/.sqlx/query-499571f0484f4a54541450f935853bb67bd12f2b635af783897f9d2a4f4ead2e.json index 12498582adaa..ddc3772a1a5c 100644 --- a/core/lib/dal/.sqlx/query-03e00f422f991f8f12aad0083e1c42cfea253a182ca5df143a183cd522ecac33.json +++ b/core/lib/dal/.sqlx/query-499571f0484f4a54541450f935853bb67bd12f2b635af783897f9d2a4f4ead2e.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n UPDATE transactions\n SET\n l1_batch_number = NULL,\n miniblock_number = NULL,\n error = NULL,\n index_in_block = NULL,\n execution_info = '{}'\n WHERE\n miniblock_number > $1\n RETURNING\n hash\n ", + "query": "\n UPDATE transactions\n SET\n l1_batch_number = NULL,\n miniblock_number = NULL,\n error = NULL,\n index_in_block = NULL,\n execution_info = '{}'\n WHERE\n miniblock_number > $1\n RETURNING\n hash\n ", "describe": { "columns": [ { @@ -18,5 +18,5 @@ false ] }, - "hash": "03e00f422f991f8f12aad0083e1c42cfea253a182ca5df143a183cd522ecac33" + "hash": "499571f0484f4a54541450f935853bb67bd12f2b635af783897f9d2a4f4ead2e" } diff --git a/core/lib/dal/.sqlx/query-4b6fdc5021c536e622373dca8729250962832a0d95d0d82bdd56271d6a07e497.json b/core/lib/dal/.sqlx/query-4b6fdc5021c536e622373dca8729250962832a0d95d0d82bdd56271d6a07e497.json new file mode 100644 index 000000000000..e4dfb7298a79 --- /dev/null +++ b/core/lib/dal/.sqlx/query-4b6fdc5021c536e622373dca8729250962832a0d95d0d82bdd56271d6a07e497.json @@ -0,0 +1,15 @@ +{ + "db_name": "PostgreSQL", + "query": "\n INSERT INTO\n miniblocks_consensus (number, certificate)\n VALUES\n ($1, $2)\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8", + "Jsonb" + ] + }, + "nullable": [] + }, + "hash": "4b6fdc5021c536e622373dca8729250962832a0d95d0d82bdd56271d6a07e497" +} diff --git a/core/lib/dal/.sqlx/query-38dea171e4c49f54bf1db5ac9bfb3be9cf3928755be5f5fcfcdc086e73fb15e2.json b/core/lib/dal/.sqlx/query-4ef330359df85ad6e0110a068ef3afa9cf50eafc7ac542975edea9bd592ce862.json similarity index 90% rename from core/lib/dal/.sqlx/query-38dea171e4c49f54bf1db5ac9bfb3be9cf3928755be5f5fcfcdc086e73fb15e2.json rename to core/lib/dal/.sqlx/query-4ef330359df85ad6e0110a068ef3afa9cf50eafc7ac542975edea9bd592ce862.json index 7ac6785d8e64..10e2a76618f6 100644 --- a/core/lib/dal/.sqlx/query-38dea171e4c49f54bf1db5ac9bfb3be9cf3928755be5f5fcfcdc086e73fb15e2.json +++ b/core/lib/dal/.sqlx/query-4ef330359df85ad6e0110a068ef3afa9cf50eafc7ac542975edea9bd592ce862.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_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": [ { @@ -168,5 +168,5 @@ true ] }, - "hash": "38dea171e4c49f54bf1db5ac9bfb3be9cf3928755be5f5fcfcdc086e73fb15e2" + "hash": "4ef330359df85ad6e0110a068ef3afa9cf50eafc7ac542975edea9bd592ce862" } diff --git a/core/lib/dal/.sqlx/query-5017fb273e532be3a093d682d916aaa0430eeeb48c19ec3eabe78996baa9b140.json b/core/lib/dal/.sqlx/query-5017fb273e532be3a093d682d916aaa0430eeeb48c19ec3eabe78996baa9b140.json new file mode 100644 index 000000000000..42fd4087a1fe --- /dev/null +++ b/core/lib/dal/.sqlx/query-5017fb273e532be3a093d682d916aaa0430eeeb48c19ec3eabe78996baa9b140.json @@ -0,0 +1,28 @@ +{ + "db_name": "PostgreSQL", + "query": "\n INSERT INTO\n eth_txs_history (\n eth_tx_id,\n base_fee_per_gas,\n priority_fee_per_gas,\n tx_hash,\n signed_raw_tx,\n created_at,\n updated_at,\n blob_base_fee_per_gas,\n sent_at_block,\n sent_at\n )\n VALUES\n ($1, $2, $3, $4, $5, NOW(), NOW(), $6, $7, NOW())\n ON CONFLICT (tx_hash) DO NOTHING\n RETURNING\n id\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "id", + "type_info": "Int4" + } + ], + "parameters": { + "Left": [ + "Int4", + "Int8", + "Int8", + "Text", + "Bytea", + "Int8", + "Int4" + ] + }, + "nullable": [ + false + ] + }, + "hash": "5017fb273e532be3a093d682d916aaa0430eeeb48c19ec3eabe78996baa9b140" +} diff --git a/core/lib/dal/.sqlx/query-e073cfdc7a00559994ce04eca15f35d55901fb1e6805f23413ea43e3637540a0.json b/core/lib/dal/.sqlx/query-50687903977b973d72acac96b08880eef9af91f5b4fcaebb7beb3a415d4b231d.json similarity index 85% rename from core/lib/dal/.sqlx/query-e073cfdc7a00559994ce04eca15f35d55901fb1e6805f23413ea43e3637540a0.json rename to core/lib/dal/.sqlx/query-50687903977b973d72acac96b08880eef9af91f5b4fcaebb7beb3a415d4b231d.json index 929e4de8c1b3..e58a0ec88213 100644 --- a/core/lib/dal/.sqlx/query-e073cfdc7a00559994ce04eca15f35d55901fb1e6805f23413ea43e3637540a0.json +++ b/core/lib/dal/.sqlx/query-50687903977b973d72acac96b08880eef9af91f5b4fcaebb7beb3a415d4b231d.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT\n bytecode,\n bytecode_hash\n FROM\n factory_deps\n WHERE\n bytecode_hash = ANY ($1)\n ", + "query": "\n SELECT\n bytecode,\n bytecode_hash\n FROM\n factory_deps\n WHERE\n bytecode_hash = ANY($1)\n ", "describe": { "columns": [ { @@ -24,5 +24,5 @@ false ] }, - "hash": "e073cfdc7a00559994ce04eca15f35d55901fb1e6805f23413ea43e3637540a0" + "hash": "50687903977b973d72acac96b08880eef9af91f5b4fcaebb7beb3a415d4b231d" } diff --git a/core/lib/dal/.sqlx/query-5137159db7d3ff456e368e6246b07554ce738a2d7005472e7e76a64a8fbd57ad.json b/core/lib/dal/.sqlx/query-5137159db7d3ff456e368e6246b07554ce738a2d7005472e7e76a64a8fbd57ad.json deleted file mode 100644 index 07ef0aba074d..000000000000 --- a/core/lib/dal/.sqlx/query-5137159db7d3ff456e368e6246b07554ce738a2d7005472e7e76a64a8fbd57ad.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n proof_generation_details (l1_batch_number, status, created_at, updated_at)\n VALUES\n ($1, 'unpicked', NOW(), NOW())\n ON CONFLICT (l1_batch_number) DO NOTHING\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8" - ] - }, - "nullable": [] - }, - "hash": "5137159db7d3ff456e368e6246b07554ce738a2d7005472e7e76a64a8fbd57ad" -} diff --git a/core/lib/dal/.sqlx/query-05b0050aa9d2944542abbcef31af3fe8d35800340d1c6e9d02c15226b699c93b.json b/core/lib/dal/.sqlx/query-5250341acd42582e41570b6d7e380ae6c8a26f425429116a62892be84c2ff9fb.json similarity index 91% rename from core/lib/dal/.sqlx/query-05b0050aa9d2944542abbcef31af3fe8d35800340d1c6e9d02c15226b699c93b.json rename to core/lib/dal/.sqlx/query-5250341acd42582e41570b6d7e380ae6c8a26f425429116a62892be84c2ff9fb.json index b577e7535eb0..93d522f5fb73 100644 --- a/core/lib/dal/.sqlx/query-05b0050aa9d2944542abbcef31af3fe8d35800340d1c6e9d02c15226b699c93b.json +++ b/core/lib/dal/.sqlx/query-5250341acd42582e41570b6d7e380ae6c8a26f425429116a62892be84c2ff9fb.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_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 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": [ { @@ -168,5 +168,5 @@ true ] }, - "hash": "05b0050aa9d2944542abbcef31af3fe8d35800340d1c6e9d02c15226b699c93b" + "hash": "5250341acd42582e41570b6d7e380ae6c8a26f425429116a62892be84c2ff9fb" } diff --git a/core/lib/dal/.sqlx/query-8903ba5db3f87851c12da133573b4207b69cc48b4ba648e797211631be612b69.json b/core/lib/dal/.sqlx/query-5730de5e37535cf126667b89da6e3a2976d6c4fd581e66dd27439ae42a04b7f5.json similarity index 66% rename from core/lib/dal/.sqlx/query-8903ba5db3f87851c12da133573b4207b69cc48b4ba648e797211631be612b69.json rename to core/lib/dal/.sqlx/query-5730de5e37535cf126667b89da6e3a2976d6c4fd581e66dd27439ae42a04b7f5.json index 3d47a756f3e6..275191d04f54 100644 --- a/core/lib/dal/.sqlx/query-8903ba5db3f87851c12da133573b4207b69cc48b4ba648e797211631be612b69.json +++ b/core/lib/dal/.sqlx/query-5730de5e37535cf126667b89da6e3a2976d6c4fd581e66dd27439ae42a04b7f5.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT\n bytecode_hash,\n bytecode\n FROM\n factory_deps\n INNER JOIN miniblocks ON miniblocks.number = factory_deps.miniblock_number\n WHERE\n miniblocks.l1_batch_number = $1\n ", + "query": "\n SELECT\n bytecode_hash,\n bytecode\n FROM\n factory_deps\n INNER JOIN miniblocks ON miniblocks.number = factory_deps.miniblock_number\n WHERE\n miniblocks.l1_batch_number = $1\n ", "describe": { "columns": [ { @@ -24,5 +24,5 @@ false ] }, - "hash": "8903ba5db3f87851c12da133573b4207b69cc48b4ba648e797211631be612b69" + "hash": "5730de5e37535cf126667b89da6e3a2976d6c4fd581e66dd27439ae42a04b7f5" } diff --git a/core/lib/dal/.sqlx/query-57851c16dce02999bf386e549791b74555863b0cc8281ef2e9c830fa1d38e227.json b/core/lib/dal/.sqlx/query-57851c16dce02999bf386e549791b74555863b0cc8281ef2e9c830fa1d38e227.json new file mode 100644 index 000000000000..f08a75e5800f --- /dev/null +++ b/core/lib/dal/.sqlx/query-57851c16dce02999bf386e549791b74555863b0cc8281ef2e9c830fa1d38e227.json @@ -0,0 +1,16 @@ +{ + "db_name": "PostgreSQL", + "query": "\n INSERT INTO\n tee_proof_generation_details (\n l1_batch_number, tee_type, status, created_at, updated_at\n )\n VALUES\n ($1, $2, $3, NOW(), NOW())\n ON CONFLICT (l1_batch_number, tee_type) DO NOTHING\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8", + "Text", + "Text" + ] + }, + "nullable": [] + }, + "hash": "57851c16dce02999bf386e549791b74555863b0cc8281ef2e9c830fa1d38e227" +} diff --git a/core/lib/dal/.sqlx/query-2d862097cfae49a1fb28ec0a05176085385c3a79d72f49669b4215a9454323c2.json b/core/lib/dal/.sqlx/query-5b25851e01f30307391412ced12ee7053fe3ba7ec852cfb43b249eed9af8209b.json similarity index 58% rename from core/lib/dal/.sqlx/query-2d862097cfae49a1fb28ec0a05176085385c3a79d72f49669b4215a9454323c2.json rename to core/lib/dal/.sqlx/query-5b25851e01f30307391412ced12ee7053fe3ba7ec852cfb43b249eed9af8209b.json index e08f0c855175..02b638851db4 100644 --- a/core/lib/dal/.sqlx/query-2d862097cfae49a1fb28ec0a05176085385c3a79d72f49669b4215a9454323c2.json +++ b/core/lib/dal/.sqlx/query-5b25851e01f30307391412ced12ee7053fe3ba7ec852cfb43b249eed9af8209b.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT\n INDEX\n FROM\n initial_writes\n WHERE\n l1_batch_number <= $1\n ORDER BY\n l1_batch_number DESC,\n INDEX DESC\n LIMIT\n 1;\n ", + "query": "\n SELECT\n INDEX\n FROM\n INITIAL_WRITES\n WHERE\n L1_BATCH_NUMBER <= $1\n ORDER BY\n L1_BATCH_NUMBER DESC,\n INDEX DESC\n LIMIT\n 1;\n ", "describe": { "columns": [ { @@ -18,5 +18,5 @@ false ] }, - "hash": "2d862097cfae49a1fb28ec0a05176085385c3a79d72f49669b4215a9454323c2" + "hash": "5b25851e01f30307391412ced12ee7053fe3ba7ec852cfb43b249eed9af8209b" } diff --git a/core/lib/dal/.sqlx/query-5dba5f8b178decfd77db0ca4f415e94ad6bdd84c31e4b2e0c629e51857533974.json b/core/lib/dal/.sqlx/query-5dba5f8b178decfd77db0ca4f415e94ad6bdd84c31e4b2e0c629e51857533974.json new file mode 100644 index 000000000000..c2d9fe2e1ac5 --- /dev/null +++ b/core/lib/dal/.sqlx/query-5dba5f8b178decfd77db0ca4f415e94ad6bdd84c31e4b2e0c629e51857533974.json @@ -0,0 +1,23 @@ +{ + "db_name": "PostgreSQL", + "query": "\n WITH\n available_batches AS (\n SELECT\n MAX(number) AS \"last_batch\"\n FROM\n l1_batches\n ),\n \n processed_batches AS (\n SELECT\n COALESCE(MAX(l1_batch_number), $1) + $2 AS \"last_ready_batch\"\n FROM\n vm_runner_bwip\n WHERE\n time_taken IS NOT NULL\n )\n \n SELECT\n LEAST(last_batch, last_ready_batch) AS \"last_ready_batch!\"\n FROM\n available_batches\n FULL JOIN processed_batches ON TRUE\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "last_ready_batch!", + "type_info": "Int8" + } + ], + "parameters": { + "Left": [ + "Int8", + "Int8" + ] + }, + "nullable": [ + true + ] + }, + "hash": "5dba5f8b178decfd77db0ca4f415e94ad6bdd84c31e4b2e0c629e51857533974" +} diff --git a/core/lib/dal/.sqlx/query-5d1f588b2b652105b4452be1cc6c7573fe040d47d17d9bd4e2a2b6d3131a4f9c.json b/core/lib/dal/.sqlx/query-6083e429948c139e36cfce2c5ed41edf3965f7ce67341d957ec680a18a0c39ea.json similarity index 57% rename from core/lib/dal/.sqlx/query-5d1f588b2b652105b4452be1cc6c7573fe040d47d17d9bd4e2a2b6d3131a4f9c.json rename to core/lib/dal/.sqlx/query-6083e429948c139e36cfce2c5ed41edf3965f7ce67341d957ec680a18a0c39ea.json index 8d566e0c6cf2..c6760a336dc6 100644 --- a/core/lib/dal/.sqlx/query-5d1f588b2b652105b4452be1cc6c7573fe040d47d17d9bd4e2a2b6d3131a4f9c.json +++ b/core/lib/dal/.sqlx/query-6083e429948c139e36cfce2c5ed41edf3965f7ce67341d957ec680a18a0c39ea.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n UPDATE transactions\n SET\n l1_batch_number = $3,\n l1_batch_tx_index = data_table.l1_batch_tx_index,\n updated_at = NOW()\n FROM\n (\n SELECT\n UNNEST($1::INT[]) AS l1_batch_tx_index,\n UNNEST($2::bytea[]) AS hash\n ) AS data_table\n WHERE\n transactions.hash = data_table.hash\n ", + "query": "\n UPDATE transactions\n SET\n l1_batch_number = $3,\n l1_batch_tx_index = data_table.l1_batch_tx_index,\n updated_at = NOW()\n FROM\n (\n SELECT\n UNNEST($1::INT []) AS l1_batch_tx_index,\n UNNEST($2::BYTEA []) AS hash\n ) AS data_table\n WHERE\n transactions.hash = data_table.hash\n ", "describe": { "columns": [], "parameters": { @@ -12,5 +12,5 @@ }, "nullable": [] }, - "hash": "5d1f588b2b652105b4452be1cc6c7573fe040d47d17d9bd4e2a2b6d3131a4f9c" + "hash": "6083e429948c139e36cfce2c5ed41edf3965f7ce67341d957ec680a18a0c39ea" } diff --git a/core/lib/dal/.sqlx/query-52bb6de515e1edf4dcf34a31600edb31cfd855014dfca5041833b9d5d9f7a55e.json b/core/lib/dal/.sqlx/query-60e68195b375775fc8bc293f6a053681759272f74c47836d34e0ee6de1f639f7.json similarity index 94% rename from core/lib/dal/.sqlx/query-52bb6de515e1edf4dcf34a31600edb31cfd855014dfca5041833b9d5d9f7a55e.json rename to core/lib/dal/.sqlx/query-60e68195b375775fc8bc293f6a053681759272f74c47836d34e0ee6de1f639f7.json index b872e2ce6297..a9eae0bd01dc 100644 --- a/core/lib/dal/.sqlx/query-52bb6de515e1edf4dcf34a31600edb31cfd855014dfca5041833b9d5d9f7a55e.json +++ b/core/lib/dal/.sqlx/query-60e68195b375775fc8bc293f6a053681759272f74c47836d34e0ee6de1f639f7.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_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 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": [ { @@ -168,5 +168,5 @@ true ] }, - "hash": "52bb6de515e1edf4dcf34a31600edb31cfd855014dfca5041833b9d5d9f7a55e" + "hash": "60e68195b375775fc8bc293f6a053681759272f74c47836d34e0ee6de1f639f7" } diff --git a/core/lib/dal/.sqlx/query-6179c3c1a0b2aeb01c0527f6ca4d0651174fd63cf6a8950fa6e7c4838ac5abbf.json b/core/lib/dal/.sqlx/query-6179c3c1a0b2aeb01c0527f6ca4d0651174fd63cf6a8950fa6e7c4838ac5abbf.json deleted file mode 100644 index 443dbf36ea16..000000000000 --- a/core/lib/dal/.sqlx/query-6179c3c1a0b2aeb01c0527f6ca4d0651174fd63cf6a8950fa6e7c4838ac5abbf.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n pruning_log (\n pruned_l1_batch,\n pruned_miniblock,\n TYPE,\n created_at,\n updated_at\n )\n VALUES\n ($1, $2, $3, NOW(), NOW())\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8", - "Int8", - { - "Custom": { - "name": "prune_type", - "kind": { - "Enum": [ - "Soft", - "Hard" - ] - } - } - } - ] - }, - "nullable": [] - }, - "hash": "6179c3c1a0b2aeb01c0527f6ca4d0651174fd63cf6a8950fa6e7c4838ac5abbf" -} diff --git a/core/lib/dal/.sqlx/query-718d29517c100ad9d258a7ee90c48449c1c4bed4d0236fcedc177c9478e72262.json b/core/lib/dal/.sqlx/query-6307b42717586a13ac8bc30fc3e5aea6710351dea1f1e57d73447476c3fcd199.json similarity index 57% rename from core/lib/dal/.sqlx/query-718d29517c100ad9d258a7ee90c48449c1c4bed4d0236fcedc177c9478e72262.json rename to core/lib/dal/.sqlx/query-6307b42717586a13ac8bc30fc3e5aea6710351dea1f1e57d73447476c3fcd199.json index 4e523efe3fc8..01ede1d8643a 100644 --- a/core/lib/dal/.sqlx/query-718d29517c100ad9d258a7ee90c48449c1c4bed4d0236fcedc177c9478e72262.json +++ b/core/lib/dal/.sqlx/query-6307b42717586a13ac8bc30fc3e5aea6710351dea1f1e57d73447476c3fcd199.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n tee_verifier_input_producer_jobs (l1_batch_number, status, created_at, updated_at)\n VALUES\n ($1, $2, NOW(), NOW())\n ON CONFLICT (l1_batch_number) DO NOTHING\n ", + "query": "\n INSERT INTO\n tee_verifier_input_producer_jobs (\n l1_batch_number, status, created_at, updated_at\n )\n VALUES\n ($1, $2, NOW(), NOW())\n ON CONFLICT (l1_batch_number) DO NOTHING\n ", "describe": { "columns": [], "parameters": { @@ -24,5 +24,5 @@ }, "nullable": [] }, - "hash": "718d29517c100ad9d258a7ee90c48449c1c4bed4d0236fcedc177c9478e72262" + "hash": "6307b42717586a13ac8bc30fc3e5aea6710351dea1f1e57d73447476c3fcd199" } diff --git a/core/lib/dal/.sqlx/query-66510caa7683ed90729cb545ac8528f012c2ecaebf6622ca1ae481045604e58d.json b/core/lib/dal/.sqlx/query-66510caa7683ed90729cb545ac8528f012c2ecaebf6622ca1ae481045604e58d.json deleted file mode 100644 index 76900667a9c9..000000000000 --- a/core/lib/dal/.sqlx/query-66510caa7683ed90729cb545ac8528f012c2ecaebf6622ca1ae481045604e58d.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n snapshot_recovery (\n l1_batch_number,\n l1_batch_timestamp,\n l1_batch_root_hash,\n miniblock_number,\n miniblock_timestamp,\n miniblock_hash,\n protocol_version,\n storage_logs_chunks_processed,\n updated_at,\n created_at\n )\n VALUES\n ($1, $2, $3, $4, $5, $6, $7, $8, NOW(), NOW())\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8", - "Int8", - "Bytea", - "Int8", - "Int8", - "Bytea", - "Int4", - "BoolArray" - ] - }, - "nullable": [] - }, - "hash": "66510caa7683ed90729cb545ac8528f012c2ecaebf6622ca1ae481045604e58d" -} diff --git a/core/lib/dal/.sqlx/query-66b3f476cf4487239190175d2940fd5e1330393d8b04c7cf03b8c7ab2edad5d1.json b/core/lib/dal/.sqlx/query-66b3f476cf4487239190175d2940fd5e1330393d8b04c7cf03b8c7ab2edad5d1.json deleted file mode 100644 index 0cf4a1e32005..000000000000 --- a/core/lib/dal/.sqlx/query-66b3f476cf4487239190175d2940fd5e1330393d8b04c7cf03b8c7ab2edad5d1.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n transactions (\n hash,\n is_priority,\n initiator_address,\n gas_limit,\n max_fee_per_gas,\n gas_per_pubdata_limit,\n data,\n upgrade_id,\n contract_address,\n l1_block_number,\n value,\n paymaster,\n paymaster_input,\n tx_format,\n l1_tx_mint,\n l1_tx_refund_recipient,\n miniblock_number,\n index_in_block,\n error,\n execution_info,\n refunded_gas,\n effective_gas_price,\n received_at,\n created_at,\n updated_at\n )\n SELECT\n data_table.hash,\n TRUE,\n data_table.initiator_address,\n data_table.gas_limit,\n data_table.max_fee_per_gas,\n data_table.gas_per_pubdata_limit,\n data_table.data,\n data_table.upgrade_id,\n data_table.contract_address,\n data_table.l1_block_number,\n data_table.value,\n '\\x0000000000000000000000000000000000000000'::bytea,\n '\\x'::bytea,\n data_table.tx_format,\n data_table.l1_tx_mint,\n data_table.l1_tx_refund_recipient,\n $19,\n data_table.index_in_block,\n NULLIF(data_table.error, ''),\n data_table.execution_info,\n data_table.refunded_gas,\n data_table.effective_gas_price,\n NOW(),\n NOW(),\n NOW()\n FROM\n (\n SELECT\n UNNEST($1::BYTEA[]) AS hash,\n UNNEST($2::BYTEA[]) AS initiator_address,\n UNNEST($3::NUMERIC[]) AS gas_limit,\n UNNEST($4::NUMERIC[]) AS max_fee_per_gas,\n UNNEST($5::NUMERIC[]) AS gas_per_pubdata_limit,\n UNNEST($6::JSONB[]) AS data,\n UNNEST($7::INT[]) AS upgrade_id,\n UNNEST($8::BYTEA[]) AS contract_address,\n UNNEST($9::INT[]) AS l1_block_number,\n UNNEST($10::NUMERIC[]) AS value,\n UNNEST($11::INTEGER[]) AS tx_format,\n UNNEST($12::NUMERIC[]) AS l1_tx_mint,\n UNNEST($13::BYTEA[]) AS l1_tx_refund_recipient,\n UNNEST($14::INT[]) AS index_in_block,\n UNNEST($15::VARCHAR[]) AS error,\n UNNEST($16::JSONB[]) AS execution_info,\n UNNEST($17::BIGINT[]) AS refunded_gas,\n UNNEST($18::NUMERIC[]) AS effective_gas_price\n ) AS data_table\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "ByteaArray", - "ByteaArray", - "NumericArray", - "NumericArray", - "NumericArray", - "JsonbArray", - "Int4Array", - "ByteaArray", - "Int4Array", - "NumericArray", - "Int4Array", - "NumericArray", - "ByteaArray", - "Int4Array", - "VarcharArray", - "JsonbArray", - "Int8Array", - "NumericArray", - "Int8" - ] - }, - "nullable": [] - }, - "hash": "66b3f476cf4487239190175d2940fd5e1330393d8b04c7cf03b8c7ab2edad5d1" -} diff --git a/core/lib/dal/.sqlx/query-68327709a740a09b198770ec1746bd6ec3a1cd9db6187e99af40ca8fea4c6ace.json b/core/lib/dal/.sqlx/query-68327709a740a09b198770ec1746bd6ec3a1cd9db6187e99af40ca8fea4c6ace.json new file mode 100644 index 000000000000..5d34e780b68f --- /dev/null +++ b/core/lib/dal/.sqlx/query-68327709a740a09b198770ec1746bd6ec3a1cd9db6187e99af40ca8fea4c6ace.json @@ -0,0 +1,35 @@ +{ + "db_name": "PostgreSQL", + "query": "\n SELECT DISTINCT\n ON (hashed_key)\n hashed_key,\n miniblock_number,\n value\n FROM\n storage_logs\n WHERE\n hashed_key = ANY($1)\n AND miniblock_number <= $2\n AND miniblock_number <= COALESCE(\n (\n SELECT\n MAX(number)\n FROM\n miniblocks\n ),\n (\n SELECT\n miniblock_number\n FROM\n snapshot_recovery\n )\n )\n ORDER BY\n hashed_key,\n miniblock_number DESC,\n operation_number DESC\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "hashed_key", + "type_info": "Bytea" + }, + { + "ordinal": 1, + "name": "miniblock_number", + "type_info": "Int8" + }, + { + "ordinal": 2, + "name": "value", + "type_info": "Bytea" + } + ], + "parameters": { + "Left": [ + "ByteaArray", + "Int8" + ] + }, + "nullable": [ + false, + false, + false + ] + }, + "hash": "68327709a740a09b198770ec1746bd6ec3a1cd9db6187e99af40ca8fea4c6ace" +} diff --git a/core/lib/dal/.sqlx/query-b42fc86726ac40d0ca38640884da192a143f6a7501b7da65bb7df40a0a4ead70.json b/core/lib/dal/.sqlx/query-6da05c9ac3d0f30b856177e28d28aaad910ca46830c470f8fc1d4265f9ed8631.json similarity index 76% rename from core/lib/dal/.sqlx/query-b42fc86726ac40d0ca38640884da192a143f6a7501b7da65bb7df40a0a4ead70.json rename to core/lib/dal/.sqlx/query-6da05c9ac3d0f30b856177e28d28aaad910ca46830c470f8fc1d4265f9ed8631.json index 625fa4ab36e6..b246c1e9f3a5 100644 --- a/core/lib/dal/.sqlx/query-b42fc86726ac40d0ca38640884da192a143f6a7501b7da65bb7df40a0a4ead70.json +++ b/core/lib/dal/.sqlx/query-6da05c9ac3d0f30b856177e28d28aaad910ca46830c470f8fc1d4265f9ed8631.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n DELETE FROM snapshots\n WHERE\n l1_batch_number > $1\n RETURNING\n VERSION,\n l1_batch_number,\n factory_deps_filepath,\n storage_logs_filepaths\n ", + "query": "\n DELETE FROM snapshots\n WHERE\n l1_batch_number > $1\n RETURNING\n version,\n l1_batch_number,\n factory_deps_filepath,\n storage_logs_filepaths\n ", "describe": { "columns": [ { @@ -36,5 +36,5 @@ false ] }, - "hash": "b42fc86726ac40d0ca38640884da192a143f6a7501b7da65bb7df40a0a4ead70" + "hash": "6da05c9ac3d0f30b856177e28d28aaad910ca46830c470f8fc1d4265f9ed8631" } diff --git a/core/lib/dal/.sqlx/query-6e725f38a8f04ca5516ba3128569973527841e234d8b4635fb337e4b659b7f71.json b/core/lib/dal/.sqlx/query-6e725f38a8f04ca5516ba3128569973527841e234d8b4635fb337e4b659b7f71.json new file mode 100644 index 000000000000..3a773579b240 --- /dev/null +++ b/core/lib/dal/.sqlx/query-6e725f38a8f04ca5516ba3128569973527841e234d8b4635fb337e4b659b7f71.json @@ -0,0 +1,15 @@ +{ + "db_name": "PostgreSQL", + "query": "\n INSERT INTO\n tee_attestations (pubkey, attestation)\n VALUES\n ($1, $2)\n ON CONFLICT (pubkey) DO NOTHING\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Bytea", + "Bytea" + ] + }, + "nullable": [] + }, + "hash": "6e725f38a8f04ca5516ba3128569973527841e234d8b4635fb337e4b659b7f71" +} diff --git a/core/lib/dal/.sqlx/query-6e3a3ef443ce8aab55b10eea55f9c8ff11775885aebaf457075c6825305244e5.json b/core/lib/dal/.sqlx/query-6f4463a2f95fec4f8b511d28566babfb146e9932d4142139a49599c4bdbd659f.json similarity index 68% rename from core/lib/dal/.sqlx/query-6e3a3ef443ce8aab55b10eea55f9c8ff11775885aebaf457075c6825305244e5.json rename to core/lib/dal/.sqlx/query-6f4463a2f95fec4f8b511d28566babfb146e9932d4142139a49599c4bdbd659f.json index de474897307a..ef514ba7905b 100644 --- a/core/lib/dal/.sqlx/query-6e3a3ef443ce8aab55b10eea55f9c8ff11775885aebaf457075c6825305244e5.json +++ b/core/lib/dal/.sqlx/query-6f4463a2f95fec4f8b511d28566babfb146e9932d4142139a49599c4bdbd659f.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT\n transactions.is_priority,\n transactions.initiator_address,\n transactions.gas_limit,\n transactions.gas_per_pubdata_limit,\n transactions.received_at,\n miniblocks.number AS \"miniblock_number?\",\n transactions.error,\n transactions.effective_gas_price,\n transactions.refunded_gas,\n commit_tx.tx_hash AS \"eth_commit_tx_hash?\",\n prove_tx.tx_hash AS \"eth_prove_tx_hash?\",\n execute_tx.tx_hash AS \"eth_execute_tx_hash?\"\n FROM\n transactions\n LEFT JOIN miniblocks ON miniblocks.number = transactions.miniblock_number\n LEFT JOIN l1_batches ON l1_batches.number = miniblocks.l1_batch_number\n LEFT JOIN eth_txs_history AS commit_tx ON (\n l1_batches.eth_commit_tx_id = commit_tx.eth_tx_id\n AND commit_tx.confirmed_at IS NOT NULL\n )\n LEFT JOIN eth_txs_history AS prove_tx ON (\n l1_batches.eth_prove_tx_id = prove_tx.eth_tx_id\n AND prove_tx.confirmed_at IS NOT NULL\n )\n LEFT JOIN eth_txs_history AS execute_tx ON (\n l1_batches.eth_execute_tx_id = execute_tx.eth_tx_id\n AND execute_tx.confirmed_at IS NOT NULL\n )\n WHERE\n transactions.hash = $1\n AND transactions.data != '{}'::jsonb\n ", + "query": "\n SELECT\n transactions.is_priority,\n transactions.initiator_address,\n transactions.gas_limit,\n transactions.gas_per_pubdata_limit,\n transactions.received_at,\n miniblocks.number AS \"miniblock_number?\",\n transactions.error,\n transactions.effective_gas_price,\n transactions.refunded_gas,\n commit_tx.tx_hash AS \"eth_commit_tx_hash?\",\n prove_tx.tx_hash AS \"eth_prove_tx_hash?\",\n execute_tx.tx_hash AS \"eth_execute_tx_hash?\"\n FROM\n transactions\n LEFT JOIN miniblocks ON miniblocks.number = transactions.miniblock_number\n LEFT JOIN l1_batches ON l1_batches.number = miniblocks.l1_batch_number\n LEFT JOIN eth_txs_history AS commit_tx\n ON (\n l1_batches.eth_commit_tx_id = commit_tx.eth_tx_id\n AND commit_tx.confirmed_at IS NOT NULL\n )\n LEFT JOIN eth_txs_history AS prove_tx\n ON (\n l1_batches.eth_prove_tx_id = prove_tx.eth_tx_id\n AND prove_tx.confirmed_at IS NOT NULL\n )\n LEFT JOIN eth_txs_history AS execute_tx\n ON (\n l1_batches.eth_execute_tx_id = execute_tx.eth_tx_id\n AND execute_tx.confirmed_at IS NOT NULL\n )\n WHERE\n transactions.hash = $1\n AND transactions.data != '{}'::jsonb\n ", "describe": { "columns": [ { @@ -84,5 +84,5 @@ false ] }, - "hash": "6e3a3ef443ce8aab55b10eea55f9c8ff11775885aebaf457075c6825305244e5" + "hash": "6f4463a2f95fec4f8b511d28566babfb146e9932d4142139a49599c4bdbd659f" } diff --git a/core/lib/dal/.sqlx/query-7204d08f6fb83c83c09eb2942ecb671fa559dfdb29b315b17ae2f86533d247e9.json b/core/lib/dal/.sqlx/query-7204d08f6fb83c83c09eb2942ecb671fa559dfdb29b315b17ae2f86533d247e9.json new file mode 100644 index 000000000000..01adb17775c3 --- /dev/null +++ b/core/lib/dal/.sqlx/query-7204d08f6fb83c83c09eb2942ecb671fa559dfdb29b315b17ae2f86533d247e9.json @@ -0,0 +1,16 @@ +{ + "db_name": "PostgreSQL", + "query": "\n INSERT INTO\n protocol_patches (minor, patch, snark_wrapper_vk_hash, created_at)\n VALUES\n ($1, $2, $3, NOW())\n ON CONFLICT DO NOTHING\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int4", + "Int4", + "Bytea" + ] + }, + "nullable": [] + }, + "hash": "7204d08f6fb83c83c09eb2942ecb671fa559dfdb29b315b17ae2f86533d247e9" +} diff --git a/core/lib/dal/.sqlx/query-6171f2d631f69dba52cd913742a46bd1b7b9269375f11f050099cb6d3c1427aa.json b/core/lib/dal/.sqlx/query-7235e50f9ce4b5c4f6f8325117eaccc7108538405743fe1ad71451d0f1842561.json similarity index 67% rename from core/lib/dal/.sqlx/query-6171f2d631f69dba52cd913742a46bd1b7b9269375f11f050099cb6d3c1427aa.json rename to core/lib/dal/.sqlx/query-7235e50f9ce4b5c4f6f8325117eaccc7108538405743fe1ad71451d0f1842561.json index 84ff845b0d01..f46674b08bc6 100644 --- a/core/lib/dal/.sqlx/query-6171f2d631f69dba52cd913742a46bd1b7b9269375f11f050099cb6d3c1427aa.json +++ b/core/lib/dal/.sqlx/query-7235e50f9ce4b5c4f6f8325117eaccc7108538405743fe1ad71451d0f1842561.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT\n transactions.hash AS tx_hash,\n transactions.index_in_block AS tx_index_in_block,\n call_trace\n FROM\n call_traces\n INNER JOIN transactions ON tx_hash = transactions.hash\n WHERE\n transactions.miniblock_number = $1\n ORDER BY\n transactions.index_in_block\n ", + "query": "\n SELECT\n transactions.hash AS tx_hash,\n transactions.index_in_block AS tx_index_in_block,\n call_trace\n FROM\n call_traces\n INNER JOIN transactions ON tx_hash = transactions.hash\n WHERE\n transactions.miniblock_number = $1\n ORDER BY\n transactions.index_in_block\n ", "describe": { "columns": [ { @@ -30,5 +30,5 @@ false ] }, - "hash": "6171f2d631f69dba52cd913742a46bd1b7b9269375f11f050099cb6d3c1427aa" + "hash": "7235e50f9ce4b5c4f6f8325117eaccc7108538405743fe1ad71451d0f1842561" } diff --git a/core/lib/dal/.sqlx/query-dac29d7eb16782713acb7aa68aaa8b12b67678e983dc2570be28fe9b1e016c28.json b/core/lib/dal/.sqlx/query-7f3ca3f1d0b3414575e71af98b810ff145ac2f388a246b9c7b32193e2d4208dd.json similarity index 62% rename from core/lib/dal/.sqlx/query-dac29d7eb16782713acb7aa68aaa8b12b67678e983dc2570be28fe9b1e016c28.json rename to core/lib/dal/.sqlx/query-7f3ca3f1d0b3414575e71af98b810ff145ac2f388a246b9c7b32193e2d4208dd.json index c0258c12311b..830e43b00ed3 100644 --- a/core/lib/dal/.sqlx/query-dac29d7eb16782713acb7aa68aaa8b12b67678e983dc2570be28fe9b1e016c28.json +++ b/core/lib/dal/.sqlx/query-7f3ca3f1d0b3414575e71af98b810ff145ac2f388a246b9c7b32193e2d4208dd.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n DELETE FROM call_traces\n WHERE\n tx_hash = ANY ($1)\n ", + "query": "\n DELETE FROM call_traces\n WHERE\n tx_hash = ANY($1)\n ", "describe": { "columns": [], "parameters": { @@ -10,5 +10,5 @@ }, "nullable": [] }, - "hash": "dac29d7eb16782713acb7aa68aaa8b12b67678e983dc2570be28fe9b1e016c28" + "hash": "7f3ca3f1d0b3414575e71af98b810ff145ac2f388a246b9c7b32193e2d4208dd" } diff --git a/core/lib/dal/.sqlx/query-a71a87d91dcf0f624dbd64eb8828f65ff83204ebab2ea31847ae305a098823b0.json b/core/lib/dal/.sqlx/query-868bfdc5d8ee5eab395fa690891751dfd285628a75a35b152bccb3c73e9cc057.json similarity index 83% rename from core/lib/dal/.sqlx/query-a71a87d91dcf0f624dbd64eb8828f65ff83204ebab2ea31847ae305a098823b0.json rename to core/lib/dal/.sqlx/query-868bfdc5d8ee5eab395fa690891751dfd285628a75a35b152bccb3c73e9cc057.json index 272f20e5268a..c2e662ef376e 100644 --- a/core/lib/dal/.sqlx/query-a71a87d91dcf0f624dbd64eb8828f65ff83204ebab2ea31847ae305a098823b0.json +++ b/core/lib/dal/.sqlx/query-868bfdc5d8ee5eab395fa690891751dfd285628a75a35b152bccb3c73e9cc057.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT\n *\n FROM\n eth_txs\n WHERE\n from_addr IS NOT DISTINCT FROM $1 -- can't just use equality as NULL != NULL\n AND confirmed_eth_tx_history_id IS NULL\n AND is_gateway = $2\n AND id <= (\n SELECT\n COALESCE(MAX(eth_tx_id), 0)\n FROM\n eth_txs_history\n JOIN eth_txs ON eth_txs.id = eth_txs_history.eth_tx_id\n WHERE\n eth_txs_history.sent_at_block IS NOT NULL\n AND eth_txs.from_addr IS NOT DISTINCT FROM $1\n AND is_gateway = $2\n )\n ORDER BY\n id\n ", + "query": "\n SELECT\n *\n FROM\n eth_txs\n WHERE\n from_addr IS NOT DISTINCT FROM $1 -- can't just use equality as NULL != NULL\n AND confirmed_eth_tx_history_id IS NULL\n AND is_gateway = $2\n AND id <= (\n SELECT\n COALESCE(MAX(eth_tx_id), 0)\n FROM\n eth_txs_history\n JOIN eth_txs ON eth_txs.id = eth_txs_history.eth_tx_id\n WHERE\n eth_txs_history.sent_at_block IS NOT NULL\n AND eth_txs.from_addr IS NOT DISTINCT FROM $1\n AND is_gateway = $2\n )\n ORDER BY\n id\n ", "describe": { "columns": [ { @@ -109,5 +109,5 @@ true ] }, - "hash": "a71a87d91dcf0f624dbd64eb8828f65ff83204ebab2ea31847ae305a098823b0" + "hash": "868bfdc5d8ee5eab395fa690891751dfd285628a75a35b152bccb3c73e9cc057" } diff --git a/core/lib/dal/.sqlx/query-cb0a9f6137fb6bee5d17d644714b3b22ea2cd184932fcd59f5931239c7a78003.json b/core/lib/dal/.sqlx/query-87e968b1ef6b95203b5d1e41ddf73be52d97128642d8528535975f8dea798e6c.json similarity index 85% rename from core/lib/dal/.sqlx/query-cb0a9f6137fb6bee5d17d644714b3b22ea2cd184932fcd59f5931239c7a78003.json rename to core/lib/dal/.sqlx/query-87e968b1ef6b95203b5d1e41ddf73be52d97128642d8528535975f8dea798e6c.json index d2da8dff92c8..1211bea560b0 100644 --- a/core/lib/dal/.sqlx/query-cb0a9f6137fb6bee5d17d644714b3b22ea2cd184932fcd59f5931239c7a78003.json +++ b/core/lib/dal/.sqlx/query-87e968b1ef6b95203b5d1e41ddf73be52d97128642d8528535975f8dea798e6c.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT\n eth_txs_history.*,\n eth_txs.blob_sidecar\n FROM\n eth_txs_history\n LEFT JOIN eth_txs ON eth_tx_id = eth_txs.id\n WHERE\n eth_tx_id = $1\n ORDER BY\n eth_txs_history.created_at DESC\n ", + "query": "\n SELECT\n eth_txs_history.*,\n eth_txs.blob_sidecar\n FROM\n eth_txs_history\n LEFT JOIN eth_txs ON eth_tx_id = eth_txs.id\n WHERE\n eth_tx_id = $1\n ORDER BY\n eth_txs_history.created_at DESC\n ", "describe": { "columns": [ { @@ -90,5 +90,5 @@ true ] }, - "hash": "cb0a9f6137fb6bee5d17d644714b3b22ea2cd184932fcd59f5931239c7a78003" + "hash": "87e968b1ef6b95203b5d1e41ddf73be52d97128642d8528535975f8dea798e6c" } diff --git a/core/lib/dal/.sqlx/query-2cba440c2925631655a7f67486a5a8869da8f10738ba77e3d8e048057b0e7b12.json b/core/lib/dal/.sqlx/query-8ab1634beba74aaef952562a3bcc84b0dd496700a61569929dcc7602ec678b09.json similarity index 70% rename from core/lib/dal/.sqlx/query-2cba440c2925631655a7f67486a5a8869da8f10738ba77e3d8e048057b0e7b12.json rename to core/lib/dal/.sqlx/query-8ab1634beba74aaef952562a3bcc84b0dd496700a61569929dcc7602ec678b09.json index b01a5b41649b..5869c1d37a04 100644 --- a/core/lib/dal/.sqlx/query-2cba440c2925631655a7f67486a5a8869da8f10738ba77e3d8e048057b0e7b12.json +++ b/core/lib/dal/.sqlx/query-8ab1634beba74aaef952562a3bcc84b0dd496700a61569929dcc7602ec678b09.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT\n factory_deps.bytecode,\n transactions.data AS \"data?\",\n transactions.contract_address AS \"contract_address?\"\n FROM\n (\n SELECT\n miniblock_number,\n tx_hash,\n topic3\n FROM\n events\n WHERE\n address = $1\n AND topic1 = $2\n AND topic4 = $3\n LIMIT\n 1\n ) deploy_event\n JOIN factory_deps ON factory_deps.bytecode_hash = deploy_event.topic3\n LEFT JOIN transactions ON transactions.hash = deploy_event.tx_hash\n WHERE\n deploy_event.miniblock_number <= (\n SELECT\n MAX(number)\n FROM\n miniblocks\n )\n ", + "query": "\n SELECT\n factory_deps.bytecode,\n transactions.data AS \"data?\",\n transactions.contract_address AS \"contract_address?\"\n FROM\n (\n SELECT\n miniblock_number,\n tx_hash,\n topic3\n FROM\n events\n WHERE\n address = $1\n AND topic1 = $2\n AND topic4 = $3\n LIMIT\n 1\n ) deploy_event\n JOIN factory_deps ON factory_deps.bytecode_hash = deploy_event.topic3\n LEFT JOIN transactions ON transactions.hash = deploy_event.tx_hash\n WHERE\n deploy_event.miniblock_number <= (\n SELECT\n MAX(number)\n FROM\n miniblocks\n )\n ", "describe": { "columns": [ { @@ -32,5 +32,5 @@ true ] }, - "hash": "2cba440c2925631655a7f67486a5a8869da8f10738ba77e3d8e048057b0e7b12" + "hash": "8ab1634beba74aaef952562a3bcc84b0dd496700a61569929dcc7602ec678b09" } diff --git a/core/lib/dal/.sqlx/query-526a8e1c231e99faadd5dbbe9c49ed811faffcc108d04b59fdec5a0ab9d13fa3.json b/core/lib/dal/.sqlx/query-8dd9596258c4e9eeb9178b32ffefaf767e790a54957218de908c7144658b4681.json similarity index 83% rename from core/lib/dal/.sqlx/query-526a8e1c231e99faadd5dbbe9c49ed811faffcc108d04b59fdec5a0ab9d13fa3.json rename to core/lib/dal/.sqlx/query-8dd9596258c4e9eeb9178b32ffefaf767e790a54957218de908c7144658b4681.json index dbdec4ac5d65..151d2ece97f4 100644 --- a/core/lib/dal/.sqlx/query-526a8e1c231e99faadd5dbbe9c49ed811faffcc108d04b59fdec5a0ab9d13fa3.json +++ b/core/lib/dal/.sqlx/query-8dd9596258c4e9eeb9178b32ffefaf767e790a54957218de908c7144658b4681.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT\n address,\n topic1,\n topic2,\n topic3,\n topic4,\n value,\n NULL::bytea AS \"block_hash\",\n NULL::BIGINT AS \"l1_batch_number?\",\n miniblock_number,\n tx_hash,\n tx_index_in_block,\n event_index_in_block,\n event_index_in_tx,\n NULL::BIGINT AS \"block_timestamp?\"\n FROM\n events\n WHERE\n tx_hash = ANY ($1)\n ORDER BY\n miniblock_number ASC,\n event_index_in_block ASC\n ", + "query": "\n SELECT\n address,\n topic1,\n topic2,\n topic3,\n topic4,\n value,\n NULL::bytea AS \"block_hash\",\n NULL::bigint AS \"l1_batch_number?\",\n miniblock_number,\n tx_hash,\n tx_index_in_block,\n event_index_in_block,\n event_index_in_tx,\n NULL::bigint AS \"block_timestamp?\"\n FROM\n events\n WHERE\n tx_hash = ANY($1)\n ORDER BY\n miniblock_number ASC,\n event_index_in_block ASC\n ", "describe": { "columns": [ { @@ -96,5 +96,5 @@ null ] }, - "hash": "526a8e1c231e99faadd5dbbe9c49ed811faffcc108d04b59fdec5a0ab9d13fa3" + "hash": "8dd9596258c4e9eeb9178b32ffefaf767e790a54957218de908c7144658b4681" } diff --git a/core/lib/dal/.sqlx/query-41c9f45d6eb727aafad0d8c18024cee5c602d275bb812022cc8fdabf0a60e151.json b/core/lib/dal/.sqlx/query-8de8fd9aa54e2285a14daf95af18c5de2c9f8f3cf22d0f1145ae67879039e28d.json similarity index 77% rename from core/lib/dal/.sqlx/query-41c9f45d6eb727aafad0d8c18024cee5c602d275bb812022cc8fdabf0a60e151.json rename to core/lib/dal/.sqlx/query-8de8fd9aa54e2285a14daf95af18c5de2c9f8f3cf22d0f1145ae67879039e28d.json index 8c51c26131bd..36ecf511a9ae 100644 --- a/core/lib/dal/.sqlx/query-41c9f45d6eb727aafad0d8c18024cee5c602d275bb812022cc8fdabf0a60e151.json +++ b/core/lib/dal/.sqlx/query-8de8fd9aa54e2285a14daf95af18c5de2c9f8f3cf22d0f1145ae67879039e28d.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT\n eth_txs_history.id,\n eth_txs_history.eth_tx_id,\n eth_txs_history.tx_hash,\n eth_txs_history.base_fee_per_gas,\n eth_txs_history.priority_fee_per_gas,\n eth_txs_history.signed_raw_tx,\n eth_txs.nonce\n FROM\n eth_txs_history\n JOIN eth_txs ON eth_txs.id = eth_txs_history.eth_tx_id\n WHERE\n eth_txs_history.sent_at_block IS NULL\n AND eth_txs.confirmed_eth_tx_history_id IS NULL\n ORDER BY\n eth_txs_history.id DESC\n ", + "query": "\n SELECT\n eth_txs_history.id,\n eth_txs_history.eth_tx_id,\n eth_txs_history.tx_hash,\n eth_txs_history.base_fee_per_gas,\n eth_txs_history.priority_fee_per_gas,\n eth_txs_history.signed_raw_tx,\n eth_txs.nonce\n FROM\n eth_txs_history\n JOIN eth_txs ON eth_txs.id = eth_txs_history.eth_tx_id\n WHERE\n eth_txs_history.sent_at_block IS NULL\n AND eth_txs.confirmed_eth_tx_history_id IS NULL\n ORDER BY\n eth_txs_history.id DESC\n ", "describe": { "columns": [ { @@ -52,5 +52,5 @@ false ] }, - "hash": "41c9f45d6eb727aafad0d8c18024cee5c602d275bb812022cc8fdabf0a60e151" + "hash": "8de8fd9aa54e2285a14daf95af18c5de2c9f8f3cf22d0f1145ae67879039e28d" } diff --git a/core/lib/dal/.sqlx/query-928139bf23bd0d57b8dbdb3283b139300ad3b80ac9e70c00864c3d9f6521b028.json b/core/lib/dal/.sqlx/query-928139bf23bd0d57b8dbdb3283b139300ad3b80ac9e70c00864c3d9f6521b028.json deleted file mode 100644 index e192763b189b..000000000000 --- a/core/lib/dal/.sqlx/query-928139bf23bd0d57b8dbdb3283b139300ad3b80ac9e70c00864c3d9f6521b028.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n SELECT\n number,\n pubdata_input\n FROM\n l1_batches\n LEFT JOIN data_availability ON data_availability.l1_batch_number = l1_batches.number\n WHERE\n eth_commit_tx_id IS NULL\n AND number != 0\n AND data_availability.blob_id IS NULL\n AND pubdata_input IS NOT NULL\n ORDER BY\n number\n LIMIT\n $1\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "number", - "type_info": "Int8" - }, - { - "ordinal": 1, - "name": "pubdata_input", - "type_info": "Bytea" - } - ], - "parameters": { - "Left": [ - "Int8" - ] - }, - "nullable": [ - false, - true - ] - }, - "hash": "928139bf23bd0d57b8dbdb3283b139300ad3b80ac9e70c00864c3d9f6521b028" -} diff --git a/core/lib/dal/.sqlx/query-2486f8404e8cfcb9c178acd6dccae32e8812becbe5ce85e63694385f015f2cfe.json b/core/lib/dal/.sqlx/query-932ec4483be7ebf34579f17694f6d14963cbfc84261824e47fbab1323895371d.json similarity index 91% rename from core/lib/dal/.sqlx/query-2486f8404e8cfcb9c178acd6dccae32e8812becbe5ce85e63694385f015f2cfe.json rename to core/lib/dal/.sqlx/query-932ec4483be7ebf34579f17694f6d14963cbfc84261824e47fbab1323895371d.json index f28e3d044ccc..0b1daaa10e5f 100644 --- a/core/lib/dal/.sqlx/query-2486f8404e8cfcb9c178acd6dccae32e8812becbe5ce85e63694385f015f2cfe.json +++ b/core/lib/dal/.sqlx/query-932ec4483be7ebf34579f17694f6d14963cbfc84261824e47fbab1323895371d.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_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": [ { @@ -170,5 +170,5 @@ true ] }, - "hash": "2486f8404e8cfcb9c178acd6dccae32e8812becbe5ce85e63694385f015f2cfe" + "hash": "932ec4483be7ebf34579f17694f6d14963cbfc84261824e47fbab1323895371d" } diff --git a/core/lib/dal/.sqlx/query-39849c30cdfa1827d69313357f92c495462e5aa430fe135d1db1f9bad1e72156.json b/core/lib/dal/.sqlx/query-96936c827caf26f93532bab309020b623d73e1b33024023f4bce7985e58be99e.json similarity index 67% rename from core/lib/dal/.sqlx/query-39849c30cdfa1827d69313357f92c495462e5aa430fe135d1db1f9bad1e72156.json rename to core/lib/dal/.sqlx/query-96936c827caf26f93532bab309020b623d73e1b33024023f4bce7985e58be99e.json index e196502056c6..3d6663efb969 100644 --- a/core/lib/dal/.sqlx/query-39849c30cdfa1827d69313357f92c495462e5aa430fe135d1db1f9bad1e72156.json +++ b/core/lib/dal/.sqlx/query-96936c827caf26f93532bab309020b623d73e1b33024023f4bce7985e58be99e.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT\n VERSION,\n l1_batch_number,\n factory_deps_filepath,\n storage_logs_filepaths\n FROM\n snapshots\n ORDER BY\n l1_batch_number DESC\n LIMIT\n 1\n ", + "query": "\n SELECT\n VERSION,\n L1_BATCH_NUMBER,\n FACTORY_DEPS_FILEPATH,\n STORAGE_LOGS_FILEPATHS\n FROM\n SNAPSHOTS\n ORDER BY\n L1_BATCH_NUMBER DESC\n LIMIT\n 1\n ", "describe": { "columns": [ { @@ -34,5 +34,5 @@ false ] }, - "hash": "39849c30cdfa1827d69313357f92c495462e5aa430fe135d1db1f9bad1e72156" + "hash": "96936c827caf26f93532bab309020b623d73e1b33024023f4bce7985e58be99e" } diff --git a/core/lib/dal/.sqlx/query-bdfd7e9d4462ac9cf6f91fced84355e6aec05ba4af297a03169e3122a67ae53e.json b/core/lib/dal/.sqlx/query-96adbd0c9a5786a6cca74324353c7d8bbdbee28d4ac2a2c0a331298c5e39b71d.json similarity index 66% rename from core/lib/dal/.sqlx/query-bdfd7e9d4462ac9cf6f91fced84355e6aec05ba4af297a03169e3122a67ae53e.json rename to core/lib/dal/.sqlx/query-96adbd0c9a5786a6cca74324353c7d8bbdbee28d4ac2a2c0a331298c5e39b71d.json index 0b1f56ef9f33..3b8accb4fda2 100644 --- a/core/lib/dal/.sqlx/query-bdfd7e9d4462ac9cf6f91fced84355e6aec05ba4af297a03169e3122a67ae53e.json +++ b/core/lib/dal/.sqlx/query-96adbd0c9a5786a6cca74324353c7d8bbdbee28d4ac2a2c0a331298c5e39b71d.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT\n protocol_version,\n index_in_block\n FROM\n transactions\n INNER JOIN miniblocks ON transactions.miniblock_number = miniblocks.number\n WHERE\n transactions.hash = $1\n ", + "query": "\n SELECT\n protocol_version,\n index_in_block\n FROM\n transactions\n INNER JOIN miniblocks ON transactions.miniblock_number = miniblocks.number\n WHERE\n transactions.hash = $1\n ", "describe": { "columns": [ { @@ -24,5 +24,5 @@ true ] }, - "hash": "bdfd7e9d4462ac9cf6f91fced84355e6aec05ba4af297a03169e3122a67ae53e" + "hash": "96adbd0c9a5786a6cca74324353c7d8bbdbee28d4ac2a2c0a331298c5e39b71d" } diff --git a/core/lib/dal/.sqlx/query-443b5c62c2c274369764ac5279d8f6f962ff3f07aa1cf7f0ffcefffccb633cdd.json b/core/lib/dal/.sqlx/query-99915c717193ff872b9cf8f5e9d1b84a6dfe1976b4ddb64cc288a846a0a7fda4.json similarity index 60% rename from core/lib/dal/.sqlx/query-443b5c62c2c274369764ac5279d8f6f962ff3f07aa1cf7f0ffcefffccb633cdd.json rename to core/lib/dal/.sqlx/query-99915c717193ff872b9cf8f5e9d1b84a6dfe1976b4ddb64cc288a846a0a7fda4.json index 3e2a8752dd2c..4fe387aaa5b0 100644 --- a/core/lib/dal/.sqlx/query-443b5c62c2c274369764ac5279d8f6f962ff3f07aa1cf7f0ffcefffccb633cdd.json +++ b/core/lib/dal/.sqlx/query-99915c717193ff872b9cf8f5e9d1b84a6dfe1976b4ddb64cc288a846a0a7fda4.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT\n INDEX\n FROM\n initial_writes\n WHERE\n hashed_key = $1\n AND l1_batch_number <= $2\n ", + "query": "\n SELECT\n INDEX\n FROM\n INITIAL_WRITES\n WHERE\n HASHED_KEY = $1\n AND L1_BATCH_NUMBER <= $2\n ", "describe": { "columns": [ { @@ -19,5 +19,5 @@ false ] }, - "hash": "443b5c62c2c274369764ac5279d8f6f962ff3f07aa1cf7f0ffcefffccb633cdd" + "hash": "99915c717193ff872b9cf8f5e9d1b84a6dfe1976b4ddb64cc288a846a0a7fda4" } diff --git a/core/lib/dal/.sqlx/query-99c6597a6edfb8736a9f2f5a5d77ca44a1f6cb5e46bf9e5ffe38741bf61c5cc0.json b/core/lib/dal/.sqlx/query-99c6597a6edfb8736a9f2f5a5d77ca44a1f6cb5e46bf9e5ffe38741bf61c5cc0.json new file mode 100644 index 000000000000..fd8786ca92ca --- /dev/null +++ b/core/lib/dal/.sqlx/query-99c6597a6edfb8736a9f2f5a5d77ca44a1f6cb5e46bf9e5ffe38741bf61c5cc0.json @@ -0,0 +1,23 @@ +{ + "db_name": "PostgreSQL", + "query": "\n SELECT\n DISTINCT\n hashed_key\n FROM\n storage_logs\n WHERE\n miniblock_number BETWEEN $1 AND $2\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "hashed_key", + "type_info": "Bytea" + } + ], + "parameters": { + "Left": [ + "Int8", + "Int8" + ] + }, + "nullable": [ + false + ] + }, + "hash": "99c6597a6edfb8736a9f2f5a5d77ca44a1f6cb5e46bf9e5ffe38741bf61c5cc0" +} diff --git a/core/lib/dal/.sqlx/query-9badf9f287fd5f8a11cc855b230d23f83a260adf56000748c4b19752e2948ab5.json b/core/lib/dal/.sqlx/query-9badf9f287fd5f8a11cc855b230d23f83a260adf56000748c4b19752e2948ab5.json new file mode 100644 index 000000000000..aa120d6b8f6e --- /dev/null +++ b/core/lib/dal/.sqlx/query-9badf9f287fd5f8a11cc855b230d23f83a260adf56000748c4b19752e2948ab5.json @@ -0,0 +1,34 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE transactions\n SET\n hash = data_table.hash,\n signature = data_table.signature,\n gas_limit = data_table.gas_limit,\n max_fee_per_gas = data_table.max_fee_per_gas,\n max_priority_fee_per_gas = data_table.max_priority_fee_per_gas,\n gas_per_pubdata_limit = data_table.gas_per_pubdata_limit,\n input = data_table.input,\n data = data_table.data,\n tx_format = data_table.tx_format,\n miniblock_number = $21,\n index_in_block = data_table.index_in_block,\n error = NULLIF(data_table.error, ''),\n effective_gas_price = data_table.effective_gas_price,\n execution_info = data_table.new_execution_info,\n refunded_gas = data_table.refunded_gas,\n value = data_table.value,\n contract_address = data_table.contract_address,\n paymaster = data_table.paymaster,\n paymaster_input = data_table.paymaster_input,\n in_mempool = FALSE,\n updated_at = NOW()\n FROM\n (\n SELECT\n data_table_temp.*\n FROM\n (\n SELECT\n UNNEST($1::bytea []) AS initiator_address,\n UNNEST($2::int []) AS nonce,\n UNNEST($3::bytea []) AS hash,\n UNNEST($4::bytea []) AS signature,\n UNNEST($5::numeric []) AS gas_limit,\n UNNEST($6::numeric []) AS max_fee_per_gas,\n UNNEST($7::numeric []) AS max_priority_fee_per_gas,\n UNNEST($8::numeric []) AS gas_per_pubdata_limit,\n UNNEST($9::int []) AS tx_format,\n UNNEST($10::integer []) AS index_in_block,\n UNNEST($11::varchar []) AS error,\n UNNEST($12::numeric []) AS effective_gas_price,\n UNNEST($13::jsonb []) AS new_execution_info,\n UNNEST($14::bytea []) AS input,\n UNNEST($15::jsonb []) AS data,\n UNNEST($16::bigint []) AS refunded_gas,\n UNNEST($17::numeric []) AS value,\n UNNEST($18::bytea []) AS contract_address,\n UNNEST($19::bytea []) AS paymaster,\n UNNEST($20::bytea []) AS paymaster_input\n ) AS data_table_temp\n JOIN transactions\n ON\n transactions.initiator_address\n = data_table_temp.initiator_address\n AND transactions.nonce = data_table_temp.nonce\n ORDER BY\n transactions.hash\n ) AS data_table\n WHERE\n transactions.initiator_address = data_table.initiator_address\n AND transactions.nonce = data_table.nonce\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "ByteaArray", + "Int4Array", + "ByteaArray", + "ByteaArray", + "NumericArray", + "NumericArray", + "NumericArray", + "NumericArray", + "Int4Array", + "Int4Array", + "VarcharArray", + "NumericArray", + "JsonbArray", + "ByteaArray", + "JsonbArray", + "Int8Array", + "NumericArray", + "ByteaArray", + "ByteaArray", + "ByteaArray", + "Int8" + ] + }, + "nullable": [] + }, + "hash": "9badf9f287fd5f8a11cc855b230d23f83a260adf56000748c4b19752e2948ab5" +} diff --git a/core/lib/dal/.sqlx/query-9c6e1d3bd95d03ef32835dc454663f500b8358757e5a453cf0a87d5cd9620d7e.json b/core/lib/dal/.sqlx/query-9c6e1d3bd95d03ef32835dc454663f500b8358757e5a453cf0a87d5cd9620d7e.json new file mode 100644 index 000000000000..d2c999a70d4c --- /dev/null +++ b/core/lib/dal/.sqlx/query-9c6e1d3bd95d03ef32835dc454663f500b8358757e5a453cf0a87d5cd9620d7e.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": "9c6e1d3bd95d03ef32835dc454663f500b8358757e5a453cf0a87d5cd9620d7e" +} diff --git a/core/lib/dal/.sqlx/query-9f2c06e6b14434ac4f3b556dc97994cc05ebeb4e5aeeaee50b7c4d8baf58ca44.json b/core/lib/dal/.sqlx/query-9f2c06e6b14434ac4f3b556dc97994cc05ebeb4e5aeeaee50b7c4d8baf58ca44.json deleted file mode 100644 index 54f0d27bab26..000000000000 --- a/core/lib/dal/.sqlx/query-9f2c06e6b14434ac4f3b556dc97994cc05ebeb4e5aeeaee50b7c4d8baf58ca44.json +++ /dev/null @@ -1,33 +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_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-9f7b35311f0afff1be7dc489348ec87cf78f40429222b3163f3c5235c87e007f.json b/core/lib/dal/.sqlx/query-9f7b35311f0afff1be7dc489348ec87cf78f40429222b3163f3c5235c87e007f.json new file mode 100644 index 000000000000..30d66d0890b8 --- /dev/null +++ b/core/lib/dal/.sqlx/query-9f7b35311f0afff1be7dc489348ec87cf78f40429222b3163f3c5235c87e007f.json @@ -0,0 +1,31 @@ +{ + "db_name": "PostgreSQL", + "query": "\n INSERT INTO\n transactions (\n hash,\n is_priority,\n initiator_address,\n gas_limit,\n max_fee_per_gas,\n gas_per_pubdata_limit,\n data,\n priority_op_id,\n full_fee,\n layer_2_tip_fee,\n contract_address,\n l1_block_number,\n value,\n paymaster,\n paymaster_input,\n tx_format,\n l1_tx_mint,\n l1_tx_refund_recipient,\n received_at,\n created_at,\n updated_at\n )\n VALUES\n (\n $1,\n TRUE,\n $2,\n $3,\n $4,\n $5,\n $6,\n $7,\n $8,\n $9,\n $10,\n $11,\n $12,\n $13,\n $14,\n $15,\n $16,\n $17,\n $18,\n NOW(),\n NOW()\n )\n ON CONFLICT (hash) DO NOTHING\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Bytea", + "Bytea", + "Numeric", + "Numeric", + "Numeric", + "Jsonb", + "Int8", + "Numeric", + "Numeric", + "Bytea", + "Int4", + "Numeric", + "Bytea", + "Bytea", + "Int4", + "Numeric", + "Bytea", + "Timestamp" + ] + }, + "nullable": [] + }, + "hash": "9f7b35311f0afff1be7dc489348ec87cf78f40429222b3163f3c5235c87e007f" +} diff --git a/core/lib/dal/.sqlx/query-a329c468b25d6d5533766b8ad3d0c8fdca5c5731d490c1ac3ed56266b1d5a8a5.json b/core/lib/dal/.sqlx/query-a329c468b25d6d5533766b8ad3d0c8fdca5c5731d490c1ac3ed56266b1d5a8a5.json new file mode 100644 index 000000000000..d7947345cf61 --- /dev/null +++ b/core/lib/dal/.sqlx/query-a329c468b25d6d5533766b8ad3d0c8fdca5c5731d490c1ac3ed56266b1d5a8a5.json @@ -0,0 +1,32 @@ +{ + "db_name": "PostgreSQL", + "query": "\n INSERT INTO\n transactions (\n hash,\n is_priority,\n initiator_address,\n gas_limit,\n max_fee_per_gas,\n gas_per_pubdata_limit,\n data,\n upgrade_id,\n contract_address,\n l1_block_number,\n value,\n paymaster,\n paymaster_input,\n tx_format,\n l1_tx_mint,\n l1_tx_refund_recipient,\n miniblock_number,\n index_in_block,\n error,\n execution_info,\n refunded_gas,\n effective_gas_price,\n received_at,\n created_at,\n updated_at\n )\n SELECT\n data_table.hash,\n TRUE,\n data_table.initiator_address,\n data_table.gas_limit,\n data_table.max_fee_per_gas,\n data_table.gas_per_pubdata_limit,\n data_table.data,\n data_table.upgrade_id,\n data_table.contract_address,\n data_table.l1_block_number,\n data_table.value,\n '\\x0000000000000000000000000000000000000000'::bytea,\n '\\x'::bytea,\n data_table.tx_format,\n data_table.l1_tx_mint,\n data_table.l1_tx_refund_recipient,\n $19,\n data_table.index_in_block,\n NULLIF(data_table.error, ''),\n data_table.execution_info,\n data_table.refunded_gas,\n data_table.effective_gas_price,\n NOW(),\n NOW(),\n NOW()\n FROM\n (\n SELECT\n UNNEST($1::bytea []) AS hash,\n UNNEST($2::bytea []) AS initiator_address,\n UNNEST($3::numeric []) AS gas_limit,\n UNNEST($4::numeric []) AS max_fee_per_gas,\n UNNEST($5::numeric []) AS gas_per_pubdata_limit,\n UNNEST($6::jsonb []) AS data,\n UNNEST($7::int []) AS upgrade_id,\n UNNEST($8::bytea []) AS contract_address,\n UNNEST($9::int []) AS l1_block_number,\n UNNEST($10::numeric []) AS value,\n UNNEST($11::integer []) AS tx_format,\n UNNEST($12::numeric []) AS l1_tx_mint,\n UNNEST($13::bytea []) AS l1_tx_refund_recipient,\n UNNEST($14::int []) AS index_in_block,\n UNNEST($15::varchar []) AS error,\n UNNEST($16::jsonb []) AS execution_info,\n UNNEST($17::bigint []) AS refunded_gas,\n UNNEST($18::numeric []) AS effective_gas_price\n ) AS data_table\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "ByteaArray", + "ByteaArray", + "NumericArray", + "NumericArray", + "NumericArray", + "JsonbArray", + "Int4Array", + "ByteaArray", + "Int4Array", + "NumericArray", + "Int4Array", + "NumericArray", + "ByteaArray", + "Int4Array", + "VarcharArray", + "JsonbArray", + "Int8Array", + "NumericArray", + "Int8" + ] + }, + "nullable": [] + }, + "hash": "a329c468b25d6d5533766b8ad3d0c8fdca5c5731d490c1ac3ed56266b1d5a8a5" +} diff --git a/core/lib/dal/.sqlx/query-6621de90a024cc85946f17948e5c171cd0e4d38bd6e9cfec58b2d7f53a3204e1.json b/core/lib/dal/.sqlx/query-a36135b5908992324c4308f549ea77a428820fdcea9969aff3b29ca16727357b.json similarity index 97% rename from core/lib/dal/.sqlx/query-6621de90a024cc85946f17948e5c171cd0e4d38bd6e9cfec58b2d7f53a3204e1.json rename to core/lib/dal/.sqlx/query-a36135b5908992324c4308f549ea77a428820fdcea9969aff3b29ca16727357b.json index 8ba437fe2cee..1d27af2bbc1a 100644 --- a/core/lib/dal/.sqlx/query-6621de90a024cc85946f17948e5c171cd0e4d38bd6e9cfec58b2d7f53a3204e1.json +++ b/core/lib/dal/.sqlx/query-a36135b5908992324c4308f549ea77a428820fdcea9969aff3b29ca16727357b.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n UPDATE transactions\n SET\n in_mempool = TRUE\n FROM\n (\n SELECT\n hash\n FROM\n (\n SELECT\n hash\n FROM\n transactions\n WHERE\n miniblock_number IS NULL\n AND in_mempool = FALSE\n AND error IS NULL\n AND (\n is_priority = TRUE\n OR (\n max_fee_per_gas >= $2\n AND gas_per_pubdata_limit >= $3\n )\n )\n AND tx_format != $4\n ORDER BY\n is_priority DESC,\n priority_op_id,\n received_at\n LIMIT\n $1\n ) AS subquery1\n ORDER BY\n hash\n ) AS subquery2\n WHERE\n transactions.hash = subquery2.hash\n RETURNING\n transactions.*\n ", + "query": "\n UPDATE transactions\n SET\n in_mempool = TRUE\n FROM\n (\n SELECT\n hash\n FROM\n (\n SELECT\n hash\n FROM\n transactions\n WHERE\n miniblock_number IS NULL\n AND in_mempool = FALSE\n AND error IS NULL\n AND (\n is_priority = TRUE\n OR (\n max_fee_per_gas >= $2\n AND gas_per_pubdata_limit >= $3\n )\n )\n AND tx_format != $4\n ORDER BY\n is_priority DESC,\n priority_op_id,\n received_at\n LIMIT\n $1\n ) AS subquery1\n ORDER BY\n hash\n ) AS subquery2\n WHERE\n transactions.hash = subquery2.hash\n RETURNING\n transactions.*\n ", "describe": { "columns": [ { @@ -231,5 +231,5 @@ true ] }, - "hash": "6621de90a024cc85946f17948e5c171cd0e4d38bd6e9cfec58b2d7f53a3204e1" + "hash": "a36135b5908992324c4308f549ea77a428820fdcea9969aff3b29ca16727357b" } diff --git a/core/lib/dal/.sqlx/query-a4fcd075b68467bb119e49e6b20a69138206dfeb41f3daff4a3eef1de0bed4e4.json b/core/lib/dal/.sqlx/query-a4fcd075b68467bb119e49e6b20a69138206dfeb41f3daff4a3eef1de0bed4e4.json deleted file mode 100644 index 39b0c391ef59..000000000000 --- a/core/lib/dal/.sqlx/query-a4fcd075b68467bb119e49e6b20a69138206dfeb41f3daff4a3eef1de0bed4e4.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n initial_writes (hashed_key, INDEX, l1_batch_number, created_at, updated_at)\n SELECT\n u.hashed_key,\n u.index,\n $3,\n NOW(),\n NOW()\n FROM\n UNNEST($1::bytea[], $2::BIGINT[]) AS u (hashed_key, INDEX)\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "ByteaArray", - "Int8Array", - "Int8" - ] - }, - "nullable": [] - }, - "hash": "a4fcd075b68467bb119e49e6b20a69138206dfeb41f3daff4a3eef1de0bed4e4" -} diff --git a/core/lib/dal/.sqlx/query-a65364d10a20420211022dc8234d0a586ce73d09ee28887cb1ad1c0392250629.json b/core/lib/dal/.sqlx/query-a65364d10a20420211022dc8234d0a586ce73d09ee28887cb1ad1c0392250629.json new file mode 100644 index 000000000000..58195689f5d4 --- /dev/null +++ b/core/lib/dal/.sqlx/query-a65364d10a20420211022dc8234d0a586ce73d09ee28887cb1ad1c0392250629.json @@ -0,0 +1,34 @@ +{ + "db_name": "PostgreSQL", + "query": "\n INSERT INTO\n transactions (\n hash,\n is_priority,\n initiator_address,\n nonce,\n signature,\n gas_limit,\n max_fee_per_gas,\n max_priority_fee_per_gas,\n gas_per_pubdata_limit,\n input,\n data,\n tx_format,\n contract_address,\n value,\n paymaster,\n paymaster_input,\n execution_info,\n miniblock_number,\n index_in_block,\n error,\n effective_gas_price,\n refunded_gas,\n received_at,\n created_at,\n updated_at\n )\n SELECT\n data_table.hash,\n FALSE,\n data_table.initiator_address,\n data_table.nonce,\n data_table.signature,\n data_table.gas_limit,\n data_table.max_fee_per_gas,\n data_table.max_priority_fee_per_gas,\n data_table.gas_per_pubdata_limit,\n data_table.input,\n data_table.data,\n data_table.tx_format,\n data_table.contract_address,\n data_table.value,\n data_table.paymaster,\n data_table.paymaster_input,\n data_table.new_execution_info,\n $21,\n data_table.index_in_block,\n NULLIF(data_table.error, ''),\n data_table.effective_gas_price,\n data_table.refunded_gas,\n NOW(),\n NOW(),\n NOW()\n FROM\n (\n SELECT\n UNNEST($1::bytea []) AS hash,\n UNNEST($2::bytea []) AS initiator_address,\n UNNEST($3::int []) AS nonce,\n UNNEST($4::bytea []) AS signature,\n UNNEST($5::numeric []) AS gas_limit,\n UNNEST($6::numeric []) AS max_fee_per_gas,\n UNNEST($7::numeric []) AS max_priority_fee_per_gas,\n UNNEST($8::numeric []) AS gas_per_pubdata_limit,\n UNNEST($9::bytea []) AS input,\n UNNEST($10::jsonb []) AS data,\n UNNEST($11::int []) AS tx_format,\n UNNEST($12::bytea []) AS contract_address,\n UNNEST($13::numeric []) AS value,\n UNNEST($14::bytea []) AS paymaster,\n UNNEST($15::bytea []) AS paymaster_input,\n UNNEST($16::jsonb []) AS new_execution_info,\n UNNEST($17::integer []) AS index_in_block,\n UNNEST($18::varchar []) AS error,\n UNNEST($19::numeric []) AS effective_gas_price,\n UNNEST($20::bigint []) AS refunded_gas\n ) AS data_table\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "ByteaArray", + "ByteaArray", + "Int4Array", + "ByteaArray", + "NumericArray", + "NumericArray", + "NumericArray", + "NumericArray", + "ByteaArray", + "JsonbArray", + "Int4Array", + "ByteaArray", + "NumericArray", + "ByteaArray", + "ByteaArray", + "JsonbArray", + "Int4Array", + "VarcharArray", + "NumericArray", + "Int8Array", + "Int8" + ] + }, + "nullable": [] + }, + "hash": "a65364d10a20420211022dc8234d0a586ce73d09ee28887cb1ad1c0392250629" +} diff --git a/core/lib/dal/.sqlx/query-a8d55f14de2f489fdc12c8da540e0d51f86d30d5ad92496e4aa087a3c4aae09f.json b/core/lib/dal/.sqlx/query-a8d55f14de2f489fdc12c8da540e0d51f86d30d5ad92496e4aa087a3c4aae09f.json deleted file mode 100644 index b00999f21448..000000000000 --- a/core/lib/dal/.sqlx/query-a8d55f14de2f489fdc12c8da540e0d51f86d30d5ad92496e4aa087a3c4aae09f.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n transactions (\n hash,\n is_priority,\n initiator_address,\n gas_limit,\n max_fee_per_gas,\n gas_per_pubdata_limit,\n data,\n priority_op_id,\n full_fee,\n layer_2_tip_fee,\n contract_address,\n l1_block_number,\n value,\n paymaster,\n paymaster_input,\n tx_format,\n l1_tx_mint,\n l1_tx_refund_recipient,\n miniblock_number,\n index_in_block,\n error,\n execution_info,\n refunded_gas,\n effective_gas_price,\n received_at,\n created_at,\n updated_at\n )\n SELECT\n data_table.hash,\n TRUE,\n data_table.initiator_address,\n data_table.gas_limit,\n data_table.max_fee_per_gas,\n data_table.gas_per_pubdata_limit,\n data_table.data,\n data_table.priority_op_id,\n data_table.full_fee,\n data_table.layer_2_tip_fee,\n data_table.contract_address,\n data_table.l1_block_number,\n data_table.value,\n '\\x0000000000000000000000000000000000000000'::bytea,\n '\\x'::bytea,\n data_table.tx_format,\n data_table.l1_tx_mint,\n data_table.l1_tx_refund_recipient,\n $21,\n data_table.index_in_block,\n NULLIF(data_table.error, ''),\n data_table.execution_info,\n data_table.refunded_gas,\n data_table.effective_gas_price,\n NOW(),\n NOW(),\n NOW()\n FROM\n (\n SELECT\n UNNEST($1::BYTEA[]) AS hash,\n UNNEST($2::BYTEA[]) AS initiator_address,\n UNNEST($3::NUMERIC[]) AS gas_limit,\n UNNEST($4::NUMERIC[]) AS max_fee_per_gas,\n UNNEST($5::NUMERIC[]) AS gas_per_pubdata_limit,\n UNNEST($6::JSONB[]) AS data,\n UNNEST($7::BIGINT[]) AS priority_op_id,\n UNNEST($8::NUMERIC[]) AS full_fee,\n UNNEST($9::NUMERIC[]) AS layer_2_tip_fee,\n UNNEST($10::BYTEA[]) AS contract_address,\n UNNEST($11::INT[]) AS l1_block_number,\n UNNEST($12::NUMERIC[]) AS value,\n UNNEST($13::INTEGER[]) AS tx_format,\n UNNEST($14::NUMERIC[]) AS l1_tx_mint,\n UNNEST($15::BYTEA[]) AS l1_tx_refund_recipient,\n UNNEST($16::INT[]) AS index_in_block,\n UNNEST($17::VARCHAR[]) AS error,\n UNNEST($18::JSONB[]) AS execution_info,\n UNNEST($19::BIGINT[]) AS refunded_gas,\n UNNEST($20::NUMERIC[]) AS effective_gas_price\n ) AS data_table\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "ByteaArray", - "ByteaArray", - "NumericArray", - "NumericArray", - "NumericArray", - "JsonbArray", - "Int8Array", - "NumericArray", - "NumericArray", - "ByteaArray", - "Int4Array", - "NumericArray", - "Int4Array", - "NumericArray", - "ByteaArray", - "Int4Array", - "VarcharArray", - "JsonbArray", - "Int8Array", - "NumericArray", - "Int8" - ] - }, - "nullable": [] - }, - "hash": "a8d55f14de2f489fdc12c8da540e0d51f86d30d5ad92496e4aa087a3c4aae09f" -} diff --git a/core/lib/dal/.sqlx/query-a8fcb4d43b702d561a573a30790372281e8502002ff9fec82294ea6b972447d8.json b/core/lib/dal/.sqlx/query-a8fcb4d43b702d561a573a30790372281e8502002ff9fec82294ea6b972447d8.json new file mode 100644 index 000000000000..33187f131dfa --- /dev/null +++ b/core/lib/dal/.sqlx/query-a8fcb4d43b702d561a573a30790372281e8502002ff9fec82294ea6b972447d8.json @@ -0,0 +1,16 @@ +{ + "db_name": "PostgreSQL", + "query": "\n INSERT INTO\n factory_deps (bytecode_hash, bytecode, miniblock_number, created_at, updated_at)\n SELECT\n u.bytecode_hash,\n u.bytecode,\n $3,\n NOW(),\n NOW()\n FROM\n UNNEST($1::bytea [], $2::bytea []) AS u (bytecode_hash, bytecode)\n ON CONFLICT (bytecode_hash) DO NOTHING\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "ByteaArray", + "ByteaArray", + "Int8" + ] + }, + "nullable": [] + }, + "hash": "a8fcb4d43b702d561a573a30790372281e8502002ff9fec82294ea6b972447d8" +} diff --git a/core/lib/dal/.sqlx/query-e3f4af790fca9149f4edff070170294ec464d184ad732692faa61d2ef99c84e9.json b/core/lib/dal/.sqlx/query-aa68653ef4ff7e0cfddfc0a7c8f3c39e774c405508e73e77cdd0c01f924c97c0.json similarity index 53% rename from core/lib/dal/.sqlx/query-e3f4af790fca9149f4edff070170294ec464d184ad732692faa61d2ef99c84e9.json rename to core/lib/dal/.sqlx/query-aa68653ef4ff7e0cfddfc0a7c8f3c39e774c405508e73e77cdd0c01f924c97c0.json index abe74036f4c6..b17b58282110 100644 --- a/core/lib/dal/.sqlx/query-e3f4af790fca9149f4edff070170294ec464d184ad732692faa61d2ef99c84e9.json +++ b/core/lib/dal/.sqlx/query-aa68653ef4ff7e0cfddfc0a7c8f3c39e774c405508e73e77cdd0c01f924c97c0.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n UPDATE tee_proof_generation_details\n SET\n status = $1,\n updated_at = NOW(),\n prover_taken_at = NOW()\n WHERE\n tee_type = $2\n AND l1_batch_number = (\n SELECT\n proofs.l1_batch_number\n FROM\n tee_proof_generation_details AS proofs\n JOIN tee_verifier_input_producer_jobs AS inputs ON proofs.l1_batch_number = inputs.l1_batch_number\n WHERE\n inputs.status = $3\n AND (\n proofs.status = $4\n OR (\n proofs.status = $1\n AND proofs.prover_taken_at < NOW() - $5::INTERVAL\n )\n )\n AND proofs.l1_batch_number >= $6\n ORDER BY\n l1_batch_number ASC\n LIMIT\n 1\n FOR UPDATE\n SKIP LOCKED\n )\n RETURNING\n tee_proof_generation_details.l1_batch_number\n ", + "query": "\n UPDATE tee_proof_generation_details\n SET\n status = $1,\n updated_at = NOW(),\n prover_taken_at = NOW()\n WHERE\n tee_type = $2\n AND l1_batch_number = (\n SELECT\n proofs.l1_batch_number\n FROM\n tee_proof_generation_details AS proofs\n JOIN\n tee_verifier_input_producer_jobs AS inputs\n ON proofs.l1_batch_number = inputs.l1_batch_number\n WHERE\n inputs.status = $3\n AND (\n proofs.status = $4\n OR (\n proofs.status = $1\n AND proofs.prover_taken_at < NOW() - $5::INTERVAL\n )\n )\n AND proofs.l1_batch_number >= $6\n ORDER BY\n l1_batch_number ASC\n LIMIT\n 1\n FOR UPDATE\n SKIP LOCKED\n )\n RETURNING\n tee_proof_generation_details.l1_batch_number\n ", "describe": { "columns": [ { @@ -36,5 +36,5 @@ false ] }, - "hash": "e3f4af790fca9149f4edff070170294ec464d184ad732692faa61d2ef99c84e9" + "hash": "aa68653ef4ff7e0cfddfc0a7c8f3c39e774c405508e73e77cdd0c01f924c97c0" } diff --git a/core/lib/dal/.sqlx/query-63f95c6cdcfd933e2cf8f62c0d408f2dce89f7b700896fcc0f242e0e15ba058e.json b/core/lib/dal/.sqlx/query-ac4f1e7af7d866daf45b6997a8ce0a02a40c9f37be949bd4d088744f9c842ef3.json similarity index 78% rename from core/lib/dal/.sqlx/query-63f95c6cdcfd933e2cf8f62c0d408f2dce89f7b700896fcc0f242e0e15ba058e.json rename to core/lib/dal/.sqlx/query-ac4f1e7af7d866daf45b6997a8ce0a02a40c9f37be949bd4d088744f9c842ef3.json index cb68e7622524..671b56760d6b 100644 --- a/core/lib/dal/.sqlx/query-63f95c6cdcfd933e2cf8f62c0d408f2dce89f7b700896fcc0f242e0e15ba058e.json +++ b/core/lib/dal/.sqlx/query-ac4f1e7af7d866daf45b6997a8ce0a02a40c9f37be949bd4d088744f9c842ef3.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_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 LEFT JOIN data_availability ON data_availability.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 AND (\n data_availability.inclusion_data IS NOT NULL\n OR $4 IS FALSE\n )\n ORDER BY\n number\n LIMIT\n $5\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 LEFT JOIN\n data_availability\n ON data_availability.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 AND (\n data_availability.inclusion_data IS NOT NULL\n OR $4 IS FALSE\n )\n ORDER BY\n number\n LIMIT\n $5\n ", "describe": { "columns": [ { @@ -172,5 +172,5 @@ true ] }, - "hash": "63f95c6cdcfd933e2cf8f62c0d408f2dce89f7b700896fcc0f242e0e15ba058e" + "hash": "ac4f1e7af7d866daf45b6997a8ce0a02a40c9f37be949bd4d088744f9c842ef3" } diff --git a/core/lib/dal/.sqlx/query-acfd5a60fda5782bddb8cba033a5d3a0eed793f7b64ad3ed035f20e896371721.json b/core/lib/dal/.sqlx/query-acfd5a60fda5782bddb8cba033a5d3a0eed793f7b64ad3ed035f20e896371721.json deleted file mode 100644 index 9232ef6d0096..000000000000 --- a/core/lib/dal/.sqlx/query-acfd5a60fda5782bddb8cba033a5d3a0eed793f7b64ad3ed035f20e896371721.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n transactions (\n hash,\n is_priority,\n initiator_address,\n gas_limit,\n max_fee_per_gas,\n gas_per_pubdata_limit,\n data,\n priority_op_id,\n full_fee,\n layer_2_tip_fee,\n contract_address,\n l1_block_number,\n value,\n paymaster,\n paymaster_input,\n tx_format,\n l1_tx_mint,\n l1_tx_refund_recipient,\n received_at,\n created_at,\n updated_at\n )\n VALUES\n (\n $1,\n TRUE,\n $2,\n $3,\n $4,\n $5,\n $6,\n $7,\n $8,\n $9,\n $10,\n $11,\n $12,\n $13,\n $14,\n $15,\n $16,\n $17,\n $18,\n NOW(),\n NOW()\n )\n ON CONFLICT (hash) DO NOTHING\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Bytea", - "Bytea", - "Numeric", - "Numeric", - "Numeric", - "Jsonb", - "Int8", - "Numeric", - "Numeric", - "Bytea", - "Int4", - "Numeric", - "Bytea", - "Bytea", - "Int4", - "Numeric", - "Bytea", - "Timestamp" - ] - }, - "nullable": [] - }, - "hash": "acfd5a60fda5782bddb8cba033a5d3a0eed793f7b64ad3ed035f20e896371721" -} diff --git a/core/lib/dal/.sqlx/query-ad8cbc084ef8bc5995031c807bbbd2225e57ae8d42042ac107b35a36c522f0d8.json b/core/lib/dal/.sqlx/query-ad8cbc084ef8bc5995031c807bbbd2225e57ae8d42042ac107b35a36c522f0d8.json new file mode 100644 index 000000000000..b07701218c31 --- /dev/null +++ b/core/lib/dal/.sqlx/query-ad8cbc084ef8bc5995031c807bbbd2225e57ae8d42042ac107b35a36c522f0d8.json @@ -0,0 +1,34 @@ +{ + "db_name": "PostgreSQL", + "query": "\n INSERT INTO\n transactions (\n hash,\n is_priority,\n initiator_address,\n gas_limit,\n max_fee_per_gas,\n gas_per_pubdata_limit,\n data,\n priority_op_id,\n full_fee,\n layer_2_tip_fee,\n contract_address,\n l1_block_number,\n value,\n paymaster,\n paymaster_input,\n tx_format,\n l1_tx_mint,\n l1_tx_refund_recipient,\n miniblock_number,\n index_in_block,\n error,\n execution_info,\n refunded_gas,\n effective_gas_price,\n received_at,\n created_at,\n updated_at\n )\n SELECT\n data_table.hash,\n TRUE,\n data_table.initiator_address,\n data_table.gas_limit,\n data_table.max_fee_per_gas,\n data_table.gas_per_pubdata_limit,\n data_table.data,\n data_table.priority_op_id,\n data_table.full_fee,\n data_table.layer_2_tip_fee,\n data_table.contract_address,\n data_table.l1_block_number,\n data_table.value,\n '\\x0000000000000000000000000000000000000000'::bytea,\n '\\x'::bytea,\n data_table.tx_format,\n data_table.l1_tx_mint,\n data_table.l1_tx_refund_recipient,\n $21,\n data_table.index_in_block,\n NULLIF(data_table.error, ''),\n data_table.execution_info,\n data_table.refunded_gas,\n data_table.effective_gas_price,\n NOW(),\n NOW(),\n NOW()\n FROM\n (\n SELECT\n UNNEST($1::bytea []) AS hash,\n UNNEST($2::bytea []) AS initiator_address,\n UNNEST($3::numeric []) AS gas_limit,\n UNNEST($4::numeric []) AS max_fee_per_gas,\n UNNEST($5::numeric []) AS gas_per_pubdata_limit,\n UNNEST($6::jsonb []) AS data,\n UNNEST($7::bigint []) AS priority_op_id,\n UNNEST($8::numeric []) AS full_fee,\n UNNEST($9::numeric []) AS layer_2_tip_fee,\n UNNEST($10::bytea []) AS contract_address,\n UNNEST($11::int []) AS l1_block_number,\n UNNEST($12::numeric []) AS value,\n UNNEST($13::integer []) AS tx_format,\n UNNEST($14::numeric []) AS l1_tx_mint,\n UNNEST($15::bytea []) AS l1_tx_refund_recipient,\n UNNEST($16::int []) AS index_in_block,\n UNNEST($17::varchar []) AS error,\n UNNEST($18::jsonb []) AS execution_info,\n UNNEST($19::bigint []) AS refunded_gas,\n UNNEST($20::numeric []) AS effective_gas_price\n ) AS data_table\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "ByteaArray", + "ByteaArray", + "NumericArray", + "NumericArray", + "NumericArray", + "JsonbArray", + "Int8Array", + "NumericArray", + "NumericArray", + "ByteaArray", + "Int4Array", + "NumericArray", + "Int4Array", + "NumericArray", + "ByteaArray", + "Int4Array", + "VarcharArray", + "JsonbArray", + "Int8Array", + "NumericArray", + "Int8" + ] + }, + "nullable": [] + }, + "hash": "ad8cbc084ef8bc5995031c807bbbd2225e57ae8d42042ac107b35a36c522f0d8" +} diff --git a/core/lib/dal/.sqlx/query-659f616d3af4a79f898e84f890e06de9633d1086da972a467d89831e7a07c67e.json b/core/lib/dal/.sqlx/query-ae30067056fe29febd68408c2ca2e604958488a41d3ee2bcbd05d269bcdfc7aa.json similarity index 93% rename from core/lib/dal/.sqlx/query-659f616d3af4a79f898e84f890e06de9633d1086da972a467d89831e7a07c67e.json rename to core/lib/dal/.sqlx/query-ae30067056fe29febd68408c2ca2e604958488a41d3ee2bcbd05d269bcdfc7aa.json index 9116a25c1673..9e212249490c 100644 --- a/core/lib/dal/.sqlx/query-659f616d3af4a79f898e84f890e06de9633d1086da972a467d89831e7a07c67e.json +++ b/core/lib/dal/.sqlx/query-ae30067056fe29febd68408c2ca2e604958488a41d3ee2bcbd05d269bcdfc7aa.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_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": [ { @@ -169,5 +169,5 @@ true ] }, - "hash": "659f616d3af4a79f898e84f890e06de9633d1086da972a467d89831e7a07c67e" + "hash": "ae30067056fe29febd68408c2ca2e604958488a41d3ee2bcbd05d269bcdfc7aa" } diff --git a/core/lib/dal/.sqlx/query-a1f4334b6bc1642c1bc0ff4ffa34470914b52e2d714e9deb903d62a5d66f0e04.json b/core/lib/dal/.sqlx/query-afe66b4684f2ab1187b49f64f16f21c9bacd8badc624de7664b82dba97d6c9b9.json similarity index 86% rename from core/lib/dal/.sqlx/query-a1f4334b6bc1642c1bc0ff4ffa34470914b52e2d714e9deb903d62a5d66f0e04.json rename to core/lib/dal/.sqlx/query-afe66b4684f2ab1187b49f64f16f21c9bacd8badc624de7664b82dba97d6c9b9.json index 82612fb53277..6bb3c4e97313 100644 --- a/core/lib/dal/.sqlx/query-a1f4334b6bc1642c1bc0ff4ffa34470914b52e2d714e9deb903d62a5d66f0e04.json +++ b/core/lib/dal/.sqlx/query-afe66b4684f2ab1187b49f64f16f21c9bacd8badc624de7664b82dba97d6c9b9.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT\n l1_address,\n l2_address,\n NAME,\n symbol,\n decimals\n FROM\n tokens\n ORDER BY\n symbol\n ", + "query": "\n SELECT\n l1_address,\n l2_address,\n name,\n symbol,\n decimals\n FROM\n tokens\n ORDER BY\n symbol\n ", "describe": { "columns": [ { @@ -40,5 +40,5 @@ false ] }, - "hash": "a1f4334b6bc1642c1bc0ff4ffa34470914b52e2d714e9deb903d62a5d66f0e04" + "hash": "afe66b4684f2ab1187b49f64f16f21c9bacd8badc624de7664b82dba97d6c9b9" } diff --git a/core/lib/dal/.sqlx/query-b1486215ce220d6d2faa7690a5cdd13a572f665e0a5c0edba8076438ba9f044c.json b/core/lib/dal/.sqlx/query-b1486215ce220d6d2faa7690a5cdd13a572f665e0a5c0edba8076438ba9f044c.json new file mode 100644 index 000000000000..aab080c3a51a --- /dev/null +++ b/core/lib/dal/.sqlx/query-b1486215ce220d6d2faa7690a5cdd13a572f665e0a5c0edba8076438ba9f044c.json @@ -0,0 +1,15 @@ +{ + "db_name": "PostgreSQL", + "query": "\n INSERT INTO\n l1_batches_consensus (l1_batch_number, certificate, updated_at, created_at)\n VALUES\n ($1, $2, NOW(), NOW())\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8", + "Jsonb" + ] + }, + "nullable": [] + }, + "hash": "b1486215ce220d6d2faa7690a5cdd13a572f665e0a5c0edba8076438ba9f044c" +} diff --git a/core/lib/dal/.sqlx/query-b313ab2b1e0a83136a202ea758c6d2b2e3f2497e6b5f26c72e220397cc0e62f7.json b/core/lib/dal/.sqlx/query-b313ab2b1e0a83136a202ea758c6d2b2e3f2497e6b5f26c72e220397cc0e62f7.json deleted file mode 100644 index 356fd8e9d999..000000000000 --- a/core/lib/dal/.sqlx/query-b313ab2b1e0a83136a202ea758c6d2b2e3f2497e6b5f26c72e220397cc0e62f7.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n l1_batches_consensus_committees (l1_batch_number, attesters, updated_at)\n VALUES\n ($1, $2, NOW())\n ON CONFLICT (l1_batch_number) DO\n UPDATE\n SET\n l1_batch_number = $1,\n attesters = $2,\n updated_at = NOW()\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8", - "Jsonb" - ] - }, - "nullable": [] - }, - "hash": "b313ab2b1e0a83136a202ea758c6d2b2e3f2497e6b5f26c72e220397cc0e62f7" -} diff --git a/core/lib/dal/.sqlx/query-ef70506e90e8add3b95940a7333f8222bd9fbe8ce82d8963f7da03fe6fcf9225.json b/core/lib/dal/.sqlx/query-b3bccd33945c657856f12b9ced6addab6569d897e748d39abca9538872d986ad.json similarity index 79% rename from core/lib/dal/.sqlx/query-ef70506e90e8add3b95940a7333f8222bd9fbe8ce82d8963f7da03fe6fcf9225.json rename to core/lib/dal/.sqlx/query-b3bccd33945c657856f12b9ced6addab6569d897e748d39abca9538872d986ad.json index cf102b828aa8..f440a2655937 100644 --- a/core/lib/dal/.sqlx/query-ef70506e90e8add3b95940a7333f8222bd9fbe8ce82d8963f7da03fe6fcf9225.json +++ b/core/lib/dal/.sqlx/query-b3bccd33945c657856f12b9ced6addab6569d897e748d39abca9538872d986ad.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT\n miniblocks.number,\n COALESCE(\n miniblocks.l1_batch_number,\n (\n SELECT\n (MAX(number) + 1)\n FROM\n l1_batches\n )\n ) AS \"l1_batch_number!\",\n miniblocks.timestamp,\n miniblocks.l1_tx_count,\n miniblocks.l2_tx_count,\n miniblocks.hash AS \"root_hash?\",\n commit_tx.tx_hash AS \"commit_tx_hash?\",\n commit_tx.confirmed_at AS \"committed_at?\",\n prove_tx.tx_hash AS \"prove_tx_hash?\",\n prove_tx.confirmed_at AS \"proven_at?\",\n execute_tx.tx_hash AS \"execute_tx_hash?\",\n execute_tx.confirmed_at AS \"executed_at?\",\n miniblocks.l1_gas_price,\n miniblocks.l2_fair_gas_price,\n miniblocks.fair_pubdata_price,\n miniblocks.bootloader_code_hash,\n miniblocks.default_aa_code_hash,\n miniblocks.protocol_version,\n miniblocks.fee_account_address\n FROM\n miniblocks\n LEFT JOIN l1_batches ON miniblocks.l1_batch_number = l1_batches.number\n LEFT JOIN eth_txs_history AS commit_tx ON (\n l1_batches.eth_commit_tx_id = commit_tx.eth_tx_id\n AND commit_tx.confirmed_at IS NOT NULL\n )\n LEFT JOIN eth_txs_history AS prove_tx ON (\n l1_batches.eth_prove_tx_id = prove_tx.eth_tx_id\n AND prove_tx.confirmed_at IS NOT NULL\n )\n LEFT JOIN eth_txs_history AS execute_tx ON (\n l1_batches.eth_execute_tx_id = execute_tx.eth_tx_id\n AND execute_tx.confirmed_at IS NOT NULL\n )\n WHERE\n miniblocks.number = $1\n ", + "query": "\n SELECT\n miniblocks.number,\n COALESCE(\n miniblocks.l1_batch_number,\n (\n SELECT\n (MAX(number) + 1)\n FROM\n l1_batches\n )\n ) AS \"l1_batch_number!\",\n miniblocks.timestamp,\n miniblocks.l1_tx_count,\n miniblocks.l2_tx_count,\n miniblocks.hash AS \"root_hash?\",\n commit_tx.tx_hash AS \"commit_tx_hash?\",\n commit_tx.confirmed_at AS \"committed_at?\",\n prove_tx.tx_hash AS \"prove_tx_hash?\",\n prove_tx.confirmed_at AS \"proven_at?\",\n execute_tx.tx_hash AS \"execute_tx_hash?\",\n execute_tx.confirmed_at AS \"executed_at?\",\n miniblocks.l1_gas_price,\n miniblocks.l2_fair_gas_price,\n miniblocks.fair_pubdata_price,\n miniblocks.bootloader_code_hash,\n miniblocks.default_aa_code_hash,\n miniblocks.protocol_version,\n miniblocks.fee_account_address\n FROM\n miniblocks\n LEFT JOIN l1_batches ON miniblocks.l1_batch_number = l1_batches.number\n LEFT JOIN eth_txs_history AS commit_tx\n ON (\n l1_batches.eth_commit_tx_id = commit_tx.eth_tx_id\n AND commit_tx.confirmed_at IS NOT NULL\n )\n LEFT JOIN eth_txs_history AS prove_tx\n ON (\n l1_batches.eth_prove_tx_id = prove_tx.eth_tx_id\n AND prove_tx.confirmed_at IS NOT NULL\n )\n LEFT JOIN eth_txs_history AS execute_tx\n ON (\n l1_batches.eth_execute_tx_id = execute_tx.eth_tx_id\n AND execute_tx.confirmed_at IS NOT NULL\n )\n WHERE\n miniblocks.number = $1\n ", "describe": { "columns": [ { @@ -126,5 +126,5 @@ false ] }, - "hash": "ef70506e90e8add3b95940a7333f8222bd9fbe8ce82d8963f7da03fe6fcf9225" + "hash": "b3bccd33945c657856f12b9ced6addab6569d897e748d39abca9538872d986ad" } diff --git a/core/lib/dal/.sqlx/query-b47a2961dc2f1347864682c572dd1f5e03924dbf6dd1e824d4aca837e604b7e9.json b/core/lib/dal/.sqlx/query-b47a2961dc2f1347864682c572dd1f5e03924dbf6dd1e824d4aca837e604b7e9.json deleted file mode 100644 index 63acfcb30dc7..000000000000 --- a/core/lib/dal/.sqlx/query-b47a2961dc2f1347864682c572dd1f5e03924dbf6dd1e824d4aca837e604b7e9.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n SELECT\n table_name,\n PG_TABLE_SIZE(('public.' || QUOTE_IDENT(table_name))::regclass) AS table_size,\n PG_INDEXES_SIZE(('public.' || QUOTE_IDENT(table_name))::regclass) AS indexes_size,\n PG_RELATION_SIZE(('public.' || QUOTE_IDENT(table_name))::regclass) AS relation_size,\n PG_TOTAL_RELATION_SIZE(('public.' || QUOTE_IDENT(table_name))::regclass) AS total_size\n FROM\n information_schema.tables\n WHERE\n table_schema = 'public'\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "table_name", - "type_info": "Name" - }, - { - "ordinal": 1, - "name": "table_size", - "type_info": "Int8" - }, - { - "ordinal": 2, - "name": "indexes_size", - "type_info": "Int8" - }, - { - "ordinal": 3, - "name": "relation_size", - "type_info": "Int8" - }, - { - "ordinal": 4, - "name": "total_size", - "type_info": "Int8" - } - ], - "parameters": { - "Left": [] - }, - "nullable": [ - true, - null, - null, - null, - null - ] - }, - "hash": "b47a2961dc2f1347864682c572dd1f5e03924dbf6dd1e824d4aca837e604b7e9" -} diff --git a/core/lib/dal/.sqlx/query-b6bfb2d998857f165ee04e282e299bf19b587a16ad70a671b0de48fd608bf31c.json b/core/lib/dal/.sqlx/query-b6bfb2d998857f165ee04e282e299bf19b587a16ad70a671b0de48fd608bf31c.json new file mode 100644 index 000000000000..120fac1021f5 --- /dev/null +++ b/core/lib/dal/.sqlx/query-b6bfb2d998857f165ee04e282e299bf19b587a16ad70a671b0de48fd608bf31c.json @@ -0,0 +1,23 @@ +{ + "db_name": "PostgreSQL", + "query": "\n WITH\n available_batches AS (\n SELECT\n MAX(number) AS \"last_batch\"\n FROM\n l1_batches\n ),\n \n processed_batches AS (\n SELECT\n COALESCE(MAX(l1_batch_number), $1) + $2 AS \"last_ready_batch\"\n FROM\n vm_runner_protective_reads\n WHERE\n time_taken IS NOT NULL\n )\n \n SELECT\n LEAST(last_batch, last_ready_batch) AS \"last_ready_batch!\"\n FROM\n available_batches\n FULL JOIN processed_batches ON TRUE\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "last_ready_batch!", + "type_info": "Int8" + } + ], + "parameters": { + "Left": [ + "Int8", + "Int8" + ] + }, + "nullable": [ + true + ] + }, + "hash": "b6bfb2d998857f165ee04e282e299bf19b587a16ad70a671b0de48fd608bf31c" +} diff --git a/core/lib/dal/.sqlx/query-e1e8ab0cb11c6081d3525228eacbad74e1bab808c744fa14bf24332b39120767.json b/core/lib/dal/.sqlx/query-bba037e1fcffc4415afe3016ff266d19f7ba92c40566e1d098c435da41e95274.json similarity index 50% rename from core/lib/dal/.sqlx/query-e1e8ab0cb11c6081d3525228eacbad74e1bab808c744fa14bf24332b39120767.json rename to core/lib/dal/.sqlx/query-bba037e1fcffc4415afe3016ff266d19f7ba92c40566e1d098c435da41e95274.json index de9937ef7b95..a72b621dae59 100644 --- a/core/lib/dal/.sqlx/query-e1e8ab0cb11c6081d3525228eacbad74e1bab808c744fa14bf24332b39120767.json +++ b/core/lib/dal/.sqlx/query-bba037e1fcffc4415afe3016ff266d19f7ba92c40566e1d098c435da41e95274.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n WITH\n events AS (\n SELECT DISTINCT\n ON (events.tx_hash) *\n FROM\n events\n WHERE\n events.address = $1\n AND events.topic1 = $2\n AND events.tx_hash = ANY ($3)\n ORDER BY\n events.tx_hash,\n events.event_index_in_tx DESC\n )\n SELECT\n transactions.hash AS tx_hash,\n transactions.index_in_block AS index_in_block,\n transactions.l1_batch_tx_index AS l1_batch_tx_index,\n transactions.miniblock_number AS \"block_number!\",\n transactions.error AS error,\n transactions.effective_gas_price AS effective_gas_price,\n transactions.initiator_address AS initiator_address,\n transactions.data -> 'to' AS \"transfer_to?\",\n transactions.data -> 'contractAddress' AS \"execute_contract_address?\",\n transactions.tx_format AS \"tx_format?\",\n transactions.refunded_gas AS refunded_gas,\n transactions.gas_limit AS gas_limit,\n miniblocks.hash AS \"block_hash\",\n miniblocks.l1_batch_number AS \"l1_batch_number?\",\n events.topic4 AS \"contract_address?\",\n miniblocks.timestamp AS \"block_timestamp?\"\n FROM\n transactions\n JOIN miniblocks ON miniblocks.number = transactions.miniblock_number\n LEFT JOIN events ON events.tx_hash = transactions.hash\n WHERE\n transactions.hash = ANY ($3)\n AND transactions.data != '{}'::jsonb\n ", + "query": "\n WITH\n events AS (\n SELECT DISTINCT\n ON (events.tx_hash) *\n FROM\n events\n WHERE\n events.address = $1\n AND events.topic1 = $2\n AND events.tx_hash = ANY($3)\n ORDER BY\n events.tx_hash,\n events.event_index_in_tx DESC\n )\n \n SELECT\n transactions.hash AS tx_hash,\n transactions.index_in_block,\n transactions.l1_batch_tx_index,\n transactions.miniblock_number AS \"block_number!\",\n transactions.error,\n transactions.effective_gas_price,\n transactions.initiator_address,\n transactions.data -> 'to' AS \"transfer_to?\",\n transactions.data -> 'contractAddress' AS \"execute_contract_address?\",\n transactions.tx_format AS \"tx_format?\",\n transactions.refunded_gas,\n transactions.gas_limit,\n miniblocks.hash AS \"block_hash\",\n miniblocks.l1_batch_number AS \"l1_batch_number?\",\n events.topic4 AS \"contract_address?\",\n miniblocks.timestamp AS \"block_timestamp?\"\n FROM\n transactions\n JOIN miniblocks ON miniblocks.number = transactions.miniblock_number\n LEFT JOIN events ON events.tx_hash = transactions.hash\n WHERE\n transactions.hash = ANY($3)\n AND transactions.data != '{}'::jsonb\n ", "describe": { "columns": [ { @@ -110,5 +110,5 @@ false ] }, - "hash": "e1e8ab0cb11c6081d3525228eacbad74e1bab808c744fa14bf24332b39120767" + "hash": "bba037e1fcffc4415afe3016ff266d19f7ba92c40566e1d098c435da41e95274" } diff --git a/core/lib/dal/.sqlx/query-bd51c9d93b103292f5acbdb266ba4b4e2af48907fa9321064ddb24ac02ab17cd.json b/core/lib/dal/.sqlx/query-bd51c9d93b103292f5acbdb266ba4b4e2af48907fa9321064ddb24ac02ab17cd.json deleted file mode 100644 index 7f1fc9b176c5..000000000000 --- a/core/lib/dal/.sqlx/query-bd51c9d93b103292f5acbdb266ba4b4e2af48907fa9321064ddb24ac02ab17cd.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n SELECT\n number\n FROM\n l1_batches\n LEFT JOIN eth_txs_history AS commit_tx ON (l1_batches.eth_commit_tx_id = commit_tx.eth_tx_id)\n WHERE\n commit_tx.confirmed_at IS NOT NULL\n ORDER BY\n number DESC\n LIMIT\n 1\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "number", - "type_info": "Int8" - } - ], - "parameters": { - "Left": [] - }, - "nullable": [ - false - ] - }, - "hash": "bd51c9d93b103292f5acbdb266ba4b4e2af48907fa9321064ddb24ac02ab17cd" -} diff --git a/core/lib/dal/.sqlx/query-bf481c2b498420f80765b837059cab02b0656d863dbfce4b5dad7bc72e52b05d.json b/core/lib/dal/.sqlx/query-bf481c2b498420f80765b837059cab02b0656d863dbfce4b5dad7bc72e52b05d.json deleted file mode 100644 index c353a35ec5e1..000000000000 --- a/core/lib/dal/.sqlx/query-bf481c2b498420f80765b837059cab02b0656d863dbfce4b5dad7bc72e52b05d.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n transactions (\n hash,\n is_priority,\n initiator_address,\n nonce,\n signature,\n gas_limit,\n max_fee_per_gas,\n max_priority_fee_per_gas,\n gas_per_pubdata_limit,\n input,\n data,\n tx_format,\n contract_address,\n value,\n paymaster,\n paymaster_input,\n execution_info,\n miniblock_number,\n index_in_block,\n error,\n effective_gas_price,\n refunded_gas,\n received_at,\n created_at,\n updated_at\n )\n SELECT\n data_table.hash,\n FALSE,\n data_table.initiator_address,\n data_table.nonce,\n data_table.signature,\n data_table.gas_limit,\n data_table.max_fee_per_gas,\n data_table.max_priority_fee_per_gas,\n data_table.gas_per_pubdata_limit,\n data_table.input,\n data_table.data,\n data_table.tx_format,\n data_table.contract_address,\n data_table.value,\n data_table.paymaster,\n data_table.paymaster_input,\n data_table.new_execution_info,\n $21,\n data_table.index_in_block,\n NULLIF(data_table.error, ''),\n data_table.effective_gas_price,\n data_table.refunded_gas,\n NOW(),\n NOW(),\n NOW()\n FROM\n (\n SELECT\n UNNEST($1::bytea[]) AS hash,\n UNNEST($2::bytea[]) AS initiator_address,\n UNNEST($3::INT[]) AS nonce,\n UNNEST($4::bytea[]) AS signature,\n UNNEST($5::NUMERIC[]) AS gas_limit,\n UNNEST($6::NUMERIC[]) AS max_fee_per_gas,\n UNNEST($7::NUMERIC[]) AS max_priority_fee_per_gas,\n UNNEST($8::NUMERIC[]) AS gas_per_pubdata_limit,\n UNNEST($9::bytea[]) AS input,\n UNNEST($10::jsonb[]) AS data,\n UNNEST($11::INT[]) AS tx_format,\n UNNEST($12::bytea[]) AS contract_address,\n UNNEST($13::NUMERIC[]) AS value,\n UNNEST($14::bytea[]) AS paymaster,\n UNNEST($15::bytea[]) AS paymaster_input,\n UNNEST($16::jsonb[]) AS new_execution_info,\n UNNEST($17::INTEGER[]) AS index_in_block,\n UNNEST($18::VARCHAR[]) AS error,\n UNNEST($19::NUMERIC[]) AS effective_gas_price,\n UNNEST($20::BIGINT[]) AS refunded_gas\n ) AS data_table\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "ByteaArray", - "ByteaArray", - "Int4Array", - "ByteaArray", - "NumericArray", - "NumericArray", - "NumericArray", - "NumericArray", - "ByteaArray", - "JsonbArray", - "Int4Array", - "ByteaArray", - "NumericArray", - "ByteaArray", - "ByteaArray", - "JsonbArray", - "Int4Array", - "VarcharArray", - "NumericArray", - "Int8Array", - "Int8" - ] - }, - "nullable": [] - }, - "hash": "bf481c2b498420f80765b837059cab02b0656d863dbfce4b5dad7bc72e52b05d" -} diff --git a/core/lib/dal/.sqlx/query-bfc84bcf0985446b337467dd1da709dbee508ad6d1cae43e477cf1bef8cb4aa9.json b/core/lib/dal/.sqlx/query-bfc84bcf0985446b337467dd1da709dbee508ad6d1cae43e477cf1bef8cb4aa9.json deleted file mode 100644 index 8079d52a7036..000000000000 --- a/core/lib/dal/.sqlx/query-bfc84bcf0985446b337467dd1da709dbee508ad6d1cae43e477cf1bef8cb4aa9.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n SELECT DISTINCT\n hashed_key\n FROM\n storage_logs\n WHERE\n miniblock_number BETWEEN $1 AND $2\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "hashed_key", - "type_info": "Bytea" - } - ], - "parameters": { - "Left": [ - "Int8", - "Int8" - ] - }, - "nullable": [ - false - ] - }, - "hash": "bfc84bcf0985446b337467dd1da709dbee508ad6d1cae43e477cf1bef8cb4aa9" -} diff --git a/core/lib/dal/.sqlx/query-c02f404ce9b0f92b8052ef6f3eaabda70cb9c56ae3e30dc0a8257e43d6714155.json b/core/lib/dal/.sqlx/query-c013947660883612b83bfd207c26c5e9dc50b533524bf856740215aacb8ff5bd.json similarity index 83% rename from core/lib/dal/.sqlx/query-c02f404ce9b0f92b8052ef6f3eaabda70cb9c56ae3e30dc0a8257e43d6714155.json rename to core/lib/dal/.sqlx/query-c013947660883612b83bfd207c26c5e9dc50b533524bf856740215aacb8ff5bd.json index 53a0aa152f95..b8728de2dacc 100644 --- a/core/lib/dal/.sqlx/query-c02f404ce9b0f92b8052ef6f3eaabda70cb9c56ae3e30dc0a8257e43d6714155.json +++ b/core/lib/dal/.sqlx/query-c013947660883612b83bfd207c26c5e9dc50b533524bf856740215aacb8ff5bd.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT\n eth_txs_history.*,\n eth_txs.blob_sidecar\n FROM\n eth_txs_history\n LEFT JOIN eth_txs ON eth_tx_id = eth_txs.id\n WHERE\n eth_tx_id = $1\n ORDER BY\n eth_txs_history.created_at DESC\n LIMIT\n 1\n ", + "query": "\n SELECT\n eth_txs_history.*,\n eth_txs.blob_sidecar\n FROM\n eth_txs_history\n LEFT JOIN eth_txs ON eth_tx_id = eth_txs.id\n WHERE\n eth_tx_id = $1\n ORDER BY\n eth_txs_history.created_at DESC\n LIMIT\n 1\n ", "describe": { "columns": [ { @@ -90,5 +90,5 @@ true ] }, - "hash": "c02f404ce9b0f92b8052ef6f3eaabda70cb9c56ae3e30dc0a8257e43d6714155" + "hash": "c013947660883612b83bfd207c26c5e9dc50b533524bf856740215aacb8ff5bd" } diff --git a/core/lib/dal/.sqlx/query-c138d84e1af2e2ef20395201f55db71f3457e1619a170683e03ddf0e78abaf29.json b/core/lib/dal/.sqlx/query-c138d84e1af2e2ef20395201f55db71f3457e1619a170683e03ddf0e78abaf29.json new file mode 100644 index 000000000000..0d80845d8f77 --- /dev/null +++ b/core/lib/dal/.sqlx/query-c138d84e1af2e2ef20395201f55db71f3457e1619a170683e03ddf0e78abaf29.json @@ -0,0 +1,22 @@ +{ + "db_name": "PostgreSQL", + "query": "\n SELECT\n MAX(l1_batches.number)\n FROM\n l1_batches\n JOIN eth_txs ON (l1_batches.eth_commit_tx_id = eth_txs.id)\n JOIN\n eth_txs_history AS commit_tx\n ON (eth_txs.confirmed_eth_tx_history_id = commit_tx.id)\n WHERE\n commit_tx.confirmed_at IS NOT NULL\n AND eth_prove_tx_id IS NOT NULL\n AND eth_execute_tx_id IS NULL\n AND EXTRACT(\n EPOCH\n FROM\n commit_tx.confirmed_at\n ) < $1\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "max", + "type_info": "Int8" + } + ], + "parameters": { + "Left": [ + "Numeric" + ] + }, + "nullable": [ + null + ] + }, + "hash": "c138d84e1af2e2ef20395201f55db71f3457e1619a170683e03ddf0e78abaf29" +} diff --git a/core/lib/dal/.sqlx/query-afdeecb78e3af802c2b8ffb0f5ab9863082ccd1ce45b2d20e1119f1e78171d66.json b/core/lib/dal/.sqlx/query-c2c40d5aae2e0276de453c78a39ce5a6cca1524adfe99b0cb35662746479dcc1.json similarity index 52% rename from core/lib/dal/.sqlx/query-afdeecb78e3af802c2b8ffb0f5ab9863082ccd1ce45b2d20e1119f1e78171d66.json rename to core/lib/dal/.sqlx/query-c2c40d5aae2e0276de453c78a39ce5a6cca1524adfe99b0cb35662746479dcc1.json index bb0d73ee6c85..61832d25fd24 100644 --- a/core/lib/dal/.sqlx/query-afdeecb78e3af802c2b8ffb0f5ab9863082ccd1ce45b2d20e1119f1e78171d66.json +++ b/core/lib/dal/.sqlx/query-c2c40d5aae2e0276de453c78a39ce5a6cca1524adfe99b0cb35662746479dcc1.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n processed_events (\n TYPE,\n chain_id,\n next_block_to_process\n )\n VALUES\n ($1, $2, $3)\n ", + "query": "\n INSERT INTO\n processed_events (\n type,\n chain_id,\n next_block_to_process\n )\n VALUES\n ($1, $2, $3)\n ", "describe": { "columns": [], "parameters": { @@ -22,5 +22,5 @@ }, "nullable": [] }, - "hash": "afdeecb78e3af802c2b8ffb0f5ab9863082ccd1ce45b2d20e1119f1e78171d66" + "hash": "c2c40d5aae2e0276de453c78a39ce5a6cca1524adfe99b0cb35662746479dcc1" } diff --git a/core/lib/dal/.sqlx/query-c2fe6a5476e69c9588eec73baba9d0e2d571533d4d5f683919987b6f8cbb00e0.json b/core/lib/dal/.sqlx/query-c2fe6a5476e69c9588eec73baba9d0e2d571533d4d5f683919987b6f8cbb00e0.json deleted file mode 100644 index bdabc52d1379..000000000000 --- a/core/lib/dal/.sqlx/query-c2fe6a5476e69c9588eec73baba9d0e2d571533d4d5f683919987b6f8cbb00e0.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n miniblocks_consensus (number, certificate)\n VALUES\n ($1, $2)\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8", - "Jsonb" - ] - }, - "nullable": [] - }, - "hash": "c2fe6a5476e69c9588eec73baba9d0e2d571533d4d5f683919987b6f8cbb00e0" -} diff --git a/core/lib/dal/.sqlx/query-c3af06cc232adb93f16456da07733acd2066a5e238088b39b982b10770f51479.json b/core/lib/dal/.sqlx/query-c3af06cc232adb93f16456da07733acd2066a5e238088b39b982b10770f51479.json deleted file mode 100644 index 1c15bde02fdf..000000000000 --- a/core/lib/dal/.sqlx/query-c3af06cc232adb93f16456da07733acd2066a5e238088b39b982b10770f51479.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n WITH\n events_select AS (\n SELECT\n address,\n topic1,\n topic2,\n topic3,\n topic4,\n value,\n miniblock_number,\n tx_hash,\n tx_index_in_block,\n event_index_in_block,\n event_index_in_tx\n FROM\n events\n WHERE\n miniblock_number > $1\n ORDER BY\n miniblock_number ASC,\n event_index_in_block ASC\n )\n SELECT\n miniblocks.hash AS \"block_hash?\",\n address AS \"address!\",\n topic1 AS \"topic1!\",\n topic2 AS \"topic2!\",\n topic3 AS \"topic3!\",\n topic4 AS \"topic4!\",\n value AS \"value!\",\n miniblock_number AS \"miniblock_number!\",\n miniblocks.l1_batch_number AS \"l1_batch_number?\",\n tx_hash AS \"tx_hash!\",\n tx_index_in_block AS \"tx_index_in_block!\",\n event_index_in_block AS \"event_index_in_block!\",\n event_index_in_tx AS \"event_index_in_tx!\",\n miniblocks.timestamp AS \"block_timestamp\"\n FROM\n events_select\n INNER JOIN miniblocks ON events_select.miniblock_number = miniblocks.number\n ORDER BY\n miniblock_number ASC,\n event_index_in_block ASC\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "block_hash?", - "type_info": "Bytea" - }, - { - "ordinal": 1, - "name": "address!", - "type_info": "Bytea" - }, - { - "ordinal": 2, - "name": "topic1!", - "type_info": "Bytea" - }, - { - "ordinal": 3, - "name": "topic2!", - "type_info": "Bytea" - }, - { - "ordinal": 4, - "name": "topic3!", - "type_info": "Bytea" - }, - { - "ordinal": 5, - "name": "topic4!", - "type_info": "Bytea" - }, - { - "ordinal": 6, - "name": "value!", - "type_info": "Bytea" - }, - { - "ordinal": 7, - "name": "miniblock_number!", - "type_info": "Int8" - }, - { - "ordinal": 8, - "name": "l1_batch_number?", - "type_info": "Int8" - }, - { - "ordinal": 9, - "name": "tx_hash!", - "type_info": "Bytea" - }, - { - "ordinal": 10, - "name": "tx_index_in_block!", - "type_info": "Int4" - }, - { - "ordinal": 11, - "name": "event_index_in_block!", - "type_info": "Int4" - }, - { - "ordinal": 12, - "name": "event_index_in_tx!", - "type_info": "Int4" - }, - { - "ordinal": 13, - "name": "block_timestamp", - "type_info": "Int8" - } - ], - "parameters": { - "Left": [ - "Int8" - ] - }, - "nullable": [ - false, - false, - false, - false, - false, - false, - false, - false, - true, - false, - false, - false, - false, - false - ] - }, - "hash": "c3af06cc232adb93f16456da07733acd2066a5e238088b39b982b10770f51479" -} diff --git a/core/lib/dal/.sqlx/query-c4835d40921af47bfb4f60102bbba3af74e8e7b5944cb2943b5badb906167046.json b/core/lib/dal/.sqlx/query-c4835d40921af47bfb4f60102bbba3af74e8e7b5944cb2943b5badb906167046.json deleted file mode 100644 index 9ae9d2e50cde..000000000000 --- a/core/lib/dal/.sqlx/query-c4835d40921af47bfb4f60102bbba3af74e8e7b5944cb2943b5badb906167046.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n miniblocks (\n number,\n timestamp,\n hash,\n l1_tx_count,\n l2_tx_count,\n fee_account_address,\n base_fee_per_gas,\n l1_gas_price,\n l2_fair_gas_price,\n gas_per_pubdata_limit,\n bootloader_code_hash,\n default_aa_code_hash,\n protocol_version,\n virtual_blocks,\n fair_pubdata_price,\n gas_limit,\n logs_bloom,\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 NOW(),\n NOW()\n )\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8", - "Int8", - "Bytea", - "Int4", - "Int4", - "Bytea", - "Numeric", - "Int8", - "Int8", - "Int8", - "Bytea", - "Bytea", - "Int4", - "Int8", - "Int8", - "Int8", - "Bytea" - ] - }, - "nullable": [] - }, - "hash": "c4835d40921af47bfb4f60102bbba3af74e8e7b5944cb2943b5badb906167046" -} diff --git a/core/lib/dal/.sqlx/query-85576fdbb4bd6e3a6e43511c065a2e3eaf72dfe0fa96b335b76c9506cb1ebdcc.json b/core/lib/dal/.sqlx/query-c4e81f78ef078cbed2d588be91418997f003e26768c5de663160d89af54a1ee7.json similarity index 78% rename from core/lib/dal/.sqlx/query-85576fdbb4bd6e3a6e43511c065a2e3eaf72dfe0fa96b335b76c9506cb1ebdcc.json rename to core/lib/dal/.sqlx/query-c4e81f78ef078cbed2d588be91418997f003e26768c5de663160d89af54a1ee7.json index 3297d411d8a7..162c722add9b 100644 --- a/core/lib/dal/.sqlx/query-85576fdbb4bd6e3a6e43511c065a2e3eaf72dfe0fa96b335b76c9506cb1ebdcc.json +++ b/core/lib/dal/.sqlx/query-c4e81f78ef078cbed2d588be91418997f003e26768c5de663160d89af54a1ee7.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT\n protocol_versions.id AS \"minor!\",\n protocol_versions.timestamp,\n protocol_versions.bootloader_code_hash,\n protocol_versions.default_account_code_hash,\n protocol_patches.patch,\n protocol_patches.snark_wrapper_vk_hash\n FROM\n protocol_versions\n JOIN protocol_patches ON protocol_patches.minor = protocol_versions.id\n WHERE\n id = $1\n ORDER BY\n protocol_patches.patch DESC\n LIMIT\n 1\n ", + "query": "\n SELECT\n protocol_versions.id AS \"minor!\",\n protocol_versions.timestamp,\n protocol_versions.bootloader_code_hash,\n protocol_versions.default_account_code_hash,\n protocol_patches.patch,\n protocol_patches.snark_wrapper_vk_hash\n FROM\n protocol_versions\n JOIN protocol_patches ON protocol_patches.minor = protocol_versions.id\n WHERE\n id = $1\n ORDER BY\n protocol_patches.patch DESC\n LIMIT\n 1\n ", "describe": { "columns": [ { @@ -48,5 +48,5 @@ false ] }, - "hash": "85576fdbb4bd6e3a6e43511c065a2e3eaf72dfe0fa96b335b76c9506cb1ebdcc" + "hash": "c4e81f78ef078cbed2d588be91418997f003e26768c5de663160d89af54a1ee7" } diff --git a/core/lib/dal/.sqlx/query-c5480ba88a93bb7da027e36e0939f1fd7606fdf3e6d4c882cea76eb579c24a93.json b/core/lib/dal/.sqlx/query-c5480ba88a93bb7da027e36e0939f1fd7606fdf3e6d4c882cea76eb579c24a93.json new file mode 100644 index 000000000000..09e34a7e33ac --- /dev/null +++ b/core/lib/dal/.sqlx/query-c5480ba88a93bb7da027e36e0939f1fd7606fdf3e6d4c882cea76eb579c24a93.json @@ -0,0 +1,30 @@ +{ + "db_name": "PostgreSQL", + "query": "\n INSERT INTO\n miniblocks (\n number,\n timestamp,\n hash,\n l1_tx_count,\n l2_tx_count,\n fee_account_address,\n base_fee_per_gas,\n l1_gas_price,\n l2_fair_gas_price,\n gas_per_pubdata_limit,\n bootloader_code_hash,\n default_aa_code_hash,\n protocol_version,\n virtual_blocks,\n fair_pubdata_price,\n gas_limit,\n logs_bloom,\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 NOW(),\n NOW()\n )\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8", + "Int8", + "Bytea", + "Int4", + "Int4", + "Bytea", + "Numeric", + "Int8", + "Int8", + "Int8", + "Bytea", + "Bytea", + "Int4", + "Int8", + "Int8", + "Int8", + "Bytea" + ] + }, + "nullable": [] + }, + "hash": "c5480ba88a93bb7da027e36e0939f1fd7606fdf3e6d4c882cea76eb579c24a93" +} diff --git a/core/lib/dal/.sqlx/query-c5aef75dbeb520c965a0996abed9713f437db492e2075ca69e11e2ef5728ccaa.json b/core/lib/dal/.sqlx/query-c5aef75dbeb520c965a0996abed9713f437db492e2075ca69e11e2ef5728ccaa.json deleted file mode 100644 index 6dd2f6cc7a9f..000000000000 --- a/core/lib/dal/.sqlx/query-c5aef75dbeb520c965a0996abed9713f437db492e2075ca69e11e2ef5728ccaa.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n base_token_ratios (numerator, denominator, ratio_timestamp, created_at, updated_at)\n VALUES\n ($1, $2, $3, NOW(), NOW())\n RETURNING\n id\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "id", - "type_info": "Int4" - } - ], - "parameters": { - "Left": [ - "Numeric", - "Numeric", - "Timestamp" - ] - }, - "nullable": [ - false - ] - }, - "hash": "c5aef75dbeb520c965a0996abed9713f437db492e2075ca69e11e2ef5728ccaa" -} diff --git a/core/lib/dal/.sqlx/query-c5dfe49f8042f773ced96f8363819da280e72546298b615b88662fa4a19f2bdf.json b/core/lib/dal/.sqlx/query-c5dfe49f8042f773ced96f8363819da280e72546298b615b88662fa4a19f2bdf.json new file mode 100644 index 000000000000..532d1d929b47 --- /dev/null +++ b/core/lib/dal/.sqlx/query-c5dfe49f8042f773ced96f8363819da280e72546298b615b88662fa4a19f2bdf.json @@ -0,0 +1,14 @@ +{ + "db_name": "PostgreSQL", + "query": "\n INSERT INTO\n vm_runner_bwip (l1_batch_number, created_at, updated_at, processing_started_at)\n VALUES\n ($1, NOW(), NOW(), NOW())\n ON CONFLICT (l1_batch_number) DO\n UPDATE\n SET\n updated_at = NOW(),\n processing_started_at = NOW()\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8" + ] + }, + "nullable": [] + }, + "hash": "c5dfe49f8042f773ced96f8363819da280e72546298b615b88662fa4a19f2bdf" +} diff --git a/core/lib/dal/.sqlx/query-c69d19005dd28bd0abfc84e29fd9442f610a6c57280615eb8c982a4afb847aff.json b/core/lib/dal/.sqlx/query-c69d19005dd28bd0abfc84e29fd9442f610a6c57280615eb8c982a4afb847aff.json new file mode 100644 index 000000000000..b12a7fb24906 --- /dev/null +++ b/core/lib/dal/.sqlx/query-c69d19005dd28bd0abfc84e29fd9442f610a6c57280615eb8c982a4afb847aff.json @@ -0,0 +1,17 @@ +{ + "db_name": "PostgreSQL", + "query": "\n INSERT INTO\n snapshots (\n version,\n l1_batch_number,\n storage_logs_filepaths,\n factory_deps_filepath,\n created_at,\n updated_at\n )\n VALUES\n ($1, $2, ARRAY_FILL(''::TEXT, ARRAY[$3::INTEGER]), $4, NOW(), NOW())\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int4", + "Int8", + "Int4", + "Text" + ] + }, + "nullable": [] + }, + "hash": "c69d19005dd28bd0abfc84e29fd9442f610a6c57280615eb8c982a4afb847aff" +} diff --git a/core/lib/dal/.sqlx/query-c6d523c6ae857022318350a2f210d7eaeeb4549ed59b58f8d984be2a22a80355.json b/core/lib/dal/.sqlx/query-c6d523c6ae857022318350a2f210d7eaeeb4549ed59b58f8d984be2a22a80355.json deleted file mode 100644 index ebae1f42fbbb..000000000000 --- a/core/lib/dal/.sqlx/query-c6d523c6ae857022318350a2f210d7eaeeb4549ed59b58f8d984be2a22a80355.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n SELECT\n MAX(l1_batches.number)\n FROM\n l1_batches\n JOIN eth_txs ON (l1_batches.eth_commit_tx_id = eth_txs.id)\n JOIN eth_txs_history AS commit_tx ON (eth_txs.confirmed_eth_tx_history_id = commit_tx.id)\n WHERE\n commit_tx.confirmed_at IS NOT NULL\n AND eth_prove_tx_id IS NOT NULL\n AND eth_execute_tx_id IS NULL\n AND EXTRACT(\n epoch\n FROM\n commit_tx.confirmed_at\n ) < $1\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "max", - "type_info": "Int8" - } - ], - "parameters": { - "Left": [ - "Numeric" - ] - }, - "nullable": [ - null - ] - }, - "hash": "c6d523c6ae857022318350a2f210d7eaeeb4549ed59b58f8d984be2a22a80355" -} diff --git a/core/lib/dal/.sqlx/query-c8dd57fb86247e67896485c6295d5cfa6c8498e8a58b8ae6fe3a1584401d3b4b.json b/core/lib/dal/.sqlx/query-c8dd57fb86247e67896485c6295d5cfa6c8498e8a58b8ae6fe3a1584401d3b4b.json new file mode 100644 index 000000000000..f442976281d5 --- /dev/null +++ b/core/lib/dal/.sqlx/query-c8dd57fb86247e67896485c6295d5cfa6c8498e8a58b8ae6fe3a1584401d3b4b.json @@ -0,0 +1,16 @@ +{ + "db_name": "PostgreSQL", + "query": "\n INSERT INTO\n consensus_replica_state (fake_key, global_config, genesis, state)\n VALUES\n (TRUE, $1, $2, $3)\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Jsonb", + "Jsonb", + "Jsonb" + ] + }, + "nullable": [] + }, + "hash": "c8dd57fb86247e67896485c6295d5cfa6c8498e8a58b8ae6fe3a1584401d3b4b" +} diff --git a/core/lib/dal/.sqlx/query-6849be0788a509e4e68acc2da4bfadbcfc343374fad173df0cc8db38419a9726.json b/core/lib/dal/.sqlx/query-c9742c7f58c5c0f676cee0d0d3a9309c1b45d0134a6c6e15533443353db3bee6.json similarity index 63% rename from core/lib/dal/.sqlx/query-6849be0788a509e4e68acc2da4bfadbcfc343374fad173df0cc8db38419a9726.json rename to core/lib/dal/.sqlx/query-c9742c7f58c5c0f676cee0d0d3a9309c1b45d0134a6c6e15533443353db3bee6.json index 72dbb2a4178b..cabf48d4df78 100644 --- a/core/lib/dal/.sqlx/query-6849be0788a509e4e68acc2da4bfadbcfc343374fad173df0cc8db38419a9726.json +++ b/core/lib/dal/.sqlx/query-c9742c7f58c5c0f676cee0d0d3a9309c1b45d0134a6c6e15533443353db3bee6.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n DELETE FROM tokens\n WHERE\n l2_address = ANY ($1)\n ", + "query": "\n DELETE FROM tokens\n WHERE\n l2_address = ANY($1)\n ", "describe": { "columns": [], "parameters": { @@ -10,5 +10,5 @@ }, "nullable": [] }, - "hash": "6849be0788a509e4e68acc2da4bfadbcfc343374fad173df0cc8db38419a9726" + "hash": "c9742c7f58c5c0f676cee0d0d3a9309c1b45d0134a6c6e15533443353db3bee6" } diff --git a/core/lib/dal/.sqlx/query-c9a842d04e8b225e43f07f76541dc766262b5bdc58be0444e164b1bd9feed02d.json b/core/lib/dal/.sqlx/query-c9a842d04e8b225e43f07f76541dc766262b5bdc58be0444e164b1bd9feed02d.json new file mode 100644 index 000000000000..fb28539ccdf6 --- /dev/null +++ b/core/lib/dal/.sqlx/query-c9a842d04e8b225e43f07f76541dc766262b5bdc58be0444e164b1bd9feed02d.json @@ -0,0 +1,38 @@ +{ + "db_name": "PostgreSQL", + "query": "\n WITH\n soft AS (\n SELECT\n pruned_l1_batch,\n pruned_miniblock\n FROM\n pruning_log\n WHERE\n type = 'Soft'\n ORDER BY\n pruned_l1_batch DESC\n LIMIT\n 1\n ),\n \n hard AS (\n SELECT\n pruned_l1_batch,\n pruned_miniblock\n FROM\n pruning_log\n WHERE\n type = 'Hard'\n ORDER BY\n pruned_l1_batch DESC\n LIMIT\n 1\n )\n \n SELECT\n soft.pruned_l1_batch AS last_soft_pruned_l1_batch,\n soft.pruned_miniblock AS last_soft_pruned_miniblock,\n hard.pruned_l1_batch AS last_hard_pruned_l1_batch,\n hard.pruned_miniblock AS last_hard_pruned_miniblock\n FROM\n soft\n FULL JOIN hard ON TRUE\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "last_soft_pruned_l1_batch", + "type_info": "Int8" + }, + { + "ordinal": 1, + "name": "last_soft_pruned_miniblock", + "type_info": "Int8" + }, + { + "ordinal": 2, + "name": "last_hard_pruned_l1_batch", + "type_info": "Int8" + }, + { + "ordinal": 3, + "name": "last_hard_pruned_miniblock", + "type_info": "Int8" + } + ], + "parameters": { + "Left": [] + }, + "nullable": [ + true, + true, + true, + true + ] + }, + "hash": "c9a842d04e8b225e43f07f76541dc766262b5bdc58be0444e164b1bd9feed02d" +} diff --git a/core/lib/dal/.sqlx/query-ca428423f278feea2942fd2c78fc5223c9d5e2e42d89bb456d24c601edc06a05.json b/core/lib/dal/.sqlx/query-ca428423f278feea2942fd2c78fc5223c9d5e2e42d89bb456d24c601edc06a05.json new file mode 100644 index 000000000000..c234cbe42356 --- /dev/null +++ b/core/lib/dal/.sqlx/query-ca428423f278feea2942fd2c78fc5223c9d5e2e42d89bb456d24c601edc06a05.json @@ -0,0 +1,40 @@ +{ + "db_name": "PostgreSQL", + "query": "\n INSERT INTO\n transactions (\n hash,\n is_priority,\n initiator_address,\n nonce,\n signature,\n gas_limit,\n max_fee_per_gas,\n max_priority_fee_per_gas,\n gas_per_pubdata_limit,\n input,\n data,\n tx_format,\n contract_address,\n value,\n paymaster,\n paymaster_input,\n execution_info,\n received_at,\n created_at,\n updated_at\n )\n VALUES\n (\n $1,\n FALSE,\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 JSONB_BUILD_OBJECT(\n 'gas_used',\n $16::BIGINT,\n 'storage_writes',\n $17::INT,\n 'contracts_used',\n $18::INT\n ),\n $19,\n NOW(),\n NOW()\n )\n ON CONFLICT (initiator_address, nonce) DO\n UPDATE\n SET\n hash = $1,\n signature = $4,\n gas_limit = $5,\n max_fee_per_gas = $6,\n max_priority_fee_per_gas = $7,\n gas_per_pubdata_limit = $8,\n input = $9,\n data = $10,\n tx_format = $11,\n contract_address = $12,\n value = $13,\n paymaster = $14,\n paymaster_input = $15,\n execution_info\n = JSONB_BUILD_OBJECT(\n 'gas_used',\n $16::BIGINT,\n 'storage_writes',\n $17::INT,\n 'contracts_used',\n $18::INT\n ),\n in_mempool = FALSE,\n received_at = $19,\n created_at = NOW(),\n updated_at = NOW(),\n error = NULL\n WHERE\n transactions.is_priority = FALSE\n AND transactions.miniblock_number IS NULL\n RETURNING\n (\n SELECT\n hash\n FROM\n transactions\n WHERE\n transactions.initiator_address = $2\n AND transactions.nonce = $3\n ) IS NOT NULL AS \"is_replaced!\"\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "is_replaced!", + "type_info": "Bool" + } + ], + "parameters": { + "Left": [ + "Bytea", + "Bytea", + "Int8", + "Bytea", + "Numeric", + "Numeric", + "Numeric", + "Numeric", + "Bytea", + "Jsonb", + "Int4", + "Bytea", + "Numeric", + "Bytea", + "Bytea", + "Int8", + "Int4", + "Int4", + "Timestamp" + ] + }, + "nullable": [ + null + ] + }, + "hash": "ca428423f278feea2942fd2c78fc5223c9d5e2e42d89bb456d24c601edc06a05" +} diff --git a/core/lib/dal/.sqlx/query-58f900812efdb615f6286eb4212c3252680594256dccb0d7e51444f613011980.json b/core/lib/dal/.sqlx/query-cda64a69c8df8eaf67d09324f8283c5b416cbb2c1a1e2712dce1f01835181c3b.json similarity index 85% rename from core/lib/dal/.sqlx/query-58f900812efdb615f6286eb4212c3252680594256dccb0d7e51444f613011980.json rename to core/lib/dal/.sqlx/query-cda64a69c8df8eaf67d09324f8283c5b416cbb2c1a1e2712dce1f01835181c3b.json index 0b45e2c25c2c..69718cebdbe0 100644 --- a/core/lib/dal/.sqlx/query-58f900812efdb615f6286eb4212c3252680594256dccb0d7e51444f613011980.json +++ b/core/lib/dal/.sqlx/query-cda64a69c8df8eaf67d09324f8283c5b416cbb2c1a1e2712dce1f01835181c3b.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 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 ", + "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": [ { @@ -84,5 +84,5 @@ false ] }, - "hash": "58f900812efdb615f6286eb4212c3252680594256dccb0d7e51444f613011980" + "hash": "cda64a69c8df8eaf67d09324f8283c5b416cbb2c1a1e2712dce1f01835181c3b" } diff --git a/core/lib/dal/.sqlx/query-29a9350164fc0b2983f753e105a70e583b455383eec526eee3acfe6670e30f2f.json b/core/lib/dal/.sqlx/query-cda66c56ab9ff1dcb1b2882a23c4acdfc5af364d7271c06db0c95e0f1b0e33f9.json similarity index 56% rename from core/lib/dal/.sqlx/query-29a9350164fc0b2983f753e105a70e583b455383eec526eee3acfe6670e30f2f.json rename to core/lib/dal/.sqlx/query-cda66c56ab9ff1dcb1b2882a23c4acdfc5af364d7271c06db0c95e0f1b0e33f9.json index 7582e0f64e75..ec79549adbd8 100644 --- a/core/lib/dal/.sqlx/query-29a9350164fc0b2983f753e105a70e583b455383eec526eee3acfe6670e30f2f.json +++ b/core/lib/dal/.sqlx/query-cda66c56ab9ff1dcb1b2882a23c4acdfc5af364d7271c06db0c95e0f1b0e33f9.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n UPDATE miniblocks\n SET\n logs_bloom = data.logs_bloom\n FROM\n (\n SELECT\n UNNEST($1::BIGINT[]) AS number,\n UNNEST($2::BYTEA[]) AS logs_bloom\n ) AS data\n WHERE\n miniblocks.number = data.number\n ", + "query": "\n UPDATE miniblocks\n SET\n logs_bloom = data.logs_bloom\n FROM\n (\n SELECT\n UNNEST($1::BIGINT []) AS number,\n UNNEST($2::BYTEA []) AS logs_bloom\n ) AS data\n WHERE\n miniblocks.number = data.number\n ", "describe": { "columns": [], "parameters": { @@ -11,5 +11,5 @@ }, "nullable": [] }, - "hash": "29a9350164fc0b2983f753e105a70e583b455383eec526eee3acfe6670e30f2f" + "hash": "cda66c56ab9ff1dcb1b2882a23c4acdfc5af364d7271c06db0c95e0f1b0e33f9" } diff --git a/core/lib/dal/.sqlx/query-cf8cff1e6d277088519ef7dfbdb1885d320c146cd8fad77c107ef12fa38e6c98.json b/core/lib/dal/.sqlx/query-cf8cff1e6d277088519ef7dfbdb1885d320c146cd8fad77c107ef12fa38e6c98.json deleted file mode 100644 index 1bd791a3f829..000000000000 --- a/core/lib/dal/.sqlx/query-cf8cff1e6d277088519ef7dfbdb1885d320c146cd8fad77c107ef12fa38e6c98.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n transactions (\n hash,\n is_priority,\n initiator_address,\n nonce,\n signature,\n gas_limit,\n max_fee_per_gas,\n max_priority_fee_per_gas,\n gas_per_pubdata_limit,\n input,\n data,\n tx_format,\n contract_address,\n value,\n paymaster,\n paymaster_input,\n execution_info,\n received_at,\n created_at,\n updated_at\n )\n VALUES\n (\n $1,\n FALSE,\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 JSONB_BUILD_OBJECT('gas_used', $16::BIGINT, 'storage_writes', $17::INT, 'contracts_used', $18::INT),\n $19,\n NOW(),\n NOW()\n )\n ON CONFLICT (initiator_address, nonce) DO\n UPDATE\n SET\n hash = $1,\n signature = $4,\n gas_limit = $5,\n max_fee_per_gas = $6,\n max_priority_fee_per_gas = $7,\n gas_per_pubdata_limit = $8,\n input = $9,\n data = $10,\n tx_format = $11,\n contract_address = $12,\n value = $13,\n paymaster = $14,\n paymaster_input = $15,\n execution_info = JSONB_BUILD_OBJECT('gas_used', $16::BIGINT, 'storage_writes', $17::INT, 'contracts_used', $18::INT),\n in_mempool = FALSE,\n received_at = $19,\n created_at = NOW(),\n updated_at = NOW(),\n error = NULL\n WHERE\n transactions.is_priority = FALSE\n AND transactions.miniblock_number IS NULL\n RETURNING\n (\n SELECT\n hash\n FROM\n transactions\n WHERE\n transactions.initiator_address = $2\n AND transactions.nonce = $3\n ) IS NOT NULL AS \"is_replaced!\"\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "is_replaced!", - "type_info": "Bool" - } - ], - "parameters": { - "Left": [ - "Bytea", - "Bytea", - "Int8", - "Bytea", - "Numeric", - "Numeric", - "Numeric", - "Numeric", - "Bytea", - "Jsonb", - "Int4", - "Bytea", - "Numeric", - "Bytea", - "Bytea", - "Int8", - "Int4", - "Int4", - "Timestamp" - ] - }, - "nullable": [ - null - ] - }, - "hash": "cf8cff1e6d277088519ef7dfbdb1885d320c146cd8fad77c107ef12fa38e6c98" -} diff --git a/core/lib/dal/.sqlx/query-0385576f1fb3836fc04a6cde3e92c03e1de8292eb0ea1e026ba1b32a3745c261.json b/core/lib/dal/.sqlx/query-cff500ffe0b6586dd96eb2d3620dd6542fd54ceac41dd41b995a8409c5ab046c.json similarity index 55% rename from core/lib/dal/.sqlx/query-0385576f1fb3836fc04a6cde3e92c03e1de8292eb0ea1e026ba1b32a3745c261.json rename to core/lib/dal/.sqlx/query-cff500ffe0b6586dd96eb2d3620dd6542fd54ceac41dd41b995a8409c5ab046c.json index a98cbb18034a..ec8bfeafc781 100644 --- a/core/lib/dal/.sqlx/query-0385576f1fb3836fc04a6cde3e92c03e1de8292eb0ea1e026ba1b32a3745c261.json +++ b/core/lib/dal/.sqlx/query-cff500ffe0b6586dd96eb2d3620dd6542fd54ceac41dd41b995a8409c5ab046c.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT\n storage_logs.hashed_key AS \"hashed_key!\",\n storage_logs.value AS \"value!\",\n storage_logs.miniblock_number AS \"miniblock_number!\",\n initial_writes.l1_batch_number AS \"l1_batch_number!\",\n initial_writes.index\n FROM\n (\n SELECT\n hashed_key,\n MAX(ARRAY[miniblock_number, operation_number]::INT[]) AS op\n FROM\n storage_logs\n WHERE\n miniblock_number <= $1\n AND hashed_key >= $3\n AND hashed_key <= $4\n GROUP BY\n hashed_key\n ORDER BY\n hashed_key\n ) AS keys\n INNER JOIN storage_logs ON keys.hashed_key = storage_logs.hashed_key\n AND storage_logs.miniblock_number = keys.op[1]\n AND storage_logs.operation_number = keys.op[2]\n INNER JOIN initial_writes ON keys.hashed_key = initial_writes.hashed_key\n WHERE\n initial_writes.l1_batch_number <= $2\n ", + "query": "\n SELECT\n storage_logs.hashed_key AS \"hashed_key!\",\n storage_logs.value AS \"value!\",\n storage_logs.miniblock_number AS \"miniblock_number!\",\n initial_writes.l1_batch_number AS \"l1_batch_number!\",\n initial_writes.index\n FROM\n (\n SELECT\n hashed_key,\n MAX(ARRAY[miniblock_number, operation_number]::INT []) AS op\n FROM\n storage_logs\n WHERE\n miniblock_number <= $1\n AND hashed_key >= $3\n AND hashed_key <= $4\n GROUP BY\n hashed_key\n ORDER BY\n hashed_key\n ) AS keys\n INNER JOIN storage_logs\n ON\n keys.hashed_key = storage_logs.hashed_key\n AND storage_logs.miniblock_number = keys.op[1]\n AND storage_logs.operation_number = keys.op[2]\n INNER JOIN initial_writes ON keys.hashed_key = initial_writes.hashed_key\n WHERE\n initial_writes.l1_batch_number <= $2\n ", "describe": { "columns": [ { @@ -45,5 +45,5 @@ false ] }, - "hash": "0385576f1fb3836fc04a6cde3e92c03e1de8292eb0ea1e026ba1b32a3745c261" + "hash": "cff500ffe0b6586dd96eb2d3620dd6542fd54ceac41dd41b995a8409c5ab046c" } diff --git a/core/lib/dal/.sqlx/query-4aeb7dcd79000540c03fb12c0608ab71005d70f13ed32172e47166f71b3aef80.json b/core/lib/dal/.sqlx/query-d08cb5418fe30fd7417f8bf0505c7fbb13c7719f73dba603053044b794d786eb.json similarity index 56% rename from core/lib/dal/.sqlx/query-4aeb7dcd79000540c03fb12c0608ab71005d70f13ed32172e47166f71b3aef80.json rename to core/lib/dal/.sqlx/query-d08cb5418fe30fd7417f8bf0505c7fbb13c7719f73dba603053044b794d786eb.json index feb8f29855e4..677563873e0d 100644 --- a/core/lib/dal/.sqlx/query-4aeb7dcd79000540c03fb12c0608ab71005d70f13ed32172e47166f71b3aef80.json +++ b/core/lib/dal/.sqlx/query-d08cb5418fe30fd7417f8bf0505c7fbb13c7719f73dba603053044b794d786eb.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT\n nonce\n FROM\n eth_txs\n WHERE\n from_addr IS NOT DISTINCT FROM $1 -- can't just use equality as NULL != NULL\\\n AND is_gateway = $2\n ORDER BY\n id DESC\n LIMIT\n 1\n ", + "query": "\n SELECT\n nonce\n FROM\n eth_txs\n WHERE\n -- can't just use equality as NULL != NULL\n from_addr IS NOT DISTINCT FROM $1\n AND is_gateway = $2\n ORDER BY\n id DESC\n LIMIT\n 1\n ", "describe": { "columns": [ { @@ -19,5 +19,5 @@ false ] }, - "hash": "4aeb7dcd79000540c03fb12c0608ab71005d70f13ed32172e47166f71b3aef80" + "hash": "d08cb5418fe30fd7417f8bf0505c7fbb13c7719f73dba603053044b794d786eb" } diff --git a/core/lib/dal/.sqlx/query-d0db89030ed6979ecba6786aef1ac9ff144a09e68db07e4ca1c1de105765711f.json b/core/lib/dal/.sqlx/query-d0db89030ed6979ecba6786aef1ac9ff144a09e68db07e4ca1c1de105765711f.json new file mode 100644 index 000000000000..a4f55f53f8cb --- /dev/null +++ b/core/lib/dal/.sqlx/query-d0db89030ed6979ecba6786aef1ac9ff144a09e68db07e4ca1c1de105765711f.json @@ -0,0 +1,15 @@ +{ + "db_name": "PostgreSQL", + "query": "\n INSERT INTO\n compiler_versions (version, compiler, created_at, updated_at)\n SELECT\n u.version,\n $2,\n NOW(),\n NOW()\n FROM\n UNNEST($1::TEXT []) AS u (version)\n ON CONFLICT (version, compiler) DO NOTHING\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "TextArray", + "Text" + ] + }, + "nullable": [] + }, + "hash": "d0db89030ed6979ecba6786aef1ac9ff144a09e68db07e4ca1c1de105765711f" +} diff --git a/core/lib/dal/.sqlx/query-d1490262c7a2a583928a611ae69eb0539849f7fd590712103db7d45d119caca2.json b/core/lib/dal/.sqlx/query-d1490262c7a2a583928a611ae69eb0539849f7fd590712103db7d45d119caca2.json new file mode 100644 index 000000000000..e3b05aff72a2 --- /dev/null +++ b/core/lib/dal/.sqlx/query-d1490262c7a2a583928a611ae69eb0539849f7fd590712103db7d45d119caca2.json @@ -0,0 +1,15 @@ +{ + "db_name": "PostgreSQL", + "query": "\n INSERT INTO\n call_traces (tx_hash, call_trace)\n SELECT\n u.tx_hash,\n u.call_trace\n FROM\n UNNEST($1::bytea [], $2::bytea []) AS u (tx_hash, call_trace)\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "ByteaArray", + "ByteaArray" + ] + }, + "nullable": [] + }, + "hash": "d1490262c7a2a583928a611ae69eb0539849f7fd590712103db7d45d119caca2" +} diff --git a/core/lib/dal/.sqlx/query-d3abe74360732659a1a35a176679411ba30ac67080552279d821d66b1b804db3.json b/core/lib/dal/.sqlx/query-d3abe74360732659a1a35a176679411ba30ac67080552279d821d66b1b804db3.json deleted file mode 100644 index 2b5eeec2e638..000000000000 --- a/core/lib/dal/.sqlx/query-d3abe74360732659a1a35a176679411ba30ac67080552279d821d66b1b804db3.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n vm_runner_protective_reads (l1_batch_number, created_at, updated_at, processing_started_at)\n VALUES\n ($1, NOW(), NOW(), NOW())\n ON CONFLICT (l1_batch_number) DO\n UPDATE\n SET\n updated_at = NOW(),\n processing_started_at = NOW()\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8" - ] - }, - "nullable": [] - }, - "hash": "d3abe74360732659a1a35a176679411ba30ac67080552279d821d66b1b804db3" -} diff --git a/core/lib/dal/.sqlx/query-d3b09cbcddf6238b358d32d57678242aad3e9a47400f6d6837a35f4c54a216b9.json b/core/lib/dal/.sqlx/query-d3b09cbcddf6238b358d32d57678242aad3e9a47400f6d6837a35f4c54a216b9.json deleted file mode 100644 index 8770a9b596ea..000000000000 --- a/core/lib/dal/.sqlx/query-d3b09cbcddf6238b358d32d57678242aad3e9a47400f6d6837a35f4c54a216b9.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n SELECT\n number\n FROM\n l1_batches\n LEFT JOIN eth_txs_history AS execute_tx ON (l1_batches.eth_execute_tx_id = execute_tx.eth_tx_id)\n WHERE\n execute_tx.confirmed_at IS NOT NULL\n ORDER BY\n number DESC\n LIMIT\n 1\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "number", - "type_info": "Int8" - } - ], - "parameters": { - "Left": [] - }, - "nullable": [ - false - ] - }, - "hash": "d3b09cbcddf6238b358d32d57678242aad3e9a47400f6d6837a35f4c54a216b9" -} diff --git a/core/lib/dal/.sqlx/query-ba2343a38e37d104786f9276d91f67d2ef1428c61ae84003c9b52b03204d1f0a.json b/core/lib/dal/.sqlx/query-d43ae07cf1539826363573d121392687cfe890fe89c748f836bad6eb0cc0fcf5.json similarity index 70% rename from core/lib/dal/.sqlx/query-ba2343a38e37d104786f9276d91f67d2ef1428c61ae84003c9b52b03204d1f0a.json rename to core/lib/dal/.sqlx/query-d43ae07cf1539826363573d121392687cfe890fe89c748f836bad6eb0cc0fcf5.json index ff6082651184..650b9f8d4399 100644 --- a/core/lib/dal/.sqlx/query-ba2343a38e37d104786f9276d91f67d2ef1428c61ae84003c9b52b03204d1f0a.json +++ b/core/lib/dal/.sqlx/query-d43ae07cf1539826363573d121392687cfe890fe89c748f836bad6eb0cc0fcf5.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n DELETE FROM transactions\n WHERE\n in_mempool = TRUE\n AND initiator_address = ANY ($1)\n ", + "query": "\n DELETE FROM transactions\n WHERE\n in_mempool = TRUE\n AND initiator_address = ANY($1)\n ", "describe": { "columns": [], "parameters": { @@ -10,5 +10,5 @@ }, "nullable": [] }, - "hash": "ba2343a38e37d104786f9276d91f67d2ef1428c61ae84003c9b52b03204d1f0a" + "hash": "d43ae07cf1539826363573d121392687cfe890fe89c748f836bad6eb0cc0fcf5" } diff --git a/core/lib/dal/.sqlx/query-b75e3d2fecbf5d85e93848b7a35180abbd76956e073432af8d8500327b74e488.json b/core/lib/dal/.sqlx/query-d46fcdcb100b240aa5f2b23d07e6abe3514e755546ac39a5fddae03a3a435e3d.json similarity index 64% rename from core/lib/dal/.sqlx/query-b75e3d2fecbf5d85e93848b7a35180abbd76956e073432af8d8500327b74e488.json rename to core/lib/dal/.sqlx/query-d46fcdcb100b240aa5f2b23d07e6abe3514e755546ac39a5fddae03a3a435e3d.json index 91d7b677959a..f9c72f3d34f6 100644 --- a/core/lib/dal/.sqlx/query-b75e3d2fecbf5d85e93848b7a35180abbd76956e073432af8d8500327b74e488.json +++ b/core/lib/dal/.sqlx/query-d46fcdcb100b240aa5f2b23d07e6abe3514e755546ac39a5fddae03a3a435e3d.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT\n VERSION\n FROM\n compiler_versions\n WHERE\n compiler = $1\n ORDER BY\n VERSION\n ", + "query": "\n SELECT\n VERSION\n FROM\n COMPILER_VERSIONS\n WHERE\n COMPILER = $1\n ORDER BY\n VERSION\n ", "describe": { "columns": [ { @@ -18,5 +18,5 @@ false ] }, - "hash": "b75e3d2fecbf5d85e93848b7a35180abbd76956e073432af8d8500327b74e488" + "hash": "d46fcdcb100b240aa5f2b23d07e6abe3514e755546ac39a5fddae03a3a435e3d" } diff --git a/core/lib/dal/.sqlx/query-d47574939bdfb157a621f86a3ea3a61bf579a0dbeb01c545fa61b10a0047297b.json b/core/lib/dal/.sqlx/query-d47574939bdfb157a621f86a3ea3a61bf579a0dbeb01c545fa61b10a0047297b.json new file mode 100644 index 000000000000..0915ef2b1950 --- /dev/null +++ b/core/lib/dal/.sqlx/query-d47574939bdfb157a621f86a3ea3a61bf579a0dbeb01c545fa61b10a0047297b.json @@ -0,0 +1,26 @@ +{ + "db_name": "PostgreSQL", + "query": "\n INSERT INTO\n pruning_log (\n pruned_l1_batch,\n pruned_miniblock,\n type,\n created_at,\n updated_at\n )\n VALUES\n ($1, $2, $3, NOW(), NOW())\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8", + "Int8", + { + "Custom": { + "name": "prune_type", + "kind": { + "Enum": [ + "Soft", + "Hard" + ] + } + } + } + ] + }, + "nullable": [] + }, + "hash": "d47574939bdfb157a621f86a3ea3a61bf579a0dbeb01c545fa61b10a0047297b" +} diff --git a/core/lib/dal/.sqlx/query-f1a90090c192d68367e799188356efe8d41759bbdcdd6d39db93208f2664f03a.json b/core/lib/dal/.sqlx/query-d7bd14e6550df54657c37d389c4ed79cde6d6d0a75702953b16df1a9748b11f5.json similarity index 64% rename from core/lib/dal/.sqlx/query-f1a90090c192d68367e799188356efe8d41759bbdcdd6d39db93208f2664f03a.json rename to core/lib/dal/.sqlx/query-d7bd14e6550df54657c37d389c4ed79cde6d6d0a75702953b16df1a9748b11f5.json index 616173355a94..5d47321965c5 100644 --- a/core/lib/dal/.sqlx/query-f1a90090c192d68367e799188356efe8d41759bbdcdd6d39db93208f2664f03a.json +++ b/core/lib/dal/.sqlx/query-d7bd14e6550df54657c37d389c4ed79cde6d6d0a75702953b16df1a9748b11f5.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT\n INDEX\n FROM\n initial_writes\n WHERE\n hashed_key = $1\n ", + "query": "\n SELECT\n INDEX\n FROM\n INITIAL_WRITES\n WHERE\n HASHED_KEY = $1\n ", "describe": { "columns": [ { @@ -18,5 +18,5 @@ false ] }, - "hash": "f1a90090c192d68367e799188356efe8d41759bbdcdd6d39db93208f2664f03a" + "hash": "d7bd14e6550df54657c37d389c4ed79cde6d6d0a75702953b16df1a9748b11f5" } diff --git a/core/lib/dal/.sqlx/query-0fef49a649d20c9fd263c1dfa40daa9b94d398c635c37746736e98f1f18fcca7.json b/core/lib/dal/.sqlx/query-d89eabd1edb4ee4657249f9f4ab729b9149fee37c5ef7d69e259ee33cb8ca860.json similarity index 89% rename from core/lib/dal/.sqlx/query-0fef49a649d20c9fd263c1dfa40daa9b94d398c635c37746736e98f1f18fcca7.json rename to core/lib/dal/.sqlx/query-d89eabd1edb4ee4657249f9f4ab729b9149fee37c5ef7d69e259ee33cb8ca860.json index adfd1919db51..fa1a5d6741ad 100644 --- a/core/lib/dal/.sqlx/query-0fef49a649d20c9fd263c1dfa40daa9b94d398c635c37746736e98f1f18fcca7.json +++ b/core/lib/dal/.sqlx/query-d89eabd1edb4ee4657249f9f4ab729b9149fee37c5ef7d69e259ee33cb8ca860.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n UPDATE tee_verifier_input_producer_jobs\n SET\n status = $1,\n attempts = attempts + 1,\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n l1_batch_number = (\n SELECT\n l1_batch_number\n FROM\n tee_verifier_input_producer_jobs\n WHERE\n status = $2\n OR (\n status = $1\n AND processing_started_at < NOW() - $4::INTERVAL\n )\n OR (\n status = $3\n AND attempts < $5\n )\n ORDER BY\n l1_batch_number ASC\n LIMIT\n 1\n FOR UPDATE\n SKIP LOCKED\n )\n RETURNING\n tee_verifier_input_producer_jobs.l1_batch_number\n ", + "query": "\n UPDATE tee_verifier_input_producer_jobs\n SET\n status = $1,\n attempts = attempts + 1,\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n l1_batch_number = (\n SELECT\n l1_batch_number\n FROM\n tee_verifier_input_producer_jobs\n WHERE\n status = $2\n OR (\n status = $1\n AND processing_started_at < NOW() - $4::INTERVAL\n )\n OR (\n status = $3\n AND attempts < $5\n )\n ORDER BY\n l1_batch_number ASC\n LIMIT\n 1\n FOR UPDATE\n SKIP LOCKED\n )\n RETURNING\n tee_verifier_input_producer_jobs.l1_batch_number\n ", "describe": { "columns": [ { @@ -61,5 +61,5 @@ false ] }, - "hash": "0fef49a649d20c9fd263c1dfa40daa9b94d398c635c37746736e98f1f18fcca7" + "hash": "d89eabd1edb4ee4657249f9f4ab729b9149fee37c5ef7d69e259ee33cb8ca860" } diff --git a/core/lib/dal/.sqlx/query-dcfe6ef35a598098276d2cc69a05320b4081c66e965f359d70fba7670b88a5f6.json b/core/lib/dal/.sqlx/query-dcfe6ef35a598098276d2cc69a05320b4081c66e965f359d70fba7670b88a5f6.json new file mode 100644 index 000000000000..183fe4a0ab2a --- /dev/null +++ b/core/lib/dal/.sqlx/query-dcfe6ef35a598098276d2cc69a05320b4081c66e965f359d70fba7670b88a5f6.json @@ -0,0 +1,22 @@ +{ + "db_name": "PostgreSQL", + "query": "\n SELECT\n MAX(INDEX) AS \"max?\"\n FROM\n INITIAL_WRITES\n WHERE\n L1_BATCH_NUMBER = (\n SELECT\n MAX(L1_BATCH_NUMBER) AS \"max?\"\n FROM\n INITIAL_WRITES\n WHERE\n L1_BATCH_NUMBER <= $1\n )\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "max?", + "type_info": "Int8" + } + ], + "parameters": { + "Left": [ + "Int8" + ] + }, + "nullable": [ + null + ] + }, + "hash": "dcfe6ef35a598098276d2cc69a05320b4081c66e965f359d70fba7670b88a5f6" +} diff --git a/core/lib/dal/.sqlx/query-ddfb7ba0592f1e6714a4496cee18e7265828e3ae78e391ef235b700f0adfe5e4.json b/core/lib/dal/.sqlx/query-ddfb7ba0592f1e6714a4496cee18e7265828e3ae78e391ef235b700f0adfe5e4.json new file mode 100644 index 000000000000..472c0cb26953 --- /dev/null +++ b/core/lib/dal/.sqlx/query-ddfb7ba0592f1e6714a4496cee18e7265828e3ae78e391ef235b700f0adfe5e4.json @@ -0,0 +1,22 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE proof_generation_details\n SET\n status = 'picked_by_prover',\n updated_at = NOW(),\n prover_taken_at = NOW()\n WHERE\n l1_batch_number = (\n SELECT\n l1_batch_number\n FROM\n proof_generation_details\n LEFT JOIN l1_batches ON l1_batch_number = l1_batches.number\n WHERE\n (\n vm_run_data_blob_url IS NOT NULL\n AND proof_gen_data_blob_url IS NOT NULL\n AND l1_batches.hash IS NOT NULL\n AND l1_batches.aux_data_hash IS NOT NULL\n AND l1_batches.meta_parameters_hash IS NOT NULL\n AND status = 'unpicked'\n )\n OR (\n status = 'picked_by_prover'\n AND prover_taken_at < NOW() - $1::INTERVAL\n )\n ORDER BY\n l1_batch_number ASC\n LIMIT\n 1\n )\n RETURNING\n proof_generation_details.l1_batch_number\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "l1_batch_number", + "type_info": "Int8" + } + ], + "parameters": { + "Left": [ + "Interval" + ] + }, + "nullable": [ + false + ] + }, + "hash": "ddfb7ba0592f1e6714a4496cee18e7265828e3ae78e391ef235b700f0adfe5e4" +} diff --git a/core/lib/dal/.sqlx/query-5f7034d22251a893249208c5ff8fa5c8bf46bc0cea4ac2b25ecde236c30ae32d.json b/core/lib/dal/.sqlx/query-de784f549ceda62e37459519b52e7be93b12319c041751bc4138fa64258ecd5c.json similarity index 87% rename from core/lib/dal/.sqlx/query-5f7034d22251a893249208c5ff8fa5c8bf46bc0cea4ac2b25ecde236c30ae32d.json rename to core/lib/dal/.sqlx/query-de784f549ceda62e37459519b52e7be93b12319c041751bc4138fa64258ecd5c.json index 0ae6e3bff4b1..9cc6312f70e8 100644 --- a/core/lib/dal/.sqlx/query-5f7034d22251a893249208c5ff8fa5c8bf46bc0cea4ac2b25ecde236c30ae32d.json +++ b/core/lib/dal/.sqlx/query-de784f549ceda62e37459519b52e7be93b12319c041751bc4138fa64258ecd5c.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT\n l1_address,\n l2_address,\n NAME,\n symbol,\n decimals\n FROM\n tokens\n WHERE\n well_known = TRUE\n ORDER BY\n symbol\n ", + "query": "\n SELECT\n l1_address,\n l2_address,\n name,\n symbol,\n decimals\n FROM\n tokens\n WHERE\n well_known = TRUE\n ORDER BY\n symbol\n ", "describe": { "columns": [ { @@ -40,5 +40,5 @@ false ] }, - "hash": "5f7034d22251a893249208c5ff8fa5c8bf46bc0cea4ac2b25ecde236c30ae32d" + "hash": "de784f549ceda62e37459519b52e7be93b12319c041751bc4138fa64258ecd5c" } diff --git a/core/lib/dal/.sqlx/query-e7d0b7c132b80195dae7cbf50355eb148aa6d1dbd69bf3fe48522101a6ea0bcb.json b/core/lib/dal/.sqlx/query-e7d0b7c132b80195dae7cbf50355eb148aa6d1dbd69bf3fe48522101a6ea0bcb.json deleted file mode 100644 index 576484cd4206..000000000000 --- a/core/lib/dal/.sqlx/query-e7d0b7c132b80195dae7cbf50355eb148aa6d1dbd69bf3fe48522101a6ea0bcb.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n WITH\n available_batches AS (\n SELECT\n MAX(number) AS \"last_batch\"\n FROM\n l1_batches\n ),\n processed_batches AS (\n SELECT\n COALESCE(MAX(l1_batch_number), $1) + $2 AS \"last_ready_batch\"\n FROM\n vm_runner_bwip\n WHERE\n time_taken IS NOT NULL\n )\n SELECT\n LEAST(last_batch, last_ready_batch) AS \"last_ready_batch!\"\n FROM\n available_batches\n FULL JOIN processed_batches ON TRUE\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "last_ready_batch!", - "type_info": "Int8" - } - ], - "parameters": { - "Left": [ - "Int8", - "Int8" - ] - }, - "nullable": [ - true - ] - }, - "hash": "e7d0b7c132b80195dae7cbf50355eb148aa6d1dbd69bf3fe48522101a6ea0bcb" -} diff --git a/core/lib/dal/.sqlx/query-a48c92f557e5e3a2674ce0dee9cd92f5a547150590b8c221c4065eab11175c7a.json b/core/lib/dal/.sqlx/query-ea4a4f5e0b2abe5e8f2745cf42e51063eae38da5d4b874f74c57b26f188fdeea.json similarity index 69% rename from core/lib/dal/.sqlx/query-a48c92f557e5e3a2674ce0dee9cd92f5a547150590b8c221c4065eab11175c7a.json rename to core/lib/dal/.sqlx/query-ea4a4f5e0b2abe5e8f2745cf42e51063eae38da5d4b874f74c57b26f188fdeea.json index 49e547e5564c..53ba11c6dbaf 100644 --- a/core/lib/dal/.sqlx/query-a48c92f557e5e3a2674ce0dee9cd92f5a547150590b8c221c4065eab11175c7a.json +++ b/core/lib/dal/.sqlx/query-ea4a4f5e0b2abe5e8f2745cf42e51063eae38da5d4b874f74c57b26f188fdeea.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT\n MAX(INDEX) AS \"max?\"\n FROM\n initial_writes\n ", + "query": "\n SELECT\n MAX(INDEX) AS \"max?\"\n FROM\n INITIAL_WRITES\n ", "describe": { "columns": [ { @@ -16,5 +16,5 @@ null ] }, - "hash": "a48c92f557e5e3a2674ce0dee9cd92f5a547150590b8c221c4065eab11175c7a" + "hash": "ea4a4f5e0b2abe5e8f2745cf42e51063eae38da5d4b874f74c57b26f188fdeea" } diff --git a/core/lib/dal/.sqlx/query-ead71ae66fe4685132c03a973612fe98364aa684180dd6fbf540bb0b68d96a64.json b/core/lib/dal/.sqlx/query-ead71ae66fe4685132c03a973612fe98364aa684180dd6fbf540bb0b68d96a64.json deleted file mode 100644 index 02cd6733e811..000000000000 --- a/core/lib/dal/.sqlx/query-ead71ae66fe4685132c03a973612fe98364aa684180dd6fbf540bb0b68d96a64.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n WITH\n new_logs AS MATERIALIZED (\n SELECT DISTINCT\n ON (hashed_key) hashed_key,\n miniblock_number,\n operation_number\n FROM\n storage_logs\n WHERE\n miniblock_number BETWEEN $1 AND $2\n ORDER BY\n hashed_key,\n miniblock_number DESC,\n operation_number DESC\n )\n DELETE FROM storage_logs USING new_logs\n WHERE\n storage_logs.hashed_key = new_logs.hashed_key\n AND storage_logs.miniblock_number <= $2\n AND (storage_logs.miniblock_number, storage_logs.operation_number) < (new_logs.miniblock_number, new_logs.operation_number)\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8", - "Int8" - ] - }, - "nullable": [] - }, - "hash": "ead71ae66fe4685132c03a973612fe98364aa684180dd6fbf540bb0b68d96a64" -} diff --git a/core/lib/dal/.sqlx/query-0f1856e55a370280a078d048f09e2d457914c737660b37e9f66b576bbc9a7904.json b/core/lib/dal/.sqlx/query-eb27e1b82b8ecbb9711c417888564a8e245ecee4866264d38146938595b07f37.json similarity index 91% rename from core/lib/dal/.sqlx/query-0f1856e55a370280a078d048f09e2d457914c737660b37e9f66b576bbc9a7904.json rename to core/lib/dal/.sqlx/query-eb27e1b82b8ecbb9711c417888564a8e245ecee4866264d38146938595b07f37.json index 498e839a63d7..2419082dcc23 100644 --- a/core/lib/dal/.sqlx/query-0f1856e55a370280a078d048f09e2d457914c737660b37e9f66b576bbc9a7904.json +++ b/core/lib/dal/.sqlx/query-eb27e1b82b8ecbb9711c417888564a8e245ecee4866264d38146938595b07f37.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT\n transactions.*\n FROM\n transactions\n INNER JOIN miniblocks ON miniblocks.number = transactions.miniblock_number\n WHERE\n miniblocks.number BETWEEN $1 AND $2\n ORDER BY\n miniblock_number,\n index_in_block\n ", + "query": "\n SELECT\n transactions.*\n FROM\n transactions\n INNER JOIN miniblocks ON miniblocks.number = transactions.miniblock_number\n WHERE\n miniblocks.number BETWEEN $1 AND $2\n ORDER BY\n miniblock_number,\n index_in_block\n ", "describe": { "columns": [ { @@ -229,5 +229,5 @@ true ] }, - "hash": "0f1856e55a370280a078d048f09e2d457914c737660b37e9f66b576bbc9a7904" + "hash": "eb27e1b82b8ecbb9711c417888564a8e245ecee4866264d38146938595b07f37" } diff --git a/core/lib/dal/.sqlx/query-cea9fe027a6a0ada827f23b48ac32432295b2f7ee40bf13522a6edbd236f1970.json b/core/lib/dal/.sqlx/query-ec2942fecedb7ee47279bf0418eb020b1036f002312271eec76ec3d40f77eb71.json similarity index 86% rename from core/lib/dal/.sqlx/query-cea9fe027a6a0ada827f23b48ac32432295b2f7ee40bf13522a6edbd236f1970.json rename to core/lib/dal/.sqlx/query-ec2942fecedb7ee47279bf0418eb020b1036f002312271eec76ec3d40f77eb71.json index b1eae968a897..be93834b26c4 100644 --- a/core/lib/dal/.sqlx/query-cea9fe027a6a0ada827f23b48ac32432295b2f7ee40bf13522a6edbd236f1970.json +++ b/core/lib/dal/.sqlx/query-ec2942fecedb7ee47279bf0418eb020b1036f002312271eec76ec3d40f77eb71.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT\n u.hashed_key AS \"hashed_key!\",\n (\n SELECT\n value\n FROM\n storage_logs\n WHERE\n hashed_key = u.hashed_key\n AND miniblock_number <= $2\n ORDER BY\n miniblock_number DESC,\n operation_number DESC\n LIMIT\n 1\n ) AS \"value?\"\n FROM\n UNNEST($1::bytea[]) AS u (hashed_key)\n ", + "query": "\n SELECT\n u.hashed_key AS \"hashed_key!\",\n (\n SELECT\n value\n FROM\n storage_logs\n WHERE\n hashed_key = u.hashed_key\n AND miniblock_number <= $2\n ORDER BY\n miniblock_number DESC,\n operation_number DESC\n LIMIT\n 1\n ) AS \"value?\"\n FROM\n UNNEST($1::bytea []) AS u (hashed_key)\n ", "describe": { "columns": [ { @@ -25,5 +25,5 @@ null ] }, - "hash": "cea9fe027a6a0ada827f23b48ac32432295b2f7ee40bf13522a6edbd236f1970" + "hash": "ec2942fecedb7ee47279bf0418eb020b1036f002312271eec76ec3d40f77eb71" } diff --git a/core/lib/dal/.sqlx/query-4cfdfb32d808e33779ea4566e9cf9bb44a0952d475c3e6f207443b72ebddb0cd.json b/core/lib/dal/.sqlx/query-ee50258050e7a08be67335cddf258ed14ea4ed363db1501e7268909bc18f2043.json similarity index 78% rename from core/lib/dal/.sqlx/query-4cfdfb32d808e33779ea4566e9cf9bb44a0952d475c3e6f207443b72ebddb0cd.json rename to core/lib/dal/.sqlx/query-ee50258050e7a08be67335cddf258ed14ea4ed363db1501e7268909bc18f2043.json index 4ea4aea2ea63..733a7d36eabf 100644 --- a/core/lib/dal/.sqlx/query-4cfdfb32d808e33779ea4566e9cf9bb44a0952d475c3e6f207443b72ebddb0cd.json +++ b/core/lib/dal/.sqlx/query-ee50258050e7a08be67335cddf258ed14ea4ed363db1501e7268909bc18f2043.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT\n miniblocks.hash AS \"block_hash\",\n miniblocks.number AS \"block_number\",\n prev_miniblock.hash AS \"parent_hash?\",\n miniblocks.timestamp AS \"block_timestamp\",\n miniblocks.base_fee_per_gas AS \"base_fee_per_gas\",\n miniblocks.gas_limit AS \"block_gas_limit?\",\n miniblocks.logs_bloom AS \"block_logs_bloom?\",\n transactions.gas_limit AS \"transaction_gas_limit?\",\n transactions.refunded_gas AS \"transaction_refunded_gas?\"\n FROM\n miniblocks\n LEFT JOIN miniblocks prev_miniblock ON prev_miniblock.number = miniblocks.number - 1\n LEFT JOIN transactions ON transactions.miniblock_number = miniblocks.number\n WHERE\n miniblocks.number > $1\n ORDER BY\n miniblocks.number ASC,\n transactions.index_in_block ASC\n ", + "query": "\n SELECT\n miniblocks.hash AS \"block_hash\",\n miniblocks.number AS \"block_number\",\n prev_miniblock.hash AS \"parent_hash?\",\n miniblocks.timestamp AS \"block_timestamp\",\n miniblocks.base_fee_per_gas AS \"base_fee_per_gas\",\n miniblocks.gas_limit AS \"block_gas_limit?\",\n miniblocks.logs_bloom AS \"block_logs_bloom?\",\n transactions.gas_limit AS \"transaction_gas_limit?\",\n transactions.refunded_gas AS \"transaction_refunded_gas?\"\n FROM\n miniblocks\n LEFT JOIN\n miniblocks prev_miniblock\n ON prev_miniblock.number = miniblocks.number - 1\n LEFT JOIN transactions ON transactions.miniblock_number = miniblocks.number\n WHERE\n miniblocks.number > $1\n ORDER BY\n miniblocks.number ASC,\n transactions.index_in_block ASC\n ", "describe": { "columns": [ { @@ -66,5 +66,5 @@ false ] }, - "hash": "4cfdfb32d808e33779ea4566e9cf9bb44a0952d475c3e6f207443b72ebddb0cd" + "hash": "ee50258050e7a08be67335cddf258ed14ea4ed363db1501e7268909bc18f2043" } diff --git a/core/lib/dal/.sqlx/query-f012d0922265269746396dac8f25ff66f2c3b2b83d45360818a8782e56aa3d66.json b/core/lib/dal/.sqlx/query-f012d0922265269746396dac8f25ff66f2c3b2b83d45360818a8782e56aa3d66.json deleted file mode 100644 index 9815b5d3895e..000000000000 --- a/core/lib/dal/.sqlx/query-f012d0922265269746396dac8f25ff66f2c3b2b83d45360818a8782e56aa3d66.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n WITH\n sl AS (\n SELECT\n (\n SELECT\n ARRAY[hashed_key, value] AS kv\n FROM\n storage_logs\n WHERE\n storage_logs.miniblock_number = $1\n AND storage_logs.hashed_key >= u.start_key\n AND storage_logs.hashed_key <= u.end_key\n ORDER BY\n storage_logs.hashed_key\n LIMIT\n 1\n )\n FROM\n UNNEST($2::bytea[], $3::bytea[]) AS u (start_key, end_key)\n )\n SELECT\n sl.kv[1] AS \"hashed_key?\",\n sl.kv[2] AS \"value?\",\n initial_writes.index\n FROM\n sl\n LEFT OUTER JOIN initial_writes ON initial_writes.hashed_key = sl.kv[1]\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "hashed_key?", - "type_info": "Bytea" - }, - { - "ordinal": 1, - "name": "value?", - "type_info": "Bytea" - }, - { - "ordinal": 2, - "name": "index", - "type_info": "Int8" - } - ], - "parameters": { - "Left": [ - "Int8", - "ByteaArray", - "ByteaArray" - ] - }, - "nullable": [ - null, - null, - true - ] - }, - "hash": "f012d0922265269746396dac8f25ff66f2c3b2b83d45360818a8782e56aa3d66" -} diff --git a/core/lib/dal/.sqlx/query-f3a049c7eb0d8903737f02fa154b50ebc862a133734382bad8fdfa3a93d8b743.json b/core/lib/dal/.sqlx/query-f3a049c7eb0d8903737f02fa154b50ebc862a133734382bad8fdfa3a93d8b743.json deleted file mode 100644 index 6869b4f50b18..000000000000 --- a/core/lib/dal/.sqlx/query-f3a049c7eb0d8903737f02fa154b50ebc862a133734382bad8fdfa3a93d8b743.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n transactions (\n hash,\n is_priority,\n initiator_address,\n gas_limit,\n max_fee_per_gas,\n gas_per_pubdata_limit,\n data,\n upgrade_id,\n contract_address,\n l1_block_number,\n value,\n paymaster,\n paymaster_input,\n tx_format,\n l1_tx_mint,\n l1_tx_refund_recipient,\n received_at,\n created_at,\n updated_at\n )\n VALUES\n (\n $1,\n TRUE,\n $2,\n $3,\n $4,\n $5,\n $6,\n $7,\n $8,\n $9,\n $10,\n $11,\n $12,\n $13,\n $14,\n $15,\n $16,\n NOW(),\n NOW()\n )\n ON CONFLICT (hash) DO NOTHING\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Bytea", - "Bytea", - "Numeric", - "Numeric", - "Numeric", - "Jsonb", - "Int4", - "Bytea", - "Int4", - "Numeric", - "Bytea", - "Bytea", - "Int4", - "Numeric", - "Bytea", - "Timestamp" - ] - }, - "nullable": [] - }, - "hash": "f3a049c7eb0d8903737f02fa154b50ebc862a133734382bad8fdfa3a93d8b743" -} diff --git a/core/lib/dal/.sqlx/query-f551ac609521345b0dbcce65df2ce3d957afdb5f9809929dbe7a67a4a164e741.json b/core/lib/dal/.sqlx/query-f551ac609521345b0dbcce65df2ce3d957afdb5f9809929dbe7a67a4a164e741.json new file mode 100644 index 000000000000..9297d4a9cf8e --- /dev/null +++ b/core/lib/dal/.sqlx/query-f551ac609521345b0dbcce65df2ce3d957afdb5f9809929dbe7a67a4a164e741.json @@ -0,0 +1,20 @@ +{ + "db_name": "PostgreSQL", + "query": "\n SELECT\n number\n FROM\n l1_batches\n LEFT JOIN\n eth_txs_history AS execute_tx\n ON (l1_batches.eth_execute_tx_id = execute_tx.eth_tx_id)\n WHERE\n execute_tx.confirmed_at IS NOT NULL\n ORDER BY\n number DESC\n LIMIT\n 1\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "number", + "type_info": "Int8" + } + ], + "parameters": { + "Left": [] + }, + "nullable": [ + false + ] + }, + "hash": "f551ac609521345b0dbcce65df2ce3d957afdb5f9809929dbe7a67a4a164e741" +} diff --git a/core/lib/dal/.sqlx/query-f90a87a0c8a3ad95d722fbcf1b05371292d0bfbb23eaa2db163ef6fd1e1374d9.json b/core/lib/dal/.sqlx/query-f90a87a0c8a3ad95d722fbcf1b05371292d0bfbb23eaa2db163ef6fd1e1374d9.json new file mode 100644 index 000000000000..5235d03dc3af --- /dev/null +++ b/core/lib/dal/.sqlx/query-f90a87a0c8a3ad95d722fbcf1b05371292d0bfbb23eaa2db163ef6fd1e1374d9.json @@ -0,0 +1,31 @@ +{ + "db_name": "PostgreSQL", + "query": "\n INSERT INTO\n contract_verification_requests (\n contract_address,\n source_code,\n contract_name,\n zk_compiler_version,\n compiler_version,\n optimization_used,\n optimizer_mode,\n constructor_arguments,\n is_system,\n force_evmla,\n status,\n created_at,\n updated_at\n )\n VALUES\n ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, 'queued', NOW(), NOW())\n RETURNING\n id\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "id", + "type_info": "Int8" + } + ], + "parameters": { + "Left": [ + "Bytea", + "Text", + "Text", + "Text", + "Text", + "Bool", + "Text", + "Bytea", + "Bool", + "Bool" + ] + }, + "nullable": [ + false + ] + }, + "hash": "f90a87a0c8a3ad95d722fbcf1b05371292d0bfbb23eaa2db163ef6fd1e1374d9" +} diff --git a/core/lib/dal/.sqlx/query-fce6fff384875df689dc422153a2745b90c68ebec5706b106ef69cb61333466e.json b/core/lib/dal/.sqlx/query-fce6fff384875df689dc422153a2745b90c68ebec5706b106ef69cb61333466e.json new file mode 100644 index 000000000000..8c4129fec07a --- /dev/null +++ b/core/lib/dal/.sqlx/query-fce6fff384875df689dc422153a2745b90c68ebec5706b106ef69cb61333466e.json @@ -0,0 +1,29 @@ +{ + "db_name": "PostgreSQL", + "query": "\n INSERT INTO\n transactions (\n hash,\n is_priority,\n initiator_address,\n gas_limit,\n max_fee_per_gas,\n gas_per_pubdata_limit,\n data,\n upgrade_id,\n contract_address,\n l1_block_number,\n value,\n paymaster,\n paymaster_input,\n tx_format,\n l1_tx_mint,\n l1_tx_refund_recipient,\n received_at,\n created_at,\n updated_at\n )\n VALUES\n (\n $1,\n TRUE,\n $2,\n $3,\n $4,\n $5,\n $6,\n $7,\n $8,\n $9,\n $10,\n $11,\n $12,\n $13,\n $14,\n $15,\n $16,\n NOW(),\n NOW()\n )\n ON CONFLICT (hash) DO NOTHING\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Bytea", + "Bytea", + "Numeric", + "Numeric", + "Numeric", + "Jsonb", + "Int4", + "Bytea", + "Int4", + "Numeric", + "Bytea", + "Bytea", + "Int4", + "Numeric", + "Bytea", + "Timestamp" + ] + }, + "nullable": [] + }, + "hash": "fce6fff384875df689dc422153a2745b90c68ebec5706b106ef69cb61333466e" +} diff --git a/core/lib/dal/.sqlx/query-f4e7e2dd109aab2714845b028eba780c75468aa36615bcfcf7f7d8ace23cd1aa.json b/core/lib/dal/.sqlx/query-fd4b42f90ffe24f76a35a005460cc3cec1dbc3e9af406bb900c3ec52590978bc.json similarity index 65% rename from core/lib/dal/.sqlx/query-f4e7e2dd109aab2714845b028eba780c75468aa36615bcfcf7f7d8ace23cd1aa.json rename to core/lib/dal/.sqlx/query-fd4b42f90ffe24f76a35a005460cc3cec1dbc3e9af406bb900c3ec52590978bc.json index a8e5dbf66d5e..271924b8b6c3 100644 --- a/core/lib/dal/.sqlx/query-f4e7e2dd109aab2714845b028eba780c75468aa36615bcfcf7f7d8ace23cd1aa.json +++ b/core/lib/dal/.sqlx/query-fd4b42f90ffe24f76a35a005460cc3cec1dbc3e9af406bb900c3ec52590978bc.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT\n PG_LAST_WAL_RECEIVE_LSN() = PG_LAST_WAL_REPLAY_LSN() AS synced,\n EXTRACT(\n SECONDS\n FROM\n NOW() - PG_LAST_XACT_REPLAY_TIMESTAMP()\n )::INT AS LAG\n ", + "query": "\n SELECT\n PG_LAST_WAL_RECEIVE_LSN() = PG_LAST_WAL_REPLAY_LSN() AS synced,\n EXTRACT(\n seconds\n FROM\n NOW() - PG_LAST_XACT_REPLAY_TIMESTAMP()\n )::INT AS lag\n ", "describe": { "columns": [ { @@ -22,5 +22,5 @@ null ] }, - "hash": "f4e7e2dd109aab2714845b028eba780c75468aa36615bcfcf7f7d8ace23cd1aa" + "hash": "fd4b42f90ffe24f76a35a005460cc3cec1dbc3e9af406bb900c3ec52590978bc" } diff --git a/core/lib/dal/.sqlx/query-99d9ee2a0d0450acefa0d9b6c031e30606fddf6631c859ab03819ec476bcf005.json b/core/lib/dal/.sqlx/query-fd8aaef58e1b9bf4f389fb2943adea2b254fed4b5437ee2968707dffe6e6869d.json similarity index 75% rename from core/lib/dal/.sqlx/query-99d9ee2a0d0450acefa0d9b6c031e30606fddf6631c859ab03819ec476bcf005.json rename to core/lib/dal/.sqlx/query-fd8aaef58e1b9bf4f389fb2943adea2b254fed4b5437ee2968707dffe6e6869d.json index ab00c7b26ce3..198ab2d802bf 100644 --- a/core/lib/dal/.sqlx/query-99d9ee2a0d0450acefa0d9b6c031e30606fddf6631c859ab03819ec476bcf005.json +++ b/core/lib/dal/.sqlx/query-fd8aaef58e1b9bf4f389fb2943adea2b254fed4b5437ee2968707dffe6e6869d.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT\n hashed_key\n FROM\n initial_writes\n WHERE\n hashed_key = ANY ($1)\n ", + "query": "\n SELECT\n hashed_key\n FROM\n initial_writes\n WHERE\n hashed_key = ANY($1)\n ", "describe": { "columns": [ { @@ -18,5 +18,5 @@ false ] }, - "hash": "99d9ee2a0d0450acefa0d9b6c031e30606fddf6631c859ab03819ec476bcf005" + "hash": "fd8aaef58e1b9bf4f389fb2943adea2b254fed4b5437ee2968707dffe6e6869d" } diff --git a/core/lib/dal/.sqlx/query-9f29aa31d4698031e9f3fe2eb273724dcce382936af0d4c386143399995cd325.json b/core/lib/dal/.sqlx/query-febd2b039a686631e3c943882864f6cb289fdec08f4db49ee40ba67371df1927.json similarity index 59% rename from core/lib/dal/.sqlx/query-9f29aa31d4698031e9f3fe2eb273724dcce382936af0d4c386143399995cd325.json rename to core/lib/dal/.sqlx/query-febd2b039a686631e3c943882864f6cb289fdec08f4db49ee40ba67371df1927.json index 2e1bf7c3e61c..ff702280a632 100644 --- a/core/lib/dal/.sqlx/query-9f29aa31d4698031e9f3fe2eb273724dcce382936af0d4c386143399995cd325.json +++ b/core/lib/dal/.sqlx/query-febd2b039a686631e3c943882864f6cb289fdec08f4db49ee40ba67371df1927.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT\n storage_logs.address AS \"address!\",\n storage_logs.key AS \"key!\",\n storage_logs.value AS \"value!\",\n storage_logs.miniblock_number AS \"miniblock_number!\",\n initial_writes.l1_batch_number AS \"l1_batch_number!\",\n initial_writes.index\n FROM\n (\n SELECT\n hashed_key,\n MAX(ARRAY[miniblock_number, operation_number]::INT[]) AS op\n FROM\n storage_logs\n WHERE\n miniblock_number <= $1\n AND hashed_key >= $3\n AND hashed_key <= $4\n GROUP BY\n hashed_key\n ORDER BY\n hashed_key\n ) AS keys\n INNER JOIN storage_logs ON keys.hashed_key = storage_logs.hashed_key\n AND storage_logs.miniblock_number = keys.op[1]\n AND storage_logs.operation_number = keys.op[2]\n INNER JOIN initial_writes ON keys.hashed_key = initial_writes.hashed_key\n WHERE\n initial_writes.l1_batch_number <= $2\n ", + "query": "\n SELECT\n storage_logs.address AS \"address!\",\n storage_logs.key AS \"key!\",\n storage_logs.value AS \"value!\",\n storage_logs.miniblock_number AS \"miniblock_number!\",\n initial_writes.l1_batch_number AS \"l1_batch_number!\",\n initial_writes.index\n FROM\n (\n SELECT\n hashed_key,\n MAX(ARRAY[miniblock_number, operation_number]::INT []) AS op\n FROM\n storage_logs\n WHERE\n miniblock_number <= $1\n AND hashed_key >= $3\n AND hashed_key <= $4\n GROUP BY\n hashed_key\n ORDER BY\n hashed_key\n ) AS keys\n INNER JOIN storage_logs\n ON\n keys.hashed_key = storage_logs.hashed_key\n AND storage_logs.miniblock_number = keys.op[1]\n AND storage_logs.operation_number = keys.op[2]\n INNER JOIN initial_writes ON keys.hashed_key = initial_writes.hashed_key\n WHERE\n initial_writes.l1_batch_number <= $2\n ", "describe": { "columns": [ { @@ -51,5 +51,5 @@ false ] }, - "hash": "9f29aa31d4698031e9f3fe2eb273724dcce382936af0d4c386143399995cd325" + "hash": "febd2b039a686631e3c943882864f6cb289fdec08f4db49ee40ba67371df1927" } diff --git a/core/lib/dal/src/base_token_dal.rs b/core/lib/dal/src/base_token_dal.rs index a8bf51d0c603..52389bdcb62b 100644 --- a/core/lib/dal/src/base_token_dal.rs +++ b/core/lib/dal/src/base_token_dal.rs @@ -21,11 +21,13 @@ impl BaseTokenDal<'_, '_> { let row = sqlx::query!( r#" INSERT INTO - base_token_ratios (numerator, denominator, ratio_timestamp, created_at, updated_at) + base_token_ratios ( + numerator, denominator, ratio_timestamp, created_at, updated_at + ) VALUES - ($1, $2, $3, NOW(), NOW()) + ($1, $2, $3, NOW(), NOW()) RETURNING - id + id "#, BigDecimal::from_u64(numerator.get()), BigDecimal::from_u64(denominator.get()), diff --git a/core/lib/dal/src/blocks_dal.rs b/core/lib/dal/src/blocks_dal.rs index fc2e6cad062d..5b351511a06d 100644 --- a/core/lib/dal/src/blocks_dal.rs +++ b/core/lib/dal/src/blocks_dal.rs @@ -336,7 +336,7 @@ impl BlocksDal<'_, '_> { pubdata_input FROM l1_batches - LEFT JOIN commitments ON commitments.l1_batch_number = l1_batches.number + LEFT JOIN commitments ON commitments.l1_batch_number = l1_batches.number WHERE number = $1 "#, @@ -595,55 +595,55 @@ impl BlocksDal<'_, '_> { let query = sqlx::query!( r#" INSERT INTO - l1_batches ( - number, - l1_tx_count, - l2_tx_count, - timestamp, - l2_to_l1_messages, - bloom, - priority_ops_onchain_data, - predicted_commit_gas_cost, - predicted_prove_gas_cost, - predicted_execute_gas_cost, - initial_bootloader_heap_content, - used_contract_hashes, - bootloader_code_hash, - default_aa_code_hash, - protocol_version, - system_logs, - storage_refunds, - pubdata_costs, - pubdata_input, - predicted_circuits_by_type, - created_at, - updated_at - ) + l1_batches ( + number, + l1_tx_count, + l2_tx_count, + timestamp, + l2_to_l1_messages, + bloom, + priority_ops_onchain_data, + predicted_commit_gas_cost, + predicted_prove_gas_cost, + predicted_execute_gas_cost, + initial_bootloader_heap_content, + used_contract_hashes, + bootloader_code_hash, + default_aa_code_hash, + protocol_version, + system_logs, + storage_refunds, + pubdata_costs, + pubdata_input, + predicted_circuits_by_type, + created_at, + updated_at + ) VALUES - ( - $1, - $2, - $3, - $4, - $5, - $6, - $7, - $8, - $9, - $10, - $11, - $12, - $13, - $14, - $15, - $16, - $17, - $18, - $19, - $20, - NOW(), - NOW() - ) + ( + $1, + $2, + $3, + $4, + $5, + $6, + $7, + $8, + $9, + $10, + $11, + $12, + $13, + $14, + $15, + $16, + $17, + $18, + $19, + $20, + NOW(), + NOW() + ) "#, i64::from(header.number.0), i32::from(header.l1_tx_count), @@ -690,49 +690,49 @@ impl BlocksDal<'_, '_> { let query = sqlx::query!( r#" INSERT INTO - miniblocks ( - number, - timestamp, - hash, - l1_tx_count, - l2_tx_count, - fee_account_address, - base_fee_per_gas, - l1_gas_price, - l2_fair_gas_price, - gas_per_pubdata_limit, - bootloader_code_hash, - default_aa_code_hash, - protocol_version, - virtual_blocks, - fair_pubdata_price, - gas_limit, - logs_bloom, - created_at, - updated_at - ) + miniblocks ( + number, + timestamp, + hash, + l1_tx_count, + l2_tx_count, + fee_account_address, + base_fee_per_gas, + l1_gas_price, + l2_fair_gas_price, + gas_per_pubdata_limit, + bootloader_code_hash, + default_aa_code_hash, + protocol_version, + virtual_blocks, + fair_pubdata_price, + gas_limit, + logs_bloom, + created_at, + updated_at + ) VALUES - ( - $1, - $2, - $3, - $4, - $5, - $6, - $7, - $8, - $9, - $10, - $11, - $12, - $13, - $14, - $15, - $16, - $17, - NOW(), - NOW() - ) + ( + $1, + $2, + $3, + $4, + $5, + $6, + $7, + $8, + $9, + $10, + $11, + $12, + $13, + $14, + $15, + $16, + $17, + NOW(), + NOW() + ) "#, i64::from(l2_block_header.number.0), l2_block_header.timestamp as i64, @@ -986,9 +986,13 @@ impl BlocksDal<'_, '_> { sqlx::query!( r#" INSERT INTO - commitments (l1_batch_number, events_queue_commitment, bootloader_initial_content_commitment) + commitments ( + l1_batch_number, + events_queue_commitment, + bootloader_initial_content_commitment + ) VALUES - ($1, $2, $3) + ($1, $2, $3) ON CONFLICT (l1_batch_number) DO NOTHING "#, i64::from(number.0), @@ -1045,7 +1049,7 @@ impl BlocksDal<'_, '_> { pubdata_input FROM l1_batches - LEFT JOIN commitments ON commitments.l1_batch_number = l1_batches.number + LEFT JOIN commitments ON commitments.l1_batch_number = l1_batches.number WHERE number = 0 OR eth_commit_tx_id IS NOT NULL @@ -1077,7 +1081,9 @@ impl BlocksDal<'_, '_> { number FROM l1_batches - LEFT JOIN eth_txs_history AS commit_tx ON (l1_batches.eth_commit_tx_id = commit_tx.eth_tx_id) + LEFT JOIN + eth_txs_history AS commit_tx + ON (l1_batches.eth_commit_tx_id = commit_tx.eth_tx_id) WHERE commit_tx.confirmed_at IS NOT NULL ORDER BY @@ -1144,7 +1150,9 @@ impl BlocksDal<'_, '_> { number FROM l1_batches - LEFT JOIN eth_txs_history AS prove_tx ON (l1_batches.eth_prove_tx_id = prove_tx.eth_tx_id) + LEFT JOIN + eth_txs_history AS prove_tx + ON (l1_batches.eth_prove_tx_id = prove_tx.eth_tx_id) WHERE prove_tx.confirmed_at IS NOT NULL ORDER BY @@ -1169,7 +1177,9 @@ impl BlocksDal<'_, '_> { number FROM l1_batches - LEFT JOIN eth_txs_history AS execute_tx ON (l1_batches.eth_execute_tx_id = execute_tx.eth_tx_id) + LEFT JOIN + eth_txs_history AS execute_tx + ON (l1_batches.eth_execute_tx_id = execute_tx.eth_tx_id) WHERE execute_tx.confirmed_at IS NOT NULL ORDER BY @@ -1225,7 +1235,7 @@ impl BlocksDal<'_, '_> { pubdata_input FROM l1_batches - LEFT JOIN commitments ON commitments.l1_batch_number = l1_batches.number + LEFT JOIN commitments ON commitments.l1_batch_number = l1_batches.number WHERE eth_commit_tx_id IS NOT NULL AND eth_prove_tx_id IS NULL @@ -1310,7 +1320,7 @@ impl BlocksDal<'_, '_> { ROW_NUMBER() OVER ( ORDER BY number ASC - ) AS ROW_NUMBER + ) AS row_number FROM l1_batches WHERE @@ -1322,9 +1332,9 @@ impl BlocksDal<'_, '_> { LIMIT $2 ) inn - LEFT JOIN commitments ON commitments.l1_batch_number = inn.number + LEFT JOIN commitments ON commitments.l1_batch_number = inn.number WHERE - number - ROW_NUMBER = $1 + number - row_number = $1 "#, last_proved_batch_number.0 as i32, limit as i32 @@ -1378,7 +1388,7 @@ impl BlocksDal<'_, '_> { pubdata_input FROM l1_batches - LEFT JOIN commitments ON commitments.l1_batch_number = l1_batches.number + LEFT JOIN commitments ON commitments.l1_batch_number = l1_batches.number WHERE eth_prove_tx_id IS NOT NULL AND eth_execute_tx_id IS NULL @@ -1450,16 +1460,18 @@ impl BlocksDal<'_, '_> { MAX(l1_batches.number) FROM l1_batches - JOIN eth_txs ON (l1_batches.eth_commit_tx_id = eth_txs.id) - JOIN eth_txs_history AS commit_tx ON (eth_txs.confirmed_eth_tx_history_id = commit_tx.id) + JOIN eth_txs ON (l1_batches.eth_commit_tx_id = eth_txs.id) + JOIN + eth_txs_history AS commit_tx + ON (eth_txs.confirmed_eth_tx_history_id = commit_tx.id) WHERE commit_tx.confirmed_at IS NOT NULL AND eth_prove_tx_id IS NOT NULL AND eth_execute_tx_id IS NULL AND EXTRACT( - epoch + EPOCH FROM - commit_tx.confirmed_at + commit_tx.confirmed_at ) < $1 "#, max_l1_batch_timestamp_seconds_bd, @@ -1503,7 +1515,7 @@ impl BlocksDal<'_, '_> { pubdata_input FROM l1_batches - LEFT JOIN commitments ON commitments.l1_batch_number = l1_batches.number + LEFT JOIN commitments ON commitments.l1_batch_number = l1_batches.number WHERE number BETWEEN $1 AND $2 ORDER BY @@ -1567,8 +1579,8 @@ impl BlocksDal<'_, '_> { pubdata_input FROM l1_batches - LEFT JOIN commitments ON commitments.l1_batch_number = l1_batches.number - JOIN protocol_versions ON protocol_versions.id = l1_batches.protocol_version + LEFT JOIN commitments ON commitments.l1_batch_number = l1_batches.number + JOIN protocol_versions ON protocol_versions.id = l1_batches.protocol_version WHERE eth_commit_tx_id IS NULL AND number != 0 @@ -1645,9 +1657,11 @@ impl BlocksDal<'_, '_> { pubdata_input FROM l1_batches - LEFT JOIN commitments ON commitments.l1_batch_number = l1_batches.number - LEFT JOIN data_availability ON data_availability.l1_batch_number = l1_batches.number - JOIN protocol_versions ON protocol_versions.id = l1_batches.protocol_version + LEFT JOIN commitments ON commitments.l1_batch_number = l1_batches.number + LEFT JOIN + data_availability + ON data_availability.l1_batch_number = l1_batches.number + JOIN protocol_versions ON protocol_versions.id = l1_batches.protocol_version WHERE eth_commit_tx_id IS NULL AND number != 0 @@ -1846,7 +1860,7 @@ impl BlocksDal<'_, '_> { bytecode FROM factory_deps - INNER JOIN miniblocks ON miniblocks.number = factory_deps.miniblock_number + INNER JOIN miniblocks ON miniblocks.number = factory_deps.miniblock_number WHERE miniblocks.l1_batch_number = $1 "#, @@ -2342,7 +2356,7 @@ impl BlocksDal<'_, '_> { value FROM l2_to_l1_logs - JOIN miniblocks ON l2_to_l1_logs.miniblock_number = miniblocks.number + JOIN miniblocks ON l2_to_l1_logs.miniblock_number = miniblocks.number WHERE l1_batch_number = $1 ORDER BY @@ -2440,8 +2454,8 @@ impl BlocksDal<'_, '_> { FROM ( SELECT - UNNEST($1::BIGINT[]) AS number, - UNNEST($2::BYTEA[]) AS logs_bloom + UNNEST($1::BIGINT []) AS number, + UNNEST($2::BYTEA []) AS logs_bloom ) AS data WHERE miniblocks.number = data.number diff --git a/core/lib/dal/src/blocks_web3_dal.rs b/core/lib/dal/src/blocks_web3_dal.rs index 3d17a919a073..904e167d1a6f 100644 --- a/core/lib/dal/src/blocks_web3_dal.rs +++ b/core/lib/dal/src/blocks_web3_dal.rs @@ -52,9 +52,11 @@ impl BlocksWeb3Dal<'_, '_> { transactions.hash AS "tx_hash?" FROM miniblocks - LEFT JOIN miniblocks prev_miniblock ON prev_miniblock.number = miniblocks.number - 1 - LEFT JOIN l1_batches ON l1_batches.number = miniblocks.l1_batch_number - LEFT JOIN transactions ON transactions.miniblock_number = miniblocks.number + LEFT JOIN + miniblocks prev_miniblock + ON prev_miniblock.number = miniblocks.number - 1 + LEFT JOIN l1_batches ON l1_batches.number = miniblocks.l1_batch_number + LEFT JOIN transactions ON transactions.miniblock_number = miniblocks.number WHERE miniblocks.number = $1 ORDER BY @@ -184,8 +186,10 @@ impl BlocksWeb3Dal<'_, '_> { transactions.refunded_gas AS "transaction_refunded_gas?" FROM miniblocks - LEFT JOIN miniblocks prev_miniblock ON prev_miniblock.number = miniblocks.number - 1 - LEFT JOIN transactions ON transactions.miniblock_number = miniblocks.number + LEFT JOIN + miniblocks prev_miniblock + ON prev_miniblock.number = miniblocks.number - 1 + LEFT JOIN transactions ON transactions.miniblock_number = miniblocks.number WHERE miniblocks.number > $1 ORDER BY @@ -559,7 +563,7 @@ impl BlocksWeb3Dal<'_, '_> { call_trace FROM call_traces - INNER JOIN transactions ON tx_hash = transactions.hash + INNER JOIN transactions ON tx_hash = transactions.hash WHERE transactions.miniblock_number = $1 ORDER BY @@ -673,16 +677,19 @@ impl BlocksWeb3Dal<'_, '_> { miniblocks.fee_account_address FROM miniblocks - LEFT JOIN l1_batches ON miniblocks.l1_batch_number = l1_batches.number - LEFT JOIN eth_txs_history AS commit_tx ON ( + LEFT JOIN l1_batches ON miniblocks.l1_batch_number = l1_batches.number + LEFT JOIN eth_txs_history AS commit_tx + ON ( l1_batches.eth_commit_tx_id = commit_tx.eth_tx_id AND commit_tx.confirmed_at IS NOT NULL ) - LEFT JOIN eth_txs_history AS prove_tx ON ( + LEFT JOIN eth_txs_history AS prove_tx + ON ( l1_batches.eth_prove_tx_id = prove_tx.eth_tx_id AND prove_tx.confirmed_at IS NOT NULL ) - LEFT JOIN eth_txs_history AS execute_tx ON ( + LEFT JOIN eth_txs_history AS execute_tx + ON ( l1_batches.eth_execute_tx_id = execute_tx.eth_tx_id AND execute_tx.confirmed_at IS NOT NULL ) @@ -708,18 +715,19 @@ impl BlocksWeb3Dal<'_, '_> { StorageL1BatchDetails, r#" WITH - mb AS ( - SELECT - l1_gas_price, - l2_fair_gas_price, - fair_pubdata_price - FROM - miniblocks - WHERE - l1_batch_number = $1 - LIMIT - 1 - ) + mb AS ( + SELECT + l1_gas_price, + l2_fair_gas_price, + fair_pubdata_price + FROM + miniblocks + WHERE + l1_batch_number = $1 + LIMIT + 1 + ) + SELECT l1_batches.number, l1_batches.timestamp, @@ -739,16 +747,19 @@ impl BlocksWeb3Dal<'_, '_> { l1_batches.default_aa_code_hash FROM l1_batches - INNER JOIN mb ON TRUE - LEFT JOIN eth_txs_history AS commit_tx ON ( + INNER JOIN mb ON TRUE + LEFT JOIN eth_txs_history AS commit_tx + ON ( l1_batches.eth_commit_tx_id = commit_tx.eth_tx_id AND commit_tx.confirmed_at IS NOT NULL ) - LEFT JOIN eth_txs_history AS prove_tx ON ( + LEFT JOIN eth_txs_history AS prove_tx + ON ( l1_batches.eth_prove_tx_id = prove_tx.eth_tx_id AND prove_tx.confirmed_at IS NOT NULL ) - LEFT JOIN eth_txs_history AS execute_tx ON ( + LEFT JOIN eth_txs_history AS execute_tx + ON ( l1_batches.eth_execute_tx_id = execute_tx.eth_tx_id AND execute_tx.confirmed_at IS NOT NULL ) diff --git a/core/lib/dal/src/consensus_dal.rs b/core/lib/dal/src/consensus_dal.rs index f2e499ce562e..dd976f22086c 100644 --- a/core/lib/dal/src/consensus_dal.rs +++ b/core/lib/dal/src/consensus_dal.rs @@ -165,9 +165,9 @@ impl ConsensusDal<'_, '_> { sqlx::query!( r#" INSERT INTO - consensus_replica_state (fake_key, global_config, genesis, state) + consensus_replica_state (fake_key, global_config, genesis, state) VALUES - (TRUE, $1, $2, $3) + (TRUE, $1, $2, $3) "#, global_config, genesis, @@ -479,9 +479,9 @@ impl ConsensusDal<'_, '_> { sqlx::query!( r#" INSERT INTO - miniblocks_consensus (number, certificate) + miniblocks_consensus (number, certificate) VALUES - ($1, $2) + ($1, $2) "#, i64::try_from(header.number.0).context("overflow")?, zksync_protobuf::serde::Serialize @@ -507,15 +507,15 @@ impl ConsensusDal<'_, '_> { sqlx::query!( r#" INSERT INTO - l1_batches_consensus_committees (l1_batch_number, attesters, updated_at) + l1_batches_consensus_committees (l1_batch_number, attesters, updated_at) VALUES - ($1, $2, NOW()) + ($1, $2, NOW()) ON CONFLICT (l1_batch_number) DO UPDATE SET - l1_batch_number = $1, - attesters = $2, - updated_at = NOW() + l1_batch_number = $1, + attesters = $2, + updated_at = NOW() "#, i64::try_from(number.0).context("overflow")?, committee @@ -582,9 +582,9 @@ impl ConsensusDal<'_, '_> { sqlx::query!( r#" INSERT INTO - l1_batches_consensus (l1_batch_number, certificate, updated_at, created_at) + l1_batches_consensus (l1_batch_number, certificate, updated_at, created_at) VALUES - ($1, $2, NOW(), NOW()) + ($1, $2, NOW(), NOW()) "#, i64::try_from(cert.message.number.0).context("overflow")?, // Unwrap is ok, because serialization should always succeed. diff --git a/core/lib/dal/src/contract_verification_dal.rs b/core/lib/dal/src/contract_verification_dal.rs index 194d85323b61..291e60a50d90 100644 --- a/core/lib/dal/src/contract_verification_dal.rs +++ b/core/lib/dal/src/contract_verification_dal.rs @@ -67,25 +67,25 @@ impl ContractVerificationDal<'_, '_> { sqlx::query!( r#" INSERT INTO - contract_verification_requests ( - contract_address, - source_code, - contract_name, - zk_compiler_version, - compiler_version, - optimization_used, - optimizer_mode, - constructor_arguments, - is_system, - force_evmla, - status, - created_at, - updated_at - ) + contract_verification_requests ( + contract_address, + source_code, + contract_name, + zk_compiler_version, + compiler_version, + optimization_used, + optimizer_mode, + constructor_arguments, + is_system, + force_evmla, + status, + created_at, + updated_at + ) VALUES - ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, 'queued', NOW(), NOW()) + ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, 'queued', NOW(), NOW()) RETURNING - id + id "#, query.contract_address.as_bytes(), // Serialization should always succeed. @@ -143,20 +143,20 @@ impl ContractVerificationDal<'_, '_> { LIMIT 1 FOR UPDATE - SKIP LOCKED + SKIP LOCKED ) RETURNING - id, - contract_address, - source_code, - contract_name, - zk_compiler_version, - compiler_version, - optimization_used, - optimizer_mode, - constructor_arguments, - is_system, - force_evmla + id, + contract_address, + source_code, + contract_name, + zk_compiler_version, + compiler_version, + optimization_used, + optimizer_mode, + constructor_arguments, + is_system, + force_evmla "#, &processing_timeout ) @@ -198,13 +198,13 @@ impl ContractVerificationDal<'_, '_> { sqlx::query!( r#" INSERT INTO - contracts_verification_info (address, verification_info) + contracts_verification_info (address, verification_info) VALUES - ($1, $2) + ($1, $2) ON CONFLICT (address) DO UPDATE SET - verification_info = $2 + verification_info = $2 "#, address.as_bytes(), &verification_info_json @@ -313,8 +313,8 @@ impl ContractVerificationDal<'_, '_> { LIMIT 1 ) deploy_event - JOIN factory_deps ON factory_deps.bytecode_hash = deploy_event.topic3 - LEFT JOIN transactions ON transactions.hash = deploy_event.tx_hash + JOIN factory_deps ON factory_deps.bytecode_hash = deploy_event.topic3 + LEFT JOIN transactions ON transactions.hash = deploy_event.tx_hash WHERE deploy_event.miniblock_number <= ( SELECT @@ -375,9 +375,9 @@ impl ContractVerificationDal<'_, '_> { SELECT VERSION FROM - compiler_versions + COMPILER_VERSIONS WHERE - compiler = $1 + COMPILER = $1 ORDER BY VERSION "#, @@ -433,15 +433,15 @@ impl ContractVerificationDal<'_, '_> { sqlx::query!( r#" INSERT INTO - compiler_versions (VERSION, compiler, created_at, updated_at) + compiler_versions (version, compiler, created_at, updated_at) SELECT u.version, $2, NOW(), NOW() FROM - UNNEST($1::TEXT[]) AS u (VERSION) - ON CONFLICT (VERSION, compiler) DO NOTHING + UNNEST($1::TEXT []) AS u (version) + ON CONFLICT (version, compiler) DO NOTHING "#, &versions, &compiler, diff --git a/core/lib/dal/src/data_availability_dal.rs b/core/lib/dal/src/data_availability_dal.rs index 24048ec4fa19..41dd7efe2732 100644 --- a/core/lib/dal/src/data_availability_dal.rs +++ b/core/lib/dal/src/data_availability_dal.rs @@ -28,9 +28,9 @@ impl DataAvailabilityDal<'_, '_> { let update_result = sqlx::query!( r#" INSERT INTO - data_availability (l1_batch_number, blob_id, sent_at, created_at, updated_at) + data_availability (l1_batch_number, blob_id, sent_at, created_at, updated_at) VALUES - ($1, $2, $3, NOW(), NOW()) + ($1, $2, $3, NOW(), NOW()) ON CONFLICT DO NOTHING "#, i64::from(number.0), @@ -187,7 +187,9 @@ impl DataAvailabilityDal<'_, '_> { pubdata_input FROM l1_batches - LEFT JOIN data_availability ON data_availability.l1_batch_number = l1_batches.number + LEFT JOIN + data_availability + ON data_availability.l1_batch_number = l1_batches.number WHERE eth_commit_tx_id IS NULL AND number != 0 diff --git a/core/lib/dal/src/eth_sender_dal.rs b/core/lib/dal/src/eth_sender_dal.rs index 2266d6fb60f9..4ce76547ac9b 100644 --- a/core/lib/dal/src/eth_sender_dal.rs +++ b/core/lib/dal/src/eth_sender_dal.rs @@ -43,7 +43,7 @@ impl EthSenderDal<'_, '_> { COALESCE(MAX(eth_tx_id), 0) FROM eth_txs_history - JOIN eth_txs ON eth_txs.id = eth_txs_history.eth_tx_id + JOIN eth_txs ON eth_txs.id = eth_txs_history.eth_tx_id WHERE eth_txs_history.sent_at_block IS NOT NULL AND eth_txs.from_addr IS NOT DISTINCT FROM $1 @@ -174,7 +174,7 @@ impl EthSenderDal<'_, '_> { COALESCE(MAX(eth_tx_id), 0) FROM eth_txs_history - JOIN eth_txs ON eth_txs.id = eth_txs_history.eth_tx_id + JOIN eth_txs ON eth_txs.id = eth_txs_history.eth_tx_id WHERE eth_txs_history.sent_at_block IS NOT NULL AND eth_txs.from_addr IS NOT DISTINCT FROM $2 @@ -208,7 +208,7 @@ impl EthSenderDal<'_, '_> { eth_txs.nonce FROM eth_txs_history - JOIN eth_txs ON eth_txs.id = eth_txs_history.eth_tx_id + JOIN eth_txs ON eth_txs.id = eth_txs_history.eth_tx_id WHERE eth_txs_history.sent_at_block IS NULL AND eth_txs.confirmed_eth_tx_history_id IS NULL @@ -238,22 +238,22 @@ impl EthSenderDal<'_, '_> { StorageEthTx, r#" INSERT INTO - eth_txs ( - raw_tx, - nonce, - tx_type, - contract_address, - predicted_gas_cost, - created_at, - updated_at, - from_addr, - blob_sidecar, - is_gateway - ) + eth_txs ( + raw_tx, + nonce, + tx_type, + contract_address, + predicted_gas_cost, + created_at, + updated_at, + from_addr, + blob_sidecar, + is_gateway + ) VALUES - ($1, $2, $3, $4, $5, NOW(), NOW(), $6, $7, $8) + ($1, $2, $3, $4, $5, NOW(), NOW(), $6, $7, $8) RETURNING - * + * "#, raw_tx, nonce as i64, @@ -290,23 +290,23 @@ impl EthSenderDal<'_, '_> { Ok(sqlx::query!( r#" INSERT INTO - eth_txs_history ( - eth_tx_id, - base_fee_per_gas, - priority_fee_per_gas, - tx_hash, - signed_raw_tx, - created_at, - updated_at, - blob_base_fee_per_gas, - sent_at_block, - sent_at - ) + eth_txs_history ( + eth_tx_id, + base_fee_per_gas, + priority_fee_per_gas, + tx_hash, + signed_raw_tx, + created_at, + updated_at, + blob_base_fee_per_gas, + sent_at_block, + sent_at + ) VALUES - ($1, $2, $3, $4, $5, NOW(), NOW(), $6, $7, NOW()) + ($1, $2, $3, $4, $5, NOW(), NOW(), $6, $7, NOW()) ON CONFLICT (tx_hash) DO NOTHING RETURNING - id + id "#, eth_tx_id as i32, base_fee_per_gas, @@ -376,8 +376,8 @@ impl EthSenderDal<'_, '_> { WHERE tx_hash = $1 RETURNING - id, - eth_tx_id + id, + eth_tx_id "#, tx_hash, ) @@ -551,7 +551,7 @@ impl EthSenderDal<'_, '_> { eth_txs.blob_sidecar FROM eth_txs_history - LEFT JOIN eth_txs ON eth_tx_id = eth_txs.id + LEFT JOIN eth_txs ON eth_tx_id = eth_txs.id WHERE eth_tx_id = $1 ORDER BY @@ -602,7 +602,7 @@ impl EthSenderDal<'_, '_> { eth_txs.blob_sidecar FROM eth_txs_history - LEFT JOIN eth_txs ON eth_tx_id = eth_txs.id + LEFT JOIN eth_txs ON eth_tx_id = eth_txs.id WHERE eth_tx_id = $1 ORDER BY @@ -636,7 +636,8 @@ impl EthSenderDal<'_, '_> { FROM eth_txs WHERE - from_addr IS NOT DISTINCT FROM $1 -- can't just use equality as NULL != NULL\ + -- can't just use equality as NULL != NULL + from_addr IS NOT DISTINCT FROM $1 AND is_gateway = $2 ORDER BY id DESC diff --git a/core/lib/dal/src/eth_watcher_dal.rs b/core/lib/dal/src/eth_watcher_dal.rs index 3220868decf6..bdfc7f24c7b5 100644 --- a/core/lib/dal/src/eth_watcher_dal.rs +++ b/core/lib/dal/src/eth_watcher_dal.rs @@ -30,8 +30,8 @@ impl EthWatcherDal<'_, '_> { FROM processed_events WHERE - TYPE = $1 - AND chain_id = $2 + type = $1 + AND chain_id = $2 "#, event_type as EventType, chain_id.0 as i64 @@ -48,13 +48,13 @@ impl EthWatcherDal<'_, '_> { sqlx::query!( r#" INSERT INTO - processed_events ( - TYPE, - chain_id, - next_block_to_process - ) + processed_events ( + type, + chain_id, + next_block_to_process + ) VALUES - ($1, $2, $3) + ($1, $2, $3) "#, event_type as EventType, chain_id.0 as i64, @@ -82,8 +82,8 @@ impl EthWatcherDal<'_, '_> { SET next_block_to_process = $3 WHERE - TYPE = $1 - AND chain_id = $2 + type = $1 + AND chain_id = $2 "#, event_type as EventType, chain_id.0 as i64, diff --git a/core/lib/dal/src/events_dal.rs b/core/lib/dal/src/events_dal.rs index 4050acf7135b..487871e3be7c 100644 --- a/core/lib/dal/src/events_dal.rs +++ b/core/lib/dal/src/events_dal.rs @@ -217,17 +217,17 @@ impl EventsDal<'_, '_> { topic4, value, NULL::bytea AS "block_hash", - NULL::BIGINT AS "l1_batch_number?", + NULL::bigint AS "l1_batch_number?", miniblock_number, tx_hash, tx_index_in_block, event_index_in_block, event_index_in_tx, - NULL::BIGINT AS "block_timestamp?" + NULL::bigint AS "block_timestamp?" FROM events WHERE - tx_hash = ANY ($1) + tx_hash = ANY($1) ORDER BY miniblock_number ASC, event_index_in_block ASC @@ -319,7 +319,7 @@ impl EventsDal<'_, '_> { FROM l2_to_l1_logs WHERE - tx_hash = ANY ($1) + tx_hash = ANY($1) ORDER BY tx_index_in_l1_batch ASC, log_index_in_tx ASC diff --git a/core/lib/dal/src/events_web3_dal.rs b/core/lib/dal/src/events_web3_dal.rs index fc21cc36460c..8b7eb96b7146 100644 --- a/core/lib/dal/src/events_web3_dal.rs +++ b/core/lib/dal/src/events_web3_dal.rs @@ -189,27 +189,28 @@ impl EventsWeb3Dal<'_, '_> { StorageWeb3Log, r#" WITH - events_select AS ( - SELECT - address, - topic1, - topic2, - topic3, - topic4, - value, - miniblock_number, - tx_hash, - tx_index_in_block, - event_index_in_block, - event_index_in_tx - FROM - events - WHERE - miniblock_number > $1 - ORDER BY - miniblock_number ASC, - event_index_in_block ASC - ) + events_select AS ( + SELECT + address, + topic1, + topic2, + topic3, + topic4, + value, + miniblock_number, + tx_hash, + tx_index_in_block, + event_index_in_block, + event_index_in_tx + FROM + events + WHERE + miniblock_number > $1 + ORDER BY + miniblock_number ASC, + event_index_in_block ASC + ) + SELECT miniblocks.hash AS "block_hash?", address AS "address!", @@ -227,7 +228,7 @@ impl EventsWeb3Dal<'_, '_> { miniblocks.timestamp AS "block_timestamp" FROM events_select - INNER JOIN miniblocks ON events_select.miniblock_number = miniblocks.number + INNER JOIN miniblocks ON events_select.miniblock_number = miniblocks.number ORDER BY miniblock_number ASC, event_index_in_block ASC diff --git a/core/lib/dal/src/factory_deps_dal.rs b/core/lib/dal/src/factory_deps_dal.rs index 02ce32306cfb..36dfaa1a466d 100644 --- a/core/lib/dal/src/factory_deps_dal.rs +++ b/core/lib/dal/src/factory_deps_dal.rs @@ -31,7 +31,7 @@ impl FactoryDepsDal<'_, '_> { sqlx::query!( r#" INSERT INTO - factory_deps (bytecode_hash, bytecode, miniblock_number, created_at, updated_at) + factory_deps (bytecode_hash, bytecode, miniblock_number, created_at, updated_at) SELECT u.bytecode_hash, u.bytecode, @@ -39,7 +39,7 @@ impl FactoryDepsDal<'_, '_> { NOW(), NOW() FROM - UNNEST($1::bytea[], $2::bytea[]) AS u (bytecode_hash, bytecode) + UNNEST($1::bytea [], $2::bytea []) AS u (bytecode_hash, bytecode) ON CONFLICT (bytecode_hash) DO NOTHING "#, &bytecode_hashes as &[&[u8]], @@ -136,7 +136,7 @@ impl FactoryDepsDal<'_, '_> { FROM factory_deps WHERE - bytecode_hash = ANY ($1) + bytecode_hash = ANY($1) "#, &hashes_as_bytes as &[&[u8]], ) diff --git a/core/lib/dal/src/proof_generation_dal.rs b/core/lib/dal/src/proof_generation_dal.rs index dada6c69ed34..7943a9302779 100644 --- a/core/lib/dal/src/proof_generation_dal.rs +++ b/core/lib/dal/src/proof_generation_dal.rs @@ -55,7 +55,7 @@ impl ProofGenerationDal<'_, '_> { l1_batch_number FROM proof_generation_details - LEFT JOIN l1_batches ON l1_batch_number = l1_batches.number + LEFT JOIN l1_batches ON l1_batch_number = l1_batches.number WHERE ( vm_run_data_blob_url IS NOT NULL @@ -75,7 +75,7 @@ impl ProofGenerationDal<'_, '_> { 1 ) RETURNING - proof_generation_details.l1_batch_number + proof_generation_details.l1_batch_number "#, &processing_timeout, ) @@ -254,9 +254,9 @@ impl ProofGenerationDal<'_, '_> { let result = sqlx::query!( r#" INSERT INTO - proof_generation_details (l1_batch_number, status, created_at, updated_at) + proof_generation_details (l1_batch_number, status, created_at, updated_at) VALUES - ($1, 'unpicked', NOW(), NOW()) + ($1, 'unpicked', NOW(), NOW()) ON CONFLICT (l1_batch_number) DO NOTHING "#, i64::from(l1_batch_number.0), diff --git a/core/lib/dal/src/protocol_versions_dal.rs b/core/lib/dal/src/protocol_versions_dal.rs index 8cb5094fd49e..72ae811ce764 100644 --- a/core/lib/dal/src/protocol_versions_dal.rs +++ b/core/lib/dal/src/protocol_versions_dal.rs @@ -40,16 +40,16 @@ impl ProtocolVersionsDal<'_, '_> { sqlx::query!( r#" INSERT INTO - protocol_versions ( - id, - timestamp, - bootloader_code_hash, - default_account_code_hash, - upgrade_tx_hash, - created_at - ) + protocol_versions ( + id, + timestamp, + bootloader_code_hash, + default_account_code_hash, + upgrade_tx_hash, + created_at + ) VALUES - ($1, $2, $3, $4, $5, NOW()) + ($1, $2, $3, $4, $5, NOW()) ON CONFLICT DO NOTHING "#, version.minor as i32, @@ -71,9 +71,9 @@ impl ProtocolVersionsDal<'_, '_> { sqlx::query!( r#" INSERT INTO - protocol_patches (minor, patch, snark_wrapper_vk_hash, created_at) + protocol_patches (minor, patch, snark_wrapper_vk_hash, created_at) VALUES - ($1, $2, $3, NOW()) + ($1, $2, $3, NOW()) ON CONFLICT DO NOTHING "#, version.minor as i32, @@ -236,7 +236,7 @@ impl ProtocolVersionsDal<'_, '_> { protocol_patches.snark_wrapper_vk_hash FROM protocol_versions - JOIN protocol_patches ON protocol_patches.minor = protocol_versions.id + JOIN protocol_patches ON protocol_patches.minor = protocol_versions.id WHERE id = $1 ORDER BY diff --git a/core/lib/dal/src/pruning_dal/mod.rs b/core/lib/dal/src/pruning_dal/mod.rs index 0d1584ebba36..bcd9fdcfc3e1 100644 --- a/core/lib/dal/src/pruning_dal/mod.rs +++ b/core/lib/dal/src/pruning_dal/mod.rs @@ -45,32 +45,34 @@ impl PruningDal<'_, '_> { let pruning_info = sqlx::query!( r#" WITH - soft AS ( - SELECT - pruned_l1_batch, - pruned_miniblock - FROM - pruning_log - WHERE - TYPE = 'Soft' - ORDER BY - pruned_l1_batch DESC - LIMIT - 1 - ), - hard AS ( - SELECT - pruned_l1_batch, - pruned_miniblock - FROM - pruning_log - WHERE - TYPE = 'Hard' - ORDER BY - pruned_l1_batch DESC - LIMIT - 1 - ) + soft AS ( + SELECT + pruned_l1_batch, + pruned_miniblock + FROM + pruning_log + WHERE + type = 'Soft' + ORDER BY + pruned_l1_batch DESC + LIMIT + 1 + ), + + hard AS ( + SELECT + pruned_l1_batch, + pruned_miniblock + FROM + pruning_log + WHERE + type = 'Hard' + ORDER BY + pruned_l1_batch DESC + LIMIT + 1 + ) + SELECT soft.pruned_l1_batch AS last_soft_pruned_l1_batch, soft.pruned_miniblock AS last_soft_pruned_miniblock, @@ -78,7 +80,7 @@ impl PruningDal<'_, '_> { hard.pruned_miniblock AS last_hard_pruned_miniblock FROM soft - FULL JOIN hard ON TRUE + FULL JOIN hard ON TRUE "# ) .map(|row| PruningInfo { @@ -110,15 +112,15 @@ impl PruningDal<'_, '_> { sqlx::query!( r#" INSERT INTO - pruning_log ( - pruned_l1_batch, - pruned_miniblock, - TYPE, - created_at, - updated_at - ) + pruning_log ( + pruned_l1_batch, + pruned_miniblock, + type, + created_at, + updated_at + ) VALUES - ($1, $2, $3, NOW(), NOW()) + ($1, $2, $3, NOW(), NOW()) "#, i64::from(last_l1_batch_to_prune.0), i64::from(last_l2_block_to_prune.0), @@ -319,25 +321,28 @@ impl PruningDal<'_, '_> { let execution_result = sqlx::query!( r#" WITH - new_logs AS MATERIALIZED ( - SELECT DISTINCT - ON (hashed_key) hashed_key, - miniblock_number, - operation_number - FROM - storage_logs - WHERE - miniblock_number BETWEEN $1 AND $2 - ORDER BY - hashed_key, - miniblock_number DESC, - operation_number DESC - ) + new_logs AS MATERIALIZED ( + SELECT DISTINCT + ON (hashed_key) + hashed_key, + miniblock_number, + operation_number + FROM + storage_logs + WHERE + miniblock_number BETWEEN $1 AND $2 + ORDER BY + hashed_key, + miniblock_number DESC, + operation_number DESC + ) + DELETE FROM storage_logs USING new_logs WHERE storage_logs.hashed_key = new_logs.hashed_key AND storage_logs.miniblock_number <= $2 - AND (storage_logs.miniblock_number, storage_logs.operation_number) < (new_logs.miniblock_number, new_logs.operation_number) + AND (storage_logs.miniblock_number, storage_logs.operation_number) + < (new_logs.miniblock_number, new_logs.operation_number) "#, i64::from(l2_blocks_to_prune.start().0), i64::from(l2_blocks_to_prune.end().0) @@ -392,15 +397,15 @@ impl PruningDal<'_, '_> { sqlx::query!( r#" INSERT INTO - pruning_log ( - pruned_l1_batch, - pruned_miniblock, - TYPE, - created_at, - updated_at - ) + pruning_log ( + pruned_l1_batch, + pruned_miniblock, + type, + created_at, + updated_at + ) VALUES - ($1, $2, $3, NOW(), NOW()) + ($1, $2, $3, NOW(), NOW()) "#, i64::from(last_l1_batch_to_prune.0), i64::from(last_l2_block_to_prune.0), diff --git a/core/lib/dal/src/snapshot_recovery_dal.rs b/core/lib/dal/src/snapshot_recovery_dal.rs index 0b0c0e1735fd..72cde14b9c56 100644 --- a/core/lib/dal/src/snapshot_recovery_dal.rs +++ b/core/lib/dal/src/snapshot_recovery_dal.rs @@ -18,20 +18,20 @@ impl SnapshotRecoveryDal<'_, '_> { sqlx::query!( r#" INSERT INTO - snapshot_recovery ( - l1_batch_number, - l1_batch_timestamp, - l1_batch_root_hash, - miniblock_number, - miniblock_timestamp, - miniblock_hash, - protocol_version, - storage_logs_chunks_processed, - updated_at, - created_at - ) + snapshot_recovery ( + l1_batch_number, + l1_batch_timestamp, + l1_batch_root_hash, + miniblock_number, + miniblock_timestamp, + miniblock_hash, + protocol_version, + storage_logs_chunks_processed, + updated_at, + created_at + ) VALUES - ($1, $2, $3, $4, $5, $6, $7, $8, NOW(), NOW()) + ($1, $2, $3, $4, $5, $6, $7, $8, NOW(), NOW()) "#, i64::from(status.l1_batch_number.0), status.l1_batch_timestamp as i64, diff --git a/core/lib/dal/src/snapshots_creator_dal.rs b/core/lib/dal/src/snapshots_creator_dal.rs index b076240173b1..fdfc2ccf4691 100644 --- a/core/lib/dal/src/snapshots_creator_dal.rs +++ b/core/lib/dal/src/snapshots_creator_dal.rs @@ -21,11 +21,11 @@ impl SnapshotsCreatorDal<'_, '_> { SELECT INDEX FROM - initial_writes + INITIAL_WRITES WHERE - l1_batch_number <= $1 + L1_BATCH_NUMBER <= $1 ORDER BY - l1_batch_number DESC, + L1_BATCH_NUMBER DESC, INDEX DESC LIMIT 1; @@ -64,7 +64,7 @@ impl SnapshotsCreatorDal<'_, '_> { ( SELECT hashed_key, - MAX(ARRAY[miniblock_number, operation_number]::INT[]) AS op + MAX(ARRAY[miniblock_number, operation_number]::INT []) AS op FROM storage_logs WHERE @@ -76,10 +76,12 @@ impl SnapshotsCreatorDal<'_, '_> { ORDER BY hashed_key ) AS keys - INNER JOIN storage_logs ON keys.hashed_key = storage_logs.hashed_key - AND storage_logs.miniblock_number = keys.op[1] - AND storage_logs.operation_number = keys.op[2] - INNER JOIN initial_writes ON keys.hashed_key = initial_writes.hashed_key + INNER JOIN storage_logs + ON + keys.hashed_key = storage_logs.hashed_key + AND storage_logs.miniblock_number = keys.op[1] + AND storage_logs.operation_number = keys.op[2] + INNER JOIN initial_writes ON keys.hashed_key = initial_writes.hashed_key WHERE initial_writes.l1_batch_number <= $2 "#, @@ -130,7 +132,7 @@ impl SnapshotsCreatorDal<'_, '_> { ( SELECT hashed_key, - MAX(ARRAY[miniblock_number, operation_number]::INT[]) AS op + MAX(ARRAY[miniblock_number, operation_number]::INT []) AS op FROM storage_logs WHERE @@ -142,10 +144,12 @@ impl SnapshotsCreatorDal<'_, '_> { ORDER BY hashed_key ) AS keys - INNER JOIN storage_logs ON keys.hashed_key = storage_logs.hashed_key - AND storage_logs.miniblock_number = keys.op[1] - AND storage_logs.operation_number = keys.op[2] - INNER JOIN initial_writes ON keys.hashed_key = initial_writes.hashed_key + INNER JOIN storage_logs + ON + keys.hashed_key = storage_logs.hashed_key + AND storage_logs.miniblock_number = keys.op[1] + AND storage_logs.operation_number = keys.op[2] + INNER JOIN initial_writes ON keys.hashed_key = initial_writes.hashed_key WHERE initial_writes.l1_batch_number <= $2 "#, diff --git a/core/lib/dal/src/snapshots_dal.rs b/core/lib/dal/src/snapshots_dal.rs index 009efd3da078..5ddad933aad1 100644 --- a/core/lib/dal/src/snapshots_dal.rs +++ b/core/lib/dal/src/snapshots_dal.rs @@ -54,16 +54,16 @@ impl SnapshotsDal<'_, '_> { sqlx::query!( r#" INSERT INTO - snapshots ( - VERSION, - l1_batch_number, - storage_logs_filepaths, - factory_deps_filepath, - created_at, - updated_at - ) + snapshots ( + version, + l1_batch_number, + storage_logs_filepaths, + factory_deps_filepath, + created_at, + updated_at + ) VALUES - ($1, $2, ARRAY_FILL(''::TEXT, ARRAY[$3::INTEGER]), $4, NOW(), NOW()) + ($1, $2, ARRAY_FILL(''::TEXT, ARRAY[$3::INTEGER]), $4, NOW(), NOW()) "#, version as i32, l1_batch_number.0 as i32, @@ -115,7 +115,7 @@ impl SnapshotsDal<'_, '_> { FROM snapshots WHERE - NOT (''::TEXT = ANY (storage_logs_filepaths)) + NOT (''::TEXT = ANY(storage_logs_filepaths)) ORDER BY l1_batch_number DESC "# @@ -141,13 +141,13 @@ impl SnapshotsDal<'_, '_> { r#" SELECT VERSION, - l1_batch_number, - factory_deps_filepath, - storage_logs_filepaths + L1_BATCH_NUMBER, + FACTORY_DEPS_FILEPATH, + STORAGE_LOGS_FILEPATHS FROM - snapshots + SNAPSHOTS ORDER BY - l1_batch_number DESC + L1_BATCH_NUMBER DESC LIMIT 1 "# @@ -168,13 +168,13 @@ impl SnapshotsDal<'_, '_> { r#" SELECT VERSION, - l1_batch_number, - factory_deps_filepath, - storage_logs_filepaths + L1_BATCH_NUMBER, + FACTORY_DEPS_FILEPATH, + STORAGE_LOGS_FILEPATHS FROM - snapshots + SNAPSHOTS WHERE - l1_batch_number = $1 + L1_BATCH_NUMBER = $1 "#, l1_batch_number.0 as i32 ) @@ -198,10 +198,10 @@ impl SnapshotsDal<'_, '_> { WHERE l1_batch_number > $1 RETURNING - VERSION, - l1_batch_number, - factory_deps_filepath, - storage_logs_filepaths + version, + l1_batch_number, + factory_deps_filepath, + storage_logs_filepaths "#, last_retained_l1_batch_number.0 as i32 ) diff --git a/core/lib/dal/src/storage_logs_dal.rs b/core/lib/dal/src/storage_logs_dal.rs index d5de66037b49..adad6eb7e1db 100644 --- a/core/lib/dal/src/storage_logs_dal.rs +++ b/core/lib/dal/src/storage_logs_dal.rs @@ -186,7 +186,8 @@ impl StorageLogsDal<'_, '_> { ) -> DalResult> { let rows = sqlx::query!( r#" - SELECT DISTINCT + SELECT + DISTINCT hashed_key FROM storage_logs @@ -290,13 +291,14 @@ impl StorageLogsDal<'_, '_> { let rows = sqlx::query!( r#" SELECT DISTINCT - ON (hashed_key) hashed_key, + ON (hashed_key) + hashed_key, miniblock_number, value FROM storage_logs WHERE - hashed_key = ANY ($1) + hashed_key = ANY($1) AND miniblock_number <= $2 AND miniblock_number <= COALESCE( ( @@ -539,11 +541,11 @@ impl StorageLogsDal<'_, '_> { SELECT hashed_key, l1_batch_number, - INDEX + index FROM initial_writes WHERE - hashed_key = ANY ($1::bytea[]) + hashed_key = ANY($1::bytea []) "#, &hashed_keys as &[&[u8]], ) @@ -621,7 +623,7 @@ impl StorageLogsDal<'_, '_> { 1 ) AS "value?" FROM - UNNEST($1::bytea[]) AS u (hashed_key) + UNNEST($1::bytea []) AS u (hashed_key) "#, &hashed_keys as &[&[u8]], i64::from(l2_block_number.0) @@ -688,9 +690,9 @@ impl StorageLogsDal<'_, '_> { SELECT COUNT(*) AS COUNT FROM - storage_logs + STORAGE_LOGS WHERE - miniblock_number <= $1 + MINIBLOCK_NUMBER <= $1 "#, i64::from(at_l2_block.0) ) @@ -717,32 +719,33 @@ impl StorageLogsDal<'_, '_> { let rows = sqlx::query!( r#" WITH - sl AS ( - SELECT - ( - SELECT - ARRAY[hashed_key, value] AS kv - FROM - storage_logs - WHERE - storage_logs.miniblock_number = $1 - AND storage_logs.hashed_key >= u.start_key - AND storage_logs.hashed_key <= u.end_key - ORDER BY - storage_logs.hashed_key - LIMIT - 1 - ) - FROM - UNNEST($2::bytea[], $3::bytea[]) AS u (start_key, end_key) - ) + sl AS ( + SELECT + ( + SELECT + ARRAY[hashed_key, value] AS kv + FROM + storage_logs + WHERE + storage_logs.miniblock_number = $1 + AND storage_logs.hashed_key >= u.start_key + AND storage_logs.hashed_key <= u.end_key + ORDER BY + storage_logs.hashed_key + LIMIT + 1 + ) + FROM + UNNEST($2::bytea [], $3::bytea []) AS u (start_key, end_key) + ) + SELECT sl.kv[1] AS "hashed_key?", sl.kv[2] AS "value?", initial_writes.index FROM sl - LEFT OUTER JOIN initial_writes ON initial_writes.hashed_key = sl.kv[1] + LEFT OUTER JOIN initial_writes ON initial_writes.hashed_key = sl.kv[1] "#, i64::from(l2_block_number.0), &start_keys as &[&[u8]], @@ -779,7 +782,7 @@ impl StorageLogsDal<'_, '_> { initial_writes.index FROM storage_logs - INNER JOIN initial_writes ON storage_logs.hashed_key = initial_writes.hashed_key + INNER JOIN initial_writes ON storage_logs.hashed_key = initial_writes.hashed_key WHERE storage_logs.miniblock_number = $1 AND storage_logs.hashed_key >= $2::bytea diff --git a/core/lib/dal/src/storage_logs_dedup_dal.rs b/core/lib/dal/src/storage_logs_dedup_dal.rs index 02049f3e9ade..a94c237bc5b1 100644 --- a/core/lib/dal/src/storage_logs_dedup_dal.rs +++ b/core/lib/dal/src/storage_logs_dedup_dal.rs @@ -93,7 +93,7 @@ impl StorageLogsDedupDal<'_, '_> { sqlx::query!( r#" INSERT INTO - initial_writes (hashed_key, INDEX, l1_batch_number, created_at, updated_at) + initial_writes (hashed_key, index, l1_batch_number, created_at, updated_at) SELECT u.hashed_key, u.index, @@ -101,7 +101,7 @@ impl StorageLogsDedupDal<'_, '_> { NOW(), NOW() FROM - UNNEST($1::bytea[], $2::BIGINT[]) AS u (hashed_key, INDEX) + UNNEST($1::bytea [], $2::bigint []) AS u (hashed_key, index) "#, &hashed_keys as &[&[u8]], &indices, @@ -154,7 +154,7 @@ impl StorageLogsDedupDal<'_, '_> { SELECT MAX(INDEX) AS "max?" FROM - initial_writes + INITIAL_WRITES "#, ) .instrument("max_enumeration_index") @@ -174,15 +174,15 @@ impl StorageLogsDedupDal<'_, '_> { SELECT MAX(INDEX) AS "max?" FROM - initial_writes + INITIAL_WRITES WHERE - l1_batch_number = ( + L1_BATCH_NUMBER = ( SELECT - MAX(l1_batch_number) AS "max?" + MAX(L1_BATCH_NUMBER) AS "max?" FROM - initial_writes + INITIAL_WRITES WHERE - l1_batch_number <= $1 + L1_BATCH_NUMBER <= $1 ) "#, i64::from(l1_batch_number.0) @@ -202,13 +202,13 @@ impl StorageLogsDedupDal<'_, '_> { r#" SELECT hashed_key, - INDEX + index FROM initial_writes WHERE l1_batch_number = $1 ORDER BY - INDEX + index "#, i64::from(l1_batch_number.0) ) @@ -230,9 +230,9 @@ impl StorageLogsDedupDal<'_, '_> { SELECT INDEX FROM - initial_writes + INITIAL_WRITES WHERE - hashed_key = $1 + HASHED_KEY = $1 "#, hashed_key.as_bytes() ) @@ -253,10 +253,10 @@ impl StorageLogsDedupDal<'_, '_> { SELECT INDEX FROM - initial_writes + INITIAL_WRITES WHERE - hashed_key = $1 - AND l1_batch_number <= $2 + HASHED_KEY = $1 + AND L1_BATCH_NUMBER <= $2 "#, hashed_key.as_bytes(), l1_batch_number.0 as i32, @@ -279,7 +279,7 @@ impl StorageLogsDedupDal<'_, '_> { FROM initial_writes WHERE - hashed_key = ANY ($1) + hashed_key = ANY($1) "#, &hashed_keys as &[&[u8]], ) @@ -299,7 +299,7 @@ impl StorageLogsDedupDal<'_, '_> { SELECT hashed_key, l1_batch_number, - INDEX + index FROM initial_writes "# diff --git a/core/lib/dal/src/storage_web3_dal.rs b/core/lib/dal/src/storage_web3_dal.rs index f54ac766ee8c..f3a20ac39fa0 100644 --- a/core/lib/dal/src/storage_web3_dal.rs +++ b/core/lib/dal/src/storage_web3_dal.rs @@ -253,7 +253,7 @@ impl StorageWeb3Dal<'_, '_> { LIMIT 1 ) t - JOIN factory_deps ON value = factory_deps.bytecode_hash + JOIN factory_deps ON value = factory_deps.bytecode_hash WHERE value != $3 "#, diff --git a/core/lib/dal/src/system_dal.rs b/core/lib/dal/src/system_dal.rs index f6dda53b1584..105665fa2ec6 100644 --- a/core/lib/dal/src/system_dal.rs +++ b/core/lib/dal/src/system_dal.rs @@ -28,10 +28,10 @@ impl SystemDal<'_, '_> { SELECT PG_LAST_WAL_RECEIVE_LSN() = PG_LAST_WAL_REPLAY_LSN() AS synced, EXTRACT( - SECONDS + seconds FROM - NOW() - PG_LAST_XACT_REPLAY_TIMESTAMP() - )::INT AS LAG + NOW() - PG_LAST_XACT_REPLAY_TIMESTAMP() + )::INT AS lag "# ) .instrument("get_replication_lag") @@ -49,10 +49,18 @@ impl SystemDal<'_, '_> { r#" SELECT table_name, - PG_TABLE_SIZE(('public.' || QUOTE_IDENT(table_name))::regclass) AS table_size, - PG_INDEXES_SIZE(('public.' || QUOTE_IDENT(table_name))::regclass) AS indexes_size, - PG_RELATION_SIZE(('public.' || QUOTE_IDENT(table_name))::regclass) AS relation_size, - PG_TOTAL_RELATION_SIZE(('public.' || QUOTE_IDENT(table_name))::regclass) AS total_size + PG_TABLE_SIZE( + ('public.' || QUOTE_IDENT(table_name))::regclass + ) AS table_size, + PG_INDEXES_SIZE( + ('public.' || QUOTE_IDENT(table_name))::regclass + ) AS indexes_size, + PG_RELATION_SIZE( + ('public.' || QUOTE_IDENT(table_name))::regclass + ) AS relation_size, + PG_TOTAL_RELATION_SIZE( + ('public.' || QUOTE_IDENT(table_name))::regclass + ) AS total_size FROM information_schema.tables WHERE diff --git a/core/lib/dal/src/tee_proof_generation_dal.rs b/core/lib/dal/src/tee_proof_generation_dal.rs index cc6b87a07aca..db56b9d0e3e7 100644 --- a/core/lib/dal/src/tee_proof_generation_dal.rs +++ b/core/lib/dal/src/tee_proof_generation_dal.rs @@ -53,7 +53,9 @@ impl TeeProofGenerationDal<'_, '_> { proofs.l1_batch_number FROM tee_proof_generation_details AS proofs - JOIN tee_verifier_input_producer_jobs AS inputs ON proofs.l1_batch_number = inputs.l1_batch_number + JOIN + tee_verifier_input_producer_jobs AS inputs + ON proofs.l1_batch_number = inputs.l1_batch_number WHERE inputs.status = $3 AND ( @@ -69,10 +71,10 @@ impl TeeProofGenerationDal<'_, '_> { LIMIT 1 FOR UPDATE - SKIP LOCKED + SKIP LOCKED ) RETURNING - tee_proof_generation_details.l1_batch_number + tee_proof_generation_details.l1_batch_number "#, TeeProofGenerationJobStatus::PickedByProver.to_string(), tee_type.to_string(), @@ -183,9 +185,11 @@ impl TeeProofGenerationDal<'_, '_> { let query = sqlx::query!( r#" INSERT INTO - tee_proof_generation_details (l1_batch_number, tee_type, status, created_at, updated_at) + tee_proof_generation_details ( + l1_batch_number, tee_type, status, created_at, updated_at + ) VALUES - ($1, $2, $3, NOW(), NOW()) + ($1, $2, $3, NOW(), NOW()) ON CONFLICT (l1_batch_number, tee_type) DO NOTHING "#, batch_number, @@ -208,9 +212,9 @@ impl TeeProofGenerationDal<'_, '_> { let query = sqlx::query!( r#" INSERT INTO - tee_attestations (pubkey, attestation) + tee_attestations (pubkey, attestation) VALUES - ($1, $2) + ($1, $2) ON CONFLICT (pubkey) DO NOTHING "#, pubkey, @@ -274,7 +278,9 @@ impl TeeProofGenerationDal<'_, '_> { proofs.l1_batch_number FROM tee_proof_generation_details AS proofs - JOIN tee_verifier_input_producer_jobs AS inputs ON proofs.l1_batch_number = inputs.l1_batch_number + JOIN + tee_verifier_input_producer_jobs AS inputs + ON proofs.l1_batch_number = inputs.l1_batch_number WHERE inputs.status = $1 AND proofs.status = $2 diff --git a/core/lib/dal/src/tee_verifier_input_producer_dal.rs b/core/lib/dal/src/tee_verifier_input_producer_dal.rs index 4a178fd52253..dddb451a2d7d 100644 --- a/core/lib/dal/src/tee_verifier_input_producer_dal.rs +++ b/core/lib/dal/src/tee_verifier_input_producer_dal.rs @@ -55,9 +55,11 @@ impl TeeVerifierInputProducerDal<'_, '_> { sqlx::query!( r#" INSERT INTO - tee_verifier_input_producer_jobs (l1_batch_number, status, created_at, updated_at) + tee_verifier_input_producer_jobs ( + l1_batch_number, status, created_at, updated_at + ) VALUES - ($1, $2, NOW(), NOW()) + ($1, $2, NOW(), NOW()) ON CONFLICT (l1_batch_number) DO NOTHING "#, i64::from(l1_batch_number.0), @@ -104,10 +106,10 @@ impl TeeVerifierInputProducerDal<'_, '_> { LIMIT 1 FOR UPDATE - SKIP LOCKED + SKIP LOCKED ) RETURNING - tee_verifier_input_producer_jobs.l1_batch_number + tee_verifier_input_producer_jobs.l1_batch_number "#, TeeVerifierInputProducerJobStatus::InProgress as TeeVerifierInputProducerJobStatus, TeeVerifierInputProducerJobStatus::Queued as TeeVerifierInputProducerJobStatus, @@ -197,7 +199,7 @@ impl TeeVerifierInputProducerDal<'_, '_> { l1_batch_number = $2 AND status != $5 RETURNING - tee_verifier_input_producer_jobs.attempts + tee_verifier_input_producer_jobs.attempts "#, TeeVerifierInputProducerJobStatus::Failed as TeeVerifierInputProducerJobStatus, i64::from(l1_batch_number.0), diff --git a/core/lib/dal/src/tokens_dal.rs b/core/lib/dal/src/tokens_dal.rs index b34b913c45c3..218e152fa82a 100644 --- a/core/lib/dal/src/tokens_dal.rs +++ b/core/lib/dal/src/tokens_dal.rs @@ -110,7 +110,7 @@ impl TokensDal<'_, '_> { r#" DELETE FROM tokens WHERE - l2_address = ANY ($1) + l2_address = ANY($1) "#, &token_addresses_to_be_removed as &[_] ) diff --git a/core/lib/dal/src/tokens_web3_dal.rs b/core/lib/dal/src/tokens_web3_dal.rs index 00c7a69385db..794de18163ec 100644 --- a/core/lib/dal/src/tokens_web3_dal.rs +++ b/core/lib/dal/src/tokens_web3_dal.rs @@ -43,7 +43,7 @@ impl TokensWeb3Dal<'_, '_> { SELECT l1_address, l2_address, - NAME, + name, symbol, decimals FROM @@ -95,7 +95,7 @@ impl TokensWeb3Dal<'_, '_> { SELECT l1_address, l2_address, - NAME, + name, symbol, decimals FROM diff --git a/core/lib/dal/src/transactions_dal.rs b/core/lib/dal/src/transactions_dal.rs index 408837d699e6..67c965312bd4 100644 --- a/core/lib/dal/src/transactions_dal.rs +++ b/core/lib/dal/src/transactions_dal.rs @@ -88,53 +88,53 @@ impl TransactionsDal<'_, '_> { sqlx::query!( r#" INSERT INTO - transactions ( - hash, - is_priority, - initiator_address, - gas_limit, - max_fee_per_gas, - gas_per_pubdata_limit, - data, - priority_op_id, - full_fee, - layer_2_tip_fee, - contract_address, - l1_block_number, - value, - paymaster, - paymaster_input, - tx_format, - l1_tx_mint, - l1_tx_refund_recipient, - received_at, - created_at, - updated_at - ) + transactions ( + hash, + is_priority, + initiator_address, + gas_limit, + max_fee_per_gas, + gas_per_pubdata_limit, + data, + priority_op_id, + full_fee, + layer_2_tip_fee, + contract_address, + l1_block_number, + value, + paymaster, + paymaster_input, + tx_format, + l1_tx_mint, + l1_tx_refund_recipient, + received_at, + created_at, + updated_at + ) VALUES - ( - $1, - TRUE, - $2, - $3, - $4, - $5, - $6, - $7, - $8, - $9, - $10, - $11, - $12, - $13, - $14, - $15, - $16, - $17, - $18, - NOW(), - NOW() - ) + ( + $1, + TRUE, + $2, + $3, + $4, + $5, + $6, + $7, + $8, + $9, + $10, + $11, + $12, + $13, + $14, + $15, + $16, + $17, + $18, + NOW(), + NOW() + ) ON CONFLICT (hash) DO NOTHING "#, tx_hash_bytes, @@ -190,49 +190,49 @@ impl TransactionsDal<'_, '_> { sqlx::query!( r#" INSERT INTO - transactions ( - hash, - is_priority, - initiator_address, - gas_limit, - max_fee_per_gas, - gas_per_pubdata_limit, - data, - upgrade_id, - contract_address, - l1_block_number, - value, - paymaster, - paymaster_input, - tx_format, - l1_tx_mint, - l1_tx_refund_recipient, - received_at, - created_at, - updated_at - ) + transactions ( + hash, + is_priority, + initiator_address, + gas_limit, + max_fee_per_gas, + gas_per_pubdata_limit, + data, + upgrade_id, + contract_address, + l1_block_number, + value, + paymaster, + paymaster_input, + tx_format, + l1_tx_mint, + l1_tx_refund_recipient, + received_at, + created_at, + updated_at + ) VALUES - ( - $1, - TRUE, - $2, - $3, - $4, - $5, - $6, - $7, - $8, - $9, - $10, - $11, - $12, - $13, - $14, - $15, - $16, - NOW(), - NOW() - ) + ( + $1, + TRUE, + $2, + $3, + $4, + $5, + $6, + $7, + $8, + $9, + $10, + $11, + $12, + $13, + $14, + $15, + $16, + NOW(), + NOW() + ) ON CONFLICT (hash) DO NOTHING "#, tx_hash, @@ -326,86 +326,101 @@ impl TransactionsDal<'_, '_> { let query_result = sqlx::query!( r#" INSERT INTO - transactions ( - hash, - is_priority, - initiator_address, - nonce, - signature, - gas_limit, - max_fee_per_gas, - max_priority_fee_per_gas, - gas_per_pubdata_limit, - input, - data, - tx_format, - contract_address, - value, - paymaster, - paymaster_input, - execution_info, - received_at, - created_at, - updated_at - ) + transactions ( + hash, + is_priority, + initiator_address, + nonce, + signature, + gas_limit, + max_fee_per_gas, + max_priority_fee_per_gas, + gas_per_pubdata_limit, + input, + data, + tx_format, + contract_address, + value, + paymaster, + paymaster_input, + execution_info, + received_at, + created_at, + updated_at + ) VALUES - ( - $1, - FALSE, - $2, - $3, - $4, - $5, - $6, - $7, - $8, - $9, - $10, - $11, - $12, - $13, - $14, - $15, - JSONB_BUILD_OBJECT('gas_used', $16::BIGINT, 'storage_writes', $17::INT, 'contracts_used', $18::INT), - $19, - NOW(), - NOW() - ) + ( + $1, + FALSE, + $2, + $3, + $4, + $5, + $6, + $7, + $8, + $9, + $10, + $11, + $12, + $13, + $14, + $15, + JSONB_BUILD_OBJECT( + 'gas_used', + $16::BIGINT, + 'storage_writes', + $17::INT, + 'contracts_used', + $18::INT + ), + $19, + NOW(), + NOW() + ) ON CONFLICT (initiator_address, nonce) DO UPDATE SET - hash = $1, - signature = $4, - gas_limit = $5, - max_fee_per_gas = $6, - max_priority_fee_per_gas = $7, - gas_per_pubdata_limit = $8, - input = $9, - data = $10, - tx_format = $11, - contract_address = $12, - value = $13, - paymaster = $14, - paymaster_input = $15, - execution_info = JSONB_BUILD_OBJECT('gas_used', $16::BIGINT, 'storage_writes', $17::INT, 'contracts_used', $18::INT), - in_mempool = FALSE, - received_at = $19, - created_at = NOW(), - updated_at = NOW(), - error = NULL + hash = $1, + signature = $4, + gas_limit = $5, + max_fee_per_gas = $6, + max_priority_fee_per_gas = $7, + gas_per_pubdata_limit = $8, + input = $9, + data = $10, + tx_format = $11, + contract_address = $12, + value = $13, + paymaster = $14, + paymaster_input = $15, + execution_info + = JSONB_BUILD_OBJECT( + 'gas_used', + $16::BIGINT, + 'storage_writes', + $17::INT, + 'contracts_used', + $18::INT + ), + in_mempool = FALSE, + received_at = $19, + created_at = NOW(), + updated_at = NOW(), + error = NULL WHERE - transactions.is_priority = FALSE - AND transactions.miniblock_number IS NULL + transactions.is_priority = FALSE + AND transactions.miniblock_number IS NULL RETURNING - ( - SELECT - hash - FROM - transactions - WHERE - transactions.initiator_address = $2 - AND transactions.nonce = $3 - ) IS NOT NULL AS "is_replaced!" + ( + SELECT + hash + FROM + transactions + WHERE + transactions.initiator_address = $2 + AND transactions.nonce = $3 + ) IS NOT NULL AS "is_replaced!" "#, tx_hash.as_bytes(), initiator_address.as_bytes(), @@ -489,8 +504,8 @@ impl TransactionsDal<'_, '_> { FROM ( SELECT - UNNEST($1::INT[]) AS l1_batch_tx_index, - UNNEST($2::bytea[]) AS hash + UNNEST($1::INT []) AS l1_batch_tx_index, + UNNEST($2::BYTEA []) AS hash ) AS data_table WHERE transactions.hash = data_table.hash @@ -535,7 +550,7 @@ impl TransactionsDal<'_, '_> { r#" DELETE FROM transactions WHERE - hash = ANY ($1) + hash = ANY($1) "#, &tx_hashes as &[&[u8]], ) @@ -604,12 +619,12 @@ impl TransactionsDal<'_, '_> { sqlx::query!( r#" INSERT INTO - call_traces (tx_hash, call_trace) + call_traces (tx_hash, call_trace) SELECT u.tx_hash, u.call_trace FROM - UNNEST($1::bytea[], $2::bytea[]) AS u (tx_hash, call_trace) + UNNEST($1::bytea [], $2::bytea []) AS u (tx_hash, call_trace) "#, &call_traces_tx_hashes as &[&[u8]], &bytea_call_traces @@ -735,33 +750,33 @@ impl TransactionsDal<'_, '_> { let query = sqlx::query!( r#" INSERT INTO - transactions ( - hash, - is_priority, - initiator_address, - nonce, - signature, - gas_limit, - max_fee_per_gas, - max_priority_fee_per_gas, - gas_per_pubdata_limit, - input, - data, - tx_format, - contract_address, - value, - paymaster, - paymaster_input, - execution_info, - miniblock_number, - index_in_block, - error, - effective_gas_price, - refunded_gas, - received_at, - created_at, - updated_at - ) + transactions ( + hash, + is_priority, + initiator_address, + nonce, + signature, + gas_limit, + max_fee_per_gas, + max_priority_fee_per_gas, + gas_per_pubdata_limit, + input, + data, + tx_format, + contract_address, + value, + paymaster, + paymaster_input, + execution_info, + miniblock_number, + index_in_block, + error, + effective_gas_price, + refunded_gas, + received_at, + created_at, + updated_at + ) SELECT data_table.hash, FALSE, @@ -791,26 +806,26 @@ impl TransactionsDal<'_, '_> { FROM ( SELECT - UNNEST($1::bytea[]) AS hash, - UNNEST($2::bytea[]) AS initiator_address, - UNNEST($3::INT[]) AS nonce, - UNNEST($4::bytea[]) AS signature, - UNNEST($5::NUMERIC[]) AS gas_limit, - UNNEST($6::NUMERIC[]) AS max_fee_per_gas, - UNNEST($7::NUMERIC[]) AS max_priority_fee_per_gas, - UNNEST($8::NUMERIC[]) AS gas_per_pubdata_limit, - UNNEST($9::bytea[]) AS input, - UNNEST($10::jsonb[]) AS data, - UNNEST($11::INT[]) AS tx_format, - UNNEST($12::bytea[]) AS contract_address, - UNNEST($13::NUMERIC[]) AS value, - UNNEST($14::bytea[]) AS paymaster, - UNNEST($15::bytea[]) AS paymaster_input, - UNNEST($16::jsonb[]) AS new_execution_info, - UNNEST($17::INTEGER[]) AS index_in_block, - UNNEST($18::VARCHAR[]) AS error, - UNNEST($19::NUMERIC[]) AS effective_gas_price, - UNNEST($20::BIGINT[]) AS refunded_gas + UNNEST($1::bytea []) AS hash, + UNNEST($2::bytea []) AS initiator_address, + UNNEST($3::int []) AS nonce, + UNNEST($4::bytea []) AS signature, + UNNEST($5::numeric []) AS gas_limit, + UNNEST($6::numeric []) AS max_fee_per_gas, + UNNEST($7::numeric []) AS max_priority_fee_per_gas, + UNNEST($8::numeric []) AS gas_per_pubdata_limit, + UNNEST($9::bytea []) AS input, + UNNEST($10::jsonb []) AS data, + UNNEST($11::int []) AS tx_format, + UNNEST($12::bytea []) AS contract_address, + UNNEST($13::numeric []) AS value, + UNNEST($14::bytea []) AS paymaster, + UNNEST($15::bytea []) AS paymaster_input, + UNNEST($16::jsonb []) AS new_execution_info, + UNNEST($17::integer []) AS index_in_block, + UNNEST($18::varchar []) AS error, + UNNEST($19::numeric []) AS effective_gas_price, + UNNEST($20::bigint []) AS refunded_gas ) AS data_table "#, &l2_hashes as &[&[u8]], @@ -974,29 +989,32 @@ impl TransactionsDal<'_, '_> { FROM ( SELECT - UNNEST($1::bytea[]) AS initiator_address, - UNNEST($2::INT[]) AS nonce, - UNNEST($3::bytea[]) AS hash, - UNNEST($4::bytea[]) AS signature, - UNNEST($5::NUMERIC[]) AS gas_limit, - UNNEST($6::NUMERIC[]) AS max_fee_per_gas, - UNNEST($7::NUMERIC[]) AS max_priority_fee_per_gas, - UNNEST($8::NUMERIC[]) AS gas_per_pubdata_limit, - UNNEST($9::INT[]) AS tx_format, - UNNEST($10::INTEGER[]) AS index_in_block, - UNNEST($11::VARCHAR[]) AS error, - UNNEST($12::NUMERIC[]) AS effective_gas_price, - UNNEST($13::jsonb[]) AS new_execution_info, - UNNEST($14::bytea[]) AS input, - UNNEST($15::jsonb[]) AS data, - UNNEST($16::BIGINT[]) AS refunded_gas, - UNNEST($17::NUMERIC[]) AS value, - UNNEST($18::bytea[]) AS contract_address, - UNNEST($19::bytea[]) AS paymaster, - UNNEST($20::bytea[]) AS paymaster_input + UNNEST($1::bytea []) AS initiator_address, + UNNEST($2::int []) AS nonce, + UNNEST($3::bytea []) AS hash, + UNNEST($4::bytea []) AS signature, + UNNEST($5::numeric []) AS gas_limit, + UNNEST($6::numeric []) AS max_fee_per_gas, + UNNEST($7::numeric []) AS max_priority_fee_per_gas, + UNNEST($8::numeric []) AS gas_per_pubdata_limit, + UNNEST($9::int []) AS tx_format, + UNNEST($10::integer []) AS index_in_block, + UNNEST($11::varchar []) AS error, + UNNEST($12::numeric []) AS effective_gas_price, + UNNEST($13::jsonb []) AS new_execution_info, + UNNEST($14::bytea []) AS input, + UNNEST($15::jsonb []) AS data, + UNNEST($16::bigint []) AS refunded_gas, + UNNEST($17::numeric []) AS value, + UNNEST($18::bytea []) AS contract_address, + UNNEST($19::bytea []) AS paymaster, + UNNEST($20::bytea []) AS paymaster_input ) AS data_table_temp - JOIN transactions ON transactions.initiator_address = data_table_temp.initiator_address - AND transactions.nonce = data_table_temp.nonce + JOIN transactions + ON + transactions.initiator_address + = data_table_temp.initiator_address + AND transactions.nonce = data_table_temp.nonce ORDER BY transactions.hash ) AS data_table @@ -1122,35 +1140,35 @@ impl TransactionsDal<'_, '_> { let query = sqlx::query!( r#" INSERT INTO - transactions ( - hash, - is_priority, - initiator_address, - gas_limit, - max_fee_per_gas, - gas_per_pubdata_limit, - data, - priority_op_id, - full_fee, - layer_2_tip_fee, - contract_address, - l1_block_number, - value, - paymaster, - paymaster_input, - tx_format, - l1_tx_mint, - l1_tx_refund_recipient, - miniblock_number, - index_in_block, - error, - execution_info, - refunded_gas, - effective_gas_price, - received_at, - created_at, - updated_at - ) + transactions ( + hash, + is_priority, + initiator_address, + gas_limit, + max_fee_per_gas, + gas_per_pubdata_limit, + data, + priority_op_id, + full_fee, + layer_2_tip_fee, + contract_address, + l1_block_number, + value, + paymaster, + paymaster_input, + tx_format, + l1_tx_mint, + l1_tx_refund_recipient, + miniblock_number, + index_in_block, + error, + execution_info, + refunded_gas, + effective_gas_price, + received_at, + created_at, + updated_at + ) SELECT data_table.hash, TRUE, @@ -1182,26 +1200,26 @@ impl TransactionsDal<'_, '_> { FROM ( SELECT - UNNEST($1::BYTEA[]) AS hash, - UNNEST($2::BYTEA[]) AS initiator_address, - UNNEST($3::NUMERIC[]) AS gas_limit, - UNNEST($4::NUMERIC[]) AS max_fee_per_gas, - UNNEST($5::NUMERIC[]) AS gas_per_pubdata_limit, - UNNEST($6::JSONB[]) AS data, - UNNEST($7::BIGINT[]) AS priority_op_id, - UNNEST($8::NUMERIC[]) AS full_fee, - UNNEST($9::NUMERIC[]) AS layer_2_tip_fee, - UNNEST($10::BYTEA[]) AS contract_address, - UNNEST($11::INT[]) AS l1_block_number, - UNNEST($12::NUMERIC[]) AS value, - UNNEST($13::INTEGER[]) AS tx_format, - UNNEST($14::NUMERIC[]) AS l1_tx_mint, - UNNEST($15::BYTEA[]) AS l1_tx_refund_recipient, - UNNEST($16::INT[]) AS index_in_block, - UNNEST($17::VARCHAR[]) AS error, - UNNEST($18::JSONB[]) AS execution_info, - UNNEST($19::BIGINT[]) AS refunded_gas, - UNNEST($20::NUMERIC[]) AS effective_gas_price + UNNEST($1::bytea []) AS hash, + UNNEST($2::bytea []) AS initiator_address, + UNNEST($3::numeric []) AS gas_limit, + UNNEST($4::numeric []) AS max_fee_per_gas, + UNNEST($5::numeric []) AS gas_per_pubdata_limit, + UNNEST($6::jsonb []) AS data, + UNNEST($7::bigint []) AS priority_op_id, + UNNEST($8::numeric []) AS full_fee, + UNNEST($9::numeric []) AS layer_2_tip_fee, + UNNEST($10::bytea []) AS contract_address, + UNNEST($11::int []) AS l1_block_number, + UNNEST($12::numeric []) AS value, + UNNEST($13::integer []) AS tx_format, + UNNEST($14::numeric []) AS l1_tx_mint, + UNNEST($15::bytea []) AS l1_tx_refund_recipient, + UNNEST($16::int []) AS index_in_block, + UNNEST($17::varchar []) AS error, + UNNEST($18::jsonb []) AS execution_info, + UNNEST($19::bigint []) AS refunded_gas, + UNNEST($20::numeric []) AS effective_gas_price ) AS data_table "#, &l1_hashes as &[&[u8]], @@ -1300,12 +1318,12 @@ impl TransactionsDal<'_, '_> { FROM ( SELECT - UNNEST($2::bytea[]) AS hash, - UNNEST($3::INTEGER[]) AS index_in_block, - UNNEST($4::VARCHAR[]) AS error, - UNNEST($5::jsonb[]) AS new_execution_info, - UNNEST($6::BIGINT[]) AS refunded_gas, - UNNEST($7::NUMERIC[]) AS effective_gas_price + UNNEST($2::bytea []) AS hash, + UNNEST($3::integer []) AS index_in_block, + UNNEST($4::varchar []) AS error, + UNNEST($5::jsonb []) AS new_execution_info, + UNNEST($6::bigint []) AS refunded_gas, + UNNEST($7::numeric []) AS effective_gas_price ) AS data_table WHERE transactions.hash = data_table.hash @@ -1413,33 +1431,33 @@ impl TransactionsDal<'_, '_> { let query = sqlx::query!( r#" INSERT INTO - transactions ( - hash, - is_priority, - initiator_address, - gas_limit, - max_fee_per_gas, - gas_per_pubdata_limit, - data, - upgrade_id, - contract_address, - l1_block_number, - value, - paymaster, - paymaster_input, - tx_format, - l1_tx_mint, - l1_tx_refund_recipient, - miniblock_number, - index_in_block, - error, - execution_info, - refunded_gas, - effective_gas_price, - received_at, - created_at, - updated_at - ) + transactions ( + hash, + is_priority, + initiator_address, + gas_limit, + max_fee_per_gas, + gas_per_pubdata_limit, + data, + upgrade_id, + contract_address, + l1_block_number, + value, + paymaster, + paymaster_input, + tx_format, + l1_tx_mint, + l1_tx_refund_recipient, + miniblock_number, + index_in_block, + error, + execution_info, + refunded_gas, + effective_gas_price, + received_at, + created_at, + updated_at + ) SELECT data_table.hash, TRUE, @@ -1469,24 +1487,24 @@ impl TransactionsDal<'_, '_> { FROM ( SELECT - UNNEST($1::BYTEA[]) AS hash, - UNNEST($2::BYTEA[]) AS initiator_address, - UNNEST($3::NUMERIC[]) AS gas_limit, - UNNEST($4::NUMERIC[]) AS max_fee_per_gas, - UNNEST($5::NUMERIC[]) AS gas_per_pubdata_limit, - UNNEST($6::JSONB[]) AS data, - UNNEST($7::INT[]) AS upgrade_id, - UNNEST($8::BYTEA[]) AS contract_address, - UNNEST($9::INT[]) AS l1_block_number, - UNNEST($10::NUMERIC[]) AS value, - UNNEST($11::INTEGER[]) AS tx_format, - UNNEST($12::NUMERIC[]) AS l1_tx_mint, - UNNEST($13::BYTEA[]) AS l1_tx_refund_recipient, - UNNEST($14::INT[]) AS index_in_block, - UNNEST($15::VARCHAR[]) AS error, - UNNEST($16::JSONB[]) AS execution_info, - UNNEST($17::BIGINT[]) AS refunded_gas, - UNNEST($18::NUMERIC[]) AS effective_gas_price + UNNEST($1::bytea []) AS hash, + UNNEST($2::bytea []) AS initiator_address, + UNNEST($3::numeric []) AS gas_limit, + UNNEST($4::numeric []) AS max_fee_per_gas, + UNNEST($5::numeric []) AS gas_per_pubdata_limit, + UNNEST($6::jsonb []) AS data, + UNNEST($7::int []) AS upgrade_id, + UNNEST($8::bytea []) AS contract_address, + UNNEST($9::int []) AS l1_block_number, + UNNEST($10::numeric []) AS value, + UNNEST($11::integer []) AS tx_format, + UNNEST($12::numeric []) AS l1_tx_mint, + UNNEST($13::bytea []) AS l1_tx_refund_recipient, + UNNEST($14::int []) AS index_in_block, + UNNEST($15::varchar []) AS error, + UNNEST($16::jsonb []) AS execution_info, + UNNEST($17::bigint []) AS refunded_gas, + UNNEST($18::numeric []) AS effective_gas_price ) AS data_table "#, &upgrade_hashes as &[&[u8]], @@ -1585,12 +1603,12 @@ impl TransactionsDal<'_, '_> { FROM ( SELECT - UNNEST($2::bytea[]) AS hash, - UNNEST($3::INTEGER[]) AS index_in_block, - UNNEST($4::VARCHAR[]) AS error, - UNNEST($5::jsonb[]) AS new_execution_info, - UNNEST($6::BIGINT[]) AS refunded_gas, - UNNEST($7::NUMERIC[]) AS effective_gas_price + UNNEST($2::bytea []) AS hash, + UNNEST($3::integer []) AS index_in_block, + UNNEST($4::varchar []) AS error, + UNNEST($5::jsonb []) AS new_execution_info, + UNNEST($6::bigint []) AS refunded_gas, + UNNEST($7::numeric []) AS effective_gas_price ) AS data_table WHERE transactions.hash = data_table.hash @@ -1651,7 +1669,7 @@ impl TransactionsDal<'_, '_> { WHERE miniblock_number > $1 RETURNING - hash + hash "#, i64::from(l2_block_number.0) ) @@ -1665,7 +1683,7 @@ impl TransactionsDal<'_, '_> { r#" DELETE FROM call_traces WHERE - tx_hash = ANY ($1) + tx_hash = ANY($1) "#, &tx_hashes as &[&[u8]] ) @@ -1688,7 +1706,7 @@ impl TransactionsDal<'_, '_> { AND is_priority = FALSE AND error IS NULL RETURNING - hash + hash "#, stuck_tx_timeout ) @@ -1717,7 +1735,7 @@ impl TransactionsDal<'_, '_> { SET in_mempool = FALSE FROM - UNNEST($1::bytea[]) AS s (address) + UNNEST($1::bytea []) AS s (address) WHERE transactions.in_mempool = TRUE AND transactions.initiator_address = s.address @@ -1735,7 +1753,7 @@ impl TransactionsDal<'_, '_> { DELETE FROM transactions WHERE in_mempool = TRUE - AND initiator_address = ANY ($1) + AND initiator_address = ANY($1) "#, &purged_addresses as &[&[u8]] ) @@ -1786,7 +1804,7 @@ impl TransactionsDal<'_, '_> { WHERE transactions.hash = subquery2.hash RETURNING - transactions.* + transactions.* "#, limit as i32, BigDecimal::from(fee_per_gas), @@ -2121,7 +2139,7 @@ impl TransactionsDal<'_, '_> { index_in_block FROM transactions - INNER JOIN miniblocks ON transactions.miniblock_number = miniblocks.number + INNER JOIN miniblocks ON transactions.miniblock_number = miniblocks.number WHERE transactions.hash = $1 "#, diff --git a/core/lib/dal/src/transactions_web3_dal.rs b/core/lib/dal/src/transactions_web3_dal.rs index f5a3c492f8af..dcf5f25f104d 100644 --- a/core/lib/dal/src/transactions_web3_dal.rs +++ b/core/lib/dal/src/transactions_web3_dal.rs @@ -49,42 +49,43 @@ impl TransactionsWeb3Dal<'_, '_> { StorageTransactionReceipt, r#" WITH - events AS ( - SELECT DISTINCT - ON (events.tx_hash) * - FROM - events - WHERE - events.address = $1 - AND events.topic1 = $2 - AND events.tx_hash = ANY ($3) - ORDER BY - events.tx_hash, - events.event_index_in_tx DESC - ) + events AS ( + SELECT DISTINCT + ON (events.tx_hash) * + FROM + events + WHERE + events.address = $1 + AND events.topic1 = $2 + AND events.tx_hash = ANY($3) + ORDER BY + events.tx_hash, + events.event_index_in_tx DESC + ) + SELECT transactions.hash AS tx_hash, - transactions.index_in_block AS index_in_block, - transactions.l1_batch_tx_index AS l1_batch_tx_index, + transactions.index_in_block, + transactions.l1_batch_tx_index, transactions.miniblock_number AS "block_number!", - transactions.error AS error, - transactions.effective_gas_price AS effective_gas_price, - transactions.initiator_address AS initiator_address, + transactions.error, + transactions.effective_gas_price, + transactions.initiator_address, transactions.data -> 'to' AS "transfer_to?", transactions.data -> 'contractAddress' AS "execute_contract_address?", transactions.tx_format AS "tx_format?", - transactions.refunded_gas AS refunded_gas, - transactions.gas_limit AS gas_limit, + transactions.refunded_gas, + transactions.gas_limit, miniblocks.hash AS "block_hash", miniblocks.l1_batch_number AS "l1_batch_number?", events.topic4 AS "contract_address?", miniblocks.timestamp AS "block_timestamp?" FROM transactions - JOIN miniblocks ON miniblocks.number = transactions.miniblock_number - LEFT JOIN events ON events.tx_hash = transactions.hash + JOIN miniblocks ON miniblocks.number = transactions.miniblock_number + LEFT JOIN events ON events.tx_hash = transactions.hash WHERE - transactions.hash = ANY ($3) + transactions.hash = ANY($3) AND transactions.data != '{}'::jsonb "#, // ^ Filter out transactions with pruned data, which would lead to potentially incomplete / bogus @@ -302,17 +303,20 @@ impl TransactionsWeb3Dal<'_, '_> { execute_tx.tx_hash AS "eth_execute_tx_hash?" FROM transactions - LEFT JOIN miniblocks ON miniblocks.number = transactions.miniblock_number - LEFT JOIN l1_batches ON l1_batches.number = miniblocks.l1_batch_number - LEFT JOIN eth_txs_history AS commit_tx ON ( + LEFT JOIN miniblocks ON miniblocks.number = transactions.miniblock_number + LEFT JOIN l1_batches ON l1_batches.number = miniblocks.l1_batch_number + LEFT JOIN eth_txs_history AS commit_tx + ON ( l1_batches.eth_commit_tx_id = commit_tx.eth_tx_id AND commit_tx.confirmed_at IS NOT NULL ) - LEFT JOIN eth_txs_history AS prove_tx ON ( + LEFT JOIN eth_txs_history AS prove_tx + ON ( l1_batches.eth_prove_tx_id = prove_tx.eth_tx_id AND prove_tx.confirmed_at IS NOT NULL ) - LEFT JOIN eth_txs_history AS execute_tx ON ( + LEFT JOIN eth_txs_history AS execute_tx + ON ( l1_batches.eth_execute_tx_id = execute_tx.eth_tx_id AND execute_tx.confirmed_at IS NOT NULL ) @@ -439,7 +443,7 @@ impl TransactionsWeb3Dal<'_, '_> { transactions.* FROM transactions - INNER JOIN miniblocks ON miniblocks.number = transactions.miniblock_number + INNER JOIN miniblocks ON miniblocks.number = transactions.miniblock_number WHERE miniblocks.number BETWEEN $1 AND $2 ORDER BY diff --git a/core/lib/dal/src/vm_runner_dal.rs b/core/lib/dal/src/vm_runner_dal.rs index 37ef1517d54a..b12b02186808 100644 --- a/core/lib/dal/src/vm_runner_dal.rs +++ b/core/lib/dal/src/vm_runner_dal.rs @@ -37,25 +37,27 @@ impl VmRunnerDal<'_, '_> { let row = sqlx::query!( r#" WITH - available_batches AS ( - SELECT - MAX(number) AS "last_batch" - FROM - l1_batches - ), - processed_batches AS ( - SELECT - COALESCE(MAX(l1_batch_number), $1) + $2 AS "last_ready_batch" - FROM - vm_runner_protective_reads - WHERE - time_taken IS NOT NULL - ) + available_batches AS ( + SELECT + MAX(number) AS "last_batch" + FROM + l1_batches + ), + + processed_batches AS ( + SELECT + COALESCE(MAX(l1_batch_number), $1) + $2 AS "last_ready_batch" + FROM + vm_runner_protective_reads + WHERE + time_taken IS NOT NULL + ) + SELECT LEAST(last_batch, last_ready_batch) AS "last_ready_batch!" FROM available_batches - FULL JOIN processed_batches ON TRUE + FULL JOIN processed_batches ON TRUE "#, default_batch.0 as i32, window_size as i32 @@ -74,14 +76,16 @@ impl VmRunnerDal<'_, '_> { sqlx::query!( r#" INSERT INTO - vm_runner_protective_reads (l1_batch_number, created_at, updated_at, processing_started_at) + vm_runner_protective_reads ( + l1_batch_number, created_at, updated_at, processing_started_at + ) VALUES - ($1, NOW(), NOW(), NOW()) + ($1, NOW(), NOW(), NOW()) ON CONFLICT (l1_batch_number) DO UPDATE SET - updated_at = NOW(), - processing_started_at = NOW() + updated_at = NOW(), + processing_started_at = NOW() "#, i64::from(l1_batch_number.0), ) @@ -196,25 +200,27 @@ impl VmRunnerDal<'_, '_> { let row = sqlx::query!( r#" WITH - available_batches AS ( - SELECT - MAX(number) AS "last_batch" - FROM - l1_batches - ), - processed_batches AS ( - SELECT - COALESCE(MAX(l1_batch_number), $1) + $2 AS "last_ready_batch" - FROM - vm_runner_bwip - WHERE - time_taken IS NOT NULL - ) + available_batches AS ( + SELECT + MAX(number) AS "last_batch" + FROM + l1_batches + ), + + processed_batches AS ( + SELECT + COALESCE(MAX(l1_batch_number), $1) + $2 AS "last_ready_batch" + FROM + vm_runner_bwip + WHERE + time_taken IS NOT NULL + ) + SELECT LEAST(last_batch, last_ready_batch) AS "last_ready_batch!" FROM available_batches - FULL JOIN processed_batches ON TRUE + FULL JOIN processed_batches ON TRUE "#, default_batch.0 as i32, window_size as i32 @@ -233,14 +239,14 @@ impl VmRunnerDal<'_, '_> { sqlx::query!( r#" INSERT INTO - vm_runner_bwip (l1_batch_number, created_at, updated_at, processing_started_at) + vm_runner_bwip (l1_batch_number, created_at, updated_at, processing_started_at) VALUES - ($1, NOW(), NOW(), NOW()) + ($1, NOW(), NOW(), NOW()) ON CONFLICT (l1_batch_number) DO UPDATE SET - updated_at = NOW(), - processing_started_at = NOW() + updated_at = NOW(), + processing_started_at = NOW() "#, i64::from(l1_batch_number.0), ) diff --git a/prover/crates/lib/prover_dal/.sqlx/query-41af30620f8a1f20b8a6c46be162601d35fd2881ac1fd070f0f1a8add4bc388d.json b/prover/crates/lib/prover_dal/.sqlx/query-095c459e05aa4c7fad0d1fa74b2d52314178f8ab2aea7efb69ae18fbf40e8994.json similarity index 80% rename from prover/crates/lib/prover_dal/.sqlx/query-41af30620f8a1f20b8a6c46be162601d35fd2881ac1fd070f0f1a8add4bc388d.json rename to prover/crates/lib/prover_dal/.sqlx/query-095c459e05aa4c7fad0d1fa74b2d52314178f8ab2aea7efb69ae18fbf40e8994.json index b65633a904e3..435f6cd5a3bd 100644 --- a/prover/crates/lib/prover_dal/.sqlx/query-41af30620f8a1f20b8a6c46be162601d35fd2881ac1fd070f0f1a8add4bc388d.json +++ b/prover/crates/lib/prover_dal/.sqlx/query-095c459e05aa4c7fad0d1fa74b2d52314178f8ab2aea7efb69ae18fbf40e8994.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n UPDATE recursion_tip_witness_jobs_fri\n SET\n status = 'in_progress',\n attempts = attempts + 1,\n updated_at = NOW(),\n processing_started_at = NOW(),\n picked_by = $3\n WHERE\n l1_batch_number = (\n SELECT\n l1_batch_number\n FROM\n recursion_tip_witness_jobs_fri\n WHERE\n status = 'queued'\n AND protocol_version = $1\n AND protocol_version_patch = $2\n ORDER BY\n l1_batch_number ASC\n LIMIT\n 1\n FOR UPDATE\n SKIP LOCKED\n )\n RETURNING\n recursion_tip_witness_jobs_fri.l1_batch_number,\n recursion_tip_witness_jobs_fri.number_of_final_node_jobs\n ", + "query": "\n UPDATE recursion_tip_witness_jobs_fri\n SET\n status = 'in_progress',\n attempts = attempts + 1,\n updated_at = NOW(),\n processing_started_at = NOW(),\n picked_by = $3\n WHERE\n l1_batch_number = (\n SELECT\n l1_batch_number\n FROM\n recursion_tip_witness_jobs_fri\n WHERE\n status = 'queued'\n AND protocol_version = $1\n AND protocol_version_patch = $2\n ORDER BY\n l1_batch_number ASC\n LIMIT\n 1\n FOR UPDATE\n SKIP LOCKED\n )\n RETURNING\n recursion_tip_witness_jobs_fri.l1_batch_number,\n recursion_tip_witness_jobs_fri.number_of_final_node_jobs\n ", "describe": { "columns": [ { @@ -26,5 +26,5 @@ false ] }, - "hash": "41af30620f8a1f20b8a6c46be162601d35fd2881ac1fd070f0f1a8add4bc388d" + "hash": "095c459e05aa4c7fad0d1fa74b2d52314178f8ab2aea7efb69ae18fbf40e8994" } diff --git a/prover/crates/lib/prover_dal/.sqlx/query-0a1ec4690d6b4a67d6ad16badcbf113a19feb73c4cf9876855523499998b99c0.json b/prover/crates/lib/prover_dal/.sqlx/query-0a1ec4690d6b4a67d6ad16badcbf113a19feb73c4cf9876855523499998b99c0.json deleted file mode 100644 index b05230e1be44..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-0a1ec4690d6b4a67d6ad16badcbf113a19feb73c4cf9876855523499998b99c0.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n leaf_aggregation_witness_jobs_fri (\n l1_batch_number,\n circuit_id,\n closed_form_inputs_blob_url,\n number_of_basic_circuits,\n protocol_version,\n status,\n created_at,\n updated_at,\n protocol_version_patch\n )\n VALUES\n ($1, $2, $3, $4, $5, 'waiting_for_proofs', NOW(), NOW(), $6)\n ON CONFLICT (l1_batch_number, circuit_id) DO\n UPDATE\n SET\n updated_at = NOW()\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8", - "Int2", - "Text", - "Int4", - "Int4", - "Int4" - ] - }, - "nullable": [] - }, - "hash": "0a1ec4690d6b4a67d6ad16badcbf113a19feb73c4cf9876855523499998b99c0" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-1080b95755b3047747a9fabc7c7c43ffc5f519d35c90c60f89579f0689906df5.json b/prover/crates/lib/prover_dal/.sqlx/query-1080b95755b3047747a9fabc7c7c43ffc5f519d35c90c60f89579f0689906df5.json new file mode 100644 index 000000000000..4b1cb2fe98a9 --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-1080b95755b3047747a9fabc7c7c43ffc5f519d35c90c60f89579f0689906df5.json @@ -0,0 +1,18 @@ +{ + "db_name": "PostgreSQL", + "query": "\n INSERT INTO\n proof_compression_jobs_fri (\n l1_batch_number,\n fri_proof_blob_url,\n status,\n created_at,\n updated_at,\n protocol_version,\n protocol_version_patch\n )\n VALUES\n ($1, $2, $3, NOW(), NOW(), $4, $5)\n ON CONFLICT (l1_batch_number) DO NOTHING\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8", + "Text", + "Text", + "Int4", + "Int4" + ] + }, + "nullable": [] + }, + "hash": "1080b95755b3047747a9fabc7c7c43ffc5f519d35c90c60f89579f0689906df5" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-eb2a85cb60c680a71203769db7baf89bbd72934e1405e320e746158e6d395d96.json b/prover/crates/lib/prover_dal/.sqlx/query-128b9be7a480a1ef132e5d477a43e4b3d55a0fee71105df880ff4f599844d06f.json similarity index 81% rename from prover/crates/lib/prover_dal/.sqlx/query-eb2a85cb60c680a71203769db7baf89bbd72934e1405e320e746158e6d395d96.json rename to prover/crates/lib/prover_dal/.sqlx/query-128b9be7a480a1ef132e5d477a43e4b3d55a0fee71105df880ff4f599844d06f.json index 27680c0bb46e..e4e02b7e0df4 100644 --- a/prover/crates/lib/prover_dal/.sqlx/query-eb2a85cb60c680a71203769db7baf89bbd72934e1405e320e746158e6d395d96.json +++ b/prover/crates/lib/prover_dal/.sqlx/query-128b9be7a480a1ef132e5d477a43e4b3d55a0fee71105df880ff4f599844d06f.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n UPDATE proof_compression_jobs_fri\n SET\n status = 'queued',\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n (\n status = 'in_progress'\n AND processing_started_at <= NOW() - $1::INTERVAL\n AND attempts < $2\n )\n OR (\n status = 'failed'\n AND attempts < $2\n )\n RETURNING\n l1_batch_number,\n status,\n attempts,\n error,\n picked_by\n ", + "query": "\n UPDATE proof_compression_jobs_fri\n SET\n status = 'queued',\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n (\n status = 'in_progress'\n AND processing_started_at <= NOW() - $1::INTERVAL\n AND attempts < $2\n )\n OR (\n status = 'failed'\n AND attempts < $2\n )\n RETURNING\n l1_batch_number,\n status,\n attempts,\n error,\n picked_by\n ", "describe": { "columns": [ { @@ -43,5 +43,5 @@ true ] }, - "hash": "eb2a85cb60c680a71203769db7baf89bbd72934e1405e320e746158e6d395d96" + "hash": "128b9be7a480a1ef132e5d477a43e4b3d55a0fee71105df880ff4f599844d06f" } diff --git a/prover/crates/lib/prover_dal/.sqlx/query-fcddeb96dcd1611dedb2091c1be304e8a35fd65bf37e976b7106f57c57e70b9b.json b/prover/crates/lib/prover_dal/.sqlx/query-1a1b8595ccf645981050fdeb87c572f6c620f86bf6c53334878490c7004331f4.json similarity index 77% rename from prover/crates/lib/prover_dal/.sqlx/query-fcddeb96dcd1611dedb2091c1be304e8a35fd65bf37e976b7106f57c57e70b9b.json rename to prover/crates/lib/prover_dal/.sqlx/query-1a1b8595ccf645981050fdeb87c572f6c620f86bf6c53334878490c7004331f4.json index effc22d6a43b..ec61ec67e36a 100644 --- a/prover/crates/lib/prover_dal/.sqlx/query-fcddeb96dcd1611dedb2091c1be304e8a35fd65bf37e976b7106f57c57e70b9b.json +++ b/prover/crates/lib/prover_dal/.sqlx/query-1a1b8595ccf645981050fdeb87c572f6c620f86bf6c53334878490c7004331f4.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n UPDATE gpu_prover_queue_fri\n SET\n instance_status = 'available',\n updated_at = NOW()\n WHERE\n instance_host = $1::TEXT::inet\n AND instance_port = $2\n AND instance_status = 'full'\n AND zone = $3\n ", + "query": "\n UPDATE gpu_prover_queue_fri\n SET\n instance_status = 'available',\n updated_at = NOW()\n WHERE\n instance_host = $1::TEXT::INET\n AND instance_port = $2\n AND instance_status = 'full'\n AND zone = $3\n ", "describe": { "columns": [], "parameters": { @@ -12,5 +12,5 @@ }, "nullable": [] }, - "hash": "fcddeb96dcd1611dedb2091c1be304e8a35fd65bf37e976b7106f57c57e70b9b" + "hash": "1a1b8595ccf645981050fdeb87c572f6c620f86bf6c53334878490c7004331f4" } diff --git a/prover/crates/lib/prover_dal/.sqlx/query-29ff260b02f7b955f9fe0b657b87def3a97275b66ad33d214054dc9048ddf584.json b/prover/crates/lib/prover_dal/.sqlx/query-29ff260b02f7b955f9fe0b657b87def3a97275b66ad33d214054dc9048ddf584.json deleted file mode 100644 index 85e66ed78248..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-29ff260b02f7b955f9fe0b657b87def3a97275b66ad33d214054dc9048ddf584.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n proof_compression_jobs_fri (\n l1_batch_number,\n fri_proof_blob_url,\n status,\n created_at,\n updated_at,\n protocol_version,\n protocol_version_patch\n )\n VALUES\n ($1, $2, $3, NOW(), NOW(), $4, $5)\n ON CONFLICT (l1_batch_number) DO NOTHING\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8", - "Text", - "Text", - "Int4", - "Int4" - ] - }, - "nullable": [] - }, - "hash": "29ff260b02f7b955f9fe0b657b87def3a97275b66ad33d214054dc9048ddf584" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-d0be28042b50199075cb0eca26f6b93bfd5d96fdc68732fe38c79ccd44b84def.json b/prover/crates/lib/prover_dal/.sqlx/query-2d11a834e177596113b5ffd634067fadffc1d3091e8c050835d4f178a328fcc8.json similarity index 82% rename from prover/crates/lib/prover_dal/.sqlx/query-d0be28042b50199075cb0eca26f6b93bfd5d96fdc68732fe38c79ccd44b84def.json rename to prover/crates/lib/prover_dal/.sqlx/query-2d11a834e177596113b5ffd634067fadffc1d3091e8c050835d4f178a328fcc8.json index 3943480b896d..c997a53e4d90 100644 --- a/prover/crates/lib/prover_dal/.sqlx/query-d0be28042b50199075cb0eca26f6b93bfd5d96fdc68732fe38c79ccd44b84def.json +++ b/prover/crates/lib/prover_dal/.sqlx/query-2d11a834e177596113b5ffd634067fadffc1d3091e8c050835d4f178a328fcc8.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n UPDATE prover_jobs_fri\n SET\n status = 'queued',\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n id IN (\n SELECT\n id\n FROM\n prover_jobs_fri\n WHERE\n (\n status IN ('in_progress', 'in_gpu_proof')\n AND processing_started_at <= NOW() - $1::INTERVAL\n AND attempts < $2\n )\n OR (\n status = 'failed'\n AND attempts < $2\n )\n FOR UPDATE\n SKIP LOCKED\n )\n RETURNING\n id,\n status,\n attempts,\n circuit_id,\n error,\n picked_by\n ", + "query": "\n UPDATE prover_jobs_fri\n SET\n status = 'queued',\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n id IN (\n SELECT\n id\n FROM\n prover_jobs_fri\n WHERE\n (\n status IN ('in_progress', 'in_gpu_proof')\n AND processing_started_at <= NOW() - $1::INTERVAL\n AND attempts < $2\n )\n OR (\n status = 'failed'\n AND attempts < $2\n )\n FOR UPDATE\n SKIP LOCKED\n )\n RETURNING\n id,\n status,\n attempts,\n circuit_id,\n error,\n picked_by\n ", "describe": { "columns": [ { @@ -49,5 +49,5 @@ true ] }, - "hash": "d0be28042b50199075cb0eca26f6b93bfd5d96fdc68732fe38c79ccd44b84def" + "hash": "2d11a834e177596113b5ffd634067fadffc1d3091e8c050835d4f178a328fcc8" } diff --git a/prover/crates/lib/prover_dal/.sqlx/query-2e6e2b68efc28114f44616b68fcf1d4d9a4b83a8b42846d8373ea13b96d612cf.json b/prover/crates/lib/prover_dal/.sqlx/query-2e6e2b68efc28114f44616b68fcf1d4d9a4b83a8b42846d8373ea13b96d612cf.json deleted file mode 100644 index 41428e91feeb..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-2e6e2b68efc28114f44616b68fcf1d4d9a4b83a8b42846d8373ea13b96d612cf.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n gpu_prover_queue_fri (\n instance_host,\n instance_port,\n instance_status,\n specialized_prover_group_id,\n zone,\n created_at,\n updated_at,\n protocol_version,\n protocol_version_patch\n )\n VALUES\n (CAST($1::TEXT AS inet), $2, 'available', $3, $4, NOW(), NOW(), $5, $6)\n ON CONFLICT (instance_host, instance_port, zone) DO\n UPDATE\n SET\n instance_status = 'available',\n specialized_prover_group_id = $3,\n zone = $4,\n updated_at = NOW(),\n protocol_version = $5,\n protocol_version_patch = $6\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Text", - "Int4", - "Int2", - "Text", - "Int4", - "Int4" - ] - }, - "nullable": [] - }, - "hash": "2e6e2b68efc28114f44616b68fcf1d4d9a4b83a8b42846d8373ea13b96d612cf" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-2f194183f0140eee0dd801b2087c0a4dbcc7b955132056b5ff10f00cf5844874.json b/prover/crates/lib/prover_dal/.sqlx/query-2f194183f0140eee0dd801b2087c0a4dbcc7b955132056b5ff10f00cf5844874.json new file mode 100644 index 000000000000..e60e0f543c40 --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-2f194183f0140eee0dd801b2087c0a4dbcc7b955132056b5ff10f00cf5844874.json @@ -0,0 +1,19 @@ +{ + "db_name": "PostgreSQL", + "query": "\n INSERT INTO\n gpu_prover_queue_fri (\n instance_host,\n instance_port,\n instance_status,\n specialized_prover_group_id,\n zone,\n created_at,\n updated_at,\n protocol_version,\n protocol_version_patch\n )\n VALUES\n (CAST($1::TEXT AS INET), $2, 'available', $3, $4, NOW(), NOW(), $5, $6)\n ON CONFLICT (instance_host, instance_port, zone) DO\n UPDATE\n SET\n instance_status = 'available',\n specialized_prover_group_id = $3,\n zone = $4,\n updated_at = NOW(),\n protocol_version = $5,\n protocol_version_patch = $6\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Text", + "Int4", + "Int2", + "Text", + "Int4", + "Int4" + ] + }, + "nullable": [] + }, + "hash": "2f194183f0140eee0dd801b2087c0a4dbcc7b955132056b5ff10f00cf5844874" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-102b79726652d9150c802350bdca80c233a9fd3e892b5a867a5517c2e04497a8.json b/prover/crates/lib/prover_dal/.sqlx/query-30128c0642524295ab05c37c60db2fd05e27e9df6d760173bba37446988d1b8e.json similarity index 84% rename from prover/crates/lib/prover_dal/.sqlx/query-102b79726652d9150c802350bdca80c233a9fd3e892b5a867a5517c2e04497a8.json rename to prover/crates/lib/prover_dal/.sqlx/query-30128c0642524295ab05c37c60db2fd05e27e9df6d760173bba37446988d1b8e.json index f912d06de810..10ca762aee22 100644 --- a/prover/crates/lib/prover_dal/.sqlx/query-102b79726652d9150c802350bdca80c233a9fd3e892b5a867a5517c2e04497a8.json +++ b/prover/crates/lib/prover_dal/.sqlx/query-30128c0642524295ab05c37c60db2fd05e27e9df6d760173bba37446988d1b8e.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n UPDATE proof_compression_jobs_fri\n SET\n status = 'queued',\n error = 'Manually requeued',\n attempts = 2,\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n l1_batch_number = $1\n AND attempts >= $2\n AND (\n status = 'in_progress'\n OR status = 'failed'\n )\n RETURNING\n status,\n attempts,\n error,\n picked_by\n ", + "query": "\n UPDATE proof_compression_jobs_fri\n SET\n status = 'queued',\n error = 'Manually requeued',\n attempts = 2,\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n l1_batch_number = $1\n AND attempts >= $2\n AND (\n status = 'in_progress'\n OR status = 'failed'\n )\n RETURNING\n status,\n attempts,\n error,\n picked_by\n ", "describe": { "columns": [ { @@ -37,5 +37,5 @@ true ] }, - "hash": "102b79726652d9150c802350bdca80c233a9fd3e892b5a867a5517c2e04497a8" + "hash": "30128c0642524295ab05c37c60db2fd05e27e9df6d760173bba37446988d1b8e" } diff --git a/prover/crates/lib/prover_dal/.sqlx/query-9895b2ded08be3e81a5357decf76b4d3d6a762761e45af2a73fe96da804e627e.json b/prover/crates/lib/prover_dal/.sqlx/query-332f1363f19160f9a7708635fd1691e08d28ca6796c0bbba95016d1899cf84fe.json similarity index 84% rename from prover/crates/lib/prover_dal/.sqlx/query-9895b2ded08be3e81a5357decf76b4d3d6a762761e45af2a73fe96da804e627e.json rename to prover/crates/lib/prover_dal/.sqlx/query-332f1363f19160f9a7708635fd1691e08d28ca6796c0bbba95016d1899cf84fe.json index 90ea99942062..a63ebc8f0e2d 100644 --- a/prover/crates/lib/prover_dal/.sqlx/query-9895b2ded08be3e81a5357decf76b4d3d6a762761e45af2a73fe96da804e627e.json +++ b/prover/crates/lib/prover_dal/.sqlx/query-332f1363f19160f9a7708635fd1691e08d28ca6796c0bbba95016d1899cf84fe.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n UPDATE prover_jobs_fri\n SET\n status = 'queued',\n error = 'Manually requeued',\n attempts = 2,\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n l1_batch_number = $1\n AND attempts >= $2\n AND (\n status = 'in_progress'\n OR status = 'failed'\n )\n RETURNING\n id,\n status,\n attempts,\n circuit_id,\n error,\n picked_by\n ", + "query": "\n UPDATE prover_jobs_fri\n SET\n status = 'queued',\n error = 'Manually requeued',\n attempts = 2,\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n l1_batch_number = $1\n AND attempts >= $2\n AND (\n status = 'in_progress'\n OR status = 'failed'\n )\n RETURNING\n id,\n status,\n attempts,\n circuit_id,\n error,\n picked_by\n ", "describe": { "columns": [ { @@ -49,5 +49,5 @@ true ] }, - "hash": "9895b2ded08be3e81a5357decf76b4d3d6a762761e45af2a73fe96da804e627e" + "hash": "332f1363f19160f9a7708635fd1691e08d28ca6796c0bbba95016d1899cf84fe" } diff --git a/prover/crates/lib/prover_dal/.sqlx/query-340a84063719f9b837a61cbc63368ba43ba128a00a194dce65015bd9eeb1b42f.json b/prover/crates/lib/prover_dal/.sqlx/query-340a84063719f9b837a61cbc63368ba43ba128a00a194dce65015bd9eeb1b42f.json new file mode 100644 index 000000000000..a49edd4737f3 --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-340a84063719f9b837a61cbc63368ba43ba128a00a194dce65015bd9eeb1b42f.json @@ -0,0 +1,17 @@ +{ + "db_name": "PostgreSQL", + "query": "\n INSERT INTO\n scheduler_witness_jobs_fri (\n l1_batch_number,\n scheduler_partial_input_blob_url,\n protocol_version,\n status,\n created_at,\n updated_at,\n protocol_version_patch\n )\n VALUES\n ($1, $2, $3, 'waiting_for_proofs', NOW(), NOW(), $4)\n ON CONFLICT (l1_batch_number) DO\n UPDATE\n SET\n updated_at = NOW()\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8", + "Text", + "Int4", + "Int4" + ] + }, + "nullable": [] + }, + "hash": "340a84063719f9b837a61cbc63368ba43ba128a00a194dce65015bd9eeb1b42f" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-37fa629a87113f13c89ce5c1a8fffd15b636d553794900596528e8fb03ca5aed.json b/prover/crates/lib/prover_dal/.sqlx/query-37fa629a87113f13c89ce5c1a8fffd15b636d553794900596528e8fb03ca5aed.json new file mode 100644 index 000000000000..3a8a78db9f0d --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-37fa629a87113f13c89ce5c1a8fffd15b636d553794900596528e8fb03ca5aed.json @@ -0,0 +1,17 @@ +{ + "db_name": "PostgreSQL", + "query": "\n INSERT INTO\n recursion_tip_witness_jobs_fri (\n l1_batch_number,\n status,\n number_of_final_node_jobs,\n protocol_version,\n created_at,\n updated_at,\n protocol_version_patch\n )\n VALUES\n ($1, 'waiting_for_proofs', $2, $3, NOW(), NOW(), $4)\n ON CONFLICT (l1_batch_number) DO\n UPDATE\n SET\n updated_at = NOW()\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8", + "Int4", + "Int4", + "Int4" + ] + }, + "nullable": [] + }, + "hash": "37fa629a87113f13c89ce5c1a8fffd15b636d553794900596528e8fb03ca5aed" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-3941da180ee62a7c5d4e392ff4fe2d3a6ebb3657862b91e3ece34119f098fc2d.json b/prover/crates/lib/prover_dal/.sqlx/query-3941da180ee62a7c5d4e392ff4fe2d3a6ebb3657862b91e3ece34119f098fc2d.json deleted file mode 100644 index d0dd5f6976b5..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-3941da180ee62a7c5d4e392ff4fe2d3a6ebb3657862b91e3ece34119f098fc2d.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE node_aggregation_witness_jobs_fri\n SET\n status = 'queued'\n WHERE\n (l1_batch_number, circuit_id, depth) IN (\n SELECT\n prover_jobs_fri.l1_batch_number,\n prover_jobs_fri.circuit_id,\n prover_jobs_fri.depth\n FROM\n prover_jobs_fri\n JOIN node_aggregation_witness_jobs_fri nawj ON prover_jobs_fri.l1_batch_number = nawj.l1_batch_number\n AND prover_jobs_fri.circuit_id = nawj.circuit_id\n AND prover_jobs_fri.depth = nawj.depth\n WHERE\n nawj.status = 'waiting_for_proofs'\n AND prover_jobs_fri.status = 'successful'\n AND prover_jobs_fri.aggregation_round = 2\n GROUP BY\n prover_jobs_fri.l1_batch_number,\n prover_jobs_fri.circuit_id,\n prover_jobs_fri.depth,\n nawj.number_of_dependent_jobs\n HAVING\n COUNT(*) = nawj.number_of_dependent_jobs\n )\n RETURNING\n l1_batch_number,\n circuit_id,\n depth;\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "l1_batch_number", - "type_info": "Int8" - }, - { - "ordinal": 1, - "name": "circuit_id", - "type_info": "Int2" - }, - { - "ordinal": 2, - "name": "depth", - "type_info": "Int4" - } - ], - "parameters": { - "Left": [] - }, - "nullable": [ - false, - false, - false - ] - }, - "hash": "3941da180ee62a7c5d4e392ff4fe2d3a6ebb3657862b91e3ece34119f098fc2d" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-7d20c0bf35625185c1f6c675aa8fcddbb47c5e9965443f118f8edd7d562734a2.json b/prover/crates/lib/prover_dal/.sqlx/query-3b3193bfac70b5fe69bf3bb7ba5a234c19578572973094b21ddbb3876da6bb95.json similarity index 79% rename from prover/crates/lib/prover_dal/.sqlx/query-7d20c0bf35625185c1f6c675aa8fcddbb47c5e9965443f118f8edd7d562734a2.json rename to prover/crates/lib/prover_dal/.sqlx/query-3b3193bfac70b5fe69bf3bb7ba5a234c19578572973094b21ddbb3876da6bb95.json index 140b8f126750..962979344b4b 100644 --- a/prover/crates/lib/prover_dal/.sqlx/query-7d20c0bf35625185c1f6c675aa8fcddbb47c5e9965443f118f8edd7d562734a2.json +++ b/prover/crates/lib/prover_dal/.sqlx/query-3b3193bfac70b5fe69bf3bb7ba5a234c19578572973094b21ddbb3876da6bb95.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n UPDATE prover_jobs_fri\n SET\n status = 'in_progress',\n attempts = attempts + 1,\n updated_at = NOW(),\n processing_started_at = NOW(),\n picked_by = $3\n WHERE\n id = (\n SELECT\n id\n FROM\n prover_jobs_fri\n WHERE\n status = 'queued'\n AND protocol_version = $1\n AND protocol_version_patch = $2\n ORDER BY\n l1_batch_number ASC,\n aggregation_round ASC,\n circuit_id ASC,\n id ASC\n LIMIT\n 1\n FOR UPDATE\n SKIP LOCKED\n )\n RETURNING\n prover_jobs_fri.id,\n prover_jobs_fri.l1_batch_number,\n prover_jobs_fri.circuit_id,\n prover_jobs_fri.aggregation_round,\n prover_jobs_fri.sequence_number,\n prover_jobs_fri.depth,\n prover_jobs_fri.is_node_final_proof\n ", + "query": "\n UPDATE prover_jobs_fri\n SET\n status = 'in_progress',\n attempts = attempts + 1,\n updated_at = NOW(),\n processing_started_at = NOW(),\n picked_by = $3\n WHERE\n id = (\n SELECT\n id\n FROM\n prover_jobs_fri\n WHERE\n status = 'queued'\n AND protocol_version = $1\n AND protocol_version_patch = $2\n ORDER BY\n l1_batch_number ASC,\n aggregation_round ASC,\n circuit_id ASC,\n id ASC\n LIMIT\n 1\n FOR UPDATE\n SKIP LOCKED\n )\n RETURNING\n prover_jobs_fri.id,\n prover_jobs_fri.l1_batch_number,\n prover_jobs_fri.circuit_id,\n prover_jobs_fri.aggregation_round,\n prover_jobs_fri.sequence_number,\n prover_jobs_fri.depth,\n prover_jobs_fri.is_node_final_proof\n ", "describe": { "columns": [ { @@ -56,5 +56,5 @@ false ] }, - "hash": "7d20c0bf35625185c1f6c675aa8fcddbb47c5e9965443f118f8edd7d562734a2" + "hash": "3b3193bfac70b5fe69bf3bb7ba5a234c19578572973094b21ddbb3876da6bb95" } diff --git a/prover/crates/lib/prover_dal/.sqlx/query-3e0a1ebc684810c09ff83784bdd0ad195b0dd2a8ce56b1a9eb531103130b5e3e.json b/prover/crates/lib/prover_dal/.sqlx/query-3e0a1ebc684810c09ff83784bdd0ad195b0dd2a8ce56b1a9eb531103130b5e3e.json deleted file mode 100644 index 7646c87b847e..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-3e0a1ebc684810c09ff83784bdd0ad195b0dd2a8ce56b1a9eb531103130b5e3e.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE prover_jobs_fri\n SET\n status = 'in_progress',\n attempts = attempts + 1,\n processing_started_at = NOW(),\n updated_at = NOW(),\n picked_by = $5\n WHERE\n id = (\n SELECT\n pj.id\n FROM\n (\n SELECT\n *\n FROM\n UNNEST($1::SMALLINT[], $2::SMALLINT[])\n ) AS tuple (circuit_id, ROUND)\n JOIN LATERAL (\n SELECT\n *\n FROM\n prover_jobs_fri AS pj\n WHERE\n pj.status = 'queued'\n AND pj.protocol_version = $3\n AND pj.protocol_version_patch = $4\n AND pj.circuit_id = tuple.circuit_id\n AND pj.aggregation_round = tuple.round\n ORDER BY\n pj.l1_batch_number ASC,\n pj.id ASC\n LIMIT\n 1\n ) AS pj ON TRUE\n ORDER BY\n pj.l1_batch_number ASC,\n pj.aggregation_round DESC,\n pj.id ASC\n LIMIT\n 1\n FOR UPDATE\n SKIP LOCKED\n )\n RETURNING\n prover_jobs_fri.id,\n prover_jobs_fri.l1_batch_number,\n prover_jobs_fri.circuit_id,\n prover_jobs_fri.aggregation_round,\n prover_jobs_fri.sequence_number,\n prover_jobs_fri.depth,\n prover_jobs_fri.is_node_final_proof\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "id", - "type_info": "Int8" - }, - { - "ordinal": 1, - "name": "l1_batch_number", - "type_info": "Int8" - }, - { - "ordinal": 2, - "name": "circuit_id", - "type_info": "Int2" - }, - { - "ordinal": 3, - "name": "aggregation_round", - "type_info": "Int2" - }, - { - "ordinal": 4, - "name": "sequence_number", - "type_info": "Int4" - }, - { - "ordinal": 5, - "name": "depth", - "type_info": "Int4" - }, - { - "ordinal": 6, - "name": "is_node_final_proof", - "type_info": "Bool" - } - ], - "parameters": { - "Left": [ - "Int2Array", - "Int2Array", - "Int4", - "Int4", - "Text" - ] - }, - "nullable": [ - false, - false, - false, - false, - false, - false, - false - ] - }, - "hash": "3e0a1ebc684810c09ff83784bdd0ad195b0dd2a8ce56b1a9eb531103130b5e3e" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-216d0c263539739b53975a96a10332b826708800a2f72f09bd7aea08cf724e1a.json b/prover/crates/lib/prover_dal/.sqlx/query-3fead9a82ea277785a9ee5c075a2ad4da8f523aa84cd047216d8e3cf69c92106.json similarity index 82% rename from prover/crates/lib/prover_dal/.sqlx/query-216d0c263539739b53975a96a10332b826708800a2f72f09bd7aea08cf724e1a.json rename to prover/crates/lib/prover_dal/.sqlx/query-3fead9a82ea277785a9ee5c075a2ad4da8f523aa84cd047216d8e3cf69c92106.json index ec503eabee01..6a534c361e2b 100644 --- a/prover/crates/lib/prover_dal/.sqlx/query-216d0c263539739b53975a96a10332b826708800a2f72f09bd7aea08cf724e1a.json +++ b/prover/crates/lib/prover_dal/.sqlx/query-3fead9a82ea277785a9ee5c075a2ad4da8f523aa84cd047216d8e3cf69c92106.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n UPDATE scheduler_witness_jobs_fri\n SET\n status = 'queued',\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n (\n status = 'in_progress'\n AND processing_started_at <= NOW() - $1::INTERVAL\n AND attempts < $2\n )\n OR (\n status = 'failed'\n AND attempts < $2\n )\n RETURNING\n l1_batch_number,\n status,\n attempts,\n error,\n picked_by\n ", + "query": "\n UPDATE scheduler_witness_jobs_fri\n SET\n status = 'queued',\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n (\n status = 'in_progress'\n AND processing_started_at <= NOW() - $1::INTERVAL\n AND attempts < $2\n )\n OR (\n status = 'failed'\n AND attempts < $2\n )\n RETURNING\n l1_batch_number,\n status,\n attempts,\n error,\n picked_by\n ", "describe": { "columns": [ { @@ -43,5 +43,5 @@ true ] }, - "hash": "216d0c263539739b53975a96a10332b826708800a2f72f09bd7aea08cf724e1a" + "hash": "3fead9a82ea277785a9ee5c075a2ad4da8f523aa84cd047216d8e3cf69c92106" } diff --git a/prover/crates/lib/prover_dal/.sqlx/query-3ffc042b13c185ca6963fcb2d4d10c3b232bbaaa12747f72e3b8c5ad64702a79.json b/prover/crates/lib/prover_dal/.sqlx/query-3ffc042b13c185ca6963fcb2d4d10c3b232bbaaa12747f72e3b8c5ad64702a79.json new file mode 100644 index 000000000000..a39cda265f0c --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-3ffc042b13c185ca6963fcb2d4d10c3b232bbaaa12747f72e3b8c5ad64702a79.json @@ -0,0 +1,32 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE node_aggregation_witness_jobs_fri\n SET\n status = 'queued'\n WHERE\n (l1_batch_number, circuit_id, depth) IN (\n SELECT\n prover_jobs_fri.l1_batch_number,\n prover_jobs_fri.circuit_id,\n prover_jobs_fri.depth\n FROM\n prover_jobs_fri\n JOIN node_aggregation_witness_jobs_fri nawj\n ON\n prover_jobs_fri.l1_batch_number = nawj.l1_batch_number\n AND prover_jobs_fri.circuit_id = nawj.circuit_id\n AND prover_jobs_fri.depth = nawj.depth\n WHERE\n nawj.status = 'waiting_for_proofs'\n AND prover_jobs_fri.status = 'successful'\n AND prover_jobs_fri.aggregation_round = 2\n GROUP BY\n prover_jobs_fri.l1_batch_number,\n prover_jobs_fri.circuit_id,\n prover_jobs_fri.depth,\n nawj.number_of_dependent_jobs\n HAVING\n COUNT(*) = nawj.number_of_dependent_jobs\n )\n RETURNING\n l1_batch_number,\n circuit_id,\n depth;\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "l1_batch_number", + "type_info": "Int8" + }, + { + "ordinal": 1, + "name": "circuit_id", + "type_info": "Int2" + }, + { + "ordinal": 2, + "name": "depth", + "type_info": "Int4" + } + ], + "parameters": { + "Left": [] + }, + "nullable": [ + false, + false, + false + ] + }, + "hash": "3ffc042b13c185ca6963fcb2d4d10c3b232bbaaa12747f72e3b8c5ad64702a79" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-bcc5d3d35652f49b41d4ee673b171570fc88c17822bebd5b92e3b2f726d9af3a.json b/prover/crates/lib/prover_dal/.sqlx/query-4580503b825352de7691478a5de103782558380c48caf8734cacee350e3841dd.json similarity index 82% rename from prover/crates/lib/prover_dal/.sqlx/query-bcc5d3d35652f49b41d4ee673b171570fc88c17822bebd5b92e3b2f726d9af3a.json rename to prover/crates/lib/prover_dal/.sqlx/query-4580503b825352de7691478a5de103782558380c48caf8734cacee350e3841dd.json index ab1c2dd6552a..ee786a1cabe6 100644 --- a/prover/crates/lib/prover_dal/.sqlx/query-bcc5d3d35652f49b41d4ee673b171570fc88c17822bebd5b92e3b2f726d9af3a.json +++ b/prover/crates/lib/prover_dal/.sqlx/query-4580503b825352de7691478a5de103782558380c48caf8734cacee350e3841dd.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n UPDATE witness_inputs_fri\n SET\n status = 'queued',\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n (\n status = 'in_progress'\n AND processing_started_at <= NOW() - $1::INTERVAL\n AND attempts < $2\n )\n OR (\n status = 'failed'\n AND attempts < $2\n )\n RETURNING\n l1_batch_number,\n status,\n attempts,\n error,\n picked_by\n ", + "query": "\n UPDATE witness_inputs_fri\n SET\n status = 'queued',\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n (\n status = 'in_progress'\n AND processing_started_at <= NOW() - $1::INTERVAL\n AND attempts < $2\n )\n OR (\n status = 'failed'\n AND attempts < $2\n )\n RETURNING\n l1_batch_number,\n status,\n attempts,\n error,\n picked_by\n ", "describe": { "columns": [ { @@ -43,5 +43,5 @@ true ] }, - "hash": "bcc5d3d35652f49b41d4ee673b171570fc88c17822bebd5b92e3b2f726d9af3a" + "hash": "4580503b825352de7691478a5de103782558380c48caf8734cacee350e3841dd" } diff --git a/prover/crates/lib/prover_dal/.sqlx/query-48b57a279bfff34d44d1f5a6501e40978966fb2ad8b342907580dd17c0a52779.json b/prover/crates/lib/prover_dal/.sqlx/query-48b57a279bfff34d44d1f5a6501e40978966fb2ad8b342907580dd17c0a52779.json new file mode 100644 index 000000000000..6e6a6b4ac1af --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-48b57a279bfff34d44d1f5a6501e40978966fb2ad8b342907580dd17c0a52779.json @@ -0,0 +1,17 @@ +{ + "db_name": "PostgreSQL", + "query": "\n INSERT INTO\n witness_inputs_fri (\n l1_batch_number,\n witness_inputs_blob_url,\n protocol_version,\n status,\n created_at,\n updated_at,\n protocol_version_patch\n )\n VALUES\n ($1, $2, $3, 'queued', NOW(), NOW(), $4)\n ON CONFLICT (l1_batch_number) DO NOTHING\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8", + "Text", + "Int4", + "Int4" + ] + }, + "nullable": [] + }, + "hash": "48b57a279bfff34d44d1f5a6501e40978966fb2ad8b342907580dd17c0a52779" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-d5bb897092bce2788fe02f31c9de6dde4142e09330557cc627fee2db278ace50.json b/prover/crates/lib/prover_dal/.sqlx/query-54cc92f95c07effcb08fa0b174c742fde93ffb610bff173f04f1b80e30754ad5.json similarity index 82% rename from prover/crates/lib/prover_dal/.sqlx/query-d5bb897092bce2788fe02f31c9de6dde4142e09330557cc627fee2db278ace50.json rename to prover/crates/lib/prover_dal/.sqlx/query-54cc92f95c07effcb08fa0b174c742fde93ffb610bff173f04f1b80e30754ad5.json index 9df8f1c849cb..5a5d61aa4365 100644 --- a/prover/crates/lib/prover_dal/.sqlx/query-d5bb897092bce2788fe02f31c9de6dde4142e09330557cc627fee2db278ace50.json +++ b/prover/crates/lib/prover_dal/.sqlx/query-54cc92f95c07effcb08fa0b174c742fde93ffb610bff173f04f1b80e30754ad5.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n UPDATE leaf_aggregation_witness_jobs_fri\n SET\n status = 'queued',\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n (\n status = 'in_progress'\n AND processing_started_at <= NOW() - $1::INTERVAL\n AND attempts < $2\n )\n OR (\n status = 'failed'\n AND attempts < $2\n )\n RETURNING\n id,\n status,\n attempts,\n circuit_id,\n error,\n picked_by\n ", + "query": "\n UPDATE leaf_aggregation_witness_jobs_fri\n SET\n status = 'queued',\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n (\n status = 'in_progress'\n AND processing_started_at <= NOW() - $1::INTERVAL\n AND attempts < $2\n )\n OR (\n status = 'failed'\n AND attempts < $2\n )\n RETURNING\n id,\n status,\n attempts,\n circuit_id,\n error,\n picked_by\n ", "describe": { "columns": [ { @@ -49,5 +49,5 @@ true ] }, - "hash": "d5bb897092bce2788fe02f31c9de6dde4142e09330557cc627fee2db278ace50" + "hash": "54cc92f95c07effcb08fa0b174c742fde93ffb610bff173f04f1b80e30754ad5" } diff --git a/prover/crates/lib/prover_dal/.sqlx/query-2b12c5d469e6220cc8ddc997c666e4aa4f797bcc6e05ec2f2e435a7e940d8cf9.json b/prover/crates/lib/prover_dal/.sqlx/query-6b7cf7ae3c66c46f4ecec2b0710f9f8bea0033f6727c2582f7f141330a47f440.json similarity index 82% rename from prover/crates/lib/prover_dal/.sqlx/query-2b12c5d469e6220cc8ddc997c666e4aa4f797bcc6e05ec2f2e435a7e940d8cf9.json rename to prover/crates/lib/prover_dal/.sqlx/query-6b7cf7ae3c66c46f4ecec2b0710f9f8bea0033f6727c2582f7f141330a47f440.json index 14b64e8122e5..88afcf436c24 100644 --- a/prover/crates/lib/prover_dal/.sqlx/query-2b12c5d469e6220cc8ddc997c666e4aa4f797bcc6e05ec2f2e435a7e940d8cf9.json +++ b/prover/crates/lib/prover_dal/.sqlx/query-6b7cf7ae3c66c46f4ecec2b0710f9f8bea0033f6727c2582f7f141330a47f440.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n UPDATE node_aggregation_witness_jobs_fri\n SET\n status = 'queued',\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n (\n status = 'in_progress'\n AND processing_started_at <= NOW() - $1::INTERVAL\n AND attempts < $2\n )\n OR (\n status = 'failed'\n AND attempts < $2\n )\n RETURNING\n id,\n status,\n attempts,\n circuit_id,\n error,\n picked_by\n ", + "query": "\n UPDATE node_aggregation_witness_jobs_fri\n SET\n status = 'queued',\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n (\n status = 'in_progress'\n AND processing_started_at <= NOW() - $1::INTERVAL\n AND attempts < $2\n )\n OR (\n status = 'failed'\n AND attempts < $2\n )\n RETURNING\n id,\n status,\n attempts,\n circuit_id,\n error,\n picked_by\n ", "describe": { "columns": [ { @@ -49,5 +49,5 @@ true ] }, - "hash": "2b12c5d469e6220cc8ddc997c666e4aa4f797bcc6e05ec2f2e435a7e940d8cf9" + "hash": "6b7cf7ae3c66c46f4ecec2b0710f9f8bea0033f6727c2582f7f141330a47f440" } diff --git a/prover/crates/lib/prover_dal/.sqlx/query-d272c91f1209c277189a31c59ee191a43dc8eafc33ee067bd41e20f25f7625f0.json b/prover/crates/lib/prover_dal/.sqlx/query-6c37c8a0a921408e3b812adf77d835d9a865ecbd87d38008a649e8943fdf8a43.json similarity index 92% rename from prover/crates/lib/prover_dal/.sqlx/query-d272c91f1209c277189a31c59ee191a43dc8eafc33ee067bd41e20f25f7625f0.json rename to prover/crates/lib/prover_dal/.sqlx/query-6c37c8a0a921408e3b812adf77d835d9a865ecbd87d38008a649e8943fdf8a43.json index 2c94853eacff..d2d8d265e695 100644 --- a/prover/crates/lib/prover_dal/.sqlx/query-d272c91f1209c277189a31c59ee191a43dc8eafc33ee067bd41e20f25f7625f0.json +++ b/prover/crates/lib/prover_dal/.sqlx/query-6c37c8a0a921408e3b812adf77d835d9a865ecbd87d38008a649e8943fdf8a43.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n UPDATE leaf_aggregation_witness_jobs_fri\n SET\n status = 'in_progress',\n attempts = attempts + 1,\n updated_at = NOW(),\n processing_started_at = NOW(),\n picked_by = $3\n WHERE\n id = (\n SELECT\n id\n FROM\n leaf_aggregation_witness_jobs_fri\n WHERE\n status = 'queued'\n AND protocol_version = $1\n AND protocol_version_patch = $2\n ORDER BY\n l1_batch_number ASC,\n id ASC\n LIMIT\n 1\n FOR UPDATE\n SKIP LOCKED\n )\n RETURNING\n leaf_aggregation_witness_jobs_fri.*\n ", + "query": "\n UPDATE leaf_aggregation_witness_jobs_fri\n SET\n status = 'in_progress',\n attempts = attempts + 1,\n updated_at = NOW(),\n processing_started_at = NOW(),\n picked_by = $3\n WHERE\n id = (\n SELECT\n id\n FROM\n leaf_aggregation_witness_jobs_fri\n WHERE\n status = 'queued'\n AND protocol_version = $1\n AND protocol_version_patch = $2\n ORDER BY\n l1_batch_number ASC,\n id ASC\n LIMIT\n 1\n FOR UPDATE\n SKIP LOCKED\n )\n RETURNING\n leaf_aggregation_witness_jobs_fri.*\n ", "describe": { "columns": [ { @@ -104,5 +104,5 @@ false ] }, - "hash": "d272c91f1209c277189a31c59ee191a43dc8eafc33ee067bd41e20f25f7625f0" + "hash": "6c37c8a0a921408e3b812adf77d835d9a865ecbd87d38008a649e8943fdf8a43" } diff --git a/prover/crates/lib/prover_dal/.sqlx/query-2dc6b7bf08cced8791354fc47e319d03f894f40d2ec528382b5643c3d51ec8e7.json b/prover/crates/lib/prover_dal/.sqlx/query-705e3880df382c3c25f41630d83f2186aa86751cb3b4de26a60af1cf987ca636.json similarity index 92% rename from prover/crates/lib/prover_dal/.sqlx/query-2dc6b7bf08cced8791354fc47e319d03f894f40d2ec528382b5643c3d51ec8e7.json rename to prover/crates/lib/prover_dal/.sqlx/query-705e3880df382c3c25f41630d83f2186aa86751cb3b4de26a60af1cf987ca636.json index 0ad6413e1ec1..700a7e8bfd6e 100644 --- a/prover/crates/lib/prover_dal/.sqlx/query-2dc6b7bf08cced8791354fc47e319d03f894f40d2ec528382b5643c3d51ec8e7.json +++ b/prover/crates/lib/prover_dal/.sqlx/query-705e3880df382c3c25f41630d83f2186aa86751cb3b4de26a60af1cf987ca636.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n UPDATE gpu_prover_queue_fri\n SET\n instance_status = 'reserved',\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n id IN (\n SELECT\n id\n FROM\n gpu_prover_queue_fri\n WHERE\n specialized_prover_group_id = $2\n AND zone = $3\n AND protocol_version = $4\n AND protocol_version_patch = $5\n AND (\n instance_status = 'available'\n OR (\n instance_status = 'reserved'\n AND processing_started_at < NOW() - $1::INTERVAL\n )\n )\n ORDER BY\n updated_at ASC\n LIMIT\n 1\n FOR UPDATE\n SKIP LOCKED\n )\n RETURNING\n gpu_prover_queue_fri.*\n ", + "query": "\n UPDATE gpu_prover_queue_fri\n SET\n instance_status = 'reserved',\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n id IN (\n SELECT\n id\n FROM\n gpu_prover_queue_fri\n WHERE\n specialized_prover_group_id = $2\n AND zone = $3\n AND protocol_version = $4\n AND protocol_version_patch = $5\n AND (\n instance_status = 'available'\n OR (\n instance_status = 'reserved'\n AND processing_started_at < NOW() - $1::INTERVAL\n )\n )\n ORDER BY\n updated_at ASC\n LIMIT\n 1\n FOR UPDATE\n SKIP LOCKED\n )\n RETURNING\n gpu_prover_queue_fri.*\n ", "describe": { "columns": [ { @@ -82,5 +82,5 @@ false ] }, - "hash": "2dc6b7bf08cced8791354fc47e319d03f894f40d2ec528382b5643c3d51ec8e7" + "hash": "705e3880df382c3c25f41630d83f2186aa86751cb3b4de26a60af1cf987ca636" } diff --git a/prover/crates/lib/prover_dal/.sqlx/query-7238cfe04ba59967fe5589665ad2c0214469edff6fc74965f1ec1366f8b46b8e.json b/prover/crates/lib/prover_dal/.sqlx/query-7238cfe04ba59967fe5589665ad2c0214469edff6fc74965f1ec1366f8b46b8e.json new file mode 100644 index 000000000000..227ff7dbe263 --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-7238cfe04ba59967fe5589665ad2c0214469edff6fc74965f1ec1366f8b46b8e.json @@ -0,0 +1,20 @@ +{ + "db_name": "PostgreSQL", + "query": "\n INSERT INTO\n node_aggregation_witness_jobs_fri (\n l1_batch_number,\n circuit_id,\n depth,\n aggregations_url,\n number_of_dependent_jobs,\n protocol_version,\n status,\n created_at,\n updated_at,\n protocol_version_patch\n )\n VALUES\n ($1, $2, $3, $4, $5, $6, 'waiting_for_proofs', NOW(), NOW(), $7)\n ON CONFLICT (l1_batch_number, circuit_id, depth) DO\n UPDATE\n SET\n updated_at = NOW()\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8", + "Int2", + "Int4", + "Text", + "Int4", + "Int4", + "Int4" + ] + }, + "nullable": [] + }, + "hash": "7238cfe04ba59967fe5589665ad2c0214469edff6fc74965f1ec1366f8b46b8e" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-73266a8526c6adc315900e2e95441976a264759c4060c1a38e466ee2052fc17d.json b/prover/crates/lib/prover_dal/.sqlx/query-73266a8526c6adc315900e2e95441976a264759c4060c1a38e466ee2052fc17d.json deleted file mode 100644 index f8b141a8dac9..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-73266a8526c6adc315900e2e95441976a264759c4060c1a38e466ee2052fc17d.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n recursion_tip_witness_jobs_fri (l1_batch_number, status, number_of_final_node_jobs, created_at, updated_at)\n VALUES\n ($1, 'waiting_for_proofs', 1, NOW(), NOW())\n ON CONFLICT (l1_batch_number) DO\n UPDATE\n SET\n status = $2\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8", - "Text" - ] - }, - "nullable": [] - }, - "hash": "73266a8526c6adc315900e2e95441976a264759c4060c1a38e466ee2052fc17d" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-8720d411e0c9640afd61e927a89c0b6c018e6a4d279acd24a4ea7d81b5cc5123.json b/prover/crates/lib/prover_dal/.sqlx/query-7493571411ee2cb4f7b09bcfc4eb86d3521faa0fbbfc7ca810c818ca9720b121.json similarity index 77% rename from prover/crates/lib/prover_dal/.sqlx/query-8720d411e0c9640afd61e927a89c0b6c018e6a4d279acd24a4ea7d81b5cc5123.json rename to prover/crates/lib/prover_dal/.sqlx/query-7493571411ee2cb4f7b09bcfc4eb86d3521faa0fbbfc7ca810c818ca9720b121.json index 12146fb75a90..9d10e7f7fd44 100644 --- a/prover/crates/lib/prover_dal/.sqlx/query-8720d411e0c9640afd61e927a89c0b6c018e6a4d279acd24a4ea7d81b5cc5123.json +++ b/prover/crates/lib/prover_dal/.sqlx/query-7493571411ee2cb4f7b09bcfc4eb86d3521faa0fbbfc7ca810c818ca9720b121.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n UPDATE prover_jobs_fri\n SET\n status = 'in_progress',\n attempts = attempts + 1,\n updated_at = NOW(),\n processing_started_at = NOW(),\n picked_by = $3\n WHERE\n id = (\n SELECT\n id\n FROM\n prover_jobs_fri\n WHERE\n status = 'queued'\n AND protocol_version = $1\n AND protocol_version_patch = $2\n ORDER BY\n aggregation_round DESC,\n l1_batch_number ASC,\n id ASC\n LIMIT\n 1\n FOR UPDATE\n SKIP LOCKED\n )\n RETURNING\n prover_jobs_fri.id,\n prover_jobs_fri.l1_batch_number,\n prover_jobs_fri.circuit_id,\n prover_jobs_fri.aggregation_round,\n prover_jobs_fri.sequence_number,\n prover_jobs_fri.depth,\n prover_jobs_fri.is_node_final_proof\n ", + "query": "\n UPDATE prover_jobs_fri\n SET\n status = 'in_progress',\n attempts = attempts + 1,\n updated_at = NOW(),\n processing_started_at = NOW(),\n picked_by = $3\n WHERE\n id = (\n SELECT\n id\n FROM\n prover_jobs_fri\n WHERE\n status = 'queued'\n AND protocol_version = $1\n AND protocol_version_patch = $2\n ORDER BY\n aggregation_round DESC,\n l1_batch_number ASC,\n id ASC\n LIMIT\n 1\n FOR UPDATE\n SKIP LOCKED\n )\n RETURNING\n prover_jobs_fri.id,\n prover_jobs_fri.l1_batch_number,\n prover_jobs_fri.circuit_id,\n prover_jobs_fri.aggregation_round,\n prover_jobs_fri.sequence_number,\n prover_jobs_fri.depth,\n prover_jobs_fri.is_node_final_proof\n ", "describe": { "columns": [ { @@ -56,5 +56,5 @@ false ] }, - "hash": "8720d411e0c9640afd61e927a89c0b6c018e6a4d279acd24a4ea7d81b5cc5123" + "hash": "7493571411ee2cb4f7b09bcfc4eb86d3521faa0fbbfc7ca810c818ca9720b121" } diff --git a/prover/crates/lib/prover_dal/.sqlx/query-749d18c0fdae16ce0ed4e3c23e543d01cff938d3aed44c9bb1d864bfdf69e39a.json b/prover/crates/lib/prover_dal/.sqlx/query-749d18c0fdae16ce0ed4e3c23e543d01cff938d3aed44c9bb1d864bfdf69e39a.json new file mode 100644 index 000000000000..d01c5481fa6d --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-749d18c0fdae16ce0ed4e3c23e543d01cff938d3aed44c9bb1d864bfdf69e39a.json @@ -0,0 +1,22 @@ +{ + "db_name": "PostgreSQL", + "query": "\n INSERT INTO\n prover_jobs_fri (\n l1_batch_number,\n circuit_id,\n circuit_blob_url,\n aggregation_round,\n sequence_number,\n depth,\n is_node_final_proof,\n protocol_version,\n status,\n created_at,\n updated_at,\n protocol_version_patch\n )\n VALUES\n ($1, $2, $3, $4, $5, $6, $7, $8, 'queued', NOW(), NOW(), $9)\n ON CONFLICT (\n l1_batch_number, aggregation_round, circuit_id, depth, sequence_number\n ) DO\n UPDATE\n SET\n updated_at = NOW()\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8", + "Int2", + "Text", + "Int2", + "Int4", + "Int4", + "Bool", + "Int4", + "Int4" + ] + }, + "nullable": [] + }, + "hash": "749d18c0fdae16ce0ed4e3c23e543d01cff938d3aed44c9bb1d864bfdf69e39a" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-764693ceeb45f8478a20242b592d419667f11d80036cda021ecbf23b0b5f7f42.json b/prover/crates/lib/prover_dal/.sqlx/query-764693ceeb45f8478a20242b592d419667f11d80036cda021ecbf23b0b5f7f42.json deleted file mode 100644 index aac0fcd420cd..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-764693ceeb45f8478a20242b592d419667f11d80036cda021ecbf23b0b5f7f42.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n node_aggregation_witness_jobs_fri (\n l1_batch_number,\n circuit_id,\n depth,\n aggregations_url,\n number_of_dependent_jobs,\n protocol_version,\n status,\n created_at,\n updated_at,\n protocol_version_patch\n )\n VALUES\n ($1, $2, $3, $4, $5, $6, 'waiting_for_proofs', NOW(), NOW(), $7)\n ON CONFLICT (l1_batch_number, circuit_id, depth) DO\n UPDATE\n SET\n updated_at = NOW()\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8", - "Int2", - "Int4", - "Text", - "Int4", - "Int4", - "Int4" - ] - }, - "nullable": [] - }, - "hash": "764693ceeb45f8478a20242b592d419667f11d80036cda021ecbf23b0b5f7f42" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-7ab760de174d37c04373cf48489846983cb3f693c02159ba41c1a875aed7e03d.json b/prover/crates/lib/prover_dal/.sqlx/query-7ab760de174d37c04373cf48489846983cb3f693c02159ba41c1a875aed7e03d.json new file mode 100644 index 000000000000..6e0c60eeab08 --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-7ab760de174d37c04373cf48489846983cb3f693c02159ba41c1a875aed7e03d.json @@ -0,0 +1,62 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE prover_jobs_fri\n SET\n status = 'in_progress',\n attempts = attempts + 1,\n processing_started_at = NOW(),\n updated_at = NOW(),\n picked_by = $5\n WHERE\n id = (\n SELECT\n pj.id\n FROM\n (\n SELECT\n *\n FROM\n UNNEST($1::SMALLINT [], $2::SMALLINT [])\n ) AS tuple (circuit_id, round)\n JOIN LATERAL (\n SELECT\n *\n FROM\n prover_jobs_fri AS pj\n WHERE\n pj.status = 'queued'\n AND pj.protocol_version = $3\n AND pj.protocol_version_patch = $4\n AND pj.circuit_id = tuple.circuit_id\n AND pj.aggregation_round = tuple.round\n ORDER BY\n pj.l1_batch_number ASC,\n pj.id ASC\n LIMIT\n 1\n ) AS pj ON TRUE\n ORDER BY\n pj.l1_batch_number ASC,\n pj.aggregation_round DESC,\n pj.id ASC\n LIMIT\n 1\n FOR UPDATE\n SKIP LOCKED\n )\n RETURNING\n prover_jobs_fri.id,\n prover_jobs_fri.l1_batch_number,\n prover_jobs_fri.circuit_id,\n prover_jobs_fri.aggregation_round,\n prover_jobs_fri.sequence_number,\n prover_jobs_fri.depth,\n prover_jobs_fri.is_node_final_proof\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "id", + "type_info": "Int8" + }, + { + "ordinal": 1, + "name": "l1_batch_number", + "type_info": "Int8" + }, + { + "ordinal": 2, + "name": "circuit_id", + "type_info": "Int2" + }, + { + "ordinal": 3, + "name": "aggregation_round", + "type_info": "Int2" + }, + { + "ordinal": 4, + "name": "sequence_number", + "type_info": "Int4" + }, + { + "ordinal": 5, + "name": "depth", + "type_info": "Int4" + }, + { + "ordinal": 6, + "name": "is_node_final_proof", + "type_info": "Bool" + } + ], + "parameters": { + "Left": [ + "Int2Array", + "Int2Array", + "Int4", + "Int4", + "Text" + ] + }, + "nullable": [ + false, + false, + false, + false, + false, + false, + false + ] + }, + "hash": "7ab760de174d37c04373cf48489846983cb3f693c02159ba41c1a875aed7e03d" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-37ad15f54f4a6f4f79c71a857f3a8d4cc59246dda91b19526e73f27a17c8e3da.json b/prover/crates/lib/prover_dal/.sqlx/query-866bffdc527c079d128c1d21595ca5aec09b39b9d0367b0c29167f8a6a166d18.json similarity index 83% rename from prover/crates/lib/prover_dal/.sqlx/query-37ad15f54f4a6f4f79c71a857f3a8d4cc59246dda91b19526e73f27a17c8e3da.json rename to prover/crates/lib/prover_dal/.sqlx/query-866bffdc527c079d128c1d21595ca5aec09b39b9d0367b0c29167f8a6a166d18.json index c97fe7f4042b..e5a8f575d016 100644 --- a/prover/crates/lib/prover_dal/.sqlx/query-37ad15f54f4a6f4f79c71a857f3a8d4cc59246dda91b19526e73f27a17c8e3da.json +++ b/prover/crates/lib/prover_dal/.sqlx/query-866bffdc527c079d128c1d21595ca5aec09b39b9d0367b0c29167f8a6a166d18.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n UPDATE recursion_tip_witness_jobs_fri\n SET\n status = 'queued',\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n l1_batch_number = $1\n AND attempts >= $2\n AND (\n status = 'in_progress'\n OR status = 'failed'\n )\n RETURNING\n l1_batch_number,\n status,\n attempts,\n error,\n picked_by\n ", + "query": "\n UPDATE recursion_tip_witness_jobs_fri\n SET\n status = 'queued',\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n l1_batch_number = $1\n AND attempts >= $2\n AND (\n status = 'in_progress'\n OR status = 'failed'\n )\n RETURNING\n l1_batch_number,\n status,\n attempts,\n error,\n picked_by\n ", "describe": { "columns": [ { @@ -43,5 +43,5 @@ true ] }, - "hash": "37ad15f54f4a6f4f79c71a857f3a8d4cc59246dda91b19526e73f27a17c8e3da" + "hash": "866bffdc527c079d128c1d21595ca5aec09b39b9d0367b0c29167f8a6a166d18" } diff --git a/prover/crates/lib/prover_dal/.sqlx/query-b4794e6a0c2366d5d95ab373c310103263af3ff5cb6c9dc5df59d3cd2a5e56b4.json b/prover/crates/lib/prover_dal/.sqlx/query-88b83c02ef8e3129ff6a416f5d71c765b3be3958cab0f3bde03f51e03777afd4.json similarity index 75% rename from prover/crates/lib/prover_dal/.sqlx/query-b4794e6a0c2366d5d95ab373c310103263af3ff5cb6c9dc5df59d3cd2a5e56b4.json rename to prover/crates/lib/prover_dal/.sqlx/query-88b83c02ef8e3129ff6a416f5d71c765b3be3958cab0f3bde03f51e03777afd4.json index 14b4115b30e8..63df4b26c817 100644 --- a/prover/crates/lib/prover_dal/.sqlx/query-b4794e6a0c2366d5d95ab373c310103263af3ff5cb6c9dc5df59d3cd2a5e56b4.json +++ b/prover/crates/lib/prover_dal/.sqlx/query-88b83c02ef8e3129ff6a416f5d71c765b3be3958cab0f3bde03f51e03777afd4.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n UPDATE gpu_prover_queue_fri\n SET\n instance_status = $1,\n updated_at = NOW()\n WHERE\n instance_host = $2::TEXT::inet\n AND instance_port = $3\n AND zone = $4\n ", + "query": "\n UPDATE gpu_prover_queue_fri\n SET\n instance_status = $1,\n updated_at = NOW()\n WHERE\n instance_host = $2::TEXT::INET\n AND instance_port = $3\n AND zone = $4\n ", "describe": { "columns": [], "parameters": { @@ -13,5 +13,5 @@ }, "nullable": [] }, - "hash": "b4794e6a0c2366d5d95ab373c310103263af3ff5cb6c9dc5df59d3cd2a5e56b4" + "hash": "88b83c02ef8e3129ff6a416f5d71c765b3be3958cab0f3bde03f51e03777afd4" } diff --git a/prover/crates/lib/prover_dal/.sqlx/query-89a25708d0b0a15e1e56ee8fd69f5a15d2fc5ad3e5ce738a2f6ee3eecfc96736.json b/prover/crates/lib/prover_dal/.sqlx/query-89a25708d0b0a15e1e56ee8fd69f5a15d2fc5ad3e5ce738a2f6ee3eecfc96736.json deleted file mode 100644 index d8bd3223905c..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-89a25708d0b0a15e1e56ee8fd69f5a15d2fc5ad3e5ce738a2f6ee3eecfc96736.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n prover_fri_protocol_versions (id, snark_wrapper_vk_hash, created_at, protocol_version_patch)\n VALUES\n ($1, $2, NOW(), $3)\n ON CONFLICT (id, protocol_version_patch) DO NOTHING\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int4", - "Bytea", - "Int4" - ] - }, - "nullable": [] - }, - "hash": "89a25708d0b0a15e1e56ee8fd69f5a15d2fc5ad3e5ce738a2f6ee3eecfc96736" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-28397b5a0b7af832d2a4d3d7011a68a48db6a64afcd41bbe0e17d98fa38fdb19.json b/prover/crates/lib/prover_dal/.sqlx/query-8c5aba6ce584c1671f2d65fb47701426d60c56b526af5ed2e0c602f881c3bbf0.json similarity index 52% rename from prover/crates/lib/prover_dal/.sqlx/query-28397b5a0b7af832d2a4d3d7011a68a48db6a64afcd41bbe0e17d98fa38fdb19.json rename to prover/crates/lib/prover_dal/.sqlx/query-8c5aba6ce584c1671f2d65fb47701426d60c56b526af5ed2e0c602f881c3bbf0.json index d6e77daaa927..fc0594f64436 100644 --- a/prover/crates/lib/prover_dal/.sqlx/query-28397b5a0b7af832d2a4d3d7011a68a48db6a64afcd41bbe0e17d98fa38fdb19.json +++ b/prover/crates/lib/prover_dal/.sqlx/query-8c5aba6ce584c1671f2d65fb47701426d60c56b526af5ed2e0c602f881c3bbf0.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n UPDATE scheduler_witness_jobs_fri\n SET\n status = 'queued'\n WHERE\n l1_batch_number IN (\n SELECT\n prover_jobs_fri.l1_batch_number\n FROM\n prover_jobs_fri\n JOIN scheduler_witness_jobs_fri swj ON prover_jobs_fri.l1_batch_number = swj.l1_batch_number\n WHERE\n swj.status = 'waiting_for_proofs'\n AND prover_jobs_fri.status = 'successful'\n AND prover_jobs_fri.aggregation_round = $1\n )\n RETURNING\n l1_batch_number;\n ", + "query": "\n UPDATE scheduler_witness_jobs_fri\n SET\n status = 'queued'\n WHERE\n l1_batch_number IN (\n SELECT\n prover_jobs_fri.l1_batch_number\n FROM\n prover_jobs_fri\n JOIN\n scheduler_witness_jobs_fri swj\n ON prover_jobs_fri.l1_batch_number = swj.l1_batch_number\n WHERE\n swj.status = 'waiting_for_proofs'\n AND prover_jobs_fri.status = 'successful'\n AND prover_jobs_fri.aggregation_round = $1\n )\n RETURNING\n l1_batch_number;\n ", "describe": { "columns": [ { @@ -18,5 +18,5 @@ false ] }, - "hash": "28397b5a0b7af832d2a4d3d7011a68a48db6a64afcd41bbe0e17d98fa38fdb19" + "hash": "8c5aba6ce584c1671f2d65fb47701426d60c56b526af5ed2e0c602f881c3bbf0" } diff --git a/prover/crates/lib/prover_dal/.sqlx/query-926cddf712322b476064a6efb2a8594776d64b8b5a4094fef979e35ab76d5bcd.json b/prover/crates/lib/prover_dal/.sqlx/query-926cddf712322b476064a6efb2a8594776d64b8b5a4094fef979e35ab76d5bcd.json new file mode 100644 index 000000000000..a2558f49e1bc --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-926cddf712322b476064a6efb2a8594776d64b8b5a4094fef979e35ab76d5bcd.json @@ -0,0 +1,15 @@ +{ + "db_name": "PostgreSQL", + "query": "\n INSERT INTO\n proof_compression_jobs_fri (l1_batch_number, status, created_at, updated_at)\n VALUES\n ($1, $2, NOW(), NOW())\n ON CONFLICT (l1_batch_number) DO\n UPDATE\n SET\n status = $2\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8", + "Text" + ] + }, + "nullable": [] + }, + "hash": "926cddf712322b476064a6efb2a8594776d64b8b5a4094fef979e35ab76d5bcd" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-929419ad8dcc70e8ce986f17075cd21d4645563f93afd4428734196c2b212276.json b/prover/crates/lib/prover_dal/.sqlx/query-929419ad8dcc70e8ce986f17075cd21d4645563f93afd4428734196c2b212276.json deleted file mode 100644 index cf5fe8117b14..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-929419ad8dcc70e8ce986f17075cd21d4645563f93afd4428734196c2b212276.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n witness_inputs_fri (\n l1_batch_number,\n witness_inputs_blob_url,\n protocol_version,\n status,\n created_at,\n updated_at,\n protocol_version_patch\n )\n VALUES\n ($1, $2, $3, 'queued', NOW(), NOW(), $4)\n ON CONFLICT (l1_batch_number) DO NOTHING\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8", - "Text", - "Int4", - "Int4" - ] - }, - "nullable": [] - }, - "hash": "929419ad8dcc70e8ce986f17075cd21d4645563f93afd4428734196c2b212276" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-9b713312b539b4eefa58346f0070767a2cd4488e670674cd9149f7a332c0198d.json b/prover/crates/lib/prover_dal/.sqlx/query-9b713312b539b4eefa58346f0070767a2cd4488e670674cd9149f7a332c0198d.json deleted file mode 100644 index 2609a2ee0cfc..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-9b713312b539b4eefa58346f0070767a2cd4488e670674cd9149f7a332c0198d.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE recursion_tip_witness_jobs_fri\n SET\n status = 'queued'\n WHERE\n l1_batch_number IN (\n SELECT\n prover_jobs_fri.l1_batch_number\n FROM\n prover_jobs_fri\n JOIN recursion_tip_witness_jobs_fri rtwj ON prover_jobs_fri.l1_batch_number = rtwj.l1_batch_number\n WHERE\n rtwj.status = 'waiting_for_proofs'\n AND prover_jobs_fri.status = 'successful'\n AND prover_jobs_fri.aggregation_round = $1\n AND prover_jobs_fri.is_node_final_proof = TRUE\n GROUP BY\n prover_jobs_fri.l1_batch_number,\n rtwj.number_of_final_node_jobs\n HAVING\n COUNT(*) = rtwj.number_of_final_node_jobs\n )\n RETURNING\n l1_batch_number;\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "l1_batch_number", - "type_info": "Int8" - } - ], - "parameters": { - "Left": [ - "Int2" - ] - }, - "nullable": [ - false - ] - }, - "hash": "9b713312b539b4eefa58346f0070767a2cd4488e670674cd9149f7a332c0198d" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-e438a4f0c705fcb39e017912ce8e1bb675a86ae14a863fa31eb513af65d606ed.json b/prover/crates/lib/prover_dal/.sqlx/query-9f5f6d6da7dbb7292b7fe60283993e804b9c2af8c98ae64ccace8c5035b3c499.json similarity index 80% rename from prover/crates/lib/prover_dal/.sqlx/query-e438a4f0c705fcb39e017912ce8e1bb675a86ae14a863fa31eb513af65d606ed.json rename to prover/crates/lib/prover_dal/.sqlx/query-9f5f6d6da7dbb7292b7fe60283993e804b9c2af8c98ae64ccace8c5035b3c499.json index cf9ff8396eff..fe84883ccd03 100644 --- a/prover/crates/lib/prover_dal/.sqlx/query-e438a4f0c705fcb39e017912ce8e1bb675a86ae14a863fa31eb513af65d606ed.json +++ b/prover/crates/lib/prover_dal/.sqlx/query-9f5f6d6da7dbb7292b7fe60283993e804b9c2af8c98ae64ccace8c5035b3c499.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n UPDATE witness_inputs_fri\n SET\n status = 'in_progress',\n attempts = attempts + 1,\n updated_at = NOW(),\n processing_started_at = NOW(),\n picked_by = $2\n WHERE\n l1_batch_number = (\n SELECT\n l1_batch_number\n FROM\n witness_inputs_fri\n WHERE\n status = 'queued'\n AND protocol_version = $1\n AND protocol_version_patch = $3\n ORDER BY\n l1_batch_number ASC\n LIMIT\n 1\n FOR UPDATE\n SKIP LOCKED\n )\n RETURNING\n witness_inputs_fri.l1_batch_number\n ", + "query": "\n UPDATE witness_inputs_fri\n SET\n status = 'in_progress',\n attempts = attempts + 1,\n updated_at = NOW(),\n processing_started_at = NOW(),\n picked_by = $2\n WHERE\n l1_batch_number = (\n SELECT\n l1_batch_number\n FROM\n witness_inputs_fri\n WHERE\n status = 'queued'\n AND protocol_version = $1\n AND protocol_version_patch = $3\n ORDER BY\n l1_batch_number ASC\n LIMIT\n 1\n FOR UPDATE\n SKIP LOCKED\n )\n RETURNING\n witness_inputs_fri.l1_batch_number\n ", "describe": { "columns": [ { @@ -20,5 +20,5 @@ false ] }, - "hash": "e438a4f0c705fcb39e017912ce8e1bb675a86ae14a863fa31eb513af65d606ed" + "hash": "9f5f6d6da7dbb7292b7fe60283993e804b9c2af8c98ae64ccace8c5035b3c499" } diff --git a/prover/crates/lib/prover_dal/.sqlx/query-e9c9b69852fa68f463f17b6d63ab99cf505662036f2dd7a9f1807c4c1bad7c7b.json b/prover/crates/lib/prover_dal/.sqlx/query-a4407ac701423bc91505af3e7250ac1e4ed2a372922e55728de083bffb533e11.json similarity index 60% rename from prover/crates/lib/prover_dal/.sqlx/query-e9c9b69852fa68f463f17b6d63ab99cf505662036f2dd7a9f1807c4c1bad7c7b.json rename to prover/crates/lib/prover_dal/.sqlx/query-a4407ac701423bc91505af3e7250ac1e4ed2a372922e55728de083bffb533e11.json index 160eb31bf953..7a06e6557d60 100644 --- a/prover/crates/lib/prover_dal/.sqlx/query-e9c9b69852fa68f463f17b6d63ab99cf505662036f2dd7a9f1807c4c1bad7c7b.json +++ b/prover/crates/lib/prover_dal/.sqlx/query-a4407ac701423bc91505af3e7250ac1e4ed2a372922e55728de083bffb533e11.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT\n protocol_version,\n protocol_version_patch,\n COUNT(*) FILTER (\n WHERE\n status = 'queued'\n ) AS queued,\n COUNT(*) FILTER (\n WHERE\n status = 'in_progress'\n ) AS in_progress\n FROM\n proof_compression_jobs_fri\n WHERE\n protocol_version IS NOT NULL\n GROUP BY\n protocol_version,\n protocol_version_patch\n ", + "query": "\n SELECT\n protocol_version,\n protocol_version_patch,\n COUNT(*) FILTER (\n WHERE\n status = 'queued'\n ) AS queued,\n COUNT(*) FILTER (\n WHERE\n status = 'in_progress'\n ) AS in_progress\n FROM\n proof_compression_jobs_fri\n WHERE\n protocol_version IS NOT NULL\n GROUP BY\n protocol_version,\n protocol_version_patch\n ", "describe": { "columns": [ { @@ -34,5 +34,5 @@ null ] }, - "hash": "e9c9b69852fa68f463f17b6d63ab99cf505662036f2dd7a9f1807c4c1bad7c7b" + "hash": "a4407ac701423bc91505af3e7250ac1e4ed2a372922e55728de083bffb533e11" } diff --git a/prover/crates/lib/prover_dal/.sqlx/query-2095e5646c382ccbc6e3bafdeddaae31358088e142dff51c9f0bde8f386900d3.json b/prover/crates/lib/prover_dal/.sqlx/query-a471aeb02911569bc201db0aa017c0d0f55630a33b69c9a0fefd9cb8be9356ee.json similarity index 78% rename from prover/crates/lib/prover_dal/.sqlx/query-2095e5646c382ccbc6e3bafdeddaae31358088e142dff51c9f0bde8f386900d3.json rename to prover/crates/lib/prover_dal/.sqlx/query-a471aeb02911569bc201db0aa017c0d0f55630a33b69c9a0fefd9cb8be9356ee.json index fd7c7c7874db..d21f1f185703 100644 --- a/prover/crates/lib/prover_dal/.sqlx/query-2095e5646c382ccbc6e3bafdeddaae31358088e142dff51c9f0bde8f386900d3.json +++ b/prover/crates/lib/prover_dal/.sqlx/query-a471aeb02911569bc201db0aa017c0d0f55630a33b69c9a0fefd9cb8be9356ee.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT\n instance_status\n FROM\n gpu_prover_queue_fri\n WHERE\n instance_host = $1::TEXT::inet\n AND instance_port = $2\n AND zone = $3\n ", + "query": "\n SELECT\n instance_status\n FROM\n gpu_prover_queue_fri\n WHERE\n instance_host = $1::TEXT::INET\n AND instance_port = $2\n AND zone = $3\n ", "describe": { "columns": [ { @@ -20,5 +20,5 @@ false ] }, - "hash": "2095e5646c382ccbc6e3bafdeddaae31358088e142dff51c9f0bde8f386900d3" + "hash": "a471aeb02911569bc201db0aa017c0d0f55630a33b69c9a0fefd9cb8be9356ee" } diff --git a/prover/crates/lib/prover_dal/.sqlx/query-35a76415cb746d03da31481edc65adefab0bf3abf6853a6d36123c8adcaf813b.json b/prover/crates/lib/prover_dal/.sqlx/query-a6848b0c4cb256ca1d79d83dc5cb8c88cdb52125daedbade044934761fe2147d.json similarity index 83% rename from prover/crates/lib/prover_dal/.sqlx/query-35a76415cb746d03da31481edc65adefab0bf3abf6853a6d36123c8adcaf813b.json rename to prover/crates/lib/prover_dal/.sqlx/query-a6848b0c4cb256ca1d79d83dc5cb8c88cdb52125daedbade044934761fe2147d.json index bf8db798e7d4..270868d8981f 100644 --- a/prover/crates/lib/prover_dal/.sqlx/query-35a76415cb746d03da31481edc65adefab0bf3abf6853a6d36123c8adcaf813b.json +++ b/prover/crates/lib/prover_dal/.sqlx/query-a6848b0c4cb256ca1d79d83dc5cb8c88cdb52125daedbade044934761fe2147d.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n UPDATE scheduler_witness_jobs_fri\n SET\n status = 'queued',\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n l1_batch_number = $1\n AND attempts >= $2\n AND (\n status = 'in_progress'\n OR status = 'failed'\n )\n RETURNING\n l1_batch_number,\n status,\n attempts,\n error,\n picked_by\n ", + "query": "\n UPDATE scheduler_witness_jobs_fri\n SET\n status = 'queued',\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n l1_batch_number = $1\n AND attempts >= $2\n AND (\n status = 'in_progress'\n OR status = 'failed'\n )\n RETURNING\n l1_batch_number,\n status,\n attempts,\n error,\n picked_by\n ", "describe": { "columns": [ { @@ -43,5 +43,5 @@ true ] }, - "hash": "35a76415cb746d03da31481edc65adefab0bf3abf6853a6d36123c8adcaf813b" + "hash": "a6848b0c4cb256ca1d79d83dc5cb8c88cdb52125daedbade044934761fe2147d" } diff --git a/prover/crates/lib/prover_dal/.sqlx/query-a6eb7a1f1aa2f6f5d90fbe3b8c777313681560f538c6524c54648d6308533744.json b/prover/crates/lib/prover_dal/.sqlx/query-a6eb7a1f1aa2f6f5d90fbe3b8c777313681560f538c6524c54648d6308533744.json new file mode 100644 index 000000000000..319b00b4c61d --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-a6eb7a1f1aa2f6f5d90fbe3b8c777313681560f538c6524c54648d6308533744.json @@ -0,0 +1,32 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE node_aggregation_witness_jobs_fri\n SET\n status = 'queued'\n WHERE\n (l1_batch_number, circuit_id, depth) IN (\n SELECT\n prover_jobs_fri.l1_batch_number,\n prover_jobs_fri.circuit_id,\n prover_jobs_fri.depth\n FROM\n prover_jobs_fri\n JOIN node_aggregation_witness_jobs_fri nawj\n ON\n prover_jobs_fri.l1_batch_number = nawj.l1_batch_number\n AND prover_jobs_fri.circuit_id = nawj.circuit_id\n AND prover_jobs_fri.depth = nawj.depth\n WHERE\n nawj.status = 'waiting_for_proofs'\n AND prover_jobs_fri.status = 'successful'\n AND prover_jobs_fri.aggregation_round = 1\n AND prover_jobs_fri.depth = 0\n GROUP BY\n prover_jobs_fri.l1_batch_number,\n prover_jobs_fri.circuit_id,\n prover_jobs_fri.depth,\n nawj.number_of_dependent_jobs\n HAVING\n COUNT(*) = nawj.number_of_dependent_jobs\n )\n RETURNING\n l1_batch_number,\n circuit_id,\n depth;\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "l1_batch_number", + "type_info": "Int8" + }, + { + "ordinal": 1, + "name": "circuit_id", + "type_info": "Int2" + }, + { + "ordinal": 2, + "name": "depth", + "type_info": "Int4" + } + ], + "parameters": { + "Left": [] + }, + "nullable": [ + false, + false, + false + ] + }, + "hash": "a6eb7a1f1aa2f6f5d90fbe3b8c777313681560f538c6524c54648d6308533744" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-a817f0fec85388b3e2510ce259208a01b63ae4aa03c983c3a52c802d585e5a80.json b/prover/crates/lib/prover_dal/.sqlx/query-a817f0fec85388b3e2510ce259208a01b63ae4aa03c983c3a52c802d585e5a80.json deleted file mode 100644 index 93532150f7f8..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-a817f0fec85388b3e2510ce259208a01b63ae4aa03c983c3a52c802d585e5a80.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n proof_compression_jobs_fri (l1_batch_number, status, created_at, updated_at)\n VALUES\n ($1, $2, NOW(), NOW())\n ON CONFLICT (l1_batch_number) DO\n UPDATE\n SET\n status = $2\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8", - "Text" - ] - }, - "nullable": [] - }, - "hash": "a817f0fec85388b3e2510ce259208a01b63ae4aa03c983c3a52c802d585e5a80" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-abc93d27a8673b23e18d050e84c43c868c63c853edb5c4f41e48a3cc6378eca9.json b/prover/crates/lib/prover_dal/.sqlx/query-abc93d27a8673b23e18d050e84c43c868c63c853edb5c4f41e48a3cc6378eca9.json deleted file mode 100644 index fae5c1041a5d..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-abc93d27a8673b23e18d050e84c43c868c63c853edb5c4f41e48a3cc6378eca9.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE node_aggregation_witness_jobs_fri\n SET\n status = 'queued'\n WHERE\n (l1_batch_number, circuit_id, depth) IN (\n SELECT\n prover_jobs_fri.l1_batch_number,\n prover_jobs_fri.circuit_id,\n prover_jobs_fri.depth\n FROM\n prover_jobs_fri\n JOIN node_aggregation_witness_jobs_fri nawj ON prover_jobs_fri.l1_batch_number = nawj.l1_batch_number\n AND prover_jobs_fri.circuit_id = nawj.circuit_id\n AND prover_jobs_fri.depth = nawj.depth\n WHERE\n nawj.status = 'waiting_for_proofs'\n AND prover_jobs_fri.status = 'successful'\n AND prover_jobs_fri.aggregation_round = 1\n AND prover_jobs_fri.depth = 0\n GROUP BY\n prover_jobs_fri.l1_batch_number,\n prover_jobs_fri.circuit_id,\n prover_jobs_fri.depth,\n nawj.number_of_dependent_jobs\n HAVING\n COUNT(*) = nawj.number_of_dependent_jobs\n )\n RETURNING\n l1_batch_number,\n circuit_id,\n depth;\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "l1_batch_number", - "type_info": "Int8" - }, - { - "ordinal": 1, - "name": "circuit_id", - "type_info": "Int2" - }, - { - "ordinal": 2, - "name": "depth", - "type_info": "Int4" - } - ], - "parameters": { - "Left": [] - }, - "nullable": [ - false, - false, - false - ] - }, - "hash": "abc93d27a8673b23e18d050e84c43c868c63c853edb5c4f41e48a3cc6378eca9" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-ec04b89218111a5dc8d5ade506ac3465e2211ef3013386feb12d4cc04e0eade9.json b/prover/crates/lib/prover_dal/.sqlx/query-b9aaf5fe4d0261f7b05c8601a96b3027b4c2ce405d3bcc9821440408a394d7f5.json similarity index 73% rename from prover/crates/lib/prover_dal/.sqlx/query-ec04b89218111a5dc8d5ade506ac3465e2211ef3013386feb12d4cc04e0eade9.json rename to prover/crates/lib/prover_dal/.sqlx/query-b9aaf5fe4d0261f7b05c8601a96b3027b4c2ce405d3bcc9821440408a394d7f5.json index 7c0264b5646b..a7b33f51cb1e 100644 --- a/prover/crates/lib/prover_dal/.sqlx/query-ec04b89218111a5dc8d5ade506ac3465e2211ef3013386feb12d4cc04e0eade9.json +++ b/prover/crates/lib/prover_dal/.sqlx/query-b9aaf5fe4d0261f7b05c8601a96b3027b4c2ce405d3bcc9821440408a394d7f5.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n UPDATE prover_jobs_fri\n SET\n status = 'successful',\n updated_at = NOW(),\n time_taken = $1,\n proof_blob_url = $2\n WHERE\n id = $3\n RETURNING\n prover_jobs_fri.id,\n prover_jobs_fri.l1_batch_number,\n prover_jobs_fri.circuit_id,\n prover_jobs_fri.aggregation_round,\n prover_jobs_fri.sequence_number,\n prover_jobs_fri.depth,\n prover_jobs_fri.is_node_final_proof\n ", + "query": "\n UPDATE prover_jobs_fri\n SET\n status = 'successful',\n updated_at = NOW(),\n time_taken = $1,\n proof_blob_url = $2\n WHERE\n id = $3\n RETURNING\n prover_jobs_fri.id,\n prover_jobs_fri.l1_batch_number,\n prover_jobs_fri.circuit_id,\n prover_jobs_fri.aggregation_round,\n prover_jobs_fri.sequence_number,\n prover_jobs_fri.depth,\n prover_jobs_fri.is_node_final_proof\n ", "describe": { "columns": [ { @@ -56,5 +56,5 @@ false ] }, - "hash": "ec04b89218111a5dc8d5ade506ac3465e2211ef3013386feb12d4cc04e0eade9" + "hash": "b9aaf5fe4d0261f7b05c8601a96b3027b4c2ce405d3bcc9821440408a394d7f5" } diff --git a/prover/crates/lib/prover_dal/.sqlx/query-29f7a564a8373f7e44840e8e9e7d0cd5c6b1122c35d7ffdbbba30327ca3fb5a8.json b/prover/crates/lib/prover_dal/.sqlx/query-c01337f381828818b2b23a7fcc3d165108e64cc8cf1a2a5604cb180f6d8ac4fe.json similarity index 57% rename from prover/crates/lib/prover_dal/.sqlx/query-29f7a564a8373f7e44840e8e9e7d0cd5c6b1122c35d7ffdbbba30327ca3fb5a8.json rename to prover/crates/lib/prover_dal/.sqlx/query-c01337f381828818b2b23a7fcc3d165108e64cc8cf1a2a5604cb180f6d8ac4fe.json index 05163dcfa2e6..6c583ea19943 100644 --- a/prover/crates/lib/prover_dal/.sqlx/query-29f7a564a8373f7e44840e8e9e7d0cd5c6b1122c35d7ffdbbba30327ca3fb5a8.json +++ b/prover/crates/lib/prover_dal/.sqlx/query-c01337f381828818b2b23a7fcc3d165108e64cc8cf1a2a5604cb180f6d8ac4fe.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT\n protocol_version AS \"protocol_version!\",\n protocol_version_patch AS \"protocol_version_patch!\",\n COUNT(*) FILTER (\n WHERE\n status = 'queued'\n ) AS queued,\n COUNT(*) FILTER (\n WHERE\n status = 'in_progress'\n ) AS in_progress\n FROM\n prover_jobs_fri\n WHERE\n status IN ('queued', 'in_progress')\n AND protocol_version IS NOT NULL\n GROUP BY\n protocol_version,\n protocol_version_patch\n ", + "query": "\n SELECT\n protocol_version AS \"protocol_version!\",\n protocol_version_patch AS \"protocol_version_patch!\",\n COUNT(*) FILTER (\n WHERE\n status = 'queued'\n ) AS queued,\n COUNT(*) FILTER (\n WHERE\n status = 'in_progress'\n ) AS in_progress\n FROM\n prover_jobs_fri\n WHERE\n status IN ('queued', 'in_progress')\n AND protocol_version IS NOT NULL\n GROUP BY\n protocol_version,\n protocol_version_patch\n ", "describe": { "columns": [ { @@ -34,5 +34,5 @@ null ] }, - "hash": "29f7a564a8373f7e44840e8e9e7d0cd5c6b1122c35d7ffdbbba30327ca3fb5a8" + "hash": "c01337f381828818b2b23a7fcc3d165108e64cc8cf1a2a5604cb180f6d8ac4fe" } diff --git a/prover/crates/lib/prover_dal/.sqlx/query-7effbacbdcc4bd762386351755f4f32042dfead8a37401558f5fd3b03480f2dd.json b/prover/crates/lib/prover_dal/.sqlx/query-c5569d55d77296b8c7180c95682423bb83b9fb0422b396cbd201f02ebce7b921.json similarity index 93% rename from prover/crates/lib/prover_dal/.sqlx/query-7effbacbdcc4bd762386351755f4f32042dfead8a37401558f5fd3b03480f2dd.json rename to prover/crates/lib/prover_dal/.sqlx/query-c5569d55d77296b8c7180c95682423bb83b9fb0422b396cbd201f02ebce7b921.json index 3064489830d9..f25ad78910d9 100644 --- a/prover/crates/lib/prover_dal/.sqlx/query-7effbacbdcc4bd762386351755f4f32042dfead8a37401558f5fd3b03480f2dd.json +++ b/prover/crates/lib/prover_dal/.sqlx/query-c5569d55d77296b8c7180c95682423bb83b9fb0422b396cbd201f02ebce7b921.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n UPDATE node_aggregation_witness_jobs_fri\n SET\n status = 'in_progress',\n attempts = attempts + 1,\n updated_at = NOW(),\n processing_started_at = NOW(),\n picked_by = $3\n WHERE\n id = (\n SELECT\n id\n FROM\n node_aggregation_witness_jobs_fri\n WHERE\n status = 'queued'\n AND protocol_version = $1\n AND protocol_version_patch = $2\n ORDER BY\n l1_batch_number ASC,\n depth ASC,\n id ASC\n LIMIT\n 1\n FOR UPDATE\n SKIP LOCKED\n )\n RETURNING\n node_aggregation_witness_jobs_fri.*\n ", + "query": "\n UPDATE node_aggregation_witness_jobs_fri\n SET\n status = 'in_progress',\n attempts = attempts + 1,\n updated_at = NOW(),\n processing_started_at = NOW(),\n picked_by = $3\n WHERE\n id = (\n SELECT\n id\n FROM\n node_aggregation_witness_jobs_fri\n WHERE\n status = 'queued'\n AND protocol_version = $1\n AND protocol_version_patch = $2\n ORDER BY\n l1_batch_number ASC,\n depth ASC,\n id ASC\n LIMIT\n 1\n FOR UPDATE\n SKIP LOCKED\n )\n RETURNING\n node_aggregation_witness_jobs_fri.*\n ", "describe": { "columns": [ { @@ -110,5 +110,5 @@ false ] }, - "hash": "7effbacbdcc4bd762386351755f4f32042dfead8a37401558f5fd3b03480f2dd" + "hash": "c5569d55d77296b8c7180c95682423bb83b9fb0422b396cbd201f02ebce7b921" } diff --git a/prover/crates/lib/prover_dal/.sqlx/query-081e2b928f0816c41d6645c1dedbb3402044d201e85e114ff4582394c32bd2bf.json b/prover/crates/lib/prover_dal/.sqlx/query-c6d02dc9cb9908a57c79729c759b9314a2ce0180c20126ad22ddaa20c7c32c2c.json similarity index 66% rename from prover/crates/lib/prover_dal/.sqlx/query-081e2b928f0816c41d6645c1dedbb3402044d201e85e114ff4582394c32bd2bf.json rename to prover/crates/lib/prover_dal/.sqlx/query-c6d02dc9cb9908a57c79729c759b9314a2ce0180c20126ad22ddaa20c7c32c2c.json index 918fb2817d26..8462680ad82d 100644 --- a/prover/crates/lib/prover_dal/.sqlx/query-081e2b928f0816c41d6645c1dedbb3402044d201e85e114ff4582394c32bd2bf.json +++ b/prover/crates/lib/prover_dal/.sqlx/query-c6d02dc9cb9908a57c79729c759b9314a2ce0180c20126ad22ddaa20c7c32c2c.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n SELECT\n comp.l1_batch_number,\n (comp.updated_at - wit.created_at) AS time_taken,\n wit.created_at\n FROM\n proof_compression_jobs_fri AS comp\n JOIN witness_inputs_fri AS wit ON comp.l1_batch_number = wit.l1_batch_number\n WHERE\n wit.created_at > $1\n ORDER BY\n time_taken DESC;\n ", + "query": "\n SELECT\n comp.l1_batch_number,\n (comp.updated_at - wit.created_at) AS time_taken,\n wit.created_at\n FROM\n proof_compression_jobs_fri AS comp\n JOIN witness_inputs_fri AS wit ON comp.l1_batch_number = wit.l1_batch_number\n WHERE\n wit.created_at > $1\n ORDER BY\n time_taken DESC;\n ", "describe": { "columns": [ { @@ -30,5 +30,5 @@ false ] }, - "hash": "081e2b928f0816c41d6645c1dedbb3402044d201e85e114ff4582394c32bd2bf" + "hash": "c6d02dc9cb9908a57c79729c759b9314a2ce0180c20126ad22ddaa20c7c32c2c" } diff --git a/prover/crates/lib/prover_dal/.sqlx/query-c8daa62b3835c15fafb3f83deabb5a4672ad50a9de92c84d939ac4c69842e355.json b/prover/crates/lib/prover_dal/.sqlx/query-c8daa62b3835c15fafb3f83deabb5a4672ad50a9de92c84d939ac4c69842e355.json deleted file mode 100644 index cadc931fa1ca..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-c8daa62b3835c15fafb3f83deabb5a4672ad50a9de92c84d939ac4c69842e355.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n node_aggregation_witness_jobs_fri (l1_batch_number, circuit_id, status, created_at, updated_at)\n VALUES\n ($1, $2, 'waiting_for_proofs', NOW(), NOW())\n ON CONFLICT (l1_batch_number, circuit_id, depth) DO\n UPDATE\n SET\n status = $3\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8", - "Int2", - "Text" - ] - }, - "nullable": [] - }, - "hash": "c8daa62b3835c15fafb3f83deabb5a4672ad50a9de92c84d939ac4c69842e355" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-caff620ae66d7fbe3caff7505173b6da86d1e693be03936730c340121167341f.json b/prover/crates/lib/prover_dal/.sqlx/query-caff620ae66d7fbe3caff7505173b6da86d1e693be03936730c340121167341f.json deleted file mode 100644 index 403e34bb91cd..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-caff620ae66d7fbe3caff7505173b6da86d1e693be03936730c340121167341f.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n scheduler_witness_jobs_fri (\n l1_batch_number,\n scheduler_partial_input_blob_url,\n protocol_version,\n status,\n created_at,\n updated_at,\n protocol_version_patch\n )\n VALUES\n ($1, $2, $3, 'waiting_for_proofs', NOW(), NOW(), $4)\n ON CONFLICT (l1_batch_number) DO\n UPDATE\n SET\n updated_at = NOW()\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8", - "Text", - "Int4", - "Int4" - ] - }, - "nullable": [] - }, - "hash": "caff620ae66d7fbe3caff7505173b6da86d1e693be03936730c340121167341f" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-cb453f0677b92539747e175e796599bf65cbf2fd7c27a2dcad43e41a0f43cba0.json b/prover/crates/lib/prover_dal/.sqlx/query-cb453f0677b92539747e175e796599bf65cbf2fd7c27a2dcad43e41a0f43cba0.json new file mode 100644 index 000000000000..5c5a9e288b2c --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-cb453f0677b92539747e175e796599bf65cbf2fd7c27a2dcad43e41a0f43cba0.json @@ -0,0 +1,26 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE leaf_aggregation_witness_jobs_fri\n SET\n status = 'queued'\n WHERE\n (l1_batch_number, circuit_id) IN (\n SELECT\n prover_jobs_fri.l1_batch_number,\n prover_jobs_fri.circuit_id\n FROM\n prover_jobs_fri\n JOIN leaf_aggregation_witness_jobs_fri lawj\n ON\n prover_jobs_fri.l1_batch_number = lawj.l1_batch_number\n AND prover_jobs_fri.circuit_id = lawj.circuit_id\n WHERE\n lawj.status = 'waiting_for_proofs'\n AND prover_jobs_fri.status = 'successful'\n AND prover_jobs_fri.aggregation_round = 0\n GROUP BY\n prover_jobs_fri.l1_batch_number,\n prover_jobs_fri.circuit_id,\n lawj.number_of_basic_circuits\n HAVING\n COUNT(*) = lawj.number_of_basic_circuits\n )\n RETURNING\n l1_batch_number,\n circuit_id;\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "l1_batch_number", + "type_info": "Int8" + }, + { + "ordinal": 1, + "name": "circuit_id", + "type_info": "Int2" + } + ], + "parameters": { + "Left": [] + }, + "nullable": [ + false, + false + ] + }, + "hash": "cb453f0677b92539747e175e796599bf65cbf2fd7c27a2dcad43e41a0f43cba0" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-cebbd80998bf2be10c735f6c414d023d9cce8cd66ad684475ece209832babd5e.json b/prover/crates/lib/prover_dal/.sqlx/query-cebbd80998bf2be10c735f6c414d023d9cce8cd66ad684475ece209832babd5e.json new file mode 100644 index 000000000000..d56c7f3de74b --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-cebbd80998bf2be10c735f6c414d023d9cce8cd66ad684475ece209832babd5e.json @@ -0,0 +1,16 @@ +{ + "db_name": "PostgreSQL", + "query": "\n INSERT INTO\n node_aggregation_witness_jobs_fri (\n l1_batch_number, circuit_id, status, created_at, updated_at\n )\n VALUES\n ($1, $2, 'waiting_for_proofs', NOW(), NOW())\n ON CONFLICT (l1_batch_number, circuit_id, depth) DO\n UPDATE\n SET\n status = $3\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8", + "Int2", + "Text" + ] + }, + "nullable": [] + }, + "hash": "cebbd80998bf2be10c735f6c414d023d9cce8cd66ad684475ece209832babd5e" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-e2aceb9b86e74a3d119d383dcc729d1227a213b6cacb4c30a1f94c56f56cb4af.json b/prover/crates/lib/prover_dal/.sqlx/query-e2aceb9b86e74a3d119d383dcc729d1227a213b6cacb4c30a1f94c56f56cb4af.json new file mode 100644 index 000000000000..0fc0f557b127 --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-e2aceb9b86e74a3d119d383dcc729d1227a213b6cacb4c30a1f94c56f56cb4af.json @@ -0,0 +1,15 @@ +{ + "db_name": "PostgreSQL", + "query": "\n INSERT INTO\n scheduler_witness_jobs_fri (\n l1_batch_number,\n scheduler_partial_input_blob_url,\n status,\n created_at,\n updated_at\n )\n VALUES\n ($1, '', 'waiting_for_proofs', NOW(), NOW())\n ON CONFLICT (l1_batch_number) DO\n UPDATE\n SET\n status = $2\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8", + "Text" + ] + }, + "nullable": [] + }, + "hash": "e2aceb9b86e74a3d119d383dcc729d1227a213b6cacb4c30a1f94c56f56cb4af" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-e65d9d8389b60f48468561984f0fb9c8674344921b98b8b26e4d85994b3d72af.json b/prover/crates/lib/prover_dal/.sqlx/query-e65d9d8389b60f48468561984f0fb9c8674344921b98b8b26e4d85994b3d72af.json new file mode 100644 index 000000000000..65a473ddeee5 --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-e65d9d8389b60f48468561984f0fb9c8674344921b98b8b26e4d85994b3d72af.json @@ -0,0 +1,22 @@ +{ + "db_name": "PostgreSQL", + "query": "\n UPDATE recursion_tip_witness_jobs_fri\n SET\n status = 'queued'\n WHERE\n l1_batch_number IN (\n SELECT\n prover_jobs_fri.l1_batch_number\n FROM\n prover_jobs_fri\n JOIN\n recursion_tip_witness_jobs_fri rtwj\n ON prover_jobs_fri.l1_batch_number = rtwj.l1_batch_number\n WHERE\n rtwj.status = 'waiting_for_proofs'\n AND prover_jobs_fri.status = 'successful'\n AND prover_jobs_fri.aggregation_round = $1\n AND prover_jobs_fri.is_node_final_proof = TRUE\n GROUP BY\n prover_jobs_fri.l1_batch_number,\n rtwj.number_of_final_node_jobs\n HAVING\n COUNT(*) = rtwj.number_of_final_node_jobs\n )\n RETURNING\n l1_batch_number;\n ", + "describe": { + "columns": [ + { + "ordinal": 0, + "name": "l1_batch_number", + "type_info": "Int8" + } + ], + "parameters": { + "Left": [ + "Int2" + ] + }, + "nullable": [ + false + ] + }, + "hash": "e65d9d8389b60f48468561984f0fb9c8674344921b98b8b26e4d85994b3d72af" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-3727d5614d2fe2a4d96f880eb72cd48c95ca5b4520dde415a2b5ff32ece47c86.json b/prover/crates/lib/prover_dal/.sqlx/query-e6ddecc79d55bf5bd3e348a735b02757fe394fa096f09c62faa26f728a69d1ae.json similarity index 79% rename from prover/crates/lib/prover_dal/.sqlx/query-3727d5614d2fe2a4d96f880eb72cd48c95ca5b4520dde415a2b5ff32ece47c86.json rename to prover/crates/lib/prover_dal/.sqlx/query-e6ddecc79d55bf5bd3e348a735b02757fe394fa096f09c62faa26f728a69d1ae.json index d7eb6a32b421..a3da3036ab67 100644 --- a/prover/crates/lib/prover_dal/.sqlx/query-3727d5614d2fe2a4d96f880eb72cd48c95ca5b4520dde415a2b5ff32ece47c86.json +++ b/prover/crates/lib/prover_dal/.sqlx/query-e6ddecc79d55bf5bd3e348a735b02757fe394fa096f09c62faa26f728a69d1ae.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n UPDATE witness_inputs_fri\n SET\n status = 'queued',\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n l1_batch_number = $1\n AND attempts >= $2\n AND (\n status = 'in_progress'\n OR status = 'failed'\n )\n RETURNING\n l1_batch_number,\n status,\n attempts,\n error,\n picked_by\n ", + "query": "\n UPDATE witness_inputs_fri\n SET\n status = 'queued',\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n l1_batch_number = $1\n AND attempts >= $2\n AND (\n status = 'in_progress'\n OR status = 'failed'\n )\n RETURNING\n l1_batch_number,\n status,\n attempts,\n error,\n picked_by\n ", "describe": { "columns": [ { @@ -43,5 +43,5 @@ true ] }, - "hash": "3727d5614d2fe2a4d96f880eb72cd48c95ca5b4520dde415a2b5ff32ece47c86" + "hash": "e6ddecc79d55bf5bd3e348a735b02757fe394fa096f09c62faa26f728a69d1ae" } diff --git a/prover/crates/lib/prover_dal/.sqlx/query-e743af4c18ec91eb46db5a19556fba74ec2cfc3c89c7e4e2ea475c3ce4092849.json b/prover/crates/lib/prover_dal/.sqlx/query-e743af4c18ec91eb46db5a19556fba74ec2cfc3c89c7e4e2ea475c3ce4092849.json deleted file mode 100644 index af6210ae91e4..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-e743af4c18ec91eb46db5a19556fba74ec2cfc3c89c7e4e2ea475c3ce4092849.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n UPDATE leaf_aggregation_witness_jobs_fri\n SET\n status = 'queued'\n WHERE\n (l1_batch_number, circuit_id) IN (\n SELECT\n prover_jobs_fri.l1_batch_number,\n prover_jobs_fri.circuit_id\n FROM\n prover_jobs_fri\n JOIN leaf_aggregation_witness_jobs_fri lawj ON prover_jobs_fri.l1_batch_number = lawj.l1_batch_number\n AND prover_jobs_fri.circuit_id = lawj.circuit_id\n WHERE\n lawj.status = 'waiting_for_proofs'\n AND prover_jobs_fri.status = 'successful'\n AND prover_jobs_fri.aggregation_round = 0\n GROUP BY\n prover_jobs_fri.l1_batch_number,\n prover_jobs_fri.circuit_id,\n lawj.number_of_basic_circuits\n HAVING\n COUNT(*) = lawj.number_of_basic_circuits\n )\n RETURNING\n l1_batch_number,\n circuit_id;\n ", - "describe": { - "columns": [ - { - "ordinal": 0, - "name": "l1_batch_number", - "type_info": "Int8" - }, - { - "ordinal": 1, - "name": "circuit_id", - "type_info": "Int2" - } - ], - "parameters": { - "Left": [] - }, - "nullable": [ - false, - false - ] - }, - "hash": "e743af4c18ec91eb46db5a19556fba74ec2cfc3c89c7e4e2ea475c3ce4092849" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-e875dcbbdaed6998dbea45d4eab5d005d8760c4809b7aef902155196873da66e.json b/prover/crates/lib/prover_dal/.sqlx/query-e875dcbbdaed6998dbea45d4eab5d005d8760c4809b7aef902155196873da66e.json deleted file mode 100644 index 4ee9278fe42a..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-e875dcbbdaed6998dbea45d4eab5d005d8760c4809b7aef902155196873da66e.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n scheduler_witness_jobs_fri (\n l1_batch_number,\n scheduler_partial_input_blob_url,\n status,\n created_at,\n updated_at\n )\n VALUES\n ($1, '', 'waiting_for_proofs', NOW(), NOW())\n ON CONFLICT (l1_batch_number) DO\n UPDATE\n SET\n status = $2\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8", - "Text" - ] - }, - "nullable": [] - }, - "hash": "e875dcbbdaed6998dbea45d4eab5d005d8760c4809b7aef902155196873da66e" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-eec29cbff034818f4fb5ec1e6ad38e1010d7389457b3c97e9b238a3a0291a54e.json b/prover/crates/lib/prover_dal/.sqlx/query-eec29cbff034818f4fb5ec1e6ad38e1010d7389457b3c97e9b238a3a0291a54e.json deleted file mode 100644 index f8e92b1ad666..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-eec29cbff034818f4fb5ec1e6ad38e1010d7389457b3c97e9b238a3a0291a54e.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n leaf_aggregation_witness_jobs_fri (\n l1_batch_number,\n circuit_id,\n status,\n number_of_basic_circuits,\n created_at,\n updated_at\n )\n VALUES\n ($1, $2, 'waiting_for_proofs', 2, NOW(), NOW())\n ON CONFLICT (l1_batch_number, circuit_id) DO\n UPDATE\n SET\n status = $3\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8", - "Int2", - "Text" - ] - }, - "nullable": [] - }, - "hash": "eec29cbff034818f4fb5ec1e6ad38e1010d7389457b3c97e9b238a3a0291a54e" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-eef1b56e87eff63fcf6ffb98791583a7526ae38ceb4bf80543cfd3fb60492fb9.json b/prover/crates/lib/prover_dal/.sqlx/query-eef1b56e87eff63fcf6ffb98791583a7526ae38ceb4bf80543cfd3fb60492fb9.json deleted file mode 100644 index fe481b4e54db..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-eef1b56e87eff63fcf6ffb98791583a7526ae38ceb4bf80543cfd3fb60492fb9.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n recursion_tip_witness_jobs_fri (\n l1_batch_number,\n status,\n number_of_final_node_jobs,\n protocol_version,\n created_at,\n updated_at,\n protocol_version_patch\n )\n VALUES\n ($1, 'waiting_for_proofs', $2, $3, NOW(), NOW(), $4)\n ON CONFLICT (l1_batch_number) DO\n UPDATE\n SET\n updated_at = NOW()\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8", - "Int4", - "Int4", - "Int4" - ] - }, - "nullable": [] - }, - "hash": "eef1b56e87eff63fcf6ffb98791583a7526ae38ceb4bf80543cfd3fb60492fb9" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-f05ea1f0ee0be1ac50c35f5dbf4bcaf4e7f673e9d9827427aa4bbedb3cae8b8f.json b/prover/crates/lib/prover_dal/.sqlx/query-f05ea1f0ee0be1ac50c35f5dbf4bcaf4e7f673e9d9827427aa4bbedb3cae8b8f.json new file mode 100644 index 000000000000..d47714f95752 --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-f05ea1f0ee0be1ac50c35f5dbf4bcaf4e7f673e9d9827427aa4bbedb3cae8b8f.json @@ -0,0 +1,15 @@ +{ + "db_name": "PostgreSQL", + "query": "\n INSERT INTO\n recursion_tip_witness_jobs_fri (\n l1_batch_number, status, number_of_final_node_jobs, created_at, updated_at\n )\n VALUES\n ($1, 'waiting_for_proofs', 1, NOW(), NOW())\n ON CONFLICT (l1_batch_number) DO\n UPDATE\n SET\n status = $2\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8", + "Text" + ] + }, + "nullable": [] + }, + "hash": "f05ea1f0ee0be1ac50c35f5dbf4bcaf4e7f673e9d9827427aa4bbedb3cae8b8f" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-f294a1c32ffb957c901dcdfa942ea8e04c2c28771aa50a9e3ebb95c5e428be0e.json b/prover/crates/lib/prover_dal/.sqlx/query-f294a1c32ffb957c901dcdfa942ea8e04c2c28771aa50a9e3ebb95c5e428be0e.json new file mode 100644 index 000000000000..76008be6c339 --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-f294a1c32ffb957c901dcdfa942ea8e04c2c28771aa50a9e3ebb95c5e428be0e.json @@ -0,0 +1,19 @@ +{ + "db_name": "PostgreSQL", + "query": "\n INSERT INTO\n leaf_aggregation_witness_jobs_fri (\n l1_batch_number,\n circuit_id,\n closed_form_inputs_blob_url,\n number_of_basic_circuits,\n protocol_version,\n status,\n created_at,\n updated_at,\n protocol_version_patch\n )\n VALUES\n ($1, $2, $3, $4, $5, 'waiting_for_proofs', NOW(), NOW(), $6)\n ON CONFLICT (l1_batch_number, circuit_id) DO\n UPDATE\n SET\n updated_at = NOW()\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8", + "Int2", + "Text", + "Int4", + "Int4", + "Int4" + ] + }, + "nullable": [] + }, + "hash": "f294a1c32ffb957c901dcdfa942ea8e04c2c28771aa50a9e3ebb95c5e428be0e" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-8357972a21b39644e4cbe4bedc3b6d9065bf4494daf8f7632ab2bfe055773f7b.json b/prover/crates/lib/prover_dal/.sqlx/query-f2ed1acf57927528cf978ad759ac92d6496147f6425c2485fc8a8f2739e65f80.json similarity index 81% rename from prover/crates/lib/prover_dal/.sqlx/query-8357972a21b39644e4cbe4bedc3b6d9065bf4494daf8f7632ab2bfe055773f7b.json rename to prover/crates/lib/prover_dal/.sqlx/query-f2ed1acf57927528cf978ad759ac92d6496147f6425c2485fc8a8f2739e65f80.json index 54fba3bbeac0..a261f190acfb 100644 --- a/prover/crates/lib/prover_dal/.sqlx/query-8357972a21b39644e4cbe4bedc3b6d9065bf4494daf8f7632ab2bfe055773f7b.json +++ b/prover/crates/lib/prover_dal/.sqlx/query-f2ed1acf57927528cf978ad759ac92d6496147f6425c2485fc8a8f2739e65f80.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n UPDATE recursion_tip_witness_jobs_fri\n SET\n status = 'queued',\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n (\n status = 'in_progress'\n AND processing_started_at <= NOW() - $1::INTERVAL\n AND attempts < $2\n )\n OR (\n status = 'failed'\n AND attempts < $2\n )\n RETURNING\n l1_batch_number,\n status,\n attempts,\n error,\n picked_by\n ", + "query": "\n UPDATE recursion_tip_witness_jobs_fri\n SET\n status = 'queued',\n updated_at = NOW(),\n processing_started_at = NOW()\n WHERE\n (\n status = 'in_progress'\n AND processing_started_at <= NOW() - $1::INTERVAL\n AND attempts < $2\n )\n OR (\n status = 'failed'\n AND attempts < $2\n )\n RETURNING\n l1_batch_number,\n status,\n attempts,\n error,\n picked_by\n ", "describe": { "columns": [ { @@ -43,5 +43,5 @@ true ] }, - "hash": "8357972a21b39644e4cbe4bedc3b6d9065bf4494daf8f7632ab2bfe055773f7b" + "hash": "f2ed1acf57927528cf978ad759ac92d6496147f6425c2485fc8a8f2739e65f80" } diff --git a/prover/crates/lib/prover_dal/.sqlx/query-f3280a144a9aea48dae9b2914f0bf0344b237bf1914657d36f44b9d21ae966a6.json b/prover/crates/lib/prover_dal/.sqlx/query-f3280a144a9aea48dae9b2914f0bf0344b237bf1914657d36f44b9d21ae966a6.json new file mode 100644 index 000000000000..1a5c178a9007 --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-f3280a144a9aea48dae9b2914f0bf0344b237bf1914657d36f44b9d21ae966a6.json @@ -0,0 +1,16 @@ +{ + "db_name": "PostgreSQL", + "query": "\n INSERT INTO\n leaf_aggregation_witness_jobs_fri (\n l1_batch_number,\n circuit_id,\n status,\n number_of_basic_circuits,\n created_at,\n updated_at\n )\n VALUES\n ($1, $2, 'waiting_for_proofs', 2, NOW(), NOW())\n ON CONFLICT (l1_batch_number, circuit_id) DO\n UPDATE\n SET\n status = $3\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int8", + "Int2", + "Text" + ] + }, + "nullable": [] + }, + "hash": "f3280a144a9aea48dae9b2914f0bf0344b237bf1914657d36f44b9d21ae966a6" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-f68afde603675b0853547c61a74cbb33d511e07d80a5acd79bc559abdbda49bc.json b/prover/crates/lib/prover_dal/.sqlx/query-f68afde603675b0853547c61a74cbb33d511e07d80a5acd79bc559abdbda49bc.json new file mode 100644 index 000000000000..3820754145db --- /dev/null +++ b/prover/crates/lib/prover_dal/.sqlx/query-f68afde603675b0853547c61a74cbb33d511e07d80a5acd79bc559abdbda49bc.json @@ -0,0 +1,16 @@ +{ + "db_name": "PostgreSQL", + "query": "\n INSERT INTO\n prover_fri_protocol_versions (\n id, snark_wrapper_vk_hash, created_at, protocol_version_patch\n )\n VALUES\n ($1, $2, NOW(), $3)\n ON CONFLICT (id, protocol_version_patch) DO NOTHING\n ", + "describe": { + "columns": [], + "parameters": { + "Left": [ + "Int4", + "Bytea", + "Int4" + ] + }, + "nullable": [] + }, + "hash": "f68afde603675b0853547c61a74cbb33d511e07d80a5acd79bc559abdbda49bc" +} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-0b70c98c2edd8370ad09ac553c18dbc21cccb9a95e3db1c93da239845a5e9036.json b/prover/crates/lib/prover_dal/.sqlx/query-f70306e92c2a2d69e0e75eb0cf614f3cc4f9c96c2a51a157b83fff9b411beeb9.json similarity index 80% rename from prover/crates/lib/prover_dal/.sqlx/query-0b70c98c2edd8370ad09ac553c18dbc21cccb9a95e3db1c93da239845a5e9036.json rename to prover/crates/lib/prover_dal/.sqlx/query-f70306e92c2a2d69e0e75eb0cf614f3cc4f9c96c2a51a157b83fff9b411beeb9.json index 8b49fa11e63b..344068b04e91 100644 --- a/prover/crates/lib/prover_dal/.sqlx/query-0b70c98c2edd8370ad09ac553c18dbc21cccb9a95e3db1c93da239845a5e9036.json +++ b/prover/crates/lib/prover_dal/.sqlx/query-f70306e92c2a2d69e0e75eb0cf614f3cc4f9c96c2a51a157b83fff9b411beeb9.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n UPDATE proof_compression_jobs_fri\n SET\n status = $1,\n attempts = attempts + 1,\n updated_at = NOW(),\n processing_started_at = NOW(),\n picked_by = $3\n WHERE\n l1_batch_number = (\n SELECT\n l1_batch_number\n FROM\n proof_compression_jobs_fri\n WHERE\n status = $2\n AND protocol_version = $4\n AND protocol_version_patch = $5\n ORDER BY\n l1_batch_number ASC\n LIMIT\n 1\n FOR UPDATE\n SKIP LOCKED\n )\n RETURNING\n proof_compression_jobs_fri.l1_batch_number\n ", + "query": "\n UPDATE proof_compression_jobs_fri\n SET\n status = $1,\n attempts = attempts + 1,\n updated_at = NOW(),\n processing_started_at = NOW(),\n picked_by = $3\n WHERE\n l1_batch_number = (\n SELECT\n l1_batch_number\n FROM\n proof_compression_jobs_fri\n WHERE\n status = $2\n AND protocol_version = $4\n AND protocol_version_patch = $5\n ORDER BY\n l1_batch_number ASC\n LIMIT\n 1\n FOR UPDATE\n SKIP LOCKED\n )\n RETURNING\n proof_compression_jobs_fri.l1_batch_number\n ", "describe": { "columns": [ { @@ -22,5 +22,5 @@ false ] }, - "hash": "0b70c98c2edd8370ad09ac553c18dbc21cccb9a95e3db1c93da239845a5e9036" + "hash": "f70306e92c2a2d69e0e75eb0cf614f3cc4f9c96c2a51a157b83fff9b411beeb9" } diff --git a/prover/crates/lib/prover_dal/.sqlx/query-f99c34313e2717ec74b4f274e33dae905acac53b46eeaeb059d23e48a71df3b4.json b/prover/crates/lib/prover_dal/.sqlx/query-f99c34313e2717ec74b4f274e33dae905acac53b46eeaeb059d23e48a71df3b4.json deleted file mode 100644 index c0c2637fe5ae..000000000000 --- a/prover/crates/lib/prover_dal/.sqlx/query-f99c34313e2717ec74b4f274e33dae905acac53b46eeaeb059d23e48a71df3b4.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "db_name": "PostgreSQL", - "query": "\n INSERT INTO\n prover_jobs_fri (\n l1_batch_number,\n circuit_id,\n circuit_blob_url,\n aggregation_round,\n sequence_number,\n depth,\n is_node_final_proof,\n protocol_version,\n status,\n created_at,\n updated_at,\n protocol_version_patch\n )\n VALUES\n ($1, $2, $3, $4, $5, $6, $7, $8, 'queued', NOW(), NOW(), $9)\n ON CONFLICT (l1_batch_number, aggregation_round, circuit_id, depth, sequence_number) DO\n UPDATE\n SET\n updated_at = NOW()\n ", - "describe": { - "columns": [], - "parameters": { - "Left": [ - "Int8", - "Int2", - "Text", - "Int2", - "Int4", - "Int4", - "Bool", - "Int4", - "Int4" - ] - }, - "nullable": [] - }, - "hash": "f99c34313e2717ec74b4f274e33dae905acac53b46eeaeb059d23e48a71df3b4" -} diff --git a/prover/crates/lib/prover_dal/.sqlx/query-28f03acf565c4b50fe86f606c18a8b699386b3c5b4e02d5ce046f0f2e0ddc388.json b/prover/crates/lib/prover_dal/.sqlx/query-fd29394931eed5b99d2fb4fac907218d106d5852fa6f65aca22e12b3a4b7f9c2.json similarity index 92% rename from prover/crates/lib/prover_dal/.sqlx/query-28f03acf565c4b50fe86f606c18a8b699386b3c5b4e02d5ce046f0f2e0ddc388.json rename to prover/crates/lib/prover_dal/.sqlx/query-fd29394931eed5b99d2fb4fac907218d106d5852fa6f65aca22e12b3a4b7f9c2.json index 89e159989ae6..b3e3d945b327 100644 --- a/prover/crates/lib/prover_dal/.sqlx/query-28f03acf565c4b50fe86f606c18a8b699386b3c5b4e02d5ce046f0f2e0ddc388.json +++ b/prover/crates/lib/prover_dal/.sqlx/query-fd29394931eed5b99d2fb4fac907218d106d5852fa6f65aca22e12b3a4b7f9c2.json @@ -1,6 +1,6 @@ { "db_name": "PostgreSQL", - "query": "\n UPDATE scheduler_witness_jobs_fri\n SET\n status = 'in_progress',\n attempts = attempts + 1,\n updated_at = NOW(),\n processing_started_at = NOW(),\n picked_by = $2\n WHERE\n l1_batch_number = (\n SELECT\n l1_batch_number\n FROM\n scheduler_witness_jobs_fri\n WHERE\n status = 'queued'\n AND protocol_version = $1\n AND protocol_version_patch = $3\n ORDER BY\n l1_batch_number ASC\n LIMIT\n 1\n FOR UPDATE\n SKIP LOCKED\n )\n RETURNING\n scheduler_witness_jobs_fri.*\n ", + "query": "\n UPDATE scheduler_witness_jobs_fri\n SET\n status = 'in_progress',\n attempts = attempts + 1,\n updated_at = NOW(),\n processing_started_at = NOW(),\n picked_by = $2\n WHERE\n l1_batch_number = (\n SELECT\n l1_batch_number\n FROM\n scheduler_witness_jobs_fri\n WHERE\n status = 'queued'\n AND protocol_version = $1\n AND protocol_version_patch = $3\n ORDER BY\n l1_batch_number ASC\n LIMIT\n 1\n FOR UPDATE\n SKIP LOCKED\n )\n RETURNING\n scheduler_witness_jobs_fri.*\n ", "describe": { "columns": [ { @@ -86,5 +86,5 @@ false ] }, - "hash": "28f03acf565c4b50fe86f606c18a8b699386b3c5b4e02d5ce046f0f2e0ddc388" + "hash": "fd29394931eed5b99d2fb4fac907218d106d5852fa6f65aca22e12b3a4b7f9c2" } diff --git a/prover/crates/lib/prover_dal/src/cli_test_dal.rs b/prover/crates/lib/prover_dal/src/cli_test_dal.rs index d08418203378..850e92b41366 100644 --- a/prover/crates/lib/prover_dal/src/cli_test_dal.rs +++ b/prover/crates/lib/prover_dal/src/cli_test_dal.rs @@ -51,20 +51,20 @@ impl CliTestDal<'_, '_> { sqlx::query!( r#" INSERT INTO - leaf_aggregation_witness_jobs_fri ( - l1_batch_number, - circuit_id, - status, - number_of_basic_circuits, - created_at, - updated_at - ) + leaf_aggregation_witness_jobs_fri ( + l1_batch_number, + circuit_id, + status, + number_of_basic_circuits, + created_at, + updated_at + ) VALUES - ($1, $2, 'waiting_for_proofs', 2, NOW(), NOW()) + ($1, $2, 'waiting_for_proofs', 2, NOW(), NOW()) ON CONFLICT (l1_batch_number, circuit_id) DO UPDATE SET - status = $3 + status = $3 "#, batch_number.0 as i64, circuit_id as i16, @@ -84,13 +84,15 @@ impl CliTestDal<'_, '_> { sqlx::query!( r#" INSERT INTO - node_aggregation_witness_jobs_fri (l1_batch_number, circuit_id, status, created_at, updated_at) + node_aggregation_witness_jobs_fri ( + l1_batch_number, circuit_id, status, created_at, updated_at + ) VALUES - ($1, $2, 'waiting_for_proofs', NOW(), NOW()) + ($1, $2, 'waiting_for_proofs', NOW(), NOW()) ON CONFLICT (l1_batch_number, circuit_id, depth) DO UPDATE SET - status = $3 + status = $3 "#, batch_number.0 as i64, circuit_id as i16, @@ -105,13 +107,15 @@ impl CliTestDal<'_, '_> { sqlx::query!( r#" INSERT INTO - recursion_tip_witness_jobs_fri (l1_batch_number, status, number_of_final_node_jobs, created_at, updated_at) + recursion_tip_witness_jobs_fri ( + l1_batch_number, status, number_of_final_node_jobs, created_at, updated_at + ) VALUES - ($1, 'waiting_for_proofs', 1, NOW(), NOW()) + ($1, 'waiting_for_proofs', 1, NOW(), NOW()) ON CONFLICT (l1_batch_number) DO UPDATE SET - status = $2 + status = $2 "#, batch_number.0 as i64, status.to_string(), @@ -129,19 +133,19 @@ impl CliTestDal<'_, '_> { sqlx::query!( r#" INSERT INTO - scheduler_witness_jobs_fri ( - l1_batch_number, - scheduler_partial_input_blob_url, - status, - created_at, - updated_at - ) + scheduler_witness_jobs_fri ( + l1_batch_number, + scheduler_partial_input_blob_url, + status, + created_at, + updated_at + ) VALUES - ($1, '', 'waiting_for_proofs', NOW(), NOW()) + ($1, '', 'waiting_for_proofs', NOW(), NOW()) ON CONFLICT (l1_batch_number) DO UPDATE SET - status = $2 + status = $2 "#, batch_number.0 as i64, status.to_string(), @@ -159,13 +163,13 @@ impl CliTestDal<'_, '_> { sqlx::query!( r#" INSERT INTO - proof_compression_jobs_fri (l1_batch_number, status, created_at, updated_at) + proof_compression_jobs_fri (l1_batch_number, status, created_at, updated_at) VALUES - ($1, $2, NOW(), NOW()) + ($1, $2, NOW(), NOW()) ON CONFLICT (l1_batch_number) DO UPDATE SET - status = $2 + status = $2 "#, batch_number.0 as i64, status.to_string(), diff --git a/prover/crates/lib/prover_dal/src/fri_gpu_prover_queue_dal.rs b/prover/crates/lib/prover_dal/src/fri_gpu_prover_queue_dal.rs index aa4810ad2f6f..63ae446d472c 100644 --- a/prover/crates/lib/prover_dal/src/fri_gpu_prover_queue_dal.rs +++ b/prover/crates/lib/prover_dal/src/fri_gpu_prover_queue_dal.rs @@ -52,10 +52,10 @@ impl FriGpuProverQueueDal<'_, '_> { LIMIT 1 FOR UPDATE - SKIP LOCKED + SKIP LOCKED ) RETURNING - gpu_prover_queue_fri.* + gpu_prover_queue_fri.* "#, &processing_timeout, i16::from(specialized_prover_group_id), @@ -84,28 +84,28 @@ impl FriGpuProverQueueDal<'_, '_> { sqlx::query!( r#" INSERT INTO - gpu_prover_queue_fri ( - instance_host, - instance_port, - instance_status, - specialized_prover_group_id, - zone, - created_at, - updated_at, - protocol_version, - protocol_version_patch - ) + gpu_prover_queue_fri ( + instance_host, + instance_port, + instance_status, + specialized_prover_group_id, + zone, + created_at, + updated_at, + protocol_version, + protocol_version_patch + ) VALUES - (CAST($1::TEXT AS inet), $2, 'available', $3, $4, NOW(), NOW(), $5, $6) + (CAST($1::TEXT AS INET), $2, 'available', $3, $4, NOW(), NOW(), $5, $6) ON CONFLICT (instance_host, instance_port, zone) DO UPDATE SET - instance_status = 'available', - specialized_prover_group_id = $3, - zone = $4, - updated_at = NOW(), - protocol_version = $5, - protocol_version_patch = $6 + instance_status = 'available', + specialized_prover_group_id = $3, + zone = $4, + updated_at = NOW(), + protocol_version = $5, + protocol_version_patch = $6 "#, address.host.to_string(), i32::from(address.port), @@ -132,7 +132,7 @@ impl FriGpuProverQueueDal<'_, '_> { instance_status = $1, updated_at = NOW() WHERE - instance_host = $2::TEXT::inet + instance_host = $2::TEXT::INET AND instance_port = $3 AND zone = $4 "#, @@ -158,7 +158,7 @@ impl FriGpuProverQueueDal<'_, '_> { instance_status = 'available', updated_at = NOW() WHERE - instance_host = $1::TEXT::inet + instance_host = $1::TEXT::INET AND instance_port = $2 AND instance_status = 'full' AND zone = $3 @@ -184,7 +184,7 @@ impl FriGpuProverQueueDal<'_, '_> { FROM gpu_prover_queue_fri WHERE - instance_host = $1::TEXT::inet + instance_host = $1::TEXT::INET AND instance_port = $2 AND zone = $3 "#, diff --git a/prover/crates/lib/prover_dal/src/fri_proof_compressor_dal.rs b/prover/crates/lib/prover_dal/src/fri_proof_compressor_dal.rs index 31b121e51e42..205dbc784c41 100644 --- a/prover/crates/lib/prover_dal/src/fri_proof_compressor_dal.rs +++ b/prover/crates/lib/prover_dal/src/fri_proof_compressor_dal.rs @@ -27,17 +27,17 @@ impl FriProofCompressorDal<'_, '_> { sqlx::query!( r#" INSERT INTO - proof_compression_jobs_fri ( - l1_batch_number, - fri_proof_blob_url, - status, - created_at, - updated_at, - protocol_version, - protocol_version_patch - ) + proof_compression_jobs_fri ( + l1_batch_number, + fri_proof_blob_url, + status, + created_at, + updated_at, + protocol_version, + protocol_version_patch + ) VALUES - ($1, $2, $3, NOW(), NOW(), $4, $5) + ($1, $2, $3, NOW(), NOW(), $4, $5) ON CONFLICT (l1_batch_number) DO NOTHING "#, i64::from(block_number.0), @@ -80,10 +80,10 @@ impl FriProofCompressorDal<'_, '_> { LIMIT 1 FOR UPDATE - SKIP LOCKED + SKIP LOCKED ) RETURNING - proof_compression_jobs_fri.l1_batch_number + proof_compression_jobs_fri.l1_batch_number "#, ProofCompressionJobStatus::InProgress.to_string(), ProofCompressionJobStatus::Queued.to_string(), @@ -246,11 +246,11 @@ impl FriProofCompressorDal<'_, '_> { protocol_version_patch, COUNT(*) FILTER ( WHERE - status = 'queued' + status = 'queued' ) AS queued, COUNT(*) FILTER ( WHERE - status = 'in_progress' + status = 'in_progress' ) AS in_progress FROM proof_compression_jobs_fri @@ -328,11 +328,11 @@ impl FriProofCompressorDal<'_, '_> { AND attempts < $2 ) RETURNING - l1_batch_number, - status, - attempts, - error, - picked_by + l1_batch_number, + status, + attempts, + error, + picked_by "#, &processing_timeout, max_attempts as i32, @@ -435,10 +435,10 @@ impl FriProofCompressorDal<'_, '_> { OR status = 'failed' ) RETURNING - status, - attempts, - error, - picked_by + status, + attempts, + error, + picked_by "#, i64::from(block_number.0), max_attempts as i32, diff --git a/prover/crates/lib/prover_dal/src/fri_protocol_versions_dal.rs b/prover/crates/lib/prover_dal/src/fri_protocol_versions_dal.rs index 8c1c497eeded..7128344e5b34 100644 --- a/prover/crates/lib/prover_dal/src/fri_protocol_versions_dal.rs +++ b/prover/crates/lib/prover_dal/src/fri_protocol_versions_dal.rs @@ -20,9 +20,11 @@ impl FriProtocolVersionsDal<'_, '_> { sqlx::query!( r#" INSERT INTO - prover_fri_protocol_versions (id, snark_wrapper_vk_hash, created_at, protocol_version_patch) + prover_fri_protocol_versions ( + id, snark_wrapper_vk_hash, created_at, protocol_version_patch + ) VALUES - ($1, $2, NOW(), $3) + ($1, $2, NOW(), $3) ON CONFLICT (id, protocol_version_patch) DO NOTHING "#, id.minor as i32, diff --git a/prover/crates/lib/prover_dal/src/fri_prover_dal.rs b/prover/crates/lib/prover_dal/src/fri_prover_dal.rs index 71d0c11728b1..a0420b056125 100644 --- a/prover/crates/lib/prover_dal/src/fri_prover_dal.rs +++ b/prover/crates/lib/prover_dal/src/fri_prover_dal.rs @@ -93,16 +93,16 @@ impl FriProverDal<'_, '_> { LIMIT 1 FOR UPDATE - SKIP LOCKED + SKIP LOCKED ) RETURNING - prover_jobs_fri.id, - prover_jobs_fri.l1_batch_number, - prover_jobs_fri.circuit_id, - prover_jobs_fri.aggregation_round, - prover_jobs_fri.sequence_number, - prover_jobs_fri.depth, - prover_jobs_fri.is_node_final_proof + prover_jobs_fri.id, + prover_jobs_fri.l1_batch_number, + prover_jobs_fri.circuit_id, + prover_jobs_fri.aggregation_round, + prover_jobs_fri.sequence_number, + prover_jobs_fri.depth, + prover_jobs_fri.is_node_final_proof "#, protocol_version.minor as i32, protocol_version.patch.0 as i32, @@ -154,16 +154,16 @@ impl FriProverDal<'_, '_> { LIMIT 1 FOR UPDATE - SKIP LOCKED + SKIP LOCKED ) RETURNING - prover_jobs_fri.id, - prover_jobs_fri.l1_batch_number, - prover_jobs_fri.circuit_id, - prover_jobs_fri.aggregation_round, - prover_jobs_fri.sequence_number, - prover_jobs_fri.depth, - prover_jobs_fri.is_node_final_proof + prover_jobs_fri.id, + prover_jobs_fri.l1_batch_number, + prover_jobs_fri.circuit_id, + prover_jobs_fri.aggregation_round, + prover_jobs_fri.sequence_number, + prover_jobs_fri.depth, + prover_jobs_fri.is_node_final_proof "#, protocol_version.minor as i32, protocol_version.patch.0 as i32, @@ -216,25 +216,25 @@ impl FriProverDal<'_, '_> { SELECT * FROM - UNNEST($1::SMALLINT[], $2::SMALLINT[]) - ) AS tuple (circuit_id, ROUND) - JOIN LATERAL ( - SELECT - * - FROM - prover_jobs_fri AS pj - WHERE - pj.status = 'queued' - AND pj.protocol_version = $3 - AND pj.protocol_version_patch = $4 - AND pj.circuit_id = tuple.circuit_id - AND pj.aggregation_round = tuple.round - ORDER BY - pj.l1_batch_number ASC, - pj.id ASC - LIMIT - 1 - ) AS pj ON TRUE + UNNEST($1::SMALLINT [], $2::SMALLINT []) + ) AS tuple (circuit_id, round) + JOIN LATERAL ( + SELECT + * + FROM + prover_jobs_fri AS pj + WHERE + pj.status = 'queued' + AND pj.protocol_version = $3 + AND pj.protocol_version_patch = $4 + AND pj.circuit_id = tuple.circuit_id + AND pj.aggregation_round = tuple.round + ORDER BY + pj.l1_batch_number ASC, + pj.id ASC + LIMIT + 1 + ) AS pj ON TRUE ORDER BY pj.l1_batch_number ASC, pj.aggregation_round DESC, @@ -242,16 +242,16 @@ impl FriProverDal<'_, '_> { LIMIT 1 FOR UPDATE - SKIP LOCKED + SKIP LOCKED ) RETURNING - prover_jobs_fri.id, - prover_jobs_fri.l1_batch_number, - prover_jobs_fri.circuit_id, - prover_jobs_fri.aggregation_round, - prover_jobs_fri.sequence_number, - prover_jobs_fri.depth, - prover_jobs_fri.is_node_final_proof + prover_jobs_fri.id, + prover_jobs_fri.l1_batch_number, + prover_jobs_fri.circuit_id, + prover_jobs_fri.aggregation_round, + prover_jobs_fri.sequence_number, + prover_jobs_fri.depth, + prover_jobs_fri.is_node_final_proof "#, &circuit_ids[..], &aggregation_rounds[..], @@ -332,13 +332,13 @@ impl FriProverDal<'_, '_> { WHERE id = $3 RETURNING - prover_jobs_fri.id, - prover_jobs_fri.l1_batch_number, - prover_jobs_fri.circuit_id, - prover_jobs_fri.aggregation_round, - prover_jobs_fri.sequence_number, - prover_jobs_fri.depth, - prover_jobs_fri.is_node_final_proof + prover_jobs_fri.id, + prover_jobs_fri.l1_batch_number, + prover_jobs_fri.circuit_id, + prover_jobs_fri.aggregation_round, + prover_jobs_fri.sequence_number, + prover_jobs_fri.depth, + prover_jobs_fri.is_node_final_proof "#, duration_to_naive_time(time_taken), blob_url, @@ -394,15 +394,15 @@ impl FriProverDal<'_, '_> { AND attempts < $2 ) FOR UPDATE - SKIP LOCKED + SKIP LOCKED ) RETURNING - id, - status, - attempts, - circuit_id, - error, - picked_by + id, + status, + attempts, + circuit_id, + error, + picked_by "#, &processing_timeout, max_attempts as i32, @@ -438,26 +438,28 @@ impl FriProverDal<'_, '_> { sqlx::query!( r#" INSERT INTO - prover_jobs_fri ( - l1_batch_number, - circuit_id, - circuit_blob_url, - aggregation_round, - sequence_number, - depth, - is_node_final_proof, - protocol_version, - status, - created_at, - updated_at, - protocol_version_patch - ) + prover_jobs_fri ( + l1_batch_number, + circuit_id, + circuit_blob_url, + aggregation_round, + sequence_number, + depth, + is_node_final_proof, + protocol_version, + status, + created_at, + updated_at, + protocol_version_patch + ) VALUES - ($1, $2, $3, $4, $5, $6, $7, $8, 'queued', NOW(), NOW(), $9) - ON CONFLICT (l1_batch_number, aggregation_round, circuit_id, depth, sequence_number) DO + ($1, $2, $3, $4, $5, $6, $7, $8, 'queued', NOW(), NOW(), $9) + ON CONFLICT ( + l1_batch_number, aggregation_round, circuit_id, depth, sequence_number + ) DO UPDATE SET - updated_at = NOW() + updated_at = NOW() "#, i64::from(l1_batch_number.0), i16::from(circuit_id), @@ -530,11 +532,11 @@ impl FriProverDal<'_, '_> { protocol_version_patch AS "protocol_version_patch!", COUNT(*) FILTER ( WHERE - status = 'queued' + status = 'queued' ) AS queued, COUNT(*) FILTER ( WHERE - status = 'in_progress' + status = 'in_progress' ) AS in_progress FROM prover_jobs_fri @@ -828,12 +830,12 @@ impl FriProverDal<'_, '_> { OR status = 'failed' ) RETURNING - id, - status, - attempts, - circuit_id, - error, - picked_by + id, + status, + attempts, + circuit_id, + error, + picked_by "#, i64::from(block_number.0), max_attempts as i32, diff --git a/prover/crates/lib/prover_dal/src/fri_witness_generator_dal.rs b/prover/crates/lib/prover_dal/src/fri_witness_generator_dal.rs index 2040b444044e..cd96edc21b09 100644 --- a/prover/crates/lib/prover_dal/src/fri_witness_generator_dal.rs +++ b/prover/crates/lib/prover_dal/src/fri_witness_generator_dal.rs @@ -49,17 +49,17 @@ impl FriWitnessGeneratorDal<'_, '_> { sqlx::query!( r#" INSERT INTO - witness_inputs_fri ( - l1_batch_number, - witness_inputs_blob_url, - protocol_version, - status, - created_at, - updated_at, - protocol_version_patch - ) + witness_inputs_fri ( + l1_batch_number, + witness_inputs_blob_url, + protocol_version, + status, + created_at, + updated_at, + protocol_version_patch + ) VALUES - ($1, $2, $3, 'queued', NOW(), NOW(), $4) + ($1, $2, $3, 'queued', NOW(), NOW(), $4) ON CONFLICT (l1_batch_number) DO NOTHING "#, i64::from(block_number.0), @@ -103,10 +103,10 @@ impl FriWitnessGeneratorDal<'_, '_> { LIMIT 1 FOR UPDATE - SKIP LOCKED + SKIP LOCKED ) RETURNING - witness_inputs_fri.l1_batch_number + witness_inputs_fri.l1_batch_number "#, protocol_version.minor as i32, picked_by, @@ -207,11 +207,11 @@ impl FriWitnessGeneratorDal<'_, '_> { AND attempts < $2 ) RETURNING - l1_batch_number, - status, - attempts, - error, - picked_by + l1_batch_number, + status, + attempts, + error, + picked_by "#, &processing_timeout, max_attempts as i32, @@ -256,23 +256,23 @@ impl FriWitnessGeneratorDal<'_, '_> { sqlx::query!( r#" INSERT INTO - leaf_aggregation_witness_jobs_fri ( - l1_batch_number, - circuit_id, - closed_form_inputs_blob_url, - number_of_basic_circuits, - protocol_version, - status, - created_at, - updated_at, - protocol_version_patch - ) + leaf_aggregation_witness_jobs_fri ( + l1_batch_number, + circuit_id, + closed_form_inputs_blob_url, + number_of_basic_circuits, + protocol_version, + status, + created_at, + updated_at, + protocol_version_patch + ) VALUES - ($1, $2, $3, $4, $5, 'waiting_for_proofs', NOW(), NOW(), $6) + ($1, $2, $3, $4, $5, 'waiting_for_proofs', NOW(), NOW(), $6) ON CONFLICT (l1_batch_number, circuit_id) DO UPDATE SET - updated_at = NOW() + updated_at = NOW() "#, i64::from(block_number.0), i16::from(*circuit_id), @@ -299,21 +299,21 @@ impl FriWitnessGeneratorDal<'_, '_> { sqlx::query!( r#" INSERT INTO - recursion_tip_witness_jobs_fri ( - l1_batch_number, - status, - number_of_final_node_jobs, - protocol_version, - created_at, - updated_at, - protocol_version_patch - ) + recursion_tip_witness_jobs_fri ( + l1_batch_number, + status, + number_of_final_node_jobs, + protocol_version, + created_at, + updated_at, + protocol_version_patch + ) VALUES - ($1, 'waiting_for_proofs', $2, $3, NOW(), NOW(), $4) + ($1, 'waiting_for_proofs', $2, $3, NOW(), NOW(), $4) ON CONFLICT (l1_batch_number) DO UPDATE SET - updated_at = NOW() + updated_at = NOW() "#, block_number.0 as i64, closed_form_inputs_and_urls.len() as i32, @@ -327,21 +327,21 @@ impl FriWitnessGeneratorDal<'_, '_> { sqlx::query!( r#" INSERT INTO - scheduler_witness_jobs_fri ( - l1_batch_number, - scheduler_partial_input_blob_url, - protocol_version, - status, - created_at, - updated_at, - protocol_version_patch - ) + scheduler_witness_jobs_fri ( + l1_batch_number, + scheduler_partial_input_blob_url, + protocol_version, + status, + created_at, + updated_at, + protocol_version_patch + ) VALUES - ($1, $2, $3, 'waiting_for_proofs', NOW(), NOW(), $4) + ($1, $2, $3, 'waiting_for_proofs', NOW(), NOW(), $4) ON CONFLICT (l1_batch_number) DO UPDATE SET - updated_at = NOW() + updated_at = NOW() "#, i64::from(block_number.0), scheduler_partial_input_blob_url, @@ -386,10 +386,10 @@ impl FriWitnessGeneratorDal<'_, '_> { LIMIT 1 FOR UPDATE - SKIP LOCKED + SKIP LOCKED ) RETURNING - leaf_aggregation_witness_jobs_fri.* + leaf_aggregation_witness_jobs_fri.* "#, protocol_version.minor as i32, protocol_version.patch.0 as i32, @@ -464,8 +464,10 @@ impl FriWitnessGeneratorDal<'_, '_> { prover_jobs_fri.circuit_id FROM prover_jobs_fri - JOIN leaf_aggregation_witness_jobs_fri lawj ON prover_jobs_fri.l1_batch_number = lawj.l1_batch_number - AND prover_jobs_fri.circuit_id = lawj.circuit_id + JOIN leaf_aggregation_witness_jobs_fri lawj + ON + prover_jobs_fri.l1_batch_number = lawj.l1_batch_number + AND prover_jobs_fri.circuit_id = lawj.circuit_id WHERE lawj.status = 'waiting_for_proofs' AND prover_jobs_fri.status = 'successful' @@ -478,8 +480,8 @@ impl FriWitnessGeneratorDal<'_, '_> { COUNT(*) = lawj.number_of_basic_circuits ) RETURNING - l1_batch_number, - circuit_id; + l1_batch_number, + circuit_id; "#, ) .fetch_all(self.storage.conn()) @@ -552,10 +554,10 @@ impl FriWitnessGeneratorDal<'_, '_> { LIMIT 1 FOR UPDATE - SKIP LOCKED + SKIP LOCKED ) RETURNING - node_aggregation_witness_jobs_fri.* + node_aggregation_witness_jobs_fri.* "#, protocol_version.minor as i32, protocol_version.patch.0 as i32, @@ -617,24 +619,24 @@ impl FriWitnessGeneratorDal<'_, '_> { sqlx::query!( r#" INSERT INTO - node_aggregation_witness_jobs_fri ( - l1_batch_number, - circuit_id, - depth, - aggregations_url, - number_of_dependent_jobs, - protocol_version, - status, - created_at, - updated_at, - protocol_version_patch - ) + node_aggregation_witness_jobs_fri ( + l1_batch_number, + circuit_id, + depth, + aggregations_url, + number_of_dependent_jobs, + protocol_version, + status, + created_at, + updated_at, + protocol_version_patch + ) VALUES - ($1, $2, $3, $4, $5, $6, 'waiting_for_proofs', NOW(), NOW(), $7) + ($1, $2, $3, $4, $5, $6, 'waiting_for_proofs', NOW(), NOW(), $7) ON CONFLICT (l1_batch_number, circuit_id, depth) DO UPDATE SET - updated_at = NOW() + updated_at = NOW() "#, i64::from(block_number.0), i16::from(circuit_id), @@ -663,9 +665,11 @@ impl FriWitnessGeneratorDal<'_, '_> { prover_jobs_fri.depth FROM prover_jobs_fri - JOIN node_aggregation_witness_jobs_fri nawj ON prover_jobs_fri.l1_batch_number = nawj.l1_batch_number - AND prover_jobs_fri.circuit_id = nawj.circuit_id - AND prover_jobs_fri.depth = nawj.depth + JOIN node_aggregation_witness_jobs_fri nawj + ON + prover_jobs_fri.l1_batch_number = nawj.l1_batch_number + AND prover_jobs_fri.circuit_id = nawj.circuit_id + AND prover_jobs_fri.depth = nawj.depth WHERE nawj.status = 'waiting_for_proofs' AND prover_jobs_fri.status = 'successful' @@ -680,9 +684,9 @@ impl FriWitnessGeneratorDal<'_, '_> { COUNT(*) = nawj.number_of_dependent_jobs ) RETURNING - l1_batch_number, - circuit_id, - depth; + l1_batch_number, + circuit_id, + depth; "#, ) .fetch_all(self.storage.conn()) @@ -707,9 +711,11 @@ impl FriWitnessGeneratorDal<'_, '_> { prover_jobs_fri.depth FROM prover_jobs_fri - JOIN node_aggregation_witness_jobs_fri nawj ON prover_jobs_fri.l1_batch_number = nawj.l1_batch_number - AND prover_jobs_fri.circuit_id = nawj.circuit_id - AND prover_jobs_fri.depth = nawj.depth + JOIN node_aggregation_witness_jobs_fri nawj + ON + prover_jobs_fri.l1_batch_number = nawj.l1_batch_number + AND prover_jobs_fri.circuit_id = nawj.circuit_id + AND prover_jobs_fri.depth = nawj.depth WHERE nawj.status = 'waiting_for_proofs' AND prover_jobs_fri.status = 'successful' @@ -723,9 +729,9 @@ impl FriWitnessGeneratorDal<'_, '_> { COUNT(*) = nawj.number_of_dependent_jobs ) RETURNING - l1_batch_number, - circuit_id, - depth; + l1_batch_number, + circuit_id, + depth; "#, ) .fetch_all(self.storage.conn()) @@ -748,7 +754,9 @@ impl FriWitnessGeneratorDal<'_, '_> { prover_jobs_fri.l1_batch_number FROM prover_jobs_fri - JOIN recursion_tip_witness_jobs_fri rtwj ON prover_jobs_fri.l1_batch_number = rtwj.l1_batch_number + JOIN + recursion_tip_witness_jobs_fri rtwj + ON prover_jobs_fri.l1_batch_number = rtwj.l1_batch_number WHERE rtwj.status = 'waiting_for_proofs' AND prover_jobs_fri.status = 'successful' @@ -761,7 +769,7 @@ impl FriWitnessGeneratorDal<'_, '_> { COUNT(*) = rtwj.number_of_final_node_jobs ) RETURNING - l1_batch_number; + l1_batch_number; "#, AggregationRound::NodeAggregation as i64, ) @@ -785,14 +793,16 @@ impl FriWitnessGeneratorDal<'_, '_> { prover_jobs_fri.l1_batch_number FROM prover_jobs_fri - JOIN scheduler_witness_jobs_fri swj ON prover_jobs_fri.l1_batch_number = swj.l1_batch_number + JOIN + scheduler_witness_jobs_fri swj + ON prover_jobs_fri.l1_batch_number = swj.l1_batch_number WHERE swj.status = 'waiting_for_proofs' AND prover_jobs_fri.status = 'successful' AND prover_jobs_fri.aggregation_round = $1 ) RETURNING - l1_batch_number; + l1_batch_number; "#, AggregationRound::RecursionTip as i64, ) @@ -828,12 +838,12 @@ impl FriWitnessGeneratorDal<'_, '_> { AND attempts < $2 ) RETURNING - id, - status, - attempts, - circuit_id, - error, - picked_by + id, + status, + attempts, + circuit_id, + error, + picked_by "#, &processing_timeout, max_attempts as i32, @@ -877,12 +887,12 @@ impl FriWitnessGeneratorDal<'_, '_> { AND attempts < $2 ) RETURNING - id, - status, - attempts, - circuit_id, - error, - picked_by + id, + status, + attempts, + circuit_id, + error, + picked_by "#, &processing_timeout, max_attempts as i32, @@ -926,11 +936,11 @@ impl FriWitnessGeneratorDal<'_, '_> { AND attempts < $2 ) RETURNING - l1_batch_number, - status, - attempts, - error, - picked_by + l1_batch_number, + status, + attempts, + error, + picked_by "#, &processing_timeout, max_attempts as i32, @@ -979,11 +989,11 @@ impl FriWitnessGeneratorDal<'_, '_> { LIMIT 1 FOR UPDATE - SKIP LOCKED + SKIP LOCKED ) RETURNING - recursion_tip_witness_jobs_fri.l1_batch_number, - recursion_tip_witness_jobs_fri.number_of_final_node_jobs + recursion_tip_witness_jobs_fri.l1_batch_number, + recursion_tip_witness_jobs_fri.number_of_final_node_jobs "#, protocol_version.minor as i32, protocol_version.patch.0 as i32, @@ -1042,11 +1052,11 @@ impl FriWitnessGeneratorDal<'_, '_> { AND attempts < $2 ) RETURNING - l1_batch_number, - status, - attempts, - error, - picked_by + l1_batch_number, + status, + attempts, + error, + picked_by "#, &processing_timeout, max_attempts as i32, @@ -1095,10 +1105,10 @@ impl FriWitnessGeneratorDal<'_, '_> { LIMIT 1 FOR UPDATE - SKIP LOCKED + SKIP LOCKED ) RETURNING - scheduler_witness_jobs_fri.* + scheduler_witness_jobs_fri.* "#, protocol_version.minor as i32, picked_by, @@ -1586,11 +1596,11 @@ impl FriWitnessGeneratorDal<'_, '_> { OR status = 'failed' ) RETURNING - l1_batch_number, - status, - attempts, - error, - picked_by + l1_batch_number, + status, + attempts, + error, + picked_by "#, i64::from(block_number.0), max_attempts as i64 @@ -1656,11 +1666,11 @@ impl FriWitnessGeneratorDal<'_, '_> { OR status = 'failed' ) RETURNING - l1_batch_number, - status, - attempts, - error, - picked_by + l1_batch_number, + status, + attempts, + error, + picked_by "#, i64::from(block_number.0), max_attempts as i64 @@ -1700,11 +1710,11 @@ impl FriWitnessGeneratorDal<'_, '_> { OR status = 'failed' ) RETURNING - l1_batch_number, - status, - attempts, - error, - picked_by + l1_batch_number, + status, + attempts, + error, + picked_by "#, i64::from(block_number.0), max_attempts as i64 @@ -1793,7 +1803,7 @@ impl FriWitnessGeneratorDal<'_, '_> { wit.created_at FROM proof_compression_jobs_fri AS comp - JOIN witness_inputs_fri AS wit ON comp.l1_batch_number = wit.l1_batch_number + JOIN witness_inputs_fri AS wit ON comp.l1_batch_number = wit.l1_batch_number WHERE wit.created_at > $1 ORDER BY diff --git a/zk_toolbox/crates/zk_supervisor/src/commands/sql_fmt.rs b/zk_toolbox/crates/zk_supervisor/src/commands/sql_fmt.rs index b2780b3e697a..0f8c9520a2c2 100644 --- a/zk_toolbox/crates/zk_supervisor/src/commands/sql_fmt.rs +++ b/zk_toolbox/crates/zk_supervisor/src/commands/sql_fmt.rs @@ -1,5 +1,8 @@ +use std::mem::take; + use anyhow::{bail, Context, Result}; use common::spinner::Spinner; +use sqruff_lib::{api::simple::get_simple_config, core::linter::core::Linter}; use xshell::Shell; use super::lint_utils::{get_unignored_files, IgnoredData, Target}; @@ -9,8 +12,24 @@ use crate::messages::{ MSG_FAILED_TO_FIND_START_OF_REGULAR_STRING_QUERY, MSG_RUNNING_SQL_FMT_SPINNER, }; +fn custom_fmt(query: &str) -> anyhow::Result { + let exclude_rules = vec!["LT12".to_string()]; // avoid adding newline before `$` character + let cfg = get_simple_config(Some("postgres".into()), None, Some(exclude_rules), None).unwrap(); + let mut linter = Linter::new(cfg, None, None); + let mut result = linter.lint_string_wrapped(query, None, true); + let formatted_query = take(&mut result.paths[0].files[0]).fix_string(); + // Remove first empty line + let formatted_query = formatted_query + .lines() + .skip(1) + .collect::>() + .join("\n"); + + Ok(formatted_query) +} + fn format_query(query: &str) -> anyhow::Result { - let formatted_query = sqruff_lib::api::simple::fix(query); + let formatted_query = custom_fmt(query)?; // Remove minimum indent from the formatted query let formatted_lines: Vec<&str> = formatted_query.lines().collect(); From fce4d77a4ad7f7ad84469ad8bb742bed4cafffdd Mon Sep 17 00:00:00 2001 From: matias-gonz Date: Mon, 30 Sep 2024 09:29:45 -0300 Subject: [PATCH 15/19] Remove regex dep --- zk_toolbox/Cargo.lock | 1 - zk_toolbox/crates/zk_supervisor/Cargo.toml | 1 - 2 files changed, 2 deletions(-) diff --git a/zk_toolbox/Cargo.lock b/zk_toolbox/Cargo.lock index 11526372c07d..3793008cf254 100644 --- a/zk_toolbox/Cargo.lock +++ b/zk_toolbox/Cargo.lock @@ -6670,7 +6670,6 @@ dependencies = [ "ethers", "futures", "human-panic", - "regex", "serde", "serde_json", "serde_yaml", diff --git a/zk_toolbox/crates/zk_supervisor/Cargo.toml b/zk_toolbox/crates/zk_supervisor/Cargo.toml index b40f9e18af20..158abe4e2ec6 100644 --- a/zk_toolbox/crates/zk_supervisor/Cargo.toml +++ b/zk_toolbox/crates/zk_supervisor/Cargo.toml @@ -29,5 +29,4 @@ futures.workspace = true types.workspace = true serde_yaml.workspace = true zksync_basic_types.workspace = true -regex = "1.10.6" sqruff-lib = { git = "https://github.com/quarylabs/sqruff", version = "0.18.2" } From 81e1950894d7782eb9eb0898cd41e38235703288 Mon Sep 17 00:00:00 2001 From: matias-gonz Date: Mon, 30 Sep 2024 09:34:41 -0300 Subject: [PATCH 16/19] Remove min_indent from formatting --- .../zk_supervisor/src/commands/sql_fmt.rs | 25 +------------------ 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/zk_toolbox/crates/zk_supervisor/src/commands/sql_fmt.rs b/zk_toolbox/crates/zk_supervisor/src/commands/sql_fmt.rs index 0f8c9520a2c2..753d2602bb69 100644 --- a/zk_toolbox/crates/zk_supervisor/src/commands/sql_fmt.rs +++ b/zk_toolbox/crates/zk_supervisor/src/commands/sql_fmt.rs @@ -12,7 +12,7 @@ use crate::messages::{ MSG_FAILED_TO_FIND_START_OF_REGULAR_STRING_QUERY, MSG_RUNNING_SQL_FMT_SPINNER, }; -fn custom_fmt(query: &str) -> anyhow::Result { +fn format_query(query: &str) -> anyhow::Result { let exclude_rules = vec!["LT12".to_string()]; // avoid adding newline before `$` character let cfg = get_simple_config(Some("postgres".into()), None, Some(exclude_rules), None).unwrap(); let mut linter = Linter::new(cfg, None, None); @@ -28,29 +28,6 @@ fn custom_fmt(query: &str) -> anyhow::Result { Ok(formatted_query) } -fn format_query(query: &str) -> anyhow::Result { - let formatted_query = custom_fmt(query)?; - - // Remove minimum indent from the formatted query - let formatted_lines: Vec<&str> = formatted_query.lines().collect(); - let min_indent = formatted_lines - .iter() - .filter_map(|line| line.find(|c: char| !c.is_whitespace())) - .min() - .unwrap_or(0); - - Ok(formatted_query - .lines() - .map(|line| { - if line.trim().is_empty() { - return "".to_string(); - } - line[min_indent..].to_string() - }) - .collect::>() - .join("\n")) -} - fn extract_query_from_rust_string(query: &str, is_raw: bool) -> String { let mut query = query.trim().to_string(); if query.ends_with(',') { From 1360ef14b8134b06d06a933e77c53959eba74403 Mon Sep 17 00:00:00 2001 From: matias-gonz Date: Mon, 30 Sep 2024 09:52:17 -0300 Subject: [PATCH 17/19] lint --- zk_toolbox/crates/common/src/db.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zk_toolbox/crates/common/src/db.rs b/zk_toolbox/crates/common/src/db.rs index eda5471170dd..bceeb000982d 100644 --- a/zk_toolbox/crates/common/src/db.rs +++ b/zk_toolbox/crates/common/src/db.rs @@ -126,7 +126,7 @@ pub async fn migrate_db( let text = if skip { "Skipped" } else { "Applied" }; if global_config().verbose { - logger::step(&format!( + logger::step(format!( " {} {}/{} {} ({elapsed:?})", text, migration.version, From 6dabb8d0fd28641f28f68ecf1b00fcd1ac2a60e1 Mon Sep 17 00:00:00 2001 From: matias-gonz Date: Tue, 1 Oct 2024 10:51:23 -0300 Subject: [PATCH 18/19] Simplify fmt --- .../zk_supervisor/src/commands/sql_fmt.rs | 52 +------------------ .../crates/zk_supervisor/src/messages.rs | 5 -- 2 files changed, 2 insertions(+), 55 deletions(-) diff --git a/zk_toolbox/crates/zk_supervisor/src/commands/sql_fmt.rs b/zk_toolbox/crates/zk_supervisor/src/commands/sql_fmt.rs index 753d2602bb69..ede2500e6ab6 100644 --- a/zk_toolbox/crates/zk_supervisor/src/commands/sql_fmt.rs +++ b/zk_toolbox/crates/zk_supervisor/src/commands/sql_fmt.rs @@ -1,16 +1,12 @@ use std::mem::take; -use anyhow::{bail, Context, Result}; +use anyhow::{bail, Result}; use common::spinner::Spinner; use sqruff_lib::{api::simple::get_simple_config, core::linter::core::Linter}; use xshell::Shell; use super::lint_utils::{get_unignored_files, IgnoredData, Target}; -use crate::messages::{ - msg_file_is_not_formatted, MSG_FAILED_TO_DETERMINE_BASE_INDENT, - MSG_FAILED_TO_FIND_END_OF_REGULAR_STRING_QUERY, - MSG_FAILED_TO_FIND_START_OF_REGULAR_STRING_QUERY, MSG_RUNNING_SQL_FMT_SPINNER, -}; +use crate::messages::{msg_file_is_not_formatted, MSG_RUNNING_SQL_FMT_SPINNER}; fn format_query(query: &str) -> anyhow::Result { let exclude_rules = vec!["LT12".to_string()]; // avoid adding newline before `$` character @@ -68,44 +64,6 @@ fn format_rust_string_query(query: &str, is_raw: bool) -> anyhow::Result Ok(add_indent(&reconstructed_rust_string, base_indent)) } -fn format_one_line_query(line: &str) -> anyhow::Result { - let is_raw_string = line.contains("sqlx::query!(r"); - - let query_start = if is_raw_string { - line.find(r#"r#""#) - .context(MSG_FAILED_TO_FIND_START_OF_REGULAR_STRING_QUERY)? - } else { - line.find('"') - .context(MSG_FAILED_TO_FIND_START_OF_REGULAR_STRING_QUERY)? - }; - - let base_indent = line - .find(|c: char| !c.is_whitespace()) - .context(MSG_FAILED_TO_DETERMINE_BASE_INDENT)? - + 4; - - let prefix = &line[..query_start]; - - let query_end = if is_raw_string { - line.find(r#""#) - .context(MSG_FAILED_TO_FIND_END_OF_REGULAR_STRING_QUERY)? - + 2 - } else { - line[1..] - .find('"') - .context(MSG_FAILED_TO_FIND_END_OF_REGULAR_STRING_QUERY)? - + 3 - }; - - let suffix = &line[query_end..]; - let query = &line[query_start..query_end]; - - let mut formatted_query = format_rust_string_query(query, is_raw_string)?; - formatted_query = add_indent(&formatted_query, base_indent); - - Ok(format!("{}\n{}\n{}", prefix, formatted_query, suffix)) -} - fn fmt_file(shell: &Shell, file_path: &str, check: bool) -> Result<()> { let content = shell.read_file(file_path)?; let mut modified_file = String::new(); @@ -116,12 +74,6 @@ fn fmt_file(shell: &Shell, file_path: &str, check: bool) -> Result<()> { let mut built_query = String::new(); for line in content.lines() { - if line.contains("sqlx::query!(\"") || line.contains("sqlx::query!(r") { - modified_file.push_str(&format_one_line_query(line)?); - modified_file.push('\n'); - continue; - } - if line.ends_with("sqlx::query!(") { lines_to_query = Some(1); is_raw_string = false; diff --git a/zk_toolbox/crates/zk_supervisor/src/messages.rs b/zk_toolbox/crates/zk_supervisor/src/messages.rs index de7ad1c10d02..6f6deb22edbf 100644 --- a/zk_toolbox/crates/zk_supervisor/src/messages.rs +++ b/zk_toolbox/crates/zk_supervisor/src/messages.rs @@ -198,11 +198,6 @@ pub(super) const MSG_RUNNING_CONTRACTS_LINTER_SPINNER: &str = "Running contracts pub(super) const MSG_RUNNING_CONTRACTS_FMT_SPINNER: &str = "Running prettier for contracts.."; pub(super) const MSG_RUNNING_SQL_FMT_SPINNER: &str = "Running SQL formatter.."; -pub(super) const MSG_FAILED_TO_FIND_END_OF_REGULAR_STRING_QUERY: &str = - "Failed to find the end of the regular string query"; -pub(super) const MSG_FAILED_TO_FIND_START_OF_REGULAR_STRING_QUERY: &str = - "Failed to find the start of the regular string query"; -pub(super) const MSG_FAILED_TO_DETERMINE_BASE_INDENT: &str = "Failed to determine base indent"; pub(super) fn msg_file_is_not_formatted(file: &str) -> String { format!("File {} is not formatted", file) From ac238a5da737a973838c2e24797cae93c4e38b89 Mon Sep 17 00:00:00 2001 From: matias-gonz Date: Tue, 1 Oct 2024 22:20:02 -0300 Subject: [PATCH 19/19] Delete unused method --- zk_toolbox/crates/zk_inception/src/utils/ports.rs | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/zk_toolbox/crates/zk_inception/src/utils/ports.rs b/zk_toolbox/crates/zk_inception/src/utils/ports.rs index 0462c0ea40fb..5102b4fd9c6d 100644 --- a/zk_toolbox/crates/zk_inception/src/utils/ports.rs +++ b/zk_toolbox/crates/zk_inception/src/utils/ports.rs @@ -1,9 +1,4 @@ -use std::{ - collections::{HashMap, HashSet}, - fmt, - ops::Range, - path::Path, -}; +use std::{collections::HashMap, fmt, ops::Range, path::Path}; use anyhow::{bail, Context, Result}; use config::{ @@ -21,10 +16,6 @@ pub struct EcosystemPorts { } impl EcosystemPorts { - pub fn get_assigned_ports(&self) -> HashSet { - self.ports.keys().cloned().collect() - } - pub fn is_port_assigned(&self, port: u16) -> bool { self.ports.contains_key(&port) }