From 4993204aa20f1ab3ff24aee37fc302cdc3a6156b Mon Sep 17 00:00:00 2001 From: gupadhyaya Date: Fri, 30 Aug 2024 19:24:43 +0400 Subject: [PATCH] update sequencing interface to use batch hashes instead of batches and return timestamp for the batch --- proto/sequencing/sequencing.proto | 35 ++++++++++++++++++++++++------- 1 file changed, 28 insertions(+), 7 deletions(-) diff --git a/proto/sequencing/sequencing.proto b/proto/sequencing/sequencing.proto index d793017..8fae00f 100644 --- a/proto/sequencing/sequencing.proto +++ b/proto/sequencing/sequencing.proto @@ -1,5 +1,7 @@ syntax = "proto3"; -package rollkit; +package sequencing; + +import "google/protobuf/timestamp.proto"; // SequencerInput ... service SequencerInput { @@ -21,8 +23,20 @@ message SubmitRollupTransactionResponse { // SequencerOutput ... service SequencerOutput { - // SubmitRollupTransaction ... - rpc GetNextBatch(Batch) returns (Batch) {} + // GetNextBatch ... + rpc GetNextBatch(GetNextBatchRequest) returns (GetNextBatchResponse) {} +} + +// GetNextBatchRequest ... +message GetNextBatchRequest { + // Merkle tree hash of the last batch + repeated bytes last_batch_hash = 1; +} + +// GetNextBatchResponse ... +message GetNextBatchResponse { + Batch batch = 1; + google.protobuf.Timestamp timestamp = 2; } // Batch holds a list of transactions @@ -33,10 +47,17 @@ message Batch { // BatchVerifier service BatchVerifier { // VerifyBatch ... - rpc VerifyBatch(Batch) returns (VerificationResponse) {} + rpc VerifyBatch(VerifyBatchRequest) returns (VerifyBatchResponse) {} +} + +// VerifyBatchRequest ... +message VerifyBatchRequest { + // Merkle tree hash of the batch + repeated bytes batch_hash = 1; } -// VerificationResponse -message VerificationResponse { - bool success = 1; +// VerifyBatchResponse +message VerifyBatchResponse { + // status indicates the verification results + bool status = 1; }