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

Relay Client #875

Merged
merged 1 commit into from
Nov 13, 2024
Merged

Relay Client #875

merged 1 commit into from
Nov 13, 2024

Conversation

ian-shim
Copy link
Contributor

@ian-shim ian-shim commented Nov 8, 2024

Why are these changes needed?

Scaffold implementation of client that talks to a set of relay services.
A follow up PR will handle gRPC calls when the interface has been finalized and merged

Checks

  • I've made sure the lint is passing in this PR.
  • 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 :(

@@ -8,7 +8,6 @@ import (
grpcnode "github.com/Layr-Labs/eigenda/api/grpc/node"
"github.com/Layr-Labs/eigenda/core"
"github.com/Layr-Labs/eigenda/encoding"
"github.com/Layr-Labs/eigenda/node"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

moved some methods from node/utils.go to core/serialization.go to prevent this client from importing node package

@ian-shim ian-shim marked this pull request as ready for review November 8, 2024 09:11
@ian-shim ian-shim force-pushed the relay-client branch 3 times, most recently from 113b4c6 to c6da8ce Compare November 8, 2024 20:27
@ian-shim ian-shim requested a review from anupsv November 8, 2024 23:46
@ian-shim ian-shim mentioned this pull request Nov 9, 2024
6 tasks
@ian-shim ian-shim force-pushed the relay-client branch 3 times, most recently from 36bd63b to 1cd6570 Compare November 12, 2024 21:03

type ChunkRequestByIndex struct {
BlobKey corev2.BlobKey
Indexes []uint32
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: indices?

// GetChunksByRange retrieves blob chunks from a relay by chunk index range
// The returned slice has the same length and ordering as the input slice, and the i-th element is the bundle for the i-th request.
// Each bundle is a sequence of frames in raw form (i.e., serialized core.Bundle bytearray).
GetChunksByRange(ctx context.Context, relayKey corev2.RelayKey, requests []*ChunkRequestByRange) ([][]byte, error)
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 client handle deserialization?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's intentionally left serialized so that caller can use the serialized bytes without serializing it again. (node can directly store the bytearrays without the overhead of serializing them again)

@ian-shim ian-shim merged commit 01f8be7 into Layr-Labs:master Nov 13, 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.

2 participants