89 lines
2.4 KiB
Protocol Buffer
89 lines
2.4 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
package sf.substreams.internal.v2;
|
|
|
|
import "sf/substreams/v1/modules.proto";
|
|
|
|
option go_package = "github.com/streamingfast/substreams/pb/sf/substreams/internal/v2;pbssinternal";
|
|
|
|
service Substreams {
|
|
rpc ProcessRange(ProcessRangeRequest) returns (stream ProcessRangeResponse);
|
|
}
|
|
|
|
message ProcessRangeRequest {
|
|
uint64 start_block_num = 1;
|
|
uint64 stop_block_num = 2;
|
|
string output_module = 3;
|
|
sf.substreams.v1.Modules modules = 4;
|
|
uint32 stage = 5; // 0-based index of stage to execute up to
|
|
}
|
|
|
|
message ProcessRangeResponse {
|
|
reserved 1; // previously string module_name = 1;
|
|
|
|
reserved 2; // previously in oneof(type): BlockRange processed_range
|
|
reserved 3; // previously in oneof(type): ProcessedBytes processed_bytes
|
|
|
|
oneof type {
|
|
Failed failed = 4;
|
|
Completed completed = 5;
|
|
Update update = 6;
|
|
}
|
|
}
|
|
|
|
message Update {
|
|
uint64 duration_ms = 1;
|
|
uint64 processed_blocks = 2;
|
|
uint64 total_bytes_read = 3;
|
|
uint64 total_bytes_written = 4;
|
|
|
|
repeated ModuleStats modules_stats = 5;
|
|
}
|
|
|
|
message ModuleStats {
|
|
string name = 1;
|
|
uint64 processing_time_ms = 2;
|
|
uint64 store_operation_time_ms = 3;
|
|
uint64 store_read_count = 4;
|
|
|
|
repeated ExternalCallMetric external_call_metrics = 5;
|
|
|
|
// store-specific (will be 0 on mappers)
|
|
uint64 store_write_count = 10;
|
|
uint64 store_deleteprefix_count = 11;
|
|
uint64 store_size_bytes = 12;
|
|
}
|
|
|
|
message ExternalCallMetric {
|
|
string name = 1;
|
|
uint64 count = 2;
|
|
uint64 time_ms = 3;
|
|
}
|
|
|
|
message Completed {
|
|
repeated BlockRange all_processed_ranges = 1;
|
|
|
|
// TraceId represents the producer's trace id that produced the partial files.
|
|
// This is present here so that the consumer can use it to identify the
|
|
// right partial files that needs to be squashed together.
|
|
//
|
|
// The TraceId can be empty in which case it should be assumed by the tier1
|
|
// consuming this message that the tier2 that produced those partial files
|
|
// is not yet updated to produce a trace id and a such, the tier1 should
|
|
// generate a legacy partial file name.
|
|
string trace_id = 2;
|
|
}
|
|
|
|
message Failed {
|
|
string reason = 1;
|
|
repeated string logs = 2;
|
|
// FailureLogsTruncated is a flag that tells you if you received all the logs or if they
|
|
// were truncated because you logged too much (fixed limit currently is set to 128 KiB).
|
|
bool logs_truncated = 3;
|
|
}
|
|
|
|
message BlockRange {
|
|
uint64 start_block = 2;
|
|
uint64 end_block = 3;
|
|
}
|