From 32946c529fac8c9d7347aa8388365f4ec5a1fcec Mon Sep 17 00:00:00 2001 From: Ian Joiner <14581281+iajoiner@users.noreply.github.com> Date: Fri, 25 Oct 2024 13:24:26 -0400 Subject: [PATCH] feat: fix table range && bump proofs to 0.33.15 --- Cargo.lock | 8 ++++---- Cargo.toml | 4 ++-- src/main.rs | 8 ++++++-- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0122ce7..eb611ba 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3289,9 +3289,9 @@ dependencies = [ [[package]] name = "proof-of-sql" -version = "0.33.5" +version = "0.33.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19e62b4f98ce028082e7dfd89d8e3a5d025caee5dc169f78347b53a79aa73ed0" +checksum = "34e59ad4f95d1d54eac64589edc90df53201666c2841ad0732461bc6ed1abc36" dependencies = [ "ahash", "ark-bls12-381", @@ -3331,9 +3331,9 @@ dependencies = [ [[package]] name = "proof-of-sql-parser" -version = "0.33.5" +version = "0.33.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1567a03746bcbcb3772e5363b2c2fc1b5e5c737578365198c70474927264c454" +checksum = "be6fe34f8fe8942cd7a802ade754de0a7f7a94c0c4b285c877665856c76fcfe6" dependencies = [ "arrayvec 0.7.6", "bigdecimal", diff --git a/Cargo.toml b/Cargo.toml index 9003bef..08da95b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,8 +9,8 @@ dotenv = "0.15" flexbuffers = { version = "2.0.0" } futures = { version = "0.3.31"} postcard = { version = "1.0.10", default-features = false } -proof-of-sql = { version = "0.33.5"} -proof-of-sql-parser = { version = "0.33.5" } +proof-of-sql = { version = "0.33.15" } +proof-of-sql-parser = { version = "0.33.15" } prost = "0.12" reqwest = { version = "0.12", features = ["json"] } serde = { version = "1.0", features = ["serde_derive"] } diff --git a/src/main.rs b/src/main.rs index 67ae1e4..a083d63 100644 --- a/src/main.rs +++ b/src/main.rs @@ -4,6 +4,7 @@ mod sxt_chain_runtime; use dotenv::dotenv; use proof_of_sql::{ + base::database::TableRef, proof_primitive::dory::{ DoryCommitment, DoryEvaluationProof, DoryVerifierPublicSetup, VerifierSetup, }, @@ -26,6 +27,7 @@ async fn main() -> Result<(), Box> { let substrate_node_url = std::env::var("SUBSTRATE_NODE_URL")?; // Dory setup let sigma = 12; + //let verifier_setup = VerifierSetup::from(&public_parameters); let verifier_setup = VerifierSetup::load_from_file(Path::new("verifier_setup.bin"))?; let dory_verifier_setup = DoryVerifierPublicSetup::new(&verifier_setup, sigma); // Accessor setup @@ -41,11 +43,13 @@ async fn main() -> Result<(), Box> { let serialized_proof_plan = flexbuffers::to_vec(proof_plan)?; // Send the query to the prover let mut query_context = HashMap::new(); + let table_ref = TableRef::new("ETHEREUM.CONTRACT_EVT_APPROVALFORALL".parse()?); + let commitment_range = accessor[&table_ref].range(); query_context.insert( "ETHEREUM.CONTRACT_EVT_APPROVALFORALL".to_string(), ProverContextRange { - start: 0, - ends: vec![5], + start: commitment_range.start as u64, + ends: vec![commitment_range.end as u64], }, ); let prover_query = ProverQuery {