@@ -73,13 +73,16 @@ message BlockInfo {
73
73
}
74
74
75
75
service ValidatorService {
76
- // Fetches information about a specific mainchain block header.
76
+ // Fetches information about a specific mainchain block header,
77
+ // and optionally, it's ancestors
77
78
rpc GetBlockHeaderInfo (GetBlockHeaderInfoRequest )
78
79
returns (GetBlockHeaderInfoResponse );
79
80
80
81
// Fetches information about a specific mainchain block, and how it pertains
81
82
// to events happening on a specific sidechain.
82
83
rpc GetBlockInfo (GetBlockInfoRequest ) returns (GetBlockInfoResponse );
84
+ // Fetches BMM h* commitment for a specific mainchain block,
85
+ // and optionally, it's ancestors
83
86
rpc GetBmmHStarCommitment (GetBmmHStarCommitmentRequest )
84
87
returns (GetBmmHStarCommitmentResponse );
85
88
rpc GetChainInfo (GetChainInfoRequest ) returns (GetChainInfoResponse );
@@ -97,9 +100,14 @@ service ValidatorService {
97
100
98
101
message GetBlockHeaderInfoRequest {
99
102
cusf.common.v1.ReverseHex block_hash = 1 ;
103
+ // Request block header info for up to `max_ancestors` ancestors.
104
+ // Fewer ancestors MAY be returned.
105
+ optional uint32 max_ancestors = 2 ;
100
106
}
101
107
message GetBlockHeaderInfoResponse {
102
108
BlockHeaderInfo header_info = 1 ;
109
+ // Ancestors MUST be sorted newest-first
110
+ repeated BlockHeaderInfo ancestor_infos = 2 ;
103
111
}
104
112
105
113
message GetBlockInfoRequest {
@@ -122,13 +130,21 @@ message GetBlockInfoResponse {
122
130
message GetBmmHStarCommitmentRequest {
123
131
cusf.common.v1.ReverseHex block_hash = 1 ;
124
132
google.protobuf.UInt32Value sidechain_id = 2 ;
133
+ // Request commitments for up to `max_ancestors` ancestors.
134
+ // Fewer ancestors MAY be returned.
135
+ optional uint32 max_ancestors = 3 ;
125
136
}
126
137
message GetBmmHStarCommitmentResponse {
127
138
message BlockNotFoundError {
128
139
cusf.common.v1.ReverseHex block_hash = 1 ;
129
140
}
141
+ message OptionalCommitment {
142
+ optional cusf.common.v1.ConsensusHex commitment = 1 ;
143
+ }
130
144
message Commitment {
131
145
optional cusf.common.v1.ConsensusHex commitment = 1 ;
146
+ // Ancestors MUST be sorted newest-first
147
+ repeated OptionalCommitment ancestor_commitments = 2 ;
132
148
}
133
149
oneof result {
134
150
BlockNotFoundError block_not_found = 1 ;
0 commit comments