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

Node v2 StoreChunks and GetChunks endpoints #893

Merged
merged 1 commit into from
Nov 15, 2024

Conversation

ian-shim
Copy link
Contributor

Why are these changes needed?

Implementation of v2 StoreChunks and GetChunks endpoints

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

Copy link
Collaborator

@mooselumph mooselumph left a comment

Choose a reason for hiding this comment

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

Looks good. Idempotency as follow-up?

@@ -134,3 +131,26 @@ func (n *Node) DownloadBundles(ctx context.Context, batch *corev2.Batch) ([]*cor

return blobShards, rawBundles, nil
}

func (n *Node) ValidateBatchV2(
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should this just go in the core/validator object?

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 moved batch header validation as another method in validator object, but kept them separated

@ian-shim
Copy link
Contributor Author

Looks good. Idempotency as follow-up?

For now, I added a check if the batch header has been stored and abort the entire store operation if it has been stored.
We can add more sophisticated logic later but this would be on par with the v1 logic.

@ian-shim ian-shim merged commit 5c260a4 into Layr-Labs:master Nov 15, 2024
6 checks passed
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