Skip to content

EIP-4844 Spec Change: Update z + y Precompile vectors to big endian.#132

Closed
spencer-tb wants to merge 14 commits intoethereum:mainfrom
spencer-tb:spec-change-4844-precompile-big-endian
Closed

EIP-4844 Spec Change: Update z + y Precompile vectors to big endian.#132
spencer-tb wants to merge 14 commits intoethereum:mainfrom
spencer-tb:spec-change-4844-precompile-big-endian

Conversation

@spencer-tb
Copy link
Collaborator

@spencer-tb spencer-tb commented May 15, 2023

Functional change in accordance with the future spec update, to modify the z + y precompile vectors such that they are big endian: ethereum/EIPs#7020

Following a discussion ACD on may 11, it was decided to specify z and y in pre-compile input to be big endian so that there is minimal confusion on EL which primarily encodes bytes as big endian.

The PR adds a python file (for now) which toggles the endianess of the z + y vectors in

fillers/eips/eip4844/point_evaluation_vectors/go_kzg_4844_verify_kzg_proof.json

It can be run simply with:

python toggle_precompile_endianess.py

The first commit in this PR changes these values to big endian. If the python script is run again it will toggle it back to little endian, and so on.

@spencer-tb
Copy link
Collaborator Author

Tagging the following task: #130

Specify precompile input's z and y to be encoded as big endian.

This PR will not be merged until both the spec change ethereum/EIPs#7020, geth is updated to match the new spec.

@spencer-tb
Copy link
Collaborator Author

The following error is received when filling the precompile tests with the update values:

>> raise Storage.KeyValueMismatch(
ethereum_test_tools.common.types.Storage.KeyValueMismatch:
incorrect value for key
0x0000000000000000000000000000000000000000000000000000000000000001: want
0x0000000000000000000000000000000000000000000000000000000000001000, 
got 
0x01190503c43205b479ab7b9724143c39ec4a58a56457777d65a6eb4dd70285b9 

This error will hopefully be resolved after updating geth t8n-tool.

@spencer-tb spencer-tb changed the title fillers/../point_eval_precompile.py: Update z + y vectors to big endian. EIP-4844 Spec Change: Update z + y Precompile vectors to big endian. May 15, 2023
@spencer-tb
Copy link
Collaborator Author

This change only affect the following test subset:
point_evaluation_precompile_external_vectors.json

@spencer-tb
Copy link
Collaborator Author

Closing this as the changes have been added to the pytest merge ae5df2f.

@spencer-tb spencer-tb closed this Jun 8, 2023
@spencer-tb spencer-tb deleted the spec-change-4844-precompile-big-endian branch July 7, 2023 03:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant