diff --git a/arbitrator/prover/src/kzgbn254.rs b/arbitrator/prover/src/kzgbn254.rs index b94832575..2017301e5 100644 --- a/arbitrator/prover/src/kzgbn254.rs +++ b/arbitrator/prover/src/kzgbn254.rs @@ -16,16 +16,15 @@ lazy_static::lazy_static! { // note that we are loading 3000 for testing purposes atm, but for production use these values: // g1 and g2 points from the operator setup guide // srs_order = 268435456 - // srs_points_to_load = 131072 + // srs_points_to_load = 131072 (65536 is enough) pub static ref KZG: Kzg = Kzg::setup( - "./arbitrator/prover/src/test-files/g1.point", - "./arbitrator/prover/src/test-files/g2.point", - "./arbitrator/prover/src/test-files/g2.point.powerOf2", - 3000, - 3000 + "./arbitrator/prover/src/mainnet-files/g1.point.65536", + "./arbitrator/prover/src/mainnet-files/g2.point.65536", + "./arbitrator/prover/src/mainnet-files/g2.point.powerOf2", + 268435456, + 65536 ).unwrap(); - } /// Creates a KZG preimage proof consumable by the point evaluation precompile. @@ -37,7 +36,8 @@ pub fn prove_kzg_preimage_bn254( ) -> Result<()> { let mut kzg = KZG.clone(); - println!("preimage: {}", encode(&preimage)); + println!("preimage: {} {}", preimage.len(), encode(&preimage)); + println!("offset: {}", offset); // expand roots of unity kzg.calculate_roots_of_unity(preimage.len() as u64)?; diff --git a/arbitrator/prover/src/mainnet-files/g1.point.65536 b/arbitrator/prover/src/mainnet-files/g1.point.65536 new file mode 100644 index 000000000..4922cd06f Binary files /dev/null and b/arbitrator/prover/src/mainnet-files/g1.point.65536 differ diff --git a/arbitrator/prover/src/mainnet-files/g2.point.65536 b/arbitrator/prover/src/mainnet-files/g2.point.65536 new file mode 100644 index 000000000..b1cf1872b Binary files /dev/null and b/arbitrator/prover/src/mainnet-files/g2.point.65536 differ diff --git a/arbitrator/prover/src/mainnet-files/g2.point.powerOf2 b/arbitrator/prover/src/mainnet-files/g2.point.powerOf2 new file mode 100644 index 000000000..58e349b6e Binary files /dev/null and b/arbitrator/prover/src/mainnet-files/g2.point.powerOf2 differ diff --git a/arbitrator/prover/src/utils.rs b/arbitrator/prover/src/utils.rs index 3dfef9096..23f645aac 100644 --- a/arbitrator/prover/src/utils.rs +++ b/arbitrator/prover/src/utils.rs @@ -208,11 +208,11 @@ pub fn hash_preimage(preimage: &[u8], ty: PreimageType) -> Result<[u8; 32]> { } PreimageType::EigenDAHash => { let kzg_bn254: KzgBN254 = KzgBN254::setup( - "./arbitrator/prover/src/test-files/g1.point", - "./arbitrator/prover/src/test-files/g2.point", - "./arbitrator/prover/src/test-files/g2.point.powerOf2", - 3000, - 3000, + "./arbitrator/prover/src/mainnet-files/g1.point.65536", + "./arbitrator/prover/src/mainnet-files/g2.point.65536", + "./arbitrator/prover/src/mainnet-files/g2.point.powerOf2", + 268435456, + 65536, ) .unwrap(); diff --git a/arbitrator/prover/test-cases/go/main.go b/arbitrator/prover/test-cases/go/main.go index d8be4945f..c708744ca 100644 --- a/arbitrator/prover/test-cases/go/main.go +++ b/arbitrator/prover/test-cases/go/main.go @@ -211,7 +211,7 @@ func main() { } } // EIGENDA COMMIT HASH - _, err = wavmio.ResolveTypedPreimage(arbutil.EigenDaPreimageType, common.HexToHash("011e229d75b13559dcb2d757ecae9b66fa579268e28e196789503322115c06e1")) + _, err = wavmio.ResolveTypedPreimage(arbutil.EigenDaPreimageType, common.HexToHash("01605220b6928163676612ca50bbe5e0c595052876796dbedeae8ef597c9fdcf")) if err != nil { panic(fmt.Sprintf("failed to resolve eigenda preimage: %v", err)) } diff --git a/arbitrator/prover/test-cases/rust/src/bin/host-io.rs b/arbitrator/prover/test-cases/rust/src/bin/host-io.rs index abbb74aca..7c28174f4 100644 --- a/arbitrator/prover/test-cases/rust/src/bin/host-io.rs +++ b/arbitrator/prover/test-cases/rust/src/bin/host-io.rs @@ -109,7 +109,9 @@ fn main() { let expected_len = 0; for i in 0..5{ - let eigen_hash = hex!("011e229d75b13559dcb2d757ecae9b66fa579268e28e196789503322115c06e1"); + // test-files srs 011e229d75b13559dcb2d757ecae9b66fa579268e28e196789503322115c06e1 + // mainnet srs 01605220b6928163676612ca50bbe5e0c595052876796dbedeae8ef597c9fdcf + let eigen_hash = hex!("01605220b6928163676612ca50bbe5e0c595052876796dbedeae8ef597c9fdcf"); bytebuffer = Bytes32(eigen_hash); let actual_len = wavm_read_eigen_da_hash_preimage(bytebuffer.0.as_mut_ptr(), i * 32);