Skip to content

Commit

Permalink
added assemble block request (#183)
Browse files Browse the repository at this point in the history
* ops

* i hope dis good

* EAGAIN design

* EAGAIN design

* done

* done

* next
  • Loading branch information
Giulio2002 committed Jul 27, 2023
1 parent 9ec3709 commit 2a4dcb5
Showing 1 changed file with 32 additions and 1 deletion.
33 changes: 32 additions & 1 deletion execution/execution.proto
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,45 @@ message ValidationRequest {
uint64 number = 2;
}

message AssembleBlockRequest {
types.H256 parentHash = 1;
uint64 timestamp = 2;
types.H256 mixDigest = 3;
types.H160 suggestedFeeRecipent = 4;
repeated types.Withdrawal withdrawals = 5;
}

message AssembleBlockResponse {
uint64 id = 1;
bool busy = 2;
}

message GetAssembledBlockRequest {
uint64 id = 1;
}

message AssembledBlockData {
types.ExecutionPayload execution_payload = 1;
types.H256 block_value = 2;
types.BlobsBundleV1 blobs_bundle = 3;
}

message GetAssembledBlockResponse {
optional AssembledBlockData data = 1;
bool busy = 2;
}

service Execution {
// Chain Putters.
rpc InsertHeaders(InsertHeadersRequest) returns(InsertionResult);
rpc InsertBodies(InsertBodiesRequest) returns(InsertionResult);
// Chain Validation and ForkChoice.
rpc ValidateChain(ValidationRequest) returns(ValidationReceipt);
rpc UpdateForkChoice(ForkChoice) returns(ForkChoiceReceipt);
rpc AssembleBlock(google.protobuf.Empty) returns(types.ExecutionPayload); // Builds on top of current head.
// Block Assembly
// EAGAIN design here, AssembleBlock initiates the asynchronous request, and GetAssembleBlock just return it if ready.
rpc AssembleBlock(AssembleBlockRequest) returns(AssembleBlockResponse);
rpc GetAssembledBlock(GetAssembledBlockRequest) returns(GetAssembledBlockResponse);
// Chain Getters.
rpc GetHeader(GetSegmentRequest) returns(GetHeaderResponse);
rpc GetBody(GetSegmentRequest) returns(GetBodyResponse);
Expand Down

0 comments on commit 2a4dcb5

Please sign in to comment.