Skip to content

Commit

Permalink
chore: update pilcom
Browse files Browse the repository at this point in the history
  • Loading branch information
eigmax committed Jan 12, 2025
1 parent fad7c87 commit c2bc067
Show file tree
Hide file tree
Showing 8 changed files with 354 additions and 377 deletions.
703 changes: 342 additions & 361 deletions Cargo.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion groth16/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ ff = { version = "0.13.0", features = ["derive"], optional = true }
pairing = { version = "0.23.0", optional = true }
group = { version = "0.13.0", optional = true }
blstrs = { version = "0.7.0", features = ["__private_bench"], optional = true }
bellperson = { version = "0.26", default-features = false, features = ["groth16"], optional = true }
bellperson = { git = "https://github.com/0xEigenLabs/bellperson.git", default-features = false, features = ["groth16"], optional = true }
rand_new = { package = "rand", version = "0.8", features = ["getrandom"], optional = true }
rand_core = { version = "0.6", optional = true }

Expand Down
6 changes: 4 additions & 2 deletions recursion/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,10 @@ fields = { path = "../fields", default-features = false }
starky = { path = "../starky", default-features = false }
algebraic = { path = "../algebraic", default-features = false }

powdr-pilcom = { git = "https://github.com/0xEigenLabs/powdr-pilcom", default-features = false }
#powdr-pilcom = { path = "../../powdr-pilcom" }
#powdr = { path = "../../powdr/powdr" }
#powdr-parser-util = { path = "../../powdr/parser-util" }
powdr = { git = "https://github.com/0xEigenLabs/powdr", branch = "eigen/v1", default-features = false }
powdr-parser-util = { git = "https://github.com/0xEigenLabs/powdr", branch = "eigen/v1", default-features = false }

[dev-dependencies]
env_logger = "0.10"
Expand Down
4 changes: 2 additions & 2 deletions recursion/src/pilcom.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ mod expression_counter;

pub use export::export;

use powdr_pilcom::number::GoldilocksField;
use powdr_pilcom::pil_analyzer::{analyze_file, analyze_string};
use powdr::number::GoldilocksField;
use powdr::pil_analyzer::{analyze_file, analyze_string};
use starky::types::PIL;
use std::path::Path;

Expand Down
6 changes: 3 additions & 3 deletions recursion/src/pilcom/export.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
use powdr_pilcom::number::FieldElement;
use powdr::number::FieldElement;
use std::collections::HashMap;
use std::{cmp, path::PathBuf};

use powdr_pilcom::ast::analyzed::{
use powdr::ast::analyzed::{
AlgebraicBinaryOperation, AlgebraicBinaryOperator, AlgebraicExpression as Expression,
AlgebraicUnaryOperation, AlgebraicUnaryOperator, Analyzed, IdentityKind, PolyID,
PolynomialType, StatementIdentifier, SymbolKind,
};
use powdr_pilcom::parser_util::SourceRef;
use powdr_parser_util::SourceRef;
use starky::types::{
ConnectionIdentity, Expression as StarkyExpr, PermutationIdentity, PlookupIdentity,
PolIdentity, Reference, PIL,
Expand Down
2 changes: 1 addition & 1 deletion recursion/src/pilcom/expression_counter.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::collections::HashMap;

use powdr_pilcom::ast::analyzed::{
use powdr::ast::analyzed::{
Analyzed, Identity, PolynomialType, PublicDeclaration, SelectedExpressions,
StatementIdentifier, Symbol, SymbolKind,
};
Expand Down
1 change: 0 additions & 1 deletion zkvm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ log = "0.4.0"

powdr = { git = "https://github.com/0xEigenLabs/powdr", branch = "eigen/v1", default-features = false }
#powdr = { path = "../../powdr/powdr", default-features = false }
powdr-pilcom = { git = "https://github.com/0xEigenLabs/powdr-pilcom", default-features = false }
starky = { path = "../starky" }
recursion = { path = "../recursion" }

Expand Down
7 changes: 1 addition & 6 deletions zkvm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,11 +162,7 @@ fn generate_verifier<F: FieldElement>(
agg_stage: false,
};
if !setup.starkinfo.qs.is_empty() {
// FIXME: this is ugly.
let old = serde_json::to_value(pil).unwrap();
let new: powdr_pilcom::ast::analyzed::Analyzed<powdr_pilcom::number::GoldilocksField> =
serde_json::from_value(old).unwrap();
let pil_json = pil_export::<powdr_pilcom::number::GoldilocksField>(&new);
let pil_json = pil_export::<F>(pil);
let str_ver = pil2circom::pil2circom(
&pil_json,
&setup.const_root,
Expand Down Expand Up @@ -422,7 +418,6 @@ mod tests {
}

#[test]
#[ignore]
fn test_zkvm_lr_execute_then_prove() {
env_logger::try_init().unwrap_or_default();
let test_file = "test-vectors/reth.block.json";
Expand Down

0 comments on commit c2bc067

Please sign in to comment.