0g-chain/helper/da/proto/light.proto
2024-08-02 19:26:50 +08:00

33 lines
660 B
Protocol Buffer

syntax = "proto3";
package light;
option go_package = "proto/light";
service Light {
rpc Sample(SampleRequest) returns (SampleReply) {}
rpc Retrieve(RetrieveRequest) returns (RetrieveReply) {}
}
// SampleRequest contains the blob to sample (by batch and blob index) and required sample times
message SampleRequest {
bytes stream_id = 1;
bytes batch_header_hash = 2;
uint32 blob_index = 3;
uint32 times = 4;
}
// SampleReply contains the sample result
message SampleReply {
bool success = 1;
}
message RetrieveRequest {
bytes batch_header_hash = 1;
uint32 blob_index = 2;
}
message RetrieveReply {
bool status = 1;
bytes data = 2;
}