diff --git a/design/host/l1_block_processing.md b/design/host/l1_block_processing.md new file mode 100644 index 0000000000..ba89c290fb --- /dev/null +++ b/design/host/l1_block_processing.md @@ -0,0 +1,187 @@ +# Standardizing L1 Data Processing + +## Requirements + +1. Standardise the way in which we process l1 blocks to find the relevant data needed for processing on the L2 +2. Reduce the processing load on the enclave + +## Current Problems +* Multiple redundant loops through L1 block data +* Inconsistent processing patterns +* Unnecessary load on the enclave +* Scattered responsibility for L1 data extraction + +## Proposed Solution + +Loop through transactions to find events we care about in the guardian and submit these with the block to the enclave: + +* Rollup +* Secret request +* Cross chain messages +* GrantSequencer events + +```go +// L1EventType identifies different types of L1 transactions we care about +type L1EventType int + +const ( + RollupEvent L1EventType = iota + SecretRequestEvent + CrossChainMessageEvent + SequencerAddedEvent +) + +// ProcessedL1Data is submitted to the enclave by the guardian +type ProcessedL1Data struct { + BlockHeader *types.Header + Events map[L1EventType][]*L1EventData +} + +// L1Event represents a processed L1 transaction that's relevant to us +type L1EventData struct { + Type L1EventType + Transaction *types.Transaction + Receipt *types.Receipt + BlockHeader *types.Header + Blobs []*kzg4844.Blob // Only populated for blob transactions +} +``` +## Guardian +In the guardian we do all the transaction filtering to look for the event types we care about and then submit a +`ProcessedL1Data` object to the enclave via gRPC in the `SubmitL1Block` function. + +`TODO` what proof to submit? + +```go +// This can be added to the guardian, or we include in one of the existing guardian services +type L1Processor struct { + mgmtContractLib mgmtcontractlib.MgmtContractLib + blobResolver BlobResolver + logger gethlog.Logger +} + +func (p *L1Processor) ProcessBlock(br *common.BlockAndReceipts) (*common.ProcessedL1Data, error) { + processed := &common.ProcessedL1Data{ + BlockHeader: br.BlockHeader, + Events: make(map[L1EventType][]*common.L1EventData), + } + + // Extract blobs and hashes once + blobs, blobHashes, err := p.extractBlobsAndHashes(br) + if err != nil { + return nil, fmt.Errorf("failed to extract blobs: %w", err) + } + + // Single pass through transactions + for _, tx := range *br.RelevantTransactions() { + decodedTx := p.mgmtContractLib.DecodeTx(tx) + if decodedTx == nil { + continue + } + + // Find receipt for this transaction + receipt := br.GetReceipt(tx.Hash()) + + switch t := decodedTx.(type) { + case *ethadapter.L1RollupHashes: + // Verify blob hashes match for rollups + if err := verifyBlobHashes(t, blobHashes); err != nil { + p.logger.Warn("Invalid rollup blob hashes", "tx", tx.Hash(), "error", err) + continue + } + + processed.Events[RollupEvent] = append(processed.Events[RollupEvent], &common.L1EventData{ + TxHash: tx.Hash(), + Transaction: tx, + Receipt: receipt, + Blobs: blobs, + }) + + case *ethadapter.L1RequestSecretTx: + processed.Events[SecretRequestEvent] = append(processed.Events[SecretRequestEvent], &common.L1EventData{ + TxHash: tx.Hash(), + Transaction: tx, + Receipt: receipt, + }) + + case *ethadapter.L1InitializeSecretTx: + processed.Events[SecretRequestEvent] = append(processed.Events[SecretRequestEvent], &common.L1EventData{ + TxHash: tx.Hash(), + Transaction: tx, + Receipt: receipt, + }) + + // Add other event types... + } + } + + return processed, nil +} +``` + +## Enclave side + +On the enclave side we handle each of the `processedData.Events[L1EventType]` individually and don't have duplicate loops +through the transactions. + +Correct ordering of these event processing is going to be the biggest pain point I suspect. + +```go +func (e *enclaveAdminService) ingestL1Block(ctx context.Context, processedData *common.ProcessedL1Data) (*components.BlockIngestionType, error) { + + // Process block first to ensure it's valid and get ingestion type + ingestion, err := e.l1BlockProcessor.Process(ctx, processedData.BlockHeader) + if err != nil { + if errors.Is(err, errutil.ErrBlockAncestorNotFound) || errors.Is(err, errutil.ErrBlockAlreadyProcessed) { + e.logger.Debug("Did not ingest block", log.ErrKey, err, log.BlockHashKey, processedData.BlockHeader.Hash()) + } else { + e.logger.Warn("Failed ingesting block", log.ErrKey, err, log.BlockHashKey, processedData.BlockHeader.Hash()) + } + return nil, err + } + + // Process each event type in order + var secretResponses []*common.ProducedSecretResponse + + // rollups + if rollupEvents, exists := processedData.Events[RollupEvent]; exists { + for _, event := range rollupEvents { + if err := e.rollupConsumer.ProcessRollup(ctx, event); err != nil { + if !errors.Is(err, components.ErrDuplicateRollup) { + e.logger.Error("Failed processing rollup", log.ErrKey, err) + // Continue processing other events even if one rollup fails + } + } + } + } + + // secret requests + if secretEvents, exists := processedData.Events[SecretRequestEvent]; exists { + for _, event := range secretEvents { + resp, err := e.sharedSecretProcessor.ProcessSecretRequest(ctx, event) + if err != nil { + e.logger.Error("Failed to process secret request", "tx", event.TxHash, "error", err) + continue + } + if resp != nil { + secretResponses = append(secretResponses, resp) + } + } + } + + // cross chain messages & add sequencer etc + + // Handle any L1 reorg/fork + if ingestion.IsFork() { + e.registry.OnL1Reorg(ingestion) + if err := e.service.OnL1Fork(ctx, ingestion.ChainFork); err != nil { + return nil, err + } + } + + // Add secret responses to ingestion result + ingestion.SecretResponses = secretResponses + + return ingestion, nil +} +``` \ No newline at end of file diff --git a/go/common/enclave.go b/go/common/enclave.go index 18eab5287c..14508fc846 100644 --- a/go/common/enclave.go +++ b/go/common/enclave.go @@ -73,7 +73,7 @@ type EnclaveAdmin interface { // It is the responsibility of the host to gossip the returned rollup // For good functioning the caller should always submit blocks ordered by height // submitting a block before receiving ancestors of it, will result in it being ignored - SubmitL1Block(ctx context.Context, blockHeader *types.Header, receipts []*TxAndReceiptAndBlobs) (*BlockSubmissionResponse, SystemError) + SubmitL1Block(ctx context.Context, blockHeader *types.Header, processedData *ProcessedL1Data) (*BlockSubmissionResponse, SystemError) // SubmitBatch submits a batch received from the sequencer for processing. SubmitBatch(ctx context.Context, batch *ExtBatch) SystemError diff --git a/go/common/host/services.go b/go/common/host/services.go index ba8c27d565..40f89b4344 100644 --- a/go/common/host/services.go +++ b/go/common/host/services.go @@ -2,6 +2,7 @@ package host import ( "context" + "github.com/ten-protocol/go-ten/go/ethadapter" "math/big" "github.com/ten-protocol/go-ten/go/responses" @@ -10,7 +11,6 @@ import ( gethcommon "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" "github.com/ten-protocol/go-ten/go/common" - "github.com/ten-protocol/go-ten/go/ethadapter" ) // service names - these are the keys used to register known services with the host @@ -80,13 +80,15 @@ type P2PBatchRequestHandler interface { type L1BlockRepository interface { // Subscribe will register a block handler to receive new blocks as they arrive, returns unsubscribe func Subscribe(handler L1BlockHandler) func() - + // FetchBlockByHeight returns a block at a given height FetchBlockByHeight(height *big.Int) (*types.Block, error) // FetchNextBlock returns the next canonical block after a given block hash // It returns the new block, a bool which is true if the block is the current L1 head and a bool if the block is on a different fork to prevBlock FetchNextBlock(prevBlock gethcommon.Hash) (*types.Block, bool, error) // FetchObscuroReceipts returns the receipts for a given L1 block FetchObscuroReceipts(block *common.L1Block) (types.Receipts, error) + // ExtractTenTransactions returns the tx data and types of those relevant to Ten to be consumed by the enclave + ExtractTenTransactions(block *common.L1Block) (*common.ProcessedL1Data, error) } // L1BlockHandler is an interface for receiving new blocks from the repository as they arrive diff --git a/go/common/l1/l1_transaction.go b/go/common/l1/l1_transaction.go new file mode 100644 index 0000000000..73d993476b --- /dev/null +++ b/go/common/l1/l1_transaction.go @@ -0,0 +1,5 @@ +package l1 + +// L1Transaction is an abstraction that transforms an Ethereum transaction into a format that can be consumed more +// easily by TEN. +type L1Transaction interface{} diff --git a/go/common/l1_transaction.go b/go/common/l1_transaction.go new file mode 100644 index 0000000000..88999e4cfc --- /dev/null +++ b/go/common/l1_transaction.go @@ -0,0 +1,75 @@ +package common + +import ( + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/crypto/kzg4844" +) + +// TenTransaction is an abstraction that transforms an Ethereum transaction into a format that can be consumed more +// easily by TEN. +type TenTransaction interface{} + +// L1TxType represents different types of L1 transactions +type L1TxType uint8 // Change to uint8 for RLP serialization + +const ( + RollupTx L1TxType = iota + SecretRequestTx + InitialiseSecretTx + CrossChainMessageTx + CrossChainValueTranserTx + SequencerAddedTx + SetImportantContractsTx +) + +// L1Event represents a single event type and its associated transactions +type L1Event struct { + Type uint8 // Change to uint8 for RLP serialization + Txs []*L1TxData +} + +// ProcessedL1Data is submitted to the enclave by the guardian +type ProcessedL1Data struct { + BlockHeader *types.Header + Events []L1Event // Changed from map to slice of L1Event +} + +// L1TxData represents an L1 transaction that's relevant to us +type L1TxData struct { + Type TenTransaction + Transaction *types.Transaction + Receipt *types.Receipt + Blobs []*kzg4844.Blob // Only populated for blob transactions + CrossChainMessages *CrossChainMessages // Only populated for xchain messages + ValueTransfers *ValueTransferEvents // Only populated for xchain transfers +} + +// helper methods as we can't serialize a map +func (p *ProcessedL1Data) AddEvent(txType L1TxType, tx *L1TxData) { + for i := range p.Events { + if p.Events[i].Type == uint8(txType) { + p.Events[i].Txs = append(p.Events[i].Txs, tx) + return + } + } + p.Events = append(p.Events, L1Event{ + Type: uint8(txType), // Convert to uint8 when storing + Txs: []*L1TxData{tx}, + }) +} + +func (p *ProcessedL1Data) GetEvents(txType L1TxType) []*L1TxData { + if p == nil || len(p.Events) == 0 { + return nil + } + + for _, event := range p.Events { + if event.Type == uint8(txType) { + if event.Txs == nil { + return nil + } + return event.Txs + } + } + return nil +} diff --git a/go/common/rpc/generated/enclave.pb.go b/go/common/rpc/generated/enclave.pb.go index 0397deae6e..1ae349f2df 100644 --- a/go/common/rpc/generated/enclave.pb.go +++ b/go/common/rpc/generated/enclave.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.34.2 -// protoc v5.28.2 +// protoc-gen-go v1.32.0 +// protoc v4.25.3 // source: enclave.proto package generated @@ -1907,8 +1907,8 @@ type SubmitBlockRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - EncodedBlock []byte `protobuf:"bytes,1,opt,name=encodedBlock,proto3" json:"encodedBlock,omitempty"` - EncodedReceipts []byte `protobuf:"bytes,2,opt,name=encodedReceipts,proto3" json:"encodedReceipts,omitempty"` + EncodedBlock []byte `protobuf:"bytes,1,opt,name=encodedBlock,proto3" json:"encodedBlock,omitempty"` + EncodedProcessedData []byte `protobuf:"bytes,2,opt,name=encodedProcessedData,proto3" json:"encodedProcessedData,omitempty"` } func (x *SubmitBlockRequest) Reset() { @@ -1950,9 +1950,9 @@ func (x *SubmitBlockRequest) GetEncodedBlock() []byte { return nil } -func (x *SubmitBlockRequest) GetEncodedReceipts() []byte { +func (x *SubmitBlockRequest) GetEncodedProcessedData() []byte { if x != nil { - return x.EncodedReceipts + return x.EncodedProcessedData } return nil } @@ -3732,357 +3732,357 @@ var file_enclave_proto_rawDesc = []byte{ 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x0b, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x22, - 0x62, 0x0a, 0x12, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, + 0x6c, 0x0a, 0x12, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x22, 0x0a, 0x0c, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x65, 0x6e, 0x63, - 0x6f, 0x64, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x28, 0x0a, 0x0f, 0x65, 0x6e, 0x63, - 0x6f, 0x64, 0x65, 0x64, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0c, 0x52, 0x0f, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x52, 0x65, 0x63, 0x65, 0x69, - 0x70, 0x74, 0x73, 0x22, 0xb0, 0x01, 0x0a, 0x13, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x42, 0x6c, - 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5f, 0x0a, 0x17, 0x62, - 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, - 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x75, + 0x6f, 0x64, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x32, 0x0a, 0x14, 0x65, 0x6e, 0x63, + 0x6f, 0x64, 0x65, 0x64, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65, 0x64, 0x44, 0x61, 0x74, + 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x14, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, + 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x65, 0x64, 0x44, 0x61, 0x74, 0x61, 0x22, 0xb0, 0x01, + 0x0a, 0x13, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5f, 0x0a, 0x17, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x4d, 0x73, 0x67, 0x52, 0x17, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x0b, - 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x79, - 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x0b, 0x73, 0x79, 0x73, 0x74, 0x65, - 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x3a, 0x0a, 0x0e, 0x45, 0x6e, 0x63, 0x43, 0x61, 0x6c, - 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x28, 0x0a, 0x0f, 0x65, 0x6e, 0x63, 0x72, - 0x79, 0x70, 0x74, 0x65, 0x64, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0c, 0x52, 0x0f, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x22, 0x83, 0x01, 0x0a, 0x0f, 0x45, 0x6e, 0x63, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x16, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, - 0x64, 0x45, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x16, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x45, - 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, - 0x0a, 0x0b, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, - 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x0b, 0x73, 0x79, 0x73, - 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x42, 0x0a, 0x12, 0x53, 0x75, 0x62, 0x6d, - 0x69, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2c, - 0x0a, 0x05, 0x62, 0x61, 0x74, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, - 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x45, 0x78, 0x74, 0x42, 0x61, 0x74, - 0x63, 0x68, 0x4d, 0x73, 0x67, 0x52, 0x05, 0x62, 0x61, 0x74, 0x63, 0x68, 0x22, 0x4f, 0x0a, 0x13, - 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x0b, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, - 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, - 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, - 0x52, 0x0b, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x0d, 0x0a, - 0x0b, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x48, 0x0a, 0x0c, - 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x0b, - 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x79, - 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x0b, 0x73, 0x79, 0x73, 0x74, 0x65, - 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x50, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x64, - 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x12, 0x24, 0x0a, 0x0d, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x72, 0x4f, 0x72, 0x48, - 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0d, 0x62, 0x6c, 0x6f, 0x63, 0x6b, - 0x4e, 0x72, 0x4f, 0x72, 0x48, 0x61, 0x73, 0x68, 0x22, 0x5f, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x43, - 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, - 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, - 0x38, 0x0a, 0x0b, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, - 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x0b, 0x73, 0x79, - 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x58, 0x0a, 0x10, 0x53, 0x75, 0x62, - 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, - 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x02, 0x69, 0x64, 0x12, 0x34, 0x0a, - 0x15, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, - 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x15, 0x65, 0x6e, - 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, - 0x69, 0x6f, 0x6e, 0x22, 0x4d, 0x0a, 0x11, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, + 0x65, 0x64, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, + 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x73, 0x67, 0x52, 0x17, 0x62, + 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x0b, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, + 0x45, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x65, + 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, + 0x72, 0x6f, 0x72, 0x52, 0x0b, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, + 0x22, 0x3a, 0x0a, 0x0e, 0x45, 0x6e, 0x63, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x28, 0x0a, 0x0f, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x65, 0x6e, 0x63, + 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x83, 0x01, 0x0a, + 0x0f, 0x45, 0x6e, 0x63, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x36, 0x0a, 0x16, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x45, 0x6e, 0x63, 0x6c, 0x61, + 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x16, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x45, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x0b, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x0b, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, - 0x6f, 0x72, 0x22, 0x24, 0x0a, 0x12, 0x55, 0x6e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, - 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0c, 0x52, 0x02, 0x69, 0x64, 0x22, 0x4f, 0x0a, 0x13, 0x55, 0x6e, 0x73, 0x75, - 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x38, 0x0a, 0x0b, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, - 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x0b, 0x73, 0x79, - 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x67, 0x0a, 0x13, 0x48, 0x65, 0x61, - 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x38, 0x0a, 0x0b, 0x73, 0x79, 0x73, 0x74, - 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, - 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, - 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x0b, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, - 0x6f, 0x72, 0x22, 0x0b, 0x0a, 0x09, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x41, 0x72, 0x67, 0x73, 0x22, - 0xc0, 0x01, 0x0a, 0x14, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4d, 0x73, 0x67, 0x12, 0x16, 0x0a, 0x06, 0x52, 0x65, 0x70, 0x6f, - 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, - 0x12, 0x16, 0x0a, 0x06, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, - 0x52, 0x06, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x45, 0x6e, 0x63, 0x6c, - 0x61, 0x76, 0x65, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x45, 0x6e, 0x63, - 0x6c, 0x61, 0x76, 0x65, 0x49, 0x44, 0x12, 0x20, 0x0a, 0x0b, 0x48, 0x6f, 0x73, 0x74, 0x41, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x48, 0x6f, 0x73, - 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x38, 0x0a, 0x0b, 0x73, 0x79, 0x73, 0x74, - 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, - 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, - 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x0b, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, - 0x6f, 0x72, 0x22, 0xae, 0x01, 0x0a, 0x1a, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x75, 0x62, 0x6d, - 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x73, - 0x67, 0x12, 0x56, 0x0a, 0x17, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x64, 0x53, 0x65, 0x63, - 0x72, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, - 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x73, 0x67, - 0x52, 0x17, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x64, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x12, 0x38, 0x0a, 0x05, 0x65, 0x72, 0x72, - 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, - 0x61, 0x74, 0x65, 0x64, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x73, 0x67, 0x52, 0x05, 0x65, 0x72, - 0x72, 0x6f, 0x72, 0x22, 0x47, 0x0a, 0x17, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x75, 0x62, 0x6d, - 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x73, 0x67, 0x12, 0x14, - 0x0a, 0x05, 0x63, 0x61, 0x75, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x63, - 0x61, 0x75, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6c, 0x31, 0x48, 0x65, 0x61, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x6c, 0x31, 0x48, 0x65, 0x61, 0x64, 0x22, 0x89, 0x01, 0x0a, - 0x0d, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4d, 0x73, 0x67, 0x12, 0x16, - 0x0a, 0x06, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, - 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, - 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, - 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0d, 0x52, 0x05, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x54, 0x6f, 0x70, 0x69, - 0x63, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x12, 0x18, - 0x0a, 0x07, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x07, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x22, 0x6e, 0x0a, 0x0b, 0x45, 0x78, 0x74, 0x42, - 0x61, 0x74, 0x63, 0x68, 0x4d, 0x73, 0x67, 0x12, 0x31, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, - 0x74, 0x65, 0x64, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, - 0x73, 0x67, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x78, - 0x48, 0x61, 0x73, 0x68, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x08, 0x74, 0x78, - 0x48, 0x61, 0x73, 0x68, 0x65, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x74, 0x78, 0x73, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0c, 0x52, 0x03, 0x74, 0x78, 0x73, 0x22, 0xaa, 0x05, 0x0a, 0x0e, 0x42, 0x61, 0x74, - 0x63, 0x68, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x73, 0x67, 0x12, 0x1e, 0x0a, 0x0a, 0x50, - 0x61, 0x72, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x0a, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x12, 0x14, 0x0a, 0x05, 0x50, - 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x50, 0x72, 0x6f, 0x6f, - 0x66, 0x12, 0x12, 0x0a, 0x04, 0x52, 0x6f, 0x6f, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x04, 0x52, 0x6f, 0x6f, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x54, 0x78, 0x48, 0x61, 0x73, 0x68, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x54, 0x78, 0x48, 0x61, 0x73, 0x68, 0x12, 0x16, 0x0a, - 0x06, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x4e, - 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x2a, 0x0a, 0x10, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, - 0x65, 0x72, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x4e, 0x6f, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x10, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x72, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x4e, - 0x6f, 0x12, 0x20, 0x0a, 0x0b, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x48, 0x61, 0x73, 0x68, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x48, - 0x61, 0x73, 0x68, 0x12, 0x14, 0x0a, 0x05, 0x45, 0x78, 0x74, 0x72, 0x61, 0x18, 0x08, 0x20, 0x01, - 0x28, 0x0c, 0x52, 0x05, 0x45, 0x78, 0x74, 0x72, 0x61, 0x12, 0x1c, 0x0a, 0x09, 0x53, 0x69, 0x67, - 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x53, 0x69, - 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x47, 0x61, 0x73, 0x4c, 0x69, - 0x6d, 0x69, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x47, 0x61, 0x73, 0x4c, 0x69, - 0x6d, 0x69, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x47, 0x61, 0x73, 0x55, 0x73, 0x65, 0x64, 0x18, 0x0b, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x47, 0x61, 0x73, 0x55, 0x73, 0x65, 0x64, 0x12, 0x12, 0x0a, - 0x04, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x54, 0x69, 0x6d, - 0x65, 0x12, 0x18, 0x0a, 0x07, 0x42, 0x61, 0x73, 0x65, 0x46, 0x65, 0x65, 0x18, 0x0d, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x07, 0x42, 0x61, 0x73, 0x65, 0x46, 0x65, 0x65, 0x12, 0x44, 0x0a, 0x1d, 0x4c, + 0x6f, 0x72, 0x22, 0x42, 0x0a, 0x12, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x42, 0x61, 0x74, 0x63, + 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2c, 0x0a, 0x05, 0x62, 0x61, 0x74, 0x63, + 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, + 0x74, 0x65, 0x64, 0x2e, 0x45, 0x78, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x4d, 0x73, 0x67, 0x52, + 0x05, 0x62, 0x61, 0x74, 0x63, 0x68, 0x22, 0x4f, 0x0a, 0x13, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, + 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, + 0x0b, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, + 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x0b, 0x73, 0x79, 0x73, 0x74, + 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x0d, 0x0a, 0x0b, 0x53, 0x74, 0x6f, 0x70, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x48, 0x0a, 0x0c, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x0b, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, + 0x45, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x65, + 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, + 0x72, 0x6f, 0x72, 0x52, 0x0b, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, + 0x22, 0x50, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x24, 0x0a, 0x0d, + 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x72, 0x4f, 0x72, 0x48, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x0d, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x72, 0x4f, 0x72, 0x48, 0x61, + 0x73, 0x68, 0x22, 0x5f, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x38, 0x0a, 0x0b, 0x73, 0x79, 0x73, + 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, + 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, + 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x0b, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, + 0x72, 0x6f, 0x72, 0x22, 0x58, 0x0a, 0x10, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x02, 0x69, 0x64, 0x12, 0x34, 0x0a, 0x15, 0x65, 0x6e, 0x63, 0x72, 0x79, + 0x70, 0x74, 0x65, 0x64, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x15, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, + 0x64, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x4d, 0x0a, + 0x11, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x38, 0x0a, 0x0b, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, + 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, + 0x74, 0x65, 0x64, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, + 0x0b, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x24, 0x0a, 0x12, + 0x55, 0x6e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x02, + 0x69, 0x64, 0x22, 0x4f, 0x0a, 0x13, 0x55, 0x6e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x0b, 0x73, 0x79, 0x73, + 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, + 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, + 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x0b, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, + 0x72, 0x6f, 0x72, 0x22, 0x67, 0x0a, 0x13, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, + 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x12, 0x38, 0x0a, 0x0b, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, + 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, + 0x74, 0x65, 0x64, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, + 0x0b, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x0b, 0x0a, 0x09, + 0x45, 0x6d, 0x70, 0x74, 0x79, 0x41, 0x72, 0x67, 0x73, 0x22, 0xc0, 0x01, 0x0a, 0x14, 0x41, 0x74, + 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x4d, + 0x73, 0x67, 0x12, 0x16, 0x0a, 0x06, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x06, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x50, 0x75, + 0x62, 0x4b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x50, 0x75, 0x62, 0x4b, + 0x65, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x45, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x49, 0x44, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x45, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x49, 0x44, + 0x12, 0x20, 0x0a, 0x0b, 0x48, 0x6f, 0x73, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x48, 0x6f, 0x73, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x12, 0x38, 0x0a, 0x0b, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, + 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, + 0x74, 0x65, 0x64, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, + 0x0b, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x22, 0xae, 0x01, 0x0a, + 0x1a, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x73, 0x67, 0x12, 0x56, 0x0a, 0x17, 0x70, + 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x64, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, + 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x73, 0x67, 0x52, 0x17, 0x70, 0x72, 0x6f, 0x64, + 0x75, 0x63, 0x65, 0x64, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x73, 0x12, 0x38, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x42, + 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x45, 0x72, + 0x72, 0x6f, 0x72, 0x4d, 0x73, 0x67, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x47, 0x0a, + 0x17, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, + 0x45, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x73, 0x67, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x61, 0x75, 0x73, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x63, 0x61, 0x75, 0x73, 0x65, 0x12, 0x16, + 0x0a, 0x06, 0x6c, 0x31, 0x48, 0x65, 0x61, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, + 0x6c, 0x31, 0x48, 0x65, 0x61, 0x64, 0x22, 0x89, 0x01, 0x0a, 0x0d, 0x43, 0x72, 0x6f, 0x73, 0x73, + 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4d, 0x73, 0x67, 0x12, 0x16, 0x0a, 0x06, 0x53, 0x65, 0x6e, 0x64, + 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, + 0x12, 0x1a, 0x0a, 0x08, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x08, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, + 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x4e, 0x6f, 0x6e, + 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0d, 0x52, 0x05, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x12, 0x18, 0x0a, 0x07, 0x50, 0x61, 0x79, 0x6c, + 0x6f, 0x61, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x50, 0x61, 0x79, 0x6c, 0x6f, + 0x61, 0x64, 0x22, 0x6e, 0x0a, 0x0b, 0x45, 0x78, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x4d, 0x73, + 0x67, 0x12, 0x31, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x42, 0x61, + 0x74, 0x63, 0x68, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x73, 0x67, 0x52, 0x06, 0x68, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, 0x65, 0x73, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x08, 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, 0x65, 0x73, + 0x12, 0x10, 0x0a, 0x03, 0x74, 0x78, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x74, + 0x78, 0x73, 0x22, 0xaa, 0x05, 0x0a, 0x0e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x48, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x4d, 0x73, 0x67, 0x12, 0x1e, 0x0a, 0x0a, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x48, + 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x50, 0x61, 0x72, 0x65, 0x6e, + 0x74, 0x48, 0x61, 0x73, 0x68, 0x12, 0x14, 0x0a, 0x05, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x12, 0x12, 0x0a, 0x04, 0x52, + 0x6f, 0x6f, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x52, 0x6f, 0x6f, 0x74, 0x12, + 0x16, 0x0a, 0x06, 0x54, 0x78, 0x48, 0x61, 0x73, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x06, 0x54, 0x78, 0x48, 0x61, 0x73, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x4e, 0x75, 0x6d, 0x62, 0x65, + 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, + 0x2a, 0x0a, 0x10, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x72, 0x4f, 0x72, 0x64, 0x65, + 0x72, 0x4e, 0x6f, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x53, 0x65, 0x71, 0x75, 0x65, + 0x6e, 0x63, 0x65, 0x72, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x4e, 0x6f, 0x12, 0x20, 0x0a, 0x0b, 0x52, + 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x48, 0x61, 0x73, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x0b, 0x52, 0x65, 0x63, 0x65, 0x69, 0x70, 0x74, 0x48, 0x61, 0x73, 0x68, 0x12, 0x14, 0x0a, + 0x05, 0x45, 0x78, 0x74, 0x72, 0x61, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x45, 0x78, + 0x74, 0x72, 0x61, 0x12, 0x1c, 0x0a, 0x09, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, + 0x18, 0x09, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, + 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x47, 0x61, 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x0a, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x08, 0x47, 0x61, 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x18, 0x0a, + 0x07, 0x47, 0x61, 0x73, 0x55, 0x73, 0x65, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, + 0x47, 0x61, 0x73, 0x55, 0x73, 0x65, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x54, 0x69, 0x6d, 0x65, 0x18, + 0x0c, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x42, + 0x61, 0x73, 0x65, 0x46, 0x65, 0x65, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x42, 0x61, + 0x73, 0x65, 0x46, 0x65, 0x65, 0x12, 0x44, 0x0a, 0x1d, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x49, + 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, 0x68, 0x61, 0x69, 0x6e, + 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x1d, 0x4c, 0x61, + 0x74, 0x65, 0x73, 0x74, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x43, 0x72, 0x6f, 0x73, 0x73, + 0x43, 0x68, 0x61, 0x69, 0x6e, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x40, 0x0a, 0x1b, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x43, 0x72, 0x6f, 0x73, - 0x73, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x0e, 0x20, 0x01, - 0x28, 0x0c, 0x52, 0x1d, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, - 0x64, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x48, 0x65, 0x69, 0x67, 0x68, - 0x74, 0x12, 0x40, 0x0a, 0x1b, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x49, 0x6e, 0x62, 0x6f, 0x75, - 0x6e, 0x64, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x48, 0x61, 0x73, 0x68, - 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x1b, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x49, 0x6e, - 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x48, - 0x61, 0x73, 0x68, 0x12, 0x48, 0x0a, 0x12, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, 0x68, 0x61, 0x69, - 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x10, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x18, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x43, 0x72, 0x6f, 0x73, - 0x73, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4d, 0x73, 0x67, 0x52, 0x12, 0x43, 0x72, 0x6f, 0x73, 0x73, - 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x12, 0x22, 0x0a, - 0x0c, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x54, 0x72, 0x65, 0x65, 0x18, 0x11, 0x20, - 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x54, 0x72, 0x65, - 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x43, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x18, 0x12, 0x20, - 0x01, 0x28, 0x0c, 0x52, 0x08, 0x43, 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x12, 0x26, 0x0a, - 0x0e, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x54, 0x72, 0x65, 0x65, 0x18, - 0x13, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0e, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, 0x68, 0x61, 0x69, - 0x6e, 0x54, 0x72, 0x65, 0x65, 0x22, 0x9c, 0x01, 0x0a, 0x0c, 0x45, 0x78, 0x74, 0x52, 0x6f, 0x6c, - 0x6c, 0x75, 0x70, 0x4d, 0x73, 0x67, 0x12, 0x32, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, - 0x65, 0x64, 0x2e, 0x52, 0x6f, 0x6c, 0x6c, 0x75, 0x70, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, - 0x73, 0x67, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x24, 0x0a, 0x0d, 0x62, 0x61, - 0x74, 0x63, 0x68, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0c, 0x52, 0x0d, 0x62, 0x61, 0x74, 0x63, 0x68, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x73, - 0x12, 0x32, 0x0a, 0x14, 0x63, 0x61, 0x6c, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x52, 0x6f, 0x6c, 0x6c, - 0x75, 0x70, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x14, - 0x63, 0x61, 0x6c, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x52, 0x6f, 0x6c, 0x6c, 0x75, 0x70, 0x48, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x22, 0xdb, 0x02, 0x0a, 0x0f, 0x52, 0x6f, 0x6c, 0x6c, 0x75, 0x70, 0x48, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x73, 0x67, 0x12, 0x1e, 0x0a, 0x0a, 0x50, 0x61, 0x72, 0x65, - 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x50, 0x61, - 0x72, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, 0x12, 0x2c, 0x0a, 0x11, 0x43, 0x6f, 0x6d, 0x70, - 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x31, 0x48, 0x65, 0x61, 0x64, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0c, 0x52, 0x11, 0x43, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x4c, 0x31, 0x48, 0x65, 0x61, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x4e, - 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x50, 0x72, 0x6f, - 0x6f, 0x66, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x4e, 0x75, 0x6d, 0x62, - 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, - 0x12, 0x12, 0x0a, 0x04, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, - 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x45, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x49, - 0x44, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x45, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, - 0x49, 0x44, 0x12, 0x48, 0x0a, 0x12, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, 0x68, 0x61, 0x69, 0x6e, - 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, - 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x43, 0x72, 0x6f, 0x73, 0x73, - 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4d, 0x73, 0x67, 0x52, 0x12, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, - 0x68, 0x61, 0x69, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x12, 0x1c, 0x0a, 0x09, - 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x09, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x4c, 0x61, - 0x73, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x53, 0x65, 0x71, 0x4e, 0x6f, 0x18, 0x09, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x0e, 0x4c, 0x61, 0x73, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x53, 0x65, 0x71, - 0x4e, 0x6f, 0x22, 0xc9, 0x01, 0x0a, 0x11, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x73, 0x67, 0x12, 0x16, 0x0a, 0x06, 0x53, 0x65, 0x63, 0x72, - 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, - 0x12, 0x20, 0x0a, 0x0b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x72, 0x49, 0x44, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x72, - 0x49, 0x44, 0x12, 0x1e, 0x0a, 0x0a, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x65, 0x72, 0x49, 0x44, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x65, 0x72, - 0x49, 0x44, 0x12, 0x20, 0x0a, 0x0b, 0x48, 0x6f, 0x73, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x48, 0x6f, 0x73, 0x74, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x12, 0x38, 0x0a, 0x0b, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, - 0x72, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x65, 0x6e, 0x65, - 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, - 0x72, 0x52, 0x0b, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x61, - 0x0a, 0x0d, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x4d, 0x73, 0x67, 0x12, - 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x63, 0x69, 0x70, - 0x69, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x72, 0x65, 0x63, 0x69, - 0x70, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, - 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, - 0x74, 0x32, 0x9d, 0x10, 0x0a, 0x0c, 0x45, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x12, 0x3f, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x18, 0x2e, 0x67, - 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, - 0x65, 0x64, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x00, 0x12, 0x4e, 0x0a, 0x0b, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x1d, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x41, - 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x1e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x41, 0x74, - 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x00, 0x12, 0x57, 0x0a, 0x0e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x53, - 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x20, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, - 0x64, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, - 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x53, 0x65, 0x63, 0x72, - 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4e, 0x0a, 0x0b, - 0x49, 0x6e, 0x69, 0x74, 0x45, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x12, 0x1d, 0x2e, 0x67, 0x65, - 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x49, 0x6e, 0x69, 0x74, 0x45, 0x6e, 0x63, 0x6c, - 0x61, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, 0x65, 0x6e, - 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x49, 0x6e, 0x69, 0x74, 0x45, 0x6e, 0x63, 0x6c, 0x61, - 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x48, 0x0a, 0x09, - 0x45, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x49, 0x44, 0x12, 0x1b, 0x2e, 0x67, 0x65, 0x6e, 0x65, - 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x45, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x49, 0x44, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, - 0x65, 0x64, 0x2e, 0x45, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x50, 0x0a, 0x0d, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, - 0x4c, 0x31, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x1d, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, - 0x74, 0x65, 0x64, 0x2e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, - 0x65, 0x64, 0x2e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x47, 0x0a, 0x0c, 0x45, 0x6e, 0x63, 0x72, - 0x79, 0x70, 0x74, 0x65, 0x64, 0x52, 0x50, 0x43, 0x12, 0x19, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, - 0x61, 0x74, 0x65, 0x64, 0x2e, 0x45, 0x6e, 0x63, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, - 0x45, 0x6e, 0x63, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x00, 0x12, 0x4e, 0x0a, 0x0b, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, - 0x12, 0x1d, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x75, 0x62, - 0x6d, 0x69, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x1e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x75, 0x62, 0x6d, - 0x69, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x00, 0x12, 0x39, 0x0a, 0x04, 0x53, 0x74, 0x6f, 0x70, 0x12, 0x16, 0x2e, 0x67, 0x65, 0x6e, 0x65, - 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x17, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x74, - 0x6f, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x42, 0x0a, 0x07, - 0x47, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x19, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, - 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, - 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, - 0x12, 0x48, 0x0a, 0x09, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x12, 0x1b, 0x2e, - 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, - 0x69, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x67, 0x65, 0x6e, - 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4e, 0x0a, 0x0b, 0x55, 0x6e, - 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x12, 0x1d, 0x2e, 0x67, 0x65, 0x6e, 0x65, - 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x55, 0x6e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, - 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, - 0x61, 0x74, 0x65, 0x64, 0x2e, 0x55, 0x6e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x45, 0x0a, 0x0b, 0x48, 0x65, - 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x12, 0x14, 0x2e, 0x67, 0x65, 0x6e, 0x65, - 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x41, 0x72, 0x67, 0x73, 0x1a, - 0x1e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x48, 0x65, 0x61, 0x6c, - 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x00, 0x12, 0x45, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x12, 0x1a, 0x2e, - 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x61, 0x74, - 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x67, 0x65, 0x6e, 0x65, - 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x53, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x42, - 0x61, 0x74, 0x63, 0x68, 0x42, 0x79, 0x53, 0x65, 0x71, 0x4e, 0x6f, 0x12, 0x21, 0x2e, 0x67, 0x65, - 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, - 0x42, 0x79, 0x53, 0x65, 0x71, 0x4e, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, - 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x61, - 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x54, 0x0a, - 0x0d, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6c, 0x6c, 0x75, 0x70, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1f, - 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x6f, - 0x6c, 0x6c, 0x75, 0x70, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x20, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x52, - 0x6f, 0x6c, 0x6c, 0x75, 0x70, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x00, 0x12, 0x4e, 0x0a, 0x0b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x61, 0x74, - 0x63, 0x68, 0x12, 0x1d, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x1e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x00, 0x12, 0x51, 0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6c, - 0x6c, 0x75, 0x70, 0x12, 0x1e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x6c, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x6c, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x69, 0x0a, 0x14, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, - 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x12, 0x26, - 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, - 0x74, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, - 0x65, 0x64, 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, 0x68, - 0x61, 0x69, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x00, 0x12, 0x6c, 0x0a, 0x15, 0x44, 0x65, 0x62, 0x75, 0x67, 0x54, 0x72, 0x61, 0x63, 0x65, 0x54, - 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x27, 0x2e, 0x67, 0x65, 0x6e, - 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x44, 0x65, 0x62, 0x75, 0x67, 0x54, 0x72, 0x61, 0x63, - 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, - 0x44, 0x65, 0x62, 0x75, 0x67, 0x54, 0x72, 0x61, 0x63, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, - 0x5a, 0x0a, 0x0f, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4c, 0x32, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x73, 0x12, 0x21, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, - 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4c, 0x32, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, - 0x64, 0x2e, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x6c, 0x0a, 0x15, 0x47, - 0x65, 0x74, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x43, - 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x27, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, - 0x2e, 0x47, 0x65, 0x74, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, - 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, - 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x6f, 0x74, - 0x61, 0x6c, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x66, 0x0a, 0x13, 0x45, 0x6e, 0x63, - 0x6c, 0x61, 0x76, 0x65, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x12, 0x25, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x45, 0x6e, 0x63, - 0x6c, 0x61, 0x76, 0x65, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, - 0x74, 0x65, 0x64, 0x2e, 0x45, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x50, 0x75, 0x62, 0x6c, 0x69, - 0x63, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x00, 0x12, 0x4b, 0x0a, 0x0a, 0x4d, 0x61, 0x6b, 0x65, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x12, - 0x1c, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x4d, 0x61, 0x6b, 0x65, - 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, - 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x4d, 0x61, 0x6b, 0x65, 0x41, 0x63, - 0x74, 0x69, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x51, - 0x0a, 0x0c, 0x41, 0x64, 0x64, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x72, 0x12, 0x1e, - 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x41, 0x64, 0x64, 0x53, 0x65, - 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, - 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x41, 0x64, 0x64, 0x53, 0x65, - 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x00, 0x42, 0x17, 0x5a, 0x15, 0x65, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x2f, 0x72, 0x70, 0x63, - 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x73, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x48, 0x61, 0x73, 0x68, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x1b, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x43, + 0x72, 0x6f, 0x73, 0x73, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x48, 0x61, 0x73, 0x68, 0x12, 0x48, 0x0a, + 0x12, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x73, 0x18, 0x10, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x65, 0x6e, 0x65, + 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, 0x68, 0x61, 0x69, 0x6e, + 0x4d, 0x73, 0x67, 0x52, 0x12, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x54, 0x72, 0x61, 0x6e, 0x73, + 0x66, 0x65, 0x72, 0x54, 0x72, 0x65, 0x65, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x54, + 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x54, 0x72, 0x65, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x43, + 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x18, 0x12, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x43, + 0x6f, 0x69, 0x6e, 0x62, 0x61, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x43, 0x72, 0x6f, 0x73, 0x73, + 0x43, 0x68, 0x61, 0x69, 0x6e, 0x54, 0x72, 0x65, 0x65, 0x18, 0x13, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x0e, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x54, 0x72, 0x65, 0x65, 0x22, + 0x9c, 0x01, 0x0a, 0x0c, 0x45, 0x78, 0x74, 0x52, 0x6f, 0x6c, 0x6c, 0x75, 0x70, 0x4d, 0x73, 0x67, + 0x12, 0x32, 0x0a, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1a, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x52, 0x6f, 0x6c, + 0x6c, 0x75, 0x70, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, 0x73, 0x67, 0x52, 0x06, 0x68, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x12, 0x24, 0x0a, 0x0d, 0x62, 0x61, 0x74, 0x63, 0x68, 0x50, 0x61, 0x79, + 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0d, 0x62, 0x61, 0x74, + 0x63, 0x68, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x73, 0x12, 0x32, 0x0a, 0x14, 0x63, 0x61, + 0x6c, 0x6c, 0x64, 0x61, 0x74, 0x61, 0x52, 0x6f, 0x6c, 0x6c, 0x75, 0x70, 0x48, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x14, 0x63, 0x61, 0x6c, 0x6c, 0x64, 0x61, + 0x74, 0x61, 0x52, 0x6f, 0x6c, 0x6c, 0x75, 0x70, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x22, 0xdb, + 0x02, 0x0a, 0x0f, 0x52, 0x6f, 0x6c, 0x6c, 0x75, 0x70, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x4d, + 0x73, 0x67, 0x12, 0x1e, 0x0a, 0x0a, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, 0x68, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x50, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x48, 0x61, + 0x73, 0x68, 0x12, 0x2c, 0x0a, 0x11, 0x43, 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, + 0x6e, 0x4c, 0x31, 0x48, 0x65, 0x61, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x11, 0x43, + 0x6f, 0x6d, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x4c, 0x31, 0x48, 0x65, 0x61, 0x64, + 0x12, 0x20, 0x0a, 0x0b, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x50, 0x72, 0x6f, 0x6f, 0x66, 0x4e, 0x75, 0x6d, 0x62, + 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x06, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x54, 0x69, + 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x04, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1c, + 0x0a, 0x09, 0x45, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x49, 0x44, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x09, 0x45, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x49, 0x44, 0x12, 0x48, 0x0a, 0x12, + 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, + 0x61, 0x74, 0x65, 0x64, 0x2e, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4d, + 0x73, 0x67, 0x52, 0x12, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x4d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x53, 0x69, 0x67, 0x6e, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x12, 0x26, 0x0a, 0x0e, 0x4c, 0x61, 0x73, 0x74, 0x42, 0x61, 0x74, 0x63, + 0x68, 0x53, 0x65, 0x71, 0x4e, 0x6f, 0x18, 0x09, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x4c, 0x61, + 0x73, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x53, 0x65, 0x71, 0x4e, 0x6f, 0x22, 0xc9, 0x01, 0x0a, + 0x11, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, + 0x73, 0x67, 0x12, 0x16, 0x0a, 0x06, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x06, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x72, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x0b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x65, 0x72, 0x49, 0x44, 0x12, 0x1e, 0x0a, 0x0a, + 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x65, 0x72, 0x49, 0x44, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x0a, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x65, 0x72, 0x49, 0x44, 0x12, 0x20, 0x0a, 0x0b, + 0x48, 0x6f, 0x73, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x48, 0x6f, 0x73, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x38, + 0x0a, 0x0b, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, + 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x0b, 0x73, 0x79, 0x73, + 0x74, 0x65, 0x6d, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x61, 0x0a, 0x0d, 0x57, 0x69, 0x74, 0x68, + 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x4d, 0x73, 0x67, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, + 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, + 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x12, + 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x32, 0x9d, 0x10, 0x0a, 0x0c, + 0x45, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x3f, 0x0a, 0x06, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x18, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, + 0x65, 0x64, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x19, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4e, 0x0a, + 0x0b, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x2e, 0x67, + 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, 0x65, + 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x57, 0x0a, + 0x0e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, + 0x20, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x6e, 0x65, + 0x72, 0x61, 0x74, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x21, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, + 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4e, 0x0a, 0x0b, 0x49, 0x6e, 0x69, 0x74, 0x45, 0x6e, + 0x63, 0x6c, 0x61, 0x76, 0x65, 0x12, 0x1d, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, + 0x64, 0x2e, 0x49, 0x6e, 0x69, 0x74, 0x45, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, + 0x2e, 0x49, 0x6e, 0x69, 0x74, 0x45, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x48, 0x0a, 0x09, 0x45, 0x6e, 0x63, 0x6c, 0x61, 0x76, + 0x65, 0x49, 0x44, 0x12, 0x1b, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, + 0x45, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x1c, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x45, 0x6e, 0x63, + 0x6c, 0x61, 0x76, 0x65, 0x49, 0x44, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x12, 0x50, 0x0a, 0x0d, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x4c, 0x31, 0x42, 0x6c, 0x6f, 0x63, + 0x6b, 0x12, 0x1d, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x75, + 0x62, 0x6d, 0x69, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x1e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x75, 0x62, + 0x6d, 0x69, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x12, 0x47, 0x0a, 0x0c, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x65, 0x64, 0x52, + 0x50, 0x43, 0x12, 0x19, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x45, + 0x6e, 0x63, 0x43, 0x61, 0x6c, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, + 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x45, 0x6e, 0x63, 0x43, 0x61, 0x6c, + 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4e, 0x0a, 0x0b, 0x53, + 0x75, 0x62, 0x6d, 0x69, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x12, 0x1d, 0x2e, 0x67, 0x65, 0x6e, + 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x42, 0x61, 0x74, + 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, 0x65, 0x6e, 0x65, + 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x75, 0x62, 0x6d, 0x69, 0x74, 0x42, 0x61, 0x74, 0x63, + 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x39, 0x0a, 0x04, 0x53, + 0x74, 0x6f, 0x70, 0x12, 0x16, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, + 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x67, 0x65, + 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x42, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x64, + 0x65, 0x12, 0x19, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, + 0x74, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x67, + 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x6f, 0x64, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x48, 0x0a, 0x09, 0x53, 0x75, + 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x12, 0x1b, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, + 0x74, 0x65, 0x64, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, + 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x00, 0x12, 0x4e, 0x0a, 0x0b, 0x55, 0x6e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, + 0x69, 0x62, 0x65, 0x12, 0x1d, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, + 0x55, 0x6e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x55, + 0x6e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x00, 0x12, 0x45, 0x0a, 0x0b, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, + 0x65, 0x63, 0x6b, 0x12, 0x14, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, + 0x45, 0x6d, 0x70, 0x74, 0x79, 0x41, 0x72, 0x67, 0x73, 0x1a, 0x1e, 0x2e, 0x67, 0x65, 0x6e, 0x65, + 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x43, 0x68, 0x65, 0x63, + 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x45, 0x0a, 0x08, 0x47, + 0x65, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x12, 0x1a, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, + 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, + 0x47, 0x65, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x12, 0x53, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x42, 0x79, + 0x53, 0x65, 0x71, 0x4e, 0x6f, 0x12, 0x21, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, + 0x64, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x42, 0x79, 0x53, 0x65, 0x71, 0x4e, + 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, + 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x54, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x52, 0x6f, + 0x6c, 0x6c, 0x75, 0x70, 0x44, 0x61, 0x74, 0x61, 0x12, 0x1f, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, + 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6c, 0x6c, 0x75, 0x70, 0x44, 0x61, + 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x67, 0x65, 0x6e, 0x65, + 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x6f, 0x6c, 0x6c, 0x75, 0x70, 0x44, + 0x61, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4e, 0x0a, + 0x0b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x61, 0x74, 0x63, 0x68, 0x12, 0x1d, 0x2e, 0x67, + 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, + 0x61, 0x74, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x67, 0x65, + 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x42, 0x61, + 0x74, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x51, 0x0a, + 0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x6c, 0x75, 0x70, 0x12, 0x1e, 0x2e, + 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x52, 0x6f, 0x6c, 0x6c, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, + 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, + 0x52, 0x6f, 0x6c, 0x6c, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x12, 0x69, 0x0a, 0x14, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, + 0x68, 0x61, 0x69, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x12, 0x26, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, + 0x61, 0x74, 0x65, 0x64, 0x2e, 0x45, 0x78, 0x70, 0x6f, 0x72, 0x74, 0x43, 0x72, 0x6f, 0x73, 0x73, + 0x43, 0x68, 0x61, 0x69, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x27, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x45, 0x78, 0x70, + 0x6f, 0x72, 0x74, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x44, 0x61, 0x74, + 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x6c, 0x0a, 0x15, 0x44, + 0x65, 0x62, 0x75, 0x67, 0x54, 0x72, 0x61, 0x63, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x27, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, + 0x2e, 0x44, 0x65, 0x62, 0x75, 0x67, 0x54, 0x72, 0x61, 0x63, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, + 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, + 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x44, 0x65, 0x62, 0x75, 0x67, 0x54, + 0x72, 0x61, 0x63, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5a, 0x0a, 0x0f, 0x53, 0x74, 0x72, + 0x65, 0x61, 0x6d, 0x4c, 0x32, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x12, 0x21, 0x2e, 0x67, + 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4c, + 0x32, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x20, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x45, 0x6e, 0x63, 0x6f, + 0x64, 0x65, 0x64, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x6c, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x54, 0x6f, 0x74, 0x61, + 0x6c, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x27, + 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x6f, + 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, + 0x74, 0x65, 0x64, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x6e, 0x74, + 0x72, 0x61, 0x63, 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x00, 0x12, 0x66, 0x0a, 0x13, 0x45, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x50, 0x75, + 0x62, 0x6c, 0x69, 0x63, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x25, 0x2e, 0x67, 0x65, 0x6e, + 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x45, 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x50, 0x75, + 0x62, 0x6c, 0x69, 0x63, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x26, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x45, 0x6e, + 0x63, 0x6c, 0x61, 0x76, 0x65, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4b, 0x0a, 0x0a, 0x4d, + 0x61, 0x6b, 0x65, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x12, 0x1c, 0x2e, 0x67, 0x65, 0x6e, 0x65, + 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x4d, 0x61, 0x6b, 0x65, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, + 0x74, 0x65, 0x64, 0x2e, 0x4d, 0x61, 0x6b, 0x65, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x51, 0x0a, 0x0c, 0x41, 0x64, 0x64, 0x53, + 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x72, 0x12, 0x1e, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, + 0x61, 0x74, 0x65, 0x64, 0x2e, 0x41, 0x64, 0x64, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, + 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x67, 0x65, 0x6e, 0x65, 0x72, + 0x61, 0x74, 0x65, 0x64, 0x2e, 0x41, 0x64, 0x64, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, + 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x17, 0x5a, 0x15, 0x65, + 0x6e, 0x63, 0x6c, 0x61, 0x76, 0x65, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x72, + 0x61, 0x74, 0x65, 0x64, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -4098,7 +4098,7 @@ func file_enclave_proto_rawDescGZIP() []byte { } var file_enclave_proto_msgTypes = make([]protoimpl.MessageInfo, 65) -var file_enclave_proto_goTypes = []any{ +var file_enclave_proto_goTypes = []interface{}{ (*EnclavePublicConfigRequest)(nil), // 0: generated.EnclavePublicConfigRequest (*EnclavePublicConfigResponse)(nil), // 1: generated.EnclavePublicConfigResponse (*GetBatchRequest)(nil), // 2: generated.GetBatchRequest @@ -4265,7 +4265,7 @@ func file_enclave_proto_init() { return } if !protoimpl.UnsafeEnabled { - file_enclave_proto_msgTypes[0].Exporter = func(v any, i int) any { + file_enclave_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*EnclavePublicConfigRequest); i { case 0: return &v.state @@ -4277,7 +4277,7 @@ func file_enclave_proto_init() { return nil } } - file_enclave_proto_msgTypes[1].Exporter = func(v any, i int) any { + file_enclave_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*EnclavePublicConfigResponse); i { case 0: return &v.state @@ -4289,7 +4289,7 @@ func file_enclave_proto_init() { return nil } } - file_enclave_proto_msgTypes[2].Exporter = func(v any, i int) any { + file_enclave_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetBatchRequest); i { case 0: return &v.state @@ -4301,7 +4301,7 @@ func file_enclave_proto_init() { return nil } } - file_enclave_proto_msgTypes[3].Exporter = func(v any, i int) any { + file_enclave_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetBatchBySeqNoRequest); i { case 0: return &v.state @@ -4313,7 +4313,7 @@ func file_enclave_proto_init() { return nil } } - file_enclave_proto_msgTypes[4].Exporter = func(v any, i int) any { + file_enclave_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetBatchResponse); i { case 0: return &v.state @@ -4325,7 +4325,7 @@ func file_enclave_proto_init() { return nil } } - file_enclave_proto_msgTypes[5].Exporter = func(v any, i int) any { + file_enclave_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetRollupDataRequest); i { case 0: return &v.state @@ -4337,7 +4337,7 @@ func file_enclave_proto_init() { return nil } } - file_enclave_proto_msgTypes[6].Exporter = func(v any, i int) any { + file_enclave_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetRollupDataResponse); i { case 0: return &v.state @@ -4349,7 +4349,7 @@ func file_enclave_proto_init() { return nil } } - file_enclave_proto_msgTypes[7].Exporter = func(v any, i int) any { + file_enclave_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PublicRollupDataMsg); i { case 0: return &v.state @@ -4361,7 +4361,7 @@ func file_enclave_proto_init() { return nil } } - file_enclave_proto_msgTypes[8].Exporter = func(v any, i int) any { + file_enclave_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StreamL2UpdatesRequest); i { case 0: return &v.state @@ -4373,7 +4373,7 @@ func file_enclave_proto_init() { return nil } } - file_enclave_proto_msgTypes[9].Exporter = func(v any, i int) any { + file_enclave_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*EncodedUpdateResponse); i { case 0: return &v.state @@ -4385,7 +4385,7 @@ func file_enclave_proto_init() { return nil } } - file_enclave_proto_msgTypes[10].Exporter = func(v any, i int) any { + file_enclave_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Pagination); i { case 0: return &v.state @@ -4397,7 +4397,7 @@ func file_enclave_proto_init() { return nil } } - file_enclave_proto_msgTypes[11].Exporter = func(v any, i int) any { + file_enclave_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SystemError); i { case 0: return &v.state @@ -4409,7 +4409,7 @@ func file_enclave_proto_init() { return nil } } - file_enclave_proto_msgTypes[12].Exporter = func(v any, i int) any { + file_enclave_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetTotalContractCountRequest); i { case 0: return &v.state @@ -4421,7 +4421,7 @@ func file_enclave_proto_init() { return nil } } - file_enclave_proto_msgTypes[13].Exporter = func(v any, i int) any { + file_enclave_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetTotalContractCountResponse); i { case 0: return &v.state @@ -4433,7 +4433,7 @@ func file_enclave_proto_init() { return nil } } - file_enclave_proto_msgTypes[14].Exporter = func(v any, i int) any { + file_enclave_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DebugTraceTransactionRequest); i { case 0: return &v.state @@ -4445,7 +4445,7 @@ func file_enclave_proto_init() { return nil } } - file_enclave_proto_msgTypes[15].Exporter = func(v any, i int) any { + file_enclave_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DebugTraceTransactionResponse); i { case 0: return &v.state @@ -4457,7 +4457,7 @@ func file_enclave_proto_init() { return nil } } - file_enclave_proto_msgTypes[16].Exporter = func(v any, i int) any { + file_enclave_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CreateBatchRequest); i { case 0: return &v.state @@ -4469,7 +4469,7 @@ func file_enclave_proto_init() { return nil } } - file_enclave_proto_msgTypes[17].Exporter = func(v any, i int) any { + file_enclave_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CreateBatchResponse); i { case 0: return &v.state @@ -4481,7 +4481,7 @@ func file_enclave_proto_init() { return nil } } - file_enclave_proto_msgTypes[18].Exporter = func(v any, i int) any { + file_enclave_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CreateRollupRequest); i { case 0: return &v.state @@ -4493,7 +4493,7 @@ func file_enclave_proto_init() { return nil } } - file_enclave_proto_msgTypes[19].Exporter = func(v any, i int) any { + file_enclave_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CreateRollupResponse); i { case 0: return &v.state @@ -4505,7 +4505,7 @@ func file_enclave_proto_init() { return nil } } - file_enclave_proto_msgTypes[20].Exporter = func(v any, i int) any { + file_enclave_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ExportCrossChainDataRequest); i { case 0: return &v.state @@ -4517,7 +4517,7 @@ func file_enclave_proto_init() { return nil } } - file_enclave_proto_msgTypes[21].Exporter = func(v any, i int) any { + file_enclave_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ExportCrossChainDataResponse); i { case 0: return &v.state @@ -4529,7 +4529,7 @@ func file_enclave_proto_init() { return nil } } - file_enclave_proto_msgTypes[22].Exporter = func(v any, i int) any { + file_enclave_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StatusRequest); i { case 0: return &v.state @@ -4541,7 +4541,7 @@ func file_enclave_proto_init() { return nil } } - file_enclave_proto_msgTypes[23].Exporter = func(v any, i int) any { + file_enclave_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StatusResponse); i { case 0: return &v.state @@ -4553,7 +4553,7 @@ func file_enclave_proto_init() { return nil } } - file_enclave_proto_msgTypes[24].Exporter = func(v any, i int) any { + file_enclave_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MakeActiveRequest); i { case 0: return &v.state @@ -4565,7 +4565,7 @@ func file_enclave_proto_init() { return nil } } - file_enclave_proto_msgTypes[25].Exporter = func(v any, i int) any { + file_enclave_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MakeActiveResponse); i { case 0: return &v.state @@ -4577,7 +4577,7 @@ func file_enclave_proto_init() { return nil } } - file_enclave_proto_msgTypes[26].Exporter = func(v any, i int) any { + file_enclave_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*AddSequencerRequest); i { case 0: return &v.state @@ -4589,7 +4589,7 @@ func file_enclave_proto_init() { return nil } } - file_enclave_proto_msgTypes[27].Exporter = func(v any, i int) any { + file_enclave_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*AddSequencerResponse); i { case 0: return &v.state @@ -4601,7 +4601,7 @@ func file_enclave_proto_init() { return nil } } - file_enclave_proto_msgTypes[28].Exporter = func(v any, i int) any { + file_enclave_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*AttestationRequest); i { case 0: return &v.state @@ -4613,7 +4613,7 @@ func file_enclave_proto_init() { return nil } } - file_enclave_proto_msgTypes[29].Exporter = func(v any, i int) any { + file_enclave_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*AttestationResponse); i { case 0: return &v.state @@ -4625,7 +4625,7 @@ func file_enclave_proto_init() { return nil } } - file_enclave_proto_msgTypes[30].Exporter = func(v any, i int) any { + file_enclave_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GenerateSecretRequest); i { case 0: return &v.state @@ -4637,7 +4637,7 @@ func file_enclave_proto_init() { return nil } } - file_enclave_proto_msgTypes[31].Exporter = func(v any, i int) any { + file_enclave_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GenerateSecretResponse); i { case 0: return &v.state @@ -4649,7 +4649,7 @@ func file_enclave_proto_init() { return nil } } - file_enclave_proto_msgTypes[32].Exporter = func(v any, i int) any { + file_enclave_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*InitEnclaveRequest); i { case 0: return &v.state @@ -4661,7 +4661,7 @@ func file_enclave_proto_init() { return nil } } - file_enclave_proto_msgTypes[33].Exporter = func(v any, i int) any { + file_enclave_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*InitEnclaveResponse); i { case 0: return &v.state @@ -4673,7 +4673,7 @@ func file_enclave_proto_init() { return nil } } - file_enclave_proto_msgTypes[34].Exporter = func(v any, i int) any { + file_enclave_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*EnclaveIDRequest); i { case 0: return &v.state @@ -4685,7 +4685,7 @@ func file_enclave_proto_init() { return nil } } - file_enclave_proto_msgTypes[35].Exporter = func(v any, i int) any { + file_enclave_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*EnclaveIDResponse); i { case 0: return &v.state @@ -4697,7 +4697,7 @@ func file_enclave_proto_init() { return nil } } - file_enclave_proto_msgTypes[36].Exporter = func(v any, i int) any { + file_enclave_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StartRequest); i { case 0: return &v.state @@ -4709,7 +4709,7 @@ func file_enclave_proto_init() { return nil } } - file_enclave_proto_msgTypes[37].Exporter = func(v any, i int) any { + file_enclave_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StartResponse); i { case 0: return &v.state @@ -4721,7 +4721,7 @@ func file_enclave_proto_init() { return nil } } - file_enclave_proto_msgTypes[38].Exporter = func(v any, i int) any { + file_enclave_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SubmitBlockRequest); i { case 0: return &v.state @@ -4733,7 +4733,7 @@ func file_enclave_proto_init() { return nil } } - file_enclave_proto_msgTypes[39].Exporter = func(v any, i int) any { + file_enclave_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SubmitBlockResponse); i { case 0: return &v.state @@ -4745,7 +4745,7 @@ func file_enclave_proto_init() { return nil } } - file_enclave_proto_msgTypes[40].Exporter = func(v any, i int) any { + file_enclave_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*EncCallRequest); i { case 0: return &v.state @@ -4757,7 +4757,7 @@ func file_enclave_proto_init() { return nil } } - file_enclave_proto_msgTypes[41].Exporter = func(v any, i int) any { + file_enclave_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*EncCallResponse); i { case 0: return &v.state @@ -4769,7 +4769,7 @@ func file_enclave_proto_init() { return nil } } - file_enclave_proto_msgTypes[42].Exporter = func(v any, i int) any { + file_enclave_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SubmitBatchRequest); i { case 0: return &v.state @@ -4781,7 +4781,7 @@ func file_enclave_proto_init() { return nil } } - file_enclave_proto_msgTypes[43].Exporter = func(v any, i int) any { + file_enclave_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SubmitBatchResponse); i { case 0: return &v.state @@ -4793,7 +4793,7 @@ func file_enclave_proto_init() { return nil } } - file_enclave_proto_msgTypes[44].Exporter = func(v any, i int) any { + file_enclave_proto_msgTypes[44].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StopRequest); i { case 0: return &v.state @@ -4805,7 +4805,7 @@ func file_enclave_proto_init() { return nil } } - file_enclave_proto_msgTypes[45].Exporter = func(v any, i int) any { + file_enclave_proto_msgTypes[45].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StopResponse); i { case 0: return &v.state @@ -4817,7 +4817,7 @@ func file_enclave_proto_init() { return nil } } - file_enclave_proto_msgTypes[46].Exporter = func(v any, i int) any { + file_enclave_proto_msgTypes[46].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetCodeRequest); i { case 0: return &v.state @@ -4829,7 +4829,7 @@ func file_enclave_proto_init() { return nil } } - file_enclave_proto_msgTypes[47].Exporter = func(v any, i int) any { + file_enclave_proto_msgTypes[47].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetCodeResponse); i { case 0: return &v.state @@ -4841,7 +4841,7 @@ func file_enclave_proto_init() { return nil } } - file_enclave_proto_msgTypes[48].Exporter = func(v any, i int) any { + file_enclave_proto_msgTypes[48].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SubscribeRequest); i { case 0: return &v.state @@ -4853,7 +4853,7 @@ func file_enclave_proto_init() { return nil } } - file_enclave_proto_msgTypes[49].Exporter = func(v any, i int) any { + file_enclave_proto_msgTypes[49].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SubscribeResponse); i { case 0: return &v.state @@ -4865,7 +4865,7 @@ func file_enclave_proto_init() { return nil } } - file_enclave_proto_msgTypes[50].Exporter = func(v any, i int) any { + file_enclave_proto_msgTypes[50].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UnsubscribeRequest); i { case 0: return &v.state @@ -4877,7 +4877,7 @@ func file_enclave_proto_init() { return nil } } - file_enclave_proto_msgTypes[51].Exporter = func(v any, i int) any { + file_enclave_proto_msgTypes[51].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UnsubscribeResponse); i { case 0: return &v.state @@ -4889,7 +4889,7 @@ func file_enclave_proto_init() { return nil } } - file_enclave_proto_msgTypes[52].Exporter = func(v any, i int) any { + file_enclave_proto_msgTypes[52].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*HealthCheckResponse); i { case 0: return &v.state @@ -4901,7 +4901,7 @@ func file_enclave_proto_init() { return nil } } - file_enclave_proto_msgTypes[53].Exporter = func(v any, i int) any { + file_enclave_proto_msgTypes[53].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*EmptyArgs); i { case 0: return &v.state @@ -4913,7 +4913,7 @@ func file_enclave_proto_init() { return nil } } - file_enclave_proto_msgTypes[54].Exporter = func(v any, i int) any { + file_enclave_proto_msgTypes[54].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*AttestationReportMsg); i { case 0: return &v.state @@ -4925,7 +4925,7 @@ func file_enclave_proto_init() { return nil } } - file_enclave_proto_msgTypes[55].Exporter = func(v any, i int) any { + file_enclave_proto_msgTypes[55].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BlockSubmissionResponseMsg); i { case 0: return &v.state @@ -4937,7 +4937,7 @@ func file_enclave_proto_init() { return nil } } - file_enclave_proto_msgTypes[56].Exporter = func(v any, i int) any { + file_enclave_proto_msgTypes[56].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BlockSubmissionErrorMsg); i { case 0: return &v.state @@ -4949,7 +4949,7 @@ func file_enclave_proto_init() { return nil } } - file_enclave_proto_msgTypes[57].Exporter = func(v any, i int) any { + file_enclave_proto_msgTypes[57].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*CrossChainMsg); i { case 0: return &v.state @@ -4961,7 +4961,7 @@ func file_enclave_proto_init() { return nil } } - file_enclave_proto_msgTypes[58].Exporter = func(v any, i int) any { + file_enclave_proto_msgTypes[58].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ExtBatchMsg); i { case 0: return &v.state @@ -4973,7 +4973,7 @@ func file_enclave_proto_init() { return nil } } - file_enclave_proto_msgTypes[59].Exporter = func(v any, i int) any { + file_enclave_proto_msgTypes[59].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BatchHeaderMsg); i { case 0: return &v.state @@ -4985,7 +4985,7 @@ func file_enclave_proto_init() { return nil } } - file_enclave_proto_msgTypes[60].Exporter = func(v any, i int) any { + file_enclave_proto_msgTypes[60].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ExtRollupMsg); i { case 0: return &v.state @@ -4997,7 +4997,7 @@ func file_enclave_proto_init() { return nil } } - file_enclave_proto_msgTypes[61].Exporter = func(v any, i int) any { + file_enclave_proto_msgTypes[61].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RollupHeaderMsg); i { case 0: return &v.state @@ -5009,7 +5009,7 @@ func file_enclave_proto_init() { return nil } } - file_enclave_proto_msgTypes[62].Exporter = func(v any, i int) any { + file_enclave_proto_msgTypes[62].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*SecretResponseMsg); i { case 0: return &v.state @@ -5021,7 +5021,7 @@ func file_enclave_proto_init() { return nil } } - file_enclave_proto_msgTypes[63].Exporter = func(v any, i int) any { + file_enclave_proto_msgTypes[63].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*WithdrawalMsg); i { case 0: return &v.state @@ -5034,7 +5034,7 @@ func file_enclave_proto_init() { } } } - file_enclave_proto_msgTypes[18].OneofWrappers = []any{} + file_enclave_proto_msgTypes[18].OneofWrappers = []interface{}{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ diff --git a/go/common/rpc/generated/enclave.proto b/go/common/rpc/generated/enclave.proto index fb826e0877..6357c197cd 100644 --- a/go/common/rpc/generated/enclave.proto +++ b/go/common/rpc/generated/enclave.proto @@ -181,7 +181,7 @@ message StartResponse { message SubmitBlockRequest { bytes encodedBlock = 1; - bytes encodedReceipts = 2; + bytes encodedProcessedData = 2; } message SubmitBlockResponse { diff --git a/go/common/rpc/generated/enclave_grpc.pb.go b/go/common/rpc/generated/enclave_grpc.pb.go index f50a9cc026..ee4db3cdeb 100644 --- a/go/common/rpc/generated/enclave_grpc.pb.go +++ b/go/common/rpc/generated/enclave_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.5.1 -// - protoc v5.28.2 +// - protoc-gen-go-grpc v1.3.0 +// - protoc v4.25.3 // source: enclave.proto package generated @@ -15,8 +15,8 @@ import ( // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. -// Requires gRPC-Go v1.64.0 or later. -const _ = grpc.SupportPackageIsVersion9 +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 const ( EnclaveProto_Status_FullMethodName = "/generated.EnclaveProto/Status" @@ -70,7 +70,7 @@ type EnclaveProtoClient interface { CreateRollup(ctx context.Context, in *CreateRollupRequest, opts ...grpc.CallOption) (*CreateRollupResponse, error) ExportCrossChainData(ctx context.Context, in *ExportCrossChainDataRequest, opts ...grpc.CallOption) (*ExportCrossChainDataResponse, error) DebugTraceTransaction(ctx context.Context, in *DebugTraceTransactionRequest, opts ...grpc.CallOption) (*DebugTraceTransactionResponse, error) - StreamL2Updates(ctx context.Context, in *StreamL2UpdatesRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[EncodedUpdateResponse], error) + StreamL2Updates(ctx context.Context, in *StreamL2UpdatesRequest, opts ...grpc.CallOption) (EnclaveProto_StreamL2UpdatesClient, error) GetTotalContractCount(ctx context.Context, in *GetTotalContractCountRequest, opts ...grpc.CallOption) (*GetTotalContractCountResponse, error) EnclavePublicConfig(ctx context.Context, in *EnclavePublicConfigRequest, opts ...grpc.CallOption) (*EnclavePublicConfigResponse, error) MakeActive(ctx context.Context, in *MakeActiveRequest, opts ...grpc.CallOption) (*MakeActiveResponse, error) @@ -86,9 +86,8 @@ func NewEnclaveProtoClient(cc grpc.ClientConnInterface) EnclaveProtoClient { } func (c *enclaveProtoClient) Status(ctx context.Context, in *StatusRequest, opts ...grpc.CallOption) (*StatusResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(StatusResponse) - err := c.cc.Invoke(ctx, EnclaveProto_Status_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, EnclaveProto_Status_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -96,9 +95,8 @@ func (c *enclaveProtoClient) Status(ctx context.Context, in *StatusRequest, opts } func (c *enclaveProtoClient) Attestation(ctx context.Context, in *AttestationRequest, opts ...grpc.CallOption) (*AttestationResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(AttestationResponse) - err := c.cc.Invoke(ctx, EnclaveProto_Attestation_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, EnclaveProto_Attestation_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -106,9 +104,8 @@ func (c *enclaveProtoClient) Attestation(ctx context.Context, in *AttestationReq } func (c *enclaveProtoClient) GenerateSecret(ctx context.Context, in *GenerateSecretRequest, opts ...grpc.CallOption) (*GenerateSecretResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GenerateSecretResponse) - err := c.cc.Invoke(ctx, EnclaveProto_GenerateSecret_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, EnclaveProto_GenerateSecret_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -116,9 +113,8 @@ func (c *enclaveProtoClient) GenerateSecret(ctx context.Context, in *GenerateSec } func (c *enclaveProtoClient) InitEnclave(ctx context.Context, in *InitEnclaveRequest, opts ...grpc.CallOption) (*InitEnclaveResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(InitEnclaveResponse) - err := c.cc.Invoke(ctx, EnclaveProto_InitEnclave_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, EnclaveProto_InitEnclave_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -126,9 +122,8 @@ func (c *enclaveProtoClient) InitEnclave(ctx context.Context, in *InitEnclaveReq } func (c *enclaveProtoClient) EnclaveID(ctx context.Context, in *EnclaveIDRequest, opts ...grpc.CallOption) (*EnclaveIDResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(EnclaveIDResponse) - err := c.cc.Invoke(ctx, EnclaveProto_EnclaveID_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, EnclaveProto_EnclaveID_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -136,9 +131,8 @@ func (c *enclaveProtoClient) EnclaveID(ctx context.Context, in *EnclaveIDRequest } func (c *enclaveProtoClient) SubmitL1Block(ctx context.Context, in *SubmitBlockRequest, opts ...grpc.CallOption) (*SubmitBlockResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(SubmitBlockResponse) - err := c.cc.Invoke(ctx, EnclaveProto_SubmitL1Block_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, EnclaveProto_SubmitL1Block_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -146,9 +140,8 @@ func (c *enclaveProtoClient) SubmitL1Block(ctx context.Context, in *SubmitBlockR } func (c *enclaveProtoClient) EncryptedRPC(ctx context.Context, in *EncCallRequest, opts ...grpc.CallOption) (*EncCallResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(EncCallResponse) - err := c.cc.Invoke(ctx, EnclaveProto_EncryptedRPC_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, EnclaveProto_EncryptedRPC_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -156,9 +149,8 @@ func (c *enclaveProtoClient) EncryptedRPC(ctx context.Context, in *EncCallReques } func (c *enclaveProtoClient) SubmitBatch(ctx context.Context, in *SubmitBatchRequest, opts ...grpc.CallOption) (*SubmitBatchResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(SubmitBatchResponse) - err := c.cc.Invoke(ctx, EnclaveProto_SubmitBatch_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, EnclaveProto_SubmitBatch_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -166,9 +158,8 @@ func (c *enclaveProtoClient) SubmitBatch(ctx context.Context, in *SubmitBatchReq } func (c *enclaveProtoClient) Stop(ctx context.Context, in *StopRequest, opts ...grpc.CallOption) (*StopResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(StopResponse) - err := c.cc.Invoke(ctx, EnclaveProto_Stop_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, EnclaveProto_Stop_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -176,9 +167,8 @@ func (c *enclaveProtoClient) Stop(ctx context.Context, in *StopRequest, opts ... } func (c *enclaveProtoClient) GetCode(ctx context.Context, in *GetCodeRequest, opts ...grpc.CallOption) (*GetCodeResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetCodeResponse) - err := c.cc.Invoke(ctx, EnclaveProto_GetCode_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, EnclaveProto_GetCode_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -186,9 +176,8 @@ func (c *enclaveProtoClient) GetCode(ctx context.Context, in *GetCodeRequest, op } func (c *enclaveProtoClient) Subscribe(ctx context.Context, in *SubscribeRequest, opts ...grpc.CallOption) (*SubscribeResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(SubscribeResponse) - err := c.cc.Invoke(ctx, EnclaveProto_Subscribe_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, EnclaveProto_Subscribe_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -196,9 +185,8 @@ func (c *enclaveProtoClient) Subscribe(ctx context.Context, in *SubscribeRequest } func (c *enclaveProtoClient) Unsubscribe(ctx context.Context, in *UnsubscribeRequest, opts ...grpc.CallOption) (*UnsubscribeResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(UnsubscribeResponse) - err := c.cc.Invoke(ctx, EnclaveProto_Unsubscribe_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, EnclaveProto_Unsubscribe_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -206,9 +194,8 @@ func (c *enclaveProtoClient) Unsubscribe(ctx context.Context, in *UnsubscribeReq } func (c *enclaveProtoClient) HealthCheck(ctx context.Context, in *EmptyArgs, opts ...grpc.CallOption) (*HealthCheckResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(HealthCheckResponse) - err := c.cc.Invoke(ctx, EnclaveProto_HealthCheck_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, EnclaveProto_HealthCheck_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -216,9 +203,8 @@ func (c *enclaveProtoClient) HealthCheck(ctx context.Context, in *EmptyArgs, opt } func (c *enclaveProtoClient) GetBatch(ctx context.Context, in *GetBatchRequest, opts ...grpc.CallOption) (*GetBatchResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetBatchResponse) - err := c.cc.Invoke(ctx, EnclaveProto_GetBatch_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, EnclaveProto_GetBatch_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -226,9 +212,8 @@ func (c *enclaveProtoClient) GetBatch(ctx context.Context, in *GetBatchRequest, } func (c *enclaveProtoClient) GetBatchBySeqNo(ctx context.Context, in *GetBatchBySeqNoRequest, opts ...grpc.CallOption) (*GetBatchResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetBatchResponse) - err := c.cc.Invoke(ctx, EnclaveProto_GetBatchBySeqNo_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, EnclaveProto_GetBatchBySeqNo_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -236,9 +221,8 @@ func (c *enclaveProtoClient) GetBatchBySeqNo(ctx context.Context, in *GetBatchBy } func (c *enclaveProtoClient) GetRollupData(ctx context.Context, in *GetRollupDataRequest, opts ...grpc.CallOption) (*GetRollupDataResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetRollupDataResponse) - err := c.cc.Invoke(ctx, EnclaveProto_GetRollupData_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, EnclaveProto_GetRollupData_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -246,9 +230,8 @@ func (c *enclaveProtoClient) GetRollupData(ctx context.Context, in *GetRollupDat } func (c *enclaveProtoClient) CreateBatch(ctx context.Context, in *CreateBatchRequest, opts ...grpc.CallOption) (*CreateBatchResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(CreateBatchResponse) - err := c.cc.Invoke(ctx, EnclaveProto_CreateBatch_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, EnclaveProto_CreateBatch_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -256,9 +239,8 @@ func (c *enclaveProtoClient) CreateBatch(ctx context.Context, in *CreateBatchReq } func (c *enclaveProtoClient) CreateRollup(ctx context.Context, in *CreateRollupRequest, opts ...grpc.CallOption) (*CreateRollupResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(CreateRollupResponse) - err := c.cc.Invoke(ctx, EnclaveProto_CreateRollup_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, EnclaveProto_CreateRollup_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -266,9 +248,8 @@ func (c *enclaveProtoClient) CreateRollup(ctx context.Context, in *CreateRollupR } func (c *enclaveProtoClient) ExportCrossChainData(ctx context.Context, in *ExportCrossChainDataRequest, opts ...grpc.CallOption) (*ExportCrossChainDataResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ExportCrossChainDataResponse) - err := c.cc.Invoke(ctx, EnclaveProto_ExportCrossChainData_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, EnclaveProto_ExportCrossChainData_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -276,22 +257,20 @@ func (c *enclaveProtoClient) ExportCrossChainData(ctx context.Context, in *Expor } func (c *enclaveProtoClient) DebugTraceTransaction(ctx context.Context, in *DebugTraceTransactionRequest, opts ...grpc.CallOption) (*DebugTraceTransactionResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(DebugTraceTransactionResponse) - err := c.cc.Invoke(ctx, EnclaveProto_DebugTraceTransaction_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, EnclaveProto_DebugTraceTransaction_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *enclaveProtoClient) StreamL2Updates(ctx context.Context, in *StreamL2UpdatesRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[EncodedUpdateResponse], error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) - stream, err := c.cc.NewStream(ctx, &EnclaveProto_ServiceDesc.Streams[0], EnclaveProto_StreamL2Updates_FullMethodName, cOpts...) +func (c *enclaveProtoClient) StreamL2Updates(ctx context.Context, in *StreamL2UpdatesRequest, opts ...grpc.CallOption) (EnclaveProto_StreamL2UpdatesClient, error) { + stream, err := c.cc.NewStream(ctx, &EnclaveProto_ServiceDesc.Streams[0], EnclaveProto_StreamL2Updates_FullMethodName, opts...) if err != nil { return nil, err } - x := &grpc.GenericClientStream[StreamL2UpdatesRequest, EncodedUpdateResponse]{ClientStream: stream} + x := &enclaveProtoStreamL2UpdatesClient{stream} if err := x.ClientStream.SendMsg(in); err != nil { return nil, err } @@ -301,13 +280,26 @@ func (c *enclaveProtoClient) StreamL2Updates(ctx context.Context, in *StreamL2Up return x, nil } -// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. -type EnclaveProto_StreamL2UpdatesClient = grpc.ServerStreamingClient[EncodedUpdateResponse] +type EnclaveProto_StreamL2UpdatesClient interface { + Recv() (*EncodedUpdateResponse, error) + grpc.ClientStream +} + +type enclaveProtoStreamL2UpdatesClient struct { + grpc.ClientStream +} + +func (x *enclaveProtoStreamL2UpdatesClient) Recv() (*EncodedUpdateResponse, error) { + m := new(EncodedUpdateResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} func (c *enclaveProtoClient) GetTotalContractCount(ctx context.Context, in *GetTotalContractCountRequest, opts ...grpc.CallOption) (*GetTotalContractCountResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetTotalContractCountResponse) - err := c.cc.Invoke(ctx, EnclaveProto_GetTotalContractCount_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, EnclaveProto_GetTotalContractCount_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -315,9 +307,8 @@ func (c *enclaveProtoClient) GetTotalContractCount(ctx context.Context, in *GetT } func (c *enclaveProtoClient) EnclavePublicConfig(ctx context.Context, in *EnclavePublicConfigRequest, opts ...grpc.CallOption) (*EnclavePublicConfigResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(EnclavePublicConfigResponse) - err := c.cc.Invoke(ctx, EnclaveProto_EnclavePublicConfig_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, EnclaveProto_EnclavePublicConfig_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -325,9 +316,8 @@ func (c *enclaveProtoClient) EnclavePublicConfig(ctx context.Context, in *Enclav } func (c *enclaveProtoClient) MakeActive(ctx context.Context, in *MakeActiveRequest, opts ...grpc.CallOption) (*MakeActiveResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(MakeActiveResponse) - err := c.cc.Invoke(ctx, EnclaveProto_MakeActive_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, EnclaveProto_MakeActive_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -335,9 +325,8 @@ func (c *enclaveProtoClient) MakeActive(ctx context.Context, in *MakeActiveReque } func (c *enclaveProtoClient) AddSequencer(ctx context.Context, in *AddSequencerRequest, opts ...grpc.CallOption) (*AddSequencerResponse, error) { - cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(AddSequencerResponse) - err := c.cc.Invoke(ctx, EnclaveProto_AddSequencer_FullMethodName, in, out, cOpts...) + err := c.cc.Invoke(ctx, EnclaveProto_AddSequencer_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -346,7 +335,7 @@ func (c *enclaveProtoClient) AddSequencer(ctx context.Context, in *AddSequencerR // EnclaveProtoServer is the server API for EnclaveProto service. // All implementations must embed UnimplementedEnclaveProtoServer -// for forward compatibility. +// for forward compatibility type EnclaveProtoServer interface { Status(context.Context, *StatusRequest) (*StatusResponse, error) Attestation(context.Context, *AttestationRequest) (*AttestationResponse, error) @@ -368,7 +357,7 @@ type EnclaveProtoServer interface { CreateRollup(context.Context, *CreateRollupRequest) (*CreateRollupResponse, error) ExportCrossChainData(context.Context, *ExportCrossChainDataRequest) (*ExportCrossChainDataResponse, error) DebugTraceTransaction(context.Context, *DebugTraceTransactionRequest) (*DebugTraceTransactionResponse, error) - StreamL2Updates(*StreamL2UpdatesRequest, grpc.ServerStreamingServer[EncodedUpdateResponse]) error + StreamL2Updates(*StreamL2UpdatesRequest, EnclaveProto_StreamL2UpdatesServer) error GetTotalContractCount(context.Context, *GetTotalContractCountRequest) (*GetTotalContractCountResponse, error) EnclavePublicConfig(context.Context, *EnclavePublicConfigRequest) (*EnclavePublicConfigResponse, error) MakeActive(context.Context, *MakeActiveRequest) (*MakeActiveResponse, error) @@ -376,12 +365,9 @@ type EnclaveProtoServer interface { mustEmbedUnimplementedEnclaveProtoServer() } -// UnimplementedEnclaveProtoServer must be embedded to have -// forward compatible implementations. -// -// NOTE: this should be embedded by value instead of pointer to avoid a nil -// pointer dereference when methods are called. -type UnimplementedEnclaveProtoServer struct{} +// UnimplementedEnclaveProtoServer must be embedded to have forward compatible implementations. +type UnimplementedEnclaveProtoServer struct { +} func (UnimplementedEnclaveProtoServer) Status(context.Context, *StatusRequest) (*StatusResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Status not implemented") @@ -443,7 +429,7 @@ func (UnimplementedEnclaveProtoServer) ExportCrossChainData(context.Context, *Ex func (UnimplementedEnclaveProtoServer) DebugTraceTransaction(context.Context, *DebugTraceTransactionRequest) (*DebugTraceTransactionResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method DebugTraceTransaction not implemented") } -func (UnimplementedEnclaveProtoServer) StreamL2Updates(*StreamL2UpdatesRequest, grpc.ServerStreamingServer[EncodedUpdateResponse]) error { +func (UnimplementedEnclaveProtoServer) StreamL2Updates(*StreamL2UpdatesRequest, EnclaveProto_StreamL2UpdatesServer) error { return status.Errorf(codes.Unimplemented, "method StreamL2Updates not implemented") } func (UnimplementedEnclaveProtoServer) GetTotalContractCount(context.Context, *GetTotalContractCountRequest) (*GetTotalContractCountResponse, error) { @@ -459,7 +445,6 @@ func (UnimplementedEnclaveProtoServer) AddSequencer(context.Context, *AddSequenc return nil, status.Errorf(codes.Unimplemented, "method AddSequencer not implemented") } func (UnimplementedEnclaveProtoServer) mustEmbedUnimplementedEnclaveProtoServer() {} -func (UnimplementedEnclaveProtoServer) testEmbeddedByValue() {} // UnsafeEnclaveProtoServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to EnclaveProtoServer will @@ -469,13 +454,6 @@ type UnsafeEnclaveProtoServer interface { } func RegisterEnclaveProtoServer(s grpc.ServiceRegistrar, srv EnclaveProtoServer) { - // If the following call pancis, it indicates UnimplementedEnclaveProtoServer was - // embedded by pointer and is nil. This will cause panics if an - // unimplemented method is ever invoked, so we test this at initialization - // time to prevent it from happening at runtime later due to I/O. - if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { - t.testEmbeddedByValue() - } s.RegisterService(&EnclaveProto_ServiceDesc, srv) } @@ -844,11 +822,21 @@ func _EnclaveProto_StreamL2Updates_Handler(srv interface{}, stream grpc.ServerSt if err := stream.RecvMsg(m); err != nil { return err } - return srv.(EnclaveProtoServer).StreamL2Updates(m, &grpc.GenericServerStream[StreamL2UpdatesRequest, EncodedUpdateResponse]{ServerStream: stream}) + return srv.(EnclaveProtoServer).StreamL2Updates(m, &enclaveProtoStreamL2UpdatesServer{stream}) +} + +type EnclaveProto_StreamL2UpdatesServer interface { + Send(*EncodedUpdateResponse) error + grpc.ServerStream } -// This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name. -type EnclaveProto_StreamL2UpdatesServer = grpc.ServerStreamingServer[EncodedUpdateResponse] +type enclaveProtoStreamL2UpdatesServer struct { + grpc.ServerStream +} + +func (x *enclaveProtoStreamL2UpdatesServer) Send(m *EncodedUpdateResponse) error { + return x.ServerStream.SendMsg(m) +} func _EnclaveProto_GetTotalContractCount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetTotalContractCountRequest) diff --git a/go/enclave/components/block_processor.go b/go/enclave/components/block_processor.go index 5f7bac53bb..f8c1e0ee4e 100644 --- a/go/enclave/components/block_processor.go +++ b/go/enclave/components/block_processor.go @@ -59,31 +59,31 @@ func NewBlockProcessor(storage storage.Storage, cc *crosschain.Processors, gasOr } } -func (bp *l1BlockProcessor) Process(ctx context.Context, br *common.BlockAndReceipts) (*BlockIngestionType, error) { - defer core.LogMethodDuration(bp.logger, measure.NewStopwatch(), "L1 block processed", log.BlockHashKey, br.BlockHeader.Hash()) - - ingestion, err := bp.tryAndInsertBlock(ctx, br) +func (bp *l1BlockProcessor) Process(ctx context.Context, processed *common.ProcessedL1Data) (*BlockIngestionType, error) { + defer core.LogMethodDuration(bp.logger, measure.NewStopwatch(), "L1 block processed", log.BlockHashKey, processed.BlockHeader.Hash()) + header := processed.BlockHeader + ingestion, err := bp.tryAndInsertBlock(ctx, processed.BlockHeader) if err != nil { return nil, err } if !ingestion.PreGenesis { // This requires block to be stored first ... but can permanently fail a block - err = bp.crossChainProcessors.Remote.StoreCrossChainMessages(ctx, br.BlockHeader, br.Receipts()) + err = bp.crossChainProcessors.Remote.StoreCrossChainMessages(ctx, header, processed) if err != nil { return nil, errors.New("failed to process cross chain messages") } - err = bp.crossChainProcessors.Remote.StoreCrossChainValueTransfers(ctx, br.BlockHeader, br.Receipts()) + err = bp.crossChainProcessors.Remote.StoreCrossChainValueTransfers(ctx, header, processed) if err != nil { return nil, fmt.Errorf("failed to process cross chain transfers. Cause: %w", err) } } // todo @siliev - not sure if this is the best way to update the price, will pick up random stale blocks from forks? - bp.gasOracle.ProcessL1Block(br.BlockHeader) + bp.gasOracle.ProcessL1Block(header) - h := br.BlockHeader.Hash() + h := header.Hash() bp.currentL1Head = &h bp.lastIngestedBlock.Mark() return ingestion, nil @@ -99,9 +99,7 @@ func (bp *l1BlockProcessor) HealthCheck() (bool, error) { return true, nil } -func (bp *l1BlockProcessor) tryAndInsertBlock(ctx context.Context, br *common.BlockAndReceipts) (*BlockIngestionType, error) { - block := br.BlockHeader - +func (bp *l1BlockProcessor) tryAndInsertBlock(ctx context.Context, block *types.Header) (*BlockIngestionType, error) { // We insert the block into the L1 chain and store it. // in case the block already exists in the database, this will be treated like a fork, because the head changes to // the block that was already saved diff --git a/go/enclave/components/interfaces.go b/go/enclave/components/interfaces.go index da96aa9527..cb7f8507e5 100644 --- a/go/enclave/components/interfaces.go +++ b/go/enclave/components/interfaces.go @@ -38,7 +38,7 @@ func (bit *BlockIngestionType) IsFork() bool { } type L1BlockProcessor interface { - Process(ctx context.Context, br *common.BlockAndReceipts) (*BlockIngestionType, error) + Process(ctx context.Context, br *common.ProcessedL1Data) (*BlockIngestionType, error) GetHead(context.Context) (*types.Header, error) GetCrossChainContractAddress() *gethcommon.Address HealthCheck() (bool, error) @@ -125,5 +125,5 @@ type RollupProducer interface { type RollupConsumer interface { // ProcessBlobsInBlock - extracts the blob hashes from the block's transactions and builds the blob hashes from the blobs, // compares this with the hashes seen in the block. - ProcessBlobsInBlock(ctx context.Context, b *common.BlockAndReceipts) error + ProcessBlobsInBlock(ctx context.Context, processedData *common.ProcessedL1Data) error } diff --git a/go/enclave/components/rollup_consumer.go b/go/enclave/components/rollup_consumer.go index 169c9fe929..2e2b1db47e 100644 --- a/go/enclave/components/rollup_consumer.go +++ b/go/enclave/components/rollup_consumer.go @@ -49,16 +49,17 @@ func NewRollupConsumer( } // ProcessBlobsInBlock - processes the blobs in a block, extracts the rollups, verifies the rollups and stores them -func (rc *rollupConsumerImpl) ProcessBlobsInBlock(ctx context.Context, b *common.BlockAndReceipts) error { - defer core.LogMethodDuration(rc.logger, measure.NewStopwatch(), "Rollup consumer processed blobs", log.BlockHashKey, b.BlockHeader.Hash()) +func (rc *rollupConsumerImpl) ProcessBlobsInBlock(ctx context.Context, processed *common.ProcessedL1Data) error { + defer core.LogMethodDuration(rc.logger, measure.NewStopwatch(), "Rollup consumer processed blobs", log.BlockHashKey, processed.BlockHeader.Hash()) - rollups, err := rc.extractAndVerifyRollups(b) + block := processed.BlockHeader + rollups, err := rc.extractAndVerifyRollups(processed) if err != nil { - rc.logger.Error("Failed to extract rollups from block", log.BlockHashKey, b.BlockHeader.Hash(), log.ErrKey, err) + rc.logger.Error("Failed to extract rollups from block", log.BlockHashKey, block.Hash(), log.ErrKey, err) return err } if len(rollups) == 0 { - rc.logger.Trace("No rollups found in block", log.BlockHashKey, b.BlockHeader.Hash()) + rc.logger.Trace("No rollups found in block", log.BlockHashKey, block.Hash()) return nil } @@ -69,7 +70,7 @@ func (rc *rollupConsumerImpl) ProcessBlobsInBlock(ctx context.Context, b *common if len(rollups) > 1 { // todo - we need to sort this out - rc.logger.Warn(fmt.Sprintf("Multiple rollups %d in block %s", len(rollups), b.BlockHeader.Hash())) + rc.logger.Warn(fmt.Sprintf("Multiple rollups %d in block %s", len(rollups), block.Hash())) } for _, rollup := range rollups { @@ -121,16 +122,17 @@ func (rc *rollupConsumerImpl) getSignedRollup(rollups []*common.ExtRollup) ([]*c // It processes each transaction, attempting to extract and verify rollups // If a transaction is not a rollup or fails verification, it's skipped // The function only returns an error if there's a critical failure in rollup reconstruction -func (rc *rollupConsumerImpl) extractAndVerifyRollups(br *common.BlockAndReceipts) ([]*common.ExtRollup, error) { - rollups := make([]*common.ExtRollup, 0, len(*br.RelevantTransactions())) - b := br.BlockHeader - blobs, blobHashes, err := rc.extractBlobsAndHashes(br) +func (rc *rollupConsumerImpl) extractAndVerifyRollups(processed *common.ProcessedL1Data) ([]*common.ExtRollup, error) { + rollupTxs := processed.GetEvents(common.RollupTx) + rollups := make([]*common.ExtRollup, 0, len(rollupTxs)) + + blobs, blobHashes, err := rc.extractBlobsAndHashes(rollupTxs) if err != nil { return nil, err } - for i, tx := range *br.RelevantTransactions() { - t := rc.MgmtContractLib.DecodeTx(tx) + for i, tx := range rollupTxs { + t := rc.MgmtContractLib.DecodeTx(tx.Transaction) if t == nil { continue } @@ -153,7 +155,7 @@ func (rc *rollupConsumerImpl) extractAndVerifyRollups(br *common.BlockAndReceipt } rollups = append(rollups, r) - rc.logger.Info("Extracted rollup from block", log.RollupHashKey, r.Hash(), log.BlockHashKey, b.Hash()) + rc.logger.Info("Extracted rollup from block", log.RollupHashKey, r.Hash(), log.BlockHashKey, processed.BlockHeader.Hash()) } return rollups, nil @@ -180,12 +182,10 @@ func verifyBlobHashes(rollupHashes *ethadapter.L1RollupHashes, blobHashes []geth return nil } -func (rc *rollupConsumerImpl) extractBlobsAndHashes(br *common.BlockAndReceipts) ([]*kzg4844.Blob, []gethcommon.Hash, error) { +func (rc *rollupConsumerImpl) extractBlobsAndHashes(rollupTxs []*common.L1TxData) ([]*kzg4844.Blob, []gethcommon.Hash, error) { blobs := make([]*kzg4844.Blob, 0) - for _, txWithReceipt := range br.TxsWithReceipts { - if txWithReceipt.Blobs != nil { - blobs = append(blobs, txWithReceipt.Blobs...) - } + for _, tx := range rollupTxs { + blobs = append(blobs, tx.Blobs...) } _, blobHashes, err := ethadapter.MakeSidecar(blobs) diff --git a/go/enclave/components/shared_secret_process.go b/go/enclave/components/shared_secret_process.go index 5a59fb5691..0b46636554 100644 --- a/go/enclave/components/shared_secret_process.go +++ b/go/enclave/components/shared_secret_process.go @@ -34,40 +34,47 @@ func NewSharedSecretProcessor(mgmtcontractlib mgmtcontractlib.MgmtContractLib, a } // ProcessNetworkSecretMsgs we watch for all messages that are requesting or receiving the secret and we store the nodes attested keys -func (ssp *SharedSecretProcessor) ProcessNetworkSecretMsgs(ctx context.Context, br *common.BlockAndReceipts) []*common.ProducedSecretResponse { +func (ssp *SharedSecretProcessor) ProcessNetworkSecretMsgs(ctx context.Context, processed *common.ProcessedL1Data) []*common.ProducedSecretResponse { var responses []*common.ProducedSecretResponse - transactions := br.RelevantTransactions() - block := br.BlockHeader - for _, tx := range *transactions { - t := ssp.mgmtContractLib.DecodeTx(tx) - - // this transaction is for a node that has joined the network and needs to be sent the network secret - if scrtReqTx, ok := t.(*ethadapter.L1RequestSecretTx); ok { - ssp.logger.Info("Process shared secret request.", log.BlockHeightKey, block.Number, log.BlockHashKey, block.Hash(), log.TxKey, tx.Hash()) - resp, err := ssp.processSecretRequest(ctx, scrtReqTx) - if err != nil { - ssp.logger.Error("Failed to process shared secret request.", log.ErrKey, err) - continue - } - responses = append(responses, resp) + block := processed.BlockHeader + + // process secret requests + for _, txData := range processed.GetEvents(common.SecretRequestTx) { + scrtReqTx, ok := txData.Type.(*ethadapter.L1RequestSecretTx) + if !ok { + continue } + ssp.logger.Info("Process shared secret request.", + log.BlockHeightKey, block, + log.BlockHashKey, block.Hash(), + log.TxKey, txData.Transaction.Hash()) - // this transaction was created by the genesis node, we need to store their attested key to decrypt their rollup - if initSecretTx, ok := t.(*ethadapter.L1InitializeSecretTx); ok { - // todo (#1580) - ensure that we don't accidentally skip over the real `L1InitializeSecretTx` message. Otherwise - // our node will never be able to speak to other nodes. - // there must be a way to make sure that this transaction can only be sent once. - att, err := common.DecodeAttestation(initSecretTx.Attestation) - if err != nil { - ssp.logger.Error("Could not decode attestation report", log.ErrKey, err) - } - - err = ssp.storeAttestation(ctx, att) - if err != nil { - ssp.logger.Error("Could not store the attestation report.", log.ErrKey, err) - } + resp, err := ssp.processSecretRequest(ctx, scrtReqTx) + if err != nil { + ssp.logger.Error("Failed to process shared secret request.", log.ErrKey, err) + continue } + responses = append(responses, resp) } + + // process initialize secret events + for _, txData := range processed.GetEvents(common.InitialiseSecretTx) { + initSecretTx, ok := txData.Type.(*ethadapter.L1InitializeSecretTx) + if !ok { + continue + } + + att, err := common.DecodeAttestation(initSecretTx.Attestation) + if err != nil { + ssp.logger.Error("Could not decode attestation report", log.ErrKey, err) + continue + } + + if err := ssp.storeAttestation(ctx, att); err != nil { + ssp.logger.Error("Could not store the attestation report.", log.ErrKey, err) + } + } + return responses } diff --git a/go/enclave/crosschain/block_message_extractor.go b/go/enclave/crosschain/block_message_extractor.go index a38d003603..b3b35238a7 100644 --- a/go/enclave/crosschain/block_message_extractor.go +++ b/go/enclave/crosschain/block_message_extractor.go @@ -39,33 +39,19 @@ func (m *blockMessageExtractor) Enabled() bool { return m.GetBusAddress().Big().Cmp(gethcommon.Big0) != 0 } -func (m *blockMessageExtractor) StoreCrossChainValueTransfers(ctx context.Context, block *types.Header, receipts common.L1Receipts) error { +func (m *blockMessageExtractor) StoreCrossChainValueTransfers(ctx context.Context, block *types.Header, processedData *common.ProcessedL1Data) error { defer core.LogMethodDuration(m.logger, measure.NewStopwatch(), "BlockHeader value transfer messages processed", log.BlockHashKey, block.Hash()) - /*areReceiptsValid := common.VerifyReceiptHash(block, receipts) - - if !areReceiptsValid && m.Enabled() { - m.logger.Error("Invalid receipts submitted", log.BlockHashKey, block.Hash()) - return fmt.Errorf("receipts do not match the receipt root for the block") - }*/ - - if len(receipts) == 0 { - return nil - } - - transfers, err := m.getValueTransferMessages(receipts) - if err != nil { - m.logger.Error("Error encountered while getting inbound value transfers from block", log.BlockHashKey, block.Hash(), log.ErrKey, err) - return err - } - - hasTransfers := len(transfers) > 0 - if !hasTransfers { - return nil + // collect all value transfer events from processed data + var transfers common.ValueTransferEvents + for _, txData := range processedData.GetEvents(common.CrossChainValueTranserTx) { + if txData.ValueTransfers != nil { + transfers = append(transfers, *txData.ValueTransfers...) + } } m.logger.Trace("Storing value transfers for block", "nr", len(transfers), log.BlockHashKey, block.Hash()) - err = m.storage.StoreValueTransfers(ctx, block.Hash(), transfers) + err := m.storage.StoreValueTransfers(ctx, block.Hash(), transfers) if err != nil { m.logger.Crit("Unable to store the transfers", log.ErrKey, err) return err @@ -78,23 +64,23 @@ func (m *blockMessageExtractor) StoreCrossChainValueTransfers(ctx context.Contex // The messages will be stored in DB storage for later usage. // block - the L1 block for which events are extracted. // receipts - all of the receipts for the corresponding block. This is validated. -func (m *blockMessageExtractor) StoreCrossChainMessages(ctx context.Context, block *types.Header, receipts common.L1Receipts) error { +func (m *blockMessageExtractor) StoreCrossChainMessages(ctx context.Context, block *types.Header, processedData *common.ProcessedL1Data) error { defer core.LogMethodDuration(m.logger, measure.NewStopwatch(), "BlockHeader cross chain messages processed", log.BlockHashKey, block.Hash()) - if len(receipts) == 0 { - return nil + // collect all messages from the events + var xchain common.CrossChainMessages + var receipts types.Receipts + for _, txData := range processedData.GetEvents(common.CrossChainMessageTx) { + if txData.CrossChainMessages != nil { + xchain = append(xchain, *txData.CrossChainMessages...) + receipts = append(receipts, txData.Receipt) + } } lazilyLogReceiptChecksum(block, receipts, m.logger) - messages, err := m.getCrossChainMessages(block, receipts) - if err != nil { - m.logger.Error("Converting receipts to messages failed.", log.ErrKey, err) - return err - } - - if len(messages) > 0 { - m.logger.Info(fmt.Sprintf("Storing %d messages for block", len(messages)), log.BlockHashKey, block.Hash()) - err = m.storage.StoreL1Messages(ctx, block.Hash(), messages) + if len(xchain) > 0 { + m.logger.Info(fmt.Sprintf("Storing %d messages for block", len(xchain)), log.BlockHashKey, block.Hash()) + err := m.storage.StoreL1Messages(ctx, block.Hash(), xchain) if err != nil { m.logger.Crit("Unable to store the messages", log.ErrKey, err) return err @@ -123,7 +109,7 @@ func (m *blockMessageExtractor) getCrossChainMessages(block *types.Header, recei } m.logger.Trace("Extracted cross chain logs from receipts", "logCount", len(logs)) - messages, err := convertLogsToMessages(logs, CrossChainEventName, MessageBusABI) + messages, err := ConvertLogsToMessages(logs, CrossChainEventName, MessageBusABI) if err != nil { m.logger.Error("Error encountered converting the extracted relevant logs to messages", log.ErrKey, err) return make(common.CrossChainMessages, 0), err diff --git a/go/enclave/crosschain/common.go b/go/enclave/crosschain/common.go index 68806301ed..b472f03154 100644 --- a/go/enclave/crosschain/common.go +++ b/go/enclave/crosschain/common.go @@ -23,11 +23,13 @@ import ( ) var ( - MessageBusABI, _ = abi.JSON(strings.NewReader(MessageBus.MessageBusMetaData.ABI)) - CrossChainEventName = "LogMessagePublished" - CrossChainEventID = MessageBusABI.Events[CrossChainEventName].ID - ValueTransferEventName = "ValueTransfer" - ValueTransferEventID = MessageBusABI.Events["ValueTransfer"].ID + MessageBusABI, _ = abi.JSON(strings.NewReader(MessageBus.MessageBusMetaData.ABI)) + CrossChainEventName = "LogMessagePublished" + CrossChainEventID = MessageBusABI.Events[CrossChainEventName].ID + ValueTransferEventName = "ValueTransfer" + ValueTransferEventID = MessageBusABI.Events["ValueTransfer"].ID + SequencerEnclaveGrantedEventName = "SequencerEnclaveGranted" + SequencerEnclaveGrantedEventID = MessageBusABI.Events["SequencerEnclaveGranted"].ID ) func lazilyLogReceiptChecksum(block *types.Header, receipts types.Receipts, logger gethlog.Logger) { @@ -64,7 +66,7 @@ func filterLogsFromReceipts(receipts types.Receipts, address *gethcommon.Address continue } - logsForReceipt, err := filterLogsFromReceipt(receipt, address, topic) + logsForReceipt, err := FilterLogsFromReceipt(receipt, address, topic) if err != nil { return logs, err } @@ -75,8 +77,8 @@ func filterLogsFromReceipts(receipts types.Receipts, address *gethcommon.Address return logs, nil } -// filterLogsFromReceipt - filters the receipt for logs matching address, if provided and matching any of the provided topics. -func filterLogsFromReceipt(receipt *types.Receipt, address *gethcommon.Address, topic *gethcommon.Hash) ([]types.Log, error) { +// FilterLogsFromReceipt - filters the receipt for logs matching address, if provided and matching any of the provided topics. +func FilterLogsFromReceipt(receipt *types.Receipt, address *gethcommon.Address, topic *gethcommon.Hash) ([]types.Log, error) { logs := make([]types.Log, 0) if receipt == nil { @@ -105,7 +107,7 @@ func filterLogsFromReceipt(receipt *types.Receipt, address *gethcommon.Address, } // convertLogsToMessages - converts the logs of the event to messages. The logs should be filtered, otherwise fails. -func convertLogsToMessages(logs []types.Log, eventName string, messageBusABI abi.ABI) (common.CrossChainMessages, error) { +func ConvertLogsToMessages(logs []types.Log, eventName string, messageBusABI abi.ABI) (common.CrossChainMessages, error) { messages := make(common.CrossChainMessages, 0) for _, log := range logs { diff --git a/go/enclave/crosschain/interfaces.go b/go/enclave/crosschain/interfaces.go index cf161ddee4..9103bd13bb 100644 --- a/go/enclave/crosschain/interfaces.go +++ b/go/enclave/crosschain/interfaces.go @@ -19,9 +19,9 @@ type ( type BlockMessageExtractor interface { // StoreCrossChainMessages - Verifies receipts belong to block and saves the relevant cross chain messages from the receipts - StoreCrossChainMessages(ctx context.Context, block *types.Header, receipts common.L1Receipts) error + StoreCrossChainMessages(ctx context.Context, block *types.Header, processedData *common.ProcessedL1Data) error - StoreCrossChainValueTransfers(ctx context.Context, block *types.Header, receipts common.L1Receipts) error + StoreCrossChainValueTransfers(ctx context.Context, block *types.Header, processedData *common.ProcessedL1Data) error // GetBusAddress - Returns the L1 message bus address. GetBusAddress() *common.L1Address diff --git a/go/enclave/crosschain/message_bus_manager.go b/go/enclave/crosschain/message_bus_manager.go index cdf9b5ec99..827e83f2b7 100644 --- a/go/enclave/crosschain/message_bus_manager.go +++ b/go/enclave/crosschain/message_bus_manager.go @@ -111,7 +111,7 @@ func (m *MessageBusManager) GenerateMessageBusDeployTx() (*common.L2Tx, error) { return stx, nil } -// ExtractLocalMessages - Finds relevant logs in the receipts and converts them to cross chain messages. +// ExtractOutboundMessages - Finds relevant logs in the receipts and converts them to cross chain messages. func (m *MessageBusManager) ExtractOutboundMessages(ctx context.Context, receipts common.L2Receipts) (common.CrossChainMessages, error) { logs, err := filterLogsFromReceipts(receipts, m.messageBusAddress, &CrossChainEventID) if err != nil { @@ -119,7 +119,7 @@ func (m *MessageBusManager) ExtractOutboundMessages(ctx context.Context, receipt return make(common.CrossChainMessages, 0), err } - messages, err := convertLogsToMessages(logs, CrossChainEventName, MessageBusABI) + messages, err := ConvertLogsToMessages(logs, CrossChainEventName, MessageBusABI) if err != nil { m.logger.Error("Error converting messages from L2 message bus!", log.ErrKey, err) return make(common.CrossChainMessages, 0), err diff --git a/go/enclave/enclave.go b/go/enclave/enclave.go index 6846cc4198..ec49f0a471 100644 --- a/go/enclave/enclave.go +++ b/go/enclave/enclave.go @@ -245,11 +245,11 @@ func (e *enclaveImpl) StreamL2Updates() (chan common.StreamL2UpdatesResponse, fu } // SubmitL1Block is used to update the enclave with an additional L1 block. -func (e *enclaveImpl) SubmitL1Block(ctx context.Context, blockHeader *types.Header, receipts []*common.TxAndReceiptAndBlobs) (*common.BlockSubmissionResponse, common.SystemError) { +func (e *enclaveImpl) SubmitL1Block(ctx context.Context, blockHeader *types.Header, processed *common.ProcessedL1Data) (*common.BlockSubmissionResponse, common.SystemError) { if systemError := checkStopping(e.stopControl); systemError != nil { return nil, systemError } - return e.adminService.SubmitL1Block(ctx, blockHeader, receipts) + return e.adminService.SubmitL1Block(ctx, blockHeader, processed) } func (e *enclaveImpl) SubmitBatch(ctx context.Context, extBatch *common.ExtBatch) common.SystemError { diff --git a/go/enclave/enclave_admin_service.go b/go/enclave/enclave_admin_service.go index 6b259ddb4b..01cc7a8da1 100644 --- a/go/enclave/enclave_admin_service.go +++ b/go/enclave/enclave_admin_service.go @@ -9,9 +9,8 @@ import ( "time" "github.com/ethereum/go-ethereum/params" - "github.com/ten-protocol/go-ten/go/ethadapter/mgmtcontractlib" - "github.com/ten-protocol/go-ten/go/enclave/txpool" + "github.com/ten-protocol/go-ten/go/ethadapter/mgmtcontractlib" gethcommon "github.com/ethereum/go-ethereum/common" enclaveconfig "github.com/ten-protocol/go-ten/go/enclave/config" @@ -152,6 +151,11 @@ func (e *enclaveAdminService) AddSequencer(id common.EnclaveID, proof types.Rece e.mempool.SetValidateMode(false) } + //if currentEnclaveId == id { + // todo + //} + + // todo - use the proof return nil } @@ -176,19 +180,17 @@ func (e *enclaveAdminService) MakeActive() common.SystemError { } // SubmitL1Block is used to update the enclave with an additional L1 block. -func (e *enclaveAdminService) SubmitL1Block(ctx context.Context, blockHeader *types.Header, receipts []*common.TxAndReceiptAndBlobs) (*common.BlockSubmissionResponse, common.SystemError) { +func (e *enclaveAdminService) SubmitL1Block(ctx context.Context, blockHeader *types.Header, processed *common.ProcessedL1Data) (*common.BlockSubmissionResponse, common.SystemError) { e.mainMutex.Lock() defer e.mainMutex.Unlock() e.logger.Info("SubmitL1Block", log.BlockHeightKey, blockHeader.Number, log.BlockHashKey, blockHeader.Hash()) - // If the block and receipts do not match, reject the block. - br, err := common.ParseBlockAndReceipts(blockHeader, receipts) - if err != nil { - return nil, e.rejectBlockErr(ctx, fmt.Errorf("could not submit L1 block. Cause: %w", err)) + // Verify the block header matches the one in processedData + if blockHeader.Hash() != processed.BlockHeader.Hash() { + return nil, e.rejectBlockErr(ctx, fmt.Errorf("block header mismatch")) } - - result, err := e.ingestL1Block(ctx, br) + result, err := e.ingestL1Block(ctx, processed) if err != nil { return nil, e.rejectBlockErr(ctx, fmt.Errorf("could not submit L1 block. Cause: %w", err)) } @@ -202,7 +204,7 @@ func (e *enclaveAdminService) SubmitL1Block(ctx context.Context, blockHeader *ty return nil, e.rejectBlockErr(ctx, fmt.Errorf("could not submit L1 block. Cause: %w", err)) } - bsr := &common.BlockSubmissionResponse{ProducedSecretResponses: e.sharedSecretProcessor.ProcessNetworkSecretMsgs(ctx, br)} + bsr := &common.BlockSubmissionResponse{ProducedSecretResponses: e.sharedSecretProcessor.ProcessNetworkSecretMsgs(ctx, processed)} return bsr, nil } @@ -469,20 +471,20 @@ func (e *enclaveAdminService) streamEventsForNewHeadBatch(ctx context.Context, b } } -func (e *enclaveAdminService) ingestL1Block(ctx context.Context, br *common.BlockAndReceipts) (*components.BlockIngestionType, error) { - e.logger.Info("Start ingesting block", log.BlockHashKey, br.BlockHeader.Hash()) - ingestion, err := e.l1BlockProcessor.Process(ctx, br) +func (e *enclaveAdminService) ingestL1Block(ctx context.Context, processed *common.ProcessedL1Data) (*components.BlockIngestionType, error) { + e.logger.Info("Start ingesting block", log.BlockHashKey, processed.BlockHeader.Hash()) + ingestion, err := e.l1BlockProcessor.Process(ctx, processed) if err != nil { // only warn for unexpected errors if errors.Is(err, errutil.ErrBlockAncestorNotFound) || errors.Is(err, errutil.ErrBlockAlreadyProcessed) { - e.logger.Debug("Did not ingest block", log.ErrKey, err, log.BlockHashKey, br.BlockHeader.Hash()) + e.logger.Debug("Did not ingest block", log.ErrKey, err, log.BlockHashKey, processed.BlockHeader.Hash()) } else { - e.logger.Warn("Failed ingesting block", log.ErrKey, err, log.BlockHashKey, br.BlockHeader.Hash()) + e.logger.Warn("Failed ingesting block", log.ErrKey, err, log.BlockHashKey, processed.BlockHeader.Hash()) } return nil, err } - err = e.rollupConsumer.ProcessBlobsInBlock(ctx, br) + err = e.rollupConsumer.ProcessBlobsInBlock(ctx, processed) if err != nil && !errors.Is(err, components.ErrDuplicateRollup) { e.logger.Error("Encountered error while processing l1 block", log.ErrKey, err) // Unsure what to do here; block has been stored diff --git a/go/enclave/rpc_server.go b/go/enclave/rpc_server.go index b1e4ce46ec..65c208fb6f 100644 --- a/go/enclave/rpc_server.go +++ b/go/enclave/rpc_server.go @@ -139,13 +139,13 @@ func (s *RPCServer) SubmitL1Block(ctx context.Context, request *generated.Submit return nil, err } - txReceiptsAndBlobs, err := s.decodeReceiptsAndBlobs(request.EncodedReceipts) + processedData, err := s.decodeProcessedData(request.EncodedProcessedData) if err != nil { s.logger.Error("Error decoding receipts", log.ErrKey, err) return nil, err } - blockSubmissionResponse, err := s.enclave.SubmitL1Block(ctx, bl, txReceiptsAndBlobs) + blockSubmissionResponse, err := s.enclave.SubmitL1Block(ctx, bl, processedData) if err != nil { var rejErr *errutil.BlockRejectError isReject := errors.As(err, &rejErr) @@ -427,16 +427,16 @@ func (s *RPCServer) decodeBlock(encodedBlock []byte) (*types.Header, error) { return &block, nil } -// decodeReceiptsAndBlobs - converts the rlp encoded bytes to receipts if possible. -func (s *RPCServer) decodeReceiptsAndBlobs(encodedReceipts []byte) ([]*common.TxAndReceiptAndBlobs, error) { - receipts := make([]*common.TxAndReceiptAndBlobs, 0) +// decodeProcessedData - converts the rlp encoded bytes to processed if possible. +func (s *RPCServer) decodeProcessedData(encodedData []byte) (*common.ProcessedL1Data, error) { + var processed common.ProcessedL1Data - err := rlp.DecodeBytes(encodedReceipts, &receipts) + err := rlp.DecodeBytes(encodedData, &processed) if err != nil { - return nil, fmt.Errorf("unable to decode receipts, bytes=%x, err=%w", encodedReceipts, err) + return nil, fmt.Errorf("unable to decode receipts, bytes=%x, err=%w", encodedData, err) } - return receipts, nil + return &processed, nil } func toRPCError(err common.SystemError) *generated.SystemError { diff --git a/go/ethadapter/erc20contractlib/erc20_contract_lib.go b/go/ethadapter/erc20contractlib/erc20_contract_lib.go index 162d0f4da8..e4a8ce7ef2 100644 --- a/go/ethadapter/erc20contractlib/erc20_contract_lib.go +++ b/go/ethadapter/erc20contractlib/erc20_contract_lib.go @@ -4,6 +4,8 @@ import ( "math/big" "strings" + "github.com/ten-protocol/go-ten/go/common" + "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/core/types" "github.com/ten-protocol/go-ten/go/ethadapter" @@ -17,7 +19,7 @@ const methodBytesLen = 4 type ERC20ContractLib interface { // DecodeTx receives a *types.Transaction and converts it to an common.L1Transaction // returns nil if the transaction is not convertible - DecodeTx(tx *types.Transaction) ethadapter.L1Transaction + DecodeTx(tx *types.Transaction) common.TenTransaction // CreateDepositTx receives an common.L1Transaction and converts it to an eth transaction CreateDepositTx(tx *ethadapter.L1DepositTx) types.TxData @@ -56,7 +58,7 @@ func (c *erc20ContractLibImpl) CreateDepositTx(tx *ethadapter.L1DepositTx) types } } -func (c *erc20ContractLibImpl) DecodeTx(tx *types.Transaction) ethadapter.L1Transaction { +func (c *erc20ContractLibImpl) DecodeTx(tx *types.Transaction) common.TenTransaction { if !c.isRelevant(tx) { return nil } diff --git a/go/ethadapter/l1_transaction.go b/go/ethadapter/l1_transaction.go index e9e2f867bc..79636bbb6b 100644 --- a/go/ethadapter/l1_transaction.go +++ b/go/ethadapter/l1_transaction.go @@ -11,10 +11,6 @@ import ( "github.com/ethereum/go-ethereum/crypto" ) -// L1Transaction is an abstraction that transforms an Ethereum transaction into a format that can be consumed more -// easily by TEN. -type L1Transaction interface{} - type L1RollupTx struct { Rollup common.EncodedRollup } diff --git a/go/ethadapter/mgmtcontractlib/mgmt_contract_lib.go b/go/ethadapter/mgmtcontractlib/mgmt_contract_lib.go index d6184cc4d0..911f52df5c 100644 --- a/go/ethadapter/mgmtcontractlib/mgmt_contract_lib.go +++ b/go/ethadapter/mgmtcontractlib/mgmt_contract_lib.go @@ -31,7 +31,7 @@ type MgmtContractLib interface { CreateInitializeSecret(tx *ethadapter.L1InitializeSecretTx) types.TxData // DecodeTx receives a *types.Transaction and converts it to a common.L1Transaction - DecodeTx(tx *types.Transaction) ethadapter.L1Transaction + DecodeTx(tx *types.Transaction) common.TenTransaction GetContractAddr() *gethcommon.Address // The methods below are used to create call messages for mgmt contract data and unpack the responses @@ -75,7 +75,7 @@ func (c *contractLibImpl) GetContractAddr() *gethcommon.Address { return c.addr } -func (c *contractLibImpl) DecodeTx(tx *types.Transaction) ethadapter.L1Transaction { +func (c *contractLibImpl) DecodeTx(tx *types.Transaction) common.TenTransaction { if tx.To() == nil || tx.To().Hex() != c.addr.Hex() || len(tx.Data()) == 0 { return nil } diff --git a/go/host/container/host_container.go b/go/host/container/host_container.go index f361e8ae28..a7cefac49a 100644 --- a/go/host/container/host_container.go +++ b/go/host/container/host_container.go @@ -5,9 +5,10 @@ import ( "net/http" "time" + gethcommon "github.com/ethereum/go-ethereum/common" + "github.com/ten-protocol/go-ten/lib/gethfork/node" - gethcommon "github.com/ethereum/go-ethereum/common" "github.com/ten-protocol/go-ten/go/host/l1" "github.com/ten-protocol/go-ten/go/common" @@ -145,12 +146,15 @@ func NewHostContainerFromConfig(cfg *hostconfig.HostConfig, logger gethlog.Logge }, logger) mgmtContractLib := mgmtcontractlib.NewMgmtContractLib(&cfg.ManagementContractAddress, logger) - obscuroRelevantContracts := []gethcommon.Address{cfg.ManagementContractAddress, cfg.MessageBusAddress} - l1Repo := l1.NewL1Repository(l1Client, obscuroRelevantContracts, logger) beaconClient := ethadapter.NewBeaconHTTPClient(new(http.Client), cfg.L1BeaconUrl) beaconFallback := ethadapter.NewBeaconHTTPClient(new(http.Client), cfg.L1BlobArchiveUrl) // we can add more fallback clients as they become available blobResolver := l1.NewBlobResolver(ethadapter.NewL1BeaconClient(beaconClient, beaconFallback)) + contractAddresses := map[l1.ContractType][]gethcommon.Address{ + l1.MgmtContract: {cfg.ManagementContractAddress}, + l1.MsgBus: {cfg.MessageBusAddress}, + } + l1Repo := l1.NewL1Repository(l1Client, logger, mgmtContractLib, blobResolver, contractAddresses) return NewHostContainer(cfg, services, aggP2P, l1Client, l1Repo, enclaveClients, mgmtContractLib, ethWallet, rpcServer, logger, metricsService, blobResolver) } diff --git a/go/host/enclave/guardian.go b/go/host/enclave/guardian.go index 1f1d2fd4f0..e3b84dae9a 100644 --- a/go/host/enclave/guardian.go +++ b/go/host/enclave/guardian.go @@ -423,14 +423,15 @@ func (g *Guardian) submitL1Block(block *common.L1Block, isLatest bool) (bool, er g.logger.Debug("Unable to submit block, enclave is busy processing data") return false, nil } - receipts, err := g.sl.L1Repo().FetchObscuroReceipts(block) + + processedData, err := g.sl.L1Repo().ExtractTenTransactions(block) if err != nil { g.submitDataLock.Unlock() // lock must be released before returning - return false, fmt.Errorf("could not fetch obscuro receipts for block=%s - %w", block.Hash(), err) + return false, fmt.Errorf("could not extract ten transactions for block=%s - %w", block.Hash(), err) } - txsReceiptsAndBlobs, rollupTxs, contractAddressTxs := g.sl.L1Publisher().ExtractRelevantTenTransactions(block, receipts) + rollupTxs, contractAddressTxs := g.getRollupsAndContractAddrTxs(*processedData) - resp, err := g.enclaveClient.SubmitL1Block(context.Background(), block.Header(), txsReceiptsAndBlobs) + resp, err := g.enclaveClient.SubmitL1Block(context.Background(), block.Header(), processedData) g.submitDataLock.Unlock() // lock is only guarding the enclave call, so we can release it now if err != nil { if strings.Contains(err.Error(), errutil.ErrBlockAlreadyProcessed.Error()) { @@ -753,3 +754,31 @@ func (g *Guardian) getLatestBatchNo() (uint64, error) { } return fromBatch, nil } + +func (g *Guardian) getRollupsAndContractAddrTxs(data common.ProcessedL1Data) ([]*ethadapter.L1RollupTx, []*ethadapter.L1SetImportantContractsTx) { + rollupTxs := make([]*ethadapter.L1RollupTx, 0) + contractAddressTxs := make([]*ethadapter.L1SetImportantContractsTx, 0) + + for _, event := range data.GetEvents(common.RollupTx) { + encodedRlp, err := ethadapter.DecodeBlobs(event.Blobs) + if err != nil { + g.logger.Crit("could not decode blobs.", log.ErrKey, err) + continue + } + + rlp := ðadapter.L1RollupTx{ + Rollup: encodedRlp, + } + rollupTxs = append(rollupTxs, rlp) + } + + // Get contract address transactions + for _, event := range data.GetEvents(common.SetImportantContractsTx) { + if contractTx, ok := event.Type.(*ethadapter.L1SetImportantContractsTx); ok { + contractAddressTxs = append(contractAddressTxs, contractTx) + } else { + g.logger.Warn("Unexpected type for SetImportantContractsTx event", "type", fmt.Sprintf("%T", event.Type)) + } + } + return rollupTxs, contractAddressTxs +} diff --git a/go/host/l1/blockrepository.go b/go/host/l1/blockrepository.go index fdae951245..85a8238899 100644 --- a/go/host/l1/blockrepository.go +++ b/go/host/l1/blockrepository.go @@ -8,6 +8,9 @@ import ( "sync/atomic" "time" + "github.com/ten-protocol/go-ten/go/enclave/crosschain" + "github.com/ten-protocol/go-ten/go/ethadapter/mgmtcontractlib" + "github.com/ten-protocol/go-ten/go/common/subscription" "github.com/ten-protocol/go-ten/go/common/host" @@ -29,25 +32,42 @@ var ( ErrNoNextBlock = errors.New("no next block") ) +type ContractType int + +const ( + MgmtContract ContractType = iota + MsgBus +) + // Repository is a host service for subscribing to new blocks and looking up L1 data type Repository struct { blockSubscribers *subscription.Manager[host.L1BlockHandler] // this eth client should only be used by the repository, the repository may "reconnect" it at any time and don't want to interfere with other processes - ethClient ethadapter.EthClient - logger gethlog.Logger + ethClient ethadapter.EthClient + logger gethlog.Logger + mgmtContractLib mgmtcontractlib.MgmtContractLib + blobResolver BlobResolver - running atomic.Bool - head gethcommon.Hash - obscuroRelevantContracts []gethcommon.Address + running atomic.Bool + head gethcommon.Hash + contractAddresses map[ContractType][]gethcommon.Address } -func NewL1Repository(ethClient ethadapter.EthClient, obscuroRelevantContracts []gethcommon.Address, logger gethlog.Logger) *Repository { +func NewL1Repository( + ethClient ethadapter.EthClient, + logger gethlog.Logger, + mgmtContractLib mgmtcontractlib.MgmtContractLib, + blobResolver BlobResolver, + contractAddresses map[ContractType][]gethcommon.Address, +) *Repository { return &Repository{ - blockSubscribers: subscription.NewManager[host.L1BlockHandler](), - ethClient: ethClient, - obscuroRelevantContracts: obscuroRelevantContracts, - running: atomic.Bool{}, - logger: logger, + blockSubscribers: subscription.NewManager[host.L1BlockHandler](), + ethClient: ethClient, + running: atomic.Bool{}, + logger: logger, + mgmtContractLib: mgmtContractLib, + blobResolver: blobResolver, + contractAddresses: contractAddresses, } } @@ -137,7 +157,10 @@ func (r *Repository) FetchObscuroReceipts(block *common.L1Block) (types.Receipts blkHash := block.Hash() // we want to send receipts for any transactions that produced obscuro-relevant log events - logs, err := r.ethClient.GetLogs(ethereum.FilterQuery{BlockHash: &blkHash, Addresses: r.obscuroRelevantContracts}) + var allAddresses []gethcommon.Address + allAddresses = append(allAddresses, r.contractAddresses[MgmtContract]...) + allAddresses = append(allAddresses, r.contractAddresses[MsgBus]...) + logs, err := r.ethClient.GetLogs(ethereum.FilterQuery{BlockHash: &blkHash, Addresses: allAddresses}) if err != nil { return nil, fmt.Errorf("unable to fetch logs for L1 block - %w", err) } @@ -170,6 +193,82 @@ func (r *Repository) FetchObscuroReceipts(block *common.L1Block) (types.Receipts return receipts, nil } +// ExtractTenTransactions does all the filtering of txs to find all the transaction types we care about on the L2. These +// are pulled from the data in the L1 blocks and then submitted to the enclave for processing +func (r *Repository) ExtractTenTransactions(block *common.L1Block) (*common.ProcessedL1Data, error) { + processed := &common.ProcessedL1Data{ + BlockHeader: block.Header(), + Events: []common.L1Event{}, + } + txsWithReceipts, err := r.getRelevantTxReceiptsAndBlobs(block) + if err != nil { + return nil, err + } + + for _, txWithReceipt := range txsWithReceipts { + // Skip if the entire txWithReceipt is nil + if txWithReceipt == nil { + println("TX IS NIL WHY") + continue + } + messages, err := r.getCrossChainMessages(txWithReceipt.Receipt) + if err != nil { + r.logger.Error("Error encountered converting the extracted relevant logs to messages", log.ErrKey, err) + } + + transfers, err := r.getValueTransferEvents(txWithReceipt.Receipt) + if err != nil { + r.logger.Error("Error encountered converting the extracted logs to value transfers", log.ErrKey, err) + } + + sequencerLogs, err := r.getSequencerEventLogs(txWithReceipt.Receipt) + if err != nil { + r.logger.Error("Error encountered converting the extracted relevant logs to messages", log.ErrKey, err) + } + + txData := &common.L1TxData{ + Transaction: txWithReceipt.Tx, + Receipt: txWithReceipt.Receipt, + Blobs: txWithReceipt.Blobs, + CrossChainMessages: &messages, + ValueTransfers: &transfers, + } + + if len(*txData.CrossChainMessages) > 0 { + processed.AddEvent(common.CrossChainMessageTx, txData) + } + + if len(*txData.ValueTransfers) > 0 { + processed.AddEvent(common.CrossChainValueTranserTx, txData) + } + + if len(txData.Blobs) > 0 { + processed.AddEvent(common.RollupTx, txData) + } + + if len(sequencerLogs) > 0 { + processed.AddEvent(common.SequencerAddedTx, txData) + } + + decodedTx := r.mgmtContractLib.DecodeTx(txWithReceipt.Tx) + if decodedTx == nil { + continue + } + txData.Type = decodedTx + + switch decodedTx.(type) { + case *ethadapter.L1RequestSecretTx: + processed.AddEvent(common.SecretRequestTx, txData) + case *ethadapter.L1InitializeSecretTx: + processed.AddEvent(common.InitialiseSecretTx, txData) + case *ethadapter.L1SetImportantContractsTx: + processed.AddEvent(common.SetImportantContractsTx, txData) + } + } + + return processed, nil +} + // stream blocks from L1 as they arrive and forward them to subscribers, no guarantee of perfect ordering or that there won't be gaps. // If streaming is interrupted it will carry on from latest, it won't try to replay missed blocks. func (r *Repository) streamLiveBlocks() { @@ -226,7 +325,10 @@ func (r *Repository) FetchBlockByHeight(height *big.Int) (*types.Block, error) { // isObscuroTransaction will look at the 'to' address of the transaction, we are only interested in management contract and bridge transactions func (r *Repository) isObscuroTransaction(transaction *types.Transaction) bool { - for _, address := range r.obscuroRelevantContracts { + var allAddresses []gethcommon.Address + allAddresses = append(allAddresses, r.contractAddresses[MgmtContract]...) + allAddresses = append(allAddresses, r.contractAddresses[MsgBus]...) + for _, address := range allAddresses { if transaction.To() != nil && *transaction.To() == address { return true } @@ -234,6 +336,89 @@ func (r *Repository) isObscuroTransaction(transaction *types.Transaction) bool { return false } +func (r *Repository) getRelevantTxReceiptsAndBlobs(block *common.L1Block) ([]*common.TxAndReceiptAndBlobs, error) { + // Create a slice that will only contain valid transactions + var txsWithReceipts []*common.TxAndReceiptAndBlobs + + receipts, err := r.FetchObscuroReceipts(block) + if err != nil { + return nil, fmt.Errorf("failed to fetch receipts: %w", err) + } + + for i, tx := range block.Transactions() { + // skip unsuccessful txs + if receipts[i].Status == types.ReceiptStatusFailed { + continue + } + + txWithReceipt := &common.TxAndReceiptAndBlobs{ + Tx: tx, + Receipt: receipts[i], + } + + if tx.Type() == types.BlobTxType { + txBlobs := tx.BlobHashes() + blobs, err := r.blobResolver.FetchBlobs(context.Background(), block.Header(), txBlobs) + if err != nil { + if errors.Is(err, ethereum.NotFound) { + r.logger.Crit("Blobs were not found on beacon chain or archive service", "block", block.Hash(), "error", err) + } else { + r.logger.Crit("could not fetch blobs", log.ErrKey, err) + } + continue + } + txWithReceipt.Blobs = blobs + } + + // Append only valid transactions + txsWithReceipts = append(txsWithReceipts, txWithReceipt) + } + + return txsWithReceipts, nil +} + +func (r *Repository) getCrossChainMessages(receipt *types.Receipt) (common.CrossChainMessages, error) { + logsForReceipt, err := crosschain.FilterLogsFromReceipt(receipt, &r.contractAddresses[MsgBus][0], &crosschain.CrossChainEventID) + if err != nil { + r.logger.Error("Error encountered when filtering receipt logs for cross chain messages.", log.ErrKey, err) + return make(common.CrossChainMessages, 0), err + } + messages, err := crosschain.ConvertLogsToMessages(logsForReceipt, crosschain.CrossChainEventName, crosschain.MessageBusABI) + if err != nil { + r.logger.Error("Error encountered converting the extracted relevant logs to messages", log.ErrKey, err) + return make(common.CrossChainMessages, 0), err + } + + return messages, nil +} + +func (r *Repository) getValueTransferEvents(receipt *types.Receipt) (common.ValueTransferEvents, error) { + logsForReceipt, err := crosschain.FilterLogsFromReceipt(receipt, &r.contractAddresses[MsgBus][0], &crosschain.ValueTransferEventID) + if err != nil { + r.logger.Error("Error encountered when filtering receipt logs for value transfers.", log.ErrKey, err) + return make(common.ValueTransferEvents, 0), err + } + transfers, err := crosschain.ConvertLogsToValueTransfers(logsForReceipt, crosschain.CrossChainEventName, crosschain.MessageBusABI) + if err != nil { + r.logger.Error("Error encountered converting the extracted relevant logs to messages", log.ErrKey, err) + return make(common.ValueTransferEvents, 0), err + } + + return transfers, nil +} + +func (r *Repository) getSequencerEventLogs(receipt *types.Receipt) ([]types.Log, error) { + sequencerLogs, err := crosschain.FilterLogsFromReceipt(receipt, &r.contractAddresses[MgmtContract][0], &crosschain.SequencerEnclaveGrantedEventID) + if err != nil { + r.logger.Error("Error filtering sequencer logs", log.ErrKey, err) + return []types.Log{}, err + } + + // TODO convert to add sequencer? + + return sequencerLogs, nil +} + func increment(i *big.Int) *big.Int { return i.Add(i, one) } diff --git a/go/host/l1/publisher.go b/go/host/l1/publisher.go index 5675deacaa..9c84f795b2 100644 --- a/go/host/l1/publisher.go +++ b/go/host/l1/publisher.go @@ -252,7 +252,6 @@ func (p *Publisher) ExtractRelevantTenTransactions(block *types.Block, receipts contractAddressTxs = append(contractAddressTxs, typedTx) case *ethadapter.L1RollupHashes: blobs, err = p.blobResolver.FetchBlobs(p.sendingContext, block.Header(), typedTx.BlobHashes) - // temporarily add this host stopping check to prevent sim test failures until a more robust solution is implemented if err != nil { if errors.Is(err, ethereum.NotFound) { p.logger.Crit("Blobs were not found on beacon chain or archive service", "block", block.Hash(), "error", err) diff --git a/go/host/rpc/enclaverpc/enclave_client.go b/go/host/rpc/enclaverpc/enclave_client.go index 268afe7c7a..4fe706fa27 100644 --- a/go/host/rpc/enclaverpc/enclave_client.go +++ b/go/host/rpc/enclaverpc/enclave_client.go @@ -198,18 +198,18 @@ func (c *Client) EnclaveID(ctx context.Context) (common.EnclaveID, common.System return common.EnclaveID(response.EnclaveID), nil } -func (c *Client) SubmitL1Block(ctx context.Context, blockHeader *types.Header, txsReceiptsAndBlobs []*common.TxAndReceiptAndBlobs) (*common.BlockSubmissionResponse, common.SystemError) { +func (c *Client) SubmitL1Block(ctx context.Context, blockHeader *types.Header, processedData *common.ProcessedL1Data) (*common.BlockSubmissionResponse, common.SystemError) { var buffer bytes.Buffer if err := blockHeader.EncodeRLP(&buffer); err != nil { return nil, fmt.Errorf("could not encode block. Cause: %w", err) } - serializedTxsReceiptsAndBlobs, err := rlp.EncodeToBytes(txsReceiptsAndBlobs) + serializedProcessedData, err := rlp.EncodeToBytes(processedData) if err != nil { - return nil, fmt.Errorf("could not encode receipts. Cause: %w", err) + return nil, fmt.Errorf("could not encode processed data. Cause: %w", err) } - response, err := c.protoClient.SubmitL1Block(ctx, &generated.SubmitBlockRequest{EncodedBlock: buffer.Bytes(), EncodedReceipts: serializedTxsReceiptsAndBlobs}) + response, err := c.protoClient.SubmitL1Block(ctx, &generated.SubmitBlockRequest{EncodedBlock: buffer.Bytes(), EncodedProcessedData: serializedProcessedData}) if err != nil { return nil, fmt.Errorf("could not submit block. Cause: %w", err) } diff --git a/integration/ethereummock/erc20_contract_lib.go b/integration/ethereummock/erc20_contract_lib.go index e9b0117c86..428fcddd50 100644 --- a/integration/ethereummock/erc20_contract_lib.go +++ b/integration/ethereummock/erc20_contract_lib.go @@ -3,10 +3,12 @@ package ethereummock import ( "bytes" - "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" + "github.com/ten-protocol/go-ten/go/common" "github.com/ten-protocol/go-ten/go/ethadapter" "github.com/ten-protocol/go-ten/go/ethadapter/erc20contractlib" + + gethcommon "github.com/ethereum/go-ethereum/common" ) type contractLib struct{} @@ -15,8 +17,8 @@ func (c *contractLib) CreateDepositTx(tx *ethadapter.L1DepositTx) types.TxData { return encodeTx(tx, depositTxAddr) } -// Return only deposit transactions to the management contract -func (c *contractLib) DecodeTx(tx *types.Transaction) ethadapter.L1Transaction { +// DecodeTx - return only deposit transactions to the management contract +func (c *contractLib) DecodeTx(tx *types.Transaction) common.TenTransaction { if bytes.Equal(tx.To().Bytes(), depositTxAddr.Bytes()) { depositTx, ok := decodeTx(tx).(*ethadapter.L1DepositTx) if !ok { @@ -25,7 +27,7 @@ func (c *contractLib) DecodeTx(tx *types.Transaction) ethadapter.L1Transaction { // Mock deposits towards the L1 bridge target nil as the management contract address // is not set. - if bytes.Equal(depositTx.To.Bytes(), common.BigToAddress(common.Big0).Bytes()) { + if bytes.Equal(depositTx.To.Bytes(), gethcommon.BigToAddress(gethcommon.Big0).Bytes()) { return depositTx } } diff --git a/integration/ethereummock/mgmt_contract_lib.go b/integration/ethereummock/mgmt_contract_lib.go index 500a40a889..5c89827dd0 100644 --- a/integration/ethereummock/mgmt_contract_lib.go +++ b/integration/ethereummock/mgmt_contract_lib.go @@ -5,6 +5,9 @@ import ( "encoding/gob" "fmt" + "github.com/ten-protocol/go-ten/go/common" + "github.com/ten-protocol/go-ten/go/host/l1" + "github.com/ten-protocol/go-ten/go/ethadapter" "github.com/ten-protocol/go-ten/integration/datagenerator" @@ -22,13 +25,19 @@ var ( storeSecretTxAddr = datagenerator.RandomAddress() requestSecretTxAddr = datagenerator.RandomAddress() initializeSecretTxAddr = datagenerator.RandomAddress() - // MgmtContractAddresses make all these addresses available for the host to know what receipts will be forwarded to the enclave - MgmtContractAddresses = []gethcommon.Address{ - depositTxAddr, - rollupTxAddr, - storeSecretTxAddr, - requestSecretTxAddr, - initializeSecretTxAddr, + messageBusAddr = datagenerator.RandomAddress() + // ContractAddresses maps contract types to their addresses + ContractAddresses = map[l1.ContractType][]gethcommon.Address{ + l1.MgmtContract: { + depositTxAddr, + rollupTxAddr, + storeSecretTxAddr, + requestSecretTxAddr, + initializeSecretTxAddr, + }, + l1.MsgBus: { + messageBusAddr, + }, } ) @@ -49,7 +58,7 @@ func (m *mockContractLib) GetContractAddr() *gethcommon.Address { return &rollupTxAddr } -func (m *mockContractLib) DecodeTx(tx *types.Transaction) ethadapter.L1Transaction { +func (m *mockContractLib) DecodeTx(tx *types.Transaction) common.TenTransaction { // Do not decode erc20 transactions, this is the responsibility // of the erc20 contract lib. if tx.To().Hex() == depositTxAddr.Hex() { @@ -134,7 +143,7 @@ func (m *mockContractLib) DecodeImportantAddressResponse([]byte) (gethcommon.Add return gethcommon.Address{}, nil } -func decodeTx(tx *types.Transaction) ethadapter.L1Transaction { +func decodeTx(tx *types.Transaction) common.TenTransaction { if len(tx.Data()) == 0 { panic("Data cannot be 0 in the mock implementation") } @@ -146,7 +155,7 @@ func decodeTx(tx *types.Transaction) ethadapter.L1Transaction { // in the mock implementation we use the To address field to specify the L1 operation (rollup/storesecret/requestsecret) // the mock implementation does not process contracts // so this is a way that we can differentiate different contract calls - var t ethadapter.L1Transaction + var t common.TenTransaction switch tx.To().Hex() { case storeSecretTxAddr.Hex(): t = ðadapter.L1RespondSecretTx{} @@ -168,7 +177,7 @@ func decodeTx(tx *types.Transaction) ethadapter.L1Transaction { return t } -func encodeTx(tx ethadapter.L1Transaction, opType gethcommon.Address) types.TxData { +func encodeTx(tx common.TenTransaction, opType gethcommon.Address) types.TxData { var buf bytes.Buffer enc := gob.NewEncoder(&buf) diff --git a/integration/simulation/network/network_utils.go b/integration/simulation/network/network_utils.go index 52a3b25192..d333eb934f 100644 --- a/integration/simulation/network/network_utils.go +++ b/integration/simulation/network/network_utils.go @@ -111,7 +111,7 @@ func createInMemTenNode( // create an in memory TEN node hostLogger := testlog.Logger().New(log.NodeIDKey, id, log.CmpKey, log.HostCmp) metricsService := metrics.New(hostConfig.MetricsEnabled, hostConfig.MetricsHTTPPort, hostLogger) - l1Repo := l1.NewL1Repository(ethClient, ethereummock.MgmtContractAddresses, hostLogger) + l1Repo := l1.NewL1Repository(ethClient, hostLogger, mgmtContractLib, blobResolver, ethereummock.ContractAddresses) currentContainer := hostcontainer.NewHostContainer(hostConfig, host.NewServicesRegistry(hostLogger), mockP2P, ethClient, l1Repo, enclaveClients, mgmtContractLib, ethWallet, nil, hostLogger, metricsService, blobResolver) return currentContainer diff --git a/integration/simulation/transaction_injector_tracker.go b/integration/simulation/transaction_injector_tracker.go index e6b678fc65..c2b4f472fe 100644 --- a/integration/simulation/transaction_injector_tracker.go +++ b/integration/simulation/transaction_injector_tracker.go @@ -4,7 +4,6 @@ import ( "sync" "github.com/ethereum/go-ethereum/core/types" - "github.com/ten-protocol/go-ten/go/ethadapter" "github.com/ten-protocol/go-ten/go/wallet" "github.com/ten-protocol/go-ten/go/common" @@ -13,7 +12,7 @@ import ( type txInjectorTracker struct { gasTransactionsLock sync.RWMutex l1TransactionsLock sync.RWMutex - L1Transactions []ethadapter.L1Transaction + L1Transactions []common.TenTransaction l2TransactionsLock sync.RWMutex TransferL2Transactions []*common.L2Tx NativeValueTransferL2Transactions []*common.L2Tx @@ -29,7 +28,7 @@ type GasBridgingRecord struct { func newCounter() *txInjectorTracker { return &txInjectorTracker{ l1TransactionsLock: sync.RWMutex{}, - L1Transactions: []ethadapter.L1Transaction{}, + L1Transactions: []common.TenTransaction{}, l2TransactionsLock: sync.RWMutex{}, TransferL2Transactions: []*common.L2Tx{}, WithdrawalL2Transactions: []*common.L2Tx{}, @@ -48,7 +47,7 @@ func (m *txInjectorTracker) trackGasBridgingTx(tx *types.Transaction, receiverWa } // trackL1Tx adds an L1Tx to the internal list -func (m *txInjectorTracker) trackL1Tx(tx ethadapter.L1Transaction) { +func (m *txInjectorTracker) trackL1Tx(tx common.TenTransaction) { m.l1TransactionsLock.Lock() defer m.l1TransactionsLock.Unlock() m.L1Transactions = append(m.L1Transactions, tx) @@ -73,7 +72,7 @@ func (m *txInjectorTracker) trackNativeValueTransferL2Tx(tx *common.L2Tx) { } // GetL1Transactions returns all generated L1 L2Txs -func (m *txInjectorTracker) GetL1Transactions() []ethadapter.L1Transaction { +func (m *txInjectorTracker) GetL1Transactions() []common.TenTransaction { return m.L1Transactions }