Skip to content

Commit

Permalink
chore: merge errors (0xEigenLabs#146)
Browse files Browse the repository at this point in the history
* chore: change curve naming to uppercase format (0xEigenLabs#142)

* chore: merge error codes

---------

Co-authored-by: ibmp33 <[email protected]>
  • Loading branch information
eigmax and ibmp33 authored Oct 28, 2023
1 parent b998be6 commit add5003
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 53 deletions.
1 change: 1 addition & 0 deletions algebraic/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ num = { version = "0.4.0" }
byteorder = "1"
franklin-crypto = { git = "https://github.com/matter-labs/franklin-crypto", branch = "beta", features = [ "plonk" ], version = "0.0.5"}
#franklin-crypto = { path = "../../franklin-crypto", features = [ "plonk" ], version = "0.0.5"}
ff = {package="ff_ce" , version="0.11", features = ["derive"]}

[dev-dependencies]
env_logger = "0.10"
Expand Down
6 changes: 5 additions & 1 deletion algebraic/src/errors.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use crate::bellman_ce;
use thiserror::Error;

pub type Result<T> = std::result::Result<T, EigenError>;
Expand Down Expand Up @@ -35,7 +36,10 @@ pub enum EigenError {
FRIVerifierFailed,

#[error("Fr::from_expr error")]
PFDecodeError(#[from] crate::ff::PrimeFieldDecodingError),
PFDecodeError(#[from] ff::PrimeFieldDecodingError),

#[error("Fr::from_expr error")]
FrankinCryptoPFDecodeError(#[from] bellman_ce::PrimeFieldDecodingError),

#[error("WasmRuntime error, exit `{0}`")]
WasmerRuntimeError(#[from] wasmer::RuntimeError),
Expand Down
3 changes: 1 addition & 2 deletions algebraic/src/witness/memory.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
//! Safe-ish interface for reading and writing specific types to the WASM runtime's memory,
//! modified from ark-circom
use crate::bellman_ce::{Field, PrimeField, PrimeFieldRepr, ScalarEngine};
use crate::bellman_ce::{to_hex, Field, PrimeField, PrimeFieldRepr, ScalarEngine};
use crate::errors::Result;
use crate::to_hex;
use num_bigint::{BigInt, BigUint};
use num_traits::Num;
use num_traits::ToPrimitive;
Expand Down
48 changes: 0 additions & 48 deletions starky/src/errors.rs

This file was deleted.

4 changes: 2 additions & 2 deletions starky/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#![allow(clippy::needless_range_loop)]
#![allow(dead_code)]

pub mod errors;
pub mod polsarray;
mod polutils;
pub mod stark_verifier_circom;
Expand Down Expand Up @@ -80,3 +78,5 @@ extern crate serde_json;
extern crate ff;
extern crate lazy_static;
extern crate log;

pub use algebraic::errors;

0 comments on commit add5003

Please sign in to comment.