From 93cef389cf6cd06da7cbe3e1d3ab7c0622e547ad Mon Sep 17 00:00:00 2001 From: Darioush Jalali Date: Wed, 7 Aug 2024 07:45:15 -0700 Subject: [PATCH 01/23] Remove cross-chain requests --- message/internal_msg_builder.go | 158 --- message/ops.go | 22 +- network/p2p/client.go | 62 - network/p2p/handler.go | 49 +- network/p2p/network.go | 12 - network/p2p/network_test.go | 141 +-- network/p2p/router.go | 122 +- network/p2p/throttler_handler.go | 4 - proto/appsender/appsender.proto | 33 - proto/pb/appsender/appsender.pb.go | 366 +----- proto/pb/appsender/appsender_grpc.pb.go | 119 +- proto/pb/vm/vm.pb.go | 1113 ++++++----------- proto/pb/vm/vm_grpc.pb.go | 111 -- proto/vm/vm.proto | 35 - scripts/mocks.mockgen.source.txt | 2 +- snow/engine/avalanche/vertex/mock_vm.go | 42 - .../common/appsender/appsender_client.go | 38 - .../common/appsender/appsender_server.go | 27 - snow/engine/common/engine.go | 56 - snow/engine/common/mock_sender.go | 44 +- snow/engine/common/no_ops_handlers.go | 31 - snow/engine/common/sender.go | 28 - snow/engine/common/traced_engine.go | 32 - snow/engine/enginetest/engine.go | 71 +- snow/engine/enginetest/sender.go | 79 +- snow/engine/enginetest/vm.go | 101 +- snow/engine/snowman/block/mock_chain_vm.go | 42 - snow/networking/handler/handler.go | 33 +- snow/networking/router/chain_router_test.go | 131 +- snow/networking/sender/sender.go | 64 - snow/networking/sender/sender_test.go | 18 - snow/networking/sender/traced_sender.go | 34 - version/constants.go | 2 +- vms/avm/network/atomic.go | 47 - vms/rpcchainvm/vm_client.go | 37 - vms/rpcchainvm/vm_server.go | 33 - 36 files changed, 506 insertions(+), 2833 deletions(-) diff --git a/message/internal_msg_builder.go b/message/internal_msg_builder.go index 141dabaae41..9de6dabbd44 100644 --- a/message/internal_msg_builder.go +++ b/message/internal_msg_builder.go @@ -6,7 +6,6 @@ package message import ( "fmt" - "time" "github.com/ava-labs/avalanchego/ids" "github.com/ava-labs/avalanchego/proto/pb/p2p" @@ -48,21 +47,6 @@ var ( _ chainIDGetter = (*QueryFailed)(nil) _ requestIDGetter = (*QueryFailed)(nil) - _ fmt.Stringer = (*CrossChainAppRequest)(nil) - _ sourceChainIDGetter = (*CrossChainAppRequest)(nil) - _ chainIDGetter = (*CrossChainAppRequest)(nil) - _ requestIDGetter = (*CrossChainAppRequest)(nil) - - _ fmt.Stringer = (*CrossChainAppRequestFailed)(nil) - _ sourceChainIDGetter = (*CrossChainAppRequestFailed)(nil) - _ chainIDGetter = (*CrossChainAppRequestFailed)(nil) - _ requestIDGetter = (*CrossChainAppRequestFailed)(nil) - - _ fmt.Stringer = (*CrossChainAppResponse)(nil) - _ sourceChainIDGetter = (*CrossChainAppResponse)(nil) - _ chainIDGetter = (*CrossChainAppResponse)(nil) - _ requestIDGetter = (*CrossChainAppResponse)(nil) - _ fmt.Stringer = (*Disconnected)(nil) _ fmt.Stringer = (*GossipRequest)(nil) @@ -329,148 +313,6 @@ func InternalQueryFailed( } } -type CrossChainAppRequest struct { - SourceChainID ids.ID `json:"source_chain_id,omitempty"` - DestinationChainID ids.ID `json:"destination_chain_id,omitempty"` - RequestID uint32 `json:"request_id,omitempty"` - Message []byte `json:"message,omitempty"` -} - -func (m *CrossChainAppRequest) String() string { - return fmt.Sprintf( - "SourceChainID: %s DestinationChainID: %s RequestID: %d Message: 0x%x", - m.SourceChainID, m.DestinationChainID, m.RequestID, m.Message, - ) -} - -func (m *CrossChainAppRequest) GetSourceChainID() ids.ID { - return m.SourceChainID -} - -func (m *CrossChainAppRequest) GetChainId() []byte { - return m.DestinationChainID[:] -} - -func (m *CrossChainAppRequest) GetRequestId() uint32 { - return m.RequestID -} - -func InternalCrossChainAppRequest( - nodeID ids.NodeID, - sourceChainID ids.ID, - destinationChainID ids.ID, - requestID uint32, - deadline time.Duration, - msg []byte, -) InboundMessage { - return &inboundMessage{ - nodeID: nodeID, - op: CrossChainAppRequestOp, - message: &CrossChainAppRequest{ - SourceChainID: sourceChainID, - DestinationChainID: destinationChainID, - RequestID: requestID, - Message: msg, - }, - expiration: time.Now().Add(deadline), - } -} - -type CrossChainAppRequestFailed struct { - SourceChainID ids.ID `json:"source_chain_id,omitempty"` - DestinationChainID ids.ID `json:"destination_chain_id,omitempty"` - RequestID uint32 `json:"request_id,omitempty"` - ErrorCode int32 `json:"error_code,omitempty"` - ErrorMessage string `json:"error_message,omitempty"` -} - -func (m *CrossChainAppRequestFailed) String() string { - return fmt.Sprintf( - "SourceChainID: %s DestinationChainID: %s RequestID: %d", - m.SourceChainID, m.DestinationChainID, m.RequestID, - ) -} - -func (m *CrossChainAppRequestFailed) GetSourceChainID() ids.ID { - return m.SourceChainID -} - -func (m *CrossChainAppRequestFailed) GetChainId() []byte { - return m.DestinationChainID[:] -} - -func (m *CrossChainAppRequestFailed) GetRequestId() uint32 { - return m.RequestID -} - -func InternalCrossChainAppError( - nodeID ids.NodeID, - sourceChainID ids.ID, - destinationChainID ids.ID, - requestID uint32, - errorCode int32, - errorMessage string, -) InboundMessage { - return &inboundMessage{ - nodeID: nodeID, - op: CrossChainAppErrorOp, - message: &CrossChainAppRequestFailed{ - SourceChainID: sourceChainID, - DestinationChainID: destinationChainID, - RequestID: requestID, - ErrorCode: errorCode, - ErrorMessage: errorMessage, - }, - expiration: mockable.MaxTime, - } -} - -type CrossChainAppResponse struct { - SourceChainID ids.ID `json:"source_chain_id,omitempty"` - DestinationChainID ids.ID `json:"destination_chain_id,omitempty"` - RequestID uint32 `json:"request_id,omitempty"` - Message []byte `json:"message,omitempty"` -} - -func (m *CrossChainAppResponse) String() string { - return fmt.Sprintf( - "SourceChainID: %s DestinationChainID: %s RequestID: %d Message: 0x%x", - m.SourceChainID, m.DestinationChainID, m.RequestID, m.Message, - ) -} - -func (m *CrossChainAppResponse) GetSourceChainID() ids.ID { - return m.SourceChainID -} - -func (m *CrossChainAppResponse) GetChainId() []byte { - return m.DestinationChainID[:] -} - -func (m *CrossChainAppResponse) GetRequestId() uint32 { - return m.RequestID -} - -func InternalCrossChainAppResponse( - nodeID ids.NodeID, - sourceChainID ids.ID, - destinationChainID ids.ID, - requestID uint32, - msg []byte, -) InboundMessage { - return &inboundMessage{ - nodeID: nodeID, - op: CrossChainAppResponseOp, - message: &CrossChainAppResponse{ - SourceChainID: sourceChainID, - DestinationChainID: destinationChainID, - RequestID: requestID, - Message: msg, - }, - expiration: mockable.MaxTime, - } -} - type Connected struct { NodeVersion *version.Application `json:"node_version,omitempty"` } diff --git a/message/ops.go b/message/ops.go index 11c69087b5f..92c4697949b 100644 --- a/message/ops.go +++ b/message/ops.go @@ -54,10 +54,6 @@ const ( AppErrorOp AppResponseOp AppGossipOp - // Cross chain: - CrossChainAppRequestOp - CrossChainAppErrorOp - CrossChainAppResponseOp // Internal: ConnectedOp ConnectedSubnetOp @@ -116,9 +112,6 @@ var ( GetAncestorsFailedOp, GetFailedOp, QueryFailedOp, - CrossChainAppRequestOp, - CrossChainAppErrorOp, - CrossChainAppResponseOp, ConnectedOp, ConnectedSubnetOp, DisconnectedOp, @@ -168,10 +161,6 @@ var ( AppErrorOp, AppGossipOp, AppResponseOp, - // Cross chain - CrossChainAppRequestOp, - CrossChainAppErrorOp, - CrossChainAppResponseOp, } FailedToResponseOps = map[Op]Op{ @@ -183,7 +172,6 @@ var ( GetFailedOp: PutOp, QueryFailedOp: ChitsOp, AppErrorOp: AppResponseOp, - CrossChainAppErrorOp: CrossChainAppResponseOp, } UnrequestedOps = set.Of( GetAcceptedFrontierOp, @@ -194,7 +182,6 @@ var ( PullQueryOp, AppRequestOp, AppGossipOp, - CrossChainAppRequestOp, GetStateSummaryFrontierOp, GetAcceptedStateSummaryOp, ) @@ -271,14 +258,7 @@ func (op Op) String() string { return "app_response" case AppGossipOp: return "app_gossip" - // Cross chain - case CrossChainAppRequestOp: - return "cross_chain_app_request" - case CrossChainAppErrorOp: - return "cross_chain_app_error" - case CrossChainAppResponseOp: - return "cross_chain_app_response" - // Internal + // Internal case ConnectedOp: return "connected" case ConnectedSubnetOp: diff --git a/network/p2p/client.go b/network/p2p/client.go index 18556bfad1f..2e5013a211f 100644 --- a/network/p2p/client.go +++ b/network/p2p/client.go @@ -31,16 +31,6 @@ type AppResponseCallback func( err error, ) -// CrossChainAppResponseCallback is called upon receiving an -// CrossChainAppResponse for a CrossChainAppRequest issued by Client. -// Callers should check [err] to see whether the AppRequest failed or not. -type CrossChainAppResponseCallback func( - ctx context.Context, - chainID ids.ID, - responseBytes []byte, - err error, -) - type Client struct { handlerID uint64 handlerIDStr string @@ -140,58 +130,6 @@ func (c *Client) AppGossip( ) } -// CrossChainAppRequest sends a cross chain app request to another vm. -// [onResponse] is invoked upon an error or a response. -func (c *Client) CrossChainAppRequest( - ctx context.Context, - chainID ids.ID, - appRequestBytes []byte, - onResponse CrossChainAppResponseCallback, -) error { - // Cancellation is removed from this context to avoid erroring unexpectedly. - // SendCrossChainAppRequest should be non-blocking and any error other than - // context cancellation is unexpected. - // - // This guarantees that the router should never receive an unexpected - // CrossChainAppResponse. - ctxWithoutCancel := context.WithoutCancel(ctx) - - c.router.lock.Lock() - defer c.router.lock.Unlock() - - requestID := c.router.requestID - if _, ok := c.router.pendingCrossChainAppRequests[requestID]; ok { - return fmt.Errorf( - "failed to issue request with request id %d: %w", - requestID, - ErrRequestPending, - ) - } - - if err := c.sender.SendCrossChainAppRequest( - ctxWithoutCancel, - chainID, - requestID, - PrefixMessage(c.handlerPrefix, appRequestBytes), - ); err != nil { - c.router.log.Error("unexpected error when sending message", - zap.Stringer("op", message.CrossChainAppRequestOp), - zap.Stringer("chainID", chainID), - zap.Uint32("requestID", requestID), - zap.Error(err), - ) - return err - } - - c.router.pendingCrossChainAppRequests[requestID] = pendingCrossChainAppRequest{ - handlerID: c.handlerIDStr, - callback: onResponse, - } - c.router.requestID += 2 - - return nil -} - // PrefixMessage prefixes the original message with the protocol identifier. // // Only gossip and request messages need to be prefixed. diff --git a/network/p2p/handler.go b/network/p2p/handler.go index 3223ed36222..23819cd1846 100644 --- a/network/p2p/handler.go +++ b/network/p2p/handler.go @@ -46,15 +46,6 @@ type Handler interface { deadline time.Time, requestBytes []byte, ) ([]byte, *common.AppError) - // CrossChainAppRequest is called when handling a CrossChainAppRequest - // message. - // Returns the bytes for the response corresponding to [requestBytes] - CrossChainAppRequest( - ctx context.Context, - chainID ids.ID, - deadline time.Time, - requestBytes []byte, - ) ([]byte, error) } // NoOpHandler drops all messages @@ -66,10 +57,6 @@ func (NoOpHandler) AppRequest(context.Context, ids.NodeID, time.Time, []byte) ([ return nil, nil } -func (NoOpHandler) CrossChainAppRequest(context.Context, ids.ID, time.Time, []byte) ([]byte, error) { - return nil, nil -} - func NewValidatorHandler( handler Handler, validatorSet ValidatorSet, @@ -109,10 +96,6 @@ func (v ValidatorHandler) AppRequest(ctx context.Context, nodeID ids.NodeID, dea return v.handler.AppRequest(ctx, nodeID, deadline, requestBytes) } -func (v ValidatorHandler) CrossChainAppRequest(ctx context.Context, chainID ids.ID, deadline time.Time, requestBytes []byte) ([]byte, error) { - return v.handler.CrossChainAppRequest(ctx, chainID, deadline, requestBytes) -} - // responder automatically sends the response for a given request type responder struct { Handler @@ -140,29 +123,9 @@ func (r *responder) AppRequest(ctx context.Context, nodeID ids.NodeID, requestID return r.sender.SendAppResponse(ctx, nodeID, requestID, appResponse) } -// CrossChainAppRequest calls the underlying handler and sends back the response -// to chainID -func (r *responder) CrossChainAppRequest(ctx context.Context, chainID ids.ID, requestID uint32, deadline time.Time, request []byte) error { - appResponse, err := r.Handler.CrossChainAppRequest(ctx, chainID, deadline, request) - if err != nil { - r.log.Debug("failed to handle message", - zap.Stringer("messageOp", message.CrossChainAppRequestOp), - zap.Stringer("chainID", chainID), - zap.Uint32("requestID", requestID), - zap.Time("deadline", deadline), - zap.Uint64("handlerID", r.handlerID), - zap.Binary("message", request), - ) - return nil //nolint:nilerr - } - - return r.sender.SendCrossChainAppResponse(ctx, chainID, requestID, appResponse) -} - type TestHandler struct { - AppGossipF func(ctx context.Context, nodeID ids.NodeID, gossipBytes []byte) - AppRequestF func(ctx context.Context, nodeID ids.NodeID, deadline time.Time, requestBytes []byte) ([]byte, *common.AppError) - CrossChainAppRequestF func(ctx context.Context, chainID ids.ID, deadline time.Time, requestBytes []byte) ([]byte, error) + AppGossipF func(ctx context.Context, nodeID ids.NodeID, gossipBytes []byte) + AppRequestF func(ctx context.Context, nodeID ids.NodeID, deadline time.Time, requestBytes []byte) ([]byte, *common.AppError) } func (t TestHandler) AppGossip(ctx context.Context, nodeID ids.NodeID, gossipBytes []byte) { @@ -180,11 +143,3 @@ func (t TestHandler) AppRequest(ctx context.Context, nodeID ids.NodeID, deadline return t.AppRequestF(ctx, nodeID, deadline, requestBytes) } - -func (t TestHandler) CrossChainAppRequest(ctx context.Context, chainID ids.ID, deadline time.Time, requestBytes []byte) ([]byte, error) { - if t.CrossChainAppRequestF == nil { - return nil, nil - } - - return t.CrossChainAppRequestF(ctx, chainID, deadline, requestBytes) -} diff --git a/network/p2p/network.go b/network/p2p/network.go index 491b35bbe9b..fff077645d9 100644 --- a/network/p2p/network.go +++ b/network/p2p/network.go @@ -124,18 +124,6 @@ func (n *Network) AppGossip(ctx context.Context, nodeID ids.NodeID, msg []byte) return n.router.AppGossip(ctx, nodeID, msg) } -func (n *Network) CrossChainAppRequest(ctx context.Context, chainID ids.ID, requestID uint32, deadline time.Time, request []byte) error { - return n.router.CrossChainAppRequest(ctx, chainID, requestID, deadline, request) -} - -func (n *Network) CrossChainAppResponse(ctx context.Context, chainID ids.ID, requestID uint32, response []byte) error { - return n.router.CrossChainAppResponse(ctx, chainID, requestID, response) -} - -func (n *Network) CrossChainAppRequestFailed(ctx context.Context, chainID ids.ID, requestID uint32, appErr *common.AppError) error { - return n.router.CrossChainAppRequestFailed(ctx, chainID, requestID, appErr) -} - func (n *Network) Connected(_ context.Context, nodeID ids.NodeID, _ *version.Application) error { n.Peers.add(nodeID) return nil diff --git a/network/p2p/network_test.go b/network/p2p/network_test.go index 5d4e746eaf1..7ef18da3dbc 100644 --- a/network/p2p/network_test.go +++ b/network/p2p/network_test.go @@ -35,10 +35,9 @@ func TestMessageRouting(t *testing.T) { require := require.New(t) ctx := context.Background() wantNodeID := ids.GenerateTestNodeID() - wantChainID := ids.GenerateTestID() wantMsg := []byte("message") - var appGossipCalled, appRequestCalled, crossChainAppRequestCalled bool + var appGossipCalled, appRequestCalled bool testHandler := &TestHandler{ AppGossipF: func(_ context.Context, nodeID ids.NodeID, msg []byte) { appGossipCalled = true @@ -51,18 +50,11 @@ func TestMessageRouting(t *testing.T) { require.Equal(wantMsg, msg) return nil, nil }, - CrossChainAppRequestF: func(_ context.Context, chainID ids.ID, _ time.Time, msg []byte) ([]byte, error) { - crossChainAppRequestCalled = true - require.Equal(wantChainID, chainID) - require.Equal(wantMsg, msg) - return nil, nil - }, } sender := &enginetest.SenderStub{ - SentAppGossip: make(chan []byte, 1), - SentAppRequest: make(chan []byte, 1), - SentCrossChainAppRequest: make(chan []byte, 1), + SentAppGossip: make(chan []byte, 1), + SentAppRequest: make(chan []byte, 1), } network, err := NewNetwork(logging.NoLog{}, sender, prometheus.NewRegistry(), "") @@ -83,10 +75,6 @@ func TestMessageRouting(t *testing.T) { require.NoError(client.AppRequest(ctx, set.Of(ids.EmptyNodeID), wantMsg, func(context.Context, ids.NodeID, []byte, error) {})) require.NoError(network.AppRequest(ctx, wantNodeID, 1, time.Time{}, <-sender.SentAppRequest)) require.True(appRequestCalled) - - require.NoError(client.CrossChainAppRequest(ctx, ids.Empty, wantMsg, func(context.Context, ids.ID, []byte, error) {})) - require.NoError(network.CrossChainAppRequest(ctx, wantChainID, 1, time.Time{}, <-sender.SentCrossChainAppRequest)) - require.True(crossChainAppRequestCalled) } // Tests that the Client prefixes messages with the handler prefix @@ -95,9 +83,8 @@ func TestClientPrefixesMessages(t *testing.T) { ctx := context.Background() sender := enginetest.SenderStub{ - SentAppRequest: make(chan []byte, 1), - SentAppGossip: make(chan []byte, 1), - SentCrossChainAppRequest: make(chan []byte, 1), + SentAppRequest: make(chan []byte, 1), + SentAppGossip: make(chan []byte, 1), } network, err := NewNetwork(logging.NoLog{}, sender, prometheus.NewRegistry(), "") @@ -126,16 +113,6 @@ func TestClientPrefixesMessages(t *testing.T) { require.Equal(handlerPrefix, gotAppRequest[0]) require.Equal(want, gotAppRequest[1:]) - require.NoError(client.CrossChainAppRequest( - ctx, - ids.Empty, - want, - func(context.Context, ids.ID, []byte, error) {}, - )) - gotCrossChainAppRequest := <-sender.SentCrossChainAppRequest - require.Equal(handlerPrefix, gotCrossChainAppRequest[0]) - require.Equal(want, gotCrossChainAppRequest[1:]) - require.NoError(client.AppGossip( ctx, common.SendConfig{ @@ -254,105 +231,6 @@ func TestAppRequestFailed(t *testing.T) { <-done } -// Tests that the Client callback is called on a successful response -func TestCrossChainAppRequestResponse(t *testing.T) { - require := require.New(t) - ctx := context.Background() - - sender := enginetest.SenderStub{ - SentCrossChainAppRequest: make(chan []byte, 1), - } - network, err := NewNetwork(logging.NoLog{}, sender, prometheus.NewRegistry(), "") - require.NoError(err) - client := network.NewClient(handlerID) - - wantChainID := ids.GenerateTestID() - wantResponse := []byte("response") - done := make(chan struct{}) - - callback := func(_ context.Context, gotChainID ids.ID, gotResponse []byte, err error) { - require.Equal(wantChainID, gotChainID) - require.NoError(err) - require.Equal(wantResponse, gotResponse) - - close(done) - } - - require.NoError(client.CrossChainAppRequest(ctx, wantChainID, []byte("request"), callback)) - <-sender.SentCrossChainAppRequest - - require.NoError(network.CrossChainAppResponse(ctx, wantChainID, 1, wantResponse)) - <-done -} - -// Tests that the Client does not provide a cancelled context to the AppSender. -func TestCrossChainAppRequestCancelledContext(t *testing.T) { - require := require.New(t) - ctx := context.Background() - - sentMessages := make(chan []byte, 1) - sender := &enginetest.Sender{ - SendCrossChainAppRequestF: func(ctx context.Context, _ ids.ID, _ uint32, msgBytes []byte) { - require.NoError(ctx.Err()) - sentMessages <- msgBytes - }, - } - network, err := NewNetwork(logging.NoLog{}, sender, prometheus.NewRegistry(), "") - require.NoError(err) - client := network.NewClient(handlerID) - - cancelledCtx, cancel := context.WithCancel(ctx) - cancel() - - wantChainID := ids.GenerateTestID() - wantResponse := []byte("response") - done := make(chan struct{}) - - callback := func(_ context.Context, gotChainID ids.ID, gotResponse []byte, err error) { - require.Equal(wantChainID, gotChainID) - require.NoError(err) - require.Equal(wantResponse, gotResponse) - - close(done) - } - - require.NoError(client.CrossChainAppRequest(cancelledCtx, wantChainID, []byte("request"), callback)) - <-sentMessages - - require.NoError(network.CrossChainAppResponse(ctx, wantChainID, 1, wantResponse)) - <-done -} - -// Tests that the Client callback is given an error if the request fails -func TestCrossChainAppRequestFailed(t *testing.T) { - require := require.New(t) - ctx := context.Background() - - sender := enginetest.SenderStub{ - SentCrossChainAppRequest: make(chan []byte, 1), - } - network, err := NewNetwork(logging.NoLog{}, sender, prometheus.NewRegistry(), "") - require.NoError(err) - client := network.NewClient(handlerID) - - wantChainID := ids.GenerateTestID() - done := make(chan struct{}) - - callback := func(_ context.Context, gotChainID ids.ID, gotResponse []byte, err error) { - require.Equal(wantChainID, gotChainID) - require.ErrorIs(err, errFoo) - require.Nil(gotResponse) - - close(done) - } - - require.NoError(client.CrossChainAppRequest(ctx, wantChainID, []byte("request"), callback)) - <-sender.SentCrossChainAppRequest - - require.NoError(network.CrossChainAppRequestFailed(ctx, wantChainID, 1, errFoo)) - <-done -} - // Messages for unregistered handlers should be dropped gracefully func TestAppGossipMessageForUnregisteredHandler(t *testing.T) { tests := []struct { @@ -517,10 +395,6 @@ func TestResponseForUnrequestedRequest(t *testing.T) { require.Fail("should not be called") return nil, nil }, - CrossChainAppRequestF: func(context.Context, ids.ID, time.Time, []byte) ([]byte, error) { - require.Fail("should not be called") - return nil, nil - }, } network, err := NewNetwork(logging.NoLog{}, nil, prometheus.NewRegistry(), "") require.NoError(err) @@ -530,11 +404,6 @@ func TestResponseForUnrequestedRequest(t *testing.T) { require.ErrorIs(err, ErrUnrequestedResponse) err = network.AppRequestFailed(ctx, ids.EmptyNodeID, 0, common.ErrTimeout) require.ErrorIs(err, ErrUnrequestedResponse) - err = network.CrossChainAppResponse(ctx, ids.Empty, 0, []byte("foobar")) - require.ErrorIs(err, ErrUnrequestedResponse) - err = network.CrossChainAppRequestFailed(ctx, ids.Empty, 0, common.ErrTimeout) - - require.ErrorIs(err, ErrUnrequestedResponse) }) } } diff --git a/network/p2p/router.go b/network/p2p/router.go index 8f099ddb0b6..9c020ab4935 100644 --- a/network/p2p/router.go +++ b/network/p2p/router.go @@ -33,11 +33,6 @@ type pendingAppRequest struct { callback AppResponseCallback } -type pendingCrossChainAppRequest struct { - handlerID string - callback CrossChainAppResponseCallback -} - // meteredHandler emits metrics for a Handler type meteredHandler struct { *responder @@ -73,11 +68,10 @@ type router struct { sender common.AppSender metrics metrics - lock sync.RWMutex - handlers map[uint64]*meteredHandler - pendingAppRequests map[uint32]pendingAppRequest - pendingCrossChainAppRequests map[uint32]pendingCrossChainAppRequest - requestID uint32 + lock sync.RWMutex + handlers map[uint64]*meteredHandler + pendingAppRequests map[uint32]pendingAppRequest + requestID uint32 } // newRouter returns a new instance of Router @@ -87,12 +81,11 @@ func newRouter( metrics metrics, ) *router { return &router{ - log: log, - sender: sender, - metrics: metrics, - handlers: make(map[uint64]*meteredHandler), - pendingAppRequests: make(map[uint32]pendingAppRequest), - pendingCrossChainAppRequests: make(map[uint32]pendingCrossChainAppRequest), + log: log, + sender: sender, + metrics: metrics, + handlers: make(map[uint64]*meteredHandler), + pendingAppRequests: make(map[uint32]pendingAppRequest), // invariant: sdk uses odd-numbered requestIDs requestID: 1, } @@ -232,93 +225,6 @@ func (r *router) AppGossip(ctx context.Context, nodeID ids.NodeID, gossip []byte ) } -// CrossChainAppRequest routes a CrossChainAppRequest message to a Handler -// based on the handler prefix. The message is dropped if no matching handler -// can be found. -// -// Any error condition propagated outside Handler application logic is -// considered fatal -func (r *router) CrossChainAppRequest( - ctx context.Context, - chainID ids.ID, - requestID uint32, - deadline time.Time, - msg []byte, -) error { - start := time.Now() - parsedMsg, handler, handlerID, ok := r.parse(msg) - if !ok { - r.log.Debug("received message for unregistered handler", - zap.Stringer("messageOp", message.CrossChainAppRequestOp), - zap.Stringer("chainID", chainID), - zap.Uint32("requestID", requestID), - zap.Time("deadline", deadline), - zap.Binary("message", msg), - ) - return nil - } - - if err := handler.CrossChainAppRequest(ctx, chainID, requestID, deadline, parsedMsg); err != nil { - return err - } - - return r.metrics.observe( - prometheus.Labels{ - opLabel: message.CrossChainAppRequestOp.String(), - handlerLabel: handlerID, - }, - start, - ) -} - -// CrossChainAppRequestFailed routes a CrossChainAppRequestFailed message to -// the callback corresponding to requestID. -// -// Any error condition propagated outside Handler application logic is -// considered fatal -func (r *router) CrossChainAppRequestFailed(ctx context.Context, chainID ids.ID, requestID uint32, appErr *common.AppError) error { - start := time.Now() - pending, ok := r.clearCrossChainAppRequest(requestID) - if !ok { - // we should never receive a timeout without a corresponding requestID - return ErrUnrequestedResponse - } - - pending.callback(ctx, chainID, nil, appErr) - - return r.metrics.observe( - prometheus.Labels{ - opLabel: message.CrossChainAppErrorOp.String(), - handlerLabel: pending.handlerID, - }, - start, - ) -} - -// CrossChainAppResponse routes a CrossChainAppResponse message to the callback -// corresponding to requestID. -// -// Any error condition propagated outside Handler application logic is -// considered fatal -func (r *router) CrossChainAppResponse(ctx context.Context, chainID ids.ID, requestID uint32, response []byte) error { - start := time.Now() - pending, ok := r.clearCrossChainAppRequest(requestID) - if !ok { - // we should never receive a timeout without a corresponding requestID - return ErrUnrequestedResponse - } - - pending.callback(ctx, chainID, response, nil) - - return r.metrics.observe( - prometheus.Labels{ - opLabel: message.CrossChainAppResponseOp.String(), - handlerLabel: pending.handlerID, - }, - start, - ) -} - // Parse parses a gossip or request message and maps it to a corresponding // handler if present. // @@ -354,16 +260,6 @@ func (r *router) clearAppRequest(requestID uint32) (pendingAppRequest, bool) { return callback, ok } -// Invariant: Assumes [r.lock] isn't held. -func (r *router) clearCrossChainAppRequest(requestID uint32) (pendingCrossChainAppRequest, bool) { - r.lock.Lock() - defer r.lock.Unlock() - - callback, ok := r.pendingCrossChainAppRequests[requestID] - delete(r.pendingCrossChainAppRequests, requestID) - return callback, ok -} - // Parse a gossip or request message. // // Returns: diff --git a/network/p2p/throttler_handler.go b/network/p2p/throttler_handler.go index 2718f733223..5547729e6bc 100644 --- a/network/p2p/throttler_handler.go +++ b/network/p2p/throttler_handler.go @@ -49,7 +49,3 @@ func (t ThrottlerHandler) AppRequest(ctx context.Context, nodeID ids.NodeID, dea return t.handler.AppRequest(ctx, nodeID, deadline, requestBytes) } - -func (t ThrottlerHandler) CrossChainAppRequest(ctx context.Context, chainID ids.ID, deadline time.Time, requestBytes []byte) ([]byte, error) { - return t.handler.CrossChainAppRequest(ctx, chainID, deadline, requestBytes) -} diff --git a/proto/appsender/appsender.proto b/proto/appsender/appsender.proto index 5a03d449359..b28f0dd27ea 100644 --- a/proto/appsender/appsender.proto +++ b/proto/appsender/appsender.proto @@ -11,10 +11,6 @@ service AppSender { rpc SendAppResponse(SendAppResponseMsg) returns (google.protobuf.Empty); rpc SendAppError(SendAppErrorMsg) returns (google.protobuf.Empty); rpc SendAppGossip(SendAppGossipMsg) returns (google.protobuf.Empty); - - rpc SendCrossChainAppRequest(SendCrossChainAppRequestMsg) returns (google.protobuf.Empty); - rpc SendCrossChainAppResponse(SendCrossChainAppResponseMsg) returns (google.protobuf.Empty); - rpc SendCrossChainAppError(SendCrossChainAppErrorMsg) returns (google.protobuf.Empty); } message SendAppRequestMsg { @@ -55,32 +51,3 @@ message SendAppGossipMsg { // The message body bytes msg = 5; } - -message SendCrossChainAppRequestMsg { - // The chain to send this request to - bytes chain_id = 1; - // the ID of this request - uint32 request_id = 2; - // The request body - bytes request = 3; -} - -message SendCrossChainAppResponseMsg { - // The chain to send this response to - bytes chain_id = 1; - // the ID of this request - uint32 request_id = 2; - // The response body - bytes response = 3; -} - -message SendCrossChainAppErrorMsg { - // The chain to send a response to - bytes chain_id = 1; - // ID of this request - uint32 request_id = 2; - // Application-defined error code - sint32 error_code = 3; - // Application-defined error message - string error_message = 4; -} diff --git a/proto/pb/appsender/appsender.pb.go b/proto/pb/appsender/appsender.pb.go index 0513d08bb73..8174a7a0ed1 100644 --- a/proto/pb/appsender/appsender.pb.go +++ b/proto/pb/appsender/appsender.pb.go @@ -309,213 +309,6 @@ func (x *SendAppGossipMsg) GetMsg() []byte { return nil } -type SendCrossChainAppRequestMsg struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The chain to send this request to - ChainId []byte `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` - // the ID of this request - RequestId uint32 `protobuf:"varint,2,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` - // The request body - Request []byte `protobuf:"bytes,3,opt,name=request,proto3" json:"request,omitempty"` -} - -func (x *SendCrossChainAppRequestMsg) Reset() { - *x = SendCrossChainAppRequestMsg{} - if protoimpl.UnsafeEnabled { - mi := &file_appsender_appsender_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SendCrossChainAppRequestMsg) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SendCrossChainAppRequestMsg) ProtoMessage() {} - -func (x *SendCrossChainAppRequestMsg) ProtoReflect() protoreflect.Message { - mi := &file_appsender_appsender_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SendCrossChainAppRequestMsg.ProtoReflect.Descriptor instead. -func (*SendCrossChainAppRequestMsg) Descriptor() ([]byte, []int) { - return file_appsender_appsender_proto_rawDescGZIP(), []int{4} -} - -func (x *SendCrossChainAppRequestMsg) GetChainId() []byte { - if x != nil { - return x.ChainId - } - return nil -} - -func (x *SendCrossChainAppRequestMsg) GetRequestId() uint32 { - if x != nil { - return x.RequestId - } - return 0 -} - -func (x *SendCrossChainAppRequestMsg) GetRequest() []byte { - if x != nil { - return x.Request - } - return nil -} - -type SendCrossChainAppResponseMsg struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The chain to send this response to - ChainId []byte `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` - // the ID of this request - RequestId uint32 `protobuf:"varint,2,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` - // The response body - Response []byte `protobuf:"bytes,3,opt,name=response,proto3" json:"response,omitempty"` -} - -func (x *SendCrossChainAppResponseMsg) Reset() { - *x = SendCrossChainAppResponseMsg{} - if protoimpl.UnsafeEnabled { - mi := &file_appsender_appsender_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SendCrossChainAppResponseMsg) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SendCrossChainAppResponseMsg) ProtoMessage() {} - -func (x *SendCrossChainAppResponseMsg) ProtoReflect() protoreflect.Message { - mi := &file_appsender_appsender_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SendCrossChainAppResponseMsg.ProtoReflect.Descriptor instead. -func (*SendCrossChainAppResponseMsg) Descriptor() ([]byte, []int) { - return file_appsender_appsender_proto_rawDescGZIP(), []int{5} -} - -func (x *SendCrossChainAppResponseMsg) GetChainId() []byte { - if x != nil { - return x.ChainId - } - return nil -} - -func (x *SendCrossChainAppResponseMsg) GetRequestId() uint32 { - if x != nil { - return x.RequestId - } - return 0 -} - -func (x *SendCrossChainAppResponseMsg) GetResponse() []byte { - if x != nil { - return x.Response - } - return nil -} - -type SendCrossChainAppErrorMsg struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The chain to send a response to - ChainId []byte `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` - // ID of this request - RequestId uint32 `protobuf:"varint,2,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` - // Application-defined error code - ErrorCode int32 `protobuf:"zigzag32,3,opt,name=error_code,json=errorCode,proto3" json:"error_code,omitempty"` - // Application-defined error message - ErrorMessage string `protobuf:"bytes,4,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"` -} - -func (x *SendCrossChainAppErrorMsg) Reset() { - *x = SendCrossChainAppErrorMsg{} - if protoimpl.UnsafeEnabled { - mi := &file_appsender_appsender_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SendCrossChainAppErrorMsg) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SendCrossChainAppErrorMsg) ProtoMessage() {} - -func (x *SendCrossChainAppErrorMsg) ProtoReflect() protoreflect.Message { - mi := &file_appsender_appsender_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SendCrossChainAppErrorMsg.ProtoReflect.Descriptor instead. -func (*SendCrossChainAppErrorMsg) Descriptor() ([]byte, []int) { - return file_appsender_appsender_proto_rawDescGZIP(), []int{6} -} - -func (x *SendCrossChainAppErrorMsg) GetChainId() []byte { - if x != nil { - return x.ChainId - } - return nil -} - -func (x *SendCrossChainAppErrorMsg) GetRequestId() uint32 { - if x != nil { - return x.RequestId - } - return 0 -} - -func (x *SendCrossChainAppErrorMsg) GetErrorCode() int32 { - if x != nil { - return x.ErrorCode - } - return 0 -} - -func (x *SendCrossChainAppErrorMsg) GetErrorMessage() string { - if x != nil { - return x.ErrorMessage - } - return "" -} - var File_appsender_appsender_proto protoreflect.FileDescriptor var file_appsender_appsender_proto_rawDesc = []byte{ @@ -555,71 +348,29 @@ var file_appsender_appsender_proto_rawDesc = []byte{ 0x6e, 0x6f, 0x6e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x65, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x70, 0x65, 0x65, 0x72, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, - 0x52, 0x03, 0x6d, 0x73, 0x67, 0x22, 0x71, 0x0a, 0x1b, 0x53, 0x65, 0x6e, 0x64, 0x43, 0x72, 0x6f, - 0x73, 0x73, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x41, 0x70, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x4d, 0x73, 0x67, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, - 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0d, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x12, 0x18, - 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x74, 0x0a, 0x1c, 0x53, 0x65, 0x6e, 0x64, - 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x41, 0x70, 0x70, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x73, 0x67, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x61, 0x69, - 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, - 0x6e, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x99, - 0x01, 0x0a, 0x19, 0x53, 0x65, 0x6e, 0x64, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, 0x68, 0x61, 0x69, - 0x6e, 0x41, 0x70, 0x70, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x73, 0x67, 0x12, 0x19, 0x0a, 0x08, - 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, - 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x72, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, - 0x63, 0x6f, 0x64, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x11, 0x52, 0x09, 0x65, 0x72, 0x72, 0x6f, - 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x65, 0x72, - 0x72, 0x6f, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x32, 0xb9, 0x04, 0x0a, 0x09, 0x41, - 0x70, 0x70, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x46, 0x0a, 0x0e, 0x53, 0x65, 0x6e, 0x64, - 0x41, 0x70, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x2e, 0x61, 0x70, 0x70, - 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x41, 0x70, 0x70, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x73, 0x67, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, - 0x12, 0x48, 0x0a, 0x0f, 0x53, 0x65, 0x6e, 0x64, 0x41, 0x70, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x2e, 0x61, 0x70, 0x70, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x2e, - 0x53, 0x65, 0x6e, 0x64, 0x41, 0x70, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, - 0x73, 0x67, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x42, 0x0a, 0x0c, 0x53, 0x65, - 0x6e, 0x64, 0x41, 0x70, 0x70, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x1a, 0x2e, 0x61, 0x70, 0x70, - 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x41, 0x70, 0x70, 0x45, 0x72, - 0x72, 0x6f, 0x72, 0x4d, 0x73, 0x67, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x44, - 0x0a, 0x0d, 0x53, 0x65, 0x6e, 0x64, 0x41, 0x70, 0x70, 0x47, 0x6f, 0x73, 0x73, 0x69, 0x70, 0x12, - 0x1b, 0x2e, 0x61, 0x70, 0x70, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x2e, 0x53, 0x65, 0x6e, 0x64, - 0x41, 0x70, 0x70, 0x47, 0x6f, 0x73, 0x73, 0x69, 0x70, 0x4d, 0x73, 0x67, 0x1a, 0x16, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, - 0x6d, 0x70, 0x74, 0x79, 0x12, 0x5a, 0x0a, 0x18, 0x53, 0x65, 0x6e, 0x64, 0x43, 0x72, 0x6f, 0x73, - 0x73, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x41, 0x70, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x26, 0x2e, 0x61, 0x70, 0x70, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x2e, 0x53, 0x65, 0x6e, - 0x64, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x41, 0x70, 0x70, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x73, 0x67, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, - 0x12, 0x5c, 0x0a, 0x19, 0x53, 0x65, 0x6e, 0x64, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, 0x68, 0x61, - 0x69, 0x6e, 0x41, 0x70, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x27, 0x2e, - 0x61, 0x70, 0x70, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x43, 0x72, - 0x6f, 0x73, 0x73, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x41, 0x70, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x4d, 0x73, 0x67, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x56, - 0x0a, 0x16, 0x53, 0x65, 0x6e, 0x64, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, 0x68, 0x61, 0x69, 0x6e, - 0x41, 0x70, 0x70, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x24, 0x2e, 0x61, 0x70, 0x70, 0x73, 0x65, - 0x6e, 0x64, 0x65, 0x72, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, 0x68, - 0x61, 0x69, 0x6e, 0x41, 0x70, 0x70, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x73, 0x67, 0x1a, 0x16, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x42, 0x34, 0x5a, 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x76, 0x61, 0x2d, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x61, 0x76, - 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x68, 0x65, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, - 0x70, 0x62, 0x2f, 0x61, 0x70, 0x70, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x52, 0x03, 0x6d, 0x73, 0x67, 0x32, 0xa7, 0x02, 0x0a, 0x09, 0x41, 0x70, 0x70, 0x53, 0x65, 0x6e, + 0x64, 0x65, 0x72, 0x12, 0x46, 0x0a, 0x0e, 0x53, 0x65, 0x6e, 0x64, 0x41, 0x70, 0x70, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x2e, 0x61, 0x70, 0x70, 0x73, 0x65, 0x6e, 0x64, 0x65, + 0x72, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x41, 0x70, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x4d, 0x73, 0x67, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x48, 0x0a, 0x0f, 0x53, + 0x65, 0x6e, 0x64, 0x41, 0x70, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, + 0x2e, 0x61, 0x70, 0x70, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x41, + 0x70, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x73, 0x67, 0x1a, 0x16, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x42, 0x0a, 0x0c, 0x53, 0x65, 0x6e, 0x64, 0x41, 0x70, 0x70, + 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x1a, 0x2e, 0x61, 0x70, 0x70, 0x73, 0x65, 0x6e, 0x64, 0x65, + 0x72, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x41, 0x70, 0x70, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x73, + 0x67, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x44, 0x0a, 0x0d, 0x53, 0x65, 0x6e, + 0x64, 0x41, 0x70, 0x70, 0x47, 0x6f, 0x73, 0x73, 0x69, 0x70, 0x12, 0x1b, 0x2e, 0x61, 0x70, 0x70, + 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x2e, 0x53, 0x65, 0x6e, 0x64, 0x41, 0x70, 0x70, 0x47, 0x6f, + 0x73, 0x73, 0x69, 0x70, 0x4d, 0x73, 0x67, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x42, + 0x34, 0x5a, 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x76, + 0x61, 0x2d, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x61, 0x76, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x68, 0x65, + 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x62, 0x2f, 0x61, 0x70, 0x70, 0x73, + 0x65, 0x6e, 0x64, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -634,34 +385,25 @@ func file_appsender_appsender_proto_rawDescGZIP() []byte { return file_appsender_appsender_proto_rawDescData } -var file_appsender_appsender_proto_msgTypes = make([]protoimpl.MessageInfo, 7) +var file_appsender_appsender_proto_msgTypes = make([]protoimpl.MessageInfo, 4) var file_appsender_appsender_proto_goTypes = []interface{}{ - (*SendAppRequestMsg)(nil), // 0: appsender.SendAppRequestMsg - (*SendAppResponseMsg)(nil), // 1: appsender.SendAppResponseMsg - (*SendAppErrorMsg)(nil), // 2: appsender.SendAppErrorMsg - (*SendAppGossipMsg)(nil), // 3: appsender.SendAppGossipMsg - (*SendCrossChainAppRequestMsg)(nil), // 4: appsender.SendCrossChainAppRequestMsg - (*SendCrossChainAppResponseMsg)(nil), // 5: appsender.SendCrossChainAppResponseMsg - (*SendCrossChainAppErrorMsg)(nil), // 6: appsender.SendCrossChainAppErrorMsg - (*emptypb.Empty)(nil), // 7: google.protobuf.Empty + (*SendAppRequestMsg)(nil), // 0: appsender.SendAppRequestMsg + (*SendAppResponseMsg)(nil), // 1: appsender.SendAppResponseMsg + (*SendAppErrorMsg)(nil), // 2: appsender.SendAppErrorMsg + (*SendAppGossipMsg)(nil), // 3: appsender.SendAppGossipMsg + (*emptypb.Empty)(nil), // 4: google.protobuf.Empty } var file_appsender_appsender_proto_depIdxs = []int32{ 0, // 0: appsender.AppSender.SendAppRequest:input_type -> appsender.SendAppRequestMsg 1, // 1: appsender.AppSender.SendAppResponse:input_type -> appsender.SendAppResponseMsg 2, // 2: appsender.AppSender.SendAppError:input_type -> appsender.SendAppErrorMsg 3, // 3: appsender.AppSender.SendAppGossip:input_type -> appsender.SendAppGossipMsg - 4, // 4: appsender.AppSender.SendCrossChainAppRequest:input_type -> appsender.SendCrossChainAppRequestMsg - 5, // 5: appsender.AppSender.SendCrossChainAppResponse:input_type -> appsender.SendCrossChainAppResponseMsg - 6, // 6: appsender.AppSender.SendCrossChainAppError:input_type -> appsender.SendCrossChainAppErrorMsg - 7, // 7: appsender.AppSender.SendAppRequest:output_type -> google.protobuf.Empty - 7, // 8: appsender.AppSender.SendAppResponse:output_type -> google.protobuf.Empty - 7, // 9: appsender.AppSender.SendAppError:output_type -> google.protobuf.Empty - 7, // 10: appsender.AppSender.SendAppGossip:output_type -> google.protobuf.Empty - 7, // 11: appsender.AppSender.SendCrossChainAppRequest:output_type -> google.protobuf.Empty - 7, // 12: appsender.AppSender.SendCrossChainAppResponse:output_type -> google.protobuf.Empty - 7, // 13: appsender.AppSender.SendCrossChainAppError:output_type -> google.protobuf.Empty - 7, // [7:14] is the sub-list for method output_type - 0, // [0:7] is the sub-list for method input_type + 4, // 4: appsender.AppSender.SendAppRequest:output_type -> google.protobuf.Empty + 4, // 5: appsender.AppSender.SendAppResponse:output_type -> google.protobuf.Empty + 4, // 6: appsender.AppSender.SendAppError:output_type -> google.protobuf.Empty + 4, // 7: appsender.AppSender.SendAppGossip:output_type -> google.protobuf.Empty + 4, // [4:8] is the sub-list for method output_type + 0, // [0:4] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name 0, // [0:0] is the sub-list for extension extendee 0, // [0:0] is the sub-list for field type_name @@ -721,42 +463,6 @@ func file_appsender_appsender_proto_init() { return nil } } - file_appsender_appsender_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SendCrossChainAppRequestMsg); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_appsender_appsender_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SendCrossChainAppResponseMsg); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_appsender_appsender_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SendCrossChainAppErrorMsg); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } } type x struct{} out := protoimpl.TypeBuilder{ @@ -764,7 +470,7 @@ func file_appsender_appsender_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_appsender_appsender_proto_rawDesc, NumEnums: 0, - NumMessages: 7, + NumMessages: 4, NumExtensions: 0, NumServices: 1, }, diff --git a/proto/pb/appsender/appsender_grpc.pb.go b/proto/pb/appsender/appsender_grpc.pb.go index 2bd4c9cf664..a44295b3aea 100644 --- a/proto/pb/appsender/appsender_grpc.pb.go +++ b/proto/pb/appsender/appsender_grpc.pb.go @@ -20,13 +20,10 @@ import ( const _ = grpc.SupportPackageIsVersion7 const ( - AppSender_SendAppRequest_FullMethodName = "/appsender.AppSender/SendAppRequest" - AppSender_SendAppResponse_FullMethodName = "/appsender.AppSender/SendAppResponse" - AppSender_SendAppError_FullMethodName = "/appsender.AppSender/SendAppError" - AppSender_SendAppGossip_FullMethodName = "/appsender.AppSender/SendAppGossip" - AppSender_SendCrossChainAppRequest_FullMethodName = "/appsender.AppSender/SendCrossChainAppRequest" - AppSender_SendCrossChainAppResponse_FullMethodName = "/appsender.AppSender/SendCrossChainAppResponse" - AppSender_SendCrossChainAppError_FullMethodName = "/appsender.AppSender/SendCrossChainAppError" + AppSender_SendAppRequest_FullMethodName = "/appsender.AppSender/SendAppRequest" + AppSender_SendAppResponse_FullMethodName = "/appsender.AppSender/SendAppResponse" + AppSender_SendAppError_FullMethodName = "/appsender.AppSender/SendAppError" + AppSender_SendAppGossip_FullMethodName = "/appsender.AppSender/SendAppGossip" ) // AppSenderClient is the client API for AppSender service. @@ -37,9 +34,6 @@ type AppSenderClient interface { SendAppResponse(ctx context.Context, in *SendAppResponseMsg, opts ...grpc.CallOption) (*emptypb.Empty, error) SendAppError(ctx context.Context, in *SendAppErrorMsg, opts ...grpc.CallOption) (*emptypb.Empty, error) SendAppGossip(ctx context.Context, in *SendAppGossipMsg, opts ...grpc.CallOption) (*emptypb.Empty, error) - SendCrossChainAppRequest(ctx context.Context, in *SendCrossChainAppRequestMsg, opts ...grpc.CallOption) (*emptypb.Empty, error) - SendCrossChainAppResponse(ctx context.Context, in *SendCrossChainAppResponseMsg, opts ...grpc.CallOption) (*emptypb.Empty, error) - SendCrossChainAppError(ctx context.Context, in *SendCrossChainAppErrorMsg, opts ...grpc.CallOption) (*emptypb.Empty, error) } type appSenderClient struct { @@ -86,33 +80,6 @@ func (c *appSenderClient) SendAppGossip(ctx context.Context, in *SendAppGossipMs return out, nil } -func (c *appSenderClient) SendCrossChainAppRequest(ctx context.Context, in *SendCrossChainAppRequestMsg, opts ...grpc.CallOption) (*emptypb.Empty, error) { - out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, AppSender_SendCrossChainAppRequest_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *appSenderClient) SendCrossChainAppResponse(ctx context.Context, in *SendCrossChainAppResponseMsg, opts ...grpc.CallOption) (*emptypb.Empty, error) { - out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, AppSender_SendCrossChainAppResponse_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *appSenderClient) SendCrossChainAppError(ctx context.Context, in *SendCrossChainAppErrorMsg, opts ...grpc.CallOption) (*emptypb.Empty, error) { - out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, AppSender_SendCrossChainAppError_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - // AppSenderServer is the server API for AppSender service. // All implementations must embed UnimplementedAppSenderServer // for forward compatibility @@ -121,9 +88,6 @@ type AppSenderServer interface { SendAppResponse(context.Context, *SendAppResponseMsg) (*emptypb.Empty, error) SendAppError(context.Context, *SendAppErrorMsg) (*emptypb.Empty, error) SendAppGossip(context.Context, *SendAppGossipMsg) (*emptypb.Empty, error) - SendCrossChainAppRequest(context.Context, *SendCrossChainAppRequestMsg) (*emptypb.Empty, error) - SendCrossChainAppResponse(context.Context, *SendCrossChainAppResponseMsg) (*emptypb.Empty, error) - SendCrossChainAppError(context.Context, *SendCrossChainAppErrorMsg) (*emptypb.Empty, error) mustEmbedUnimplementedAppSenderServer() } @@ -143,15 +107,6 @@ func (UnimplementedAppSenderServer) SendAppError(context.Context, *SendAppErrorM func (UnimplementedAppSenderServer) SendAppGossip(context.Context, *SendAppGossipMsg) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method SendAppGossip not implemented") } -func (UnimplementedAppSenderServer) SendCrossChainAppRequest(context.Context, *SendCrossChainAppRequestMsg) (*emptypb.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method SendCrossChainAppRequest not implemented") -} -func (UnimplementedAppSenderServer) SendCrossChainAppResponse(context.Context, *SendCrossChainAppResponseMsg) (*emptypb.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method SendCrossChainAppResponse not implemented") -} -func (UnimplementedAppSenderServer) SendCrossChainAppError(context.Context, *SendCrossChainAppErrorMsg) (*emptypb.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method SendCrossChainAppError not implemented") -} func (UnimplementedAppSenderServer) mustEmbedUnimplementedAppSenderServer() {} // UnsafeAppSenderServer may be embedded to opt out of forward compatibility for this service. @@ -237,60 +192,6 @@ func _AppSender_SendAppGossip_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } -func _AppSender_SendCrossChainAppRequest_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SendCrossChainAppRequestMsg) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AppSenderServer).SendCrossChainAppRequest(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: AppSender_SendCrossChainAppRequest_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AppSenderServer).SendCrossChainAppRequest(ctx, req.(*SendCrossChainAppRequestMsg)) - } - return interceptor(ctx, in, info, handler) -} - -func _AppSender_SendCrossChainAppResponse_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SendCrossChainAppResponseMsg) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AppSenderServer).SendCrossChainAppResponse(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: AppSender_SendCrossChainAppResponse_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AppSenderServer).SendCrossChainAppResponse(ctx, req.(*SendCrossChainAppResponseMsg)) - } - return interceptor(ctx, in, info, handler) -} - -func _AppSender_SendCrossChainAppError_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(SendCrossChainAppErrorMsg) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(AppSenderServer).SendCrossChainAppError(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: AppSender_SendCrossChainAppError_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AppSenderServer).SendCrossChainAppError(ctx, req.(*SendCrossChainAppErrorMsg)) - } - return interceptor(ctx, in, info, handler) -} - // AppSender_ServiceDesc is the grpc.ServiceDesc for AppSender service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -314,18 +215,6 @@ var AppSender_ServiceDesc = grpc.ServiceDesc{ MethodName: "SendAppGossip", Handler: _AppSender_SendAppGossip_Handler, }, - { - MethodName: "SendCrossChainAppRequest", - Handler: _AppSender_SendCrossChainAppRequest_Handler, - }, - { - MethodName: "SendCrossChainAppResponse", - Handler: _AppSender_SendCrossChainAppResponse_Handler, - }, - { - MethodName: "SendCrossChainAppError", - Handler: _AppSender_SendCrossChainAppError_Handler, - }, }, Streams: []grpc.StreamDesc{}, Metadata: "appsender/appsender.proto", diff --git a/proto/pb/vm/vm.pb.go b/proto/pb/vm/vm.pb.go index 60d5f15d44f..cacc9ef4694 100644 --- a/proto/pb/vm/vm.pb.go +++ b/proto/pb/vm/vm.pb.go @@ -177,7 +177,7 @@ func (x StateSummaryAcceptResponse_Mode) Number() protoreflect.EnumNumber { // Deprecated: Use StateSummaryAcceptResponse_Mode.Descriptor instead. func (StateSummaryAcceptResponse_Mode) EnumDescriptor() ([]byte, []int) { - return file_vm_vm_proto_rawDescGZIP(), []int{43, 0} + return file_vm_vm_proto_rawDescGZIP(), []int{40, 0} } type InitializeRequest struct { @@ -1653,222 +1653,6 @@ func (x *AppGossipMsg) GetMsg() []byte { return nil } -type CrossChainAppRequestMsg struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The chain that sent us this request - ChainId []byte `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` - // The ID of this request - RequestId uint32 `protobuf:"varint,2,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` - // deadline for this request - Deadline *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=deadline,proto3" json:"deadline,omitempty"` - // The request body - Request []byte `protobuf:"bytes,4,opt,name=request,proto3" json:"request,omitempty"` -} - -func (x *CrossChainAppRequestMsg) Reset() { - *x = CrossChainAppRequestMsg{} - if protoimpl.UnsafeEnabled { - mi := &file_vm_vm_proto_msgTypes[23] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CrossChainAppRequestMsg) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CrossChainAppRequestMsg) ProtoMessage() {} - -func (x *CrossChainAppRequestMsg) ProtoReflect() protoreflect.Message { - mi := &file_vm_vm_proto_msgTypes[23] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CrossChainAppRequestMsg.ProtoReflect.Descriptor instead. -func (*CrossChainAppRequestMsg) Descriptor() ([]byte, []int) { - return file_vm_vm_proto_rawDescGZIP(), []int{23} -} - -func (x *CrossChainAppRequestMsg) GetChainId() []byte { - if x != nil { - return x.ChainId - } - return nil -} - -func (x *CrossChainAppRequestMsg) GetRequestId() uint32 { - if x != nil { - return x.RequestId - } - return 0 -} - -func (x *CrossChainAppRequestMsg) GetDeadline() *timestamppb.Timestamp { - if x != nil { - return x.Deadline - } - return nil -} - -func (x *CrossChainAppRequestMsg) GetRequest() []byte { - if x != nil { - return x.Request - } - return nil -} - -type CrossChainAppRequestFailedMsg struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The chain that we failed to get a response from - ChainId []byte `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` - // The ID of the request we sent and didn't get a response to - RequestId uint32 `protobuf:"varint,2,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` - // Application-defined error code - ErrorCode int32 `protobuf:"zigzag32,3,opt,name=error_code,json=errorCode,proto3" json:"error_code,omitempty"` - // Application-defined error message - ErrorMessage string `protobuf:"bytes,4,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"` -} - -func (x *CrossChainAppRequestFailedMsg) Reset() { - *x = CrossChainAppRequestFailedMsg{} - if protoimpl.UnsafeEnabled { - mi := &file_vm_vm_proto_msgTypes[24] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CrossChainAppRequestFailedMsg) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CrossChainAppRequestFailedMsg) ProtoMessage() {} - -func (x *CrossChainAppRequestFailedMsg) ProtoReflect() protoreflect.Message { - mi := &file_vm_vm_proto_msgTypes[24] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CrossChainAppRequestFailedMsg.ProtoReflect.Descriptor instead. -func (*CrossChainAppRequestFailedMsg) Descriptor() ([]byte, []int) { - return file_vm_vm_proto_rawDescGZIP(), []int{24} -} - -func (x *CrossChainAppRequestFailedMsg) GetChainId() []byte { - if x != nil { - return x.ChainId - } - return nil -} - -func (x *CrossChainAppRequestFailedMsg) GetRequestId() uint32 { - if x != nil { - return x.RequestId - } - return 0 -} - -func (x *CrossChainAppRequestFailedMsg) GetErrorCode() int32 { - if x != nil { - return x.ErrorCode - } - return 0 -} - -func (x *CrossChainAppRequestFailedMsg) GetErrorMessage() string { - if x != nil { - return x.ErrorMessage - } - return "" -} - -type CrossChainAppResponseMsg struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The chain that we got a response from - ChainId []byte `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` - // Request ID of request that this is in response to - RequestId uint32 `protobuf:"varint,2,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"` - // The response body - Response []byte `protobuf:"bytes,3,opt,name=response,proto3" json:"response,omitempty"` -} - -func (x *CrossChainAppResponseMsg) Reset() { - *x = CrossChainAppResponseMsg{} - if protoimpl.UnsafeEnabled { - mi := &file_vm_vm_proto_msgTypes[25] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CrossChainAppResponseMsg) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CrossChainAppResponseMsg) ProtoMessage() {} - -func (x *CrossChainAppResponseMsg) ProtoReflect() protoreflect.Message { - mi := &file_vm_vm_proto_msgTypes[25] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CrossChainAppResponseMsg.ProtoReflect.Descriptor instead. -func (*CrossChainAppResponseMsg) Descriptor() ([]byte, []int) { - return file_vm_vm_proto_rawDescGZIP(), []int{25} -} - -func (x *CrossChainAppResponseMsg) GetChainId() []byte { - if x != nil { - return x.ChainId - } - return nil -} - -func (x *CrossChainAppResponseMsg) GetRequestId() uint32 { - if x != nil { - return x.RequestId - } - return 0 -} - -func (x *CrossChainAppResponseMsg) GetResponse() []byte { - if x != nil { - return x.Response - } - return nil -} - type ConnectedRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1886,7 +1670,7 @@ type ConnectedRequest struct { func (x *ConnectedRequest) Reset() { *x = ConnectedRequest{} if protoimpl.UnsafeEnabled { - mi := &file_vm_vm_proto_msgTypes[26] + mi := &file_vm_vm_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1899,7 +1683,7 @@ func (x *ConnectedRequest) String() string { func (*ConnectedRequest) ProtoMessage() {} func (x *ConnectedRequest) ProtoReflect() protoreflect.Message { - mi := &file_vm_vm_proto_msgTypes[26] + mi := &file_vm_vm_proto_msgTypes[23] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1912,7 +1696,7 @@ func (x *ConnectedRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ConnectedRequest.ProtoReflect.Descriptor instead. func (*ConnectedRequest) Descriptor() ([]byte, []int) { - return file_vm_vm_proto_rawDescGZIP(), []int{26} + return file_vm_vm_proto_rawDescGZIP(), []int{23} } func (x *ConnectedRequest) GetNodeId() []byte { @@ -1961,7 +1745,7 @@ type DisconnectedRequest struct { func (x *DisconnectedRequest) Reset() { *x = DisconnectedRequest{} if protoimpl.UnsafeEnabled { - mi := &file_vm_vm_proto_msgTypes[27] + mi := &file_vm_vm_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1974,7 +1758,7 @@ func (x *DisconnectedRequest) String() string { func (*DisconnectedRequest) ProtoMessage() {} func (x *DisconnectedRequest) ProtoReflect() protoreflect.Message { - mi := &file_vm_vm_proto_msgTypes[27] + mi := &file_vm_vm_proto_msgTypes[24] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1987,7 +1771,7 @@ func (x *DisconnectedRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use DisconnectedRequest.ProtoReflect.Descriptor instead. func (*DisconnectedRequest) Descriptor() ([]byte, []int) { - return file_vm_vm_proto_rawDescGZIP(), []int{27} + return file_vm_vm_proto_rawDescGZIP(), []int{24} } func (x *DisconnectedRequest) GetNodeId() []byte { @@ -2011,7 +1795,7 @@ type GetAncestorsRequest struct { func (x *GetAncestorsRequest) Reset() { *x = GetAncestorsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_vm_vm_proto_msgTypes[28] + mi := &file_vm_vm_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2024,7 +1808,7 @@ func (x *GetAncestorsRequest) String() string { func (*GetAncestorsRequest) ProtoMessage() {} func (x *GetAncestorsRequest) ProtoReflect() protoreflect.Message { - mi := &file_vm_vm_proto_msgTypes[28] + mi := &file_vm_vm_proto_msgTypes[25] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2037,7 +1821,7 @@ func (x *GetAncestorsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetAncestorsRequest.ProtoReflect.Descriptor instead. func (*GetAncestorsRequest) Descriptor() ([]byte, []int) { - return file_vm_vm_proto_rawDescGZIP(), []int{28} + return file_vm_vm_proto_rawDescGZIP(), []int{25} } func (x *GetAncestorsRequest) GetBlkId() []byte { @@ -2079,7 +1863,7 @@ type GetAncestorsResponse struct { func (x *GetAncestorsResponse) Reset() { *x = GetAncestorsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_vm_vm_proto_msgTypes[29] + mi := &file_vm_vm_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2092,7 +1876,7 @@ func (x *GetAncestorsResponse) String() string { func (*GetAncestorsResponse) ProtoMessage() {} func (x *GetAncestorsResponse) ProtoReflect() protoreflect.Message { - mi := &file_vm_vm_proto_msgTypes[29] + mi := &file_vm_vm_proto_msgTypes[26] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2105,7 +1889,7 @@ func (x *GetAncestorsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetAncestorsResponse.ProtoReflect.Descriptor instead. func (*GetAncestorsResponse) Descriptor() ([]byte, []int) { - return file_vm_vm_proto_rawDescGZIP(), []int{29} + return file_vm_vm_proto_rawDescGZIP(), []int{26} } func (x *GetAncestorsResponse) GetBlksBytes() [][]byte { @@ -2126,7 +1910,7 @@ type BatchedParseBlockRequest struct { func (x *BatchedParseBlockRequest) Reset() { *x = BatchedParseBlockRequest{} if protoimpl.UnsafeEnabled { - mi := &file_vm_vm_proto_msgTypes[30] + mi := &file_vm_vm_proto_msgTypes[27] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2139,7 +1923,7 @@ func (x *BatchedParseBlockRequest) String() string { func (*BatchedParseBlockRequest) ProtoMessage() {} func (x *BatchedParseBlockRequest) ProtoReflect() protoreflect.Message { - mi := &file_vm_vm_proto_msgTypes[30] + mi := &file_vm_vm_proto_msgTypes[27] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2152,7 +1936,7 @@ func (x *BatchedParseBlockRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use BatchedParseBlockRequest.ProtoReflect.Descriptor instead. func (*BatchedParseBlockRequest) Descriptor() ([]byte, []int) { - return file_vm_vm_proto_rawDescGZIP(), []int{30} + return file_vm_vm_proto_rawDescGZIP(), []int{27} } func (x *BatchedParseBlockRequest) GetRequest() [][]byte { @@ -2173,7 +1957,7 @@ type BatchedParseBlockResponse struct { func (x *BatchedParseBlockResponse) Reset() { *x = BatchedParseBlockResponse{} if protoimpl.UnsafeEnabled { - mi := &file_vm_vm_proto_msgTypes[31] + mi := &file_vm_vm_proto_msgTypes[28] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2186,7 +1970,7 @@ func (x *BatchedParseBlockResponse) String() string { func (*BatchedParseBlockResponse) ProtoMessage() {} func (x *BatchedParseBlockResponse) ProtoReflect() protoreflect.Message { - mi := &file_vm_vm_proto_msgTypes[31] + mi := &file_vm_vm_proto_msgTypes[28] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2199,7 +1983,7 @@ func (x *BatchedParseBlockResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use BatchedParseBlockResponse.ProtoReflect.Descriptor instead. func (*BatchedParseBlockResponse) Descriptor() ([]byte, []int) { - return file_vm_vm_proto_rawDescGZIP(), []int{31} + return file_vm_vm_proto_rawDescGZIP(), []int{28} } func (x *BatchedParseBlockResponse) GetResponse() []*ParseBlockResponse { @@ -2220,7 +2004,7 @@ type GetBlockIDAtHeightRequest struct { func (x *GetBlockIDAtHeightRequest) Reset() { *x = GetBlockIDAtHeightRequest{} if protoimpl.UnsafeEnabled { - mi := &file_vm_vm_proto_msgTypes[32] + mi := &file_vm_vm_proto_msgTypes[29] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2233,7 +2017,7 @@ func (x *GetBlockIDAtHeightRequest) String() string { func (*GetBlockIDAtHeightRequest) ProtoMessage() {} func (x *GetBlockIDAtHeightRequest) ProtoReflect() protoreflect.Message { - mi := &file_vm_vm_proto_msgTypes[32] + mi := &file_vm_vm_proto_msgTypes[29] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2246,7 +2030,7 @@ func (x *GetBlockIDAtHeightRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetBlockIDAtHeightRequest.ProtoReflect.Descriptor instead. func (*GetBlockIDAtHeightRequest) Descriptor() ([]byte, []int) { - return file_vm_vm_proto_rawDescGZIP(), []int{32} + return file_vm_vm_proto_rawDescGZIP(), []int{29} } func (x *GetBlockIDAtHeightRequest) GetHeight() uint64 { @@ -2268,7 +2052,7 @@ type GetBlockIDAtHeightResponse struct { func (x *GetBlockIDAtHeightResponse) Reset() { *x = GetBlockIDAtHeightResponse{} if protoimpl.UnsafeEnabled { - mi := &file_vm_vm_proto_msgTypes[33] + mi := &file_vm_vm_proto_msgTypes[30] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2281,7 +2065,7 @@ func (x *GetBlockIDAtHeightResponse) String() string { func (*GetBlockIDAtHeightResponse) ProtoMessage() {} func (x *GetBlockIDAtHeightResponse) ProtoReflect() protoreflect.Message { - mi := &file_vm_vm_proto_msgTypes[33] + mi := &file_vm_vm_proto_msgTypes[30] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2294,7 +2078,7 @@ func (x *GetBlockIDAtHeightResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetBlockIDAtHeightResponse.ProtoReflect.Descriptor instead. func (*GetBlockIDAtHeightResponse) Descriptor() ([]byte, []int) { - return file_vm_vm_proto_rawDescGZIP(), []int{33} + return file_vm_vm_proto_rawDescGZIP(), []int{30} } func (x *GetBlockIDAtHeightResponse) GetBlkId() []byte { @@ -2322,7 +2106,7 @@ type GatherResponse struct { func (x *GatherResponse) Reset() { *x = GatherResponse{} if protoimpl.UnsafeEnabled { - mi := &file_vm_vm_proto_msgTypes[34] + mi := &file_vm_vm_proto_msgTypes[31] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2335,7 +2119,7 @@ func (x *GatherResponse) String() string { func (*GatherResponse) ProtoMessage() {} func (x *GatherResponse) ProtoReflect() protoreflect.Message { - mi := &file_vm_vm_proto_msgTypes[34] + mi := &file_vm_vm_proto_msgTypes[31] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2348,7 +2132,7 @@ func (x *GatherResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GatherResponse.ProtoReflect.Descriptor instead. func (*GatherResponse) Descriptor() ([]byte, []int) { - return file_vm_vm_proto_rawDescGZIP(), []int{34} + return file_vm_vm_proto_rawDescGZIP(), []int{31} } func (x *GatherResponse) GetMetricFamilies() []*_go.MetricFamily { @@ -2370,7 +2154,7 @@ type StateSyncEnabledResponse struct { func (x *StateSyncEnabledResponse) Reset() { *x = StateSyncEnabledResponse{} if protoimpl.UnsafeEnabled { - mi := &file_vm_vm_proto_msgTypes[35] + mi := &file_vm_vm_proto_msgTypes[32] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2383,7 +2167,7 @@ func (x *StateSyncEnabledResponse) String() string { func (*StateSyncEnabledResponse) ProtoMessage() {} func (x *StateSyncEnabledResponse) ProtoReflect() protoreflect.Message { - mi := &file_vm_vm_proto_msgTypes[35] + mi := &file_vm_vm_proto_msgTypes[32] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2396,7 +2180,7 @@ func (x *StateSyncEnabledResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use StateSyncEnabledResponse.ProtoReflect.Descriptor instead. func (*StateSyncEnabledResponse) Descriptor() ([]byte, []int) { - return file_vm_vm_proto_rawDescGZIP(), []int{35} + return file_vm_vm_proto_rawDescGZIP(), []int{32} } func (x *StateSyncEnabledResponse) GetEnabled() bool { @@ -2427,7 +2211,7 @@ type GetOngoingSyncStateSummaryResponse struct { func (x *GetOngoingSyncStateSummaryResponse) Reset() { *x = GetOngoingSyncStateSummaryResponse{} if protoimpl.UnsafeEnabled { - mi := &file_vm_vm_proto_msgTypes[36] + mi := &file_vm_vm_proto_msgTypes[33] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2440,7 +2224,7 @@ func (x *GetOngoingSyncStateSummaryResponse) String() string { func (*GetOngoingSyncStateSummaryResponse) ProtoMessage() {} func (x *GetOngoingSyncStateSummaryResponse) ProtoReflect() protoreflect.Message { - mi := &file_vm_vm_proto_msgTypes[36] + mi := &file_vm_vm_proto_msgTypes[33] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2453,7 +2237,7 @@ func (x *GetOngoingSyncStateSummaryResponse) ProtoReflect() protoreflect.Message // Deprecated: Use GetOngoingSyncStateSummaryResponse.ProtoReflect.Descriptor instead. func (*GetOngoingSyncStateSummaryResponse) Descriptor() ([]byte, []int) { - return file_vm_vm_proto_rawDescGZIP(), []int{36} + return file_vm_vm_proto_rawDescGZIP(), []int{33} } func (x *GetOngoingSyncStateSummaryResponse) GetId() []byte { @@ -2498,7 +2282,7 @@ type GetLastStateSummaryResponse struct { func (x *GetLastStateSummaryResponse) Reset() { *x = GetLastStateSummaryResponse{} if protoimpl.UnsafeEnabled { - mi := &file_vm_vm_proto_msgTypes[37] + mi := &file_vm_vm_proto_msgTypes[34] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2511,7 +2295,7 @@ func (x *GetLastStateSummaryResponse) String() string { func (*GetLastStateSummaryResponse) ProtoMessage() {} func (x *GetLastStateSummaryResponse) ProtoReflect() protoreflect.Message { - mi := &file_vm_vm_proto_msgTypes[37] + mi := &file_vm_vm_proto_msgTypes[34] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2524,7 +2308,7 @@ func (x *GetLastStateSummaryResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetLastStateSummaryResponse.ProtoReflect.Descriptor instead. func (*GetLastStateSummaryResponse) Descriptor() ([]byte, []int) { - return file_vm_vm_proto_rawDescGZIP(), []int{37} + return file_vm_vm_proto_rawDescGZIP(), []int{34} } func (x *GetLastStateSummaryResponse) GetId() []byte { @@ -2566,7 +2350,7 @@ type ParseStateSummaryRequest struct { func (x *ParseStateSummaryRequest) Reset() { *x = ParseStateSummaryRequest{} if protoimpl.UnsafeEnabled { - mi := &file_vm_vm_proto_msgTypes[38] + mi := &file_vm_vm_proto_msgTypes[35] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2579,7 +2363,7 @@ func (x *ParseStateSummaryRequest) String() string { func (*ParseStateSummaryRequest) ProtoMessage() {} func (x *ParseStateSummaryRequest) ProtoReflect() protoreflect.Message { - mi := &file_vm_vm_proto_msgTypes[38] + mi := &file_vm_vm_proto_msgTypes[35] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2592,7 +2376,7 @@ func (x *ParseStateSummaryRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ParseStateSummaryRequest.ProtoReflect.Descriptor instead. func (*ParseStateSummaryRequest) Descriptor() ([]byte, []int) { - return file_vm_vm_proto_rawDescGZIP(), []int{38} + return file_vm_vm_proto_rawDescGZIP(), []int{35} } func (x *ParseStateSummaryRequest) GetBytes() []byte { @@ -2615,7 +2399,7 @@ type ParseStateSummaryResponse struct { func (x *ParseStateSummaryResponse) Reset() { *x = ParseStateSummaryResponse{} if protoimpl.UnsafeEnabled { - mi := &file_vm_vm_proto_msgTypes[39] + mi := &file_vm_vm_proto_msgTypes[36] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2628,7 +2412,7 @@ func (x *ParseStateSummaryResponse) String() string { func (*ParseStateSummaryResponse) ProtoMessage() {} func (x *ParseStateSummaryResponse) ProtoReflect() protoreflect.Message { - mi := &file_vm_vm_proto_msgTypes[39] + mi := &file_vm_vm_proto_msgTypes[36] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2641,7 +2425,7 @@ func (x *ParseStateSummaryResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ParseStateSummaryResponse.ProtoReflect.Descriptor instead. func (*ParseStateSummaryResponse) Descriptor() ([]byte, []int) { - return file_vm_vm_proto_rawDescGZIP(), []int{39} + return file_vm_vm_proto_rawDescGZIP(), []int{36} } func (x *ParseStateSummaryResponse) GetId() []byte { @@ -2676,7 +2460,7 @@ type GetStateSummaryRequest struct { func (x *GetStateSummaryRequest) Reset() { *x = GetStateSummaryRequest{} if protoimpl.UnsafeEnabled { - mi := &file_vm_vm_proto_msgTypes[40] + mi := &file_vm_vm_proto_msgTypes[37] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2689,7 +2473,7 @@ func (x *GetStateSummaryRequest) String() string { func (*GetStateSummaryRequest) ProtoMessage() {} func (x *GetStateSummaryRequest) ProtoReflect() protoreflect.Message { - mi := &file_vm_vm_proto_msgTypes[40] + mi := &file_vm_vm_proto_msgTypes[37] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2702,7 +2486,7 @@ func (x *GetStateSummaryRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetStateSummaryRequest.ProtoReflect.Descriptor instead. func (*GetStateSummaryRequest) Descriptor() ([]byte, []int) { - return file_vm_vm_proto_rawDescGZIP(), []int{40} + return file_vm_vm_proto_rawDescGZIP(), []int{37} } func (x *GetStateSummaryRequest) GetHeight() uint64 { @@ -2725,7 +2509,7 @@ type GetStateSummaryResponse struct { func (x *GetStateSummaryResponse) Reset() { *x = GetStateSummaryResponse{} if protoimpl.UnsafeEnabled { - mi := &file_vm_vm_proto_msgTypes[41] + mi := &file_vm_vm_proto_msgTypes[38] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2738,7 +2522,7 @@ func (x *GetStateSummaryResponse) String() string { func (*GetStateSummaryResponse) ProtoMessage() {} func (x *GetStateSummaryResponse) ProtoReflect() protoreflect.Message { - mi := &file_vm_vm_proto_msgTypes[41] + mi := &file_vm_vm_proto_msgTypes[38] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2751,7 +2535,7 @@ func (x *GetStateSummaryResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetStateSummaryResponse.ProtoReflect.Descriptor instead. func (*GetStateSummaryResponse) Descriptor() ([]byte, []int) { - return file_vm_vm_proto_rawDescGZIP(), []int{41} + return file_vm_vm_proto_rawDescGZIP(), []int{38} } func (x *GetStateSummaryResponse) GetId() []byte { @@ -2786,7 +2570,7 @@ type StateSummaryAcceptRequest struct { func (x *StateSummaryAcceptRequest) Reset() { *x = StateSummaryAcceptRequest{} if protoimpl.UnsafeEnabled { - mi := &file_vm_vm_proto_msgTypes[42] + mi := &file_vm_vm_proto_msgTypes[39] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2799,7 +2583,7 @@ func (x *StateSummaryAcceptRequest) String() string { func (*StateSummaryAcceptRequest) ProtoMessage() {} func (x *StateSummaryAcceptRequest) ProtoReflect() protoreflect.Message { - mi := &file_vm_vm_proto_msgTypes[42] + mi := &file_vm_vm_proto_msgTypes[39] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2812,7 +2596,7 @@ func (x *StateSummaryAcceptRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use StateSummaryAcceptRequest.ProtoReflect.Descriptor instead. func (*StateSummaryAcceptRequest) Descriptor() ([]byte, []int) { - return file_vm_vm_proto_rawDescGZIP(), []int{42} + return file_vm_vm_proto_rawDescGZIP(), []int{39} } func (x *StateSummaryAcceptRequest) GetBytes() []byte { @@ -2834,7 +2618,7 @@ type StateSummaryAcceptResponse struct { func (x *StateSummaryAcceptResponse) Reset() { *x = StateSummaryAcceptResponse{} if protoimpl.UnsafeEnabled { - mi := &file_vm_vm_proto_msgTypes[43] + mi := &file_vm_vm_proto_msgTypes[40] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2847,7 +2631,7 @@ func (x *StateSummaryAcceptResponse) String() string { func (*StateSummaryAcceptResponse) ProtoMessage() {} func (x *StateSummaryAcceptResponse) ProtoReflect() protoreflect.Message { - mi := &file_vm_vm_proto_msgTypes[43] + mi := &file_vm_vm_proto_msgTypes[40] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2860,7 +2644,7 @@ func (x *StateSummaryAcceptResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use StateSummaryAcceptResponse.ProtoReflect.Descriptor instead. func (*StateSummaryAcceptResponse) Descriptor() ([]byte, []int) { - return file_vm_vm_proto_rawDescGZIP(), []int{43} + return file_vm_vm_proto_rawDescGZIP(), []int{40} } func (x *StateSummaryAcceptResponse) GetMode() StateSummaryAcceptResponse_Mode { @@ -3060,292 +2844,249 @@ var file_vm_vm_proto_rawDesc = []byte{ 0x6e, 0x73, 0x65, 0x22, 0x39, 0x0a, 0x0c, 0x41, 0x70, 0x70, 0x47, 0x6f, 0x73, 0x73, 0x69, 0x70, 0x4d, 0x73, 0x67, 0x12, 0x17, 0x0a, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x10, 0x0a, 0x03, - 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x22, 0xa5, - 0x01, 0x0a, 0x17, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x41, 0x70, 0x70, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x73, 0x67, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, - 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x63, 0x68, - 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x49, 0x64, 0x12, 0x36, 0x0a, 0x08, 0x64, 0x65, 0x61, 0x64, 0x6c, 0x69, 0x6e, 0x65, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x52, 0x08, 0x64, 0x65, 0x61, 0x64, 0x6c, 0x69, 0x6e, 0x65, 0x12, 0x18, 0x0a, 0x07, - 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x72, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x9d, 0x01, 0x0a, 0x1d, 0x43, 0x72, 0x6f, 0x73, 0x73, - 0x43, 0x68, 0x61, 0x69, 0x6e, 0x41, 0x70, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x46, - 0x61, 0x69, 0x6c, 0x65, 0x64, 0x4d, 0x73, 0x67, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x61, 0x69, - 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, - 0x6e, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x63, 0x6f, 0x64, 0x65, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x11, 0x52, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x43, 0x6f, 0x64, - 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x70, 0x0a, 0x18, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, - 0x68, 0x61, 0x69, 0x6e, 0x41, 0x70, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, - 0x73, 0x67, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x1d, 0x0a, - 0x0a, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0d, 0x52, 0x09, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08, - 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, - 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x81, 0x01, 0x0a, 0x10, 0x43, 0x6f, 0x6e, - 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, - 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, - 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x61, - 0x6a, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x6d, 0x61, 0x6a, 0x6f, 0x72, - 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x69, 0x6e, 0x6f, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, - 0x05, 0x6d, 0x69, 0x6e, 0x6f, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x74, 0x63, 0x68, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x70, 0x61, 0x74, 0x63, 0x68, 0x22, 0x2e, 0x0a, 0x13, - 0x44, 0x69, 0x73, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, + 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x22, 0x81, + 0x01, 0x0a, 0x10, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x22, 0xb3, 0x01, 0x0a, - 0x13, 0x47, 0x65, 0x74, 0x41, 0x6e, 0x63, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x6c, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x62, 0x6c, 0x6b, 0x49, 0x64, 0x12, 0x24, 0x0a, 0x0e, 0x6d, - 0x61, 0x78, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x5f, 0x6e, 0x75, 0x6d, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x05, 0x52, 0x0c, 0x6d, 0x61, 0x78, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x4e, 0x75, - 0x6d, 0x12, 0x26, 0x0a, 0x0f, 0x6d, 0x61, 0x78, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x5f, - 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x6d, 0x61, 0x78, 0x42, - 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x37, 0x0a, 0x18, 0x6d, 0x61, 0x78, - 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x5f, 0x72, 0x65, 0x74, 0x72, 0x69, 0x76, 0x61, 0x6c, - 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x15, 0x6d, 0x61, 0x78, - 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x52, 0x65, 0x74, 0x72, 0x69, 0x76, 0x61, 0x6c, 0x54, 0x69, - 0x6d, 0x65, 0x22, 0x35, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x41, 0x6e, 0x63, 0x65, 0x73, 0x74, 0x6f, - 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, - 0x6b, 0x73, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x09, - 0x62, 0x6c, 0x6b, 0x73, 0x42, 0x79, 0x74, 0x65, 0x73, 0x22, 0x34, 0x0a, 0x18, 0x42, 0x61, 0x74, - 0x63, 0x68, 0x65, 0x64, 0x50, 0x61, 0x72, 0x73, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, - 0x4f, 0x0a, 0x19, 0x42, 0x61, 0x74, 0x63, 0x68, 0x65, 0x64, 0x50, 0x61, 0x72, 0x73, 0x65, 0x42, - 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x08, - 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, - 0x2e, 0x76, 0x6d, 0x2e, 0x50, 0x61, 0x72, 0x73, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x33, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x44, 0x41, 0x74, - 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, - 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x68, - 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x50, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, - 0x6b, 0x49, 0x44, 0x41, 0x74, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x6c, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0c, 0x52, 0x05, 0x62, 0x6c, 0x6b, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x03, 0x65, 0x72, - 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x09, 0x2e, 0x76, 0x6d, 0x2e, 0x45, 0x72, 0x72, - 0x6f, 0x72, 0x52, 0x03, 0x65, 0x72, 0x72, 0x22, 0x5d, 0x0a, 0x0e, 0x47, 0x61, 0x74, 0x68, 0x65, - 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4b, 0x0a, 0x0f, 0x6d, 0x65, 0x74, - 0x72, 0x69, 0x63, 0x5f, 0x66, 0x61, 0x6d, 0x69, 0x6c, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x69, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x65, - 0x75, 0x73, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, - 0x46, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x52, 0x0e, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x46, 0x61, - 0x6d, 0x69, 0x6c, 0x69, 0x65, 0x73, 0x22, 0x51, 0x0a, 0x18, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, - 0x79, 0x6e, 0x63, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x1b, 0x0a, 0x03, - 0x65, 0x72, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x09, 0x2e, 0x76, 0x6d, 0x2e, 0x45, - 0x72, 0x72, 0x6f, 0x72, 0x52, 0x03, 0x65, 0x72, 0x72, 0x22, 0x7f, 0x0a, 0x22, 0x47, 0x65, 0x74, - 0x4f, 0x6e, 0x67, 0x6f, 0x69, 0x6e, 0x67, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x74, 0x61, 0x74, 0x65, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x61, 0x6a, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, + 0x05, 0x6d, 0x61, 0x6a, 0x6f, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x6d, 0x69, 0x6e, 0x6f, 0x72, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x6d, 0x69, 0x6e, 0x6f, 0x72, 0x12, 0x14, 0x0a, 0x05, + 0x70, 0x61, 0x74, 0x63, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x70, 0x61, 0x74, + 0x63, 0x68, 0x22, 0x2e, 0x0a, 0x13, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, + 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x6e, 0x6f, 0x64, + 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, + 0x49, 0x64, 0x22, 0xb3, 0x01, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x41, 0x6e, 0x63, 0x65, 0x73, 0x74, + 0x6f, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x6c, + 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x62, 0x6c, 0x6b, 0x49, + 0x64, 0x12, 0x24, 0x0a, 0x0e, 0x6d, 0x61, 0x78, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x5f, + 0x6e, 0x75, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x6d, 0x61, 0x78, 0x42, 0x6c, + 0x6f, 0x63, 0x6b, 0x73, 0x4e, 0x75, 0x6d, 0x12, 0x26, 0x0a, 0x0f, 0x6d, 0x61, 0x78, 0x5f, 0x62, + 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x0d, 0x6d, 0x61, 0x78, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x53, 0x69, 0x7a, 0x65, 0x12, + 0x37, 0x0a, 0x18, 0x6d, 0x61, 0x78, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x5f, 0x72, 0x65, + 0x74, 0x72, 0x69, 0x76, 0x61, 0x6c, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x15, 0x6d, 0x61, 0x78, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x52, 0x65, 0x74, 0x72, + 0x69, 0x76, 0x61, 0x6c, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x35, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x41, + 0x6e, 0x63, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x6c, 0x6b, 0x73, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0c, 0x52, 0x09, 0x62, 0x6c, 0x6b, 0x73, 0x42, 0x79, 0x74, 0x65, 0x73, 0x22, + 0x34, 0x0a, 0x18, 0x42, 0x61, 0x74, 0x63, 0x68, 0x65, 0x64, 0x50, 0x61, 0x72, 0x73, 0x65, 0x42, + 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x72, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x07, 0x72, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x4f, 0x0a, 0x19, 0x42, 0x61, 0x74, 0x63, 0x68, 0x65, 0x64, + 0x50, 0x61, 0x72, 0x73, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x32, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x76, 0x6d, 0x2e, 0x50, 0x61, 0x72, 0x73, 0x65, 0x42, + 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, 0x72, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x33, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, + 0x63, 0x6b, 0x49, 0x44, 0x41, 0x74, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x50, 0x0a, 0x1a, 0x47, + 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x44, 0x41, 0x74, 0x48, 0x65, 0x69, 0x67, 0x68, + 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x15, 0x0a, 0x06, 0x62, 0x6c, 0x6b, + 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x62, 0x6c, 0x6b, 0x49, 0x64, + 0x12, 0x1b, 0x0a, 0x03, 0x65, 0x72, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x09, 0x2e, + 0x76, 0x6d, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x03, 0x65, 0x72, 0x72, 0x22, 0x5d, 0x0a, + 0x0e, 0x47, 0x61, 0x74, 0x68, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x4b, 0x0a, 0x0f, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x5f, 0x66, 0x61, 0x6d, 0x69, 0x6c, 0x69, + 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x69, 0x6f, 0x2e, 0x70, 0x72, + 0x6f, 0x6d, 0x65, 0x74, 0x68, 0x65, 0x75, 0x73, 0x2e, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, + 0x4d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x46, 0x61, 0x6d, 0x69, 0x6c, 0x79, 0x52, 0x0e, 0x6d, 0x65, + 0x74, 0x72, 0x69, 0x63, 0x46, 0x61, 0x6d, 0x69, 0x6c, 0x69, 0x65, 0x73, 0x22, 0x51, 0x0a, 0x18, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x79, 0x6e, 0x63, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, + 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, + 0x65, 0x64, 0x12, 0x1b, 0x0a, 0x03, 0x65, 0x72, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x09, 0x2e, 0x76, 0x6d, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x03, 0x65, 0x72, 0x72, 0x22, + 0x7f, 0x0a, 0x22, 0x47, 0x65, 0x74, 0x4f, 0x6e, 0x67, 0x6f, 0x69, 0x6e, 0x67, 0x53, 0x79, 0x6e, + 0x63, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x14, 0x0a, + 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x62, 0x79, + 0x74, 0x65, 0x73, 0x12, 0x1b, 0x0a, 0x03, 0x65, 0x72, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x09, 0x2e, 0x76, 0x6d, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x03, 0x65, 0x72, 0x72, + 0x22, 0x78, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x12, 0x1b, 0x0a, 0x03, 0x65, 0x72, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x09, 0x2e, 0x76, 0x6d, 0x2e, - 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x03, 0x65, 0x72, 0x72, 0x22, 0x78, 0x0a, 0x1b, 0x47, 0x65, - 0x74, 0x4c, 0x61, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, + 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x03, 0x65, 0x72, 0x72, 0x22, 0x30, 0x0a, 0x18, 0x50, 0x61, + 0x72, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x22, 0x60, 0x0a, 0x19, + 0x50, 0x61, 0x72, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, - 0x74, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, - 0x52, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x12, 0x1b, 0x0a, 0x03, 0x65, 0x72, 0x72, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x09, 0x2e, 0x76, 0x6d, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, - 0x03, 0x65, 0x72, 0x72, 0x22, 0x30, 0x0a, 0x18, 0x50, 0x61, 0x72, 0x73, 0x65, 0x53, 0x74, 0x61, - 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x14, 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x22, 0x60, 0x0a, 0x19, 0x50, 0x61, 0x72, 0x73, 0x65, 0x53, - 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x1b, 0x0a, 0x03, 0x65, - 0x72, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x09, 0x2e, 0x76, 0x6d, 0x2e, 0x45, 0x72, - 0x72, 0x6f, 0x72, 0x52, 0x03, 0x65, 0x72, 0x72, 0x22, 0x30, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x53, - 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x5c, 0x0a, 0x17, 0x47, 0x65, - 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0c, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x12, 0x1b, 0x0a, 0x03, 0x65, - 0x72, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x09, 0x2e, 0x76, 0x6d, 0x2e, 0x45, 0x72, - 0x72, 0x6f, 0x72, 0x52, 0x03, 0x65, 0x72, 0x72, 0x22, 0x31, 0x0a, 0x19, 0x53, 0x74, 0x61, 0x74, - 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x22, 0xc5, 0x01, 0x0a, 0x1a, - 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x41, 0x63, 0x63, 0x65, - 0x70, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x04, 0x6d, 0x6f, - 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x76, 0x6d, 0x2e, 0x53, 0x74, - 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x6d, - 0x6f, 0x64, 0x65, 0x12, 0x1b, 0x0a, 0x03, 0x65, 0x72, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x09, 0x2e, 0x76, 0x6d, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x03, 0x65, 0x72, 0x72, - 0x22, 0x51, 0x0a, 0x04, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x14, 0x0a, 0x10, 0x4d, 0x4f, 0x44, 0x45, - 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x10, - 0x0a, 0x0c, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x53, 0x4b, 0x49, 0x50, 0x50, 0x45, 0x44, 0x10, 0x01, - 0x12, 0x0f, 0x0a, 0x0b, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x49, 0x43, 0x10, - 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x44, 0x59, 0x4e, 0x41, 0x4d, 0x49, - 0x43, 0x10, 0x03, 0x2a, 0x65, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x15, 0x0a, 0x11, - 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, - 0x44, 0x10, 0x00, 0x12, 0x17, 0x0a, 0x13, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x53, 0x54, 0x41, - 0x54, 0x45, 0x5f, 0x53, 0x59, 0x4e, 0x43, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x17, 0x0a, 0x13, - 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x42, 0x4f, 0x4f, 0x54, 0x53, 0x54, 0x52, 0x41, 0x50, 0x50, - 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x13, 0x0a, 0x0f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x4e, - 0x4f, 0x52, 0x4d, 0x41, 0x4c, 0x5f, 0x4f, 0x50, 0x10, 0x03, 0x2a, 0x6b, 0x0a, 0x05, 0x45, 0x72, - 0x72, 0x6f, 0x72, 0x12, 0x15, 0x0a, 0x11, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x55, 0x4e, 0x53, - 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x45, 0x52, - 0x52, 0x4f, 0x52, 0x5f, 0x43, 0x4c, 0x4f, 0x53, 0x45, 0x44, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, - 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x46, 0x4f, 0x55, 0x4e, 0x44, 0x10, - 0x02, 0x12, 0x24, 0x0a, 0x20, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, - 0x5f, 0x53, 0x59, 0x4e, 0x43, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x49, 0x4d, 0x50, 0x4c, 0x45, 0x4d, - 0x45, 0x4e, 0x54, 0x45, 0x44, 0x10, 0x03, 0x32, 0x86, 0x11, 0x0a, 0x02, 0x56, 0x4d, 0x12, 0x3b, - 0x0a, 0x0a, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x12, 0x15, 0x2e, 0x76, - 0x6d, 0x2e, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x76, 0x6d, 0x2e, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, - 0x69, 0x7a, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x08, 0x53, - 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x13, 0x2e, 0x76, 0x6d, 0x2e, 0x53, 0x65, 0x74, - 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x76, - 0x6d, 0x2e, 0x53, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x08, 0x53, 0x68, 0x75, 0x74, 0x64, 0x6f, 0x77, 0x6e, 0x12, 0x16, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x44, - 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x73, - 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x1a, 0x2e, 0x76, 0x6d, 0x2e, 0x43, 0x72, - 0x65, 0x61, 0x74, 0x65, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x09, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, - 0x64, 0x12, 0x14, 0x2e, 0x76, 0x6d, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, - 0x3f, 0x0a, 0x0c, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, 0x12, - 0x17, 0x2e, 0x76, 0x6d, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, - 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, - 0x12, 0x3b, 0x0a, 0x0a, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x15, - 0x2e, 0x76, 0x6d, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x76, 0x6d, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, - 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, - 0x0a, 0x50, 0x61, 0x72, 0x73, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x15, 0x2e, 0x76, 0x6d, - 0x2e, 0x50, 0x61, 0x72, 0x73, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x76, 0x6d, 0x2e, 0x50, 0x61, 0x72, 0x73, 0x65, 0x42, 0x6c, 0x6f, - 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x08, 0x47, 0x65, - 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x13, 0x2e, 0x76, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x42, - 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x76, 0x6d, - 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x41, 0x0a, 0x0d, 0x53, 0x65, 0x74, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, - 0x63, 0x65, 0x12, 0x18, 0x2e, 0x76, 0x6d, 0x2e, 0x53, 0x65, 0x74, 0x50, 0x72, 0x65, 0x66, 0x65, - 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, - 0x6d, 0x70, 0x74, 0x79, 0x12, 0x34, 0x0a, 0x06, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x12, 0x16, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x12, 0x2e, 0x76, 0x6d, 0x2e, 0x48, 0x65, 0x61, 0x6c, - 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x07, 0x56, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x13, 0x2e, - 0x76, 0x6d, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x37, 0x0a, 0x0a, 0x41, 0x70, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x11, 0x2e, 0x76, 0x6d, 0x2e, 0x41, 0x70, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x4d, 0x73, 0x67, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x43, 0x0a, 0x10, 0x41, - 0x70, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x12, - 0x17, 0x2e, 0x76, 0x6d, 0x2e, 0x41, 0x70, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x46, - 0x61, 0x69, 0x6c, 0x65, 0x64, 0x4d, 0x73, 0x67, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, - 0x12, 0x39, 0x0a, 0x0b, 0x41, 0x70, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x12, 0x2e, 0x76, 0x6d, 0x2e, 0x41, 0x70, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x4d, 0x73, 0x67, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x35, 0x0a, 0x09, 0x41, - 0x70, 0x70, 0x47, 0x6f, 0x73, 0x73, 0x69, 0x70, 0x12, 0x10, 0x2e, 0x76, 0x6d, 0x2e, 0x41, 0x70, - 0x70, 0x47, 0x6f, 0x73, 0x73, 0x69, 0x70, 0x4d, 0x73, 0x67, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, - 0x74, 0x79, 0x12, 0x34, 0x0a, 0x06, 0x47, 0x61, 0x74, 0x68, 0x65, 0x72, 0x12, 0x16, 0x2e, 0x67, + 0x74, 0x12, 0x1b, 0x0a, 0x03, 0x65, 0x72, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x09, + 0x2e, 0x76, 0x6d, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x03, 0x65, 0x72, 0x72, 0x22, 0x30, + 0x0a, 0x16, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, + 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x65, 0x69, 0x67, + 0x68, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, + 0x22, 0x5c, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, + 0x61, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x62, + 0x79, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x62, 0x79, 0x74, 0x65, + 0x73, 0x12, 0x1b, 0x0a, 0x03, 0x65, 0x72, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x09, + 0x2e, 0x76, 0x6d, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x03, 0x65, 0x72, 0x72, 0x22, 0x31, + 0x0a, 0x19, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x41, 0x63, + 0x63, 0x65, 0x70, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x62, + 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x62, 0x79, 0x74, 0x65, + 0x73, 0x22, 0xc5, 0x01, 0x0a, 0x1a, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, + 0x72, 0x79, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x37, 0x0a, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, + 0x2e, 0x76, 0x6d, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, + 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x4d, + 0x6f, 0x64, 0x65, 0x52, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x12, 0x1b, 0x0a, 0x03, 0x65, 0x72, 0x72, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x09, 0x2e, 0x76, 0x6d, 0x2e, 0x45, 0x72, 0x72, 0x6f, + 0x72, 0x52, 0x03, 0x65, 0x72, 0x72, 0x22, 0x51, 0x0a, 0x04, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x14, + 0x0a, 0x10, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, + 0x45, 0x44, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x53, 0x4b, 0x49, + 0x50, 0x50, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x53, + 0x54, 0x41, 0x54, 0x49, 0x43, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x4d, 0x4f, 0x44, 0x45, 0x5f, + 0x44, 0x59, 0x4e, 0x41, 0x4d, 0x49, 0x43, 0x10, 0x03, 0x2a, 0x65, 0x0a, 0x05, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, + 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x17, 0x0a, 0x13, 0x53, 0x54, 0x41, + 0x54, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x53, 0x59, 0x4e, 0x43, 0x49, 0x4e, 0x47, + 0x10, 0x01, 0x12, 0x17, 0x0a, 0x13, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x42, 0x4f, 0x4f, 0x54, + 0x53, 0x54, 0x52, 0x41, 0x50, 0x50, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x13, 0x0a, 0x0f, 0x53, + 0x54, 0x41, 0x54, 0x45, 0x5f, 0x4e, 0x4f, 0x52, 0x4d, 0x41, 0x4c, 0x5f, 0x4f, 0x50, 0x10, 0x03, + 0x2a, 0x6b, 0x0a, 0x05, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x15, 0x0a, 0x11, 0x45, 0x52, 0x52, + 0x4f, 0x52, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, + 0x12, 0x10, 0x0a, 0x0c, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x43, 0x4c, 0x4f, 0x53, 0x45, 0x44, + 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, + 0x46, 0x4f, 0x55, 0x4e, 0x44, 0x10, 0x02, 0x12, 0x24, 0x0a, 0x20, 0x45, 0x52, 0x52, 0x4f, 0x52, + 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x53, 0x59, 0x4e, 0x43, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, + 0x49, 0x4d, 0x50, 0x4c, 0x45, 0x4d, 0x45, 0x4e, 0x54, 0x45, 0x44, 0x10, 0x03, 0x32, 0x91, 0x0f, + 0x0a, 0x02, 0x56, 0x4d, 0x12, 0x3b, 0x0a, 0x0a, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, + 0x7a, 0x65, 0x12, 0x15, 0x2e, 0x76, 0x6d, 0x2e, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, + 0x7a, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x76, 0x6d, 0x2e, 0x49, + 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x35, 0x0a, 0x08, 0x53, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x13, 0x2e, + 0x76, 0x6d, 0x2e, 0x53, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x76, 0x6d, 0x2e, 0x53, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x08, 0x53, 0x68, 0x75, 0x74, + 0x64, 0x6f, 0x77, 0x6e, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, - 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x12, 0x2e, 0x76, 0x6d, 0x2e, 0x47, 0x61, 0x74, 0x68, 0x65, 0x72, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4b, 0x0a, 0x14, 0x43, 0x72, 0x6f, 0x73, - 0x73, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x41, 0x70, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x1b, 0x2e, 0x76, 0x6d, 0x2e, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, 0x68, 0x61, 0x69, 0x6e, - 0x41, 0x70, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x73, 0x67, 0x1a, 0x16, 0x2e, + 0x6d, 0x70, 0x74, 0x79, 0x12, 0x44, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x48, 0x61, + 0x6e, 0x64, 0x6c, 0x65, 0x72, 0x73, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x1a, + 0x2e, 0x76, 0x6d, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, + 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x09, 0x43, 0x6f, + 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, 0x12, 0x14, 0x2e, 0x76, 0x6d, 0x2e, 0x43, 0x6f, 0x6e, + 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x57, 0x0a, 0x1a, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, 0x68, - 0x61, 0x69, 0x6e, 0x41, 0x70, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x46, 0x61, 0x69, - 0x6c, 0x65, 0x64, 0x12, 0x21, 0x2e, 0x76, 0x6d, 0x2e, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, 0x68, - 0x61, 0x69, 0x6e, 0x41, 0x70, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x46, 0x61, 0x69, - 0x6c, 0x65, 0x64, 0x4d, 0x73, 0x67, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x4d, - 0x0a, 0x15, 0x43, 0x72, 0x6f, 0x73, 0x73, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x41, 0x70, 0x70, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x2e, 0x76, 0x6d, 0x2e, 0x43, 0x72, 0x6f, - 0x73, 0x73, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x41, 0x70, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x4d, 0x73, 0x67, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x41, 0x0a, - 0x0c, 0x47, 0x65, 0x74, 0x41, 0x6e, 0x63, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x17, 0x2e, - 0x76, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x6e, 0x63, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x76, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x41, - 0x6e, 0x63, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x50, 0x0a, 0x11, 0x42, 0x61, 0x74, 0x63, 0x68, 0x65, 0x64, 0x50, 0x61, 0x72, 0x73, 0x65, - 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x1c, 0x2e, 0x76, 0x6d, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, - 0x65, 0x64, 0x50, 0x61, 0x72, 0x73, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x76, 0x6d, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x65, 0x64, - 0x50, 0x61, 0x72, 0x73, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x53, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x44, - 0x41, 0x74, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x1d, 0x2e, 0x76, 0x6d, 0x2e, 0x47, 0x65, - 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x44, 0x41, 0x74, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x76, 0x6d, 0x2e, 0x47, 0x65, 0x74, - 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x44, 0x41, 0x74, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x48, 0x0a, 0x10, 0x53, 0x74, 0x61, 0x74, 0x65, - 0x53, 0x79, 0x6e, 0x63, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x16, 0x2e, 0x67, 0x6f, + 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x3f, 0x0a, 0x0c, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x6e, 0x6e, + 0x65, 0x63, 0x74, 0x65, 0x64, 0x12, 0x17, 0x2e, 0x76, 0x6d, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, + 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x3b, 0x0a, 0x0a, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x42, + 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x15, 0x2e, 0x76, 0x6d, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x42, + 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x76, 0x6d, + 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x0a, 0x50, 0x61, 0x72, 0x73, 0x65, 0x42, 0x6c, 0x6f, 0x63, + 0x6b, 0x12, 0x15, 0x2e, 0x76, 0x6d, 0x2e, 0x50, 0x61, 0x72, 0x73, 0x65, 0x42, 0x6c, 0x6f, 0x63, + 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x76, 0x6d, 0x2e, 0x50, 0x61, + 0x72, 0x73, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x35, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x13, 0x2e, 0x76, + 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x14, 0x2e, 0x76, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x0d, 0x53, 0x65, 0x74, 0x50, 0x72, + 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x18, 0x2e, 0x76, 0x6d, 0x2e, 0x53, 0x65, + 0x74, 0x50, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x34, 0x0a, 0x06, 0x48, 0x65, + 0x61, 0x6c, 0x74, 0x68, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x12, 0x2e, 0x76, + 0x6d, 0x2e, 0x48, 0x65, 0x61, 0x6c, 0x74, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x36, 0x0a, 0x07, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, - 0x70, 0x74, 0x79, 0x1a, 0x1c, 0x2e, 0x76, 0x6d, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x79, - 0x6e, 0x63, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x5c, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x4f, 0x6e, 0x67, 0x6f, 0x69, 0x6e, 0x67, 0x53, - 0x79, 0x6e, 0x63, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, - 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x26, 0x2e, 0x76, 0x6d, 0x2e, 0x47, 0x65, 0x74, - 0x4f, 0x6e, 0x67, 0x6f, 0x69, 0x6e, 0x67, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x74, 0x61, 0x74, 0x65, - 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x4e, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, - 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x1f, - 0x2e, 0x76, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, - 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x50, 0x0a, 0x11, 0x50, 0x61, 0x72, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, - 0x6d, 0x61, 0x72, 0x79, 0x12, 0x1c, 0x2e, 0x76, 0x6d, 0x2e, 0x50, 0x61, 0x72, 0x73, 0x65, 0x53, - 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x76, 0x6d, 0x2e, 0x50, 0x61, 0x72, 0x73, 0x65, 0x53, 0x74, 0x61, - 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x4a, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, - 0x6d, 0x61, 0x72, 0x79, 0x12, 0x1a, 0x2e, 0x76, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, - 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x1b, 0x2e, 0x76, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, - 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, - 0x0b, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x12, 0x16, 0x2e, 0x76, - 0x6d, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x76, 0x6d, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x56, - 0x65, 0x72, 0x69, 0x66, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, - 0x0b, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x12, 0x16, 0x2e, 0x76, - 0x6d, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x52, 0x65, 0x71, + 0x70, 0x74, 0x79, 0x1a, 0x13, 0x2e, 0x76, 0x6d, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x0a, 0x41, 0x70, 0x70, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x11, 0x2e, 0x76, 0x6d, 0x2e, 0x41, 0x70, 0x70, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x73, 0x67, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, + 0x79, 0x12, 0x43, 0x0a, 0x10, 0x41, 0x70, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x46, + 0x61, 0x69, 0x6c, 0x65, 0x64, 0x12, 0x17, 0x2e, 0x76, 0x6d, 0x2e, 0x41, 0x70, 0x70, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x4d, 0x73, 0x67, 0x1a, 0x16, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x39, 0x0a, 0x0b, 0x41, 0x70, 0x70, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x2e, 0x76, 0x6d, 0x2e, 0x41, 0x70, 0x70, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x73, 0x67, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, + 0x79, 0x12, 0x35, 0x0a, 0x09, 0x41, 0x70, 0x70, 0x47, 0x6f, 0x73, 0x73, 0x69, 0x70, 0x12, 0x10, + 0x2e, 0x76, 0x6d, 0x2e, 0x41, 0x70, 0x70, 0x47, 0x6f, 0x73, 0x73, 0x69, 0x70, 0x4d, 0x73, 0x67, + 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x34, 0x0a, 0x06, 0x47, 0x61, 0x74, 0x68, + 0x65, 0x72, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x12, 0x2e, 0x76, 0x6d, 0x2e, + 0x47, 0x61, 0x74, 0x68, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, + 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x41, 0x6e, 0x63, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x17, + 0x2e, 0x76, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x6e, 0x63, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x76, 0x6d, 0x2e, 0x47, 0x65, 0x74, + 0x41, 0x6e, 0x63, 0x65, 0x73, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x50, 0x0a, 0x11, 0x42, 0x61, 0x74, 0x63, 0x68, 0x65, 0x64, 0x50, 0x61, 0x72, 0x73, + 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x1c, 0x2e, 0x76, 0x6d, 0x2e, 0x42, 0x61, 0x74, 0x63, + 0x68, 0x65, 0x64, 0x50, 0x61, 0x72, 0x73, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x76, 0x6d, 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x65, + 0x64, 0x50, 0x61, 0x72, 0x73, 0x65, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x53, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x49, + 0x44, 0x41, 0x74, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x1d, 0x2e, 0x76, 0x6d, 0x2e, 0x47, + 0x65, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x44, 0x41, 0x74, 0x48, 0x65, 0x69, 0x67, 0x68, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x76, 0x6d, 0x2e, 0x47, 0x65, + 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x49, 0x44, 0x41, 0x74, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x48, 0x0a, 0x10, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x53, 0x79, 0x6e, 0x63, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x16, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, + 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x1c, 0x2e, 0x76, 0x6d, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, + 0x79, 0x6e, 0x63, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x5c, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x4f, 0x6e, 0x67, 0x6f, 0x69, 0x6e, 0x67, + 0x53, 0x79, 0x6e, 0x63, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, + 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x26, 0x2e, 0x76, 0x6d, 0x2e, 0x47, 0x65, + 0x74, 0x4f, 0x6e, 0x67, 0x6f, 0x69, 0x6e, 0x67, 0x53, 0x79, 0x6e, 0x63, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x4e, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, + 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, + 0x1f, 0x2e, 0x76, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x50, 0x0a, 0x11, 0x50, 0x61, 0x72, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, + 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x1c, 0x2e, 0x76, 0x6d, 0x2e, 0x50, 0x61, 0x72, 0x73, 0x65, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x76, 0x6d, 0x2e, 0x50, 0x61, 0x72, 0x73, 0x65, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x4a, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, + 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x1a, 0x2e, 0x76, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x1b, 0x2e, 0x76, 0x6d, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, + 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e, + 0x0a, 0x0b, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x12, 0x16, 0x2e, + 0x76, 0x6d, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x76, 0x6d, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, + 0x56, 0x65, 0x72, 0x69, 0x66, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, + 0x0a, 0x0b, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x12, 0x16, 0x2e, + 0x76, 0x6d, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x3d, 0x0a, + 0x0b, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x16, 0x2e, 0x76, + 0x6d, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x3d, 0x0a, 0x0b, - 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x16, 0x2e, 0x76, 0x6d, - 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x52, 0x65, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x53, 0x0a, 0x12, 0x53, - 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x41, 0x63, 0x63, 0x65, 0x70, - 0x74, 0x12, 0x1d, 0x2e, 0x76, 0x6d, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, - 0x61, 0x72, 0x79, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x1e, 0x2e, 0x76, 0x6d, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, - 0x72, 0x79, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x42, 0x2d, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, - 0x76, 0x61, 0x2d, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x61, 0x76, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x68, - 0x65, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x62, 0x2f, 0x76, 0x6d, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x53, 0x0a, 0x12, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x41, 0x63, 0x63, 0x65, + 0x70, 0x74, 0x12, 0x1d, 0x2e, 0x76, 0x6d, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, + 0x6d, 0x61, 0x72, 0x79, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x1e, 0x2e, 0x76, 0x6d, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x65, 0x53, 0x75, 0x6d, 0x6d, + 0x61, 0x72, 0x79, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x42, 0x2d, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x61, 0x76, 0x61, 0x2d, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x61, 0x76, 0x61, 0x6c, 0x61, 0x6e, 0x63, + 0x68, 0x65, 0x67, 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x62, 0x2f, 0x76, 0x6d, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -3361,7 +3102,7 @@ func file_vm_vm_proto_rawDescGZIP() []byte { } var file_vm_vm_proto_enumTypes = make([]protoimpl.EnumInfo, 3) -var file_vm_vm_proto_msgTypes = make([]protoimpl.MessageInfo, 44) +var file_vm_vm_proto_msgTypes = make([]protoimpl.MessageInfo, 41) var file_vm_vm_proto_goTypes = []interface{}{ (State)(0), // 0: vm.State (Error)(0), // 1: vm.Error @@ -3389,122 +3130,112 @@ var file_vm_vm_proto_goTypes = []interface{}{ (*AppRequestFailedMsg)(nil), // 23: vm.AppRequestFailedMsg (*AppResponseMsg)(nil), // 24: vm.AppResponseMsg (*AppGossipMsg)(nil), // 25: vm.AppGossipMsg - (*CrossChainAppRequestMsg)(nil), // 26: vm.CrossChainAppRequestMsg - (*CrossChainAppRequestFailedMsg)(nil), // 27: vm.CrossChainAppRequestFailedMsg - (*CrossChainAppResponseMsg)(nil), // 28: vm.CrossChainAppResponseMsg - (*ConnectedRequest)(nil), // 29: vm.ConnectedRequest - (*DisconnectedRequest)(nil), // 30: vm.DisconnectedRequest - (*GetAncestorsRequest)(nil), // 31: vm.GetAncestorsRequest - (*GetAncestorsResponse)(nil), // 32: vm.GetAncestorsResponse - (*BatchedParseBlockRequest)(nil), // 33: vm.BatchedParseBlockRequest - (*BatchedParseBlockResponse)(nil), // 34: vm.BatchedParseBlockResponse - (*GetBlockIDAtHeightRequest)(nil), // 35: vm.GetBlockIDAtHeightRequest - (*GetBlockIDAtHeightResponse)(nil), // 36: vm.GetBlockIDAtHeightResponse - (*GatherResponse)(nil), // 37: vm.GatherResponse - (*StateSyncEnabledResponse)(nil), // 38: vm.StateSyncEnabledResponse - (*GetOngoingSyncStateSummaryResponse)(nil), // 39: vm.GetOngoingSyncStateSummaryResponse - (*GetLastStateSummaryResponse)(nil), // 40: vm.GetLastStateSummaryResponse - (*ParseStateSummaryRequest)(nil), // 41: vm.ParseStateSummaryRequest - (*ParseStateSummaryResponse)(nil), // 42: vm.ParseStateSummaryResponse - (*GetStateSummaryRequest)(nil), // 43: vm.GetStateSummaryRequest - (*GetStateSummaryResponse)(nil), // 44: vm.GetStateSummaryResponse - (*StateSummaryAcceptRequest)(nil), // 45: vm.StateSummaryAcceptRequest - (*StateSummaryAcceptResponse)(nil), // 46: vm.StateSummaryAcceptResponse - (*timestamppb.Timestamp)(nil), // 47: google.protobuf.Timestamp - (*_go.MetricFamily)(nil), // 48: io.prometheus.client.MetricFamily - (*emptypb.Empty)(nil), // 49: google.protobuf.Empty + (*ConnectedRequest)(nil), // 26: vm.ConnectedRequest + (*DisconnectedRequest)(nil), // 27: vm.DisconnectedRequest + (*GetAncestorsRequest)(nil), // 28: vm.GetAncestorsRequest + (*GetAncestorsResponse)(nil), // 29: vm.GetAncestorsResponse + (*BatchedParseBlockRequest)(nil), // 30: vm.BatchedParseBlockRequest + (*BatchedParseBlockResponse)(nil), // 31: vm.BatchedParseBlockResponse + (*GetBlockIDAtHeightRequest)(nil), // 32: vm.GetBlockIDAtHeightRequest + (*GetBlockIDAtHeightResponse)(nil), // 33: vm.GetBlockIDAtHeightResponse + (*GatherResponse)(nil), // 34: vm.GatherResponse + (*StateSyncEnabledResponse)(nil), // 35: vm.StateSyncEnabledResponse + (*GetOngoingSyncStateSummaryResponse)(nil), // 36: vm.GetOngoingSyncStateSummaryResponse + (*GetLastStateSummaryResponse)(nil), // 37: vm.GetLastStateSummaryResponse + (*ParseStateSummaryRequest)(nil), // 38: vm.ParseStateSummaryRequest + (*ParseStateSummaryResponse)(nil), // 39: vm.ParseStateSummaryResponse + (*GetStateSummaryRequest)(nil), // 40: vm.GetStateSummaryRequest + (*GetStateSummaryResponse)(nil), // 41: vm.GetStateSummaryResponse + (*StateSummaryAcceptRequest)(nil), // 42: vm.StateSummaryAcceptRequest + (*StateSummaryAcceptResponse)(nil), // 43: vm.StateSummaryAcceptResponse + (*timestamppb.Timestamp)(nil), // 44: google.protobuf.Timestamp + (*_go.MetricFamily)(nil), // 45: io.prometheus.client.MetricFamily + (*emptypb.Empty)(nil), // 46: google.protobuf.Empty } var file_vm_vm_proto_depIdxs = []int32{ - 47, // 0: vm.InitializeResponse.timestamp:type_name -> google.protobuf.Timestamp + 44, // 0: vm.InitializeResponse.timestamp:type_name -> google.protobuf.Timestamp 0, // 1: vm.SetStateRequest.state:type_name -> vm.State - 47, // 2: vm.SetStateResponse.timestamp:type_name -> google.protobuf.Timestamp + 44, // 2: vm.SetStateResponse.timestamp:type_name -> google.protobuf.Timestamp 8, // 3: vm.CreateHandlersResponse.handlers:type_name -> vm.Handler - 47, // 4: vm.BuildBlockResponse.timestamp:type_name -> google.protobuf.Timestamp - 47, // 5: vm.ParseBlockResponse.timestamp:type_name -> google.protobuf.Timestamp - 47, // 6: vm.GetBlockResponse.timestamp:type_name -> google.protobuf.Timestamp + 44, // 4: vm.BuildBlockResponse.timestamp:type_name -> google.protobuf.Timestamp + 44, // 5: vm.ParseBlockResponse.timestamp:type_name -> google.protobuf.Timestamp + 44, // 6: vm.GetBlockResponse.timestamp:type_name -> google.protobuf.Timestamp 1, // 7: vm.GetBlockResponse.err:type_name -> vm.Error - 47, // 8: vm.BlockVerifyResponse.timestamp:type_name -> google.protobuf.Timestamp - 47, // 9: vm.AppRequestMsg.deadline:type_name -> google.protobuf.Timestamp - 47, // 10: vm.CrossChainAppRequestMsg.deadline:type_name -> google.protobuf.Timestamp - 12, // 11: vm.BatchedParseBlockResponse.response:type_name -> vm.ParseBlockResponse - 1, // 12: vm.GetBlockIDAtHeightResponse.err:type_name -> vm.Error - 48, // 13: vm.GatherResponse.metric_families:type_name -> io.prometheus.client.MetricFamily - 1, // 14: vm.StateSyncEnabledResponse.err:type_name -> vm.Error - 1, // 15: vm.GetOngoingSyncStateSummaryResponse.err:type_name -> vm.Error - 1, // 16: vm.GetLastStateSummaryResponse.err:type_name -> vm.Error - 1, // 17: vm.ParseStateSummaryResponse.err:type_name -> vm.Error - 1, // 18: vm.GetStateSummaryResponse.err:type_name -> vm.Error - 2, // 19: vm.StateSummaryAcceptResponse.mode:type_name -> vm.StateSummaryAcceptResponse.Mode - 1, // 20: vm.StateSummaryAcceptResponse.err:type_name -> vm.Error - 3, // 21: vm.VM.Initialize:input_type -> vm.InitializeRequest - 5, // 22: vm.VM.SetState:input_type -> vm.SetStateRequest - 49, // 23: vm.VM.Shutdown:input_type -> google.protobuf.Empty - 49, // 24: vm.VM.CreateHandlers:input_type -> google.protobuf.Empty - 29, // 25: vm.VM.Connected:input_type -> vm.ConnectedRequest - 30, // 26: vm.VM.Disconnected:input_type -> vm.DisconnectedRequest - 9, // 27: vm.VM.BuildBlock:input_type -> vm.BuildBlockRequest - 11, // 28: vm.VM.ParseBlock:input_type -> vm.ParseBlockRequest - 13, // 29: vm.VM.GetBlock:input_type -> vm.GetBlockRequest - 15, // 30: vm.VM.SetPreference:input_type -> vm.SetPreferenceRequest - 49, // 31: vm.VM.Health:input_type -> google.protobuf.Empty - 49, // 32: vm.VM.Version:input_type -> google.protobuf.Empty - 22, // 33: vm.VM.AppRequest:input_type -> vm.AppRequestMsg - 23, // 34: vm.VM.AppRequestFailed:input_type -> vm.AppRequestFailedMsg - 24, // 35: vm.VM.AppResponse:input_type -> vm.AppResponseMsg - 25, // 36: vm.VM.AppGossip:input_type -> vm.AppGossipMsg - 49, // 37: vm.VM.Gather:input_type -> google.protobuf.Empty - 26, // 38: vm.VM.CrossChainAppRequest:input_type -> vm.CrossChainAppRequestMsg - 27, // 39: vm.VM.CrossChainAppRequestFailed:input_type -> vm.CrossChainAppRequestFailedMsg - 28, // 40: vm.VM.CrossChainAppResponse:input_type -> vm.CrossChainAppResponseMsg - 31, // 41: vm.VM.GetAncestors:input_type -> vm.GetAncestorsRequest - 33, // 42: vm.VM.BatchedParseBlock:input_type -> vm.BatchedParseBlockRequest - 35, // 43: vm.VM.GetBlockIDAtHeight:input_type -> vm.GetBlockIDAtHeightRequest - 49, // 44: vm.VM.StateSyncEnabled:input_type -> google.protobuf.Empty - 49, // 45: vm.VM.GetOngoingSyncStateSummary:input_type -> google.protobuf.Empty - 49, // 46: vm.VM.GetLastStateSummary:input_type -> google.protobuf.Empty - 41, // 47: vm.VM.ParseStateSummary:input_type -> vm.ParseStateSummaryRequest - 43, // 48: vm.VM.GetStateSummary:input_type -> vm.GetStateSummaryRequest - 16, // 49: vm.VM.BlockVerify:input_type -> vm.BlockVerifyRequest - 18, // 50: vm.VM.BlockAccept:input_type -> vm.BlockAcceptRequest - 19, // 51: vm.VM.BlockReject:input_type -> vm.BlockRejectRequest - 45, // 52: vm.VM.StateSummaryAccept:input_type -> vm.StateSummaryAcceptRequest - 4, // 53: vm.VM.Initialize:output_type -> vm.InitializeResponse - 6, // 54: vm.VM.SetState:output_type -> vm.SetStateResponse - 49, // 55: vm.VM.Shutdown:output_type -> google.protobuf.Empty - 7, // 56: vm.VM.CreateHandlers:output_type -> vm.CreateHandlersResponse - 49, // 57: vm.VM.Connected:output_type -> google.protobuf.Empty - 49, // 58: vm.VM.Disconnected:output_type -> google.protobuf.Empty - 10, // 59: vm.VM.BuildBlock:output_type -> vm.BuildBlockResponse - 12, // 60: vm.VM.ParseBlock:output_type -> vm.ParseBlockResponse - 14, // 61: vm.VM.GetBlock:output_type -> vm.GetBlockResponse - 49, // 62: vm.VM.SetPreference:output_type -> google.protobuf.Empty - 20, // 63: vm.VM.Health:output_type -> vm.HealthResponse - 21, // 64: vm.VM.Version:output_type -> vm.VersionResponse - 49, // 65: vm.VM.AppRequest:output_type -> google.protobuf.Empty - 49, // 66: vm.VM.AppRequestFailed:output_type -> google.protobuf.Empty - 49, // 67: vm.VM.AppResponse:output_type -> google.protobuf.Empty - 49, // 68: vm.VM.AppGossip:output_type -> google.protobuf.Empty - 37, // 69: vm.VM.Gather:output_type -> vm.GatherResponse - 49, // 70: vm.VM.CrossChainAppRequest:output_type -> google.protobuf.Empty - 49, // 71: vm.VM.CrossChainAppRequestFailed:output_type -> google.protobuf.Empty - 49, // 72: vm.VM.CrossChainAppResponse:output_type -> google.protobuf.Empty - 32, // 73: vm.VM.GetAncestors:output_type -> vm.GetAncestorsResponse - 34, // 74: vm.VM.BatchedParseBlock:output_type -> vm.BatchedParseBlockResponse - 36, // 75: vm.VM.GetBlockIDAtHeight:output_type -> vm.GetBlockIDAtHeightResponse - 38, // 76: vm.VM.StateSyncEnabled:output_type -> vm.StateSyncEnabledResponse - 39, // 77: vm.VM.GetOngoingSyncStateSummary:output_type -> vm.GetOngoingSyncStateSummaryResponse - 40, // 78: vm.VM.GetLastStateSummary:output_type -> vm.GetLastStateSummaryResponse - 42, // 79: vm.VM.ParseStateSummary:output_type -> vm.ParseStateSummaryResponse - 44, // 80: vm.VM.GetStateSummary:output_type -> vm.GetStateSummaryResponse - 17, // 81: vm.VM.BlockVerify:output_type -> vm.BlockVerifyResponse - 49, // 82: vm.VM.BlockAccept:output_type -> google.protobuf.Empty - 49, // 83: vm.VM.BlockReject:output_type -> google.protobuf.Empty - 46, // 84: vm.VM.StateSummaryAccept:output_type -> vm.StateSummaryAcceptResponse - 53, // [53:85] is the sub-list for method output_type - 21, // [21:53] is the sub-list for method input_type - 21, // [21:21] is the sub-list for extension type_name - 21, // [21:21] is the sub-list for extension extendee - 0, // [0:21] is the sub-list for field type_name + 44, // 8: vm.BlockVerifyResponse.timestamp:type_name -> google.protobuf.Timestamp + 44, // 9: vm.AppRequestMsg.deadline:type_name -> google.protobuf.Timestamp + 12, // 10: vm.BatchedParseBlockResponse.response:type_name -> vm.ParseBlockResponse + 1, // 11: vm.GetBlockIDAtHeightResponse.err:type_name -> vm.Error + 45, // 12: vm.GatherResponse.metric_families:type_name -> io.prometheus.client.MetricFamily + 1, // 13: vm.StateSyncEnabledResponse.err:type_name -> vm.Error + 1, // 14: vm.GetOngoingSyncStateSummaryResponse.err:type_name -> vm.Error + 1, // 15: vm.GetLastStateSummaryResponse.err:type_name -> vm.Error + 1, // 16: vm.ParseStateSummaryResponse.err:type_name -> vm.Error + 1, // 17: vm.GetStateSummaryResponse.err:type_name -> vm.Error + 2, // 18: vm.StateSummaryAcceptResponse.mode:type_name -> vm.StateSummaryAcceptResponse.Mode + 1, // 19: vm.StateSummaryAcceptResponse.err:type_name -> vm.Error + 3, // 20: vm.VM.Initialize:input_type -> vm.InitializeRequest + 5, // 21: vm.VM.SetState:input_type -> vm.SetStateRequest + 46, // 22: vm.VM.Shutdown:input_type -> google.protobuf.Empty + 46, // 23: vm.VM.CreateHandlers:input_type -> google.protobuf.Empty + 26, // 24: vm.VM.Connected:input_type -> vm.ConnectedRequest + 27, // 25: vm.VM.Disconnected:input_type -> vm.DisconnectedRequest + 9, // 26: vm.VM.BuildBlock:input_type -> vm.BuildBlockRequest + 11, // 27: vm.VM.ParseBlock:input_type -> vm.ParseBlockRequest + 13, // 28: vm.VM.GetBlock:input_type -> vm.GetBlockRequest + 15, // 29: vm.VM.SetPreference:input_type -> vm.SetPreferenceRequest + 46, // 30: vm.VM.Health:input_type -> google.protobuf.Empty + 46, // 31: vm.VM.Version:input_type -> google.protobuf.Empty + 22, // 32: vm.VM.AppRequest:input_type -> vm.AppRequestMsg + 23, // 33: vm.VM.AppRequestFailed:input_type -> vm.AppRequestFailedMsg + 24, // 34: vm.VM.AppResponse:input_type -> vm.AppResponseMsg + 25, // 35: vm.VM.AppGossip:input_type -> vm.AppGossipMsg + 46, // 36: vm.VM.Gather:input_type -> google.protobuf.Empty + 28, // 37: vm.VM.GetAncestors:input_type -> vm.GetAncestorsRequest + 30, // 38: vm.VM.BatchedParseBlock:input_type -> vm.BatchedParseBlockRequest + 32, // 39: vm.VM.GetBlockIDAtHeight:input_type -> vm.GetBlockIDAtHeightRequest + 46, // 40: vm.VM.StateSyncEnabled:input_type -> google.protobuf.Empty + 46, // 41: vm.VM.GetOngoingSyncStateSummary:input_type -> google.protobuf.Empty + 46, // 42: vm.VM.GetLastStateSummary:input_type -> google.protobuf.Empty + 38, // 43: vm.VM.ParseStateSummary:input_type -> vm.ParseStateSummaryRequest + 40, // 44: vm.VM.GetStateSummary:input_type -> vm.GetStateSummaryRequest + 16, // 45: vm.VM.BlockVerify:input_type -> vm.BlockVerifyRequest + 18, // 46: vm.VM.BlockAccept:input_type -> vm.BlockAcceptRequest + 19, // 47: vm.VM.BlockReject:input_type -> vm.BlockRejectRequest + 42, // 48: vm.VM.StateSummaryAccept:input_type -> vm.StateSummaryAcceptRequest + 4, // 49: vm.VM.Initialize:output_type -> vm.InitializeResponse + 6, // 50: vm.VM.SetState:output_type -> vm.SetStateResponse + 46, // 51: vm.VM.Shutdown:output_type -> google.protobuf.Empty + 7, // 52: vm.VM.CreateHandlers:output_type -> vm.CreateHandlersResponse + 46, // 53: vm.VM.Connected:output_type -> google.protobuf.Empty + 46, // 54: vm.VM.Disconnected:output_type -> google.protobuf.Empty + 10, // 55: vm.VM.BuildBlock:output_type -> vm.BuildBlockResponse + 12, // 56: vm.VM.ParseBlock:output_type -> vm.ParseBlockResponse + 14, // 57: vm.VM.GetBlock:output_type -> vm.GetBlockResponse + 46, // 58: vm.VM.SetPreference:output_type -> google.protobuf.Empty + 20, // 59: vm.VM.Health:output_type -> vm.HealthResponse + 21, // 60: vm.VM.Version:output_type -> vm.VersionResponse + 46, // 61: vm.VM.AppRequest:output_type -> google.protobuf.Empty + 46, // 62: vm.VM.AppRequestFailed:output_type -> google.protobuf.Empty + 46, // 63: vm.VM.AppResponse:output_type -> google.protobuf.Empty + 46, // 64: vm.VM.AppGossip:output_type -> google.protobuf.Empty + 34, // 65: vm.VM.Gather:output_type -> vm.GatherResponse + 29, // 66: vm.VM.GetAncestors:output_type -> vm.GetAncestorsResponse + 31, // 67: vm.VM.BatchedParseBlock:output_type -> vm.BatchedParseBlockResponse + 33, // 68: vm.VM.GetBlockIDAtHeight:output_type -> vm.GetBlockIDAtHeightResponse + 35, // 69: vm.VM.StateSyncEnabled:output_type -> vm.StateSyncEnabledResponse + 36, // 70: vm.VM.GetOngoingSyncStateSummary:output_type -> vm.GetOngoingSyncStateSummaryResponse + 37, // 71: vm.VM.GetLastStateSummary:output_type -> vm.GetLastStateSummaryResponse + 39, // 72: vm.VM.ParseStateSummary:output_type -> vm.ParseStateSummaryResponse + 41, // 73: vm.VM.GetStateSummary:output_type -> vm.GetStateSummaryResponse + 17, // 74: vm.VM.BlockVerify:output_type -> vm.BlockVerifyResponse + 46, // 75: vm.VM.BlockAccept:output_type -> google.protobuf.Empty + 46, // 76: vm.VM.BlockReject:output_type -> google.protobuf.Empty + 43, // 77: vm.VM.StateSummaryAccept:output_type -> vm.StateSummaryAcceptResponse + 49, // [49:78] is the sub-list for method output_type + 20, // [20:49] is the sub-list for method input_type + 20, // [20:20] is the sub-list for extension type_name + 20, // [20:20] is the sub-list for extension extendee + 0, // [0:20] is the sub-list for field type_name } func init() { file_vm_vm_proto_init() } @@ -3790,42 +3521,6 @@ func file_vm_vm_proto_init() { } } file_vm_vm_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CrossChainAppRequestMsg); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_vm_vm_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CrossChainAppRequestFailedMsg); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_vm_vm_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CrossChainAppResponseMsg); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_vm_vm_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ConnectedRequest); i { case 0: return &v.state @@ -3837,7 +3532,7 @@ func file_vm_vm_proto_init() { return nil } } - file_vm_vm_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { + file_vm_vm_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*DisconnectedRequest); i { case 0: return &v.state @@ -3849,7 +3544,7 @@ func file_vm_vm_proto_init() { return nil } } - file_vm_vm_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { + file_vm_vm_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetAncestorsRequest); i { case 0: return &v.state @@ -3861,7 +3556,7 @@ func file_vm_vm_proto_init() { return nil } } - file_vm_vm_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { + file_vm_vm_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetAncestorsResponse); i { case 0: return &v.state @@ -3873,7 +3568,7 @@ func file_vm_vm_proto_init() { return nil } } - file_vm_vm_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { + file_vm_vm_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BatchedParseBlockRequest); i { case 0: return &v.state @@ -3885,7 +3580,7 @@ func file_vm_vm_proto_init() { return nil } } - file_vm_vm_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { + file_vm_vm_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*BatchedParseBlockResponse); i { case 0: return &v.state @@ -3897,7 +3592,7 @@ func file_vm_vm_proto_init() { return nil } } - file_vm_vm_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { + file_vm_vm_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetBlockIDAtHeightRequest); i { case 0: return &v.state @@ -3909,7 +3604,7 @@ func file_vm_vm_proto_init() { return nil } } - file_vm_vm_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { + file_vm_vm_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetBlockIDAtHeightResponse); i { case 0: return &v.state @@ -3921,7 +3616,7 @@ func file_vm_vm_proto_init() { return nil } } - file_vm_vm_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { + file_vm_vm_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GatherResponse); i { case 0: return &v.state @@ -3933,7 +3628,7 @@ func file_vm_vm_proto_init() { return nil } } - file_vm_vm_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { + file_vm_vm_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StateSyncEnabledResponse); i { case 0: return &v.state @@ -3945,7 +3640,7 @@ func file_vm_vm_proto_init() { return nil } } - file_vm_vm_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { + file_vm_vm_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetOngoingSyncStateSummaryResponse); i { case 0: return &v.state @@ -3957,7 +3652,7 @@ func file_vm_vm_proto_init() { return nil } } - file_vm_vm_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { + file_vm_vm_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetLastStateSummaryResponse); i { case 0: return &v.state @@ -3969,7 +3664,7 @@ func file_vm_vm_proto_init() { return nil } } - file_vm_vm_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { + file_vm_vm_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ParseStateSummaryRequest); i { case 0: return &v.state @@ -3981,7 +3676,7 @@ func file_vm_vm_proto_init() { return nil } } - file_vm_vm_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} { + file_vm_vm_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ParseStateSummaryResponse); i { case 0: return &v.state @@ -3993,7 +3688,7 @@ func file_vm_vm_proto_init() { return nil } } - file_vm_vm_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} { + file_vm_vm_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetStateSummaryRequest); i { case 0: return &v.state @@ -4005,7 +3700,7 @@ func file_vm_vm_proto_init() { return nil } } - file_vm_vm_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} { + file_vm_vm_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetStateSummaryResponse); i { case 0: return &v.state @@ -4017,7 +3712,7 @@ func file_vm_vm_proto_init() { return nil } } - file_vm_vm_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} { + file_vm_vm_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StateSummaryAcceptRequest); i { case 0: return &v.state @@ -4029,7 +3724,7 @@ func file_vm_vm_proto_init() { return nil } } - file_vm_vm_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} { + file_vm_vm_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*StateSummaryAcceptResponse); i { case 0: return &v.state @@ -4050,7 +3745,7 @@ func file_vm_vm_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_vm_vm_proto_rawDesc, NumEnums: 3, - NumMessages: 44, + NumMessages: 41, NumExtensions: 0, NumServices: 1, }, diff --git a/proto/pb/vm/vm_grpc.pb.go b/proto/pb/vm/vm_grpc.pb.go index 4a67f13408c..f1b43307faa 100644 --- a/proto/pb/vm/vm_grpc.pb.go +++ b/proto/pb/vm/vm_grpc.pb.go @@ -37,9 +37,6 @@ const ( VM_AppResponse_FullMethodName = "/vm.VM/AppResponse" VM_AppGossip_FullMethodName = "/vm.VM/AppGossip" VM_Gather_FullMethodName = "/vm.VM/Gather" - VM_CrossChainAppRequest_FullMethodName = "/vm.VM/CrossChainAppRequest" - VM_CrossChainAppRequestFailed_FullMethodName = "/vm.VM/CrossChainAppRequestFailed" - VM_CrossChainAppResponse_FullMethodName = "/vm.VM/CrossChainAppResponse" VM_GetAncestors_FullMethodName = "/vm.VM/GetAncestors" VM_BatchedParseBlock_FullMethodName = "/vm.VM/BatchedParseBlock" VM_GetBlockIDAtHeight_FullMethodName = "/vm.VM/GetBlockIDAtHeight" @@ -94,9 +91,6 @@ type VMClient interface { AppGossip(ctx context.Context, in *AppGossipMsg, opts ...grpc.CallOption) (*emptypb.Empty, error) // Attempts to gather metrics from a VM. Gather(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GatherResponse, error) - CrossChainAppRequest(ctx context.Context, in *CrossChainAppRequestMsg, opts ...grpc.CallOption) (*emptypb.Empty, error) - CrossChainAppRequestFailed(ctx context.Context, in *CrossChainAppRequestFailedMsg, opts ...grpc.CallOption) (*emptypb.Empty, error) - CrossChainAppResponse(ctx context.Context, in *CrossChainAppResponseMsg, opts ...grpc.CallOption) (*emptypb.Empty, error) // BatchedChainVM GetAncestors(ctx context.Context, in *GetAncestorsRequest, opts ...grpc.CallOption) (*GetAncestorsResponse, error) BatchedParseBlock(ctx context.Context, in *BatchedParseBlockRequest, opts ...grpc.CallOption) (*BatchedParseBlockResponse, error) @@ -284,33 +278,6 @@ func (c *vMClient) Gather(ctx context.Context, in *emptypb.Empty, opts ...grpc.C return out, nil } -func (c *vMClient) CrossChainAppRequest(ctx context.Context, in *CrossChainAppRequestMsg, opts ...grpc.CallOption) (*emptypb.Empty, error) { - out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, VM_CrossChainAppRequest_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *vMClient) CrossChainAppRequestFailed(ctx context.Context, in *CrossChainAppRequestFailedMsg, opts ...grpc.CallOption) (*emptypb.Empty, error) { - out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, VM_CrossChainAppRequestFailed_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *vMClient) CrossChainAppResponse(ctx context.Context, in *CrossChainAppResponseMsg, opts ...grpc.CallOption) (*emptypb.Empty, error) { - out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, VM_CrossChainAppResponse_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - func (c *vMClient) GetAncestors(ctx context.Context, in *GetAncestorsRequest, opts ...grpc.CallOption) (*GetAncestorsResponse, error) { out := new(GetAncestorsResponse) err := c.cc.Invoke(ctx, VM_GetAncestors_FullMethodName, in, out, opts...) @@ -459,9 +426,6 @@ type VMServer interface { AppGossip(context.Context, *AppGossipMsg) (*emptypb.Empty, error) // Attempts to gather metrics from a VM. Gather(context.Context, *emptypb.Empty) (*GatherResponse, error) - CrossChainAppRequest(context.Context, *CrossChainAppRequestMsg) (*emptypb.Empty, error) - CrossChainAppRequestFailed(context.Context, *CrossChainAppRequestFailedMsg) (*emptypb.Empty, error) - CrossChainAppResponse(context.Context, *CrossChainAppResponseMsg) (*emptypb.Empty, error) // BatchedChainVM GetAncestors(context.Context, *GetAncestorsRequest) (*GetAncestorsResponse, error) BatchedParseBlock(context.Context, *BatchedParseBlockRequest) (*BatchedParseBlockResponse, error) @@ -544,15 +508,6 @@ func (UnimplementedVMServer) AppGossip(context.Context, *AppGossipMsg) (*emptypb func (UnimplementedVMServer) Gather(context.Context, *emptypb.Empty) (*GatherResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Gather not implemented") } -func (UnimplementedVMServer) CrossChainAppRequest(context.Context, *CrossChainAppRequestMsg) (*emptypb.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method CrossChainAppRequest not implemented") -} -func (UnimplementedVMServer) CrossChainAppRequestFailed(context.Context, *CrossChainAppRequestFailedMsg) (*emptypb.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method CrossChainAppRequestFailed not implemented") -} -func (UnimplementedVMServer) CrossChainAppResponse(context.Context, *CrossChainAppResponseMsg) (*emptypb.Empty, error) { - return nil, status.Errorf(codes.Unimplemented, "method CrossChainAppResponse not implemented") -} func (UnimplementedVMServer) GetAncestors(context.Context, *GetAncestorsRequest) (*GetAncestorsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetAncestors not implemented") } @@ -908,60 +863,6 @@ func _VM_Gather_Handler(srv interface{}, ctx context.Context, dec func(interface return interceptor(ctx, in, info, handler) } -func _VM_CrossChainAppRequest_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CrossChainAppRequestMsg) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(VMServer).CrossChainAppRequest(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: VM_CrossChainAppRequest_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(VMServer).CrossChainAppRequest(ctx, req.(*CrossChainAppRequestMsg)) - } - return interceptor(ctx, in, info, handler) -} - -func _VM_CrossChainAppRequestFailed_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CrossChainAppRequestFailedMsg) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(VMServer).CrossChainAppRequestFailed(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: VM_CrossChainAppRequestFailed_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(VMServer).CrossChainAppRequestFailed(ctx, req.(*CrossChainAppRequestFailedMsg)) - } - return interceptor(ctx, in, info, handler) -} - -func _VM_CrossChainAppResponse_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CrossChainAppResponseMsg) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(VMServer).CrossChainAppResponse(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: VM_CrossChainAppResponse_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(VMServer).CrossChainAppResponse(ctx, req.(*CrossChainAppResponseMsg)) - } - return interceptor(ctx, in, info, handler) -} - func _VM_GetAncestors_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetAncestorsRequest) if err := dec(in); err != nil { @@ -1253,18 +1154,6 @@ var VM_ServiceDesc = grpc.ServiceDesc{ MethodName: "Gather", Handler: _VM_Gather_Handler, }, - { - MethodName: "CrossChainAppRequest", - Handler: _VM_CrossChainAppRequest_Handler, - }, - { - MethodName: "CrossChainAppRequestFailed", - Handler: _VM_CrossChainAppRequestFailed_Handler, - }, - { - MethodName: "CrossChainAppResponse", - Handler: _VM_CrossChainAppResponse_Handler, - }, { MethodName: "GetAncestors", Handler: _VM_GetAncestors_Handler, diff --git a/proto/vm/vm.proto b/proto/vm/vm.proto index 11dd0429c8d..dfac04b8b89 100644 --- a/proto/vm/vm.proto +++ b/proto/vm/vm.proto @@ -47,10 +47,6 @@ service VM { rpc AppGossip(AppGossipMsg) returns (google.protobuf.Empty); // Attempts to gather metrics from a VM. rpc Gather(google.protobuf.Empty) returns (GatherResponse); - rpc CrossChainAppRequest(CrossChainAppRequestMsg) returns (google.protobuf.Empty); - rpc CrossChainAppRequestFailed(CrossChainAppRequestFailedMsg) returns (google.protobuf.Empty); - rpc CrossChainAppResponse(CrossChainAppResponseMsg) returns (google.protobuf.Empty); - // BatchedChainVM rpc GetAncestors(GetAncestorsRequest) returns (GetAncestorsResponse); rpc BatchedParseBlock(BatchedParseBlockRequest) returns (BatchedParseBlockResponse); @@ -259,37 +255,6 @@ message AppGossipMsg { bytes msg = 2; } -message CrossChainAppRequestMsg { - // The chain that sent us this request - bytes chain_id = 1; - // The ID of this request - uint32 request_id = 2; - // deadline for this request - google.protobuf.Timestamp deadline = 3; - // The request body - bytes request = 4; -} - -message CrossChainAppRequestFailedMsg { - // The chain that we failed to get a response from - bytes chain_id = 1; - // The ID of the request we sent and didn't get a response to - uint32 request_id = 2; - // Application-defined error code - sint32 error_code = 3; - // Application-defined error message - string error_message = 4; -} - -message CrossChainAppResponseMsg { - // The chain that we got a response from - bytes chain_id = 1; - // Request ID of request that this is in response to - uint32 request_id = 2; - // The response body - bytes response = 3; -} - message ConnectedRequest { bytes node_id = 1; // Client name (e.g avalanchego) diff --git a/scripts/mocks.mockgen.source.txt b/scripts/mocks.mockgen.source.txt index 61efc224090..77de5529652 100644 --- a/scripts/mocks.mockgen.source.txt +++ b/scripts/mocks.mockgen.source.txt @@ -1,4 +1,4 @@ -snow/engine/common/sender.go=StateSummarySender,AcceptedStateSummarySender,FrontierSender,AcceptedSender,FetchSender,AppSender,QuerySender,CrossChainAppSender,NetworkAppSender,Gossiper=snow/engine/common/mock_sender.go +snow/engine/common/sender.go=StateSummarySender,AcceptedStateSummarySender,FrontierSender,AcceptedSender,FetchSender,AppSender,QuerySender,NetworkAppSender,Gossiper=snow/engine/common/mock_sender.go snow/networking/router/router.go=InternalHandler=snow/networking/router/mock_router.go snow/networking/sender/external_sender.go==snow/networking/sender/mock_external_sender.go vms/avm/block/executor/manager.go==vms/avm/block/executor/mock_manager.go diff --git a/snow/engine/avalanche/vertex/mock_vm.go b/snow/engine/avalanche/vertex/mock_vm.go index 18903544bd6..9687aa884e7 100644 --- a/snow/engine/avalanche/vertex/mock_vm.go +++ b/snow/engine/avalanche/vertex/mock_vm.go @@ -148,48 +148,6 @@ func (mr *MockLinearizableVMMockRecorder) CreateHandlers(arg0 any) *gomock.Call return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateHandlers", reflect.TypeOf((*MockLinearizableVM)(nil).CreateHandlers), arg0) } -// CrossChainAppRequest mocks base method. -func (m *MockLinearizableVM) CrossChainAppRequest(arg0 context.Context, arg1 ids.ID, arg2 uint32, arg3 time.Time, arg4 []byte) error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "CrossChainAppRequest", arg0, arg1, arg2, arg3, arg4) - ret0, _ := ret[0].(error) - return ret0 -} - -// CrossChainAppRequest indicates an expected call of CrossChainAppRequest. -func (mr *MockLinearizableVMMockRecorder) CrossChainAppRequest(arg0, arg1, arg2, arg3, arg4 any) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CrossChainAppRequest", reflect.TypeOf((*MockLinearizableVM)(nil).CrossChainAppRequest), arg0, arg1, arg2, arg3, arg4) -} - -// CrossChainAppRequestFailed mocks base method. -func (m *MockLinearizableVM) CrossChainAppRequestFailed(arg0 context.Context, arg1 ids.ID, arg2 uint32, arg3 *common.AppError) error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "CrossChainAppRequestFailed", arg0, arg1, arg2, arg3) - ret0, _ := ret[0].(error) - return ret0 -} - -// CrossChainAppRequestFailed indicates an expected call of CrossChainAppRequestFailed. -func (mr *MockLinearizableVMMockRecorder) CrossChainAppRequestFailed(arg0, arg1, arg2, arg3 any) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CrossChainAppRequestFailed", reflect.TypeOf((*MockLinearizableVM)(nil).CrossChainAppRequestFailed), arg0, arg1, arg2, arg3) -} - -// CrossChainAppResponse mocks base method. -func (m *MockLinearizableVM) CrossChainAppResponse(arg0 context.Context, arg1 ids.ID, arg2 uint32, arg3 []byte) error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "CrossChainAppResponse", arg0, arg1, arg2, arg3) - ret0, _ := ret[0].(error) - return ret0 -} - -// CrossChainAppResponse indicates an expected call of CrossChainAppResponse. -func (mr *MockLinearizableVMMockRecorder) CrossChainAppResponse(arg0, arg1, arg2, arg3 any) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CrossChainAppResponse", reflect.TypeOf((*MockLinearizableVM)(nil).CrossChainAppResponse), arg0, arg1, arg2, arg3) -} - // Disconnected mocks base method. func (m *MockLinearizableVM) Disconnected(arg0 context.Context, arg1 ids.NodeID) error { m.ctrl.T.Helper() diff --git a/snow/engine/common/appsender/appsender_client.go b/snow/engine/common/appsender/appsender_client.go index dcf2ef3dc55..4477034f17c 100644 --- a/snow/engine/common/appsender/appsender_client.go +++ b/snow/engine/common/appsender/appsender_client.go @@ -24,44 +24,6 @@ func NewClient(client appsenderpb.AppSenderClient) *Client { return &Client{client: client} } -func (c *Client) SendCrossChainAppRequest(ctx context.Context, chainID ids.ID, requestID uint32, appRequestBytes []byte) error { - _, err := c.client.SendCrossChainAppRequest( - ctx, - &appsenderpb.SendCrossChainAppRequestMsg{ - ChainId: chainID[:], - RequestId: requestID, - Request: appRequestBytes, - }, - ) - return err -} - -func (c *Client) SendCrossChainAppResponse(ctx context.Context, chainID ids.ID, requestID uint32, appResponseBytes []byte) error { - _, err := c.client.SendCrossChainAppResponse( - ctx, - &appsenderpb.SendCrossChainAppResponseMsg{ - ChainId: chainID[:], - RequestId: requestID, - Response: appResponseBytes, - }, - ) - return err -} - -func (c *Client) SendCrossChainAppError(ctx context.Context, chainID ids.ID, requestID uint32, errorCode int32, errorMessage string) error { - _, err := c.client.SendCrossChainAppError( - ctx, - &appsenderpb.SendCrossChainAppErrorMsg{ - ChainId: chainID[:], - RequestId: requestID, - ErrorCode: errorCode, - ErrorMessage: errorMessage, - }, - ) - - return err -} - func (c *Client) SendAppRequest(ctx context.Context, nodeIDs set.Set[ids.NodeID], requestID uint32, request []byte) error { nodeIDsBytes := make([][]byte, nodeIDs.Len()) i := 0 diff --git a/snow/engine/common/appsender/appsender_server.go b/snow/engine/common/appsender/appsender_server.go index 2a3734d8934..73092d3e086 100644 --- a/snow/engine/common/appsender/appsender_server.go +++ b/snow/engine/common/appsender/appsender_server.go @@ -27,33 +27,6 @@ func NewServer(appSender common.AppSender) *Server { return &Server{appSender: appSender} } -func (s *Server) SendCrossChainAppRequest(ctx context.Context, msg *appsenderpb.SendCrossChainAppRequestMsg) (*emptypb.Empty, error) { - chainID, err := ids.ToID(msg.ChainId) - if err != nil { - return &emptypb.Empty{}, err - } - - return &emptypb.Empty{}, s.appSender.SendCrossChainAppRequest(ctx, chainID, msg.RequestId, msg.Request) -} - -func (s *Server) SendCrossChainAppResponse(ctx context.Context, msg *appsenderpb.SendCrossChainAppResponseMsg) (*emptypb.Empty, error) { - chainID, err := ids.ToID(msg.ChainId) - if err != nil { - return &emptypb.Empty{}, err - } - - return &emptypb.Empty{}, s.appSender.SendCrossChainAppResponse(ctx, chainID, msg.RequestId, msg.Response) -} - -func (s *Server) SendCrossChainAppError(ctx context.Context, msg *appsenderpb.SendCrossChainAppErrorMsg) (*emptypb.Empty, error) { - chainID, err := ids.ToID(msg.ChainId) - if err != nil { - return &emptypb.Empty{}, err - } - - return &emptypb.Empty{}, s.appSender.SendCrossChainAppError(ctx, chainID, msg.RequestId, msg.ErrorCode, msg.ErrorMessage) -} - func (s *Server) SendAppRequest(ctx context.Context, req *appsenderpb.SendAppRequestMsg) (*emptypb.Empty, error) { nodeIDs := set.NewSet[ids.NodeID](len(req.NodeIds)) for _, nodeIDBytes := range req.NodeIds { diff --git a/snow/engine/common/engine.go b/snow/engine/common/engine.go index cbd9c37dc10..1fa0cbefb7a 100644 --- a/snow/engine/common/engine.go +++ b/snow/engine/common/engine.go @@ -415,64 +415,8 @@ type AppGossipHandler interface { ) error } -type CrossChainAppHandler interface { - CrossChainAppRequestHandler - CrossChainAppResponseHandler -} - -type CrossChainAppRequestHandler interface { - // Notify this engine of a request for a CrossChainAppResponse with the same - // requestID. - // - // The meaning of request, and what should be sent in response to it, is - // application (VM) specific. - // - // Guarantees surrounding the request are specific to the implementation of - // the requesting VM. For example, the request may or may not be guaranteed - // to be well-formed/valid depending on the implementation of the requesting - // VM. - CrossChainAppRequest( - ctx context.Context, - chainID ids.ID, - requestID uint32, - deadline time.Time, - request []byte, - ) error -} - -type CrossChainAppResponseHandler interface { - // Notify this engine of the response to a previously sent - // CrossChainAppRequest with the same requestID. - // - // The meaning of response is application (VM) specifc. - // - // Guarantees surrounding the response are specific to the implementation of - // the responding VM. For example, the response may or may not be guaranteed - // to be well-formed/valid depending on the implementation of the requesting - // VM. - CrossChainAppResponse( - ctx context.Context, - chainID ids.ID, - requestID uint32, - response []byte, - ) error - - // Notify this engine that a CrossChainAppRequest it issued has failed. - // - // This function will be called if a CrossChainAppRequest message with - // nodeID and requestID was previously sent by this engine and will not - // receive a response. - CrossChainAppRequestFailed( - ctx context.Context, - chainID ids.ID, - requestID uint32, - appErr *AppError, - ) error -} - type AppHandler interface { NetworkAppHandler - CrossChainAppHandler } type InternalHandler interface { diff --git a/snow/engine/common/mock_sender.go b/snow/engine/common/mock_sender.go index d1d3d1a68e5..e0a4a6dc4f3 100644 --- a/snow/engine/common/mock_sender.go +++ b/snow/engine/common/mock_sender.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -source=snow/engine/common/sender.go -destination=snow/engine/common/mock_sender.go -package=common -exclude_interfaces=StateSummarySender,AcceptedStateSummarySender,FrontierSender,AcceptedSender,FetchSender,AppSender,QuerySender,CrossChainAppSender,NetworkAppSender,Gossiper +// mockgen -source=snow/engine/common/sender.go -destination=snow/engine/common/mock_sender.go -package=common -exclude_interfaces=StateSummarySender,AcceptedStateSummarySender,FrontierSender,AcceptedSender,FetchSender,AppSender,QuerySender,NetworkAppSender,Gossiper // // Package common is a generated GoMock package. @@ -157,48 +157,6 @@ func (mr *MockSenderMockRecorder) SendChits(ctx, nodeID, requestID, preferredID, return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendChits", reflect.TypeOf((*MockSender)(nil).SendChits), ctx, nodeID, requestID, preferredID, preferredIDAtHeight, acceptedID) } -// SendCrossChainAppError mocks base method. -func (m *MockSender) SendCrossChainAppError(ctx context.Context, chainID ids.ID, requestID uint32, errorCode int32, errorMessage string) error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "SendCrossChainAppError", ctx, chainID, requestID, errorCode, errorMessage) - ret0, _ := ret[0].(error) - return ret0 -} - -// SendCrossChainAppError indicates an expected call of SendCrossChainAppError. -func (mr *MockSenderMockRecorder) SendCrossChainAppError(ctx, chainID, requestID, errorCode, errorMessage any) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendCrossChainAppError", reflect.TypeOf((*MockSender)(nil).SendCrossChainAppError), ctx, chainID, requestID, errorCode, errorMessage) -} - -// SendCrossChainAppRequest mocks base method. -func (m *MockSender) SendCrossChainAppRequest(ctx context.Context, chainID ids.ID, requestID uint32, appRequestBytes []byte) error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "SendCrossChainAppRequest", ctx, chainID, requestID, appRequestBytes) - ret0, _ := ret[0].(error) - return ret0 -} - -// SendCrossChainAppRequest indicates an expected call of SendCrossChainAppRequest. -func (mr *MockSenderMockRecorder) SendCrossChainAppRequest(ctx, chainID, requestID, appRequestBytes any) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendCrossChainAppRequest", reflect.TypeOf((*MockSender)(nil).SendCrossChainAppRequest), ctx, chainID, requestID, appRequestBytes) -} - -// SendCrossChainAppResponse mocks base method. -func (m *MockSender) SendCrossChainAppResponse(ctx context.Context, chainID ids.ID, requestID uint32, appResponseBytes []byte) error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "SendCrossChainAppResponse", ctx, chainID, requestID, appResponseBytes) - ret0, _ := ret[0].(error) - return ret0 -} - -// SendCrossChainAppResponse indicates an expected call of SendCrossChainAppResponse. -func (mr *MockSenderMockRecorder) SendCrossChainAppResponse(ctx, chainID, requestID, appResponseBytes any) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SendCrossChainAppResponse", reflect.TypeOf((*MockSender)(nil).SendCrossChainAppResponse), ctx, chainID, requestID, appResponseBytes) -} - // SendGet mocks base method. func (m *MockSender) SendGet(ctx context.Context, nodeID ids.NodeID, requestID uint32, containerID ids.ID) { m.ctrl.T.Helper() diff --git a/snow/engine/common/no_ops_handlers.go b/snow/engine/common/no_ops_handlers.go index 4458070e769..0b2247ab3cd 100644 --- a/snow/engine/common/no_ops_handlers.go +++ b/snow/engine/common/no_ops_handlers.go @@ -268,37 +268,6 @@ func NewNoOpAppHandler(log logging.Logger) AppHandler { return &noOpAppHandler{log: log} } -func (nop *noOpAppHandler) CrossChainAppRequest(_ context.Context, chainID ids.ID, requestID uint32, _ time.Time, _ []byte) error { - nop.log.Debug("dropping request", - zap.String("reason", "unhandled by this gear"), - zap.Stringer("messageOp", message.CrossChainAppRequestOp), - zap.Stringer("chainID", chainID), - zap.Uint32("requestID", requestID), - ) - return nil -} - -func (nop *noOpAppHandler) CrossChainAppRequestFailed(_ context.Context, chainID ids.ID, requestID uint32, appErr *AppError) error { - nop.log.Debug("dropping request", - zap.String("reason", "unhandled by this gear"), - zap.Stringer("messageOp", message.CrossChainAppErrorOp), - zap.Stringer("chainID", chainID), - zap.Uint32("requestID", requestID), - zap.Error(appErr), - ) - return nil -} - -func (nop *noOpAppHandler) CrossChainAppResponse(_ context.Context, chainID ids.ID, requestID uint32, _ []byte) error { - nop.log.Debug("dropping request", - zap.String("reason", "unhandled by this gear"), - zap.Stringer("messageOp", message.CrossChainAppResponseOp), - zap.Stringer("chainID", chainID), - zap.Uint32("requestID", requestID), - ) - return nil -} - func (nop *noOpAppHandler) AppRequest(_ context.Context, nodeID ids.NodeID, requestID uint32, _ time.Time, _ []byte) error { nop.log.Debug("dropping request", zap.String("reason", "unhandled by this gear"), diff --git a/snow/engine/common/sender.go b/snow/engine/common/sender.go index 69b53a89956..78ae02b1ae4 100644 --- a/snow/engine/common/sender.go +++ b/snow/engine/common/sender.go @@ -192,36 +192,8 @@ type NetworkAppSender interface { ) error } -// CrossChainAppSender sends local VM-level messages to another VM. -type CrossChainAppSender interface { - // SendCrossChainAppRequest sends an application-level request to a - // specific chain. - // - // The VM corresponding to this CrossChainAppSender may receive either: - // * A CrossChainAppResponse from [chainID] with ID [requestID] - // * A CrossChainAppRequestFailed from [chainID] with ID [requestID] - // - // A nil return value guarantees that the VM corresponding to this - // CrossChainAppSender will eventually receive exactly one of the above - // messages. - // - // A non-nil return value guarantees that the VM corresponding to this - // CrossChainAppSender will receive at most one of the above messages. - SendCrossChainAppRequest(ctx context.Context, chainID ids.ID, requestID uint32, appRequestBytes []byte) error - // SendCrossChainAppResponse sends an application-level response to a - // specific chain - // - // This response must be in response to a CrossChainAppRequest that the VM - // corresponding to this CrossChainAppSender received from [chainID] with ID - // [requestID]. - SendCrossChainAppResponse(ctx context.Context, chainID ids.ID, requestID uint32, appResponseBytes []byte) error - // SendCrossChainAppError sends an application-level error to a CrossChainAppRequest - SendCrossChainAppError(ctx context.Context, chainID ids.ID, requestID uint32, errorCode int32, errorMessage string) error -} - // AppSender sends application (VM) level messages. // See also common.AppHandler. type AppSender interface { NetworkAppSender - CrossChainAppSender } diff --git a/snow/engine/common/traced_engine.go b/snow/engine/common/traced_engine.go index f4fd4943f74..4574f0c3364 100644 --- a/snow/engine/common/traced_engine.go +++ b/snow/engine/common/traced_engine.go @@ -311,38 +311,6 @@ func (e *tracedEngine) AppGossip(ctx context.Context, nodeID ids.NodeID, msg []b return e.engine.AppGossip(ctx, nodeID, msg) } -func (e *tracedEngine) CrossChainAppRequest(ctx context.Context, chainID ids.ID, requestID uint32, deadline time.Time, request []byte) error { - ctx, span := e.tracer.Start(ctx, "tracedEngine.CrossChainAppRequest", oteltrace.WithAttributes( - attribute.Stringer("chainID", chainID), - attribute.Int64("requestID", int64(requestID)), - attribute.Int("requestLen", len(request)), - )) - defer span.End() - - return e.engine.CrossChainAppRequest(ctx, chainID, requestID, deadline, request) -} - -func (e *tracedEngine) CrossChainAppResponse(ctx context.Context, chainID ids.ID, requestID uint32, response []byte) error { - ctx, span := e.tracer.Start(ctx, "tracedEngine.CrossChainAppResponse", oteltrace.WithAttributes( - attribute.Stringer("chainID", chainID), - attribute.Int64("requestID", int64(requestID)), - attribute.Int("responseLen", len(response)), - )) - defer span.End() - - return e.engine.CrossChainAppResponse(ctx, chainID, requestID, response) -} - -func (e *tracedEngine) CrossChainAppRequestFailed(ctx context.Context, chainID ids.ID, requestID uint32, appErr *AppError) error { - ctx, span := e.tracer.Start(ctx, "tracedEngine.CrossChainAppRequestFailed", oteltrace.WithAttributes( - attribute.Stringer("chainID", chainID), - attribute.Int64("requestID", int64(requestID)), - )) - defer span.End() - - return e.engine.CrossChainAppRequestFailed(ctx, chainID, requestID, appErr) -} - func (e *tracedEngine) Connected(ctx context.Context, nodeID ids.NodeID, nodeVersion *version.Application) error { ctx, span := e.tracer.Start(ctx, "tracedEngine.Connected", oteltrace.WithAttributes( attribute.Stringer("nodeID", nodeID), diff --git a/snow/engine/enginetest/engine.go b/snow/engine/enginetest/engine.go index 53f791f19b2..29c577f6032 100644 --- a/snow/engine/enginetest/engine.go +++ b/snow/engine/enginetest/engine.go @@ -98,10 +98,6 @@ type Engine struct { CantHealth, - CantCrossChainAppRequest, - CantCrossChainAppRequestFailed, - CantCrossChainAppResponse, - CantAppRequest, CantAppResponse, CantAppGossip, @@ -126,20 +122,17 @@ type Engine struct { GetStateSummaryFrontierF, GetStateSummaryFrontierFailedF, GetAcceptedStateSummaryFailedF, GetAcceptedFrontierF, GetFailedF, GetAncestorsFailedF, QueryFailedF, GetAcceptedFrontierFailedF, GetAcceptedFailedF func(ctx context.Context, nodeID ids.NodeID, requestID uint32) error - AppRequestFailedF func(ctx context.Context, nodeID ids.NodeID, requestID uint32, appErr *common.AppError) error - StateSummaryFrontierF func(ctx context.Context, nodeID ids.NodeID, requestID uint32, summary []byte) error - GetAcceptedStateSummaryF func(ctx context.Context, nodeID ids.NodeID, requestID uint32, keys set.Set[uint64]) error - AcceptedStateSummaryF func(ctx context.Context, nodeID ids.NodeID, requestID uint32, summaryIDs set.Set[ids.ID]) error - ConnectedF func(ctx context.Context, nodeID ids.NodeID, nodeVersion *version.Application) error - DisconnectedF func(ctx context.Context, nodeID ids.NodeID) error - HealthF func(context.Context) (interface{}, error) - GetVMF func() common.VM - AppRequestF func(ctx context.Context, nodeID ids.NodeID, requestID uint32, deadline time.Time, msg []byte) error - AppResponseF func(ctx context.Context, nodeID ids.NodeID, requestID uint32, msg []byte) error - AppGossipF func(ctx context.Context, nodeID ids.NodeID, msg []byte) error - CrossChainAppRequestF func(ctx context.Context, chainID ids.ID, requestID uint32, deadline time.Time, msg []byte) error - CrossChainAppResponseF func(ctx context.Context, chainID ids.ID, requestID uint32, msg []byte) error - CrossChainAppRequestFailedF func(ctx context.Context, chainID ids.ID, requestID uint32, appErr *common.AppError) error + AppRequestFailedF func(ctx context.Context, nodeID ids.NodeID, requestID uint32, appErr *common.AppError) error + StateSummaryFrontierF func(ctx context.Context, nodeID ids.NodeID, requestID uint32, summary []byte) error + GetAcceptedStateSummaryF func(ctx context.Context, nodeID ids.NodeID, requestID uint32, keys set.Set[uint64]) error + AcceptedStateSummaryF func(ctx context.Context, nodeID ids.NodeID, requestID uint32, summaryIDs set.Set[ids.ID]) error + ConnectedF func(ctx context.Context, nodeID ids.NodeID, nodeVersion *version.Application) error + DisconnectedF func(ctx context.Context, nodeID ids.NodeID) error + HealthF func(context.Context) (interface{}, error) + GetVMF func() common.VM + AppRequestF func(ctx context.Context, nodeID ids.NodeID, requestID uint32, deadline time.Time, msg []byte) error + AppResponseF func(ctx context.Context, nodeID ids.NodeID, requestID uint32, msg []byte) error + AppGossipF func(ctx context.Context, nodeID ids.NodeID, msg []byte) error } func (e *Engine) Default(cant bool) { @@ -181,9 +174,6 @@ func (e *Engine) Default(cant bool) { e.CantAppResponse = cant e.CantAppGossip = cant e.CantGetVM = cant - e.CantCrossChainAppRequest = cant - e.CantCrossChainAppRequestFailed = cant - e.CantCrossChainAppResponse = cant } func (e *Engine) Start(ctx context.Context, startReqID uint32) error { @@ -550,45 +540,6 @@ func (e *Engine) QueryFailed(ctx context.Context, nodeID ids.NodeID, requestID u return errQueryFailed } -func (e *Engine) CrossChainAppRequest(ctx context.Context, chainID ids.ID, requestID uint32, deadline time.Time, request []byte) error { - if e.CrossChainAppRequestF != nil { - return e.CrossChainAppRequestF(ctx, chainID, requestID, deadline, request) - } - if !e.CantCrossChainAppRequest { - return nil - } - if e.T != nil { - require.FailNow(e.T, errCrossChainAppRequest.Error()) - } - return errCrossChainAppRequest -} - -func (e *Engine) CrossChainAppRequestFailed(ctx context.Context, chainID ids.ID, requestID uint32, appErr *common.AppError) error { - if e.CrossChainAppRequestFailedF != nil { - return e.CrossChainAppRequestFailedF(ctx, chainID, requestID, appErr) - } - if !e.CantCrossChainAppRequestFailed { - return nil - } - if e.T != nil { - require.FailNow(e.T, errCrossChainAppRequestFailed.Error()) - } - return errCrossChainAppRequestFailed -} - -func (e *Engine) CrossChainAppResponse(ctx context.Context, chainID ids.ID, requestID uint32, response []byte) error { - if e.CrossChainAppResponseF != nil { - return e.CrossChainAppResponseF(ctx, chainID, requestID, response) - } - if !e.CantCrossChainAppResponse { - return nil - } - if e.T != nil { - require.FailNow(e.T, errCrossChainAppResponse.Error()) - } - return errCrossChainAppResponse -} - func (e *Engine) AppRequest(ctx context.Context, nodeID ids.NodeID, requestID uint32, deadline time.Time, request []byte) error { if e.AppRequestF != nil { return e.AppRequestF(ctx, nodeID, requestID, deadline, request) diff --git a/snow/engine/enginetest/sender.go b/snow/engine/enginetest/sender.go index 02a57caf4b6..5bc7f100c05 100644 --- a/snow/engine/enginetest/sender.go +++ b/snow/engine/enginetest/sender.go @@ -36,8 +36,7 @@ type Sender struct { CantSendGet, CantSendGetAncestors, CantSendPut, CantSendAncestors, CantSendPullQuery, CantSendPushQuery, CantSendChits, CantSendAppRequest, CantSendAppResponse, CantSendAppError, - CantSendAppGossip, - CantSendCrossChainAppRequest, CantSendCrossChainAppResponse, CantSendCrossChainAppError bool + CantSendAppGossip bool SendGetStateSummaryFrontierF func(context.Context, set.Set[ids.NodeID], uint32) SendStateSummaryFrontierF func(context.Context, ids.NodeID, uint32, []byte) @@ -58,9 +57,6 @@ type Sender struct { SendAppResponseF func(context.Context, ids.NodeID, uint32, []byte) error SendAppErrorF func(context.Context, ids.NodeID, uint32, int32, string) error SendAppGossipF func(context.Context, common.SendConfig, []byte) error - SendCrossChainAppRequestF func(context.Context, ids.ID, uint32, []byte) - SendCrossChainAppResponseF func(context.Context, ids.ID, uint32, []byte) - SendCrossChainAppErrorF func(context.Context, ids.ID, uint32, int32, string) } // Default set the default callable value to [cant] @@ -83,8 +79,6 @@ func (s *Sender) Default(cant bool) { s.CantSendAppRequest = cant s.CantSendAppResponse = cant s.CantSendAppGossip = cant - s.CantSendCrossChainAppRequest = cant - s.CantSendCrossChainAppResponse = cant } // SendGetStateSummaryFrontier calls SendGetStateSummaryFrontierF if it was @@ -252,42 +246,6 @@ func (s *Sender) SendChits(ctx context.Context, vdr ids.NodeID, requestID uint32 } } -// SendCrossChainAppRequest calls SendCrossChainAppRequestF if it was -// initialized. If it wasn't initialized and this function shouldn't be called -// and testing was initialized, then testing will fail. -func (s *Sender) SendCrossChainAppRequest(ctx context.Context, chainID ids.ID, requestID uint32, appRequestBytes []byte) error { - if s.SendCrossChainAppRequestF != nil { - s.SendCrossChainAppRequestF(ctx, chainID, requestID, appRequestBytes) - } else if s.CantSendCrossChainAppRequest && s.T != nil { - require.FailNow(s.T, "Unexpectedly called SendCrossChainAppRequest") - } - return nil -} - -// SendCrossChainAppResponse calls SendCrossChainAppResponseF if it was -// initialized. If it wasn't initialized and this function shouldn't be called -// and testing was initialized, then testing will fail. -func (s *Sender) SendCrossChainAppResponse(ctx context.Context, chainID ids.ID, requestID uint32, appResponseBytes []byte) error { - if s.SendCrossChainAppResponseF != nil { - s.SendCrossChainAppResponseF(ctx, chainID, requestID, appResponseBytes) - } else if s.CantSendCrossChainAppResponse && s.T != nil { - require.FailNow(s.T, "Unexpectedly called SendCrossChainAppResponse") - } - return nil -} - -// SendCrossChainAppError calls SendCrossChainAppErrorF if it was -// initialized. If it wasn't initialized and this function shouldn't be called -// and testing was initialized, then testing will fail. -func (s *Sender) SendCrossChainAppError(ctx context.Context, chainID ids.ID, requestID uint32, errorCode int32, errorMessage string) error { - if s.SendCrossChainAppErrorF != nil { - s.SendCrossChainAppErrorF(ctx, chainID, requestID, errorCode, errorMessage) - } else if s.CantSendCrossChainAppError && s.T != nil { - require.FailNow(s.T, "Unexpectedly called SendCrossChainAppError") - } - return nil -} - // SendAppRequest calls SendAppRequestF if it was initialized. If it wasn't // initialized and this function shouldn't be called and testing was // initialized, then testing will fail. @@ -347,10 +305,9 @@ func (s *Sender) SendAppGossip( // SenderStub is a stub sender that returns values received on method-specific channels. type SenderStub struct { SentAppRequest, SentAppResponse, - SentAppGossip, - SentCrossChainAppRequest, SentCrossChainAppResponse chan []byte + SentAppGossip chan []byte - SentAppError, SentCrossChainAppError chan *common.AppError + SentAppError chan *common.AppError } func (f SenderStub) SendAppRequest(_ context.Context, _ set.Set[ids.NodeID], _ uint32, bytes []byte) error { @@ -391,33 +348,3 @@ func (f SenderStub) SendAppGossip(_ context.Context, _ common.SendConfig, bytes f.SentAppGossip <- bytes return nil } - -func (f SenderStub) SendCrossChainAppRequest(_ context.Context, _ ids.ID, _ uint32, bytes []byte) error { - if f.SentCrossChainAppRequest == nil { - return nil - } - - f.SentCrossChainAppRequest <- bytes - return nil -} - -func (f SenderStub) SendCrossChainAppResponse(_ context.Context, _ ids.ID, _ uint32, bytes []byte) error { - if f.SentCrossChainAppResponse == nil { - return nil - } - - f.SentCrossChainAppResponse <- bytes - return nil -} - -func (f SenderStub) SendCrossChainAppError(_ context.Context, _ ids.ID, _ uint32, errorCode int32, errorMessage string) error { - if f.SentCrossChainAppError == nil { - return nil - } - - f.SentCrossChainAppError <- &common.AppError{ - Code: errorCode, - Message: errorMessage, - } - return nil -} diff --git a/snow/engine/enginetest/vm.go b/snow/engine/enginetest/vm.go index d6c5f4d0feb..f3c430e5840 100644 --- a/snow/engine/enginetest/vm.go +++ b/snow/engine/enginetest/vm.go @@ -20,21 +20,18 @@ import ( ) var ( - errInitialize = errors.New("unexpectedly called Initialize") - errSetState = errors.New("unexpectedly called SetState") - errShutdown = errors.New("unexpectedly called Shutdown") - errCreateHandlers = errors.New("unexpectedly called CreateHandlers") - errHealthCheck = errors.New("unexpectedly called HealthCheck") - errConnected = errors.New("unexpectedly called Connected") - errDisconnected = errors.New("unexpectedly called Disconnected") - errVersion = errors.New("unexpectedly called Version") - errAppRequest = errors.New("unexpectedly called AppRequest") - errAppResponse = errors.New("unexpectedly called AppResponse") - errAppRequestFailed = errors.New("unexpectedly called AppRequestFailed") - errAppGossip = errors.New("unexpectedly called AppGossip") - errCrossChainAppRequest = errors.New("unexpectedly called CrossChainAppRequest") - errCrossChainAppResponse = errors.New("unexpectedly called CrossChainAppResponse") - errCrossChainAppRequestFailed = errors.New("unexpectedly called CrossChainAppRequestFailed") + errInitialize = errors.New("unexpectedly called Initialize") + errSetState = errors.New("unexpectedly called SetState") + errShutdown = errors.New("unexpectedly called Shutdown") + errCreateHandlers = errors.New("unexpectedly called CreateHandlers") + errHealthCheck = errors.New("unexpectedly called HealthCheck") + errConnected = errors.New("unexpectedly called Connected") + errDisconnected = errors.New("unexpectedly called Disconnected") + errVersion = errors.New("unexpectedly called Version") + errAppRequest = errors.New("unexpectedly called AppRequest") + errAppResponse = errors.New("unexpectedly called AppResponse") + errAppRequestFailed = errors.New("unexpectedly called AppRequestFailed") + errAppGossip = errors.New("unexpectedly called AppGossip") _ common.VM = (*VM)(nil) ) @@ -46,24 +43,20 @@ type VM struct { CantInitialize, CantSetState, CantShutdown, CantCreateHandlers, CantHealthCheck, CantConnected, CantDisconnected, CantVersion, - CantAppRequest, CantAppResponse, CantAppGossip, CantAppRequestFailed, - CantCrossChainAppRequest, CantCrossChainAppResponse, CantCrossChainAppRequestFailed bool - - InitializeF func(ctx context.Context, chainCtx *snow.Context, db database.Database, genesisBytes []byte, upgradeBytes []byte, configBytes []byte, msgChan chan<- common.Message, fxs []*common.Fx, appSender common.AppSender) error - SetStateF func(ctx context.Context, state snow.State) error - ShutdownF func(context.Context) error - CreateHandlersF func(context.Context) (map[string]http.Handler, error) - ConnectedF func(ctx context.Context, nodeID ids.NodeID, nodeVersion *version.Application) error - DisconnectedF func(ctx context.Context, nodeID ids.NodeID) error - HealthCheckF func(context.Context) (interface{}, error) - AppRequestF func(ctx context.Context, nodeID ids.NodeID, requestID uint32, deadline time.Time, msg []byte) error - AppResponseF func(ctx context.Context, nodeID ids.NodeID, requestID uint32, msg []byte) error - AppGossipF func(ctx context.Context, nodeID ids.NodeID, msg []byte) error - AppRequestFailedF func(ctx context.Context, nodeID ids.NodeID, requestID uint32, appErr *common.AppError) error - VersionF func(context.Context) (string, error) - CrossChainAppRequestF func(ctx context.Context, chainID ids.ID, requestID uint32, deadline time.Time, msg []byte) error - CrossChainAppResponseF func(ctx context.Context, chainID ids.ID, requestID uint32, msg []byte) error - CrossChainAppRequestFailedF func(ctx context.Context, chainID ids.ID, requestID uint32, appErr *common.AppError) error + CantAppRequest, CantAppResponse, CantAppGossip, CantAppRequestFailed bool + + InitializeF func(ctx context.Context, chainCtx *snow.Context, db database.Database, genesisBytes []byte, upgradeBytes []byte, configBytes []byte, msgChan chan<- common.Message, fxs []*common.Fx, appSender common.AppSender) error + SetStateF func(ctx context.Context, state snow.State) error + ShutdownF func(context.Context) error + CreateHandlersF func(context.Context) (map[string]http.Handler, error) + ConnectedF func(ctx context.Context, nodeID ids.NodeID, nodeVersion *version.Application) error + DisconnectedF func(ctx context.Context, nodeID ids.NodeID) error + HealthCheckF func(context.Context) (interface{}, error) + AppRequestF func(ctx context.Context, nodeID ids.NodeID, requestID uint32, deadline time.Time, msg []byte) error + AppResponseF func(ctx context.Context, nodeID ids.NodeID, requestID uint32, msg []byte) error + AppGossipF func(ctx context.Context, nodeID ids.NodeID, msg []byte) error + AppRequestFailedF func(ctx context.Context, nodeID ids.NodeID, requestID uint32, appErr *common.AppError) error + VersionF func(context.Context) (string, error) } func (vm *VM) Default(cant bool) { @@ -79,9 +72,6 @@ func (vm *VM) Default(cant bool) { vm.CantVersion = cant vm.CantConnected = cant vm.CantDisconnected = cant - vm.CantCrossChainAppRequest = cant - vm.CantCrossChainAppRequestFailed = cant - vm.CantCrossChainAppResponse = cant } func (vm *VM) Initialize( @@ -212,45 +202,6 @@ func (vm *VM) AppGossip(ctx context.Context, nodeID ids.NodeID, msg []byte) erro return errAppGossip } -func (vm *VM) CrossChainAppRequest(ctx context.Context, chainID ids.ID, requestID uint32, deadline time.Time, request []byte) error { - if vm.CrossChainAppRequestF != nil { - return vm.CrossChainAppRequestF(ctx, chainID, requestID, deadline, request) - } - if !vm.CantCrossChainAppRequest { - return nil - } - if vm.T != nil { - require.FailNow(vm.T, errCrossChainAppRequest.Error()) - } - return errCrossChainAppRequest -} - -func (vm *VM) CrossChainAppRequestFailed(ctx context.Context, chainID ids.ID, requestID uint32, appErr *common.AppError) error { - if vm.CrossChainAppRequestFailedF != nil { - return vm.CrossChainAppRequestFailedF(ctx, chainID, requestID, appErr) - } - if !vm.CantCrossChainAppRequestFailed { - return nil - } - if vm.T != nil { - require.FailNow(vm.T, errCrossChainAppRequestFailed.Error()) - } - return errCrossChainAppRequestFailed -} - -func (vm *VM) CrossChainAppResponse(ctx context.Context, chainID ids.ID, requestID uint32, response []byte) error { - if vm.CrossChainAppResponseF != nil { - return vm.CrossChainAppResponseF(ctx, chainID, requestID, response) - } - if !vm.CantCrossChainAppResponse { - return nil - } - if vm.T != nil { - require.FailNow(vm.T, errCrossChainAppResponse.Error()) - } - return errCrossChainAppResponse -} - func (vm *VM) Connected(ctx context.Context, id ids.NodeID, nodeVersion *version.Application) error { if vm.ConnectedF != nil { return vm.ConnectedF(ctx, id, nodeVersion) diff --git a/snow/engine/snowman/block/mock_chain_vm.go b/snow/engine/snowman/block/mock_chain_vm.go index c927282c1f9..4e7d7d7387f 100644 --- a/snow/engine/snowman/block/mock_chain_vm.go +++ b/snow/engine/snowman/block/mock_chain_vm.go @@ -147,48 +147,6 @@ func (mr *MockChainVMMockRecorder) CreateHandlers(arg0 any) *gomock.Call { return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CreateHandlers", reflect.TypeOf((*MockChainVM)(nil).CreateHandlers), arg0) } -// CrossChainAppRequest mocks base method. -func (m *MockChainVM) CrossChainAppRequest(arg0 context.Context, arg1 ids.ID, arg2 uint32, arg3 time.Time, arg4 []byte) error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "CrossChainAppRequest", arg0, arg1, arg2, arg3, arg4) - ret0, _ := ret[0].(error) - return ret0 -} - -// CrossChainAppRequest indicates an expected call of CrossChainAppRequest. -func (mr *MockChainVMMockRecorder) CrossChainAppRequest(arg0, arg1, arg2, arg3, arg4 any) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CrossChainAppRequest", reflect.TypeOf((*MockChainVM)(nil).CrossChainAppRequest), arg0, arg1, arg2, arg3, arg4) -} - -// CrossChainAppRequestFailed mocks base method. -func (m *MockChainVM) CrossChainAppRequestFailed(arg0 context.Context, arg1 ids.ID, arg2 uint32, arg3 *common.AppError) error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "CrossChainAppRequestFailed", arg0, arg1, arg2, arg3) - ret0, _ := ret[0].(error) - return ret0 -} - -// CrossChainAppRequestFailed indicates an expected call of CrossChainAppRequestFailed. -func (mr *MockChainVMMockRecorder) CrossChainAppRequestFailed(arg0, arg1, arg2, arg3 any) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CrossChainAppRequestFailed", reflect.TypeOf((*MockChainVM)(nil).CrossChainAppRequestFailed), arg0, arg1, arg2, arg3) -} - -// CrossChainAppResponse mocks base method. -func (m *MockChainVM) CrossChainAppResponse(arg0 context.Context, arg1 ids.ID, arg2 uint32, arg3 []byte) error { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "CrossChainAppResponse", arg0, arg1, arg2, arg3) - ret0, _ := ret[0].(error) - return ret0 -} - -// CrossChainAppResponse indicates an expected call of CrossChainAppResponse. -func (mr *MockChainVMMockRecorder) CrossChainAppResponse(arg0, arg1, arg2, arg3 any) *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CrossChainAppResponse", reflect.TypeOf((*MockChainVM)(nil).CrossChainAppResponse), arg0, arg1, arg2, arg3) -} - // Disconnected mocks base method. func (m *MockChainVM) Disconnected(arg0 context.Context, arg1 ids.NodeID) error { m.ctrl.T.Helper() diff --git a/snow/networking/handler/handler.go b/snow/networking/handler/handler.go index 1eb42ca0dcd..28582c60001 100644 --- a/snow/networking/handler/handler.go +++ b/snow/networking/handler/handler.go @@ -286,8 +286,7 @@ func (h *handler) Start(ctx context.Context, recoverPanic bool) { // Push the message onto the handler's queue func (h *handler) Push(ctx context.Context, msg Message) { switch msg.Op() { - case message.AppRequestOp, message.AppErrorOp, message.AppResponseOp, message.AppGossipOp, - message.CrossChainAppRequestOp, message.CrossChainAppErrorOp, message.CrossChainAppResponseOp: + case message.AppRequestOp, message.AppErrorOp, message.AppResponseOp, message.AppGossipOp: h.asyncMessageQueue.Push(ctx, msg) default: h.syncMessageQueue.Push(ctx, msg) @@ -881,36 +880,6 @@ func (h *handler) executeAsyncMsg(ctx context.Context, msg Message) error { case *p2ppb.AppGossip: return engine.AppGossip(ctx, nodeID, m.AppBytes) - case *message.CrossChainAppRequest: - return engine.CrossChainAppRequest( - ctx, - m.SourceChainID, - m.RequestID, - msg.Expiration(), - m.Message, - ) - - case *message.CrossChainAppResponse: - return engine.CrossChainAppResponse( - ctx, - m.SourceChainID, - m.RequestID, - m.Message, - ) - - case *message.CrossChainAppRequestFailed: - err := &common.AppError{ - Code: m.ErrorCode, - Message: m.ErrorMessage, - } - - return engine.CrossChainAppRequestFailed( - ctx, - m.SourceChainID, - m.RequestID, - err, - ) - default: return fmt.Errorf( "attempt to submit unhandled async msg %s from %s", diff --git a/snow/networking/router/chain_router_test.go b/snow/networking/router/chain_router_test.go index dadbec2d93d..8dcdef0a2e7 100644 --- a/snow/networking/router/chain_router_test.go +++ b/snow/networking/router/chain_router_test.go @@ -504,8 +504,7 @@ func TestRouterTimeout(t *testing.T) { calledGetAncestorsFailed, calledGetFailed, calledQueryFailed, - calledAppRequestFailed, - calledCrossChainAppRequestFailed bool + calledAppRequestFailed bool wg = sync.WaitGroup{} ) @@ -603,11 +602,6 @@ func TestRouterTimeout(t *testing.T) { calledAppRequestFailed = true return nil } - bootstrapper.CrossChainAppRequestFailedF = func(context.Context, ids.ID, uint32, *common.AppError) error { - defer wg.Done() - calledCrossChainAppRequestFailed = true - return nil - } ctx.State.Set(snow.EngineState{ Type: p2ppb.EngineType_ENGINE_TYPE_SNOWMAN, State: snow.Bootstrapping, // assumed bootstrapping is ongoing @@ -788,28 +782,6 @@ func TestRouterTimeout(t *testing.T) { ) } - { - wg.Add(1) - requestID++ - chainRouter.RegisterRequest( - context.Background(), - nodeID, - ctx.ChainID, - ctx.ChainID, - requestID, - message.CrossChainAppResponseOp, - message.InternalCrossChainAppError( - nodeID, - ctx.ChainID, - ctx.ChainID, - requestID, - common.ErrTimeout.Code, - common.ErrTimeout.Message, - ), - p2ppb.EngineType_ENGINE_TYPE_SNOWMAN, - ) - } - wg.Wait() chainRouter.lock.Lock() @@ -823,7 +795,6 @@ func TestRouterTimeout(t *testing.T) { require.True(calledGetFailed) require.True(calledQueryFailed) require.True(calledAppRequestFailed) - require.True(calledCrossChainAppRequestFailed) } func TestRouterHonorsRequestedEngine(t *testing.T) { @@ -1010,18 +981,6 @@ func TestRouterClearTimeouts(t *testing.T) { responseMsg: message.InboundAppError(ids.EmptyNodeID, ids.Empty, requestID, 1234, "custom error"), timeoutMsg: message.InboundAppError(ids.EmptyNodeID, ids.Empty, requestID, 123, "error"), }, - { - name: "CrossChainAppResponse", - responseOp: message.CrossChainAppResponseOp, - responseMsg: message.InternalCrossChainAppResponse(ids.EmptyNodeID, ids.Empty, ids.Empty, requestID, []byte("responseMsg")), - timeoutMsg: message.InternalCrossChainAppError(ids.EmptyNodeID, ids.Empty, ids.Empty, requestID, 123, "error"), - }, - { - name: "CrossChainAppError", - responseOp: message.CrossChainAppResponseOp, - responseMsg: message.InternalCrossChainAppError(ids.EmptyNodeID, ids.Empty, ids.Empty, requestID, 1234, "custom error"), - timeoutMsg: message.InternalCrossChainAppError(ids.EmptyNodeID, ids.Empty, ids.Empty, requestID, 123, "error"), - }, } for _, tt := range tests { @@ -1592,94 +1551,6 @@ func TestAppRequest(t *testing.T) { } } -// Tests that a response, peer error, or a timeout clears the timeout and calls -// the handler -func TestCrossChainAppRequest(t *testing.T) { - wantRequestID := uint32(123) - wantResponse := []byte("response") - - errFoo := common.AppError{ - Code: 456, - Message: "foo", - } - - tests := []struct { - name string - responseOp message.Op - timeoutMsg message.InboundMessage - inboundMsg message.InboundMessage - }{ - { - name: "CrossChainAppRequest - chain response", - responseOp: message.CrossChainAppResponseOp, - timeoutMsg: message.InternalCrossChainAppError(ids.EmptyNodeID, ids.Empty, ids.Empty, wantRequestID, errFoo.Code, errFoo.Message), - inboundMsg: message.InternalCrossChainAppResponse(ids.EmptyNodeID, ids.Empty, ids.Empty, wantRequestID, wantResponse), - }, - { - name: "CrossChainAppRequest - chain error", - responseOp: message.CrossChainAppResponseOp, - timeoutMsg: message.InternalCrossChainAppError(ids.EmptyNodeID, ids.Empty, ids.Empty, wantRequestID, errFoo.Code, errFoo.Message), - inboundMsg: message.InternalCrossChainAppError(ids.EmptyNodeID, ids.Empty, ids.Empty, wantRequestID, errFoo.Code, errFoo.Message), - }, - { - name: "CrossChainAppRequest - timeout", - responseOp: message.CrossChainAppResponseOp, - timeoutMsg: message.InternalCrossChainAppError(ids.EmptyNodeID, ids.Empty, ids.Empty, wantRequestID, errFoo.Code, errFoo.Message), - }, - } - - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - require := require.New(t) - - wg := &sync.WaitGroup{} - chainRouter, engine := newChainRouterTest(t) - - wg.Add(1) - if tt.inboundMsg == nil || tt.inboundMsg.Op() == message.CrossChainAppErrorOp { - engine.CrossChainAppRequestFailedF = func(_ context.Context, chainID ids.ID, requestID uint32, appErr *common.AppError) error { - defer wg.Done() - chainRouter.lock.Lock() - require.Zero(chainRouter.timedRequests.Len()) - chainRouter.lock.Unlock() - - require.Equal(ids.Empty, chainID) - require.Equal(wantRequestID, requestID) - require.Equal(errFoo.Code, appErr.Code) - require.Equal(errFoo.Message, appErr.Message) - - return nil - } - } else if tt.inboundMsg.Op() == message.CrossChainAppResponseOp { - engine.CrossChainAppResponseF = func(_ context.Context, chainID ids.ID, requestID uint32, msg []byte) error { - defer wg.Done() - chainRouter.lock.Lock() - require.Zero(chainRouter.timedRequests.Len()) - chainRouter.lock.Unlock() - - require.Equal(ids.Empty, chainID) - require.Equal(wantRequestID, requestID) - require.Equal(wantResponse, msg) - - return nil - } - } - - ctx := context.Background() - chainRouter.RegisterRequest(ctx, ids.EmptyNodeID, ids.Empty, ids.Empty, wantRequestID, tt.responseOp, tt.timeoutMsg, engineType) - chainRouter.lock.Lock() - require.Equal(1, chainRouter.timedRequests.Len()) - chainRouter.lock.Unlock() - - if tt.inboundMsg != nil { - chainRouter.HandleInbound(ctx, tt.inboundMsg) - } - - wg.Wait() - }) - } -} - func newChainRouterTest(t *testing.T) (*ChainRouter, *enginetest.Engine) { // Create a timeout manager tm, err := timeout.NewManager( diff --git a/snow/networking/sender/sender.go b/snow/networking/sender/sender.go index e4e36bd3ebb..b8742fae0ff 100644 --- a/snow/networking/sender/sender.go +++ b/snow/networking/sender/sender.go @@ -1212,70 +1212,6 @@ func (s *sender) SendChits( } } -func (s *sender) SendCrossChainAppRequest(ctx context.Context, chainID ids.ID, requestID uint32, appRequestBytes []byte) error { - ctx = context.WithoutCancel(ctx) - - // The failed message is treated as if it was sent by the requested chain - failedMsg := message.InternalCrossChainAppError( - s.ctx.NodeID, - chainID, - s.ctx.ChainID, - requestID, - common.ErrTimeout.Code, - common.ErrTimeout.Message, - ) - s.router.RegisterRequest( - ctx, - s.ctx.NodeID, - s.ctx.ChainID, - chainID, - requestID, - message.CrossChainAppResponseOp, - failedMsg, - p2p.EngineType_ENGINE_TYPE_UNSPECIFIED, - ) - - inMsg := message.InternalCrossChainAppRequest( - s.ctx.NodeID, - s.ctx.ChainID, - chainID, - requestID, - s.timeouts.TimeoutDuration(), - appRequestBytes, - ) - go s.router.HandleInbound(ctx, inMsg) - return nil -} - -func (s *sender) SendCrossChainAppResponse(ctx context.Context, chainID ids.ID, requestID uint32, appResponseBytes []byte) error { - ctx = context.WithoutCancel(ctx) - - inMsg := message.InternalCrossChainAppResponse( - s.ctx.NodeID, - s.ctx.ChainID, - chainID, - requestID, - appResponseBytes, - ) - go s.router.HandleInbound(ctx, inMsg) - return nil -} - -func (s *sender) SendCrossChainAppError(ctx context.Context, chainID ids.ID, requestID uint32, errorCode int32, errorMessage string) error { - ctx = context.WithoutCancel(ctx) - - inMsg := message.InternalCrossChainAppError( - s.ctx.NodeID, - s.ctx.ChainID, - chainID, - requestID, - errorCode, - errorMessage, - ) - go s.router.HandleInbound(ctx, inMsg) - return nil -} - func (s *sender) SendAppRequest(ctx context.Context, nodeIDs set.Set[ids.NodeID], requestID uint32, appRequestBytes []byte) error { ctx = context.WithoutCancel(ctx) diff --git a/snow/networking/sender/sender_test.go b/snow/networking/sender/sender_test.go index 215de3c56fb..fb156586503 100644 --- a/snow/networking/sender/sender_test.go +++ b/snow/networking/sender/sender_test.go @@ -219,17 +219,6 @@ func TestTimeout(t *testing.T) { return nil } - bootstrapper.CrossChainAppRequestFailedF = func(ctx context.Context, chainID ids.ID, _ uint32, _ *common.AppError) error { - require.NoError(ctx.Err()) - - failedLock.Lock() - defer failedLock.Unlock() - - failedChains.Add(chainID) - wg.Done() - return nil - } - sendAll := func() { { nodeIDs := set.Of(ids.GenerateTestNodeID()) @@ -294,13 +283,6 @@ func TestTimeout(t *testing.T) { requestID++ require.NoError(sender.SendAppRequest(cancelledCtx, nodeIDs, requestID, nil)) } - { - chainID := ids.GenerateTestID() - chains.Add(chainID) - wg.Add(1) - requestID++ - require.NoError(sender.SendCrossChainAppRequest(cancelledCtx, chainID, requestID, nil)) - } } // Send messages to disconnected peers diff --git a/snow/networking/sender/traced_sender.go b/snow/networking/sender/traced_sender.go index 0e25602c84c..6fadee7f909 100644 --- a/snow/networking/sender/traced_sender.go +++ b/snow/networking/sender/traced_sender.go @@ -191,40 +191,6 @@ func (s *tracedSender) SendChits(ctx context.Context, nodeID ids.NodeID, request s.sender.SendChits(ctx, nodeID, requestID, preferredID, preferredIDAtHeight, acceptedID) } -func (s *tracedSender) SendCrossChainAppRequest(ctx context.Context, chainID ids.ID, requestID uint32, appRequestBytes []byte) error { - ctx, span := s.tracer.Start(ctx, "tracedSender.SendCrossChainAppRequest", oteltrace.WithAttributes( - attribute.Stringer("chainID", chainID), - attribute.Int64("requestID", int64(requestID)), - attribute.Int("requestLen", len(appRequestBytes)), - )) - defer span.End() - - return s.sender.SendCrossChainAppRequest(ctx, chainID, requestID, appRequestBytes) -} - -func (s *tracedSender) SendCrossChainAppResponse(ctx context.Context, chainID ids.ID, requestID uint32, appResponseBytes []byte) error { - ctx, span := s.tracer.Start(ctx, "tracedSender.SendCrossChainAppResponse", oteltrace.WithAttributes( - attribute.Stringer("chainID", chainID), - attribute.Int64("requestID", int64(requestID)), - attribute.Int("responseLen", len(appResponseBytes)), - )) - defer span.End() - - return s.sender.SendCrossChainAppResponse(ctx, chainID, requestID, appResponseBytes) -} - -func (s *tracedSender) SendCrossChainAppError(ctx context.Context, chainID ids.ID, requestID uint32, errorCode int32, errorMessage string) error { - ctx, span := s.tracer.Start(ctx, "tracedSender.SendCrossChainAppError", oteltrace.WithAttributes( - attribute.Stringer("chainID", chainID), - attribute.Int64("requestID", int64(requestID)), - attribute.Int64("errorCode", int64(errorCode)), - attribute.String("errorMessage", errorMessage), - )) - defer span.End() - - return s.sender.SendCrossChainAppError(ctx, chainID, requestID, errorCode, errorMessage) -} - func (s *tracedSender) SendAppRequest(ctx context.Context, nodeIDs set.Set[ids.NodeID], requestID uint32, appRequestBytes []byte) error { ctx, span := s.tracer.Start(ctx, "tracedSender.SendAppRequest", oteltrace.WithAttributes( attribute.Int64("requestID", int64(requestID)), diff --git a/version/constants.go b/version/constants.go index 3742f7ffe61..0c682ffcc61 100644 --- a/version/constants.go +++ b/version/constants.go @@ -18,7 +18,7 @@ const ( // RPCChainVMProtocol should be bumped anytime changes are made which // require the plugin vm to upgrade to latest avalanchego release to be // compatible. - RPCChainVMProtocol uint = 36 + RPCChainVMProtocol uint = 37 ) // These are globals that describe network upgrades and node versions diff --git a/vms/avm/network/atomic.go b/vms/avm/network/atomic.go index 0774ed36603..395f09fb8e2 100644 --- a/vms/avm/network/atomic.go +++ b/vms/avm/network/atomic.go @@ -30,53 +30,6 @@ func NewAtomic(h common.AppHandler) Atomic { return a } -func (a *atomic) CrossChainAppRequest( - ctx context.Context, - chainID ids.ID, - requestID uint32, - deadline time.Time, - msg []byte, -) error { - h := a.handler.Get() - return h.CrossChainAppRequest( - ctx, - chainID, - requestID, - deadline, - msg, - ) -} - -func (a *atomic) CrossChainAppRequestFailed( - ctx context.Context, - chainID ids.ID, - requestID uint32, - appErr *common.AppError, -) error { - h := a.handler.Get() - return h.CrossChainAppRequestFailed( - ctx, - chainID, - requestID, - appErr, - ) -} - -func (a *atomic) CrossChainAppResponse( - ctx context.Context, - chainID ids.ID, - requestID uint32, - msg []byte, -) error { - h := a.handler.Get() - return h.CrossChainAppResponse( - ctx, - chainID, - requestID, - msg, - ) -} - func (a *atomic) AppRequest( ctx context.Context, nodeID ids.NodeID, diff --git a/vms/rpcchainvm/vm_client.go b/vms/rpcchainvm/vm_client.go index c820f63ce4b..22763b0f52a 100644 --- a/vms/rpcchainvm/vm_client.go +++ b/vms/rpcchainvm/vm_client.go @@ -499,43 +499,6 @@ func (vm *VMClient) Version(ctx context.Context) (string, error) { return resp.Version, nil } -func (vm *VMClient) CrossChainAppRequest(ctx context.Context, chainID ids.ID, requestID uint32, deadline time.Time, request []byte) error { - _, err := vm.client.CrossChainAppRequest( - ctx, - &vmpb.CrossChainAppRequestMsg{ - ChainId: chainID[:], - RequestId: requestID, - Deadline: grpcutils.TimestampFromTime(deadline), - Request: request, - }, - ) - return err -} - -func (vm *VMClient) CrossChainAppRequestFailed(ctx context.Context, chainID ids.ID, requestID uint32, appErr *common.AppError) error { - msg := &vmpb.CrossChainAppRequestFailedMsg{ - ChainId: chainID[:], - RequestId: requestID, - ErrorCode: appErr.Code, - ErrorMessage: appErr.Message, - } - - _, err := vm.client.CrossChainAppRequestFailed(ctx, msg) - return err -} - -func (vm *VMClient) CrossChainAppResponse(ctx context.Context, chainID ids.ID, requestID uint32, response []byte) error { - _, err := vm.client.CrossChainAppResponse( - ctx, - &vmpb.CrossChainAppResponseMsg{ - ChainId: chainID[:], - RequestId: requestID, - Response: response, - }, - ) - return err -} - func (vm *VMClient) AppRequest(ctx context.Context, nodeID ids.NodeID, requestID uint32, deadline time.Time, request []byte) error { _, err := vm.client.AppRequest( ctx, diff --git a/vms/rpcchainvm/vm_server.go b/vms/rpcchainvm/vm_server.go index 577aa95b9d0..bc1fd4418fb 100644 --- a/vms/rpcchainvm/vm_server.go +++ b/vms/rpcchainvm/vm_server.go @@ -509,39 +509,6 @@ func (vm *VMServer) Version(ctx context.Context, _ *emptypb.Empty) (*vmpb.Versio }, err } -func (vm *VMServer) CrossChainAppRequest(ctx context.Context, msg *vmpb.CrossChainAppRequestMsg) (*emptypb.Empty, error) { - chainID, err := ids.ToID(msg.ChainId) - if err != nil { - return nil, err - } - deadline, err := grpcutils.TimestampAsTime(msg.Deadline) - if err != nil { - return nil, err - } - return &emptypb.Empty{}, vm.vm.CrossChainAppRequest(ctx, chainID, msg.RequestId, deadline, msg.Request) -} - -func (vm *VMServer) CrossChainAppRequestFailed(ctx context.Context, msg *vmpb.CrossChainAppRequestFailedMsg) (*emptypb.Empty, error) { - chainID, err := ids.ToID(msg.ChainId) - if err != nil { - return nil, err - } - - appErr := &common.AppError{ - Code: msg.ErrorCode, - Message: msg.ErrorMessage, - } - return &emptypb.Empty{}, vm.vm.CrossChainAppRequestFailed(ctx, chainID, msg.RequestId, appErr) -} - -func (vm *VMServer) CrossChainAppResponse(ctx context.Context, msg *vmpb.CrossChainAppResponseMsg) (*emptypb.Empty, error) { - chainID, err := ids.ToID(msg.ChainId) - if err != nil { - return nil, err - } - return &emptypb.Empty{}, vm.vm.CrossChainAppResponse(ctx, chainID, msg.RequestId, msg.Response) -} - func (vm *VMServer) AppRequest(ctx context.Context, req *vmpb.AppRequestMsg) (*emptypb.Empty, error) { nodeID, err := ids.ToNodeID(req.NodeId) if err != nil { From 602771d243f713adfc577eea8a5aa7b06675c80d Mon Sep 17 00:00:00 2001 From: Darioush Jalali Date: Wed, 7 Aug 2024 09:35:00 -0700 Subject: [PATCH 02/23] bump coreth past upgrade schedule refactor --- go.mod | 6 ++-- go.sum | 4 +++ version/constants.go | 75 -------------------------------------------- 3 files changed, 7 insertions(+), 78 deletions(-) diff --git a/go.mod b/go.mod index f440ad419e1..26310f6aeba 100644 --- a/go.mod +++ b/go.mod @@ -10,7 +10,7 @@ require ( github.com/DataDog/zstd v1.5.2 github.com/NYTimes/gziphandler v1.1.1 github.com/antithesishq/antithesis-sdk-go v0.3.8 - github.com/ava-labs/coreth v0.13.8-0.20240802110637-b3e5088d062d + github.com/ava-labs/coreth v0.13.8-0.20240807162845-015611b6e6e5 github.com/ava-labs/ledger-avalanche/go v0.0.0-20240610153809-9c955cc90a95 github.com/btcsuite/btcd/btcutil v1.1.3 github.com/cockroachdb/pebble v0.0.0-20230928194634-aa077af62593 @@ -34,7 +34,7 @@ require ( github.com/nbutton23/zxcvbn-go v0.0.0-20180912185939-ae427f1e4c1d github.com/onsi/ginkgo/v2 v2.13.1 github.com/pires/go-proxyproto v0.6.2 - github.com/prometheus/client_golang v1.14.0 + github.com/prometheus/client_golang v1.16.0 github.com/prometheus/client_model v0.3.0 github.com/prometheus/common v0.42.0 github.com/rs/cors v1.7.0 @@ -156,7 +156,7 @@ require ( github.com/zondax/ledger-go v0.14.3 // indirect go.opentelemetry.io/otel/metric v1.22.0 // indirect go.opentelemetry.io/proto/otlp v1.0.0 // indirect - go.uber.org/multierr v1.10.0 // indirect + go.uber.org/multierr v1.11.0 // indirect golang.org/x/sys v0.18.0 // indirect golang.org/x/text v0.14.0 // indirect golang.org/x/tools v0.17.0 // indirect diff --git a/go.sum b/go.sum index 4f50be7c1b7..d19a97c5c82 100644 --- a/go.sum +++ b/go.sum @@ -64,6 +64,8 @@ github.com/antithesishq/antithesis-sdk-go v0.3.8/go.mod h1:IUpT2DPAKh6i/YhSbt6Gl github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/ava-labs/coreth v0.13.8-0.20240802110637-b3e5088d062d h1:klPTcKVvqfA2KSKaRvQAO56Pd4XAqGhwgMTQ6/W+w7w= github.com/ava-labs/coreth v0.13.8-0.20240802110637-b3e5088d062d/go.mod h1:tXDujonxXFOF6oK5HS2EmgtSXJK3Gy6RpZxb5WzR9rM= +github.com/ava-labs/coreth v0.13.8-0.20240807162845-015611b6e6e5 h1:gS7mgN4o9QPwlSZnHqv+KzPSh3jmXmhkcOtE3WYiFc0= +github.com/ava-labs/coreth v0.13.8-0.20240807162845-015611b6e6e5/go.mod h1:Ouul9dJouniUIJVX1gDqx8CrHyGvmwZkK28mrgKb/4I= github.com/ava-labs/ledger-avalanche/go v0.0.0-20240610153809-9c955cc90a95 h1:dOVbtdnZL++pENdTCNZ1nu41eYDQkTML4sWebDnnq8c= github.com/ava-labs/ledger-avalanche/go v0.0.0-20240610153809-9c955cc90a95/go.mod h1:pJxaT9bUgeRNVmNRgtCHb7sFDIRKy7CzTQVi8gGNT6g= github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible/go.mod h1:osfaiScAUVup+UC9Nfq76eWqDhXlp+4UYaA8uhTBO6g= @@ -500,6 +502,7 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_golang v1.14.0 h1:nJdhIvne2eSX/XRAFV9PcvFFRbrjbcTUj0VP62TMhnw= github.com/prometheus/client_golang v1.14.0/go.mod h1:8vpkKitgIVNcqrRBWh1C4TIUQgYNtG/XQE4E/Zae36Y= +github.com/prometheus/client_golang v1.16.0/go.mod h1:Zsulrv/L9oM40tJ7T815tM89lFEugiJ9HzIqaAx4LKc= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.3.0 h1:UBgGFHqYdG/TPFD1B1ogZywDqEkwp3fBMvqdiQ7Xew4= github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= @@ -646,6 +649,7 @@ go.uber.org/mock v0.4.0 h1:VcM4ZOtdbR4f6VXfiOpwpVJDL6lCReaZ6mw31wqh7KU= go.uber.org/mock v0.4.0/go.mod h1:a6FSlNadKUHUa9IP5Vyt1zh4fC7uAwxMutEAscFbkZc= go.uber.org/multierr v1.10.0 h1:S0h4aNzvfcFsC3dRF1jLoaov7oRaKqRGC/pUEJ2yvPQ= go.uber.org/multierr v1.10.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= +go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo= go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= golang.org/x/crypto v0.0.0-20170613210332-850760c427c5/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= diff --git a/version/constants.go b/version/constants.go index 3742f7ffe61..a2ef3ced40c 100644 --- a/version/constants.go +++ b/version/constants.go @@ -8,9 +8,6 @@ import ( "time" _ "embed" - - "github.com/ava-labs/avalanchego/upgrade" - "github.com/ava-labs/avalanchego/utils/constants" ) const ( @@ -67,78 +64,6 @@ var ( // set of avalanchego versions that supported that version. This is not used // by avalanchego, but is useful for downstream libraries. RPCChainVMProtocolCompatibility map[uint][]*Semantic - - // Deprecated: This will be removed once coreth no longer uses it. - ApricotPhase1Times = map[uint32]time.Time{ - constants.MainnetID: upgrade.Mainnet.ApricotPhase1Time, - constants.FujiID: upgrade.Fuji.ApricotPhase1Time, - } - - // Deprecated: This will be removed once coreth no longer uses it. - ApricotPhase2Times = map[uint32]time.Time{ - constants.MainnetID: upgrade.Mainnet.ApricotPhase2Time, - constants.FujiID: upgrade.Fuji.ApricotPhase2Time, - } - - // Deprecated: This will be removed once coreth no longer uses it. - ApricotPhase3Times = map[uint32]time.Time{ - constants.MainnetID: upgrade.Mainnet.ApricotPhase3Time, - constants.FujiID: upgrade.Fuji.ApricotPhase3Time, - } - - // Deprecated: This will be removed once coreth no longer uses it. - ApricotPhase4Times = map[uint32]time.Time{ - constants.MainnetID: upgrade.Mainnet.ApricotPhase4Time, - constants.FujiID: upgrade.Fuji.ApricotPhase4Time, - } - - // Deprecated: This will be removed once coreth no longer uses it. - ApricotPhase5Times = map[uint32]time.Time{ - constants.MainnetID: upgrade.Mainnet.ApricotPhase5Time, - constants.FujiID: upgrade.Fuji.ApricotPhase5Time, - } - - // Deprecated: This will be removed once coreth no longer uses it. - ApricotPhasePre6Times = map[uint32]time.Time{ - constants.MainnetID: upgrade.Mainnet.ApricotPhasePre6Time, - constants.FujiID: upgrade.Fuji.ApricotPhasePre6Time, - } - - // Deprecated: This will be removed once coreth no longer uses it. - ApricotPhase6Times = map[uint32]time.Time{ - constants.MainnetID: upgrade.Mainnet.ApricotPhase6Time, - constants.FujiID: upgrade.Fuji.ApricotPhase6Time, - } - - // Deprecated: This will be removed once coreth no longer uses it. - ApricotPhasePost6Times = map[uint32]time.Time{ - constants.MainnetID: upgrade.Mainnet.ApricotPhasePost6Time, - constants.FujiID: upgrade.Fuji.ApricotPhasePost6Time, - } - - // Deprecated: This will be removed once coreth no longer uses it. - BanffTimes = map[uint32]time.Time{ - constants.MainnetID: upgrade.Mainnet.BanffTime, - constants.FujiID: upgrade.Fuji.BanffTime, - } - - // Deprecated: This will be removed once coreth no longer uses it. - CortinaTimes = map[uint32]time.Time{ - constants.MainnetID: upgrade.Mainnet.CortinaTime, - constants.FujiID: upgrade.Fuji.CortinaTime, - } - - // Deprecated: This will be removed once coreth no longer uses it. - DurangoTimes = map[uint32]time.Time{ - constants.MainnetID: upgrade.Mainnet.DurangoTime, - constants.FujiID: upgrade.Fuji.DurangoTime, - } - - // Deprecated: This will be removed once coreth no longer uses it. - EUpgradeTimes = map[uint32]time.Time{ - constants.MainnetID: upgrade.Mainnet.EtnaTime, - constants.FujiID: upgrade.Fuji.EtnaTime, - } ) func init() { From 2635b2d239d65765b370cb894b2a16a9ce9a78cc Mon Sep 17 00:00:00 2001 From: Darioush Jalali Date: Wed, 7 Aug 2024 09:36:47 -0700 Subject: [PATCH 03/23] go mod tidy --- go.sum | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/go.sum b/go.sum index d19a97c5c82..67566bc8999 100644 --- a/go.sum +++ b/go.sum @@ -62,8 +62,6 @@ github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax github.com/antithesishq/antithesis-sdk-go v0.3.8 h1:OvGoHxIcOXFJLyn9IJQ5DzByZ3YVAWNBc394ObzDRb8= github.com/antithesishq/antithesis-sdk-go v0.3.8/go.mod h1:IUpT2DPAKh6i/YhSbt6Gl3v2yvUZjmKncl7U91fup7E= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= -github.com/ava-labs/coreth v0.13.8-0.20240802110637-b3e5088d062d h1:klPTcKVvqfA2KSKaRvQAO56Pd4XAqGhwgMTQ6/W+w7w= -github.com/ava-labs/coreth v0.13.8-0.20240802110637-b3e5088d062d/go.mod h1:tXDujonxXFOF6oK5HS2EmgtSXJK3Gy6RpZxb5WzR9rM= github.com/ava-labs/coreth v0.13.8-0.20240807162845-015611b6e6e5 h1:gS7mgN4o9QPwlSZnHqv+KzPSh3jmXmhkcOtE3WYiFc0= github.com/ava-labs/coreth v0.13.8-0.20240807162845-015611b6e6e5/go.mod h1:Ouul9dJouniUIJVX1gDqx8CrHyGvmwZkK28mrgKb/4I= github.com/ava-labs/ledger-avalanche/go v0.0.0-20240610153809-9c955cc90a95 h1:dOVbtdnZL++pENdTCNZ1nu41eYDQkTML4sWebDnnq8c= @@ -500,8 +498,7 @@ github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qR github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_golang v1.14.0 h1:nJdhIvne2eSX/XRAFV9PcvFFRbrjbcTUj0VP62TMhnw= -github.com/prometheus/client_golang v1.14.0/go.mod h1:8vpkKitgIVNcqrRBWh1C4TIUQgYNtG/XQE4E/Zae36Y= +github.com/prometheus/client_golang v1.16.0 h1:yk/hx9hDbrGHovbci4BY+pRMfSuuat626eFsHb7tmT8= github.com/prometheus/client_golang v1.16.0/go.mod h1:Zsulrv/L9oM40tJ7T815tM89lFEugiJ9HzIqaAx4LKc= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.3.0 h1:UBgGFHqYdG/TPFD1B1ogZywDqEkwp3fBMvqdiQ7Xew4= @@ -647,8 +644,7 @@ go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= go.uber.org/mock v0.4.0 h1:VcM4ZOtdbR4f6VXfiOpwpVJDL6lCReaZ6mw31wqh7KU= go.uber.org/mock v0.4.0/go.mod h1:a6FSlNadKUHUa9IP5Vyt1zh4fC7uAwxMutEAscFbkZc= -go.uber.org/multierr v1.10.0 h1:S0h4aNzvfcFsC3dRF1jLoaov7oRaKqRGC/pUEJ2yvPQ= -go.uber.org/multierr v1.10.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= +go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/zap v1.26.0 h1:sI7k6L95XOKS281NhVKOFCUNIvv9e0w4BF8N3u+tCRo= go.uber.org/zap v1.26.0/go.mod h1:dtElttAiwGvoJ/vj4IwHBS/gXsEu/pZ50mUIRWuG0so= From c9a9ffbb7e744f40890760c18ff5d920c239deda Mon Sep 17 00:00:00 2001 From: Darioush Jalali Date: Wed, 7 Aug 2024 12:25:28 -0700 Subject: [PATCH 04/23] delay activating Etna in upgrade test --- tests/upgrade/upgrade_test.go | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/tests/upgrade/upgrade_test.go b/tests/upgrade/upgrade_test.go index 32c76fd6dd0..937cf0c4ca9 100644 --- a/tests/upgrade/upgrade_test.go +++ b/tests/upgrade/upgrade_test.go @@ -4,6 +4,7 @@ package upgrade import ( + "encoding/json" "flag" "fmt" "testing" @@ -13,6 +14,8 @@ import ( "github.com/ava-labs/avalanchego/tests/fixture/e2e" "github.com/ava-labs/avalanchego/tests/fixture/tmpnet" + "github.com/ava-labs/avalanchego/upgrade" + "github.com/ava-labs/coreth/core" ) func TestUpgrade(t *testing.T) { @@ -45,6 +48,21 @@ var _ = ginkgo.Describe("[Upgrade]", func() { ginkgo.It("can upgrade versions", func() { network := tmpnet.NewDefaultNetwork("avalanchego-upgrade") + + { + // Etna enables Cancun which modifies the outcome of the C-Chain genesis + // This is because of new header fields that modify the genesis block hash. + // This code can be removed once the Etna upgrade is activated. + cChainGenesis := new(core.Genesis) + cChainGenesisStr := network.Genesis.CChainGenesis + require.NoError(json.Unmarshal([]byte(cChainGenesisStr), cChainGenesis)) + unscheduledActivationTime := uint64(upgrade.UnscheduledActivationTime.Unix()) + cChainGenesis.Config.EUpgradeTime = &unscheduledActivationTime + cChainGenesisBytes, err := json.Marshal(cChainGenesis) + require.NoError(err) + network.Genesis.CChainGenesis = string(cChainGenesisBytes) + } + e2e.StartNetwork(tc, network, avalancheGoExecPath, "" /* pluginDir */, 0 /* shutdownDelay */, false /* reuseNetwork */) tc.By(fmt.Sprintf("restarting all nodes with %q binary", avalancheGoExecPathToUpgradeTo)) From fdbdf16fe9e2eb0d5ef3a17df03aa11725a42b48 Mon Sep 17 00:00:00 2001 From: Darioush Jalali Date: Wed, 7 Aug 2024 12:42:10 -0700 Subject: [PATCH 05/23] expose DefaultGenesis --- tests/fixture/tmpnet/network.go | 28 ++++++++++++++++------------ tests/upgrade/upgrade_test.go | 4 ++++ 2 files changed, 20 insertions(+), 12 deletions(-) diff --git a/tests/fixture/tmpnet/network.go b/tests/fixture/tmpnet/network.go index 695017c0620..5230d2f22f0 100644 --- a/tests/fixture/tmpnet/network.go +++ b/tests/fixture/tmpnet/network.go @@ -295,18 +295,7 @@ func (n *Network) Create(rootDir string) error { } if n.NetworkID == 0 && n.Genesis == nil { - // Pre-fund known legacy keys to support ad-hoc testing. Usage of a legacy key will - // require knowing the key beforehand rather than retrieving it from the set of pre-funded - // keys exposed by a network. Since allocation will not be exclusive, a test using a - // legacy key is unlikely to be a good candidate for parallel execution. - keysToFund := []*secp256k1.PrivateKey{ - genesis.VMRQKey, - genesis.EWOQKey, - HardhatKey, - } - keysToFund = append(keysToFund, n.PreFundedKeys...) - - genesis, err := NewTestGenesis(defaultNetworkID, n.Nodes, keysToFund) + genesis, err := n.DefaultGenesis() if err != nil { return err } @@ -325,6 +314,21 @@ func (n *Network) Create(rootDir string) error { return n.Write() } +func (n *Network) DefaultGenesis() (*genesis.UnparsedConfig, error) { + // Pre-fund known legacy keys to support ad-hoc testing. Usage of a legacy key will + // require knowing the key beforehand rather than retrieving it from the set of pre-funded + // keys exposed by a network. Since allocation will not be exclusive, a test using a + // legacy key is unlikely to be a good candidate for parallel execution. + keysToFund := []*secp256k1.PrivateKey{ + genesis.VMRQKey, + genesis.EWOQKey, + HardhatKey, + } + keysToFund = append(keysToFund, n.PreFundedKeys...) + + return NewTestGenesis(defaultNetworkID, n.Nodes, keysToFund) +} + // Starts the specified nodes func (n *Network) StartNodes(ctx context.Context, w io.Writer, nodesToStart ...*Node) error { if len(nodesToStart) == 0 { diff --git a/tests/upgrade/upgrade_test.go b/tests/upgrade/upgrade_test.go index 937cf0c4ca9..85b99def143 100644 --- a/tests/upgrade/upgrade_test.go +++ b/tests/upgrade/upgrade_test.go @@ -50,6 +50,10 @@ var _ = ginkgo.Describe("[Upgrade]", func() { network := tmpnet.NewDefaultNetwork("avalanchego-upgrade") { + // Get the default genesis so we can modify it + genesis, err := network.DefaultGenesis() + require.NoError(err) + network.Genesis = genesis // Etna enables Cancun which modifies the outcome of the C-Chain genesis // This is because of new header fields that modify the genesis block hash. // This code can be removed once the Etna upgrade is activated. From 9b7f5f01eef914a573cd372ae53d0d1f9a8e687c Mon Sep 17 00:00:00 2001 From: Darioush Jalali Date: Wed, 7 Aug 2024 13:03:10 -0700 Subject: [PATCH 06/23] try nil --- tests/upgrade/upgrade_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/upgrade/upgrade_test.go b/tests/upgrade/upgrade_test.go index 85b99def143..e4e3e574fee 100644 --- a/tests/upgrade/upgrade_test.go +++ b/tests/upgrade/upgrade_test.go @@ -14,7 +14,6 @@ import ( "github.com/ava-labs/avalanchego/tests/fixture/e2e" "github.com/ava-labs/avalanchego/tests/fixture/tmpnet" - "github.com/ava-labs/avalanchego/upgrade" "github.com/ava-labs/coreth/core" ) @@ -60,11 +59,12 @@ var _ = ginkgo.Describe("[Upgrade]", func() { cChainGenesis := new(core.Genesis) cChainGenesisStr := network.Genesis.CChainGenesis require.NoError(json.Unmarshal([]byte(cChainGenesisStr), cChainGenesis)) - unscheduledActivationTime := uint64(upgrade.UnscheduledActivationTime.Unix()) - cChainGenesis.Config.EUpgradeTime = &unscheduledActivationTime + // unscheduledActivationTime := uint64(upgrade.UnscheduledActivationTime.Unix()) + cChainGenesis.Config.EUpgradeTime = nil // &unscheduledActivationTime cChainGenesisBytes, err := json.Marshal(cChainGenesis) require.NoError(err) network.Genesis.CChainGenesis = string(cChainGenesisBytes) + require.NoError(network.Write()) } e2e.StartNetwork(tc, network, avalancheGoExecPath, "" /* pluginDir */, 0 /* shutdownDelay */, false /* reuseNetwork */) From f87e2da956d4b3ed46fa2ce39b2bc8955e3f8e39 Mon Sep 17 00:00:00 2001 From: Darioush Jalali Date: Wed, 7 Aug 2024 14:33:20 -0700 Subject: [PATCH 07/23] fixes --- go.mod | 2 +- go.sum | 4 ++-- tests/fixture/tmpnet/genesis.go | 4 +++- tests/upgrade/upgrade_test.go | 7 ++++--- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/go.mod b/go.mod index 26310f6aeba..197ba60878b 100644 --- a/go.mod +++ b/go.mod @@ -10,7 +10,7 @@ require ( github.com/DataDog/zstd v1.5.2 github.com/NYTimes/gziphandler v1.1.1 github.com/antithesishq/antithesis-sdk-go v0.3.8 - github.com/ava-labs/coreth v0.13.8-0.20240807162845-015611b6e6e5 + github.com/ava-labs/coreth v0.13.8-0.20240807212152-f7acfafec094 github.com/ava-labs/ledger-avalanche/go v0.0.0-20240610153809-9c955cc90a95 github.com/btcsuite/btcd/btcutil v1.1.3 github.com/cockroachdb/pebble v0.0.0-20230928194634-aa077af62593 diff --git a/go.sum b/go.sum index 67566bc8999..de529da2191 100644 --- a/go.sum +++ b/go.sum @@ -62,8 +62,8 @@ github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax github.com/antithesishq/antithesis-sdk-go v0.3.8 h1:OvGoHxIcOXFJLyn9IJQ5DzByZ3YVAWNBc394ObzDRb8= github.com/antithesishq/antithesis-sdk-go v0.3.8/go.mod h1:IUpT2DPAKh6i/YhSbt6Gl3v2yvUZjmKncl7U91fup7E= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= -github.com/ava-labs/coreth v0.13.8-0.20240807162845-015611b6e6e5 h1:gS7mgN4o9QPwlSZnHqv+KzPSh3jmXmhkcOtE3WYiFc0= -github.com/ava-labs/coreth v0.13.8-0.20240807162845-015611b6e6e5/go.mod h1:Ouul9dJouniUIJVX1gDqx8CrHyGvmwZkK28mrgKb/4I= +github.com/ava-labs/coreth v0.13.8-0.20240807212152-f7acfafec094 h1:e7TvIKDGzsMsKU3Y4HreRcK7f16EcEPUO04UwSCFtng= +github.com/ava-labs/coreth v0.13.8-0.20240807212152-f7acfafec094/go.mod h1:Ouul9dJouniUIJVX1gDqx8CrHyGvmwZkK28mrgKb/4I= github.com/ava-labs/ledger-avalanche/go v0.0.0-20240610153809-9c955cc90a95 h1:dOVbtdnZL++pENdTCNZ1nu41eYDQkTML4sWebDnnq8c= github.com/ava-labs/ledger-avalanche/go v0.0.0-20240610153809-9c955cc90a95/go.mod h1:pJxaT9bUgeRNVmNRgtCHb7sFDIRKy7CzTQVi8gGNT6g= github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible/go.mod h1:osfaiScAUVup+UC9Nfq76eWqDhXlp+4UYaA8uhTBO6g= diff --git a/tests/fixture/tmpnet/genesis.go b/tests/fixture/tmpnet/genesis.go index a9c85fe8b44..aa308be6ee7 100644 --- a/tests/fixture/tmpnet/genesis.go +++ b/tests/fixture/tmpnet/genesis.go @@ -16,6 +16,7 @@ import ( "github.com/ava-labs/avalanchego/genesis" "github.com/ava-labs/avalanchego/ids" + "github.com/ava-labs/avalanchego/upgrade" "github.com/ava-labs/avalanchego/utils/constants" "github.com/ava-labs/avalanchego/utils/crypto/secp256k1" "github.com/ava-labs/avalanchego/utils/formatting/address" @@ -149,7 +150,8 @@ func NewTestGenesis( // Define C-Chain genesis cChainGenesis := &core.Genesis{ Config: params.AvalancheLocalChainConfig, - Difficulty: big.NewInt(0), // Difficulty is a mandatory field + Difficulty: big.NewInt(0), // Difficulty is a mandatory field + Timestamp: uint64(upgrade.InitiallyActiveTime.Unix()), // This time enables Avalanche upgrades by default GasLimit: defaultGasLimit, Alloc: cChainBalances, } diff --git a/tests/upgrade/upgrade_test.go b/tests/upgrade/upgrade_test.go index e4e3e574fee..1c1bec5559c 100644 --- a/tests/upgrade/upgrade_test.go +++ b/tests/upgrade/upgrade_test.go @@ -14,6 +14,8 @@ import ( "github.com/ava-labs/avalanchego/tests/fixture/e2e" "github.com/ava-labs/avalanchego/tests/fixture/tmpnet" + "github.com/ava-labs/avalanchego/upgrade" + "github.com/ava-labs/coreth/core" ) @@ -59,12 +61,11 @@ var _ = ginkgo.Describe("[Upgrade]", func() { cChainGenesis := new(core.Genesis) cChainGenesisStr := network.Genesis.CChainGenesis require.NoError(json.Unmarshal([]byte(cChainGenesisStr), cChainGenesis)) - // unscheduledActivationTime := uint64(upgrade.UnscheduledActivationTime.Unix()) - cChainGenesis.Config.EUpgradeTime = nil // &unscheduledActivationTime + unscheduledActivationTime := uint64(upgrade.UnscheduledActivationTime.Unix()) + cChainGenesis.Config.EUpgradeTime = &unscheduledActivationTime cChainGenesisBytes, err := json.Marshal(cChainGenesis) require.NoError(err) network.Genesis.CChainGenesis = string(cChainGenesisBytes) - require.NoError(network.Write()) } e2e.StartNetwork(tc, network, avalancheGoExecPath, "" /* pluginDir */, 0 /* shutdownDelay */, false /* reuseNetwork */) From 376688b4912bf1b3c988167cfabf4ebedc27dc16 Mon Sep 17 00:00:00 2001 From: Darioush Jalali Date: Wed, 7 Aug 2024 14:44:27 -0700 Subject: [PATCH 08/23] lint --- tests/upgrade/upgrade_test.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/upgrade/upgrade_test.go b/tests/upgrade/upgrade_test.go index 1c1bec5559c..374af3385f8 100644 --- a/tests/upgrade/upgrade_test.go +++ b/tests/upgrade/upgrade_test.go @@ -9,14 +9,13 @@ import ( "fmt" "testing" + "github.com/ava-labs/coreth/core" "github.com/onsi/ginkgo/v2" "github.com/stretchr/testify/require" "github.com/ava-labs/avalanchego/tests/fixture/e2e" "github.com/ava-labs/avalanchego/tests/fixture/tmpnet" "github.com/ava-labs/avalanchego/upgrade" - - "github.com/ava-labs/coreth/core" ) func TestUpgrade(t *testing.T) { From d058ae84c96face1653b2128e5e3a71b7f85b47a Mon Sep 17 00:00:00 2001 From: Darioush Jalali Date: Thu, 8 Aug 2024 08:17:38 -0700 Subject: [PATCH 09/23] bump coreth to tag on master --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 197ba60878b..ba0a3379f54 100644 --- a/go.mod +++ b/go.mod @@ -10,7 +10,7 @@ require ( github.com/DataDog/zstd v1.5.2 github.com/NYTimes/gziphandler v1.1.1 github.com/antithesishq/antithesis-sdk-go v0.3.8 - github.com/ava-labs/coreth v0.13.8-0.20240807212152-f7acfafec094 + github.com/ava-labs/coreth v0.13.7-fixed-genesis-upgrade github.com/ava-labs/ledger-avalanche/go v0.0.0-20240610153809-9c955cc90a95 github.com/btcsuite/btcd/btcutil v1.1.3 github.com/cockroachdb/pebble v0.0.0-20230928194634-aa077af62593 diff --git a/go.sum b/go.sum index de529da2191..a7143e0c893 100644 --- a/go.sum +++ b/go.sum @@ -62,8 +62,8 @@ github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax github.com/antithesishq/antithesis-sdk-go v0.3.8 h1:OvGoHxIcOXFJLyn9IJQ5DzByZ3YVAWNBc394ObzDRb8= github.com/antithesishq/antithesis-sdk-go v0.3.8/go.mod h1:IUpT2DPAKh6i/YhSbt6Gl3v2yvUZjmKncl7U91fup7E= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= -github.com/ava-labs/coreth v0.13.8-0.20240807212152-f7acfafec094 h1:e7TvIKDGzsMsKU3Y4HreRcK7f16EcEPUO04UwSCFtng= -github.com/ava-labs/coreth v0.13.8-0.20240807212152-f7acfafec094/go.mod h1:Ouul9dJouniUIJVX1gDqx8CrHyGvmwZkK28mrgKb/4I= +github.com/ava-labs/coreth v0.13.7-fixed-genesis-upgrade h1:shO1Mf/OJ6IHo8ddezgX+8024M2QWawCixCaCLXjpqY= +github.com/ava-labs/coreth v0.13.7-fixed-genesis-upgrade/go.mod h1:cm5c12xo5NiTgtbmeduv8i2nYdzgkczz9Wm3yiwwTRU= github.com/ava-labs/ledger-avalanche/go v0.0.0-20240610153809-9c955cc90a95 h1:dOVbtdnZL++pENdTCNZ1nu41eYDQkTML4sWebDnnq8c= github.com/ava-labs/ledger-avalanche/go v0.0.0-20240610153809-9c955cc90a95/go.mod h1:pJxaT9bUgeRNVmNRgtCHb7sFDIRKy7CzTQVi8gGNT6g= github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible/go.mod h1:osfaiScAUVup+UC9Nfq76eWqDhXlp+4UYaA8uhTBO6g= From ddd1adc3ed0ac6015b71d7a7235fe97fa1b458d6 Mon Sep 17 00:00:00 2001 From: Darioush Jalali Date: Thu, 8 Aug 2024 08:23:18 -0700 Subject: [PATCH 10/23] use tag with 0.13.8 version --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index ba0a3379f54..d32038a431f 100644 --- a/go.mod +++ b/go.mod @@ -10,7 +10,7 @@ require ( github.com/DataDog/zstd v1.5.2 github.com/NYTimes/gziphandler v1.1.1 github.com/antithesishq/antithesis-sdk-go v0.3.8 - github.com/ava-labs/coreth v0.13.7-fixed-genesis-upgrade + github.com/ava-labs/coreth v0.13.8-fixed-genesis-upgrade github.com/ava-labs/ledger-avalanche/go v0.0.0-20240610153809-9c955cc90a95 github.com/btcsuite/btcd/btcutil v1.1.3 github.com/cockroachdb/pebble v0.0.0-20230928194634-aa077af62593 diff --git a/go.sum b/go.sum index a7143e0c893..1c432ad35b3 100644 --- a/go.sum +++ b/go.sum @@ -62,8 +62,8 @@ github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax github.com/antithesishq/antithesis-sdk-go v0.3.8 h1:OvGoHxIcOXFJLyn9IJQ5DzByZ3YVAWNBc394ObzDRb8= github.com/antithesishq/antithesis-sdk-go v0.3.8/go.mod h1:IUpT2DPAKh6i/YhSbt6Gl3v2yvUZjmKncl7U91fup7E= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= -github.com/ava-labs/coreth v0.13.7-fixed-genesis-upgrade h1:shO1Mf/OJ6IHo8ddezgX+8024M2QWawCixCaCLXjpqY= -github.com/ava-labs/coreth v0.13.7-fixed-genesis-upgrade/go.mod h1:cm5c12xo5NiTgtbmeduv8i2nYdzgkczz9Wm3yiwwTRU= +github.com/ava-labs/coreth v0.13.8-fixed-genesis-upgrade h1:HYR7GSyVypZIhtl9t3Vqo5fiR+yThNWNH3O9sehdBDQ= +github.com/ava-labs/coreth v0.13.8-fixed-genesis-upgrade/go.mod h1:cm5c12xo5NiTgtbmeduv8i2nYdzgkczz9Wm3yiwwTRU= github.com/ava-labs/ledger-avalanche/go v0.0.0-20240610153809-9c955cc90a95 h1:dOVbtdnZL++pENdTCNZ1nu41eYDQkTML4sWebDnnq8c= github.com/ava-labs/ledger-avalanche/go v0.0.0-20240610153809-9c955cc90a95/go.mod h1:pJxaT9bUgeRNVmNRgtCHb7sFDIRKy7CzTQVi8gGNT6g= github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible/go.mod h1:osfaiScAUVup+UC9Nfq76eWqDhXlp+4UYaA8uhTBO6g= From 486b7d3f710460d9f736fdc76872f0115966a451 Mon Sep 17 00:00:00 2001 From: Darioush Jalali Date: Thu, 8 Aug 2024 08:31:00 -0700 Subject: [PATCH 11/23] fix tag --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index d32038a431f..bc1e96772e8 100644 --- a/go.mod +++ b/go.mod @@ -10,7 +10,7 @@ require ( github.com/DataDog/zstd v1.5.2 github.com/NYTimes/gziphandler v1.1.1 github.com/antithesishq/antithesis-sdk-go v0.3.8 - github.com/ava-labs/coreth v0.13.8-fixed-genesis-upgrade + github.com/ava-labs/coreth v0.13.8-fix-genesis-upgrade github.com/ava-labs/ledger-avalanche/go v0.0.0-20240610153809-9c955cc90a95 github.com/btcsuite/btcd/btcutil v1.1.3 github.com/cockroachdb/pebble v0.0.0-20230928194634-aa077af62593 diff --git a/go.sum b/go.sum index 1c432ad35b3..1f06a819fe3 100644 --- a/go.sum +++ b/go.sum @@ -62,8 +62,8 @@ github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax github.com/antithesishq/antithesis-sdk-go v0.3.8 h1:OvGoHxIcOXFJLyn9IJQ5DzByZ3YVAWNBc394ObzDRb8= github.com/antithesishq/antithesis-sdk-go v0.3.8/go.mod h1:IUpT2DPAKh6i/YhSbt6Gl3v2yvUZjmKncl7U91fup7E= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= -github.com/ava-labs/coreth v0.13.8-fixed-genesis-upgrade h1:HYR7GSyVypZIhtl9t3Vqo5fiR+yThNWNH3O9sehdBDQ= -github.com/ava-labs/coreth v0.13.8-fixed-genesis-upgrade/go.mod h1:cm5c12xo5NiTgtbmeduv8i2nYdzgkczz9Wm3yiwwTRU= +github.com/ava-labs/coreth v0.13.8-fix-genesis-upgrade h1:xWsvSGtZcGna3B2BLU2BvK3qskbcc9ZNtgC0ck91CkI= +github.com/ava-labs/coreth v0.13.8-fix-genesis-upgrade/go.mod h1:Ouul9dJouniUIJVX1gDqx8CrHyGvmwZkK28mrgKb/4I= github.com/ava-labs/ledger-avalanche/go v0.0.0-20240610153809-9c955cc90a95 h1:dOVbtdnZL++pENdTCNZ1nu41eYDQkTML4sWebDnnq8c= github.com/ava-labs/ledger-avalanche/go v0.0.0-20240610153809-9c955cc90a95/go.mod h1:pJxaT9bUgeRNVmNRgtCHb7sFDIRKy7CzTQVi8gGNT6g= github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible/go.mod h1:osfaiScAUVup+UC9Nfq76eWqDhXlp+4UYaA8uhTBO6g= From 9d0af83595c1f06356dc0b02b0ae851207207bda Mon Sep 17 00:00:00 2001 From: Darioush Jalali Date: Thu, 8 Aug 2024 09:13:00 -0700 Subject: [PATCH 12/23] bump coreth --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index bc1e96772e8..74bd825a985 100644 --- a/go.mod +++ b/go.mod @@ -10,7 +10,7 @@ require ( github.com/DataDog/zstd v1.5.2 github.com/NYTimes/gziphandler v1.1.1 github.com/antithesishq/antithesis-sdk-go v0.3.8 - github.com/ava-labs/coreth v0.13.8-fix-genesis-upgrade + github.com/ava-labs/coreth v0.13.8-fixed-genesis-upgrade.0.20240808160839-82b63707d309 github.com/ava-labs/ledger-avalanche/go v0.0.0-20240610153809-9c955cc90a95 github.com/btcsuite/btcd/btcutil v1.1.3 github.com/cockroachdb/pebble v0.0.0-20230928194634-aa077af62593 diff --git a/go.sum b/go.sum index 1f06a819fe3..26a4fe1d562 100644 --- a/go.sum +++ b/go.sum @@ -62,8 +62,8 @@ github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax github.com/antithesishq/antithesis-sdk-go v0.3.8 h1:OvGoHxIcOXFJLyn9IJQ5DzByZ3YVAWNBc394ObzDRb8= github.com/antithesishq/antithesis-sdk-go v0.3.8/go.mod h1:IUpT2DPAKh6i/YhSbt6Gl3v2yvUZjmKncl7U91fup7E= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= -github.com/ava-labs/coreth v0.13.8-fix-genesis-upgrade h1:xWsvSGtZcGna3B2BLU2BvK3qskbcc9ZNtgC0ck91CkI= -github.com/ava-labs/coreth v0.13.8-fix-genesis-upgrade/go.mod h1:Ouul9dJouniUIJVX1gDqx8CrHyGvmwZkK28mrgKb/4I= +github.com/ava-labs/coreth v0.13.8-fixed-genesis-upgrade.0.20240808160839-82b63707d309 h1:+FKQUlP39qAVRGm/5a3gfYnh5Gunbxm4by2ssi7BbIA= +github.com/ava-labs/coreth v0.13.8-fixed-genesis-upgrade.0.20240808160839-82b63707d309/go.mod h1:z0JE84/uawhLD6pJ37f4Chopw5OsGWa10PV+a27z1tI= github.com/ava-labs/ledger-avalanche/go v0.0.0-20240610153809-9c955cc90a95 h1:dOVbtdnZL++pENdTCNZ1nu41eYDQkTML4sWebDnnq8c= github.com/ava-labs/ledger-avalanche/go v0.0.0-20240610153809-9c955cc90a95/go.mod h1:pJxaT9bUgeRNVmNRgtCHb7sFDIRKy7CzTQVi8gGNT6g= github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible/go.mod h1:osfaiScAUVup+UC9Nfq76eWqDhXlp+4UYaA8uhTBO6g= From bd65b84182eaee0fac46b71241e152718c04331b Mon Sep 17 00:00:00 2001 From: Darioush Jalali Date: Thu, 8 Aug 2024 09:25:46 -0700 Subject: [PATCH 13/23] bump version and add compatibility --- version/compatibility.json | 3 +++ version/constants.go | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/version/compatibility.json b/version/compatibility.json index dba18fd7858..d9be9f2d095 100644 --- a/version/compatibility.json +++ b/version/compatibility.json @@ -1,4 +1,7 @@ { + "37": [ + "v1.11.11" + ], "36": [ "v1.11.10" ], diff --git a/version/constants.go b/version/constants.go index a18d2f13c44..c337c965d46 100644 --- a/version/constants.go +++ b/version/constants.go @@ -40,7 +40,7 @@ var ( PrevMinimumCompatibleVersion = &Application{ Name: Client, Major: 1, - Minor: 10, + Minor: 11, Patch: 0, } From ed3c192ca4659e4fd0d596ddad2725cb4a82d5d4 Mon Sep 17 00:00:00 2001 From: Darioush Jalali Date: Thu, 8 Aug 2024 09:35:50 -0700 Subject: [PATCH 14/23] fix --- version/constants.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/version/constants.go b/version/constants.go index c337c965d46..032aad71581 100644 --- a/version/constants.go +++ b/version/constants.go @@ -23,7 +23,7 @@ var ( Current = &Semantic{ Major: 1, Minor: 11, - Patch: 10, + Patch: 11, } CurrentApp = &Application{ Name: Client, @@ -40,7 +40,7 @@ var ( PrevMinimumCompatibleVersion = &Application{ Name: Client, Major: 1, - Minor: 11, + Minor: 10, Patch: 0, } From 6ac21aed96e0184e03e2dcb5fa48d1c020460a00 Mon Sep 17 00:00:00 2001 From: Darioush Jalali Date: Tue, 13 Aug 2024 12:15:13 -0700 Subject: [PATCH 15/23] remove identical interfaces --- chains/linearizable_vm.go | 4 ++-- network/p2p/client.go | 2 +- network/p2p/handler.go | 2 +- network/p2p/network.go | 10 +++++----- network/p2p/router.go | 6 +++--- snow/engine/avalanche/bootstrap/bootstrapper.go | 4 ++-- snow/engine/avalanche/engine.go | 4 ++-- snow/engine/avalanche/vertex/mock_vm.go | 2 +- snow/engine/common/appsender/appsender_client.go | 2 +- snow/engine/common/appsender/appsender_server.go | 4 ++-- snow/engine/common/no_ops_handlers.go | 4 ++-- snow/engine/common/vm.go | 4 ++-- snow/engine/enginetest/sender.go | 4 ++-- snow/engine/enginetest/vm.go | 4 ++-- snow/engine/snowman/block/mock_chain_vm.go | 2 +- snow/engine/snowman/bootstrap/bootstrapper.go | 4 ++-- snow/engine/snowman/engine.go | 4 ++-- snow/engine/snowman/engine_test.go | 6 +++--- snow/engine/snowman/syncer/state_syncer.go | 4 ++-- vms/avm/network/atomic.go | 10 +++++----- vms/avm/network/network.go | 8 ++++---- vms/avm/network/network_test.go | 12 ++++++------ vms/avm/vm.go | 4 ++-- vms/example/xsvm/vm.go | 6 +++--- vms/metervm/block_vm.go | 2 +- vms/metervm/vertex_vm.go | 2 +- vms/platformvm/network/network.go | 4 ++-- vms/platformvm/network/network_test.go | 14 +++++++------- vms/platformvm/vm.go | 2 +- vms/proposervm/batched_vm_test.go | 2 +- vms/proposervm/post_fork_option_test.go | 2 +- vms/proposervm/state_syncable_vm_test.go | 2 +- vms/proposervm/vm.go | 2 +- vms/proposervm/vm_test.go | 12 ++++++------ vms/rpcchainvm/vm_client.go | 2 +- vms/tracedvm/block_vm.go | 2 +- vms/tracedvm/vertex_vm.go | 2 +- x/sync/network_client.go | 4 ++-- x/sync/network_server.go | 4 ++-- 39 files changed, 87 insertions(+), 87 deletions(-) diff --git a/chains/linearizable_vm.go b/chains/linearizable_vm.go index e7e99b77cb9..6a4bee592e4 100644 --- a/chains/linearizable_vm.go +++ b/chains/linearizable_vm.go @@ -35,7 +35,7 @@ type initializeOnLinearizeVM struct { configBytes []byte toEngine chan<- common.Message fxs []*common.Fx - appSender common.AppSender + appSender common.NetworkAppSender } func (vm *initializeOnLinearizeVM) Linearize(ctx context.Context, stopVertexID ids.ID) error { @@ -76,7 +76,7 @@ func (vm *linearizeOnInitializeVM) Initialize( _ []byte, toEngine chan<- common.Message, _ []*common.Fx, - _ common.AppSender, + _ common.NetworkAppSender, ) error { return vm.Linearize(ctx, vm.stopVertexID, toEngine) } diff --git a/network/p2p/client.go b/network/p2p/client.go index 2e5013a211f..8130855e945 100644 --- a/network/p2p/client.go +++ b/network/p2p/client.go @@ -36,7 +36,7 @@ type Client struct { handlerIDStr string handlerPrefix []byte router *router - sender common.AppSender + sender common.NetworkAppSender options *clientOptions } diff --git a/network/p2p/handler.go b/network/p2p/handler.go index 23819cd1846..6849098682f 100644 --- a/network/p2p/handler.go +++ b/network/p2p/handler.go @@ -101,7 +101,7 @@ type responder struct { Handler handlerID uint64 log logging.Logger - sender common.AppSender + sender common.NetworkAppSender } // AppRequest calls the underlying handler and sends back the response to nodeID diff --git a/network/p2p/network.go b/network/p2p/network.go index fff077645d9..42b7b49f37e 100644 --- a/network/p2p/network.go +++ b/network/p2p/network.go @@ -22,9 +22,9 @@ import ( ) var ( - _ validators.Connector = (*Network)(nil) - _ common.AppHandler = (*Network)(nil) - _ NodeSampler = (*peerSampler)(nil) + _ validators.Connector = (*Network)(nil) + _ common.NetworkAppHandler = (*Network)(nil) + _ NodeSampler = (*peerSampler)(nil) opLabel = "op" handlerLabel = "handlerID" @@ -58,7 +58,7 @@ type clientOptions struct { // NewNetwork returns an instance of Network func NewNetwork( log logging.Logger, - sender common.AppSender, + sender common.NetworkAppSender, registerer prometheus.Registerer, namespace string, ) (*Network, error) { @@ -103,7 +103,7 @@ type Network struct { Peers *Peers log logging.Logger - sender common.AppSender + sender common.NetworkAppSender router *router } diff --git a/network/p2p/router.go b/network/p2p/router.go index 9c020ab4935..6ef93773fcc 100644 --- a/network/p2p/router.go +++ b/network/p2p/router.go @@ -25,7 +25,7 @@ var ( ErrExistingAppProtocol = errors.New("existing app protocol") ErrUnrequestedResponse = errors.New("unrequested response") - _ common.AppHandler = (*router)(nil) + _ common.NetworkAppHandler = (*router)(nil) ) type pendingAppRequest struct { @@ -65,7 +65,7 @@ func (m *metrics) observe(labels prometheus.Labels, start time.Time) error { // corresponding Client. type router struct { log logging.Logger - sender common.AppSender + sender common.NetworkAppSender metrics metrics lock sync.RWMutex @@ -77,7 +77,7 @@ type router struct { // newRouter returns a new instance of Router func newRouter( log logging.Logger, - sender common.AppSender, + sender common.NetworkAppSender, metrics metrics, ) *router { return &router{ diff --git a/snow/engine/avalanche/bootstrap/bootstrapper.go b/snow/engine/avalanche/bootstrap/bootstrapper.go index 00f9ab64a45..3af60d526c2 100644 --- a/snow/engine/avalanche/bootstrap/bootstrapper.go +++ b/snow/engine/avalanche/bootstrap/bootstrapper.go @@ -60,7 +60,7 @@ func New( PutHandler: common.NewNoOpPutHandler(config.Ctx.Log), QueryHandler: common.NewNoOpQueryHandler(config.Ctx.Log), ChitsHandler: common.NewNoOpChitsHandler(config.Ctx.Log), - AppHandler: config.VM, + NetworkAppHandler: config.VM, outstandingRequests: bimap.New[common.Request, ids.ID](), outstandingRequestTimes: make(map[common.Request]time.Time), @@ -85,7 +85,7 @@ type bootstrapper struct { common.PutHandler common.QueryHandler common.ChitsHandler - common.AppHandler + common.NetworkAppHandler metrics diff --git a/snow/engine/avalanche/engine.go b/snow/engine/avalanche/engine.go index 530a319e0fc..873fbbe38f0 100644 --- a/snow/engine/avalanche/engine.go +++ b/snow/engine/avalanche/engine.go @@ -29,7 +29,7 @@ type engine struct { common.PutHandler common.QueryHandler common.ChitsHandler - common.AppHandler + common.NetworkAppHandler common.InternalHandler ctx *snow.ConsensusContext @@ -51,7 +51,7 @@ func New( PutHandler: common.NewNoOpPutHandler(ctx.Log), QueryHandler: common.NewNoOpQueryHandler(ctx.Log), ChitsHandler: common.NewNoOpChitsHandler(ctx.Log), - AppHandler: common.NewNoOpAppHandler(ctx.Log), + NetworkAppHandler: common.NewNoOpAppHandler(ctx.Log), InternalHandler: common.NewNoOpInternalHandler(ctx.Log), ctx: ctx, vm: vm, diff --git a/snow/engine/avalanche/vertex/mock_vm.go b/snow/engine/avalanche/vertex/mock_vm.go index 9687aa884e7..ae3e90e160d 100644 --- a/snow/engine/avalanche/vertex/mock_vm.go +++ b/snow/engine/avalanche/vertex/mock_vm.go @@ -208,7 +208,7 @@ func (mr *MockLinearizableVMMockRecorder) HealthCheck(arg0 any) *gomock.Call { } // Initialize mocks base method. -func (m *MockLinearizableVM) Initialize(arg0 context.Context, arg1 *snow.Context, arg2 database.Database, arg3, arg4, arg5 []byte, arg6 chan<- common.Message, arg7 []*common.Fx, arg8 common.AppSender) error { +func (m *MockLinearizableVM) Initialize(arg0 context.Context, arg1 *snow.Context, arg2 database.Database, arg3, arg4, arg5 []byte, arg6 chan<- common.Message, arg7 []*common.Fx, arg8 common.NetworkAppSender) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Initialize", arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8) ret0, _ := ret[0].(error) diff --git a/snow/engine/common/appsender/appsender_client.go b/snow/engine/common/appsender/appsender_client.go index 4477034f17c..b6a3b13f971 100644 --- a/snow/engine/common/appsender/appsender_client.go +++ b/snow/engine/common/appsender/appsender_client.go @@ -13,7 +13,7 @@ import ( appsenderpb "github.com/ava-labs/avalanchego/proto/pb/appsender" ) -var _ common.AppSender = (*Client)(nil) +var _ common.NetworkAppSender = (*Client)(nil) type Client struct { client appsenderpb.AppSenderClient diff --git a/snow/engine/common/appsender/appsender_server.go b/snow/engine/common/appsender/appsender_server.go index 73092d3e086..f030a401aa6 100644 --- a/snow/engine/common/appsender/appsender_server.go +++ b/snow/engine/common/appsender/appsender_server.go @@ -19,11 +19,11 @@ var _ appsenderpb.AppSenderServer = (*Server)(nil) type Server struct { appsenderpb.UnsafeAppSenderServer - appSender common.AppSender + appSender common.NetworkAppSender } // NewServer returns a messenger connected to a remote channel -func NewServer(appSender common.AppSender) *Server { +func NewServer(appSender common.NetworkAppSender) *Server { return &Server{appSender: appSender} } diff --git a/snow/engine/common/no_ops_handlers.go b/snow/engine/common/no_ops_handlers.go index 0b2247ab3cd..6c48d8c83dd 100644 --- a/snow/engine/common/no_ops_handlers.go +++ b/snow/engine/common/no_ops_handlers.go @@ -25,7 +25,7 @@ var ( _ PutHandler = (*noOpPutHandler)(nil) _ QueryHandler = (*noOpQueryHandler)(nil) _ ChitsHandler = (*noOpChitsHandler)(nil) - _ AppHandler = (*noOpAppHandler)(nil) + _ NetworkAppHandler = (*noOpAppHandler)(nil) _ InternalHandler = (*noOpInternalHandler)(nil) ) @@ -264,7 +264,7 @@ type noOpAppHandler struct { log logging.Logger } -func NewNoOpAppHandler(log logging.Logger) AppHandler { +func NewNoOpAppHandler(log logging.Logger) NetworkAppHandler { return &noOpAppHandler{log: log} } diff --git a/snow/engine/common/vm.go b/snow/engine/common/vm.go index 65cbfb15865..106d5dc5946 100644 --- a/snow/engine/common/vm.go +++ b/snow/engine/common/vm.go @@ -15,7 +15,7 @@ import ( // VM describes the interface that all consensus VMs must implement type VM interface { - AppHandler + NetworkAppHandler // Returns nil if the VM is healthy. // Periodically called and reported via the node's Health API. @@ -53,7 +53,7 @@ type VM interface { configBytes []byte, toEngine chan<- Message, fxs []*Fx, - appSender AppSender, + appSender NetworkAppSender, ) error // SetState communicates to VM its next state it starts diff --git a/snow/engine/enginetest/sender.go b/snow/engine/enginetest/sender.go index 5bc7f100c05..8d6188e44f7 100644 --- a/snow/engine/enginetest/sender.go +++ b/snow/engine/enginetest/sender.go @@ -16,8 +16,8 @@ import ( ) var ( - _ common.Sender = (*Sender)(nil) - _ common.AppSender = (*SenderStub)(nil) + _ common.Sender = (*Sender)(nil) + _ common.NetworkAppSender = (*SenderStub)(nil) errSendAppRequest = errors.New("unexpectedly called SendAppRequest") errSendAppResponse = errors.New("unexpectedly called SendAppResponse") diff --git a/snow/engine/enginetest/vm.go b/snow/engine/enginetest/vm.go index f3c430e5840..96d7efd0dda 100644 --- a/snow/engine/enginetest/vm.go +++ b/snow/engine/enginetest/vm.go @@ -45,7 +45,7 @@ type VM struct { CantHealthCheck, CantConnected, CantDisconnected, CantVersion, CantAppRequest, CantAppResponse, CantAppGossip, CantAppRequestFailed bool - InitializeF func(ctx context.Context, chainCtx *snow.Context, db database.Database, genesisBytes []byte, upgradeBytes []byte, configBytes []byte, msgChan chan<- common.Message, fxs []*common.Fx, appSender common.AppSender) error + InitializeF func(ctx context.Context, chainCtx *snow.Context, db database.Database, genesisBytes []byte, upgradeBytes []byte, configBytes []byte, msgChan chan<- common.Message, fxs []*common.Fx, appSender common.NetworkAppSender) error SetStateF func(ctx context.Context, state snow.State) error ShutdownF func(context.Context) error CreateHandlersF func(context.Context) (map[string]http.Handler, error) @@ -83,7 +83,7 @@ func (vm *VM) Initialize( configBytes []byte, msgChan chan<- common.Message, fxs []*common.Fx, - appSender common.AppSender, + appSender common.NetworkAppSender, ) error { if vm.InitializeF != nil { return vm.InitializeF( diff --git a/snow/engine/snowman/block/mock_chain_vm.go b/snow/engine/snowman/block/mock_chain_vm.go index 4e7d7d7387f..1fb27c77d82 100644 --- a/snow/engine/snowman/block/mock_chain_vm.go +++ b/snow/engine/snowman/block/mock_chain_vm.go @@ -207,7 +207,7 @@ func (mr *MockChainVMMockRecorder) HealthCheck(arg0 any) *gomock.Call { } // Initialize mocks base method. -func (m *MockChainVM) Initialize(arg0 context.Context, arg1 *snow.Context, arg2 database.Database, arg3, arg4, arg5 []byte, arg6 chan<- common.Message, arg7 []*common.Fx, arg8 common.AppSender) error { +func (m *MockChainVM) Initialize(arg0 context.Context, arg1 *snow.Context, arg2 database.Database, arg3, arg4, arg5 []byte, arg6 chan<- common.Message, arg7 []*common.Fx, arg8 common.NetworkAppSender) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Initialize", arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8) ret0, _ := ret[0].(error) diff --git a/snow/engine/snowman/bootstrap/bootstrapper.go b/snow/engine/snowman/bootstrap/bootstrapper.go index 966bdcf67d1..b95e4764d24 100644 --- a/snow/engine/snowman/bootstrap/bootstrapper.go +++ b/snow/engine/snowman/bootstrap/bootstrapper.go @@ -77,7 +77,7 @@ type Bootstrapper struct { common.PutHandler common.QueryHandler common.ChitsHandler - common.AppHandler + common.NetworkAppHandler requestID uint32 // Tracks the last requestID that was used in a request @@ -128,7 +128,7 @@ func New(config Config, onFinished func(ctx context.Context, lastReqID uint32) e PutHandler: common.NewNoOpPutHandler(config.Ctx.Log), QueryHandler: common.NewNoOpQueryHandler(config.Ctx.Log), ChitsHandler: common.NewNoOpChitsHandler(config.Ctx.Log), - AppHandler: config.VM, + NetworkAppHandler: config.VM, minority: bootstrapper.Noop, majority: bootstrapper.Noop, diff --git a/snow/engine/snowman/engine.go b/snow/engine/snowman/engine.go index 1b2cfb5c11d..a0d033a0d36 100644 --- a/snow/engine/snowman/engine.go +++ b/snow/engine/snowman/engine.go @@ -51,7 +51,7 @@ type Engine struct { common.AcceptedFrontierHandler common.AcceptedHandler common.AncestorsHandler - common.AppHandler + common.NetworkAppHandler validators.Connector requestID uint32 @@ -137,7 +137,7 @@ func New(config Config) (*Engine, error) { AcceptedFrontierHandler: common.NewNoOpAcceptedFrontierHandler(config.Ctx.Log), AcceptedHandler: common.NewNoOpAcceptedHandler(config.Ctx.Log), AncestorsHandler: common.NewNoOpAncestorsHandler(config.Ctx.Log), - AppHandler: config.VM, + NetworkAppHandler: config.VM, Connector: config.VM, pending: make(map[ids.ID]snowman.Block), unverifiedIDToAncestor: ancestor.NewTree(), diff --git a/snow/engine/snowman/engine_test.go b/snow/engine/snowman/engine_test.go index 2619dcc727b..68d38f358e5 100644 --- a/snow/engine/snowman/engine_test.go +++ b/snow/engine/snowman/engine_test.go @@ -2414,7 +2414,7 @@ func TestEngineVoteStallRegression(t *testing.T) { []byte, chan<- common.Message, []*common.Fx, - common.AppSender, + common.NetworkAppSender, ) error { return nil }, @@ -2632,7 +2632,7 @@ func TestEngineEarlyTerminateVoterRegression(t *testing.T) { []byte, chan<- common.Message, []*common.Fx, - common.AppSender, + common.NetworkAppSender, ) error { return nil }, @@ -2782,7 +2782,7 @@ func TestEngineRegistersInvalidVoterDependencyRegression(t *testing.T) { []byte, chan<- common.Message, []*common.Fx, - common.AppSender, + common.NetworkAppSender, ) error { return nil }, diff --git a/snow/engine/snowman/syncer/state_syncer.go b/snow/engine/snowman/syncer/state_syncer.go index 2fea946f310..94aec01cc81 100644 --- a/snow/engine/snowman/syncer/state_syncer.go +++ b/snow/engine/snowman/syncer/state_syncer.go @@ -46,7 +46,7 @@ type stateSyncer struct { common.PutHandler common.QueryHandler common.ChitsHandler - common.AppHandler + common.NetworkAppHandler started bool @@ -103,7 +103,7 @@ func New( PutHandler: common.NewNoOpPutHandler(cfg.Ctx.Log), QueryHandler: common.NewNoOpQueryHandler(cfg.Ctx.Log), ChitsHandler: common.NewNoOpChitsHandler(cfg.Ctx.Log), - AppHandler: cfg.VM, + NetworkAppHandler: cfg.VM, stateSyncVM: ssVM, onDoneStateSyncing: onDoneStateSyncing, } diff --git a/vms/avm/network/atomic.go b/vms/avm/network/atomic.go index 395f09fb8e2..4304813e28e 100644 --- a/vms/avm/network/atomic.go +++ b/vms/avm/network/atomic.go @@ -15,16 +15,16 @@ import ( var _ Atomic = (*atomic)(nil) type Atomic interface { - common.AppHandler + common.NetworkAppHandler - Set(common.AppHandler) + Set(common.NetworkAppHandler) } type atomic struct { - handler utils.Atomic[common.AppHandler] + handler utils.Atomic[common.NetworkAppHandler] } -func NewAtomic(h common.AppHandler) Atomic { +func NewAtomic(h common.NetworkAppHandler) Atomic { a := &atomic{} a.handler.Set(h) return a @@ -90,6 +90,6 @@ func (a *atomic) AppGossip( ) } -func (a *atomic) Set(h common.AppHandler) { +func (a *atomic) Set(h common.NetworkAppHandler) { a.handler.Set(h) } diff --git a/vms/avm/network/network.go b/vms/avm/network/network.go index 15d3dc79d15..d8d02cd0065 100644 --- a/vms/avm/network/network.go +++ b/vms/avm/network/network.go @@ -20,8 +20,8 @@ import ( ) var ( - _ common.AppHandler = (*Network)(nil) - _ validators.Connector = (*Network)(nil) + _ common.NetworkAppHandler = (*Network)(nil) + _ validators.Connector = (*Network)(nil) ) type Network struct { @@ -30,7 +30,7 @@ type Network struct { log logging.Logger parser txs.Parser mempool *gossipMempool - appSender common.AppSender + appSender common.NetworkAppSender txPushGossiper *gossip.PushGossiper[*txs.Tx] txPushGossipFrequency time.Duration @@ -46,7 +46,7 @@ func New( parser txs.Parser, txVerifier TxVerifier, mempool mempool.Mempool, - appSender common.AppSender, + appSender common.NetworkAppSender, registerer prometheus.Registerer, config Config, ) (*Network, error) { diff --git a/vms/avm/network/network_test.go b/vms/avm/network/network_test.go index 4d9b68f71f2..7d165ef75b5 100644 --- a/vms/avm/network/network_test.go +++ b/vms/avm/network/network_test.go @@ -57,7 +57,7 @@ func TestNetworkIssueTxFromRPC(t *testing.T) { name string mempoolFunc func(*gomock.Controller) xmempool.Mempool txVerifierFunc func(*gomock.Controller) TxVerifier - appSenderFunc func(*gomock.Controller) common.AppSender + appSenderFunc func(*gomock.Controller) common.NetworkAppSender expectedErr error } @@ -131,7 +131,7 @@ func TestNetworkIssueTxFromRPC(t *testing.T) { txVerifier.EXPECT().VerifyTx(gomock.Any()).Return(nil) return txVerifier }, - appSenderFunc: func(ctrl *gomock.Controller) common.AppSender { + appSenderFunc: func(ctrl *gomock.Controller) common.NetworkAppSender { appSender := common.NewMockSender(ctrl) appSender.EXPECT().SendAppGossip(gomock.Any(), gomock.Any(), gomock.Any()).Return(nil) return appSender @@ -168,7 +168,7 @@ func TestNetworkIssueTxFromRPC(t *testing.T) { txVerifierFunc = tt.txVerifierFunc } - appSenderFunc := func(ctrl *gomock.Controller) common.AppSender { + appSenderFunc := func(ctrl *gomock.Controller) common.NetworkAppSender { return common.NewMockSender(ctrl) } if tt.appSenderFunc != nil { @@ -207,7 +207,7 @@ func TestNetworkIssueTxFromRPCWithoutVerification(t *testing.T) { type test struct { name string mempoolFunc func(*gomock.Controller) xmempool.Mempool - appSenderFunc func(*gomock.Controller) common.AppSender + appSenderFunc func(*gomock.Controller) common.NetworkAppSender expectedErr error } @@ -232,7 +232,7 @@ func TestNetworkIssueTxFromRPCWithoutVerification(t *testing.T) { mempool.EXPECT().RequestBuildBlock() return mempool }, - appSenderFunc: func(ctrl *gomock.Controller) common.AppSender { + appSenderFunc: func(ctrl *gomock.Controller) common.NetworkAppSender { appSender := common.NewMockSender(ctrl) appSender.EXPECT().SendAppGossip(gomock.Any(), gomock.Any(), gomock.Any()).Return(nil) return appSender @@ -262,7 +262,7 @@ func TestNetworkIssueTxFromRPCWithoutVerification(t *testing.T) { mempoolFunc = tt.mempoolFunc } - appSenderFunc := func(ctrl *gomock.Controller) common.AppSender { + appSenderFunc := func(ctrl *gomock.Controller) common.NetworkAppSender { return common.NewMockSender(ctrl) } if tt.appSenderFunc != nil { diff --git a/vms/avm/vm.go b/vms/avm/vm.go index c9170ba882f..3970bea20a6 100644 --- a/vms/avm/vm.go +++ b/vms/avm/vm.go @@ -86,7 +86,7 @@ type VM struct { pubsub *pubsub.Server - appSender common.AppSender + appSender common.NetworkAppSender // State management state state.State @@ -160,7 +160,7 @@ func (vm *VM) Initialize( configBytes []byte, _ chan<- common.Message, fxs []*common.Fx, - appSender common.AppSender, + appSender common.NetworkAppSender, ) error { noopMessageHandler := common.NewNoOpAppHandler(ctx.Log) vm.Atomic = network.NewAtomic(noopMessageHandler) diff --git a/vms/example/xsvm/vm.go b/vms/example/xsvm/vm.go index 526fc47c499..485feb58081 100644 --- a/vms/example/xsvm/vm.go +++ b/vms/example/xsvm/vm.go @@ -37,7 +37,7 @@ var ( ) type VM struct { - common.AppHandler + common.NetworkAppHandler chainContext *snow.Context db database.Database @@ -57,9 +57,9 @@ func (vm *VM) Initialize( _ []byte, engineChan chan<- common.Message, _ []*common.Fx, - _ common.AppSender, + _ common.NetworkAppSender, ) error { - vm.AppHandler = common.NewNoOpAppHandler(chainContext.Log) + vm.NetworkAppHandler = common.NewNoOpAppHandler(chainContext.Log) chainContext.Log.Info("initializing xsvm", zap.Stringer("version", Version), diff --git a/vms/metervm/block_vm.go b/vms/metervm/block_vm.go index da64f9af01d..14d95a15121 100644 --- a/vms/metervm/block_vm.go +++ b/vms/metervm/block_vm.go @@ -60,7 +60,7 @@ func (vm *blockVM) Initialize( configBytes []byte, toEngine chan<- common.Message, fxs []*common.Fx, - appSender common.AppSender, + appSender common.NetworkAppSender, ) error { err := vm.blockMetrics.Initialize( vm.buildBlockVM != nil, diff --git a/vms/metervm/vertex_vm.go b/vms/metervm/vertex_vm.go index 936a688de99..0b7db088cf3 100644 --- a/vms/metervm/vertex_vm.go +++ b/vms/metervm/vertex_vm.go @@ -47,7 +47,7 @@ func (vm *vertexVM) Initialize( configBytes []byte, toEngine chan<- common.Message, fxs []*common.Fx, - appSender common.AppSender, + appSender common.NetworkAppSender, ) error { if err := vm.vertexMetrics.Initialize(vm.registry); err != nil { return err diff --git a/vms/platformvm/network/network.go b/vms/platformvm/network/network.go index c821c827251..5ed4c475242 100644 --- a/vms/platformvm/network/network.go +++ b/vms/platformvm/network/network.go @@ -30,7 +30,7 @@ type Network struct { txVerifier TxVerifier mempool *gossipMempool partialSyncPrimaryNetwork bool - appSender common.AppSender + appSender common.NetworkAppSender txPushGossiper *gossip.PushGossiper[*txs.Tx] txPushGossipFrequency time.Duration @@ -46,7 +46,7 @@ func New( txVerifier TxVerifier, mempool mempool.Mempool, partialSyncPrimaryNetwork bool, - appSender common.AppSender, + appSender common.NetworkAppSender, registerer prometheus.Registerer, config Config, ) (*Network, error) { diff --git a/vms/platformvm/network/network_test.go b/vms/platformvm/network/network_test.go index f19600461af..373bdbc73c2 100644 --- a/vms/platformvm/network/network_test.go +++ b/vms/platformvm/network/network_test.go @@ -63,7 +63,7 @@ func TestNetworkIssueTxFromRPC(t *testing.T) { mempoolFunc func(*gomock.Controller) pmempool.Mempool txVerifier testTxVerifier partialSyncPrimaryNetwork bool - appSenderFunc func(*gomock.Controller) common.AppSender + appSenderFunc func(*gomock.Controller) common.NetworkAppSender expectedErr error } @@ -75,7 +75,7 @@ func TestNetworkIssueTxFromRPC(t *testing.T) { mempool.EXPECT().Get(gomock.Any()).Return(tx, true) return mempool }, - appSenderFunc: func(ctrl *gomock.Controller) common.AppSender { + appSenderFunc: func(ctrl *gomock.Controller) common.NetworkAppSender { return common.NewMockSender(ctrl) }, expectedErr: mempool.ErrDuplicateTx, @@ -88,7 +88,7 @@ func TestNetworkIssueTxFromRPC(t *testing.T) { mempool.EXPECT().GetDropReason(gomock.Any()).Return(errTest) return mempool }, - appSenderFunc: func(ctrl *gomock.Controller) common.AppSender { + appSenderFunc: func(ctrl *gomock.Controller) common.NetworkAppSender { // Shouldn't gossip the tx return common.NewMockSender(ctrl) }, @@ -104,7 +104,7 @@ func TestNetworkIssueTxFromRPC(t *testing.T) { return mempool }, txVerifier: testTxVerifier{err: errTest}, - appSenderFunc: func(ctrl *gomock.Controller) common.AppSender { + appSenderFunc: func(ctrl *gomock.Controller) common.NetworkAppSender { // Shouldn't gossip the tx return common.NewMockSender(ctrl) }, @@ -120,7 +120,7 @@ func TestNetworkIssueTxFromRPC(t *testing.T) { mempool.EXPECT().MarkDropped(gomock.Any(), gomock.Any()) return mempool }, - appSenderFunc: func(ctrl *gomock.Controller) common.AppSender { + appSenderFunc: func(ctrl *gomock.Controller) common.NetworkAppSender { // Shouldn't gossip the tx return common.NewMockSender(ctrl) }, @@ -132,7 +132,7 @@ func TestNetworkIssueTxFromRPC(t *testing.T) { return pmempool.NewMockMempool(ctrl) }, partialSyncPrimaryNetwork: true, - appSenderFunc: func(ctrl *gomock.Controller) common.AppSender { + appSenderFunc: func(ctrl *gomock.Controller) common.NetworkAppSender { return common.NewMockSender(ctrl) }, expectedErr: errMempoolDisabledWithPartialSync, @@ -149,7 +149,7 @@ func TestNetworkIssueTxFromRPC(t *testing.T) { mempool.EXPECT().Get(gomock.Any()).Return(nil, true).Times(2) return mempool }, - appSenderFunc: func(ctrl *gomock.Controller) common.AppSender { + appSenderFunc: func(ctrl *gomock.Controller) common.NetworkAppSender { appSender := common.NewMockSender(ctrl) appSender.EXPECT().SendAppGossip(gomock.Any(), gomock.Any(), gomock.Any()).Return(nil) return appSender diff --git a/vms/platformvm/vm.go b/vms/platformvm/vm.go index d6b97a44127..19fc1e41cbb 100644 --- a/vms/platformvm/vm.go +++ b/vms/platformvm/vm.go @@ -102,7 +102,7 @@ func (vm *VM) Initialize( configBytes []byte, toEngine chan<- common.Message, _ []*common.Fx, - appSender common.AppSender, + appSender common.NetworkAppSender, ) error { chainCtx.Log.Verbo("initializing platform chain") diff --git a/vms/proposervm/batched_vm_test.go b/vms/proposervm/batched_vm_test.go index d8b50dc94e6..1c8afd5bda1 100644 --- a/vms/proposervm/batched_vm_test.go +++ b/vms/proposervm/batched_vm_test.go @@ -940,7 +940,7 @@ func initTestRemoteProposerVM( []byte, chan<- common.Message, []*common.Fx, - common.AppSender, + common.NetworkAppSender, ) error { return nil } diff --git a/vms/proposervm/post_fork_option_test.go b/vms/proposervm/post_fork_option_test.go index 3a76bc9faa0..51db4c0c24d 100644 --- a/vms/proposervm/post_fork_option_test.go +++ b/vms/proposervm/post_fork_option_test.go @@ -550,7 +550,7 @@ func TestOptionTimestampValidity(t *testing.T) { []byte, chan<- common.Message, []*common.Fx, - common.AppSender, + common.NetworkAppSender, ) error { return nil } diff --git a/vms/proposervm/state_syncable_vm_test.go b/vms/proposervm/state_syncable_vm_test.go index 1017c35d8a4..c9817918df3 100644 --- a/vms/proposervm/state_syncable_vm_test.go +++ b/vms/proposervm/state_syncable_vm_test.go @@ -46,7 +46,7 @@ func helperBuildStateSyncTestObjects(t *testing.T) (*fullVM, *VM) { // load innerVM expectations innerVM.InitializeF = func(context.Context, *snow.Context, database.Database, []byte, []byte, []byte, chan<- common.Message, - []*common.Fx, common.AppSender, + []*common.Fx, common.NetworkAppSender, ) error { return nil } diff --git a/vms/proposervm/vm.go b/vms/proposervm/vm.go index d0c21971c80..1ed914e65ce 100644 --- a/vms/proposervm/vm.go +++ b/vms/proposervm/vm.go @@ -134,7 +134,7 @@ func (vm *VM) Initialize( configBytes []byte, toEngine chan<- common.Message, fxs []*common.Fx, - appSender common.AppSender, + appSender common.NetworkAppSender, ) error { vm.ctx = chainCtx vm.db = versiondb.New(prefixdb.New(dbPrefix, db)) diff --git a/vms/proposervm/vm_test.go b/vms/proposervm/vm_test.go index e5d5f142281..84d0348a32f 100644 --- a/vms/proposervm/vm_test.go +++ b/vms/proposervm/vm_test.go @@ -102,7 +102,7 @@ func initTestProposerVM( coreVM.InitializeF = func(context.Context, *snow.Context, database.Database, []byte, []byte, []byte, chan<- common.Message, - []*common.Fx, common.AppSender, + []*common.Fx, common.NetworkAppSender, ) error { return nil } @@ -856,7 +856,7 @@ func TestExpiredBuildBlock(t *testing.T) { _ []byte, toEngineChan chan<- common.Message, _ []*common.Fx, - _ common.AppSender, + _ common.NetworkAppSender, ) error { toScheduler = toEngineChan return nil @@ -1093,7 +1093,7 @@ func TestInnerVMRollback(t *testing.T) { []byte, chan<- common.Message, []*common.Fx, - common.AppSender, + common.NetworkAppSender, ) error { return nil }, @@ -1573,7 +1573,7 @@ func TestRejectedHeightNotIndexed(t *testing.T) { coreVM.InitializeF = func(context.Context, *snow.Context, database.Database, []byte, []byte, []byte, chan<- common.Message, - []*common.Fx, common.AppSender, + []*common.Fx, common.NetworkAppSender, ) error { return nil } @@ -1746,7 +1746,7 @@ func TestRejectedOptionHeightNotIndexed(t *testing.T) { coreVM.InitializeF = func(context.Context, *snow.Context, database.Database, []byte, []byte, []byte, chan<- common.Message, - []*common.Fx, common.AppSender, + []*common.Fx, common.NetworkAppSender, ) error { return nil } @@ -2174,7 +2174,7 @@ func TestHistoricalBlockDeletion(t *testing.T) { coreVM := &blocktest.VM{ VM: enginetest.VM{ T: t, - InitializeF: func(context.Context, *snow.Context, database.Database, []byte, []byte, []byte, chan<- common.Message, []*common.Fx, common.AppSender) error { + InitializeF: func(context.Context, *snow.Context, database.Database, []byte, []byte, []byte, chan<- common.Message, []*common.Fx, common.NetworkAppSender) error { return nil }, }, diff --git a/vms/rpcchainvm/vm_client.go b/vms/rpcchainvm/vm_client.go index 22763b0f52a..b238396b437 100644 --- a/vms/rpcchainvm/vm_client.go +++ b/vms/rpcchainvm/vm_client.go @@ -131,7 +131,7 @@ func (vm *VMClient) Initialize( configBytes []byte, toEngine chan<- common.Message, fxs []*common.Fx, - appSender common.AppSender, + appSender common.NetworkAppSender, ) error { if len(fxs) != 0 { return errUnsupportedFXs diff --git a/vms/tracedvm/block_vm.go b/vms/tracedvm/block_vm.go index 13bb1a5d7b7..f078be3598b 100644 --- a/vms/tracedvm/block_vm.go +++ b/vms/tracedvm/block_vm.go @@ -103,7 +103,7 @@ func (vm *blockVM) Initialize( configBytes []byte, toEngine chan<- common.Message, fxs []*common.Fx, - appSender common.AppSender, + appSender common.NetworkAppSender, ) error { ctx, span := vm.tracer.Start(ctx, vm.initializeTag) defer span.End() diff --git a/vms/tracedvm/vertex_vm.go b/vms/tracedvm/vertex_vm.go index c4cf1998bb6..f3e3156f07d 100644 --- a/vms/tracedvm/vertex_vm.go +++ b/vms/tracedvm/vertex_vm.go @@ -41,7 +41,7 @@ func (vm *vertexVM) Initialize( configBytes []byte, toEngine chan<- common.Message, fxs []*common.Fx, - appSender common.AppSender, + appSender common.NetworkAppSender, ) error { ctx, span := vm.tracer.Start(ctx, "vertexVM.Initialize") defer span.End() diff --git a/x/sync/network_client.go b/x/sync/network_client.go index 18530d1c4e7..0046228d6ac 100644 --- a/x/sync/network_client.go +++ b/x/sync/network_client.go @@ -85,11 +85,11 @@ type networkClient struct { // tracking of peers & bandwidth usage peers *p2p.PeerTracker // For sending messages to peers - appSender common.AppSender + appSender common.NetworkAppSender } func NewNetworkClient( - appSender common.AppSender, + appSender common.NetworkAppSender, myNodeID ids.NodeID, maxActiveRequests int64, log logging.Logger, diff --git a/x/sync/network_server.go b/x/sync/network_server.go index f7ca7ec618b..3563223c529 100644 --- a/x/sync/network_server.go +++ b/x/sync/network_server.go @@ -53,12 +53,12 @@ var ( ) type NetworkServer struct { - appSender common.AppSender // Used to respond to peer requests via AppResponse. + appSender common.NetworkAppSender // Used to respond to peer requests via AppResponse. db DB log logging.Logger } -func NewNetworkServer(appSender common.AppSender, db DB, log logging.Logger) *NetworkServer { +func NewNetworkServer(appSender common.NetworkAppSender, db DB, log logging.Logger) *NetworkServer { return &NetworkServer{ appSender: appSender, db: db, From 827706417993e8dfac44f5afbea51085e3124a6e Mon Sep 17 00:00:00 2001 From: Darioush Jalali Date: Tue, 13 Aug 2024 12:16:01 -0700 Subject: [PATCH 16/23] revert rpc and version --- version/compatibility.json | 3 --- version/constants.go | 4 ++-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/version/compatibility.json b/version/compatibility.json index d9be9f2d095..dba18fd7858 100644 --- a/version/compatibility.json +++ b/version/compatibility.json @@ -1,7 +1,4 @@ { - "37": [ - "v1.11.11" - ], "36": [ "v1.11.10" ], diff --git a/version/constants.go b/version/constants.go index 032aad71581..a2ef3ced40c 100644 --- a/version/constants.go +++ b/version/constants.go @@ -15,7 +15,7 @@ const ( // RPCChainVMProtocol should be bumped anytime changes are made which // require the plugin vm to upgrade to latest avalanchego release to be // compatible. - RPCChainVMProtocol uint = 37 + RPCChainVMProtocol uint = 36 ) // These are globals that describe network upgrades and node versions @@ -23,7 +23,7 @@ var ( Current = &Semantic{ Major: 1, Minor: 11, - Patch: 11, + Patch: 10, } CurrentApp = &Application{ Name: Client, From c708c512f2a64596464d10fd20845f3375341c14 Mon Sep 17 00:00:00 2001 From: Darioush Jalali Date: Tue, 13 Aug 2024 12:28:40 -0700 Subject: [PATCH 17/23] bump coreth --- go.mod | 2 +- go.sum | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 74bd825a985..c6720d3b342 100644 --- a/go.mod +++ b/go.mod @@ -10,7 +10,7 @@ require ( github.com/DataDog/zstd v1.5.2 github.com/NYTimes/gziphandler v1.1.1 github.com/antithesishq/antithesis-sdk-go v0.3.8 - github.com/ava-labs/coreth v0.13.8-fixed-genesis-upgrade.0.20240808160839-82b63707d309 + github.com/ava-labs/coreth v0.13.8-fixed-genesis-upgrade.0.20240813192659-6958df88a24c github.com/ava-labs/ledger-avalanche/go v0.0.0-20240610153809-9c955cc90a95 github.com/btcsuite/btcd/btcutil v1.1.3 github.com/cockroachdb/pebble v0.0.0-20230928194634-aa077af62593 diff --git a/go.sum b/go.sum index 26a4fe1d562..f009d612f3e 100644 --- a/go.sum +++ b/go.sum @@ -64,6 +64,8 @@ github.com/antithesishq/antithesis-sdk-go v0.3.8/go.mod h1:IUpT2DPAKh6i/YhSbt6Gl github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/ava-labs/coreth v0.13.8-fixed-genesis-upgrade.0.20240808160839-82b63707d309 h1:+FKQUlP39qAVRGm/5a3gfYnh5Gunbxm4by2ssi7BbIA= github.com/ava-labs/coreth v0.13.8-fixed-genesis-upgrade.0.20240808160839-82b63707d309/go.mod h1:z0JE84/uawhLD6pJ37f4Chopw5OsGWa10PV+a27z1tI= +github.com/ava-labs/coreth v0.13.8-fixed-genesis-upgrade.0.20240813192659-6958df88a24c h1:Ovr+3MNjWwOcppqfczcnmebn6ibTSeANqlnVfptVr+g= +github.com/ava-labs/coreth v0.13.8-fixed-genesis-upgrade.0.20240813192659-6958df88a24c/go.mod h1:xpiR0U17XmLbsWG8u/z8ZlkWBase0hQerYcKM5A/wm8= github.com/ava-labs/ledger-avalanche/go v0.0.0-20240610153809-9c955cc90a95 h1:dOVbtdnZL++pENdTCNZ1nu41eYDQkTML4sWebDnnq8c= github.com/ava-labs/ledger-avalanche/go v0.0.0-20240610153809-9c955cc90a95/go.mod h1:pJxaT9bUgeRNVmNRgtCHb7sFDIRKy7CzTQVi8gGNT6g= github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible/go.mod h1:osfaiScAUVup+UC9Nfq76eWqDhXlp+4UYaA8uhTBO6g= From 74abf8605379fe94f9ebfd2e22f44dfecc905399 Mon Sep 17 00:00:00 2001 From: Darioush Jalali Date: Tue, 13 Aug 2024 12:30:26 -0700 Subject: [PATCH 18/23] remove iface --- snow/engine/common/sender.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/snow/engine/common/sender.go b/snow/engine/common/sender.go index 78ae02b1ae4..f415e6f45eb 100644 --- a/snow/engine/common/sender.go +++ b/snow/engine/common/sender.go @@ -191,9 +191,3 @@ type NetworkAppSender interface { appGossipBytes []byte, ) error } - -// AppSender sends application (VM) level messages. -// See also common.AppHandler. -type AppSender interface { - NetworkAppSender -} From 5a6cf57d3e5cd34bce527d1f5f5e9384453f6bbf Mon Sep 17 00:00:00 2001 From: Darioush Jalali Date: Tue, 13 Aug 2024 12:38:44 -0700 Subject: [PATCH 19/23] rename --- chains/linearizable_vm.go | 4 ++-- network/p2p/client.go | 2 +- network/p2p/handler.go | 2 +- network/p2p/network.go | 10 +++++----- network/p2p/router.go | 6 +++--- scripts/mocks.mockgen.source.txt | 2 +- snow/engine/avalanche/bootstrap/bootstrapper.go | 4 ++-- snow/engine/avalanche/engine.go | 4 ++-- snow/engine/avalanche/vertex/mock_vm.go | 2 +- snow/engine/common/appsender/appsender_client.go | 2 +- snow/engine/common/appsender/appsender_server.go | 4 ++-- snow/engine/common/mock_sender.go | 2 +- snow/engine/common/no_ops_handlers.go | 4 ++-- snow/engine/common/sender.go | 4 ++-- snow/engine/common/vm.go | 4 ++-- snow/engine/enginetest/sender.go | 4 ++-- snow/engine/enginetest/vm.go | 4 ++-- snow/engine/snowman/block/mock_chain_vm.go | 2 +- snow/engine/snowman/bootstrap/bootstrapper.go | 4 ++-- snow/engine/snowman/engine.go | 4 ++-- snow/engine/snowman/engine_test.go | 6 +++--- snow/engine/snowman/syncer/state_syncer.go | 4 ++-- vms/avm/network/atomic.go | 10 +++++----- vms/avm/network/network.go | 8 ++++---- vms/avm/network/network_test.go | 12 ++++++------ vms/avm/vm.go | 4 ++-- vms/example/xsvm/vm.go | 6 +++--- vms/metervm/block_vm.go | 2 +- vms/metervm/vertex_vm.go | 2 +- vms/platformvm/network/network.go | 4 ++-- vms/platformvm/network/network_test.go | 14 +++++++------- vms/platformvm/vm.go | 2 +- vms/proposervm/batched_vm_test.go | 2 +- vms/proposervm/post_fork_option_test.go | 2 +- vms/proposervm/state_syncable_vm_test.go | 2 +- vms/proposervm/vm.go | 2 +- vms/proposervm/vm_test.go | 12 ++++++------ vms/rpcchainvm/vm_client.go | 2 +- vms/tracedvm/block_vm.go | 2 +- vms/tracedvm/vertex_vm.go | 2 +- x/sync/network_client.go | 4 ++-- x/sync/network_server.go | 4 ++-- 42 files changed, 91 insertions(+), 91 deletions(-) diff --git a/chains/linearizable_vm.go b/chains/linearizable_vm.go index 6a4bee592e4..e7e99b77cb9 100644 --- a/chains/linearizable_vm.go +++ b/chains/linearizable_vm.go @@ -35,7 +35,7 @@ type initializeOnLinearizeVM struct { configBytes []byte toEngine chan<- common.Message fxs []*common.Fx - appSender common.NetworkAppSender + appSender common.AppSender } func (vm *initializeOnLinearizeVM) Linearize(ctx context.Context, stopVertexID ids.ID) error { @@ -76,7 +76,7 @@ func (vm *linearizeOnInitializeVM) Initialize( _ []byte, toEngine chan<- common.Message, _ []*common.Fx, - _ common.NetworkAppSender, + _ common.AppSender, ) error { return vm.Linearize(ctx, vm.stopVertexID, toEngine) } diff --git a/network/p2p/client.go b/network/p2p/client.go index 8130855e945..2e5013a211f 100644 --- a/network/p2p/client.go +++ b/network/p2p/client.go @@ -36,7 +36,7 @@ type Client struct { handlerIDStr string handlerPrefix []byte router *router - sender common.NetworkAppSender + sender common.AppSender options *clientOptions } diff --git a/network/p2p/handler.go b/network/p2p/handler.go index 6849098682f..23819cd1846 100644 --- a/network/p2p/handler.go +++ b/network/p2p/handler.go @@ -101,7 +101,7 @@ type responder struct { Handler handlerID uint64 log logging.Logger - sender common.NetworkAppSender + sender common.AppSender } // AppRequest calls the underlying handler and sends back the response to nodeID diff --git a/network/p2p/network.go b/network/p2p/network.go index 42b7b49f37e..fff077645d9 100644 --- a/network/p2p/network.go +++ b/network/p2p/network.go @@ -22,9 +22,9 @@ import ( ) var ( - _ validators.Connector = (*Network)(nil) - _ common.NetworkAppHandler = (*Network)(nil) - _ NodeSampler = (*peerSampler)(nil) + _ validators.Connector = (*Network)(nil) + _ common.AppHandler = (*Network)(nil) + _ NodeSampler = (*peerSampler)(nil) opLabel = "op" handlerLabel = "handlerID" @@ -58,7 +58,7 @@ type clientOptions struct { // NewNetwork returns an instance of Network func NewNetwork( log logging.Logger, - sender common.NetworkAppSender, + sender common.AppSender, registerer prometheus.Registerer, namespace string, ) (*Network, error) { @@ -103,7 +103,7 @@ type Network struct { Peers *Peers log logging.Logger - sender common.NetworkAppSender + sender common.AppSender router *router } diff --git a/network/p2p/router.go b/network/p2p/router.go index 6ef93773fcc..9c020ab4935 100644 --- a/network/p2p/router.go +++ b/network/p2p/router.go @@ -25,7 +25,7 @@ var ( ErrExistingAppProtocol = errors.New("existing app protocol") ErrUnrequestedResponse = errors.New("unrequested response") - _ common.NetworkAppHandler = (*router)(nil) + _ common.AppHandler = (*router)(nil) ) type pendingAppRequest struct { @@ -65,7 +65,7 @@ func (m *metrics) observe(labels prometheus.Labels, start time.Time) error { // corresponding Client. type router struct { log logging.Logger - sender common.NetworkAppSender + sender common.AppSender metrics metrics lock sync.RWMutex @@ -77,7 +77,7 @@ type router struct { // newRouter returns a new instance of Router func newRouter( log logging.Logger, - sender common.NetworkAppSender, + sender common.AppSender, metrics metrics, ) *router { return &router{ diff --git a/scripts/mocks.mockgen.source.txt b/scripts/mocks.mockgen.source.txt index 77de5529652..ba562d2e3c4 100644 --- a/scripts/mocks.mockgen.source.txt +++ b/scripts/mocks.mockgen.source.txt @@ -1,4 +1,4 @@ -snow/engine/common/sender.go=StateSummarySender,AcceptedStateSummarySender,FrontierSender,AcceptedSender,FetchSender,AppSender,QuerySender,NetworkAppSender,Gossiper=snow/engine/common/mock_sender.go +snow/engine/common/sender.go=StateSummarySender,AcceptedStateSummarySender,FrontierSender,AcceptedSender,FetchSender,AppSender,QuerySender,Gossiper=snow/engine/common/mock_sender.go snow/networking/router/router.go=InternalHandler=snow/networking/router/mock_router.go snow/networking/sender/external_sender.go==snow/networking/sender/mock_external_sender.go vms/avm/block/executor/manager.go==vms/avm/block/executor/mock_manager.go diff --git a/snow/engine/avalanche/bootstrap/bootstrapper.go b/snow/engine/avalanche/bootstrap/bootstrapper.go index 3af60d526c2..00f9ab64a45 100644 --- a/snow/engine/avalanche/bootstrap/bootstrapper.go +++ b/snow/engine/avalanche/bootstrap/bootstrapper.go @@ -60,7 +60,7 @@ func New( PutHandler: common.NewNoOpPutHandler(config.Ctx.Log), QueryHandler: common.NewNoOpQueryHandler(config.Ctx.Log), ChitsHandler: common.NewNoOpChitsHandler(config.Ctx.Log), - NetworkAppHandler: config.VM, + AppHandler: config.VM, outstandingRequests: bimap.New[common.Request, ids.ID](), outstandingRequestTimes: make(map[common.Request]time.Time), @@ -85,7 +85,7 @@ type bootstrapper struct { common.PutHandler common.QueryHandler common.ChitsHandler - common.NetworkAppHandler + common.AppHandler metrics diff --git a/snow/engine/avalanche/engine.go b/snow/engine/avalanche/engine.go index 873fbbe38f0..530a319e0fc 100644 --- a/snow/engine/avalanche/engine.go +++ b/snow/engine/avalanche/engine.go @@ -29,7 +29,7 @@ type engine struct { common.PutHandler common.QueryHandler common.ChitsHandler - common.NetworkAppHandler + common.AppHandler common.InternalHandler ctx *snow.ConsensusContext @@ -51,7 +51,7 @@ func New( PutHandler: common.NewNoOpPutHandler(ctx.Log), QueryHandler: common.NewNoOpQueryHandler(ctx.Log), ChitsHandler: common.NewNoOpChitsHandler(ctx.Log), - NetworkAppHandler: common.NewNoOpAppHandler(ctx.Log), + AppHandler: common.NewNoOpAppHandler(ctx.Log), InternalHandler: common.NewNoOpInternalHandler(ctx.Log), ctx: ctx, vm: vm, diff --git a/snow/engine/avalanche/vertex/mock_vm.go b/snow/engine/avalanche/vertex/mock_vm.go index ae3e90e160d..9687aa884e7 100644 --- a/snow/engine/avalanche/vertex/mock_vm.go +++ b/snow/engine/avalanche/vertex/mock_vm.go @@ -208,7 +208,7 @@ func (mr *MockLinearizableVMMockRecorder) HealthCheck(arg0 any) *gomock.Call { } // Initialize mocks base method. -func (m *MockLinearizableVM) Initialize(arg0 context.Context, arg1 *snow.Context, arg2 database.Database, arg3, arg4, arg5 []byte, arg6 chan<- common.Message, arg7 []*common.Fx, arg8 common.NetworkAppSender) error { +func (m *MockLinearizableVM) Initialize(arg0 context.Context, arg1 *snow.Context, arg2 database.Database, arg3, arg4, arg5 []byte, arg6 chan<- common.Message, arg7 []*common.Fx, arg8 common.AppSender) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Initialize", arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8) ret0, _ := ret[0].(error) diff --git a/snow/engine/common/appsender/appsender_client.go b/snow/engine/common/appsender/appsender_client.go index b6a3b13f971..4477034f17c 100644 --- a/snow/engine/common/appsender/appsender_client.go +++ b/snow/engine/common/appsender/appsender_client.go @@ -13,7 +13,7 @@ import ( appsenderpb "github.com/ava-labs/avalanchego/proto/pb/appsender" ) -var _ common.NetworkAppSender = (*Client)(nil) +var _ common.AppSender = (*Client)(nil) type Client struct { client appsenderpb.AppSenderClient diff --git a/snow/engine/common/appsender/appsender_server.go b/snow/engine/common/appsender/appsender_server.go index f030a401aa6..73092d3e086 100644 --- a/snow/engine/common/appsender/appsender_server.go +++ b/snow/engine/common/appsender/appsender_server.go @@ -19,11 +19,11 @@ var _ appsenderpb.AppSenderServer = (*Server)(nil) type Server struct { appsenderpb.UnsafeAppSenderServer - appSender common.NetworkAppSender + appSender common.AppSender } // NewServer returns a messenger connected to a remote channel -func NewServer(appSender common.NetworkAppSender) *Server { +func NewServer(appSender common.AppSender) *Server { return &Server{appSender: appSender} } diff --git a/snow/engine/common/mock_sender.go b/snow/engine/common/mock_sender.go index e0a4a6dc4f3..737adba95ad 100644 --- a/snow/engine/common/mock_sender.go +++ b/snow/engine/common/mock_sender.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -source=snow/engine/common/sender.go -destination=snow/engine/common/mock_sender.go -package=common -exclude_interfaces=StateSummarySender,AcceptedStateSummarySender,FrontierSender,AcceptedSender,FetchSender,AppSender,QuerySender,NetworkAppSender,Gossiper +// mockgen -source=snow/engine/common/sender.go -destination=snow/engine/common/mock_sender.go -package=common -exclude_interfaces=StateSummarySender,AcceptedStateSummarySender,FrontierSender,AcceptedSender,FetchSender,AppSender,QuerySender,Gossiper // // Package common is a generated GoMock package. diff --git a/snow/engine/common/no_ops_handlers.go b/snow/engine/common/no_ops_handlers.go index 6c48d8c83dd..0b2247ab3cd 100644 --- a/snow/engine/common/no_ops_handlers.go +++ b/snow/engine/common/no_ops_handlers.go @@ -25,7 +25,7 @@ var ( _ PutHandler = (*noOpPutHandler)(nil) _ QueryHandler = (*noOpQueryHandler)(nil) _ ChitsHandler = (*noOpChitsHandler)(nil) - _ NetworkAppHandler = (*noOpAppHandler)(nil) + _ AppHandler = (*noOpAppHandler)(nil) _ InternalHandler = (*noOpInternalHandler)(nil) ) @@ -264,7 +264,7 @@ type noOpAppHandler struct { log logging.Logger } -func NewNoOpAppHandler(log logging.Logger) NetworkAppHandler { +func NewNoOpAppHandler(log logging.Logger) AppHandler { return &noOpAppHandler{log: log} } diff --git a/snow/engine/common/sender.go b/snow/engine/common/sender.go index f415e6f45eb..58365375385 100644 --- a/snow/engine/common/sender.go +++ b/snow/engine/common/sender.go @@ -164,8 +164,8 @@ type QuerySender interface { ) } -// NetworkAppSender sends VM-level messages to nodes in the network. -type NetworkAppSender interface { +// AppSender sends VM-level messages to nodes in the network. +type AppSender interface { // Send an application-level request. // // The VM corresponding to this AppSender may receive either: diff --git a/snow/engine/common/vm.go b/snow/engine/common/vm.go index 106d5dc5946..65cbfb15865 100644 --- a/snow/engine/common/vm.go +++ b/snow/engine/common/vm.go @@ -15,7 +15,7 @@ import ( // VM describes the interface that all consensus VMs must implement type VM interface { - NetworkAppHandler + AppHandler // Returns nil if the VM is healthy. // Periodically called and reported via the node's Health API. @@ -53,7 +53,7 @@ type VM interface { configBytes []byte, toEngine chan<- Message, fxs []*Fx, - appSender NetworkAppSender, + appSender AppSender, ) error // SetState communicates to VM its next state it starts diff --git a/snow/engine/enginetest/sender.go b/snow/engine/enginetest/sender.go index 8d6188e44f7..5bc7f100c05 100644 --- a/snow/engine/enginetest/sender.go +++ b/snow/engine/enginetest/sender.go @@ -16,8 +16,8 @@ import ( ) var ( - _ common.Sender = (*Sender)(nil) - _ common.NetworkAppSender = (*SenderStub)(nil) + _ common.Sender = (*Sender)(nil) + _ common.AppSender = (*SenderStub)(nil) errSendAppRequest = errors.New("unexpectedly called SendAppRequest") errSendAppResponse = errors.New("unexpectedly called SendAppResponse") diff --git a/snow/engine/enginetest/vm.go b/snow/engine/enginetest/vm.go index 96d7efd0dda..f3c430e5840 100644 --- a/snow/engine/enginetest/vm.go +++ b/snow/engine/enginetest/vm.go @@ -45,7 +45,7 @@ type VM struct { CantHealthCheck, CantConnected, CantDisconnected, CantVersion, CantAppRequest, CantAppResponse, CantAppGossip, CantAppRequestFailed bool - InitializeF func(ctx context.Context, chainCtx *snow.Context, db database.Database, genesisBytes []byte, upgradeBytes []byte, configBytes []byte, msgChan chan<- common.Message, fxs []*common.Fx, appSender common.NetworkAppSender) error + InitializeF func(ctx context.Context, chainCtx *snow.Context, db database.Database, genesisBytes []byte, upgradeBytes []byte, configBytes []byte, msgChan chan<- common.Message, fxs []*common.Fx, appSender common.AppSender) error SetStateF func(ctx context.Context, state snow.State) error ShutdownF func(context.Context) error CreateHandlersF func(context.Context) (map[string]http.Handler, error) @@ -83,7 +83,7 @@ func (vm *VM) Initialize( configBytes []byte, msgChan chan<- common.Message, fxs []*common.Fx, - appSender common.NetworkAppSender, + appSender common.AppSender, ) error { if vm.InitializeF != nil { return vm.InitializeF( diff --git a/snow/engine/snowman/block/mock_chain_vm.go b/snow/engine/snowman/block/mock_chain_vm.go index 1fb27c77d82..4e7d7d7387f 100644 --- a/snow/engine/snowman/block/mock_chain_vm.go +++ b/snow/engine/snowman/block/mock_chain_vm.go @@ -207,7 +207,7 @@ func (mr *MockChainVMMockRecorder) HealthCheck(arg0 any) *gomock.Call { } // Initialize mocks base method. -func (m *MockChainVM) Initialize(arg0 context.Context, arg1 *snow.Context, arg2 database.Database, arg3, arg4, arg5 []byte, arg6 chan<- common.Message, arg7 []*common.Fx, arg8 common.NetworkAppSender) error { +func (m *MockChainVM) Initialize(arg0 context.Context, arg1 *snow.Context, arg2 database.Database, arg3, arg4, arg5 []byte, arg6 chan<- common.Message, arg7 []*common.Fx, arg8 common.AppSender) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Initialize", arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8) ret0, _ := ret[0].(error) diff --git a/snow/engine/snowman/bootstrap/bootstrapper.go b/snow/engine/snowman/bootstrap/bootstrapper.go index b95e4764d24..966bdcf67d1 100644 --- a/snow/engine/snowman/bootstrap/bootstrapper.go +++ b/snow/engine/snowman/bootstrap/bootstrapper.go @@ -77,7 +77,7 @@ type Bootstrapper struct { common.PutHandler common.QueryHandler common.ChitsHandler - common.NetworkAppHandler + common.AppHandler requestID uint32 // Tracks the last requestID that was used in a request @@ -128,7 +128,7 @@ func New(config Config, onFinished func(ctx context.Context, lastReqID uint32) e PutHandler: common.NewNoOpPutHandler(config.Ctx.Log), QueryHandler: common.NewNoOpQueryHandler(config.Ctx.Log), ChitsHandler: common.NewNoOpChitsHandler(config.Ctx.Log), - NetworkAppHandler: config.VM, + AppHandler: config.VM, minority: bootstrapper.Noop, majority: bootstrapper.Noop, diff --git a/snow/engine/snowman/engine.go b/snow/engine/snowman/engine.go index a0d033a0d36..1b2cfb5c11d 100644 --- a/snow/engine/snowman/engine.go +++ b/snow/engine/snowman/engine.go @@ -51,7 +51,7 @@ type Engine struct { common.AcceptedFrontierHandler common.AcceptedHandler common.AncestorsHandler - common.NetworkAppHandler + common.AppHandler validators.Connector requestID uint32 @@ -137,7 +137,7 @@ func New(config Config) (*Engine, error) { AcceptedFrontierHandler: common.NewNoOpAcceptedFrontierHandler(config.Ctx.Log), AcceptedHandler: common.NewNoOpAcceptedHandler(config.Ctx.Log), AncestorsHandler: common.NewNoOpAncestorsHandler(config.Ctx.Log), - NetworkAppHandler: config.VM, + AppHandler: config.VM, Connector: config.VM, pending: make(map[ids.ID]snowman.Block), unverifiedIDToAncestor: ancestor.NewTree(), diff --git a/snow/engine/snowman/engine_test.go b/snow/engine/snowman/engine_test.go index 090ecf67a20..26eccf232ed 100644 --- a/snow/engine/snowman/engine_test.go +++ b/snow/engine/snowman/engine_test.go @@ -2415,7 +2415,7 @@ func TestEngineVoteStallRegression(t *testing.T) { []byte, chan<- common.Message, []*common.Fx, - common.NetworkAppSender, + common.AppSender, ) error { return nil }, @@ -2633,7 +2633,7 @@ func TestEngineEarlyTerminateVoterRegression(t *testing.T) { []byte, chan<- common.Message, []*common.Fx, - common.NetworkAppSender, + common.AppSender, ) error { return nil }, @@ -2783,7 +2783,7 @@ func TestEngineRegistersInvalidVoterDependencyRegression(t *testing.T) { []byte, chan<- common.Message, []*common.Fx, - common.NetworkAppSender, + common.AppSender, ) error { return nil }, diff --git a/snow/engine/snowman/syncer/state_syncer.go b/snow/engine/snowman/syncer/state_syncer.go index 94aec01cc81..2fea946f310 100644 --- a/snow/engine/snowman/syncer/state_syncer.go +++ b/snow/engine/snowman/syncer/state_syncer.go @@ -46,7 +46,7 @@ type stateSyncer struct { common.PutHandler common.QueryHandler common.ChitsHandler - common.NetworkAppHandler + common.AppHandler started bool @@ -103,7 +103,7 @@ func New( PutHandler: common.NewNoOpPutHandler(cfg.Ctx.Log), QueryHandler: common.NewNoOpQueryHandler(cfg.Ctx.Log), ChitsHandler: common.NewNoOpChitsHandler(cfg.Ctx.Log), - NetworkAppHandler: cfg.VM, + AppHandler: cfg.VM, stateSyncVM: ssVM, onDoneStateSyncing: onDoneStateSyncing, } diff --git a/vms/avm/network/atomic.go b/vms/avm/network/atomic.go index 4304813e28e..395f09fb8e2 100644 --- a/vms/avm/network/atomic.go +++ b/vms/avm/network/atomic.go @@ -15,16 +15,16 @@ import ( var _ Atomic = (*atomic)(nil) type Atomic interface { - common.NetworkAppHandler + common.AppHandler - Set(common.NetworkAppHandler) + Set(common.AppHandler) } type atomic struct { - handler utils.Atomic[common.NetworkAppHandler] + handler utils.Atomic[common.AppHandler] } -func NewAtomic(h common.NetworkAppHandler) Atomic { +func NewAtomic(h common.AppHandler) Atomic { a := &atomic{} a.handler.Set(h) return a @@ -90,6 +90,6 @@ func (a *atomic) AppGossip( ) } -func (a *atomic) Set(h common.NetworkAppHandler) { +func (a *atomic) Set(h common.AppHandler) { a.handler.Set(h) } diff --git a/vms/avm/network/network.go b/vms/avm/network/network.go index d8d02cd0065..15d3dc79d15 100644 --- a/vms/avm/network/network.go +++ b/vms/avm/network/network.go @@ -20,8 +20,8 @@ import ( ) var ( - _ common.NetworkAppHandler = (*Network)(nil) - _ validators.Connector = (*Network)(nil) + _ common.AppHandler = (*Network)(nil) + _ validators.Connector = (*Network)(nil) ) type Network struct { @@ -30,7 +30,7 @@ type Network struct { log logging.Logger parser txs.Parser mempool *gossipMempool - appSender common.NetworkAppSender + appSender common.AppSender txPushGossiper *gossip.PushGossiper[*txs.Tx] txPushGossipFrequency time.Duration @@ -46,7 +46,7 @@ func New( parser txs.Parser, txVerifier TxVerifier, mempool mempool.Mempool, - appSender common.NetworkAppSender, + appSender common.AppSender, registerer prometheus.Registerer, config Config, ) (*Network, error) { diff --git a/vms/avm/network/network_test.go b/vms/avm/network/network_test.go index 7d165ef75b5..4d9b68f71f2 100644 --- a/vms/avm/network/network_test.go +++ b/vms/avm/network/network_test.go @@ -57,7 +57,7 @@ func TestNetworkIssueTxFromRPC(t *testing.T) { name string mempoolFunc func(*gomock.Controller) xmempool.Mempool txVerifierFunc func(*gomock.Controller) TxVerifier - appSenderFunc func(*gomock.Controller) common.NetworkAppSender + appSenderFunc func(*gomock.Controller) common.AppSender expectedErr error } @@ -131,7 +131,7 @@ func TestNetworkIssueTxFromRPC(t *testing.T) { txVerifier.EXPECT().VerifyTx(gomock.Any()).Return(nil) return txVerifier }, - appSenderFunc: func(ctrl *gomock.Controller) common.NetworkAppSender { + appSenderFunc: func(ctrl *gomock.Controller) common.AppSender { appSender := common.NewMockSender(ctrl) appSender.EXPECT().SendAppGossip(gomock.Any(), gomock.Any(), gomock.Any()).Return(nil) return appSender @@ -168,7 +168,7 @@ func TestNetworkIssueTxFromRPC(t *testing.T) { txVerifierFunc = tt.txVerifierFunc } - appSenderFunc := func(ctrl *gomock.Controller) common.NetworkAppSender { + appSenderFunc := func(ctrl *gomock.Controller) common.AppSender { return common.NewMockSender(ctrl) } if tt.appSenderFunc != nil { @@ -207,7 +207,7 @@ func TestNetworkIssueTxFromRPCWithoutVerification(t *testing.T) { type test struct { name string mempoolFunc func(*gomock.Controller) xmempool.Mempool - appSenderFunc func(*gomock.Controller) common.NetworkAppSender + appSenderFunc func(*gomock.Controller) common.AppSender expectedErr error } @@ -232,7 +232,7 @@ func TestNetworkIssueTxFromRPCWithoutVerification(t *testing.T) { mempool.EXPECT().RequestBuildBlock() return mempool }, - appSenderFunc: func(ctrl *gomock.Controller) common.NetworkAppSender { + appSenderFunc: func(ctrl *gomock.Controller) common.AppSender { appSender := common.NewMockSender(ctrl) appSender.EXPECT().SendAppGossip(gomock.Any(), gomock.Any(), gomock.Any()).Return(nil) return appSender @@ -262,7 +262,7 @@ func TestNetworkIssueTxFromRPCWithoutVerification(t *testing.T) { mempoolFunc = tt.mempoolFunc } - appSenderFunc := func(ctrl *gomock.Controller) common.NetworkAppSender { + appSenderFunc := func(ctrl *gomock.Controller) common.AppSender { return common.NewMockSender(ctrl) } if tt.appSenderFunc != nil { diff --git a/vms/avm/vm.go b/vms/avm/vm.go index 3970bea20a6..c9170ba882f 100644 --- a/vms/avm/vm.go +++ b/vms/avm/vm.go @@ -86,7 +86,7 @@ type VM struct { pubsub *pubsub.Server - appSender common.NetworkAppSender + appSender common.AppSender // State management state state.State @@ -160,7 +160,7 @@ func (vm *VM) Initialize( configBytes []byte, _ chan<- common.Message, fxs []*common.Fx, - appSender common.NetworkAppSender, + appSender common.AppSender, ) error { noopMessageHandler := common.NewNoOpAppHandler(ctx.Log) vm.Atomic = network.NewAtomic(noopMessageHandler) diff --git a/vms/example/xsvm/vm.go b/vms/example/xsvm/vm.go index 485feb58081..526fc47c499 100644 --- a/vms/example/xsvm/vm.go +++ b/vms/example/xsvm/vm.go @@ -37,7 +37,7 @@ var ( ) type VM struct { - common.NetworkAppHandler + common.AppHandler chainContext *snow.Context db database.Database @@ -57,9 +57,9 @@ func (vm *VM) Initialize( _ []byte, engineChan chan<- common.Message, _ []*common.Fx, - _ common.NetworkAppSender, + _ common.AppSender, ) error { - vm.NetworkAppHandler = common.NewNoOpAppHandler(chainContext.Log) + vm.AppHandler = common.NewNoOpAppHandler(chainContext.Log) chainContext.Log.Info("initializing xsvm", zap.Stringer("version", Version), diff --git a/vms/metervm/block_vm.go b/vms/metervm/block_vm.go index 14d95a15121..da64f9af01d 100644 --- a/vms/metervm/block_vm.go +++ b/vms/metervm/block_vm.go @@ -60,7 +60,7 @@ func (vm *blockVM) Initialize( configBytes []byte, toEngine chan<- common.Message, fxs []*common.Fx, - appSender common.NetworkAppSender, + appSender common.AppSender, ) error { err := vm.blockMetrics.Initialize( vm.buildBlockVM != nil, diff --git a/vms/metervm/vertex_vm.go b/vms/metervm/vertex_vm.go index 0b7db088cf3..936a688de99 100644 --- a/vms/metervm/vertex_vm.go +++ b/vms/metervm/vertex_vm.go @@ -47,7 +47,7 @@ func (vm *vertexVM) Initialize( configBytes []byte, toEngine chan<- common.Message, fxs []*common.Fx, - appSender common.NetworkAppSender, + appSender common.AppSender, ) error { if err := vm.vertexMetrics.Initialize(vm.registry); err != nil { return err diff --git a/vms/platformvm/network/network.go b/vms/platformvm/network/network.go index 5ed4c475242..c821c827251 100644 --- a/vms/platformvm/network/network.go +++ b/vms/platformvm/network/network.go @@ -30,7 +30,7 @@ type Network struct { txVerifier TxVerifier mempool *gossipMempool partialSyncPrimaryNetwork bool - appSender common.NetworkAppSender + appSender common.AppSender txPushGossiper *gossip.PushGossiper[*txs.Tx] txPushGossipFrequency time.Duration @@ -46,7 +46,7 @@ func New( txVerifier TxVerifier, mempool mempool.Mempool, partialSyncPrimaryNetwork bool, - appSender common.NetworkAppSender, + appSender common.AppSender, registerer prometheus.Registerer, config Config, ) (*Network, error) { diff --git a/vms/platformvm/network/network_test.go b/vms/platformvm/network/network_test.go index 373bdbc73c2..f19600461af 100644 --- a/vms/platformvm/network/network_test.go +++ b/vms/platformvm/network/network_test.go @@ -63,7 +63,7 @@ func TestNetworkIssueTxFromRPC(t *testing.T) { mempoolFunc func(*gomock.Controller) pmempool.Mempool txVerifier testTxVerifier partialSyncPrimaryNetwork bool - appSenderFunc func(*gomock.Controller) common.NetworkAppSender + appSenderFunc func(*gomock.Controller) common.AppSender expectedErr error } @@ -75,7 +75,7 @@ func TestNetworkIssueTxFromRPC(t *testing.T) { mempool.EXPECT().Get(gomock.Any()).Return(tx, true) return mempool }, - appSenderFunc: func(ctrl *gomock.Controller) common.NetworkAppSender { + appSenderFunc: func(ctrl *gomock.Controller) common.AppSender { return common.NewMockSender(ctrl) }, expectedErr: mempool.ErrDuplicateTx, @@ -88,7 +88,7 @@ func TestNetworkIssueTxFromRPC(t *testing.T) { mempool.EXPECT().GetDropReason(gomock.Any()).Return(errTest) return mempool }, - appSenderFunc: func(ctrl *gomock.Controller) common.NetworkAppSender { + appSenderFunc: func(ctrl *gomock.Controller) common.AppSender { // Shouldn't gossip the tx return common.NewMockSender(ctrl) }, @@ -104,7 +104,7 @@ func TestNetworkIssueTxFromRPC(t *testing.T) { return mempool }, txVerifier: testTxVerifier{err: errTest}, - appSenderFunc: func(ctrl *gomock.Controller) common.NetworkAppSender { + appSenderFunc: func(ctrl *gomock.Controller) common.AppSender { // Shouldn't gossip the tx return common.NewMockSender(ctrl) }, @@ -120,7 +120,7 @@ func TestNetworkIssueTxFromRPC(t *testing.T) { mempool.EXPECT().MarkDropped(gomock.Any(), gomock.Any()) return mempool }, - appSenderFunc: func(ctrl *gomock.Controller) common.NetworkAppSender { + appSenderFunc: func(ctrl *gomock.Controller) common.AppSender { // Shouldn't gossip the tx return common.NewMockSender(ctrl) }, @@ -132,7 +132,7 @@ func TestNetworkIssueTxFromRPC(t *testing.T) { return pmempool.NewMockMempool(ctrl) }, partialSyncPrimaryNetwork: true, - appSenderFunc: func(ctrl *gomock.Controller) common.NetworkAppSender { + appSenderFunc: func(ctrl *gomock.Controller) common.AppSender { return common.NewMockSender(ctrl) }, expectedErr: errMempoolDisabledWithPartialSync, @@ -149,7 +149,7 @@ func TestNetworkIssueTxFromRPC(t *testing.T) { mempool.EXPECT().Get(gomock.Any()).Return(nil, true).Times(2) return mempool }, - appSenderFunc: func(ctrl *gomock.Controller) common.NetworkAppSender { + appSenderFunc: func(ctrl *gomock.Controller) common.AppSender { appSender := common.NewMockSender(ctrl) appSender.EXPECT().SendAppGossip(gomock.Any(), gomock.Any(), gomock.Any()).Return(nil) return appSender diff --git a/vms/platformvm/vm.go b/vms/platformvm/vm.go index 19fc1e41cbb..d6b97a44127 100644 --- a/vms/platformvm/vm.go +++ b/vms/platformvm/vm.go @@ -102,7 +102,7 @@ func (vm *VM) Initialize( configBytes []byte, toEngine chan<- common.Message, _ []*common.Fx, - appSender common.NetworkAppSender, + appSender common.AppSender, ) error { chainCtx.Log.Verbo("initializing platform chain") diff --git a/vms/proposervm/batched_vm_test.go b/vms/proposervm/batched_vm_test.go index 1c8afd5bda1..d8b50dc94e6 100644 --- a/vms/proposervm/batched_vm_test.go +++ b/vms/proposervm/batched_vm_test.go @@ -940,7 +940,7 @@ func initTestRemoteProposerVM( []byte, chan<- common.Message, []*common.Fx, - common.NetworkAppSender, + common.AppSender, ) error { return nil } diff --git a/vms/proposervm/post_fork_option_test.go b/vms/proposervm/post_fork_option_test.go index 51db4c0c24d..3a76bc9faa0 100644 --- a/vms/proposervm/post_fork_option_test.go +++ b/vms/proposervm/post_fork_option_test.go @@ -550,7 +550,7 @@ func TestOptionTimestampValidity(t *testing.T) { []byte, chan<- common.Message, []*common.Fx, - common.NetworkAppSender, + common.AppSender, ) error { return nil } diff --git a/vms/proposervm/state_syncable_vm_test.go b/vms/proposervm/state_syncable_vm_test.go index c9817918df3..1017c35d8a4 100644 --- a/vms/proposervm/state_syncable_vm_test.go +++ b/vms/proposervm/state_syncable_vm_test.go @@ -46,7 +46,7 @@ func helperBuildStateSyncTestObjects(t *testing.T) (*fullVM, *VM) { // load innerVM expectations innerVM.InitializeF = func(context.Context, *snow.Context, database.Database, []byte, []byte, []byte, chan<- common.Message, - []*common.Fx, common.NetworkAppSender, + []*common.Fx, common.AppSender, ) error { return nil } diff --git a/vms/proposervm/vm.go b/vms/proposervm/vm.go index 1ed914e65ce..d0c21971c80 100644 --- a/vms/proposervm/vm.go +++ b/vms/proposervm/vm.go @@ -134,7 +134,7 @@ func (vm *VM) Initialize( configBytes []byte, toEngine chan<- common.Message, fxs []*common.Fx, - appSender common.NetworkAppSender, + appSender common.AppSender, ) error { vm.ctx = chainCtx vm.db = versiondb.New(prefixdb.New(dbPrefix, db)) diff --git a/vms/proposervm/vm_test.go b/vms/proposervm/vm_test.go index 84d0348a32f..e5d5f142281 100644 --- a/vms/proposervm/vm_test.go +++ b/vms/proposervm/vm_test.go @@ -102,7 +102,7 @@ func initTestProposerVM( coreVM.InitializeF = func(context.Context, *snow.Context, database.Database, []byte, []byte, []byte, chan<- common.Message, - []*common.Fx, common.NetworkAppSender, + []*common.Fx, common.AppSender, ) error { return nil } @@ -856,7 +856,7 @@ func TestExpiredBuildBlock(t *testing.T) { _ []byte, toEngineChan chan<- common.Message, _ []*common.Fx, - _ common.NetworkAppSender, + _ common.AppSender, ) error { toScheduler = toEngineChan return nil @@ -1093,7 +1093,7 @@ func TestInnerVMRollback(t *testing.T) { []byte, chan<- common.Message, []*common.Fx, - common.NetworkAppSender, + common.AppSender, ) error { return nil }, @@ -1573,7 +1573,7 @@ func TestRejectedHeightNotIndexed(t *testing.T) { coreVM.InitializeF = func(context.Context, *snow.Context, database.Database, []byte, []byte, []byte, chan<- common.Message, - []*common.Fx, common.NetworkAppSender, + []*common.Fx, common.AppSender, ) error { return nil } @@ -1746,7 +1746,7 @@ func TestRejectedOptionHeightNotIndexed(t *testing.T) { coreVM.InitializeF = func(context.Context, *snow.Context, database.Database, []byte, []byte, []byte, chan<- common.Message, - []*common.Fx, common.NetworkAppSender, + []*common.Fx, common.AppSender, ) error { return nil } @@ -2174,7 +2174,7 @@ func TestHistoricalBlockDeletion(t *testing.T) { coreVM := &blocktest.VM{ VM: enginetest.VM{ T: t, - InitializeF: func(context.Context, *snow.Context, database.Database, []byte, []byte, []byte, chan<- common.Message, []*common.Fx, common.NetworkAppSender) error { + InitializeF: func(context.Context, *snow.Context, database.Database, []byte, []byte, []byte, chan<- common.Message, []*common.Fx, common.AppSender) error { return nil }, }, diff --git a/vms/rpcchainvm/vm_client.go b/vms/rpcchainvm/vm_client.go index 3958c3cabf7..c5a358df8ed 100644 --- a/vms/rpcchainvm/vm_client.go +++ b/vms/rpcchainvm/vm_client.go @@ -131,7 +131,7 @@ func (vm *VMClient) Initialize( configBytes []byte, toEngine chan<- common.Message, fxs []*common.Fx, - appSender common.NetworkAppSender, + appSender common.AppSender, ) error { if len(fxs) != 0 { return errUnsupportedFXs diff --git a/vms/tracedvm/block_vm.go b/vms/tracedvm/block_vm.go index f078be3598b..13bb1a5d7b7 100644 --- a/vms/tracedvm/block_vm.go +++ b/vms/tracedvm/block_vm.go @@ -103,7 +103,7 @@ func (vm *blockVM) Initialize( configBytes []byte, toEngine chan<- common.Message, fxs []*common.Fx, - appSender common.NetworkAppSender, + appSender common.AppSender, ) error { ctx, span := vm.tracer.Start(ctx, vm.initializeTag) defer span.End() diff --git a/vms/tracedvm/vertex_vm.go b/vms/tracedvm/vertex_vm.go index f3e3156f07d..c4cf1998bb6 100644 --- a/vms/tracedvm/vertex_vm.go +++ b/vms/tracedvm/vertex_vm.go @@ -41,7 +41,7 @@ func (vm *vertexVM) Initialize( configBytes []byte, toEngine chan<- common.Message, fxs []*common.Fx, - appSender common.NetworkAppSender, + appSender common.AppSender, ) error { ctx, span := vm.tracer.Start(ctx, "vertexVM.Initialize") defer span.End() diff --git a/x/sync/network_client.go b/x/sync/network_client.go index 0046228d6ac..18530d1c4e7 100644 --- a/x/sync/network_client.go +++ b/x/sync/network_client.go @@ -85,11 +85,11 @@ type networkClient struct { // tracking of peers & bandwidth usage peers *p2p.PeerTracker // For sending messages to peers - appSender common.NetworkAppSender + appSender common.AppSender } func NewNetworkClient( - appSender common.NetworkAppSender, + appSender common.AppSender, myNodeID ids.NodeID, maxActiveRequests int64, log logging.Logger, diff --git a/x/sync/network_server.go b/x/sync/network_server.go index 3563223c529..f7ca7ec618b 100644 --- a/x/sync/network_server.go +++ b/x/sync/network_server.go @@ -53,12 +53,12 @@ var ( ) type NetworkServer struct { - appSender common.NetworkAppSender // Used to respond to peer requests via AppResponse. + appSender common.AppSender // Used to respond to peer requests via AppResponse. db DB log logging.Logger } -func NewNetworkServer(appSender common.NetworkAppSender, db DB, log logging.Logger) *NetworkServer { +func NewNetworkServer(appSender common.AppSender, db DB, log logging.Logger) *NetworkServer { return &NetworkServer{ appSender: appSender, db: db, From 53145650f5870d1b2565e960a09fefeb1b192d86 Mon Sep 17 00:00:00 2001 From: Darioush Jalali Date: Tue, 13 Aug 2024 12:41:13 -0700 Subject: [PATCH 20/23] go mod tidy --- go.sum | 2 -- 1 file changed, 2 deletions(-) diff --git a/go.sum b/go.sum index f009d612f3e..774265950d4 100644 --- a/go.sum +++ b/go.sum @@ -62,8 +62,6 @@ github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax github.com/antithesishq/antithesis-sdk-go v0.3.8 h1:OvGoHxIcOXFJLyn9IJQ5DzByZ3YVAWNBc394ObzDRb8= github.com/antithesishq/antithesis-sdk-go v0.3.8/go.mod h1:IUpT2DPAKh6i/YhSbt6Gl3v2yvUZjmKncl7U91fup7E= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= -github.com/ava-labs/coreth v0.13.8-fixed-genesis-upgrade.0.20240808160839-82b63707d309 h1:+FKQUlP39qAVRGm/5a3gfYnh5Gunbxm4by2ssi7BbIA= -github.com/ava-labs/coreth v0.13.8-fixed-genesis-upgrade.0.20240808160839-82b63707d309/go.mod h1:z0JE84/uawhLD6pJ37f4Chopw5OsGWa10PV+a27z1tI= github.com/ava-labs/coreth v0.13.8-fixed-genesis-upgrade.0.20240813192659-6958df88a24c h1:Ovr+3MNjWwOcppqfczcnmebn6ibTSeANqlnVfptVr+g= github.com/ava-labs/coreth v0.13.8-fixed-genesis-upgrade.0.20240813192659-6958df88a24c/go.mod h1:xpiR0U17XmLbsWG8u/z8ZlkWBase0hQerYcKM5A/wm8= github.com/ava-labs/ledger-avalanche/go v0.0.0-20240610153809-9c955cc90a95 h1:dOVbtdnZL++pENdTCNZ1nu41eYDQkTML4sWebDnnq8c= From a9743cf7b4bdf872e99281206770bf013db47c08 Mon Sep 17 00:00:00 2001 From: Darioush Jalali Date: Tue, 13 Aug 2024 12:45:51 -0700 Subject: [PATCH 21/23] bump coreth --- go.mod | 2 +- go.sum | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index c6720d3b342..f847fee1dd8 100644 --- a/go.mod +++ b/go.mod @@ -10,7 +10,7 @@ require ( github.com/DataDog/zstd v1.5.2 github.com/NYTimes/gziphandler v1.1.1 github.com/antithesishq/antithesis-sdk-go v0.3.8 - github.com/ava-labs/coreth v0.13.8-fixed-genesis-upgrade.0.20240813192659-6958df88a24c + github.com/ava-labs/coreth v0.13.8-fixed-genesis-upgrade.0.20240813194342-7635a96aa180 github.com/ava-labs/ledger-avalanche/go v0.0.0-20240610153809-9c955cc90a95 github.com/btcsuite/btcd/btcutil v1.1.3 github.com/cockroachdb/pebble v0.0.0-20230928194634-aa077af62593 diff --git a/go.sum b/go.sum index 774265950d4..01035bcc71a 100644 --- a/go.sum +++ b/go.sum @@ -64,6 +64,8 @@ github.com/antithesishq/antithesis-sdk-go v0.3.8/go.mod h1:IUpT2DPAKh6i/YhSbt6Gl github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/ava-labs/coreth v0.13.8-fixed-genesis-upgrade.0.20240813192659-6958df88a24c h1:Ovr+3MNjWwOcppqfczcnmebn6ibTSeANqlnVfptVr+g= github.com/ava-labs/coreth v0.13.8-fixed-genesis-upgrade.0.20240813192659-6958df88a24c/go.mod h1:xpiR0U17XmLbsWG8u/z8ZlkWBase0hQerYcKM5A/wm8= +github.com/ava-labs/coreth v0.13.8-fixed-genesis-upgrade.0.20240813194342-7635a96aa180 h1:6aIHp7wbyGVYdhHVQUbG7BEcbCMEQ5SYopPPJyipyvk= +github.com/ava-labs/coreth v0.13.8-fixed-genesis-upgrade.0.20240813194342-7635a96aa180/go.mod h1:/wNBVq7J7wlC2Kbov7kk6LV5xZvau7VF9zwTVOeyAjY= github.com/ava-labs/ledger-avalanche/go v0.0.0-20240610153809-9c955cc90a95 h1:dOVbtdnZL++pENdTCNZ1nu41eYDQkTML4sWebDnnq8c= github.com/ava-labs/ledger-avalanche/go v0.0.0-20240610153809-9c955cc90a95/go.mod h1:pJxaT9bUgeRNVmNRgtCHb7sFDIRKy7CzTQVi8gGNT6g= github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible/go.mod h1:osfaiScAUVup+UC9Nfq76eWqDhXlp+4UYaA8uhTBO6g= From 6023a8d13cf83ab1aa76946ebd38408614b71b6c Mon Sep 17 00:00:00 2001 From: Darioush Jalali Date: Tue, 13 Aug 2024 12:50:20 -0700 Subject: [PATCH 22/23] fix --- snow/engine/common/engine.go | 6 +----- tests/upgrade/upgrade_test.go | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/snow/engine/common/engine.go b/snow/engine/common/engine.go index 1fa0cbefb7a..537e33c5f19 100644 --- a/snow/engine/common/engine.go +++ b/snow/engine/common/engine.go @@ -348,7 +348,7 @@ type ChitsHandler interface { ) error } -type NetworkAppHandler interface { +type AppHandler interface { AppRequestHandler AppResponseHandler AppGossipHandler @@ -415,10 +415,6 @@ type AppGossipHandler interface { ) error } -type AppHandler interface { - NetworkAppHandler -} - type InternalHandler interface { // Notify this engine of peer changes. validators.Connector diff --git a/tests/upgrade/upgrade_test.go b/tests/upgrade/upgrade_test.go index 374af3385f8..de8f292a1d1 100644 --- a/tests/upgrade/upgrade_test.go +++ b/tests/upgrade/upgrade_test.go @@ -61,7 +61,7 @@ var _ = ginkgo.Describe("[Upgrade]", func() { cChainGenesisStr := network.Genesis.CChainGenesis require.NoError(json.Unmarshal([]byte(cChainGenesisStr), cChainGenesis)) unscheduledActivationTime := uint64(upgrade.UnscheduledActivationTime.Unix()) - cChainGenesis.Config.EUpgradeTime = &unscheduledActivationTime + cChainGenesis.Config.EtnaTime = &unscheduledActivationTime cChainGenesisBytes, err := json.Marshal(cChainGenesis) require.NoError(err) network.Genesis.CChainGenesis = string(cChainGenesisBytes) From 58e36f8a630c9a0f98d6a61d7472389050ed4c29 Mon Sep 17 00:00:00 2001 From: Darioush Jalali Date: Tue, 13 Aug 2024 12:51:47 -0700 Subject: [PATCH 23/23] go mod tidy --- go.sum | 2 -- 1 file changed, 2 deletions(-) diff --git a/go.sum b/go.sum index 01035bcc71a..5881b9005f4 100644 --- a/go.sum +++ b/go.sum @@ -62,8 +62,6 @@ github.com/allegro/bigcache v1.2.1-0.20190218064605-e24eb225f156/go.mod h1:Cb/ax github.com/antithesishq/antithesis-sdk-go v0.3.8 h1:OvGoHxIcOXFJLyn9IJQ5DzByZ3YVAWNBc394ObzDRb8= github.com/antithesishq/antithesis-sdk-go v0.3.8/go.mod h1:IUpT2DPAKh6i/YhSbt6Gl3v2yvUZjmKncl7U91fup7E= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= -github.com/ava-labs/coreth v0.13.8-fixed-genesis-upgrade.0.20240813192659-6958df88a24c h1:Ovr+3MNjWwOcppqfczcnmebn6ibTSeANqlnVfptVr+g= -github.com/ava-labs/coreth v0.13.8-fixed-genesis-upgrade.0.20240813192659-6958df88a24c/go.mod h1:xpiR0U17XmLbsWG8u/z8ZlkWBase0hQerYcKM5A/wm8= github.com/ava-labs/coreth v0.13.8-fixed-genesis-upgrade.0.20240813194342-7635a96aa180 h1:6aIHp7wbyGVYdhHVQUbG7BEcbCMEQ5SYopPPJyipyvk= github.com/ava-labs/coreth v0.13.8-fixed-genesis-upgrade.0.20240813194342-7635a96aa180/go.mod h1:/wNBVq7J7wlC2Kbov7kk6LV5xZvau7VF9zwTVOeyAjY= github.com/ava-labs/ledger-avalanche/go v0.0.0-20240610153809-9c955cc90a95 h1:dOVbtdnZL++pENdTCNZ1nu41eYDQkTML4sWebDnnq8c=