-
Notifications
You must be signed in to change notification settings - Fork 3.9k
txmgr: allow blobs to be sent with fusaka-compatible cell proofs (sidecar version 1) by configuration #17620
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
Changes from 8 commits
08f662a
ba4a984
9d0adcc
f0c795e
fd4583a
d686a6f
3c2537e
878accc
0c9985e
69bddf6
1877a00
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
sebastianst marked this conversation as resolved.
Show resolved
Hide resolved
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1736,7 +1736,9 @@ func TestMakeSidecar(t *testing.T) { | |
| for i := 0; i < 4096; i++ { | ||
| blob[32*i] &= 0b0011_1111 | ||
| } | ||
| sidecar, hashes, err := MakeSidecar([]*eth.Blob{&blob}) | ||
|
|
||
| // Pre Fusaka, blob proof sidecar is Version0 | ||
| sidecar, hashes, err := MakeSidecar([]*eth.Blob{&blob}, false) | ||
| require.NoError(t, err) | ||
| require.Equal(t, len(hashes), 1) | ||
| require.Equal(t, len(sidecar.Blobs), len(hashes)) | ||
|
|
@@ -1747,6 +1749,19 @@ func TestMakeSidecar(t *testing.T) { | |
| require.NoError(t, eth.VerifyBlobProof((*eth.Blob)(&sidecar.Blobs[i]), commit, sidecar.Proofs[i]), "proof must be valid") | ||
| require.Equal(t, hashes[i], eth.KZGToVersionedHash(commit)) | ||
| } | ||
|
|
||
| // Post Fusaka, blob proof sidecar is Version1 | ||
| sidecar, hashes, err = MakeSidecar([]*eth.Blob{&blob}, true) | ||
| require.NoError(t, err) | ||
| require.Equal(t, len(hashes), 1) | ||
| require.Equal(t, len(sidecar.Blobs), len(hashes)) | ||
| require.Equal(t, len(sidecar.Proofs), len(hashes)*kzg4844.CellProofsPerBlob) | ||
| require.Equal(t, len(sidecar.Commitments), len(hashes)) | ||
|
|
||
| require.NoError(t, kzg4844.VerifyCellProofs(sidecar.Blobs, sidecar.Commitments, sidecar.Proofs), "cell proof must be valid") | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it seems that the blob verification in l1 beacon client also needs to support cell proofs
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for raising this @pandainzoo. I don't think any changes are necessary here, in fact. Although when submitting blob transactions, it is true that blob proofs will be replaced by cell proofs, the beacon API actually remains unchanged with Fulu https://ethereum.github.io/beacon-APIs/#/Beacon/getBlobSidecars. So we will get a blob proof returned and can continue to verify it in the way we currently do. Relevant PR here from lighthouse sigp/lighthouse#6755 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for the answer |
||
| for i, commit := range sidecar.Commitments { | ||
| require.Equal(t, hashes[i], eth.KZGToVersionedHash(commit)) | ||
| } | ||
| } | ||
|
|
||
| func TestSendAsyncUnbufferedChan(t *testing.T) { | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.