Skip to content

Commit add5003

Browse files
eigmaxibmp33
andauthored
chore: merge errors (#146)
* chore: change curve naming to uppercase format (#142) * chore: merge error codes --------- Co-authored-by: ibmp33 <[email protected]>
1 parent b998be6 commit add5003

File tree

5 files changed

+9
-53
lines changed

5 files changed

+9
-53
lines changed

algebraic/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ num = { version = "0.4.0" }
2929
byteorder = "1"
3030
franklin-crypto = { git = "https://github.com/matter-labs/franklin-crypto", branch = "beta", features = [ "plonk" ], version = "0.0.5"}
3131
#franklin-crypto = { path = "../../franklin-crypto", features = [ "plonk" ], version = "0.0.5"}
32+
ff = {package="ff_ce" , version="0.11", features = ["derive"]}
3233

3334
[dev-dependencies]
3435
env_logger = "0.10"

algebraic/src/errors.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
use crate::bellman_ce;
12
use thiserror::Error;
23

34
pub type Result<T> = std::result::Result<T, EigenError>;
@@ -35,7 +36,10 @@ pub enum EigenError {
3536
FRIVerifierFailed,
3637

3738
#[error("Fr::from_expr error")]
38-
PFDecodeError(#[from] crate::ff::PrimeFieldDecodingError),
39+
PFDecodeError(#[from] ff::PrimeFieldDecodingError),
40+
41+
#[error("Fr::from_expr error")]
42+
FrankinCryptoPFDecodeError(#[from] bellman_ce::PrimeFieldDecodingError),
3943

4044
#[error("WasmRuntime error, exit `{0}`")]
4145
WasmerRuntimeError(#[from] wasmer::RuntimeError),

algebraic/src/witness/memory.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
//! Safe-ish interface for reading and writing specific types to the WASM runtime's memory,
22
//! modified from ark-circom
3-
use crate::bellman_ce::{Field, PrimeField, PrimeFieldRepr, ScalarEngine};
3+
use crate::bellman_ce::{to_hex, Field, PrimeField, PrimeFieldRepr, ScalarEngine};
44
use crate::errors::Result;
5-
use crate::to_hex;
65
use num_bigint::{BigInt, BigUint};
76
use num_traits::Num;
87
use num_traits::ToPrimitive;

starky/src/errors.rs

Lines changed: 0 additions & 48 deletions
This file was deleted.

starky/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
#![allow(clippy::needless_range_loop)]
22
#![allow(dead_code)]
3-
4-
pub mod errors;
53
pub mod polsarray;
64
mod polutils;
75
pub mod stark_verifier_circom;
@@ -80,3 +78,5 @@ extern crate serde_json;
8078
extern crate ff;
8179
extern crate lazy_static;
8280
extern crate log;
81+
82+
pub use algebraic::errors;

0 commit comments

Comments
 (0)