-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathblock_engine.proto
More file actions
94 lines (74 loc) · 3.25 KB
/
block_engine.proto
File metadata and controls
94 lines (74 loc) · 3.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
// Block engine interface for the Harmonic validator.
syntax = "proto3";
import "packet.proto";
import "shared.proto";
import "bundle.proto";
import "google/protobuf/timestamp.proto";
package block_engine;
// Request to subscribe to the block engine's packet stream.
message SubscribePacketsRequest {}
// A batch of packets forwarded by the block engine.
message SubscribePacketsResponse {
// Timestamp of when the batch was sent.
shared.Header header = 1;
// Transaction packet batch.
packet.PacketBatch batch = 2;
}
// Request to subscribe to the block engine's bundle stream.
message SubscribeBundlesRequest {}
// One or more bundles forwarded by the block engine.
message SubscribeBundlesResponse {
// Bundles with their server-assigned UUIDs.
repeated bundle.BundleUuid bundles = 1;
}
// Request for the block builder's fee configuration.
message BlockBuilderFeeInfoRequest {}
// Fee configuration for the block builder.
message BlockBuilderFeeInfoResponse {
// Block builder's tip-receiving pubkey.
string pubkey = 1;
// Tip commission percentage (0-100).
uint64 commission = 2;
}
// Notifies the block engine of the validator's upcoming leader slot.
message SubmitLeaderWindowInfoRequest {
// When the leader slot begins.
google.protobuf.Timestamp start_timestamp = 1;
// The leader slot number.
uint64 slot = 2;
}
message SubmitLeaderWindowInfoResponse {}
// Request for available block engine endpoints.
message GetBlockEngineEndpointRequest {}
// A block engine endpoint.
message BlockEngineEndpoint {
// gRPC URL, e.g. https://mainnet.block-engine.jito.wtf
string block_engine_url = 1;
// ShredStream receiver address (host:port), e.g. shredstream.mainnet.block-engine.jito.wtf:1002
string shredstream_receiver_address = 2;
}
// Available block engine endpoints.
message GetBlockEngineEndpointResponse {
// Anycast endpoint that routes to the nearest block engine.
BlockEngineEndpoint global_endpoint = 1;
// Region-specific endpoints for direct connection.
repeated BlockEngineEndpoint regioned_endpoints = 2;
}
// Service consumed by the Harmonic validator to stream packets and bundles
// from the block engine.
service BlockEngineValidator {
// Subscribe to a stream of transaction packets.
rpc SubscribePackets (SubscribePacketsRequest) returns (stream SubscribePacketsResponse) {}
// Subscribe to a stream of simulated and profitable bundles.
rpc SubscribeBundles (SubscribeBundlesRequest) returns (stream SubscribeBundlesResponse) {}
// Subscribe to bundles (v2).
rpc SubscribeBundles2 (SubscribeBundlesRequest) returns (stream SubscribeBundlesResponse) {}
// Subscribe to blocks (internally calls SubscribeBundles).
rpc SubscribeBlocks (SubscribeBundlesRequest) returns (stream SubscribeBundlesResponse) {}
// Returns the block builder's tip pubkey and commission.
rpc GetBlockBuilderFeeInfo (BlockBuilderFeeInfoRequest) returns (BlockBuilderFeeInfoResponse) {}
// Report the validator's upcoming leader slot to the block engine.
rpc SubmitLeaderWindowInfo (SubmitLeaderWindowInfoRequest) returns (SubmitLeaderWindowInfoResponse) {}
// Discover available block engine endpoints for optimal region selection.
rpc GetBlockEngineEndpoints (GetBlockEngineEndpointRequest) returns (GetBlockEngineEndpointResponse) {}
}