We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ba9048c commit ae49cadCopy full SHA for ae49cad
ledger/src/proofs/public_input/scalars.rs
@@ -1,6 +1,7 @@
1
-use ark_ff::{BigInteger256, Field, FromBytes};
+use ark_ff::{BigInteger256, Field};
2
use kimchi::proof::ProofEvaluations;
3
use mina_curves::pasta::{Fp, Fq};
4
+use o1_utils::field_helpers::FieldHelpers;
5
6
use crate::proofs::field::FieldWitness;
7
@@ -44,13 +45,7 @@ where
44
45
s = &s[2..];
46
}
47
- let mut bytes = <[u8; 32]>::default();
48
- hex::decode_to_slice(s, &mut bytes).unwrap();
49
- bytes.reverse();
50
-
51
- let value = FromBytes::read(&bytes[..]).expect("Should not fail");
52
- let bigint = BigInteger256::new(value);
53
- F::from(bigint) // Never fail, we hardcode them with string literals
+ F::from_hex(s).expect("Must not fail")
54
55
56
fn field<F: FieldWitness>(s: &str) -> F {
0 commit comments