Skip to content
New issue

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

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

Already on GitHub? # to your account

[v2] Disperser server GetBlobCommitment endpoint #899

Merged
merged 1 commit into from
Nov 15, 2024

Conversation

ian-shim
Copy link
Contributor

Why are these changes needed?

Loads a prover with G2 points and computes commitment on GetBlobCommitment request

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 :(

@ian-shim ian-shim marked this pull request as ready for review November 15, 2024 02:09
@@ -161,6 +162,10 @@ func RunDisperserServer(ctx *cli.Context) error {
bucketName := config.BlobstoreConfig.BucketName
logger.Info("Blob store", "bucket", bucketName)
if config.DisperserVersion == V2 {
prover, err := prover.NewProver(&config.EncodingConfig, true)
Copy link
Contributor

Choose a reason for hiding this comment

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

The prover setup takes around ~20 seconds with 16 cpus since we need to load the G2 points. Also is the disperser still a singleton in V2?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think it has to be a singleton anymore now that payments aren't handled locally. @mooselumph is that correct?

if s.prover == nil {
return nil, api.NewErrorUnimplemented()
}
if len(req.GetData()) == 0 {
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we have bounds check on the largest supported blob size?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good call

@ian-shim ian-shim force-pushed the get-commitment-endpoint branch from eb629a2 to 9d13075 Compare November 15, 2024 07:19
@ian-shim ian-shim merged commit d939331 into Layr-Labs:master Nov 15, 2024
6 checks passed
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants