diff --git a/execution/execution.proto b/execution/execution.proto index 5371d4c..e1d8477 100644 --- a/execution/execution.proto +++ b/execution/execution.proto @@ -107,6 +107,34 @@ 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); @@ -114,7 +142,10 @@ service Execution { // 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);