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

stream blocks #176

Merged
merged 11 commits into from
Nov 7, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions old-faithful-proto/proto/old-faithful.proto
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ service OldFaithful {
rpc GetTransaction(TransactionRequest) returns (TransactionResponse);

rpc Get(stream GetRequest) returns (stream GetResponse);

rpc StreamBlocks(StreamBlocksRequest) returns (stream StreamBlocksResponse);
}

message VersionRequest {}
Expand Down Expand Up @@ -90,3 +92,34 @@ message GetResponseError {
GetResponseErrorCode code = 1;
string message = 2;
}


message StreamBlocksRequest {
uint64 start_slot = 1;
optional uint64 end_slot = 2; // If not specified, continues indefinitely
anjor marked this conversation as resolved.
Show resolved Hide resolved
optional StreamBlocksFilter filter = 3;
}

message StreamBlocksFilter {
repeated string account_include = 1; // Filter blocks/txns mentioning these accounts
optional bool include_transactions = 2; // Include full transaction details
optional bool include_accounts = 3; // Include account updates
anjor marked this conversation as resolved.
Show resolved Hide resolved
}

message StreamBlocksResponse {
oneof response {
StreamBlocksError error = 1;
BlockResponse block = 2;
}
}

message StreamBlocksError {
StreamBlocksErrorCode code = 1;
string message = 2;
}

enum StreamBlocksErrorCode {
INTERNAL = 0;
INVALID_SLOT_RANGE = 1;
SLOT_NOT_FOUND = 2;
}
Loading