Skip to content

Commit

Permalink
feat: fix table range && bump proofs to 0.33.15
Browse files Browse the repository at this point in the history
  • Loading branch information
iajoiner committed Oct 25, 2024
1 parent 173d629 commit 32946c5
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
8 changes: 4 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"] }
Expand Down
8 changes: 6 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
Expand All @@ -26,6 +27,7 @@ async fn main() -> Result<(), Box<dyn core::error::Error>> {
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
Expand All @@ -41,11 +43,13 @@ async fn main() -> Result<(), Box<dyn core::error::Error>> {
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 {
Expand Down

0 comments on commit 32946c5

Please sign in to comment.