-
-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add draft for KZG point precompile * add test case for KZG point precompile * [precompiles] add verification failure enum status code * [precompiles] use correct modulus (order of subgroup G1 / Fr not Fp) * [precompiles] add trusted setup as argument, export KZG elements, cleanup * [tests] add mini README for source of KZG point precompile test vector * remove `precompile` suffix * Apply suggestions from code review --------- Co-authored-by: Mamy Ratsimbazafy <[email protected]>
- Loading branch information
Showing
4 changed files
with
103 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
The test vector found here for the KZG point precompile (https://eips.ethereum.org/EIPS/eip-4844#point-evaluation-precompile) is taken from Geth: | ||
|
||
https://github.com/ethereum/go-ethereum/blob/ce8cec007c42e54f79e53c3769a7279487968c07/core/vm/testdata/precompiles/pointEvaluation.json |
9 changes: 9 additions & 0 deletions
9
tests/protocol_ethereum_evm_precompiles/eip-4844/pointEvaluation.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
[ | ||
{ | ||
"Input": "01e798154708fe7789429634053cbf9f99b619f9f084048927333fce637f549b564c0a11a0f704f4fc3e8acfe0f8245f0ad1347b378fbf96e206da11a5d3630624d25032e67a7e6a4910df5834b8fe70e6bcfeeac0352434196bdf4b2485d5a18f59a8d2a1a625a17f3fea0fe5eb8c896db3764f3185481bc22f91b4aaffcca25f26936857bc3a7c2539ea8ec3a952b7873033e038326e87ed3e1276fd140253fa08e9fc25fb2d9a98527fc22a2c9612fbeafdad446cbc7bcdbdcd780af2c16a", | ||
"Expected": "000000000000000000000000000000000000000000000000000000000000100073eda753299d7d483339d80809a1d80553bda402fffe5bfeffffffff00000001", | ||
"Name": "pointEvaluation1", | ||
"Gas": 50000, | ||
"NoBenchmark": false | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters