From 9540b735cc027943dbf8d2a21e03307b316bb1de Mon Sep 17 00:00:00 2001 From: Jordan Oroshiba Date: Mon, 10 Jul 2023 16:23:19 -0400 Subject: [PATCH] Changing from prev_state_root to prev_block_hash --- grpc/README.md | 2 +- grpc/execution/server.go | 2 +- grpc/gen/astria/execution/v1/execution.pb.go | 14 +++++++------- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/grpc/README.md b/grpc/README.md index 666fe69c50..3c57c1cb23 100644 --- a/grpc/README.md +++ b/grpc/README.md @@ -9,7 +9,7 @@ brew install leveldb make geth # generating protobuf files -buf generate buf.build/astria/execution-apis +buf generate buf.build/astria/astria --path "astria/execution" ``` See [private_network.md](../private_network.md) for running a local geth node. diff --git a/grpc/execution/server.go b/grpc/execution/server.go index bd083eeeb0..5a46ffd9e0 100644 --- a/grpc/execution/server.go +++ b/grpc/execution/server.go @@ -46,7 +46,7 @@ func NewExecutionServiceServer(eth *eth.Ethereum) *ExecutionServiceServer { func (s *ExecutionServiceServer) DoBlock(ctx context.Context, req *executionv1.DoBlockRequest) (*executionv1.DoBlockResponse, error) { log.Info("DoBlock called request", "request", req) - prevHeadHash := common.BytesToHash(req.PrevStateRoot) + prevHeadHash := common.BytesToHash(req.PrevBlockHash) // The Engine API has been modified to use transactions from this mempool and abide by it's ordering. s.eth.TxPool().SetAstriaOrdered(req.Transactions) diff --git a/grpc/gen/astria/execution/v1/execution.pb.go b/grpc/gen/astria/execution/v1/execution.pb.go index 39c62492b3..d33c499b1f 100644 --- a/grpc/gen/astria/execution/v1/execution.pb.go +++ b/grpc/gen/astria/execution/v1/execution.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.30.0 +// protoc-gen-go v1.31.0 // protoc (unknown) // source: astria/execution/v1/execution.proto @@ -26,7 +26,7 @@ type DoBlockRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - PrevStateRoot []byte `protobuf:"bytes,1,opt,name=prev_state_root,json=prevStateRoot,proto3" json:"prev_state_root,omitempty"` + PrevBlockHash []byte `protobuf:"bytes,1,opt,name=prev_block_hash,json=prevBlockHash,proto3" json:"prev_block_hash,omitempty"` Transactions [][]byte `protobuf:"bytes,2,rep,name=transactions,proto3" json:"transactions,omitempty"` Timestamp *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` } @@ -63,9 +63,9 @@ func (*DoBlockRequest) Descriptor() ([]byte, []int) { return file_astria_execution_v1_execution_proto_rawDescGZIP(), []int{0} } -func (x *DoBlockRequest) GetPrevStateRoot() []byte { +func (x *DoBlockRequest) GetPrevBlockHash() []byte { if x != nil { - return x.PrevStateRoot + return x.PrevBlockHash } return nil } @@ -311,9 +311,9 @@ var file_astria_execution_v1_execution_proto_rawDesc = []byte{ 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x96, 0x01, 0x0a, 0x0e, 0x44, 0x6f, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x26, - 0x0a, 0x0f, 0x70, 0x72, 0x65, 0x76, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x6f, 0x6f, - 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0d, 0x70, 0x72, 0x65, 0x76, 0x53, 0x74, 0x61, - 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, + 0x0a, 0x0f, 0x70, 0x72, 0x65, 0x76, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x61, 0x73, + 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0d, 0x70, 0x72, 0x65, 0x76, 0x42, 0x6c, 0x6f, + 0x63, 0x6b, 0x48, 0x61, 0x73, 0x68, 0x12, 0x22, 0x0a, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x0c, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e,