File tree 6 files changed +18
-9
lines changed
aggchain-proof-builder/src
aggchain-proof-service/src
aggkit-prover-types/src/generated
6 files changed +18
-9
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,10 @@ pub struct AggchainProofBuilderRequest {
39
39
/// Aggregated full execution proof for the number of aggregated block
40
40
/// spans.
41
41
pub agg_span_proof : SP1ProofWithPublicValues ,
42
- /// First block in the aggregated span.
42
+ // Start block of the aggregated span proof. This block must match the end_block of the last
43
+ // proof. Even if it's needed in the input to match the previous one this block it's
44
+ // already proven. Therefore proving goes from start_block+1 to end_block both inclusive.
45
+ // Proof (start_block, end_block]
43
46
pub start_block : u64 ,
44
47
/// Last block in the aggregated span (inclusive).
45
48
pub end_block : u64 ,
@@ -61,7 +64,7 @@ pub struct AggchainProofBuilderRequest {
61
64
pub struct AggchainProofBuilderResponse {
62
65
/// Generated aggchain proof for the block range.
63
66
pub proof : SP1Proof ,
64
- /// First block included in the aggchain proof.
67
+ /// Start block of the aggregated span proof.
65
68
pub start_block : u64 ,
66
69
/// Last block included in the aggchain proof.
67
70
pub end_block : u64 ,
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ use crate::error::Error;
22
22
#[ derive( Default , Clone , Debug ) ]
23
23
#[ allow( unused) ]
24
24
pub struct AggchainProofServiceRequest {
25
- /// Aggchain proof starting block
25
+ /// Start block of the aggregated span proof.
26
26
pub start_block : u64 ,
27
27
/// Max number of blocks that the aggchain proof is allowed to contain
28
28
pub max_block : u64 ,
@@ -44,7 +44,7 @@ pub struct AggchainProofServiceResponse {
44
44
/// Aggchain proof generated by the `aggchain-proof-builder` service
45
45
/// per `agg-sender` request.
46
46
pub proof : SP1Proof ,
47
- /// First block in the aggchain proof.
47
+ /// Start block of the aggregated span proof.
48
48
pub start_block : u64 ,
49
49
/// Last block in the aggchain proof (inclusive).
50
50
pub end_block : u64 ,
Original file line number Diff line number Diff line change 2
2
/// The request message for generating aggchain proof.
3
3
#[ derive( Clone , PartialEq , :: prost:: Message ) ]
4
4
pub struct GenerateAggchainProofRequest {
5
- /// The start block for which the aggchain proof is requested.
5
+ /// Start block of the aggchain proof. This block must match the end_block of the last proof.
6
+ /// Even if it's needed in the input to match the previous one this block it's already proven.
7
+ /// Therefore proving goes from start_block+1 to end_block both inclusive.
8
+ /// Proof (start_block, end_block]
6
9
#[ prost( uint64, tag = "1" ) ]
7
10
pub start_block : u64 ,
8
11
/// The max end block for which the aggchain proof is requested.
@@ -35,7 +38,7 @@ pub struct GenerateAggchainProofResponse {
35
38
/// Aggchain proof.
36
39
#[ prost( bytes = "vec" , tag = "1" ) ]
37
40
pub aggchain_proof : :: prost:: alloc:: vec:: Vec < u8 > ,
38
- /// The start block of the aggchain proof.
41
+ /// Start block of the aggregated span proof.
39
42
#[ prost( uint64, tag = "2" ) ]
40
43
pub start_block : u64 ,
41
44
/// The end block of the aggchain proof.
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ impl AggchainProofGrpcService for GrpcService {
37
37
request : Request < GenerateAggchainProofRequest > ,
38
38
) -> Result < Response < GenerateAggchainProofResponse > , Status > {
39
39
let request = request. into_inner ( ) ;
40
- if request. max_end_block < request. start_block {
40
+ if request. max_end_block <= request. start_block {
41
41
let mut error = ErrorDetails :: new ( ) ;
42
42
error. add_bad_request_violation (
43
43
"max_end_block" ,
Original file line number Diff line number Diff line change @@ -10,7 +10,10 @@ service AggchainProofService {
10
10
11
11
// The request message for generating aggchain proof.
12
12
message GenerateAggchainProofRequest {
13
- // The start block for which the aggchain proof is requested.
13
+ // Start block of the aggchain proof. This block must match the end_block of the last proof.
14
+ // Even if it's needed in the input to match the previous one this block it's already proven.
15
+ // Therefore proving goes from start_block+1 to end_block both inclusive.
16
+ // Proof (start_block, end_block]
14
17
uint64 start_block = 1 ;
15
18
// The max end block for which the aggchain proof is requested.
16
19
uint64 max_end_block = 2 ;
@@ -30,7 +33,7 @@ message GenerateAggchainProofRequest {
30
33
message GenerateAggchainProofResponse {
31
34
// Aggchain proof.
32
35
bytes aggchain_proof = 1 ;
33
- // The start block of the aggchain proof.
36
+ // Start block of the aggregated span proof.
34
37
uint64 start_block = 2 ;
35
38
// The end block of the aggchain proof.
36
39
uint64 end_block = 3 ;
You can’t perform that action at this time.
0 commit comments