Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EIP4844: Remove redundant cryptography point in networking specs #3137

Open
kevaundray opened this issue Nov 29, 2022 · 1 comment
Open

EIP4844: Remove redundant cryptography point in networking specs #3137

kevaundray opened this issue Nov 29, 2022 · 1 comment
Labels
Deneb was called: eip-4844

Comments

@kevaundray
Copy link
Contributor

Motivation

After changing the cryptography to be more higher level, certain parts of the spec now are no longer concerned with particular cryptographic invariants, since they are encapsulated inside of the cryptography module.

It seems that some parts of the spec were not updated to reflect this. In particular in networking:

  • [REJECT] the sidecar.blobs are all well formatted, i.e. the BLSFieldElement in valid range (x < BLS_MODULUS).

  • [REJECT] The KZG proof is a correctly encoded compressed BLS G1 Point -- i.e. bls.KeyValidate(blobs_sidecar.kzg_aggregated_proof)

Suggestion

Since:

  • [REJECT] The KZG commitments in the block are valid against the provided blobs sidecar. -- i.e. validate_blobs_sidecar(block.slot, hash_tree_root(block), block.body.blob_kzg_commitments, sidecar)

Will only pass if the blobs are all well formatted ie canonical and the proof point is correctly encoded, those two points now seem to be redundant.

Notes

If the above is accepted, then I would also question if the networking layer needs this point:

  • [REJECT] The KZG commitments of the blobs are all correctly encoded compressed BLS G1 Points. -- i.e. all(bls.KeyValidate(commitment) for commitment in block.body.blob_kzg_commitments)

In order to remove it, I think we would need to add it inside of verify_kzg_commitments_against_transactions . If we always validate the commitments before calling verify_kzg_commitments_against_transactions then I think it would be reasonable to move the point validation function inside of verify_kzg_commitments_against_transactions.

@hwwhww hwwhww added the Deneb was called: eip-4844 label Dec 14, 2022
@dankrad
Copy link
Contributor

dankrad commented Dec 15, 2022

Yeah I agree with that. We can leave all the validation to the cryptography library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Deneb was called: eip-4844
Projects
None yet
Development

No branches or pull requests

5 participants
@dankrad @hwwhww @kevaundray and others