diff --git a/Makefile b/Makefile index 0c800cfe54..86096cb875 100644 --- a/Makefile +++ b/Makefile @@ -65,7 +65,7 @@ install-git-hooks: ## Moves hook files to the .git/hooks directory .PHONY: generate-code-from-proto generate-code-from-proto: ## Generates code from proto files cd proto/src/proto/statedb/v1 && protoc --proto_path=. --proto_path=../../../../include --go_out=../../../../../merkletree/pb --go-grpc_out=../../../../../merkletree/pb --go_opt=paths=source_relative --go-grpc_opt=paths=source_relative statedb.proto - cd proto/src/proto/executor/v1 && protoc --proto_path=. --go_out=../../../../../state/runtime/executor/pb --go-grpc_out=../../../../../state/runtime/executor/pb --go-grpc_opt=paths=source_relative --go_opt=paths=source_relative executor.proto + cd proto/src/proto/executor/v1 && protoc --proto_path=. --experimental_allow_proto3_optional --go_out=../../../../../state/runtime/executor/pb --go-grpc_out=../../../../../state/runtime/executor/pb --go-grpc_opt=paths=source_relative --go_opt=paths=source_relative executor.proto cd proto/src/proto/broadcast/v1 && protoc --proto_path=. --proto_path=../../../../include --go_out=../../../../../sequencer/broadcast/pb --go-grpc_out=../../../../../sequencer/broadcast/pb --go-grpc_opt=paths=source_relative --go_opt=paths=source_relative broadcast.proto cd proto/src/proto/aggregator/v1 && protoc --proto_path=. --proto_path=../../../../include --go_out=../../../../../aggregator/pb --go-grpc_out=../../../../../aggregator/pb --go-grpc_opt=paths=source_relative --go_opt=paths=source_relative aggregator.proto diff --git a/aggregator/pb/aggregator.pb.go b/aggregator/pb/aggregator.pb.go index e5edafd246..c332e6bbce 100644 --- a/aggregator/pb/aggregator.pb.go +++ b/aggregator/pb/aggregator.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 -// protoc v3.21.8 +// protoc-gen-go v1.25.0-devel +// protoc v3.14.0 // source: aggregator.proto package pb @@ -20,11 +20,11 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// * +//* // @dev Result -// - OK: succesfully completed -// - ERROR: request is not correct, i.e. input data is wrong -// - INTERNAL_ERROR: internal server error when delivering the response +// - OK: succesfully completed +// - ERROR: request is not correct, i.e. input data is wrong +// - INTERNAL_ERROR: internal server error when delivering the response type Result int32 const ( @@ -247,7 +247,6 @@ type AggregatorMessage struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // Types that are assignable to Request: - // // *AggregatorMessage_GetStatusRequest // *AggregatorMessage_GenBatchProofRequest // *AggregatorMessage_GenAggregatedProofRequest @@ -392,7 +391,6 @@ type ProverMessage struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // Types that are assignable to Response: - // // *ProverMessage_GetStatusResponse // *ProverMessage_GenBatchProofResponse // *ProverMessage_GenAggregatedProofResponse @@ -530,7 +528,7 @@ func (*ProverMessage_CancelResponse) isProverMessage_Response() {} func (*ProverMessage_GetProofResponse) isProverMessage_Response() {} -// * +//* // @dev GetStatusRequest type GetStatusRequest struct { state protoimpl.MessageState @@ -570,7 +568,7 @@ func (*GetStatusRequest) Descriptor() ([]byte, []int) { return file_aggregator_proto_rawDescGZIP(), []int{3} } -// * +//* // @dev GenBatchProofRequest // @param {input} - input prover type GenBatchProofRequest struct { @@ -620,7 +618,7 @@ func (x *GenBatchProofRequest) GetInput() *InputProver { return nil } -// * +//* // @dev GenAggregatedProofRequest // @param {recursive_proof_1} - proof json of the first batch to aggregate // @param {recursive_proof_2} - proof json of the second batch to aggregate @@ -679,7 +677,7 @@ func (x *GenAggregatedProofRequest) GetRecursiveProof_2() string { return "" } -// * +//* // @dev GenFinalProofRequest // @param {recursive_proof} - proof json of the batch or aggregated proof to finalise // @param {aggregator_addr} - address of the aggregator @@ -738,7 +736,7 @@ func (x *GenFinalProofRequest) GetAggregatorAddr() string { return "" } -// * +//* // @dev CancelRequest // @param {id} - identifier of the proof request to cancel type CancelRequest struct { @@ -788,7 +786,7 @@ func (x *CancelRequest) GetId() string { return "" } -// * +//* // @dev Request GetProof // @param {id} - proof identifier of the proof request // @param {timeout} - time to wait until the service responds @@ -847,7 +845,7 @@ func (x *GetProofRequest) GetTimeout() uint64 { return 0 } -// * +//* // @dev Response GetStatus // @param {status} - server status // - BOOTING: being ready to compute proofs @@ -1000,7 +998,7 @@ func (x *GetStatusResponse) GetFreeMemory() uint64 { return 0 } -// * +//* // @dev GenBatchProofResponse // @param {id} - proof identifier, to be used in GetProofRequest() // @param {result} - request result @@ -1059,7 +1057,7 @@ func (x *GenBatchProofResponse) GetResult() Result { return Result_UNSPECIFIED } -// * +//* // @dev GenAggregatedProofResponse // @param {id} - proof identifier, to be used in GetProofRequest() // @param {result} - request result @@ -1118,7 +1116,7 @@ func (x *GenAggregatedProofResponse) GetResult() Result { return Result_UNSPECIFIED } -// * +//* // @dev Response GenFinalProof // @param {id} - proof identifier, to be used in GetProofRequest() // @param {result} - request result @@ -1177,7 +1175,7 @@ func (x *GenFinalProofResponse) GetResult() Result { return Result_UNSPECIFIED } -// * +//* // @dev CancelResponse // @param {result} - request result type CancelResponse struct { @@ -1227,19 +1225,18 @@ func (x *CancelResponse) GetResult() Result { return Result_UNSPECIFIED } -// * +//* // @dev GetProofResponse // @param {id} - proof identifier // @param {final_proof} - groth16 proof + public circuit inputs // @param {recursive_proof} - recursive proof json // @param {result} - proof result -// - COMPLETED_OK: proof has been computed successfully and it is valid -// - ERROR: request error -// - COMPLETED_ERROR: proof has been computed successfully and it is not valid -// - PENDING: proof is being computed -// - INTERNAL_ERROR: server error during proof computation -// - CANCEL: proof has been cancelled -// +// - COMPLETED_OK: proof has been computed successfully and it is valid +// - ERROR: request error +// - COMPLETED_ERROR: proof has been computed successfully and it is not valid +// - PENDING: proof is being computed +// - INTERNAL_ERROR: server error during proof computation +// - CANCEL: proof has been cancelled // @param {result_string} - extends result information type GetProofResponse struct { state protoimpl.MessageState @@ -1248,7 +1245,6 @@ type GetProofResponse struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // Types that are assignable to Proof: - // // *GetProofResponse_FinalProof // *GetProofResponse_RecursiveProof Proof isGetProofResponse_Proof `protobuf_oneof:"proof"` @@ -1346,6 +1342,7 @@ func (*GetProofResponse_FinalProof) isGetProofResponse_Proof() {} func (*GetProofResponse_RecursiveProof) isGetProofResponse_Proof() {} +// // @dev FinalProof // @param {proof} - groth16 proof // @param {public} - public circuit inputs @@ -1404,6 +1401,7 @@ func (x *FinalProof) GetPublic() *PublicInputsExtended { return nil } +// // @dev PublicInputs // @param {old_state_root} // @param {old_acc_input_hash} @@ -1524,7 +1522,7 @@ func (x *PublicInputs) GetAggregatorAddr() string { return "" } -// * +//* // @dev ProofB // @param {proofs} - two elliptic curves points type ProofB struct { @@ -1574,7 +1572,7 @@ func (x *ProofB) GetProofs() []string { return nil } -// * +//* // @dev Proof // @param {proof_a} - elliptic curve point // @param {proof_b} - two elliptic curves points @@ -1642,7 +1640,7 @@ func (x *Proof) GetProofC() []string { return nil } -// * +//* // @dev InputProver // @param {public_inputs} - public inputs // @param {db} - database containing all key-values in smt matching the old state root @@ -1710,7 +1708,7 @@ func (x *InputProver) GetContractsBytecode() map[string]string { return nil } -// * +//* // @dev PublicInputsExtended // @param {public_inputs} - public inputs // @param {new_state_root} - final state root. Used as a sanity check. diff --git a/merkletree/pb/statedb.pb.go b/merkletree/pb/statedb.pb.go index 55db29345a..6aee328ee3 100644 --- a/merkletree/pb/statedb.pb.go +++ b/merkletree/pb/statedb.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 -// protoc v3.21.8 +// protoc-gen-go v1.25.0-devel +// protoc v3.14.0 // source: statedb.proto package pb @@ -123,7 +123,7 @@ func (x *Version) GetV0_0_1() string { return "" } -// * +//* // @dev SetRequest // @param {old_root} - merkle-tree root // @param {key} - key to set @@ -209,7 +209,7 @@ func (x *SetRequest) GetDetails() bool { return false } -// * +//* // @dev GetRequest // @param {root} - merkle-tree root // @param {key} - key to look for @@ -277,7 +277,7 @@ func (x *GetRequest) GetDetails() bool { return false } -// * +//* // @dev SetProgramRequest // @param {key} - hash to set // @param {data} - Program data to store @@ -345,7 +345,7 @@ func (x *SetProgramRequest) GetPersistent() bool { return false } -// * +//* // @dev GetProgramRequest // @param {key} - hash to get program data type GetProgramRequest struct { @@ -395,7 +395,7 @@ func (x *GetProgramRequest) GetKey() *Fea { return nil } -// * +//* // @dev SetResponse // @param {old_root} - merkle-tree root // @param {new_root} - merkle-tree new root @@ -535,7 +535,7 @@ func (x *SetResponse) GetResult() *ResultCode { return nil } -// * +//* // @dev GetResponse // @param {root} - merkle-tree root // @param {key} - key to look for @@ -648,7 +648,7 @@ func (x *GetResponse) GetResult() *ResultCode { return nil } -// * +//* // @dev SetProgramResponse // @param {result} - result code type SetProgramResponse struct { @@ -698,7 +698,7 @@ func (x *SetProgramResponse) GetResult() *ResultCode { return nil } -// * +//* // @dev GetProgramResponse // @param {data} - program data retrieved // @param {result} - result code @@ -757,7 +757,7 @@ func (x *GetProgramResponse) GetResult() *ResultCode { return nil } -// * +//* // @dev Array of 4 FE // @param {fe0} - Field Element value for pos 0 // @param {fe1} - Field Element value for pos 1 @@ -834,7 +834,7 @@ func (x *Fea) GetFe3() uint64 { return 0 } -// * +//* // @dev Siblings List // @param {sibling} - sibling type SiblingList struct { @@ -884,7 +884,7 @@ func (x *SiblingList) GetSibling() []uint64 { return nil } -// * +//* // @dev Result code // @param {code} - result code type ResultCode struct { diff --git a/pool/transaction.go b/pool/transaction.go index a987e6f8ff..23ba72bcce 100644 --- a/pool/transaction.go +++ b/pool/transaction.go @@ -39,14 +39,14 @@ type Transaction struct { // ZkCounters counters for the tx type ZkCounters struct { - CumulativeGasUsed int64 - UsedKeccakHashes int32 - UsedPoseidonHashes int32 - UsedPoseidonPaddings int32 - UsedMemAligns int32 - UsedArithmetics int32 - UsedBinaries int32 - UsedSteps int32 + CumulativeGasUsed uint64 + UsedKeccakHashes uint32 + UsedPoseidonHashes uint32 + UsedPoseidonPaddings uint32 + UsedMemAligns uint32 + UsedArithmetics uint32 + UsedBinaries uint32 + UsedSteps uint32 } // IsZkCountersBelowZero checks if any of the counters are below zero @@ -73,6 +73,18 @@ func (zkc *ZkCounters) SumUpZkCounters(txZkCounters ZkCounters) { zkc.UsedSteps += txZkCounters.UsedSteps } +// SubZkCounters subtract zk counters with passed zk counters (not safe) +func (zkc *ZkCounters) SubZkCounters(txZkCounters ZkCounters) { + zkc.CumulativeGasUsed -= txZkCounters.CumulativeGasUsed + zkc.UsedKeccakHashes -= txZkCounters.UsedKeccakHashes + zkc.UsedPoseidonHashes -= txZkCounters.UsedPoseidonHashes + zkc.UsedPoseidonPaddings -= txZkCounters.UsedPoseidonPaddings + zkc.UsedMemAligns -= txZkCounters.UsedMemAligns + zkc.UsedArithmetics -= txZkCounters.UsedArithmetics + zkc.UsedBinaries -= txZkCounters.UsedBinaries + zkc.UsedSteps -= txZkCounters.UsedSteps +} + // IsClaimTx checks, if tx is a claim tx func (tx *Transaction) IsClaimTx(l2BridgeAddr common.Address) bool { if tx.To() == nil { diff --git a/proto/src/proto/executor/v1/executor.proto b/proto/src/proto/executor/v1/executor.proto index 2bbc1672ef..da6b2750cf 100644 --- a/proto/src/proto/executor/v1/executor.proto +++ b/proto/src/proto/executor/v1/executor.proto @@ -45,6 +45,13 @@ message ProcessBatchResponse { uint64 cumulative_gas_used = 12; repeated ProcessTransactionResponse responses = 13; Error error = 14; + repeated TouchedAddresses touched_addresses = 15; +} + +message TouchedAddresses { + string address = 1; + optional uint64 nonce = 2; + optional string balance = 3; } message CallTrace { diff --git a/sequencer/broadcast/pb/broadcast.pb.go b/sequencer/broadcast/pb/broadcast.pb.go index daf78b512f..e6d3ed8a8a 100644 --- a/sequencer/broadcast/pb/broadcast.pb.go +++ b/sequencer/broadcast/pb/broadcast.pb.go @@ -3,8 +3,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 -// protoc v3.21.8 +// protoc-gen-go v1.25.0-devel +// protoc v3.14.0 // source: broadcast.proto package pb diff --git a/sequencer/dbmanager.go b/sequencer/dbmanager.go index 2084bcb720..ee21d67f67 100644 --- a/sequencer/dbmanager.go +++ b/sequencer/dbmanager.go @@ -1,5 +1,14 @@ package sequencer +import ( + "context" + "errors" + + "github.com/0xPolygonHermez/zkevm-node/state" + "github.com/ethereum/go-ethereum/common" + "github.com/jackc/pgx/v4" +) + // Pool Loader and DB Updater type dbManager struct { txPool txPool @@ -18,3 +27,53 @@ func (d *dbManager) Start() { func (d *dbManager) loadFromPool() { // TODO: Endless loop that keeps loading tx from the DB into the worker } + +func (d *dbManager) BeginStateTransaction(ctx context.Context) (pgx.Tx, error) { + tx, err := d.state.Begin(ctx) + if err != nil { + return nil, err + } + return tx, nil +} + +func (d *dbManager) StoreProcessedTransaction(ctx context.Context, dbTx pgx.Tx, batchNumber uint64, processedTx *state.ProcessTransactionResponse) error { + // TODO: Implement store of transaction and adding it to the batch + return errors.New("") +} + +func (d *dbManager) DeleteTxFromPool(ctx context.Context, dbTx pgx.Tx, txHash common.Hash) error { + // TODO: Delete transaction from Pool DB + return errors.New("") +} + +func (d *dbManager) StoreProcessedTxAndDeleteFromPool(ctx context.Context, batchNumber uint64, processedTx *state.ProcessTransactionResponse) { + for { // TODO: Finish the retry mechanism + dbTx, err := d.BeginStateTransaction(ctx) + if err != nil { + // TODO: handle + } + err = d.StoreProcessedTransaction(ctx, dbTx, batchNumber, processedTx) + if err != nil { + err = dbTx.Rollback(ctx) + if err != nil { + // TODO: handle + } + } + err = d.DeleteTxFromPool(ctx, dbTx, processedTx.TxHash) + if err != nil { + err = dbTx.Rollback(ctx) + if err != nil { + // TODO: handle + } + } + } +} + +func (d *dbManager) CloseBatch(ctx context.Context, receipt state.ProcessingReceipt) { + // TODO: Close current open batch +} + +func (d *dbManager) GetLastBatch(ctx context.Context) (*state.Batch, error) { + // TODO: Get last batch + return nil, errors.New("") +} diff --git a/sequencer/errors.go b/sequencer/errors.go new file mode 100644 index 0000000000..75eaf5afdf --- /dev/null +++ b/sequencer/errors.go @@ -0,0 +1,8 @@ +package sequencer + +import "errors" + +var ( + // ErrBatchRemainingResourcesOverflow error returned when the resources for the current batch are overflown + ErrBatchRemainingResourcesOverflow = errors.New("overflow of remaining resources for current batch %s") +) diff --git a/sequencer/finalizer.go b/sequencer/finalizer.go index 689fecffa8..306868874f 100644 --- a/sequencer/finalizer.go +++ b/sequencer/finalizer.go @@ -1,9 +1,15 @@ package sequencer import ( + "context" "fmt" + "sync" "time" + "github.com/0xPolygonHermez/zkevm-node/log" + + "github.com/ethereum/go-ethereum/core/types" + "github.com/0xPolygonHermez/zkevm-node/state" "github.com/ethereum/go-ethereum/common" ) @@ -13,10 +19,25 @@ type finalizer struct { GERCh chan common.Hash L2ReorgCh chan struct{} SendingToL1TimeoutCh chan bool - SequencerAddress common.Address + sequencerAddress common.Address worker workerInterface dbManager dbManagerInterface - executor executorInterface + executor stateInterface + maxTxsPerBatch uint64 +} + +func newFinalizer(worker workerInterface, dbManager dbManagerInterface, executor stateInterface, sequencerAddr common.Address, maxTxsPerBatch uint64) *finalizer { + return &finalizer{ + ForcedBatchCh: make(chan state.Batch), + GERCh: make(chan common.Hash), + L2ReorgCh: make(chan struct{}), + SendingToL1TimeoutCh: make(chan bool), + sequencerAddress: sequencerAddr, + worker: worker, + dbManager: dbManager, + executor: executor, + maxTxsPerBatch: maxTxsPerBatch, + } } type wipBatch struct { @@ -24,27 +45,33 @@ type wipBatch struct { initialStateRoot common.Hash intermediaryStateRoot common.Hash timestamp uint64 - GER common.Hash // 0x000...0 means to not update + GER common.Hash // 0x000...0 (ZeroHash) means to not update txs []TxTracker - remainingResources RemainingResources // Decide if we use remaining or used to keep track of the current batch resources + remainingResources RemainingResources } -func newFinalizer(worker workerInterface, dbManager dbManagerInterface, executor executorInterface) *finalizer { - // TODO: Init channels - return &finalizer{worker: worker, dbManager: dbManager, executor: executor} -} - -func (f *finalizer) Start() { - // TODO: Load last batch from DB +func (f *finalizer) Start(ctx context.Context) { + lastBatch, err := f.dbManager.GetLastBatch(ctx) + if err != nil { + log.Fatal("failed to get last batch") + } - wipBatch := wipBatch{} + wipBatch := wipBatch{ + GER: lastBatch.GlobalExitRoot, + initialStateRoot: lastBatch.StateRoot, + intermediaryStateRoot: lastBatch.StateRoot, + txs: make([]TxTracker, 0, f.maxTxsPerBatch), + } // Most of this will need mutex since goroutines (Finalize txs, L1 requirements) can modify concurrently var ( nextGER common.Hash nextGERDeadline int64 + nextGERMux sync.RWMutex // TODO: Check all places where need to be used nextForcedBatches []state.Batch nextForcedBatchDeadline int64 + nextForcedBatchesMux sync.RWMutex // TODO: Check all places where need to be used + //wipBatchMux sync.RWMutex // TODO: Check all places where need to be used ) fmt.Printf(nextGER.Hex()) @@ -68,8 +95,8 @@ func (f *finalizer) Start() { } // L2 reorg ch: TODO: analyze how we handle L2 reorg. Needs work from Sync as well. Some considerations: // - Txs that have been popped from the state should go back to the pool - // - Worker pool and efficicency list should be cleaned and updated - // - WIP batch should be discarted (taking care to not lose txs or GER update for later on) + // - Worker pool and efficiency list should be cleaned and updated + // - WIP batch should be discarded (taking care to not lose txs or GER update for later on) // Too many time without batches in L1 ch // Any other externality from the point of view of the sequencer should be captured using this pattern } @@ -81,29 +108,77 @@ func (f *finalizer) Start() { for { tx := f.worker.GetBestFittingTx(wipBatch.remainingResources) if tx != nil { + lenOfTxs := len(wipBatch.txs) + isFirstTx := lenOfTxs == 1 - // If it is not the first tx in the batch GER should be 0x00 - ger := wipBatch.GER - - // TODO: Populate processBatchRequest dinamic fields + var ger common.Hash + if isFirstTx { + ger = wipBatch.GER + } else { + ger = state.ZeroHash + } + // TODO: Populate processBatchRequest dynamic fields + processBatchRequest.GlobalExitRoot = ger + processBatchRequest.IsFirstTx = isFirstTx result := f.executor.ExecuteTransaction(processBatchRequest) + // executionResult := execute tx (only passing to the executor this tx, starting at currentBatch.intermediaryRoot) - // if ko: - // // decide if we [MoveTxToNotReady, DeleteTx, UpdateTx] - // if ok: - // // currentBatch.remainingResources.sub(executionResult.Counters) - // // if resourced overflows: - // // // f.worker.UpdateTx() - // // // continue (TODO: actually no, because we need to check the timeouts) - // // add tx to current batch - // // send tx to the DB (already finalized) through channel (async store) - // // remove tx from pool (already finalized) through channel (async store) - // // f.worker.UpdateAfterSingleSuccessfulTxExecution() + if result.Error != nil { + // // decide if we [MoveTxToNotReady, DeleteTx, UpdateTx] + + } else { + processedTx := result.Responses[0] + from, err := types.Sender(types.NewEIP155Signer(processedTx.Tx.ChainId()), &processedTx.Tx) + if err != nil { + from, err = types.Sender(types.HomesteadSigner{}, &processedTx.Tx) + } + + err = wipBatch.remainingResources.Sub(RemainingResources{ + remainingZKCounters: result.UsedZkCounters, + remainingBytes: uint64(processedTx.Tx.Size()), + remainingGas: processedTx.GasUsed, + }) + if err != nil { + f.worker.UpdateTx(processedTx.TxHash, from, wipBatch.remainingResources.remainingZKCounters) + // (TODO: check the timeouts) + continue + } + + // We have a successful processing if we are here + wipBatch.intermediaryStateRoot = result.NewStateRoot + processBatchRequest.StateRoot = result.NewStateRoot + processBatchRequest.OldAccInputHash = result.NewAccInputHash + // We store the processed transaction, add it to the batch and delete from the pool atomically. + go f.dbManager.StoreProcessedTxAndDeleteFromPool(ctx, wipBatch.batchNumber, processedTx) + go f.worker.UpdateAfterSingleSuccessfulTxExecution(from, result.TouchedAddresses) + } } else { - // check if the currentBatch is above a defined limit (almost full) - // if yes: - // // close batch and send batch info to the DB (already finalized) through channel (async store) + // TODO: check if the currentBatch is above a defined limit (almost full) + // TODO: if yes: + go func() { + ethTxs := make([]types.Transaction, 0, len(wipBatch.txs)) + for _, txTracker := range wipBatch.txs { + tx, err := state.DecodeTx(string(txTracker.RawTx)) + if err != nil { + log.Fatalf("failed to decode tx") + } + ethTxs = append(ethTxs, *tx) + } + receipt := state.ProcessingReceipt{ + BatchNumber: wipBatch.batchNumber, + AccInputHash: processBatchRequest.OldAccInputHash, + StateRoot: wipBatch.intermediaryStateRoot, + LocalExitRoot: processBatchRequest.GlobalExitRoot, + Txs: ethTxs, + } + f.dbManager.CloseBatch(ctx, receipt) + }() + wipBatch.batchNumber += 1 + wipBatch.txs = make([]TxTracker, 0, f.maxTxsPerBatch) + // TODO: Maybe to check the database for new GER and update the wipBatch? + + // TODO: // // go (decide if we need to execute the full batch as a sanity check, DO IT IN PARALLEL) ==> if error: log this txs somewhere and remove them from the pipeline // // if there are pending forced batches, execute them // // open batch: check if we have a new GER and update timestamp @@ -111,6 +186,7 @@ func (f *finalizer) Start() { } // Check deadlines if time.Now().Unix() >= nextForcedBatchDeadline { + nextForcedBatchesMux.Lock() // close batch for len(nextForcedBatches) > 0 { // forced batch = pop forced batch @@ -118,15 +194,19 @@ func (f *finalizer) Start() { // send state mod log update through chan } nextForcedBatchDeadline = 0 + nextForcedBatchesMux.Unlock() // open batch } if time.Now().Unix() >= nextGERDeadline { + nextGERMux.Lock() // close batch // open batch (with new GER) nextGER = common.Hash{} nextGERDeadline = 0 + nextGERMux.Unlock() } // if sleep flag activated: sleep + <-ctx.Done() } }() } diff --git a/sequencer/interfaces.go b/sequencer/interfaces.go index e831b9847f..7a6d40492f 100644 --- a/sequencer/interfaces.go +++ b/sequencer/interfaces.go @@ -4,6 +4,8 @@ import ( "context" "time" + "github.com/0xPolygonHermez/zkevm-node/pool" + ethmanTypes "github.com/0xPolygonHermez/zkevm-node/etherman/types" "github.com/0xPolygonHermez/zkevm-node/state" "github.com/ethereum/go-ethereum/common" @@ -35,6 +37,8 @@ type stateInterface interface { GetBatchByNumber(ctx context.Context, batchNumber uint64, dbTx pgx.Tx) (*state.Batch, error) GetTransactionsByBatchNumber(ctx context.Context, batchNumber uint64, dbTx pgx.Tx) (txs []types.Transaction, err error) IsBatchClosed(ctx context.Context, batchNum uint64, dbTx pgx.Tx) (bool, error) + Begin(ctx context.Context) (pgx.Tx, error) + ExecuteTransaction(processBatchRequest state.ProcessBatchRequest) state.ProcessBatchResponse } type txManager interface { @@ -43,11 +47,17 @@ type txManager interface { type workerInterface interface { GetBestFittingTx(resources RemainingResources) *TxTracker + UpdateAfterSingleSuccessfulTxExecution(from common.Address, touchedAddresses map[common.Address]*state.TouchedAddress) + UpdateTx(txHash common.Hash, from common.Address, ZKCounters pool.ZkCounters) } +// The dbManager will need to handle the errors inside the functions which don't return error as they will be used async in the other abstractions. +// Also if dbTx is missing this needs also to be handled ion the dbManager type dbManagerInterface interface { -} - -type executorInterface interface { - ExecuteTransaction(processBatchRequest state.ProcessBatchRequest) state.ProcessBatchResponse + BeginStateTransaction(ctx context.Context) (pgx.Tx, error) + StoreProcessedTransaction(ctx context.Context, dbTx pgx.Tx, batchNumber uint64, processedTx *state.ProcessTransactionResponse) error + DeleteTxFromPool(ctx context.Context, dbTx pgx.Tx, txHash common.Hash) error + StoreProcessedTxAndDeleteFromPool(ctx context.Context, batchNumber uint64, response *state.ProcessTransactionResponse) + CloseBatch(ctx context.Context, receipt state.ProcessingReceipt) + GetLastBatch(ctx context.Context) (*state.Batch, error) } diff --git a/sequencer/sequencer.go b/sequencer/sequencer.go index 2d08844003..022585117c 100644 --- a/sequencer/sequencer.go +++ b/sequencer/sequencer.go @@ -56,8 +56,8 @@ func (s *Sequencer) Start(ctx context.Context) { dbManager := newDBManager(s.pool, s.state, worker) go dbManager.Start() - finalizer := newFinalizer(worker, dbManager, s.state) - go finalizer.Start() + finalizer := newFinalizer(worker, dbManager, s.state, s.address, s.cfg.MaxTxsPerBatch) + go finalizer.Start(ctx) closingSignalsManager := newClosingSignalsManager(finalizer) go closingSignalsManager.Start() diff --git a/sequencer/worker.go b/sequencer/worker.go index 117c1eb53d..e074d86628 100644 --- a/sequencer/worker.go +++ b/sequencer/worker.go @@ -1,9 +1,12 @@ package sequencer import ( + "fmt" "math/big" "sync" + "github.com/0xPolygonHermez/zkevm-node/state" + "github.com/0xPolygonHermez/zkevm-node/pool" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" @@ -28,31 +31,33 @@ func (w *Worker) AddTx(tx TxTracker) { // // B) There was a tx ready (and it's worst than the new one) => delete from pool and efficiency list, add new one } -func (w *Worker) UpdateAfterSingleSuccessfulTxExecution(from common.Address, fromNonce uint64, fromBalance *big.Int, balances map[common.Address]*big.Int) { - newReadyTx, prevReadyTx := w.Pool[from].UpdateCurrentNonceBalance(&fromNonce, fromBalance) +func (w *Worker) UpdateAfterSingleSuccessfulTxExecution(from common.Address, touchedAddresses map[common.Address]*state.TouchedAddress) { + fromNonce, fromBalance := touchedAddresses[from].Nonce, touchedAddresses[from].Balance + w.ApplyAddressUpdate(from, fromNonce, fromBalance) + + for addr, addressInfo := range touchedAddresses { + w.ApplyAddressUpdate(addr, nil, addressInfo.Balance) + } +} + +func (w *Worker) ApplyAddressUpdate(from common.Address, fromNonce *uint64, fromBalance *big.Int) (*TxTracker, *TxTracker) { + newReadyTx, prevReadyTx := w.Pool[from].UpdateCurrentNonceBalance(fromNonce, fromBalance) if prevReadyTx != nil { w.efficiencyList.Delete(prevReadyTx.Hash) } if newReadyTx != nil { w.efficiencyList.Add(*newReadyTx) } - for addr, balance := range balances { - newReadyTx, prevReadyTx = w.Pool[addr].UpdateCurrentNonceBalance(nil, balance) - if prevReadyTx != nil { - w.efficiencyList.Delete(prevReadyTx.Hash) - } - if newReadyTx != nil { - w.efficiencyList.Add(*newReadyTx) - } - } + return newReadyTx, prevReadyTx } -// Assume that finalizer detected that a tx was not ready and decides to move to not ready after it fails to execute AND DOESN'T MODIFY THE STATE +// MoveTxToNotReady Assume that finalizer detected that a tx was not ready and decides to move to not ready after it fails to execute AND DOESN'T MODIFY THE STATE func (w *Worker) MoveTxToNotReady(from common.Address, txHash common.Hash, actualNonce *uint64, actualBalance *big.Int) { - w.UpdateAfterSingleSuccessfulTxExecution(from, *actualNonce, actualBalance, nil) + // TODO: Update this + w.ApplyAddressUpdate(from, actualNonce, actualBalance) } -// Assume that finalizer decides to delete the tx after it fails to execute AND DOESN'T MODIFY THE STATE +// DeleteTx Assume that finalizer decides to delete the tx after it fails to execute AND DOESN'T MODIFY THE STATE func (w *Worker) DeleteTx(txHash common.Hash, from common.Address, actualFromNonce *uint64, actualFromBalance *big.Int) { /* 1. Delete from w.Pool and w.efficiencyList @@ -103,9 +108,55 @@ type RemainingResources struct { remainingGas uint64 } -func (r *RemainingResources) sub(tx TxTracker) error { - // Substract resources - // error if underflow (restore in this case) +func (r *RemainingResources) Sub(other RemainingResources) error { + err := r.checkForResourcesOverflow(other) + if err != nil { + return err + } + r.remainingBytes -= other.remainingBytes + r.remainingGas -= other.remainingGas + r.remainingZKCounters.SubZkCounters(other.remainingZKCounters) + + return nil +} + +func (r *RemainingResources) checkForResourcesOverflow(other RemainingResources) error { + // Gas + if other.remainingGas > r.remainingGas { + return fmt.Errorf("%w. Resource: Gas", ErrBatchRemainingResourcesOverflow) + } + + // Bytes + if other.remainingBytes > r.remainingBytes { + return fmt.Errorf("%w. Resource: Bytes", ErrBatchRemainingResourcesOverflow) + } + + // ZkCounters + if other.remainingZKCounters.CumulativeGasUsed > r.remainingZKCounters.CumulativeGasUsed { + return fmt.Errorf("%w. Resource: ZkCounter.CumulativeGasUsed", ErrBatchRemainingResourcesOverflow) + } + if other.remainingZKCounters.UsedKeccakHashes > r.remainingZKCounters.UsedKeccakHashes { + return fmt.Errorf("%w. Resource: ZkCounter.UsedKeccakHashes", ErrBatchRemainingResourcesOverflow) + } + if other.remainingZKCounters.UsedPoseidonHashes > r.remainingZKCounters.UsedPoseidonHashes { + return fmt.Errorf("%w. Resource: ZkCounter.UsedPoseidonHashes", ErrBatchRemainingResourcesOverflow) + } + if other.remainingZKCounters.UsedPoseidonPaddings > r.remainingZKCounters.UsedPoseidonPaddings { + return fmt.Errorf("%w. Resource: ZkCounter.UsedPoseidonPaddings", ErrBatchRemainingResourcesOverflow) + } + if other.remainingZKCounters.UsedMemAligns > r.remainingZKCounters.UsedMemAligns { + return fmt.Errorf("%w. Resource: ZkCounter.UsedMemAligns", ErrBatchRemainingResourcesOverflow) + } + if other.remainingZKCounters.UsedArithmetics > r.remainingZKCounters.UsedArithmetics { + return fmt.Errorf("%w. Resource: ZkCounter.UsedArithmetics", ErrBatchRemainingResourcesOverflow) + } + if other.remainingZKCounters.UsedBinaries > r.remainingZKCounters.UsedBinaries { + return fmt.Errorf("%w. Resource: ZkCounter.UsedBinaries", ErrBatchRemainingResourcesOverflow) + } + if other.remainingZKCounters.UsedSteps > r.remainingZKCounters.UsedSteps { + return fmt.Errorf("%w. Resource: ZkCounter.UsedSteps", ErrBatchRemainingResourcesOverflow) + } + return nil } @@ -136,19 +187,19 @@ func (tx *TxTracker) CalculateEfficiency() { UsedArithmeticsWeight = 0.1 ) cost := float64(tx.ZKCounters.UsedArithmetics) * UsedArithmeticsWeight // do for all counters ... AND size - benefit := tx.ZKCounters.CumulativeGasUsed * tx.GasPrice + benefit := tx.ZKCounters.CumulativeGasUsed * uint64(tx.GasPrice) tx.Efficiency = float64(benefit) / cost } -func (p *Worker) getMostEfficientTx() (TxTracker, error) { +func (w *Worker) getMostEfficientTx() (TxTracker, error) { return TxTracker{}, nil } -func (p *Worker) len() int { +func (w *Worker) len() int { return 0 } -func (p *Worker) GetBestFittingTx(resources RemainingResources) *TxTracker { +func (w *Worker) GetBestFittingTx(resources RemainingResources) *TxTracker { var tx *TxTracker nGoRoutines := 4 // nCores - K // TODO: Think about this @@ -159,12 +210,16 @@ func (p *Worker) GetBestFittingTx(resources RemainingResources) *TxTracker { for i := 0; i < nGoRoutines; i++ { go func(n int) { defer wg.Done() - for i := n; i < len(p.efficiencyList); i += nGoRoutines { + for i := n; i < len(w.efficiencyList); i += nGoRoutines { if i > foundAt { return } - txCandidate := p.efficiencyList.GetMostEfficientByIndex(i) - err := resources.sub(*txCandidate) + txCandidate := w.efficiencyList.GetMostEfficientByIndex(i) + err := resources.Sub(RemainingResources{ + remainingZKCounters: txCandidate.ZKCounters, + remainingBytes: uint64(len(txCandidate.RawTx)), + remainingGas: txCandidate.Gas, + }) if err != nil { // We don't add this Tx continue diff --git a/state/ProcessBatchRequest.go b/state/ProcessBatchRequest.go deleted file mode 100644 index 77dc3bd3b6..0000000000 --- a/state/ProcessBatchRequest.go +++ /dev/null @@ -1,13 +0,0 @@ -package state - -import "github.com/ethereum/go-ethereum/common" - -type ProcessBatchRequest struct { - BatchNumber uint64 - StateRoot common.Hash - GlobalExitRoot common.Hash - OldAccInputHash common.Hash - TxData []byte - SequencerAddress common.Address - Timestamp uint64 -} diff --git a/state/converters.go b/state/converters.go index 539ab8829e..d4d3457b92 100644 --- a/state/converters.go +++ b/state/converters.go @@ -4,6 +4,8 @@ import ( "fmt" "math/big" + "github.com/0xPolygonHermez/zkevm-node/pool" + "github.com/0xPolygonHermez/zkevm-node/hex" "github.com/0xPolygonHermez/zkevm-node/log" "github.com/0xPolygonHermez/zkevm-node/state/runtime/executor" @@ -19,6 +21,19 @@ func TestConvertToProcessBatchResponse(txs []types.Transaction, response *pb.Pro return convertToProcessBatchResponse(txs, response) } +func ConvertToCounters(resp *pb.ProcessBatchResponse) pool.ZkCounters { + return pool.ZkCounters{ + CumulativeGasUsed: resp.CumulativeGasUsed, + UsedKeccakHashes: resp.CntKeccakHashes, + UsedPoseidonHashes: resp.CntPoseidonHashes, + UsedPoseidonPaddings: resp.CntPoseidonPaddings, + UsedMemAligns: resp.CntMemAligns, + UsedArithmetics: resp.CntArithmetics, + UsedBinaries: resp.CntBinaries, + UsedSteps: resp.CntSteps, + } +} + func convertToProcessBatchResponse(txs []types.Transaction, response *pb.ProcessBatchResponse) (*ProcessBatchResponse, error) { responses, err := convertToProcessTransactionResponse(txs, response.Responses) if err != nil { @@ -33,21 +48,15 @@ func convertToProcessBatchResponse(txs []types.Transaction, response *pb.Process } return &ProcessBatchResponse{ - NewStateRoot: common.BytesToHash(response.NewStateRoot), - NewAccInputHash: common.BytesToHash(response.NewAccInputHash), - NewLocalExitRoot: common.BytesToHash(response.NewLocalExitRoot), - NewBatchNumber: response.NewBatchNum, - CntKeccakHashes: response.CntKeccakHashes, - CntPoseidonHashes: response.CntPoseidonHashes, - CntPoseidonPaddings: response.CntPoseidonPaddings, - CntMemAligns: response.CntMemAligns, - CntArithmetics: response.CntArithmetics, - CntBinaries: response.CntBinaries, - CntSteps: response.CntSteps, - CumulativeGasUsed: response.CumulativeGasUsed, - Responses: responses, - Error: executor.Err(response.Error), - IsBatchProcessed: isBatchProcessed, + NewStateRoot: common.BytesToHash(response.NewStateRoot), + NewAccInputHash: common.BytesToHash(response.NewAccInputHash), + NewLocalExitRoot: common.BytesToHash(response.NewLocalExitRoot), + NewBatchNumber: response.NewBatchNum, + UsedZkCounters: ConvertToCounters(response), + Responses: responses, + Error: executor.Err(response.Error), + IsBatchProcessed: isBatchProcessed, + TouchedAddresses: convertToTouchedAddresses(response.TouchedAddresses), }, nil } @@ -93,6 +102,24 @@ func convertToProcessTransactionResponse(txs []types.Transaction, responses []*p return results, nil } +func convertToTouchedAddresses(touchedAddresses []*pb.TouchedAddresses) map[common.Address]*TouchedAddress { + result := make(map[common.Address]*TouchedAddress) + for _, info := range touchedAddresses { + parsedAddress := common.HexToAddress(info.Address) + balance := &big.Int{} + if info.Balance != nil { + balance.SetString(*info.Balance, 10) + } + result[parsedAddress] = &TouchedAddress{ + Address: parsedAddress, + Nonce: info.Nonce, + Balance: balance, + } + } + + return result +} + func convertToLog(protoLogs []*pb.Log) []*types.Log { logs := make([]*types.Log, 0, len(protoLogs)) diff --git a/state/runtime/executor/pb/executor.pb.go b/state/runtime/executor/pb/executor.pb.go index 7577f9a6cb..ae36d4386d 100644 --- a/state/runtime/executor/pb/executor.pb.go +++ b/state/runtime/executor/pb/executor.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 -// protoc v3.21.8 +// protoc-gen-go v1.25.0-devel +// protoc v3.14.0 // source: executor.proto package pb @@ -357,6 +357,7 @@ type ProcessBatchResponse struct { CumulativeGasUsed uint64 `protobuf:"varint,12,opt,name=cumulative_gas_used,json=cumulativeGasUsed,proto3" json:"cumulative_gas_used,omitempty"` Responses []*ProcessTransactionResponse `protobuf:"bytes,13,rep,name=responses,proto3" json:"responses,omitempty"` Error Error `protobuf:"varint,14,opt,name=error,proto3,enum=executor.v1.Error" json:"error,omitempty"` + TouchedAddresses []*TouchedAddresses `protobuf:"bytes,15,rep,name=touched_addresses,json=touchedAddresses,proto3" json:"touched_addresses,omitempty"` } func (x *ProcessBatchResponse) Reset() { @@ -489,6 +490,76 @@ func (x *ProcessBatchResponse) GetError() Error { return Error_ERROR_UNSPECIFIED } +func (x *ProcessBatchResponse) GetTouchedAddresses() []*TouchedAddresses { + if x != nil { + return x.TouchedAddresses + } + return nil +} + +type TouchedAddresses struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + Nonce *uint64 `protobuf:"varint,2,opt,name=nonce,proto3,oneof" json:"nonce,omitempty"` + Balance *string `protobuf:"bytes,3,opt,name=balance,proto3,oneof" json:"balance,omitempty"` +} + +func (x *TouchedAddresses) Reset() { + *x = TouchedAddresses{} + if protoimpl.UnsafeEnabled { + mi := &file_executor_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TouchedAddresses) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TouchedAddresses) ProtoMessage() {} + +func (x *TouchedAddresses) ProtoReflect() protoreflect.Message { + mi := &file_executor_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TouchedAddresses.ProtoReflect.Descriptor instead. +func (*TouchedAddresses) Descriptor() ([]byte, []int) { + return file_executor_proto_rawDescGZIP(), []int{2} +} + +func (x *TouchedAddresses) GetAddress() string { + if x != nil { + return x.Address + } + return "" +} + +func (x *TouchedAddresses) GetNonce() uint64 { + if x != nil && x.Nonce != nil { + return *x.Nonce + } + return 0 +} + +func (x *TouchedAddresses) GetBalance() string { + if x != nil && x.Balance != nil { + return *x.Balance + } + return "" +} + type CallTrace struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -501,7 +572,7 @@ type CallTrace struct { func (x *CallTrace) Reset() { *x = CallTrace{} if protoimpl.UnsafeEnabled { - mi := &file_executor_proto_msgTypes[2] + mi := &file_executor_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -514,7 +585,7 @@ func (x *CallTrace) String() string { func (*CallTrace) ProtoMessage() {} func (x *CallTrace) ProtoReflect() protoreflect.Message { - mi := &file_executor_proto_msgTypes[2] + mi := &file_executor_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -527,7 +598,7 @@ func (x *CallTrace) ProtoReflect() protoreflect.Message { // Deprecated: Use CallTrace.ProtoReflect.Descriptor instead. func (*CallTrace) Descriptor() ([]byte, []int) { - return file_executor_proto_rawDescGZIP(), []int{2} + return file_executor_proto_rawDescGZIP(), []int{3} } func (x *CallTrace) GetContext() *TransactionContext { @@ -578,7 +649,7 @@ type TransactionContext struct { func (x *TransactionContext) Reset() { *x = TransactionContext{} if protoimpl.UnsafeEnabled { - mi := &file_executor_proto_msgTypes[3] + mi := &file_executor_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -591,7 +662,7 @@ func (x *TransactionContext) String() string { func (*TransactionContext) ProtoMessage() {} func (x *TransactionContext) ProtoReflect() protoreflect.Message { - mi := &file_executor_proto_msgTypes[3] + mi := &file_executor_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -604,7 +675,7 @@ func (x *TransactionContext) ProtoReflect() protoreflect.Message { // Deprecated: Use TransactionContext.ProtoReflect.Descriptor instead. func (*TransactionContext) Descriptor() ([]byte, []int) { - return file_executor_proto_rawDescGZIP(), []int{3} + return file_executor_proto_rawDescGZIP(), []int{4} } func (x *TransactionContext) GetType() string { @@ -724,7 +795,7 @@ type TransactionStep struct { func (x *TransactionStep) Reset() { *x = TransactionStep{} if protoimpl.UnsafeEnabled { - mi := &file_executor_proto_msgTypes[4] + mi := &file_executor_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -737,7 +808,7 @@ func (x *TransactionStep) String() string { func (*TransactionStep) ProtoMessage() {} func (x *TransactionStep) ProtoReflect() protoreflect.Message { - mi := &file_executor_proto_msgTypes[4] + mi := &file_executor_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -750,7 +821,7 @@ func (x *TransactionStep) ProtoReflect() protoreflect.Message { // Deprecated: Use TransactionStep.ProtoReflect.Descriptor instead. func (*TransactionStep) Descriptor() ([]byte, []int) { - return file_executor_proto_rawDescGZIP(), []int{4} + return file_executor_proto_rawDescGZIP(), []int{5} } func (x *TransactionStep) GetStateRoot() []byte { @@ -852,7 +923,7 @@ type Contract struct { func (x *Contract) Reset() { *x = Contract{} if protoimpl.UnsafeEnabled { - mi := &file_executor_proto_msgTypes[5] + mi := &file_executor_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -865,7 +936,7 @@ func (x *Contract) String() string { func (*Contract) ProtoMessage() {} func (x *Contract) ProtoReflect() protoreflect.Message { - mi := &file_executor_proto_msgTypes[5] + mi := &file_executor_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -878,7 +949,7 @@ func (x *Contract) ProtoReflect() protoreflect.Message { // Deprecated: Use Contract.ProtoReflect.Descriptor instead. func (*Contract) Descriptor() ([]byte, []int) { - return file_executor_proto_rawDescGZIP(), []int{5} + return file_executor_proto_rawDescGZIP(), []int{6} } func (x *Contract) GetAddress() string { @@ -953,7 +1024,7 @@ type ProcessTransactionResponse struct { func (x *ProcessTransactionResponse) Reset() { *x = ProcessTransactionResponse{} if protoimpl.UnsafeEnabled { - mi := &file_executor_proto_msgTypes[6] + mi := &file_executor_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -966,7 +1037,7 @@ func (x *ProcessTransactionResponse) String() string { func (*ProcessTransactionResponse) ProtoMessage() {} func (x *ProcessTransactionResponse) ProtoReflect() protoreflect.Message { - mi := &file_executor_proto_msgTypes[6] + mi := &file_executor_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -979,7 +1050,7 @@ func (x *ProcessTransactionResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ProcessTransactionResponse.ProtoReflect.Descriptor instead. func (*ProcessTransactionResponse) Descriptor() ([]byte, []int) { - return file_executor_proto_rawDescGZIP(), []int{6} + return file_executor_proto_rawDescGZIP(), []int{7} } func (x *ProcessTransactionResponse) GetTxHash() []byte { @@ -1099,7 +1170,7 @@ type Log struct { func (x *Log) Reset() { *x = Log{} if protoimpl.UnsafeEnabled { - mi := &file_executor_proto_msgTypes[7] + mi := &file_executor_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1112,7 +1183,7 @@ func (x *Log) String() string { func (*Log) ProtoMessage() {} func (x *Log) ProtoReflect() protoreflect.Message { - mi := &file_executor_proto_msgTypes[7] + mi := &file_executor_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1125,7 +1196,7 @@ func (x *Log) ProtoReflect() protoreflect.Message { // Deprecated: Use Log.ProtoReflect.Descriptor instead. func (*Log) Descriptor() ([]byte, []int) { - return file_executor_proto_rawDescGZIP(), []int{7} + return file_executor_proto_rawDescGZIP(), []int{8} } func (x *Log) GetAddress() string { @@ -1218,7 +1289,7 @@ type ExecutionTraceStep struct { func (x *ExecutionTraceStep) Reset() { *x = ExecutionTraceStep{} if protoimpl.UnsafeEnabled { - mi := &file_executor_proto_msgTypes[8] + mi := &file_executor_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1231,7 +1302,7 @@ func (x *ExecutionTraceStep) String() string { func (*ExecutionTraceStep) ProtoMessage() {} func (x *ExecutionTraceStep) ProtoReflect() protoreflect.Message { - mi := &file_executor_proto_msgTypes[8] + mi := &file_executor_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1244,7 +1315,7 @@ func (x *ExecutionTraceStep) ProtoReflect() protoreflect.Message { // Deprecated: Use ExecutionTraceStep.ProtoReflect.Descriptor instead. func (*ExecutionTraceStep) Descriptor() ([]byte, []int) { - return file_executor_proto_rawDescGZIP(), []int{8} + return file_executor_proto_rawDescGZIP(), []int{9} } func (x *ExecutionTraceStep) GetPc() uint64 { @@ -1388,7 +1459,7 @@ var file_executor_proto_rawDesc = []byte{ 0x6f, 0x64, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x3a, 0x02, 0x38, 0x01, 0x22, 0xfc, 0x04, 0x0a, 0x14, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, + 0x3a, 0x02, 0x38, 0x01, 0x22, 0xc8, 0x05, 0x0a, 0x14, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x6e, 0x65, 0x77, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x6e, 0x65, 0x77, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, @@ -1428,207 +1499,219 @@ var file_executor_proto_rawDesc = []byte{ 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x12, 0x28, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, - 0x72, 0x6f, 0x72, 0x22, 0x7a, 0x0a, 0x09, 0x43, 0x61, 0x6c, 0x6c, 0x54, 0x72, 0x61, 0x63, 0x65, - 0x12, 0x39, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, - 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, - 0x78, 0x74, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x32, 0x0a, 0x05, 0x73, - 0x74, 0x65, 0x70, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x65, 0x78, 0x65, - 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x65, 0x70, 0x52, 0x05, 0x73, 0x74, 0x65, 0x70, 0x73, 0x22, - 0xbb, 0x02, 0x0a, 0x12, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, - 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x72, - 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x12, 0x0e, - 0x0a, 0x02, 0x74, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x74, 0x6f, 0x12, 0x12, - 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, - 0x74, 0x61, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x61, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x03, 0x67, 0x61, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x61, - 0x74, 0x63, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x62, 0x61, 0x74, 0x63, 0x68, - 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0c, - 0x52, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x61, 0x73, 0x5f, - 0x75, 0x73, 0x65, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x67, 0x61, 0x73, 0x55, - 0x73, 0x65, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x67, 0x61, 0x73, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, - 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x67, 0x61, 0x73, 0x50, 0x72, 0x69, 0x63, 0x65, - 0x12, 0x25, 0x0a, 0x0e, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, - 0x6d, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0d, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, - 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x6f, 0x6c, 0x64, 0x5f, 0x73, - 0x74, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x0c, 0x6f, 0x6c, 0x64, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x22, 0xde, 0x02, - 0x0a, 0x0f, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x65, - 0x70, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x74, - 0x12, 0x14, 0x0a, 0x05, 0x64, 0x65, 0x70, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, - 0x05, 0x64, 0x65, 0x70, 0x74, 0x68, 0x12, 0x0e, 0x0a, 0x02, 0x70, 0x63, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x02, 0x70, 0x63, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x61, 0x73, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x03, 0x67, 0x61, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x61, 0x73, 0x5f, - 0x63, 0x6f, 0x73, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x67, 0x61, 0x73, 0x43, - 0x6f, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x67, 0x61, 0x73, 0x5f, 0x72, 0x65, 0x66, 0x75, 0x6e, - 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x67, 0x61, 0x73, 0x52, 0x65, 0x66, 0x75, - 0x6e, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x6f, 0x70, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x02, - 0x6f, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x18, 0x08, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x05, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x65, 0x6d, 0x6f, - 0x72, 0x79, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, - 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, - 0x0a, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x44, 0x61, 0x74, - 0x61, 0x12, 0x31, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x18, 0x0b, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, - 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x74, - 0x72, 0x61, 0x63, 0x74, 0x12, 0x28, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x0c, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, - 0x31, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x78, - 0x0a, 0x08, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, - 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x61, 0x73, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x03, 0x67, 0x61, 0x73, 0x22, 0xf3, 0x03, 0x0a, 0x1a, 0x50, 0x72, 0x6f, - 0x63, 0x65, 0x73, 0x73, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x78, 0x5f, 0x68, 0x61, - 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, - 0x12, 0x15, 0x0a, 0x06, 0x72, 0x6c, 0x70, 0x5f, 0x74, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, - 0x52, 0x05, 0x72, 0x6c, 0x70, 0x54, 0x78, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x72, - 0x65, 0x74, 0x75, 0x72, 0x6e, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x0c, 0x52, 0x0b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x19, - 0x0a, 0x08, 0x67, 0x61, 0x73, 0x5f, 0x6c, 0x65, 0x66, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, - 0x52, 0x07, 0x67, 0x61, 0x73, 0x4c, 0x65, 0x66, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x61, 0x73, - 0x5f, 0x75, 0x73, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x67, 0x61, 0x73, - 0x55, 0x73, 0x65, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x67, 0x61, 0x73, 0x5f, 0x72, 0x65, 0x66, 0x75, - 0x6e, 0x64, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x67, 0x61, 0x73, 0x52, - 0x65, 0x66, 0x75, 0x6e, 0x64, 0x65, 0x64, 0x12, 0x28, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, - 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, - 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, - 0x72, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x61, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, - 0x65, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x74, - 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x24, 0x0a, 0x04, 0x6c, 0x6f, 0x67, 0x73, 0x18, - 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, - 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, 0x67, 0x52, 0x04, 0x6c, 0x6f, 0x67, 0x73, 0x12, 0x48, 0x0a, - 0x0f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x72, 0x61, 0x63, 0x65, - 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, - 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x72, - 0x61, 0x63, 0x65, 0x53, 0x74, 0x65, 0x70, 0x52, 0x0e, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, - 0x6f, 0x6e, 0x54, 0x72, 0x61, 0x63, 0x65, 0x12, 0x35, 0x0a, 0x0a, 0x63, 0x61, 0x6c, 0x6c, 0x5f, - 0x74, 0x72, 0x61, 0x63, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x65, 0x78, - 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x54, 0x72, - 0x61, 0x63, 0x65, 0x52, 0x09, 0x63, 0x61, 0x6c, 0x6c, 0x54, 0x72, 0x61, 0x63, 0x65, 0x22, 0xd7, - 0x01, 0x0a, 0x03, 0x4c, 0x6f, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x12, 0x16, 0x0a, 0x06, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0c, - 0x52, 0x06, 0x74, 0x6f, 0x70, 0x69, 0x63, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x21, 0x0a, 0x0c, - 0x62, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x0b, 0x62, 0x61, 0x74, 0x63, 0x68, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, - 0x17, 0x0a, 0x07, 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, - 0x52, 0x06, 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x78, 0x5f, 0x69, - 0x6e, 0x64, 0x65, 0x78, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x74, 0x78, 0x49, 0x6e, - 0x64, 0x65, 0x78, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x68, 0x61, 0x73, - 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x62, 0x61, 0x74, 0x63, 0x68, 0x48, 0x61, - 0x73, 0x68, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x08, 0x20, 0x01, 0x28, - 0x0d, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x22, 0xc7, 0x03, 0x0a, 0x12, 0x45, 0x78, 0x65, - 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x72, 0x61, 0x63, 0x65, 0x53, 0x74, 0x65, 0x70, 0x12, - 0x0e, 0x0a, 0x02, 0x70, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x70, 0x63, 0x12, - 0x0e, 0x0a, 0x02, 0x6f, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x6f, 0x70, 0x12, - 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x67, 0x61, 0x73, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, 0x72, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x69, 0x6e, - 0x67, 0x47, 0x61, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x61, 0x73, 0x5f, 0x63, 0x6f, 0x73, 0x74, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x67, 0x61, 0x73, 0x43, 0x6f, 0x73, 0x74, 0x12, - 0x16, 0x0a, 0x06, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x06, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x12, 0x1f, 0x0a, 0x0b, 0x6d, 0x65, 0x6d, 0x6f, 0x72, - 0x79, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x6d, 0x65, - 0x6d, 0x6f, 0x72, 0x79, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x63, - 0x6b, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x12, 0x1f, - 0x0a, 0x0b, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x08, 0x20, - 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x12, - 0x46, 0x0a, 0x07, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x2c, 0x2e, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x45, + 0x72, 0x6f, 0x72, 0x12, 0x4a, 0x0a, 0x11, 0x74, 0x6f, 0x75, 0x63, 0x68, 0x65, 0x64, 0x5f, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x18, 0x0f, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, + 0x2e, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x6f, 0x75, + 0x63, 0x68, 0x65, 0x64, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x52, 0x10, 0x74, + 0x6f, 0x75, 0x63, 0x68, 0x65, 0x64, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x65, 0x73, 0x22, + 0x7c, 0x0a, 0x10, 0x54, 0x6f, 0x75, 0x63, 0x68, 0x65, 0x64, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x65, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x19, 0x0a, + 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x48, 0x00, 0x52, 0x05, + 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x1d, 0x0a, 0x07, 0x62, 0x61, 0x6c, 0x61, + 0x6e, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x07, 0x62, 0x61, 0x6c, + 0x61, 0x6e, 0x63, 0x65, 0x88, 0x01, 0x01, 0x42, 0x08, 0x0a, 0x06, 0x5f, 0x6e, 0x6f, 0x6e, 0x63, + 0x65, 0x42, 0x0a, 0x0a, 0x08, 0x5f, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x22, 0x7a, 0x0a, + 0x09, 0x43, 0x61, 0x6c, 0x6c, 0x54, 0x72, 0x61, 0x63, 0x65, 0x12, 0x39, 0x0a, 0x07, 0x63, 0x6f, + 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x65, 0x78, + 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x07, 0x63, 0x6f, + 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x32, 0x0a, 0x05, 0x73, 0x74, 0x65, 0x70, 0x73, 0x18, 0x02, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, + 0x76, 0x31, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, + 0x65, 0x70, 0x52, 0x05, 0x73, 0x74, 0x65, 0x70, 0x73, 0x22, 0xbb, 0x02, 0x0a, 0x12, 0x54, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, + 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x74, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x66, 0x72, 0x6f, 0x6d, 0x12, 0x0e, 0x0a, 0x02, 0x74, 0x6f, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x74, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x10, 0x0a, 0x03, + 0x67, 0x61, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x67, 0x61, 0x73, 0x12, 0x14, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x61, 0x74, 0x63, 0x68, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x05, 0x62, 0x61, 0x74, 0x63, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x75, + 0x74, 0x70, 0x75, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x6f, 0x75, 0x74, 0x70, + 0x75, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x61, 0x73, 0x5f, 0x75, 0x73, 0x65, 0x64, 0x18, 0x09, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x67, 0x61, 0x73, 0x55, 0x73, 0x65, 0x64, 0x12, 0x1b, 0x0a, + 0x09, 0x67, 0x61, 0x73, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x67, 0x61, 0x73, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x65, 0x78, + 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0b, 0x20, 0x01, + 0x28, 0x0d, 0x52, 0x0d, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x69, 0x6d, + 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x6f, 0x6c, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x72, + 0x6f, 0x6f, 0x74, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x6f, 0x6c, 0x64, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x22, 0xde, 0x02, 0x0a, 0x0f, 0x54, 0x72, 0x61, 0x6e, + 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x65, 0x70, 0x12, 0x1d, 0x0a, 0x0a, 0x73, + 0x74, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x09, 0x73, 0x74, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x64, 0x65, + 0x70, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x64, 0x65, 0x70, 0x74, 0x68, + 0x12, 0x0e, 0x0a, 0x02, 0x70, 0x63, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x70, 0x63, + 0x12, 0x10, 0x0a, 0x03, 0x67, 0x61, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x67, + 0x61, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x61, 0x73, 0x5f, 0x63, 0x6f, 0x73, 0x74, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x67, 0x61, 0x73, 0x43, 0x6f, 0x73, 0x74, 0x12, 0x1d, 0x0a, + 0x0a, 0x67, 0x61, 0x73, 0x5f, 0x72, 0x65, 0x66, 0x75, 0x6e, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x09, 0x67, 0x61, 0x73, 0x52, 0x65, 0x66, 0x75, 0x6e, 0x64, 0x12, 0x0e, 0x0a, 0x02, + 0x6f, 0x70, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x02, 0x6f, 0x70, 0x12, 0x14, 0x0a, 0x05, + 0x73, 0x74, 0x61, 0x63, 0x6b, 0x18, 0x08, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x73, 0x74, 0x61, + 0x63, 0x6b, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x18, 0x09, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x06, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, + 0x74, 0x75, 0x72, 0x6e, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x0a, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x12, 0x31, 0x0a, 0x08, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, + 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, + 0x72, 0x61, 0x63, 0x74, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x12, 0x28, + 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e, + 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x72, 0x72, 0x6f, + 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x78, 0x0a, 0x08, 0x43, 0x6f, 0x6e, 0x74, + 0x72, 0x61, 0x63, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x16, + 0x0a, 0x06, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x12, 0x0a, 0x04, + 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, + 0x12, 0x10, 0x0a, 0x03, 0x67, 0x61, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x67, + 0x61, 0x73, 0x22, 0xf3, 0x03, 0x0a, 0x1a, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x54, 0x72, + 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x06, 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, 0x12, 0x15, 0x0a, 0x06, 0x72, 0x6c, + 0x70, 0x5f, 0x74, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x72, 0x6c, 0x70, 0x54, + 0x78, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, + 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x5f, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x72, 0x65, 0x74, + 0x75, 0x72, 0x6e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x61, 0x73, 0x5f, + 0x6c, 0x65, 0x66, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x67, 0x61, 0x73, 0x4c, + 0x65, 0x66, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x61, 0x73, 0x5f, 0x75, 0x73, 0x65, 0x64, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x67, 0x61, 0x73, 0x55, 0x73, 0x65, 0x64, 0x12, 0x21, + 0x0a, 0x0c, 0x67, 0x61, 0x73, 0x5f, 0x72, 0x65, 0x66, 0x75, 0x6e, 0x64, 0x65, 0x64, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x67, 0x61, 0x73, 0x52, 0x65, 0x66, 0x75, 0x6e, 0x64, 0x65, + 0x64, 0x12, 0x28, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x12, 0x2e, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x45, + 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x25, 0x0a, 0x0e, 0x63, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x09, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x6f, 0x6f, 0x74, + 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6f, + 0x74, 0x12, 0x24, 0x0a, 0x04, 0x6c, 0x6f, 0x67, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x10, 0x2e, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4c, 0x6f, + 0x67, 0x52, 0x04, 0x6c, 0x6f, 0x67, 0x73, 0x12, 0x48, 0x0a, 0x0f, 0x65, 0x78, 0x65, 0x63, 0x75, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x1f, 0x2e, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x72, 0x61, 0x63, 0x65, 0x53, 0x74, 0x65, - 0x70, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, - 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x64, 0x65, 0x70, 0x74, 0x68, - 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x64, 0x65, 0x70, 0x74, 0x68, 0x12, 0x1d, 0x0a, - 0x0a, 0x67, 0x61, 0x73, 0x5f, 0x72, 0x65, 0x66, 0x75, 0x6e, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, - 0x04, 0x52, 0x09, 0x67, 0x61, 0x73, 0x52, 0x65, 0x66, 0x75, 0x6e, 0x64, 0x12, 0x28, 0x0a, 0x05, - 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x65, 0x78, - 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, - 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x1a, 0x3a, 0x0a, 0x0c, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, - 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, - 0x38, 0x01, 0x2a, 0x9c, 0x07, 0x0a, 0x05, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x15, 0x0a, 0x11, - 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, - 0x44, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x4e, 0x4f, 0x5f, - 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x45, 0x52, 0x52, 0x4f, 0x52, - 0x5f, 0x4f, 0x55, 0x54, 0x5f, 0x4f, 0x46, 0x5f, 0x47, 0x41, 0x53, 0x10, 0x02, 0x12, 0x18, 0x0a, - 0x14, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x43, 0x4b, 0x5f, 0x4f, 0x56, 0x45, - 0x52, 0x46, 0x4c, 0x4f, 0x57, 0x10, 0x03, 0x12, 0x19, 0x0a, 0x15, 0x45, 0x52, 0x52, 0x4f, 0x52, - 0x5f, 0x53, 0x54, 0x41, 0x43, 0x4b, 0x5f, 0x55, 0x4e, 0x44, 0x45, 0x52, 0x46, 0x4c, 0x4f, 0x57, - 0x10, 0x04, 0x12, 0x1a, 0x0a, 0x16, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, - 0x45, 0x4e, 0x4f, 0x55, 0x47, 0x48, 0x5f, 0x46, 0x55, 0x4e, 0x44, 0x53, 0x10, 0x05, 0x12, 0x1e, - 0x0a, 0x1a, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x49, 0x4e, 0x53, 0x55, 0x46, 0x46, 0x49, 0x43, - 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x42, 0x41, 0x4c, 0x41, 0x4e, 0x43, 0x45, 0x10, 0x06, 0x12, 0x18, - 0x0a, 0x14, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x4e, 0x4f, 0x54, - 0x5f, 0x46, 0x4f, 0x55, 0x4e, 0x44, 0x10, 0x07, 0x12, 0x20, 0x0a, 0x1c, 0x45, 0x52, 0x52, 0x4f, - 0x52, 0x5f, 0x4d, 0x41, 0x58, 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x53, 0x49, 0x5a, 0x45, 0x5f, - 0x45, 0x58, 0x43, 0x45, 0x45, 0x44, 0x45, 0x44, 0x10, 0x08, 0x12, 0x24, 0x0a, 0x20, 0x45, 0x52, - 0x52, 0x4f, 0x52, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x52, 0x41, 0x43, 0x54, 0x5f, 0x41, 0x44, 0x44, - 0x52, 0x45, 0x53, 0x53, 0x5f, 0x43, 0x4f, 0x4c, 0x4c, 0x49, 0x53, 0x49, 0x4f, 0x4e, 0x10, 0x09, - 0x12, 0x0f, 0x0a, 0x0b, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x44, 0x45, 0x50, 0x54, 0x48, 0x10, - 0x0a, 0x12, 0x1c, 0x0a, 0x18, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, - 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x52, 0x45, 0x56, 0x45, 0x52, 0x54, 0x45, 0x44, 0x10, 0x0b, 0x12, - 0x1f, 0x0a, 0x1b, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x53, 0x54, - 0x4f, 0x52, 0x45, 0x5f, 0x4f, 0x55, 0x54, 0x5f, 0x4f, 0x46, 0x5f, 0x47, 0x41, 0x53, 0x10, 0x0c, - 0x12, 0x1e, 0x0a, 0x1a, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x4f, 0x55, 0x54, 0x5f, 0x4f, 0x46, - 0x5f, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x45, 0x52, 0x53, 0x5f, 0x53, 0x54, 0x45, 0x50, 0x10, 0x0d, - 0x12, 0x20, 0x0a, 0x1c, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x4f, 0x55, 0x54, 0x5f, 0x4f, 0x46, - 0x5f, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x45, 0x52, 0x53, 0x5f, 0x4b, 0x45, 0x43, 0x43, 0x41, 0x4b, - 0x10, 0x0e, 0x12, 0x20, 0x0a, 0x1c, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x4f, 0x55, 0x54, 0x5f, - 0x4f, 0x46, 0x5f, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x45, 0x52, 0x53, 0x5f, 0x42, 0x49, 0x4e, 0x41, - 0x52, 0x59, 0x10, 0x0f, 0x12, 0x1d, 0x0a, 0x19, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x4f, 0x55, - 0x54, 0x5f, 0x4f, 0x46, 0x5f, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x45, 0x52, 0x53, 0x5f, 0x4d, 0x45, - 0x4d, 0x10, 0x10, 0x12, 0x1f, 0x0a, 0x1b, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x4f, 0x55, 0x54, - 0x5f, 0x4f, 0x46, 0x5f, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x45, 0x52, 0x53, 0x5f, 0x41, 0x52, 0x49, - 0x54, 0x48, 0x10, 0x11, 0x12, 0x21, 0x0a, 0x1d, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x4f, 0x55, - 0x54, 0x5f, 0x4f, 0x46, 0x5f, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x45, 0x52, 0x53, 0x5f, 0x50, 0x41, - 0x44, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x12, 0x12, 0x22, 0x0a, 0x1e, 0x45, 0x52, 0x52, 0x4f, 0x52, - 0x5f, 0x4f, 0x55, 0x54, 0x5f, 0x4f, 0x46, 0x5f, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x45, 0x52, 0x53, - 0x5f, 0x50, 0x4f, 0x53, 0x45, 0x49, 0x44, 0x4f, 0x4e, 0x10, 0x13, 0x12, 0x14, 0x0a, 0x10, 0x45, - 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x54, 0x58, 0x10, - 0x14, 0x12, 0x25, 0x0a, 0x21, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x49, 0x4e, 0x54, 0x52, 0x49, - 0x4e, 0x53, 0x49, 0x43, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x53, 0x49, 0x47, - 0x4e, 0x41, 0x54, 0x55, 0x52, 0x45, 0x10, 0x15, 0x12, 0x24, 0x0a, 0x20, 0x45, 0x52, 0x52, 0x4f, - 0x52, 0x5f, 0x49, 0x4e, 0x54, 0x52, 0x49, 0x4e, 0x53, 0x49, 0x43, 0x5f, 0x49, 0x4e, 0x56, 0x41, - 0x4c, 0x49, 0x44, 0x5f, 0x43, 0x48, 0x41, 0x49, 0x4e, 0x5f, 0x49, 0x44, 0x10, 0x16, 0x12, 0x21, - 0x0a, 0x1d, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x49, 0x4e, 0x54, 0x52, 0x49, 0x4e, 0x53, 0x49, - 0x43, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x4e, 0x4f, 0x4e, 0x43, 0x45, 0x10, - 0x17, 0x12, 0x25, 0x0a, 0x21, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x49, 0x4e, 0x54, 0x52, 0x49, - 0x4e, 0x53, 0x49, 0x43, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x47, 0x41, 0x53, - 0x5f, 0x4c, 0x49, 0x4d, 0x49, 0x54, 0x10, 0x18, 0x12, 0x23, 0x0a, 0x1f, 0x45, 0x52, 0x52, 0x4f, + 0x70, 0x52, 0x0e, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x72, 0x61, 0x63, + 0x65, 0x12, 0x35, 0x0a, 0x0a, 0x63, 0x61, 0x6c, 0x6c, 0x5f, 0x74, 0x72, 0x61, 0x63, 0x65, 0x18, + 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, + 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x6c, 0x6c, 0x54, 0x72, 0x61, 0x63, 0x65, 0x52, 0x09, 0x63, + 0x61, 0x6c, 0x6c, 0x54, 0x72, 0x61, 0x63, 0x65, 0x22, 0xd7, 0x01, 0x0a, 0x03, 0x4c, 0x6f, 0x67, + 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x6f, + 0x70, 0x69, 0x63, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x06, 0x74, 0x6f, 0x70, 0x69, + 0x63, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x61, 0x74, 0x63, 0x68, 0x5f, + 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x61, + 0x74, 0x63, 0x68, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x78, 0x5f, + 0x68, 0x61, 0x73, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x74, 0x78, 0x48, 0x61, + 0x73, 0x68, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x78, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x74, 0x78, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x1d, 0x0a, + 0x0a, 0x62, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x09, 0x62, 0x61, 0x74, 0x63, 0x68, 0x48, 0x61, 0x73, 0x68, 0x12, 0x14, 0x0a, 0x05, + 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x69, 0x6e, 0x64, + 0x65, 0x78, 0x22, 0xc7, 0x03, 0x0a, 0x12, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, + 0x54, 0x72, 0x61, 0x63, 0x65, 0x53, 0x74, 0x65, 0x70, 0x12, 0x0e, 0x0a, 0x02, 0x70, 0x63, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x70, 0x63, 0x12, 0x0e, 0x0a, 0x02, 0x6f, 0x70, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x6f, 0x70, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x6d, + 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x67, 0x61, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x0c, 0x72, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x47, 0x61, 0x73, 0x12, 0x19, + 0x0a, 0x08, 0x67, 0x61, 0x73, 0x5f, 0x63, 0x6f, 0x73, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x07, 0x67, 0x61, 0x73, 0x43, 0x6f, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x65, 0x6d, + 0x6f, 0x72, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x6d, 0x65, 0x6d, 0x6f, 0x72, + 0x79, 0x12, 0x1f, 0x0a, 0x0b, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x5f, 0x73, 0x69, 0x7a, 0x65, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x53, 0x69, + 0x7a, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x18, 0x07, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x05, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x74, 0x75, + 0x72, 0x6e, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x72, + 0x65, 0x74, 0x75, 0x72, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x12, 0x46, 0x0a, 0x07, 0x73, 0x74, 0x6f, + 0x72, 0x61, 0x67, 0x65, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x65, 0x78, 0x65, + 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, + 0x6f, 0x6e, 0x54, 0x72, 0x61, 0x63, 0x65, 0x53, 0x74, 0x65, 0x70, 0x2e, 0x53, 0x74, 0x6f, 0x72, + 0x61, 0x67, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, + 0x65, 0x12, 0x14, 0x0a, 0x05, 0x64, 0x65, 0x70, 0x74, 0x68, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0d, + 0x52, 0x05, 0x64, 0x65, 0x70, 0x74, 0x68, 0x12, 0x1d, 0x0a, 0x0a, 0x67, 0x61, 0x73, 0x5f, 0x72, + 0x65, 0x66, 0x75, 0x6e, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x67, 0x61, 0x73, + 0x52, 0x65, 0x66, 0x75, 0x6e, 0x64, 0x12, 0x28, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, + 0x0c, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12, 0x2e, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, + 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, + 0x1a, 0x3a, 0x0a, 0x0c, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, + 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x2a, 0x9c, 0x07, 0x0a, + 0x05, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x15, 0x0a, 0x11, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, + 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x12, 0x0a, + 0x0e, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x4e, 0x4f, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, + 0x01, 0x12, 0x14, 0x0a, 0x10, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x4f, 0x55, 0x54, 0x5f, 0x4f, + 0x46, 0x5f, 0x47, 0x41, 0x53, 0x10, 0x02, 0x12, 0x18, 0x0a, 0x14, 0x45, 0x52, 0x52, 0x4f, 0x52, + 0x5f, 0x53, 0x54, 0x41, 0x43, 0x4b, 0x5f, 0x4f, 0x56, 0x45, 0x52, 0x46, 0x4c, 0x4f, 0x57, 0x10, + 0x03, 0x12, 0x19, 0x0a, 0x15, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x43, 0x4b, + 0x5f, 0x55, 0x4e, 0x44, 0x45, 0x52, 0x46, 0x4c, 0x4f, 0x57, 0x10, 0x04, 0x12, 0x1a, 0x0a, 0x16, + 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x45, 0x4e, 0x4f, 0x55, 0x47, 0x48, + 0x5f, 0x46, 0x55, 0x4e, 0x44, 0x53, 0x10, 0x05, 0x12, 0x1e, 0x0a, 0x1a, 0x45, 0x52, 0x52, 0x4f, + 0x52, 0x5f, 0x49, 0x4e, 0x53, 0x55, 0x46, 0x46, 0x49, 0x43, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x42, + 0x41, 0x4c, 0x41, 0x4e, 0x43, 0x45, 0x10, 0x06, 0x12, 0x18, 0x0a, 0x14, 0x45, 0x52, 0x52, 0x4f, + 0x52, 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x46, 0x4f, 0x55, 0x4e, 0x44, + 0x10, 0x07, 0x12, 0x20, 0x0a, 0x1c, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x4d, 0x41, 0x58, 0x5f, + 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x53, 0x49, 0x5a, 0x45, 0x5f, 0x45, 0x58, 0x43, 0x45, 0x45, 0x44, + 0x45, 0x44, 0x10, 0x08, 0x12, 0x24, 0x0a, 0x20, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x43, 0x4f, + 0x4e, 0x54, 0x52, 0x41, 0x43, 0x54, 0x5f, 0x41, 0x44, 0x44, 0x52, 0x45, 0x53, 0x53, 0x5f, 0x43, + 0x4f, 0x4c, 0x4c, 0x49, 0x53, 0x49, 0x4f, 0x4e, 0x10, 0x09, 0x12, 0x0f, 0x0a, 0x0b, 0x45, 0x52, + 0x52, 0x4f, 0x52, 0x5f, 0x44, 0x45, 0x50, 0x54, 0x48, 0x10, 0x0a, 0x12, 0x1c, 0x0a, 0x18, 0x45, + 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x52, + 0x45, 0x56, 0x45, 0x52, 0x54, 0x45, 0x44, 0x10, 0x0b, 0x12, 0x1f, 0x0a, 0x1b, 0x45, 0x52, 0x52, + 0x4f, 0x52, 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x53, 0x54, 0x4f, 0x52, 0x45, 0x5f, 0x4f, 0x55, + 0x54, 0x5f, 0x4f, 0x46, 0x5f, 0x47, 0x41, 0x53, 0x10, 0x0c, 0x12, 0x1e, 0x0a, 0x1a, 0x45, 0x52, + 0x52, 0x4f, 0x52, 0x5f, 0x4f, 0x55, 0x54, 0x5f, 0x4f, 0x46, 0x5f, 0x43, 0x4f, 0x55, 0x4e, 0x54, + 0x45, 0x52, 0x53, 0x5f, 0x53, 0x54, 0x45, 0x50, 0x10, 0x0d, 0x12, 0x20, 0x0a, 0x1c, 0x45, 0x52, + 0x52, 0x4f, 0x52, 0x5f, 0x4f, 0x55, 0x54, 0x5f, 0x4f, 0x46, 0x5f, 0x43, 0x4f, 0x55, 0x4e, 0x54, + 0x45, 0x52, 0x53, 0x5f, 0x4b, 0x45, 0x43, 0x43, 0x41, 0x4b, 0x10, 0x0e, 0x12, 0x20, 0x0a, 0x1c, + 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x4f, 0x55, 0x54, 0x5f, 0x4f, 0x46, 0x5f, 0x43, 0x4f, 0x55, + 0x4e, 0x54, 0x45, 0x52, 0x53, 0x5f, 0x42, 0x49, 0x4e, 0x41, 0x52, 0x59, 0x10, 0x0f, 0x12, 0x1d, + 0x0a, 0x19, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x4f, 0x55, 0x54, 0x5f, 0x4f, 0x46, 0x5f, 0x43, + 0x4f, 0x55, 0x4e, 0x54, 0x45, 0x52, 0x53, 0x5f, 0x4d, 0x45, 0x4d, 0x10, 0x10, 0x12, 0x1f, 0x0a, + 0x1b, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x4f, 0x55, 0x54, 0x5f, 0x4f, 0x46, 0x5f, 0x43, 0x4f, + 0x55, 0x4e, 0x54, 0x45, 0x52, 0x53, 0x5f, 0x41, 0x52, 0x49, 0x54, 0x48, 0x10, 0x11, 0x12, 0x21, + 0x0a, 0x1d, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x4f, 0x55, 0x54, 0x5f, 0x4f, 0x46, 0x5f, 0x43, + 0x4f, 0x55, 0x4e, 0x54, 0x45, 0x52, 0x53, 0x5f, 0x50, 0x41, 0x44, 0x44, 0x49, 0x4e, 0x47, 0x10, + 0x12, 0x12, 0x22, 0x0a, 0x1e, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x4f, 0x55, 0x54, 0x5f, 0x4f, + 0x46, 0x5f, 0x43, 0x4f, 0x55, 0x4e, 0x54, 0x45, 0x52, 0x53, 0x5f, 0x50, 0x4f, 0x53, 0x45, 0x49, + 0x44, 0x4f, 0x4e, 0x10, 0x13, 0x12, 0x14, 0x0a, 0x10, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x49, + 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x54, 0x58, 0x10, 0x14, 0x12, 0x25, 0x0a, 0x21, 0x45, + 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x49, 0x4e, 0x54, 0x52, 0x49, 0x4e, 0x53, 0x49, 0x43, 0x5f, 0x49, + 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x53, 0x49, 0x47, 0x4e, 0x41, 0x54, 0x55, 0x52, 0x45, + 0x10, 0x15, 0x12, 0x24, 0x0a, 0x20, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x49, 0x4e, 0x54, 0x52, + 0x49, 0x4e, 0x53, 0x49, 0x43, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x43, 0x48, + 0x41, 0x49, 0x4e, 0x5f, 0x49, 0x44, 0x10, 0x16, 0x12, 0x21, 0x0a, 0x1d, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x49, 0x4e, 0x54, 0x52, 0x49, 0x4e, 0x53, 0x49, 0x43, 0x5f, 0x49, 0x4e, 0x56, 0x41, - 0x4c, 0x49, 0x44, 0x5f, 0x42, 0x41, 0x4c, 0x41, 0x4e, 0x43, 0x45, 0x10, 0x19, 0x12, 0x2b, 0x0a, - 0x27, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x49, 0x4e, 0x54, 0x52, 0x49, 0x4e, 0x53, 0x49, 0x43, - 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x42, 0x41, 0x54, 0x43, 0x48, 0x5f, 0x47, - 0x41, 0x53, 0x5f, 0x4c, 0x49, 0x4d, 0x49, 0x54, 0x10, 0x1a, 0x12, 0x27, 0x0a, 0x23, 0x45, 0x52, - 0x52, 0x4f, 0x52, 0x5f, 0x49, 0x4e, 0x54, 0x52, 0x49, 0x4e, 0x53, 0x49, 0x43, 0x5f, 0x49, 0x4e, - 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x53, 0x45, 0x4e, 0x44, 0x45, 0x52, 0x5f, 0x43, 0x4f, 0x44, - 0x45, 0x10, 0x1b, 0x12, 0x1c, 0x0a, 0x18, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x42, 0x41, 0x54, - 0x43, 0x48, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x5f, 0x54, 0x4f, 0x4f, 0x5f, 0x42, 0x49, 0x47, 0x10, - 0x1c, 0x32, 0x68, 0x0a, 0x0f, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x12, 0x55, 0x0a, 0x0c, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x42, - 0x61, 0x74, 0x63, 0x68, 0x12, 0x20, 0x2e, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, - 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, - 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x42, 0x61, 0x74, 0x63, - 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x41, 0x5a, 0x3f, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x30, 0x78, 0x50, 0x6f, 0x6c, 0x79, - 0x67, 0x6f, 0x6e, 0x48, 0x65, 0x72, 0x6d, 0x65, 0x7a, 0x2f, 0x7a, 0x6b, 0x65, 0x76, 0x6d, 0x2d, - 0x6e, 0x6f, 0x64, 0x65, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2f, 0x72, 0x75, 0x6e, 0x74, 0x69, - 0x6d, 0x65, 0x2f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2f, 0x70, 0x62, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x4c, 0x49, 0x44, 0x5f, 0x4e, 0x4f, 0x4e, 0x43, 0x45, 0x10, 0x17, 0x12, 0x25, 0x0a, 0x21, 0x45, + 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x49, 0x4e, 0x54, 0x52, 0x49, 0x4e, 0x53, 0x49, 0x43, 0x5f, 0x49, + 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x47, 0x41, 0x53, 0x5f, 0x4c, 0x49, 0x4d, 0x49, 0x54, + 0x10, 0x18, 0x12, 0x23, 0x0a, 0x1f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x49, 0x4e, 0x54, 0x52, + 0x49, 0x4e, 0x53, 0x49, 0x43, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x42, 0x41, + 0x4c, 0x41, 0x4e, 0x43, 0x45, 0x10, 0x19, 0x12, 0x2b, 0x0a, 0x27, 0x45, 0x52, 0x52, 0x4f, 0x52, + 0x5f, 0x49, 0x4e, 0x54, 0x52, 0x49, 0x4e, 0x53, 0x49, 0x43, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, + 0x49, 0x44, 0x5f, 0x42, 0x41, 0x54, 0x43, 0x48, 0x5f, 0x47, 0x41, 0x53, 0x5f, 0x4c, 0x49, 0x4d, + 0x49, 0x54, 0x10, 0x1a, 0x12, 0x27, 0x0a, 0x23, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x49, 0x4e, + 0x54, 0x52, 0x49, 0x4e, 0x53, 0x49, 0x43, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, + 0x53, 0x45, 0x4e, 0x44, 0x45, 0x52, 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x10, 0x1b, 0x12, 0x1c, 0x0a, + 0x18, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x42, 0x41, 0x54, 0x43, 0x48, 0x5f, 0x44, 0x41, 0x54, + 0x41, 0x5f, 0x54, 0x4f, 0x4f, 0x5f, 0x42, 0x49, 0x47, 0x10, 0x1c, 0x32, 0x68, 0x0a, 0x0f, 0x45, + 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x55, + 0x0a, 0x0c, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x42, 0x61, 0x74, 0x63, 0x68, 0x12, 0x20, + 0x2e, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, + 0x63, 0x65, 0x73, 0x73, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x21, 0x2e, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, + 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x41, 0x5a, 0x3f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x30, 0x78, 0x50, 0x6f, 0x6c, 0x79, 0x67, 0x6f, 0x6e, 0x48, 0x65, 0x72, + 0x6d, 0x65, 0x7a, 0x2f, 0x7a, 0x6b, 0x65, 0x76, 0x6d, 0x2d, 0x6e, 0x6f, 0x64, 0x65, 0x2f, 0x73, + 0x74, 0x61, 0x74, 0x65, 0x2f, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x65, 0x78, 0x65, + 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1644,44 +1727,46 @@ func file_executor_proto_rawDescGZIP() []byte { } var file_executor_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_executor_proto_msgTypes = make([]protoimpl.MessageInfo, 12) +var file_executor_proto_msgTypes = make([]protoimpl.MessageInfo, 13) var file_executor_proto_goTypes = []interface{}{ (Error)(0), // 0: executor.v1.Error (*ProcessBatchRequest)(nil), // 1: executor.v1.ProcessBatchRequest (*ProcessBatchResponse)(nil), // 2: executor.v1.ProcessBatchResponse - (*CallTrace)(nil), // 3: executor.v1.CallTrace - (*TransactionContext)(nil), // 4: executor.v1.TransactionContext - (*TransactionStep)(nil), // 5: executor.v1.TransactionStep - (*Contract)(nil), // 6: executor.v1.Contract - (*ProcessTransactionResponse)(nil), // 7: executor.v1.ProcessTransactionResponse - (*Log)(nil), // 8: executor.v1.Log - (*ExecutionTraceStep)(nil), // 9: executor.v1.ExecutionTraceStep - nil, // 10: executor.v1.ProcessBatchRequest.DbEntry - nil, // 11: executor.v1.ProcessBatchRequest.ContractsBytecodeEntry - nil, // 12: executor.v1.ExecutionTraceStep.StorageEntry + (*TouchedAddresses)(nil), // 3: executor.v1.TouchedAddresses + (*CallTrace)(nil), // 4: executor.v1.CallTrace + (*TransactionContext)(nil), // 5: executor.v1.TransactionContext + (*TransactionStep)(nil), // 6: executor.v1.TransactionStep + (*Contract)(nil), // 7: executor.v1.Contract + (*ProcessTransactionResponse)(nil), // 8: executor.v1.ProcessTransactionResponse + (*Log)(nil), // 9: executor.v1.Log + (*ExecutionTraceStep)(nil), // 10: executor.v1.ExecutionTraceStep + nil, // 11: executor.v1.ProcessBatchRequest.DbEntry + nil, // 12: executor.v1.ProcessBatchRequest.ContractsBytecodeEntry + nil, // 13: executor.v1.ExecutionTraceStep.StorageEntry } var file_executor_proto_depIdxs = []int32{ - 10, // 0: executor.v1.ProcessBatchRequest.db:type_name -> executor.v1.ProcessBatchRequest.DbEntry - 11, // 1: executor.v1.ProcessBatchRequest.contracts_bytecode:type_name -> executor.v1.ProcessBatchRequest.ContractsBytecodeEntry - 7, // 2: executor.v1.ProcessBatchResponse.responses:type_name -> executor.v1.ProcessTransactionResponse + 11, // 0: executor.v1.ProcessBatchRequest.db:type_name -> executor.v1.ProcessBatchRequest.DbEntry + 12, // 1: executor.v1.ProcessBatchRequest.contracts_bytecode:type_name -> executor.v1.ProcessBatchRequest.ContractsBytecodeEntry + 8, // 2: executor.v1.ProcessBatchResponse.responses:type_name -> executor.v1.ProcessTransactionResponse 0, // 3: executor.v1.ProcessBatchResponse.error:type_name -> executor.v1.Error - 4, // 4: executor.v1.CallTrace.context:type_name -> executor.v1.TransactionContext - 5, // 5: executor.v1.CallTrace.steps:type_name -> executor.v1.TransactionStep - 6, // 6: executor.v1.TransactionStep.contract:type_name -> executor.v1.Contract - 0, // 7: executor.v1.TransactionStep.error:type_name -> executor.v1.Error - 0, // 8: executor.v1.ProcessTransactionResponse.error:type_name -> executor.v1.Error - 8, // 9: executor.v1.ProcessTransactionResponse.logs:type_name -> executor.v1.Log - 9, // 10: executor.v1.ProcessTransactionResponse.execution_trace:type_name -> executor.v1.ExecutionTraceStep - 3, // 11: executor.v1.ProcessTransactionResponse.call_trace:type_name -> executor.v1.CallTrace - 12, // 12: executor.v1.ExecutionTraceStep.storage:type_name -> executor.v1.ExecutionTraceStep.StorageEntry - 0, // 13: executor.v1.ExecutionTraceStep.error:type_name -> executor.v1.Error - 1, // 14: executor.v1.ExecutorService.ProcessBatch:input_type -> executor.v1.ProcessBatchRequest - 2, // 15: executor.v1.ExecutorService.ProcessBatch:output_type -> executor.v1.ProcessBatchResponse - 15, // [15:16] is the sub-list for method output_type - 14, // [14:15] is the sub-list for method input_type - 14, // [14:14] is the sub-list for extension type_name - 14, // [14:14] is the sub-list for extension extendee - 0, // [0:14] is the sub-list for field type_name + 3, // 4: executor.v1.ProcessBatchResponse.touched_addresses:type_name -> executor.v1.TouchedAddresses + 5, // 5: executor.v1.CallTrace.context:type_name -> executor.v1.TransactionContext + 6, // 6: executor.v1.CallTrace.steps:type_name -> executor.v1.TransactionStep + 7, // 7: executor.v1.TransactionStep.contract:type_name -> executor.v1.Contract + 0, // 8: executor.v1.TransactionStep.error:type_name -> executor.v1.Error + 0, // 9: executor.v1.ProcessTransactionResponse.error:type_name -> executor.v1.Error + 9, // 10: executor.v1.ProcessTransactionResponse.logs:type_name -> executor.v1.Log + 10, // 11: executor.v1.ProcessTransactionResponse.execution_trace:type_name -> executor.v1.ExecutionTraceStep + 4, // 12: executor.v1.ProcessTransactionResponse.call_trace:type_name -> executor.v1.CallTrace + 13, // 13: executor.v1.ExecutionTraceStep.storage:type_name -> executor.v1.ExecutionTraceStep.StorageEntry + 0, // 14: executor.v1.ExecutionTraceStep.error:type_name -> executor.v1.Error + 1, // 15: executor.v1.ExecutorService.ProcessBatch:input_type -> executor.v1.ProcessBatchRequest + 2, // 16: executor.v1.ExecutorService.ProcessBatch:output_type -> executor.v1.ProcessBatchResponse + 16, // [16:17] is the sub-list for method output_type + 15, // [15:16] is the sub-list for method input_type + 15, // [15:15] is the sub-list for extension type_name + 15, // [15:15] is the sub-list for extension extendee + 0, // [0:15] is the sub-list for field type_name } func init() { file_executor_proto_init() } @@ -1715,7 +1800,7 @@ func file_executor_proto_init() { } } file_executor_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CallTrace); i { + switch v := v.(*TouchedAddresses); i { case 0: return &v.state case 1: @@ -1727,7 +1812,7 @@ func file_executor_proto_init() { } } file_executor_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TransactionContext); i { + switch v := v.(*CallTrace); i { case 0: return &v.state case 1: @@ -1739,7 +1824,7 @@ func file_executor_proto_init() { } } file_executor_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TransactionStep); i { + switch v := v.(*TransactionContext); i { case 0: return &v.state case 1: @@ -1751,7 +1836,7 @@ func file_executor_proto_init() { } } file_executor_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Contract); i { + switch v := v.(*TransactionStep); i { case 0: return &v.state case 1: @@ -1763,7 +1848,7 @@ func file_executor_proto_init() { } } file_executor_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ProcessTransactionResponse); i { + switch v := v.(*Contract); i { case 0: return &v.state case 1: @@ -1775,7 +1860,7 @@ func file_executor_proto_init() { } } file_executor_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Log); i { + switch v := v.(*ProcessTransactionResponse); i { case 0: return &v.state case 1: @@ -1787,6 +1872,18 @@ func file_executor_proto_init() { } } file_executor_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Log); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_executor_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ExecutionTraceStep); i { case 0: return &v.state @@ -1799,13 +1896,14 @@ func file_executor_proto_init() { } } } + file_executor_proto_msgTypes[2].OneofWrappers = []interface{}{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_executor_proto_rawDesc, NumEnums: 1, - NumMessages: 12, + NumMessages: 13, NumExtensions: 0, NumServices: 1, }, diff --git a/state/state.go b/state/state.go index 45cd25a503..85e839dbd9 100644 --- a/state/state.go +++ b/state/state.go @@ -448,6 +448,11 @@ func (s *State) ProcessSequencerBatch( return result, nil } +func (s *State) ExecuteTransaction(processBatchRequest ProcessBatchRequest) ProcessBatchResponse { + // TODO: Implement + return ProcessBatchResponse{} +} + // ExecuteBatch is used by the synchronizer to reprocess batches to compare generated state root vs stored one func (s *State) ExecuteBatch(ctx context.Context, batchNumber uint64, batchL2Data []byte, dbTx pgx.Tx) (*pb.ProcessBatchResponse, error) { if dbTx == nil { diff --git a/state/types.go b/state/types.go index 194e5fe1ce..eaf50f4c5e 100644 --- a/state/types.go +++ b/state/types.go @@ -1,28 +1,45 @@ package state import ( + "math/big" + + "github.com/0xPolygonHermez/zkevm-node/pool" + "github.com/0xPolygonHermez/zkevm-node/state/runtime/instrumentation" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" ) +type TouchedAddress struct { + Address common.Address + Nonce *uint64 + Balance *big.Int +} + +// ProcessBatchRequest represents the request of a batch process. +type ProcessBatchRequest struct { + BatchNumber uint64 + StateRoot common.Hash + GlobalExitRoot common.Hash + OldAccInputHash common.Hash + TxData []byte + SequencerAddress common.Address + Timestamp uint64 + IsFirstTx bool + Caller CallerLabel +} + // ProcessBatchResponse represents the response of a batch process. type ProcessBatchResponse struct { - NewStateRoot common.Hash - NewAccInputHash common.Hash - NewLocalExitRoot common.Hash - NewBatchNumber uint64 - CntKeccakHashes uint32 - CntPoseidonHashes uint32 - CntPoseidonPaddings uint32 - CntMemAligns uint32 - CntArithmetics uint32 - CntBinaries uint32 - CntSteps uint32 - CumulativeGasUsed uint64 - Responses []*ProcessTransactionResponse - Error error - IsBatchProcessed bool + NewStateRoot common.Hash + NewAccInputHash common.Hash + NewLocalExitRoot common.Hash + NewBatchNumber uint64 + UsedZkCounters pool.ZkCounters + Responses []*ProcessTransactionResponse + Error error + IsBatchProcessed bool + TouchedAddresses map[common.Address]*TouchedAddress } // ProcessTransactionResponse represents the response of a tx process. diff --git a/test/scripts/init_network/main.go b/test/scripts/init_network/main.go index 1202e3412a..97de6e4d2e 100644 --- a/test/scripts/init_network/main.go +++ b/test/scripts/init_network/main.go @@ -22,7 +22,7 @@ package main // L1ETHAmountToSequencer: "200000000000000000000", // L1MaticAmountToSequencer: "200000000000000000000000", // }, -// SequencerAddress: "0x617b3a3528F9cDd6630fd3301B9c8911F7Bf063D", +// sequencerAddress: "0x617b3a3528F9cDd6630fd3301B9c8911F7Bf063D", // SequencerPrivateKey: "0x28b2b0318721be8c8339199172cd7cc8f5e273800a35616ec893083a4b32c02e", // TxTimeout: time.Minute, // }); err != nil { diff --git a/tools/network/network.go b/tools/network/network.go index cbe07c2b0f..7bda076adc 100644 --- a/tools/network/network.go +++ b/tools/network/network.go @@ -64,7 +64,7 @@ package network // L1Deployer L1Deployer // // Sequencer address, comes from the keystore passed to node // // on config -// SequencerAddress, SequencerPrivateKey string +// sequencerAddress, SequencerPrivateKey string // TxTimeout time.Duration // } @@ -136,11 +136,11 @@ package network // return err // } -// sequencerAddress := common.HexToAddress(nc.SequencerAddress) +// sequencerAddress := common.HexToAddress(nc.sequencerAddress) // if nc.L1Deployer.L1ETHAmountToSequencer != "" { // // Send some Ether from L1 deployer to sequencer acc // ethAmount, _ := big.NewInt(0).SetString(nc.L1Deployer.L1ETHAmountToSequencer, encoding.Base10) -// log.Infof("Transferring %s L1 ETH to sequencer %q from L1 deployer %q", nc.L1Deployer.L1ETHAmountToSequencer, nc.SequencerAddress, nc.L1Deployer.Address) +// log.Infof("Transferring %s L1 ETH to sequencer %q from L1 deployer %q", nc.L1Deployer.L1ETHAmountToSequencer, nc.sequencerAddress, nc.L1Deployer.Address) // fromAddress := common.HexToAddress(nc.L1Deployer.Address) // nonce, err := clientL1.PendingNonceAt(ctx, fromAddress) // if err != nil { @@ -173,7 +173,7 @@ package network // } // // Send matic to sequencer // maticAmount, _ := big.NewInt(0).SetString(nc.L1Deployer.L1MaticAmountToSequencer, encoding.Base10) -// log.Infof("Transferring %s L1 MATIC tokens to sequencer %q from L1 deployer %q", nc.L1Deployer.L1MaticAmountToSequencer, nc.SequencerAddress, nc.L1Deployer.Address) +// log.Infof("Transferring %s L1 MATIC tokens to sequencer %q from L1 deployer %q", nc.L1Deployer.L1MaticAmountToSequencer, nc.sequencerAddress, nc.L1Deployer.Address) // tx, err := maticTokenSC.Transfer(authDeployer, sequencerAddress, maticAmount) // if err != nil { // return err @@ -186,7 +186,7 @@ package network // } // // approve tokens to be used by PoE SC on behalf of the sequencer -// log.Infof("Approving %s L1 MATIC tokens to be used by PoE on behalf of the sequencer %q", maticAmount.String(), nc.SequencerAddress) +// log.Infof("Approving %s L1 MATIC tokens to be used by PoE on behalf of the sequencer %q", maticAmount.String(), nc.sequencerAddress) // tx, err = maticTokenSC.Approve(authSequencer, cfg.NetworkConfig.PoEAddr, maticAmount) // if err != nil { // return err