From 6b81a3cfd2a6f3fba16aa781f6b058d9a4bae6ad Mon Sep 17 00:00:00 2001 From: Haiyi Zhong Date: Tue, 1 Oct 2024 00:44:07 +0800 Subject: [PATCH 1/8] lowercase dest chain --- x/axelarnet/message_handler.go | 1 + 1 file changed, 1 insertion(+) diff --git a/x/axelarnet/message_handler.go b/x/axelarnet/message_handler.go index 8c92bde01..9cd9199a3 100644 --- a/x/axelarnet/message_handler.go +++ b/x/axelarnet/message_handler.go @@ -400,6 +400,7 @@ func deductFee(ctx sdk.Context, b types.BankKeeper, fee *Fee, token keeper.Coin, feeAmount := funcs.MustOk(sdk.NewIntFromString(fee.Amount)) coin := sdk.NewCoin(funcs.Must(token.GetOriginalDenom()), feeAmount) recipient := funcs.Must(sdk.AccAddressFromBech32(fee.Recipient)) + destinationChain = nexus.ChainName(strings.ToLower(destinationChain.String())) feePaidEvent := types.FeePaid{ MessageID: msgID, From 4663d99d49ab8a4f27adb5902b8d90e21bd1c208 Mon Sep 17 00:00:00 2001 From: Haiyi Zhong Date: Tue, 1 Oct 2024 03:11:44 +0800 Subject: [PATCH 2/8] Revert "lowercase dest chain" This reverts commit 6b81a3cfd2a6f3fba16aa781f6b058d9a4bae6ad. --- x/axelarnet/message_handler.go | 1 - 1 file changed, 1 deletion(-) diff --git a/x/axelarnet/message_handler.go b/x/axelarnet/message_handler.go index 9cd9199a3..8c92bde01 100644 --- a/x/axelarnet/message_handler.go +++ b/x/axelarnet/message_handler.go @@ -400,7 +400,6 @@ func deductFee(ctx sdk.Context, b types.BankKeeper, fee *Fee, token keeper.Coin, feeAmount := funcs.MustOk(sdk.NewIntFromString(fee.Amount)) coin := sdk.NewCoin(funcs.Must(token.GetOriginalDenom()), feeAmount) recipient := funcs.Must(sdk.AccAddressFromBech32(fee.Recipient)) - destinationChain = nexus.ChainName(strings.ToLower(destinationChain.String())) feePaidEvent := types.FeePaid{ MessageID: msgID, From 2b1b28dd2088b15c82f3d345e411aa80748d121d Mon Sep 17 00:00:00 2001 From: Haiyi Zhong Date: Thu, 26 Sep 2024 22:20:23 +0800 Subject: [PATCH 3/8] feat(nexus): gmp events metadata --- docs/proto/proto-docs.md | 6 + proto/axelar/nexus/v1beta1/events.proto | 26 +- x/nexus/keeper/general_message.go | 22 +- x/nexus/types/events.pb.go | 407 +++++++++++++++++++++--- 4 files changed, 404 insertions(+), 57 deletions(-) diff --git a/docs/proto/proto-docs.md b/docs/proto/proto-docs.md index c16a558aa..a568172db 100644 --- a/docs/proto/proto-docs.md +++ b/docs/proto/proto-docs.md @@ -6166,6 +6166,8 @@ Query defines the gRPC querier service. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | `id` | [string](#string) | | | +| `source_chain` | [string](#string) | | | +| `destination_chain` | [string](#string) | | | @@ -6181,6 +6183,8 @@ Query defines the gRPC querier service. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | `id` | [string](#string) | | | +| `source_chain` | [string](#string) | | | +| `destination_chain` | [string](#string) | | | @@ -6214,6 +6218,8 @@ Query defines the gRPC querier service. | `payload_hash` | [bytes](#bytes) | | | | `sender` | [axelar.nexus.exported.v1beta1.CrossChainAddress](#axelar.nexus.exported.v1beta1.CrossChainAddress) | | | | `recipient` | [axelar.nexus.exported.v1beta1.CrossChainAddress](#axelar.nexus.exported.v1beta1.CrossChainAddress) | | | +| `source_chain` | [string](#string) | | | +| `destination_chain` | [string](#string) | | | diff --git a/proto/axelar/nexus/v1beta1/events.proto b/proto/axelar/nexus/v1beta1/events.proto index 7ec5ec829..d93409e82 100644 --- a/proto/axelar/nexus/v1beta1/events.proto +++ b/proto/axelar/nexus/v1beta1/events.proto @@ -53,13 +53,35 @@ message MessageReceived { [ (gogoproto.nullable) = false ]; exported.v1beta1.CrossChainAddress recipient = 4 [ (gogoproto.nullable) = false ]; + string source_chain = 5 + [ (gogoproto.casttype) = + "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" ]; + string destination_chain = 6 + [ (gogoproto.casttype) = + "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" ]; } message MessageProcessing { string id = 1 [ (gogoproto.customname) = "ID" ]; } -message MessageExecuted { string id = 1 [ (gogoproto.customname) = "ID" ]; } +message MessageExecuted { + string id = 1 [ (gogoproto.customname) = "ID" ]; + string source_chain = 2 + [ (gogoproto.casttype) = + "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" ]; + string destination_chain = 3 + [ (gogoproto.casttype) = + "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" ]; +} -message MessageFailed { string id = 1 [ (gogoproto.customname) = "ID" ]; } +message MessageFailed { + string id = 1 [ (gogoproto.customname) = "ID" ]; + string source_chain = 2 + [ (gogoproto.casttype) = + "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" ]; + string destination_chain = 3 + [ (gogoproto.casttype) = + "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" ]; +} message WasmMessageRouted { exported.v1beta1.WasmMessage message = 1 [ (gogoproto.nullable) = false ]; diff --git a/x/nexus/keeper/general_message.go b/x/nexus/keeper/general_message.go index 2ee7c80f9..10827e953 100644 --- a/x/nexus/keeper/general_message.go +++ b/x/nexus/keeper/general_message.go @@ -54,7 +54,11 @@ func (k Keeper) SetMessageExecuted(ctx sdk.Context, id string) error { m.Status = exported.Executed - funcs.MustNoErr(ctx.EventManager().EmitTypedEvent(&types.MessageExecuted{ID: m.ID})) + funcs.MustNoErr(ctx.EventManager().EmitTypedEvent(&types.MessageExecuted{ + ID: m.ID, + SourceChain: m.GetSourceChain(), + DestinationChain: m.GetDestinationChain(), + })) return k.setMessage(ctx, m) } @@ -74,7 +78,11 @@ func (k Keeper) SetMessageFailed(ctx sdk.Context, id string) error { m.Status = exported.Failed - funcs.MustNoErr(ctx.EventManager().EmitTypedEvent(&types.MessageFailed{ID: m.ID})) + funcs.MustNoErr(ctx.EventManager().EmitTypedEvent(&types.MessageFailed{ + ID: m.ID, + SourceChain: m.GetSourceChain(), + DestinationChain: m.GetDestinationChain(), + })) return k.setMessage(ctx, m) } @@ -152,10 +160,12 @@ func (k Keeper) SetNewMessage(ctx sdk.Context, msg exported.GeneralMessage) erro } funcs.MustNoErr(ctx.EventManager().EmitTypedEvent(&types.MessageReceived{ - ID: msg.ID, - PayloadHash: msg.PayloadHash, - Sender: msg.Sender, - Recipient: msg.Recipient, + ID: msg.ID, + PayloadHash: msg.PayloadHash, + Sender: msg.Sender, + Recipient: msg.Recipient, + SourceChain: msg.GetSourceChain(), + DestinationChain: msg.GetDestinationChain(), })) return k.setMessage(ctx, msg) diff --git a/x/nexus/types/events.pb.go b/x/nexus/types/events.pb.go index 02bf10c66..08811185e 100644 --- a/x/nexus/types/events.pb.go +++ b/x/nexus/types/events.pb.go @@ -255,10 +255,12 @@ func (*RateLimitUpdated) XXX_MessageName() string { } type MessageReceived struct { - ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - PayloadHash []byte `protobuf:"bytes,2,opt,name=payload_hash,json=payloadHash,proto3" json:"payload_hash,omitempty"` - Sender exported.CrossChainAddress `protobuf:"bytes,3,opt,name=sender,proto3" json:"sender"` - Recipient exported.CrossChainAddress `protobuf:"bytes,4,opt,name=recipient,proto3" json:"recipient"` + ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + PayloadHash []byte `protobuf:"bytes,2,opt,name=payload_hash,json=payloadHash,proto3" json:"payload_hash,omitempty"` + Sender exported.CrossChainAddress `protobuf:"bytes,3,opt,name=sender,proto3" json:"sender"` + Recipient exported.CrossChainAddress `protobuf:"bytes,4,opt,name=recipient,proto3" json:"recipient"` + SourceChain github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName `protobuf:"bytes,5,opt,name=source_chain,json=sourceChain,proto3,casttype=github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" json:"source_chain,omitempty"` + DestinationChain github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName `protobuf:"bytes,6,opt,name=destination_chain,json=destinationChain,proto3,casttype=github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" json:"destination_chain,omitempty"` } func (m *MessageReceived) Reset() { *m = MessageReceived{} } @@ -322,6 +324,20 @@ func (m *MessageReceived) GetRecipient() exported.CrossChainAddress { return exported.CrossChainAddress{} } +func (m *MessageReceived) GetSourceChain() github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName { + if m != nil { + return m.SourceChain + } + return "" +} + +func (m *MessageReceived) GetDestinationChain() github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName { + if m != nil { + return m.DestinationChain + } + return "" +} + func (*MessageReceived) XXX_MessageName() string { return "axelar.nexus.v1beta1.MessageReceived" } @@ -375,7 +391,9 @@ func (*MessageProcessing) XXX_MessageName() string { } type MessageExecuted struct { - ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + SourceChain github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName `protobuf:"bytes,2,opt,name=source_chain,json=sourceChain,proto3,casttype=github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" json:"source_chain,omitempty"` + DestinationChain github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName `protobuf:"bytes,3,opt,name=destination_chain,json=destinationChain,proto3,casttype=github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" json:"destination_chain,omitempty"` } func (m *MessageExecuted) Reset() { *m = MessageExecuted{} } @@ -418,12 +436,28 @@ func (m *MessageExecuted) GetID() string { return "" } +func (m *MessageExecuted) GetSourceChain() github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName { + if m != nil { + return m.SourceChain + } + return "" +} + +func (m *MessageExecuted) GetDestinationChain() github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName { + if m != nil { + return m.DestinationChain + } + return "" +} + func (*MessageExecuted) XXX_MessageName() string { return "axelar.nexus.v1beta1.MessageExecuted" } type MessageFailed struct { - ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + SourceChain github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName `protobuf:"bytes,2,opt,name=source_chain,json=sourceChain,proto3,casttype=github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" json:"source_chain,omitempty"` + DestinationChain github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName `protobuf:"bytes,3,opt,name=destination_chain,json=destinationChain,proto3,casttype=github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" json:"destination_chain,omitempty"` } func (m *MessageFailed) Reset() { *m = MessageFailed{} } @@ -466,6 +500,20 @@ func (m *MessageFailed) GetID() string { return "" } +func (m *MessageFailed) GetSourceChain() github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName { + if m != nil { + return m.SourceChain + } + return "" +} + +func (m *MessageFailed) GetDestinationChain() github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName { + if m != nil { + return m.DestinationChain + } + return "" +} + func (*MessageFailed) XXX_MessageName() string { return "axelar.nexus.v1beta1.MessageFailed" } @@ -531,49 +579,52 @@ func init() { func init() { proto.RegisterFile("axelar/nexus/v1beta1/events.proto", fileDescriptor_4433ea5171b09eb9) } var fileDescriptor_4433ea5171b09eb9 = []byte{ - // 658 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x55, 0xc1, 0x4f, 0x13, 0x4f, - 0x14, 0xee, 0xb6, 0xd0, 0xdf, 0x8f, 0x29, 0x0a, 0x6c, 0x88, 0xa9, 0x1c, 0xb6, 0xd0, 0x8b, 0x20, - 0x71, 0x57, 0x30, 0xc6, 0x83, 0x07, 0xb5, 0x54, 0x62, 0x8d, 0x12, 0xb2, 0xc1, 0x18, 0xbd, 0x34, - 0xd3, 0x9d, 0xd7, 0xed, 0xc4, 0xee, 0x4c, 0x33, 0x33, 0x0b, 0xe5, 0x4f, 0xf0, 0x60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xc7, 0x63, 0xc7, 0xfa, 0x3c, 0x76, 0xac, 0xf7, 0x13, 0xa7, 0x70, 0x34, 0x71, 0xac, - 0xe3, 0x89, 0x53, 0xf8, 0x38, 0x71, 0x0a, 0xaf, 0x37, 0x7f, 0x6b, 0x61, 0xf5, 0xdf, 0x45, 0xa7, - 0xac, 0xb7, 0xe9, 0xce, 0xb7, 0x00, 0x00, 0x00, 0xff, 0xff, 0xa2, 0x79, 0x15, 0x2b, 0xeb, 0x06, - 0x00, 0x00, + // 711 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x56, 0xbf, 0x6f, 0x13, 0x4b, + 0x10, 0xf6, 0xd9, 0xb1, 0xdf, 0xcb, 0x3a, 0xef, 0x25, 0x3e, 0x45, 0xc8, 0xa4, 0x38, 0x27, 0xae, + 0x02, 0x11, 0x77, 0x24, 0x08, 0x51, 0x50, 0x00, 0x8e, 0x89, 0x30, 0x82, 0x28, 0x3a, 0x05, 0x21, + 0x68, 0xac, 0xf5, 0xed, 0xd8, 0x5e, 0x61, 0xef, 0x5a, 0xbb, 0x7b, 0x89, 0x53, 0x22, 0x2a, 0x0a, + 0x24, 0x4a, 0xfe, 0xa4, 0x14, 0x14, 0x29, 0xa9, 0x0c, 0xd8, 0xff, 0x45, 0x2a, 0x74, 0x7b, 0x7b, + 0x97, 0x1f, 0x12, 0x10, 0xa2, 0x00, 0x05, 0x74, 0xeb, 0xf1, 0xcc, 0xf7, 0xcd, 0x7e, 0xdf, 0xec, + 0xe8, 0xd0, 0x12, 0x1e, 0x42, 0x0f, 0x0b, 0x8f, 0xc1, 0x30, 0x94, 0xde, 0xce, 0x6a, 0x0b, 0x14, + 0x5e, 0xf5, 0x60, 0x07, 0x98, 0x92, 0xee, 0x40, 0x70, 0xc5, 0xed, 0xf9, 0x38, 0xc5, 0xd5, 0x29, + 0xae, 0x49, 0x59, 0x70, 0x3a, 0x9c, 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0x61, 0xe2, 0x64, 0x9e, 0xaf, 0xfd, 0xd0, + 0x8d, 0xf4, 0xe7, 0x4b, 0xab, 0xa0, 0xb7, 0xdb, 0x8d, 0x2f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x6e, + 0x16, 0x4d, 0x30, 0x7b, 0x09, 0x00, 0x00, } func (m *FeeDeducted) Marshal() (dAtA []byte, err error) { @@ -768,6 +819,20 @@ func (m *MessageReceived) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.DestinationChain) > 0 { + i -= len(m.DestinationChain) + copy(dAtA[i:], m.DestinationChain) + i = encodeVarintEvents(dAtA, i, uint64(len(m.DestinationChain))) + i-- + dAtA[i] = 0x32 + } + if len(m.SourceChain) > 0 { + i -= len(m.SourceChain) + copy(dAtA[i:], m.SourceChain) + i = encodeVarintEvents(dAtA, i, uint64(len(m.SourceChain))) + i-- + dAtA[i] = 0x2a + } { size, err := m.Recipient.MarshalToSizedBuffer(dAtA[:i]) if err != nil { @@ -855,6 +920,20 @@ func (m *MessageExecuted) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.DestinationChain) > 0 { + i -= len(m.DestinationChain) + copy(dAtA[i:], m.DestinationChain) + i = encodeVarintEvents(dAtA, i, uint64(len(m.DestinationChain))) + i-- + dAtA[i] = 0x1a + } + if len(m.SourceChain) > 0 { + i -= len(m.SourceChain) + copy(dAtA[i:], m.SourceChain) + i = encodeVarintEvents(dAtA, i, uint64(len(m.SourceChain))) + i-- + dAtA[i] = 0x12 + } if len(m.ID) > 0 { i -= len(m.ID) copy(dAtA[i:], m.ID) @@ -885,6 +964,20 @@ func (m *MessageFailed) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.DestinationChain) > 0 { + i -= len(m.DestinationChain) + copy(dAtA[i:], m.DestinationChain) + i = encodeVarintEvents(dAtA, i, uint64(len(m.DestinationChain))) + i-- + dAtA[i] = 0x1a + } + if len(m.SourceChain) > 0 { + i -= len(m.SourceChain) + copy(dAtA[i:], m.SourceChain) + i = encodeVarintEvents(dAtA, i, uint64(len(m.SourceChain))) + i-- + dAtA[i] = 0x12 + } if len(m.ID) > 0 { i -= len(m.ID) copy(dAtA[i:], m.ID) @@ -1022,6 +1115,14 @@ func (m *MessageReceived) Size() (n int) { n += 1 + l + sovEvents(uint64(l)) l = m.Recipient.Size() n += 1 + l + sovEvents(uint64(l)) + l = len(m.SourceChain) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.DestinationChain) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } return n } @@ -1048,6 +1149,14 @@ func (m *MessageExecuted) Size() (n int) { if l > 0 { n += 1 + l + sovEvents(uint64(l)) } + l = len(m.SourceChain) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.DestinationChain) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } return n } @@ -1061,6 +1170,14 @@ func (m *MessageFailed) Size() (n int) { if l > 0 { n += 1 + l + sovEvents(uint64(l)) } + l = len(m.SourceChain) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.DestinationChain) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } return n } @@ -1788,6 +1905,70 @@ func (m *MessageReceived) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SourceChain", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SourceChain = github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DestinationChain", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DestinationChain = github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipEvents(dAtA[iNdEx:]) @@ -1952,6 +2133,70 @@ func (m *MessageExecuted) Unmarshal(dAtA []byte) error { } m.ID = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SourceChain", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SourceChain = github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DestinationChain", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DestinationChain = github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipEvents(dAtA[iNdEx:]) @@ -2034,6 +2279,70 @@ func (m *MessageFailed) Unmarshal(dAtA []byte) error { } m.ID = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SourceChain", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SourceChain = github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DestinationChain", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DestinationChain = github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipEvents(dAtA[iNdEx:]) From 5e8aa57ba6a85c369d8341521f4b1a17725343a7 Mon Sep 17 00:00:00 2001 From: Haiyi Zhong Date: Fri, 27 Sep 2024 02:40:29 +0800 Subject: [PATCH 4/8] metadata for FeePaid event --- docs/proto/proto-docs.md | 2 + proto/axelar/axelarnet/v1beta1/events.proto | 6 + x/axelarnet/keeper/msg_server.go | 10 +- x/axelarnet/message_handler.go | 29 +-- x/axelarnet/types/events.pb.go | 219 ++++++++++++++------ 5 files changed, 191 insertions(+), 75 deletions(-) diff --git a/docs/proto/proto-docs.md b/docs/proto/proto-docs.md index a568172db..42fd713fc 100644 --- a/docs/proto/proto-docs.md +++ b/docs/proto/proto-docs.md @@ -887,6 +887,8 @@ Msg defines the nexus Msg service. | `fee` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | | `refund_recipient` | [string](#string) | | | | `asset` | [string](#string) | | registered asset name in nexus | +| `source_chain` | [string](#string) | | | +| `destination_chain` | [string](#string) | | | diff --git a/proto/axelar/axelarnet/v1beta1/events.proto b/proto/axelar/axelarnet/v1beta1/events.proto index a5e9e0a67..8c25374d8 100644 --- a/proto/axelar/axelarnet/v1beta1/events.proto +++ b/proto/axelar/axelarnet/v1beta1/events.proto @@ -82,6 +82,12 @@ message FeePaid { cosmos.base.v1beta1.Coin fee = 3 [ (gogoproto.nullable) = false ]; string refund_recipient = 4; string asset = 5; // registered asset name in nexus + string source_chain = 6 + [ (gogoproto.casttype) = + "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" ]; + string destination_chain = 7 + [ (gogoproto.casttype) = + "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" ]; } message ContractCallSubmitted { diff --git a/x/axelarnet/keeper/msg_server.go b/x/axelarnet/keeper/msg_server.go index 99bb342b0..ddde89ace 100644 --- a/x/axelarnet/keeper/msg_server.go +++ b/x/axelarnet/keeper/msg_server.go @@ -93,10 +93,12 @@ func (s msgServer) CallContract(c context.Context, req *types.CallContractReques } feePaidEvent := types.FeePaid{ - MessageID: msgID, - Recipient: req.Fee.Recipient, - Fee: req.Fee.Amount, - Asset: token.GetDenom(), + MessageID: msgID, + Recipient: req.Fee.Recipient, + Fee: req.Fee.Amount, + Asset: token.GetDenom(), + SourceChain: msg.GetSourceChain(), + DestinationChain: msg.GetDestinationChain(), } if req.Fee.RefundRecipient != nil { feePaidEvent.RefundRecipient = req.Fee.RefundRecipient.String() diff --git a/x/axelarnet/message_handler.go b/x/axelarnet/message_handler.go index 8c92bde01..818a097dd 100644 --- a/x/axelarnet/message_handler.go +++ b/x/axelarnet/message_handler.go @@ -246,12 +246,6 @@ func validateMessage(ctx sdk.Context, ibcK keeper.IBCKeeper, n types.Nexus, ibcP func handleMessage(ctx sdk.Context, n types.Nexus, b types.BankKeeper, sourceAddress nexus.CrossChainAddress, msg Message, token keeper.Coin) error { id, txID, nonce := n.GenerateMessageID(ctx) - // ignore token for call contract - _, err := deductFee(ctx, b, msg.Fee, token, id) - if err != nil { - return err - } - destChain, ok := n.GetChain(ctx, nexus.ChainName(msg.DestinationChain)) if !ok { // try forwarding it to wasm router if destination chain is not registered @@ -260,6 +254,12 @@ func handleMessage(ctx sdk.Context, n types.Nexus, b types.BankKeeper, sourceAdd destChain = nexus.Chain{Name: destChainName, SupportsForeignAssets: false, KeyType: tss.None, Module: wasm.ModuleName} } + // ignore token for call contract + _, err := deductFee(ctx, b, msg.Fee, token, id, sourceAddress.Chain.Name, destChain.Name) + if err != nil { + return err + } + recipient := nexus.CrossChainAddress{Chain: destChain, Address: msg.DestinationAddress} m := nexus.NewGeneralMessage( id, @@ -287,7 +287,9 @@ func handleMessage(ctx sdk.Context, n types.Nexus, b types.BankKeeper, sourceAdd func handleMessageWithToken(ctx sdk.Context, n types.Nexus, b types.BankKeeper, sourceAddress nexus.CrossChainAddress, msg Message, token keeper.Coin) error { id, txID, nonce := n.GenerateMessageID(ctx) - token, err := deductFee(ctx, b, msg.Fee, token, id) + destChain := funcs.MustOk(n.GetChain(ctx, nexus.ChainName(msg.DestinationChain))) + + token, err := deductFee(ctx, b, msg.Fee, token, id, sourceAddress.Chain.Name, destChain.Name) if err != nil { return err } @@ -296,7 +298,6 @@ func handleMessageWithToken(ctx sdk.Context, n types.Nexus, b types.BankKeeper, return err } - destChain := funcs.MustOk(n.GetChain(ctx, nexus.ChainName(msg.DestinationChain))) recipient := nexus.CrossChainAddress{Chain: destChain, Address: msg.DestinationAddress} m := nexus.NewGeneralMessage( id, @@ -392,7 +393,7 @@ func extractTokenFromPacketData(ctx sdk.Context, ibcK keeper.IBCKeeper, n types. } // deductFee pays the fee and returns the updated transfer amount with the fee deducted -func deductFee(ctx sdk.Context, b types.BankKeeper, fee *Fee, token keeper.Coin, msgID string) (keeper.Coin, error) { +func deductFee(ctx sdk.Context, b types.BankKeeper, fee *Fee, token keeper.Coin, msgID string, sourceChain nexus.ChainName, destinationChain nexus.ChainName) (keeper.Coin, error) { if fee == nil { return token, nil } @@ -402,10 +403,12 @@ func deductFee(ctx sdk.Context, b types.BankKeeper, fee *Fee, token keeper.Coin, recipient := funcs.Must(sdk.AccAddressFromBech32(fee.Recipient)) feePaidEvent := types.FeePaid{ - MessageID: msgID, - Recipient: recipient, - Fee: coin, - Asset: token.GetDenom(), + MessageID: msgID, + Recipient: recipient, + Fee: coin, + Asset: token.GetDenom(), + SourceChain: sourceChain, + DestinationChain: destinationChain, } if fee.RefundRecipient != nil { feePaidEvent.RefundRecipient = *fee.RefundRecipient diff --git a/x/axelarnet/types/events.pb.go b/x/axelarnet/types/events.pb.go index 6a705ce1d..6c249252d 100644 --- a/x/axelarnet/types/events.pb.go +++ b/x/axelarnet/types/events.pb.go @@ -494,11 +494,13 @@ func (*FeeCollected) XXX_MessageName() string { } type FeePaid struct { - MessageID string `protobuf:"bytes,1,opt,name=message_id,json=messageId,proto3" json:"message_id,omitempty"` - Recipient github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,2,opt,name=recipient,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"recipient,omitempty"` - Fee types.Coin `protobuf:"bytes,3,opt,name=fee,proto3" json:"fee"` - RefundRecipient string `protobuf:"bytes,4,opt,name=refund_recipient,json=refundRecipient,proto3" json:"refund_recipient,omitempty"` - Asset string `protobuf:"bytes,5,opt,name=asset,proto3" json:"asset,omitempty"` + MessageID string `protobuf:"bytes,1,opt,name=message_id,json=messageId,proto3" json:"message_id,omitempty"` + Recipient github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,2,opt,name=recipient,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"recipient,omitempty"` + Fee types.Coin `protobuf:"bytes,3,opt,name=fee,proto3" json:"fee"` + RefundRecipient string `protobuf:"bytes,4,opt,name=refund_recipient,json=refundRecipient,proto3" json:"refund_recipient,omitempty"` + Asset string `protobuf:"bytes,5,opt,name=asset,proto3" json:"asset,omitempty"` + SourceChain github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName `protobuf:"bytes,6,opt,name=source_chain,json=sourceChain,proto3,casttype=github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" json:"source_chain,omitempty"` + DestinationChain github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName `protobuf:"bytes,7,opt,name=destination_chain,json=destinationChain,proto3,casttype=github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" json:"destination_chain,omitempty"` } func (m *FeePaid) Reset() { *m = FeePaid{} } @@ -569,6 +571,20 @@ func (m *FeePaid) GetAsset() string { return "" } +func (m *FeePaid) GetSourceChain() github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName { + if m != nil { + return m.SourceChain + } + return "" +} + +func (m *FeePaid) GetDestinationChain() github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName { + if m != nil { + return m.DestinationChain + } + return "" +} + func (*FeePaid) XXX_MessageName() string { return "axelar.axelarnet.v1beta1.FeePaid" } @@ -878,59 +894,60 @@ func init() { } var fileDescriptor_7e862d506c60b5a3 = []byte{ - // 830 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x57, 0x41, 0x6f, 0xe3, 0x44, - 0x14, 0xae, 0x9d, 0x6c, 0xba, 0x79, 0x0d, 0x6a, 0x77, 0x28, 0x10, 0x2a, 0xe4, 0x94, 0x20, 0xa4, - 0xae, 0x44, 0x6d, 0x15, 0x04, 0x57, 0x68, 0x5c, 0x55, 0x04, 0x09, 0x58, 0x79, 0x2b, 0x21, 0xed, - 0x25, 0x9a, 0x8c, 0x5f, 0x9b, 0x51, 0x9d, 0x99, 0x30, 0x33, 0x59, 0xba, 0xff, 0x02, 0xf1, 0x07, - 0xf8, 0x3b, 0x3d, 0xee, 0x05, 0x69, 0xc5, 0xc1, 0x40, 0x7a, 0xe7, 0x07, 0x54, 0x1c, 0x90, 0x3d, - 0x93, 0xc4, 0xbb, 0x12, 0xa8, 0x5d, 0x6d, 0x11, 0xa2, 0x9c, 0xec, 0x79, 0xf3, 0xe9, 0xcd, 0xfb, - 0xbe, 0xef, 0xcd, 0xb3, 0x0c, 0xef, 0xd3, 0x33, 0xcc, 0xa8, 0x8a, 0xec, 0x43, 0xa0, 0x89, 0x1e, - 0xef, 0x0d, 0xd1, 0xd0, 0xbd, 0x08, 0x1f, 0xa3, 0x30, 0x3a, 0x9c, 0x28, 0x69, 0x24, 0x69, 0xdb, - 0xfd, 0x70, 0x01, 0x0b, 0x1d, 0x6c, 0x6b, 0xf3, 0x44, 0x9e, 0xc8, 0x12, 0x14, 0x15, 0x6f, 0x16, - 0xbf, 0x15, 0x30, 0xa9, 0xc7,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, 0xea, 0xfe, 0x52, 0x83, 0xa0, 0xea, 0xd0, 0x37, 0xdc, - 0x8c, 0x8e, 0xe4, 0x29, 0x8a, 0xff, 0xad, 0xfa, 0x97, 0x59, 0xb5, 0x9c, 0x9a, 0x77, 0xaf, 0x33, - 0x35, 0xbb, 0x3f, 0xd7, 0xa0, 0x69, 0x1d, 0x2d, 0xee, 0xa9, 0x86, 0x35, 0xe3, 0x06, 0xf6, 0x60, - 0xf1, 0x0d, 0x48, 0x66, 0x79, 0x07, 0x96, 0x73, 0xfc, 0x95, 0x7c, 0x0b, 0x60, 0x7e, 0xcc, 0xad, - 0xec, 0x89, 0x08, 0x5e, 0xaf, 0x9e, 0xf8, 0x7c, 0x5b, 0x90, 0xca, 0xd6, 0xbc, 0x33, 0x16, 0xe6, - 0x36, 0xae, 0x63, 0x6e, 0xef, 0xe8, 0x7c, 0x16, 0x78, 0x4f, 0x67, 0x81, 0xf7, 0xeb, 0x2c, 0xf0, - 0xbe, 0xbf, 0x08, 0x56, 0xce, 0x2f, 0x02, 0xef, 0xe9, 0x45, 0xb0, 0xf2, 0xec, 0x22, 0x58, 0x79, - 0xf4, 0xc9, 0x15, 0x89, 0x2d, 0x7f, 0x89, 0xca, 0x0f, 0xc8, 0xb0, 0x51, 0xfe, 0xba, 0x7c, 0xf4, - 0x67, 0x00, 0x00, 0x00, 0xff, 0xff, 0x49, 0xfb, 0xe1, 0xd9, 0x33, 0x0d, 0x00, 0x00, + // 837 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x57, 0x4f, 0x6f, 0xe3, 0x44, + 0x14, 0xaf, 0xed, 0x6c, 0xb2, 0x79, 0x0d, 0xea, 0xae, 0x29, 0x10, 0x2a, 0xe4, 0x94, 0x20, 0xa4, + 0x22, 0x51, 0x5b, 0x05, 0xc1, 0x15, 0x1a, 0x57, 0x15, 0x46, 0x02, 0x56, 0xde, 0x4a, 0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 0x16, 0xe2, 0x36, 0xaf, 0x23, 0xee, 0xe0, 0xe8, 0x7c, 0xee, + 0x59, 0x8f, 0xe7, 0x9e, 0xf5, 0xfb, 0xdc, 0xb3, 0x7e, 0xb8, 0xf0, 0xd6, 0xce, 0x2f, 0x3c, 0xeb, + 0xf1, 0x85, 0xb7, 0xf6, 0xe4, 0xc2, 0x5b, 0x7b, 0xf0, 0xe9, 0x15, 0x81, 0x2d, 0x7f, 0xf6, 0xca, + 0xd1, 0x38, 0x6a, 0x96, 0x3f, 0x65, 0x1f, 0xff, 0x15, 0x00, 0x00, 0xff, 0xff, 0x5b, 0x9c, 0x09, + 0x02, 0x0d, 0x0e, 0x00, 0x00, } func (m *IBCTransferSent) Marshal() (dAtA []byte, err error) { @@ -1281,6 +1298,20 @@ func (m *FeePaid) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.DestinationChain) > 0 { + i -= len(m.DestinationChain) + copy(dAtA[i:], m.DestinationChain) + i = encodeVarintEvents(dAtA, i, uint64(len(m.DestinationChain))) + i-- + dAtA[i] = 0x3a + } + if len(m.SourceChain) > 0 { + i -= len(m.SourceChain) + copy(dAtA[i:], m.SourceChain) + i = encodeVarintEvents(dAtA, i, uint64(len(m.SourceChain))) + i-- + dAtA[i] = 0x32 + } if len(m.Asset) > 0 { i -= len(m.Asset) copy(dAtA[i:], m.Asset) @@ -1726,6 +1757,14 @@ func (m *FeePaid) Size() (n int) { if l > 0 { n += 1 + l + sovEvents(uint64(l)) } + l = len(m.SourceChain) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.DestinationChain) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } return n } @@ -3118,6 +3157,70 @@ func (m *FeePaid) Unmarshal(dAtA []byte) error { } m.Asset = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SourceChain", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SourceChain = github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DestinationChain", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DestinationChain = github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipEvents(dAtA[iNdEx:]) From 40f0a9287a1eaaf4a2d64468c6a397a28e2f0599 Mon Sep 17 00:00:00 2001 From: Haiyi Zhong Date: Fri, 27 Sep 2024 03:44:24 +0800 Subject: [PATCH 5/8] revert change for MessageReceived event --- docs/proto/proto-docs.md | 2 - proto/axelar/nexus/v1beta1/events.proto | 6 - x/nexus/keeper/general_message.go | 10 +- x/nexus/types/events.pb.go | 201 ++++++------------------ 4 files changed, 53 insertions(+), 166 deletions(-) diff --git a/docs/proto/proto-docs.md b/docs/proto/proto-docs.md index 42fd713fc..c8e744f5a 100644 --- a/docs/proto/proto-docs.md +++ b/docs/proto/proto-docs.md @@ -6220,8 +6220,6 @@ Query defines the gRPC querier service. | `payload_hash` | [bytes](#bytes) | | | | `sender` | [axelar.nexus.exported.v1beta1.CrossChainAddress](#axelar.nexus.exported.v1beta1.CrossChainAddress) | | | | `recipient` | [axelar.nexus.exported.v1beta1.CrossChainAddress](#axelar.nexus.exported.v1beta1.CrossChainAddress) | | | -| `source_chain` | [string](#string) | | | -| `destination_chain` | [string](#string) | | | diff --git a/proto/axelar/nexus/v1beta1/events.proto b/proto/axelar/nexus/v1beta1/events.proto index d93409e82..0c59809b2 100644 --- a/proto/axelar/nexus/v1beta1/events.proto +++ b/proto/axelar/nexus/v1beta1/events.proto @@ -53,12 +53,6 @@ message MessageReceived { [ (gogoproto.nullable) = false ]; exported.v1beta1.CrossChainAddress recipient = 4 [ (gogoproto.nullable) = false ]; - string source_chain = 5 - [ (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" ]; - string destination_chain = 6 - [ (gogoproto.casttype) = - "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" ]; } message MessageProcessing { string id = 1 [ (gogoproto.customname) = "ID" ]; } diff --git a/x/nexus/keeper/general_message.go b/x/nexus/keeper/general_message.go index 10827e953..6ae378e0d 100644 --- a/x/nexus/keeper/general_message.go +++ b/x/nexus/keeper/general_message.go @@ -160,12 +160,10 @@ func (k Keeper) SetNewMessage(ctx sdk.Context, msg exported.GeneralMessage) erro } funcs.MustNoErr(ctx.EventManager().EmitTypedEvent(&types.MessageReceived{ - ID: msg.ID, - PayloadHash: msg.PayloadHash, - Sender: msg.Sender, - Recipient: msg.Recipient, - SourceChain: msg.GetSourceChain(), - DestinationChain: msg.GetDestinationChain(), + ID: msg.ID, + PayloadHash: msg.PayloadHash, + Sender: msg.Sender, + Recipient: msg.Recipient, })) return k.setMessage(ctx, msg) diff --git a/x/nexus/types/events.pb.go b/x/nexus/types/events.pb.go index 08811185e..1574527d7 100644 --- a/x/nexus/types/events.pb.go +++ b/x/nexus/types/events.pb.go @@ -255,12 +255,10 @@ func (*RateLimitUpdated) XXX_MessageName() string { } type MessageReceived struct { - ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - PayloadHash []byte `protobuf:"bytes,2,opt,name=payload_hash,json=payloadHash,proto3" json:"payload_hash,omitempty"` - Sender exported.CrossChainAddress `protobuf:"bytes,3,opt,name=sender,proto3" json:"sender"` - Recipient exported.CrossChainAddress `protobuf:"bytes,4,opt,name=recipient,proto3" json:"recipient"` - SourceChain github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName `protobuf:"bytes,5,opt,name=source_chain,json=sourceChain,proto3,casttype=github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" json:"source_chain,omitempty"` - DestinationChain github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName `protobuf:"bytes,6,opt,name=destination_chain,json=destinationChain,proto3,casttype=github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" json:"destination_chain,omitempty"` + ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + PayloadHash []byte `protobuf:"bytes,2,opt,name=payload_hash,json=payloadHash,proto3" json:"payload_hash,omitempty"` + Sender exported.CrossChainAddress `protobuf:"bytes,3,opt,name=sender,proto3" json:"sender"` + Recipient exported.CrossChainAddress `protobuf:"bytes,4,opt,name=recipient,proto3" json:"recipient"` } func (m *MessageReceived) Reset() { *m = MessageReceived{} } @@ -324,20 +322,6 @@ func (m *MessageReceived) GetRecipient() exported.CrossChainAddress { return exported.CrossChainAddress{} } -func (m *MessageReceived) GetSourceChain() github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName { - if m != nil { - return m.SourceChain - } - return "" -} - -func (m *MessageReceived) GetDestinationChain() github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName { - if m != nil { - return m.DestinationChain - } - return "" -} - func (*MessageReceived) XXX_MessageName() string { return "axelar.nexus.v1beta1.MessageReceived" } @@ -579,52 +563,51 @@ func init() { func init() { proto.RegisterFile("axelar/nexus/v1beta1/events.proto", fileDescriptor_4433ea5171b09eb9) } var fileDescriptor_4433ea5171b09eb9 = []byte{ - // 711 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x56, 0xbf, 0x6f, 0x13, 0x4b, - 0x10, 0xf6, 0xd9, 0xb1, 0xdf, 0xcb, 0x3a, 0xef, 0x25, 0x3e, 0x45, 0xc8, 0xa4, 0x38, 0x27, 0xae, - 0x02, 0x11, 0x77, 0x24, 0x08, 0x51, 0x50, 0x00, 0x8e, 0x89, 0x30, 0x82, 0x28, 0x3a, 0x05, 0x21, - 0x68, 0xac, 0xf5, 0xed, 0xd8, 0x5e, 0x61, 0xef, 0x5a, 0xbb, 0x7b, 0x89, 0x53, 0x22, 0x2a, 0x0a, - 0x24, 0x4a, 0xfe, 0xa4, 0x14, 0x14, 0x29, 0xa9, 0x0c, 0xd8, 0xff, 0x45, 0x2a, 0x74, 0x7b, 0x7b, - 0x97, 0x1f, 0x12, 0x10, 0xa2, 0x00, 0x05, 0x74, 0xeb, 0xf1, 0xcc, 0xf7, 0xcd, 0x7e, 0xdf, 0xec, - 0xe8, 0xd0, 0x12, 0x1e, 0x42, 0x0f, 0x0b, 0x8f, 0xc1, 0x30, 0x94, 0xde, 0xce, 0x6a, 0x0b, 0x14, - 0x5e, 0xf5, 0x60, 0x07, 0x98, 0x92, 0xee, 0x40, 0x70, 0xc5, 0xed, 0xf9, 0x38, 0xc5, 0xd5, 0x29, - 0xae, 0x49, 0x59, 0x70, 0x3a, 0x9c, 0x77, 0x7a, 0xe0, 0xe9, 0x9c, 0x56, 0xd8, 0xf6, 0x48, 0x28, - 0xb0, 0xa2, 0x9c, 0xc5, 0x55, 0x0b, 0xf3, 0x1d, 0xde, 0xe1, 0xfa, 0xe8, 0x45, 0x27, 0x13, 0x75, - 0x02, 0x2e, 0xfb, 0x5c, 0x7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 0x13, 0xd7, 0x62, 0x14, 0x7b, 0x1b, 0x4d, 0xa7, 0x23, 0x60, 0x1c, 0x3f, 0x2f, 0xe4, 0x11, 0x90, - 0xdd, 0x46, 0x33, 0x92, 0x87, 0x22, 0x00, 0x33, 0xdc, 0xf9, 0x8b, 0xb3, 0xb2, 0x18, 0x03, 0xc7, - 0x93, 0x3d, 0x40, 0x25, 0x02, 0x52, 0x51, 0xa6, 0xd5, 0x37, 0x64, 0x85, 0x8b, 0x23, 0x9b, 0x3b, - 0x86, 0xae, 0xa3, 0xd5, 0x15, 0x54, 0x32, 0x6e, 0x6e, 0x09, 0x1e, 0x80, 0x94, 0x94, 0x75, 0xbe, - 0xe6, 0x67, 0xf5, 0x55, 0x36, 0xf5, 0xfe, 0xfe, 0x10, 0x82, 0x50, 0x7d, 0xc3, 0xfb, 0xd3, 0x92, - 0x65, 0x7f, 0xa5, 0x64, 0xb9, 0x9f, 0x29, 0xd9, 0xcb, 0x2c, 0xfa, 0xcf, 0xa8, 0xb0, 0x81, 0x69, - 0xef, 0x8f, 0xd4, 0xa0, 0x89, 0x4a, 0x4f, 0xb1, 0xec, 0x27, 0x8b, 0x80, 0xeb, 0x51, 0x78, 0x88, - 0xfe, 0xe9, 0xc7, 0x01, 0xad, 0x45, 0x71, 0xed, 0xea, 0x77, 0x5e, 0xde, 0x31, 0x08, 0xf3, 0xe6, - 0x12, 0x80, 0xda, 0xd6, 0xfe, 0xd8, 0xb1, 0x0e, 0xc6, 0x8e, 0xf5, 0x69, 0xec, 0x58, 0x6f, 0x27, - 0x4e, 0x66, 0x7f, 0xe2, 0x58, 0x07, 0x13, 0x27, 0xf3, 0x61, 0xe2, 0x64, 0x9e, 0xaf, 0xfd, 0xd0, - 0x8d, 0xf4, 0xe7, 0x4b, 0xab, 0xa0, 0xb7, 0xdb, 0x8d, 0x2f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x6e, - 0x16, 0x4d, 0x30, 0x7b, 0x09, 0x00, 0x00, + // 696 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x55, 0xcf, 0x4f, 0x13, 0x4f, + 0x14, 0xef, 0xb6, 0xd0, 0xef, 0x97, 0x29, 0x0a, 0xdd, 0x10, 0x53, 0x39, 0x6c, 0xa1, 0x27, 0x94, + 0xb8, 0x2b, 0x18, 0xe3, 0xc1, 0x83, 0x5a, 0x2a, 0xb1, 0x46, 0x09, 0xd9, 0x60, 0x8c, 0x5e, 0x9a, + 0xe9, 0xce, 0x6b, 0x3b, 0xb1, 0x9d, 0xd9, 0xcc, 0xcc, 0x42, 0x39, 0x1a, 0x4f, 0x1e, 0x4c, 0x3c, + 0xfa, 0x27, 0x71, 0xe4, 0xe8, 0xa9, 0x6a, 0xfb, 0x1f, 0x78, 0xe4, 0x64, 0x76, 0x76, 0x76, 0x01, + 0x13, 0x15, 0x09, 0x89, 0x07, 0xbd, 0x4d, 0x5f, 0xdf, 0xfb, 0x7c, 0xde, 0xfb, 0xbc, 0x1f, 0x8b, + 0x96, 0xf1, 0x10, 0xfa, 0x58, 0x78, 0x0c, 0x86, 0x91, 0xf4, 0x76, 0xd7, 0xda, 0xa0, 0xf0, 0x9a, + 0x07, 0xbb, 0xc0, 0x94, 0x74, 0x43, 0xc1, 0x15, 0xb7, 0x17, 0x12, 0x17, 0x57, 0xbb, 0xb8, 0xc6, + 0x65, 0xd1, 0xe9, 0x72, 0xde, 0xed, 0x83, 0xa7, 0x7d, 0xda, 0x51, 0xc7, 0x23, 0x91, 0xc0, 0x8a, + 0x72, 0x96, 0x44, 0x2d, 0x2e, 0x74, 0x79, 0x97, 0xeb, 0xa7, 0x17, 0xbf, 0x8c, 0xd5, 0x09, 0xb8, + 0x1c, 0x70, 0xe9, 0xb5, 0xb1, 0x84, 0x8c, 0x2d, 0xe0, 0x34, 0x8d, 0xba, 0x76, 0x2a, 0x1d, 0x18, + 0x86, 0x5c, 0x28, 0x20, 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36, 0x35, 0x6f, 0x0b, 0x1e, 0x80, 0x94, 0x94, 0x75, 0x7f, 0x54, 0x75, 0xed, 0x4d, 0x3e, + 0x53, 0xe8, 0xe1, 0x10, 0x82, 0x48, 0xfd, 0x44, 0xa1, 0x0e, 0x9a, 0x95, 0x3c, 0x12, 0x01, 0x5c, + 0xfc, 0xd6, 0x94, 0x12, 0xe0, 0x64, 0x65, 0x42, 0x54, 0x26, 0x20, 0x15, 0x65, 0xba, 0xad, 0x86, + 0xac, 0x70, 0x71, 0x64, 0xf3, 0x27, 0xd0, 0xb5, 0xb5, 0xf6, 0x3a, 0x8f, 0x2e, 0x19, 0x15, 0x36, + 0x31, 0xed, 0xff, 0x95, 0x1a, 0xb4, 0x50, 0xf9, 0x39, 0x96, 0x83, 0x74, 0x5d, 0xb8, 0x1e, 0x85, + 0xc7, 0xe8, 0xbf, 0x41, 0x62, 0xd0, 0x5a, 0x94, 0xd6, 0xaf, 0xff, 0x62, 0x3e, 0x4f, 0x40, 0x98, + 0xc9, 0x4c, 0x01, 0xea, 0xdb, 0x07, 0x63, 0xc7, 0x3a, 0x1c, 0x3b, 0xd6, 0xe7, 0xb1, 0x63, 0xbd, + 0x9f, 0x38, 0xb9, 0x83, 0x89, 0x63, 0x1d, 0x4e, 0x9c, 0xdc, 0xc7, 0x89, 0x93, 0x7b, 0xb9, 0xfe, + 0x5b, 0x15, 0xe9, 0x8f, 0x7c, 0xbb, 0xa8, 0x6f, 0xc0, 0xad, 0x6f, 0x01, 0x00, 0x00, 0xff, 0xff, + 0xea, 0x41, 0x45, 0x45, 0xa1, 0x08, 0x00, 0x00, } func (m *FeeDeducted) Marshal() (dAtA []byte, err error) { @@ -819,20 +802,6 @@ func (m *MessageReceived) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if len(m.DestinationChain) > 0 { - i -= len(m.DestinationChain) - copy(dAtA[i:], m.DestinationChain) - i = encodeVarintEvents(dAtA, i, uint64(len(m.DestinationChain))) - i-- - dAtA[i] = 0x32 - } - if len(m.SourceChain) > 0 { - i -= len(m.SourceChain) - copy(dAtA[i:], m.SourceChain) - i = encodeVarintEvents(dAtA, i, uint64(len(m.SourceChain))) - i-- - dAtA[i] = 0x2a - } { size, err := m.Recipient.MarshalToSizedBuffer(dAtA[:i]) if err != nil { @@ -1115,14 +1084,6 @@ func (m *MessageReceived) Size() (n int) { n += 1 + l + sovEvents(uint64(l)) l = m.Recipient.Size() n += 1 + l + sovEvents(uint64(l)) - l = len(m.SourceChain) - if l > 0 { - n += 1 + l + sovEvents(uint64(l)) - } - l = len(m.DestinationChain) - if l > 0 { - n += 1 + l + sovEvents(uint64(l)) - } return n } @@ -1905,70 +1866,6 @@ func (m *MessageReceived) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SourceChain", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvents - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.SourceChain = github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DestinationChain", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowEvents - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthEvents - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthEvents - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DestinationChain = github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName(dAtA[iNdEx:postIndex]) - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipEvents(dAtA[iNdEx:]) From 6472b091c80c9f116ae217058460e7f90730d425 Mon Sep 17 00:00:00 2001 From: Haiyi Zhong Date: Tue, 1 Oct 2024 00:44:07 +0800 Subject: [PATCH 6/8] lowercase dest chain --- x/axelarnet/message_handler.go | 1 + 1 file changed, 1 insertion(+) diff --git a/x/axelarnet/message_handler.go b/x/axelarnet/message_handler.go index 818a097dd..74bd42bdb 100644 --- a/x/axelarnet/message_handler.go +++ b/x/axelarnet/message_handler.go @@ -401,6 +401,7 @@ func deductFee(ctx sdk.Context, b types.BankKeeper, fee *Fee, token keeper.Coin, feeAmount := funcs.MustOk(sdk.NewIntFromString(fee.Amount)) coin := sdk.NewCoin(funcs.Must(token.GetOriginalDenom()), feeAmount) recipient := funcs.Must(sdk.AccAddressFromBech32(fee.Recipient)) + destinationChain = nexus.ChainName(strings.ToLower(destinationChain.String())) feePaidEvent := types.FeePaid{ MessageID: msgID, From 93598495a9d0236f5a93f56fd0f89a21e728e795 Mon Sep 17 00:00:00 2001 From: Haiyi Zhong Date: Fri, 27 Sep 2024 17:37:02 +0800 Subject: [PATCH 7/8] avoid concensus break --- x/axelarnet/message_handler.go | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/x/axelarnet/message_handler.go b/x/axelarnet/message_handler.go index 74bd42bdb..d612265e3 100644 --- a/x/axelarnet/message_handler.go +++ b/x/axelarnet/message_handler.go @@ -246,6 +246,12 @@ func validateMessage(ctx sdk.Context, ibcK keeper.IBCKeeper, n types.Nexus, ibcP func handleMessage(ctx sdk.Context, n types.Nexus, b types.BankKeeper, sourceAddress nexus.CrossChainAddress, msg Message, token keeper.Coin) error { id, txID, nonce := n.GenerateMessageID(ctx) + // ignore token for call contract + _, err := deductFee(ctx, b, msg.Fee, token, id, sourceAddress.Chain.Name, nexus.ChainName(msg.DestinationChain)) + if err != nil { + return err + } + destChain, ok := n.GetChain(ctx, nexus.ChainName(msg.DestinationChain)) if !ok { // try forwarding it to wasm router if destination chain is not registered @@ -254,12 +260,6 @@ func handleMessage(ctx sdk.Context, n types.Nexus, b types.BankKeeper, sourceAdd destChain = nexus.Chain{Name: destChainName, SupportsForeignAssets: false, KeyType: tss.None, Module: wasm.ModuleName} } - // ignore token for call contract - _, err := deductFee(ctx, b, msg.Fee, token, id, sourceAddress.Chain.Name, destChain.Name) - if err != nil { - return err - } - recipient := nexus.CrossChainAddress{Chain: destChain, Address: msg.DestinationAddress} m := nexus.NewGeneralMessage( id, @@ -287,9 +287,7 @@ func handleMessage(ctx sdk.Context, n types.Nexus, b types.BankKeeper, sourceAdd func handleMessageWithToken(ctx sdk.Context, n types.Nexus, b types.BankKeeper, sourceAddress nexus.CrossChainAddress, msg Message, token keeper.Coin) error { id, txID, nonce := n.GenerateMessageID(ctx) - destChain := funcs.MustOk(n.GetChain(ctx, nexus.ChainName(msg.DestinationChain))) - - token, err := deductFee(ctx, b, msg.Fee, token, id, sourceAddress.Chain.Name, destChain.Name) + token, err := deductFee(ctx, b, msg.Fee, token, id, sourceAddress.Chain.Name, nexus.ChainName(msg.DestinationChain)) if err != nil { return err } @@ -298,6 +296,7 @@ func handleMessageWithToken(ctx sdk.Context, n types.Nexus, b types.BankKeeper, return err } + destChain := funcs.MustOk(n.GetChain(ctx, nexus.ChainName(msg.DestinationChain))) recipient := nexus.CrossChainAddress{Chain: destChain, Address: msg.DestinationAddress} m := nexus.NewGeneralMessage( id, From bccdd2213c925645932226b3219924c81599f3ef Mon Sep 17 00:00:00 2001 From: Haiyi Zhong Date: Tue, 1 Oct 2024 03:19:07 +0800 Subject: [PATCH 8/8] address comments --- docs/proto/proto-docs.md | 2 + proto/axelar/nexus/v1beta1/events.proto | 10 +- x/axelarnet/message_handler.go | 1 + x/nexus/keeper/general_message.go | 6 +- x/nexus/types/events.pb.go | 194 ++++++++++++++++++------ 5 files changed, 165 insertions(+), 48 deletions(-) diff --git a/docs/proto/proto-docs.md b/docs/proto/proto-docs.md index c8e744f5a..0f400a786 100644 --- a/docs/proto/proto-docs.md +++ b/docs/proto/proto-docs.md @@ -6202,6 +6202,8 @@ Query defines the gRPC querier service. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | `id` | [string](#string) | | | +| `source_chain` | [string](#string) | | | +| `destination_chain` | [string](#string) | | | diff --git a/proto/axelar/nexus/v1beta1/events.proto b/proto/axelar/nexus/v1beta1/events.proto index 0c59809b2..4e443d5c4 100644 --- a/proto/axelar/nexus/v1beta1/events.proto +++ b/proto/axelar/nexus/v1beta1/events.proto @@ -55,7 +55,15 @@ message MessageReceived { [ (gogoproto.nullable) = false ]; } -message MessageProcessing { string id = 1 [ (gogoproto.customname) = "ID" ]; } +message MessageProcessing { + string id = 1 [ (gogoproto.customname) = "ID" ]; + string source_chain = 2 + [ (gogoproto.casttype) = + "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" ]; + string destination_chain = 3 + [ (gogoproto.casttype) = + "github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" ]; +} message MessageExecuted { string id = 1 [ (gogoproto.customname) = "ID" ]; diff --git a/x/axelarnet/message_handler.go b/x/axelarnet/message_handler.go index d612265e3..a3c94372a 100644 --- a/x/axelarnet/message_handler.go +++ b/x/axelarnet/message_handler.go @@ -400,6 +400,7 @@ func deductFee(ctx sdk.Context, b types.BankKeeper, fee *Fee, token keeper.Coin, feeAmount := funcs.MustOk(sdk.NewIntFromString(fee.Amount)) coin := sdk.NewCoin(funcs.Must(token.GetOriginalDenom()), feeAmount) recipient := funcs.Must(sdk.AccAddressFromBech32(fee.Recipient)) + // destination chain is from user input, normalize it to lowercase destinationChain = nexus.ChainName(strings.ToLower(destinationChain.String())) feePaidEvent := types.FeePaid{ diff --git a/x/nexus/keeper/general_message.go b/x/nexus/keeper/general_message.go index 6ae378e0d..144f60911 100644 --- a/x/nexus/keeper/general_message.go +++ b/x/nexus/keeper/general_message.go @@ -191,7 +191,11 @@ func (k Keeper) setMessageProcessing(ctx sdk.Context, id string) error { } funcs.MustNoErr(k.setProcessingMessageID(ctx, msg)) - funcs.MustNoErr(ctx.EventManager().EmitTypedEvent(&types.MessageProcessing{ID: msg.ID})) + funcs.MustNoErr(ctx.EventManager().EmitTypedEvent(&types.MessageProcessing{ + ID: msg.ID, + SourceChain: msg.GetSourceChain(), + DestinationChain: msg.GetDestinationChain(), + })) return nil } diff --git a/x/nexus/types/events.pb.go b/x/nexus/types/events.pb.go index 1574527d7..e67287133 100644 --- a/x/nexus/types/events.pb.go +++ b/x/nexus/types/events.pb.go @@ -327,7 +327,9 @@ func (*MessageReceived) XXX_MessageName() string { } type MessageProcessing struct { - ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + SourceChain github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName `protobuf:"bytes,2,opt,name=source_chain,json=sourceChain,proto3,casttype=github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" json:"source_chain,omitempty"` + DestinationChain github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName `protobuf:"bytes,3,opt,name=destination_chain,json=destinationChain,proto3,casttype=github.com/axelarnetwork/axelar-core/x/nexus/exported.ChainName" json:"destination_chain,omitempty"` } func (m *MessageProcessing) Reset() { *m = MessageProcessing{} } @@ -370,6 +372,20 @@ func (m *MessageProcessing) GetID() string { return "" } +func (m *MessageProcessing) GetSourceChain() github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName { + if m != nil { + return m.SourceChain + } + return "" +} + +func (m *MessageProcessing) GetDestinationChain() github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName { + if m != nil { + return m.DestinationChain + } + return "" +} + func (*MessageProcessing) XXX_MessageName() string { return "axelar.nexus.v1beta1.MessageProcessing" } @@ -563,51 +579,51 @@ func init() { func init() { proto.RegisterFile("axelar/nexus/v1beta1/events.proto", fileDescriptor_4433ea5171b09eb9) } var fileDescriptor_4433ea5171b09eb9 = []byte{ - // 696 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x55, 0xcf, 0x4f, 0x13, 0x4f, - 0x14, 0xef, 0xb6, 0xd0, 0xef, 0x97, 0x29, 0x0a, 0xdd, 0x10, 0x53, 0x39, 0x6c, 0xa1, 0x27, 0x94, - 0xb8, 0x2b, 0x18, 0xe3, 0xc1, 0x83, 0x5a, 0x2a, 0xb1, 0x46, 0x09, 0xd9, 0x60, 0x8c, 0x5e, 0x9a, - 0xe9, 0xce, 0x6b, 0x3b, 0xb1, 0x9d, 0xd9, 0xcc, 0xcc, 0x42, 0x39, 0x1a, 0x4f, 0x1e, 0x4c, 0x3c, - 0xfa, 0x27, 0x71, 0xe4, 0xe8, 0xa9, 0x6a, 0xfb, 0x1f, 0x78, 0xe4, 0x64, 0x76, 0x76, 0x76, 0x01, - 0x13, 0x15, 0x09, 0x89, 0x07, 0xbd, 0x4d, 0x5f, 0xdf, 0xfb, 0x7c, 0xde, 0xfb, 0xbc, 0x1f, 0x8b, - 0x96, 0xf1, 0x10, 0xfa, 0x58, 0x78, 0x0c, 0x86, 0x91, 0xf4, 0x76, 0xd7, 0xda, 0xa0, 0xf0, 0x9a, - 0x07, 0xbb, 0xc0, 0x94, 0x74, 0x43, 0xc1, 0x15, 0xb7, 0x17, 0x12, 0x17, 0x57, 0xbb, 0xb8, 0xc6, - 0x65, 0xd1, 0xe9, 0x72, 0xde, 0xed, 0x83, 0xa7, 0x7d, 0xda, 0x51, 0xc7, 0x23, 0x91, 0xc0, 0x8a, - 0x72, 0x96, 0x44, 0x2d, 0x2e, 0x74, 0x79, 0x97, 0xeb, 0xa7, 0x17, 0xbf, 0x8c, 0xd5, 0x09, 0xb8, - 0x1c, 0x70, 0xe9, 0xb5, 0xb1, 0x84, 0x8c, 0x2d, 0xe0, 0x34, 0x8d, 0xba, 0x76, 0x2a, 0x1d, 0x18, - 0x86, 0x5c, 0x28, 0x20, 0x99, 0xa7, 0xda, 0x0f, 0xc1, 0xa4, 0x55, 0x7b, 0x5b, 0x40, 0xa5, 0x4d, - 0x80, 0x06, 0x90, 0x28, 0x50, 0x40, 0x6c, 0x89, 0x4a, 0x4a, 0x60, 0x26, 0x3b, 0x20, 0x5a, 0x94, - 0x54, 0xac, 0x25, 0x6b, 0x65, 0xaa, 0xee, 0x8f, 0x47, 0x55, 0xb4, 0x63, 0xcc, 0xcd, 0xc6, 0xd1, - 0xa8, 0x7a, 0xbf, 0x4b, 0x55, 0x2f, 0x6a, 0xbb, 0x01, 0x1f, 0x78, 0x09, 0x19, 0x03, 0xb5, 0xc7, - 0xc5, 0x2b, 0xf3, 0xeb, 0x46, 0xc0, 0x05, 0x78, 0xc3, 0xef, 0x32, 0x70, 0x8f, 0x31, 0x7c, 0x94, - 0xd2, 0x34, 0x89, 0xdd, 0x47, 0x73, 0x02, 0x02, 0x1a, 0x52, 0x60, 0xaa, 0x15, 0xf4, 0x30, 0x65, - 0x95, 0xfc, 0x92, 0xb5, 0x32, 0x53, 0xdf, 0x38, 0x1a, 0x55, 0xef, 0x9d, 0x8f, 0x6a, 0x23, 0x86, - 0xd9, 0xc2, 0x03, 0xf0, 0x2f, 0x67, 0xd8, 0xda, 0x66, 0xaf, 0xa2, 0xf2, 0x31, 0x1b, 0x26, 0x44, - 0x80, 0x94, 0x95, 0x42, 0xcc, 0xe7, 0xcf, 0x67, 0x7f, 0x3c, 0x48, 0xec, 0xf6, 0x1d, 0x54, 0xc4, - 0x03, 0x1e, 0x31, 0x55, 0x99, 0x5a, 0xb2, 0x56, 0x4a, 0xeb, 0x57, 0xdd, 0x44, 0x7b, 0x37, 0xd6, - 0x3e, 0x6d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0x8d, 0xe0, 0x52, 0x6a, 0x21, 0x4c, 0x83, 0xd3, 0xae, - 0x25, 0x28, 0xf6, 0x0e, 0x9a, 0xc9, 0x46, 0xc0, 0x74, 0xfc, 0xbc, 0x90, 0xc7, 0x40, 0xb5, 0x55, - 0x54, 0x36, 0x35, 0x6f, 0x0b, 0x1e, 0x80, 0x94, 0x94, 0x75, 0x7f, 0x54, 0x75, 0xed, 0x4d, 0x3e, - 0x53, 0xe8, 0xe1, 0x10, 0x82, 0x48, 0xfd, 0x44, 0xa1, 0x0e, 0x9a, 0x95, 0x3c, 0x12, 0x01, 0x5c, - 0xfc, 0xd6, 0x94, 0x12, 0xe0, 0x64, 0x65, 0x42, 0x54, 0x26, 0x20, 0x15, 0x65, 0xba, 0xad, 0x86, - 0xac, 0x70, 0x71, 0x64, 0xf3, 0x27, 0xd0, 0xb5, 0xb5, 0xf6, 0x3a, 0x8f, 0x2e, 0x19, 0x15, 0x36, - 0x31, 0xed, 0xff, 0x95, 0x1a, 0xb4, 0x50, 0xf9, 0x39, 0x96, 0x83, 0x74, 0x5d, 0xb8, 0x1e, 0x85, - 0xc7, 0xe8, 0xbf, 0x41, 0x62, 0xd0, 0x5a, 0x94, 0xd6, 0xaf, 0xff, 0x62, 0x3e, 0x4f, 0x40, 0x98, - 0xc9, 0x4c, 0x01, 0xea, 0xdb, 0x07, 0x63, 0xc7, 0x3a, 0x1c, 0x3b, 0xd6, 0xe7, 0xb1, 0x63, 0xbd, - 0x9f, 0x38, 0xb9, 0x83, 0x89, 0x63, 0x1d, 0x4e, 0x9c, 0xdc, 0xc7, 0x89, 0x93, 0x7b, 0xb9, 0xfe, - 0x5b, 0x15, 0xe9, 0x8f, 0x7c, 0xbb, 0xa8, 0x6f, 0xc0, 0xad, 0x6f, 0x01, 0x00, 0x00, 0xff, 0xff, - 0xea, 0x41, 0x45, 0x45, 0xa1, 0x08, 0x00, 0x00, + // 702 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x56, 0x31, 0x6f, 0x13, 0x4b, + 0x10, 0xf6, 0xd9, 0x89, 0xdf, 0xcb, 0x3a, 0xef, 0x25, 0x3e, 0x45, 0xc8, 0xa4, 0x38, 0x27, 0xae, + 0x02, 0x88, 0x3b, 0x12, 0x84, 0x28, 0x28, 0x00, 0xc7, 0x44, 0x18, 0x41, 0x14, 0x9d, 0x82, 0x10, + 0x34, 0xd6, 0xfa, 0x76, 0x6c, 0xaf, 0xb0, 0x77, 0x4f, 0xbb, 0x7b, 0x89, 0x53, 0x22, 0x44, 0x41, + 0x81, 0x44, 0xc9, 0x4f, 0x4a, 0x99, 0x92, 0xca, 0x80, 0xfd, 0x0f, 0x28, 0x53, 0xa1, 0xdb, 0xdb, + 0xbb, 0x24, 0x48, 0x40, 0x88, 0x22, 0x21, 0x01, 0xdd, 0x65, 0x32, 0xf3, 0x7d, 0x33, 0xdf, 0xb7, + 0x33, 0x32, 0x5a, 0xc6, 0x43, 0xe8, 0x63, 0xe1, 0x31, 0x18, 0x46, 0xd2, 0xdb, 0x59, 0x6d, 0x83, + 0xc2, 0xab, 0x1e, 0xec, 0x00, 0x53, 0xd2, 0x0d, 0x05, 0x57, 0xdc, 0x5e, 0x48, 0x52, 0x5c, 0x9d, + 0xe2, 0x9a, 0x94, 0x45, 0xa7, 0xcb, 0x79, 0xb7, 0x0f, 0x9e, 0xce, 0x69, 0x47, 0x1d, 0x8f, 0x44, + 0x02, 0x2b, 0xca, 0x59, 0x52, 0xb5, 0xb8, 0xd0, 0xe5, 0x5d, 0xae, 0x3f, 0xbd, 0xf8, 0xcb, 0x44, + 0x9d, 0x80, 0xcb, 0x01, 0x97, 0x5e, 0x1b, 0x4b, 0xc8, 0xd8, 0x02, 0x4e, 0xd3, 0xaa, 0x4b, 0x27, + 0xda, 0x81, 0x61, 0xc8, 0x85, 0x02, 0x92, 0x65, 0xaa, 0xbd, 0x10, 0x4c, 0x5b, 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 0x49, 0x59, 0xf7, 0x9b, 0x63, + 0x77, 0xd0, 0xac, 0xe4, 0x91, 0x08, 0xe0, 0xfc, 0x57, 0xa1, 0x94, 0x00, 0x27, 0x7b, 0x10, 0xa2, + 0x32, 0x01, 0xa9, 0x28, 0xd3, 0x5e, 0x19, 0xb2, 0xc2, 0xf9, 0x91, 0xcd, 0x1f, 0x43, 0xd7, 0xd1, + 0xda, 0xcb, 0x7c, 0x66, 0xfe, 0xbd, 0x21, 0x04, 0x91, 0xfa, 0x8e, 0xf9, 0xbf, 0xaf, 0x0a, 0x2f, + 0xf2, 0xe8, 0x3f, 0xa3, 0xc2, 0x06, 0xa6, 0xfd, 0x3f, 0x52, 0x83, 0x16, 0x2a, 0x3f, 0xc1, 0x72, + 0x90, 0x5e, 0x02, 0xae, 0x9f, 0xc2, 0x03, 0xf4, 0xcf, 0x20, 0x09, 0x68, 0x2d, 0x4a, 0x6b, 0x97, + 0x7f, 0xb0, 0x7a, 0xc7, 0x20, 0xcc, 0xd2, 0xa5, 0x00, 0xf5, 0xad, 0xfd, 0xb1, 0x63, 0x1d, 0x8c, + 0x1d, 0xeb, 0xe3, 0xd8, 0xb1, 0xde, 0x4e, 0x9c, 0xdc, 0xfe, 0xc4, 0xb1, 0x0e, 0x26, 0x4e, 0xee, + 0xfd, 0xc4, 0xc9, 0x3d, 0x5b, 0xfb, 0xa9, 0x89, 0xf4, 0xef, 0x97, 0x76, 0x51, 0x9f, 0xb7, 0xeb, + 0x5f, 0x02, 0x00, 0x00, 0xff, 0xff, 0x92, 0xd8, 0x9b, 0x95, 0x7c, 0x09, 0x00, 0x00, } func (m *FeeDeducted) Marshal() (dAtA []byte, err error) { @@ -859,6 +875,20 @@ func (m *MessageProcessing) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.DestinationChain) > 0 { + i -= len(m.DestinationChain) + copy(dAtA[i:], m.DestinationChain) + i = encodeVarintEvents(dAtA, i, uint64(len(m.DestinationChain))) + i-- + dAtA[i] = 0x1a + } + if len(m.SourceChain) > 0 { + i -= len(m.SourceChain) + copy(dAtA[i:], m.SourceChain) + i = encodeVarintEvents(dAtA, i, uint64(len(m.SourceChain))) + i-- + dAtA[i] = 0x12 + } if len(m.ID) > 0 { i -= len(m.ID) copy(dAtA[i:], m.ID) @@ -1097,6 +1127,14 @@ func (m *MessageProcessing) Size() (n int) { if l > 0 { n += 1 + l + sovEvents(uint64(l)) } + l = len(m.SourceChain) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } + l = len(m.DestinationChain) + if l > 0 { + n += 1 + l + sovEvents(uint64(l)) + } return n } @@ -1948,6 +1986,70 @@ func (m *MessageProcessing) Unmarshal(dAtA []byte) error { } m.ID = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SourceChain", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SourceChain = github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DestinationChain", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowEvents + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthEvents + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthEvents + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DestinationChain = github_com_axelarnetwork_axelar_core_x_nexus_exported.ChainName(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipEvents(dAtA[iNdEx:])