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

Extract blob key computation logic into static function #1179

Merged
merged 2 commits into from
Jan 29, 2025

Conversation

litt3
Copy link
Contributor

@litt3 litt3 commented Jan 28, 2025

Why are these changes needed?

  • It isn't possible to construct a BlobHeader with the data available on chain, since we don't have access to the payment metadata
  • The changes in this PR allow access to the BlobKey computation logic, without using a BlobHeader middle man
  • This functionality will be needed to support client V2, since validator nodes will have an EigenDACertificate, which doesn't contain payment metadata

Checks

  • I've made sure the tests are passing. Note that there might be a few flaky tests, in that case, please comment that they are not relevant.
  • I've checked the new test coverage and the coverage percentage didn't drop.
  • Testing Strategy
    • Unit tests
    • Integration tests
    • This PR is not tested :(

@litt3 litt3 self-assigned this Jan 28, 2025
@litt3 litt3 marked this pull request as ready for review January 28, 2025 20:56
Copy link
Contributor

@cody-littley cody-littley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fairly straight forward change, LGTM

Copy link
Contributor

@samlaf samlaf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Idea LGTM, but not a big fan of having a seemingly function that takes a bunch of arguments whose relationship is unclear. I mentioned this already in arch's onchain renaming PR but I would prefer if we had a struct with a name for "DACertWithHashedPaymentHeader". Then this function could be a method on that struct.

Would make the hashing structure way more clear imo:
image

@litt3
Copy link
Contributor Author

litt3 commented Jan 28, 2025

Idea LGTM, but not a big fan of having a seemingly function that takes a bunch of arguments whose relationship is unclear. I mentioned this already in arch's onchain renaming PR but I would prefer if we had a struct with a name for "DACertWithHashedPaymentHeader". Then this function could be a method on that struct.

If we're opening the conversation for more fundamental changes, my question is:
Why do we include the payment metadata directly in any form of a BlobHeader? Why don't we just always put the hash in there, and send the payment metadata along with our dispersal request, as a separate object?

It seems over complicated to define multiple versions of the same object with subtle differences.

@litt3
Copy link
Contributor Author

litt3 commented Jan 29, 2025

@samlaf As suggested by @mooselumph in slack, let's go with this simple static function for now. The other options will require a longer discussion, and much more code changes to complete

Copy link
Contributor

@samlaf samlaf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SGTM. let's roll with this for now

@litt3 litt3 merged commit 971ee0a into Layr-Labs:master Jan 29, 2025
8 checks passed
@litt3 litt3 deleted the extract-blob-key-logic branch January 30, 2025 19:27
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.

3 participants