-
Notifications
You must be signed in to change notification settings - Fork 7
chore: Update blobKey calculation documentation #165
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
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
|
||
| The disperser enforces uniqueness - if you try to disperse a blob with a previously used blob key, the request will be rejected. | ||
|
|
||
| ```solidity |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Curious, where do you expect this snippet to be used? Given it's in solidity is this meant to show the flow onchain?
I'm working under the assumption that the blob key is most useful in the offchain logic as it will be used in a API call, clarifying language and use here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added a clarification note here: 13cf7fb
| - `commitment`: The cryptographic commitment to your blob data (G1 point and G2 length commitment) | ||
| - `paymentHeaderHash`: `0x1234...` (the 32-byte hash of your PaymentHeader) | ||
|
|
||
| Computing the blob key happens in two steps: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe after you've gone through this there is really two side two this
-
User has data and wants to compute a blob key
-
User has a standard commitment and wants to compute a blob key
-
should be included here as the the common flow for users is to use the proxy which having returned the commitment now requires a blob key to retrieve data
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
address this here: 5b02a5e
|
|
||
| You can then use this blob key to query dispersal status with `GetBlobStatus`, retrieve chunks from validators with `GetChunks`, or fetch the full blob from relays with `GetBlob`. | ||
|
|
||
| ### How It Relates to Other Structures |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feel free to include the excalidraw example which shows essentially the nesting doll of the data structures, linked in the original thread we were discussing in
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
included it: 13cf7fb
|
|
||
| The blob key is the hash of the `BlobHeader`. A `BlobCertificate` wraps that header along with signatures and relay keys. When proving that a certificate was included in a batch, you use a `BlobInclusionInfo` which contains the certificate plus a Merkle proof. The `BatchHeader` has a `batchRoot` - that's the root of a Merkle tree where each leaf is the hash of a `BlobCertificate`. | ||
|
|
||
| ### Code References |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do we want someone to use these references for?
wondering if it makes more sense to include at the bottom or if there's a more relevant spot to include it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
addressed it here, added necessary links as well: 13cf7fb
|
|
||
| The Go client shows how to verify the blob key in [`verifyReceivedBlobKey()`](https://github.com/Layr-Labs/eigenda/blob/6be8c9352c8e73c9f4f0ba00560ff3230bbba822/api/clients/v2/payloaddispersal/payload_disperser.go#L370-L400). After getting a `DisperseBlobReply`, compute the blob key yourself and check that it matches what the disperser returned. | ||
|
|
||
| ### Where You'll Use It |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice section to include, let's include this higher up in the page.
The other use would be the
Proxy Dispersal --> Commitment Received --> Compute Blob Key in order to retrieve flow
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No description provided.