From 1f2479c7066cea4efb07a2d418d27c61f9ee102e Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Mon, 24 Nov 2025 14:14:29 +0530 Subject: [PATCH 001/120] feat: added outbound tx types in proto --- proto/uexecutor/v1/types.proto | 44 ++++++++++++++++++++++++++-------- 1 file changed, 34 insertions(+), 10 deletions(-) diff --git a/proto/uexecutor/v1/types.proto b/proto/uexecutor/v1/types.proto index f5ab0f36..676b6d0b 100644 --- a/proto/uexecutor/v1/types.proto +++ b/proto/uexecutor/v1/types.proto @@ -72,12 +72,13 @@ message InboundStatus { Status status = 1; } -enum InboundTxType { +enum TxType { UNSPECIFIED_TX = 0; GAS = 1; // fee abstraction FUNDS = 2; // synthetic FUNDS_AND_PAYLOAD = 3; // synthetic + payload exec GAS_AND_PAYLOAD = 4; // fee abstraction + payload exec + PAYLOAD = 5; } message Inbound { @@ -92,7 +93,7 @@ message Inbound { string amount = 5; // synthetic token amount bridged in string asset_addr = 6; // address of erc20 token address on source chain string log_index = 7; // log index that originated the cross chain tx - InboundTxType tx_type = 8; // inbound tx type + TxType tx_type = 8; // inbound tx type UniversalPayload universal_payload = 9; // payload is the universal payload to be executed string verification_data = 10; // verification_data is the bytes passed as verifier data for the given payload. } @@ -110,16 +111,38 @@ message PCTx { string error_msg = 7; // optional error info if failed } +message OutboundObservation { + string destination_chain = 1; // chain where the tx was executed + bool success = 2; // whether execution succeeded + uint64 block_height = 3; // block height on external chain + string tx_hash = 4; // external chain tx hash +} + +message Originating_Pc_TX { + option (amino.name) = "uexecutor/originating_pc_tx"; + option (gogoproto.equal) = true; + option (gogoproto.goproto_stringer) = false; + + string tx_hash = 1; // pc_tx hash that initiated the outbound + string log_index = 2; // log_index that initiated the outbound +} + message OutboundTx { option (amino.name) = "uexecutor/outbound_tx"; option (gogoproto.equal) = true; option (gogoproto.goproto_stringer) = false; string destination_chain = 1; // chain where this outbound is sent - string tx_hash = 2; // outbound tx hash on destination chain - string recipient = 3; // recipient on destination chain - string amount = 4; // token amount or payload - string asset_addr = 5; // token contract if applicable + string recipient = 2; // recipient on destination chain + string amount = 3; // token amount + string asset_addr = 4; // token contract if applicable + string sender = 5; // sender of the outbound tx + string payload = 6; // payload to be executed + string gas_limit = 7; // gas limit to be used for the outbound tx + TxType tx_type = 8; // outbound tx type + Originating_Pc_TX pc_tx = 9; // pc_tx that originated the outbound + OutboundObservation observed_tx = 10; // observed tx on destination chain + string index = 11; // index of outbound tx } message UniversalTx { @@ -127,8 +150,9 @@ message UniversalTx { option (gogoproto.equal) = true; option (gogoproto.goproto_stringer) = false; - Inbound inbound_tx = 1; // Full inbound tx data - repeated PCTx pc_tx = 2; // Execution details on Push Chain - OutboundTx outbound_tx = 3; // Outbound tx triggered by this tx - UniversalTxStatus universal_status = 4; // Current status + string id = 1; + Inbound inbound_tx = 2; // Full inbound tx data + repeated PCTx pc_tx = 3; // Execution details on Push Chain + OutboundTx outbound_tx = 4; // Outbound tx triggered by this tx + UniversalTxStatus universal_status = 5; // Current status } From 09d4f1f4d19c5c8e79a5c893b52531df105c663f Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Mon, 24 Nov 2025 14:14:42 +0530 Subject: [PATCH 002/120] refactor: added generated protobuf --- api/uexecutor/v1/types.pulsar.go | 2550 +++++++++++++++++++++++++----- 1 file changed, 2153 insertions(+), 397 deletions(-) diff --git a/api/uexecutor/v1/types.pulsar.go b/api/uexecutor/v1/types.pulsar.go index 7e4b9fef..344f6692 100644 --- a/api/uexecutor/v1/types.pulsar.go +++ b/api/uexecutor/v1/types.pulsar.go @@ -2598,7 +2598,7 @@ func (x *fastReflection_Inbound) Set(fd protoreflect.FieldDescriptor, value prot case "uexecutor.v1.Inbound.log_index": x.LogIndex = value.Interface().(string) case "uexecutor.v1.Inbound.tx_type": - x.TxType = (InboundTxType)(value.Enum()) + x.TxType = (TxType)(value.Enum()) case "uexecutor.v1.Inbound.universal_payload": x.UniversalPayload = value.Message().Interface().(*UniversalPayload) case "uexecutor.v1.Inbound.verification_data": @@ -3179,7 +3179,7 @@ func (x *fastReflection_Inbound) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - x.TxType |= InboundTxType(b&0x7F) << shift + x.TxType |= TxType(b&0x7F) << shift if b < 0x80 { break } @@ -3996,33 +3996,31 @@ func (x *fastReflection_PCTx) ProtoMethods() *protoiface.Methods { } var ( - md_OutboundTx protoreflect.MessageDescriptor - fd_OutboundTx_destination_chain protoreflect.FieldDescriptor - fd_OutboundTx_tx_hash protoreflect.FieldDescriptor - fd_OutboundTx_recipient protoreflect.FieldDescriptor - fd_OutboundTx_amount protoreflect.FieldDescriptor - fd_OutboundTx_asset_addr protoreflect.FieldDescriptor + md_OutboundObservation protoreflect.MessageDescriptor + fd_OutboundObservation_destination_chain protoreflect.FieldDescriptor + fd_OutboundObservation_success protoreflect.FieldDescriptor + fd_OutboundObservation_block_height protoreflect.FieldDescriptor + fd_OutboundObservation_tx_hash protoreflect.FieldDescriptor ) func init() { file_uexecutor_v1_types_proto_init() - md_OutboundTx = File_uexecutor_v1_types_proto.Messages().ByName("OutboundTx") - fd_OutboundTx_destination_chain = md_OutboundTx.Fields().ByName("destination_chain") - fd_OutboundTx_tx_hash = md_OutboundTx.Fields().ByName("tx_hash") - fd_OutboundTx_recipient = md_OutboundTx.Fields().ByName("recipient") - fd_OutboundTx_amount = md_OutboundTx.Fields().ByName("amount") - fd_OutboundTx_asset_addr = md_OutboundTx.Fields().ByName("asset_addr") + md_OutboundObservation = File_uexecutor_v1_types_proto.Messages().ByName("OutboundObservation") + fd_OutboundObservation_destination_chain = md_OutboundObservation.Fields().ByName("destination_chain") + fd_OutboundObservation_success = md_OutboundObservation.Fields().ByName("success") + fd_OutboundObservation_block_height = md_OutboundObservation.Fields().ByName("block_height") + fd_OutboundObservation_tx_hash = md_OutboundObservation.Fields().ByName("tx_hash") } -var _ protoreflect.Message = (*fastReflection_OutboundTx)(nil) +var _ protoreflect.Message = (*fastReflection_OutboundObservation)(nil) -type fastReflection_OutboundTx OutboundTx +type fastReflection_OutboundObservation OutboundObservation -func (x *OutboundTx) ProtoReflect() protoreflect.Message { - return (*fastReflection_OutboundTx)(x) +func (x *OutboundObservation) ProtoReflect() protoreflect.Message { + return (*fastReflection_OutboundObservation)(x) } -func (x *OutboundTx) slowProtoReflect() protoreflect.Message { +func (x *OutboundObservation) slowProtoReflect() protoreflect.Message { mi := &file_uexecutor_v1_types_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -4034,43 +4032,43 @@ func (x *OutboundTx) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_OutboundTx_messageType fastReflection_OutboundTx_messageType -var _ protoreflect.MessageType = fastReflection_OutboundTx_messageType{} +var _fastReflection_OutboundObservation_messageType fastReflection_OutboundObservation_messageType +var _ protoreflect.MessageType = fastReflection_OutboundObservation_messageType{} -type fastReflection_OutboundTx_messageType struct{} +type fastReflection_OutboundObservation_messageType struct{} -func (x fastReflection_OutboundTx_messageType) Zero() protoreflect.Message { - return (*fastReflection_OutboundTx)(nil) +func (x fastReflection_OutboundObservation_messageType) Zero() protoreflect.Message { + return (*fastReflection_OutboundObservation)(nil) } -func (x fastReflection_OutboundTx_messageType) New() protoreflect.Message { - return new(fastReflection_OutboundTx) +func (x fastReflection_OutboundObservation_messageType) New() protoreflect.Message { + return new(fastReflection_OutboundObservation) } -func (x fastReflection_OutboundTx_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_OutboundTx +func (x fastReflection_OutboundObservation_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_OutboundObservation } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_OutboundTx) Descriptor() protoreflect.MessageDescriptor { - return md_OutboundTx +func (x *fastReflection_OutboundObservation) Descriptor() protoreflect.MessageDescriptor { + return md_OutboundObservation } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. -func (x *fastReflection_OutboundTx) Type() protoreflect.MessageType { - return _fastReflection_OutboundTx_messageType +func (x *fastReflection_OutboundObservation) Type() protoreflect.MessageType { + return _fastReflection_OutboundObservation_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_OutboundTx) New() protoreflect.Message { - return new(fastReflection_OutboundTx) +func (x *fastReflection_OutboundObservation) New() protoreflect.Message { + return new(fastReflection_OutboundObservation) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_OutboundTx) Interface() protoreflect.ProtoMessage { - return (*OutboundTx)(x) +func (x *fastReflection_OutboundObservation) Interface() protoreflect.ProtoMessage { + return (*OutboundObservation)(x) } // Range iterates over every populated field in an undefined order, @@ -4078,34 +4076,28 @@ func (x *fastReflection_OutboundTx) Interface() protoreflect.ProtoMessage { // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_OutboundTx) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +func (x *fastReflection_OutboundObservation) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.DestinationChain != "" { value := protoreflect.ValueOfString(x.DestinationChain) - if !f(fd_OutboundTx_destination_chain, value) { - return - } - } - if x.TxHash != "" { - value := protoreflect.ValueOfString(x.TxHash) - if !f(fd_OutboundTx_tx_hash, value) { + if !f(fd_OutboundObservation_destination_chain, value) { return } } - if x.Recipient != "" { - value := protoreflect.ValueOfString(x.Recipient) - if !f(fd_OutboundTx_recipient, value) { + if x.Success != false { + value := protoreflect.ValueOfBool(x.Success) + if !f(fd_OutboundObservation_success, value) { return } } - if x.Amount != "" { - value := protoreflect.ValueOfString(x.Amount) - if !f(fd_OutboundTx_amount, value) { + if x.BlockHeight != uint64(0) { + value := protoreflect.ValueOfUint64(x.BlockHeight) + if !f(fd_OutboundObservation_block_height, value) { return } } - if x.AssetAddr != "" { - value := protoreflect.ValueOfString(x.AssetAddr) - if !f(fd_OutboundTx_asset_addr, value) { + if x.TxHash != "" { + value := protoreflect.ValueOfString(x.TxHash) + if !f(fd_OutboundObservation_tx_hash, value) { return } } @@ -4122,23 +4114,21 @@ func (x *fastReflection_OutboundTx) Range(f func(protoreflect.FieldDescriptor, p // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. -func (x *fastReflection_OutboundTx) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_OutboundObservation) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "uexecutor.v1.OutboundTx.destination_chain": + case "uexecutor.v1.OutboundObservation.destination_chain": return x.DestinationChain != "" - case "uexecutor.v1.OutboundTx.tx_hash": + case "uexecutor.v1.OutboundObservation.success": + return x.Success != false + case "uexecutor.v1.OutboundObservation.block_height": + return x.BlockHeight != uint64(0) + case "uexecutor.v1.OutboundObservation.tx_hash": return x.TxHash != "" - case "uexecutor.v1.OutboundTx.recipient": - return x.Recipient != "" - case "uexecutor.v1.OutboundTx.amount": - return x.Amount != "" - case "uexecutor.v1.OutboundTx.asset_addr": - return x.AssetAddr != "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.OutboundTx")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.OutboundObservation")) } - panic(fmt.Errorf("message uexecutor.v1.OutboundTx does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message uexecutor.v1.OutboundObservation does not contain field %s", fd.FullName())) } } @@ -4148,23 +4138,21 @@ func (x *fastReflection_OutboundTx) Has(fd protoreflect.FieldDescriptor) bool { // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_OutboundTx) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_OutboundObservation) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "uexecutor.v1.OutboundTx.destination_chain": + case "uexecutor.v1.OutboundObservation.destination_chain": x.DestinationChain = "" - case "uexecutor.v1.OutboundTx.tx_hash": + case "uexecutor.v1.OutboundObservation.success": + x.Success = false + case "uexecutor.v1.OutboundObservation.block_height": + x.BlockHeight = uint64(0) + case "uexecutor.v1.OutboundObservation.tx_hash": x.TxHash = "" - case "uexecutor.v1.OutboundTx.recipient": - x.Recipient = "" - case "uexecutor.v1.OutboundTx.amount": - x.Amount = "" - case "uexecutor.v1.OutboundTx.asset_addr": - x.AssetAddr = "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.OutboundTx")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.OutboundObservation")) } - panic(fmt.Errorf("message uexecutor.v1.OutboundTx does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message uexecutor.v1.OutboundObservation does not contain field %s", fd.FullName())) } } @@ -4174,28 +4162,25 @@ func (x *fastReflection_OutboundTx) Clear(fd protoreflect.FieldDescriptor) { // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_OutboundTx) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_OutboundObservation) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "uexecutor.v1.OutboundTx.destination_chain": + case "uexecutor.v1.OutboundObservation.destination_chain": value := x.DestinationChain return protoreflect.ValueOfString(value) - case "uexecutor.v1.OutboundTx.tx_hash": + case "uexecutor.v1.OutboundObservation.success": + value := x.Success + return protoreflect.ValueOfBool(value) + case "uexecutor.v1.OutboundObservation.block_height": + value := x.BlockHeight + return protoreflect.ValueOfUint64(value) + case "uexecutor.v1.OutboundObservation.tx_hash": value := x.TxHash return protoreflect.ValueOfString(value) - case "uexecutor.v1.OutboundTx.recipient": - value := x.Recipient - return protoreflect.ValueOfString(value) - case "uexecutor.v1.OutboundTx.amount": - value := x.Amount - return protoreflect.ValueOfString(value) - case "uexecutor.v1.OutboundTx.asset_addr": - value := x.AssetAddr - return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.OutboundTx")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.OutboundObservation")) } - panic(fmt.Errorf("message uexecutor.v1.OutboundTx does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message uexecutor.v1.OutboundObservation does not contain field %s", descriptor.FullName())) } } @@ -4209,23 +4194,21 @@ func (x *fastReflection_OutboundTx) Get(descriptor protoreflect.FieldDescriptor) // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_OutboundTx) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_OutboundObservation) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "uexecutor.v1.OutboundTx.destination_chain": + case "uexecutor.v1.OutboundObservation.destination_chain": x.DestinationChain = value.Interface().(string) - case "uexecutor.v1.OutboundTx.tx_hash": + case "uexecutor.v1.OutboundObservation.success": + x.Success = value.Bool() + case "uexecutor.v1.OutboundObservation.block_height": + x.BlockHeight = value.Uint() + case "uexecutor.v1.OutboundObservation.tx_hash": x.TxHash = value.Interface().(string) - case "uexecutor.v1.OutboundTx.recipient": - x.Recipient = value.Interface().(string) - case "uexecutor.v1.OutboundTx.amount": - x.Amount = value.Interface().(string) - case "uexecutor.v1.OutboundTx.asset_addr": - x.AssetAddr = value.Interface().(string) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.OutboundTx")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.OutboundObservation")) } - panic(fmt.Errorf("message uexecutor.v1.OutboundTx does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message uexecutor.v1.OutboundObservation does not contain field %s", fd.FullName())) } } @@ -4239,56 +4222,52 @@ func (x *fastReflection_OutboundTx) Set(fd protoreflect.FieldDescriptor, value p // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_OutboundTx) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_OutboundObservation) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "uexecutor.v1.OutboundTx.destination_chain": - panic(fmt.Errorf("field destination_chain of message uexecutor.v1.OutboundTx is not mutable")) - case "uexecutor.v1.OutboundTx.tx_hash": - panic(fmt.Errorf("field tx_hash of message uexecutor.v1.OutboundTx is not mutable")) - case "uexecutor.v1.OutboundTx.recipient": - panic(fmt.Errorf("field recipient of message uexecutor.v1.OutboundTx is not mutable")) - case "uexecutor.v1.OutboundTx.amount": - panic(fmt.Errorf("field amount of message uexecutor.v1.OutboundTx is not mutable")) - case "uexecutor.v1.OutboundTx.asset_addr": - panic(fmt.Errorf("field asset_addr of message uexecutor.v1.OutboundTx is not mutable")) + case "uexecutor.v1.OutboundObservation.destination_chain": + panic(fmt.Errorf("field destination_chain of message uexecutor.v1.OutboundObservation is not mutable")) + case "uexecutor.v1.OutboundObservation.success": + panic(fmt.Errorf("field success of message uexecutor.v1.OutboundObservation is not mutable")) + case "uexecutor.v1.OutboundObservation.block_height": + panic(fmt.Errorf("field block_height of message uexecutor.v1.OutboundObservation is not mutable")) + case "uexecutor.v1.OutboundObservation.tx_hash": + panic(fmt.Errorf("field tx_hash of message uexecutor.v1.OutboundObservation is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.OutboundTx")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.OutboundObservation")) } - panic(fmt.Errorf("message uexecutor.v1.OutboundTx does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message uexecutor.v1.OutboundObservation does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_OutboundTx) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_OutboundObservation) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "uexecutor.v1.OutboundTx.destination_chain": - return protoreflect.ValueOfString("") - case "uexecutor.v1.OutboundTx.tx_hash": - return protoreflect.ValueOfString("") - case "uexecutor.v1.OutboundTx.recipient": - return protoreflect.ValueOfString("") - case "uexecutor.v1.OutboundTx.amount": + case "uexecutor.v1.OutboundObservation.destination_chain": return protoreflect.ValueOfString("") - case "uexecutor.v1.OutboundTx.asset_addr": + case "uexecutor.v1.OutboundObservation.success": + return protoreflect.ValueOfBool(false) + case "uexecutor.v1.OutboundObservation.block_height": + return protoreflect.ValueOfUint64(uint64(0)) + case "uexecutor.v1.OutboundObservation.tx_hash": return protoreflect.ValueOfString("") default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.OutboundTx")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.OutboundObservation")) } - panic(fmt.Errorf("message uexecutor.v1.OutboundTx does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message uexecutor.v1.OutboundObservation does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_OutboundTx) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_OutboundObservation) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in uexecutor.v1.OutboundTx", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in uexecutor.v1.OutboundObservation", d.FullName())) } panic("unreachable") } @@ -4296,7 +4275,7 @@ func (x *fastReflection_OutboundTx) WhichOneof(d protoreflect.OneofDescriptor) p // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_OutboundTx) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_OutboundObservation) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -4307,7 +4286,7 @@ func (x *fastReflection_OutboundTx) GetUnknown() protoreflect.RawFields { // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_OutboundTx) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_OutboundObservation) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -4319,7 +4298,7 @@ func (x *fastReflection_OutboundTx) SetUnknown(fields protoreflect.RawFields) { // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. -func (x *fastReflection_OutboundTx) IsValid() bool { +func (x *fastReflection_OutboundObservation) IsValid() bool { return x != nil } @@ -4329,9 +4308,9 @@ func (x *fastReflection_OutboundTx) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_OutboundTx) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_OutboundObservation) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*OutboundTx) + x := input.Message.Interface().(*OutboundObservation) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -4347,19 +4326,13 @@ func (x *fastReflection_OutboundTx) ProtoMethods() *protoiface.Methods { if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - l = len(x.TxHash) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Recipient) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) + if x.Success { + n += 2 } - l = len(x.Amount) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) + if x.BlockHeight != 0 { + n += 1 + runtime.Sov(uint64(x.BlockHeight)) } - l = len(x.AssetAddr) + l = len(x.TxHash) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } @@ -4373,7 +4346,7 @@ func (x *fastReflection_OutboundTx) ProtoMethods() *protoiface.Methods { } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*OutboundTx) + x := input.Message.Interface().(*OutboundObservation) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -4392,33 +4365,27 @@ func (x *fastReflection_OutboundTx) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.AssetAddr) > 0 { - i -= len(x.AssetAddr) - copy(dAtA[i:], x.AssetAddr) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AssetAddr))) - i-- - dAtA[i] = 0x2a - } - if len(x.Amount) > 0 { - i -= len(x.Amount) - copy(dAtA[i:], x.Amount) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Amount))) + if len(x.TxHash) > 0 { + i -= len(x.TxHash) + copy(dAtA[i:], x.TxHash) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.TxHash))) i-- dAtA[i] = 0x22 } - if len(x.Recipient) > 0 { - i -= len(x.Recipient) - copy(dAtA[i:], x.Recipient) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Recipient))) + if x.BlockHeight != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.BlockHeight)) i-- - dAtA[i] = 0x1a + dAtA[i] = 0x18 } - if len(x.TxHash) > 0 { - i -= len(x.TxHash) - copy(dAtA[i:], x.TxHash) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.TxHash))) + if x.Success { i-- - dAtA[i] = 0x12 + if x.Success { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x10 } if len(x.DestinationChain) > 0 { i -= len(x.DestinationChain) @@ -4438,7 +4405,7 @@ func (x *fastReflection_OutboundTx) ProtoMethods() *protoiface.Methods { }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*OutboundTx) + x := input.Message.Interface().(*OutboundObservation) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -4470,10 +4437,10 @@ func (x *fastReflection_OutboundTx) ProtoMethods() *protoiface.Methods { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: OutboundTx: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: OutboundObservation: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: OutboundTx: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: OutboundObservation: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -4509,10 +4476,1516 @@ func (x *fastReflection_OutboundTx) ProtoMethods() *protoiface.Methods { x.DestinationChain = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Success", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + x.Success = bool(v != 0) + case 3: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BlockHeight", wireType) + } + x.BlockHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.BlockHeight |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TxHash", wireType) } - var stringLen uint64 + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.TxHash = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_Originating_Pc_TX protoreflect.MessageDescriptor + fd_Originating_Pc_TX_tx_hash protoreflect.FieldDescriptor + fd_Originating_Pc_TX_log_index protoreflect.FieldDescriptor +) + +func init() { + file_uexecutor_v1_types_proto_init() + md_Originating_Pc_TX = File_uexecutor_v1_types_proto.Messages().ByName("Originating_Pc_TX") + fd_Originating_Pc_TX_tx_hash = md_Originating_Pc_TX.Fields().ByName("tx_hash") + fd_Originating_Pc_TX_log_index = md_Originating_Pc_TX.Fields().ByName("log_index") +} + +var _ protoreflect.Message = (*fastReflection_Originating_Pc_TX)(nil) + +type fastReflection_Originating_Pc_TX Originating_Pc_TX + +func (x *Originating_Pc_TX) ProtoReflect() protoreflect.Message { + return (*fastReflection_Originating_Pc_TX)(x) +} + +func (x *Originating_Pc_TX) slowProtoReflect() protoreflect.Message { + mi := &file_uexecutor_v1_types_proto_msgTypes[7] + 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) +} + +var _fastReflection_Originating_Pc_TX_messageType fastReflection_Originating_Pc_TX_messageType +var _ protoreflect.MessageType = fastReflection_Originating_Pc_TX_messageType{} + +type fastReflection_Originating_Pc_TX_messageType struct{} + +func (x fastReflection_Originating_Pc_TX_messageType) Zero() protoreflect.Message { + return (*fastReflection_Originating_Pc_TX)(nil) +} +func (x fastReflection_Originating_Pc_TX_messageType) New() protoreflect.Message { + return new(fastReflection_Originating_Pc_TX) +} +func (x fastReflection_Originating_Pc_TX_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_Originating_Pc_TX +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_Originating_Pc_TX) Descriptor() protoreflect.MessageDescriptor { + return md_Originating_Pc_TX +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_Originating_Pc_TX) Type() protoreflect.MessageType { + return _fastReflection_Originating_Pc_TX_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_Originating_Pc_TX) New() protoreflect.Message { + return new(fastReflection_Originating_Pc_TX) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_Originating_Pc_TX) Interface() protoreflect.ProtoMessage { + return (*Originating_Pc_TX)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_Originating_Pc_TX) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.TxHash != "" { + value := protoreflect.ValueOfString(x.TxHash) + if !f(fd_Originating_Pc_TX_tx_hash, value) { + return + } + } + if x.LogIndex != "" { + value := protoreflect.ValueOfString(x.LogIndex) + if !f(fd_Originating_Pc_TX_log_index, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_Originating_Pc_TX) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "uexecutor.v1.Originating_Pc_TX.tx_hash": + return x.TxHash != "" + case "uexecutor.v1.Originating_Pc_TX.log_index": + return x.LogIndex != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.Originating_Pc_TX")) + } + panic(fmt.Errorf("message uexecutor.v1.Originating_Pc_TX does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Originating_Pc_TX) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "uexecutor.v1.Originating_Pc_TX.tx_hash": + x.TxHash = "" + case "uexecutor.v1.Originating_Pc_TX.log_index": + x.LogIndex = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.Originating_Pc_TX")) + } + panic(fmt.Errorf("message uexecutor.v1.Originating_Pc_TX does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_Originating_Pc_TX) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "uexecutor.v1.Originating_Pc_TX.tx_hash": + value := x.TxHash + return protoreflect.ValueOfString(value) + case "uexecutor.v1.Originating_Pc_TX.log_index": + value := x.LogIndex + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.Originating_Pc_TX")) + } + panic(fmt.Errorf("message uexecutor.v1.Originating_Pc_TX does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Originating_Pc_TX) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "uexecutor.v1.Originating_Pc_TX.tx_hash": + x.TxHash = value.Interface().(string) + case "uexecutor.v1.Originating_Pc_TX.log_index": + x.LogIndex = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.Originating_Pc_TX")) + } + panic(fmt.Errorf("message uexecutor.v1.Originating_Pc_TX does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Originating_Pc_TX) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "uexecutor.v1.Originating_Pc_TX.tx_hash": + panic(fmt.Errorf("field tx_hash of message uexecutor.v1.Originating_Pc_TX is not mutable")) + case "uexecutor.v1.Originating_Pc_TX.log_index": + panic(fmt.Errorf("field log_index of message uexecutor.v1.Originating_Pc_TX is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.Originating_Pc_TX")) + } + panic(fmt.Errorf("message uexecutor.v1.Originating_Pc_TX does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_Originating_Pc_TX) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "uexecutor.v1.Originating_Pc_TX.tx_hash": + return protoreflect.ValueOfString("") + case "uexecutor.v1.Originating_Pc_TX.log_index": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.Originating_Pc_TX")) + } + panic(fmt.Errorf("message uexecutor.v1.Originating_Pc_TX does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_Originating_Pc_TX) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in uexecutor.v1.Originating_Pc_TX", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_Originating_Pc_TX) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Originating_Pc_TX) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_Originating_Pc_TX) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_Originating_Pc_TX) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*Originating_Pc_TX) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.TxHash) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.LogIndex) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*Originating_Pc_TX) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.LogIndex) > 0 { + i -= len(x.LogIndex) + copy(dAtA[i:], x.LogIndex) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.LogIndex))) + i-- + dAtA[i] = 0x12 + } + if len(x.TxHash) > 0 { + i -= len(x.TxHash) + copy(dAtA[i:], x.TxHash) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.TxHash))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*Originating_Pc_TX) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Originating_Pc_TX: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Originating_Pc_TX: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TxHash", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.TxHash = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field LogIndex", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.LogIndex = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_OutboundTx protoreflect.MessageDescriptor + fd_OutboundTx_destination_chain protoreflect.FieldDescriptor + fd_OutboundTx_recipient protoreflect.FieldDescriptor + fd_OutboundTx_amount protoreflect.FieldDescriptor + fd_OutboundTx_asset_addr protoreflect.FieldDescriptor + fd_OutboundTx_sender protoreflect.FieldDescriptor + fd_OutboundTx_payload protoreflect.FieldDescriptor + fd_OutboundTx_gas_limit protoreflect.FieldDescriptor + fd_OutboundTx_tx_type protoreflect.FieldDescriptor + fd_OutboundTx_pc_tx protoreflect.FieldDescriptor + fd_OutboundTx_observed_tx protoreflect.FieldDescriptor + fd_OutboundTx_index protoreflect.FieldDescriptor +) + +func init() { + file_uexecutor_v1_types_proto_init() + md_OutboundTx = File_uexecutor_v1_types_proto.Messages().ByName("OutboundTx") + fd_OutboundTx_destination_chain = md_OutboundTx.Fields().ByName("destination_chain") + fd_OutboundTx_recipient = md_OutboundTx.Fields().ByName("recipient") + fd_OutboundTx_amount = md_OutboundTx.Fields().ByName("amount") + fd_OutboundTx_asset_addr = md_OutboundTx.Fields().ByName("asset_addr") + fd_OutboundTx_sender = md_OutboundTx.Fields().ByName("sender") + fd_OutboundTx_payload = md_OutboundTx.Fields().ByName("payload") + fd_OutboundTx_gas_limit = md_OutboundTx.Fields().ByName("gas_limit") + fd_OutboundTx_tx_type = md_OutboundTx.Fields().ByName("tx_type") + fd_OutboundTx_pc_tx = md_OutboundTx.Fields().ByName("pc_tx") + fd_OutboundTx_observed_tx = md_OutboundTx.Fields().ByName("observed_tx") + fd_OutboundTx_index = md_OutboundTx.Fields().ByName("index") +} + +var _ protoreflect.Message = (*fastReflection_OutboundTx)(nil) + +type fastReflection_OutboundTx OutboundTx + +func (x *OutboundTx) ProtoReflect() protoreflect.Message { + return (*fastReflection_OutboundTx)(x) +} + +func (x *OutboundTx) slowProtoReflect() protoreflect.Message { + mi := &file_uexecutor_v1_types_proto_msgTypes[8] + 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) +} + +var _fastReflection_OutboundTx_messageType fastReflection_OutboundTx_messageType +var _ protoreflect.MessageType = fastReflection_OutboundTx_messageType{} + +type fastReflection_OutboundTx_messageType struct{} + +func (x fastReflection_OutboundTx_messageType) Zero() protoreflect.Message { + return (*fastReflection_OutboundTx)(nil) +} +func (x fastReflection_OutboundTx_messageType) New() protoreflect.Message { + return new(fastReflection_OutboundTx) +} +func (x fastReflection_OutboundTx_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_OutboundTx +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_OutboundTx) Descriptor() protoreflect.MessageDescriptor { + return md_OutboundTx +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_OutboundTx) Type() protoreflect.MessageType { + return _fastReflection_OutboundTx_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_OutboundTx) New() protoreflect.Message { + return new(fastReflection_OutboundTx) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_OutboundTx) Interface() protoreflect.ProtoMessage { + return (*OutboundTx)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_OutboundTx) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.DestinationChain != "" { + value := protoreflect.ValueOfString(x.DestinationChain) + if !f(fd_OutboundTx_destination_chain, value) { + return + } + } + if x.Recipient != "" { + value := protoreflect.ValueOfString(x.Recipient) + if !f(fd_OutboundTx_recipient, value) { + return + } + } + if x.Amount != "" { + value := protoreflect.ValueOfString(x.Amount) + if !f(fd_OutboundTx_amount, value) { + return + } + } + if x.AssetAddr != "" { + value := protoreflect.ValueOfString(x.AssetAddr) + if !f(fd_OutboundTx_asset_addr, value) { + return + } + } + if x.Sender != "" { + value := protoreflect.ValueOfString(x.Sender) + if !f(fd_OutboundTx_sender, value) { + return + } + } + if x.Payload != "" { + value := protoreflect.ValueOfString(x.Payload) + if !f(fd_OutboundTx_payload, value) { + return + } + } + if x.GasLimit != "" { + value := protoreflect.ValueOfString(x.GasLimit) + if !f(fd_OutboundTx_gas_limit, value) { + return + } + } + if x.TxType != 0 { + value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.TxType)) + if !f(fd_OutboundTx_tx_type, value) { + return + } + } + if x.PcTx != nil { + value := protoreflect.ValueOfMessage(x.PcTx.ProtoReflect()) + if !f(fd_OutboundTx_pc_tx, value) { + return + } + } + if x.ObservedTx != nil { + value := protoreflect.ValueOfMessage(x.ObservedTx.ProtoReflect()) + if !f(fd_OutboundTx_observed_tx, value) { + return + } + } + if x.Index != "" { + value := protoreflect.ValueOfString(x.Index) + if !f(fd_OutboundTx_index, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_OutboundTx) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "uexecutor.v1.OutboundTx.destination_chain": + return x.DestinationChain != "" + case "uexecutor.v1.OutboundTx.recipient": + return x.Recipient != "" + case "uexecutor.v1.OutboundTx.amount": + return x.Amount != "" + case "uexecutor.v1.OutboundTx.asset_addr": + return x.AssetAddr != "" + case "uexecutor.v1.OutboundTx.sender": + return x.Sender != "" + case "uexecutor.v1.OutboundTx.payload": + return x.Payload != "" + case "uexecutor.v1.OutboundTx.gas_limit": + return x.GasLimit != "" + case "uexecutor.v1.OutboundTx.tx_type": + return x.TxType != 0 + case "uexecutor.v1.OutboundTx.pc_tx": + return x.PcTx != nil + case "uexecutor.v1.OutboundTx.observed_tx": + return x.ObservedTx != nil + case "uexecutor.v1.OutboundTx.index": + return x.Index != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.OutboundTx")) + } + panic(fmt.Errorf("message uexecutor.v1.OutboundTx does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_OutboundTx) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "uexecutor.v1.OutboundTx.destination_chain": + x.DestinationChain = "" + case "uexecutor.v1.OutboundTx.recipient": + x.Recipient = "" + case "uexecutor.v1.OutboundTx.amount": + x.Amount = "" + case "uexecutor.v1.OutboundTx.asset_addr": + x.AssetAddr = "" + case "uexecutor.v1.OutboundTx.sender": + x.Sender = "" + case "uexecutor.v1.OutboundTx.payload": + x.Payload = "" + case "uexecutor.v1.OutboundTx.gas_limit": + x.GasLimit = "" + case "uexecutor.v1.OutboundTx.tx_type": + x.TxType = 0 + case "uexecutor.v1.OutboundTx.pc_tx": + x.PcTx = nil + case "uexecutor.v1.OutboundTx.observed_tx": + x.ObservedTx = nil + case "uexecutor.v1.OutboundTx.index": + x.Index = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.OutboundTx")) + } + panic(fmt.Errorf("message uexecutor.v1.OutboundTx does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_OutboundTx) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "uexecutor.v1.OutboundTx.destination_chain": + value := x.DestinationChain + return protoreflect.ValueOfString(value) + case "uexecutor.v1.OutboundTx.recipient": + value := x.Recipient + return protoreflect.ValueOfString(value) + case "uexecutor.v1.OutboundTx.amount": + value := x.Amount + return protoreflect.ValueOfString(value) + case "uexecutor.v1.OutboundTx.asset_addr": + value := x.AssetAddr + return protoreflect.ValueOfString(value) + case "uexecutor.v1.OutboundTx.sender": + value := x.Sender + return protoreflect.ValueOfString(value) + case "uexecutor.v1.OutboundTx.payload": + value := x.Payload + return protoreflect.ValueOfString(value) + case "uexecutor.v1.OutboundTx.gas_limit": + value := x.GasLimit + return protoreflect.ValueOfString(value) + case "uexecutor.v1.OutboundTx.tx_type": + value := x.TxType + return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) + case "uexecutor.v1.OutboundTx.pc_tx": + value := x.PcTx + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "uexecutor.v1.OutboundTx.observed_tx": + value := x.ObservedTx + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "uexecutor.v1.OutboundTx.index": + value := x.Index + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.OutboundTx")) + } + panic(fmt.Errorf("message uexecutor.v1.OutboundTx does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_OutboundTx) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "uexecutor.v1.OutboundTx.destination_chain": + x.DestinationChain = value.Interface().(string) + case "uexecutor.v1.OutboundTx.recipient": + x.Recipient = value.Interface().(string) + case "uexecutor.v1.OutboundTx.amount": + x.Amount = value.Interface().(string) + case "uexecutor.v1.OutboundTx.asset_addr": + x.AssetAddr = value.Interface().(string) + case "uexecutor.v1.OutboundTx.sender": + x.Sender = value.Interface().(string) + case "uexecutor.v1.OutboundTx.payload": + x.Payload = value.Interface().(string) + case "uexecutor.v1.OutboundTx.gas_limit": + x.GasLimit = value.Interface().(string) + case "uexecutor.v1.OutboundTx.tx_type": + x.TxType = (TxType)(value.Enum()) + case "uexecutor.v1.OutboundTx.pc_tx": + x.PcTx = value.Message().Interface().(*Originating_Pc_TX) + case "uexecutor.v1.OutboundTx.observed_tx": + x.ObservedTx = value.Message().Interface().(*OutboundObservation) + case "uexecutor.v1.OutboundTx.index": + x.Index = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.OutboundTx")) + } + panic(fmt.Errorf("message uexecutor.v1.OutboundTx does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_OutboundTx) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "uexecutor.v1.OutboundTx.pc_tx": + if x.PcTx == nil { + x.PcTx = new(Originating_Pc_TX) + } + return protoreflect.ValueOfMessage(x.PcTx.ProtoReflect()) + case "uexecutor.v1.OutboundTx.observed_tx": + if x.ObservedTx == nil { + x.ObservedTx = new(OutboundObservation) + } + return protoreflect.ValueOfMessage(x.ObservedTx.ProtoReflect()) + case "uexecutor.v1.OutboundTx.destination_chain": + panic(fmt.Errorf("field destination_chain of message uexecutor.v1.OutboundTx is not mutable")) + case "uexecutor.v1.OutboundTx.recipient": + panic(fmt.Errorf("field recipient of message uexecutor.v1.OutboundTx is not mutable")) + case "uexecutor.v1.OutboundTx.amount": + panic(fmt.Errorf("field amount of message uexecutor.v1.OutboundTx is not mutable")) + case "uexecutor.v1.OutboundTx.asset_addr": + panic(fmt.Errorf("field asset_addr of message uexecutor.v1.OutboundTx is not mutable")) + case "uexecutor.v1.OutboundTx.sender": + panic(fmt.Errorf("field sender of message uexecutor.v1.OutboundTx is not mutable")) + case "uexecutor.v1.OutboundTx.payload": + panic(fmt.Errorf("field payload of message uexecutor.v1.OutboundTx is not mutable")) + case "uexecutor.v1.OutboundTx.gas_limit": + panic(fmt.Errorf("field gas_limit of message uexecutor.v1.OutboundTx is not mutable")) + case "uexecutor.v1.OutboundTx.tx_type": + panic(fmt.Errorf("field tx_type of message uexecutor.v1.OutboundTx is not mutable")) + case "uexecutor.v1.OutboundTx.index": + panic(fmt.Errorf("field index of message uexecutor.v1.OutboundTx is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.OutboundTx")) + } + panic(fmt.Errorf("message uexecutor.v1.OutboundTx does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_OutboundTx) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "uexecutor.v1.OutboundTx.destination_chain": + return protoreflect.ValueOfString("") + case "uexecutor.v1.OutboundTx.recipient": + return protoreflect.ValueOfString("") + case "uexecutor.v1.OutboundTx.amount": + return protoreflect.ValueOfString("") + case "uexecutor.v1.OutboundTx.asset_addr": + return protoreflect.ValueOfString("") + case "uexecutor.v1.OutboundTx.sender": + return protoreflect.ValueOfString("") + case "uexecutor.v1.OutboundTx.payload": + return protoreflect.ValueOfString("") + case "uexecutor.v1.OutboundTx.gas_limit": + return protoreflect.ValueOfString("") + case "uexecutor.v1.OutboundTx.tx_type": + return protoreflect.ValueOfEnum(0) + case "uexecutor.v1.OutboundTx.pc_tx": + m := new(Originating_Pc_TX) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "uexecutor.v1.OutboundTx.observed_tx": + m := new(OutboundObservation) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "uexecutor.v1.OutboundTx.index": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.OutboundTx")) + } + panic(fmt.Errorf("message uexecutor.v1.OutboundTx does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_OutboundTx) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in uexecutor.v1.OutboundTx", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_OutboundTx) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_OutboundTx) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_OutboundTx) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_OutboundTx) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*OutboundTx) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.DestinationChain) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Recipient) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Amount) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.AssetAddr) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Sender) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Payload) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.GasLimit) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.TxType != 0 { + n += 1 + runtime.Sov(uint64(x.TxType)) + } + if x.PcTx != nil { + l = options.Size(x.PcTx) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.ObservedTx != nil { + l = options.Size(x.ObservedTx) + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Index) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*OutboundTx) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Index) > 0 { + i -= len(x.Index) + copy(dAtA[i:], x.Index) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Index))) + i-- + dAtA[i] = 0x5a + } + if x.ObservedTx != nil { + encoded, err := options.Marshal(x.ObservedTx) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x52 + } + if x.PcTx != nil { + encoded, err := options.Marshal(x.PcTx) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x4a + } + if x.TxType != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.TxType)) + i-- + dAtA[i] = 0x40 + } + if len(x.GasLimit) > 0 { + i -= len(x.GasLimit) + copy(dAtA[i:], x.GasLimit) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.GasLimit))) + i-- + dAtA[i] = 0x3a + } + if len(x.Payload) > 0 { + i -= len(x.Payload) + copy(dAtA[i:], x.Payload) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Payload))) + i-- + dAtA[i] = 0x32 + } + if len(x.Sender) > 0 { + i -= len(x.Sender) + copy(dAtA[i:], x.Sender) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Sender))) + i-- + dAtA[i] = 0x2a + } + if len(x.AssetAddr) > 0 { + i -= len(x.AssetAddr) + copy(dAtA[i:], x.AssetAddr) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AssetAddr))) + i-- + dAtA[i] = 0x22 + } + if len(x.Amount) > 0 { + i -= len(x.Amount) + copy(dAtA[i:], x.Amount) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Amount))) + i-- + dAtA[i] = 0x1a + } + if len(x.Recipient) > 0 { + i -= len(x.Recipient) + copy(dAtA[i:], x.Recipient) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Recipient))) + i-- + dAtA[i] = 0x12 + } + if len(x.DestinationChain) > 0 { + i -= len(x.DestinationChain) + copy(dAtA[i:], x.DestinationChain) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DestinationChain))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*OutboundTx) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: OutboundTx: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: OutboundTx: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DestinationChain", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.DestinationChain = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Recipient", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Recipient = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Amount = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AssetAddr", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.AssetAddr = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Payload = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field GasLimit", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.GasLimit = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 8: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TxType", wireType) + } + x.TxType = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -4522,29 +5995,16 @@ func (x *fastReflection_OutboundTx) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + x.TxType |= TxType(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.TxHash = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: + case 9: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Recipient", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PcTx", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -4554,29 +6014,33 @@ func (x *fastReflection_OutboundTx) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.Recipient = string(dAtA[iNdEx:postIndex]) + if x.PcTx == nil { + x.PcTx = &Originating_Pc_TX{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.PcTx); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } iNdEx = postIndex - case 4: + case 10: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ObservedTx", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -4586,27 +6050,31 @@ func (x *fastReflection_OutboundTx) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.Amount = string(dAtA[iNdEx:postIndex]) + if x.ObservedTx == nil { + x.ObservedTx = &OutboundObservation{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ObservedTx); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } iNdEx = postIndex - case 5: + case 11: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AssetAddr", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Index", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -4634,7 +6102,7 @@ func (x *fastReflection_OutboundTx) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.AssetAddr = string(dAtA[iNdEx:postIndex]) + x.Index = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -4671,59 +6139,60 @@ func (x *fastReflection_OutboundTx) ProtoMethods() *protoiface.Methods { } } -var _ protoreflect.List = (*_UniversalTx_2_list)(nil) +var _ protoreflect.List = (*_UniversalTx_3_list)(nil) -type _UniversalTx_2_list struct { +type _UniversalTx_3_list struct { list *[]*PCTx } -func (x *_UniversalTx_2_list) Len() int { +func (x *_UniversalTx_3_list) Len() int { if x.list == nil { return 0 } return len(*x.list) } -func (x *_UniversalTx_2_list) Get(i int) protoreflect.Value { +func (x *_UniversalTx_3_list) Get(i int) protoreflect.Value { return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) } -func (x *_UniversalTx_2_list) Set(i int, value protoreflect.Value) { +func (x *_UniversalTx_3_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*PCTx) (*x.list)[i] = concreteValue } -func (x *_UniversalTx_2_list) Append(value protoreflect.Value) { +func (x *_UniversalTx_3_list) Append(value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*PCTx) *x.list = append(*x.list, concreteValue) } -func (x *_UniversalTx_2_list) AppendMutable() protoreflect.Value { +func (x *_UniversalTx_3_list) AppendMutable() protoreflect.Value { v := new(PCTx) *x.list = append(*x.list, v) return protoreflect.ValueOfMessage(v.ProtoReflect()) } -func (x *_UniversalTx_2_list) Truncate(n int) { +func (x *_UniversalTx_3_list) Truncate(n int) { for i := n; i < len(*x.list); i++ { (*x.list)[i] = nil } *x.list = (*x.list)[:n] } -func (x *_UniversalTx_2_list) NewElement() protoreflect.Value { +func (x *_UniversalTx_3_list) NewElement() protoreflect.Value { v := new(PCTx) return protoreflect.ValueOfMessage(v.ProtoReflect()) } -func (x *_UniversalTx_2_list) IsValid() bool { +func (x *_UniversalTx_3_list) IsValid() bool { return x.list != nil } var ( md_UniversalTx protoreflect.MessageDescriptor + fd_UniversalTx_id protoreflect.FieldDescriptor fd_UniversalTx_inbound_tx protoreflect.FieldDescriptor fd_UniversalTx_pc_tx protoreflect.FieldDescriptor fd_UniversalTx_outbound_tx protoreflect.FieldDescriptor @@ -4733,6 +6202,7 @@ var ( func init() { file_uexecutor_v1_types_proto_init() md_UniversalTx = File_uexecutor_v1_types_proto.Messages().ByName("UniversalTx") + fd_UniversalTx_id = md_UniversalTx.Fields().ByName("id") fd_UniversalTx_inbound_tx = md_UniversalTx.Fields().ByName("inbound_tx") fd_UniversalTx_pc_tx = md_UniversalTx.Fields().ByName("pc_tx") fd_UniversalTx_outbound_tx = md_UniversalTx.Fields().ByName("outbound_tx") @@ -4748,7 +6218,7 @@ func (x *UniversalTx) ProtoReflect() protoreflect.Message { } func (x *UniversalTx) slowProtoReflect() protoreflect.Message { - mi := &file_uexecutor_v1_types_proto_msgTypes[7] + mi := &file_uexecutor_v1_types_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4804,6 +6274,12 @@ func (x *fastReflection_UniversalTx) Interface() protoreflect.ProtoMessage { // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_UniversalTx) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Id != "" { + value := protoreflect.ValueOfString(x.Id) + if !f(fd_UniversalTx_id, value) { + return + } + } if x.InboundTx != nil { value := protoreflect.ValueOfMessage(x.InboundTx.ProtoReflect()) if !f(fd_UniversalTx_inbound_tx, value) { @@ -4811,7 +6287,7 @@ func (x *fastReflection_UniversalTx) Range(f func(protoreflect.FieldDescriptor, } } if len(x.PcTx) != 0 { - value := protoreflect.ValueOfList(&_UniversalTx_2_list{list: &x.PcTx}) + value := protoreflect.ValueOfList(&_UniversalTx_3_list{list: &x.PcTx}) if !f(fd_UniversalTx_pc_tx, value) { return } @@ -4843,6 +6319,8 @@ func (x *fastReflection_UniversalTx) Range(f func(protoreflect.FieldDescriptor, // a repeated field is populated if it is non-empty. func (x *fastReflection_UniversalTx) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { + case "uexecutor.v1.UniversalTx.id": + return x.Id != "" case "uexecutor.v1.UniversalTx.inbound_tx": return x.InboundTx != nil case "uexecutor.v1.UniversalTx.pc_tx": @@ -4867,6 +6345,8 @@ func (x *fastReflection_UniversalTx) Has(fd protoreflect.FieldDescriptor) bool { // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_UniversalTx) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { + case "uexecutor.v1.UniversalTx.id": + x.Id = "" case "uexecutor.v1.UniversalTx.inbound_tx": x.InboundTx = nil case "uexecutor.v1.UniversalTx.pc_tx": @@ -4891,14 +6371,17 @@ func (x *fastReflection_UniversalTx) Clear(fd protoreflect.FieldDescriptor) { // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_UniversalTx) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { + case "uexecutor.v1.UniversalTx.id": + value := x.Id + return protoreflect.ValueOfString(value) case "uexecutor.v1.UniversalTx.inbound_tx": value := x.InboundTx return protoreflect.ValueOfMessage(value.ProtoReflect()) case "uexecutor.v1.UniversalTx.pc_tx": if len(x.PcTx) == 0 { - return protoreflect.ValueOfList(&_UniversalTx_2_list{}) + return protoreflect.ValueOfList(&_UniversalTx_3_list{}) } - listValue := &_UniversalTx_2_list{list: &x.PcTx} + listValue := &_UniversalTx_3_list{list: &x.PcTx} return protoreflect.ValueOfList(listValue) case "uexecutor.v1.UniversalTx.outbound_tx": value := x.OutboundTx @@ -4926,11 +6409,13 @@ func (x *fastReflection_UniversalTx) Get(descriptor protoreflect.FieldDescriptor // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_UniversalTx) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { + case "uexecutor.v1.UniversalTx.id": + x.Id = value.Interface().(string) case "uexecutor.v1.UniversalTx.inbound_tx": x.InboundTx = value.Message().Interface().(*Inbound) case "uexecutor.v1.UniversalTx.pc_tx": lv := value.List() - clv := lv.(*_UniversalTx_2_list) + clv := lv.(*_UniversalTx_3_list) x.PcTx = *clv.list case "uexecutor.v1.UniversalTx.outbound_tx": x.OutboundTx = value.Message().Interface().(*OutboundTx) @@ -4965,13 +6450,15 @@ func (x *fastReflection_UniversalTx) Mutable(fd protoreflect.FieldDescriptor) pr if x.PcTx == nil { x.PcTx = []*PCTx{} } - value := &_UniversalTx_2_list{list: &x.PcTx} + value := &_UniversalTx_3_list{list: &x.PcTx} return protoreflect.ValueOfList(value) case "uexecutor.v1.UniversalTx.outbound_tx": if x.OutboundTx == nil { x.OutboundTx = new(OutboundTx) } return protoreflect.ValueOfMessage(x.OutboundTx.ProtoReflect()) + case "uexecutor.v1.UniversalTx.id": + panic(fmt.Errorf("field id of message uexecutor.v1.UniversalTx is not mutable")) case "uexecutor.v1.UniversalTx.universal_status": panic(fmt.Errorf("field universal_status of message uexecutor.v1.UniversalTx is not mutable")) default: @@ -4987,12 +6474,14 @@ func (x *fastReflection_UniversalTx) Mutable(fd protoreflect.FieldDescriptor) pr // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_UniversalTx) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { + case "uexecutor.v1.UniversalTx.id": + return protoreflect.ValueOfString("") case "uexecutor.v1.UniversalTx.inbound_tx": m := new(Inbound) return protoreflect.ValueOfMessage(m.ProtoReflect()) case "uexecutor.v1.UniversalTx.pc_tx": list := []*PCTx{} - return protoreflect.ValueOfList(&_UniversalTx_2_list{list: &list}) + return protoreflect.ValueOfList(&_UniversalTx_3_list{list: &list}) case "uexecutor.v1.UniversalTx.outbound_tx": m := new(OutboundTx) return protoreflect.ValueOfMessage(m.ProtoReflect()) @@ -5067,6 +6556,10 @@ func (x *fastReflection_UniversalTx) ProtoMethods() *protoiface.Methods { var n int var l int _ = l + l = len(x.Id) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } if x.InboundTx != nil { l = options.Size(x.InboundTx) n += 1 + l + runtime.Sov(uint64(l)) @@ -5116,7 +6609,7 @@ func (x *fastReflection_UniversalTx) ProtoMethods() *protoiface.Methods { if x.UniversalStatus != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.UniversalStatus)) i-- - dAtA[i] = 0x20 + dAtA[i] = 0x28 } if x.OutboundTx != nil { encoded, err := options.Marshal(x.OutboundTx) @@ -5130,7 +6623,7 @@ func (x *fastReflection_UniversalTx) ProtoMethods() *protoiface.Methods { copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- - dAtA[i] = 0x1a + dAtA[i] = 0x22 } if len(x.PcTx) > 0 { for iNdEx := len(x.PcTx) - 1; iNdEx >= 0; iNdEx-- { @@ -5145,7 +6638,7 @@ func (x *fastReflection_UniversalTx) ProtoMethods() *protoiface.Methods { copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- - dAtA[i] = 0x12 + dAtA[i] = 0x1a } } if x.InboundTx != nil { @@ -5160,6 +6653,13 @@ func (x *fastReflection_UniversalTx) ProtoMethods() *protoiface.Methods { copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- + dAtA[i] = 0x12 + } + if len(x.Id) > 0 { + i -= len(x.Id) + copy(dAtA[i:], x.Id) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Id))) + i-- dAtA[i] = 0xa } if input.Buf != nil { @@ -5212,6 +6712,38 @@ func (x *fastReflection_UniversalTx) ProtoMethods() *protoiface.Methods { } switch fieldNum { case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field InboundTx", wireType) } @@ -5247,7 +6779,7 @@ func (x *fastReflection_UniversalTx) ProtoMethods() *protoiface.Methods { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex - case 2: + case 3: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PcTx", wireType) } @@ -5281,7 +6813,7 @@ func (x *fastReflection_UniversalTx) ProtoMethods() *protoiface.Methods { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex - case 3: + case 4: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field OutboundTx", wireType) } @@ -5317,7 +6849,7 @@ func (x *fastReflection_UniversalTx) ProtoMethods() *protoiface.Methods { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex - case 4: + case 5: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field UniversalStatus", wireType) } @@ -5550,58 +7082,61 @@ func (Status) EnumDescriptor() ([]byte, []int) { return file_uexecutor_v1_types_proto_rawDescGZIP(), []int{2} } -type InboundTxType int32 +type TxType int32 const ( - InboundTxType_UNSPECIFIED_TX InboundTxType = 0 - InboundTxType_GAS InboundTxType = 1 // fee abstraction - InboundTxType_FUNDS InboundTxType = 2 // synthetic - InboundTxType_FUNDS_AND_PAYLOAD InboundTxType = 3 // synthetic + payload exec - InboundTxType_GAS_AND_PAYLOAD InboundTxType = 4 // fee abstraction + payload exec + TxType_UNSPECIFIED_TX TxType = 0 + TxType_GAS TxType = 1 // fee abstraction + TxType_FUNDS TxType = 2 // synthetic + TxType_FUNDS_AND_PAYLOAD TxType = 3 // synthetic + payload exec + TxType_GAS_AND_PAYLOAD TxType = 4 // fee abstraction + payload exec + TxType_PAYLOAD TxType = 5 ) -// Enum value maps for InboundTxType. +// Enum value maps for TxType. var ( - InboundTxType_name = map[int32]string{ + TxType_name = map[int32]string{ 0: "UNSPECIFIED_TX", 1: "GAS", 2: "FUNDS", 3: "FUNDS_AND_PAYLOAD", 4: "GAS_AND_PAYLOAD", + 5: "PAYLOAD", } - InboundTxType_value = map[string]int32{ + TxType_value = map[string]int32{ "UNSPECIFIED_TX": 0, "GAS": 1, "FUNDS": 2, "FUNDS_AND_PAYLOAD": 3, "GAS_AND_PAYLOAD": 4, + "PAYLOAD": 5, } ) -func (x InboundTxType) Enum() *InboundTxType { - p := new(InboundTxType) +func (x TxType) Enum() *TxType { + p := new(TxType) *p = x return p } -func (x InboundTxType) String() string { +func (x TxType) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } -func (InboundTxType) Descriptor() protoreflect.EnumDescriptor { +func (TxType) Descriptor() protoreflect.EnumDescriptor { return file_uexecutor_v1_types_proto_enumTypes[3].Descriptor() } -func (InboundTxType) Type() protoreflect.EnumType { +func (TxType) Type() protoreflect.EnumType { return &file_uexecutor_v1_types_proto_enumTypes[3] } -func (x InboundTxType) Number() protoreflect.EnumNumber { +func (x TxType) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } -// Deprecated: Use InboundTxType.Descriptor instead. -func (InboundTxType) EnumDescriptor() ([]byte, []int) { +// Deprecated: Use TxType.Descriptor instead. +func (TxType) EnumDescriptor() ([]byte, []int) { return file_uexecutor_v1_types_proto_rawDescGZIP(), []int{3} } @@ -5833,16 +7368,16 @@ type Inbound struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - SourceChain string `protobuf:"bytes,1,opt,name=source_chain,json=sourceChain,proto3" json:"source_chain,omitempty"` // origin chain caip2 id (e.g. eip155:11155111) - TxHash string `protobuf:"bytes,2,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` // unique tx hash / identifier from source chain - Sender string `protobuf:"bytes,3,opt,name=sender,proto3" json:"sender,omitempty"` // sender address on source chain - Recipient string `protobuf:"bytes,4,opt,name=recipient,proto3" json:"recipient,omitempty"` // recipient address on destination chain - Amount string `protobuf:"bytes,5,opt,name=amount,proto3" json:"amount,omitempty"` // synthetic token amount bridged in - AssetAddr string `protobuf:"bytes,6,opt,name=asset_addr,json=assetAddr,proto3" json:"asset_addr,omitempty"` // address of erc20 token address on source chain - LogIndex string `protobuf:"bytes,7,opt,name=log_index,json=logIndex,proto3" json:"log_index,omitempty"` // log index that originated the cross chain tx - TxType InboundTxType `protobuf:"varint,8,opt,name=tx_type,json=txType,proto3,enum=uexecutor.v1.InboundTxType" json:"tx_type,omitempty"` // inbound tx type - UniversalPayload *UniversalPayload `protobuf:"bytes,9,opt,name=universal_payload,json=universalPayload,proto3" json:"universal_payload,omitempty"` // payload is the universal payload to be executed - VerificationData string `protobuf:"bytes,10,opt,name=verification_data,json=verificationData,proto3" json:"verification_data,omitempty"` // verification_data is the bytes passed as verifier data for the given payload. + SourceChain string `protobuf:"bytes,1,opt,name=source_chain,json=sourceChain,proto3" json:"source_chain,omitempty"` // origin chain caip2 id (e.g. eip155:11155111) + TxHash string `protobuf:"bytes,2,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` // unique tx hash / identifier from source chain + Sender string `protobuf:"bytes,3,opt,name=sender,proto3" json:"sender,omitempty"` // sender address on source chain + Recipient string `protobuf:"bytes,4,opt,name=recipient,proto3" json:"recipient,omitempty"` // recipient address on destination chain + Amount string `protobuf:"bytes,5,opt,name=amount,proto3" json:"amount,omitempty"` // synthetic token amount bridged in + AssetAddr string `protobuf:"bytes,6,opt,name=asset_addr,json=assetAddr,proto3" json:"asset_addr,omitempty"` // address of erc20 token address on source chain + LogIndex string `protobuf:"bytes,7,opt,name=log_index,json=logIndex,proto3" json:"log_index,omitempty"` // log index that originated the cross chain tx + TxType TxType `protobuf:"varint,8,opt,name=tx_type,json=txType,proto3,enum=uexecutor.v1.TxType" json:"tx_type,omitempty"` // inbound tx type + UniversalPayload *UniversalPayload `protobuf:"bytes,9,opt,name=universal_payload,json=universalPayload,proto3" json:"universal_payload,omitempty"` // payload is the universal payload to be executed + VerificationData string `protobuf:"bytes,10,opt,name=verification_data,json=verificationData,proto3" json:"verification_data,omitempty"` // verification_data is the bytes passed as verifier data for the given payload. } func (x *Inbound) Reset() { @@ -5914,11 +7449,11 @@ func (x *Inbound) GetLogIndex() string { return "" } -func (x *Inbound) GetTxType() InboundTxType { +func (x *Inbound) GetTxType() TxType { if x != nil { return x.TxType } - return InboundTxType_UNSPECIFIED_TX + return TxType_UNSPECIFIED_TX } func (x *Inbound) GetUniversalPayload() *UniversalPayload { @@ -6010,20 +7545,19 @@ func (x *PCTx) GetErrorMsg() string { return "" } -type OutboundTx struct { +type OutboundObservation struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - DestinationChain string `protobuf:"bytes,1,opt,name=destination_chain,json=destinationChain,proto3" json:"destination_chain,omitempty"` // chain where this outbound is sent - TxHash string `protobuf:"bytes,2,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` // outbound tx hash on destination chain - Recipient string `protobuf:"bytes,3,opt,name=recipient,proto3" json:"recipient,omitempty"` // recipient on destination chain - Amount string `protobuf:"bytes,4,opt,name=amount,proto3" json:"amount,omitempty"` // token amount or payload - AssetAddr string `protobuf:"bytes,5,opt,name=asset_addr,json=assetAddr,proto3" json:"asset_addr,omitempty"` // token contract if applicable + DestinationChain string `protobuf:"bytes,1,opt,name=destination_chain,json=destinationChain,proto3" json:"destination_chain,omitempty"` // chain where the tx was executed + Success bool `protobuf:"varint,2,opt,name=success,proto3" json:"success,omitempty"` // whether execution succeeded + BlockHeight uint64 `protobuf:"varint,3,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` // block height on external chain + TxHash string `protobuf:"bytes,4,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` // external chain tx hash } -func (x *OutboundTx) Reset() { - *x = OutboundTx{} +func (x *OutboundObservation) Reset() { + *x = OutboundObservation{} if protoimpl.UnsafeEnabled { mi := &file_uexecutor_v1_types_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -6031,31 +7565,133 @@ func (x *OutboundTx) Reset() { } } -func (x *OutboundTx) String() string { +func (x *OutboundObservation) String() string { return protoimpl.X.MessageStringOf(x) } -func (*OutboundTx) ProtoMessage() {} +func (*OutboundObservation) ProtoMessage() {} -// Deprecated: Use OutboundTx.ProtoReflect.Descriptor instead. -func (*OutboundTx) Descriptor() ([]byte, []int) { +// Deprecated: Use OutboundObservation.ProtoReflect.Descriptor instead. +func (*OutboundObservation) Descriptor() ([]byte, []int) { return file_uexecutor_v1_types_proto_rawDescGZIP(), []int{6} } -func (x *OutboundTx) GetDestinationChain() string { +func (x *OutboundObservation) GetDestinationChain() string { if x != nil { return x.DestinationChain } return "" } -func (x *OutboundTx) GetTxHash() string { +func (x *OutboundObservation) GetSuccess() bool { + if x != nil { + return x.Success + } + return false +} + +func (x *OutboundObservation) GetBlockHeight() uint64 { + if x != nil { + return x.BlockHeight + } + return 0 +} + +func (x *OutboundObservation) GetTxHash() string { + if x != nil { + return x.TxHash + } + return "" +} + +type Originating_Pc_TX struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TxHash string `protobuf:"bytes,1,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` // pc_tx hash that initiated the outbound + LogIndex string `protobuf:"bytes,2,opt,name=log_index,json=logIndex,proto3" json:"log_index,omitempty"` // log_index that initiated the outbound +} + +func (x *Originating_Pc_TX) Reset() { + *x = Originating_Pc_TX{} + if protoimpl.UnsafeEnabled { + mi := &file_uexecutor_v1_types_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Originating_Pc_TX) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Originating_Pc_TX) ProtoMessage() {} + +// Deprecated: Use Originating_Pc_TX.ProtoReflect.Descriptor instead. +func (*Originating_Pc_TX) Descriptor() ([]byte, []int) { + return file_uexecutor_v1_types_proto_rawDescGZIP(), []int{7} +} + +func (x *Originating_Pc_TX) GetTxHash() string { if x != nil { return x.TxHash } return "" } +func (x *Originating_Pc_TX) GetLogIndex() string { + if x != nil { + return x.LogIndex + } + return "" +} + +type OutboundTx struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + DestinationChain string `protobuf:"bytes,1,opt,name=destination_chain,json=destinationChain,proto3" json:"destination_chain,omitempty"` // chain where this outbound is sent + Recipient string `protobuf:"bytes,2,opt,name=recipient,proto3" json:"recipient,omitempty"` // recipient on destination chain + Amount string `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount,omitempty"` // token amount + AssetAddr string `protobuf:"bytes,4,opt,name=asset_addr,json=assetAddr,proto3" json:"asset_addr,omitempty"` // token contract if applicable + Sender string `protobuf:"bytes,5,opt,name=sender,proto3" json:"sender,omitempty"` // sender of the outbound tx + Payload string `protobuf:"bytes,6,opt,name=payload,proto3" json:"payload,omitempty"` // payload to be executed + GasLimit string `protobuf:"bytes,7,opt,name=gas_limit,json=gasLimit,proto3" json:"gas_limit,omitempty"` // gas limit to be used for the outbound tx + TxType TxType `protobuf:"varint,8,opt,name=tx_type,json=txType,proto3,enum=uexecutor.v1.TxType" json:"tx_type,omitempty"` // outbound tx type + PcTx *Originating_Pc_TX `protobuf:"bytes,9,opt,name=pc_tx,json=pcTx,proto3" json:"pc_tx,omitempty"` // pc_tx that originated the outbound + ObservedTx *OutboundObservation `protobuf:"bytes,10,opt,name=observed_tx,json=observedTx,proto3" json:"observed_tx,omitempty"` // observed tx on destination chain + Index string `protobuf:"bytes,11,opt,name=index,proto3" json:"index,omitempty"` // index of outbound tx +} + +func (x *OutboundTx) Reset() { + *x = OutboundTx{} + if protoimpl.UnsafeEnabled { + mi := &file_uexecutor_v1_types_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OutboundTx) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OutboundTx) ProtoMessage() {} + +// Deprecated: Use OutboundTx.ProtoReflect.Descriptor instead. +func (*OutboundTx) Descriptor() ([]byte, []int) { + return file_uexecutor_v1_types_proto_rawDescGZIP(), []int{8} +} + +func (x *OutboundTx) GetDestinationChain() string { + if x != nil { + return x.DestinationChain + } + return "" +} + func (x *OutboundTx) GetRecipient() string { if x != nil { return x.Recipient @@ -6077,21 +7713,71 @@ func (x *OutboundTx) GetAssetAddr() string { return "" } +func (x *OutboundTx) GetSender() string { + if x != nil { + return x.Sender + } + return "" +} + +func (x *OutboundTx) GetPayload() string { + if x != nil { + return x.Payload + } + return "" +} + +func (x *OutboundTx) GetGasLimit() string { + if x != nil { + return x.GasLimit + } + return "" +} + +func (x *OutboundTx) GetTxType() TxType { + if x != nil { + return x.TxType + } + return TxType_UNSPECIFIED_TX +} + +func (x *OutboundTx) GetPcTx() *Originating_Pc_TX { + if x != nil { + return x.PcTx + } + return nil +} + +func (x *OutboundTx) GetObservedTx() *OutboundObservation { + if x != nil { + return x.ObservedTx + } + return nil +} + +func (x *OutboundTx) GetIndex() string { + if x != nil { + return x.Index + } + return "" +} + type UniversalTx struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - InboundTx *Inbound `protobuf:"bytes,1,opt,name=inbound_tx,json=inboundTx,proto3" json:"inbound_tx,omitempty"` // Full inbound tx data - PcTx []*PCTx `protobuf:"bytes,2,rep,name=pc_tx,json=pcTx,proto3" json:"pc_tx,omitempty"` // Execution details on Push Chain - OutboundTx *OutboundTx `protobuf:"bytes,3,opt,name=outbound_tx,json=outboundTx,proto3" json:"outbound_tx,omitempty"` // Outbound tx triggered by this tx - UniversalStatus UniversalTxStatus `protobuf:"varint,4,opt,name=universal_status,json=universalStatus,proto3,enum=uexecutor.v1.UniversalTxStatus" json:"universal_status,omitempty"` // Current status + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + InboundTx *Inbound `protobuf:"bytes,2,opt,name=inbound_tx,json=inboundTx,proto3" json:"inbound_tx,omitempty"` // Full inbound tx data + PcTx []*PCTx `protobuf:"bytes,3,rep,name=pc_tx,json=pcTx,proto3" json:"pc_tx,omitempty"` // Execution details on Push Chain + OutboundTx *OutboundTx `protobuf:"bytes,4,opt,name=outbound_tx,json=outboundTx,proto3" json:"outbound_tx,omitempty"` // Outbound tx triggered by this tx + UniversalStatus UniversalTxStatus `protobuf:"varint,5,opt,name=universal_status,json=universalStatus,proto3,enum=uexecutor.v1.UniversalTxStatus" json:"universal_status,omitempty"` // Current status } func (x *UniversalTx) Reset() { *x = UniversalTx{} if protoimpl.UnsafeEnabled { - mi := &file_uexecutor_v1_types_proto_msgTypes[7] + mi := &file_uexecutor_v1_types_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6105,7 +7791,14 @@ func (*UniversalTx) ProtoMessage() {} // Deprecated: Use UniversalTx.ProtoReflect.Descriptor instead. func (*UniversalTx) Descriptor() ([]byte, []int) { - return file_uexecutor_v1_types_proto_rawDescGZIP(), []int{7} + return file_uexecutor_v1_types_proto_rawDescGZIP(), []int{9} +} + +func (x *UniversalTx) GetId() string { + if x != nil { + return x.Id + } + return "" } func (x *UniversalTx) GetInboundTx() *Inbound { @@ -6184,7 +7877,7 @@ var file_uexecutor_v1_types_proto_rawDesc = []byte{ 0x74, 0x75, 0x73, 0x12, 0x2c, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x22, 0x9f, 0x03, 0x0a, 0x07, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x21, 0x0a, + 0x73, 0x22, 0x98, 0x03, 0x0a, 0x07, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, @@ -6197,105 +7890,139 @@ var file_uexecutor_v1_types_proto_rawDesc = []byte{ 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x73, 0x73, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x6f, 0x67, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x6f, 0x67, 0x49, 0x6e, - 0x64, 0x65, 0x78, 0x12, 0x34, 0x0a, 0x07, 0x74, 0x78, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x08, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1b, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, - 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x54, 0x78, 0x54, 0x79, 0x70, - 0x65, 0x52, 0x06, 0x74, 0x78, 0x54, 0x79, 0x70, 0x65, 0x12, 0x4b, 0x0a, 0x11, 0x75, 0x6e, 0x69, - 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x5f, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x09, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, - 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x50, 0x61, 0x79, - 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x10, 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x50, - 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x2b, 0x0a, 0x11, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x0a, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x10, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, - 0x61, 0x74, 0x61, 0x3a, 0x1e, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, - 0x2a, 0x11, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2f, 0x69, 0x6e, 0x62, 0x6f, - 0x75, 0x6e, 0x64, 0x22, 0xc8, 0x01, 0x0a, 0x04, 0x50, 0x43, 0x54, 0x78, 0x12, 0x17, 0x0a, 0x07, - 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, - 0x78, 0x48, 0x61, 0x73, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x19, 0x0a, - 0x08, 0x67, 0x61, 0x73, 0x5f, 0x75, 0x73, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x07, 0x67, 0x61, 0x73, 0x55, 0x73, 0x65, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, - 0x6b, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, - 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6d, 0x73, 0x67, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x73, 0x67, - 0x3a, 0x1c, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x0f, 0x75, - 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2f, 0x70, 0x63, 0x5f, 0x74, 0x78, 0x22, 0xcb, - 0x01, 0x0a, 0x0a, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x54, 0x78, 0x12, 0x2b, 0x0a, - 0x11, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x68, 0x61, - 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x78, - 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x78, 0x48, - 0x61, 0x73, 0x68, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, - 0x74, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x64, 0x65, 0x78, 0x12, 0x2d, 0x0a, 0x07, 0x74, 0x78, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x08, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, + 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x78, 0x54, 0x79, 0x70, 0x65, 0x52, 0x06, 0x74, 0x78, 0x54, 0x79, + 0x70, 0x65, 0x12, 0x4b, 0x0a, 0x11, 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x5f, + 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, + 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x69, + 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x10, 0x75, + 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, + 0x2b, 0x0a, 0x11, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x64, 0x61, 0x74, 0x61, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x76, 0x65, 0x72, 0x69, + 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x3a, 0x1e, 0x98, 0xa0, + 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x11, 0x75, 0x65, 0x78, 0x65, 0x63, + 0x75, 0x74, 0x6f, 0x72, 0x2f, 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x22, 0xc8, 0x01, 0x0a, + 0x04, 0x50, 0x43, 0x54, 0x78, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, 0x12, 0x16, + 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x61, 0x73, 0x5f, 0x75, 0x73, + 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x67, 0x61, 0x73, 0x55, 0x73, 0x65, + 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, + 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, + 0x69, 0x67, 0x68, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1b, 0x0a, 0x09, + 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6d, 0x73, 0x67, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x73, 0x67, 0x3a, 0x1c, 0x98, 0xa0, 0x1f, 0x00, 0xe8, + 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x0f, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, + 0x72, 0x2f, 0x70, 0x63, 0x5f, 0x74, 0x78, 0x22, 0x98, 0x01, 0x0a, 0x13, 0x4f, 0x75, 0x74, 0x62, + 0x6f, 0x75, 0x6e, 0x64, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x2b, 0x0a, 0x11, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, + 0x68, 0x61, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x64, 0x65, 0x73, 0x74, + 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x18, 0x0a, 0x07, + 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, + 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, + 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, + 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x78, 0x5f, + 0x68, 0x61, 0x73, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x78, 0x48, 0x61, + 0x73, 0x68, 0x22, 0x73, 0x0a, 0x11, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6e, + 0x67, 0x5f, 0x50, 0x63, 0x5f, 0x54, 0x58, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x78, 0x5f, 0x68, 0x61, + 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, + 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x6f, 0x67, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x6f, 0x67, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x3a, 0x28, 0x98, + 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x1b, 0x75, 0x65, 0x78, 0x65, + 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2f, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6e, + 0x67, 0x5f, 0x70, 0x63, 0x5f, 0x74, 0x78, 0x22, 0xc0, 0x03, 0x0a, 0x0a, 0x4f, 0x75, 0x74, 0x62, + 0x6f, 0x75, 0x6e, 0x64, 0x54, 0x78, 0x12, 0x2b, 0x0a, 0x11, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x10, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x68, + 0x61, 0x69, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, + 0x74, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x73, 0x73, - 0x65, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, - 0x73, 0x73, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x3a, 0x22, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, - 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x15, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, - 0x2f, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x74, 0x78, 0x22, 0x98, 0x02, 0x0a, - 0x0b, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x54, 0x78, 0x12, 0x34, 0x0a, 0x0a, - 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x74, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x15, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, - 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x09, 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, - 0x54, 0x78, 0x12, 0x27, 0x0a, 0x05, 0x70, 0x63, 0x5f, 0x74, 0x78, 0x18, 0x02, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x12, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, - 0x2e, 0x50, 0x43, 0x54, 0x78, 0x52, 0x04, 0x70, 0x63, 0x54, 0x78, 0x12, 0x39, 0x0a, 0x0b, 0x6f, - 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x74, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x18, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, - 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x54, 0x78, 0x52, 0x0a, 0x6f, 0x75, 0x74, 0x62, - 0x6f, 0x75, 0x6e, 0x64, 0x54, 0x78, 0x12, 0x4a, 0x0a, 0x10, 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, - 0x73, 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x1f, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, - 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x54, 0x78, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x52, 0x0f, 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x3a, 0x23, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, - 0x16, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2f, 0x75, 0x6e, 0x69, 0x76, 0x65, - 0x72, 0x73, 0x61, 0x6c, 0x5f, 0x74, 0x78, 0x2a, 0x47, 0x0a, 0x10, 0x56, 0x65, 0x72, 0x69, 0x66, - 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x12, 0x73, - 0x69, 0x67, 0x6e, 0x65, 0x64, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x10, 0x00, 0x12, 0x1b, 0x0a, 0x17, 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, - 0x54, 0x78, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x10, 0x01, - 0x2a, 0x83, 0x02, 0x0a, 0x11, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x54, 0x78, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x23, 0x0a, 0x1f, 0x55, 0x4e, 0x49, 0x56, 0x45, 0x52, - 0x53, 0x41, 0x4c, 0x5f, 0x54, 0x58, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, - 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x49, - 0x4e, 0x42, 0x4f, 0x55, 0x4e, 0x44, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x01, - 0x12, 0x1d, 0x0a, 0x19, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x49, 0x4e, 0x42, 0x4f, - 0x55, 0x4e, 0x44, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x02, 0x12, - 0x17, 0x0a, 0x13, 0x50, 0x43, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x45, 0x44, 0x5f, 0x53, - 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x03, 0x12, 0x16, 0x0a, 0x12, 0x50, 0x43, 0x5f, 0x45, - 0x58, 0x45, 0x43, 0x55, 0x54, 0x45, 0x44, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x04, - 0x12, 0x15, 0x0a, 0x11, 0x50, 0x43, 0x5f, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x52, - 0x45, 0x56, 0x45, 0x52, 0x54, 0x10, 0x05, 0x12, 0x14, 0x0a, 0x10, 0x4f, 0x55, 0x54, 0x42, 0x4f, - 0x55, 0x4e, 0x44, 0x5f, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x06, 0x12, 0x14, 0x0a, - 0x10, 0x4f, 0x55, 0x54, 0x42, 0x4f, 0x55, 0x4e, 0x44, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, - 0x53, 0x10, 0x07, 0x12, 0x13, 0x0a, 0x0f, 0x4f, 0x55, 0x54, 0x42, 0x4f, 0x55, 0x4e, 0x44, 0x5f, - 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x08, 0x12, 0x0c, 0x0a, 0x08, 0x43, 0x41, 0x4e, 0x43, - 0x45, 0x4c, 0x45, 0x44, 0x10, 0x09, 0x2a, 0x35, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x12, 0x0f, 0x0a, 0x0b, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, - 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x0d, - 0x0a, 0x09, 0x46, 0x49, 0x4e, 0x41, 0x4c, 0x49, 0x5a, 0x45, 0x44, 0x10, 0x02, 0x2a, 0x63, 0x0a, - 0x0d, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x54, 0x78, 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, - 0x0a, 0x0e, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x5f, 0x54, 0x58, - 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x47, 0x41, 0x53, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x46, - 0x55, 0x4e, 0x44, 0x53, 0x10, 0x02, 0x12, 0x15, 0x0a, 0x11, 0x46, 0x55, 0x4e, 0x44, 0x53, 0x5f, - 0x41, 0x4e, 0x44, 0x5f, 0x50, 0x41, 0x59, 0x4c, 0x4f, 0x41, 0x44, 0x10, 0x03, 0x12, 0x13, 0x0a, - 0x0f, 0x47, 0x41, 0x53, 0x5f, 0x41, 0x4e, 0x44, 0x5f, 0x50, 0x41, 0x59, 0x4c, 0x4f, 0x41, 0x44, - 0x10, 0x04, 0x42, 0xb2, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, - 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x41, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x70, 0x75, 0x73, 0x68, - 0x2d, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2d, 0x6e, 0x6f, 0x64, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x31, 0x3b, 0x75, 0x65, 0x78, - 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x55, 0x58, 0x58, 0xaa, 0x02, - 0x0c, 0x55, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0c, - 0x55, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x18, 0x55, - 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0d, 0x55, 0x65, 0x78, 0x65, 0x63, 0x75, - 0x74, 0x6f, 0x72, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, + 0x73, 0x73, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, + 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, + 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x67, 0x61, + 0x73, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x67, + 0x61, 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x2d, 0x0a, 0x07, 0x74, 0x78, 0x5f, 0x74, 0x79, + 0x70, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, + 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x78, 0x54, 0x79, 0x70, 0x65, 0x52, 0x06, + 0x74, 0x78, 0x54, 0x79, 0x70, 0x65, 0x12, 0x34, 0x0a, 0x05, 0x70, 0x63, 0x5f, 0x74, 0x78, 0x18, + 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, + 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6e, 0x67, + 0x5f, 0x50, 0x63, 0x5f, 0x54, 0x58, 0x52, 0x04, 0x70, 0x63, 0x54, 0x78, 0x12, 0x42, 0x0a, 0x0b, + 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, 0x74, 0x78, 0x18, 0x0a, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x21, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, + 0x2e, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x54, 0x78, + 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x3a, 0x22, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, + 0x8a, 0xe7, 0xb0, 0x2a, 0x15, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2f, 0x6f, + 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x74, 0x78, 0x22, 0xa8, 0x02, 0x0a, 0x0b, 0x55, + 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x54, 0x78, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x34, 0x0a, 0x0a, 0x69, 0x6e, + 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x74, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, + 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, + 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x09, 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x54, 0x78, + 0x12, 0x27, 0x0a, 0x05, 0x70, 0x63, 0x5f, 0x74, 0x78, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x12, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, + 0x43, 0x54, 0x78, 0x52, 0x04, 0x70, 0x63, 0x54, 0x78, 0x12, 0x39, 0x0a, 0x0b, 0x6f, 0x75, 0x74, + 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x74, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, + 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x75, + 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x54, 0x78, 0x52, 0x0a, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, + 0x6e, 0x64, 0x54, 0x78, 0x12, 0x4a, 0x0a, 0x10, 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, + 0x6c, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1f, + 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6e, + 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x54, 0x78, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, + 0x0f, 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x3a, 0x23, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x16, 0x75, + 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2f, 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, + 0x61, 0x6c, 0x5f, 0x74, 0x78, 0x2a, 0x47, 0x0a, 0x10, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x12, 0x73, 0x69, 0x67, + 0x6e, 0x65, 0x64, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x10, + 0x00, 0x12, 0x1b, 0x0a, 0x17, 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x54, 0x78, + 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x10, 0x01, 0x2a, 0x83, + 0x02, 0x0a, 0x11, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x54, 0x78, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x12, 0x23, 0x0a, 0x1f, 0x55, 0x4e, 0x49, 0x56, 0x45, 0x52, 0x53, 0x41, + 0x4c, 0x5f, 0x54, 0x58, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, + 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x49, 0x4e, 0x42, + 0x4f, 0x55, 0x4e, 0x44, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x01, 0x12, 0x1d, + 0x0a, 0x19, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x49, 0x4e, 0x42, 0x4f, 0x55, 0x4e, + 0x44, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x02, 0x12, 0x17, 0x0a, + 0x13, 0x50, 0x43, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x45, 0x44, 0x5f, 0x53, 0x55, 0x43, + 0x43, 0x45, 0x53, 0x53, 0x10, 0x03, 0x12, 0x16, 0x0a, 0x12, 0x50, 0x43, 0x5f, 0x45, 0x58, 0x45, + 0x43, 0x55, 0x54, 0x45, 0x44, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x04, 0x12, 0x15, + 0x0a, 0x11, 0x50, 0x43, 0x5f, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x52, 0x45, 0x56, + 0x45, 0x52, 0x54, 0x10, 0x05, 0x12, 0x14, 0x0a, 0x10, 0x4f, 0x55, 0x54, 0x42, 0x4f, 0x55, 0x4e, + 0x44, 0x5f, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x06, 0x12, 0x14, 0x0a, 0x10, 0x4f, + 0x55, 0x54, 0x42, 0x4f, 0x55, 0x4e, 0x44, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, + 0x07, 0x12, 0x13, 0x0a, 0x0f, 0x4f, 0x55, 0x54, 0x42, 0x4f, 0x55, 0x4e, 0x44, 0x5f, 0x46, 0x41, + 0x49, 0x4c, 0x45, 0x44, 0x10, 0x08, 0x12, 0x0c, 0x0a, 0x08, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, + 0x45, 0x44, 0x10, 0x09, 0x2a, 0x35, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0f, + 0x0a, 0x0b, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, + 0x0b, 0x0a, 0x07, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, + 0x46, 0x49, 0x4e, 0x41, 0x4c, 0x49, 0x5a, 0x45, 0x44, 0x10, 0x02, 0x2a, 0x69, 0x0a, 0x06, 0x54, + 0x78, 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x0e, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, + 0x46, 0x49, 0x45, 0x44, 0x5f, 0x54, 0x58, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x47, 0x41, 0x53, + 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x46, 0x55, 0x4e, 0x44, 0x53, 0x10, 0x02, 0x12, 0x15, 0x0a, + 0x11, 0x46, 0x55, 0x4e, 0x44, 0x53, 0x5f, 0x41, 0x4e, 0x44, 0x5f, 0x50, 0x41, 0x59, 0x4c, 0x4f, + 0x41, 0x44, 0x10, 0x03, 0x12, 0x13, 0x0a, 0x0f, 0x47, 0x41, 0x53, 0x5f, 0x41, 0x4e, 0x44, 0x5f, + 0x50, 0x41, 0x59, 0x4c, 0x4f, 0x41, 0x44, 0x10, 0x04, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x41, 0x59, + 0x4c, 0x4f, 0x41, 0x44, 0x10, 0x05, 0x42, 0xb2, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x75, + 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x54, 0x79, 0x70, + 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x41, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, + 0x70, 0x75, 0x73, 0x68, 0x2d, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2d, 0x6e, 0x6f, 0x64, 0x65, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x31, + 0x3b, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x55, + 0x58, 0x58, 0xaa, 0x02, 0x0c, 0x55, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x56, + 0x31, 0xca, 0x02, 0x0c, 0x55, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x5c, 0x56, 0x31, + 0xe2, 0x02, 0x18, 0x55, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x5c, 0x56, 0x31, 0x5c, + 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0d, 0x55, 0x65, + 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( @@ -6311,35 +8038,40 @@ func file_uexecutor_v1_types_proto_rawDescGZIP() []byte { } var file_uexecutor_v1_types_proto_enumTypes = make([]protoimpl.EnumInfo, 4) -var file_uexecutor_v1_types_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_uexecutor_v1_types_proto_msgTypes = make([]protoimpl.MessageInfo, 10) var file_uexecutor_v1_types_proto_goTypes = []interface{}{ - (VerificationType)(0), // 0: uexecutor.v1.VerificationType - (UniversalTxStatus)(0), // 1: uexecutor.v1.UniversalTxStatus - (Status)(0), // 2: uexecutor.v1.Status - (InboundTxType)(0), // 3: uexecutor.v1.InboundTxType - (*Params)(nil), // 4: uexecutor.v1.Params - (*UniversalPayload)(nil), // 5: uexecutor.v1.UniversalPayload - (*UniversalAccountId)(nil), // 6: uexecutor.v1.UniversalAccountId - (*InboundStatus)(nil), // 7: uexecutor.v1.InboundStatus - (*Inbound)(nil), // 8: uexecutor.v1.Inbound - (*PCTx)(nil), // 9: uexecutor.v1.PCTx - (*OutboundTx)(nil), // 10: uexecutor.v1.OutboundTx - (*UniversalTx)(nil), // 11: uexecutor.v1.UniversalTx + (VerificationType)(0), // 0: uexecutor.v1.VerificationType + (UniversalTxStatus)(0), // 1: uexecutor.v1.UniversalTxStatus + (Status)(0), // 2: uexecutor.v1.Status + (TxType)(0), // 3: uexecutor.v1.TxType + (*Params)(nil), // 4: uexecutor.v1.Params + (*UniversalPayload)(nil), // 5: uexecutor.v1.UniversalPayload + (*UniversalAccountId)(nil), // 6: uexecutor.v1.UniversalAccountId + (*InboundStatus)(nil), // 7: uexecutor.v1.InboundStatus + (*Inbound)(nil), // 8: uexecutor.v1.Inbound + (*PCTx)(nil), // 9: uexecutor.v1.PCTx + (*OutboundObservation)(nil), // 10: uexecutor.v1.OutboundObservation + (*Originating_Pc_TX)(nil), // 11: uexecutor.v1.Originating_Pc_TX + (*OutboundTx)(nil), // 12: uexecutor.v1.OutboundTx + (*UniversalTx)(nil), // 13: uexecutor.v1.UniversalTx } var file_uexecutor_v1_types_proto_depIdxs = []int32{ 0, // 0: uexecutor.v1.UniversalPayload.v_type:type_name -> uexecutor.v1.VerificationType 2, // 1: uexecutor.v1.InboundStatus.status:type_name -> uexecutor.v1.Status - 3, // 2: uexecutor.v1.Inbound.tx_type:type_name -> uexecutor.v1.InboundTxType + 3, // 2: uexecutor.v1.Inbound.tx_type:type_name -> uexecutor.v1.TxType 5, // 3: uexecutor.v1.Inbound.universal_payload:type_name -> uexecutor.v1.UniversalPayload - 8, // 4: uexecutor.v1.UniversalTx.inbound_tx:type_name -> uexecutor.v1.Inbound - 9, // 5: uexecutor.v1.UniversalTx.pc_tx:type_name -> uexecutor.v1.PCTx - 10, // 6: uexecutor.v1.UniversalTx.outbound_tx:type_name -> uexecutor.v1.OutboundTx - 1, // 7: uexecutor.v1.UniversalTx.universal_status:type_name -> uexecutor.v1.UniversalTxStatus - 8, // [8:8] is the sub-list for method output_type - 8, // [8:8] is the sub-list for method input_type - 8, // [8:8] is the sub-list for extension type_name - 8, // [8:8] is the sub-list for extension extendee - 0, // [0:8] is the sub-list for field type_name + 3, // 4: uexecutor.v1.OutboundTx.tx_type:type_name -> uexecutor.v1.TxType + 11, // 5: uexecutor.v1.OutboundTx.pc_tx:type_name -> uexecutor.v1.Originating_Pc_TX + 10, // 6: uexecutor.v1.OutboundTx.observed_tx:type_name -> uexecutor.v1.OutboundObservation + 8, // 7: uexecutor.v1.UniversalTx.inbound_tx:type_name -> uexecutor.v1.Inbound + 9, // 8: uexecutor.v1.UniversalTx.pc_tx:type_name -> uexecutor.v1.PCTx + 12, // 9: uexecutor.v1.UniversalTx.outbound_tx:type_name -> uexecutor.v1.OutboundTx + 1, // 10: uexecutor.v1.UniversalTx.universal_status:type_name -> uexecutor.v1.UniversalTxStatus + 11, // [11:11] is the sub-list for method output_type + 11, // [11:11] is the sub-list for method input_type + 11, // [11:11] is the sub-list for extension type_name + 11, // [11:11] is the sub-list for extension extendee + 0, // [0:11] is the sub-list for field type_name } func init() { file_uexecutor_v1_types_proto_init() } @@ -6421,7 +8153,7 @@ func file_uexecutor_v1_types_proto_init() { } } file_uexecutor_v1_types_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OutboundTx); i { + switch v := v.(*OutboundObservation); i { case 0: return &v.state case 1: @@ -6433,6 +8165,30 @@ func file_uexecutor_v1_types_proto_init() { } } file_uexecutor_v1_types_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Originating_Pc_TX); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_uexecutor_v1_types_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OutboundTx); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_uexecutor_v1_types_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UniversalTx); i { case 0: return &v.state @@ -6451,7 +8207,7 @@ func file_uexecutor_v1_types_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_uexecutor_v1_types_proto_rawDesc, NumEnums: 4, - NumMessages: 8, + NumMessages: 10, NumExtensions: 0, NumServices: 0, }, From ec36d477dd909f04c89e83d45de3bbbe782082ce Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Mon, 24 Nov 2025 14:16:48 +0530 Subject: [PATCH 003/120] fix: fixed integration tests --- .../uexecutor/inbound_synthetic_bridge_payload_test.go | 4 ++-- test/integration/uexecutor/inbound_synthetic_bridge_test.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/integration/uexecutor/inbound_synthetic_bridge_payload_test.go b/test/integration/uexecutor/inbound_synthetic_bridge_payload_test.go index 57fd7886..5b4fbf31 100644 --- a/test/integration/uexecutor/inbound_synthetic_bridge_payload_test.go +++ b/test/integration/uexecutor/inbound_synthetic_bridge_payload_test.go @@ -135,7 +135,7 @@ func setupInboundBridgePayloadTest(t *testing.T, numVals int) (*app.ChainApp, sd Amount: "1000000", AssetAddr: prc20Address.String(), LogIndex: "1", - TxType: uexecutortypes.InboundTxType_FUNDS_AND_PAYLOAD, + TxType: uexecutortypes.TxType_FUNDS_AND_PAYLOAD, UniversalPayload: validUP, VerificationData: validVerificationData, } @@ -201,7 +201,7 @@ func TestInboundSyntheticBridgePayload(t *testing.T) { Amount: "1000000", AssetAddr: prc20Address.String(), LogIndex: "1", - TxType: uexecutortypes.InboundTxType_FUNDS_AND_PAYLOAD, + TxType: uexecutortypes.TxType_FUNDS_AND_PAYLOAD, UniversalPayload: validUP, VerificationData: "", } diff --git a/test/integration/uexecutor/inbound_synthetic_bridge_test.go b/test/integration/uexecutor/inbound_synthetic_bridge_test.go index 17aaf2bd..1fff6f09 100644 --- a/test/integration/uexecutor/inbound_synthetic_bridge_test.go +++ b/test/integration/uexecutor/inbound_synthetic_bridge_test.go @@ -116,7 +116,7 @@ func setupInboundBridgeTest(t *testing.T, numVals int) (*app.ChainApp, sdk.Conte Amount: "1000000", AssetAddr: prc20Address.String(), LogIndex: "1", - TxType: uexecutortypes.InboundTxType_FUNDS, + TxType: uexecutortypes.TxType_FUNDS, UniversalPayload: nil, VerificationData: "", } From 00c7eff9bed95cb62e789f1ec25ff11ada480cc9 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Mon, 24 Nov 2025 14:17:04 +0530 Subject: [PATCH 004/120] fix: fixed txType change in universalClient --- universalClient/authz/tx_signer_test.go | 6 ++-- universalClient/core/vote_handler.go | 16 ++++----- universalClient/core/vote_handler_test.go | 40 +++++++++++------------ 3 files changed, 31 insertions(+), 31 deletions(-) diff --git a/universalClient/authz/tx_signer_test.go b/universalClient/authz/tx_signer_test.go index 090fbb69..d9017de3 100644 --- a/universalClient/authz/tx_signer_test.go +++ b/universalClient/authz/tx_signer_test.go @@ -250,7 +250,7 @@ func TestTxSigner_WrapMessagesWithAuthZ(t *testing.T) { Amount: "1000", AssetAddr: "asset_address", LogIndex: "0", - TxType: uetypes.InboundTxType_FUNDS_AND_PAYLOAD, + TxType: uetypes.TxType_FUNDS_AND_PAYLOAD, }, }, }, @@ -343,7 +343,7 @@ func TestTxSigner_ValidateMessages(t *testing.T) { Amount: "1000", AssetAddr: "asset_address", LogIndex: "0", - TxType: uetypes.InboundTxType_FUNDS_AND_PAYLOAD, + TxType: uetypes.TxType_FUNDS_AND_PAYLOAD, }, }, }, @@ -392,7 +392,7 @@ func TestTxSigner_SignAndBroadcastAuthZTx(t *testing.T) { Amount: "1000", AssetAddr: "asset_address", LogIndex: "0", - TxType: uetypes.InboundTxType_FUNDS_AND_PAYLOAD, + TxType: uetypes.TxType_FUNDS_AND_PAYLOAD, }, }, } diff --git a/universalClient/core/vote_handler.go b/universalClient/core/vote_handler.go index 3875ef75..fa7a48a9 100644 --- a/universalClient/core/vote_handler.go +++ b/universalClient/core/vote_handler.go @@ -180,19 +180,19 @@ func (vh *VoteHandler) constructInbound(tx *store.ChainTransaction) (*uetypes.In // Map txType from eventData to proper enum value // Event data uses: 0=GAS, 1=GAS_AND_PAYLOAD, 2=FUNDS, 3=FUNDS_AND_PAYLOAD // Enum values are: 0=UNSPECIFIED_TX, 1=GAS, 2=FUNDS, 3=FUNDS_AND_PAYLOAD, 4=GAS_AND_PAYLOAD - txType := uetypes.InboundTxType_UNSPECIFIED_TX + txType := uetypes.TxType_UNSPECIFIED_TX switch eventData.TxType { case 0: - txType = uetypes.InboundTxType_GAS + txType = uetypes.TxType_GAS case 1: - txType = uetypes.InboundTxType_GAS_AND_PAYLOAD + txType = uetypes.TxType_GAS_AND_PAYLOAD case 2: - txType = uetypes.InboundTxType_FUNDS + txType = uetypes.TxType_FUNDS case 3: - txType = uetypes.InboundTxType_FUNDS_AND_PAYLOAD + txType = uetypes.TxType_FUNDS_AND_PAYLOAD default: // For any unknown value, default to GAS - txType = uetypes.InboundTxType_UNSPECIFIED_TX + txType = uetypes.TxType_UNSPECIFIED_TX } // Convert tx.TxHash to hex format if it's in base58 @@ -215,12 +215,12 @@ func (vh *VoteHandler) constructInbound(tx *store.ChainTransaction) (*uetypes.In TxType: txType, } - if txType == uetypes.InboundTxType_FUNDS_AND_PAYLOAD || txType == uetypes.InboundTxType_GAS_AND_PAYLOAD { + if txType == uetypes.TxType_FUNDS_AND_PAYLOAD || txType == uetypes.TxType_GAS_AND_PAYLOAD { inboundMsg.UniversalPayload = &eventData.Payload } // Set recipient for transactions that involve funds - if txType == uetypes.InboundTxType_FUNDS || txType == uetypes.InboundTxType_GAS { + if txType == uetypes.TxType_FUNDS || txType == uetypes.TxType_GAS { inboundMsg.Recipient = eventData.Recipient } diff --git a/universalClient/core/vote_handler_test.go b/universalClient/core/vote_handler_test.go index e33fc6e8..896618f8 100644 --- a/universalClient/core/vote_handler_test.go +++ b/universalClient/core/vote_handler_test.go @@ -127,12 +127,12 @@ func TestVoteHandler_VoteAndConfirm(t *testing.T) { { name: "vote transaction fails with non-zero code", tx: &store.ChainTransaction{ - TxHash: "0x456", - BlockNumber: 200, - EventIdentifier: "add_funds", - Status: "pending", - Confirmations: 15, - Data: json.RawMessage(`{}`), + TxHash: "0x456", + BlockNumber: 200, + EventIdentifier: "add_funds", + Status: "pending", + Confirmations: 15, + Data: json.RawMessage(`{}`), }, setupMock: func(m *MockTxSigner) { m.On("SignAndBroadcastAuthZTx", @@ -152,12 +152,12 @@ func TestVoteHandler_VoteAndConfirm(t *testing.T) { { name: "broadcast error", tx: &store.ChainTransaction{ - TxHash: "0x789", - BlockNumber: 300, - EventIdentifier: "addFunds", - Status: "pending", - Confirmations: 20, - Data: json.RawMessage(`{}`), + TxHash: "0x789", + BlockNumber: 300, + EventIdentifier: "addFunds", + Status: "pending", + Confirmations: 20, + Data: json.RawMessage(`{}`), }, setupMock: func(m *MockTxSigner) { m.On("SignAndBroadcastAuthZTx", @@ -228,7 +228,7 @@ func TestVoteHandler_constructInbound(t *testing.T) { { name: "complete data for EVM transaction", tx: &store.ChainTransaction{ - TxHash: "0xabc123", + TxHash: "0xabc123", EventIdentifier: "addFunds", Data: json.RawMessage(`{ "sourceChain": "eip155:1", @@ -248,15 +248,15 @@ func TestVoteHandler_constructInbound(t *testing.T) { Amount: "1000000", AssetAddr: "0x333", LogIndex: "5", - TxType: uetypes.InboundTxType_FUNDS_AND_PAYLOAD, + TxType: uetypes.TxType_FUNDS_AND_PAYLOAD, }, }, { name: "minimal data with defaults", tx: &store.ChainTransaction{ - TxHash: "0xdef456", + TxHash: "0xdef456", EventIdentifier: "add_funds", - Data: json.RawMessage(`{}`), + Data: json.RawMessage(`{}`), }, expected: &uetypes.Inbound{ SourceChain: "", @@ -266,15 +266,15 @@ func TestVoteHandler_constructInbound(t *testing.T) { Amount: "", AssetAddr: "", LogIndex: "0", - TxType: uetypes.InboundTxType_GAS, + TxType: uetypes.TxType_GAS, }, }, { name: "nil data returns error", tx: &store.ChainTransaction{ - TxHash: "0x789", + TxHash: "0x789", EventIdentifier: "addFunds", - Data: nil, + Data: nil, }, wantError: true, }, @@ -565,7 +565,7 @@ func TestVoteHandler_VoteTxHashNotOverwritten(t *testing.T) { // Create transaction that already has a vote tx hash existingVoteTxHash := "existing_vote_tx_123" tx := &store.ChainTransaction{ - TxHash: "0xalready_voted", + TxHash: "0xalready_voted", BlockNumber: 2000, EventIdentifier: "0xf9bfe8a7", Status: "confirmed", From 3a4a25c2aecffef13097480e2d9033c19e00e8ef Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Mon, 24 Nov 2025 14:45:47 +0530 Subject: [PATCH 005/120] refactor: modified txType change in inbound keeper methods --- x/uexecutor/keeper/execute_inbound.go | 8 ++++---- x/uexecutor/types/inbound.go | 4 ++-- x/uexecutor/types/inbound_test.go | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/x/uexecutor/keeper/execute_inbound.go b/x/uexecutor/keeper/execute_inbound.go index 9c949924..2bbf9f0c 100644 --- a/x/uexecutor/keeper/execute_inbound.go +++ b/x/uexecutor/keeper/execute_inbound.go @@ -9,16 +9,16 @@ import ( func (k Keeper) ExecuteInbound(ctx context.Context, utx types.UniversalTx) error { switch utx.InboundTx.TxType { - case types.InboundTxType_GAS: // fee abstraction + case types.TxType_GAS: // fee abstraction return k.ExecuteInboundGas(ctx, *utx.InboundTx) - case types.InboundTxType_FUNDS: // synthetic + case types.TxType_FUNDS: // synthetic return k.ExecuteInboundFunds(ctx, utx) - case types.InboundTxType_FUNDS_AND_PAYLOAD: // synthetic + payload + case types.TxType_FUNDS_AND_PAYLOAD: // synthetic + payload return k.ExecuteInboundFundsAndPayload(ctx, utx) - case types.InboundTxType_GAS_AND_PAYLOAD: // fee abstraction + payload + case types.TxType_GAS_AND_PAYLOAD: // fee abstraction + payload return k.ExecuteInboundGasAndPayload(ctx, utx) default: diff --git a/x/uexecutor/types/inbound.go b/x/uexecutor/types/inbound.go index b7aab960..2a641b1e 100644 --- a/x/uexecutor/types/inbound.go +++ b/x/uexecutor/types/inbound.go @@ -60,13 +60,13 @@ func (p Inbound) ValidateBasic() error { } // Validate tx_type enum - if _, ok := InboundTxType_name[int32(p.TxType)]; !ok || p.TxType == InboundTxType_UNSPECIFIED_TX { + if _, ok := TxType_name[int32(p.TxType)]; !ok || p.TxType == TxType_UNSPECIFIED_TX { return errors.Wrapf(sdkerrors.ErrInvalidRequest, "invalid tx_type: %v", p.TxType) } // Validate payload only if tx_type requires it switch p.TxType { - case InboundTxType_FUNDS_AND_PAYLOAD, InboundTxType_GAS_AND_PAYLOAD: + case TxType_FUNDS_AND_PAYLOAD, TxType_GAS_AND_PAYLOAD: if p.UniversalPayload == nil { return errors.Wrap(sdkerrors.ErrInvalidRequest, "payload is required for payload tx types") } diff --git a/x/uexecutor/types/inbound_test.go b/x/uexecutor/types/inbound_test.go index e08a2ca4..0cf55b98 100644 --- a/x/uexecutor/types/inbound_test.go +++ b/x/uexecutor/types/inbound_test.go @@ -16,7 +16,7 @@ func TestInbound_ValidateBasic(t *testing.T) { Amount: "1000", AssetAddr: "0x000000000000000000000000000000000000cafe", LogIndex: "1", - TxType: types.InboundTxType_FUNDS, + TxType: types.TxType_FUNDS, } tests := []struct { @@ -134,7 +134,7 @@ func TestInbound_ValidateBasic(t *testing.T) { name: "unspecified tx_type", inbound: func() types.Inbound { ib := validInbound - ib.TxType = types.InboundTxType_UNSPECIFIED_TX + ib.TxType = types.TxType_UNSPECIFIED_TX return ib }(), expectError: true, From 317f0f1de9375caf7b584f95993513309317039f Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Mon, 24 Nov 2025 15:00:05 +0530 Subject: [PATCH 006/120] refactor: added generated protobuf --- api/uexecutor/v1/types.pulsar.go | 200 ++--- proto/uexecutor/v1/types.proto | 4 +- x/uexecutor/types/types.pb.go | 1368 +++++++++++++++++++++++++----- 3 files changed, 1273 insertions(+), 299 deletions(-) diff --git a/api/uexecutor/v1/types.pulsar.go b/api/uexecutor/v1/types.pulsar.go index 344f6692..63b85a8b 100644 --- a/api/uexecutor/v1/types.pulsar.go +++ b/api/uexecutor/v1/types.pulsar.go @@ -7915,7 +7915,7 @@ var file_uexecutor_v1_types_proto_rawDesc = []byte{ 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6d, 0x73, 0x67, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x73, 0x67, 0x3a, 0x1c, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x0f, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, - 0x72, 0x2f, 0x70, 0x63, 0x5f, 0x74, 0x78, 0x22, 0x98, 0x01, 0x0a, 0x13, 0x4f, 0x75, 0x74, 0x62, + 0x72, 0x2f, 0x70, 0x63, 0x5f, 0x74, 0x78, 0x22, 0xc1, 0x01, 0x0a, 0x13, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2b, 0x0a, 0x11, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x64, 0x65, 0x73, 0x74, @@ -7925,104 +7925,106 @@ var file_uexecutor_v1_types_proto_rawDesc = []byte{ 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x78, 0x48, 0x61, - 0x73, 0x68, 0x22, 0x73, 0x0a, 0x11, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6e, - 0x67, 0x5f, 0x50, 0x63, 0x5f, 0x54, 0x58, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x78, 0x5f, 0x68, 0x61, - 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, - 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x6f, 0x67, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x6f, 0x67, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x3a, 0x28, 0x98, - 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x1b, 0x75, 0x65, 0x78, 0x65, - 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2f, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6e, - 0x67, 0x5f, 0x70, 0x63, 0x5f, 0x74, 0x78, 0x22, 0xc0, 0x03, 0x0a, 0x0a, 0x4f, 0x75, 0x74, 0x62, - 0x6f, 0x75, 0x6e, 0x64, 0x54, 0x78, 0x12, 0x2b, 0x0a, 0x11, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x10, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x68, - 0x61, 0x69, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, - 0x74, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x73, 0x73, - 0x65, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, - 0x73, 0x73, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, - 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, - 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x67, 0x61, - 0x73, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x67, - 0x61, 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x2d, 0x0a, 0x07, 0x74, 0x78, 0x5f, 0x74, 0x79, - 0x70, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, - 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x78, 0x54, 0x79, 0x70, 0x65, 0x52, 0x06, - 0x74, 0x78, 0x54, 0x79, 0x70, 0x65, 0x12, 0x34, 0x0a, 0x05, 0x70, 0x63, 0x5f, 0x74, 0x78, 0x18, - 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, - 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6e, 0x67, - 0x5f, 0x50, 0x63, 0x5f, 0x54, 0x58, 0x52, 0x04, 0x70, 0x63, 0x54, 0x78, 0x12, 0x42, 0x0a, 0x0b, - 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, 0x74, 0x78, 0x18, 0x0a, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x21, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, - 0x2e, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x54, 0x78, - 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x3a, 0x22, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, - 0x8a, 0xe7, 0xb0, 0x2a, 0x15, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2f, 0x6f, - 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x74, 0x78, 0x22, 0xa8, 0x02, 0x0a, 0x0b, 0x55, - 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x54, 0x78, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x34, 0x0a, 0x0a, 0x69, 0x6e, - 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x74, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, - 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, - 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x09, 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x54, 0x78, - 0x12, 0x27, 0x0a, 0x05, 0x70, 0x63, 0x5f, 0x74, 0x78, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x12, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, - 0x43, 0x54, 0x78, 0x52, 0x04, 0x70, 0x63, 0x54, 0x78, 0x12, 0x39, 0x0a, 0x0b, 0x6f, 0x75, 0x74, - 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x74, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, - 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x75, - 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x54, 0x78, 0x52, 0x0a, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, - 0x6e, 0x64, 0x54, 0x78, 0x12, 0x4a, 0x0a, 0x10, 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, - 0x6c, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1f, - 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6e, - 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x54, 0x78, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, - 0x0f, 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x3a, 0x23, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x16, 0x75, - 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2f, 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, - 0x61, 0x6c, 0x5f, 0x74, 0x78, 0x2a, 0x47, 0x0a, 0x10, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x12, 0x73, 0x69, 0x67, - 0x6e, 0x65, 0x64, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x10, - 0x00, 0x12, 0x1b, 0x0a, 0x17, 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x54, 0x78, - 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x10, 0x01, 0x2a, 0x83, - 0x02, 0x0a, 0x11, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x54, 0x78, 0x53, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x12, 0x23, 0x0a, 0x1f, 0x55, 0x4e, 0x49, 0x56, 0x45, 0x52, 0x53, 0x41, - 0x4c, 0x5f, 0x54, 0x58, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, - 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x49, 0x4e, 0x42, - 0x4f, 0x55, 0x4e, 0x44, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x01, 0x12, 0x1d, - 0x0a, 0x19, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x49, 0x4e, 0x42, 0x4f, 0x55, 0x4e, - 0x44, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x02, 0x12, 0x17, 0x0a, - 0x13, 0x50, 0x43, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x45, 0x44, 0x5f, 0x53, 0x55, 0x43, - 0x43, 0x45, 0x53, 0x53, 0x10, 0x03, 0x12, 0x16, 0x0a, 0x12, 0x50, 0x43, 0x5f, 0x45, 0x58, 0x45, - 0x43, 0x55, 0x54, 0x45, 0x44, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x04, 0x12, 0x15, - 0x0a, 0x11, 0x50, 0x43, 0x5f, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x52, 0x45, 0x56, - 0x45, 0x52, 0x54, 0x10, 0x05, 0x12, 0x14, 0x0a, 0x10, 0x4f, 0x55, 0x54, 0x42, 0x4f, 0x55, 0x4e, - 0x44, 0x5f, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x06, 0x12, 0x14, 0x0a, 0x10, 0x4f, - 0x55, 0x54, 0x42, 0x4f, 0x55, 0x4e, 0x44, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, - 0x07, 0x12, 0x13, 0x0a, 0x0f, 0x4f, 0x55, 0x54, 0x42, 0x4f, 0x55, 0x4e, 0x44, 0x5f, 0x46, 0x41, - 0x49, 0x4c, 0x45, 0x44, 0x10, 0x08, 0x12, 0x0c, 0x0a, 0x08, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, - 0x45, 0x44, 0x10, 0x09, 0x2a, 0x35, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0f, - 0x0a, 0x0b, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, - 0x0b, 0x0a, 0x07, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, - 0x46, 0x49, 0x4e, 0x41, 0x4c, 0x49, 0x5a, 0x45, 0x44, 0x10, 0x02, 0x2a, 0x69, 0x0a, 0x06, 0x54, - 0x78, 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x0e, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, - 0x46, 0x49, 0x45, 0x44, 0x5f, 0x54, 0x58, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x47, 0x41, 0x53, - 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x46, 0x55, 0x4e, 0x44, 0x53, 0x10, 0x02, 0x12, 0x15, 0x0a, - 0x11, 0x46, 0x55, 0x4e, 0x44, 0x53, 0x5f, 0x41, 0x4e, 0x44, 0x5f, 0x50, 0x41, 0x59, 0x4c, 0x4f, - 0x41, 0x44, 0x10, 0x03, 0x12, 0x13, 0x0a, 0x0f, 0x47, 0x41, 0x53, 0x5f, 0x41, 0x4e, 0x44, 0x5f, - 0x50, 0x41, 0x59, 0x4c, 0x4f, 0x41, 0x44, 0x10, 0x04, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x41, 0x59, - 0x4c, 0x4f, 0x41, 0x44, 0x10, 0x05, 0x42, 0xb2, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x75, - 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x54, 0x79, 0x70, - 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x41, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, - 0x70, 0x75, 0x73, 0x68, 0x2d, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2d, 0x6e, 0x6f, 0x64, 0x65, 0x2f, - 0x61, 0x70, 0x69, 0x2f, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x31, - 0x3b, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x55, - 0x58, 0x58, 0xaa, 0x02, 0x0c, 0x55, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x56, - 0x31, 0xca, 0x02, 0x0c, 0x55, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x5c, 0x56, 0x31, - 0xe2, 0x02, 0x18, 0x55, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x5c, 0x56, 0x31, 0x5c, - 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0d, 0x55, 0x65, - 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x73, 0x68, 0x3a, 0x27, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x1e, 0x75, 0x65, 0x78, + 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2f, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, + 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x6f, 0x0a, 0x11, 0x4f, + 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x50, 0x63, 0x5f, 0x54, 0x58, + 0x12, 0x17, 0x0a, 0x07, 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x6f, 0x67, + 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x6f, + 0x67, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x3a, 0x24, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, + 0x1b, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2f, 0x6f, 0x72, 0x69, 0x67, 0x69, + 0x6e, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x63, 0x5f, 0x74, 0x78, 0x22, 0xc0, 0x03, 0x0a, + 0x0a, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x54, 0x78, 0x12, 0x2b, 0x0a, 0x11, 0x64, + 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x63, 0x69, + 0x70, 0x69, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x63, + 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1d, + 0x0a, 0x0a, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x61, 0x73, 0x73, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x12, 0x16, 0x0a, + 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, + 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, + 0x1b, 0x0a, 0x09, 0x67, 0x61, 0x73, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x67, 0x61, 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x2d, 0x0a, 0x07, + 0x74, 0x78, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, + 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x78, 0x54, + 0x79, 0x70, 0x65, 0x52, 0x06, 0x74, 0x78, 0x54, 0x79, 0x70, 0x65, 0x12, 0x34, 0x0a, 0x05, 0x70, + 0x63, 0x5f, 0x74, 0x78, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x75, 0x65, 0x78, + 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, + 0x61, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x50, 0x63, 0x5f, 0x54, 0x58, 0x52, 0x04, 0x70, 0x63, 0x54, + 0x78, 0x12, 0x42, 0x0a, 0x0b, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, 0x74, 0x78, + 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x4f, 0x62, + 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x6f, 0x62, 0x73, 0x65, 0x72, + 0x76, 0x65, 0x64, 0x54, 0x78, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x0b, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x3a, 0x22, 0x98, 0xa0, 0x1f, + 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x15, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, + 0x74, 0x6f, 0x72, 0x2f, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x74, 0x78, 0x22, + 0xa8, 0x02, 0x0a, 0x0b, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x54, 0x78, 0x12, + 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, + 0x34, 0x0a, 0x0a, 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x74, 0x78, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, + 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x09, 0x69, 0x6e, 0x62, 0x6f, + 0x75, 0x6e, 0x64, 0x54, 0x78, 0x12, 0x27, 0x0a, 0x05, 0x70, 0x63, 0x5f, 0x74, 0x78, 0x18, 0x03, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, + 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x43, 0x54, 0x78, 0x52, 0x04, 0x70, 0x63, 0x54, 0x78, 0x12, 0x39, + 0x0a, 0x0b, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x74, 0x78, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, + 0x76, 0x31, 0x2e, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x54, 0x78, 0x52, 0x0a, 0x6f, + 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x54, 0x78, 0x12, 0x4a, 0x0a, 0x10, 0x75, 0x6e, 0x69, + 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, + 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x54, 0x78, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x52, 0x0f, 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x3a, 0x23, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, + 0xe7, 0xb0, 0x2a, 0x16, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2f, 0x75, 0x6e, + 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x5f, 0x74, 0x78, 0x2a, 0x47, 0x0a, 0x10, 0x56, 0x65, + 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, + 0x0a, 0x12, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x10, 0x00, 0x12, 0x1b, 0x0a, 0x17, 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, + 0x73, 0x61, 0x6c, 0x54, 0x78, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x10, 0x01, 0x2a, 0x83, 0x02, 0x0a, 0x11, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, + 0x6c, 0x54, 0x78, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x23, 0x0a, 0x1f, 0x55, 0x4e, 0x49, + 0x56, 0x45, 0x52, 0x53, 0x41, 0x4c, 0x5f, 0x54, 0x58, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, + 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x13, + 0x0a, 0x0f, 0x49, 0x4e, 0x42, 0x4f, 0x55, 0x4e, 0x44, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, + 0x53, 0x10, 0x01, 0x12, 0x1d, 0x0a, 0x19, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x49, + 0x4e, 0x42, 0x4f, 0x55, 0x4e, 0x44, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x49, 0x4f, 0x4e, + 0x10, 0x02, 0x12, 0x17, 0x0a, 0x13, 0x50, 0x43, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x45, + 0x44, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x03, 0x12, 0x16, 0x0a, 0x12, 0x50, + 0x43, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x45, 0x44, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, + 0x44, 0x10, 0x04, 0x12, 0x15, 0x0a, 0x11, 0x50, 0x43, 0x5f, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, + 0x47, 0x5f, 0x52, 0x45, 0x56, 0x45, 0x52, 0x54, 0x10, 0x05, 0x12, 0x14, 0x0a, 0x10, 0x4f, 0x55, + 0x54, 0x42, 0x4f, 0x55, 0x4e, 0x44, 0x5f, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x06, + 0x12, 0x14, 0x0a, 0x10, 0x4f, 0x55, 0x54, 0x42, 0x4f, 0x55, 0x4e, 0x44, 0x5f, 0x53, 0x55, 0x43, + 0x43, 0x45, 0x53, 0x53, 0x10, 0x07, 0x12, 0x13, 0x0a, 0x0f, 0x4f, 0x55, 0x54, 0x42, 0x4f, 0x55, + 0x4e, 0x44, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x08, 0x12, 0x0c, 0x0a, 0x08, 0x43, + 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x45, 0x44, 0x10, 0x09, 0x2a, 0x35, 0x0a, 0x06, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x12, 0x0f, 0x0a, 0x0b, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, + 0x45, 0x44, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, + 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x46, 0x49, 0x4e, 0x41, 0x4c, 0x49, 0x5a, 0x45, 0x44, 0x10, 0x02, + 0x2a, 0x69, 0x0a, 0x06, 0x54, 0x78, 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x0e, 0x55, 0x4e, + 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x5f, 0x54, 0x58, 0x10, 0x00, 0x12, 0x07, + 0x0a, 0x03, 0x47, 0x41, 0x53, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x46, 0x55, 0x4e, 0x44, 0x53, + 0x10, 0x02, 0x12, 0x15, 0x0a, 0x11, 0x46, 0x55, 0x4e, 0x44, 0x53, 0x5f, 0x41, 0x4e, 0x44, 0x5f, + 0x50, 0x41, 0x59, 0x4c, 0x4f, 0x41, 0x44, 0x10, 0x03, 0x12, 0x13, 0x0a, 0x0f, 0x47, 0x41, 0x53, + 0x5f, 0x41, 0x4e, 0x44, 0x5f, 0x50, 0x41, 0x59, 0x4c, 0x4f, 0x41, 0x44, 0x10, 0x04, 0x12, 0x0b, + 0x0a, 0x07, 0x50, 0x41, 0x59, 0x4c, 0x4f, 0x41, 0x44, 0x10, 0x05, 0x42, 0xb2, 0x01, 0x0a, 0x10, + 0x63, 0x6f, 0x6d, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, + 0x42, 0x0a, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x41, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x63, + 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x2d, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2d, + 0x6e, 0x6f, 0x64, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x6f, 0x72, 0x2f, 0x76, 0x31, 0x3b, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x76, + 0x31, 0xa2, 0x02, 0x03, 0x55, 0x58, 0x58, 0xaa, 0x02, 0x0c, 0x55, 0x65, 0x78, 0x65, 0x63, 0x75, + 0x74, 0x6f, 0x72, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0c, 0x55, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x6f, 0x72, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x18, 0x55, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, + 0x72, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0xea, 0x02, 0x0d, 0x55, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x3a, 0x3a, 0x56, 0x31, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/proto/uexecutor/v1/types.proto b/proto/uexecutor/v1/types.proto index 676b6d0b..395bd98f 100644 --- a/proto/uexecutor/v1/types.proto +++ b/proto/uexecutor/v1/types.proto @@ -112,6 +112,9 @@ message PCTx { } message OutboundObservation { + option (amino.name) = "uexecutor/outbound_observation"; + option (gogoproto.equal) = true; + string destination_chain = 1; // chain where the tx was executed bool success = 2; // whether execution succeeded uint64 block_height = 3; // block height on external chain @@ -121,7 +124,6 @@ message OutboundObservation { message Originating_Pc_TX { option (amino.name) = "uexecutor/originating_pc_tx"; option (gogoproto.equal) = true; - option (gogoproto.goproto_stringer) = false; string tx_hash = 1; // pc_tx hash that initiated the outbound string log_index = 2; // log_index that initiated the outbound diff --git a/x/uexecutor/types/types.pb.go b/x/uexecutor/types/types.pb.go index e17c8361..57cf880e 100644 --- a/x/uexecutor/types/types.pb.go +++ b/x/uexecutor/types/types.pb.go @@ -127,37 +127,40 @@ func (Status) EnumDescriptor() ([]byte, []int) { return fileDescriptor_fab6d3ca71d1e2a5, []int{2} } -type InboundTxType int32 +type TxType int32 const ( - InboundTxType_UNSPECIFIED_TX InboundTxType = 0 - InboundTxType_GAS InboundTxType = 1 - InboundTxType_FUNDS InboundTxType = 2 - InboundTxType_FUNDS_AND_PAYLOAD InboundTxType = 3 - InboundTxType_GAS_AND_PAYLOAD InboundTxType = 4 + TxType_UNSPECIFIED_TX TxType = 0 + TxType_GAS TxType = 1 + TxType_FUNDS TxType = 2 + TxType_FUNDS_AND_PAYLOAD TxType = 3 + TxType_GAS_AND_PAYLOAD TxType = 4 + TxType_PAYLOAD TxType = 5 ) -var InboundTxType_name = map[int32]string{ +var TxType_name = map[int32]string{ 0: "UNSPECIFIED_TX", 1: "GAS", 2: "FUNDS", 3: "FUNDS_AND_PAYLOAD", 4: "GAS_AND_PAYLOAD", + 5: "PAYLOAD", } -var InboundTxType_value = map[string]int32{ +var TxType_value = map[string]int32{ "UNSPECIFIED_TX": 0, "GAS": 1, "FUNDS": 2, "FUNDS_AND_PAYLOAD": 3, "GAS_AND_PAYLOAD": 4, + "PAYLOAD": 5, } -func (x InboundTxType) String() string { - return proto.EnumName(InboundTxType_name, int32(x)) +func (x TxType) String() string { + return proto.EnumName(TxType_name, int32(x)) } -func (InboundTxType) EnumDescriptor() ([]byte, []int) { +func (TxType) EnumDescriptor() ([]byte, []int) { return fileDescriptor_fab6d3ca71d1e2a5, []int{3} } @@ -425,7 +428,7 @@ type Inbound struct { Amount string `protobuf:"bytes,5,opt,name=amount,proto3" json:"amount,omitempty"` AssetAddr string `protobuf:"bytes,6,opt,name=asset_addr,json=assetAddr,proto3" json:"asset_addr,omitempty"` LogIndex string `protobuf:"bytes,7,opt,name=log_index,json=logIndex,proto3" json:"log_index,omitempty"` - TxType InboundTxType `protobuf:"varint,8,opt,name=tx_type,json=txType,proto3,enum=uexecutor.v1.InboundTxType" json:"tx_type,omitempty"` + TxType TxType `protobuf:"varint,8,opt,name=tx_type,json=txType,proto3,enum=uexecutor.v1.TxType" json:"tx_type,omitempty"` UniversalPayload *UniversalPayload `protobuf:"bytes,9,opt,name=universal_payload,json=universalPayload,proto3" json:"universal_payload,omitempty"` VerificationData string `protobuf:"bytes,10,opt,name=verification_data,json=verificationData,proto3" json:"verification_data,omitempty"` } @@ -511,11 +514,11 @@ func (m *Inbound) GetLogIndex() string { return "" } -func (m *Inbound) GetTxType() InboundTxType { +func (m *Inbound) GetTxType() TxType { if m != nil { return m.TxType } - return InboundTxType_UNSPECIFIED_TX + return TxType_UNSPECIFIED_TX } func (m *Inbound) GetUniversalPayload() *UniversalPayload { @@ -615,18 +618,144 @@ func (m *PCTx) GetErrorMsg() string { return "" } -type OutboundTx struct { +type OutboundObservation struct { DestinationChain string `protobuf:"bytes,1,opt,name=destination_chain,json=destinationChain,proto3" json:"destination_chain,omitempty"` - TxHash string `protobuf:"bytes,2,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` - Recipient string `protobuf:"bytes,3,opt,name=recipient,proto3" json:"recipient,omitempty"` - Amount string `protobuf:"bytes,4,opt,name=amount,proto3" json:"amount,omitempty"` - AssetAddr string `protobuf:"bytes,5,opt,name=asset_addr,json=assetAddr,proto3" json:"asset_addr,omitempty"` + Success bool `protobuf:"varint,2,opt,name=success,proto3" json:"success,omitempty"` + BlockHeight uint64 `protobuf:"varint,3,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` + TxHash string `protobuf:"bytes,4,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` +} + +func (m *OutboundObservation) Reset() { *m = OutboundObservation{} } +func (m *OutboundObservation) String() string { return proto.CompactTextString(m) } +func (*OutboundObservation) ProtoMessage() {} +func (*OutboundObservation) Descriptor() ([]byte, []int) { + return fileDescriptor_fab6d3ca71d1e2a5, []int{6} +} +func (m *OutboundObservation) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *OutboundObservation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_OutboundObservation.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *OutboundObservation) XXX_Merge(src proto.Message) { + xxx_messageInfo_OutboundObservation.Merge(m, src) +} +func (m *OutboundObservation) XXX_Size() int { + return m.Size() +} +func (m *OutboundObservation) XXX_DiscardUnknown() { + xxx_messageInfo_OutboundObservation.DiscardUnknown(m) +} + +var xxx_messageInfo_OutboundObservation proto.InternalMessageInfo + +func (m *OutboundObservation) GetDestinationChain() string { + if m != nil { + return m.DestinationChain + } + return "" +} + +func (m *OutboundObservation) GetSuccess() bool { + if m != nil { + return m.Success + } + return false +} + +func (m *OutboundObservation) GetBlockHeight() uint64 { + if m != nil { + return m.BlockHeight + } + return 0 +} + +func (m *OutboundObservation) GetTxHash() string { + if m != nil { + return m.TxHash + } + return "" +} + +type Originating_Pc_TX struct { + TxHash string `protobuf:"bytes,1,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` + LogIndex string `protobuf:"bytes,2,opt,name=log_index,json=logIndex,proto3" json:"log_index,omitempty"` +} + +func (m *Originating_Pc_TX) Reset() { *m = Originating_Pc_TX{} } +func (m *Originating_Pc_TX) String() string { return proto.CompactTextString(m) } +func (*Originating_Pc_TX) ProtoMessage() {} +func (*Originating_Pc_TX) Descriptor() ([]byte, []int) { + return fileDescriptor_fab6d3ca71d1e2a5, []int{7} +} +func (m *Originating_Pc_TX) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Originating_Pc_TX) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Originating_Pc_TX.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Originating_Pc_TX) XXX_Merge(src proto.Message) { + xxx_messageInfo_Originating_Pc_TX.Merge(m, src) +} +func (m *Originating_Pc_TX) XXX_Size() int { + return m.Size() +} +func (m *Originating_Pc_TX) XXX_DiscardUnknown() { + xxx_messageInfo_Originating_Pc_TX.DiscardUnknown(m) +} + +var xxx_messageInfo_Originating_Pc_TX proto.InternalMessageInfo + +func (m *Originating_Pc_TX) GetTxHash() string { + if m != nil { + return m.TxHash + } + return "" +} + +func (m *Originating_Pc_TX) GetLogIndex() string { + if m != nil { + return m.LogIndex + } + return "" +} + +type OutboundTx struct { + DestinationChain string `protobuf:"bytes,1,opt,name=destination_chain,json=destinationChain,proto3" json:"destination_chain,omitempty"` + Recipient string `protobuf:"bytes,2,opt,name=recipient,proto3" json:"recipient,omitempty"` + Amount string `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount,omitempty"` + AssetAddr string `protobuf:"bytes,4,opt,name=asset_addr,json=assetAddr,proto3" json:"asset_addr,omitempty"` + Sender string `protobuf:"bytes,5,opt,name=sender,proto3" json:"sender,omitempty"` + Payload string `protobuf:"bytes,6,opt,name=payload,proto3" json:"payload,omitempty"` + GasLimit string `protobuf:"bytes,7,opt,name=gas_limit,json=gasLimit,proto3" json:"gas_limit,omitempty"` + TxType TxType `protobuf:"varint,8,opt,name=tx_type,json=txType,proto3,enum=uexecutor.v1.TxType" json:"tx_type,omitempty"` + PcTx *Originating_Pc_TX `protobuf:"bytes,9,opt,name=pc_tx,json=pcTx,proto3" json:"pc_tx,omitempty"` + ObservedTx *OutboundObservation `protobuf:"bytes,10,opt,name=observed_tx,json=observedTx,proto3" json:"observed_tx,omitempty"` + Index string `protobuf:"bytes,11,opt,name=index,proto3" json:"index,omitempty"` } func (m *OutboundTx) Reset() { *m = OutboundTx{} } func (*OutboundTx) ProtoMessage() {} func (*OutboundTx) Descriptor() ([]byte, []int) { - return fileDescriptor_fab6d3ca71d1e2a5, []int{6} + return fileDescriptor_fab6d3ca71d1e2a5, []int{8} } func (m *OutboundTx) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -662,13 +791,6 @@ func (m *OutboundTx) GetDestinationChain() string { return "" } -func (m *OutboundTx) GetTxHash() string { - if m != nil { - return m.TxHash - } - return "" -} - func (m *OutboundTx) GetRecipient() string { if m != nil { return m.Recipient @@ -690,17 +812,67 @@ func (m *OutboundTx) GetAssetAddr() string { return "" } +func (m *OutboundTx) GetSender() string { + if m != nil { + return m.Sender + } + return "" +} + +func (m *OutboundTx) GetPayload() string { + if m != nil { + return m.Payload + } + return "" +} + +func (m *OutboundTx) GetGasLimit() string { + if m != nil { + return m.GasLimit + } + return "" +} + +func (m *OutboundTx) GetTxType() TxType { + if m != nil { + return m.TxType + } + return TxType_UNSPECIFIED_TX +} + +func (m *OutboundTx) GetPcTx() *Originating_Pc_TX { + if m != nil { + return m.PcTx + } + return nil +} + +func (m *OutboundTx) GetObservedTx() *OutboundObservation { + if m != nil { + return m.ObservedTx + } + return nil +} + +func (m *OutboundTx) GetIndex() string { + if m != nil { + return m.Index + } + return "" +} + type UniversalTx struct { - InboundTx *Inbound `protobuf:"bytes,1,opt,name=inbound_tx,json=inboundTx,proto3" json:"inbound_tx,omitempty"` - PcTx []*PCTx `protobuf:"bytes,2,rep,name=pc_tx,json=pcTx,proto3" json:"pc_tx,omitempty"` - OutboundTx *OutboundTx `protobuf:"bytes,3,opt,name=outbound_tx,json=outboundTx,proto3" json:"outbound_tx,omitempty"` - UniversalStatus UniversalTxStatus `protobuf:"varint,4,opt,name=universal_status,json=universalStatus,proto3,enum=uexecutor.v1.UniversalTxStatus" json:"universal_status,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + InboundTx *Inbound `protobuf:"bytes,2,opt,name=inbound_tx,json=inboundTx,proto3" json:"inbound_tx,omitempty"` + PcTx []*PCTx `protobuf:"bytes,3,rep,name=pc_tx,json=pcTx,proto3" json:"pc_tx,omitempty"` + OutboundTx *OutboundTx `protobuf:"bytes,4,opt,name=outbound_tx,json=outboundTx,proto3" json:"outbound_tx,omitempty"` + UniversalStatus UniversalTxStatus `protobuf:"varint,5,opt,name=universal_status,json=universalStatus,proto3,enum=uexecutor.v1.UniversalTxStatus" json:"universal_status,omitempty"` } func (m *UniversalTx) Reset() { *m = UniversalTx{} } func (*UniversalTx) ProtoMessage() {} func (*UniversalTx) Descriptor() ([]byte, []int) { - return fileDescriptor_fab6d3ca71d1e2a5, []int{7} + return fileDescriptor_fab6d3ca71d1e2a5, []int{9} } func (m *UniversalTx) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -729,6 +901,13 @@ func (m *UniversalTx) XXX_DiscardUnknown() { var xxx_messageInfo_UniversalTx proto.InternalMessageInfo +func (m *UniversalTx) GetId() string { + if m != nil { + return m.Id + } + return "" +} + func (m *UniversalTx) GetInboundTx() *Inbound { if m != nil { return m.InboundTx @@ -761,13 +940,15 @@ func init() { proto.RegisterEnum("uexecutor.v1.VerificationType", VerificationType_name, VerificationType_value) proto.RegisterEnum("uexecutor.v1.UniversalTxStatus", UniversalTxStatus_name, UniversalTxStatus_value) proto.RegisterEnum("uexecutor.v1.Status", Status_name, Status_value) - proto.RegisterEnum("uexecutor.v1.InboundTxType", InboundTxType_name, InboundTxType_value) + proto.RegisterEnum("uexecutor.v1.TxType", TxType_name, TxType_value) proto.RegisterType((*Params)(nil), "uexecutor.v1.Params") proto.RegisterType((*UniversalPayload)(nil), "uexecutor.v1.UniversalPayload") proto.RegisterType((*UniversalAccountId)(nil), "uexecutor.v1.UniversalAccountId") proto.RegisterType((*InboundStatus)(nil), "uexecutor.v1.InboundStatus") proto.RegisterType((*Inbound)(nil), "uexecutor.v1.Inbound") proto.RegisterType((*PCTx)(nil), "uexecutor.v1.PCTx") + proto.RegisterType((*OutboundObservation)(nil), "uexecutor.v1.OutboundObservation") + proto.RegisterType((*Originating_Pc_TX)(nil), "uexecutor.v1.Originating_Pc_TX") proto.RegisterType((*OutboundTx)(nil), "uexecutor.v1.OutboundTx") proto.RegisterType((*UniversalTx)(nil), "uexecutor.v1.UniversalTx") } @@ -775,83 +956,92 @@ func init() { func init() { proto.RegisterFile("uexecutor/v1/types.proto", fileDescriptor_fab6d3ca71d1e2a5) } var fileDescriptor_fab6d3ca71d1e2a5 = []byte{ - // 1203 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x56, 0x4f, 0x6f, 0xdb, 0xc6, - 0x12, 0x17, 0xf5, 0x5f, 0x23, 0xc7, 0xa6, 0x37, 0x4e, 0xa2, 0xc4, 0x89, 0xec, 0xa7, 0xe0, 0x21, - 0x86, 0xdf, 0x8b, 0x85, 0xf8, 0xbd, 0x04, 0xa8, 0x81, 0x1e, 0x14, 0x89, 0x76, 0xd8, 0xba, 0xb2, - 0x40, 0x51, 0x46, 0x9a, 0xcb, 0x62, 0x4d, 0x6e, 0x28, 0xa2, 0x12, 0x57, 0xe0, 0x92, 0x2a, 0x7d, - 0xee, 0xad, 0xa7, 0x1e, 0x73, 0x6b, 0x3e, 0x42, 0x3f, 0x46, 0x80, 0x5e, 0x72, 0x2c, 0xd0, 0x4b, - 0x91, 0x1c, 0xda, 0x8f, 0x51, 0xec, 0x92, 0x12, 0x29, 0x27, 0x69, 0x7b, 0x11, 0x77, 0x7e, 0x33, - 0xb3, 0x9c, 0xf9, 0xcd, 0x6f, 0x57, 0x84, 0x46, 0x48, 0x23, 0x6a, 0x85, 0x01, 0xf3, 0xdb, 0xf3, - 0x47, 0xed, 0xe0, 0x72, 0x46, 0xf9, 0xc1, 0xcc, 0x67, 0x01, 0x43, 0x6b, 0x4b, 0xcf, 0xc1, 0xfc, - 0xd1, 0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b7, - 0xd3, 0xef, 0x6a, 0xc2, 0xaa, 0xed, 0x3f, 0x86, 0x72, 0xd2, 0xf9, 0x06, 0xd4, 0x57, 0xbb, 0xac, - 0x43, 0x65, 0xf1, 0x02, 0x05, 0x5d, 0x83, 0xda, 0xb1, 0xde, 0xef, 0x9c, 0xea, 0x2f, 0xb4, 0x9e, - 0x9a, 0xdf, 0xb7, 0x96, 0x7f, 0x0d, 0xf1, 0x65, 0x87, 0x10, 0xac, 0x67, 0xb2, 0xb1, 0xf9, 0x5c, - 0xcd, 0xa1, 0x0a, 0x14, 0x4e, 0x3a, 0x82, 0x9a, 0x1a, 0x94, 0x8e, 0x47, 0xfd, 0xde, 0x50, 0xcd, - 0x8b, 0xae, 0xe4, 0x12, 0x77, 0x44, 0xfd, 0x9d, 0xaf, 0x4f, 0xcf, 0x3a, 0x3d, 0xb5, 0x20, 0x2a, - 0x3d, 0xe9, 0xac, 0x82, 0xc5, 0xa7, 0x83, 0x37, 0xef, 0x9a, 0xca, 0xdb, 0x77, 0x4d, 0xe5, 0xb7, - 0x77, 0x4d, 0xe5, 0x87, 0xf7, 0xcd, 0xdc, 0xdb, 0xf7, 0xcd, 0xdc, 0x2f, 0xef, 0x9b, 0xb9, 0x17, - 0x4f, 0x1c, 0x37, 0x18, 0x87, 0x17, 0x07, 0x16, 0x9b, 0xb6, 0x67, 0x21, 0x1f, 0xcb, 0xf3, 0x2d, - 0x57, 0x0f, 0xe5, 0xf2, 0xa1, 0xc7, 0x6c, 0xda, 0x8e, 0xda, 0xa9, 0x86, 0xe4, 0xf7, 0xd4, 0x45, - 0x59, 0x7e, 0x19, 0xfd, 0xef, 0xcf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x45, 0x04, 0x15, 0xfa, 0x6c, - 0x09, 0x00, 0x00, + // 1360 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x56, 0xbf, 0x6f, 0xd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ee, 0x7d, 0x4d, 0xf9, 0xeb, 0x7d, 0x4d, 0xf9, 0xf9, + 0x43, 0x6d, 0xe1, 0xdd, 0x87, 0xda, 0xc2, 0x1f, 0x1f, 0x6a, 0x0b, 0x2f, 0x9f, 0x59, 0xb6, 0x3f, + 0x0a, 0x4e, 0xb6, 0x0d, 0x77, 0xb2, 0x33, 0x0d, 0xd8, 0x48, 0x8c, 0x3a, 0xb1, 0x7a, 0x24, 0x96, + 0x8f, 0x1c, 0xd7, 0xa4, 0x3b, 0xe1, 0xce, 0x5c, 0x49, 0xe2, 0x87, 0xf8, 0x49, 0x41, 0xfc, 0xa4, + 0xfe, 0xe2, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x5e, 0x9b, 0xb5, 0x74, 0xa5, 0x0b, 0x00, 0x00, } func (this *Params) Equal(that interface{}) bool { @@ -1046,14 +1236,14 @@ func (this *PCTx) Equal(that interface{}) bool { } return true } -func (this *OutboundTx) Equal(that interface{}) bool { +func (this *OutboundObservation) Equal(that interface{}) bool { if that == nil { return this == nil } - that1, ok := that.(*OutboundTx) + that1, ok := that.(*OutboundObservation) if !ok { - that2, ok := that.(OutboundTx) + that2, ok := that.(OutboundObservation) if ok { that1 = &that2 } else { @@ -1068,9 +1258,66 @@ func (this *OutboundTx) Equal(that interface{}) bool { if this.DestinationChain != that1.DestinationChain { return false } + if this.Success != that1.Success { + return false + } + if this.BlockHeight != that1.BlockHeight { + return false + } + if this.TxHash != that1.TxHash { + return false + } + return true +} +func (this *Originating_Pc_TX) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Originating_Pc_TX) + if !ok { + that2, ok := that.(Originating_Pc_TX) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } if this.TxHash != that1.TxHash { return false } + if this.LogIndex != that1.LogIndex { + return false + } + return true +} +func (this *OutboundTx) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*OutboundTx) + if !ok { + that2, ok := that.(OutboundTx) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.DestinationChain != that1.DestinationChain { + return false + } if this.Recipient != that1.Recipient { return false } @@ -1080,6 +1327,27 @@ func (this *OutboundTx) Equal(that interface{}) bool { if this.AssetAddr != that1.AssetAddr { return false } + if this.Sender != that1.Sender { + return false + } + if this.Payload != that1.Payload { + return false + } + if this.GasLimit != that1.GasLimit { + return false + } + if this.TxType != that1.TxType { + return false + } + if !this.PcTx.Equal(that1.PcTx) { + return false + } + if !this.ObservedTx.Equal(that1.ObservedTx) { + return false + } + if this.Index != that1.Index { + return false + } return true } func (this *UniversalTx) Equal(that interface{}) bool { @@ -1101,6 +1369,9 @@ func (this *UniversalTx) Equal(that interface{}) bool { } else if this == nil { return false } + if this.Id != that1.Id { + return false + } if !this.InboundTx.Equal(that1.InboundTx) { return false } @@ -1466,7 +1737,7 @@ func (m *PCTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *OutboundTx) Marshal() (dAtA []byte, err error) { +func (m *OutboundObservation) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1476,43 +1747,37 @@ func (m *OutboundTx) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *OutboundTx) MarshalTo(dAtA []byte) (int, error) { +func (m *OutboundObservation) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *OutboundTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *OutboundObservation) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.AssetAddr) > 0 { - i -= len(m.AssetAddr) - copy(dAtA[i:], m.AssetAddr) - i = encodeVarintTypes(dAtA, i, uint64(len(m.AssetAddr))) - i-- - dAtA[i] = 0x2a - } - if len(m.Amount) > 0 { - i -= len(m.Amount) - copy(dAtA[i:], m.Amount) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Amount))) + if len(m.TxHash) > 0 { + i -= len(m.TxHash) + copy(dAtA[i:], m.TxHash) + i = encodeVarintTypes(dAtA, i, uint64(len(m.TxHash))) i-- dAtA[i] = 0x22 } - if len(m.Recipient) > 0 { - i -= len(m.Recipient) - copy(dAtA[i:], m.Recipient) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Recipient))) + if m.BlockHeight != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.BlockHeight)) i-- - dAtA[i] = 0x1a + dAtA[i] = 0x18 } - if len(m.TxHash) > 0 { - i -= len(m.TxHash) - copy(dAtA[i:], m.TxHash) - i = encodeVarintTypes(dAtA, i, uint64(len(m.TxHash))) + if m.Success { i-- - dAtA[i] = 0x12 + if m.Success { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x10 } if len(m.DestinationChain) > 0 { i -= len(m.DestinationChain) @@ -1524,7 +1789,7 @@ func (m *OutboundTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *UniversalTx) Marshal() (dAtA []byte, err error) { +func (m *Originating_Pc_TX) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1534,24 +1799,75 @@ func (m *UniversalTx) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *UniversalTx) MarshalTo(dAtA []byte) (int, error) { +func (m *Originating_Pc_TX) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *UniversalTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *Originating_Pc_TX) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if m.UniversalStatus != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.UniversalStatus)) + if len(m.LogIndex) > 0 { + i -= len(m.LogIndex) + copy(dAtA[i:], m.LogIndex) + i = encodeVarintTypes(dAtA, i, uint64(len(m.LogIndex))) i-- - dAtA[i] = 0x20 + dAtA[i] = 0x12 } - if m.OutboundTx != nil { + if len(m.TxHash) > 0 { + i -= len(m.TxHash) + copy(dAtA[i:], m.TxHash) + i = encodeVarintTypes(dAtA, i, uint64(len(m.TxHash))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *OutboundTx) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *OutboundTx) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *OutboundTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Index) > 0 { + i -= len(m.Index) + copy(dAtA[i:], m.Index) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Index))) + i-- + dAtA[i] = 0x5a + } + if m.ObservedTx != nil { { - size, err := m.OutboundTx.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.ObservedTx.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x52 + } + if m.PcTx != nil { + { + size, err := m.PcTx.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -1559,8 +1875,102 @@ func (m *UniversalTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintTypes(dAtA, i, uint64(size)) } i-- + dAtA[i] = 0x4a + } + if m.TxType != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.TxType)) + i-- + dAtA[i] = 0x40 + } + if len(m.GasLimit) > 0 { + i -= len(m.GasLimit) + copy(dAtA[i:], m.GasLimit) + i = encodeVarintTypes(dAtA, i, uint64(len(m.GasLimit))) + i-- + dAtA[i] = 0x3a + } + if len(m.Payload) > 0 { + i -= len(m.Payload) + copy(dAtA[i:], m.Payload) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Payload))) + i-- + dAtA[i] = 0x32 + } + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0x2a + } + if len(m.AssetAddr) > 0 { + i -= len(m.AssetAddr) + copy(dAtA[i:], m.AssetAddr) + i = encodeVarintTypes(dAtA, i, uint64(len(m.AssetAddr))) + i-- + dAtA[i] = 0x22 + } + if len(m.Amount) > 0 { + i -= len(m.Amount) + copy(dAtA[i:], m.Amount) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Amount))) + i-- dAtA[i] = 0x1a } + if len(m.Recipient) > 0 { + i -= len(m.Recipient) + copy(dAtA[i:], m.Recipient) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Recipient))) + i-- + dAtA[i] = 0x12 + } + if len(m.DestinationChain) > 0 { + i -= len(m.DestinationChain) + copy(dAtA[i:], m.DestinationChain) + i = encodeVarintTypes(dAtA, i, uint64(len(m.DestinationChain))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *UniversalTx) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *UniversalTx) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *UniversalTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.UniversalStatus != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.UniversalStatus)) + i-- + dAtA[i] = 0x28 + } + if m.OutboundTx != nil { + { + size, err := m.OutboundTx.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } if len(m.PcTx) > 0 { for iNdEx := len(m.PcTx) - 1; iNdEx >= 0; iNdEx-- { { @@ -1572,7 +1982,7 @@ func (m *UniversalTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintTypes(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x12 + dAtA[i] = 0x1a } } if m.InboundTx != nil { @@ -1585,6 +1995,13 @@ func (m *UniversalTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintTypes(dAtA, i, uint64(size)) } i-- + dAtA[i] = 0x12 + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Id))) + i-- dAtA[i] = 0xa } return len(dAtA) - i, nil @@ -1769,7 +2186,7 @@ func (m *PCTx) Size() (n int) { return n } -func (m *OutboundTx) Size() (n int) { +func (m *OutboundObservation) Size() (n int) { if m == nil { return 0 } @@ -1779,10 +2196,46 @@ func (m *OutboundTx) Size() (n int) { if l > 0 { n += 1 + l + sovTypes(uint64(l)) } + if m.Success { + n += 2 + } + if m.BlockHeight != 0 { + n += 1 + sovTypes(uint64(m.BlockHeight)) + } + l = len(m.TxHash) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + return n +} + +func (m *Originating_Pc_TX) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l l = len(m.TxHash) if l > 0 { n += 1 + l + sovTypes(uint64(l)) } + l = len(m.LogIndex) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + return n +} + +func (m *OutboundTx) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.DestinationChain) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } l = len(m.Recipient) if l > 0 { n += 1 + l + sovTypes(uint64(l)) @@ -1795,6 +2248,33 @@ func (m *OutboundTx) Size() (n int) { if l > 0 { n += 1 + l + sovTypes(uint64(l)) } + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.Payload) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.GasLimit) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if m.TxType != 0 { + n += 1 + sovTypes(uint64(m.TxType)) + } + if m.PcTx != nil { + l = m.PcTx.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.ObservedTx != nil { + l = m.ObservedTx.Size() + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.Index) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } return n } @@ -1804,6 +2284,10 @@ func (m *UniversalTx) Size() (n int) { } var l int _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } if m.InboundTx != nil { l = m.InboundTx.Size() n += 1 + l + sovTypes(uint64(l)) @@ -2707,7 +3191,7 @@ func (m *Inbound) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.TxType |= InboundTxType(b&0x7F) << shift + m.TxType |= TxType(b&0x7F) << shift if b < 0x80 { break } @@ -3017,7 +3501,7 @@ func (m *PCTx) Unmarshal(dAtA []byte) error { } return nil } -func (m *OutboundTx) Unmarshal(dAtA []byte) error { +func (m *OutboundObservation) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3040,10 +3524,10 @@ func (m *OutboundTx) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: OutboundTx: wiretype end group for non-group") + return fmt.Errorf("proto: OutboundObservation: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: OutboundTx: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: OutboundObservation: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -3079,10 +3563,10 @@ func (m *OutboundTx) Unmarshal(dAtA []byte) error { m.DestinationChain = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TxHash", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Success", wireType) } - var stringLen uint64 + var v int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -3092,29 +3576,17 @@ func (m *OutboundTx) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + v |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TxHash = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex + m.Success = bool(v != 0) case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Recipient", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BlockHeight", wireType) } - var stringLen uint64 + m.BlockHeight = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -3124,27 +3596,14 @@ func (m *OutboundTx) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.BlockHeight |= uint64(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Recipient = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field TxHash", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3172,18 +3631,278 @@ func (m *OutboundTx) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Amount = string(dAtA[iNdEx:postIndex]) + m.TxHash = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AssetAddr", wireType) + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Originating_Pc_TX) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Originating_Pc_TX: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Originating_Pc_TX: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TxHash", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TxHash = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LogIndex", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.LogIndex = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *OutboundTx) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: OutboundTx: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: OutboundTx: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + 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 ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DestinationChain = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Recipient", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Recipient = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Amount = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AssetAddr", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { return io.ErrUnexpectedEOF } b := dAtA[iNdEx] @@ -3206,6 +3925,225 @@ func (m *OutboundTx) Unmarshal(dAtA []byte) error { } m.AssetAddr = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Payload = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GasLimit", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.GasLimit = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TxType", wireType) + } + m.TxType = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TxType |= TxType(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PcTx", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.PcTx == nil { + m.PcTx = &Originating_Pc_TX{} + } + if err := m.PcTx.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ObservedTx", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ObservedTx == nil { + m.ObservedTx = &OutboundObservation{} + } + if err := m.ObservedTx.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Index = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTypes(dAtA[iNdEx:]) @@ -3257,6 +4195,38 @@ func (m *UniversalTx) Unmarshal(dAtA []byte) error { } switch fieldNum { case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field InboundTx", wireType) } @@ -3292,7 +4262,7 @@ func (m *UniversalTx) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 2: + case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field PcTx", wireType) } @@ -3326,7 +4296,7 @@ func (m *UniversalTx) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 3: + case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OutboundTx", wireType) } @@ -3362,7 +4332,7 @@ func (m *UniversalTx) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 4: + case 5: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field UniversalStatus", wireType) } From 55af6f9edbef706db95c8b34ce4efad3f7115fc9 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Mon, 24 Nov 2025 15:00:25 +0530 Subject: [PATCH 007/120] feat: updated validateBasic fn of outbound msg type --- x/uexecutor/types/outbound_tx.go | 79 +++++++++++++++++++++++++------- 1 file changed, 63 insertions(+), 16 deletions(-) diff --git a/x/uexecutor/types/outbound_tx.go b/x/uexecutor/types/outbound_tx.go index fb066192..012ba3ce 100644 --- a/x/uexecutor/types/outbound_tx.go +++ b/x/uexecutor/types/outbound_tx.go @@ -31,30 +31,77 @@ func (p OutboundTx) ValidateBasic() error { return errors.Wrap(sdkerrors.ErrInvalidRequest, "destination_chain must be in CAIP-2 format :") } - // Validate tx_hash (non-empty) - if strings.TrimSpace(p.TxHash) == "" { - return errors.Wrap(sdkerrors.ErrInvalidRequest, "tx_hash cannot be empty") - } - - // Validate recipient (non-empty, valid hex address) + // recipient must not be empty if strings.TrimSpace(p.Recipient) == "" { return errors.Wrap(sdkerrors.ErrInvalidAddress, "recipient cannot be empty") } - if !utils.IsValidAddress(p.Recipient, utils.HEX) { - return errors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid recipient address: %s", p.Recipient) + + // sender + if strings.TrimSpace(p.Sender) == "" { + return errors.Wrap(sdkerrors.ErrInvalidAddress, "sender cannot be empty") + } + if !utils.IsValidAddress(p.Sender, utils.HEX) { + return errors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid sender address: %s", p.Sender) + } + + // tx type support + switch p.TxType { + case TxType_FUNDS, TxType_FUNDS_AND_PAYLOAD, TxType_PAYLOAD: + // supported + default: + return errors.Wrapf(sdkerrors.ErrInvalidRequest, "unsupported tx_type: %s", p.TxType.String()) + } + + // amount validation (only for funds-related txs) + if p.TxType == TxType_FUNDS || p.TxType == TxType_FUNDS_AND_PAYLOAD { + if strings.TrimSpace(p.Amount) == "" { + return errors.Wrap(sdkerrors.ErrInvalidRequest, "amount cannot be empty for funds tx") + } + if bi, ok := new(big.Int).SetString(p.Amount, 10); !ok || bi.Sign() <= 0 { + return errors.Wrap(sdkerrors.ErrInvalidRequest, "amount must be a valid positive uint256") + } + } + + // payload validation (required for payload txs) + if p.TxType == TxType_PAYLOAD || p.TxType == TxType_FUNDS_AND_PAYLOAD { + if strings.TrimSpace(p.Payload) == "" { + return errors.Wrap(sdkerrors.ErrInvalidRequest, "payload cannot be empty for payload tx") + } + } + + // asset_addr required when amount is involved + if (p.TxType == TxType_FUNDS || p.TxType == TxType_FUNDS_AND_PAYLOAD) && strings.TrimSpace(p.AssetAddr) == "" { + return errors.Wrap(sdkerrors.ErrInvalidAddress, "asset_addr cannot be empty for funds tx") + } + + // gas_limit (uint) + if strings.TrimSpace(p.GasLimit) != "" { + if _, ok := new(big.Int).SetString(p.GasLimit, 10); !ok { + return errors.Wrap(sdkerrors.ErrInvalidRequest, "gas_limit must be a valid uint") + } } - // Validate amount as uint256 (non-empty, >0) - if strings.TrimSpace(p.Amount) == "" { - return errors.Wrap(sdkerrors.ErrInvalidRequest, "amount cannot be empty") + // pc_tx validation + if strings.TrimSpace(p.PcTx.TxHash) == "" { + return errors.Wrap(sdkerrors.ErrInvalidRequest, "pc_tx.tx_hash cannot be empty") } - if bi, ok := new(big.Int).SetString(p.Amount, 10); !ok || bi.Sign() <= 0 { - return errors.Wrap(sdkerrors.ErrInvalidRequest, "amount must be a valid positive uint256") + if strings.TrimSpace(p.PcTx.LogIndex) == "" { + return errors.Wrap(sdkerrors.ErrInvalidRequest, "pc_tx.log_index cannot be empty") + } + + // observed tx validation (if present) + if strings.TrimSpace(p.ObservedTx.TxHash) != "" { + if strings.TrimSpace(p.ObservedTx.DestinationChain) == "" { + return errors.Wrap(sdkerrors.ErrInvalidRequest, "observed_tx.destination_chain cannot be empty") + } + if p.ObservedTx.BlockHeight == 0 { + return errors.Wrap(sdkerrors.ErrInvalidRequest, "observed_tx.block_height must be > 0") + } } - // Validate asset_addr (non-empty) - if strings.TrimSpace(p.AssetAddr) == "" { - return errors.Wrap(sdkerrors.ErrInvalidAddress, "asset_addr cannot be empty") + // index + if strings.TrimSpace(p.Index) == "" { + return errors.Wrap(sdkerrors.ErrInvalidRequest, "index cannot be empty") } return nil From 912c95cf1e58a191b47547734cba74809997d72c Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Mon, 24 Nov 2025 15:00:41 +0530 Subject: [PATCH 008/120] feat: updated validateBasic tests of outbound msg type --- x/uexecutor/types/outbound_tx_test.go | 117 ++++++++++++++++++------- x/uexecutor/types/universal_tx_test.go | 14 ++- 2 files changed, 94 insertions(+), 37 deletions(-) diff --git a/x/uexecutor/types/outbound_tx_test.go b/x/uexecutor/types/outbound_tx_test.go index 09a0b85f..934e0420 100644 --- a/x/uexecutor/types/outbound_tx_test.go +++ b/x/uexecutor/types/outbound_tx_test.go @@ -7,15 +7,25 @@ import ( "github.com/stretchr/testify/require" ) -func TestOutboundTx_ValidateBasic(t *testing.T) { - validOutbound := types.OutboundTx{ +func baseValidOutbound() types.OutboundTx { + return types.OutboundTx{ DestinationChain: "eip155:11155111", - TxHash: "0x123abc", Recipient: "0x000000000000000000000000000000000000beef", + Sender: "0x000000000000000000000000000000000000dead", Amount: "1000", AssetAddr: "0x000000000000000000000000000000000000cafe", + Payload: "0xabcdef", + GasLimit: "21000", + TxType: types.TxType_FUNDS_AND_PAYLOAD, + PcTx: &types.Originating_Pc_TX{ + TxHash: "0xpc123", + LogIndex: "1", + }, + Index: "0", } +} +func TestOutboundTx_ValidateBasic(t *testing.T) { tests := []struct { name string outbound types.OutboundTx @@ -23,64 +33,71 @@ func TestOutboundTx_ValidateBasic(t *testing.T) { errContains string }{ { - name: "valid outbound", - outbound: validOutbound, + name: "valid FUNDS tx", + outbound: func() types.OutboundTx { + ob := baseValidOutbound() + ob.TxType = types.TxType_FUNDS + ob.Payload = "" + return ob + }(), expectError: false, }, { - name: "empty destination chain", + name: "valid PAYLOAD tx", outbound: func() types.OutboundTx { - ob := validOutbound - ob.DestinationChain = "" + ob := baseValidOutbound() + ob.TxType = types.TxType_PAYLOAD + ob.Amount = "" + ob.AssetAddr = "" return ob }(), - expectError: true, - errContains: "destination_chain cannot be empty", + expectError: false, }, { - name: "invalid destination chain format", + name: "empty destination_chain", outbound: func() types.OutboundTx { - ob := validOutbound - ob.DestinationChain = "eip155" // missing ":" + ob := baseValidOutbound() + ob.DestinationChain = "" return ob }(), expectError: true, - errContains: "CAIP-2 format", + errContains: "destination_chain cannot be empty", }, { - name: "empty tx_hash", + name: "invalid CAIP-2 chain", outbound: func() types.OutboundTx { - ob := validOutbound - ob.TxHash = "" + ob := baseValidOutbound() + ob.DestinationChain = "eip155" return ob }(), expectError: true, - errContains: "tx_hash cannot be empty", + errContains: "CAIP-2", }, { - name: "empty recipient", + name: "empty sender", outbound: func() types.OutboundTx { - ob := validOutbound - ob.Recipient = "" + ob := baseValidOutbound() + ob.Sender = "" return ob }(), expectError: true, - errContains: "recipient cannot be empty", + errContains: "sender cannot be empty", }, { - name: "invalid recipient address", + name: "unsupported tx type", outbound: func() types.OutboundTx { - ob := validOutbound - ob.Recipient = "0xzzzzzzzz" + ob := baseValidOutbound() + ob.TxType = types.TxType_GAS return ob }(), expectError: true, - errContains: "invalid recipient address", + errContains: "unsupported tx_type", }, { - name: "empty amount", + name: "FUNDS tx missing amount", outbound: func() types.OutboundTx { - ob := validOutbound + ob := baseValidOutbound() + ob.TxType = types.TxType_FUNDS ob.Amount = "" return ob }(), @@ -88,25 +105,57 @@ func TestOutboundTx_ValidateBasic(t *testing.T) { errContains: "amount cannot be empty", }, { - name: "negative amount", + name: "PAYLOAD tx missing payload", outbound: func() types.OutboundTx { - ob := validOutbound - ob.Amount = "-100" + ob := baseValidOutbound() + ob.TxType = types.TxType_PAYLOAD + ob.Payload = "" return ob }(), expectError: true, - errContains: "amount must be a valid positive uint256", + errContains: "payload cannot be empty", }, { - name: "empty asset_addr", + name: "FUNDS tx missing asset_addr", outbound: func() types.OutboundTx { - ob := validOutbound + ob := baseValidOutbound() + ob.TxType = types.TxType_FUNDS ob.AssetAddr = "" return ob }(), expectError: true, errContains: "asset_addr cannot be empty", }, + { + name: "empty pc_tx hash", + outbound: func() types.OutboundTx { + ob := baseValidOutbound() + ob.PcTx.TxHash = "" + return ob + }(), + expectError: true, + errContains: "pc_tx.tx_hash cannot be empty", + }, + { + name: "empty pc_tx log_index", + outbound: func() types.OutboundTx { + ob := baseValidOutbound() + ob.PcTx.LogIndex = "" + return ob + }(), + expectError: true, + errContains: "pc_tx.log_index cannot be empty", + }, + { + name: "empty index", + outbound: func() types.OutboundTx { + ob := baseValidOutbound() + ob.Index = "" + return ob + }(), + expectError: true, + errContains: "index cannot be empty", + }, } for _, tc := range tests { diff --git a/x/uexecutor/types/universal_tx_test.go b/x/uexecutor/types/universal_tx_test.go index 57976ad1..953f52b2 100644 --- a/x/uexecutor/types/universal_tx_test.go +++ b/x/uexecutor/types/universal_tx_test.go @@ -17,7 +17,7 @@ func TestUniversalTx_ValidateBasic(t *testing.T) { Amount: "1000", AssetAddr: "0x000000000000000000000000000000000000cafe", LogIndex: "1", - TxType: types.InboundTxType_FUNDS, + TxType: types.TxType_FUNDS, }, PcTx: []*types.PCTx{ { @@ -30,10 +30,18 @@ func TestUniversalTx_ValidateBasic(t *testing.T) { }, OutboundTx: &types.OutboundTx{ DestinationChain: "eip155:11155111", - TxHash: "0x456def", Recipient: "0x000000000000000000000000000000000000beef", - Amount: "500", + Sender: "0x000000000000000000000000000000000000dead", + Amount: "1000", AssetAddr: "0x000000000000000000000000000000000000cafe", + Payload: "0xabcdef", + GasLimit: "21000", + TxType: types.TxType_FUNDS_AND_PAYLOAD, + PcTx: &types.Originating_Pc_TX{ + TxHash: "0xpc123", + LogIndex: "1", + }, + Index: "0", }, UniversalStatus: types.UniversalTxStatus_PC_EXECUTED_SUCCESS, } From e3a4af217b934227e52f91312a29377cde78eda9 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Mon, 24 Nov 2025 15:52:36 +0530 Subject: [PATCH 009/120] refactor: added id changes in the UniversalTx --- x/uexecutor/keeper/msg_vote_inbound.go | 1 + x/uexecutor/types/universal_tx.go | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/x/uexecutor/keeper/msg_vote_inbound.go b/x/uexecutor/keeper/msg_vote_inbound.go index 70c6ec2e..1bcc460d 100644 --- a/x/uexecutor/keeper/msg_vote_inbound.go +++ b/x/uexecutor/keeper/msg_vote_inbound.go @@ -46,6 +46,7 @@ func (k Keeper) VoteInbound(ctx context.Context, universalValidator sdk.ValAddre // Voting is finalized utx := types.UniversalTx{ + Id: universalTxKey, InboundTx: &inbound, PcTx: nil, OutboundTx: nil, diff --git a/x/uexecutor/types/universal_tx.go b/x/uexecutor/types/universal_tx.go index 66f515d2..5a8a521c 100644 --- a/x/uexecutor/types/universal_tx.go +++ b/x/uexecutor/types/universal_tx.go @@ -20,6 +20,11 @@ func (p UniversalTx) String() string { // ValidateBasic does the sanity check on the UniversalTx fields. func (p UniversalTx) ValidateBasic() error { + // Validate Id is non-empty + if len(p.Id) == 0 { + return errors.Wrap(sdkerrors.ErrInvalidRequest, "id cannot be empty") + } + // Validate inbound_tx if err := p.InboundTx.ValidateBasic(); err != nil { return errors.Wrap(err, "invalid inbound_tx") From d8600b32353318c4dd0e4aaecaa7056c93b7d999 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Mon, 24 Nov 2025 15:53:00 +0530 Subject: [PATCH 010/120] refactor: modified outbound and universal_tx tests for id changes --- x/uexecutor/types/outbound_tx.go | 14 ++++++++------ x/uexecutor/types/universal_tx_test.go | 1 + 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/x/uexecutor/types/outbound_tx.go b/x/uexecutor/types/outbound_tx.go index 012ba3ce..3f6d5db6 100644 --- a/x/uexecutor/types/outbound_tx.go +++ b/x/uexecutor/types/outbound_tx.go @@ -90,12 +90,14 @@ func (p OutboundTx) ValidateBasic() error { } // observed tx validation (if present) - if strings.TrimSpace(p.ObservedTx.TxHash) != "" { - if strings.TrimSpace(p.ObservedTx.DestinationChain) == "" { - return errors.Wrap(sdkerrors.ErrInvalidRequest, "observed_tx.destination_chain cannot be empty") - } - if p.ObservedTx.BlockHeight == 0 { - return errors.Wrap(sdkerrors.ErrInvalidRequest, "observed_tx.block_height must be > 0") + if p.ObservedTx != nil { + if strings.TrimSpace(p.ObservedTx.TxHash) != "" { + if strings.TrimSpace(p.ObservedTx.DestinationChain) == "" { + return errors.Wrap(sdkerrors.ErrInvalidRequest, "observed_tx.destination_chain cannot be empty") + } + if p.ObservedTx.BlockHeight == 0 { + return errors.Wrap(sdkerrors.ErrInvalidRequest, "observed_tx.block_height must be > 0") + } } } diff --git a/x/uexecutor/types/universal_tx_test.go b/x/uexecutor/types/universal_tx_test.go index 953f52b2..a5e5f3d5 100644 --- a/x/uexecutor/types/universal_tx_test.go +++ b/x/uexecutor/types/universal_tx_test.go @@ -9,6 +9,7 @@ import ( func TestUniversalTx_ValidateBasic(t *testing.T) { validUniversal := types.UniversalTx{ + Id: "1", InboundTx: &types.Inbound{ SourceChain: "eip155:11155111", TxHash: "0x123abc", From a14a262d19921aa77597e671af73ca96d8a67605 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Wed, 26 Nov 2025 14:28:27 +0530 Subject: [PATCH 011/120] feat: updated universalTx proto --- proto/uexecutor/v1/types.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proto/uexecutor/v1/types.proto b/proto/uexecutor/v1/types.proto index 395bd98f..32bca391 100644 --- a/proto/uexecutor/v1/types.proto +++ b/proto/uexecutor/v1/types.proto @@ -155,6 +155,6 @@ message UniversalTx { string id = 1; Inbound inbound_tx = 2; // Full inbound tx data repeated PCTx pc_tx = 3; // Execution details on Push Chain - OutboundTx outbound_tx = 4; // Outbound tx triggered by this tx + repeated OutboundTx outbound_tx = 4; // Outbound tx triggered by this tx UniversalTxStatus universal_status = 5; // Current status } From baad061785af41f83c7299676b089ecd3d505aa3 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Wed, 26 Nov 2025 14:29:31 +0530 Subject: [PATCH 012/120] refactor: added generated protobuf --- api/uexecutor/v1/types.pulsar.go | 123 +++++++++++++++++++++++-------- 1 file changed, 91 insertions(+), 32 deletions(-) diff --git a/api/uexecutor/v1/types.pulsar.go b/api/uexecutor/v1/types.pulsar.go index 63b85a8b..0eda3706 100644 --- a/api/uexecutor/v1/types.pulsar.go +++ b/api/uexecutor/v1/types.pulsar.go @@ -6190,6 +6190,57 @@ func (x *_UniversalTx_3_list) IsValid() bool { return x.list != nil } +var _ protoreflect.List = (*_UniversalTx_4_list)(nil) + +type _UniversalTx_4_list struct { + list *[]*OutboundTx +} + +func (x *_UniversalTx_4_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_UniversalTx_4_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_UniversalTx_4_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*OutboundTx) + (*x.list)[i] = concreteValue +} + +func (x *_UniversalTx_4_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*OutboundTx) + *x.list = append(*x.list, concreteValue) +} + +func (x *_UniversalTx_4_list) AppendMutable() protoreflect.Value { + v := new(OutboundTx) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_UniversalTx_4_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_UniversalTx_4_list) NewElement() protoreflect.Value { + v := new(OutboundTx) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_UniversalTx_4_list) IsValid() bool { + return x.list != nil +} + var ( md_UniversalTx protoreflect.MessageDescriptor fd_UniversalTx_id protoreflect.FieldDescriptor @@ -6292,8 +6343,8 @@ func (x *fastReflection_UniversalTx) Range(f func(protoreflect.FieldDescriptor, return } } - if x.OutboundTx != nil { - value := protoreflect.ValueOfMessage(x.OutboundTx.ProtoReflect()) + if len(x.OutboundTx) != 0 { + value := protoreflect.ValueOfList(&_UniversalTx_4_list{list: &x.OutboundTx}) if !f(fd_UniversalTx_outbound_tx, value) { return } @@ -6326,7 +6377,7 @@ func (x *fastReflection_UniversalTx) Has(fd protoreflect.FieldDescriptor) bool { case "uexecutor.v1.UniversalTx.pc_tx": return len(x.PcTx) != 0 case "uexecutor.v1.UniversalTx.outbound_tx": - return x.OutboundTx != nil + return len(x.OutboundTx) != 0 case "uexecutor.v1.UniversalTx.universal_status": return x.UniversalStatus != 0 default: @@ -6384,8 +6435,11 @@ func (x *fastReflection_UniversalTx) Get(descriptor protoreflect.FieldDescriptor listValue := &_UniversalTx_3_list{list: &x.PcTx} return protoreflect.ValueOfList(listValue) case "uexecutor.v1.UniversalTx.outbound_tx": - value := x.OutboundTx - return protoreflect.ValueOfMessage(value.ProtoReflect()) + if len(x.OutboundTx) == 0 { + return protoreflect.ValueOfList(&_UniversalTx_4_list{}) + } + listValue := &_UniversalTx_4_list{list: &x.OutboundTx} + return protoreflect.ValueOfList(listValue) case "uexecutor.v1.UniversalTx.universal_status": value := x.UniversalStatus return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) @@ -6418,7 +6472,9 @@ func (x *fastReflection_UniversalTx) Set(fd protoreflect.FieldDescriptor, value clv := lv.(*_UniversalTx_3_list) x.PcTx = *clv.list case "uexecutor.v1.UniversalTx.outbound_tx": - x.OutboundTx = value.Message().Interface().(*OutboundTx) + lv := value.List() + clv := lv.(*_UniversalTx_4_list) + x.OutboundTx = *clv.list case "uexecutor.v1.UniversalTx.universal_status": x.UniversalStatus = (UniversalTxStatus)(value.Enum()) default: @@ -6454,9 +6510,10 @@ func (x *fastReflection_UniversalTx) Mutable(fd protoreflect.FieldDescriptor) pr return protoreflect.ValueOfList(value) case "uexecutor.v1.UniversalTx.outbound_tx": if x.OutboundTx == nil { - x.OutboundTx = new(OutboundTx) + x.OutboundTx = []*OutboundTx{} } - return protoreflect.ValueOfMessage(x.OutboundTx.ProtoReflect()) + value := &_UniversalTx_4_list{list: &x.OutboundTx} + return protoreflect.ValueOfList(value) case "uexecutor.v1.UniversalTx.id": panic(fmt.Errorf("field id of message uexecutor.v1.UniversalTx is not mutable")) case "uexecutor.v1.UniversalTx.universal_status": @@ -6483,8 +6540,8 @@ func (x *fastReflection_UniversalTx) NewField(fd protoreflect.FieldDescriptor) p list := []*PCTx{} return protoreflect.ValueOfList(&_UniversalTx_3_list{list: &list}) case "uexecutor.v1.UniversalTx.outbound_tx": - m := new(OutboundTx) - return protoreflect.ValueOfMessage(m.ProtoReflect()) + list := []*OutboundTx{} + return protoreflect.ValueOfList(&_UniversalTx_4_list{list: &list}) case "uexecutor.v1.UniversalTx.universal_status": return protoreflect.ValueOfEnum(0) default: @@ -6570,9 +6627,11 @@ func (x *fastReflection_UniversalTx) ProtoMethods() *protoiface.Methods { n += 1 + l + runtime.Sov(uint64(l)) } } - if x.OutboundTx != nil { - l = options.Size(x.OutboundTx) - n += 1 + l + runtime.Sov(uint64(l)) + if len(x.OutboundTx) > 0 { + for _, e := range x.OutboundTx { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } } if x.UniversalStatus != 0 { n += 1 + runtime.Sov(uint64(x.UniversalStatus)) @@ -6611,19 +6670,21 @@ func (x *fastReflection_UniversalTx) ProtoMethods() *protoiface.Methods { i-- dAtA[i] = 0x28 } - if x.OutboundTx != nil { - encoded, err := options.Marshal(x.OutboundTx) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err + if len(x.OutboundTx) > 0 { + for iNdEx := len(x.OutboundTx) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.OutboundTx[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x22 } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x22 } if len(x.PcTx) > 0 { for iNdEx := len(x.PcTx) - 1; iNdEx >= 0; iNdEx-- { @@ -6842,10 +6903,8 @@ func (x *fastReflection_UniversalTx) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - if x.OutboundTx == nil { - x.OutboundTx = &OutboundTx{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.OutboundTx); err != nil { + x.OutboundTx = append(x.OutboundTx, &OutboundTx{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.OutboundTx[len(x.OutboundTx)-1]); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex @@ -7770,7 +7829,7 @@ type UniversalTx struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` InboundTx *Inbound `protobuf:"bytes,2,opt,name=inbound_tx,json=inboundTx,proto3" json:"inbound_tx,omitempty"` // Full inbound tx data PcTx []*PCTx `protobuf:"bytes,3,rep,name=pc_tx,json=pcTx,proto3" json:"pc_tx,omitempty"` // Execution details on Push Chain - OutboundTx *OutboundTx `protobuf:"bytes,4,opt,name=outbound_tx,json=outboundTx,proto3" json:"outbound_tx,omitempty"` // Outbound tx triggered by this tx + OutboundTx []*OutboundTx `protobuf:"bytes,4,rep,name=outbound_tx,json=outboundTx,proto3" json:"outbound_tx,omitempty"` // Outbound tx triggered by this tx UniversalStatus UniversalTxStatus `protobuf:"varint,5,opt,name=universal_status,json=universalStatus,proto3,enum=uexecutor.v1.UniversalTxStatus" json:"universal_status,omitempty"` // Current status } @@ -7815,7 +7874,7 @@ func (x *UniversalTx) GetPcTx() []*PCTx { return nil } -func (x *UniversalTx) GetOutboundTx() *OutboundTx { +func (x *UniversalTx) GetOutboundTx() []*OutboundTx { if x != nil { return x.OutboundTx } @@ -7972,7 +8031,7 @@ var file_uexecutor_v1_types_proto_rawDesc = []byte{ 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x43, 0x54, 0x78, 0x52, 0x04, 0x70, 0x63, 0x54, 0x78, 0x12, 0x39, 0x0a, 0x0b, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x74, 0x78, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, + 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x54, 0x78, 0x52, 0x0a, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x54, 0x78, 0x12, 0x4a, 0x0a, 0x10, 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, From 1c94b1f9b3d98092db26a8b71ec37dda5155bf33 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Wed, 26 Nov 2025 14:58:12 +0530 Subject: [PATCH 013/120] fix: fixed proxy runtime bytecode --- x/uregistry/types/constants.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/x/uregistry/types/constants.go b/x/uregistry/types/constants.go index 37d0c687..0e71d28f 100644 --- a/x/uregistry/types/constants.go +++ b/x/uregistry/types/constants.go @@ -40,7 +40,7 @@ var SYSTEM_CONTRACTS = map[string]ContractAddresses{ ProxyAdmin: "0xf2000000000000000000000000000000000000BC", Implementation: "0xF1000000000000000000000000000000000000Bc", }, - "RESERVED_0": { + "UNIVERSAL_GATEWAY_PC": { Address: "0x00000000000000000000000000000000000000B0", ProxyAdmin: "0xf2000000000000000000000000000000000000b0", Implementation: "0xF1000000000000000000000000000000000000b0", @@ -72,22 +72,22 @@ var BYTECODE = map[string]ByteCodes{ }, "UNIVERSAL_BATCH_CALL": { IMPL_RUNTIME: ReservedImplRuntimeBytecode, - PROXY_RUNTIME: common.FromHex("0x608060405261000c61000e565b005b7f00000000000000000000000000000000000000000000000000000000000000BC73ffffffffffffffffffffffffffffffffffffffff1633036100d1575f357fffffffff00000000000000000000000000000000000000000000000000000000167f4f1ef28600000000000000000000000000000000000000000000000000000000146100c7576040517fd2b576ec00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6100cf6100d9565b565b6100cf610107565b5f806100e8366004818461043e565b8101906100f59190610492565b915091506101038282610117565b5050565b6100cf61011261017e565b6101c2565b610120826101e0565b60405173ffffffffffffffffffffffffffffffffffffffff8316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b905f90a28051156101765761017182826102b3565b505050565b610103610332565b5f6101bd7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b905090565b365f80375f80365f845af43d5f803e8080156101dc573d5ff35b3d5ffd5b8073ffffffffffffffffffffffffffffffffffffffff163b5f0361024d576040517f4c9c8ce300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff821660048201526024015b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60605f808473ffffffffffffffffffffffffffffffffffffffff16846040516102dc91906105ad565b5f60405180830381855af49150503d805f8114610314576040519150601f19603f3d011682016040523d82523d5f602084013e610319565b606091505b509150915061032985838361036a565b95945050505050565b34156100cf576040517fb398979f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60608261037f5761037a826103fc565b6103f5565b81511580156103a3575073ffffffffffffffffffffffffffffffffffffffff84163b155b156103f2576040517f9996b31500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85166004820152602401610244565b50805b9392505050565b80511561040c5780518082602001fd5b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f808585111561044c575f80fd5b83861115610458575f80fd5b5050820193919092039150565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f80604083850312156104a3575f80fd5b823573ffffffffffffffffffffffffffffffffffffffff811681146104c6575f80fd5b9150602083013567ffffffffffffffff8111156104e1575f80fd5b8301601f810185136104f1575f80fd5b803567ffffffffffffffff81111561050b5761050b610465565b6040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0603f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8501160116810181811067ffffffffffffffff8211171561057757610577610465565b60405281815282820160200187101561058e575f80fd5b816020840160208301375f602083830101528093505050509250929050565b5f82515f5b818110156105cc57602081860181015185830152016105b2565b505f92019182525091905056fea2646970667358221220e70393c35b3e95d53f92887d1108e4b563be364c093a130a7bb2e621a0aa9b8f64736f6c634300081a0033"), + PROXY_RUNTIME: common.FromHex("0x608060405261000c61000e565b005b7f000000000000000000000000f2000000000000000000000000000000000000BC73ffffffffffffffffffffffffffffffffffffffff1633036100d1575f357fffffffff00000000000000000000000000000000000000000000000000000000167f4f1ef28600000000000000000000000000000000000000000000000000000000146100c7576040517fd2b576ec00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6100cf6100d9565b565b6100cf610107565b5f806100e8366004818461043e565b8101906100f59190610492565b915091506101038282610117565b5050565b6100cf61011261017e565b6101c2565b610120826101e0565b60405173ffffffffffffffffffffffffffffffffffffffff8316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b905f90a28051156101765761017182826102b3565b505050565b610103610332565b5f6101bd7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b905090565b365f80375f80365f845af43d5f803e8080156101dc573d5ff35b3d5ffd5b8073ffffffffffffffffffffffffffffffffffffffff163b5f0361024d576040517f4c9c8ce300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff821660048201526024015b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60605f808473ffffffffffffffffffffffffffffffffffffffff16846040516102dc91906105ad565b5f60405180830381855af49150503d805f8114610314576040519150601f19603f3d011682016040523d82523d5f602084013e610319565b606091505b509150915061032985838361036a565b95945050505050565b34156100cf576040517fb398979f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60608261037f5761037a826103fc565b6103f5565b81511580156103a3575073ffffffffffffffffffffffffffffffffffffffff84163b155b156103f2576040517f9996b31500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85166004820152602401610244565b50805b9392505050565b80511561040c5780518082602001fd5b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f808585111561044c575f80fd5b83861115610458575f80fd5b5050820193919092039150565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f80604083850312156104a3575f80fd5b823573ffffffffffffffffffffffffffffffffffffffff811681146104c6575f80fd5b9150602083013567ffffffffffffffff8111156104e1575f80fd5b8301601f810185136104f1575f80fd5b803567ffffffffffffffff81111561050b5761050b610465565b6040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0603f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8501160116810181811067ffffffffffffffff8211171561057757610577610465565b60405281815282820160200187101561058e575f80fd5b816020840160208301375f602083830101528093505050509250929050565b5f82515f5b818110156105cc57602081860181015185830152016105b2565b505f92019182525091905056fea2646970667358221220e70393c35b3e95d53f92887d1108e4b563be364c093a130a7bb2e621a0aa9b8f64736f6c634300081a0033"), ADMIN_RUNTIME: ProxyAdminRuntimeBytecode, }, - "RESERVED_0": { + "UNIVERSAL_GATEWAY_PC": { IMPL_RUNTIME: ReservedImplRuntimeBytecode, - PROXY_RUNTIME: common.FromHex("0x608060405261000c61000e565b005b7f00000000000000000000000000000000000000000000000000000000000000b073ffffffffffffffffffffffffffffffffffffffff1633036100d1575f357fffffffff00000000000000000000000000000000000000000000000000000000167f4f1ef28600000000000000000000000000000000000000000000000000000000146100c7576040517fd2b576ec00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6100cf6100d9565b565b6100cf610107565b5f806100e8366004818461043e565b8101906100f59190610492565b915091506101038282610117565b5050565b6100cf61011261017e565b6101c2565b610120826101e0565b60405173ffffffffffffffffffffffffffffffffffffffff8316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b905f90a28051156101765761017182826102b3565b505050565b610103610332565b5f6101bd7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b905090565b365f80375f80365f845af43d5f803e8080156101dc573d5ff35b3d5ffd5b8073ffffffffffffffffffffffffffffffffffffffff163b5f0361024d576040517f4c9c8ce300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff821660048201526024015b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60605f808473ffffffffffffffffffffffffffffffffffffffff16846040516102dc91906105ad565b5f60405180830381855af49150503d805f8114610314576040519150601f19603f3d011682016040523d82523d5f602084013e610319565b606091505b509150915061032985838361036a565b95945050505050565b34156100cf576040517fb398979f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60608261037f5761037a826103fc565b6103f5565b81511580156103a3575073ffffffffffffffffffffffffffffffffffffffff84163b155b156103f2576040517f9996b31500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85166004820152602401610244565b50805b9392505050565b80511561040c5780518082602001fd5b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f808585111561044c575f80fd5b83861115610458575f80fd5b5050820193919092039150565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f80604083850312156104a3575f80fd5b823573ffffffffffffffffffffffffffffffffffffffff811681146104c6575f80fd5b9150602083013567ffffffffffffffff8111156104e1575f80fd5b8301601f810185136104f1575f80fd5b803567ffffffffffffffff81111561050b5761050b610465565b6040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0603f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8501160116810181811067ffffffffffffffff8211171561057757610577610465565b60405281815282820160200187101561058e575f80fd5b816020840160208301375f602083830101528093505050509250929050565b5f82515f5b818110156105cc57602081860181015185830152016105b2565b505f92019182525091905056fea2646970667358221220e70393c35b3e95d53f92887d1108e4b563be364c093a130a7bb2e621a0aa9b8f64736f6c634300081a0033"), + PROXY_RUNTIME: common.FromHex("0x608060405261000c61000e565b005b7f000000000000000000000000f2000000000000000000000000000000000000b073ffffffffffffffffffffffffffffffffffffffff1633036100d1575f357fffffffff00000000000000000000000000000000000000000000000000000000167f4f1ef28600000000000000000000000000000000000000000000000000000000146100c7576040517fd2b576ec00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6100cf6100d9565b565b6100cf610107565b5f806100e8366004818461043e565b8101906100f59190610492565b915091506101038282610117565b5050565b6100cf61011261017e565b6101c2565b610120826101e0565b60405173ffffffffffffffffffffffffffffffffffffffff8316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b905f90a28051156101765761017182826102b3565b505050565b610103610332565b5f6101bd7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b905090565b365f80375f80365f845af43d5f803e8080156101dc573d5ff35b3d5ffd5b8073ffffffffffffffffffffffffffffffffffffffff163b5f0361024d576040517f4c9c8ce300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff821660048201526024015b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60605f808473ffffffffffffffffffffffffffffffffffffffff16846040516102dc91906105ad565b5f60405180830381855af49150503d805f8114610314576040519150601f19603f3d011682016040523d82523d5f602084013e610319565b606091505b509150915061032985838361036a565b95945050505050565b34156100cf576040517fb398979f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60608261037f5761037a826103fc565b6103f5565b81511580156103a3575073ffffffffffffffffffffffffffffffffffffffff84163b155b156103f2576040517f9996b31500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85166004820152602401610244565b50805b9392505050565b80511561040c5780518082602001fd5b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f808585111561044c575f80fd5b83861115610458575f80fd5b5050820193919092039150565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f80604083850312156104a3575f80fd5b823573ffffffffffffffffffffffffffffffffffffffff811681146104c6575f80fd5b9150602083013567ffffffffffffffff8111156104e1575f80fd5b8301601f810185136104f1575f80fd5b803567ffffffffffffffff81111561050b5761050b610465565b6040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0603f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8501160116810181811067ffffffffffffffff8211171561057757610577610465565b60405281815282820160200187101561058e575f80fd5b816020840160208301375f602083830101528093505050509250929050565b5f82515f5b818110156105cc57602081860181015185830152016105b2565b505f92019182525091905056fea2646970667358221220e70393c35b3e95d53f92887d1108e4b563be364c093a130a7bb2e621a0aa9b8f64736f6c634300081a0033"), ADMIN_RUNTIME: ProxyAdminRuntimeBytecode, }, "RESERVED_1": { IMPL_RUNTIME: ReservedImplRuntimeBytecode, - PROXY_RUNTIME: common.FromHex("0x608060405261000c61000e565b005b7f00000000000000000000000000000000000000000000000000000000000000b173ffffffffffffffffffffffffffffffffffffffff1633036100d1575f357fffffffff00000000000000000000000000000000000000000000000000000000167f4f1ef28600000000000000000000000000000000000000000000000000000000146100c7576040517fd2b576ec00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6100cf6100d9565b565b6100cf610107565b5f806100e8366004818461043e565b8101906100f59190610492565b915091506101038282610117565b5050565b6100cf61011261017e565b6101c2565b610120826101e0565b60405173ffffffffffffffffffffffffffffffffffffffff8316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b905f90a28051156101765761017182826102b3565b505050565b610103610332565b5f6101bd7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b905090565b365f80375f80365f845af43d5f803e8080156101dc573d5ff35b3d5ffd5b8073ffffffffffffffffffffffffffffffffffffffff163b5f0361024d576040517f4c9c8ce300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff821660048201526024015b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60605f808473ffffffffffffffffffffffffffffffffffffffff16846040516102dc91906105ad565b5f60405180830381855af49150503d805f8114610314576040519150601f19603f3d011682016040523d82523d5f602084013e610319565b606091505b509150915061032985838361036a565b95945050505050565b34156100cf576040517fb398979f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60608261037f5761037a826103fc565b6103f5565b81511580156103a3575073ffffffffffffffffffffffffffffffffffffffff84163b155b156103f2576040517f9996b31500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85166004820152602401610244565b50805b9392505050565b80511561040c5780518082602001fd5b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f808585111561044c575f80fd5b83861115610458575f80fd5b5050820193919092039150565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f80604083850312156104a3575f80fd5b823573ffffffffffffffffffffffffffffffffffffffff811681146104c6575f80fd5b9150602083013567ffffffffffffffff8111156104e1575f80fd5b8301601f810185136104f1575f80fd5b803567ffffffffffffffff81111561050b5761050b610465565b6040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0603f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8501160116810181811067ffffffffffffffff8211171561057757610577610465565b60405281815282820160200187101561058e575f80fd5b816020840160208301375f602083830101528093505050509250929050565b5f82515f5b818110156105cc57602081860181015185830152016105b2565b505f92019182525091905056fea2646970667358221220e70393c35b3e95d53f92887d1108e4b563be364c093a130a7bb2e621a0aa9b8f64736f6c634300081a0033"), + PROXY_RUNTIME: common.FromHex("0x608060405261000c61000e565b005b7f000000000000000000000000F2000000000000000000000000000000000000b173ffffffffffffffffffffffffffffffffffffffff1633036100d1575f357fffffffff00000000000000000000000000000000000000000000000000000000167f4f1ef28600000000000000000000000000000000000000000000000000000000146100c7576040517fd2b576ec00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6100cf6100d9565b565b6100cf610107565b5f806100e8366004818461043e565b8101906100f59190610492565b915091506101038282610117565b5050565b6100cf61011261017e565b6101c2565b610120826101e0565b60405173ffffffffffffffffffffffffffffffffffffffff8316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b905f90a28051156101765761017182826102b3565b505050565b610103610332565b5f6101bd7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b905090565b365f80375f80365f845af43d5f803e8080156101dc573d5ff35b3d5ffd5b8073ffffffffffffffffffffffffffffffffffffffff163b5f0361024d576040517f4c9c8ce300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff821660048201526024015b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60605f808473ffffffffffffffffffffffffffffffffffffffff16846040516102dc91906105ad565b5f60405180830381855af49150503d805f8114610314576040519150601f19603f3d011682016040523d82523d5f602084013e610319565b606091505b509150915061032985838361036a565b95945050505050565b34156100cf576040517fb398979f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60608261037f5761037a826103fc565b6103f5565b81511580156103a3575073ffffffffffffffffffffffffffffffffffffffff84163b155b156103f2576040517f9996b31500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85166004820152602401610244565b50805b9392505050565b80511561040c5780518082602001fd5b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f808585111561044c575f80fd5b83861115610458575f80fd5b5050820193919092039150565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f80604083850312156104a3575f80fd5b823573ffffffffffffffffffffffffffffffffffffffff811681146104c6575f80fd5b9150602083013567ffffffffffffffff8111156104e1575f80fd5b8301601f810185136104f1575f80fd5b803567ffffffffffffffff81111561050b5761050b610465565b6040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0603f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8501160116810181811067ffffffffffffffff8211171561057757610577610465565b60405281815282820160200187101561058e575f80fd5b816020840160208301375f602083830101528093505050509250929050565b5f82515f5b818110156105cc57602081860181015185830152016105b2565b505f92019182525091905056fea2646970667358221220e70393c35b3e95d53f92887d1108e4b563be364c093a130a7bb2e621a0aa9b8f64736f6c634300081a0033"), ADMIN_RUNTIME: ProxyAdminRuntimeBytecode, }, "RESERVED_2": { IMPL_RUNTIME: ReservedImplRuntimeBytecode, - PROXY_RUNTIME: common.FromHex("0x608060405261000c61000e565b005b7f00000000000000000000000000000000000000000000000000000000000000b273ffffffffffffffffffffffffffffffffffffffff1633036100d1575f357fffffffff00000000000000000000000000000000000000000000000000000000167f4f1ef28600000000000000000000000000000000000000000000000000000000146100c7576040517fd2b576ec00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6100cf6100d9565b565b6100cf610107565b5f806100e8366004818461043e565b8101906100f59190610492565b915091506101038282610117565b5050565b6100cf61011261017e565b6101c2565b610120826101e0565b60405173ffffffffffffffffffffffffffffffffffffffff8316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b905f90a28051156101765761017182826102b3565b505050565b610103610332565b5f6101bd7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b905090565b365f80375f80365f845af43d5f803e8080156101dc573d5ff35b3d5ffd5b8073ffffffffffffffffffffffffffffffffffffffff163b5f0361024d576040517f4c9c8ce300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff821660048201526024015b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60605f808473ffffffffffffffffffffffffffffffffffffffff16846040516102dc91906105ad565b5f60405180830381855af49150503d805f8114610314576040519150601f19603f3d011682016040523d82523d5f602084013e610319565b606091505b509150915061032985838361036a565b95945050505050565b34156100cf576040517fb398979f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60608261037f5761037a826103fc565b6103f5565b81511580156103a3575073ffffffffffffffffffffffffffffffffffffffff84163b155b156103f2576040517f9996b31500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85166004820152602401610244565b50805b9392505050565b80511561040c5780518082602001fd5b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f808585111561044c575f80fd5b83861115610458575f80fd5b5050820193919092039150565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f80604083850312156104a3575f80fd5b823573ffffffffffffffffffffffffffffffffffffffff811681146104c6575f80fd5b9150602083013567ffffffffffffffff8111156104e1575f80fd5b8301601f810185136104f1575f80fd5b803567ffffffffffffffff81111561050b5761050b610465565b6040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0603f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8501160116810181811067ffffffffffffffff8211171561057757610577610465565b60405281815282820160200187101561058e575f80fd5b816020840160208301375f602083830101528093505050509250929050565b5f82515f5b818110156105cc57602081860181015185830152016105b2565b505f92019182525091905056fea2646970667358221220e70393c35b3e95d53f92887d1108e4b563be364c093a130a7bb2e621a0aa9b8f64736f6c634300081a0033"), + PROXY_RUNTIME: common.FromHex("0x608060405261000c61000e565b005b7f000000000000000000000000f2000000000000000000000000000000000000b273ffffffffffffffffffffffffffffffffffffffff1633036100d1575f357fffffffff00000000000000000000000000000000000000000000000000000000167f4f1ef28600000000000000000000000000000000000000000000000000000000146100c7576040517fd2b576ec00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6100cf6100d9565b565b6100cf610107565b5f806100e8366004818461043e565b8101906100f59190610492565b915091506101038282610117565b5050565b6100cf61011261017e565b6101c2565b610120826101e0565b60405173ffffffffffffffffffffffffffffffffffffffff8316907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b905f90a28051156101765761017182826102b3565b505050565b610103610332565b5f6101bd7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5473ffffffffffffffffffffffffffffffffffffffff1690565b905090565b365f80375f80365f845af43d5f803e8080156101dc573d5ff35b3d5ffd5b8073ffffffffffffffffffffffffffffffffffffffff163b5f0361024d576040517f4c9c8ce300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff821660048201526024015b60405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60605f808473ffffffffffffffffffffffffffffffffffffffff16846040516102dc91906105ad565b5f60405180830381855af49150503d805f8114610314576040519150601f19603f3d011682016040523d82523d5f602084013e610319565b606091505b509150915061032985838361036a565b95945050505050565b34156100cf576040517fb398979f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60608261037f5761037a826103fc565b6103f5565b81511580156103a3575073ffffffffffffffffffffffffffffffffffffffff84163b155b156103f2576040517f9996b31500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85166004820152602401610244565b50805b9392505050565b80511561040c5780518082602001fd5b6040517fd6bda27500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f808585111561044c575f80fd5b83861115610458575f80fd5b5050820193919092039150565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f80604083850312156104a3575f80fd5b823573ffffffffffffffffffffffffffffffffffffffff811681146104c6575f80fd5b9150602083013567ffffffffffffffff8111156104e1575f80fd5b8301601f810185136104f1575f80fd5b803567ffffffffffffffff81111561050b5761050b610465565b6040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0603f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8501160116810181811067ffffffffffffffff8211171561057757610577610465565b60405281815282820160200187101561058e575f80fd5b816020840160208301375f602083830101528093505050509250929050565b5f82515f5b818110156105cc57602081860181015185830152016105b2565b505f92019182525091905056fea2646970667358221220e70393c35b3e95d53f92887d1108e4b563be364c093a130a7bb2e621a0aa9b8f64736f6c634300081a0033"), ADMIN_RUNTIME: ProxyAdminRuntimeBytecode, }, } From d032fcfc6b0178d04c0bf6f37a31e86be42003ed Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Wed, 26 Nov 2025 14:58:49 +0530 Subject: [PATCH 014/120] refactor: added a helper util to fetch the chain id dynamically --- utils/conversion.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/utils/conversion.go b/utils/conversion.go index 880a4ad3..e82bf0bc 100644 --- a/utils/conversion.go +++ b/utils/conversion.go @@ -2,6 +2,7 @@ package utils import ( "encoding/hex" + "fmt" "math/big" "strings" ) @@ -14,3 +15,16 @@ func StringToBigInt(s string) *big.Int { bi, _ := new(big.Int).SetString(s, 10) return bi } + +// Returns evm chainId, e.g. push-chain-42101 -> 42101 +func ExtractEvmChainID(chainID string) (string, error) { + parts := strings.Split(chainID, "-") + last := parts[len(parts)-1] + + // Ensure numeric + if _, ok := new(big.Int).SetString(last, 10); !ok { + return "", fmt.Errorf("invalid EVM chain id in tendermint chain-id: %s", chainID) + } + + return last, nil +} From 7530fa06564af46df728395f670cc4872ece325c Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Wed, 26 Nov 2025 15:02:02 +0530 Subject: [PATCH 015/120] refactor: added event signature of withdraw event --- x/uexecutor/types/constants.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/x/uexecutor/types/constants.go b/x/uexecutor/types/constants.go index 989fec97..02b6f7e7 100644 --- a/x/uexecutor/types/constants.go +++ b/x/uexecutor/types/constants.go @@ -1,6 +1,9 @@ package types -import "github.com/ethereum/go-ethereum/common" +import ( + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/crypto" +) const ( FACTORY_PROXY_ADDRESS_HEX = "0x00000000000000000000000000000000000000eA" @@ -38,3 +41,7 @@ const ( // Default number of blocks after which ballot expires DefaultExpiryAfterBlocks = 10000 ) + +var UniversalTxWithdrawEventSig = crypto.Keccak256Hash([]byte( + "UniversalTxWithdraw(address,string,address,bytes,uint256,address,uint256,uint256,bytes,uint256,(address,bytes))", +)).Hex() From 8162bbf3c1d2dc0a183f17035faf59c0ebba90b2 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Wed, 26 Nov 2025 15:03:22 +0530 Subject: [PATCH 016/120] refactor: update validateBasic of universalTx --- x/uexecutor/types/universal_tx.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/x/uexecutor/types/universal_tx.go b/x/uexecutor/types/universal_tx.go index 5a8a521c..f25a38a5 100644 --- a/x/uexecutor/types/universal_tx.go +++ b/x/uexecutor/types/universal_tx.go @@ -42,8 +42,14 @@ func (p UniversalTx) ValidateBasic() error { } // Validate outbound_tx - if err := p.OutboundTx.ValidateBasic(); err != nil { - return errors.Wrap(err, "invalid outbound_tx") + // Validate each outbound_tx + for i, tx := range p.OutboundTx { + if tx == nil { + return fmt.Errorf("pc_tx[%d] is nil", i) + } + if err := tx.ValidateBasic(); err != nil { + return errors.Wrapf(err, "invalid outbound_tx at index %d", i) + } } // Validate universal_status (must be a valid enum) From deb93396d935e8028d2e0db997e48dc7ed016eb9 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Wed, 26 Nov 2025 15:03:43 +0530 Subject: [PATCH 017/120] tests: updated tests of universalTx --- x/uexecutor/types/universal_tx_test.go | 32 +++++++++++++++----------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/x/uexecutor/types/universal_tx_test.go b/x/uexecutor/types/universal_tx_test.go index a5e5f3d5..902280e5 100644 --- a/x/uexecutor/types/universal_tx_test.go +++ b/x/uexecutor/types/universal_tx_test.go @@ -29,20 +29,22 @@ func TestUniversalTx_ValidateBasic(t *testing.T) { Status: "SUCCESS", }, }, - OutboundTx: &types.OutboundTx{ - DestinationChain: "eip155:11155111", - Recipient: "0x000000000000000000000000000000000000beef", - Sender: "0x000000000000000000000000000000000000dead", - Amount: "1000", - AssetAddr: "0x000000000000000000000000000000000000cafe", - Payload: "0xabcdef", - GasLimit: "21000", - TxType: types.TxType_FUNDS_AND_PAYLOAD, - PcTx: &types.Originating_Pc_TX{ - TxHash: "0xpc123", - LogIndex: "1", + OutboundTx: []*types.OutboundTx{ + { + DestinationChain: "eip155:11155111", + Recipient: "0x000000000000000000000000000000000000beef", + Sender: "0x000000000000000000000000000000000000dead", + Amount: "1000", + AssetAddr: "0x000000000000000000000000000000000000cafe", + Payload: "0xabcdef", + GasLimit: "21000", + TxType: types.TxType_FUNDS_AND_PAYLOAD, + PcTx: &types.Originating_Pc_TX{ + TxHash: "0xpc123", + LogIndex: "1", + }, + Index: "0", }, - Index: "0", }, UniversalStatus: types.UniversalTxStatus_PC_EXECUTED_SUCCESS, } @@ -84,7 +86,9 @@ func TestUniversalTx_ValidateBasic(t *testing.T) { name: "invalid outbound", universal: func() types.UniversalTx { utx := validUniversal - utx.OutboundTx = &types.OutboundTx{} // Recipient empty + utx.OutboundTx = []*types.OutboundTx{ + {}, + } // Recipient empty return utx }(), expectError: true, From 7b58ce2485482d6a757a689f8241d80ec2d80879 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Wed, 26 Nov 2025 15:05:56 +0530 Subject: [PATCH 018/120] feat: added unique key of UniversalTx for pc originating Outbound --- x/uexecutor/keeper/universal_tx.go | 15 +++++++++++++++ x/uexecutor/types/keys.go | 6 ++++++ 2 files changed, 21 insertions(+) diff --git a/x/uexecutor/keeper/universal_tx.go b/x/uexecutor/keeper/universal_tx.go index 0d1ec929..d260c026 100644 --- a/x/uexecutor/keeper/universal_tx.go +++ b/x/uexecutor/keeper/universal_tx.go @@ -7,6 +7,8 @@ import ( // sdk "github.com/cosmos/cosmos-sdk/types" "cosmossdk.io/collections" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/pushchain/push-chain-node/utils" "github.com/pushchain/push-chain-node/x/uexecutor/types" ) @@ -87,3 +89,16 @@ func (k Keeper) GetUniversalTxStatus(ctx context.Context, key string) (types.Uni } return utx.UniversalStatus, true, nil } + +func (k Keeper) BuildPcUniversalTxKey(ctx context.Context, pc types.PCTx) (string, error) { + sdkCtx := sdk.UnwrapSDKContext(ctx) + + evmChainID, err := utils.ExtractEvmChainID(sdkCtx.ChainID()) + if err != nil { + return "", err + } + + pcCaip := fmt.Sprintf("eip155:%s", evmChainID) + + return types.GetPcUniversalTxKey(pcCaip, pc), nil +} diff --git a/x/uexecutor/types/keys.go b/x/uexecutor/types/keys.go index 7c4ce3e4..2bef72c2 100755 --- a/x/uexecutor/types/keys.go +++ b/x/uexecutor/types/keys.go @@ -53,3 +53,9 @@ func GetInboundBallotKey(inbound Inbound) (string, error) { } return hex.EncodeToString(bz), nil } + +func GetPcUniversalTxKey(pcCaip string, pc PCTx) string { + data := fmt.Sprintf("%s:%s", pcCaip, pc.TxHash) + hash := sha256.Sum256([]byte(data)) + return hex.EncodeToString(hash[:]) +} From ad1435eb442f805f3d712bb5e6db03f0fc8f6855 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Wed, 26 Nov 2025 15:06:46 +0530 Subject: [PATCH 019/120] refactor: added abi fn for decoding UniversalTxWithdraw event --- x/uexecutor/types/abi.go | 60 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/x/uexecutor/types/abi.go b/x/uexecutor/types/abi.go index 5b2bb248..087b430b 100644 --- a/x/uexecutor/types/abi.go +++ b/x/uexecutor/types/abi.go @@ -1,9 +1,12 @@ package types import ( + "encoding/hex" + fmt "fmt" "math/big" "strings" + evmtypes "github.com/cosmos/evm/x/vm/types" "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/common" "github.com/pushchain/push-chain-node/utils" @@ -717,3 +720,60 @@ func NewAbiUniversalAccountId(proto *UniversalAccountId) (AbiUniversalAccountId, Owner: owner, }, nil } + +type UniversalWithdrawEvent struct { + Sender string + ChainId string + Token string + Target string + Amount *big.Int + GasToken string + GasFee *big.Int + GasLimit *big.Int + Payload string + ProtocolFee *big.Int +} + +func DecodeUniversalTxWithdrawFromLog(log *evmtypes.Log) (*UniversalWithdrawEvent, error) { + if len(log.Topics) < 4 { + return nil, fmt.Errorf("insufficient topics for UniversalTxWithdraw") + } + + event := &UniversalWithdrawEvent{} + + // Indexed parameters + event.Sender = common.HexToAddress(log.Topics[1]).Hex() + event.ChainId = string(common.FromHex(log.Topics[2])) + event.Token = common.HexToAddress(log.Topics[3]).Hex() + + // Correct ABI type construction + bytesType, _ := abi.NewType("bytes", "", nil) + uint256Type, _ := abi.NewType("uint256", "", nil) + addressType, _ := abi.NewType("address", "", nil) + + // Decode non-indexed data + arguments := abi.Arguments{ + {Type: bytesType}, // target + {Type: uint256Type}, // amount + {Type: addressType}, // gasToken + {Type: uint256Type}, // gasFee + {Type: uint256Type}, // gasLimit + {Type: bytesType}, // payload + {Type: uint256Type}, // protocolFee + } + + values, err := arguments.Unpack(log.Data) + if err != nil { + return nil, err + } + + event.Target = hex.EncodeToString(values[0].([]byte)) + event.Amount = values[1].(*big.Int) + event.GasToken = values[2].(common.Address).Hex() + event.GasFee = values[3].(*big.Int) + event.GasLimit = values[4].(*big.Int) + event.Payload = hex.EncodeToString(values[5].([]byte)) + event.ProtocolFee = values[6].(*big.Int) + + return event, nil +} From 3408a06fd8202be27f711fb9b0d7a883263383a4 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Wed, 26 Nov 2025 15:07:13 +0530 Subject: [PATCH 020/120] feat: added keeper methods to create outbound from logs and attach to UTx --- x/uexecutor/keeper/create_outbound.go | 174 ++++++++++++++++++++++++++ 1 file changed, 174 insertions(+) create mode 100644 x/uexecutor/keeper/create_outbound.go diff --git a/x/uexecutor/keeper/create_outbound.go b/x/uexecutor/keeper/create_outbound.go new file mode 100644 index 00000000..ce4e123a --- /dev/null +++ b/x/uexecutor/keeper/create_outbound.go @@ -0,0 +1,174 @@ +package keeper + +import ( + "context" + "fmt" + "strings" + + "cosmossdk.io/errors" + sdk "github.com/cosmos/cosmos-sdk/types" + evmtypes "github.com/cosmos/evm/x/vm/types" + "github.com/pushchain/push-chain-node/x/uexecutor/types" + uregistrytypes "github.com/pushchain/push-chain-node/x/uregistry/types" +) + +func (k Keeper) BuildOutboundsFromReceipt( + receipt *evmtypes.MsgEthereumTxResponse, +) ([]*types.OutboundTx, error) { + + outbounds := []*types.OutboundTx{} + universalGatewayPC := strings.ToLower(uregistrytypes.SYSTEM_CONTRACTS["UNIVERSAL_CORE"].Address) + + for _, lg := range receipt.Logs { + if lg.Removed { + continue + } + + if strings.ToLower(lg.Address) != universalGatewayPC { + continue + } + + if len(lg.Topics) == 0 { + continue + } + + if strings.ToLower(lg.Topics[0]) != strings.ToLower(types.UniversalTxWithdrawEventSig) { + continue + } + + event, err := types.DecodeUniversalTxWithdrawFromLog(lg) + if err != nil { + return nil, fmt.Errorf("failed to decode UniversalTxWithdraw: %w", err) + } + + outbound := &types.OutboundTx{ + DestinationChain: event.ChainId, + Recipient: event.Target, + Amount: event.Amount.String(), + AssetAddr: event.Token, + Sender: event.Sender, + Payload: event.Payload, + GasLimit: event.GasLimit.String(), + TxType: types.TxType_FUNDS_AND_PAYLOAD, + PcTx: &types.Originating_Pc_TX{ + TxHash: receipt.Hash, + LogIndex: fmt.Sprintf("%d", lg.Index), + }, + Index: fmt.Sprintf("%s:%d", receipt.Hash, lg.Index), + } + + outbounds = append(outbounds, outbound) + } + + return outbounds, nil +} + +func (k Keeper) CreateUniversalTxFromPCTx( + ctx context.Context, + pcTx types.PCTx, +) (*types.UniversalTx, error) { + + universalTxKey, err := k.BuildPcUniversalTxKey(ctx, pcTx) + if err != nil { + return nil, errors.Wrap(err, "failed to create UniversalTx key") + } + + found, err := k.HasUniversalTx(ctx, universalTxKey) + if err != nil { + return nil, errors.Wrap(err, "failed to check UniversalTx") + } + if found { + return nil, fmt.Errorf("universal tx already exists for pc tx %s", pcTx.TxHash) + } + + utx := types.UniversalTx{ + Id: universalTxKey, + InboundTx: nil, // no inbound + PcTx: []*types.PCTx{&pcTx}, // origin is PC + OutboundTx: nil, + UniversalStatus: types.UniversalTxStatus_PC_EXECUTED_SUCCESS, + } + + if err := k.CreateUniversalTx(ctx, universalTxKey, utx); err != nil { + return nil, err + } + + return &utx, nil +} + +// AttachOutboundsToExistingUniversalTx +// Used when UniversalTx already exists (e.g. inbound execution) +// It attaches outbounds extracted from receipt to the existing utx. +func (k Keeper) AttachOutboundsToExistingUniversalTx( + ctx sdk.Context, + receipt *evmtypes.MsgEthereumTxResponse, + utx types.UniversalTx, +) error { + outbounds, err := k.BuildOutboundsFromReceipt(receipt) + if err != nil { + return err + } + + return k.attachOutboundsToUtx(ctx, utx.Id, outbounds) +} + +// CreateUniversalTxFromReceiptIfOutbound +// Creates a UniversalTx ONLY if outbound events exist in the receipt. +// Safe to call from ExecutePayload, EVM hooks +func (k Keeper) CreateUniversalTxFromReceiptIfOutbound( + ctx sdk.Context, + receipt *evmtypes.MsgEthereumTxResponse, + pcTx types.PCTx, +) error { + outbounds, err := k.BuildOutboundsFromReceipt(receipt) + if err != nil { + return err + } + + if len(outbounds) == 0 { + return nil + } + + utx, err := k.CreateUniversalTxFromPCTx(ctx, pcTx) + if err != nil { + return err + } + + return k.attachOutboundsToUtx(ctx, utx.Id, outbounds) +} + +func (k Keeper) attachOutboundsToUtx( + ctx sdk.Context, + utxId string, + outbounds []*types.OutboundTx, +) error { + + if len(outbounds) == 0 { + return nil + } + + return k.UpdateUniversalTx(ctx, utxId, func(utx *types.UniversalTx) error { + + for _, outbound := range outbounds { + + utx.OutboundTx = append(utx.OutboundTx, outbound) + + evt, err := types.NewOutboundCreatedEvent(types.OutboundCreatedEvent{ + OutboundIndex: outbound.Index, + DestinationChain: outbound.DestinationChain, + Recipient: outbound.Recipient, + Amount: outbound.Amount, + AssetAddr: outbound.AssetAddr, + Sender: outbound.Sender, + TxType: outbound.TxType.String(), + PcTxHash: outbound.PcTx.TxHash, + LogIndex: outbound.PcTx.LogIndex, + }) + if err == nil { + ctx.EventManager().EmitEvent(evt) + } + } + + return nil + }) +} From c747946352dfdf282438db0a94c4319f7925389e Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Wed, 26 Nov 2025 15:08:16 +0530 Subject: [PATCH 021/120] feat: added outbound creation in inbound execution --- x/uexecutor/keeper/execute_inbound_funds_and_payload.go | 4 ++++ x/uexecutor/keeper/execute_inbound_gas_and_payload.go | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/x/uexecutor/keeper/execute_inbound_funds_and_payload.go b/x/uexecutor/keeper/execute_inbound_funds_and_payload.go index 6b3e6520..f2f9c579 100644 --- a/x/uexecutor/keeper/execute_inbound_funds_and_payload.go +++ b/x/uexecutor/keeper/execute_inbound_funds_and_payload.go @@ -112,6 +112,10 @@ func (k Keeper) ExecuteInboundFundsAndPayload(ctx context.Context, utx types.Uni payloadPcTx.TxHash = receipt.Hash payloadPcTx.GasUsed = receipt.GasUsed payloadPcTx.Status = "SUCCESS" + + if receipt != nil { + _ = k.AttachOutboundsToExistingUniversalTx(sdkCtx, receipt, utx) + } } updateErr = k.UpdateUniversalTx(ctx, universalTxKey, func(utx *types.UniversalTx) error { diff --git a/x/uexecutor/keeper/execute_inbound_gas_and_payload.go b/x/uexecutor/keeper/execute_inbound_gas_and_payload.go index 9290bf24..de264b5e 100644 --- a/x/uexecutor/keeper/execute_inbound_gas_and_payload.go +++ b/x/uexecutor/keeper/execute_inbound_gas_and_payload.go @@ -143,6 +143,10 @@ func (k Keeper) ExecuteInboundGasAndPayload(ctx context.Context, utx types.Unive payloadPcTx.TxHash = receipt.Hash payloadPcTx.GasUsed = receipt.GasUsed payloadPcTx.Status = "SUCCESS" + + if receipt != nil { + _ = k.AttachOutboundsToExistingUniversalTx(sdkCtx, receipt, utx) + } } updateErr = k.UpdateUniversalTx(ctx, universalTxKey, func(utx *types.UniversalTx) error { From a482ed0abcab82791dda48ceb043d8fa4f9e2d04 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Wed, 26 Nov 2025 15:09:42 +0530 Subject: [PATCH 022/120] feat: added outbound creation in msg execute payload --- x/uexecutor/keeper/msg_execute_payload.go | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/x/uexecutor/keeper/msg_execute_payload.go b/x/uexecutor/keeper/msg_execute_payload.go index 473b760a..59144d54 100644 --- a/x/uexecutor/keeper/msg_execute_payload.go +++ b/x/uexecutor/keeper/msg_execute_payload.go @@ -59,10 +59,24 @@ func (k Keeper) ExecutePayload(ctx context.Context, evmFrom common.Address, univ return err } + // Step 4 + pcTx := types.PCTx{ + Sender: evmFrom.Hex(), + TxHash: receipt.Hash, + GasUsed: receipt.GasUsed, + BlockHeight: uint64(sdkCtx.BlockHeight()), + Status: "SUCCESS", + } + + // Step 5: create outbound + UTX only if needed + if err := k.CreateUniversalTxFromReceiptIfOutbound(sdkCtx, receipt, pcTx); err != nil { + return err + } + gasUnitsUsed := receipt.GasUsed gasUnitsUsedBig := new(big.Int).SetUint64(gasUnitsUsed) - // Step 4: Handle fee calculation and deduction + // Step 6: Handle fee calculation and deduction ueaAccAddr := sdk.AccAddress(ueaAddr.Bytes()) baseFee := k.feemarketKeeper.GetBaseFee(sdkCtx) From 2e267053fcbea9d80e9f400da5589639d341290c Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Wed, 26 Nov 2025 15:10:14 +0530 Subject: [PATCH 023/120] refactor: added OutboundCreatedEvent event --- x/uexecutor/types/events.go | 49 +++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 x/uexecutor/types/events.go diff --git a/x/uexecutor/types/events.go b/x/uexecutor/types/events.go new file mode 100644 index 00000000..da717468 --- /dev/null +++ b/x/uexecutor/types/events.go @@ -0,0 +1,49 @@ +package types + +import ( + "encoding/json" + "fmt" + + sdk "github.com/cosmos/cosmos-sdk/types" +) + +const ( + EventTypeOutboundCreated = "outbound_created" +) + +// OutboundCreatedEvent represents an emitted outbound transaction. +type OutboundCreatedEvent struct { + OutboundIndex string `json:"outbound_index"` + DestinationChain string `json:"destination_chain"` + Recipient string `json:"recipient"` + Amount string `json:"amount"` + AssetAddr string `json:"asset_addr"` + Sender string `json:"sender"` + TxType string `json:"tx_type"` + PcTxHash string `json:"pc_tx_hash"` + LogIndex string `json:"log_index"` +} + +// NewOutboundCreatedEvent creates a Cosmos SDK event for outbound creation. +func NewOutboundCreatedEvent(e OutboundCreatedEvent) (sdk.Event, error) { + bz, err := json.Marshal(e) + if err != nil { + return sdk.Event{}, fmt.Errorf("failed to marshal outbound event: %w", err) + } + + event := sdk.NewEvent( + EventTypeOutboundCreated, + sdk.NewAttribute("outbound_index", e.OutboundIndex), + sdk.NewAttribute("destination_chain", e.DestinationChain), + sdk.NewAttribute("recipient", e.Recipient), + sdk.NewAttribute("amount", e.Amount), + sdk.NewAttribute("asset_addr", e.AssetAddr), + sdk.NewAttribute("sender", e.Sender), + sdk.NewAttribute("tx_type", e.TxType), + sdk.NewAttribute("pc_tx_hash", e.PcTxHash), + sdk.NewAttribute("log_index", e.LogIndex), + sdk.NewAttribute("data", string(bz)), // full JSON payload for indexers + ) + + return event, nil +} From e96f3636ff68c8d46325b53f624445e05906f24c Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Wed, 26 Nov 2025 15:10:56 +0530 Subject: [PATCH 024/120] feat: added evm_hooks processing to create new UTx --- app/app.go | 2 + x/uexecutor/keeper/evm_hooks.go | 87 +++++++++++++++++++++++++++++++++ 2 files changed, 89 insertions(+) create mode 100644 x/uexecutor/keeper/evm_hooks.go diff --git a/app/app.go b/app/app.go index be0ce571..32a426b3 100755 --- a/app/app.go +++ b/app/app.go @@ -770,6 +770,8 @@ func NewChainApp( ), ) + app.EVMKeeper.SetHooks(uexecutorkeeper.NewEVMHooks(app.UexecutorKeeper)) + // NOTE: we are adding all available EVM extensions. // Not all of them need to be enabled, which can be configured on a per-chain basis. corePrecompiles := NewAvailableStaticPrecompiles( diff --git a/x/uexecutor/keeper/evm_hooks.go b/x/uexecutor/keeper/evm_hooks.go new file mode 100644 index 00000000..d65dc5fa --- /dev/null +++ b/x/uexecutor/keeper/evm_hooks.go @@ -0,0 +1,87 @@ +package keeper + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + evmtypes "github.com/cosmos/evm/x/vm/types" + "github.com/ethereum/go-ethereum/common" + core "github.com/ethereum/go-ethereum/core" + ethtypes "github.com/ethereum/go-ethereum/core/types" + + "github.com/pushchain/push-chain-node/x/uexecutor/types" +) + +// EVMHooks implements the EVM post-processing hooks. +// This hook will be invoked after every EVM transaction execution +// and is responsible for detecting outbound events and creating UniversalTx if needed. +type EVMHooks struct { + k Keeper +} + +// NewEVMHooks creates a new instance of EVMHooks. +func NewEVMHooks(k Keeper) evmtypes.EvmHooks { + return EVMHooks{k: k} +} + +// PostTxProcessing is called by the EVM module after transaction execution. +// It inspects the receipt and creates UniversalTx + Outbound only if +// UniversalTxWithdraw event is detected. +func (h EVMHooks) PostTxProcessing( + ctx sdk.Context, + sender common.Address, + msg core.Message, + receipt *ethtypes.Receipt, +) error { + if receipt == nil || len(receipt.Logs) == 0 { + return nil + } + + protoReceipt := &evmtypes.MsgEthereumTxResponse{ + Hash: receipt.TxHash.Hex(), + GasUsed: receipt.GasUsed, + Logs: convertReceiptLogs(receipt.Logs), + } + + // Build pcTx representation + pcTx := types.PCTx{ + Sender: sender.Hex(), + TxHash: protoReceipt.Hash, + GasUsed: protoReceipt.GasUsed, + BlockHeight: uint64(ctx.BlockHeight()), + Status: "SUCCESS", + } + + // This will: + // - check if outbound exists + // - create universal tx if needed + // - attach outbounds + // - emit events + return h.k.CreateUniversalTxFromReceiptIfOutbound(ctx, protoReceipt, pcTx) +} + +func convertReceiptLogs(logs []*ethtypes.Log) []*evmtypes.Log { + out := make([]*evmtypes.Log, 0, len(logs)) + + for _, l := range logs { + out = append(out, &evmtypes.Log{ + Address: l.Address.Hex(), + Topics: convertTopics(l.Topics), + Data: l.Data, + BlockNumber: l.BlockNumber, + TxHash: l.TxHash.Hex(), + TxIndex: uint64(l.TxIndex), + BlockHash: l.BlockHash.Hex(), + Index: uint64(l.Index), + Removed: l.Removed, + }) + } + + return out +} + +func convertTopics(topics []common.Hash) []string { + out := make([]string, len(topics)) + for i, t := range topics { + out[i] = t.Hex() + } + return out +} From c7c0dfbca780aa1e35e8cc9ed6ea9474f8dbd71e Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Wed, 26 Nov 2025 15:11:20 +0530 Subject: [PATCH 025/120] refactor: added generated protobuf --- x/uexecutor/types/types.pb.go | 218 ++++++++++++++++++---------------- 1 file changed, 113 insertions(+), 105 deletions(-) diff --git a/x/uexecutor/types/types.pb.go b/x/uexecutor/types/types.pb.go index 57cf880e..ff22ab24 100644 --- a/x/uexecutor/types/types.pb.go +++ b/x/uexecutor/types/types.pb.go @@ -865,7 +865,7 @@ type UniversalTx struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` InboundTx *Inbound `protobuf:"bytes,2,opt,name=inbound_tx,json=inboundTx,proto3" json:"inbound_tx,omitempty"` PcTx []*PCTx `protobuf:"bytes,3,rep,name=pc_tx,json=pcTx,proto3" json:"pc_tx,omitempty"` - OutboundTx *OutboundTx `protobuf:"bytes,4,opt,name=outbound_tx,json=outboundTx,proto3" json:"outbound_tx,omitempty"` + OutboundTx []*OutboundTx `protobuf:"bytes,4,rep,name=outbound_tx,json=outboundTx,proto3" json:"outbound_tx,omitempty"` UniversalStatus UniversalTxStatus `protobuf:"varint,5,opt,name=universal_status,json=universalStatus,proto3,enum=uexecutor.v1.UniversalTxStatus" json:"universal_status,omitempty"` } @@ -922,7 +922,7 @@ func (m *UniversalTx) GetPcTx() []*PCTx { return nil } -func (m *UniversalTx) GetOutboundTx() *OutboundTx { +func (m *UniversalTx) GetOutboundTx() []*OutboundTx { if m != nil { return m.OutboundTx } @@ -956,92 +956,93 @@ func init() { func init() { proto.RegisterFile("uexecutor/v1/types.proto", fileDescriptor_fab6d3ca71d1e2a5) } var fileDescriptor_fab6d3ca71d1e2a5 = []byte{ - // 1360 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x56, 0xbf, 0x6f, 0xdb, 0x46, - 0x14, 0x36, 0xf5, 0x5b, 0x4f, 0x8e, 0x4d, 0x5f, 0x9c, 0x44, 0x89, 0x13, 0xd9, 0x51, 0x5a, 0xc4, - 0x70, 0x1b, 0x1b, 0x71, 0x93, 0x00, 0x15, 0xd0, 0x41, 0x91, 0x64, 0x47, 0xad, 0x2b, 0x0b, 0x14, - 0x65, 0xb8, 0x59, 0x0e, 0x67, 0xf2, 0x42, 0x11, 0x95, 0x48, 0x81, 0x47, 0xaa, 0xf4, 0xdc, 0xad, - 0x53, 0xc7, 0x8c, 0x19, 0x3b, 0xf6, 0x4f, 0x68, 0xb7, 0x8c, 0x19, 0x0b, 0x74, 0x29, 0x92, 0xa1, - 0xfd, 0x33, 0x8a, 0x3b, 0x1e, 0x2d, 0xd2, 0x3f, 0x8a, 0x66, 0xb1, 0xef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ped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x56, 0xcf, 0x6f, 0xdb, 0xc6, + 0x12, 0x36, 0xf5, 0x5b, 0x23, 0xc7, 0xa6, 0x37, 0x4e, 0xa2, 0xc4, 0x89, 0xec, 0x28, 0xef, 0x21, + 0x86, 0xdf, 0x8b, 0x8d, 0xa4, 0x49, 0x80, 0x0a, 0xe8, 0x41, 0x91, 0x64, 0x47, 0xad, 0x2b, 0x0b, + 0x14, 0x65, 0xb8, 0xb9, 0x2c, 0xd6, 0xe4, 0x86, 0x22, 0x2a, 0x91, 0x02, 0x97, 0x54, 0xe9, 0x73, + 0x6f, 0x3d, 0xf5, 0x98, 0x63, 0x8e, 0x3d, 0xf6, 0x4f, 0x68, 0x6f, 0x39, 0xe6, 0x58, 0xa0, 0x97, + 0x22, 0x39, 0xb4, 0x7f, 0x46, 0xb1, 0xcb, 0xa5, 0x45, 0xca, 0x76, 0xd1, 0x5c, 0xec, 0x9d, 0xd9, + 0x9d, 0xe5, 0x37, 0xdf, 0x7c, 0x33, 0x2b, 0xa8, 0x06, 0x34, 0xa4, 0x46, 0xe0, 0xbb, 0xde, 0xde, + 0xec, 0xf1, 0x9e, 0x7f, 0x36, 0xa5, 0x6c, 0x77, 0xea, 0xb9, 0xbe, 0x8b, 0x96, 0xcf, 0x77, 0x76, + 0x67, 0x8f, 0xef, 0xac, 0x5b, 0xae, 0xe5, 0x8a, 0x8d, 0x3d, 0xbe, 0x8a, 0xce, 0xdc, 0x59, 0x23, + 0x13, 0xdb, 0x71, 0xf7, 0xc4, 0xdf, 0xc8, 0x55, 0xdf, 0x87, 0x42, 0x9f, 0x78, 0x64, 0xc2, 0xd0, + 0x3d, 0x00, 0xe6, 0x4e, 0x28, 0x9e, 0x91, 0x71, 0x40, 0xab, 0x99, 0x2d, 0x65, 0xbb, 0xa4, 0x95, + 0xb9, 0xe7, 0x98, 0x3b, 0x1a, 0x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0x3c, 0x68, 0xa6, 0x9d, 0x39, 0xf1, 0x65, + 0x69, 0xe4, 0x5f, 0xf4, 0xdf, 0x7d, 0xa8, 0x29, 0xef, 0x3f, 0xd4, 0x94, 0x3f, 0x3e, 0xd4, 0x94, + 0x1f, 0x3f, 0xd6, 0x96, 0xde, 0x7f, 0xac, 0x2d, 0xfd, 0xf6, 0xb1, 0xb6, 0xf4, 0xea, 0xb9, 0x65, + 0xfb, 0xa3, 0xe0, 0x74, 0xd7, 0x70, 0x27, 0x7b, 0xd3, 0x80, 0x8d, 0xc4, 0xa8, 0x13, 0xab, 0x47, + 0x62, 0xf9, 0xc8, 0x71, 0x4d, 0xba, 0x17, 0xee, 0xcd, 0x95, 0x24, 0x7e, 0x88, 0x9f, 0x16, 0xc4, + 0x4f, 0xea, 0xcf, 0xfe, 0x0e, 0x00, 0x00, 0xff, 0xff, 0x27, 0x71, 0xe3, 0xc6, 0xa5, 0x0b, 0x00, + 0x00, } func (this *Params) Equal(that interface{}) bool { @@ -1383,9 +1384,14 @@ func (this *UniversalTx) Equal(that interface{}) bool { return false } } - if !this.OutboundTx.Equal(that1.OutboundTx) { + if len(this.OutboundTx) != len(that1.OutboundTx) { return false } + for i := range this.OutboundTx { + if !this.OutboundTx[i].Equal(that1.OutboundTx[i]) { + return false + } + } if this.UniversalStatus != that1.UniversalStatus { return false } @@ -1959,17 +1965,19 @@ func (m *UniversalTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x28 } - if m.OutboundTx != nil { - { - size, err := m.OutboundTx.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err + if len(m.OutboundTx) > 0 { + for iNdEx := len(m.OutboundTx) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.OutboundTx[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) + i-- + dAtA[i] = 0x22 } - i-- - dAtA[i] = 0x22 } if len(m.PcTx) > 0 { for iNdEx := len(m.PcTx) - 1; iNdEx >= 0; iNdEx-- { @@ -2298,9 +2306,11 @@ func (m *UniversalTx) Size() (n int) { n += 1 + l + sovTypes(uint64(l)) } } - if m.OutboundTx != nil { - l = m.OutboundTx.Size() - n += 1 + l + sovTypes(uint64(l)) + if len(m.OutboundTx) > 0 { + for _, e := range m.OutboundTx { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } } if m.UniversalStatus != 0 { n += 1 + sovTypes(uint64(m.UniversalStatus)) @@ -4325,10 +4335,8 @@ func (m *UniversalTx) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.OutboundTx == nil { - m.OutboundTx = &OutboundTx{} - } - if err := m.OutboundTx.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + m.OutboundTx = append(m.OutboundTx, &OutboundTx{}) + if err := m.OutboundTx[len(m.OutboundTx)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex From bbba94e6d409ff3d6d012d12eb7eb0c05ad2aa98 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Fri, 28 Nov 2025 10:49:44 +0530 Subject: [PATCH 026/120] feat: modified outbound proto and added a voteOutbound msg --- proto/uexecutor/v1/tx.proto | 18 ++++++++++++++++++ proto/uexecutor/v1/types.proto | 14 +++++--------- 2 files changed, 23 insertions(+), 9 deletions(-) diff --git a/proto/uexecutor/v1/tx.proto b/proto/uexecutor/v1/tx.proto index 007013c6..468cf96d 100755 --- a/proto/uexecutor/v1/tx.proto +++ b/proto/uexecutor/v1/tx.proto @@ -30,6 +30,9 @@ service Msg { // VoteInbound defines a message for voting on synthetic assets bridging from external chain to PC rpc VoteInbound(MsgVoteInbound) returns (MsgVoteInboundResponse); + // VoteOutbound defines a message for voting on a observed outbound tx on external chain + rpc VoteOutbound(MsgVoteOutbound) returns (MsgVoteOutboundResponse); + // VoteGasPrice defines a message for universal validators to vote on the gas price rpc VoteGasPrice(MsgVoteGasPrice) returns (MsgVoteGasPriceResponse); } @@ -130,6 +133,21 @@ message MsgVoteInbound { // MsgVoteInboundResponse defines the response for MsgExecutePayload. message MsgVoteInboundResponse {} +// MsgVoteOutbound allows a universal validator to vote on an outbound tx observation. +message MsgVoteOutbound { + option (amino.name) = "ue/MsgVoteOutbound"; + option (cosmos.msg.v1.signer) = "signer"; + + // signer is the Cosmos address initiating the tx (used for tx signing) + string signer = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + string utx_id = 2; // UniversalTx Id + string outbound_index = 3; // index of outbound tx + OutboundObservation observed_tx = 4; // observed tx on destination chain +} + +// MsgVoteInboundResponse defines the response for MsgExecutePayload. +message MsgVoteOutboundResponse {} + // MsgVoteGasPrice is broadcasted by Universal Validators to submit their observed gas prices message MsgVoteGasPrice { option (amino.name) = "uexecutor/MsgVoteGasPrice"; diff --git a/proto/uexecutor/v1/types.proto b/proto/uexecutor/v1/types.proto index 32bca391..3928609d 100644 --- a/proto/uexecutor/v1/types.proto +++ b/proto/uexecutor/v1/types.proto @@ -65,11 +65,7 @@ enum UniversalTxStatus { enum Status { UNSPECIFIED = 0; PENDING = 1; - FINALIZED = 2; -} - -message InboundStatus { - Status status = 1; + OBSERVED = 2; } enum TxType { @@ -115,10 +111,9 @@ message OutboundObservation { option (amino.name) = "uexecutor/outbound_observation"; option (gogoproto.equal) = true; - string destination_chain = 1; // chain where the tx was executed - bool success = 2; // whether execution succeeded - uint64 block_height = 3; // block height on external chain - string tx_hash = 4; // external chain tx hash + bool success = 1; // whether execution succeeded + uint64 block_height = 2; // block height on external chain + string tx_hash = 3; // external chain tx hash } message Originating_Pc_TX { @@ -145,6 +140,7 @@ message OutboundTx { Originating_Pc_TX pc_tx = 9; // pc_tx that originated the outbound OutboundObservation observed_tx = 10; // observed tx on destination chain string index = 11; // index of outbound tx + Status outbound_status = 12; // status of outbound tx } message UniversalTx { From a0fb69734361f419f661e1a44d4474346c0175b8 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Fri, 28 Nov 2025 10:50:00 +0530 Subject: [PATCH 027/120] refactor: added generated protobuf --- api/uexecutor/v1/tx.pulsar.go | 1309 +++++++++++++++++++++++++++--- api/uexecutor/v1/tx_grpc.pb.go | 39 + api/uexecutor/v1/types.pulsar.go | 1007 ++++++----------------- 3 files changed, 1523 insertions(+), 832 deletions(-) diff --git a/api/uexecutor/v1/tx.pulsar.go b/api/uexecutor/v1/tx.pulsar.go index 7f88ade5..009b9086 100644 --- a/api/uexecutor/v1/tx.pulsar.go +++ b/api/uexecutor/v1/tx.pulsar.go @@ -4628,6 +4628,989 @@ func (x *fastReflection_MsgVoteInboundResponse) ProtoMethods() *protoiface.Metho } } +var ( + md_MsgVoteOutbound protoreflect.MessageDescriptor + fd_MsgVoteOutbound_signer protoreflect.FieldDescriptor + fd_MsgVoteOutbound_utx_id protoreflect.FieldDescriptor + fd_MsgVoteOutbound_outbound_index protoreflect.FieldDescriptor + fd_MsgVoteOutbound_observed_tx protoreflect.FieldDescriptor +) + +func init() { + file_uexecutor_v1_tx_proto_init() + md_MsgVoteOutbound = File_uexecutor_v1_tx_proto.Messages().ByName("MsgVoteOutbound") + fd_MsgVoteOutbound_signer = md_MsgVoteOutbound.Fields().ByName("signer") + fd_MsgVoteOutbound_utx_id = md_MsgVoteOutbound.Fields().ByName("utx_id") + fd_MsgVoteOutbound_outbound_index = md_MsgVoteOutbound.Fields().ByName("outbound_index") + fd_MsgVoteOutbound_observed_tx = md_MsgVoteOutbound.Fields().ByName("observed_tx") +} + +var _ protoreflect.Message = (*fastReflection_MsgVoteOutbound)(nil) + +type fastReflection_MsgVoteOutbound MsgVoteOutbound + +func (x *MsgVoteOutbound) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgVoteOutbound)(x) +} + +func (x *MsgVoteOutbound) slowProtoReflect() protoreflect.Message { + mi := &file_uexecutor_v1_tx_proto_msgTypes[10] + 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) +} + +var _fastReflection_MsgVoteOutbound_messageType fastReflection_MsgVoteOutbound_messageType +var _ protoreflect.MessageType = fastReflection_MsgVoteOutbound_messageType{} + +type fastReflection_MsgVoteOutbound_messageType struct{} + +func (x fastReflection_MsgVoteOutbound_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgVoteOutbound)(nil) +} +func (x fastReflection_MsgVoteOutbound_messageType) New() protoreflect.Message { + return new(fastReflection_MsgVoteOutbound) +} +func (x fastReflection_MsgVoteOutbound_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgVoteOutbound +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgVoteOutbound) Descriptor() protoreflect.MessageDescriptor { + return md_MsgVoteOutbound +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgVoteOutbound) Type() protoreflect.MessageType { + return _fastReflection_MsgVoteOutbound_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgVoteOutbound) New() protoreflect.Message { + return new(fastReflection_MsgVoteOutbound) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgVoteOutbound) Interface() protoreflect.ProtoMessage { + return (*MsgVoteOutbound)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgVoteOutbound) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Signer != "" { + value := protoreflect.ValueOfString(x.Signer) + if !f(fd_MsgVoteOutbound_signer, value) { + return + } + } + if x.UtxId != "" { + value := protoreflect.ValueOfString(x.UtxId) + if !f(fd_MsgVoteOutbound_utx_id, value) { + return + } + } + if x.OutboundIndex != "" { + value := protoreflect.ValueOfString(x.OutboundIndex) + if !f(fd_MsgVoteOutbound_outbound_index, value) { + return + } + } + if x.ObservedTx != nil { + value := protoreflect.ValueOfMessage(x.ObservedTx.ProtoReflect()) + if !f(fd_MsgVoteOutbound_observed_tx, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgVoteOutbound) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "uexecutor.v1.MsgVoteOutbound.signer": + return x.Signer != "" + case "uexecutor.v1.MsgVoteOutbound.utx_id": + return x.UtxId != "" + case "uexecutor.v1.MsgVoteOutbound.outbound_index": + return x.OutboundIndex != "" + case "uexecutor.v1.MsgVoteOutbound.observed_tx": + return x.ObservedTx != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.MsgVoteOutbound")) + } + panic(fmt.Errorf("message uexecutor.v1.MsgVoteOutbound does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgVoteOutbound) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "uexecutor.v1.MsgVoteOutbound.signer": + x.Signer = "" + case "uexecutor.v1.MsgVoteOutbound.utx_id": + x.UtxId = "" + case "uexecutor.v1.MsgVoteOutbound.outbound_index": + x.OutboundIndex = "" + case "uexecutor.v1.MsgVoteOutbound.observed_tx": + x.ObservedTx = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.MsgVoteOutbound")) + } + panic(fmt.Errorf("message uexecutor.v1.MsgVoteOutbound does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgVoteOutbound) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "uexecutor.v1.MsgVoteOutbound.signer": + value := x.Signer + return protoreflect.ValueOfString(value) + case "uexecutor.v1.MsgVoteOutbound.utx_id": + value := x.UtxId + return protoreflect.ValueOfString(value) + case "uexecutor.v1.MsgVoteOutbound.outbound_index": + value := x.OutboundIndex + return protoreflect.ValueOfString(value) + case "uexecutor.v1.MsgVoteOutbound.observed_tx": + value := x.ObservedTx + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.MsgVoteOutbound")) + } + panic(fmt.Errorf("message uexecutor.v1.MsgVoteOutbound does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgVoteOutbound) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "uexecutor.v1.MsgVoteOutbound.signer": + x.Signer = value.Interface().(string) + case "uexecutor.v1.MsgVoteOutbound.utx_id": + x.UtxId = value.Interface().(string) + case "uexecutor.v1.MsgVoteOutbound.outbound_index": + x.OutboundIndex = value.Interface().(string) + case "uexecutor.v1.MsgVoteOutbound.observed_tx": + x.ObservedTx = value.Message().Interface().(*OutboundObservation) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.MsgVoteOutbound")) + } + panic(fmt.Errorf("message uexecutor.v1.MsgVoteOutbound does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgVoteOutbound) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "uexecutor.v1.MsgVoteOutbound.observed_tx": + if x.ObservedTx == nil { + x.ObservedTx = new(OutboundObservation) + } + return protoreflect.ValueOfMessage(x.ObservedTx.ProtoReflect()) + case "uexecutor.v1.MsgVoteOutbound.signer": + panic(fmt.Errorf("field signer of message uexecutor.v1.MsgVoteOutbound is not mutable")) + case "uexecutor.v1.MsgVoteOutbound.utx_id": + panic(fmt.Errorf("field utx_id of message uexecutor.v1.MsgVoteOutbound is not mutable")) + case "uexecutor.v1.MsgVoteOutbound.outbound_index": + panic(fmt.Errorf("field outbound_index of message uexecutor.v1.MsgVoteOutbound is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.MsgVoteOutbound")) + } + panic(fmt.Errorf("message uexecutor.v1.MsgVoteOutbound does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgVoteOutbound) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "uexecutor.v1.MsgVoteOutbound.signer": + return protoreflect.ValueOfString("") + case "uexecutor.v1.MsgVoteOutbound.utx_id": + return protoreflect.ValueOfString("") + case "uexecutor.v1.MsgVoteOutbound.outbound_index": + return protoreflect.ValueOfString("") + case "uexecutor.v1.MsgVoteOutbound.observed_tx": + m := new(OutboundObservation) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.MsgVoteOutbound")) + } + panic(fmt.Errorf("message uexecutor.v1.MsgVoteOutbound does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgVoteOutbound) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in uexecutor.v1.MsgVoteOutbound", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgVoteOutbound) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgVoteOutbound) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgVoteOutbound) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgVoteOutbound) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgVoteOutbound) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Signer) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.UtxId) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.OutboundIndex) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.ObservedTx != nil { + l = options.Size(x.ObservedTx) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgVoteOutbound) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.ObservedTx != nil { + encoded, err := options.Marshal(x.ObservedTx) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x22 + } + if len(x.OutboundIndex) > 0 { + i -= len(x.OutboundIndex) + copy(dAtA[i:], x.OutboundIndex) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.OutboundIndex))) + i-- + dAtA[i] = 0x1a + } + if len(x.UtxId) > 0 { + i -= len(x.UtxId) + copy(dAtA[i:], x.UtxId) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.UtxId))) + i-- + dAtA[i] = 0x12 + } + if len(x.Signer) > 0 { + i -= len(x.Signer) + copy(dAtA[i:], x.Signer) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Signer))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgVoteOutbound) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgVoteOutbound: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgVoteOutbound: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Signer", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Signer = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field UtxId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.UtxId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field OutboundIndex", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.OutboundIndex = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ObservedTx", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.ObservedTx == nil { + x.ObservedTx = &OutboundObservation{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.ObservedTx); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgVoteOutboundResponse protoreflect.MessageDescriptor +) + +func init() { + file_uexecutor_v1_tx_proto_init() + md_MsgVoteOutboundResponse = File_uexecutor_v1_tx_proto.Messages().ByName("MsgVoteOutboundResponse") +} + +var _ protoreflect.Message = (*fastReflection_MsgVoteOutboundResponse)(nil) + +type fastReflection_MsgVoteOutboundResponse MsgVoteOutboundResponse + +func (x *MsgVoteOutboundResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgVoteOutboundResponse)(x) +} + +func (x *MsgVoteOutboundResponse) slowProtoReflect() protoreflect.Message { + mi := &file_uexecutor_v1_tx_proto_msgTypes[11] + 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) +} + +var _fastReflection_MsgVoteOutboundResponse_messageType fastReflection_MsgVoteOutboundResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgVoteOutboundResponse_messageType{} + +type fastReflection_MsgVoteOutboundResponse_messageType struct{} + +func (x fastReflection_MsgVoteOutboundResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgVoteOutboundResponse)(nil) +} +func (x fastReflection_MsgVoteOutboundResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgVoteOutboundResponse) +} +func (x fastReflection_MsgVoteOutboundResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgVoteOutboundResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgVoteOutboundResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgVoteOutboundResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgVoteOutboundResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgVoteOutboundResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgVoteOutboundResponse) New() protoreflect.Message { + return new(fastReflection_MsgVoteOutboundResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgVoteOutboundResponse) Interface() protoreflect.ProtoMessage { + return (*MsgVoteOutboundResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgVoteOutboundResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgVoteOutboundResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.MsgVoteOutboundResponse")) + } + panic(fmt.Errorf("message uexecutor.v1.MsgVoteOutboundResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgVoteOutboundResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.MsgVoteOutboundResponse")) + } + panic(fmt.Errorf("message uexecutor.v1.MsgVoteOutboundResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgVoteOutboundResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.MsgVoteOutboundResponse")) + } + panic(fmt.Errorf("message uexecutor.v1.MsgVoteOutboundResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgVoteOutboundResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.MsgVoteOutboundResponse")) + } + panic(fmt.Errorf("message uexecutor.v1.MsgVoteOutboundResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgVoteOutboundResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.MsgVoteOutboundResponse")) + } + panic(fmt.Errorf("message uexecutor.v1.MsgVoteOutboundResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgVoteOutboundResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.MsgVoteOutboundResponse")) + } + panic(fmt.Errorf("message uexecutor.v1.MsgVoteOutboundResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgVoteOutboundResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in uexecutor.v1.MsgVoteOutboundResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgVoteOutboundResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgVoteOutboundResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgVoteOutboundResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgVoteOutboundResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgVoteOutboundResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgVoteOutboundResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgVoteOutboundResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgVoteOutboundResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgVoteOutboundResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + var ( md_MsgVoteGasPrice protoreflect.MessageDescriptor fd_MsgVoteGasPrice_signer protoreflect.FieldDescriptor @@ -4654,7 +5637,7 @@ func (x *MsgVoteGasPrice) ProtoReflect() protoreflect.Message { } func (x *MsgVoteGasPrice) slowProtoReflect() protoreflect.Message { - mi := &file_uexecutor_v1_tx_proto_msgTypes[10] + mi := &file_uexecutor_v1_tx_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5226,7 +6209,7 @@ func (x *MsgVoteGasPriceResponse) ProtoReflect() protoreflect.Message { } func (x *MsgVoteGasPriceResponse) slowProtoReflect() protoreflect.Message { - mi := &file_uexecutor_v1_tx_proto_msgTypes[11] + mi := &file_uexecutor_v1_tx_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5995,6 +6978,94 @@ func (*MsgVoteInboundResponse) Descriptor() ([]byte, []int) { return file_uexecutor_v1_tx_proto_rawDescGZIP(), []int{9} } +// MsgVoteOutbound allows a universal validator to vote on an outbound tx observation. +type MsgVoteOutbound struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // signer is the Cosmos address initiating the tx (used for tx signing) + Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty"` + UtxId string `protobuf:"bytes,2,opt,name=utx_id,json=utxId,proto3" json:"utx_id,omitempty"` // UniversalTx Id + OutboundIndex string `protobuf:"bytes,3,opt,name=outbound_index,json=outboundIndex,proto3" json:"outbound_index,omitempty"` // index of outbound tx + ObservedTx *OutboundObservation `protobuf:"bytes,4,opt,name=observed_tx,json=observedTx,proto3" json:"observed_tx,omitempty"` // observed tx on destination chain +} + +func (x *MsgVoteOutbound) Reset() { + *x = MsgVoteOutbound{} + if protoimpl.UnsafeEnabled { + mi := &file_uexecutor_v1_tx_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgVoteOutbound) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgVoteOutbound) ProtoMessage() {} + +// Deprecated: Use MsgVoteOutbound.ProtoReflect.Descriptor instead. +func (*MsgVoteOutbound) Descriptor() ([]byte, []int) { + return file_uexecutor_v1_tx_proto_rawDescGZIP(), []int{10} +} + +func (x *MsgVoteOutbound) GetSigner() string { + if x != nil { + return x.Signer + } + return "" +} + +func (x *MsgVoteOutbound) GetUtxId() string { + if x != nil { + return x.UtxId + } + return "" +} + +func (x *MsgVoteOutbound) GetOutboundIndex() string { + if x != nil { + return x.OutboundIndex + } + return "" +} + +func (x *MsgVoteOutbound) GetObservedTx() *OutboundObservation { + if x != nil { + return x.ObservedTx + } + return nil +} + +// MsgVoteInboundResponse defines the response for MsgExecutePayload. +type MsgVoteOutboundResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgVoteOutboundResponse) Reset() { + *x = MsgVoteOutboundResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_uexecutor_v1_tx_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgVoteOutboundResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgVoteOutboundResponse) ProtoMessage() {} + +// Deprecated: Use MsgVoteOutboundResponse.ProtoReflect.Descriptor instead. +func (*MsgVoteOutboundResponse) Descriptor() ([]byte, []int) { + return file_uexecutor_v1_tx_proto_rawDescGZIP(), []int{11} +} + // MsgVoteGasPrice is broadcasted by Universal Validators to submit their observed gas prices type MsgVoteGasPrice struct { state protoimpl.MessageState @@ -6010,7 +7081,7 @@ type MsgVoteGasPrice struct { func (x *MsgVoteGasPrice) Reset() { *x = MsgVoteGasPrice{} if protoimpl.UnsafeEnabled { - mi := &file_uexecutor_v1_tx_proto_msgTypes[10] + mi := &file_uexecutor_v1_tx_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6024,7 +7095,7 @@ func (*MsgVoteGasPrice) ProtoMessage() {} // Deprecated: Use MsgVoteGasPrice.ProtoReflect.Descriptor instead. func (*MsgVoteGasPrice) Descriptor() ([]byte, []int) { - return file_uexecutor_v1_tx_proto_rawDescGZIP(), []int{10} + return file_uexecutor_v1_tx_proto_rawDescGZIP(), []int{12} } func (x *MsgVoteGasPrice) GetSigner() string { @@ -6065,7 +7136,7 @@ type MsgVoteGasPriceResponse struct { func (x *MsgVoteGasPriceResponse) Reset() { *x = MsgVoteGasPriceResponse{} if protoimpl.UnsafeEnabled { - mi := &file_uexecutor_v1_tx_proto_msgTypes[11] + mi := &file_uexecutor_v1_tx_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6079,7 +7150,7 @@ func (*MsgVoteGasPriceResponse) ProtoMessage() {} // Deprecated: Use MsgVoteGasPriceResponse.ProtoReflect.Descriptor instead. func (*MsgVoteGasPriceResponse) Descriptor() ([]byte, []int) { - return file_uexecutor_v1_tx_proto_rawDescGZIP(), []int{11} + return file_uexecutor_v1_tx_proto_rawDescGZIP(), []int{13} } var File_uexecutor_v1_tx_proto protoreflect.FileDescriptor @@ -6171,65 +7242,87 @@ var file_uexecutor_v1_tx_proto_rawDesc = []byte{ 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x11, 0x75, 0x65, 0x2f, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x22, 0x18, 0x0a, 0x16, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0xd3, 0x01, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x47, 0x61, 0x73, - 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x30, 0x0a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x18, + 0x65, 0x22, 0xe9, 0x01, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x4f, 0x75, 0x74, + 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x30, 0x0a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, - 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x12, 0x2a, 0x0a, 0x11, 0x6f, 0x62, 0x73, 0x65, 0x72, - 0x76, 0x65, 0x64, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0f, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x43, 0x68, 0x61, 0x69, - 0x6e, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, - 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x3a, 0x29, 0x82, 0xe7, - 0xb0, 0x2a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x19, 0x75, 0x65, - 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2f, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x47, - 0x61, 0x73, 0x50, 0x72, 0x69, 0x63, 0x65, 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x56, 0x6f, - 0x74, 0x65, 0x47, 0x61, 0x73, 0x50, 0x72, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x32, 0xf8, 0x03, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x54, 0x0a, 0x0c, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1d, 0x2e, 0x75, 0x65, 0x78, - 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x25, 0x2e, 0x75, 0x65, 0x78, 0x65, - 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x4b, 0x0a, 0x09, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x55, 0x45, 0x41, 0x12, 0x1a, 0x2e, - 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, - 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x55, 0x45, 0x41, 0x1a, 0x22, 0x2e, 0x75, 0x65, 0x78, 0x65, - 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x70, 0x6c, - 0x6f, 0x79, 0x55, 0x45, 0x41, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, - 0x06, 0x4d, 0x69, 0x6e, 0x74, 0x50, 0x43, 0x12, 0x17, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, + 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x12, 0x15, 0x0a, 0x06, 0x75, 0x74, 0x78, 0x5f, 0x69, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x75, 0x74, 0x78, 0x49, 0x64, 0x12, 0x25, + 0x0a, 0x0e, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, + 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x42, 0x0a, 0x0b, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, + 0x64, 0x5f, 0x74, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x75, 0x65, 0x78, + 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, + 0x6e, 0x64, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x6f, + 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x54, 0x78, 0x3a, 0x22, 0x82, 0xe7, 0xb0, 0x2a, 0x06, + 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x12, 0x75, 0x65, 0x2f, 0x4d, 0x73, + 0x67, 0x56, 0x6f, 0x74, 0x65, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x22, 0x19, 0x0a, + 0x17, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xd3, 0x01, 0x0a, 0x0f, 0x4d, 0x73, 0x67, + 0x56, 0x6f, 0x74, 0x65, 0x47, 0x61, 0x73, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x30, 0x0a, 0x06, + 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, + 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x12, 0x2a, + 0x0a, 0x11, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, + 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6f, 0x62, 0x73, 0x65, 0x72, + 0x76, 0x65, 0x64, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, + 0x69, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, + 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, + 0x62, 0x65, 0x72, 0x3a, 0x29, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, + 0x8a, 0xe7, 0xb0, 0x2a, 0x19, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2f, 0x4d, + 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x47, 0x61, 0x73, 0x50, 0x72, 0x69, 0x63, 0x65, 0x22, 0x19, + 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x47, 0x61, 0x73, 0x50, 0x72, 0x69, 0x63, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xce, 0x04, 0x0a, 0x03, 0x4d, 0x73, + 0x67, 0x12, 0x54, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x12, 0x1d, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, + 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x1a, 0x25, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, + 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4b, 0x0a, 0x09, 0x44, 0x65, 0x70, 0x6c, 0x6f, + 0x79, 0x55, 0x45, 0x41, 0x12, 0x1a, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, + 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x55, 0x45, 0x41, + 0x1a, 0x22, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, + 0x4d, 0x73, 0x67, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x55, 0x45, 0x41, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x06, 0x4d, 0x69, 0x6e, 0x74, 0x50, 0x43, 0x12, 0x17, + 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, + 0x67, 0x4d, 0x69, 0x6e, 0x74, 0x50, 0x43, 0x1a, 0x1f, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x4d, 0x69, 0x6e, 0x74, 0x50, 0x43, - 0x1a, 0x1f, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, - 0x4d, 0x73, 0x67, 0x4d, 0x69, 0x6e, 0x74, 0x50, 0x43, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x5a, 0x0a, 0x0e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x50, 0x61, 0x79, 0x6c, - 0x6f, 0x61, 0x64, 0x12, 0x1f, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, - 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x50, 0x61, 0x79, - 0x6c, 0x6f, 0x61, 0x64, 0x1a, 0x27, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, - 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x50, 0x61, - 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, - 0x0b, 0x56, 0x6f, 0x74, 0x65, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x1c, 0x2e, 0x75, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5a, 0x0a, 0x0e, 0x45, 0x78, 0x65, 0x63, + 0x75, 0x74, 0x65, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x1f, 0x2e, 0x75, 0x65, 0x78, + 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, + 0x63, 0x75, 0x74, 0x65, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x1a, 0x27, 0x2e, 0x75, 0x65, + 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, + 0x65, 0x63, 0x75, 0x74, 0x65, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x0b, 0x56, 0x6f, 0x74, 0x65, 0x49, 0x6e, 0x62, 0x6f, + 0x75, 0x6e, 0x64, 0x12, 0x1c, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, + 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, + 0x64, 0x1a, 0x24, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, + 0x2e, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x54, 0x0a, 0x0c, 0x56, 0x6f, 0x74, 0x65, 0x4f, + 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x1d, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, + 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x4f, 0x75, + 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x1a, 0x25, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x4f, 0x75, 0x74, + 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x54, 0x0a, + 0x0c, 0x56, 0x6f, 0x74, 0x65, 0x47, 0x61, 0x73, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x1d, 0x2e, + 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, + 0x56, 0x6f, 0x74, 0x65, 0x47, 0x61, 0x73, 0x50, 0x72, 0x69, 0x63, 0x65, 0x1a, 0x25, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x56, - 0x6f, 0x74, 0x65, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x1a, 0x24, 0x2e, 0x75, 0x65, 0x78, - 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, - 0x65, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x54, 0x0a, 0x0c, 0x56, 0x6f, 0x74, 0x65, 0x47, 0x61, 0x73, 0x50, 0x72, 0x69, 0x63, 0x65, - 0x12, 0x1d, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, - 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x47, 0x61, 0x73, 0x50, 0x72, 0x69, 0x63, 0x65, 0x1a, - 0x25, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, - 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x47, 0x61, 0x73, 0x50, 0x72, 0x69, 0x63, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xaf, 0x01, - 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, - 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x41, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x63, 0x68, - 0x61, 0x69, 0x6e, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x2d, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2d, 0x6e, - 0x6f, 0x64, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, - 0x72, 0x2f, 0x76, 0x31, 0x3b, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x76, 0x31, - 0xa2, 0x02, 0x03, 0x55, 0x58, 0x58, 0xaa, 0x02, 0x0c, 0x55, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, - 0x6f, 0x72, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0c, 0x55, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, - 0x72, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x18, 0x55, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, - 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, - 0x02, 0x0d, 0x55, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x3a, 0x3a, 0x56, 0x31, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6f, 0x74, 0x65, 0x47, 0x61, 0x73, 0x50, 0x72, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xaf, 0x01, 0x0a, 0x10, 0x63, + 0x6f, 0x6d, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x42, + 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x41, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x63, 0x68, 0x61, 0x69, 0x6e, + 0x2f, 0x70, 0x75, 0x73, 0x68, 0x2d, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2d, 0x6e, 0x6f, 0x64, 0x65, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2f, 0x76, + 0x31, 0x3b, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x76, 0x31, 0xa2, 0x02, 0x03, + 0x55, 0x58, 0x58, 0xaa, 0x02, 0x0c, 0x55, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, + 0x56, 0x31, 0xca, 0x02, 0x0c, 0x55, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x5c, 0x56, + 0x31, 0xe2, 0x02, 0x18, 0x55, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x5c, 0x56, 0x31, + 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0d, 0x55, + 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -6244,7 +7337,7 @@ func file_uexecutor_v1_tx_proto_rawDescGZIP() []byte { return file_uexecutor_v1_tx_proto_rawDescData } -var file_uexecutor_v1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 12) +var file_uexecutor_v1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 14) var file_uexecutor_v1_tx_proto_goTypes = []interface{}{ (*MsgUpdateParams)(nil), // 0: uexecutor.v1.MsgUpdateParams (*MsgUpdateParamsResponse)(nil), // 1: uexecutor.v1.MsgUpdateParamsResponse @@ -6256,37 +7349,43 @@ var file_uexecutor_v1_tx_proto_goTypes = []interface{}{ (*MsgExecutePayloadResponse)(nil), // 7: uexecutor.v1.MsgExecutePayloadResponse (*MsgVoteInbound)(nil), // 8: uexecutor.v1.MsgVoteInbound (*MsgVoteInboundResponse)(nil), // 9: uexecutor.v1.MsgVoteInboundResponse - (*MsgVoteGasPrice)(nil), // 10: uexecutor.v1.MsgVoteGasPrice - (*MsgVoteGasPriceResponse)(nil), // 11: uexecutor.v1.MsgVoteGasPriceResponse - (*Params)(nil), // 12: uexecutor.v1.Params - (*UniversalAccountId)(nil), // 13: uexecutor.v1.UniversalAccountId - (*UniversalPayload)(nil), // 14: uexecutor.v1.UniversalPayload - (*Inbound)(nil), // 15: uexecutor.v1.Inbound + (*MsgVoteOutbound)(nil), // 10: uexecutor.v1.MsgVoteOutbound + (*MsgVoteOutboundResponse)(nil), // 11: uexecutor.v1.MsgVoteOutboundResponse + (*MsgVoteGasPrice)(nil), // 12: uexecutor.v1.MsgVoteGasPrice + (*MsgVoteGasPriceResponse)(nil), // 13: uexecutor.v1.MsgVoteGasPriceResponse + (*Params)(nil), // 14: uexecutor.v1.Params + (*UniversalAccountId)(nil), // 15: uexecutor.v1.UniversalAccountId + (*UniversalPayload)(nil), // 16: uexecutor.v1.UniversalPayload + (*Inbound)(nil), // 17: uexecutor.v1.Inbound + (*OutboundObservation)(nil), // 18: uexecutor.v1.OutboundObservation } var file_uexecutor_v1_tx_proto_depIdxs = []int32{ - 12, // 0: uexecutor.v1.MsgUpdateParams.params:type_name -> uexecutor.v1.Params - 13, // 1: uexecutor.v1.MsgDeployUEA.universal_account_id:type_name -> uexecutor.v1.UniversalAccountId - 13, // 2: uexecutor.v1.MsgMintPC.universal_account_id:type_name -> uexecutor.v1.UniversalAccountId - 13, // 3: uexecutor.v1.MsgExecutePayload.universal_account_id:type_name -> uexecutor.v1.UniversalAccountId - 14, // 4: uexecutor.v1.MsgExecutePayload.universal_payload:type_name -> uexecutor.v1.UniversalPayload - 15, // 5: uexecutor.v1.MsgVoteInbound.inbound:type_name -> uexecutor.v1.Inbound - 0, // 6: uexecutor.v1.Msg.UpdateParams:input_type -> uexecutor.v1.MsgUpdateParams - 2, // 7: uexecutor.v1.Msg.DeployUEA:input_type -> uexecutor.v1.MsgDeployUEA - 4, // 8: uexecutor.v1.Msg.MintPC:input_type -> uexecutor.v1.MsgMintPC - 6, // 9: uexecutor.v1.Msg.ExecutePayload:input_type -> uexecutor.v1.MsgExecutePayload - 8, // 10: uexecutor.v1.Msg.VoteInbound:input_type -> uexecutor.v1.MsgVoteInbound - 10, // 11: uexecutor.v1.Msg.VoteGasPrice:input_type -> uexecutor.v1.MsgVoteGasPrice - 1, // 12: uexecutor.v1.Msg.UpdateParams:output_type -> uexecutor.v1.MsgUpdateParamsResponse - 3, // 13: uexecutor.v1.Msg.DeployUEA:output_type -> uexecutor.v1.MsgDeployUEAResponse - 5, // 14: uexecutor.v1.Msg.MintPC:output_type -> uexecutor.v1.MsgMintPCResponse - 7, // 15: uexecutor.v1.Msg.ExecutePayload:output_type -> uexecutor.v1.MsgExecutePayloadResponse - 9, // 16: uexecutor.v1.Msg.VoteInbound:output_type -> uexecutor.v1.MsgVoteInboundResponse - 11, // 17: uexecutor.v1.Msg.VoteGasPrice:output_type -> uexecutor.v1.MsgVoteGasPriceResponse - 12, // [12:18] is the sub-list for method output_type - 6, // [6:12] is the sub-list for method input_type - 6, // [6:6] is the sub-list for extension type_name - 6, // [6:6] is the sub-list for extension extendee - 0, // [0:6] is the sub-list for field type_name + 14, // 0: uexecutor.v1.MsgUpdateParams.params:type_name -> uexecutor.v1.Params + 15, // 1: uexecutor.v1.MsgDeployUEA.universal_account_id:type_name -> uexecutor.v1.UniversalAccountId + 15, // 2: uexecutor.v1.MsgMintPC.universal_account_id:type_name -> uexecutor.v1.UniversalAccountId + 15, // 3: uexecutor.v1.MsgExecutePayload.universal_account_id:type_name -> uexecutor.v1.UniversalAccountId + 16, // 4: uexecutor.v1.MsgExecutePayload.universal_payload:type_name -> uexecutor.v1.UniversalPayload + 17, // 5: uexecutor.v1.MsgVoteInbound.inbound:type_name -> uexecutor.v1.Inbound + 18, // 6: uexecutor.v1.MsgVoteOutbound.observed_tx:type_name -> uexecutor.v1.OutboundObservation + 0, // 7: uexecutor.v1.Msg.UpdateParams:input_type -> uexecutor.v1.MsgUpdateParams + 2, // 8: uexecutor.v1.Msg.DeployUEA:input_type -> uexecutor.v1.MsgDeployUEA + 4, // 9: uexecutor.v1.Msg.MintPC:input_type -> uexecutor.v1.MsgMintPC + 6, // 10: uexecutor.v1.Msg.ExecutePayload:input_type -> uexecutor.v1.MsgExecutePayload + 8, // 11: uexecutor.v1.Msg.VoteInbound:input_type -> uexecutor.v1.MsgVoteInbound + 10, // 12: uexecutor.v1.Msg.VoteOutbound:input_type -> uexecutor.v1.MsgVoteOutbound + 12, // 13: uexecutor.v1.Msg.VoteGasPrice:input_type -> uexecutor.v1.MsgVoteGasPrice + 1, // 14: uexecutor.v1.Msg.UpdateParams:output_type -> uexecutor.v1.MsgUpdateParamsResponse + 3, // 15: uexecutor.v1.Msg.DeployUEA:output_type -> uexecutor.v1.MsgDeployUEAResponse + 5, // 16: uexecutor.v1.Msg.MintPC:output_type -> uexecutor.v1.MsgMintPCResponse + 7, // 17: uexecutor.v1.Msg.ExecutePayload:output_type -> uexecutor.v1.MsgExecutePayloadResponse + 9, // 18: uexecutor.v1.Msg.VoteInbound:output_type -> uexecutor.v1.MsgVoteInboundResponse + 11, // 19: uexecutor.v1.Msg.VoteOutbound:output_type -> uexecutor.v1.MsgVoteOutboundResponse + 13, // 20: uexecutor.v1.Msg.VoteGasPrice:output_type -> uexecutor.v1.MsgVoteGasPriceResponse + 14, // [14:21] is the sub-list for method output_type + 7, // [7:14] is the sub-list for method input_type + 7, // [7:7] is the sub-list for extension type_name + 7, // [7:7] is the sub-list for extension extendee + 0, // [0:7] is the sub-list for field type_name } func init() { file_uexecutor_v1_tx_proto_init() } @@ -6417,7 +7516,7 @@ func file_uexecutor_v1_tx_proto_init() { } } file_uexecutor_v1_tx_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgVoteGasPrice); i { + switch v := v.(*MsgVoteOutbound); i { case 0: return &v.state case 1: @@ -6429,6 +7528,30 @@ func file_uexecutor_v1_tx_proto_init() { } } file_uexecutor_v1_tx_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgVoteOutboundResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_uexecutor_v1_tx_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgVoteGasPrice); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_uexecutor_v1_tx_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgVoteGasPriceResponse); i { case 0: return &v.state @@ -6447,7 +7570,7 @@ func file_uexecutor_v1_tx_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_uexecutor_v1_tx_proto_rawDesc, NumEnums: 0, - NumMessages: 12, + NumMessages: 14, NumExtensions: 0, NumServices: 1, }, diff --git a/api/uexecutor/v1/tx_grpc.pb.go b/api/uexecutor/v1/tx_grpc.pb.go index f5c3f94c..d5f4108d 100644 --- a/api/uexecutor/v1/tx_grpc.pb.go +++ b/api/uexecutor/v1/tx_grpc.pb.go @@ -24,6 +24,7 @@ const ( Msg_MintPC_FullMethodName = "/uexecutor.v1.Msg/MintPC" Msg_ExecutePayload_FullMethodName = "/uexecutor.v1.Msg/ExecutePayload" Msg_VoteInbound_FullMethodName = "/uexecutor.v1.Msg/VoteInbound" + Msg_VoteOutbound_FullMethodName = "/uexecutor.v1.Msg/VoteOutbound" Msg_VoteGasPrice_FullMethodName = "/uexecutor.v1.Msg/VoteGasPrice" ) @@ -43,6 +44,8 @@ type MsgClient interface { ExecutePayload(ctx context.Context, in *MsgExecutePayload, opts ...grpc.CallOption) (*MsgExecutePayloadResponse, error) // VoteInbound defines a message for voting on synthetic assets bridging from external chain to PC VoteInbound(ctx context.Context, in *MsgVoteInbound, opts ...grpc.CallOption) (*MsgVoteInboundResponse, error) + // VoteOutbound defines a message for voting on a observed outbound tx on external chain + VoteOutbound(ctx context.Context, in *MsgVoteOutbound, opts ...grpc.CallOption) (*MsgVoteOutboundResponse, error) // VoteGasPrice defines a message for universal validators to vote on the gas price VoteGasPrice(ctx context.Context, in *MsgVoteGasPrice, opts ...grpc.CallOption) (*MsgVoteGasPriceResponse, error) } @@ -100,6 +103,15 @@ func (c *msgClient) VoteInbound(ctx context.Context, in *MsgVoteInbound, opts .. return out, nil } +func (c *msgClient) VoteOutbound(ctx context.Context, in *MsgVoteOutbound, opts ...grpc.CallOption) (*MsgVoteOutboundResponse, error) { + out := new(MsgVoteOutboundResponse) + err := c.cc.Invoke(ctx, Msg_VoteOutbound_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *msgClient) VoteGasPrice(ctx context.Context, in *MsgVoteGasPrice, opts ...grpc.CallOption) (*MsgVoteGasPriceResponse, error) { out := new(MsgVoteGasPriceResponse) err := c.cc.Invoke(ctx, Msg_VoteGasPrice_FullMethodName, in, out, opts...) @@ -125,6 +137,8 @@ type MsgServer interface { ExecutePayload(context.Context, *MsgExecutePayload) (*MsgExecutePayloadResponse, error) // VoteInbound defines a message for voting on synthetic assets bridging from external chain to PC VoteInbound(context.Context, *MsgVoteInbound) (*MsgVoteInboundResponse, error) + // VoteOutbound defines a message for voting on a observed outbound tx on external chain + VoteOutbound(context.Context, *MsgVoteOutbound) (*MsgVoteOutboundResponse, error) // VoteGasPrice defines a message for universal validators to vote on the gas price VoteGasPrice(context.Context, *MsgVoteGasPrice) (*MsgVoteGasPriceResponse, error) mustEmbedUnimplementedMsgServer() @@ -149,6 +163,9 @@ func (UnimplementedMsgServer) ExecutePayload(context.Context, *MsgExecutePayload func (UnimplementedMsgServer) VoteInbound(context.Context, *MsgVoteInbound) (*MsgVoteInboundResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method VoteInbound not implemented") } +func (UnimplementedMsgServer) VoteOutbound(context.Context, *MsgVoteOutbound) (*MsgVoteOutboundResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method VoteOutbound not implemented") +} func (UnimplementedMsgServer) VoteGasPrice(context.Context, *MsgVoteGasPrice) (*MsgVoteGasPriceResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method VoteGasPrice not implemented") } @@ -255,6 +272,24 @@ func _Msg_VoteInbound_Handler(srv interface{}, ctx context.Context, dec func(int return interceptor(ctx, in, info, handler) } +func _Msg_VoteOutbound_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgVoteOutbound) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).VoteOutbound(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_VoteOutbound_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).VoteOutbound(ctx, req.(*MsgVoteOutbound)) + } + return interceptor(ctx, in, info, handler) +} + func _Msg_VoteGasPrice_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgVoteGasPrice) if err := dec(in); err != nil { @@ -300,6 +335,10 @@ var Msg_ServiceDesc = grpc.ServiceDesc{ MethodName: "VoteInbound", Handler: _Msg_VoteInbound_Handler, }, + { + MethodName: "VoteOutbound", + Handler: _Msg_VoteOutbound_Handler, + }, { MethodName: "VoteGasPrice", Handler: _Msg_VoteGasPrice_Handler, diff --git a/api/uexecutor/v1/types.pulsar.go b/api/uexecutor/v1/types.pulsar.go index 0eda3706..e7a212d1 100644 --- a/api/uexecutor/v1/types.pulsar.go +++ b/api/uexecutor/v1/types.pulsar.go @@ -1888,410 +1888,6 @@ func (x *fastReflection_UniversalAccountId) ProtoMethods() *protoiface.Methods { } } -var ( - md_InboundStatus protoreflect.MessageDescriptor - fd_InboundStatus_status protoreflect.FieldDescriptor -) - -func init() { - file_uexecutor_v1_types_proto_init() - md_InboundStatus = File_uexecutor_v1_types_proto.Messages().ByName("InboundStatus") - fd_InboundStatus_status = md_InboundStatus.Fields().ByName("status") -} - -var _ protoreflect.Message = (*fastReflection_InboundStatus)(nil) - -type fastReflection_InboundStatus InboundStatus - -func (x *InboundStatus) ProtoReflect() protoreflect.Message { - return (*fastReflection_InboundStatus)(x) -} - -func (x *InboundStatus) slowProtoReflect() protoreflect.Message { - mi := &file_uexecutor_v1_types_proto_msgTypes[3] - 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) -} - -var _fastReflection_InboundStatus_messageType fastReflection_InboundStatus_messageType -var _ protoreflect.MessageType = fastReflection_InboundStatus_messageType{} - -type fastReflection_InboundStatus_messageType struct{} - -func (x fastReflection_InboundStatus_messageType) Zero() protoreflect.Message { - return (*fastReflection_InboundStatus)(nil) -} -func (x fastReflection_InboundStatus_messageType) New() protoreflect.Message { - return new(fastReflection_InboundStatus) -} -func (x fastReflection_InboundStatus_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_InboundStatus -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_InboundStatus) Descriptor() protoreflect.MessageDescriptor { - return md_InboundStatus -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_InboundStatus) Type() protoreflect.MessageType { - return _fastReflection_InboundStatus_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_InboundStatus) New() protoreflect.Message { - return new(fastReflection_InboundStatus) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_InboundStatus) Interface() protoreflect.ProtoMessage { - return (*InboundStatus)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_InboundStatus) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Status != 0 { - value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.Status)) - if !f(fd_InboundStatus_status, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_InboundStatus) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "uexecutor.v1.InboundStatus.status": - return x.Status != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.InboundStatus")) - } - panic(fmt.Errorf("message uexecutor.v1.InboundStatus does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_InboundStatus) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "uexecutor.v1.InboundStatus.status": - x.Status = 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.InboundStatus")) - } - panic(fmt.Errorf("message uexecutor.v1.InboundStatus does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_InboundStatus) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "uexecutor.v1.InboundStatus.status": - value := x.Status - return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.InboundStatus")) - } - panic(fmt.Errorf("message uexecutor.v1.InboundStatus does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_InboundStatus) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "uexecutor.v1.InboundStatus.status": - x.Status = (Status)(value.Enum()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.InboundStatus")) - } - panic(fmt.Errorf("message uexecutor.v1.InboundStatus does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_InboundStatus) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "uexecutor.v1.InboundStatus.status": - panic(fmt.Errorf("field status of message uexecutor.v1.InboundStatus is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.InboundStatus")) - } - panic(fmt.Errorf("message uexecutor.v1.InboundStatus does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_InboundStatus) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "uexecutor.v1.InboundStatus.status": - return protoreflect.ValueOfEnum(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.InboundStatus")) - } - panic(fmt.Errorf("message uexecutor.v1.InboundStatus does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_InboundStatus) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in uexecutor.v1.InboundStatus", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_InboundStatus) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_InboundStatus) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_InboundStatus) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_InboundStatus) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*InboundStatus) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.Status != 0 { - n += 1 + runtime.Sov(uint64(x.Status)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*InboundStatus) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.Status != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Status)) - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*InboundStatus) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: InboundStatus: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: InboundStatus: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - x.Status = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Status |= Status(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - var ( md_Inbound protoreflect.MessageDescriptor fd_Inbound_source_chain protoreflect.FieldDescriptor @@ -2330,7 +1926,7 @@ func (x *Inbound) ProtoReflect() protoreflect.Message { } func (x *Inbound) slowProtoReflect() protoreflect.Message { - mi := &file_uexecutor_v1_types_proto_msgTypes[4] + mi := &file_uexecutor_v1_types_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3317,7 +2913,7 @@ func (x *PCTx) ProtoReflect() protoreflect.Message { } func (x *PCTx) slowProtoReflect() protoreflect.Message { - mi := &file_uexecutor_v1_types_proto_msgTypes[5] + mi := &file_uexecutor_v1_types_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3996,17 +3592,15 @@ func (x *fastReflection_PCTx) ProtoMethods() *protoiface.Methods { } var ( - md_OutboundObservation protoreflect.MessageDescriptor - fd_OutboundObservation_destination_chain protoreflect.FieldDescriptor - fd_OutboundObservation_success protoreflect.FieldDescriptor - fd_OutboundObservation_block_height protoreflect.FieldDescriptor - fd_OutboundObservation_tx_hash protoreflect.FieldDescriptor + md_OutboundObservation protoreflect.MessageDescriptor + fd_OutboundObservation_success protoreflect.FieldDescriptor + fd_OutboundObservation_block_height protoreflect.FieldDescriptor + fd_OutboundObservation_tx_hash protoreflect.FieldDescriptor ) func init() { file_uexecutor_v1_types_proto_init() md_OutboundObservation = File_uexecutor_v1_types_proto.Messages().ByName("OutboundObservation") - fd_OutboundObservation_destination_chain = md_OutboundObservation.Fields().ByName("destination_chain") fd_OutboundObservation_success = md_OutboundObservation.Fields().ByName("success") fd_OutboundObservation_block_height = md_OutboundObservation.Fields().ByName("block_height") fd_OutboundObservation_tx_hash = md_OutboundObservation.Fields().ByName("tx_hash") @@ -4021,7 +3615,7 @@ func (x *OutboundObservation) ProtoReflect() protoreflect.Message { } func (x *OutboundObservation) slowProtoReflect() protoreflect.Message { - mi := &file_uexecutor_v1_types_proto_msgTypes[6] + mi := &file_uexecutor_v1_types_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4077,12 +3671,6 @@ func (x *fastReflection_OutboundObservation) Interface() protoreflect.ProtoMessa // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_OutboundObservation) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.DestinationChain != "" { - value := protoreflect.ValueOfString(x.DestinationChain) - if !f(fd_OutboundObservation_destination_chain, value) { - return - } - } if x.Success != false { value := protoreflect.ValueOfBool(x.Success) if !f(fd_OutboundObservation_success, value) { @@ -4116,8 +3704,6 @@ func (x *fastReflection_OutboundObservation) Range(f func(protoreflect.FieldDesc // a repeated field is populated if it is non-empty. func (x *fastReflection_OutboundObservation) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "uexecutor.v1.OutboundObservation.destination_chain": - return x.DestinationChain != "" case "uexecutor.v1.OutboundObservation.success": return x.Success != false case "uexecutor.v1.OutboundObservation.block_height": @@ -4140,8 +3726,6 @@ func (x *fastReflection_OutboundObservation) Has(fd protoreflect.FieldDescriptor // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_OutboundObservation) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "uexecutor.v1.OutboundObservation.destination_chain": - x.DestinationChain = "" case "uexecutor.v1.OutboundObservation.success": x.Success = false case "uexecutor.v1.OutboundObservation.block_height": @@ -4164,9 +3748,6 @@ func (x *fastReflection_OutboundObservation) Clear(fd protoreflect.FieldDescript // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_OutboundObservation) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "uexecutor.v1.OutboundObservation.destination_chain": - value := x.DestinationChain - return protoreflect.ValueOfString(value) case "uexecutor.v1.OutboundObservation.success": value := x.Success return protoreflect.ValueOfBool(value) @@ -4196,8 +3777,6 @@ func (x *fastReflection_OutboundObservation) Get(descriptor protoreflect.FieldDe // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_OutboundObservation) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "uexecutor.v1.OutboundObservation.destination_chain": - x.DestinationChain = value.Interface().(string) case "uexecutor.v1.OutboundObservation.success": x.Success = value.Bool() case "uexecutor.v1.OutboundObservation.block_height": @@ -4224,8 +3803,6 @@ func (x *fastReflection_OutboundObservation) Set(fd protoreflect.FieldDescriptor // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_OutboundObservation) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "uexecutor.v1.OutboundObservation.destination_chain": - panic(fmt.Errorf("field destination_chain of message uexecutor.v1.OutboundObservation is not mutable")) case "uexecutor.v1.OutboundObservation.success": panic(fmt.Errorf("field success of message uexecutor.v1.OutboundObservation is not mutable")) case "uexecutor.v1.OutboundObservation.block_height": @@ -4245,8 +3822,6 @@ func (x *fastReflection_OutboundObservation) Mutable(fd protoreflect.FieldDescri // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_OutboundObservation) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "uexecutor.v1.OutboundObservation.destination_chain": - return protoreflect.ValueOfString("") case "uexecutor.v1.OutboundObservation.success": return protoreflect.ValueOfBool(false) case "uexecutor.v1.OutboundObservation.block_height": @@ -4322,10 +3897,6 @@ func (x *fastReflection_OutboundObservation) ProtoMethods() *protoiface.Methods var n int var l int _ = l - l = len(x.DestinationChain) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } if x.Success { n += 2 } @@ -4370,12 +3941,12 @@ func (x *fastReflection_OutboundObservation) ProtoMethods() *protoiface.Methods copy(dAtA[i:], x.TxHash) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.TxHash))) i-- - dAtA[i] = 0x22 + dAtA[i] = 0x1a } if x.BlockHeight != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.BlockHeight)) i-- - dAtA[i] = 0x18 + dAtA[i] = 0x10 } if x.Success { i-- @@ -4385,14 +3956,7 @@ func (x *fastReflection_OutboundObservation) ProtoMethods() *protoiface.Methods dAtA[i] = 0 } i-- - dAtA[i] = 0x10 - } - if len(x.DestinationChain) > 0 { - i -= len(x.DestinationChain) - copy(dAtA[i:], x.DestinationChain) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DestinationChain))) - i-- - dAtA[i] = 0xa + dAtA[i] = 0x8 } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) @@ -4444,38 +4008,6 @@ func (x *fastReflection_OutboundObservation) ProtoMethods() *protoiface.Methods } switch fieldNum { case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DestinationChain", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.DestinationChain = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Success", wireType) } @@ -4495,7 +4027,7 @@ func (x *fastReflection_OutboundObservation) ProtoMethods() *protoiface.Methods } } x.Success = bool(v != 0) - case 3: + case 2: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BlockHeight", wireType) } @@ -4514,7 +4046,7 @@ func (x *fastReflection_OutboundObservation) ProtoMethods() *protoiface.Methods break } } - case 4: + case 3: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TxHash", wireType) } @@ -4603,7 +4135,7 @@ func (x *Originating_Pc_TX) ProtoReflect() protoreflect.Message { } func (x *Originating_Pc_TX) slowProtoReflect() protoreflect.Message { - mi := &file_uexecutor_v1_types_proto_msgTypes[7] + mi := &file_uexecutor_v1_types_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5078,6 +4610,7 @@ var ( fd_OutboundTx_pc_tx protoreflect.FieldDescriptor fd_OutboundTx_observed_tx protoreflect.FieldDescriptor fd_OutboundTx_index protoreflect.FieldDescriptor + fd_OutboundTx_outbound_status protoreflect.FieldDescriptor ) func init() { @@ -5094,6 +4627,7 @@ func init() { fd_OutboundTx_pc_tx = md_OutboundTx.Fields().ByName("pc_tx") fd_OutboundTx_observed_tx = md_OutboundTx.Fields().ByName("observed_tx") fd_OutboundTx_index = md_OutboundTx.Fields().ByName("index") + fd_OutboundTx_outbound_status = md_OutboundTx.Fields().ByName("outbound_status") } var _ protoreflect.Message = (*fastReflection_OutboundTx)(nil) @@ -5105,7 +4639,7 @@ func (x *OutboundTx) ProtoReflect() protoreflect.Message { } func (x *OutboundTx) slowProtoReflect() protoreflect.Message { - mi := &file_uexecutor_v1_types_proto_msgTypes[8] + mi := &file_uexecutor_v1_types_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5227,6 +4761,12 @@ func (x *fastReflection_OutboundTx) Range(f func(protoreflect.FieldDescriptor, p return } } + if x.OutboundStatus != 0 { + value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.OutboundStatus)) + if !f(fd_OutboundTx_outbound_status, value) { + return + } + } } // Has reports whether a field is populated. @@ -5264,6 +4804,8 @@ func (x *fastReflection_OutboundTx) Has(fd protoreflect.FieldDescriptor) bool { return x.ObservedTx != nil case "uexecutor.v1.OutboundTx.index": return x.Index != "" + case "uexecutor.v1.OutboundTx.outbound_status": + return x.OutboundStatus != 0 default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.OutboundTx")) @@ -5302,6 +4844,8 @@ func (x *fastReflection_OutboundTx) Clear(fd protoreflect.FieldDescriptor) { x.ObservedTx = nil case "uexecutor.v1.OutboundTx.index": x.Index = "" + case "uexecutor.v1.OutboundTx.outbound_status": + x.OutboundStatus = 0 default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.OutboundTx")) @@ -5351,6 +4895,9 @@ func (x *fastReflection_OutboundTx) Get(descriptor protoreflect.FieldDescriptor) case "uexecutor.v1.OutboundTx.index": value := x.Index return protoreflect.ValueOfString(value) + case "uexecutor.v1.OutboundTx.outbound_status": + value := x.OutboundStatus + return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.OutboundTx")) @@ -5393,6 +4940,8 @@ func (x *fastReflection_OutboundTx) Set(fd protoreflect.FieldDescriptor, value p x.ObservedTx = value.Message().Interface().(*OutboundObservation) case "uexecutor.v1.OutboundTx.index": x.Index = value.Interface().(string) + case "uexecutor.v1.OutboundTx.outbound_status": + x.OutboundStatus = (Status)(value.Enum()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.OutboundTx")) @@ -5441,6 +4990,8 @@ func (x *fastReflection_OutboundTx) Mutable(fd protoreflect.FieldDescriptor) pro panic(fmt.Errorf("field tx_type of message uexecutor.v1.OutboundTx is not mutable")) case "uexecutor.v1.OutboundTx.index": panic(fmt.Errorf("field index of message uexecutor.v1.OutboundTx is not mutable")) + case "uexecutor.v1.OutboundTx.outbound_status": + panic(fmt.Errorf("field outbound_status of message uexecutor.v1.OutboundTx is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.OutboundTx")) @@ -5478,6 +5029,8 @@ func (x *fastReflection_OutboundTx) NewField(fd protoreflect.FieldDescriptor) pr return protoreflect.ValueOfMessage(m.ProtoReflect()) case "uexecutor.v1.OutboundTx.index": return protoreflect.ValueOfString("") + case "uexecutor.v1.OutboundTx.outbound_status": + return protoreflect.ValueOfEnum(0) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.OutboundTx")) @@ -5590,6 +5143,9 @@ func (x *fastReflection_OutboundTx) ProtoMethods() *protoiface.Methods { if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } + if x.OutboundStatus != 0 { + n += 1 + runtime.Sov(uint64(x.OutboundStatus)) + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -5619,6 +5175,11 @@ func (x *fastReflection_OutboundTx) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } + if x.OutboundStatus != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.OutboundStatus)) + i-- + dAtA[i] = 0x60 + } if len(x.Index) > 0 { i -= len(x.Index) copy(dAtA[i:], x.Index) @@ -6104,6 +5665,25 @@ func (x *fastReflection_OutboundTx) ProtoMethods() *protoiface.Methods { } x.Index = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 12: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field OutboundStatus", wireType) + } + x.OutboundStatus = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.OutboundStatus |= Status(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -6269,7 +5849,7 @@ func (x *UniversalTx) ProtoReflect() protoreflect.Message { } func (x *UniversalTx) slowProtoReflect() protoreflect.Message { - mi := &file_uexecutor_v1_types_proto_msgTypes[9] + mi := &file_uexecutor_v1_types_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7097,7 +6677,7 @@ type Status int32 const ( Status_UNSPECIFIED Status = 0 Status_PENDING Status = 1 - Status_FINALIZED Status = 2 + Status_OBSERVED Status = 2 ) // Enum value maps for Status. @@ -7105,12 +6685,12 @@ var ( Status_name = map[int32]string{ 0: "UNSPECIFIED", 1: "PENDING", - 2: "FINALIZED", + 2: "OBSERVED", } Status_value = map[string]int32{ "UNSPECIFIED": 0, "PENDING": 1, - "FINALIZED": 2, + "OBSERVED": 2, } ) @@ -7387,41 +6967,6 @@ func (x *UniversalAccountId) GetOwner() string { return "" } -type InboundStatus struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Status Status `protobuf:"varint,1,opt,name=status,proto3,enum=uexecutor.v1.Status" json:"status,omitempty"` -} - -func (x *InboundStatus) Reset() { - *x = InboundStatus{} - if protoimpl.UnsafeEnabled { - mi := &file_uexecutor_v1_types_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *InboundStatus) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*InboundStatus) ProtoMessage() {} - -// Deprecated: Use InboundStatus.ProtoReflect.Descriptor instead. -func (*InboundStatus) Descriptor() ([]byte, []int) { - return file_uexecutor_v1_types_proto_rawDescGZIP(), []int{3} -} - -func (x *InboundStatus) GetStatus() Status { - if x != nil { - return x.Status - } - return Status_UNSPECIFIED -} - type Inbound struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -7442,7 +6987,7 @@ type Inbound struct { func (x *Inbound) Reset() { *x = Inbound{} if protoimpl.UnsafeEnabled { - mi := &file_uexecutor_v1_types_proto_msgTypes[4] + mi := &file_uexecutor_v1_types_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7456,7 +7001,7 @@ func (*Inbound) ProtoMessage() {} // Deprecated: Use Inbound.ProtoReflect.Descriptor instead. func (*Inbound) Descriptor() ([]byte, []int) { - return file_uexecutor_v1_types_proto_rawDescGZIP(), []int{4} + return file_uexecutor_v1_types_proto_rawDescGZIP(), []int{3} } func (x *Inbound) GetSourceChain() string { @@ -7545,7 +7090,7 @@ type PCTx struct { func (x *PCTx) Reset() { *x = PCTx{} if protoimpl.UnsafeEnabled { - mi := &file_uexecutor_v1_types_proto_msgTypes[5] + mi := &file_uexecutor_v1_types_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7559,7 +7104,7 @@ func (*PCTx) ProtoMessage() {} // Deprecated: Use PCTx.ProtoReflect.Descriptor instead. func (*PCTx) Descriptor() ([]byte, []int) { - return file_uexecutor_v1_types_proto_rawDescGZIP(), []int{5} + return file_uexecutor_v1_types_proto_rawDescGZIP(), []int{4} } func (x *PCTx) GetTxHash() string { @@ -7609,16 +7154,15 @@ type OutboundObservation struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - DestinationChain string `protobuf:"bytes,1,opt,name=destination_chain,json=destinationChain,proto3" json:"destination_chain,omitempty"` // chain where the tx was executed - Success bool `protobuf:"varint,2,opt,name=success,proto3" json:"success,omitempty"` // whether execution succeeded - BlockHeight uint64 `protobuf:"varint,3,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` // block height on external chain - TxHash string `protobuf:"bytes,4,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` // external chain tx hash + Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` // whether execution succeeded + BlockHeight uint64 `protobuf:"varint,2,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` // block height on external chain + TxHash string `protobuf:"bytes,3,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` // external chain tx hash } func (x *OutboundObservation) Reset() { *x = OutboundObservation{} if protoimpl.UnsafeEnabled { - mi := &file_uexecutor_v1_types_proto_msgTypes[6] + mi := &file_uexecutor_v1_types_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7632,14 +7176,7 @@ func (*OutboundObservation) ProtoMessage() {} // Deprecated: Use OutboundObservation.ProtoReflect.Descriptor instead. func (*OutboundObservation) Descriptor() ([]byte, []int) { - return file_uexecutor_v1_types_proto_rawDescGZIP(), []int{6} -} - -func (x *OutboundObservation) GetDestinationChain() string { - if x != nil { - return x.DestinationChain - } - return "" + return file_uexecutor_v1_types_proto_rawDescGZIP(), []int{5} } func (x *OutboundObservation) GetSuccess() bool { @@ -7675,7 +7212,7 @@ type Originating_Pc_TX struct { func (x *Originating_Pc_TX) Reset() { *x = Originating_Pc_TX{} if protoimpl.UnsafeEnabled { - mi := &file_uexecutor_v1_types_proto_msgTypes[7] + mi := &file_uexecutor_v1_types_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7689,7 +7226,7 @@ func (*Originating_Pc_TX) ProtoMessage() {} // Deprecated: Use Originating_Pc_TX.ProtoReflect.Descriptor instead. func (*Originating_Pc_TX) Descriptor() ([]byte, []int) { - return file_uexecutor_v1_types_proto_rawDescGZIP(), []int{7} + return file_uexecutor_v1_types_proto_rawDescGZIP(), []int{6} } func (x *Originating_Pc_TX) GetTxHash() string { @@ -7711,23 +7248,24 @@ type OutboundTx struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - DestinationChain string `protobuf:"bytes,1,opt,name=destination_chain,json=destinationChain,proto3" json:"destination_chain,omitempty"` // chain where this outbound is sent - Recipient string `protobuf:"bytes,2,opt,name=recipient,proto3" json:"recipient,omitempty"` // recipient on destination chain - Amount string `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount,omitempty"` // token amount - AssetAddr string `protobuf:"bytes,4,opt,name=asset_addr,json=assetAddr,proto3" json:"asset_addr,omitempty"` // token contract if applicable - Sender string `protobuf:"bytes,5,opt,name=sender,proto3" json:"sender,omitempty"` // sender of the outbound tx - Payload string `protobuf:"bytes,6,opt,name=payload,proto3" json:"payload,omitempty"` // payload to be executed - GasLimit string `protobuf:"bytes,7,opt,name=gas_limit,json=gasLimit,proto3" json:"gas_limit,omitempty"` // gas limit to be used for the outbound tx - TxType TxType `protobuf:"varint,8,opt,name=tx_type,json=txType,proto3,enum=uexecutor.v1.TxType" json:"tx_type,omitempty"` // outbound tx type - PcTx *Originating_Pc_TX `protobuf:"bytes,9,opt,name=pc_tx,json=pcTx,proto3" json:"pc_tx,omitempty"` // pc_tx that originated the outbound - ObservedTx *OutboundObservation `protobuf:"bytes,10,opt,name=observed_tx,json=observedTx,proto3" json:"observed_tx,omitempty"` // observed tx on destination chain - Index string `protobuf:"bytes,11,opt,name=index,proto3" json:"index,omitempty"` // index of outbound tx + DestinationChain string `protobuf:"bytes,1,opt,name=destination_chain,json=destinationChain,proto3" json:"destination_chain,omitempty"` // chain where this outbound is sent + Recipient string `protobuf:"bytes,2,opt,name=recipient,proto3" json:"recipient,omitempty"` // recipient on destination chain + Amount string `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount,omitempty"` // token amount + AssetAddr string `protobuf:"bytes,4,opt,name=asset_addr,json=assetAddr,proto3" json:"asset_addr,omitempty"` // token contract if applicable + Sender string `protobuf:"bytes,5,opt,name=sender,proto3" json:"sender,omitempty"` // sender of the outbound tx + Payload string `protobuf:"bytes,6,opt,name=payload,proto3" json:"payload,omitempty"` // payload to be executed + GasLimit string `protobuf:"bytes,7,opt,name=gas_limit,json=gasLimit,proto3" json:"gas_limit,omitempty"` // gas limit to be used for the outbound tx + TxType TxType `protobuf:"varint,8,opt,name=tx_type,json=txType,proto3,enum=uexecutor.v1.TxType" json:"tx_type,omitempty"` // outbound tx type + PcTx *Originating_Pc_TX `protobuf:"bytes,9,opt,name=pc_tx,json=pcTx,proto3" json:"pc_tx,omitempty"` // pc_tx that originated the outbound + ObservedTx *OutboundObservation `protobuf:"bytes,10,opt,name=observed_tx,json=observedTx,proto3" json:"observed_tx,omitempty"` // observed tx on destination chain + Index string `protobuf:"bytes,11,opt,name=index,proto3" json:"index,omitempty"` // index of outbound tx + OutboundStatus Status `protobuf:"varint,12,opt,name=outbound_status,json=outboundStatus,proto3,enum=uexecutor.v1.Status" json:"outbound_status,omitempty"` // status of outbound tx } func (x *OutboundTx) Reset() { *x = OutboundTx{} if protoimpl.UnsafeEnabled { - mi := &file_uexecutor_v1_types_proto_msgTypes[8] + mi := &file_uexecutor_v1_types_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7741,7 +7279,7 @@ func (*OutboundTx) ProtoMessage() {} // Deprecated: Use OutboundTx.ProtoReflect.Descriptor instead. func (*OutboundTx) Descriptor() ([]byte, []int) { - return file_uexecutor_v1_types_proto_rawDescGZIP(), []int{8} + return file_uexecutor_v1_types_proto_rawDescGZIP(), []int{7} } func (x *OutboundTx) GetDestinationChain() string { @@ -7821,6 +7359,13 @@ func (x *OutboundTx) GetIndex() string { return "" } +func (x *OutboundTx) GetOutboundStatus() Status { + if x != nil { + return x.OutboundStatus + } + return Status_UNSPECIFIED +} + type UniversalTx struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -7836,7 +7381,7 @@ type UniversalTx struct { func (x *UniversalTx) Reset() { *x = UniversalTx{} if protoimpl.UnsafeEnabled { - mi := &file_uexecutor_v1_types_proto_msgTypes[9] + mi := &file_uexecutor_v1_types_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7850,7 +7395,7 @@ func (*UniversalTx) ProtoMessage() {} // Deprecated: Use UniversalTx.ProtoReflect.Descriptor instead. func (*UniversalTx) Descriptor() ([]byte, []int) { - return file_uexecutor_v1_types_proto_rawDescGZIP(), []int{9} + return file_uexecutor_v1_types_proto_rawDescGZIP(), []int{8} } func (x *UniversalTx) GetId() string { @@ -7932,158 +7477,155 @@ var file_uexecutor_v1_types_proto_rawDesc = []byte{ 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x3a, 0x28, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x1b, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2f, 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x22, 0x3d, 0x0a, 0x0d, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x53, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x12, 0x2c, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, - 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x22, 0x98, 0x03, 0x0a, 0x07, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x21, 0x0a, - 0x0c, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x68, 0x61, 0x69, 0x6e, - 0x12, 0x17, 0x0a, 0x07, 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x06, 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6e, - 0x64, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, - 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x12, - 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x73, 0x73, 0x65, 0x74, - 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x73, 0x73, - 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x6f, 0x67, 0x5f, 0x69, 0x6e, - 0x64, 0x65, 0x78, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x6f, 0x67, 0x49, 0x6e, - 0x64, 0x65, 0x78, 0x12, 0x2d, 0x0a, 0x07, 0x74, 0x78, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x08, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, - 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x78, 0x54, 0x79, 0x70, 0x65, 0x52, 0x06, 0x74, 0x78, 0x54, 0x79, - 0x70, 0x65, 0x12, 0x4b, 0x0a, 0x11, 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x5f, - 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, - 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x69, - 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x10, 0x75, - 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, - 0x2b, 0x0a, 0x11, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x64, 0x61, 0x74, 0x61, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x76, 0x65, 0x72, 0x69, - 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x3a, 0x1e, 0x98, 0xa0, - 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x11, 0x75, 0x65, 0x78, 0x65, 0x63, - 0x75, 0x74, 0x6f, 0x72, 0x2f, 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x22, 0xc8, 0x01, 0x0a, - 0x04, 0x50, 0x43, 0x54, 0x78, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, 0x12, 0x16, - 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, - 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x61, 0x73, 0x5f, 0x75, 0x73, - 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x67, 0x61, 0x73, 0x55, 0x73, 0x65, - 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, - 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, - 0x69, 0x67, 0x68, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1b, 0x0a, 0x09, - 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6d, 0x73, 0x67, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x08, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x73, 0x67, 0x3a, 0x1c, 0x98, 0xa0, 0x1f, 0x00, 0xe8, - 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x0f, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, - 0x72, 0x2f, 0x70, 0x63, 0x5f, 0x74, 0x78, 0x22, 0xc1, 0x01, 0x0a, 0x13, 0x4f, 0x75, 0x74, 0x62, - 0x6f, 0x75, 0x6e, 0x64, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x6e, 0x74, 0x22, 0x98, 0x03, 0x0a, 0x07, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x21, + 0x0a, 0x0c, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x68, 0x61, 0x69, + 0x6e, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x06, 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, + 0x6e, 0x64, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, + 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, + 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x73, 0x73, 0x65, + 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x73, + 0x73, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x6f, 0x67, 0x5f, 0x69, + 0x6e, 0x64, 0x65, 0x78, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x6f, 0x67, 0x49, + 0x6e, 0x64, 0x65, 0x78, 0x12, 0x2d, 0x0a, 0x07, 0x74, 0x78, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, + 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, + 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x78, 0x54, 0x79, 0x70, 0x65, 0x52, 0x06, 0x74, 0x78, 0x54, + 0x79, 0x70, 0x65, 0x12, 0x4b, 0x0a, 0x11, 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, + 0x5f, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, + 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6e, + 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x10, + 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, + 0x12, 0x2b, 0x0a, 0x11, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x76, 0x65, 0x72, + 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x3a, 0x1e, 0x98, + 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x11, 0x75, 0x65, 0x78, 0x65, + 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2f, 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x22, 0xc8, 0x01, + 0x0a, 0x04, 0x50, 0x43, 0x54, 0x78, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, + 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, 0x12, + 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x61, 0x73, 0x5f, 0x75, + 0x73, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x67, 0x61, 0x73, 0x55, 0x73, + 0x65, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x65, 0x69, 0x67, + 0x68, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, + 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1b, 0x0a, + 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6d, 0x73, 0x67, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x73, 0x67, 0x3a, 0x1c, 0x98, 0xa0, 0x1f, 0x00, + 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x0f, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x6f, 0x72, 0x2f, 0x70, 0x63, 0x5f, 0x74, 0x78, 0x22, 0x94, 0x01, 0x0a, 0x13, 0x4f, 0x75, 0x74, + 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, + 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x17, 0x0a, + 0x07, 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, 0x3a, 0x27, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, + 0x1e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2f, 0x6f, 0x75, 0x74, 0x62, 0x6f, + 0x75, 0x6e, 0x64, 0x5f, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, + 0x6f, 0x0a, 0x11, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x50, + 0x63, 0x5f, 0x54, 0x58, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, 0x12, 0x1b, 0x0a, + 0x09, 0x6c, 0x6f, 0x67, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x6c, 0x6f, 0x67, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x3a, 0x24, 0xe8, 0xa0, 0x1f, 0x01, + 0x8a, 0xe7, 0xb0, 0x2a, 0x1b, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2f, 0x6f, + 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x63, 0x5f, 0x74, 0x78, + 0x22, 0xff, 0x03, 0x0a, 0x0a, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x54, 0x78, 0x12, 0x2b, 0x0a, 0x11, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x64, 0x65, 0x73, 0x74, - 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x18, 0x0a, 0x07, - 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, - 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, - 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, - 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x78, 0x5f, - 0x68, 0x61, 0x73, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x78, 0x48, 0x61, - 0x73, 0x68, 0x3a, 0x27, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x1e, 0x75, 0x65, 0x78, + 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x1c, 0x0a, 0x09, + 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, + 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, + 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x73, 0x73, 0x65, 0x74, 0x41, 0x64, 0x64, + 0x72, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, + 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, + 0x6f, 0x61, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x67, 0x61, 0x73, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x67, 0x61, 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, + 0x12, 0x2d, 0x0a, 0x07, 0x74, 0x78, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x14, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, + 0x2e, 0x54, 0x78, 0x54, 0x79, 0x70, 0x65, 0x52, 0x06, 0x74, 0x78, 0x54, 0x79, 0x70, 0x65, 0x12, + 0x34, 0x0a, 0x05, 0x70, 0x63, 0x5f, 0x74, 0x78, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, + 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x72, + 0x69, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x50, 0x63, 0x5f, 0x54, 0x58, 0x52, + 0x04, 0x70, 0x63, 0x54, 0x78, 0x12, 0x42, 0x0a, 0x0b, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, + 0x64, 0x5f, 0x74, 0x78, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x75, 0x65, 0x78, + 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, + 0x6e, 0x64, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x6f, + 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x54, 0x78, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, + 0x65, 0x78, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, + 0x3d, 0x0a, 0x0f, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, + 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0e, + 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x3a, 0x22, + 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x15, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2f, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, - 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x6f, 0x0a, 0x11, 0x4f, - 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x50, 0x63, 0x5f, 0x54, 0x58, - 0x12, 0x17, 0x0a, 0x07, 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x06, 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x6f, 0x67, - 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x6f, - 0x67, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x3a, 0x24, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, - 0x1b, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2f, 0x6f, 0x72, 0x69, 0x67, 0x69, - 0x6e, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x63, 0x5f, 0x74, 0x78, 0x22, 0xc0, 0x03, 0x0a, - 0x0a, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x54, 0x78, 0x12, 0x2b, 0x0a, 0x11, 0x64, - 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x63, 0x69, - 0x70, 0x69, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x63, - 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1d, - 0x0a, 0x0a, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x09, 0x61, 0x73, 0x73, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x12, 0x16, 0x0a, - 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, - 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, - 0x1b, 0x0a, 0x09, 0x67, 0x61, 0x73, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x07, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x08, 0x67, 0x61, 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x2d, 0x0a, 0x07, - 0x74, 0x78, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, - 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x78, 0x54, - 0x79, 0x70, 0x65, 0x52, 0x06, 0x74, 0x78, 0x54, 0x79, 0x70, 0x65, 0x12, 0x34, 0x0a, 0x05, 0x70, - 0x63, 0x5f, 0x74, 0x78, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x75, 0x65, 0x78, - 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, - 0x61, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x50, 0x63, 0x5f, 0x54, 0x58, 0x52, 0x04, 0x70, 0x63, 0x54, - 0x78, 0x12, 0x42, 0x0a, 0x0b, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, 0x74, 0x78, - 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, - 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x4f, 0x62, - 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x6f, 0x62, 0x73, 0x65, 0x72, - 0x76, 0x65, 0x64, 0x54, 0x78, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x0b, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x3a, 0x22, 0x98, 0xa0, 0x1f, - 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x15, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, - 0x74, 0x6f, 0x72, 0x2f, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x74, 0x78, 0x22, - 0xa8, 0x02, 0x0a, 0x0b, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x54, 0x78, 0x12, - 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, - 0x34, 0x0a, 0x0a, 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x74, 0x78, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, - 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x09, 0x69, 0x6e, 0x62, 0x6f, - 0x75, 0x6e, 0x64, 0x54, 0x78, 0x12, 0x27, 0x0a, 0x05, 0x70, 0x63, 0x5f, 0x74, 0x78, 0x18, 0x03, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, - 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x43, 0x54, 0x78, 0x52, 0x04, 0x70, 0x63, 0x54, 0x78, 0x12, 0x39, - 0x0a, 0x0b, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x74, 0x78, 0x18, 0x04, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, - 0x76, 0x31, 0x2e, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x54, 0x78, 0x52, 0x0a, 0x6f, - 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x54, 0x78, 0x12, 0x4a, 0x0a, 0x10, 0x75, 0x6e, 0x69, - 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, - 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x54, 0x78, 0x53, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x52, 0x0f, 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x3a, 0x23, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, - 0xe7, 0xb0, 0x2a, 0x16, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2f, 0x75, 0x6e, - 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x5f, 0x74, 0x78, 0x2a, 0x47, 0x0a, 0x10, 0x56, 0x65, - 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, - 0x0a, 0x12, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x10, 0x00, 0x12, 0x1b, 0x0a, 0x17, 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, - 0x73, 0x61, 0x6c, 0x54, 0x78, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x10, 0x01, 0x2a, 0x83, 0x02, 0x0a, 0x11, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, - 0x6c, 0x54, 0x78, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x23, 0x0a, 0x1f, 0x55, 0x4e, 0x49, - 0x56, 0x45, 0x52, 0x53, 0x41, 0x4c, 0x5f, 0x54, 0x58, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, - 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x13, - 0x0a, 0x0f, 0x49, 0x4e, 0x42, 0x4f, 0x55, 0x4e, 0x44, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, - 0x53, 0x10, 0x01, 0x12, 0x1d, 0x0a, 0x19, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x49, - 0x4e, 0x42, 0x4f, 0x55, 0x4e, 0x44, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x49, 0x4f, 0x4e, - 0x10, 0x02, 0x12, 0x17, 0x0a, 0x13, 0x50, 0x43, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x45, - 0x44, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x03, 0x12, 0x16, 0x0a, 0x12, 0x50, - 0x43, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x45, 0x44, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, - 0x44, 0x10, 0x04, 0x12, 0x15, 0x0a, 0x11, 0x50, 0x43, 0x5f, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, - 0x47, 0x5f, 0x52, 0x45, 0x56, 0x45, 0x52, 0x54, 0x10, 0x05, 0x12, 0x14, 0x0a, 0x10, 0x4f, 0x55, - 0x54, 0x42, 0x4f, 0x55, 0x4e, 0x44, 0x5f, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x06, - 0x12, 0x14, 0x0a, 0x10, 0x4f, 0x55, 0x54, 0x42, 0x4f, 0x55, 0x4e, 0x44, 0x5f, 0x53, 0x55, 0x43, - 0x43, 0x45, 0x53, 0x53, 0x10, 0x07, 0x12, 0x13, 0x0a, 0x0f, 0x4f, 0x55, 0x54, 0x42, 0x4f, 0x55, - 0x4e, 0x44, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x08, 0x12, 0x0c, 0x0a, 0x08, 0x43, - 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x45, 0x44, 0x10, 0x09, 0x2a, 0x35, 0x0a, 0x06, 0x53, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x12, 0x0f, 0x0a, 0x0b, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, - 0x45, 0x44, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, - 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x46, 0x49, 0x4e, 0x41, 0x4c, 0x49, 0x5a, 0x45, 0x44, 0x10, 0x02, - 0x2a, 0x69, 0x0a, 0x06, 0x54, 0x78, 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x0e, 0x55, 0x4e, - 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x5f, 0x54, 0x58, 0x10, 0x00, 0x12, 0x07, - 0x0a, 0x03, 0x47, 0x41, 0x53, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x46, 0x55, 0x4e, 0x44, 0x53, - 0x10, 0x02, 0x12, 0x15, 0x0a, 0x11, 0x46, 0x55, 0x4e, 0x44, 0x53, 0x5f, 0x41, 0x4e, 0x44, 0x5f, - 0x50, 0x41, 0x59, 0x4c, 0x4f, 0x41, 0x44, 0x10, 0x03, 0x12, 0x13, 0x0a, 0x0f, 0x47, 0x41, 0x53, - 0x5f, 0x41, 0x4e, 0x44, 0x5f, 0x50, 0x41, 0x59, 0x4c, 0x4f, 0x41, 0x44, 0x10, 0x04, 0x12, 0x0b, - 0x0a, 0x07, 0x50, 0x41, 0x59, 0x4c, 0x4f, 0x41, 0x44, 0x10, 0x05, 0x42, 0xb2, 0x01, 0x0a, 0x10, - 0x63, 0x6f, 0x6d, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, - 0x42, 0x0a, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x41, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x63, - 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x2d, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2d, - 0x6e, 0x6f, 0x64, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, - 0x6f, 0x72, 0x2f, 0x76, 0x31, 0x3b, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x76, - 0x31, 0xa2, 0x02, 0x03, 0x55, 0x58, 0x58, 0xaa, 0x02, 0x0c, 0x55, 0x65, 0x78, 0x65, 0x63, 0x75, - 0x74, 0x6f, 0x72, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0c, 0x55, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, - 0x6f, 0x72, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x18, 0x55, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, - 0x72, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0xea, 0x02, 0x0d, 0x55, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x3a, 0x3a, 0x56, 0x31, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x74, 0x78, 0x22, 0xa8, 0x02, 0x0a, 0x0b, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, + 0x54, 0x78, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, + 0x69, 0x64, 0x12, 0x34, 0x0a, 0x0a, 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x74, 0x78, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x09, 0x69, + 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x54, 0x78, 0x12, 0x27, 0x0a, 0x05, 0x70, 0x63, 0x5f, 0x74, + 0x78, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, + 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x43, 0x54, 0x78, 0x52, 0x04, 0x70, 0x63, 0x54, + 0x78, 0x12, 0x39, 0x0a, 0x0b, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x74, 0x78, + 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x54, 0x78, + 0x52, 0x0a, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x54, 0x78, 0x12, 0x4a, 0x0a, 0x10, + 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x54, + 0x78, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0f, 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, + 0x61, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x3a, 0x23, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, + 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x16, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, + 0x2f, 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x5f, 0x74, 0x78, 0x2a, 0x47, 0x0a, + 0x10, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x16, 0x0a, 0x12, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x56, 0x65, 0x72, 0x69, 0x66, + 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x10, 0x00, 0x12, 0x1b, 0x0a, 0x17, 0x75, 0x6e, 0x69, + 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x54, 0x78, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x10, 0x01, 0x2a, 0x83, 0x02, 0x0a, 0x11, 0x55, 0x6e, 0x69, 0x76, 0x65, + 0x72, 0x73, 0x61, 0x6c, 0x54, 0x78, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x23, 0x0a, 0x1f, + 0x55, 0x4e, 0x49, 0x56, 0x45, 0x52, 0x53, 0x41, 0x4c, 0x5f, 0x54, 0x58, 0x5f, 0x53, 0x54, 0x41, + 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, + 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x49, 0x4e, 0x42, 0x4f, 0x55, 0x4e, 0x44, 0x5f, 0x53, 0x55, 0x43, + 0x43, 0x45, 0x53, 0x53, 0x10, 0x01, 0x12, 0x1d, 0x0a, 0x19, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, + 0x47, 0x5f, 0x49, 0x4e, 0x42, 0x4f, 0x55, 0x4e, 0x44, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, + 0x49, 0x4f, 0x4e, 0x10, 0x02, 0x12, 0x17, 0x0a, 0x13, 0x50, 0x43, 0x5f, 0x45, 0x58, 0x45, 0x43, + 0x55, 0x54, 0x45, 0x44, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x03, 0x12, 0x16, + 0x0a, 0x12, 0x50, 0x43, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x45, 0x44, 0x5f, 0x46, 0x41, + 0x49, 0x4c, 0x45, 0x44, 0x10, 0x04, 0x12, 0x15, 0x0a, 0x11, 0x50, 0x43, 0x5f, 0x50, 0x45, 0x4e, + 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x52, 0x45, 0x56, 0x45, 0x52, 0x54, 0x10, 0x05, 0x12, 0x14, 0x0a, + 0x10, 0x4f, 0x55, 0x54, 0x42, 0x4f, 0x55, 0x4e, 0x44, 0x5f, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, + 0x47, 0x10, 0x06, 0x12, 0x14, 0x0a, 0x10, 0x4f, 0x55, 0x54, 0x42, 0x4f, 0x55, 0x4e, 0x44, 0x5f, + 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x07, 0x12, 0x13, 0x0a, 0x0f, 0x4f, 0x55, 0x54, + 0x42, 0x4f, 0x55, 0x4e, 0x44, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x08, 0x12, 0x0c, + 0x0a, 0x08, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x45, 0x44, 0x10, 0x09, 0x2a, 0x34, 0x0a, 0x06, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0f, 0x0a, 0x0b, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, + 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x45, 0x4e, 0x44, 0x49, + 0x4e, 0x47, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x4f, 0x42, 0x53, 0x45, 0x52, 0x56, 0x45, 0x44, + 0x10, 0x02, 0x2a, 0x69, 0x0a, 0x06, 0x54, 0x78, 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x0e, + 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x5f, 0x54, 0x58, 0x10, 0x00, + 0x12, 0x07, 0x0a, 0x03, 0x47, 0x41, 0x53, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x46, 0x55, 0x4e, + 0x44, 0x53, 0x10, 0x02, 0x12, 0x15, 0x0a, 0x11, 0x46, 0x55, 0x4e, 0x44, 0x53, 0x5f, 0x41, 0x4e, + 0x44, 0x5f, 0x50, 0x41, 0x59, 0x4c, 0x4f, 0x41, 0x44, 0x10, 0x03, 0x12, 0x13, 0x0a, 0x0f, 0x47, + 0x41, 0x53, 0x5f, 0x41, 0x4e, 0x44, 0x5f, 0x50, 0x41, 0x59, 0x4c, 0x4f, 0x41, 0x44, 0x10, 0x04, + 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x41, 0x59, 0x4c, 0x4f, 0x41, 0x44, 0x10, 0x05, 0x42, 0xb2, 0x01, + 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, + 0x76, 0x31, 0x42, 0x0a, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, + 0x5a, 0x41, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x75, 0x73, + 0x68, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x2d, 0x63, 0x68, 0x61, 0x69, + 0x6e, 0x2d, 0x6e, 0x6f, 0x64, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x75, 0x65, 0x78, 0x65, 0x63, + 0x75, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x31, 0x3b, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, + 0x72, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x55, 0x58, 0x58, 0xaa, 0x02, 0x0c, 0x55, 0x65, 0x78, 0x65, + 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0c, 0x55, 0x65, 0x78, 0x65, 0x63, + 0x75, 0x74, 0x6f, 0x72, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x18, 0x55, 0x65, 0x78, 0x65, 0x63, 0x75, + 0x74, 0x6f, 0x72, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0xea, 0x02, 0x0d, 0x55, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x3a, 0x3a, + 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -8099,7 +7641,7 @@ func file_uexecutor_v1_types_proto_rawDescGZIP() []byte { } var file_uexecutor_v1_types_proto_enumTypes = make([]protoimpl.EnumInfo, 4) -var file_uexecutor_v1_types_proto_msgTypes = make([]protoimpl.MessageInfo, 10) +var file_uexecutor_v1_types_proto_msgTypes = make([]protoimpl.MessageInfo, 9) var file_uexecutor_v1_types_proto_goTypes = []interface{}{ (VerificationType)(0), // 0: uexecutor.v1.VerificationType (UniversalTxStatus)(0), // 1: uexecutor.v1.UniversalTxStatus @@ -8108,25 +7650,24 @@ var file_uexecutor_v1_types_proto_goTypes = []interface{}{ (*Params)(nil), // 4: uexecutor.v1.Params (*UniversalPayload)(nil), // 5: uexecutor.v1.UniversalPayload (*UniversalAccountId)(nil), // 6: uexecutor.v1.UniversalAccountId - (*InboundStatus)(nil), // 7: uexecutor.v1.InboundStatus - (*Inbound)(nil), // 8: uexecutor.v1.Inbound - (*PCTx)(nil), // 9: uexecutor.v1.PCTx - (*OutboundObservation)(nil), // 10: uexecutor.v1.OutboundObservation - (*Originating_Pc_TX)(nil), // 11: uexecutor.v1.Originating_Pc_TX - (*OutboundTx)(nil), // 12: uexecutor.v1.OutboundTx - (*UniversalTx)(nil), // 13: uexecutor.v1.UniversalTx + (*Inbound)(nil), // 7: uexecutor.v1.Inbound + (*PCTx)(nil), // 8: uexecutor.v1.PCTx + (*OutboundObservation)(nil), // 9: uexecutor.v1.OutboundObservation + (*Originating_Pc_TX)(nil), // 10: uexecutor.v1.Originating_Pc_TX + (*OutboundTx)(nil), // 11: uexecutor.v1.OutboundTx + (*UniversalTx)(nil), // 12: uexecutor.v1.UniversalTx } var file_uexecutor_v1_types_proto_depIdxs = []int32{ 0, // 0: uexecutor.v1.UniversalPayload.v_type:type_name -> uexecutor.v1.VerificationType - 2, // 1: uexecutor.v1.InboundStatus.status:type_name -> uexecutor.v1.Status - 3, // 2: uexecutor.v1.Inbound.tx_type:type_name -> uexecutor.v1.TxType - 5, // 3: uexecutor.v1.Inbound.universal_payload:type_name -> uexecutor.v1.UniversalPayload - 3, // 4: uexecutor.v1.OutboundTx.tx_type:type_name -> uexecutor.v1.TxType - 11, // 5: uexecutor.v1.OutboundTx.pc_tx:type_name -> uexecutor.v1.Originating_Pc_TX - 10, // 6: uexecutor.v1.OutboundTx.observed_tx:type_name -> uexecutor.v1.OutboundObservation - 8, // 7: uexecutor.v1.UniversalTx.inbound_tx:type_name -> uexecutor.v1.Inbound - 9, // 8: uexecutor.v1.UniversalTx.pc_tx:type_name -> uexecutor.v1.PCTx - 12, // 9: uexecutor.v1.UniversalTx.outbound_tx:type_name -> uexecutor.v1.OutboundTx + 3, // 1: uexecutor.v1.Inbound.tx_type:type_name -> uexecutor.v1.TxType + 5, // 2: uexecutor.v1.Inbound.universal_payload:type_name -> uexecutor.v1.UniversalPayload + 3, // 3: uexecutor.v1.OutboundTx.tx_type:type_name -> uexecutor.v1.TxType + 10, // 4: uexecutor.v1.OutboundTx.pc_tx:type_name -> uexecutor.v1.Originating_Pc_TX + 9, // 5: uexecutor.v1.OutboundTx.observed_tx:type_name -> uexecutor.v1.OutboundObservation + 2, // 6: uexecutor.v1.OutboundTx.outbound_status:type_name -> uexecutor.v1.Status + 7, // 7: uexecutor.v1.UniversalTx.inbound_tx:type_name -> uexecutor.v1.Inbound + 8, // 8: uexecutor.v1.UniversalTx.pc_tx:type_name -> uexecutor.v1.PCTx + 11, // 9: uexecutor.v1.UniversalTx.outbound_tx:type_name -> uexecutor.v1.OutboundTx 1, // 10: uexecutor.v1.UniversalTx.universal_status:type_name -> uexecutor.v1.UniversalTxStatus 11, // [11:11] is the sub-list for method output_type 11, // [11:11] is the sub-list for method input_type @@ -8178,18 +7719,6 @@ func file_uexecutor_v1_types_proto_init() { } } file_uexecutor_v1_types_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*InboundStatus); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_uexecutor_v1_types_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Inbound); i { case 0: return &v.state @@ -8201,7 +7730,7 @@ func file_uexecutor_v1_types_proto_init() { return nil } } - file_uexecutor_v1_types_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_uexecutor_v1_types_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PCTx); i { case 0: return &v.state @@ -8213,7 +7742,7 @@ func file_uexecutor_v1_types_proto_init() { return nil } } - file_uexecutor_v1_types_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_uexecutor_v1_types_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*OutboundObservation); i { case 0: return &v.state @@ -8225,7 +7754,7 @@ func file_uexecutor_v1_types_proto_init() { return nil } } - file_uexecutor_v1_types_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_uexecutor_v1_types_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Originating_Pc_TX); i { case 0: return &v.state @@ -8237,7 +7766,7 @@ func file_uexecutor_v1_types_proto_init() { return nil } } - file_uexecutor_v1_types_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_uexecutor_v1_types_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*OutboundTx); i { case 0: return &v.state @@ -8249,7 +7778,7 @@ func file_uexecutor_v1_types_proto_init() { return nil } } - file_uexecutor_v1_types_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + file_uexecutor_v1_types_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UniversalTx); i { case 0: return &v.state @@ -8268,7 +7797,7 @@ func file_uexecutor_v1_types_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_uexecutor_v1_types_proto_rawDesc, NumEnums: 4, - NumMessages: 10, + NumMessages: 9, NumExtensions: 0, NumServices: 0, }, From 998ef0ff907f778a3d94a0cdb2ecc5608d267691 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Fri, 28 Nov 2025 11:14:28 +0530 Subject: [PATCH 028/120] feat: renamed outbound_index to outbound_id --- proto/uexecutor/v1/tx.proto | 2 +- proto/uexecutor/v1/types.proto | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/proto/uexecutor/v1/tx.proto b/proto/uexecutor/v1/tx.proto index 468cf96d..79a7d788 100755 --- a/proto/uexecutor/v1/tx.proto +++ b/proto/uexecutor/v1/tx.proto @@ -141,7 +141,7 @@ message MsgVoteOutbound { // signer is the Cosmos address initiating the tx (used for tx signing) string signer = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; string utx_id = 2; // UniversalTx Id - string outbound_index = 3; // index of outbound tx + string outbound_id = 3; // index of outbound tx OutboundObservation observed_tx = 4; // observed tx on destination chain } diff --git a/proto/uexecutor/v1/types.proto b/proto/uexecutor/v1/types.proto index 3928609d..41742656 100644 --- a/proto/uexecutor/v1/types.proto +++ b/proto/uexecutor/v1/types.proto @@ -139,7 +139,7 @@ message OutboundTx { TxType tx_type = 8; // outbound tx type Originating_Pc_TX pc_tx = 9; // pc_tx that originated the outbound OutboundObservation observed_tx = 10; // observed tx on destination chain - string index = 11; // index of outbound tx + string id = 11; // id of outbound tx Status outbound_status = 12; // status of outbound tx } From a9656042d1892eea74d6122cf736947d2f8f1f05 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Fri, 28 Nov 2025 11:14:46 +0530 Subject: [PATCH 029/120] refactor: added generated protobuf --- api/uexecutor/v1/tx.pulsar.go | 215 +++++++++++++++---------------- api/uexecutor/v1/types.pulsar.go | 194 ++++++++++++++-------------- 2 files changed, 204 insertions(+), 205 deletions(-) diff --git a/api/uexecutor/v1/tx.pulsar.go b/api/uexecutor/v1/tx.pulsar.go index 009b9086..fdcda3d6 100644 --- a/api/uexecutor/v1/tx.pulsar.go +++ b/api/uexecutor/v1/tx.pulsar.go @@ -4629,11 +4629,11 @@ func (x *fastReflection_MsgVoteInboundResponse) ProtoMethods() *protoiface.Metho } var ( - md_MsgVoteOutbound protoreflect.MessageDescriptor - fd_MsgVoteOutbound_signer protoreflect.FieldDescriptor - fd_MsgVoteOutbound_utx_id protoreflect.FieldDescriptor - fd_MsgVoteOutbound_outbound_index protoreflect.FieldDescriptor - fd_MsgVoteOutbound_observed_tx protoreflect.FieldDescriptor + md_MsgVoteOutbound protoreflect.MessageDescriptor + fd_MsgVoteOutbound_signer protoreflect.FieldDescriptor + fd_MsgVoteOutbound_utx_id protoreflect.FieldDescriptor + fd_MsgVoteOutbound_outbound_id protoreflect.FieldDescriptor + fd_MsgVoteOutbound_observed_tx protoreflect.FieldDescriptor ) func init() { @@ -4641,7 +4641,7 @@ func init() { md_MsgVoteOutbound = File_uexecutor_v1_tx_proto.Messages().ByName("MsgVoteOutbound") fd_MsgVoteOutbound_signer = md_MsgVoteOutbound.Fields().ByName("signer") fd_MsgVoteOutbound_utx_id = md_MsgVoteOutbound.Fields().ByName("utx_id") - fd_MsgVoteOutbound_outbound_index = md_MsgVoteOutbound.Fields().ByName("outbound_index") + fd_MsgVoteOutbound_outbound_id = md_MsgVoteOutbound.Fields().ByName("outbound_id") fd_MsgVoteOutbound_observed_tx = md_MsgVoteOutbound.Fields().ByName("observed_tx") } @@ -4722,9 +4722,9 @@ func (x *fastReflection_MsgVoteOutbound) Range(f func(protoreflect.FieldDescript return } } - if x.OutboundIndex != "" { - value := protoreflect.ValueOfString(x.OutboundIndex) - if !f(fd_MsgVoteOutbound_outbound_index, value) { + if x.OutboundId != "" { + value := protoreflect.ValueOfString(x.OutboundId) + if !f(fd_MsgVoteOutbound_outbound_id, value) { return } } @@ -4753,8 +4753,8 @@ func (x *fastReflection_MsgVoteOutbound) Has(fd protoreflect.FieldDescriptor) bo return x.Signer != "" case "uexecutor.v1.MsgVoteOutbound.utx_id": return x.UtxId != "" - case "uexecutor.v1.MsgVoteOutbound.outbound_index": - return x.OutboundIndex != "" + case "uexecutor.v1.MsgVoteOutbound.outbound_id": + return x.OutboundId != "" case "uexecutor.v1.MsgVoteOutbound.observed_tx": return x.ObservedTx != nil default: @@ -4777,8 +4777,8 @@ func (x *fastReflection_MsgVoteOutbound) Clear(fd protoreflect.FieldDescriptor) x.Signer = "" case "uexecutor.v1.MsgVoteOutbound.utx_id": x.UtxId = "" - case "uexecutor.v1.MsgVoteOutbound.outbound_index": - x.OutboundIndex = "" + case "uexecutor.v1.MsgVoteOutbound.outbound_id": + x.OutboundId = "" case "uexecutor.v1.MsgVoteOutbound.observed_tx": x.ObservedTx = nil default: @@ -4803,8 +4803,8 @@ func (x *fastReflection_MsgVoteOutbound) Get(descriptor protoreflect.FieldDescri case "uexecutor.v1.MsgVoteOutbound.utx_id": value := x.UtxId return protoreflect.ValueOfString(value) - case "uexecutor.v1.MsgVoteOutbound.outbound_index": - value := x.OutboundIndex + case "uexecutor.v1.MsgVoteOutbound.outbound_id": + value := x.OutboundId return protoreflect.ValueOfString(value) case "uexecutor.v1.MsgVoteOutbound.observed_tx": value := x.ObservedTx @@ -4833,8 +4833,8 @@ func (x *fastReflection_MsgVoteOutbound) Set(fd protoreflect.FieldDescriptor, va x.Signer = value.Interface().(string) case "uexecutor.v1.MsgVoteOutbound.utx_id": x.UtxId = value.Interface().(string) - case "uexecutor.v1.MsgVoteOutbound.outbound_index": - x.OutboundIndex = value.Interface().(string) + case "uexecutor.v1.MsgVoteOutbound.outbound_id": + x.OutboundId = value.Interface().(string) case "uexecutor.v1.MsgVoteOutbound.observed_tx": x.ObservedTx = value.Message().Interface().(*OutboundObservation) default: @@ -4866,8 +4866,8 @@ func (x *fastReflection_MsgVoteOutbound) Mutable(fd protoreflect.FieldDescriptor panic(fmt.Errorf("field signer of message uexecutor.v1.MsgVoteOutbound is not mutable")) case "uexecutor.v1.MsgVoteOutbound.utx_id": panic(fmt.Errorf("field utx_id of message uexecutor.v1.MsgVoteOutbound is not mutable")) - case "uexecutor.v1.MsgVoteOutbound.outbound_index": - panic(fmt.Errorf("field outbound_index of message uexecutor.v1.MsgVoteOutbound is not mutable")) + case "uexecutor.v1.MsgVoteOutbound.outbound_id": + panic(fmt.Errorf("field outbound_id of message uexecutor.v1.MsgVoteOutbound is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.MsgVoteOutbound")) @@ -4885,7 +4885,7 @@ func (x *fastReflection_MsgVoteOutbound) NewField(fd protoreflect.FieldDescripto return protoreflect.ValueOfString("") case "uexecutor.v1.MsgVoteOutbound.utx_id": return protoreflect.ValueOfString("") - case "uexecutor.v1.MsgVoteOutbound.outbound_index": + case "uexecutor.v1.MsgVoteOutbound.outbound_id": return protoreflect.ValueOfString("") case "uexecutor.v1.MsgVoteOutbound.observed_tx": m := new(OutboundObservation) @@ -4967,7 +4967,7 @@ func (x *fastReflection_MsgVoteOutbound) ProtoMethods() *protoiface.Methods { if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - l = len(x.OutboundIndex) + l = len(x.OutboundId) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } @@ -5018,10 +5018,10 @@ func (x *fastReflection_MsgVoteOutbound) ProtoMethods() *protoiface.Methods { i-- dAtA[i] = 0x22 } - if len(x.OutboundIndex) > 0 { - i -= len(x.OutboundIndex) - copy(dAtA[i:], x.OutboundIndex) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.OutboundIndex))) + if len(x.OutboundId) > 0 { + i -= len(x.OutboundId) + copy(dAtA[i:], x.OutboundId) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.OutboundId))) i-- dAtA[i] = 0x1a } @@ -5154,7 +5154,7 @@ func (x *fastReflection_MsgVoteOutbound) ProtoMethods() *protoiface.Methods { iNdEx = postIndex case 3: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field OutboundIndex", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field OutboundId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -5182,7 +5182,7 @@ func (x *fastReflection_MsgVoteOutbound) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.OutboundIndex = string(dAtA[iNdEx:postIndex]) + x.OutboundId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 2 { @@ -6985,10 +6985,10 @@ type MsgVoteOutbound struct { unknownFields protoimpl.UnknownFields // signer is the Cosmos address initiating the tx (used for tx signing) - Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty"` - UtxId string `protobuf:"bytes,2,opt,name=utx_id,json=utxId,proto3" json:"utx_id,omitempty"` // UniversalTx Id - OutboundIndex string `protobuf:"bytes,3,opt,name=outbound_index,json=outboundIndex,proto3" json:"outbound_index,omitempty"` // index of outbound tx - ObservedTx *OutboundObservation `protobuf:"bytes,4,opt,name=observed_tx,json=observedTx,proto3" json:"observed_tx,omitempty"` // observed tx on destination chain + Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty"` + UtxId string `protobuf:"bytes,2,opt,name=utx_id,json=utxId,proto3" json:"utx_id,omitempty"` // UniversalTx Id + OutboundId string `protobuf:"bytes,3,opt,name=outbound_id,json=outboundId,proto3" json:"outbound_id,omitempty"` // index of outbound tx + ObservedTx *OutboundObservation `protobuf:"bytes,4,opt,name=observed_tx,json=observedTx,proto3" json:"observed_tx,omitempty"` // observed tx on destination chain } func (x *MsgVoteOutbound) Reset() { @@ -7025,9 +7025,9 @@ func (x *MsgVoteOutbound) GetUtxId() string { return "" } -func (x *MsgVoteOutbound) GetOutboundIndex() string { +func (x *MsgVoteOutbound) GetOutboundId() string { if x != nil { - return x.OutboundIndex + return x.OutboundId } return "" } @@ -7242,87 +7242,86 @@ var file_uexecutor_v1_tx_proto_rawDesc = []byte{ 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x11, 0x75, 0x65, 0x2f, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x22, 0x18, 0x0a, 0x16, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0xe9, 0x01, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x4f, 0x75, 0x74, + 0x65, 0x22, 0xe3, 0x01, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x30, 0x0a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x12, 0x15, 0x0a, 0x06, 0x75, 0x74, 0x78, 0x5f, 0x69, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x75, 0x74, 0x78, 0x49, 0x64, 0x12, 0x25, - 0x0a, 0x0e, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, - 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x42, 0x0a, 0x0b, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, - 0x64, 0x5f, 0x74, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x75, 0x65, 0x78, - 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, - 0x6e, 0x64, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x6f, - 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x54, 0x78, 0x3a, 0x22, 0x82, 0xe7, 0xb0, 0x2a, 0x06, - 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x12, 0x75, 0x65, 0x2f, 0x4d, 0x73, - 0x67, 0x56, 0x6f, 0x74, 0x65, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x22, 0x19, 0x0a, - 0x17, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xd3, 0x01, 0x0a, 0x0f, 0x4d, 0x73, 0x67, - 0x56, 0x6f, 0x74, 0x65, 0x47, 0x61, 0x73, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x30, 0x0a, 0x06, - 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, - 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x12, 0x2a, - 0x0a, 0x11, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, - 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6f, 0x62, 0x73, 0x65, 0x72, - 0x76, 0x65, 0x64, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, - 0x69, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, - 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, - 0x62, 0x65, 0x72, 0x3a, 0x29, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, - 0x8a, 0xe7, 0xb0, 0x2a, 0x19, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2f, 0x4d, - 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x47, 0x61, 0x73, 0x50, 0x72, 0x69, 0x63, 0x65, 0x22, 0x19, - 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x47, 0x61, 0x73, 0x50, 0x72, 0x69, 0x63, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xce, 0x04, 0x0a, 0x03, 0x4d, 0x73, - 0x67, 0x12, 0x54, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x12, 0x1d, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, - 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x1a, 0x25, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, - 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4b, 0x0a, 0x09, 0x44, 0x65, 0x70, 0x6c, 0x6f, - 0x79, 0x55, 0x45, 0x41, 0x12, 0x1a, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, - 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x55, 0x45, 0x41, - 0x1a, 0x22, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, - 0x4d, 0x73, 0x67, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x55, 0x45, 0x41, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x06, 0x4d, 0x69, 0x6e, 0x74, 0x50, 0x43, 0x12, 0x17, + 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x75, 0x74, 0x78, 0x49, 0x64, 0x12, 0x1f, + 0x0a, 0x0b, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x49, 0x64, 0x12, + 0x42, 0x0a, 0x0b, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, 0x74, 0x78, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, + 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x4f, 0x62, 0x73, 0x65, + 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, + 0x64, 0x54, 0x78, 0x3a, 0x22, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, + 0x8a, 0xe7, 0xb0, 0x2a, 0x12, 0x75, 0x65, 0x2f, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x4f, + 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x56, 0x6f, + 0x74, 0x65, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0xd3, 0x01, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x47, 0x61, + 0x73, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x30, 0x0a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, + 0x52, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x12, 0x2a, 0x0a, 0x11, 0x6f, 0x62, 0x73, 0x65, + 0x72, 0x76, 0x65, 0x64, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x43, 0x68, 0x61, + 0x69, 0x6e, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, + 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x3a, 0x29, 0x82, + 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x19, 0x75, + 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2f, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, + 0x47, 0x61, 0x73, 0x50, 0x72, 0x69, 0x63, 0x65, 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x56, + 0x6f, 0x74, 0x65, 0x47, 0x61, 0x73, 0x50, 0x72, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x32, 0xce, 0x04, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x54, 0x0a, 0x0c, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1d, 0x2e, 0x75, 0x65, + 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x25, 0x2e, 0x75, 0x65, 0x78, + 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x4b, 0x0a, 0x09, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x55, 0x45, 0x41, 0x12, 0x1a, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, - 0x67, 0x4d, 0x69, 0x6e, 0x74, 0x50, 0x43, 0x1a, 0x1f, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, - 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x4d, 0x69, 0x6e, 0x74, 0x50, 0x43, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5a, 0x0a, 0x0e, 0x45, 0x78, 0x65, 0x63, - 0x75, 0x74, 0x65, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x1f, 0x2e, 0x75, 0x65, 0x78, - 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, - 0x63, 0x75, 0x74, 0x65, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x1a, 0x27, 0x2e, 0x75, 0x65, - 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, - 0x65, 0x63, 0x75, 0x74, 0x65, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x0b, 0x56, 0x6f, 0x74, 0x65, 0x49, 0x6e, 0x62, 0x6f, - 0x75, 0x6e, 0x64, 0x12, 0x1c, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, - 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, - 0x64, 0x1a, 0x24, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, - 0x2e, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x54, 0x0a, 0x0c, 0x56, 0x6f, 0x74, 0x65, 0x4f, - 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x1d, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, - 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x4f, 0x75, - 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x1a, 0x25, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, - 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x4f, 0x75, 0x74, - 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x54, 0x0a, - 0x0c, 0x56, 0x6f, 0x74, 0x65, 0x47, 0x61, 0x73, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x1d, 0x2e, + 0x67, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x55, 0x45, 0x41, 0x1a, 0x22, 0x2e, 0x75, 0x65, 0x78, + 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x70, + 0x6c, 0x6f, 0x79, 0x55, 0x45, 0x41, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, + 0x0a, 0x06, 0x4d, 0x69, 0x6e, 0x74, 0x50, 0x43, 0x12, 0x17, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, + 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x4d, 0x69, 0x6e, 0x74, 0x50, + 0x43, 0x1a, 0x1f, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, + 0x2e, 0x4d, 0x73, 0x67, 0x4d, 0x69, 0x6e, 0x74, 0x50, 0x43, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x5a, 0x0a, 0x0e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x50, 0x61, 0x79, + 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x1f, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, + 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x50, 0x61, + 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x1a, 0x27, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, + 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x50, + 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, + 0x0a, 0x0b, 0x56, 0x6f, 0x74, 0x65, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x1c, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, - 0x56, 0x6f, 0x74, 0x65, 0x47, 0x61, 0x73, 0x50, 0x72, 0x69, 0x63, 0x65, 0x1a, 0x25, 0x2e, 0x75, - 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x56, - 0x6f, 0x74, 0x65, 0x47, 0x61, 0x73, 0x50, 0x72, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xaf, 0x01, 0x0a, 0x10, 0x63, - 0x6f, 0x6d, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x42, - 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x41, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x63, 0x68, 0x61, 0x69, 0x6e, - 0x2f, 0x70, 0x75, 0x73, 0x68, 0x2d, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2d, 0x6e, 0x6f, 0x64, 0x65, - 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2f, 0x76, - 0x31, 0x3b, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x76, 0x31, 0xa2, 0x02, 0x03, - 0x55, 0x58, 0x58, 0xaa, 0x02, 0x0c, 0x55, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, - 0x56, 0x31, 0xca, 0x02, 0x0c, 0x55, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x5c, 0x56, - 0x31, 0xe2, 0x02, 0x18, 0x55, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x5c, 0x56, 0x31, - 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0d, 0x55, - 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x56, 0x6f, 0x74, 0x65, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x1a, 0x24, 0x2e, 0x75, 0x65, + 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x56, 0x6f, + 0x74, 0x65, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x54, 0x0a, 0x0c, 0x56, 0x6f, 0x74, 0x65, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, + 0x64, 0x12, 0x1d, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, + 0x2e, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, + 0x1a, 0x25, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, + 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x54, 0x0a, 0x0c, 0x56, 0x6f, 0x74, 0x65, 0x47, + 0x61, 0x73, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x1d, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, + 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x47, 0x61, + 0x73, 0x50, 0x72, 0x69, 0x63, 0x65, 0x1a, 0x25, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x47, 0x61, 0x73, + 0x50, 0x72, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, + 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xaf, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x75, 0x65, 0x78, + 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x41, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x70, 0x75, 0x73, 0x68, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x2d, + 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2d, 0x6e, 0x6f, 0x64, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x75, + 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x31, 0x3b, 0x75, 0x65, 0x78, 0x65, + 0x63, 0x75, 0x74, 0x6f, 0x72, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x55, 0x58, 0x58, 0xaa, 0x02, 0x0c, + 0x55, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0c, 0x55, + 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x18, 0x55, 0x65, + 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0d, 0x55, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x6f, 0x72, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/api/uexecutor/v1/types.pulsar.go b/api/uexecutor/v1/types.pulsar.go index e7a212d1..ad12299d 100644 --- a/api/uexecutor/v1/types.pulsar.go +++ b/api/uexecutor/v1/types.pulsar.go @@ -4609,7 +4609,7 @@ var ( fd_OutboundTx_tx_type protoreflect.FieldDescriptor fd_OutboundTx_pc_tx protoreflect.FieldDescriptor fd_OutboundTx_observed_tx protoreflect.FieldDescriptor - fd_OutboundTx_index protoreflect.FieldDescriptor + fd_OutboundTx_id protoreflect.FieldDescriptor fd_OutboundTx_outbound_status protoreflect.FieldDescriptor ) @@ -4626,7 +4626,7 @@ func init() { fd_OutboundTx_tx_type = md_OutboundTx.Fields().ByName("tx_type") fd_OutboundTx_pc_tx = md_OutboundTx.Fields().ByName("pc_tx") fd_OutboundTx_observed_tx = md_OutboundTx.Fields().ByName("observed_tx") - fd_OutboundTx_index = md_OutboundTx.Fields().ByName("index") + fd_OutboundTx_id = md_OutboundTx.Fields().ByName("id") fd_OutboundTx_outbound_status = md_OutboundTx.Fields().ByName("outbound_status") } @@ -4755,9 +4755,9 @@ func (x *fastReflection_OutboundTx) Range(f func(protoreflect.FieldDescriptor, p return } } - if x.Index != "" { - value := protoreflect.ValueOfString(x.Index) - if !f(fd_OutboundTx_index, value) { + if x.Id != "" { + value := protoreflect.ValueOfString(x.Id) + if !f(fd_OutboundTx_id, value) { return } } @@ -4802,8 +4802,8 @@ func (x *fastReflection_OutboundTx) Has(fd protoreflect.FieldDescriptor) bool { return x.PcTx != nil case "uexecutor.v1.OutboundTx.observed_tx": return x.ObservedTx != nil - case "uexecutor.v1.OutboundTx.index": - return x.Index != "" + case "uexecutor.v1.OutboundTx.id": + return x.Id != "" case "uexecutor.v1.OutboundTx.outbound_status": return x.OutboundStatus != 0 default: @@ -4842,8 +4842,8 @@ func (x *fastReflection_OutboundTx) Clear(fd protoreflect.FieldDescriptor) { x.PcTx = nil case "uexecutor.v1.OutboundTx.observed_tx": x.ObservedTx = nil - case "uexecutor.v1.OutboundTx.index": - x.Index = "" + case "uexecutor.v1.OutboundTx.id": + x.Id = "" case "uexecutor.v1.OutboundTx.outbound_status": x.OutboundStatus = 0 default: @@ -4892,8 +4892,8 @@ func (x *fastReflection_OutboundTx) Get(descriptor protoreflect.FieldDescriptor) case "uexecutor.v1.OutboundTx.observed_tx": value := x.ObservedTx return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "uexecutor.v1.OutboundTx.index": - value := x.Index + case "uexecutor.v1.OutboundTx.id": + value := x.Id return protoreflect.ValueOfString(value) case "uexecutor.v1.OutboundTx.outbound_status": value := x.OutboundStatus @@ -4938,8 +4938,8 @@ func (x *fastReflection_OutboundTx) Set(fd protoreflect.FieldDescriptor, value p x.PcTx = value.Message().Interface().(*Originating_Pc_TX) case "uexecutor.v1.OutboundTx.observed_tx": x.ObservedTx = value.Message().Interface().(*OutboundObservation) - case "uexecutor.v1.OutboundTx.index": - x.Index = value.Interface().(string) + case "uexecutor.v1.OutboundTx.id": + x.Id = value.Interface().(string) case "uexecutor.v1.OutboundTx.outbound_status": x.OutboundStatus = (Status)(value.Enum()) default: @@ -4988,8 +4988,8 @@ func (x *fastReflection_OutboundTx) Mutable(fd protoreflect.FieldDescriptor) pro panic(fmt.Errorf("field gas_limit of message uexecutor.v1.OutboundTx is not mutable")) case "uexecutor.v1.OutboundTx.tx_type": panic(fmt.Errorf("field tx_type of message uexecutor.v1.OutboundTx is not mutable")) - case "uexecutor.v1.OutboundTx.index": - panic(fmt.Errorf("field index of message uexecutor.v1.OutboundTx is not mutable")) + case "uexecutor.v1.OutboundTx.id": + panic(fmt.Errorf("field id of message uexecutor.v1.OutboundTx is not mutable")) case "uexecutor.v1.OutboundTx.outbound_status": panic(fmt.Errorf("field outbound_status of message uexecutor.v1.OutboundTx is not mutable")) default: @@ -5027,7 +5027,7 @@ func (x *fastReflection_OutboundTx) NewField(fd protoreflect.FieldDescriptor) pr case "uexecutor.v1.OutboundTx.observed_tx": m := new(OutboundObservation) return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "uexecutor.v1.OutboundTx.index": + case "uexecutor.v1.OutboundTx.id": return protoreflect.ValueOfString("") case "uexecutor.v1.OutboundTx.outbound_status": return protoreflect.ValueOfEnum(0) @@ -5139,7 +5139,7 @@ func (x *fastReflection_OutboundTx) ProtoMethods() *protoiface.Methods { l = options.Size(x.ObservedTx) n += 1 + l + runtime.Sov(uint64(l)) } - l = len(x.Index) + l = len(x.Id) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } @@ -5180,10 +5180,10 @@ func (x *fastReflection_OutboundTx) ProtoMethods() *protoiface.Methods { i-- dAtA[i] = 0x60 } - if len(x.Index) > 0 { - i -= len(x.Index) - copy(dAtA[i:], x.Index) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Index))) + if len(x.Id) > 0 { + i -= len(x.Id) + copy(dAtA[i:], x.Id) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Id))) i-- dAtA[i] = 0x5a } @@ -5635,7 +5635,7 @@ func (x *fastReflection_OutboundTx) ProtoMethods() *protoiface.Methods { iNdEx = postIndex case 11: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Index", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -5663,7 +5663,7 @@ func (x *fastReflection_OutboundTx) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.Index = string(dAtA[iNdEx:postIndex]) + x.Id = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 12: if wireType != 0 { @@ -7258,7 +7258,7 @@ type OutboundTx struct { TxType TxType `protobuf:"varint,8,opt,name=tx_type,json=txType,proto3,enum=uexecutor.v1.TxType" json:"tx_type,omitempty"` // outbound tx type PcTx *Originating_Pc_TX `protobuf:"bytes,9,opt,name=pc_tx,json=pcTx,proto3" json:"pc_tx,omitempty"` // pc_tx that originated the outbound ObservedTx *OutboundObservation `protobuf:"bytes,10,opt,name=observed_tx,json=observedTx,proto3" json:"observed_tx,omitempty"` // observed tx on destination chain - Index string `protobuf:"bytes,11,opt,name=index,proto3" json:"index,omitempty"` // index of outbound tx + Id string `protobuf:"bytes,11,opt,name=id,proto3" json:"id,omitempty"` // id of outbound tx OutboundStatus Status `protobuf:"varint,12,opt,name=outbound_status,json=outboundStatus,proto3,enum=uexecutor.v1.Status" json:"outbound_status,omitempty"` // status of outbound tx } @@ -7352,9 +7352,9 @@ func (x *OutboundTx) GetObservedTx() *OutboundObservation { return nil } -func (x *OutboundTx) GetIndex() string { +func (x *OutboundTx) GetId() string { if x != nil { - return x.Index + return x.Id } return "" } @@ -7532,7 +7532,7 @@ var file_uexecutor_v1_types_proto_rawDesc = []byte{ 0x52, 0x08, 0x6c, 0x6f, 0x67, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x3a, 0x24, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x1b, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2f, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x63, 0x5f, 0x74, 0x78, - 0x22, 0xff, 0x03, 0x0a, 0x0a, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x54, 0x78, 0x12, + 0x22, 0xf9, 0x03, 0x0a, 0x0a, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x54, 0x78, 0x12, 0x2b, 0x0a, 0x11, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x1c, 0x0a, 0x09, @@ -7556,76 +7556,76 @@ var file_uexecutor_v1_types_proto_rawDesc = []byte{ 0x64, 0x5f, 0x74, 0x78, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x6f, - 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x54, 0x78, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, - 0x65, 0x78, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, - 0x3d, 0x0a, 0x0f, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, - 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0e, - 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x3a, 0x22, - 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x15, 0x75, 0x65, 0x78, - 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2f, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, - 0x74, 0x78, 0x22, 0xa8, 0x02, 0x0a, 0x0b, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, - 0x54, 0x78, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, - 0x69, 0x64, 0x12, 0x34, 0x0a, 0x0a, 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x74, 0x78, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, - 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x09, 0x69, - 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x54, 0x78, 0x12, 0x27, 0x0a, 0x05, 0x70, 0x63, 0x5f, 0x74, - 0x78, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, - 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x43, 0x54, 0x78, 0x52, 0x04, 0x70, 0x63, 0x54, - 0x78, 0x12, 0x39, 0x0a, 0x0b, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x74, 0x78, - 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, - 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x54, 0x78, - 0x52, 0x0a, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x54, 0x78, 0x12, 0x4a, 0x0a, 0x10, - 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, - 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x54, - 0x78, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0f, 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, - 0x61, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x3a, 0x23, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, - 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x16, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, - 0x2f, 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x5f, 0x74, 0x78, 0x2a, 0x47, 0x0a, - 0x10, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, - 0x65, 0x12, 0x16, 0x0a, 0x12, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x56, 0x65, 0x72, 0x69, 0x66, - 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x10, 0x00, 0x12, 0x1b, 0x0a, 0x17, 0x75, 0x6e, 0x69, - 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x54, 0x78, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x10, 0x01, 0x2a, 0x83, 0x02, 0x0a, 0x11, 0x55, 0x6e, 0x69, 0x76, 0x65, - 0x72, 0x73, 0x61, 0x6c, 0x54, 0x78, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x23, 0x0a, 0x1f, - 0x55, 0x4e, 0x49, 0x56, 0x45, 0x52, 0x53, 0x41, 0x4c, 0x5f, 0x54, 0x58, 0x5f, 0x53, 0x54, 0x41, - 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, - 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x49, 0x4e, 0x42, 0x4f, 0x55, 0x4e, 0x44, 0x5f, 0x53, 0x55, 0x43, - 0x43, 0x45, 0x53, 0x53, 0x10, 0x01, 0x12, 0x1d, 0x0a, 0x19, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, - 0x47, 0x5f, 0x49, 0x4e, 0x42, 0x4f, 0x55, 0x4e, 0x44, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, - 0x49, 0x4f, 0x4e, 0x10, 0x02, 0x12, 0x17, 0x0a, 0x13, 0x50, 0x43, 0x5f, 0x45, 0x58, 0x45, 0x43, - 0x55, 0x54, 0x45, 0x44, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x03, 0x12, 0x16, - 0x0a, 0x12, 0x50, 0x43, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x45, 0x44, 0x5f, 0x46, 0x41, - 0x49, 0x4c, 0x45, 0x44, 0x10, 0x04, 0x12, 0x15, 0x0a, 0x11, 0x50, 0x43, 0x5f, 0x50, 0x45, 0x4e, - 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x52, 0x45, 0x56, 0x45, 0x52, 0x54, 0x10, 0x05, 0x12, 0x14, 0x0a, - 0x10, 0x4f, 0x55, 0x54, 0x42, 0x4f, 0x55, 0x4e, 0x44, 0x5f, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, - 0x47, 0x10, 0x06, 0x12, 0x14, 0x0a, 0x10, 0x4f, 0x55, 0x54, 0x42, 0x4f, 0x55, 0x4e, 0x44, 0x5f, - 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x07, 0x12, 0x13, 0x0a, 0x0f, 0x4f, 0x55, 0x54, - 0x42, 0x4f, 0x55, 0x4e, 0x44, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x08, 0x12, 0x0c, - 0x0a, 0x08, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x45, 0x44, 0x10, 0x09, 0x2a, 0x34, 0x0a, 0x06, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0f, 0x0a, 0x0b, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, - 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x45, 0x4e, 0x44, 0x49, - 0x4e, 0x47, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x4f, 0x42, 0x53, 0x45, 0x52, 0x56, 0x45, 0x44, - 0x10, 0x02, 0x2a, 0x69, 0x0a, 0x06, 0x54, 0x78, 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x0e, - 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x5f, 0x54, 0x58, 0x10, 0x00, - 0x12, 0x07, 0x0a, 0x03, 0x47, 0x41, 0x53, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x46, 0x55, 0x4e, - 0x44, 0x53, 0x10, 0x02, 0x12, 0x15, 0x0a, 0x11, 0x46, 0x55, 0x4e, 0x44, 0x53, 0x5f, 0x41, 0x4e, - 0x44, 0x5f, 0x50, 0x41, 0x59, 0x4c, 0x4f, 0x41, 0x44, 0x10, 0x03, 0x12, 0x13, 0x0a, 0x0f, 0x47, - 0x41, 0x53, 0x5f, 0x41, 0x4e, 0x44, 0x5f, 0x50, 0x41, 0x59, 0x4c, 0x4f, 0x41, 0x44, 0x10, 0x04, - 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x41, 0x59, 0x4c, 0x4f, 0x41, 0x44, 0x10, 0x05, 0x42, 0xb2, 0x01, - 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, - 0x76, 0x31, 0x42, 0x0a, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, - 0x5a, 0x41, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x75, 0x73, - 0x68, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x2d, 0x63, 0x68, 0x61, 0x69, - 0x6e, 0x2d, 0x6e, 0x6f, 0x64, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x75, 0x65, 0x78, 0x65, 0x63, - 0x75, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x31, 0x3b, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, - 0x72, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x55, 0x58, 0x58, 0xaa, 0x02, 0x0c, 0x55, 0x65, 0x78, 0x65, - 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0c, 0x55, 0x65, 0x78, 0x65, 0x63, - 0x75, 0x74, 0x6f, 0x72, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x18, 0x55, 0x65, 0x78, 0x65, 0x63, 0x75, - 0x74, 0x6f, 0x72, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0xea, 0x02, 0x0d, 0x55, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x3a, 0x3a, - 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x54, 0x78, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x3d, 0x0a, 0x0f, 0x6f, 0x75, 0x74, + 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x0c, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, + 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0e, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, + 0x6e, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x3a, 0x22, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, + 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x15, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, + 0x2f, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x74, 0x78, 0x22, 0xa8, 0x02, 0x0a, + 0x0b, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x54, 0x78, 0x12, 0x0e, 0x0a, 0x02, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x34, 0x0a, 0x0a, + 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x74, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x15, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, + 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x09, 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, + 0x54, 0x78, 0x12, 0x27, 0x0a, 0x05, 0x70, 0x63, 0x5f, 0x74, 0x78, 0x18, 0x03, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x12, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, + 0x2e, 0x50, 0x43, 0x54, 0x78, 0x52, 0x04, 0x70, 0x63, 0x54, 0x78, 0x12, 0x39, 0x0a, 0x0b, 0x6f, + 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x74, 0x78, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x18, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, + 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x54, 0x78, 0x52, 0x0a, 0x6f, 0x75, 0x74, 0x62, + 0x6f, 0x75, 0x6e, 0x64, 0x54, 0x78, 0x12, 0x4a, 0x0a, 0x10, 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, + 0x73, 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x1f, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, + 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x54, 0x78, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x52, 0x0f, 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x3a, 0x23, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, + 0x16, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2f, 0x75, 0x6e, 0x69, 0x76, 0x65, + 0x72, 0x73, 0x61, 0x6c, 0x5f, 0x74, 0x78, 0x2a, 0x47, 0x0a, 0x10, 0x56, 0x65, 0x72, 0x69, 0x66, + 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x12, 0x73, + 0x69, 0x67, 0x6e, 0x65, 0x64, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x10, 0x00, 0x12, 0x1b, 0x0a, 0x17, 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, + 0x54, 0x78, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x10, 0x01, + 0x2a, 0x83, 0x02, 0x0a, 0x11, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x54, 0x78, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x23, 0x0a, 0x1f, 0x55, 0x4e, 0x49, 0x56, 0x45, 0x52, + 0x53, 0x41, 0x4c, 0x5f, 0x54, 0x58, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, + 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x49, + 0x4e, 0x42, 0x4f, 0x55, 0x4e, 0x44, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x01, + 0x12, 0x1d, 0x0a, 0x19, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x49, 0x4e, 0x42, 0x4f, + 0x55, 0x4e, 0x44, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x02, 0x12, + 0x17, 0x0a, 0x13, 0x50, 0x43, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x45, 0x44, 0x5f, 0x53, + 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x03, 0x12, 0x16, 0x0a, 0x12, 0x50, 0x43, 0x5f, 0x45, + 0x58, 0x45, 0x43, 0x55, 0x54, 0x45, 0x44, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x04, + 0x12, 0x15, 0x0a, 0x11, 0x50, 0x43, 0x5f, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x52, + 0x45, 0x56, 0x45, 0x52, 0x54, 0x10, 0x05, 0x12, 0x14, 0x0a, 0x10, 0x4f, 0x55, 0x54, 0x42, 0x4f, + 0x55, 0x4e, 0x44, 0x5f, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x06, 0x12, 0x14, 0x0a, + 0x10, 0x4f, 0x55, 0x54, 0x42, 0x4f, 0x55, 0x4e, 0x44, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, + 0x53, 0x10, 0x07, 0x12, 0x13, 0x0a, 0x0f, 0x4f, 0x55, 0x54, 0x42, 0x4f, 0x55, 0x4e, 0x44, 0x5f, + 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x08, 0x12, 0x0c, 0x0a, 0x08, 0x43, 0x41, 0x4e, 0x43, + 0x45, 0x4c, 0x45, 0x44, 0x10, 0x09, 0x2a, 0x34, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x12, 0x0f, 0x0a, 0x0b, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, + 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x0c, + 0x0a, 0x08, 0x4f, 0x42, 0x53, 0x45, 0x52, 0x56, 0x45, 0x44, 0x10, 0x02, 0x2a, 0x69, 0x0a, 0x06, + 0x54, 0x78, 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x0e, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, + 0x49, 0x46, 0x49, 0x45, 0x44, 0x5f, 0x54, 0x58, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x47, 0x41, + 0x53, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x46, 0x55, 0x4e, 0x44, 0x53, 0x10, 0x02, 0x12, 0x15, + 0x0a, 0x11, 0x46, 0x55, 0x4e, 0x44, 0x53, 0x5f, 0x41, 0x4e, 0x44, 0x5f, 0x50, 0x41, 0x59, 0x4c, + 0x4f, 0x41, 0x44, 0x10, 0x03, 0x12, 0x13, 0x0a, 0x0f, 0x47, 0x41, 0x53, 0x5f, 0x41, 0x4e, 0x44, + 0x5f, 0x50, 0x41, 0x59, 0x4c, 0x4f, 0x41, 0x44, 0x10, 0x04, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x41, + 0x59, 0x4c, 0x4f, 0x41, 0x44, 0x10, 0x05, 0x42, 0xb2, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, + 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x54, 0x79, + 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x41, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x63, 0x68, 0x61, 0x69, 0x6e, + 0x2f, 0x70, 0x75, 0x73, 0x68, 0x2d, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2d, 0x6e, 0x6f, 0x64, 0x65, + 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2f, 0x76, + 0x31, 0x3b, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x76, 0x31, 0xa2, 0x02, 0x03, + 0x55, 0x58, 0x58, 0xaa, 0x02, 0x0c, 0x55, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, + 0x56, 0x31, 0xca, 0x02, 0x0c, 0x55, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x5c, 0x56, + 0x31, 0xe2, 0x02, 0x18, 0x55, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x5c, 0x56, 0x31, + 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0d, 0x55, + 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( From ed4d80bd45096a1870b427133a27be03e3486ecc Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Fri, 28 Nov 2025 11:16:37 +0530 Subject: [PATCH 030/120] feat: added outboundId and outboundBallot key --- x/uexecutor/keeper/create_outbound.go | 18 ++++++++++++++---- x/uexecutor/types/keys.go | 26 ++++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 4 deletions(-) diff --git a/x/uexecutor/keeper/create_outbound.go b/x/uexecutor/keeper/create_outbound.go index ce4e123a..f856f8c3 100644 --- a/x/uexecutor/keeper/create_outbound.go +++ b/x/uexecutor/keeper/create_outbound.go @@ -13,6 +13,7 @@ import ( ) func (k Keeper) BuildOutboundsFromReceipt( + utxId string, receipt *evmtypes.MsgEthereumTxResponse, ) ([]*types.OutboundTx, error) { @@ -54,7 +55,8 @@ func (k Keeper) BuildOutboundsFromReceipt( TxHash: receipt.Hash, LogIndex: fmt.Sprintf("%d", lg.Index), }, - Index: fmt.Sprintf("%s:%d", receipt.Hash, lg.Index), + OutboundStatus: types.Status_PENDING, + Id: types.GetOutboundIndex(utxId, receipt.Hash, lg.Index), } outbounds = append(outbounds, outbound) @@ -104,7 +106,7 @@ func (k Keeper) AttachOutboundsToExistingUniversalTx( receipt *evmtypes.MsgEthereumTxResponse, utx types.UniversalTx, ) error { - outbounds, err := k.BuildOutboundsFromReceipt(receipt) + outbounds, err := k.BuildOutboundsFromReceipt(utx.Id, receipt) if err != nil { return err } @@ -120,7 +122,12 @@ func (k Keeper) CreateUniversalTxFromReceiptIfOutbound( receipt *evmtypes.MsgEthereumTxResponse, pcTx types.PCTx, ) error { - outbounds, err := k.BuildOutboundsFromReceipt(receipt) + universalTxKey, err := k.BuildPcUniversalTxKey(ctx, pcTx) + if err != nil { + return errors.Wrap(err, "failed to create UniversalTx key") + } + + outbounds, err := k.BuildOutboundsFromReceipt(universalTxKey, receipt) if err != nil { return err } @@ -154,12 +161,15 @@ func (k Keeper) attachOutboundsToUtx( utx.OutboundTx = append(utx.OutboundTx, outbound) evt, err := types.NewOutboundCreatedEvent(types.OutboundCreatedEvent{ - OutboundIndex: outbound.Index, + UniversalTxId: utxId, + OutboundId: outbound.Id, DestinationChain: outbound.DestinationChain, Recipient: outbound.Recipient, Amount: outbound.Amount, AssetAddr: outbound.AssetAddr, Sender: outbound.Sender, + Payload: outbound.Payload, + GasLimit: outbound.GasLimit, TxType: outbound.TxType.String(), PcTxHash: outbound.PcTx.TxHash, LogIndex: outbound.PcTx.LogIndex, diff --git a/x/uexecutor/types/keys.go b/x/uexecutor/types/keys.go index 2bef72c2..2e26b7e3 100755 --- a/x/uexecutor/types/keys.go +++ b/x/uexecutor/types/keys.go @@ -59,3 +59,29 @@ func GetPcUniversalTxKey(pcCaip string, pc PCTx) string { hash := sha256.Sum256([]byte(data)) return hex.EncodeToString(hash[:]) } + +func GetOutboundBallotKey( + utxId string, + outboundIndex string, + observedTx OutboundObservation, +) (string, error) { + + bz, err := observedTx.Marshal() + if err != nil { + return "", err + } + + data := append([]byte(utxId+":"+outboundIndex+":"), bz...) + hash := sha256.Sum256(data) + + return hex.EncodeToString(hash[:]), nil +} + +func GetOutboundId( + utxId, pcTxHash string, + logIndex uint64, +) string { + data := fmt.Sprintf("%s:%s:%d", utxId, pcTxHash, logIndex) + hash := sha256.Sum256([]byte(data)) + return hex.EncodeToString(hash[:]) +} From b03b02d6e9592c4e936c7b67b2c78db8b6f8735e Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Fri, 28 Nov 2025 11:17:10 +0530 Subject: [PATCH 031/120] refactor: added generated protobuf --- x/uexecutor/types/tx.pb.go | 605 ++++++++++++++++++++++--- x/uexecutor/types/types.pb.go | 474 ++++++------------- x/uexecutor/types/universal_tx_test.go | 2 +- 3 files changed, 703 insertions(+), 378 deletions(-) diff --git a/x/uexecutor/types/tx.pb.go b/x/uexecutor/types/tx.pb.go index cdaff70f..6fe87f22 100644 --- a/x/uexecutor/types/tx.pb.go +++ b/x/uexecutor/types/tx.pb.go @@ -543,6 +543,113 @@ func (m *MsgVoteInboundResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgVoteInboundResponse proto.InternalMessageInfo +// MsgVoteOutbound allows a universal validator to vote on an outbound tx observation. +type MsgVoteOutbound struct { + // signer is the Cosmos address initiating the tx (used for tx signing) + Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty"` + UtxId string `protobuf:"bytes,2,opt,name=utx_id,json=utxId,proto3" json:"utx_id,omitempty"` + OutboundId string `protobuf:"bytes,3,opt,name=outbound_id,json=outboundId,proto3" json:"outbound_id,omitempty"` + ObservedTx *OutboundObservation `protobuf:"bytes,4,opt,name=observed_tx,json=observedTx,proto3" json:"observed_tx,omitempty"` +} + +func (m *MsgVoteOutbound) Reset() { *m = MsgVoteOutbound{} } +func (m *MsgVoteOutbound) String() string { return proto.CompactTextString(m) } +func (*MsgVoteOutbound) ProtoMessage() {} +func (*MsgVoteOutbound) Descriptor() ([]byte, []int) { + return fileDescriptor_88d6216044506365, []int{10} +} +func (m *MsgVoteOutbound) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgVoteOutbound) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgVoteOutbound.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgVoteOutbound) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgVoteOutbound.Merge(m, src) +} +func (m *MsgVoteOutbound) XXX_Size() int { + return m.Size() +} +func (m *MsgVoteOutbound) XXX_DiscardUnknown() { + xxx_messageInfo_MsgVoteOutbound.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgVoteOutbound proto.InternalMessageInfo + +func (m *MsgVoteOutbound) GetSigner() string { + if m != nil { + return m.Signer + } + return "" +} + +func (m *MsgVoteOutbound) GetUtxId() string { + if m != nil { + return m.UtxId + } + return "" +} + +func (m *MsgVoteOutbound) GetOutboundId() string { + if m != nil { + return m.OutboundId + } + return "" +} + +func (m *MsgVoteOutbound) GetObservedTx() *OutboundObservation { + if m != nil { + return m.ObservedTx + } + return nil +} + +// MsgVoteInboundResponse defines the response for MsgExecutePayload. +type MsgVoteOutboundResponse struct { +} + +func (m *MsgVoteOutboundResponse) Reset() { *m = MsgVoteOutboundResponse{} } +func (m *MsgVoteOutboundResponse) String() string { return proto.CompactTextString(m) } +func (*MsgVoteOutboundResponse) ProtoMessage() {} +func (*MsgVoteOutboundResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_88d6216044506365, []int{11} +} +func (m *MsgVoteOutboundResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgVoteOutboundResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgVoteOutboundResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgVoteOutboundResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgVoteOutboundResponse.Merge(m, src) +} +func (m *MsgVoteOutboundResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgVoteOutboundResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgVoteOutboundResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgVoteOutboundResponse proto.InternalMessageInfo + // MsgVoteGasPrice is broadcasted by Universal Validators to submit their observed gas prices type MsgVoteGasPrice struct { Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty"` @@ -555,7 +662,7 @@ func (m *MsgVoteGasPrice) Reset() { *m = MsgVoteGasPrice{} } func (m *MsgVoteGasPrice) String() string { return proto.CompactTextString(m) } func (*MsgVoteGasPrice) ProtoMessage() {} func (*MsgVoteGasPrice) Descriptor() ([]byte, []int) { - return fileDescriptor_88d6216044506365, []int{10} + return fileDescriptor_88d6216044506365, []int{12} } func (m *MsgVoteGasPrice) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -620,7 +727,7 @@ func (m *MsgVoteGasPriceResponse) Reset() { *m = MsgVoteGasPriceResponse func (m *MsgVoteGasPriceResponse) String() string { return proto.CompactTextString(m) } func (*MsgVoteGasPriceResponse) ProtoMessage() {} func (*MsgVoteGasPriceResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_88d6216044506365, []int{11} + return fileDescriptor_88d6216044506365, []int{13} } func (m *MsgVoteGasPriceResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -660,6 +767,8 @@ func init() { proto.RegisterType((*MsgExecutePayloadResponse)(nil), "uexecutor.v1.MsgExecutePayloadResponse") proto.RegisterType((*MsgVoteInbound)(nil), "uexecutor.v1.MsgVoteInbound") proto.RegisterType((*MsgVoteInboundResponse)(nil), "uexecutor.v1.MsgVoteInboundResponse") + proto.RegisterType((*MsgVoteOutbound)(nil), "uexecutor.v1.MsgVoteOutbound") + proto.RegisterType((*MsgVoteOutboundResponse)(nil), "uexecutor.v1.MsgVoteOutboundResponse") proto.RegisterType((*MsgVoteGasPrice)(nil), "uexecutor.v1.MsgVoteGasPrice") proto.RegisterType((*MsgVoteGasPriceResponse)(nil), "uexecutor.v1.MsgVoteGasPriceResponse") } @@ -667,58 +776,63 @@ func init() { func init() { proto.RegisterFile("uexecutor/v1/tx.proto", fileDescriptor_88d6216044506365) } var fileDescriptor_88d6216044506365 = []byte{ - // 807 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x56, 0xcf, 0x6f, 0xda, 0x48, - 0x14, 0xc6, 0x81, 0x10, 0x31, 0xa0, 0x24, 0x38, 0x24, 0x80, 0xb3, 0x21, 0x89, 0xf7, 0x57, 0x96, - 0x6c, 0xf0, 0x86, 0x95, 0x72, 0xe0, 0x06, 0x49, 0xb4, 0x1b, 0x45, 0xac, 0x58, 0x37,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 0x72, 0xc7, 0xc0, 0x2a, 0x92, 0x06, 0xd2, 0xf8, - 0xc6, 0xb1, 0x97, 0x43, 0x3b, 0xce, 0x5e, 0x02, 0x7f, 0xff, 0x08, 0x00, 0x00, 0xff, 0xff, 0xad, - 0xe3, 0x80, 0xc5, 0xa7, 0x08, 0x00, 0x00, + // 893 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x56, 0xbf, 0x6f, 0xdb, 0x46, + 0x18, 0x35, 0x63, 0x59, 0x81, 0x3e, 0x09, 0x89, 0xc5, 0xc8, 0xb1, 0xcc, 0x34, 0xb2, 0xcd, 0xfe, + 0x72, 0x9d, 0x5a, 0x6c, 0x54, 0x20, 0x83, 0x36, 0x2b, 0x31, 0x5a, 0x21, 0x50, 0xa3, 0xb2, 0x56, + 0x87, 0x2c, 0xc2, 0x89, 0xbc, 0x52, 0x44, 0x25, 0x1e, 0xc1, 0x3b, 0x0a, 0xd4, 0x56, 0x74, 0xec, + 0xd4, 0xa9, 0xff, 0x44, 0x17, 0x0f, 0xfd, 0x03, 0x3a, 0x66, 0x6a, 0x83, 0x16, 0x05, 0x3a, 0x15, + 0x85, 0x35, 0xf8, 0xdf, 0x08, 0x78, 0xfc, 0x4d, 0x49, 0x09, 0xe0, 0xc9, 0x8b, 0x70, 0x7c, 0xef, + 0xfb, 0x9e, 0xbe, 0xf7, 0x78, 0x3c, 0x12, 0x76, 0x5c, 0xec, 0x61, 0xcd, 0x65, 0xc4, 0x51, 0x66, + 0x8f, 0x15, 0xe6, 0x35, 0x6d, 0x87, 0x30, 0x22, 0x56, 0x62, 0xb8, 0x39, 0x7b, 0x2c, 0x55, 0xd1, + 0xd4, 0xb4, 0x88, 0xc2, 0x7f, 0x83, 0x02, 0x69, 0x57, 0x23, 0x74, 0x4a, 0xa8, 0x32, 0xa5, 0x86, + 0xdf, 0x38, 0xa5, 0x46, 0x48, 0xd4, 0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0x4d, + 0x00, 0x00, 0x00, 0xff, 0xff, 0xb6, 0xa3, 0x2b, 0x16, 0xfe, 0x09, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -745,6 +859,8 @@ type MsgClient interface { ExecutePayload(ctx context.Context, in *MsgExecutePayload, opts ...grpc.CallOption) (*MsgExecutePayloadResponse, error) // VoteInbound defines a message for voting on synthetic assets bridging from external chain to PC VoteInbound(ctx context.Context, in *MsgVoteInbound, opts ...grpc.CallOption) (*MsgVoteInboundResponse, error) + // VoteOutbound defines a message for voting on a observed outbound tx on external chain + VoteOutbound(ctx context.Context, in *MsgVoteOutbound, opts ...grpc.CallOption) (*MsgVoteOutboundResponse, error) // VoteGasPrice defines a message for universal validators to vote on the gas price VoteGasPrice(ctx context.Context, in *MsgVoteGasPrice, opts ...grpc.CallOption) (*MsgVoteGasPriceResponse, error) } @@ -802,6 +918,15 @@ func (c *msgClient) VoteInbound(ctx context.Context, in *MsgVoteInbound, opts .. return out, nil } +func (c *msgClient) VoteOutbound(ctx context.Context, in *MsgVoteOutbound, opts ...grpc.CallOption) (*MsgVoteOutboundResponse, error) { + out := new(MsgVoteOutboundResponse) + err := c.cc.Invoke(ctx, "/uexecutor.v1.Msg/VoteOutbound", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *msgClient) VoteGasPrice(ctx context.Context, in *MsgVoteGasPrice, opts ...grpc.CallOption) (*MsgVoteGasPriceResponse, error) { out := new(MsgVoteGasPriceResponse) err := c.cc.Invoke(ctx, "/uexecutor.v1.Msg/VoteGasPrice", in, out, opts...) @@ -825,6 +950,8 @@ type MsgServer interface { ExecutePayload(context.Context, *MsgExecutePayload) (*MsgExecutePayloadResponse, error) // VoteInbound defines a message for voting on synthetic assets bridging from external chain to PC VoteInbound(context.Context, *MsgVoteInbound) (*MsgVoteInboundResponse, error) + // VoteOutbound defines a message for voting on a observed outbound tx on external chain + VoteOutbound(context.Context, *MsgVoteOutbound) (*MsgVoteOutboundResponse, error) // VoteGasPrice defines a message for universal validators to vote on the gas price VoteGasPrice(context.Context, *MsgVoteGasPrice) (*MsgVoteGasPriceResponse, error) } @@ -848,6 +975,9 @@ func (*UnimplementedMsgServer) ExecutePayload(ctx context.Context, req *MsgExecu func (*UnimplementedMsgServer) VoteInbound(ctx context.Context, req *MsgVoteInbound) (*MsgVoteInboundResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method VoteInbound not implemented") } +func (*UnimplementedMsgServer) VoteOutbound(ctx context.Context, req *MsgVoteOutbound) (*MsgVoteOutboundResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method VoteOutbound not implemented") +} func (*UnimplementedMsgServer) VoteGasPrice(ctx context.Context, req *MsgVoteGasPrice) (*MsgVoteGasPriceResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method VoteGasPrice not implemented") } @@ -946,6 +1076,24 @@ func _Msg_VoteInbound_Handler(srv interface{}, ctx context.Context, dec func(int return interceptor(ctx, in, info, handler) } +func _Msg_VoteOutbound_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgVoteOutbound) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).VoteOutbound(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/uexecutor.v1.Msg/VoteOutbound", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).VoteOutbound(ctx, req.(*MsgVoteOutbound)) + } + return interceptor(ctx, in, info, handler) +} + func _Msg_VoteGasPrice_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgVoteGasPrice) if err := dec(in); err != nil { @@ -988,6 +1136,10 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ MethodName: "VoteInbound", Handler: _Msg_VoteInbound_Handler, }, + { + MethodName: "VoteOutbound", + Handler: _Msg_VoteOutbound_Handler, + }, { MethodName: "VoteGasPrice", Handler: _Msg_VoteGasPrice_Handler, @@ -1360,6 +1512,85 @@ func (m *MsgVoteInboundResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } +func (m *MsgVoteOutbound) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgVoteOutbound) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgVoteOutbound) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.ObservedTx != nil { + { + size, err := m.ObservedTx.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + if len(m.OutboundId) > 0 { + i -= len(m.OutboundId) + copy(dAtA[i:], m.OutboundId) + i = encodeVarintTx(dAtA, i, uint64(len(m.OutboundId))) + i-- + dAtA[i] = 0x1a + } + if len(m.UtxId) > 0 { + i -= len(m.UtxId) + copy(dAtA[i:], m.UtxId) + i = encodeVarintTx(dAtA, i, uint64(len(m.UtxId))) + i-- + dAtA[i] = 0x12 + } + if len(m.Signer) > 0 { + i -= len(m.Signer) + copy(dAtA[i:], m.Signer) + i = encodeVarintTx(dAtA, i, uint64(len(m.Signer))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgVoteOutboundResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgVoteOutboundResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgVoteOutboundResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + func (m *MsgVoteGasPrice) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1589,6 +1820,40 @@ func (m *MsgVoteInboundResponse) Size() (n int) { return n } +func (m *MsgVoteOutbound) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Signer) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.UtxId) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.OutboundId) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.ObservedTx != nil { + l = m.ObservedTx.Size() + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgVoteOutboundResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + func (m *MsgVoteGasPrice) Size() (n int) { if m == nil { return 0 @@ -2630,6 +2895,238 @@ func (m *MsgVoteInboundResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *MsgVoteOutbound) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgVoteOutbound: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgVoteOutbound: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Signer", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + 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 ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Signer = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UtxId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + 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 ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.UtxId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OutboundId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + 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 ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OutboundId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ObservedTx", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ObservedTx == nil { + m.ObservedTx = &OutboundObservation{} + } + if err := m.ObservedTx.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgVoteOutboundResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgVoteOutboundResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgVoteOutboundResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *MsgVoteGasPrice) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/x/uexecutor/types/types.pb.go b/x/uexecutor/types/types.pb.go index ff22ab24..b5111d2b 100644 --- a/x/uexecutor/types/types.pb.go +++ b/x/uexecutor/types/types.pb.go @@ -104,19 +104,19 @@ type Status int32 const ( Status_UNSPECIFIED Status = 0 Status_PENDING Status = 1 - Status_FINALIZED Status = 2 + Status_OBSERVED Status = 2 ) var Status_name = map[int32]string{ 0: "UNSPECIFIED", 1: "PENDING", - 2: "FINALIZED", + 2: "OBSERVED", } var Status_value = map[string]int32{ "UNSPECIFIED": 0, "PENDING": 1, - "FINALIZED": 2, + "OBSERVED": 2, } func (x Status) String() string { @@ -376,50 +376,6 @@ func (m *UniversalAccountId) GetOwner() string { return "" } -type InboundStatus struct { - Status Status `protobuf:"varint,1,opt,name=status,proto3,enum=uexecutor.v1.Status" json:"status,omitempty"` -} - -func (m *InboundStatus) Reset() { *m = InboundStatus{} } -func (m *InboundStatus) String() string { return proto.CompactTextString(m) } -func (*InboundStatus) ProtoMessage() {} -func (*InboundStatus) Descriptor() ([]byte, []int) { - return fileDescriptor_fab6d3ca71d1e2a5, []int{3} -} -func (m *InboundStatus) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *InboundStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_InboundStatus.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *InboundStatus) XXX_Merge(src proto.Message) { - xxx_messageInfo_InboundStatus.Merge(m, src) -} -func (m *InboundStatus) XXX_Size() int { - return m.Size() -} -func (m *InboundStatus) XXX_DiscardUnknown() { - xxx_messageInfo_InboundStatus.DiscardUnknown(m) -} - -var xxx_messageInfo_InboundStatus proto.InternalMessageInfo - -func (m *InboundStatus) GetStatus() Status { - if m != nil { - return m.Status - } - return Status_UNSPECIFIED -} - type Inbound struct { SourceChain string `protobuf:"bytes,1,opt,name=source_chain,json=sourceChain,proto3" json:"source_chain,omitempty"` TxHash string `protobuf:"bytes,2,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` @@ -436,7 +392,7 @@ type Inbound struct { func (m *Inbound) Reset() { *m = Inbound{} } func (*Inbound) ProtoMessage() {} func (*Inbound) Descriptor() ([]byte, []int) { - return fileDescriptor_fab6d3ca71d1e2a5, []int{4} + return fileDescriptor_fab6d3ca71d1e2a5, []int{3} } func (m *Inbound) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -547,7 +503,7 @@ type PCTx struct { func (m *PCTx) Reset() { *m = PCTx{} } func (*PCTx) ProtoMessage() {} func (*PCTx) Descriptor() ([]byte, []int) { - return fileDescriptor_fab6d3ca71d1e2a5, []int{5} + return fileDescriptor_fab6d3ca71d1e2a5, []int{4} } func (m *PCTx) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -619,17 +575,16 @@ func (m *PCTx) GetErrorMsg() string { } type OutboundObservation struct { - DestinationChain string `protobuf:"bytes,1,opt,name=destination_chain,json=destinationChain,proto3" json:"destination_chain,omitempty"` - Success bool `protobuf:"varint,2,opt,name=success,proto3" json:"success,omitempty"` - BlockHeight uint64 `protobuf:"varint,3,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` - TxHash string `protobuf:"bytes,4,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` + Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` + BlockHeight uint64 `protobuf:"varint,2,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` + TxHash string `protobuf:"bytes,3,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` } func (m *OutboundObservation) Reset() { *m = OutboundObservation{} } func (m *OutboundObservation) String() string { return proto.CompactTextString(m) } func (*OutboundObservation) ProtoMessage() {} func (*OutboundObservation) Descriptor() ([]byte, []int) { - return fileDescriptor_fab6d3ca71d1e2a5, []int{6} + return fileDescriptor_fab6d3ca71d1e2a5, []int{5} } func (m *OutboundObservation) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -658,13 +613,6 @@ func (m *OutboundObservation) XXX_DiscardUnknown() { var xxx_messageInfo_OutboundObservation proto.InternalMessageInfo -func (m *OutboundObservation) GetDestinationChain() string { - if m != nil { - return m.DestinationChain - } - return "" -} - func (m *OutboundObservation) GetSuccess() bool { if m != nil { return m.Success @@ -695,7 +643,7 @@ func (m *Originating_Pc_TX) Reset() { *m = Originating_Pc_TX{} } func (m *Originating_Pc_TX) String() string { return proto.CompactTextString(m) } func (*Originating_Pc_TX) ProtoMessage() {} func (*Originating_Pc_TX) Descriptor() ([]byte, []int) { - return fileDescriptor_fab6d3ca71d1e2a5, []int{7} + return fileDescriptor_fab6d3ca71d1e2a5, []int{6} } func (m *Originating_Pc_TX) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -749,13 +697,14 @@ type OutboundTx struct { TxType TxType `protobuf:"varint,8,opt,name=tx_type,json=txType,proto3,enum=uexecutor.v1.TxType" json:"tx_type,omitempty"` PcTx *Originating_Pc_TX `protobuf:"bytes,9,opt,name=pc_tx,json=pcTx,proto3" json:"pc_tx,omitempty"` ObservedTx *OutboundObservation `protobuf:"bytes,10,opt,name=observed_tx,json=observedTx,proto3" json:"observed_tx,omitempty"` - Index string `protobuf:"bytes,11,opt,name=index,proto3" json:"index,omitempty"` + Id string `protobuf:"bytes,11,opt,name=id,proto3" json:"id,omitempty"` + OutboundStatus Status `protobuf:"varint,12,opt,name=outbound_status,json=outboundStatus,proto3,enum=uexecutor.v1.Status" json:"outbound_status,omitempty"` } func (m *OutboundTx) Reset() { *m = OutboundTx{} } func (*OutboundTx) ProtoMessage() {} func (*OutboundTx) Descriptor() ([]byte, []int) { - return fileDescriptor_fab6d3ca71d1e2a5, []int{8} + return fileDescriptor_fab6d3ca71d1e2a5, []int{7} } func (m *OutboundTx) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -854,13 +803,20 @@ func (m *OutboundTx) GetObservedTx() *OutboundObservation { return nil } -func (m *OutboundTx) GetIndex() string { +func (m *OutboundTx) GetId() string { if m != nil { - return m.Index + return m.Id } return "" } +func (m *OutboundTx) GetOutboundStatus() Status { + if m != nil { + return m.OutboundStatus + } + return Status_UNSPECIFIED +} + type UniversalTx struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` InboundTx *Inbound `protobuf:"bytes,2,opt,name=inbound_tx,json=inboundTx,proto3" json:"inbound_tx,omitempty"` @@ -872,7 +828,7 @@ type UniversalTx struct { func (m *UniversalTx) Reset() { *m = UniversalTx{} } func (*UniversalTx) ProtoMessage() {} func (*UniversalTx) Descriptor() ([]byte, []int) { - return fileDescriptor_fab6d3ca71d1e2a5, []int{9} + return fileDescriptor_fab6d3ca71d1e2a5, []int{8} } func (m *UniversalTx) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -944,7 +900,6 @@ func init() { proto.RegisterType((*Params)(nil), "uexecutor.v1.Params") proto.RegisterType((*UniversalPayload)(nil), "uexecutor.v1.UniversalPayload") proto.RegisterType((*UniversalAccountId)(nil), "uexecutor.v1.UniversalAccountId") - proto.RegisterType((*InboundStatus)(nil), "uexecutor.v1.InboundStatus") proto.RegisterType((*Inbound)(nil), "uexecutor.v1.Inbound") proto.RegisterType((*PCTx)(nil), "uexecutor.v1.PCTx") proto.RegisterType((*OutboundObservation)(nil), "uexecutor.v1.OutboundObservation") @@ -956,93 +911,91 @@ func init() { func init() { proto.RegisterFile("uexecutor/v1/types.proto", fileDescriptor_fab6d3ca71d1e2a5) } var fileDescriptor_fab6d3ca71d1e2a5 = []byte{ - // 1361 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x56, 0xcf, 0x6f, 0xdb, 0xc6, - 0x12, 0x36, 0xf5, 0x5b, 0x23, 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0x94, - 0x1f, 0x3f, 0xd6, 0x96, 0xde, 0x7f, 0xac, 0x2d, 0xfd, 0xf6, 0xb1, 0xb6, 0xf4, 0xea, 0xb9, 0x65, - 0xfb, 0xa3, 0xe0, 0x74, 0xd7, 0x70, 0x27, 0x7b, 0xd3, 0x80, 0x8d, 0xc4, 0xa8, 0x13, 0xab, 0x47, - 0x62, 0xf9, 0xc8, 0x71, 0x4d, 0xba, 0x17, 0xee, 0xcd, 0x95, 0x24, 0x7e, 0x88, 0x9f, 0x16, 0xc4, - 0x4f, 0xea, 0xcf, 0xfe, 0x0e, 0x00, 0x00, 0xff, 0xff, 0x27, 0x71, 0xe3, 0xc6, 0xa5, 0x0b, 0x00, - 0x00, + // 1341 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x56, 0x3d, 0x6f, 0xdb, 0x46, + 0x18, 0x36, 0xf5, 0xad, 0x57, 0x86, 0x4d, 0x5f, 0x9c, 0x84, 0xf9, 0x92, 0x1d, 0xa5, 0x45, 0x0c, + 0x17, 0xb1, 0x91, 0x34, 0x0d, 0x50, 0x03, 0x1d, 0x64, 0x49, 0x76, 0xd4, 0xba, 0x92, 0x40, 0x51, + 0x86, 0xdb, 0xe5, 0x70, 0x26, 0x2f, 0x14, 0x51, 0x89, 0x27, 0xf0, 0x43, 0xa5, 0xe7, 0x6e, 0x9d, + 0x3a, 0x74, 0xc8, 0x98, 0xb1, 0x63, 0x7f, 0x46, 0xc6, 0x8c, 0x05, 0xba, 0x14, 0xc9, 0xd0, 0xfe, + 0x85, 0x6e, 0xc5, 0x1d, 0x49, 0x91, 0x94, 0xed, 0xa2, 0x5d, 0xec, 0x7b, 0xbf, 0xee, 0x9e, 0x7b, + 0xde, 0xe7, 0x3d, 0x0a, 0x14, 0x9f, 0x06, 0x54, 0xf7, 0x3d, 0xe6, 0xec, 0xcf, 0x9f, 0xee, 0x7b, + 0x17, 0x33,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x6b, 0x41, 0x29, 0x1c, 0x57, 0x84, 0x60, + 0x2d, 0x55, 0x85, 0xb5, 0x33, 0x79, 0x05, 0x95, 0x21, 0x7f, 0xdc, 0xe4, 0x94, 0x54, 0xa1, 0x78, + 0x34, 0xea, 0xb5, 0x87, 0x72, 0x8e, 0xdf, 0x46, 0x2c, 0x71, 0x93, 0xe3, 0x6e, 0x7e, 0x73, 0xd2, + 0x6f, 0xb6, 0xe5, 0x3c, 0x47, 0x78, 0xdc, 0xcc, 0x3a, 0x0b, 0xe2, 0xe0, 0xc8, 0x28, 0x1e, 0x0e, + 0xde, 0xbe, 0xaf, 0x4b, 0xef, 0xde, 0xd7, 0xa5, 0x3f, 0xde, 0xd7, 0xa5, 0x9f, 0x3e, 0xd4, 0x57, + 0xde, 0x7d, 0xa8, 0xaf, 0xfc, 0xf6, 0xa1, 0xbe, 0xf2, 0xed, 0x0b, 0xd3, 0xf2, 0xc6, 0xfe, 0xf9, + 0x9e, 0xce, 0xa6, 0xfb, 0x33, 0xdf, 0x1d, 0x8b, 0x27, 0x52, 0xac, 0x9e, 0x88, 0xe5, 0x13, 0x9b, + 0x19, 0x74, 0x3f, 0xd8, 0x4f, 0x84, 0x24, 0x7e, 0x54, 0x9f, 0x97, 0xc4, 0xcf, 0xe3, 0x4f, 0xff, + 0x09, 0x00, 0x00, 0xff, 0xff, 0xc1, 0x10, 0x80, 0x01, 0x71, 0x0b, 0x00, 0x00, } func (this *Params) Equal(that interface{}) bool { @@ -1256,9 +1209,6 @@ func (this *OutboundObservation) Equal(that interface{}) bool { } else if this == nil { return false } - if this.DestinationChain != that1.DestinationChain { - return false - } if this.Success != that1.Success { return false } @@ -1346,7 +1296,10 @@ func (this *OutboundTx) Equal(that interface{}) bool { if !this.ObservedTx.Equal(that1.ObservedTx) { return false } - if this.Index != that1.Index { + if this.Id != that1.Id { + return false + } + if this.OutboundStatus != that1.OutboundStatus { return false } return true @@ -1558,34 +1511,6 @@ func (m *UniversalAccountId) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *InboundStatus) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *InboundStatus) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *InboundStatus) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Status != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Status)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - func (m *Inbound) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1768,12 +1693,12 @@ func (m *OutboundObservation) MarshalToSizedBuffer(dAtA []byte) (int, error) { copy(dAtA[i:], m.TxHash) i = encodeVarintTypes(dAtA, i, uint64(len(m.TxHash))) i-- - dAtA[i] = 0x22 + dAtA[i] = 0x1a } if m.BlockHeight != 0 { i = encodeVarintTypes(dAtA, i, uint64(m.BlockHeight)) i-- - dAtA[i] = 0x18 + dAtA[i] = 0x10 } if m.Success { i-- @@ -1783,14 +1708,7 @@ func (m *OutboundObservation) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0 } i-- - dAtA[i] = 0x10 - } - if len(m.DestinationChain) > 0 { - i -= len(m.DestinationChain) - copy(dAtA[i:], m.DestinationChain) - i = encodeVarintTypes(dAtA, i, uint64(len(m.DestinationChain))) - i-- - dAtA[i] = 0xa + dAtA[i] = 0x8 } return len(dAtA) - i, nil } @@ -1852,10 +1770,15 @@ func (m *OutboundTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if len(m.Index) > 0 { - i -= len(m.Index) - copy(dAtA[i:], m.Index) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Index))) + if m.OutboundStatus != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.OutboundStatus)) + i-- + dAtA[i] = 0x60 + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Id))) i-- dAtA[i] = 0x5a } @@ -2103,18 +2026,6 @@ func (m *UniversalAccountId) Size() (n int) { return n } -func (m *InboundStatus) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Status != 0 { - n += 1 + sovTypes(uint64(m.Status)) - } - return n -} - func (m *Inbound) Size() (n int) { if m == nil { return 0 @@ -2200,10 +2111,6 @@ func (m *OutboundObservation) Size() (n int) { } var l int _ = l - l = len(m.DestinationChain) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } if m.Success { n += 2 } @@ -2279,10 +2186,13 @@ func (m *OutboundTx) Size() (n int) { l = m.ObservedTx.Size() n += 1 + l + sovTypes(uint64(l)) } - l = len(m.Index) + l = len(m.Id) if l > 0 { n += 1 + l + sovTypes(uint64(l)) } + if m.OutboundStatus != 0 { + n += 1 + sovTypes(uint64(m.OutboundStatus)) + } return n } @@ -2865,75 +2775,6 @@ func (m *UniversalAccountId) Unmarshal(dAtA []byte) error { } return nil } -func (m *InboundStatus) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: InboundStatus: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: InboundStatus: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) - } - m.Status = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Status |= Status(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func (m *Inbound) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3541,38 +3382,6 @@ func (m *OutboundObservation) Unmarshal(dAtA []byte) error { } switch fieldNum { case 1: - 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 ErrIntOverflowTypes - } - 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 ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DestinationChain = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Success", wireType) } @@ -3592,7 +3401,7 @@ func (m *OutboundObservation) Unmarshal(dAtA []byte) error { } } m.Success = bool(v != 0) - case 3: + case 2: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field BlockHeight", wireType) } @@ -3611,7 +3420,7 @@ func (m *OutboundObservation) Unmarshal(dAtA []byte) error { break } } - case 4: + case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field TxHash", wireType) } @@ -4124,7 +3933,7 @@ func (m *OutboundTx) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 11: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -4152,8 +3961,27 @@ func (m *OutboundTx) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Index = string(dAtA[iNdEx:postIndex]) + m.Id = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 12: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OutboundStatus", wireType) + } + m.OutboundStatus = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.OutboundStatus |= Status(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipTypes(dAtA[iNdEx:]) diff --git a/x/uexecutor/types/universal_tx_test.go b/x/uexecutor/types/universal_tx_test.go index 902280e5..070a9127 100644 --- a/x/uexecutor/types/universal_tx_test.go +++ b/x/uexecutor/types/universal_tx_test.go @@ -43,7 +43,7 @@ func TestUniversalTx_ValidateBasic(t *testing.T) { TxHash: "0xpc123", LogIndex: "1", }, - Index: "0", + Id: "0", }, }, UniversalStatus: types.UniversalTxStatus_PC_EXECUTED_SUCCESS, From d8bc2104e48f9a747a9b4d5b3d1b4b0b112a0bf1 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Fri, 28 Nov 2025 11:17:37 +0530 Subject: [PATCH 032/120] refactor: updated outbound_tx type --- x/uexecutor/types/outbound_tx.go | 53 +++++++++++++++++++++++++++++--- 1 file changed, 48 insertions(+), 5 deletions(-) diff --git a/x/uexecutor/types/outbound_tx.go b/x/uexecutor/types/outbound_tx.go index 3f6d5db6..d8e20229 100644 --- a/x/uexecutor/types/outbound_tx.go +++ b/x/uexecutor/types/outbound_tx.go @@ -92,9 +92,6 @@ func (p OutboundTx) ValidateBasic() error { // observed tx validation (if present) if p.ObservedTx != nil { if strings.TrimSpace(p.ObservedTx.TxHash) != "" { - if strings.TrimSpace(p.ObservedTx.DestinationChain) == "" { - return errors.Wrap(sdkerrors.ErrInvalidRequest, "observed_tx.destination_chain cannot be empty") - } if p.ObservedTx.BlockHeight == 0 { return errors.Wrap(sdkerrors.ErrInvalidRequest, "observed_tx.block_height must be > 0") } @@ -102,8 +99,54 @@ func (p OutboundTx) ValidateBasic() error { } // index - if strings.TrimSpace(p.Index) == "" { - return errors.Wrap(sdkerrors.ErrInvalidRequest, "index cannot be empty") + if strings.TrimSpace(p.Id) == "" { + return errors.Wrap(sdkerrors.ErrInvalidRequest, "id cannot be empty") + } + + // status validation + // outbound_status validation + switch p.OutboundStatus { + case Status_UNSPECIFIED: + return errors.Wrap(sdkerrors.ErrInvalidRequest, "outbound_status cannot be UNSPECIFIED") + + case Status_PENDING: + // PENDING must NOT have observed tx data + if p.ObservedTx != nil && strings.TrimSpace(p.ObservedTx.TxHash) != "" { + return errors.Wrap( + sdkerrors.ErrInvalidRequest, + "observed_tx must be empty when outbound_status is PENDING", + ) + } + + case Status_OBSERVED: + // OBSERVED must have observed tx + if p.ObservedTx == nil { + return errors.Wrap( + sdkerrors.ErrInvalidRequest, + "observed_tx is required when outbound_status is OBSERVED", + ) + } + + if strings.TrimSpace(p.ObservedTx.TxHash) == "" { + return errors.Wrap( + sdkerrors.ErrInvalidRequest, + "observed_tx.tx_hash is required when outbound_status is OBSERVED", + ) + } + + if p.ObservedTx.BlockHeight == 0 { + return errors.Wrap( + sdkerrors.ErrInvalidRequest, + "observed_tx.block_height must be > 0 when outbound_status is OBSERVED", + ) + } + + default: + return errors.Wrapf( + sdkerrors.ErrInvalidRequest, + "invalid outbound_status: %d", + p.OutboundStatus, + ) } return nil From 8a7873ff780d47e186a0847355ac2b0d99c00190 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Fri, 28 Nov 2025 11:18:04 +0530 Subject: [PATCH 033/120] feat: added OutboundCreatedEvent --- x/uexecutor/types/events.go | 10 ++++++++-- x/uexecutor/types/outbound_tx_test.go | 6 +++--- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/x/uexecutor/types/events.go b/x/uexecutor/types/events.go index da717468..5da024f7 100644 --- a/x/uexecutor/types/events.go +++ b/x/uexecutor/types/events.go @@ -13,12 +13,15 @@ const ( // OutboundCreatedEvent represents an emitted outbound transaction. type OutboundCreatedEvent struct { - OutboundIndex string `json:"outbound_index"` + UniversalTxId string `json:"utx_id"` + OutboundId string `json:"outbound_id"` DestinationChain string `json:"destination_chain"` Recipient string `json:"recipient"` Amount string `json:"amount"` AssetAddr string `json:"asset_addr"` Sender string `json:"sender"` + Payload string `json:"payload"` + GasLimit string `json:"gas_limit"` TxType string `json:"tx_type"` PcTxHash string `json:"pc_tx_hash"` LogIndex string `json:"log_index"` @@ -33,12 +36,15 @@ func NewOutboundCreatedEvent(e OutboundCreatedEvent) (sdk.Event, error) { event := sdk.NewEvent( EventTypeOutboundCreated, - sdk.NewAttribute("outbound_index", e.OutboundIndex), + sdk.NewAttribute("utx_id", e.UniversalTxId), + sdk.NewAttribute("outbound_id", e.OutboundId), sdk.NewAttribute("destination_chain", e.DestinationChain), sdk.NewAttribute("recipient", e.Recipient), sdk.NewAttribute("amount", e.Amount), sdk.NewAttribute("asset_addr", e.AssetAddr), sdk.NewAttribute("sender", e.Sender), + sdk.NewAttribute("payload", e.Payload), + sdk.NewAttribute("gas_limit", e.GasLimit), sdk.NewAttribute("tx_type", e.TxType), sdk.NewAttribute("pc_tx_hash", e.PcTxHash), sdk.NewAttribute("log_index", e.LogIndex), diff --git a/x/uexecutor/types/outbound_tx_test.go b/x/uexecutor/types/outbound_tx_test.go index 934e0420..e65271d9 100644 --- a/x/uexecutor/types/outbound_tx_test.go +++ b/x/uexecutor/types/outbound_tx_test.go @@ -21,7 +21,7 @@ func baseValidOutbound() types.OutboundTx { TxHash: "0xpc123", LogIndex: "1", }, - Index: "0", + Id: "0", } } @@ -150,11 +150,11 @@ func TestOutboundTx_ValidateBasic(t *testing.T) { name: "empty index", outbound: func() types.OutboundTx { ob := baseValidOutbound() - ob.Index = "" + ob.Id = "" return ob }(), expectError: true, - errContains: "index cannot be empty", + errContains: "id cannot be empty", }, } From e2497633c76e0dfb9fca467a43ddaed9083f3243 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Fri, 28 Nov 2025 11:18:55 +0530 Subject: [PATCH 034/120] feat: added a keeper method to vote on outbound ballot --- x/uexecutor/keeper/create_outbound.go | 2 +- x/uexecutor/keeper/voting.go | 50 +++++++++++++++++++++++++++ 2 files changed, 51 insertions(+), 1 deletion(-) diff --git a/x/uexecutor/keeper/create_outbound.go b/x/uexecutor/keeper/create_outbound.go index f856f8c3..078454b5 100644 --- a/x/uexecutor/keeper/create_outbound.go +++ b/x/uexecutor/keeper/create_outbound.go @@ -56,7 +56,7 @@ func (k Keeper) BuildOutboundsFromReceipt( LogIndex: fmt.Sprintf("%d", lg.Index), }, OutboundStatus: types.Status_PENDING, - Id: types.GetOutboundIndex(utxId, receipt.Hash, lg.Index), + Id: types.GetOutboundId(utxId, receipt.Hash, lg.Index), } outbounds = append(outbounds, outbound) diff --git a/x/uexecutor/keeper/voting.go b/x/uexecutor/keeper/voting.go index 0fced64d..19674823 100644 --- a/x/uexecutor/keeper/voting.go +++ b/x/uexecutor/keeper/voting.go @@ -65,3 +65,53 @@ func (k Keeper) VoteOnInboundBallot( return isFinalized, isNew, nil } + +func (k Keeper) VoteOnOutboundBallot( + ctx context.Context, + universalValidator sdk.ValAddress, + utxId string, + outboundId string, + observedTx types.OutboundObservation, +) (isFinalized bool, + isNew bool, + err error) { + ballotKey, err := types.GetOutboundBallotKey(utxId, outboundId, observedTx) + if err != nil { + return false, false, err + } + + universalValidatorSet, err := k.uvalidatorKeeper.GetEligibleVoters(ctx) + if err != nil { + return false, false, err + } + + // number of validators + totalValidators := len(universalValidatorSet) + + // votesNeeded = ceil(2/3 * totalValidators) + // >2/3 quorum similar to tendermint + votesNeeded := (types.VotesThresholdNumerator*totalValidators)/types.VotesThresholdDenominator + 1 + + // Convert []sdk.ValAddress → []string + universalValidatorSetStrs := make([]string, len(universalValidatorSet)) + for i, v := range universalValidatorSet { + universalValidatorSetStrs[i] = v.IdentifyInfo.CoreValidatorAddress + } + + // Step 2: Call VoteOnBallot for this inbound synthetic + _, isFinalized, isNew, err = k.uvalidatorKeeper.VoteOnBallot( + ctx, + ballotKey, + uvalidatortypes.BallotObservationType_BALLOT_OBSERVATION_TYPE_OUTBOUND_TX, + universalValidator.String(), + uvalidatortypes.VoteResult_VOTE_RESULT_SUCCESS, + universalValidatorSetStrs, + int64(votesNeeded), + int64(types.DefaultExpiryAfterBlocks), + ) + if err != nil { + return false, false, err + } + + return isFinalized, isNew, nil +} From 3f8a24bcc843c8fb31284021a1ff55c0ecb60a09 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Fri, 28 Nov 2025 11:19:37 +0530 Subject: [PATCH 035/120] feat: added msg_vote_inbound msg server pre-check --- x/uexecutor/keeper/msg_server.go | 35 ++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/x/uexecutor/keeper/msg_server.go b/x/uexecutor/keeper/msg_server.go index f0c2d0cb..aa344492 100755 --- a/x/uexecutor/keeper/msg_server.go +++ b/x/uexecutor/keeper/msg_server.go @@ -153,3 +153,38 @@ func (ms msgServer) VoteGasPrice(ctx context.Context, msg *types.MsgVoteGasPrice } return &types.MsgVoteGasPriceResponse{}, nil } + +// VoteOutbound implements types.MsgServer. +func (ms msgServer) VoteOutbound(ctx context.Context, msg *types.MsgVoteOutbound) (*types.MsgVoteOutboundResponse, error) { + signerAccAddr, err := sdk.AccAddressFromBech32(msg.Signer) + if err != nil { + return nil, fmt.Errorf("invalid signer address: %w", err) + } + + // Convert account to validator operator address + signerValAddr := sdk.ValAddress(signerAccAddr) + + // Lookup the linked universal validator for this signer + isBonded, err := ms.k.uvalidatorKeeper.IsBondedUniversalValidator(ctx, msg.Signer) + if err != nil { + return nil, errors.Wrapf(err, "failed to check bonded status for signer %s", msg.Signer) + } + if !isBonded { + return nil, fmt.Errorf("universal validator for signer %s is not bonded", msg.Signer) + } + + isTombstoned, err := ms.k.uvalidatorKeeper.IsTombstonedUniversalValidator(ctx, msg.Signer) + if err != nil { + return nil, errors.Wrapf(err, "failed to check tombstoned status for signer %s", msg.Signer) + } + if isTombstoned { + return nil, fmt.Errorf("universal validator for signer %s is tombstoned", msg.Signer) + } + + err = ms.k.VoteOutbound(ctx, signerValAddr, msg.UtxId, msg.OutboundId, *msg.ObservedTx) + if err != nil { + return nil, err + } + + return &types.MsgVoteOutboundResponse{}, nil +} From 461a2bc48c532b9d5b3e3758746779935cf2f0fa Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Fri, 28 Nov 2025 11:20:56 +0530 Subject: [PATCH 036/120] feat: added msg_vote_inbound implementation --- x/uexecutor/keeper/msg_vote_outbound.go | 89 +++++++++++++++++++++++++ x/uexecutor/keeper/outbound.go | 63 +++++++++++++++++ 2 files changed, 152 insertions(+) create mode 100644 x/uexecutor/keeper/msg_vote_outbound.go create mode 100644 x/uexecutor/keeper/outbound.go diff --git a/x/uexecutor/keeper/msg_vote_outbound.go b/x/uexecutor/keeper/msg_vote_outbound.go new file mode 100644 index 00000000..cc59c314 --- /dev/null +++ b/x/uexecutor/keeper/msg_vote_outbound.go @@ -0,0 +1,89 @@ +package keeper + +import ( + "context" + + "cosmossdk.io/errors" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/pushchain/push-chain-node/x/uexecutor/types" +) + +// VoteOutbound is for uvalidators for voting on observed outbound tx on external chain +func (k Keeper) VoteOutbound( + ctx context.Context, + universalValidator sdk.ValAddress, + utxId string, + outboundId string, + observedTx types.OutboundObservation, +) error { + sdkCtx := sdk.UnwrapSDKContext(ctx) + + // Step 1: Fetch UniversalTx + utx, found, err := k.GetUniversalTx(ctx, utxId) + if err != nil { + return err + } + if !found { + return errors.Wrap(err, "UniversalTx not found") + } + if utx.OutboundTx == nil { + return errors.Wrap(err, "No outbound tx found in the specified UniversalTx") + } + + // Step 2: Find outbound by id + var outbound types.OutboundTx + found = false + for _, ob := range utx.OutboundTx { + if ob.Id == outboundId { + outbound = *ob + found = true + break + } + } + if !found { + return errors.Wrap(err, "Outbound not found") + } + + // Prevent double-finalization + if outbound.OutboundStatus == types.Status_OBSERVED { + return nil + } + + // Use temp context to prevent partial writes + tmpCtx, commit := sdkCtx.CacheContext() + + // Step 3: Vote on outbound ballot + isFinalized, _, err := k.VoteOnOutboundBallot( + tmpCtx, + universalValidator, + utxId, + outboundId, + observedTx, + ) + if err != nil { + return err + } + + commit() + + // Step 4: Exit if not finalized yet + if !isFinalized { + return nil + } + + // Step 5: Update outbound state to OBSERVED + outbound.OutboundStatus = types.Status_OBSERVED + outbound.ObservedTx = &observedTx + + // Persist the state inside UniversalTx + if err := k.UpdateOutbound(ctx, utxId, outbound); err != nil { + return err + } + + // Step 6: Finalize outbound (refund if failed) + if err := k.FinalizeOutbound(ctx, utxId, outbound); err != nil { + return err + } + + return nil +} diff --git a/x/uexecutor/keeper/outbound.go b/x/uexecutor/keeper/outbound.go new file mode 100644 index 00000000..592b8aea --- /dev/null +++ b/x/uexecutor/keeper/outbound.go @@ -0,0 +1,63 @@ +package keeper + +import ( + "context" + "fmt" + + "github.com/pushchain/push-chain-node/x/uexecutor/types" +) + +func (k Keeper) UpdateOutbound(ctx context.Context, utxId string, outbound types.OutboundTx) error { + return k.UpdateUniversalTx(ctx, utxId, func(utx *types.UniversalTx) error { + if utx.OutboundTx == nil { + return fmt.Errorf("outbound tx list is not initialized for utx %s", utxId) + } + + updated := false + for i, ob := range utx.OutboundTx { + if ob.Id == outbound.Id { + utx.OutboundTx[i] = &outbound + updated = true + break + } + } + + if !updated { + return fmt.Errorf( + "outbound with id %s not found in utx %s", + outbound.Id, + utxId, + ) + } + + return nil + }) +} + +func (k Keeper) FinalizeOutbound(ctx context.Context, utxId string, outbound types.OutboundTx) error { + // If not observed yet, do nothing + if outbound.OutboundStatus != types.Status_OBSERVED { + return nil + } + + obs := outbound.ObservedTx + if obs == nil { + return nil + } + + // If outbound succeeded -> nothing to do + if obs.Success { + return nil + } + + // Only refund for funds-related tx types + if outbound.TxType != types.TxType_FUNDS && + outbound.TxType != types.TxType_FUNDS_AND_PAYLOAD { + return nil + } + + // Parse amount and mint as per revert Instruction + // TODO + // Store Reverted tx in Outbound + return nil +} From a86e2e26fbb02b024ba1880dc4b00e4828dda330 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Fri, 28 Nov 2025 14:55:13 +0530 Subject: [PATCH 037/120] refactor: modified the outbound event decoding as per recent event changes --- x/uexecutor/keeper/create_outbound.go | 2 +- x/uexecutor/types/abi.go | 27 ++++++++++++++------------- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/x/uexecutor/keeper/create_outbound.go b/x/uexecutor/keeper/create_outbound.go index 078454b5..8061962e 100644 --- a/x/uexecutor/keeper/create_outbound.go +++ b/x/uexecutor/keeper/create_outbound.go @@ -18,7 +18,7 @@ func (k Keeper) BuildOutboundsFromReceipt( ) ([]*types.OutboundTx, error) { outbounds := []*types.OutboundTx{} - universalGatewayPC := strings.ToLower(uregistrytypes.SYSTEM_CONTRACTS["UNIVERSAL_CORE"].Address) + universalGatewayPC := strings.ToLower(uregistrytypes.SYSTEM_CONTRACTS["UNIVERSAL_GATEWAY_PC"].Address) for _, lg := range receipt.Logs { if lg.Removed { diff --git a/x/uexecutor/types/abi.go b/x/uexecutor/types/abi.go index 087b430b..309de087 100644 --- a/x/uexecutor/types/abi.go +++ b/x/uexecutor/types/abi.go @@ -735,24 +735,24 @@ type UniversalWithdrawEvent struct { } func DecodeUniversalTxWithdrawFromLog(log *evmtypes.Log) (*UniversalWithdrawEvent, error) { - if len(log.Topics) < 4 { + if len(log.Topics) < 3 { return nil, fmt.Errorf("insufficient topics for UniversalTxWithdraw") } event := &UniversalWithdrawEvent{} - // Indexed parameters + // Indexed params event.Sender = common.HexToAddress(log.Topics[1]).Hex() - event.ChainId = string(common.FromHex(log.Topics[2])) - event.Token = common.HexToAddress(log.Topics[3]).Hex() + event.Token = common.HexToAddress(log.Topics[2]).Hex() - // Correct ABI type construction + // ABI types + stringType, _ := abi.NewType("string", "", nil) bytesType, _ := abi.NewType("bytes", "", nil) uint256Type, _ := abi.NewType("uint256", "", nil) addressType, _ := abi.NewType("address", "", nil) - // Decode non-indexed data arguments := abi.Arguments{ + {Type: stringType}, // chainId {Type: bytesType}, // target {Type: uint256Type}, // amount {Type: addressType}, // gasToken @@ -767,13 +767,14 @@ func DecodeUniversalTxWithdrawFromLog(log *evmtypes.Log) (*UniversalWithdrawEven return nil, err } - event.Target = hex.EncodeToString(values[0].([]byte)) - event.Amount = values[1].(*big.Int) - event.GasToken = values[2].(common.Address).Hex() - event.GasFee = values[3].(*big.Int) - event.GasLimit = values[4].(*big.Int) - event.Payload = hex.EncodeToString(values[5].([]byte)) - event.ProtocolFee = values[6].(*big.Int) + event.ChainId = values[0].(string) + event.Target = hex.EncodeToString(values[1].([]byte)) + event.Amount = values[2].(*big.Int) + event.GasToken = values[3].(common.Address).Hex() + event.GasFee = values[4].(*big.Int) + event.GasLimit = values[5].(*big.Int) + event.Payload = hex.EncodeToString(values[6].([]byte)) + event.ProtocolFee = values[7].(*big.Int) return event, nil } From cf255bc2fd1112392a48c59fdd33250028ea00fd Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Mon, 1 Dec 2025 13:59:14 +0530 Subject: [PATCH 038/120] refactor: added 0x in the stored recipient and payload --- x/uexecutor/types/abi.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/x/uexecutor/types/abi.go b/x/uexecutor/types/abi.go index 309de087..f2a7720c 100644 --- a/x/uexecutor/types/abi.go +++ b/x/uexecutor/types/abi.go @@ -768,12 +768,12 @@ func DecodeUniversalTxWithdrawFromLog(log *evmtypes.Log) (*UniversalWithdrawEven } event.ChainId = values[0].(string) - event.Target = hex.EncodeToString(values[1].([]byte)) + event.Target = "0x" + hex.EncodeToString(values[1].([]byte)) event.Amount = values[2].(*big.Int) event.GasToken = values[3].(common.Address).Hex() event.GasFee = values[4].(*big.Int) event.GasLimit = values[5].(*big.Int) - event.Payload = hex.EncodeToString(values[6].([]byte)) + event.Payload = "0x" + hex.EncodeToString(values[6].([]byte)) event.ProtocolFee = values[7].(*big.Int) return event, nil From 29a479ae4cd3e60cde92ee21becfaba7ffcc0d4d Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Mon, 1 Dec 2025 14:00:13 +0530 Subject: [PATCH 039/120] feat: completed the setup of universalGatewayPC in integration tests --- test/utils/bytecode.go | 4 +- test/utils/constants.go | 30 ++++++++------- test/utils/contracts_setup.go | 69 +++++++++++++++++++++++++++++++++++ 3 files changed, 88 insertions(+), 15 deletions(-) diff --git a/test/utils/bytecode.go b/test/utils/bytecode.go index 22df05f2..1c32ba3e 100644 --- a/test/utils/bytecode.go +++ b/test/utils/bytecode.go @@ -1,6 +1,6 @@ package utils -const UEA_EVM_BYTECODE = "6080604052348015600e575f80fd5b5060015f55611a2d806100205f395ff3fe6080604052600436106100bb575f3560e01c8063affed0e011610071578063f698da251161004c578063f698da2514610208578063f85135cc1461021c578063ffa1ad741461023d575f80fd5b8063affed0e0146101a5578063ebcd653b146101ba578063f0a136bc146101e9575f80fd5b80633042c33e116100a15780633042c33e1461012b57806338e198011461014c578063872347cf14610186575f80fd5b80631db61b54146100c65780632f546ac91461010c575f80fd5b366100c257005b5f80fd5b3480156100d1575f80fd5b506100f97f2aef22f9d7df5f9d21c56d14029233f3fdaa91917727e1eb68e504d27072d6cd81565b6040519081526020015b60405180910390f35b348015610117575f80fd5b506100f961012636600461102f565b610292565b348015610136575f80fd5b5061014a61014536600461116e565b610451565b005b348015610157575f80fd5b5061016161090181565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610103565b348015610191575f80fd5b5061014a6101a0366004611275565b6104fd565b3480156101b0575f80fd5b506100f960055481565b3480156101c5575f80fd5b506101d96101d43660046112de565b610740565b6040519015158152602001610103565b3480156101f4575f80fd5b506101d9610203366004611322565b610793565b348015610213575f80fd5b506100f96108d3565b348015610227575f80fd5b50610230610a17565b60405161010391906113bc565b348015610248575f80fd5b506102856040518060400160405280600581526020017f302e312e3000000000000000000000000000000000000000000000000000000081525081565b6040516101039190611457565b5f60e0820135156102db578160e001354211156102db576040517ff87d927100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f7f1d8b43e5066bd20bfdacf7b8f4790c0309403b18434e3699ce3c5e57502ed8c461030a6020850185611470565b602085013561031c60408701876114a3565b60405161032a929190611504565b6040518091039020866060013587608001358860a001356005548a60e001358b61010001602081019061035d9190611513565b600181111561036e5761036e611531565b60408051602081019b909b5273ffffffffffffffffffffffffffffffffffffffff909916988a01989098526060890196909652608088019490945260a087019290925260c086015260e085015261010084015261012083015260ff16610140820152610160016040516020818303038152906040528051906020012090505f6103f56108d3565b6040517f1901000000000000000000000000000000000000000000000000000000000000602082015260228101829052604281018490529091506062016040516020818303038152906040528051906020012092505050919050565b60045460ff161561048e576040517f69783db700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600480547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001908117909155815182919081906104cd90826115f4565b50602082015160018201906104e290826115f4565b50604082015160028201906104f790826115f4565b50505050565b610505610bfc565b5f61050f84610292565b9050600161052561012086016101008701611513565b600181111561053657610536611531565b0361058c57811580610550575061054e818484610793565b155b15610587576040517fce5a759800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610601565b6105cb8184848080601f0160208091040260200160405190810160405280939291908181526020018383808284375f9201919091525061074092505050565b610601576040517fc7dbd31d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6005805460010190555f806106196020870187611470565b73ffffffffffffffffffffffffffffffffffffffff16602087013561064160408901896114a3565b60405161064f929190611504565b5f6040518083038185875af1925050503d805f8114610689576040519150601f19603f3d011682016040523d82523d5f602084013e61068e565b606091505b5091509150816106da578051156106a85780518082602001fd5b6040517facfdb44400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7fafc6dd5d2ec56ba31e4cd9723889549a104622ecdb580761d055cde575365b7d600361070a6020890189611470565b61071760408a018a6114a3565b60405161072794939291906117ef565b60405180910390a150505061073b60015f55565b505050565b5f8061074c8484610c3d565b9050610758600361183b565b60601c73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16149150505b92915050565b6040515f9081908190610901906107bb906001906002906003908b908b908b906024016118c0565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f45048e03000000000000000000000000000000000000000000000000000000001790525161083c9190611920565b5f60405180830381855afa9150503d805f8114610874576040519150601f19603f3d011682016040523d82523d5f602084013e610879565b606091505b5091509150816108b5576040517ffd23ff6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b808060200190518101906108c9919061193b565b9695505050505050565b5f806109686001800180546108e79061155e565b80601f01602080910402602001604051908101604052809291908181526020018280546109139061155e565b801561095e5780601f106109355761010080835404028352916020019161095e565b820191905f5260205f20905b81548152906001019060200180831161094157829003601f168201915b5050505050610c65565b604080518082018252600581527f302e312e3000000000000000000000000000000000000000000000000000000060209182015281517f2aef22f9d7df5f9d21c56d14029233f3fdaa91917727e1eb68e504d27072d6cd818301527faa7cdbe2cce2ec7b606b0e199ddd9b264a6e645e767fb8479a7917dcd1b8693f818401526060810193909352306080808501919091528251808503909101815260a0909301909152815191012092915050565b610a3b60405180606001604052806060815260200160608152602001606081525090565b60016040518060600160405290815f82018054610a579061155e565b80601f0160208091040260200160405190810160405280929190818152602001828054610a839061155e565b8015610ace5780601f10610aa557610100808354040283529160200191610ace565b820191905f5260205f20905b815481529060010190602001808311610ab157829003601f168201915b50505050508152602001600182018054610ae79061155e565b80601f0160208091040260200160405190810160405280929190818152602001828054610b139061155e565b8015610b5e5780601f10610b3557610100808354040283529160200191610b5e565b820191905f5260205f20905b815481529060010190602001808311610b4157829003601f168201915b50505050508152602001600282018054610b779061155e565b80601f0160208091040260200160405190810160405280929190818152602001828054610ba39061155e565b8015610bee5780601f10610bc557610100808354040283529160200191610bee565b820191905f5260205f20905b815481529060010190602001808311610bd157829003601f168201915b505050505081525050905090565b60025f5403610c37576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60025f55565b5f805f80610c4b8686610dd5565b925092509250610c5b8282610e1e565b5090949350505050565b80515f90829080610cfd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f456d70747920737472696e672063616e6e6f7420626520636f6e76657274656460448201527f2e0000000000000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b5f5b81811015610dcd575f838281518110610d1a57610d1a61195a565b016020015160f81c905060308110801590610d39575060398160ff1611155b610d9f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f4e6f6e2d64696769742063686172616374657220666f756e642e0000000000006044820152606401610cf4565b610daa6030826119b4565b60ff16610db886600a6119cd565b610dc291906119e4565b945050600101610cff565b505050919050565b5f805f8351604103610e0c576020840151604085015160608601515f1a610dfe88828585610f25565b955095509550505050610e17565b505081515f91506002905b9250925092565b5f826003811115610e3157610e31611531565b03610e3a575050565b6001826003811115610e4e57610e4e611531565b03610e85576040517ff645eedf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002826003811115610e9957610e99611531565b03610ed3576040517ffce698f700000000000000000000000000000000000000000000000000000000815260048101829052602401610cf4565b6003826003811115610ee757610ee7611531565b03610f21576040517fd78bce0c00000000000000000000000000000000000000000000000000000000815260048101829052602401610cf4565b5050565b5f80807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841115610f5e57505f9150600390508261100e565b604080515f808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015610faf573d5f803e3d5ffd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff811661100557505f92506001915082905061100e565b92505f91508190505b9450945094915050565b5f6101208284031215611029575f80fd5b50919050565b5f6020828403121561103f575f80fd5b813567ffffffffffffffff811115611055575f80fd5b61106184828501611018565b949350505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6040516060810167ffffffffffffffff811182821017156110b9576110b9611069565b60405290565b5f82601f8301126110ce575f80fd5b8135602083015f8067ffffffffffffffff8411156110ee576110ee611069565b506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f85018116603f0116810181811067ffffffffffffffff8211171561113b5761113b611069565b604052838152905080828401871015611152575f80fd5b838360208301375f602085830101528094505050505092915050565b5f6020828403121561117e575f80fd5b813567ffffffffffffffff811115611194575f80fd5b8201606081850312156111a5575f80fd5b6111ad611096565b813567ffffffffffffffff8111156111c3575f80fd5b6111cf868285016110bf565b825250602082013567ffffffffffffffff8111156111eb575f80fd5b6111f7868285016110bf565b602083015250604082013567ffffffffffffffff811115611216575f80fd5b611222868285016110bf565b604083015250949350505050565b5f8083601f840112611240575f80fd5b50813567ffffffffffffffff811115611257575f80fd5b60208301915083602082850101111561126e575f80fd5b9250929050565b5f805f60408486031215611287575f80fd5b833567ffffffffffffffff81111561129d575f80fd5b6112a986828701611018565b935050602084013567ffffffffffffffff8111156112c5575f80fd5b6112d186828701611230565b9497909650939450505050565b5f80604083850312156112ef575f80fd5b82359150602083013567ffffffffffffffff81111561130c575f80fd5b611318858286016110bf565b9150509250929050565b5f805f60408486031215611334575f80fd5b83359250602084013567ffffffffffffffff8111156112c5575f80fd5b5f5b8381101561136b578181015183820152602001611353565b50505f910152565b5f815180845261138a816020860160208601611351565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081525f8251606060208401526113d76080840182611373565b905060208401517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08483030160408501526114128282611373565b91505060408401517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe084830301606085015261144e8282611373565b95945050505050565b602081525f6114696020830184611373565b9392505050565b5f60208284031215611480575f80fd5b813573ffffffffffffffffffffffffffffffffffffffff81168114611469575f80fd5b5f8083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18436030181126114d6575f80fd5b83018035915067ffffffffffffffff8211156114f0575f80fd5b60200191503681900382131561126e575f80fd5b818382375f9101908152919050565b5f60208284031215611523575f80fd5b813560028110611469575f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b600181811c9082168061157257607f821691505b602082108103611029577f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b601f82111561073b57805f5260205f20601f840160051c810160208510156115ce5750805b601f840160051c820191505b818110156115ed575f81556001016115da565b5050505050565b815167ffffffffffffffff81111561160e5761160e611069565b6116228161161c845461155e565b846115a9565b6020601f821160018114611673575f831561163d5750848201515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600385901b1c1916600184901b1784556115ed565b5f848152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08516915b828110156116c057878501518255602094850194600190920191016116a0565b50848210156116fc57868401517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600387901b60f8161c191681555b50505050600190811b01905550565b5f81546117178161155e565b808552600182168015611731576001811461176b5761179f565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0083166020870152602082151560051b870101935061179f565b845f5260205f205f5b838110156117965781546020828a010152600182019150602081019050611774565b87016020019450505b50505092915050565b81835281816020850137505f602082840101525f60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b606081525f611801606083018761170b565b73ffffffffffffffffffffffffffffffffffffffff8616602084015282810360408401526118308185876117a8565b979650505050505050565b5f611846825461155e565b82601f82111561185a57835f5260205f2090505b547fffffffffffffffffffffffffffffffffffffffff0000000000000000000000008116925060148210156118b9577fffffffffffffffffffffffffffffffffffffffff000000000000000000000000808360140360031b1b82161692505b5050919050565b60a081525f6118d260a083018961170b565b82810360208401526118e4818961170b565b905082810360408401526118f8818861170b565b905085606084015282810360808401526119138185876117a8565b9998505050505050505050565b5f8251611931818460208701611351565b9190910192915050565b5f6020828403121561194b575f80fd5b81518015158114611469575f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b60ff828116828216039081111561078d5761078d611987565b808202811582820484141761078d5761078d611987565b8082018082111561078d5761078d61198756fea2646970667358221220cd3107c9a2166b22a9f2db8af03f9834a7f41cdf5fd1af8ad7c1b47e3378c18e64736f6c634300081a0033" +const UEA_EVM_BYTECODE = "6080604052600436106100d1575f3560e01c8063872347cf1161007c578063f0a136bc11610057578063f0a136bc1461023c578063f698da251461025b578063f85135cc1461026f578063ffa1ad7414610290575f80fd5b8063872347cf146101d9578063affed0e0146101f8578063ebcd653b1461020d575f80fd5b80632f546ac9116100ac5780632f546ac9146101625780633042c33e1461018157806338e19801146101a0575f80fd5b8063070beb7f146100dc578063113e1ca81461010e5780631db61b541461012f575f80fd5b366100d857005b5f80fd5b3480156100e7575f80fd5b506100fb6100f636600461154a565b6102e5565b6040519081526020015b60405180910390f35b348015610119575f80fd5b5061012d6101283660046115d1565b610415565b005b34801561013a575f80fd5b506100fb7f2aef22f9d7df5f9d21c56d14029233f3fdaa91917727e1eb68e504d27072d6cd81565b34801561016d575f80fd5b506100fb61017c36600461163e565b610614565b34801561018c575f80fd5b5061012d61019b366004611708565b61075b565b3480156101ab575f80fd5b506101b460cb81565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610105565b3480156101e4575f80fd5b5061012d6101f33660046117ca565b610807565b348015610203575f80fd5b506100fb60055481565b348015610218575f80fd5b5061022c61022736600461181a565b610b11565b6040519015158152602001610105565b348015610247575f80fd5b5061022c61025636600461185e565b610b64565b348015610266575f80fd5b506100fb610ca3565b34801561027a575f80fd5b50610283610de7565b60405161010591906118f8565b34801561029b575f80fd5b506102d86040518060400160405280600581526020017f312e302e3000000000000000000000000000000000000000000000000000000081525081565b6040516101059190611993565b5f8082604001511180156102fc5750816040015142115b15610333576040517ff87d927100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b815160055460408085015181517fdf4902934e0ff647f420563d8015e84af8b95595f538c71618622fe3ea2bbb0c602082015273ffffffffffffffffffffffffffffffffffffffff90941691840191909152606083019190915260808201525f9060a0015b6040516020818303038152906040528051906020012090505f6103b9610ca3565b6040517f1901000000000000000000000000000000000000000000000000000000000000602082015260228101829052604281018490529091506062016040516020818303038152906040528051906020012092505050919050565b61041d610fcc565b5f6104306100f63686900386018661154a565b90506104718184848080601f0160208091040260200160405190810160405280939291908181526020018383808284375f92019190915250610b1192505050565b6104a7576040517fc7dbd31d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600580546001019055604080516004815260248101909152602080820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f52fa5c22000000000000000000000000000000000000000000000000000000001790525f908190610518908801886119a5565b73ffffffffffffffffffffffffffffffffffffffff168360405161053c91906119be565b5f60405180830381855af49150503d805f8114610574576040519150601f19603f3d011682016040523d82523d5f602084013e610579565b606091505b5091509150816105c5578051156105935780518082602001fd5b6040517facfdb44400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6005546040517f3c72595b43537fb9a702f683573f82d3b3ad19487fd74cbb94728a41ec76d1cb916105fa9160039190611ac1565b60405180910390a15050505061060f60015f55565b505050565b5f60e08201351561065d578160e0013542111561065d576040517ff87d927100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f7f1d8b43e5066bd20bfdacf7b8f4790c0309403b18434e3699ce3c5e57502ed8c461068c60208501856119a5565b602085013561069e6040870187611ae2565b6040516106ac929190611b43565b6040518091039020866060013587608001358860a001356005548a60e001358b6101000160208101906106df9190611b52565b60018111156106f0576106f0611b70565b60408051602081019b909b5273ffffffffffffffffffffffffffffffffffffffff909916988a01989098526060890196909652608088019490945260a087019290925260c086015260e085015261010084015261012083015260ff1661014082015261016001610398565b60045460ff1615610798576040517f69783db700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600480547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001908117909155815182919081906107d79082611be8565b50602082015160018201906107ec9082611be8565b50604082015160028201906108019082611be8565b50505050565b61080f610fcc565b5f61081984610614565b9050600161082f61012086016101008701611b52565b600181111561084057610840611b70565b036108965781158061085a5750610858818484610b64565b155b15610891576040517fce5a759800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61090b565b6108d58184848080601f0160208091040260200160405190810160405280939291908181526020018383808284375f92019190915250610b1192505050565b61090b576040517fc7dbd31d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6005805460010190555f606061092c6109276040880188611ae2565b61100d565b15610a2a575f6109476109426040890189611ae2565b61107f565b90505f5b8151811015610a235781818151811061096657610966611cff565b60200260200101515f015173ffffffffffffffffffffffffffffffffffffffff1682828151811061099957610999611cff565b6020026020010151602001518383815181106109b7576109b7611cff565b6020026020010151604001516040516109d091906119be565b5f6040518083038185875af1925050503d805f8114610a0a576040519150601f19603f3d011682016040523d82523d5f602084013e610a0f565b606091505b5090945092508315610a235760010161094b565b5050610ab3565b610a3760208701876119a5565b73ffffffffffffffffffffffffffffffffffffffff166020870135610a5f6040890189611ae2565b604051610a6d929190611b43565b5f6040518083038185875af1925050503d805f8114610aa7576040519150601f19603f3d011682016040523d82523d5f602084013e610aac565b606091505b5090925090505b81610ac8578051156105935780518082602001fd5b6005546040517f3c72595b43537fb9a702f683573f82d3b3ad19487fd74cbb94728a41ec76d1cb91610afd9160039190611ac1565b60405180910390a150505061060f60015f55565b5f80610b1d84846110a2565b9050610b296003611d2c565b60601c73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16149150505b92915050565b6040515f908190819060cb90610b8b906001906002906003908b908b908b90602401611db1565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f45048e030000000000000000000000000000000000000000000000000000000017905251610c0c91906119be565b5f60405180830381855afa9150503d805f8114610c44576040519150601f19603f3d011682016040523d82523d5f602084013e610c49565b606091505b509150915081610c85576040517ffd23ff6400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80806020019051810190610c999190611e44565b9695505050505050565b5f80610d38600180018054610cb7906119d9565b80601f0160208091040260200160405190810160405280929190818152602001828054610ce3906119d9565b8015610d2e5780601f10610d0557610100808354040283529160200191610d2e565b820191905f5260205f20905b815481529060010190602001808311610d1157829003601f168201915b50505050506110ca565b604080518082018252600581527f312e302e3000000000000000000000000000000000000000000000000000000060209182015281517f2aef22f9d7df5f9d21c56d14029233f3fdaa91917727e1eb68e504d27072d6cd818301527f06c015bd22b4c69690933c1058878ebdfef31f9aaae40bbe86d8a09fe1b2972c818401526060810193909352306080808501919091528251808503909101815260a0909301909152815191012092915050565b610e0b60405180606001604052806060815260200160608152602001606081525090565b60016040518060600160405290815f82018054610e27906119d9565b80601f0160208091040260200160405190810160405280929190818152602001828054610e53906119d9565b8015610e9e5780601f10610e7557610100808354040283529160200191610e9e565b820191905f5260205f20905b815481529060010190602001808311610e8157829003601f168201915b50505050508152602001600182018054610eb7906119d9565b80601f0160208091040260200160405190810160405280929190818152602001828054610ee3906119d9565b8015610f2e5780601f10610f0557610100808354040283529160200191610f2e565b820191905f5260205f20905b815481529060010190602001808311610f1157829003601f168201915b50505050508152602001600282018054610f47906119d9565b80601f0160208091040260200160405190810160405280929190818152602001828054610f73906119d9565b8015610fbe5780601f10610f9557610100808354040283529160200191610fbe565b820191905f5260205f20905b815481529060010190602001808311610fa157829003601f168201915b505050505081525050905090565b60025f5403611007576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60025f55565b5f600482101561101e57505f610b5e565b7f2cc2842d0000000000000000000000000000000000000000000000000000000061104c60045f8587611e63565b61105591611e8a565b7fffffffff0000000000000000000000000000000000000000000000000000000016149392505050565b606061108e8260048186611e63565b81019061109b9190611ef0565b9392505050565b5f805f806110b0868661123a565b9250925092506110c08282611283565b5090949350505050565b80515f90829080611162576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602160248201527f456d70747920737472696e672063616e6e6f7420626520636f6e76657274656460448201527f2e0000000000000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b5f5b81811015611232575f83828151811061117f5761117f611cff565b016020015160f81c90506030811080159061119e575060398160ff1611155b611204576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f4e6f6e2d64696769742063686172616374657220666f756e642e0000000000006044820152606401611159565b61120f60308261205b565b60ff1661121d86600a612074565b611227919061208b565b945050600101611164565b505050919050565b5f805f8351604103611271576020840151604085015160608601515f1a6112638882858561138a565b95509550955050505061127c565b505081515f91506002905b9250925092565b5f82600381111561129657611296611b70565b0361129f575050565b60018260038111156112b3576112b3611b70565b036112ea576040517ff645eedf00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60028260038111156112fe576112fe611b70565b03611338576040517ffce698f700000000000000000000000000000000000000000000000000000000815260048101829052602401611159565b600382600381111561134c5761134c611b70565b03611386576040517fd78bce0c00000000000000000000000000000000000000000000000000000000815260048101829052602401611159565b5050565b5f80807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08411156113c357505f91506003905082611473565b604080515f808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015611414573d5f803e3d5ffd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff811661146a57505f925060019150829050611473565b92505f91508190505b9450945094915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6040516060810167ffffffffffffffff811182821017156114cd576114cd61147d565b60405290565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff8111828210171561151a5761151a61147d565b604052919050565b803573ffffffffffffffffffffffffffffffffffffffff81168114611545575f80fd5b919050565b5f606082840312801561155b575f80fd5b506115646114aa565b61156d83611522565b8152602083810135908201526040928301359281019290925250919050565b5f8083601f84011261159c575f80fd5b50813567ffffffffffffffff8111156115b3575f80fd5b6020830191508360208285010111156115ca575f80fd5b9250929050565b5f805f83850360808112156115e4575f80fd5b60608112156115f1575f80fd5b50839250606084013567ffffffffffffffff81111561160e575f80fd5b61161a8682870161158c565b9497909650939450505050565b5f6101208284031215611638575f80fd5b50919050565b5f6020828403121561164e575f80fd5b813567ffffffffffffffff811115611664575f80fd5b61167084828501611627565b949350505050565b5f82601f830112611687575f80fd5b8135602083015f8067ffffffffffffffff8411156116a7576116a761147d565b50601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0166020016116da816114d3565b9150508281528583830111156116ee575f80fd5b828260208301375f92810160200192909252509392505050565b5f60208284031215611718575f80fd5b813567ffffffffffffffff81111561172e575f80fd5b82016060818503121561173f575f80fd5b6117476114aa565b813567ffffffffffffffff81111561175d575f80fd5b61176986828501611678565b825250602082013567ffffffffffffffff811115611785575f80fd5b61179186828501611678565b602083015250604082013567ffffffffffffffff8111156117b0575f80fd5b6117bc86828501611678565b604083015250949350505050565b5f805f604084860312156117dc575f80fd5b833567ffffffffffffffff8111156117f2575f80fd5b6117fe86828701611627565b935050602084013567ffffffffffffffff81111561160e575f80fd5b5f806040838503121561182b575f80fd5b82359150602083013567ffffffffffffffff811115611848575f80fd5b61185485828601611678565b9150509250929050565b5f805f60408486031215611870575f80fd5b83359250602084013567ffffffffffffffff81111561160e575f80fd5b5f5b838110156118a757818101518382015260200161188f565b50505f910152565b5f81518084526118c681602086016020860161188d565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081525f82516060602084015261191360808401826118af565b905060208401517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe084830301604085015261194e82826118af565b91505060408401517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe084830301606085015261198a82826118af565b95945050505050565b602081525f61109b60208301846118af565b5f602082840312156119b5575f80fd5b61109b82611522565b5f82516119cf81846020870161188d565b9190910192915050565b600181811c908216806119ed57607f821691505b602082108103611638577f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f8154611a30816119d9565b808552600182168015611a4a5760018114611a8457611ab8565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0083166020870152602082151560051b8701019350611ab8565b845f5260205f205f5b83811015611aaf5781546020828a010152600182019150602081019050611a8d565b87016020019450505b50505092915050565b604081525f611ad36040830185611a24565b90508260208301529392505050565b5f8083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112611b15575f80fd5b83018035915067ffffffffffffffff821115611b2f575f80fd5b6020019150368190038213156115ca575f80fd5b818382375f9101908152919050565b5f60208284031215611b62575f80fd5b81356002811061109b575f80fd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b601f82111561060f57805f5260205f20601f840160051c81016020851015611bc25750805b601f840160051c820191505b81811015611be1575f8155600101611bce565b5050505050565b815167ffffffffffffffff811115611c0257611c0261147d565b611c1681611c1084546119d9565b84611b9d565b6020601f821160018114611c67575f8315611c315750848201515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600385901b1c1916600184901b178455611be1565b5f848152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08516915b82811015611cb45787850151825560209485019460019092019101611c94565b5084821015611cf057868401517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600387901b60f8161c191681555b50505050600190811b01905550565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f611d3782546119d9565b82601f821115611d4b57835f5260205f2090505b547fffffffffffffffffffffffffffffffffffffffff000000000000000000000000811692506014821015611daa577fffffffffffffffffffffffffffffffffffffffff000000000000000000000000808360140360031b1b82161692505b5050919050565b60a081525f611dc360a0830189611a24565b8281036020840152611dd58189611a24565b90508281036040840152611de98188611a24565b90508560608401528281036080840152838152838560208301375f6020858301015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f860116820101915050979650505050505050565b5f60208284031215611e54575f80fd5b8151801515811461109b575f80fd5b5f8085851115611e71575f80fd5b83861115611e7d575f80fd5b5050820193919092039150565b80357fffffffff000000000000000000000000000000000000000000000000000000008116906004841015611ee9577fffffffff00000000000000000000000000000000000000000000000000000000808560040360031b1b82161691505b5092915050565b5f60208284031215611f00575f80fd5b813567ffffffffffffffff811115611f16575f80fd5b8201601f81018413611f26575f80fd5b803567ffffffffffffffff811115611f4057611f4061147d565b8060051b611f50602082016114d3565b91825260208184018101929081019087841115611f6b575f80fd5b6020850192505b8383101561202357823567ffffffffffffffff811115611f90575f80fd5b85016060818a037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0011215611fc3575f80fd5b611fcb6114aa565b611fd760208301611522565b815260408201356020820152606082013567ffffffffffffffff811115611ffc575f80fd5b61200b8b602083860101611678565b60408301525083525060209283019290910190611f72565b979650505050505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b60ff8281168282160390811115610b5e57610b5e61202e565b8082028115828204841417610b5e57610b5e61202e565b80820180821115610b5e57610b5e61202e56fea2646970667358221220e0d6bccbb261ade6ccedb9c39ac92f9babbf5842194ed72ec5a49b6fd9f70ec664736f6c634300081a0033" const UEA_PROXY_BYTECODE = "608060405260043610610028575f3560e01c806323efa7ec14610032578063aaf10f4214610051575b6100306100a8565b005b34801561003d575f80fd5b5061003061004c366004610368565b6100ba565b34801561005c575f80fd5b507f868a771a75a4aa6c2be13e9a9617cb8ea240ed84a3a90c8469537393ec3e115d5460405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b6100b86100b36102cc565b61034a565b565b7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00805468010000000000000000810460ff16159067ffffffffffffffff165f811580156101045750825b90505f8267ffffffffffffffff1660011480156101205750303b155b90508115801561012e575080155b15610165576040517ff92ee8a900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b84547fffffffffffffffffffffffffffffffffffffffffffffffff000000000000000016600117855583156101c65784547fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff16680100000000000000001785555b5f6101ef7f868a771a75a4aa6c2be13e9a9617cb8ea240ed84a3a90c8469537393ec3e115d5490565b905073ffffffffffffffffffffffffffffffffffffffff81161561023f576040517fae962d4e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b867f868a771a75a4aa6c2be13e9a9617cb8ea240ed84a3a90c8469537393ec3e115d555083156102c45784547fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff168555604051600181527fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d29060200160405180910390a15b505050505050565b5f806102f67f868a771a75a4aa6c2be13e9a9617cb8ea240ed84a3a90c8469537393ec3e115d5490565b905073ffffffffffffffffffffffffffffffffffffffff8116610345576040517fae962d4e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b919050565b365f80375f80365f845af43d5f803e808015610364573d5ff35b3d5ffd5b5f60208284031215610378575f80fd5b813573ffffffffffffffffffffffffffffffffffffffff8116811461039b575f80fd5b939250505056fea2646970667358221220c4b8f9457567bdcd08b95faef7df86de4e9daead65e2db22018126d9eb77d85864736f6c634300081a0033" @@ -8,6 +8,8 @@ const HANDLER_CONTRACT_BYTECODE = "6080604052600436106102ae575f3560e01c80638456c const PRC20_CREATION_BYTECODE = "608060405234801561000f575f80fd5b50600436106101a5575f3560e01c806374be2150116100e8578063c701262611610093578063eddeb1231161006e578063eddeb12314610457578063f687d12a1461046a578063f97c007a1461047d578063fc5fecd514610486575f80fd5b8063c7012626146103cb578063d9eeebed146103de578063dd62ed3e14610412575f80fd5b8063b84c8246116100c3578063b84c82461461037e578063c47f002714610391578063c6f1b7e7146103a4575f80fd5b806374be21501461033c57806395d89b4114610363578063a9059cbb1461036b575f80fd5b806323b872dd1161015357806347e7ef241161012e57806347e7ef24146102a1578063609c92b8146102b4578063701cd43b146102e857806370a0823114610307575f80fd5b806323b872dd14610266578063313ce5671461027957806342966c681461028e575f80fd5b8063091d278811610183578063091d278814610224578063095ea7b31461023b57806318160ddd1461025e575f80fd5b8063044d9371146101a957806306fdde03146101fa57806307e2bd8d1461020f575b5f80fd5b6101d07f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b610202610499565b6040516101f1919061143c565b61022261021d366004611479565b610529565b005b61022d60015481565b6040519081526020016101f1565b61024e610249366004611494565b6105ef565b60405190151581526020016101f1565b60065461022d565b61024e6102743660046114be565b6106ae565b60055460405160ff90911681526020016101f1565b61024e61029c3660046114fc565b61079b565b61024e6102af366004611494565b6107ae565b6102db7f000000000000000000000000000000000000000000000000000000000000000081565b6040516101f19190611513565b5f546101d09073ffffffffffffffffffffffffffffffffffffffff1681565b61022d610315366004611479565b73ffffffffffffffffffffffffffffffffffffffff165f9081526007602052604090205490565b61022d7f000000000000000000000000000000000000000000000000000000000000000081565b610202610879565b61024e610379366004611494565b610888565b61022261038c36600461157f565b61089d565b61022261039f36600461157f565b61091c565b6101d07f000000000000000000000000000000000000000000000000000000000000000081565b61024e6103d936600461166f565b610997565b6103e6610af9565b6040805173ffffffffffffffffffffffffffffffffffffffff90931683526020830191909152016101f1565b61022d6104203660046116e1565b73ffffffffffffffffffffffffffffffffffffffff9182165f90815260086020908152604080832093909416825291909152205490565b6102226104653660046114fc565b610d04565b6102226104783660046114fc565b610da8565b61022d60025481565b6103e66104943660046114fc565b610e4c565b6060600380546104a890611718565b80601f01602080910402602001604051908101604052809291908181526020018280546104d490611718565b801561051f5780601f106104f65761010080835404028352916020019161051f565b820191905f5260205f20905b81548152906001019060200180831161050257829003601f168201915b5050505050905090565b73ffffffffffffffffffffffffffffffffffffffff8116610576576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040519081527f412d5a95dc32cbb6bd9319bccf1bc1febeda71e734893a440f1f6853252fe99f906020015b60405180910390a150565b5f73ffffffffffffffffffffffffffffffffffffffff831661063d576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b335f81815260086020908152604080832073ffffffffffffffffffffffffffffffffffffffff881680855290835292819020869055518581529192917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a35060015b92915050565b5f6106ba848484611055565b73ffffffffffffffffffffffffffffffffffffffff84165f90815260086020908152604080832033845290915290205482811015610724576040517f10bad14700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff85165f81815260086020908152604080832033808552908352928190208786039081905590519081529192917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3506001949350505050565b5f6107a6338361119c565b506001919050565b5f6107b983836112ed565b6040517fffffffffffffffffffffffffffffffffffffffff0000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000060601b1660208201527f67fc7bdaed5b0ec550d8706b87d60568ab70c6b781263c70101d54cd1564aab390603401604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152908290526108689186908690611769565b60405180910390a150600192915050565b6060600480546104a890611718565b5f610894338484611055565b50600192915050565b3373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000161461090c576040517f6626eaef00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600461091882826117ef565b5050565b3373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000161461098b576040517f6626eaef00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600361091882826117ef565b5f805f6109a2610af9565b6040517f23b872dd00000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000081166024830152604482018390529294509092505f918416906323b872dd906064016020604051808303815f875af1158015610a42573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610a669190611906565b905080610a9f576040517f0a7cd6d600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610aa9338661119c565b7f9ffbffc04a397460ee1dbe8c9503e098090567d6b7f4b3c02a8617d800b6d9553388888886600254604051610ae496959493929190611925565b60405180910390a15060019695505050505050565b5f80546040517f7471e6970000000000000000000000000000000000000000000000000000000081527f00000000000000000000000000000000000000000000000000000000000000006004820152829173ffffffffffffffffffffffffffffffffffffffff1690637471e69790602401602060405180830381865afa158015610b85573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610ba991906119a5565b915073ffffffffffffffffffffffffffffffffffffffff8216610bf8576040517f3d5729c100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f80546040517fd7fd7afb0000000000000000000000000000000000000000000000000000000081527f0000000000000000000000000000000000000000000000000000000000000000600482015273ffffffffffffffffffffffffffffffffffffffff9091169063d7fd7afb90602401602060405180830381865afa158015610c84573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610ca891906119c0565b9050805f03610ce3576040517fe661aed000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600254600154610cf39083611a04565b610cfd9190611a1b565b9150509091565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610d73576040517f6626eaef00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60028190556040518181527fef13af88e424b5d15f49c77758542c1938b08b8b95b91ed0751f98ba99000d8f906020016105e4565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610e17576040517f6626eaef00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60018190556040518181527fff5788270f43bfc1ca41c503606d2594aa3023a1a7547de403a3e2f146a4a80a906020016105e4565b5f80546040517f7471e6970000000000000000000000000000000000000000000000000000000081527f00000000000000000000000000000000000000000000000000000000000000006004820152829173ffffffffffffffffffffffffffffffffffffffff1690637471e69790602401602060405180830381865afa158015610ed8573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610efc91906119a5565b915073ffffffffffffffffffffffffffffffffffffffff8216610f4b576040517f3d5729c100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f80546040517fd7fd7afb0000000000000000000000000000000000000000000000000000000081527f0000000000000000000000000000000000000000000000000000000000000000600482015273ffffffffffffffffffffffffffffffffffffffff9091169063d7fd7afb90602401602060405180830381865afa158015610fd7573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610ffb91906119c0565b9050805f03611036576040517fe661aed000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002546110438583611a04565b61104d9190611a1b565b915050915091565b73ffffffffffffffffffffffffffffffffffffffff8316158061108c575073ffffffffffffffffffffffffffffffffffffffff8216155b156110c3576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff83165f9081526007602052604090205481811015611122576040517ffe382aa700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8085165f8181526007602052604080822086860390559286168082529083902080548601905591517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9061118e9086815260200190565b60405180910390a350505050565b73ffffffffffffffffffffffffffffffffffffffff82166111e9576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805f03611222576040517f1f2a200500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff82165f9081526007602052604090205481811015611281576040517ffe382aa700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff83165f8181526007602090815260408083208686039055600680548790039055518581529192917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3505050565b73ffffffffffffffffffffffffffffffffffffffff821661133a576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805f03611373576040517f1f2a200500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600680548201905573ffffffffffffffffffffffffffffffffffffffff82165f818152600760209081526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b5f81518084525f5b818110156113ff576020818501810151868301820152016113e3565b505f6020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b602081525f61144e60208301846113db565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff81168114611476575f80fd5b50565b5f60208284031215611489575f80fd5b813561144e81611455565b5f80604083850312156114a5575f80fd5b82356114b081611455565b946020939093013593505050565b5f805f606084860312156114d0575f80fd5b83356114db81611455565b925060208401356114eb81611455565b929592945050506040919091013590565b5f6020828403121561150c575f80fd5b5035919050565b602081016003831061154c577f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b91905290565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f6020828403121561158f575f80fd5b813567ffffffffffffffff8111156115a5575f80fd5b8201601f810184136115b5575f80fd5b803567ffffffffffffffff8111156115cf576115cf611552565b6040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0603f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8501160116810181811067ffffffffffffffff8211171561163b5761163b611552565b604052818152828201602001861015611652575f80fd5b816020840160208301375f91810160200191909152949350505050565b5f805f60408486031215611681575f80fd5b833567ffffffffffffffff811115611697575f80fd5b8401601f810186136116a7575f80fd5b803567ffffffffffffffff8111156116bd575f80fd5b8660208284010111156116ce575f80fd5b6020918201979096509401359392505050565b5f80604083850312156116f2575f80fd5b82356116fd81611455565b9150602083013561170d81611455565b809150509250929050565b600181811c9082168061172c57607f821691505b602082108103611763577f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b50919050565b606081525f61177b60608301866113db565b73ffffffffffffffffffffffffffffffffffffffff9490941660208301525060400152919050565b601f8211156117ea57805f5260205f20601f840160051c810160208510156117c85750805b601f840160051c820191505b818110156117e7575f81556001016117d4565b50505b505050565b815167ffffffffffffffff81111561180957611809611552565b61181d816118178454611718565b846117a3565b6020601f82116001811461186e575f83156118385750848201515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600385901b1c1916600184901b1784556117e7565b5f848152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08516915b828110156118bb578785015182556020948501946001909201910161189b565b50848210156118f757868401517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600387901b60f8161c191681555b50505050600190811b01905550565b5f60208284031215611916575f80fd5b8151801515811461144e575f80fd5b73ffffffffffffffffffffffffffffffffffffffff8716815260a060208201528460a0820152848660c08301375f60c086830101525f60c07fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8801168301019050846040830152836060830152826080830152979650505050505050565b5f602082840312156119b5575f80fd5b815161144e81611455565b5f602082840312156119d0575f80fd5b5051919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b80820281158282048414176106a8576106a86119d7565b808201808211156106a8576106a86119d756fea26469706673582212206be692aa215f21df823c52c689a11caa03254730bfade7b8b36788d6a72ba61764736f6c634300081a0033" +const UNIVERSAL_GATEWAY_PC_BYTECODE = "6080806040526004361015610012575f80fd5b5f3560e01c90816301ffc9a714610f0c57508063248a9ca314610e9c5780632f2ff15d14610e2157806336568abe14610d995780633f4ba83a14610cc15780635c975abb14610c62578063720b3fbf14610a955780637f57735014610a455780638456cb591461096a5780638e6185601461084157806391d14854146107ad578063a217fddf14610775578063bdfd61ce1461058e578063c1ee135a1461053d578063d547741f146104bb578063e63ab1e9146104635763f8c8765e146100d7575f80fd5b3461045f5760807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261045f5761010e610feb565b610116610fc8565b9060443573ffffffffffffffffffffffffffffffffffffffff811680910361045f576064359173ffffffffffffffffffffffffffffffffffffffff831680930361045f577ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00549360ff8560401c16159467ffffffffffffffff811680159081610457575b600114908161044d575b159081610444575b5061041c578560017fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000008316177ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00556103c7575b5073ffffffffffffffffffffffffffffffffffffffff82161580156103a9575b80156103a1575b8015610399575b61037157610281610287926102406117b5565b6102486117b5565b6102506117b5565b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f005561027c6117b5565b611292565b50611379565b507fffffffffffffffffffffffff00000000000000000000000000000000000000005f5416175f557fffffffffffffffffffffffff000000000000000000000000000000000000000060015416176001556102de57005b7fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054167ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00557fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602060405160018152a1005b7fd92e233d000000000000000000000000000000000000000000000000000000005f5260045ffd5b50831561022d565b508215610226565b5073ffffffffffffffffffffffffffffffffffffffff81161561021f565b7fffffffffffffffffffffffffffffffffffffffffffffff0000000000000000001668010000000000000001177ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00555f6101ff565b7ff92ee8a9000000000000000000000000000000000000000000000000000000005f5260045ffd5b9050155f6101ac565b303b1591506101a4565b87915061019a565b5f80fd5b3461045f575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261045f5760206040517f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a8152f35b3461045f5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261045f5761053b6004356104f8610fc8565b90610536610531825f527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800602052600160405f20015490565b61120c565b61158f565b005b3461045f575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261045f57602073ffffffffffffffffffffffffffffffffffffffff60015416604051908152f35b3461045f5760c07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261045f5760043567ffffffffffffffff811161045f576105dd90369060040161100e565b6105e5610fc8565b9160643567ffffffffffffffff811161045f5761060690369060040161100e565b91909260a4359367ffffffffffffffff851161045f5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc863603011261045f5773ffffffffffffffffffffffffffffffffffffffff61072e61074c927fd06cdc8c91fe8c2e8750b89bd0805f8111fb1bed700d3c2a4394c3aca1993239966106f06106e2976106956116eb565b61069d61173e565b6106a561103c565b977f6569703135353a3131313535313131000000000000000000000000000000000060208a0152604051998a996101208b526101208b0190611060565b9189830360208b01526110bd565b91604435604088015273778d3206374f8ac265728e18e3fe2ae6b93e4ce46060880152606f608088015260de60a088015286830360c08801526110bd565b9661014d60e0850152838803610100850152169533956004016110fb565b0390a360017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055005b3461045f575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261045f5760206040515f8152f35b3461045f5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261045f576107e4610fc8565b6004355f527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b62680060205273ffffffffffffffffffffffffffffffffffffffff60405f2091165f52602052602060ff60405f2054166040519015158152f35b3461045f5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261045f57610878610feb565b335f9081527fb7db2dd08fcb62d0c9e08c51941cae53c267786a0b75803fb7960902fc8ef97d602052604090205460ff161561093a5773ffffffffffffffffffffffffffffffffffffffff906108cc6116eb565b1680156103715773ffffffffffffffffffffffffffffffffffffffff600154827fffffffffffffffffffffffff0000000000000000000000000000000000000000821617600155167fd0ef78509e8ed82196200827f0d10672cfab667994f990456881f413c1c475eb5f80a3005b7fe2517d3f000000000000000000000000000000000000000000000000000000005f52336004525f60245260445ffd5b3461045f575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261045f576109a0611184565b6109a86116eb565b6109b06116eb565b60017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff007fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f033005416177fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f03300557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586020604051338152a1005b3461045f575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261045f57602073ffffffffffffffffffffffffffffffffffffffff5f5416604051908152f35b3461045f5760a07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261045f5760043567ffffffffffffffff811161045f57610ae490369060040161100e565b90610aed610fc8565b916084359167ffffffffffffffff831161045f5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc843603011261045f57610b356116eb565b610b3d61173e565b610b4561103c565b7f6569703135353a31313135353131310000000000000000000000000000000000602082015260405191602083019083821067ffffffffffffffff831117610c355761072e610be994610bf773ffffffffffffffffffffffffffffffffffffffff937fd06cdc8c91fe8c2e8750b89bd0805f8111fb1bed700d3c2a4394c3aca19932399861074c966040525f84526040519889986101208a526101208a0190611060565b9188830360208a01526110bd565b90604435604087015273778d3206374f8ac265728e18e3fe2ae6b93e4ce46060870152606f608087015260de60a087015285820360c0870152611060565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b3461045f575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261045f57602060ff7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f0330054166040519015158152f35b3461045f575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261045f57610cf7611184565b610cff611697565b610d07611697565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff007fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f0330054167fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f03300557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6020604051338152a1005b3461045f5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261045f57610dd0610fc8565b3373ffffffffffffffffffffffffffffffffffffffff821603610df95761053b9060043561158f565b7f6697b232000000000000000000000000000000000000000000000000000000005f5260045ffd5b3461045f5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261045f5761053b600435610e5e610fc8565b90610e97610531825f527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800602052600160405f20015490565b61147d565b3461045f5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261045f576020610f046004355f527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800602052600160405f20015490565b604051908152f35b3461045f5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261045f57600435907fffffffff00000000000000000000000000000000000000000000000000000000821680920361045f57817f7965db0b0000000000000000000000000000000000000000000000000000000060209314908115610f9e575b5015158152f35b7f01ffc9a70000000000000000000000000000000000000000000000000000000091501483610f97565b6024359073ffffffffffffffffffffffffffffffffffffffff8216820361045f57565b6004359073ffffffffffffffffffffffffffffffffffffffff8216820361045f57565b9181601f8401121561045f5782359167ffffffffffffffff831161045f576020838186019501011161045f57565b604051906040820182811067ffffffffffffffff821117610c3557604052600f8252565b91908251928382525f5b8481106110a85750507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f845f6020809697860101520116010190565b8060208092840101518282860101520161106a565b601f82602094937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe093818652868601375f8582860101520116010190565b803573ffffffffffffffffffffffffffffffffffffffff811680910361045f57825260208101357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18236030181121561045f57016020813591019067ffffffffffffffff811161045f57803603821361045f5760408381602061118196015201916110bd565b90565b335f9081527f75442b0a96088b5456bc4ed01394c96a4feec0f883c9494257d76b96ab1c9b6b602052604090205460ff16156111bc57565b7fe2517d3f000000000000000000000000000000000000000000000000000000005f52336004527f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a60245260445ffd5b805f527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b62680060205260405f2073ffffffffffffffffffffffffffffffffffffffff33165f5260205260ff60405f205416156112635750565b7fe2517d3f000000000000000000000000000000000000000000000000000000005f523360045260245260445ffd5b73ffffffffffffffffffffffffffffffffffffffff81165f9081527fb7db2dd08fcb62d0c9e08c51941cae53c267786a0b75803fb7960902fc8ef97d602052604090205460ff166113745773ffffffffffffffffffffffffffffffffffffffff165f8181527fb7db2dd08fcb62d0c9e08c51941cae53c267786a0b75803fb7960902fc8ef97d6020526040812080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790553391907f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d8180a4600190565b505f90565b73ffffffffffffffffffffffffffffffffffffffff81165f9081527f75442b0a96088b5456bc4ed01394c96a4feec0f883c9494257d76b96ab1c9b6b602052604090205460ff166113745773ffffffffffffffffffffffffffffffffffffffff165f8181527f75442b0a96088b5456bc4ed01394c96a4feec0f883c9494257d76b96ab1c9b6b6020526040812080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790553391907f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a907f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9080a4600190565b805f527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b62680060205260405f2073ffffffffffffffffffffffffffffffffffffffff83165f5260205260ff60405f205416155f1461158957805f527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b62680060205260405f2073ffffffffffffffffffffffffffffffffffffffff83165f5260205260405f2060017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0082541617905573ffffffffffffffffffffffffffffffffffffffff339216907f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d5f80a4600190565b50505f90565b805f527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b62680060205260405f2073ffffffffffffffffffffffffffffffffffffffff83165f5260205260ff60405f2054165f1461158957805f527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b62680060205260405f2073ffffffffffffffffffffffffffffffffffffffff83165f5260205260405f207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00815416905573ffffffffffffffffffffffffffffffffffffffff339216907ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b5f80a4600190565b60ff7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f033005416156116c357565b7f8dfc202b000000000000000000000000000000000000000000000000000000005f5260045ffd5b60ff7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f03300541661171657565b7fd93c0665000000000000000000000000000000000000000000000000000000005f5260045ffd5b60027f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00541461178d5760027f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b7f3ee5aeb5000000000000000000000000000000000000000000000000000000005f5260045ffd5b60ff7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005460401c16156117e457565b7fd7e6bcf8000000000000000000000000000000000000000000000000000000005f5260045ffdfea2646970667358221220bb7a75539e61b76064a9aab2c5227e4c770c8dc2778e33d796b5ae3e5c51fb1c64736f6c634300081a0033" + // GetUEAProxyBytecode returns the UEA proxy contract bytecode func GetUEAProxyBytecode() string { return UEA_PROXY_BYTECODE diff --git a/test/utils/constants.go b/test/utils/constants.go index b93089fe..13f02331 100644 --- a/test/utils/constants.go +++ b/test/utils/constants.go @@ -8,11 +8,12 @@ const MintModule string = "mint" type Addresses struct { // Contract addresses - FactoryAddr common.Address - UEProxyAddr common.Address - EVMImplAddr common.Address - HandlerAddr common.Address - PRC20USDCAddr common.Address + FactoryAddr common.Address + UEProxyAddr common.Address + EVMImplAddr common.Address + HandlerAddr common.Address + PRC20USDCAddr common.Address + UniversalGatewayPCAddr common.Address // Account addresses (hex format) DefaultTestAddr string @@ -27,15 +28,16 @@ type TestConfig struct { func GetDefaultAddresses() Addresses { return Addresses{ - FactoryAddr: common.HexToAddress("0x00000000000000000000000000000000000000ea"), - UEProxyAddr: common.HexToAddress("0x0000000000000000000000000000000000000e09"), - EVMImplAddr: common.HexToAddress("0x0000000000000000000000000000000000000e01"), - HandlerAddr: common.HexToAddress("0x00000000000000000000000000000000000000C0"), - PRC20USDCAddr: common.HexToAddress("0x0000000000000000000000000000000000000e06"), - DefaultTestAddr: "0x778d3206374f8ac265728e18e3fe2ae6b93e4ce4", - CosmosTestAddr: "cosmos18pjnzwr9xdnx2vnpv5mxywfnv56xxef5cludl5", - TargetAddr: "\x86i\xbe\xd1!\xfe\xfa=\x9c\xf2\x82\x12s\xf4\x89\xe7\x17̩]", - TargetAddr2: "0x527F3692F5C53CfA83F7689885995606F93b6164", + FactoryAddr: common.HexToAddress("0x00000000000000000000000000000000000000ea"), + UEProxyAddr: common.HexToAddress("0x0000000000000000000000000000000000000e09"), + EVMImplAddr: common.HexToAddress("0x0000000000000000000000000000000000000e01"), + HandlerAddr: common.HexToAddress("0x00000000000000000000000000000000000000C0"), + PRC20USDCAddr: common.HexToAddress("0x0000000000000000000000000000000000000e06"), + UniversalGatewayPCAddr: common.HexToAddress("0x00000000000000000000000000000000000000B0"), + DefaultTestAddr: "0x778d3206374f8ac265728e18e3fe2ae6b93e4ce4", + CosmosTestAddr: "cosmos18pjnzwr9xdnx2vnpv5mxywfnv56xxef5cludl5", + TargetAddr: "\x86i\xbe\xd1!\xfe\xfa=\x9c\xf2\x82\x12s\xf4\x89\xe7\x17̩]", + TargetAddr2: "0x527F3692F5C53CfA83F7689885995606F93b6164", } } diff --git a/test/utils/contracts_setup.go b/test/utils/contracts_setup.go index 186d5dc8..10853914 100644 --- a/test/utils/contracts_setup.go +++ b/test/utils/contracts_setup.go @@ -1,6 +1,7 @@ package utils import ( + "math/big" "testing" sdk "github.com/cosmos/cosmos-sdk/types" @@ -51,6 +52,10 @@ func setupUESystem( err = setupPrc20Contract(t, app, ctx, prc20ABI, opts, accounts) require.NoError(t, err) + // setup UniversalGatewayPC + err = setupUniversalGatewayPC(t, app, ctx, prc20ABI, opts) + require.NoError(t, err) + return nil } @@ -280,3 +285,67 @@ func DeployContract( return contractAddr } + +// --------------------------------------------------------------------------------------- +// NOTE: The UniversalGatewayPC contract deployed here is a TEST-ONLY version. +// +// The withdraw() and withdrawAndExecute() functions inside this test contract: +// +// - DO NOT run validation (_validateCommon) +// - DO NOT compute gas fees via UniversalCore +// - DO NOT pull PRC20 fees into VaultPC +// - DO NOT burn PRC20 tokens +// - DO NOT interact with any external contracts +// +// Instead, both functions simply **emit UniversalTxWithdraw with hardcoded values**: +// +// chainId = "eip155:11155111" +// gasToken = fixed test address +// gasFee = 111 +// +// This behavior is intentional because Cosmos integration tests only need to verify: +// - ABI correctness +// - Event emission structure +// - Outbound pipeline handling +// - UE/UEM processing logic on the Cosmos side +func setupUniversalGatewayPC( + t *testing.T, + app *app.ChainApp, + ctx sdk.Context, + gatewayABI abi.ABI, + opts AppSetupOptions, +) error { + + gatewayAddr := opts.Addresses.UniversalGatewayPCAddr + universalCoreAddr := opts.Addresses.HandlerAddr + vaultPCAddr := opts.Addresses.EVMImplAddr + + // 1. Deploy bytecode of UniversalGatewayPC at reserved address + _ = DeployContract( + t, + app, + ctx, + gatewayAddr, + UNIVERSAL_GATEWAY_PC_BYTECODE, + ) + + // 2. Manually set storage because initialize() cannot be used + // + // Storage layout: + // slot 0 → UNIVERSAL_CORE (address) + // slot 1 → VAULT_PC (address) + app.EVMKeeper.SetState( + ctx, + gatewayAddr, + common.BigToHash(big.NewInt(0)), // key + common.LeftPadBytes(universalCoreAddr.Bytes(), 32), // value []byte + ) + + app.EVMKeeper.SetState( + ctx, + gatewayAddr, + common.BigToHash(big.NewInt(1)), // key + common.LeftPadBytes(vaultPCAddr.Bytes(), 32), // value []byte + ) + return nil +} From 957ff535f4dd63fbf546e0fff2d45ec647540359 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Mon, 1 Dec 2025 14:00:34 +0530 Subject: [PATCH 040/120] feat: added test for outbound creation from a inbound tx --- .../inbound_initiated_outbound_test.go | 195 ++++++++++++++++++ 1 file changed, 195 insertions(+) create mode 100644 test/integration/uexecutor/inbound_initiated_outbound_test.go diff --git a/test/integration/uexecutor/inbound_initiated_outbound_test.go b/test/integration/uexecutor/inbound_initiated_outbound_test.go new file mode 100644 index 00000000..60a832fc --- /dev/null +++ b/test/integration/uexecutor/inbound_initiated_outbound_test.go @@ -0,0 +1,195 @@ +package integrationtest + +import ( + "fmt" + "testing" + "time" + + sdk "github.com/cosmos/cosmos-sdk/types" + authz "github.com/cosmos/cosmos-sdk/x/authz" + stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + "github.com/ethereum/go-ethereum/common" + "github.com/stretchr/testify/require" + + "github.com/pushchain/push-chain-node/app" + utils "github.com/pushchain/push-chain-node/test/utils" + uexecutortypes "github.com/pushchain/push-chain-node/x/uexecutor/types" + uregistrytypes "github.com/pushchain/push-chain-node/x/uregistry/types" + uvalidatortypes "github.com/pushchain/push-chain-node/x/uvalidator/types" +) + +// This is the SELECTOR for withdraw(address,bytes,address,uint,uint,RevertInstructions) +var withdrawSelector = "0x720b3fbf" + +// Hardcoded test event signature of UniversalTxWithdraw +const UniversalTxWithdrawEventSig = "UniversalTxWithdraw" + +func setupInboundInitiatedOutboundTest(t *testing.T, numVals int) (*app.ChainApp, sdk.Context, []string, *uexecutortypes.Inbound, []stakingtypes.Validator, common.Address) { + app, ctx, _, validators := utils.SetAppWithMultipleValidators(t, numVals) + + chainConfigTest := uregistrytypes.ChainConfig{ + Chain: "eip155:11155111", + VmType: uregistrytypes.VmType_EVM, + PublicRpcUrl: "https://sepolia.drpc.org", + GatewayAddress: "0x28E0F09bE2321c1420Dc60Ee146aACbD68B335Fe", + BlockConfirmation: &uregistrytypes.BlockConfirmation{ + FastInbound: 5, + StandardInbound: 12, + }, + GatewayMethods: []*uregistrytypes.GatewayMethods{{ + Name: "addFunds", + Identifier: "", + EventIdentifier: "0xb28f49668e7e76dc96d7aabe5b7f63fecfbd1c3574774c05e8204e749fd96fbd", + ConfirmationType: 5, + }}, + Enabled: &uregistrytypes.ChainEnabled{ + IsInboundEnabled: true, + IsOutboundEnabled: true, + }, + } + + prc20Address := utils.GetDefaultAddresses().PRC20USDCAddr + testAddress := utils.GetDefaultAddresses().DefaultTestAddr + + tokenConfigTest := uregistrytypes.TokenConfig{ + Chain: "eip155:11155111", + Address: prc20Address.String(), + Name: "USD Coin", + Symbol: "USDC", + Decimals: 6, + Enabled: true, + LiquidityCap: "1000000000000000000000000", + TokenType: 1, + NativeRepresentation: &uregistrytypes.NativeRepresentation{ + Denom: "", + ContractAddress: prc20Address.String(), + }, + } + + app.UregistryKeeper.AddChainConfig(ctx, &chainConfigTest) + app.UregistryKeeper.AddTokenConfig(ctx, &tokenConfigTest) + + // Register each validator with a universal validator + universalVals := make([]string, len(validators)) + for i, val := range validators { + coreValAddr := val.OperatorAddress + universalValAddr := sdk.AccAddress([]byte( + fmt.Sprintf("universal-validator-%d", i), + )).String() + + pubkey := fmt.Sprintf("pubkey-%d", i) + network := uvalidatortypes.NetworkInfo{Ip: fmt.Sprintf("192.168.0.%d", i+1)} + + err := app.UvalidatorKeeper.AddUniversalValidator(ctx, coreValAddr, pubkey, network) + require.NoError(t, err) + + universalVals[i] = universalValAddr + } + + // Grant authz permission: core validator -> universal validator + for i, val := range validators { + accAddr, err := sdk.ValAddressFromBech32(val.OperatorAddress) // gives ValAddress + require.NoError(t, err) + + coreValAddr := sdk.AccAddress(accAddr) // converts to normal account address + + uniValAddr := sdk.MustAccAddressFromBech32(universalVals[i]) + + // Define grant for MsgVoteInbound + msgType := sdk.MsgTypeURL(&uexecutortypes.MsgVoteInbound{}) + auth := authz.NewGenericAuthorization(msgType) + + // Expiration + exp := ctx.BlockTime().Add(time.Hour) + + // SaveGrant takes (ctx, grantee, granter, authz.Authorization, *time.Time) + err = app.AuthzKeeper.SaveGrant(ctx, uniValAddr, coreValAddr, auth, &exp) + require.NoError(t, err) + } + + validUA := &uexecutortypes.UniversalAccountId{ + ChainNamespace: "eip155", + ChainId: "11155111", + Owner: testAddress, + } + + ueModuleAccAddress, _ := app.UexecutorKeeper.GetUeModuleAddress(ctx) + receipt, err := app.UexecutorKeeper.DeployUEAV2(ctx, ueModuleAccAddress, validUA) + ueaAddrHex := common.BytesToAddress(receipt.Ret) + require.NoError(t, err) + + // signature + validVerificationData := "0x4ac452e4e2db243b06e58d3720aeecf690c3636d9b407e1207d66c4118a1b17541a142b25108540a15b2ccbdd6dd7c16d541e3bde52679194bc76ecfad3b1fd11b" + + validUP := &uexecutortypes.UniversalPayload{ + To: utils.GetDefaultAddresses().UniversalGatewayPCAddr.Hex(), + Value: "0", + Data: "0x720b3fbf00000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4800000000000000000000000000000000000000000000000000000000000f4240000000000000000000000000000000000000000000000000000000000007a12000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000141234567890abcdef1234567890abcdef12345678000000000000000000000000000000000000000000000000f1000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000009726566756e642d6d650000000000000000000000000000000000000000000000", + GasLimit: "21000000", + MaxFeePerGas: "1000000000", + MaxPriorityFeePerGas: "200000000", + Nonce: "0", + Deadline: "0", + VType: uexecutortypes.VerificationType(0), + } + + inbound := &uexecutortypes.Inbound{ + SourceChain: "eip155:11155111", + TxHash: "0xabcd", + Sender: testAddress, + Recipient: "", + Amount: "1000000", + AssetAddr: prc20Address.String(), + LogIndex: "1", + TxType: uexecutortypes.TxType_FUNDS_AND_PAYLOAD, + UniversalPayload: validUP, + VerificationData: validVerificationData, + } + + return app, ctx, universalVals, inbound, validators, ueaAddrHex +} + +func TestInboundInitiatedOutbound(t *testing.T) { + + t.Run("successfully creates outbound in the UniversalTx when payload invokes Gateway's withdraw fn", func(t *testing.T) { + app, ctx, vals, inbound, coreVals, _ := setupInboundInitiatedOutboundTest(t, 4) + + // --- Quorum reached --- + for i := 0; i < 3; i++ { + valAddr, err := sdk.ValAddressFromBech32(coreVals[i].OperatorAddress) + require.NoError(t, err) + coreValAcc := sdk.AccAddress(valAddr).String() + + err = utils.ExecVoteInbound(t, ctx, app, vals[i], coreValAcc, inbound) + require.NoError(t, err) + } + + utxKey := uexecutortypes.GetInboundUniversalTxKey(*inbound) + utx, _, err := app.UexecutorKeeper.GetUniversalTx(ctx, utxKey) + require.NoError(t, err) + + require.NotEmpty(t, utx.OutboundTx, "OutboundTx should exist after successful withdraw event") + require.Len(t, utx.OutboundTx, 1, "Only one outbound expected") + + out := utx.OutboundTx[0] + + // Validate outbound params + require.Equal(t, + "eip155:11155111", + out.DestinationChain, + "Destination chain must be correct", + ) + + require.Equal(t, + "222", + out.GasLimit, + "Gas limit must match event (gasFeeUsed) value", + ) + + // checks + require.Equal(t, "0x1234567890abcdef1234567890abcdef12345678", out.Recipient) + require.Equal(t, "1000000", out.Amount) + require.Equal(t, uexecutortypes.TxType_FUNDS_AND_PAYLOAD, out.TxType) + require.Equal(t, uexecutortypes.Status_PENDING, out.OutboundStatus) + }) +} From b056609219c6207c0fb183feb72c53f9caff844a Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Tue, 9 Dec 2025 12:38:35 +0530 Subject: [PATCH 041/120] feat: added txId in the OutboundCreationEvent --- x/uexecutor/types/events.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/x/uexecutor/types/events.go b/x/uexecutor/types/events.go index 5da024f7..e9949d89 100644 --- a/x/uexecutor/types/events.go +++ b/x/uexecutor/types/events.go @@ -15,6 +15,7 @@ const ( type OutboundCreatedEvent struct { UniversalTxId string `json:"utx_id"` OutboundId string `json:"outbound_id"` + TxID string `json:"tx_id"` // txId: abi.encode(utx_id, outbound_id) DestinationChain string `json:"destination_chain"` Recipient string `json:"recipient"` Amount string `json:"amount"` @@ -29,6 +30,10 @@ type OutboundCreatedEvent struct { // NewOutboundCreatedEvent creates a Cosmos SDK event for outbound creation. func NewOutboundCreatedEvent(e OutboundCreatedEvent) (sdk.Event, error) { + if e.TxID == "" { + return sdk.Event{}, fmt.Errorf("tx_id must not be empty") + } + bz, err := json.Marshal(e) if err != nil { return sdk.Event{}, fmt.Errorf("failed to marshal outbound event: %w", err) @@ -38,6 +43,7 @@ func NewOutboundCreatedEvent(e OutboundCreatedEvent) (sdk.Event, error) { EventTypeOutboundCreated, sdk.NewAttribute("utx_id", e.UniversalTxId), sdk.NewAttribute("outbound_id", e.OutboundId), + sdk.NewAttribute("tx_id", e.TxID), sdk.NewAttribute("destination_chain", e.DestinationChain), sdk.NewAttribute("recipient", e.Recipient), sdk.NewAttribute("amount", e.Amount), From 7c8b21a4b1cd17109f03177431038dce2d1203af Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Tue, 9 Dec 2025 12:42:44 +0530 Subject: [PATCH 042/120] feat: added encoding of utx id and outbound id to create tx id --- x/uexecutor/keeper/create_outbound.go | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/x/uexecutor/keeper/create_outbound.go b/x/uexecutor/keeper/create_outbound.go index 8061962e..30438373 100644 --- a/x/uexecutor/keeper/create_outbound.go +++ b/x/uexecutor/keeper/create_outbound.go @@ -2,12 +2,14 @@ package keeper import ( "context" + "encoding/hex" "fmt" "strings" "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" evmtypes "github.com/cosmos/evm/x/vm/types" + "github.com/ethereum/go-ethereum/accounts/abi" "github.com/pushchain/push-chain-node/x/uexecutor/types" uregistrytypes "github.com/pushchain/push-chain-node/x/uregistry/types" ) @@ -160,9 +162,24 @@ func (k Keeper) attachOutboundsToUtx( utx.OutboundTx = append(utx.OutboundTx, outbound) + // ABI-encode (utx_id, outbound_id) + stringType, _ := abi.NewType("string", "", nil) + args := abi.Arguments{ + {Type: stringType}, + {Type: stringType}, + } + + encoded, err := args.Pack(utxId, outbound.Id) + if err != nil { + return err + } + + txIDHex := hex.EncodeToString(encoded) + evt, err := types.NewOutboundCreatedEvent(types.OutboundCreatedEvent{ UniversalTxId: utxId, OutboundId: outbound.Id, + TxID: txIDHex, DestinationChain: outbound.DestinationChain, Recipient: outbound.Recipient, Amount: outbound.Amount, From 57ac41a90fd176ad26c5cdfb34030987c9baf4f8 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Tue, 9 Dec 2025 12:46:01 +0530 Subject: [PATCH 043/120] feat: updated MsgVoteOutbound proto to add tx_id --- proto/uexecutor/v1/tx.proto | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/proto/uexecutor/v1/tx.proto b/proto/uexecutor/v1/tx.proto index 79a7d788..bc4d223c 100755 --- a/proto/uexecutor/v1/tx.proto +++ b/proto/uexecutor/v1/tx.proto @@ -140,9 +140,8 @@ message MsgVoteOutbound { // signer is the Cosmos address initiating the tx (used for tx signing) string signer = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - string utx_id = 2; // UniversalTx Id - string outbound_id = 3; // index of outbound tx - OutboundObservation observed_tx = 4; // observed tx on destination chain + string tx_id = 2; // Tx Id (abi.encode(utxId,outboundId)) + OutboundObservation observed_tx = 3; // observed tx on destination chain } // MsgVoteInboundResponse defines the response for MsgExecutePayload. From e2a9411ac51d196f506292ca4b27a8ef479c2e78 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Tue, 9 Dec 2025 12:46:19 +0530 Subject: [PATCH 044/120] chore: added generated protobuf --- api/uexecutor/v1/tx.pulsar.go | 274 +++++++++++++--------------------- 1 file changed, 100 insertions(+), 174 deletions(-) diff --git a/api/uexecutor/v1/tx.pulsar.go b/api/uexecutor/v1/tx.pulsar.go index fdcda3d6..cdd10ba4 100644 --- a/api/uexecutor/v1/tx.pulsar.go +++ b/api/uexecutor/v1/tx.pulsar.go @@ -4631,8 +4631,7 @@ func (x *fastReflection_MsgVoteInboundResponse) ProtoMethods() *protoiface.Metho var ( md_MsgVoteOutbound protoreflect.MessageDescriptor fd_MsgVoteOutbound_signer protoreflect.FieldDescriptor - fd_MsgVoteOutbound_utx_id protoreflect.FieldDescriptor - fd_MsgVoteOutbound_outbound_id protoreflect.FieldDescriptor + fd_MsgVoteOutbound_tx_id protoreflect.FieldDescriptor fd_MsgVoteOutbound_observed_tx protoreflect.FieldDescriptor ) @@ -4640,8 +4639,7 @@ func init() { file_uexecutor_v1_tx_proto_init() md_MsgVoteOutbound = File_uexecutor_v1_tx_proto.Messages().ByName("MsgVoteOutbound") fd_MsgVoteOutbound_signer = md_MsgVoteOutbound.Fields().ByName("signer") - fd_MsgVoteOutbound_utx_id = md_MsgVoteOutbound.Fields().ByName("utx_id") - fd_MsgVoteOutbound_outbound_id = md_MsgVoteOutbound.Fields().ByName("outbound_id") + fd_MsgVoteOutbound_tx_id = md_MsgVoteOutbound.Fields().ByName("tx_id") fd_MsgVoteOutbound_observed_tx = md_MsgVoteOutbound.Fields().ByName("observed_tx") } @@ -4716,15 +4714,9 @@ func (x *fastReflection_MsgVoteOutbound) Range(f func(protoreflect.FieldDescript return } } - if x.UtxId != "" { - value := protoreflect.ValueOfString(x.UtxId) - if !f(fd_MsgVoteOutbound_utx_id, value) { - return - } - } - if x.OutboundId != "" { - value := protoreflect.ValueOfString(x.OutboundId) - if !f(fd_MsgVoteOutbound_outbound_id, value) { + if x.TxId != "" { + value := protoreflect.ValueOfString(x.TxId) + if !f(fd_MsgVoteOutbound_tx_id, value) { return } } @@ -4751,10 +4743,8 @@ func (x *fastReflection_MsgVoteOutbound) Has(fd protoreflect.FieldDescriptor) bo switch fd.FullName() { case "uexecutor.v1.MsgVoteOutbound.signer": return x.Signer != "" - case "uexecutor.v1.MsgVoteOutbound.utx_id": - return x.UtxId != "" - case "uexecutor.v1.MsgVoteOutbound.outbound_id": - return x.OutboundId != "" + case "uexecutor.v1.MsgVoteOutbound.tx_id": + return x.TxId != "" case "uexecutor.v1.MsgVoteOutbound.observed_tx": return x.ObservedTx != nil default: @@ -4775,10 +4765,8 @@ func (x *fastReflection_MsgVoteOutbound) Clear(fd protoreflect.FieldDescriptor) switch fd.FullName() { case "uexecutor.v1.MsgVoteOutbound.signer": x.Signer = "" - case "uexecutor.v1.MsgVoteOutbound.utx_id": - x.UtxId = "" - case "uexecutor.v1.MsgVoteOutbound.outbound_id": - x.OutboundId = "" + case "uexecutor.v1.MsgVoteOutbound.tx_id": + x.TxId = "" case "uexecutor.v1.MsgVoteOutbound.observed_tx": x.ObservedTx = nil default: @@ -4800,11 +4788,8 @@ func (x *fastReflection_MsgVoteOutbound) Get(descriptor protoreflect.FieldDescri case "uexecutor.v1.MsgVoteOutbound.signer": value := x.Signer return protoreflect.ValueOfString(value) - case "uexecutor.v1.MsgVoteOutbound.utx_id": - value := x.UtxId - return protoreflect.ValueOfString(value) - case "uexecutor.v1.MsgVoteOutbound.outbound_id": - value := x.OutboundId + case "uexecutor.v1.MsgVoteOutbound.tx_id": + value := x.TxId return protoreflect.ValueOfString(value) case "uexecutor.v1.MsgVoteOutbound.observed_tx": value := x.ObservedTx @@ -4831,10 +4816,8 @@ func (x *fastReflection_MsgVoteOutbound) Set(fd protoreflect.FieldDescriptor, va switch fd.FullName() { case "uexecutor.v1.MsgVoteOutbound.signer": x.Signer = value.Interface().(string) - case "uexecutor.v1.MsgVoteOutbound.utx_id": - x.UtxId = value.Interface().(string) - case "uexecutor.v1.MsgVoteOutbound.outbound_id": - x.OutboundId = value.Interface().(string) + case "uexecutor.v1.MsgVoteOutbound.tx_id": + x.TxId = value.Interface().(string) case "uexecutor.v1.MsgVoteOutbound.observed_tx": x.ObservedTx = value.Message().Interface().(*OutboundObservation) default: @@ -4864,10 +4847,8 @@ func (x *fastReflection_MsgVoteOutbound) Mutable(fd protoreflect.FieldDescriptor return protoreflect.ValueOfMessage(x.ObservedTx.ProtoReflect()) case "uexecutor.v1.MsgVoteOutbound.signer": panic(fmt.Errorf("field signer of message uexecutor.v1.MsgVoteOutbound is not mutable")) - case "uexecutor.v1.MsgVoteOutbound.utx_id": - panic(fmt.Errorf("field utx_id of message uexecutor.v1.MsgVoteOutbound is not mutable")) - case "uexecutor.v1.MsgVoteOutbound.outbound_id": - panic(fmt.Errorf("field outbound_id of message uexecutor.v1.MsgVoteOutbound is not mutable")) + case "uexecutor.v1.MsgVoteOutbound.tx_id": + panic(fmt.Errorf("field tx_id of message uexecutor.v1.MsgVoteOutbound is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.MsgVoteOutbound")) @@ -4883,9 +4864,7 @@ func (x *fastReflection_MsgVoteOutbound) NewField(fd protoreflect.FieldDescripto switch fd.FullName() { case "uexecutor.v1.MsgVoteOutbound.signer": return protoreflect.ValueOfString("") - case "uexecutor.v1.MsgVoteOutbound.utx_id": - return protoreflect.ValueOfString("") - case "uexecutor.v1.MsgVoteOutbound.outbound_id": + case "uexecutor.v1.MsgVoteOutbound.tx_id": return protoreflect.ValueOfString("") case "uexecutor.v1.MsgVoteOutbound.observed_tx": m := new(OutboundObservation) @@ -4963,11 +4942,7 @@ func (x *fastReflection_MsgVoteOutbound) ProtoMethods() *protoiface.Methods { if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - l = len(x.UtxId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.OutboundId) + l = len(x.TxId) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } @@ -5016,19 +4991,12 @@ func (x *fastReflection_MsgVoteOutbound) ProtoMethods() *protoiface.Methods { copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- - dAtA[i] = 0x22 - } - if len(x.OutboundId) > 0 { - i -= len(x.OutboundId) - copy(dAtA[i:], x.OutboundId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.OutboundId))) - i-- dAtA[i] = 0x1a } - if len(x.UtxId) > 0 { - i -= len(x.UtxId) - copy(dAtA[i:], x.UtxId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.UtxId))) + if len(x.TxId) > 0 { + i -= len(x.TxId) + copy(dAtA[i:], x.TxId) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.TxId))) i-- dAtA[i] = 0x12 } @@ -5122,7 +5090,7 @@ func (x *fastReflection_MsgVoteOutbound) ProtoMethods() *protoiface.Methods { iNdEx = postIndex case 2: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field UtxId", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TxId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -5150,41 +5118,9 @@ func (x *fastReflection_MsgVoteOutbound) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.UtxId = string(dAtA[iNdEx:postIndex]) + x.TxId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field OutboundId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.OutboundId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ObservedTx", wireType) } @@ -6986,9 +6922,8 @@ type MsgVoteOutbound struct { // signer is the Cosmos address initiating the tx (used for tx signing) Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty"` - UtxId string `protobuf:"bytes,2,opt,name=utx_id,json=utxId,proto3" json:"utx_id,omitempty"` // UniversalTx Id - OutboundId string `protobuf:"bytes,3,opt,name=outbound_id,json=outboundId,proto3" json:"outbound_id,omitempty"` // index of outbound tx - ObservedTx *OutboundObservation `protobuf:"bytes,4,opt,name=observed_tx,json=observedTx,proto3" json:"observed_tx,omitempty"` // observed tx on destination chain + TxId string `protobuf:"bytes,2,opt,name=tx_id,json=txId,proto3" json:"tx_id,omitempty"` // Tx Id (abi.encode(utxId,outboundId)) + ObservedTx *OutboundObservation `protobuf:"bytes,3,opt,name=observed_tx,json=observedTx,proto3" json:"observed_tx,omitempty"` // observed tx on destination chain } func (x *MsgVoteOutbound) Reset() { @@ -7018,16 +6953,9 @@ func (x *MsgVoteOutbound) GetSigner() string { return "" } -func (x *MsgVoteOutbound) GetUtxId() string { - if x != nil { - return x.UtxId - } - return "" -} - -func (x *MsgVoteOutbound) GetOutboundId() string { +func (x *MsgVoteOutbound) GetTxId() string { if x != nil { - return x.OutboundId + return x.TxId } return "" } @@ -7242,86 +7170,84 @@ var file_uexecutor_v1_tx_proto_rawDesc = []byte{ 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x11, 0x75, 0x65, 0x2f, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x22, 0x18, 0x0a, 0x16, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0xe3, 0x01, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x4f, 0x75, 0x74, + 0x65, 0x22, 0xc0, 0x01, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x30, 0x0a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, - 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x12, 0x15, 0x0a, 0x06, 0x75, 0x74, 0x78, 0x5f, 0x69, - 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x75, 0x74, 0x78, 0x49, 0x64, 0x12, 0x1f, - 0x0a, 0x0b, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x49, 0x64, 0x12, - 0x42, 0x0a, 0x0b, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, 0x74, 0x78, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, - 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x4f, 0x62, 0x73, 0x65, - 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, - 0x64, 0x54, 0x78, 0x3a, 0x22, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, - 0x8a, 0xe7, 0xb0, 0x2a, 0x12, 0x75, 0x65, 0x2f, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x4f, - 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x56, 0x6f, - 0x74, 0x65, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0xd3, 0x01, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x47, 0x61, - 0x73, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x30, 0x0a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, - 0x52, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x12, 0x2a, 0x0a, 0x11, 0x6f, 0x62, 0x73, 0x65, - 0x72, 0x76, 0x65, 0x64, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x43, 0x68, 0x61, - 0x69, 0x6e, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, - 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, - 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x3a, 0x29, 0x82, - 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x19, 0x75, - 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2f, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, - 0x47, 0x61, 0x73, 0x50, 0x72, 0x69, 0x63, 0x65, 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x56, - 0x6f, 0x74, 0x65, 0x47, 0x61, 0x73, 0x50, 0x72, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x32, 0xce, 0x04, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x54, 0x0a, 0x0c, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1d, 0x2e, 0x75, 0x65, - 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x25, 0x2e, 0x75, 0x65, 0x78, - 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x4b, 0x0a, 0x09, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x55, 0x45, 0x41, 0x12, 0x1a, + 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x12, 0x13, 0x0a, 0x05, 0x74, 0x78, 0x5f, 0x69, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x78, 0x49, 0x64, 0x12, 0x42, 0x0a, 0x0b, + 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, 0x74, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x21, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, + 0x2e, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x54, 0x78, + 0x3a, 0x22, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x8a, 0xe7, 0xb0, + 0x2a, 0x12, 0x75, 0x65, 0x2f, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x4f, 0x75, 0x74, 0x62, + 0x6f, 0x75, 0x6e, 0x64, 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x4f, + 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0xd3, 0x01, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x47, 0x61, 0x73, 0x50, 0x72, + 0x69, 0x63, 0x65, 0x12, 0x30, 0x0a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x06, 0x73, + 0x69, 0x67, 0x6e, 0x65, 0x72, 0x12, 0x2a, 0x0a, 0x11, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, + 0x64, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0f, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x49, + 0x64, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, + 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, + 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x3a, 0x29, 0x82, 0xe7, 0xb0, 0x2a, + 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x19, 0x75, 0x65, 0x78, 0x65, + 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2f, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x47, 0x61, 0x73, + 0x50, 0x72, 0x69, 0x63, 0x65, 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, + 0x47, 0x61, 0x73, 0x50, 0x72, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x32, 0xce, 0x04, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x54, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1d, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, + 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x25, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, + 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4b, + 0x0a, 0x09, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x55, 0x45, 0x41, 0x12, 0x1a, 0x2e, 0x75, 0x65, + 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x65, + 0x70, 0x6c, 0x6f, 0x79, 0x55, 0x45, 0x41, 0x1a, 0x22, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, + 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, + 0x55, 0x45, 0x41, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x06, 0x4d, + 0x69, 0x6e, 0x74, 0x50, 0x43, 0x12, 0x17, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, + 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x4d, 0x69, 0x6e, 0x74, 0x50, 0x43, 0x1a, 0x1f, + 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, + 0x67, 0x4d, 0x69, 0x6e, 0x74, 0x50, 0x43, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x5a, 0x0a, 0x0e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, + 0x64, 0x12, 0x1f, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, + 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x50, 0x61, 0x79, 0x6c, 0x6f, + 0x61, 0x64, 0x1a, 0x27, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, + 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x50, 0x61, 0x79, 0x6c, + 0x6f, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x0b, 0x56, + 0x6f, 0x74, 0x65, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x1c, 0x2e, 0x75, 0x65, 0x78, + 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, + 0x65, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x1a, 0x24, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, + 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x49, + 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x54, + 0x0a, 0x0c, 0x56, 0x6f, 0x74, 0x65, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x1d, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, - 0x67, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x55, 0x45, 0x41, 0x1a, 0x22, 0x2e, 0x75, 0x65, 0x78, - 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x70, - 0x6c, 0x6f, 0x79, 0x55, 0x45, 0x41, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, - 0x0a, 0x06, 0x4d, 0x69, 0x6e, 0x74, 0x50, 0x43, 0x12, 0x17, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, - 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x4d, 0x69, 0x6e, 0x74, 0x50, - 0x43, 0x1a, 0x1f, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, - 0x2e, 0x4d, 0x73, 0x67, 0x4d, 0x69, 0x6e, 0x74, 0x50, 0x43, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x5a, 0x0a, 0x0e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x50, 0x61, 0x79, - 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x1f, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, - 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x50, 0x61, - 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x1a, 0x27, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, - 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x50, - 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, - 0x0a, 0x0b, 0x56, 0x6f, 0x74, 0x65, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x1c, 0x2e, + 0x67, 0x56, 0x6f, 0x74, 0x65, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x1a, 0x25, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, - 0x56, 0x6f, 0x74, 0x65, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x1a, 0x24, 0x2e, 0x75, 0x65, - 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x56, 0x6f, - 0x74, 0x65, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x54, 0x0a, 0x0c, 0x56, 0x6f, 0x74, 0x65, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, - 0x64, 0x12, 0x1d, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, - 0x2e, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, - 0x1a, 0x25, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, - 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x54, 0x0a, 0x0c, 0x56, 0x6f, 0x74, 0x65, 0x47, - 0x61, 0x73, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x1d, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, - 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x47, 0x61, - 0x73, 0x50, 0x72, 0x69, 0x63, 0x65, 0x1a, 0x25, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, - 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x47, 0x61, 0x73, - 0x50, 0x72, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, - 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xaf, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x75, 0x65, 0x78, - 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x41, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x70, 0x75, 0x73, 0x68, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x2d, - 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2d, 0x6e, 0x6f, 0x64, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x75, - 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x31, 0x3b, 0x75, 0x65, 0x78, 0x65, - 0x63, 0x75, 0x74, 0x6f, 0x72, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x55, 0x58, 0x58, 0xaa, 0x02, 0x0c, - 0x55, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0c, 0x55, - 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x18, 0x55, 0x65, - 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0d, 0x55, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, - 0x6f, 0x72, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x56, 0x6f, 0x74, 0x65, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x54, 0x0a, 0x0c, 0x56, 0x6f, 0x74, 0x65, 0x47, 0x61, 0x73, 0x50, + 0x72, 0x69, 0x63, 0x65, 0x12, 0x1d, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, + 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x47, 0x61, 0x73, 0x50, 0x72, + 0x69, 0x63, 0x65, 0x1a, 0x25, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, + 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x47, 0x61, 0x73, 0x50, 0x72, 0x69, + 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, + 0x01, 0x42, 0xaf, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, + 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x41, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x75, + 0x73, 0x68, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x2d, 0x63, 0x68, 0x61, + 0x69, 0x6e, 0x2d, 0x6e, 0x6f, 0x64, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x75, 0x65, 0x78, 0x65, + 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x31, 0x3b, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x6f, 0x72, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x55, 0x58, 0x58, 0xaa, 0x02, 0x0c, 0x55, 0x65, 0x78, + 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0c, 0x55, 0x65, 0x78, 0x65, + 0x63, 0x75, 0x74, 0x6f, 0x72, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x18, 0x55, 0x65, 0x78, 0x65, 0x63, + 0x75, 0x74, 0x6f, 0x72, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0xea, 0x02, 0x0d, 0x55, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x3a, + 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( From dc23fecdfefa74c87145dcf6e3261d82db9a1582 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Tue, 9 Dec 2025 12:46:39 +0530 Subject: [PATCH 045/120] chore: changes in the MsgVoteOutbound proto types --- x/uexecutor/types/tx.pb.go | 186 +++++++++++++------------------------ 1 file changed, 67 insertions(+), 119 deletions(-) diff --git a/x/uexecutor/types/tx.pb.go b/x/uexecutor/types/tx.pb.go index 6fe87f22..8ddc8a97 100644 --- a/x/uexecutor/types/tx.pb.go +++ b/x/uexecutor/types/tx.pb.go @@ -547,9 +547,8 @@ var xxx_messageInfo_MsgVoteInboundResponse proto.InternalMessageInfo type MsgVoteOutbound struct { // signer is the Cosmos address initiating the tx (used for tx signing) Signer string `protobuf:"bytes,1,opt,name=signer,proto3" json:"signer,omitempty"` - UtxId string `protobuf:"bytes,2,opt,name=utx_id,json=utxId,proto3" json:"utx_id,omitempty"` - OutboundId string `protobuf:"bytes,3,opt,name=outbound_id,json=outboundId,proto3" json:"outbound_id,omitempty"` - ObservedTx *OutboundObservation `protobuf:"bytes,4,opt,name=observed_tx,json=observedTx,proto3" json:"observed_tx,omitempty"` + TxId string `protobuf:"bytes,2,opt,name=tx_id,json=txId,proto3" json:"tx_id,omitempty"` + ObservedTx *OutboundObservation `protobuf:"bytes,3,opt,name=observed_tx,json=observedTx,proto3" json:"observed_tx,omitempty"` } func (m *MsgVoteOutbound) Reset() { *m = MsgVoteOutbound{} } @@ -592,16 +591,9 @@ func (m *MsgVoteOutbound) GetSigner() string { return "" } -func (m *MsgVoteOutbound) GetUtxId() string { +func (m *MsgVoteOutbound) GetTxId() string { if m != nil { - return m.UtxId - } - return "" -} - -func (m *MsgVoteOutbound) GetOutboundId() string { - if m != nil { - return m.OutboundId + return m.TxId } return "" } @@ -776,63 +768,62 @@ func init() { func init() { proto.RegisterFile("uexecutor/v1/tx.proto", fileDescriptor_88d6216044506365) } var fileDescriptor_88d6216044506365 = []byte{ - // 893 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x56, 0xbf, 0x6f, 0xdb, 0x46, - 0x18, 0x35, 0x63, 0x59, 0x81, 0x3e, 0x09, 0x89, 0xc5, 0xc8, 0xb1, 0xcc, 0x34, 0xb2, 0xcd, 0xfe, - 0x72, 0x9d, 0x5a, 0x6c, 0x54, 0x20, 0x83, 0x36, 0x2b, 0x31, 0x5a, 0x21, 0x50, 0xa3, 0xb2, 0x56, - 0x87, 0x2c, 0xc2, 0x89, 0xbc, 0x52, 0x44, 0x25, 0x1e, 0xc1, 0x3b, 0x0a, 0xd4, 0x56, 0x74, 0xec, - 0xd4, 0xa9, 0xff, 0x44, 0x17, 0x0f, 0xfd, 0x03, 0x3a, 0x66, 0x6a, 0x83, 0x16, 0x05, 0x3a, 0x15, - 0x85, 0x35, 0xf8, 0xdf, 0x08, 0x78, 0xfc, 0x4d, 0x49, 0x09, 0xe0, 0xc9, 0x8b, 0x70, 0x7c, 0xef, - 0xfb, 0x9e, 0xbe, 0xf7, 0x78, 0x3c, 0x12, 0x76, 0x5c, 0xec, 0x61, 0xcd, 0x65, 0xc4, 0x51, 0x66, - 0x8f, 0x15, 0xe6, 0x35, 0x6d, 0x87, 0x30, 0x22, 0x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53, 0x23, 0x53, 0xc5, 0x76, 0xe9, 0x98, 0x3f, 0x19, 0x7c, 0x75, 0xc2, 0x97, 0x27, 0x16, - 0xd1, 0xb1, 0xe2, 0x29, 0xc9, 0x3e, 0xe6, 0x1f, 0x64, 0xa3, 0x22, 0xff, 0xc0, 0xfa, 0xfc, 0x4d, - 0x00, 0x00, 0x00, 0xff, 0xff, 0xb6, 0xa3, 0x2b, 0x16, 0xfe, 0x09, 0x00, 0x00, + // 875 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x96, 0xbf, 0x6f, 0xdb, 0x46, + 0x14, 0xc7, 0xcd, 0x58, 0x56, 0xa0, 0x27, 0x21, 0xb1, 0x68, 0x25, 0x96, 0x99, 0x46, 0xb1, 0xd9, + 0x5f, 0xae, 0x52, 0x8b, 0x8d, 0x0a, 0x64, 0xd0, 0x26, 0x25, 0x46, 0x2b, 0x04, 0x6a, 0x54, 0xd6, + 0xea, 0x90, 0x45, 0x38, 0x91, 0x57, 0x8a, 0xa8, 0xc4, 0x23, 0x78, 0x47, 0x81, 0xda, 0x8a, 0x8e, + 0x9d, 0x3a, 0xf5, 0x9f, 0xe8, 0xe2, 0xa1, 0x7f, 0x40, 0xc7, 0x4c, 0x6d, 0xd0, 0xa2, 0x40, 0xa7, + 0xa2, 0xb0, 0x07, 0xff, 0x1b, 0x01, 0x8f, 0xbf, 0x29, 0x29, 0x01, 0x3c, 0x65, 0x11, 0xee, 0xde, + 0xf7, 0xbd, 0x2f, 0xef, 0xf3, 0xee, 0x78, 0x14, 0xdc, 0x71, 0xb1, 0x87, 0x35, 0x97, 0x11, 0x47, + 0x59, 0x3c, 0x52, 0x98, 0xd7, 0xb2, 0x1d, 0xc2, 0x88, 0x58, 0x89, 0xc3, 0xad, 0xc5, 0x23, 0xa9, + 0x8a, 0xe6, 0xa6, 0x45, 0x14, 0xfe, 0x1b, 0x24, 0x48, 0x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0x00, 0xff, 0xff, 0x86, 0xae, 0x75, 0x93, 0xdb, 0x09, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1542,19 +1533,12 @@ func (m *MsgVoteOutbound) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintTx(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x22 - } - if len(m.OutboundId) > 0 { - i -= len(m.OutboundId) - copy(dAtA[i:], m.OutboundId) - i = encodeVarintTx(dAtA, i, uint64(len(m.OutboundId))) - i-- dAtA[i] = 0x1a } - if len(m.UtxId) > 0 { - i -= len(m.UtxId) - copy(dAtA[i:], m.UtxId) - i = encodeVarintTx(dAtA, i, uint64(len(m.UtxId))) + if len(m.TxId) > 0 { + i -= len(m.TxId) + copy(dAtA[i:], m.TxId) + i = encodeVarintTx(dAtA, i, uint64(len(m.TxId))) i-- dAtA[i] = 0x12 } @@ -1830,11 +1814,7 @@ func (m *MsgVoteOutbound) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - l = len(m.UtxId) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.OutboundId) + l = len(m.TxId) if l > 0 { n += 1 + l + sovTx(uint64(l)) } @@ -2958,7 +2938,7 @@ func (m *MsgVoteOutbound) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field UtxId", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field TxId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2986,41 +2966,9 @@ func (m *MsgVoteOutbound) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.UtxId = string(dAtA[iNdEx:postIndex]) + m.TxId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OutboundId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - 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 ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.OutboundId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ObservedTx", wireType) } From 690dda925fe3d5e1fcc85a547095618ab6cce098 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Tue, 9 Dec 2025 14:04:32 +0530 Subject: [PATCH 046/120] feat: added tx_id encoding and decoding util functions --- x/uexecutor/types/tx_id.go | 74 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 x/uexecutor/types/tx_id.go diff --git a/x/uexecutor/types/tx_id.go b/x/uexecutor/types/tx_id.go new file mode 100644 index 00000000..784198ae --- /dev/null +++ b/x/uexecutor/types/tx_id.go @@ -0,0 +1,74 @@ +package types + +import ( + "encoding/hex" + "strings" + + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/pkg/errors" +) + +var ( + stringType, _ = abi.NewType("string", "", nil) + + // ABI arguments layout: (string utxID, string outboundID) + txIDArgs = abi.Arguments{ + {Type: stringType}, + {Type: stringType}, + } +) + +// EncodeOutboundTxIDHex returns hex string of ABI(utxID, outboundID) +func EncodeOutboundTxIDHex(utxID, outboundID string) (string, error) { + bz, err := encodeOutboundTxID(utxID, outboundID) + if err != nil { + return "", err + } + return "0x" + hex.EncodeToString(bz), nil +} + +// DecodeOutboundTxIDHex decodes a hex string into (utxID, outboundID) +func DecodeOutboundTxIDHex(txIDHex string) (string, string, error) { + bz, err := hexStringToBytes(txIDHex) + if err != nil { + return "", "", err + } + return decodeOutboundTxID(bz) +} + +// Low-level encoding (bytes) +func encodeOutboundTxID(utxID, outboundID string) ([]byte, error) { + return txIDArgs.Pack(utxID, outboundID) +} + +// Low-level decoding (bytes → strings) +func decodeOutboundTxID(bz []byte) (string, string, error) { + values, err := txIDArgs.Unpack(bz) + if err != nil { + return "", "", errors.Wrap(err, "ABI decode failed") + } + + utxID := values[0].(string) + outID := values[1].(string) + + return utxID, outID, nil +} + +// Converts "0x…" or "…" into bytes +func hexStringToBytes(input string) ([]byte, error) { + if input == "" { + return nil, errors.New("empty tx_id") + } + + // Normalize 0x prefix + if strings.HasPrefix(input, "0x") || strings.HasPrefix(input, "0X") { + input = input[2:] + } + + bz, err := hex.DecodeString(input) + if err != nil { + return nil, errors.Wrap(err, "invalid hex in tx_id") + } + + return bz, nil +} From ee9b4ea740c0fe07dd6c317e61722a071486828b Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Tue, 9 Dec 2025 14:05:02 +0530 Subject: [PATCH 047/120] feat: added msg_vote_outbound in types and its validateBasic --- x/uexecutor/types/msg_vote_outbound.go | 100 +++++++++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 x/uexecutor/types/msg_vote_outbound.go diff --git a/x/uexecutor/types/msg_vote_outbound.go b/x/uexecutor/types/msg_vote_outbound.go new file mode 100644 index 00000000..7a37c966 --- /dev/null +++ b/x/uexecutor/types/msg_vote_outbound.go @@ -0,0 +1,100 @@ +package types + +import ( + "strings" + + "cosmossdk.io/errors" + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" +) + +var ( + _ sdk.Msg = &MsgVoteOutbound{} +) + +// NewMsgVoteOutbound creates new instance of MsgVoteOutbound +func NewMsgVoteOutbound( + sender sdk.Address, + txID string, + observedTx OutboundObservation, +) *MsgVoteOutbound { + return &MsgVoteOutbound{ + Signer: sender.String(), + TxId: txID, + ObservedTx: &observedTx, + } +} + +// Route returns the name of the module +func (msg MsgVoteOutbound) Route() string { return ModuleName } + +// Type returns the action +func (msg MsgVoteOutbound) Type() string { return "msg_vote_outbound" } + +// GetSignBytes implements the LegacyMsg interface. +func (msg MsgVoteOutbound) GetSignBytes() []byte { + return sdk.MustSortJSON(AminoCdc.MustMarshalJSON(&msg)) +} + +// GetSigners returns the expected signers for a MsgVoteOutbound message. +func (msg *MsgVoteOutbound) GetSigners() []sdk.AccAddress { + addr, _ := sdk.AccAddressFromBech32(msg.Signer) + return []sdk.AccAddress{addr} +} + +// ValidateBasic does a sanity check on the provided data. +func (msg *MsgVoteOutbound) ValidateBasic() error { + // validate signer + if _, err := sdk.AccAddressFromBech32(msg.Signer); err != nil { + return errors.Wrap(err, "invalid signer address") + } + + // tx_id must be non-empty + if strings.TrimSpace(msg.TxId) == "" { + return errors.Wrap(sdkerrors.ErrInvalidRequest, "tx_id cannot be empty") + } + + // Decode tx_id into (utxID, outboundID) + utxID, outboundID, err := DecodeOutboundTxIDHex(msg.TxId) + if err != nil { + return errors.Wrap(sdkerrors.ErrInvalidRequest, "invalid tx_id: decode failed") + } + + if strings.TrimSpace(utxID) == "" { + return errors.Wrap(sdkerrors.ErrInvalidRequest, "decoded utx_id cannot be empty") + } + if strings.TrimSpace(outboundID) == "" { + return errors.Wrap(sdkerrors.ErrInvalidRequest, "decoded outbound_id cannot be empty") + } + + // observed_tx must NOT be nil + if msg.ObservedTx == nil { + return errors.Wrap(sdkerrors.ErrInvalidRequest, "observed_tx cannot be nil") + } + + // Validate observed_tx content + obs := msg.ObservedTx + + if obs.Success { + // Success requires tx_hash AND block_height > 0 + if strings.TrimSpace(obs.TxHash) == "" { + return errors.Wrap(sdkerrors.ErrInvalidRequest, + "observed_tx.tx_hash required when success=true") + } + if obs.BlockHeight == 0 { + return errors.Wrap(sdkerrors.ErrInvalidRequest, + "observed_tx.block_height must be > 0 when success=true") + } + + } else { + // Failure case: + // tx_hash MAY be empty. + // BUT if tx_hash is present, block_height must be > 0. + if strings.TrimSpace(obs.TxHash) != "" && obs.BlockHeight == 0 { + return errors.Wrap(sdkerrors.ErrInvalidRequest, + "observed_tx.block_height must be > 0 when tx_hash is provided") + } + } + + return nil +} From 7132a09834c277c15e0ea84a5d4264a33c6ca086 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Tue, 9 Dec 2025 14:05:32 +0530 Subject: [PATCH 048/120] refactor: modified tx_id encoding to use reusable helpers --- x/uexecutor/keeper/create_outbound.go | 14 ++------------ x/uexecutor/keeper/msg_server.go | 8 +++++++- 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/x/uexecutor/keeper/create_outbound.go b/x/uexecutor/keeper/create_outbound.go index 30438373..9ef543fc 100644 --- a/x/uexecutor/keeper/create_outbound.go +++ b/x/uexecutor/keeper/create_outbound.go @@ -2,14 +2,12 @@ package keeper import ( "context" - "encoding/hex" "fmt" "strings" "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" evmtypes "github.com/cosmos/evm/x/vm/types" - "github.com/ethereum/go-ethereum/accounts/abi" "github.com/pushchain/push-chain-node/x/uexecutor/types" uregistrytypes "github.com/pushchain/push-chain-node/x/uregistry/types" ) @@ -163,19 +161,11 @@ func (k Keeper) attachOutboundsToUtx( utx.OutboundTx = append(utx.OutboundTx, outbound) // ABI-encode (utx_id, outbound_id) - stringType, _ := abi.NewType("string", "", nil) - args := abi.Arguments{ - {Type: stringType}, - {Type: stringType}, - } - - encoded, err := args.Pack(utxId, outbound.Id) + txIDHex, err := types.EncodeOutboundTxIDHex(utxId, outbound.Id) if err != nil { - return err + return fmt.Errorf("failed to encode outbound txID: %w", err) } - txIDHex := hex.EncodeToString(encoded) - evt, err := types.NewOutboundCreatedEvent(types.OutboundCreatedEvent{ UniversalTxId: utxId, OutboundId: outbound.Id, diff --git a/x/uexecutor/keeper/msg_server.go b/x/uexecutor/keeper/msg_server.go index aa344492..6d94e409 100755 --- a/x/uexecutor/keeper/msg_server.go +++ b/x/uexecutor/keeper/msg_server.go @@ -6,6 +6,7 @@ import ( "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" "github.com/pushchain/push-chain-node/utils" "github.com/pushchain/push-chain-node/x/uexecutor/types" @@ -181,7 +182,12 @@ func (ms msgServer) VoteOutbound(ctx context.Context, msg *types.MsgVoteOutbound return nil, fmt.Errorf("universal validator for signer %s is tombstoned", msg.Signer) } - err = ms.k.VoteOutbound(ctx, signerValAddr, msg.UtxId, msg.OutboundId, *msg.ObservedTx) + utxID, outboundID, err := types.DecodeOutboundTxIDHex(msg.TxId) + if err != nil { + return nil, errors.Wrap(sdkerrors.ErrInvalidRequest, "invalid tx_id: decode failed") + } + + err = ms.k.VoteOutbound(ctx, signerValAddr, utxID, outboundID, *msg.ObservedTx) if err != nil { return nil, err } From e0ab2a40475e5149a5325b0822b0e1dc7542d91d Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Wed, 10 Dec 2025 13:14:43 +0530 Subject: [PATCH 049/120] feat: updated proto to add revert instructions --- proto/uexecutor/v1/types.proto | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/proto/uexecutor/v1/types.proto b/proto/uexecutor/v1/types.proto index 41742656..8d9b7542 100644 --- a/proto/uexecutor/v1/types.proto +++ b/proto/uexecutor/v1/types.proto @@ -75,6 +75,14 @@ enum TxType { FUNDS_AND_PAYLOAD = 3; // synthetic + payload exec GAS_AND_PAYLOAD = 4; // fee abstraction + payload exec PAYLOAD = 5; + INBOUND_REVERT = 6; +} + +message RevertInstructions { + option (amino.name) = "uexecutor/revert_instructions"; + option (gogoproto.equal) = true; + + string fund_recipient = 1; // where funds go in revert/refund } message Inbound { @@ -92,6 +100,7 @@ message Inbound { TxType tx_type = 8; // inbound tx type UniversalPayload universal_payload = 9; // payload is the universal payload to be executed string verification_data = 10; // verification_data is the bytes passed as verifier data for the given payload. + RevertInstructions revert_instructions = 11; // revert config } message PCTx { @@ -116,7 +125,7 @@ message OutboundObservation { string tx_hash = 3; // external chain tx hash } -message Originating_Pc_TX { +message OriginatingPcTx { option (amino.name) = "uexecutor/originating_pc_tx"; option (gogoproto.equal) = true; @@ -137,10 +146,12 @@ message OutboundTx { string payload = 6; // payload to be executed string gas_limit = 7; // gas limit to be used for the outbound tx TxType tx_type = 8; // outbound tx type - Originating_Pc_TX pc_tx = 9; // pc_tx that originated the outbound + OriginatingPcTx pc_tx = 9; // pc_tx that originated the outbound OutboundObservation observed_tx = 10; // observed tx on destination chain string id = 11; // id of outbound tx Status outbound_status = 12; // status of outbound tx + RevertInstructions revert_instructions = 13; + PCTx pc_revert_execution = 14; } message UniversalTx { From a55fa00f5531bcf6ca17667eae3a7c6316ced5a2 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Wed, 10 Dec 2025 13:14:58 +0530 Subject: [PATCH 050/120] chore: added generated protobuf --- api/uexecutor/v1/types.pulsar.go | 1407 +++++++++++++++++++++++------- 1 file changed, 1082 insertions(+), 325 deletions(-) diff --git a/api/uexecutor/v1/types.pulsar.go b/api/uexecutor/v1/types.pulsar.go index ad12299d..d4c566c8 100644 --- a/api/uexecutor/v1/types.pulsar.go +++ b/api/uexecutor/v1/types.pulsar.go @@ -1889,17 +1889,438 @@ func (x *fastReflection_UniversalAccountId) ProtoMethods() *protoiface.Methods { } var ( - md_Inbound protoreflect.MessageDescriptor - fd_Inbound_source_chain protoreflect.FieldDescriptor - fd_Inbound_tx_hash protoreflect.FieldDescriptor - fd_Inbound_sender protoreflect.FieldDescriptor - fd_Inbound_recipient protoreflect.FieldDescriptor - fd_Inbound_amount protoreflect.FieldDescriptor - fd_Inbound_asset_addr protoreflect.FieldDescriptor - fd_Inbound_log_index protoreflect.FieldDescriptor - fd_Inbound_tx_type protoreflect.FieldDescriptor - fd_Inbound_universal_payload protoreflect.FieldDescriptor - fd_Inbound_verification_data protoreflect.FieldDescriptor + md_RevertInstructions protoreflect.MessageDescriptor + fd_RevertInstructions_fund_recipient protoreflect.FieldDescriptor +) + +func init() { + file_uexecutor_v1_types_proto_init() + md_RevertInstructions = File_uexecutor_v1_types_proto.Messages().ByName("RevertInstructions") + fd_RevertInstructions_fund_recipient = md_RevertInstructions.Fields().ByName("fund_recipient") +} + +var _ protoreflect.Message = (*fastReflection_RevertInstructions)(nil) + +type fastReflection_RevertInstructions RevertInstructions + +func (x *RevertInstructions) ProtoReflect() protoreflect.Message { + return (*fastReflection_RevertInstructions)(x) +} + +func (x *RevertInstructions) slowProtoReflect() protoreflect.Message { + mi := &file_uexecutor_v1_types_proto_msgTypes[3] + 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) +} + +var _fastReflection_RevertInstructions_messageType fastReflection_RevertInstructions_messageType +var _ protoreflect.MessageType = fastReflection_RevertInstructions_messageType{} + +type fastReflection_RevertInstructions_messageType struct{} + +func (x fastReflection_RevertInstructions_messageType) Zero() protoreflect.Message { + return (*fastReflection_RevertInstructions)(nil) +} +func (x fastReflection_RevertInstructions_messageType) New() protoreflect.Message { + return new(fastReflection_RevertInstructions) +} +func (x fastReflection_RevertInstructions_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_RevertInstructions +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_RevertInstructions) Descriptor() protoreflect.MessageDescriptor { + return md_RevertInstructions +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_RevertInstructions) Type() protoreflect.MessageType { + return _fastReflection_RevertInstructions_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_RevertInstructions) New() protoreflect.Message { + return new(fastReflection_RevertInstructions) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_RevertInstructions) Interface() protoreflect.ProtoMessage { + return (*RevertInstructions)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_RevertInstructions) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.FundRecipient != "" { + value := protoreflect.ValueOfString(x.FundRecipient) + if !f(fd_RevertInstructions_fund_recipient, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_RevertInstructions) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "uexecutor.v1.RevertInstructions.fund_recipient": + return x.FundRecipient != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.RevertInstructions")) + } + panic(fmt.Errorf("message uexecutor.v1.RevertInstructions does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_RevertInstructions) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "uexecutor.v1.RevertInstructions.fund_recipient": + x.FundRecipient = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.RevertInstructions")) + } + panic(fmt.Errorf("message uexecutor.v1.RevertInstructions does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_RevertInstructions) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "uexecutor.v1.RevertInstructions.fund_recipient": + value := x.FundRecipient + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.RevertInstructions")) + } + panic(fmt.Errorf("message uexecutor.v1.RevertInstructions does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_RevertInstructions) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "uexecutor.v1.RevertInstructions.fund_recipient": + x.FundRecipient = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.RevertInstructions")) + } + panic(fmt.Errorf("message uexecutor.v1.RevertInstructions does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_RevertInstructions) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "uexecutor.v1.RevertInstructions.fund_recipient": + panic(fmt.Errorf("field fund_recipient of message uexecutor.v1.RevertInstructions is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.RevertInstructions")) + } + panic(fmt.Errorf("message uexecutor.v1.RevertInstructions does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_RevertInstructions) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "uexecutor.v1.RevertInstructions.fund_recipient": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.RevertInstructions")) + } + panic(fmt.Errorf("message uexecutor.v1.RevertInstructions does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_RevertInstructions) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in uexecutor.v1.RevertInstructions", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_RevertInstructions) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_RevertInstructions) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_RevertInstructions) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_RevertInstructions) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*RevertInstructions) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.FundRecipient) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*RevertInstructions) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.FundRecipient) > 0 { + i -= len(x.FundRecipient) + copy(dAtA[i:], x.FundRecipient) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.FundRecipient))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*RevertInstructions) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: RevertInstructions: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: RevertInstructions: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field FundRecipient", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.FundRecipient = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_Inbound protoreflect.MessageDescriptor + fd_Inbound_source_chain protoreflect.FieldDescriptor + fd_Inbound_tx_hash protoreflect.FieldDescriptor + fd_Inbound_sender protoreflect.FieldDescriptor + fd_Inbound_recipient protoreflect.FieldDescriptor + fd_Inbound_amount protoreflect.FieldDescriptor + fd_Inbound_asset_addr protoreflect.FieldDescriptor + fd_Inbound_log_index protoreflect.FieldDescriptor + fd_Inbound_tx_type protoreflect.FieldDescriptor + fd_Inbound_universal_payload protoreflect.FieldDescriptor + fd_Inbound_verification_data protoreflect.FieldDescriptor + fd_Inbound_revert_instructions protoreflect.FieldDescriptor ) func init() { @@ -1915,6 +2336,7 @@ func init() { fd_Inbound_tx_type = md_Inbound.Fields().ByName("tx_type") fd_Inbound_universal_payload = md_Inbound.Fields().ByName("universal_payload") fd_Inbound_verification_data = md_Inbound.Fields().ByName("verification_data") + fd_Inbound_revert_instructions = md_Inbound.Fields().ByName("revert_instructions") } var _ protoreflect.Message = (*fastReflection_Inbound)(nil) @@ -1926,7 +2348,7 @@ func (x *Inbound) ProtoReflect() protoreflect.Message { } func (x *Inbound) slowProtoReflect() protoreflect.Message { - mi := &file_uexecutor_v1_types_proto_msgTypes[3] + mi := &file_uexecutor_v1_types_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2042,6 +2464,12 @@ func (x *fastReflection_Inbound) Range(f func(protoreflect.FieldDescriptor, prot return } } + if x.RevertInstructions != nil { + value := protoreflect.ValueOfMessage(x.RevertInstructions.ProtoReflect()) + if !f(fd_Inbound_revert_instructions, value) { + return + } + } } // Has reports whether a field is populated. @@ -2077,6 +2505,8 @@ func (x *fastReflection_Inbound) Has(fd protoreflect.FieldDescriptor) bool { return x.UniversalPayload != nil case "uexecutor.v1.Inbound.verification_data": return x.VerificationData != "" + case "uexecutor.v1.Inbound.revert_instructions": + return x.RevertInstructions != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.Inbound")) @@ -2113,6 +2543,8 @@ func (x *fastReflection_Inbound) Clear(fd protoreflect.FieldDescriptor) { x.UniversalPayload = nil case "uexecutor.v1.Inbound.verification_data": x.VerificationData = "" + case "uexecutor.v1.Inbound.revert_instructions": + x.RevertInstructions = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.Inbound")) @@ -2159,6 +2591,9 @@ func (x *fastReflection_Inbound) Get(descriptor protoreflect.FieldDescriptor) pr case "uexecutor.v1.Inbound.verification_data": value := x.VerificationData return protoreflect.ValueOfString(value) + case "uexecutor.v1.Inbound.revert_instructions": + value := x.RevertInstructions + return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.Inbound")) @@ -2199,6 +2634,8 @@ func (x *fastReflection_Inbound) Set(fd protoreflect.FieldDescriptor, value prot x.UniversalPayload = value.Message().Interface().(*UniversalPayload) case "uexecutor.v1.Inbound.verification_data": x.VerificationData = value.Interface().(string) + case "uexecutor.v1.Inbound.revert_instructions": + x.RevertInstructions = value.Message().Interface().(*RevertInstructions) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.Inbound")) @@ -2224,6 +2661,11 @@ func (x *fastReflection_Inbound) Mutable(fd protoreflect.FieldDescriptor) protor x.UniversalPayload = new(UniversalPayload) } return protoreflect.ValueOfMessage(x.UniversalPayload.ProtoReflect()) + case "uexecutor.v1.Inbound.revert_instructions": + if x.RevertInstructions == nil { + x.RevertInstructions = new(RevertInstructions) + } + return protoreflect.ValueOfMessage(x.RevertInstructions.ProtoReflect()) case "uexecutor.v1.Inbound.source_chain": panic(fmt.Errorf("field source_chain of message uexecutor.v1.Inbound is not mutable")) case "uexecutor.v1.Inbound.tx_hash": @@ -2276,6 +2718,9 @@ func (x *fastReflection_Inbound) NewField(fd protoreflect.FieldDescriptor) proto return protoreflect.ValueOfMessage(m.ProtoReflect()) case "uexecutor.v1.Inbound.verification_data": return protoreflect.ValueOfString("") + case "uexecutor.v1.Inbound.revert_instructions": + m := new(RevertInstructions) + return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.Inbound")) @@ -2384,6 +2829,10 @@ func (x *fastReflection_Inbound) ProtoMethods() *protoiface.Methods { if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } + if x.RevertInstructions != nil { + l = options.Size(x.RevertInstructions) + n += 1 + l + runtime.Sov(uint64(l)) + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -2413,6 +2862,20 @@ func (x *fastReflection_Inbound) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } + if x.RevertInstructions != nil { + encoded, err := options.Marshal(x.RevertInstructions) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x5a + } if len(x.VerificationData) > 0 { i -= len(x.VerificationData) copy(dAtA[i:], x.VerificationData) @@ -2848,6 +3311,42 @@ func (x *fastReflection_Inbound) ProtoMethods() *protoiface.Methods { } x.VerificationData = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 11: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RevertInstructions", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.RevertInstructions == nil { + x.RevertInstructions = &RevertInstructions{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.RevertInstructions); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -2913,7 +3412,7 @@ func (x *PCTx) ProtoReflect() protoreflect.Message { } func (x *PCTx) slowProtoReflect() protoreflect.Message { - mi := &file_uexecutor_v1_types_proto_msgTypes[4] + mi := &file_uexecutor_v1_types_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3615,7 +4114,7 @@ func (x *OutboundObservation) ProtoReflect() protoreflect.Message { } func (x *OutboundObservation) slowProtoReflect() protoreflect.Message { - mi := &file_uexecutor_v1_types_proto_msgTypes[5] + mi := &file_uexecutor_v1_types_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4114,28 +4613,28 @@ func (x *fastReflection_OutboundObservation) ProtoMethods() *protoiface.Methods } var ( - md_Originating_Pc_TX protoreflect.MessageDescriptor - fd_Originating_Pc_TX_tx_hash protoreflect.FieldDescriptor - fd_Originating_Pc_TX_log_index protoreflect.FieldDescriptor + md_OriginatingPcTx protoreflect.MessageDescriptor + fd_OriginatingPcTx_tx_hash protoreflect.FieldDescriptor + fd_OriginatingPcTx_log_index protoreflect.FieldDescriptor ) func init() { file_uexecutor_v1_types_proto_init() - md_Originating_Pc_TX = File_uexecutor_v1_types_proto.Messages().ByName("Originating_Pc_TX") - fd_Originating_Pc_TX_tx_hash = md_Originating_Pc_TX.Fields().ByName("tx_hash") - fd_Originating_Pc_TX_log_index = md_Originating_Pc_TX.Fields().ByName("log_index") + md_OriginatingPcTx = File_uexecutor_v1_types_proto.Messages().ByName("OriginatingPcTx") + fd_OriginatingPcTx_tx_hash = md_OriginatingPcTx.Fields().ByName("tx_hash") + fd_OriginatingPcTx_log_index = md_OriginatingPcTx.Fields().ByName("log_index") } -var _ protoreflect.Message = (*fastReflection_Originating_Pc_TX)(nil) +var _ protoreflect.Message = (*fastReflection_OriginatingPcTx)(nil) -type fastReflection_Originating_Pc_TX Originating_Pc_TX +type fastReflection_OriginatingPcTx OriginatingPcTx -func (x *Originating_Pc_TX) ProtoReflect() protoreflect.Message { - return (*fastReflection_Originating_Pc_TX)(x) +func (x *OriginatingPcTx) ProtoReflect() protoreflect.Message { + return (*fastReflection_OriginatingPcTx)(x) } -func (x *Originating_Pc_TX) slowProtoReflect() protoreflect.Message { - mi := &file_uexecutor_v1_types_proto_msgTypes[6] +func (x *OriginatingPcTx) slowProtoReflect() protoreflect.Message { + mi := &file_uexecutor_v1_types_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4146,43 +4645,43 @@ func (x *Originating_Pc_TX) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_Originating_Pc_TX_messageType fastReflection_Originating_Pc_TX_messageType -var _ protoreflect.MessageType = fastReflection_Originating_Pc_TX_messageType{} +var _fastReflection_OriginatingPcTx_messageType fastReflection_OriginatingPcTx_messageType +var _ protoreflect.MessageType = fastReflection_OriginatingPcTx_messageType{} -type fastReflection_Originating_Pc_TX_messageType struct{} +type fastReflection_OriginatingPcTx_messageType struct{} -func (x fastReflection_Originating_Pc_TX_messageType) Zero() protoreflect.Message { - return (*fastReflection_Originating_Pc_TX)(nil) +func (x fastReflection_OriginatingPcTx_messageType) Zero() protoreflect.Message { + return (*fastReflection_OriginatingPcTx)(nil) } -func (x fastReflection_Originating_Pc_TX_messageType) New() protoreflect.Message { - return new(fastReflection_Originating_Pc_TX) +func (x fastReflection_OriginatingPcTx_messageType) New() protoreflect.Message { + return new(fastReflection_OriginatingPcTx) } -func (x fastReflection_Originating_Pc_TX_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Originating_Pc_TX +func (x fastReflection_OriginatingPcTx_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_OriginatingPcTx } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_Originating_Pc_TX) Descriptor() protoreflect.MessageDescriptor { - return md_Originating_Pc_TX +func (x *fastReflection_OriginatingPcTx) Descriptor() protoreflect.MessageDescriptor { + return md_OriginatingPcTx } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. -func (x *fastReflection_Originating_Pc_TX) Type() protoreflect.MessageType { - return _fastReflection_Originating_Pc_TX_messageType +func (x *fastReflection_OriginatingPcTx) Type() protoreflect.MessageType { + return _fastReflection_OriginatingPcTx_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_Originating_Pc_TX) New() protoreflect.Message { - return new(fastReflection_Originating_Pc_TX) +func (x *fastReflection_OriginatingPcTx) New() protoreflect.Message { + return new(fastReflection_OriginatingPcTx) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_Originating_Pc_TX) Interface() protoreflect.ProtoMessage { - return (*Originating_Pc_TX)(x) +func (x *fastReflection_OriginatingPcTx) Interface() protoreflect.ProtoMessage { + return (*OriginatingPcTx)(x) } // Range iterates over every populated field in an undefined order, @@ -4190,16 +4689,16 @@ func (x *fastReflection_Originating_Pc_TX) Interface() protoreflect.ProtoMessage // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_Originating_Pc_TX) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +func (x *fastReflection_OriginatingPcTx) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.TxHash != "" { value := protoreflect.ValueOfString(x.TxHash) - if !f(fd_Originating_Pc_TX_tx_hash, value) { + if !f(fd_OriginatingPcTx_tx_hash, value) { return } } if x.LogIndex != "" { value := protoreflect.ValueOfString(x.LogIndex) - if !f(fd_Originating_Pc_TX_log_index, value) { + if !f(fd_OriginatingPcTx_log_index, value) { return } } @@ -4216,17 +4715,17 @@ func (x *fastReflection_Originating_Pc_TX) Range(f func(protoreflect.FieldDescri // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. -func (x *fastReflection_Originating_Pc_TX) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_OriginatingPcTx) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "uexecutor.v1.Originating_Pc_TX.tx_hash": + case "uexecutor.v1.OriginatingPcTx.tx_hash": return x.TxHash != "" - case "uexecutor.v1.Originating_Pc_TX.log_index": + case "uexecutor.v1.OriginatingPcTx.log_index": return x.LogIndex != "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.Originating_Pc_TX")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.OriginatingPcTx")) } - panic(fmt.Errorf("message uexecutor.v1.Originating_Pc_TX does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message uexecutor.v1.OriginatingPcTx does not contain field %s", fd.FullName())) } } @@ -4236,17 +4735,17 @@ func (x *fastReflection_Originating_Pc_TX) Has(fd protoreflect.FieldDescriptor) // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Originating_Pc_TX) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_OriginatingPcTx) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "uexecutor.v1.Originating_Pc_TX.tx_hash": + case "uexecutor.v1.OriginatingPcTx.tx_hash": x.TxHash = "" - case "uexecutor.v1.Originating_Pc_TX.log_index": + case "uexecutor.v1.OriginatingPcTx.log_index": x.LogIndex = "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.Originating_Pc_TX")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.OriginatingPcTx")) } - panic(fmt.Errorf("message uexecutor.v1.Originating_Pc_TX does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message uexecutor.v1.OriginatingPcTx does not contain field %s", fd.FullName())) } } @@ -4256,19 +4755,19 @@ func (x *fastReflection_Originating_Pc_TX) Clear(fd protoreflect.FieldDescriptor // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_Originating_Pc_TX) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_OriginatingPcTx) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "uexecutor.v1.Originating_Pc_TX.tx_hash": + case "uexecutor.v1.OriginatingPcTx.tx_hash": value := x.TxHash return protoreflect.ValueOfString(value) - case "uexecutor.v1.Originating_Pc_TX.log_index": + case "uexecutor.v1.OriginatingPcTx.log_index": value := x.LogIndex return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.Originating_Pc_TX")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.OriginatingPcTx")) } - panic(fmt.Errorf("message uexecutor.v1.Originating_Pc_TX does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message uexecutor.v1.OriginatingPcTx does not contain field %s", descriptor.FullName())) } } @@ -4282,17 +4781,17 @@ func (x *fastReflection_Originating_Pc_TX) Get(descriptor protoreflect.FieldDesc // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Originating_Pc_TX) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_OriginatingPcTx) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "uexecutor.v1.Originating_Pc_TX.tx_hash": + case "uexecutor.v1.OriginatingPcTx.tx_hash": x.TxHash = value.Interface().(string) - case "uexecutor.v1.Originating_Pc_TX.log_index": + case "uexecutor.v1.OriginatingPcTx.log_index": x.LogIndex = value.Interface().(string) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.Originating_Pc_TX")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.OriginatingPcTx")) } - panic(fmt.Errorf("message uexecutor.v1.Originating_Pc_TX does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message uexecutor.v1.OriginatingPcTx does not contain field %s", fd.FullName())) } } @@ -4306,44 +4805,44 @@ func (x *fastReflection_Originating_Pc_TX) Set(fd protoreflect.FieldDescriptor, // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Originating_Pc_TX) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_OriginatingPcTx) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "uexecutor.v1.Originating_Pc_TX.tx_hash": - panic(fmt.Errorf("field tx_hash of message uexecutor.v1.Originating_Pc_TX is not mutable")) - case "uexecutor.v1.Originating_Pc_TX.log_index": - panic(fmt.Errorf("field log_index of message uexecutor.v1.Originating_Pc_TX is not mutable")) + case "uexecutor.v1.OriginatingPcTx.tx_hash": + panic(fmt.Errorf("field tx_hash of message uexecutor.v1.OriginatingPcTx is not mutable")) + case "uexecutor.v1.OriginatingPcTx.log_index": + panic(fmt.Errorf("field log_index of message uexecutor.v1.OriginatingPcTx is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.Originating_Pc_TX")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.OriginatingPcTx")) } - panic(fmt.Errorf("message uexecutor.v1.Originating_Pc_TX does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message uexecutor.v1.OriginatingPcTx does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_Originating_Pc_TX) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_OriginatingPcTx) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "uexecutor.v1.Originating_Pc_TX.tx_hash": + case "uexecutor.v1.OriginatingPcTx.tx_hash": return protoreflect.ValueOfString("") - case "uexecutor.v1.Originating_Pc_TX.log_index": + case "uexecutor.v1.OriginatingPcTx.log_index": return protoreflect.ValueOfString("") default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.Originating_Pc_TX")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.OriginatingPcTx")) } - panic(fmt.Errorf("message uexecutor.v1.Originating_Pc_TX does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message uexecutor.v1.OriginatingPcTx does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_Originating_Pc_TX) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_OriginatingPcTx) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in uexecutor.v1.Originating_Pc_TX", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in uexecutor.v1.OriginatingPcTx", d.FullName())) } panic("unreachable") } @@ -4351,7 +4850,7 @@ func (x *fastReflection_Originating_Pc_TX) WhichOneof(d protoreflect.OneofDescri // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_Originating_Pc_TX) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_OriginatingPcTx) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -4362,7 +4861,7 @@ func (x *fastReflection_Originating_Pc_TX) GetUnknown() protoreflect.RawFields { // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Originating_Pc_TX) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_OriginatingPcTx) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -4374,7 +4873,7 @@ func (x *fastReflection_Originating_Pc_TX) SetUnknown(fields protoreflect.RawFie // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. -func (x *fastReflection_Originating_Pc_TX) IsValid() bool { +func (x *fastReflection_OriginatingPcTx) IsValid() bool { return x != nil } @@ -4384,9 +4883,9 @@ func (x *fastReflection_Originating_Pc_TX) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_Originating_Pc_TX) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_OriginatingPcTx) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Originating_Pc_TX) + x := input.Message.Interface().(*OriginatingPcTx) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -4416,7 +4915,7 @@ func (x *fastReflection_Originating_Pc_TX) ProtoMethods() *protoiface.Methods { } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*Originating_Pc_TX) + x := input.Message.Interface().(*OriginatingPcTx) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -4460,7 +4959,7 @@ func (x *fastReflection_Originating_Pc_TX) ProtoMethods() *protoiface.Methods { }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*Originating_Pc_TX) + x := input.Message.Interface().(*OriginatingPcTx) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -4492,10 +4991,10 @@ func (x *fastReflection_Originating_Pc_TX) ProtoMethods() *protoiface.Methods { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Originating_Pc_TX: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: OriginatingPcTx: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Originating_Pc_TX: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: OriginatingPcTx: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -4598,19 +5097,21 @@ func (x *fastReflection_Originating_Pc_TX) ProtoMethods() *protoiface.Methods { } var ( - md_OutboundTx protoreflect.MessageDescriptor - fd_OutboundTx_destination_chain protoreflect.FieldDescriptor - fd_OutboundTx_recipient protoreflect.FieldDescriptor - fd_OutboundTx_amount protoreflect.FieldDescriptor - fd_OutboundTx_asset_addr protoreflect.FieldDescriptor - fd_OutboundTx_sender protoreflect.FieldDescriptor - fd_OutboundTx_payload protoreflect.FieldDescriptor - fd_OutboundTx_gas_limit protoreflect.FieldDescriptor - fd_OutboundTx_tx_type protoreflect.FieldDescriptor - fd_OutboundTx_pc_tx protoreflect.FieldDescriptor - fd_OutboundTx_observed_tx protoreflect.FieldDescriptor - fd_OutboundTx_id protoreflect.FieldDescriptor - fd_OutboundTx_outbound_status protoreflect.FieldDescriptor + md_OutboundTx protoreflect.MessageDescriptor + fd_OutboundTx_destination_chain protoreflect.FieldDescriptor + fd_OutboundTx_recipient protoreflect.FieldDescriptor + fd_OutboundTx_amount protoreflect.FieldDescriptor + fd_OutboundTx_asset_addr protoreflect.FieldDescriptor + fd_OutboundTx_sender protoreflect.FieldDescriptor + fd_OutboundTx_payload protoreflect.FieldDescriptor + fd_OutboundTx_gas_limit protoreflect.FieldDescriptor + fd_OutboundTx_tx_type protoreflect.FieldDescriptor + fd_OutboundTx_pc_tx protoreflect.FieldDescriptor + fd_OutboundTx_observed_tx protoreflect.FieldDescriptor + fd_OutboundTx_id protoreflect.FieldDescriptor + fd_OutboundTx_outbound_status protoreflect.FieldDescriptor + fd_OutboundTx_revert_instructions protoreflect.FieldDescriptor + fd_OutboundTx_pc_revert_execution protoreflect.FieldDescriptor ) func init() { @@ -4628,6 +5129,8 @@ func init() { fd_OutboundTx_observed_tx = md_OutboundTx.Fields().ByName("observed_tx") fd_OutboundTx_id = md_OutboundTx.Fields().ByName("id") fd_OutboundTx_outbound_status = md_OutboundTx.Fields().ByName("outbound_status") + fd_OutboundTx_revert_instructions = md_OutboundTx.Fields().ByName("revert_instructions") + fd_OutboundTx_pc_revert_execution = md_OutboundTx.Fields().ByName("pc_revert_execution") } var _ protoreflect.Message = (*fastReflection_OutboundTx)(nil) @@ -4639,7 +5142,7 @@ func (x *OutboundTx) ProtoReflect() protoreflect.Message { } func (x *OutboundTx) slowProtoReflect() protoreflect.Message { - mi := &file_uexecutor_v1_types_proto_msgTypes[7] + mi := &file_uexecutor_v1_types_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4767,6 +5270,18 @@ func (x *fastReflection_OutboundTx) Range(f func(protoreflect.FieldDescriptor, p return } } + if x.RevertInstructions != nil { + value := protoreflect.ValueOfMessage(x.RevertInstructions.ProtoReflect()) + if !f(fd_OutboundTx_revert_instructions, value) { + return + } + } + if x.PcRevertExecution != nil { + value := protoreflect.ValueOfMessage(x.PcRevertExecution.ProtoReflect()) + if !f(fd_OutboundTx_pc_revert_execution, value) { + return + } + } } // Has reports whether a field is populated. @@ -4806,6 +5321,10 @@ func (x *fastReflection_OutboundTx) Has(fd protoreflect.FieldDescriptor) bool { return x.Id != "" case "uexecutor.v1.OutboundTx.outbound_status": return x.OutboundStatus != 0 + case "uexecutor.v1.OutboundTx.revert_instructions": + return x.RevertInstructions != nil + case "uexecutor.v1.OutboundTx.pc_revert_execution": + return x.PcRevertExecution != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.OutboundTx")) @@ -4846,6 +5365,10 @@ func (x *fastReflection_OutboundTx) Clear(fd protoreflect.FieldDescriptor) { x.Id = "" case "uexecutor.v1.OutboundTx.outbound_status": x.OutboundStatus = 0 + case "uexecutor.v1.OutboundTx.revert_instructions": + x.RevertInstructions = nil + case "uexecutor.v1.OutboundTx.pc_revert_execution": + x.PcRevertExecution = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.OutboundTx")) @@ -4898,6 +5421,12 @@ func (x *fastReflection_OutboundTx) Get(descriptor protoreflect.FieldDescriptor) case "uexecutor.v1.OutboundTx.outbound_status": value := x.OutboundStatus return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) + case "uexecutor.v1.OutboundTx.revert_instructions": + value := x.RevertInstructions + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "uexecutor.v1.OutboundTx.pc_revert_execution": + value := x.PcRevertExecution + return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.OutboundTx")) @@ -4935,13 +5464,17 @@ func (x *fastReflection_OutboundTx) Set(fd protoreflect.FieldDescriptor, value p case "uexecutor.v1.OutboundTx.tx_type": x.TxType = (TxType)(value.Enum()) case "uexecutor.v1.OutboundTx.pc_tx": - x.PcTx = value.Message().Interface().(*Originating_Pc_TX) + x.PcTx = value.Message().Interface().(*OriginatingPcTx) case "uexecutor.v1.OutboundTx.observed_tx": x.ObservedTx = value.Message().Interface().(*OutboundObservation) case "uexecutor.v1.OutboundTx.id": x.Id = value.Interface().(string) case "uexecutor.v1.OutboundTx.outbound_status": x.OutboundStatus = (Status)(value.Enum()) + case "uexecutor.v1.OutboundTx.revert_instructions": + x.RevertInstructions = value.Message().Interface().(*RevertInstructions) + case "uexecutor.v1.OutboundTx.pc_revert_execution": + x.PcRevertExecution = value.Message().Interface().(*PCTx) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.OutboundTx")) @@ -4964,7 +5497,7 @@ func (x *fastReflection_OutboundTx) Mutable(fd protoreflect.FieldDescriptor) pro switch fd.FullName() { case "uexecutor.v1.OutboundTx.pc_tx": if x.PcTx == nil { - x.PcTx = new(Originating_Pc_TX) + x.PcTx = new(OriginatingPcTx) } return protoreflect.ValueOfMessage(x.PcTx.ProtoReflect()) case "uexecutor.v1.OutboundTx.observed_tx": @@ -4972,6 +5505,16 @@ func (x *fastReflection_OutboundTx) Mutable(fd protoreflect.FieldDescriptor) pro x.ObservedTx = new(OutboundObservation) } return protoreflect.ValueOfMessage(x.ObservedTx.ProtoReflect()) + case "uexecutor.v1.OutboundTx.revert_instructions": + if x.RevertInstructions == nil { + x.RevertInstructions = new(RevertInstructions) + } + return protoreflect.ValueOfMessage(x.RevertInstructions.ProtoReflect()) + case "uexecutor.v1.OutboundTx.pc_revert_execution": + if x.PcRevertExecution == nil { + x.PcRevertExecution = new(PCTx) + } + return protoreflect.ValueOfMessage(x.PcRevertExecution.ProtoReflect()) case "uexecutor.v1.OutboundTx.destination_chain": panic(fmt.Errorf("field destination_chain of message uexecutor.v1.OutboundTx is not mutable")) case "uexecutor.v1.OutboundTx.recipient": @@ -5022,7 +5565,7 @@ func (x *fastReflection_OutboundTx) NewField(fd protoreflect.FieldDescriptor) pr case "uexecutor.v1.OutboundTx.tx_type": return protoreflect.ValueOfEnum(0) case "uexecutor.v1.OutboundTx.pc_tx": - m := new(Originating_Pc_TX) + m := new(OriginatingPcTx) return protoreflect.ValueOfMessage(m.ProtoReflect()) case "uexecutor.v1.OutboundTx.observed_tx": m := new(OutboundObservation) @@ -5031,6 +5574,12 @@ func (x *fastReflection_OutboundTx) NewField(fd protoreflect.FieldDescriptor) pr return protoreflect.ValueOfString("") case "uexecutor.v1.OutboundTx.outbound_status": return protoreflect.ValueOfEnum(0) + case "uexecutor.v1.OutboundTx.revert_instructions": + m := new(RevertInstructions) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "uexecutor.v1.OutboundTx.pc_revert_execution": + m := new(PCTx) + return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.OutboundTx")) @@ -5146,6 +5695,14 @@ func (x *fastReflection_OutboundTx) ProtoMethods() *protoiface.Methods { if x.OutboundStatus != 0 { n += 1 + runtime.Sov(uint64(x.OutboundStatus)) } + if x.RevertInstructions != nil { + l = options.Size(x.RevertInstructions) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.PcRevertExecution != nil { + l = options.Size(x.PcRevertExecution) + n += 1 + l + runtime.Sov(uint64(l)) + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -5175,6 +5732,34 @@ func (x *fastReflection_OutboundTx) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } + if x.PcRevertExecution != nil { + encoded, err := options.Marshal(x.PcRevertExecution) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x72 + } + if x.RevertInstructions != nil { + encoded, err := options.Marshal(x.RevertInstructions) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x6a + } if x.OutboundStatus != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.OutboundStatus)) i-- @@ -5591,7 +6176,7 @@ func (x *fastReflection_OutboundTx) ProtoMethods() *protoiface.Methods { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } if x.PcTx == nil { - x.PcTx = &Originating_Pc_TX{} + x.PcTx = &OriginatingPcTx{} } if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.PcTx); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err @@ -5684,6 +6269,78 @@ func (x *fastReflection_OutboundTx) ProtoMethods() *protoiface.Methods { break } } + case 13: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RevertInstructions", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.RevertInstructions == nil { + x.RevertInstructions = &RevertInstructions{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.RevertInstructions); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 14: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PcRevertExecution", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.PcRevertExecution == nil { + x.PcRevertExecution = &PCTx{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.PcRevertExecution); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -5849,7 +6506,7 @@ func (x *UniversalTx) ProtoReflect() protoreflect.Message { } func (x *UniversalTx) slowProtoReflect() protoreflect.Message { - mi := &file_uexecutor_v1_types_proto_msgTypes[8] + mi := &file_uexecutor_v1_types_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6730,6 +7387,7 @@ const ( TxType_FUNDS_AND_PAYLOAD TxType = 3 // synthetic + payload exec TxType_GAS_AND_PAYLOAD TxType = 4 // fee abstraction + payload exec TxType_PAYLOAD TxType = 5 + TxType_INBOUND_REVERT TxType = 6 ) // Enum value maps for TxType. @@ -6741,6 +7399,7 @@ var ( 3: "FUNDS_AND_PAYLOAD", 4: "GAS_AND_PAYLOAD", 5: "PAYLOAD", + 6: "INBOUND_REVERT", } TxType_value = map[string]int32{ "UNSPECIFIED_TX": 0, @@ -6749,6 +7408,7 @@ var ( "FUNDS_AND_PAYLOAD": 3, "GAS_AND_PAYLOAD": 4, "PAYLOAD": 5, + "INBOUND_REVERT": 6, } ) @@ -6967,27 +7627,63 @@ func (x *UniversalAccountId) GetOwner() string { return "" } +type RevertInstructions struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + FundRecipient string `protobuf:"bytes,1,opt,name=fund_recipient,json=fundRecipient,proto3" json:"fund_recipient,omitempty"` // where funds go in revert/refund +} + +func (x *RevertInstructions) Reset() { + *x = RevertInstructions{} + if protoimpl.UnsafeEnabled { + mi := &file_uexecutor_v1_types_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *RevertInstructions) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RevertInstructions) ProtoMessage() {} + +// Deprecated: Use RevertInstructions.ProtoReflect.Descriptor instead. +func (*RevertInstructions) Descriptor() ([]byte, []int) { + return file_uexecutor_v1_types_proto_rawDescGZIP(), []int{3} +} + +func (x *RevertInstructions) GetFundRecipient() string { + if x != nil { + return x.FundRecipient + } + return "" +} + type Inbound struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - SourceChain string `protobuf:"bytes,1,opt,name=source_chain,json=sourceChain,proto3" json:"source_chain,omitempty"` // origin chain caip2 id (e.g. eip155:11155111) - TxHash string `protobuf:"bytes,2,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` // unique tx hash / identifier from source chain - Sender string `protobuf:"bytes,3,opt,name=sender,proto3" json:"sender,omitempty"` // sender address on source chain - Recipient string `protobuf:"bytes,4,opt,name=recipient,proto3" json:"recipient,omitempty"` // recipient address on destination chain - Amount string `protobuf:"bytes,5,opt,name=amount,proto3" json:"amount,omitempty"` // synthetic token amount bridged in - AssetAddr string `protobuf:"bytes,6,opt,name=asset_addr,json=assetAddr,proto3" json:"asset_addr,omitempty"` // address of erc20 token address on source chain - LogIndex string `protobuf:"bytes,7,opt,name=log_index,json=logIndex,proto3" json:"log_index,omitempty"` // log index that originated the cross chain tx - TxType TxType `protobuf:"varint,8,opt,name=tx_type,json=txType,proto3,enum=uexecutor.v1.TxType" json:"tx_type,omitempty"` // inbound tx type - UniversalPayload *UniversalPayload `protobuf:"bytes,9,opt,name=universal_payload,json=universalPayload,proto3" json:"universal_payload,omitempty"` // payload is the universal payload to be executed - VerificationData string `protobuf:"bytes,10,opt,name=verification_data,json=verificationData,proto3" json:"verification_data,omitempty"` // verification_data is the bytes passed as verifier data for the given payload. + SourceChain string `protobuf:"bytes,1,opt,name=source_chain,json=sourceChain,proto3" json:"source_chain,omitempty"` // origin chain caip2 id (e.g. eip155:11155111) + TxHash string `protobuf:"bytes,2,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` // unique tx hash / identifier from source chain + Sender string `protobuf:"bytes,3,opt,name=sender,proto3" json:"sender,omitempty"` // sender address on source chain + Recipient string `protobuf:"bytes,4,opt,name=recipient,proto3" json:"recipient,omitempty"` // recipient address on destination chain + Amount string `protobuf:"bytes,5,opt,name=amount,proto3" json:"amount,omitempty"` // synthetic token amount bridged in + AssetAddr string `protobuf:"bytes,6,opt,name=asset_addr,json=assetAddr,proto3" json:"asset_addr,omitempty"` // address of erc20 token address on source chain + LogIndex string `protobuf:"bytes,7,opt,name=log_index,json=logIndex,proto3" json:"log_index,omitempty"` // log index that originated the cross chain tx + TxType TxType `protobuf:"varint,8,opt,name=tx_type,json=txType,proto3,enum=uexecutor.v1.TxType" json:"tx_type,omitempty"` // inbound tx type + UniversalPayload *UniversalPayload `protobuf:"bytes,9,opt,name=universal_payload,json=universalPayload,proto3" json:"universal_payload,omitempty"` // payload is the universal payload to be executed + VerificationData string `protobuf:"bytes,10,opt,name=verification_data,json=verificationData,proto3" json:"verification_data,omitempty"` // verification_data is the bytes passed as verifier data for the given payload. + RevertInstructions *RevertInstructions `protobuf:"bytes,11,opt,name=revert_instructions,json=revertInstructions,proto3" json:"revert_instructions,omitempty"` // revert config } func (x *Inbound) Reset() { *x = Inbound{} if protoimpl.UnsafeEnabled { - mi := &file_uexecutor_v1_types_proto_msgTypes[3] + mi := &file_uexecutor_v1_types_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7001,7 +7697,7 @@ func (*Inbound) ProtoMessage() {} // Deprecated: Use Inbound.ProtoReflect.Descriptor instead. func (*Inbound) Descriptor() ([]byte, []int) { - return file_uexecutor_v1_types_proto_rawDescGZIP(), []int{3} + return file_uexecutor_v1_types_proto_rawDescGZIP(), []int{4} } func (x *Inbound) GetSourceChain() string { @@ -7074,6 +7770,13 @@ func (x *Inbound) GetVerificationData() string { return "" } +func (x *Inbound) GetRevertInstructions() *RevertInstructions { + if x != nil { + return x.RevertInstructions + } + return nil +} + type PCTx struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -7090,7 +7793,7 @@ type PCTx struct { func (x *PCTx) Reset() { *x = PCTx{} if protoimpl.UnsafeEnabled { - mi := &file_uexecutor_v1_types_proto_msgTypes[4] + mi := &file_uexecutor_v1_types_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7104,7 +7807,7 @@ func (*PCTx) ProtoMessage() {} // Deprecated: Use PCTx.ProtoReflect.Descriptor instead. func (*PCTx) Descriptor() ([]byte, []int) { - return file_uexecutor_v1_types_proto_rawDescGZIP(), []int{4} + return file_uexecutor_v1_types_proto_rawDescGZIP(), []int{5} } func (x *PCTx) GetTxHash() string { @@ -7162,7 +7865,7 @@ type OutboundObservation struct { func (x *OutboundObservation) Reset() { *x = OutboundObservation{} if protoimpl.UnsafeEnabled { - mi := &file_uexecutor_v1_types_proto_msgTypes[5] + mi := &file_uexecutor_v1_types_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7176,7 +7879,7 @@ func (*OutboundObservation) ProtoMessage() {} // Deprecated: Use OutboundObservation.ProtoReflect.Descriptor instead. func (*OutboundObservation) Descriptor() ([]byte, []int) { - return file_uexecutor_v1_types_proto_rawDescGZIP(), []int{5} + return file_uexecutor_v1_types_proto_rawDescGZIP(), []int{6} } func (x *OutboundObservation) GetSuccess() bool { @@ -7200,7 +7903,7 @@ func (x *OutboundObservation) GetTxHash() string { return "" } -type Originating_Pc_TX struct { +type OriginatingPcTx struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -7209,34 +7912,34 @@ type Originating_Pc_TX struct { LogIndex string `protobuf:"bytes,2,opt,name=log_index,json=logIndex,proto3" json:"log_index,omitempty"` // log_index that initiated the outbound } -func (x *Originating_Pc_TX) Reset() { - *x = Originating_Pc_TX{} +func (x *OriginatingPcTx) Reset() { + *x = OriginatingPcTx{} if protoimpl.UnsafeEnabled { - mi := &file_uexecutor_v1_types_proto_msgTypes[6] + mi := &file_uexecutor_v1_types_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *Originating_Pc_TX) String() string { +func (x *OriginatingPcTx) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Originating_Pc_TX) ProtoMessage() {} +func (*OriginatingPcTx) ProtoMessage() {} -// Deprecated: Use Originating_Pc_TX.ProtoReflect.Descriptor instead. -func (*Originating_Pc_TX) Descriptor() ([]byte, []int) { - return file_uexecutor_v1_types_proto_rawDescGZIP(), []int{6} +// Deprecated: Use OriginatingPcTx.ProtoReflect.Descriptor instead. +func (*OriginatingPcTx) Descriptor() ([]byte, []int) { + return file_uexecutor_v1_types_proto_rawDescGZIP(), []int{7} } -func (x *Originating_Pc_TX) GetTxHash() string { +func (x *OriginatingPcTx) GetTxHash() string { if x != nil { return x.TxHash } return "" } -func (x *Originating_Pc_TX) GetLogIndex() string { +func (x *OriginatingPcTx) GetLogIndex() string { if x != nil { return x.LogIndex } @@ -7248,24 +7951,26 @@ type OutboundTx struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - DestinationChain string `protobuf:"bytes,1,opt,name=destination_chain,json=destinationChain,proto3" json:"destination_chain,omitempty"` // chain where this outbound is sent - Recipient string `protobuf:"bytes,2,opt,name=recipient,proto3" json:"recipient,omitempty"` // recipient on destination chain - Amount string `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount,omitempty"` // token amount - AssetAddr string `protobuf:"bytes,4,opt,name=asset_addr,json=assetAddr,proto3" json:"asset_addr,omitempty"` // token contract if applicable - Sender string `protobuf:"bytes,5,opt,name=sender,proto3" json:"sender,omitempty"` // sender of the outbound tx - Payload string `protobuf:"bytes,6,opt,name=payload,proto3" json:"payload,omitempty"` // payload to be executed - GasLimit string `protobuf:"bytes,7,opt,name=gas_limit,json=gasLimit,proto3" json:"gas_limit,omitempty"` // gas limit to be used for the outbound tx - TxType TxType `protobuf:"varint,8,opt,name=tx_type,json=txType,proto3,enum=uexecutor.v1.TxType" json:"tx_type,omitempty"` // outbound tx type - PcTx *Originating_Pc_TX `protobuf:"bytes,9,opt,name=pc_tx,json=pcTx,proto3" json:"pc_tx,omitempty"` // pc_tx that originated the outbound - ObservedTx *OutboundObservation `protobuf:"bytes,10,opt,name=observed_tx,json=observedTx,proto3" json:"observed_tx,omitempty"` // observed tx on destination chain - Id string `protobuf:"bytes,11,opt,name=id,proto3" json:"id,omitempty"` // id of outbound tx - OutboundStatus Status `protobuf:"varint,12,opt,name=outbound_status,json=outboundStatus,proto3,enum=uexecutor.v1.Status" json:"outbound_status,omitempty"` // status of outbound tx + DestinationChain string `protobuf:"bytes,1,opt,name=destination_chain,json=destinationChain,proto3" json:"destination_chain,omitempty"` // chain where this outbound is sent + Recipient string `protobuf:"bytes,2,opt,name=recipient,proto3" json:"recipient,omitempty"` // recipient on destination chain + Amount string `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount,omitempty"` // token amount + AssetAddr string `protobuf:"bytes,4,opt,name=asset_addr,json=assetAddr,proto3" json:"asset_addr,omitempty"` // token contract if applicable + Sender string `protobuf:"bytes,5,opt,name=sender,proto3" json:"sender,omitempty"` // sender of the outbound tx + Payload string `protobuf:"bytes,6,opt,name=payload,proto3" json:"payload,omitempty"` // payload to be executed + GasLimit string `protobuf:"bytes,7,opt,name=gas_limit,json=gasLimit,proto3" json:"gas_limit,omitempty"` // gas limit to be used for the outbound tx + TxType TxType `protobuf:"varint,8,opt,name=tx_type,json=txType,proto3,enum=uexecutor.v1.TxType" json:"tx_type,omitempty"` // outbound tx type + PcTx *OriginatingPcTx `protobuf:"bytes,9,opt,name=pc_tx,json=pcTx,proto3" json:"pc_tx,omitempty"` // pc_tx that originated the outbound + ObservedTx *OutboundObservation `protobuf:"bytes,10,opt,name=observed_tx,json=observedTx,proto3" json:"observed_tx,omitempty"` // observed tx on destination chain + Id string `protobuf:"bytes,11,opt,name=id,proto3" json:"id,omitempty"` // id of outbound tx + OutboundStatus Status `protobuf:"varint,12,opt,name=outbound_status,json=outboundStatus,proto3,enum=uexecutor.v1.Status" json:"outbound_status,omitempty"` // status of outbound tx + RevertInstructions *RevertInstructions `protobuf:"bytes,13,opt,name=revert_instructions,json=revertInstructions,proto3" json:"revert_instructions,omitempty"` + PcRevertExecution *PCTx `protobuf:"bytes,14,opt,name=pc_revert_execution,json=pcRevertExecution,proto3" json:"pc_revert_execution,omitempty"` } func (x *OutboundTx) Reset() { *x = OutboundTx{} if protoimpl.UnsafeEnabled { - mi := &file_uexecutor_v1_types_proto_msgTypes[7] + mi := &file_uexecutor_v1_types_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7279,7 +7984,7 @@ func (*OutboundTx) ProtoMessage() {} // Deprecated: Use OutboundTx.ProtoReflect.Descriptor instead. func (*OutboundTx) Descriptor() ([]byte, []int) { - return file_uexecutor_v1_types_proto_rawDescGZIP(), []int{7} + return file_uexecutor_v1_types_proto_rawDescGZIP(), []int{8} } func (x *OutboundTx) GetDestinationChain() string { @@ -7338,7 +8043,7 @@ func (x *OutboundTx) GetTxType() TxType { return TxType_UNSPECIFIED_TX } -func (x *OutboundTx) GetPcTx() *Originating_Pc_TX { +func (x *OutboundTx) GetPcTx() *OriginatingPcTx { if x != nil { return x.PcTx } @@ -7366,6 +8071,20 @@ func (x *OutboundTx) GetOutboundStatus() Status { return Status_UNSPECIFIED } +func (x *OutboundTx) GetRevertInstructions() *RevertInstructions { + if x != nil { + return x.RevertInstructions + } + return nil +} + +func (x *OutboundTx) GetPcRevertExecution() *PCTx { + if x != nil { + return x.PcRevertExecution + } + return nil +} + type UniversalTx struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -7381,7 +8100,7 @@ type UniversalTx struct { func (x *UniversalTx) Reset() { *x = UniversalTx{} if protoimpl.UnsafeEnabled { - mi := &file_uexecutor_v1_types_proto_msgTypes[8] + mi := &file_uexecutor_v1_types_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7395,7 +8114,7 @@ func (*UniversalTx) ProtoMessage() {} // Deprecated: Use UniversalTx.ProtoReflect.Descriptor instead. func (*UniversalTx) Descriptor() ([]byte, []int) { - return file_uexecutor_v1_types_proto_rawDescGZIP(), []int{8} + return file_uexecutor_v1_types_proto_rawDescGZIP(), []int{9} } func (x *UniversalTx) GetId() string { @@ -7477,155 +8196,177 @@ var file_uexecutor_v1_types_proto_rawDesc = []byte{ 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x3a, 0x28, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x1b, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2f, 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x22, 0x98, 0x03, 0x0a, 0x07, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x21, - 0x0a, 0x0c, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x68, 0x61, 0x69, - 0x6e, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x06, 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, - 0x6e, 0x64, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, - 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, - 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, + 0x6e, 0x74, 0x22, 0x63, 0x0a, 0x12, 0x52, 0x65, 0x76, 0x65, 0x72, 0x74, 0x49, 0x6e, 0x73, 0x74, + 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x66, 0x75, 0x6e, 0x64, + 0x5f, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0d, 0x66, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x3a, + 0x26, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x1d, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, + 0x74, 0x6f, 0x72, 0x2f, 0x72, 0x65, 0x76, 0x65, 0x72, 0x74, 0x5f, 0x69, 0x6e, 0x73, 0x74, 0x72, + 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xeb, 0x03, 0x0a, 0x07, 0x49, 0x6e, 0x62, 0x6f, + 0x75, 0x6e, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x63, 0x68, + 0x61, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, + 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, 0x12, + 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x63, 0x69, 0x70, + 0x69, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x63, 0x69, + 0x70, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1d, 0x0a, + 0x0a, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x61, 0x73, 0x73, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x12, 0x1b, 0x0a, 0x09, + 0x6c, 0x6f, 0x67, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x6c, 0x6f, 0x67, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x2d, 0x0a, 0x07, 0x74, 0x78, 0x5f, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x75, 0x65, 0x78, + 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x78, 0x54, 0x79, 0x70, 0x65, + 0x52, 0x06, 0x74, 0x78, 0x54, 0x79, 0x70, 0x65, 0x12, 0x4b, 0x0a, 0x11, 0x75, 0x6e, 0x69, 0x76, + 0x65, 0x72, 0x73, 0x61, 0x6c, 0x5f, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x09, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, + 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x50, 0x61, 0x79, 0x6c, + 0x6f, 0x61, 0x64, 0x52, 0x10, 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x50, 0x61, + 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x2b, 0x0a, 0x11, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x10, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, + 0x74, 0x61, 0x12, 0x51, 0x0a, 0x13, 0x72, 0x65, 0x76, 0x65, 0x72, 0x74, 0x5f, 0x69, 0x6e, 0x73, + 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x20, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, + 0x65, 0x76, 0x65, 0x72, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x52, 0x12, 0x72, 0x65, 0x76, 0x65, 0x72, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3a, 0x1e, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, + 0xe7, 0xb0, 0x2a, 0x11, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2f, 0x69, 0x6e, + 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x22, 0xc8, 0x01, 0x0a, 0x04, 0x50, 0x43, 0x54, 0x78, 0x12, 0x17, + 0x0a, 0x07, 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, + 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, + 0x19, 0x0a, 0x08, 0x67, 0x61, 0x73, 0x5f, 0x75, 0x73, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x07, 0x67, 0x61, 0x73, 0x55, 0x73, 0x65, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, + 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x16, 0x0a, + 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6d, + 0x73, 0x67, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4d, + 0x73, 0x67, 0x3a, 0x1c, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, + 0x0f, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2f, 0x70, 0x63, 0x5f, 0x74, 0x78, + 0x22, 0x94, 0x01, 0x0a, 0x13, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x4f, 0x62, 0x73, + 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, + 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, + 0x73, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x65, 0x69, 0x67, + 0x68, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, + 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, 0x3a, 0x27, + 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x1e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x6f, 0x72, 0x2f, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x6f, 0x62, 0x73, 0x65, + 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x6d, 0x0a, 0x0f, 0x4f, 0x72, 0x69, 0x67, 0x69, + 0x6e, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x63, 0x54, 0x78, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x78, + 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x78, 0x48, + 0x61, 0x73, 0x68, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x6f, 0x67, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x6f, 0x67, 0x49, 0x6e, 0x64, 0x65, 0x78, + 0x3a, 0x24, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x1b, 0x75, 0x65, 0x78, 0x65, 0x63, + 0x75, 0x74, 0x6f, 0x72, 0x2f, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6e, 0x67, + 0x5f, 0x70, 0x63, 0x5f, 0x74, 0x78, 0x22, 0x8e, 0x05, 0x0a, 0x0a, 0x4f, 0x75, 0x74, 0x62, 0x6f, + 0x75, 0x6e, 0x64, 0x54, 0x78, 0x12, 0x2b, 0x0a, 0x11, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x10, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x61, + 0x69, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, + 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x73, 0x73, 0x65, - 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x73, - 0x73, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x6f, 0x67, 0x5f, 0x69, - 0x6e, 0x64, 0x65, 0x78, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x6f, 0x67, 0x49, - 0x6e, 0x64, 0x65, 0x78, 0x12, 0x2d, 0x0a, 0x07, 0x74, 0x78, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, - 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, - 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x78, 0x54, 0x79, 0x70, 0x65, 0x52, 0x06, 0x74, 0x78, 0x54, - 0x79, 0x70, 0x65, 0x12, 0x4b, 0x0a, 0x11, 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, - 0x5f, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, - 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6e, - 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x10, - 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, - 0x12, 0x2b, 0x0a, 0x11, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x76, 0x65, 0x72, - 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x61, 0x3a, 0x1e, 0x98, - 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x11, 0x75, 0x65, 0x78, 0x65, - 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2f, 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x22, 0xc8, 0x01, - 0x0a, 0x04, 0x50, 0x43, 0x54, 0x78, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, - 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, 0x12, - 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x61, 0x73, 0x5f, 0x75, - 0x73, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x67, 0x61, 0x73, 0x55, 0x73, - 0x65, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x65, 0x69, 0x67, - 0x68, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, - 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1b, 0x0a, - 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6d, 0x73, 0x67, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x08, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x73, 0x67, 0x3a, 0x1c, 0x98, 0xa0, 0x1f, 0x00, - 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x0f, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, - 0x6f, 0x72, 0x2f, 0x70, 0x63, 0x5f, 0x74, 0x78, 0x22, 0x94, 0x01, 0x0a, 0x13, 0x4f, 0x75, 0x74, - 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, - 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, - 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x17, 0x0a, - 0x07, 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, - 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, 0x3a, 0x27, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, - 0x1e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2f, 0x6f, 0x75, 0x74, 0x62, 0x6f, - 0x75, 0x6e, 0x64, 0x5f, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, - 0x6f, 0x0a, 0x11, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x50, - 0x63, 0x5f, 0x54, 0x58, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, 0x12, 0x1b, 0x0a, - 0x09, 0x6c, 0x6f, 0x67, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x08, 0x6c, 0x6f, 0x67, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x3a, 0x24, 0xe8, 0xa0, 0x1f, 0x01, - 0x8a, 0xe7, 0xb0, 0x2a, 0x1b, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2f, 0x6f, - 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x63, 0x5f, 0x74, 0x78, - 0x22, 0xf9, 0x03, 0x0a, 0x0a, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x54, 0x78, 0x12, - 0x2b, 0x0a, 0x11, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, - 0x68, 0x61, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x64, 0x65, 0x73, 0x74, - 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x1c, 0x0a, 0x09, - 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, - 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, - 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x73, 0x73, 0x65, 0x74, 0x41, 0x64, 0x64, - 0x72, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, - 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, - 0x6f, 0x61, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x67, 0x61, 0x73, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x67, 0x61, 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, - 0x12, 0x2d, 0x0a, 0x07, 0x74, 0x78, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x14, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, - 0x2e, 0x54, 0x78, 0x54, 0x79, 0x70, 0x65, 0x52, 0x06, 0x74, 0x78, 0x54, 0x79, 0x70, 0x65, 0x12, - 0x34, 0x0a, 0x05, 0x70, 0x63, 0x5f, 0x74, 0x78, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, - 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x72, - 0x69, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x50, 0x63, 0x5f, 0x54, 0x58, 0x52, - 0x04, 0x70, 0x63, 0x54, 0x78, 0x12, 0x42, 0x0a, 0x0b, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, - 0x64, 0x5f, 0x74, 0x78, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x75, 0x65, 0x78, - 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, - 0x6e, 0x64, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x6f, - 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x54, 0x78, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, - 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x3d, 0x0a, 0x0f, 0x6f, 0x75, 0x74, - 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x0c, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, - 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0e, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, - 0x6e, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x3a, 0x22, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, - 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x15, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, - 0x2f, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x74, 0x78, 0x22, 0xa8, 0x02, 0x0a, - 0x0b, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x54, 0x78, 0x12, 0x0e, 0x0a, 0x02, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x34, 0x0a, 0x0a, - 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x74, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x15, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, - 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x09, 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, - 0x54, 0x78, 0x12, 0x27, 0x0a, 0x05, 0x70, 0x63, 0x5f, 0x74, 0x78, 0x18, 0x03, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x12, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, - 0x2e, 0x50, 0x43, 0x54, 0x78, 0x52, 0x04, 0x70, 0x63, 0x54, 0x78, 0x12, 0x39, 0x0a, 0x0b, 0x6f, - 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x74, 0x78, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x18, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, - 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x54, 0x78, 0x52, 0x0a, 0x6f, 0x75, 0x74, 0x62, - 0x6f, 0x75, 0x6e, 0x64, 0x54, 0x78, 0x12, 0x4a, 0x0a, 0x10, 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, - 0x73, 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x1f, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, + 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x73, + 0x73, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, + 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, + 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x67, 0x61, 0x73, + 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x67, 0x61, + 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x2d, 0x0a, 0x07, 0x74, 0x78, 0x5f, 0x74, 0x79, 0x70, + 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, + 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x78, 0x54, 0x79, 0x70, 0x65, 0x52, 0x06, 0x74, + 0x78, 0x54, 0x79, 0x70, 0x65, 0x12, 0x32, 0x0a, 0x05, 0x70, 0x63, 0x5f, 0x74, 0x78, 0x18, 0x09, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, + 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x50, + 0x63, 0x54, 0x78, 0x52, 0x04, 0x70, 0x63, 0x54, 0x78, 0x12, 0x42, 0x0a, 0x0b, 0x6f, 0x62, 0x73, + 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, 0x74, 0x78, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, + 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x75, + 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x0a, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x54, 0x78, 0x12, 0x0e, 0x0a, + 0x02, 0x69, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x3d, 0x0a, + 0x0f, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0e, 0x6f, 0x75, + 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x51, 0x0a, 0x13, + 0x72, 0x65, 0x76, 0x65, 0x72, 0x74, 0x5f, 0x69, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x75, 0x65, 0x78, 0x65, + 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x76, 0x65, 0x72, 0x74, 0x49, + 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x12, 0x72, 0x65, 0x76, + 0x65, 0x72, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, + 0x42, 0x0a, 0x13, 0x70, 0x63, 0x5f, 0x72, 0x65, 0x76, 0x65, 0x72, 0x74, 0x5f, 0x65, 0x78, 0x65, + 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x75, + 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x43, 0x54, 0x78, + 0x52, 0x11, 0x70, 0x63, 0x52, 0x65, 0x76, 0x65, 0x72, 0x74, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x69, 0x6f, 0x6e, 0x3a, 0x22, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, + 0x2a, 0x15, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2f, 0x6f, 0x75, 0x74, 0x62, + 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x74, 0x78, 0x22, 0xa8, 0x02, 0x0a, 0x0b, 0x55, 0x6e, 0x69, 0x76, + 0x65, 0x72, 0x73, 0x61, 0x6c, 0x54, 0x78, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x34, 0x0a, 0x0a, 0x69, 0x6e, 0x62, 0x6f, 0x75, + 0x6e, 0x64, 0x5f, 0x74, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x75, 0x65, + 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x62, 0x6f, 0x75, + 0x6e, 0x64, 0x52, 0x09, 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x54, 0x78, 0x12, 0x27, 0x0a, + 0x05, 0x70, 0x63, 0x5f, 0x74, 0x78, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x75, + 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x43, 0x54, 0x78, + 0x52, 0x04, 0x70, 0x63, 0x54, 0x78, 0x12, 0x39, 0x0a, 0x0b, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, + 0x6e, 0x64, 0x5f, 0x74, 0x78, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x75, 0x65, + 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x75, 0x74, 0x62, 0x6f, + 0x75, 0x6e, 0x64, 0x54, 0x78, 0x52, 0x0a, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x54, + 0x78, 0x12, 0x4a, 0x0a, 0x10, 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x5f, 0x73, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x75, 0x65, + 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x69, 0x76, 0x65, + 0x72, 0x73, 0x61, 0x6c, 0x54, 0x78, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0f, 0x75, 0x6e, + 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x3a, 0x23, 0x98, + 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x16, 0x75, 0x65, 0x78, 0x65, + 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2f, 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x5f, + 0x74, 0x78, 0x2a, 0x47, 0x0a, 0x10, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x12, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, + 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x10, 0x00, 0x12, 0x1b, + 0x0a, 0x17, 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x54, 0x78, 0x56, 0x65, 0x72, + 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x10, 0x01, 0x2a, 0x83, 0x02, 0x0a, 0x11, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x54, 0x78, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x52, 0x0f, 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x3a, 0x23, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, - 0x16, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2f, 0x75, 0x6e, 0x69, 0x76, 0x65, - 0x72, 0x73, 0x61, 0x6c, 0x5f, 0x74, 0x78, 0x2a, 0x47, 0x0a, 0x10, 0x56, 0x65, 0x72, 0x69, 0x66, - 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x12, 0x73, - 0x69, 0x67, 0x6e, 0x65, 0x64, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x10, 0x00, 0x12, 0x1b, 0x0a, 0x17, 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, - 0x54, 0x78, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x10, 0x01, - 0x2a, 0x83, 0x02, 0x0a, 0x11, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x54, 0x78, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x23, 0x0a, 0x1f, 0x55, 0x4e, 0x49, 0x56, 0x45, 0x52, - 0x53, 0x41, 0x4c, 0x5f, 0x54, 0x58, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, - 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x49, - 0x4e, 0x42, 0x4f, 0x55, 0x4e, 0x44, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x01, - 0x12, 0x1d, 0x0a, 0x19, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x49, 0x4e, 0x42, 0x4f, - 0x55, 0x4e, 0x44, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x02, 0x12, - 0x17, 0x0a, 0x13, 0x50, 0x43, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x45, 0x44, 0x5f, 0x53, - 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x03, 0x12, 0x16, 0x0a, 0x12, 0x50, 0x43, 0x5f, 0x45, - 0x58, 0x45, 0x43, 0x55, 0x54, 0x45, 0x44, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x04, - 0x12, 0x15, 0x0a, 0x11, 0x50, 0x43, 0x5f, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x52, - 0x45, 0x56, 0x45, 0x52, 0x54, 0x10, 0x05, 0x12, 0x14, 0x0a, 0x10, 0x4f, 0x55, 0x54, 0x42, 0x4f, - 0x55, 0x4e, 0x44, 0x5f, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x06, 0x12, 0x14, 0x0a, - 0x10, 0x4f, 0x55, 0x54, 0x42, 0x4f, 0x55, 0x4e, 0x44, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, - 0x53, 0x10, 0x07, 0x12, 0x13, 0x0a, 0x0f, 0x4f, 0x55, 0x54, 0x42, 0x4f, 0x55, 0x4e, 0x44, 0x5f, - 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x08, 0x12, 0x0c, 0x0a, 0x08, 0x43, 0x41, 0x4e, 0x43, - 0x45, 0x4c, 0x45, 0x44, 0x10, 0x09, 0x2a, 0x34, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x12, 0x0f, 0x0a, 0x0b, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, - 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x0c, - 0x0a, 0x08, 0x4f, 0x42, 0x53, 0x45, 0x52, 0x56, 0x45, 0x44, 0x10, 0x02, 0x2a, 0x69, 0x0a, 0x06, - 0x54, 0x78, 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x0e, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, - 0x49, 0x46, 0x49, 0x45, 0x44, 0x5f, 0x54, 0x58, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x47, 0x41, - 0x53, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x46, 0x55, 0x4e, 0x44, 0x53, 0x10, 0x02, 0x12, 0x15, - 0x0a, 0x11, 0x46, 0x55, 0x4e, 0x44, 0x53, 0x5f, 0x41, 0x4e, 0x44, 0x5f, 0x50, 0x41, 0x59, 0x4c, - 0x4f, 0x41, 0x44, 0x10, 0x03, 0x12, 0x13, 0x0a, 0x0f, 0x47, 0x41, 0x53, 0x5f, 0x41, 0x4e, 0x44, - 0x5f, 0x50, 0x41, 0x59, 0x4c, 0x4f, 0x41, 0x44, 0x10, 0x04, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x41, - 0x59, 0x4c, 0x4f, 0x41, 0x44, 0x10, 0x05, 0x42, 0xb2, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, - 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x54, 0x79, - 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x41, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x63, 0x68, 0x61, 0x69, 0x6e, - 0x2f, 0x70, 0x75, 0x73, 0x68, 0x2d, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2d, 0x6e, 0x6f, 0x64, 0x65, - 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2f, 0x76, - 0x31, 0x3b, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x76, 0x31, 0xa2, 0x02, 0x03, - 0x55, 0x58, 0x58, 0xaa, 0x02, 0x0c, 0x55, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, - 0x56, 0x31, 0xca, 0x02, 0x0c, 0x55, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x5c, 0x56, - 0x31, 0xe2, 0x02, 0x18, 0x55, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x5c, 0x56, 0x31, - 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0d, 0x55, - 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x73, 0x12, 0x23, 0x0a, 0x1f, 0x55, 0x4e, 0x49, 0x56, 0x45, 0x52, 0x53, 0x41, 0x4c, 0x5f, 0x54, + 0x58, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, + 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x49, 0x4e, 0x42, 0x4f, 0x55, 0x4e, + 0x44, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x01, 0x12, 0x1d, 0x0a, 0x19, 0x50, + 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x49, 0x4e, 0x42, 0x4f, 0x55, 0x4e, 0x44, 0x5f, 0x45, + 0x58, 0x45, 0x43, 0x55, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x02, 0x12, 0x17, 0x0a, 0x13, 0x50, 0x43, + 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x45, 0x44, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, + 0x53, 0x10, 0x03, 0x12, 0x16, 0x0a, 0x12, 0x50, 0x43, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, + 0x45, 0x44, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x04, 0x12, 0x15, 0x0a, 0x11, 0x50, + 0x43, 0x5f, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x52, 0x45, 0x56, 0x45, 0x52, 0x54, + 0x10, 0x05, 0x12, 0x14, 0x0a, 0x10, 0x4f, 0x55, 0x54, 0x42, 0x4f, 0x55, 0x4e, 0x44, 0x5f, 0x50, + 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x06, 0x12, 0x14, 0x0a, 0x10, 0x4f, 0x55, 0x54, 0x42, + 0x4f, 0x55, 0x4e, 0x44, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x07, 0x12, 0x13, + 0x0a, 0x0f, 0x4f, 0x55, 0x54, 0x42, 0x4f, 0x55, 0x4e, 0x44, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, + 0x44, 0x10, 0x08, 0x12, 0x0c, 0x0a, 0x08, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x45, 0x44, 0x10, + 0x09, 0x2a, 0x34, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0f, 0x0a, 0x0b, 0x55, + 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, + 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x4f, 0x42, 0x53, + 0x45, 0x52, 0x56, 0x45, 0x44, 0x10, 0x02, 0x2a, 0x7d, 0x0a, 0x06, 0x54, 0x78, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x12, 0x0a, 0x0e, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, + 0x5f, 0x54, 0x58, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x47, 0x41, 0x53, 0x10, 0x01, 0x12, 0x09, + 0x0a, 0x05, 0x46, 0x55, 0x4e, 0x44, 0x53, 0x10, 0x02, 0x12, 0x15, 0x0a, 0x11, 0x46, 0x55, 0x4e, + 0x44, 0x53, 0x5f, 0x41, 0x4e, 0x44, 0x5f, 0x50, 0x41, 0x59, 0x4c, 0x4f, 0x41, 0x44, 0x10, 0x03, + 0x12, 0x13, 0x0a, 0x0f, 0x47, 0x41, 0x53, 0x5f, 0x41, 0x4e, 0x44, 0x5f, 0x50, 0x41, 0x59, 0x4c, + 0x4f, 0x41, 0x44, 0x10, 0x04, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x41, 0x59, 0x4c, 0x4f, 0x41, 0x44, + 0x10, 0x05, 0x12, 0x12, 0x0a, 0x0e, 0x49, 0x4e, 0x42, 0x4f, 0x55, 0x4e, 0x44, 0x5f, 0x52, 0x45, + 0x56, 0x45, 0x52, 0x54, 0x10, 0x06, 0x42, 0xb2, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x75, + 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x54, 0x79, 0x70, + 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x41, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, + 0x70, 0x75, 0x73, 0x68, 0x2d, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2d, 0x6e, 0x6f, 0x64, 0x65, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x31, + 0x3b, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x55, + 0x58, 0x58, 0xaa, 0x02, 0x0c, 0x55, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x56, + 0x31, 0xca, 0x02, 0x0c, 0x55, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x5c, 0x56, 0x31, + 0xe2, 0x02, 0x18, 0x55, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x5c, 0x56, 0x31, 0x5c, + 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0d, 0x55, 0x65, + 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( @@ -7641,7 +8382,7 @@ func file_uexecutor_v1_types_proto_rawDescGZIP() []byte { } var file_uexecutor_v1_types_proto_enumTypes = make([]protoimpl.EnumInfo, 4) -var file_uexecutor_v1_types_proto_msgTypes = make([]protoimpl.MessageInfo, 9) +var file_uexecutor_v1_types_proto_msgTypes = make([]protoimpl.MessageInfo, 10) var file_uexecutor_v1_types_proto_goTypes = []interface{}{ (VerificationType)(0), // 0: uexecutor.v1.VerificationType (UniversalTxStatus)(0), // 1: uexecutor.v1.UniversalTxStatus @@ -7650,30 +8391,34 @@ var file_uexecutor_v1_types_proto_goTypes = []interface{}{ (*Params)(nil), // 4: uexecutor.v1.Params (*UniversalPayload)(nil), // 5: uexecutor.v1.UniversalPayload (*UniversalAccountId)(nil), // 6: uexecutor.v1.UniversalAccountId - (*Inbound)(nil), // 7: uexecutor.v1.Inbound - (*PCTx)(nil), // 8: uexecutor.v1.PCTx - (*OutboundObservation)(nil), // 9: uexecutor.v1.OutboundObservation - (*Originating_Pc_TX)(nil), // 10: uexecutor.v1.Originating_Pc_TX - (*OutboundTx)(nil), // 11: uexecutor.v1.OutboundTx - (*UniversalTx)(nil), // 12: uexecutor.v1.UniversalTx + (*RevertInstructions)(nil), // 7: uexecutor.v1.RevertInstructions + (*Inbound)(nil), // 8: uexecutor.v1.Inbound + (*PCTx)(nil), // 9: uexecutor.v1.PCTx + (*OutboundObservation)(nil), // 10: uexecutor.v1.OutboundObservation + (*OriginatingPcTx)(nil), // 11: uexecutor.v1.OriginatingPcTx + (*OutboundTx)(nil), // 12: uexecutor.v1.OutboundTx + (*UniversalTx)(nil), // 13: uexecutor.v1.UniversalTx } var file_uexecutor_v1_types_proto_depIdxs = []int32{ 0, // 0: uexecutor.v1.UniversalPayload.v_type:type_name -> uexecutor.v1.VerificationType 3, // 1: uexecutor.v1.Inbound.tx_type:type_name -> uexecutor.v1.TxType 5, // 2: uexecutor.v1.Inbound.universal_payload:type_name -> uexecutor.v1.UniversalPayload - 3, // 3: uexecutor.v1.OutboundTx.tx_type:type_name -> uexecutor.v1.TxType - 10, // 4: uexecutor.v1.OutboundTx.pc_tx:type_name -> uexecutor.v1.Originating_Pc_TX - 9, // 5: uexecutor.v1.OutboundTx.observed_tx:type_name -> uexecutor.v1.OutboundObservation - 2, // 6: uexecutor.v1.OutboundTx.outbound_status:type_name -> uexecutor.v1.Status - 7, // 7: uexecutor.v1.UniversalTx.inbound_tx:type_name -> uexecutor.v1.Inbound - 8, // 8: uexecutor.v1.UniversalTx.pc_tx:type_name -> uexecutor.v1.PCTx - 11, // 9: uexecutor.v1.UniversalTx.outbound_tx:type_name -> uexecutor.v1.OutboundTx - 1, // 10: uexecutor.v1.UniversalTx.universal_status:type_name -> uexecutor.v1.UniversalTxStatus - 11, // [11:11] is the sub-list for method output_type - 11, // [11:11] is the sub-list for method input_type - 11, // [11:11] is the sub-list for extension type_name - 11, // [11:11] is the sub-list for extension extendee - 0, // [0:11] is the sub-list for field type_name + 7, // 3: uexecutor.v1.Inbound.revert_instructions:type_name -> uexecutor.v1.RevertInstructions + 3, // 4: uexecutor.v1.OutboundTx.tx_type:type_name -> uexecutor.v1.TxType + 11, // 5: uexecutor.v1.OutboundTx.pc_tx:type_name -> uexecutor.v1.OriginatingPcTx + 10, // 6: uexecutor.v1.OutboundTx.observed_tx:type_name -> uexecutor.v1.OutboundObservation + 2, // 7: uexecutor.v1.OutboundTx.outbound_status:type_name -> uexecutor.v1.Status + 7, // 8: uexecutor.v1.OutboundTx.revert_instructions:type_name -> uexecutor.v1.RevertInstructions + 9, // 9: uexecutor.v1.OutboundTx.pc_revert_execution:type_name -> uexecutor.v1.PCTx + 8, // 10: uexecutor.v1.UniversalTx.inbound_tx:type_name -> uexecutor.v1.Inbound + 9, // 11: uexecutor.v1.UniversalTx.pc_tx:type_name -> uexecutor.v1.PCTx + 12, // 12: uexecutor.v1.UniversalTx.outbound_tx:type_name -> uexecutor.v1.OutboundTx + 1, // 13: uexecutor.v1.UniversalTx.universal_status:type_name -> uexecutor.v1.UniversalTxStatus + 14, // [14:14] is the sub-list for method output_type + 14, // [14:14] is the sub-list for method input_type + 14, // [14:14] is the sub-list for extension type_name + 14, // [14:14] is the sub-list for extension extendee + 0, // [0:14] is the sub-list for field type_name } func init() { file_uexecutor_v1_types_proto_init() } @@ -7719,7 +8464,7 @@ func file_uexecutor_v1_types_proto_init() { } } file_uexecutor_v1_types_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Inbound); i { + switch v := v.(*RevertInstructions); i { case 0: return &v.state case 1: @@ -7731,7 +8476,7 @@ func file_uexecutor_v1_types_proto_init() { } } file_uexecutor_v1_types_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PCTx); i { + switch v := v.(*Inbound); i { case 0: return &v.state case 1: @@ -7743,7 +8488,7 @@ func file_uexecutor_v1_types_proto_init() { } } file_uexecutor_v1_types_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OutboundObservation); i { + switch v := v.(*PCTx); i { case 0: return &v.state case 1: @@ -7755,7 +8500,7 @@ func file_uexecutor_v1_types_proto_init() { } } file_uexecutor_v1_types_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Originating_Pc_TX); i { + switch v := v.(*OutboundObservation); i { case 0: return &v.state case 1: @@ -7767,7 +8512,7 @@ func file_uexecutor_v1_types_proto_init() { } } file_uexecutor_v1_types_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OutboundTx); i { + switch v := v.(*OriginatingPcTx); i { case 0: return &v.state case 1: @@ -7779,6 +8524,18 @@ func file_uexecutor_v1_types_proto_init() { } } file_uexecutor_v1_types_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*OutboundTx); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_uexecutor_v1_types_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*UniversalTx); i { case 0: return &v.state @@ -7797,7 +8554,7 @@ func file_uexecutor_v1_types_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_uexecutor_v1_types_proto_rawDesc, NumEnums: 4, - NumMessages: 9, + NumMessages: 10, NumExtensions: 0, NumServices: 0, }, From 9cb585211fec78499ee0f718d7a24a8496675f6e Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Wed, 10 Dec 2025 13:15:28 +0530 Subject: [PATCH 051/120] refactor: modified the outbound types as per new proto changes --- x/uexecutor/keeper/create_outbound.go | 2 +- x/uexecutor/types/outbound_tx_test.go | 2 +- x/uexecutor/types/types.pb.go | 677 +++++++++++++++++++------ x/uexecutor/types/universal_tx_test.go | 2 +- 4 files changed, 538 insertions(+), 145 deletions(-) diff --git a/x/uexecutor/keeper/create_outbound.go b/x/uexecutor/keeper/create_outbound.go index 9ef543fc..f59925f0 100644 --- a/x/uexecutor/keeper/create_outbound.go +++ b/x/uexecutor/keeper/create_outbound.go @@ -51,7 +51,7 @@ func (k Keeper) BuildOutboundsFromReceipt( Payload: event.Payload, GasLimit: event.GasLimit.String(), TxType: types.TxType_FUNDS_AND_PAYLOAD, - PcTx: &types.Originating_Pc_TX{ + PcTx: &types.OriginatingPcTx{ TxHash: receipt.Hash, LogIndex: fmt.Sprintf("%d", lg.Index), }, diff --git a/x/uexecutor/types/outbound_tx_test.go b/x/uexecutor/types/outbound_tx_test.go index e65271d9..270dfa05 100644 --- a/x/uexecutor/types/outbound_tx_test.go +++ b/x/uexecutor/types/outbound_tx_test.go @@ -17,7 +17,7 @@ func baseValidOutbound() types.OutboundTx { Payload: "0xabcdef", GasLimit: "21000", TxType: types.TxType_FUNDS_AND_PAYLOAD, - PcTx: &types.Originating_Pc_TX{ + PcTx: &types.OriginatingPcTx{ TxHash: "0xpc123", LogIndex: "1", }, diff --git a/x/uexecutor/types/types.pb.go b/x/uexecutor/types/types.pb.go index b5111d2b..89269c92 100644 --- a/x/uexecutor/types/types.pb.go +++ b/x/uexecutor/types/types.pb.go @@ -136,6 +136,7 @@ const ( TxType_FUNDS_AND_PAYLOAD TxType = 3 TxType_GAS_AND_PAYLOAD TxType = 4 TxType_PAYLOAD TxType = 5 + TxType_INBOUND_REVERT TxType = 6 ) var TxType_name = map[int32]string{ @@ -145,6 +146,7 @@ var TxType_name = map[int32]string{ 3: "FUNDS_AND_PAYLOAD", 4: "GAS_AND_PAYLOAD", 5: "PAYLOAD", + 6: "INBOUND_REVERT", } var TxType_value = map[string]int32{ @@ -154,6 +156,7 @@ var TxType_value = map[string]int32{ "FUNDS_AND_PAYLOAD": 3, "GAS_AND_PAYLOAD": 4, "PAYLOAD": 5, + "INBOUND_REVERT": 6, } func (x TxType) String() string { @@ -376,23 +379,68 @@ func (m *UniversalAccountId) GetOwner() string { return "" } +type RevertInstructions struct { + FundRecipient string `protobuf:"bytes,1,opt,name=fund_recipient,json=fundRecipient,proto3" json:"fund_recipient,omitempty"` +} + +func (m *RevertInstructions) Reset() { *m = RevertInstructions{} } +func (m *RevertInstructions) String() string { return proto.CompactTextString(m) } +func (*RevertInstructions) ProtoMessage() {} +func (*RevertInstructions) Descriptor() ([]byte, []int) { + return fileDescriptor_fab6d3ca71d1e2a5, []int{3} +} +func (m *RevertInstructions) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RevertInstructions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RevertInstructions.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *RevertInstructions) XXX_Merge(src proto.Message) { + xxx_messageInfo_RevertInstructions.Merge(m, src) +} +func (m *RevertInstructions) XXX_Size() int { + return m.Size() +} +func (m *RevertInstructions) XXX_DiscardUnknown() { + xxx_messageInfo_RevertInstructions.DiscardUnknown(m) +} + +var xxx_messageInfo_RevertInstructions proto.InternalMessageInfo + +func (m *RevertInstructions) GetFundRecipient() string { + if m != nil { + return m.FundRecipient + } + return "" +} + type Inbound struct { - SourceChain string `protobuf:"bytes,1,opt,name=source_chain,json=sourceChain,proto3" json:"source_chain,omitempty"` - TxHash string `protobuf:"bytes,2,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` - Sender string `protobuf:"bytes,3,opt,name=sender,proto3" json:"sender,omitempty"` - Recipient string `protobuf:"bytes,4,opt,name=recipient,proto3" json:"recipient,omitempty"` - Amount string `protobuf:"bytes,5,opt,name=amount,proto3" json:"amount,omitempty"` - AssetAddr string `protobuf:"bytes,6,opt,name=asset_addr,json=assetAddr,proto3" json:"asset_addr,omitempty"` - LogIndex string `protobuf:"bytes,7,opt,name=log_index,json=logIndex,proto3" json:"log_index,omitempty"` - TxType TxType `protobuf:"varint,8,opt,name=tx_type,json=txType,proto3,enum=uexecutor.v1.TxType" json:"tx_type,omitempty"` - UniversalPayload *UniversalPayload `protobuf:"bytes,9,opt,name=universal_payload,json=universalPayload,proto3" json:"universal_payload,omitempty"` - VerificationData string `protobuf:"bytes,10,opt,name=verification_data,json=verificationData,proto3" json:"verification_data,omitempty"` + SourceChain string `protobuf:"bytes,1,opt,name=source_chain,json=sourceChain,proto3" json:"source_chain,omitempty"` + TxHash string `protobuf:"bytes,2,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` + Sender string `protobuf:"bytes,3,opt,name=sender,proto3" json:"sender,omitempty"` + Recipient string `protobuf:"bytes,4,opt,name=recipient,proto3" json:"recipient,omitempty"` + Amount string `protobuf:"bytes,5,opt,name=amount,proto3" json:"amount,omitempty"` + AssetAddr string `protobuf:"bytes,6,opt,name=asset_addr,json=assetAddr,proto3" json:"asset_addr,omitempty"` + LogIndex string `protobuf:"bytes,7,opt,name=log_index,json=logIndex,proto3" json:"log_index,omitempty"` + TxType TxType `protobuf:"varint,8,opt,name=tx_type,json=txType,proto3,enum=uexecutor.v1.TxType" json:"tx_type,omitempty"` + UniversalPayload *UniversalPayload `protobuf:"bytes,9,opt,name=universal_payload,json=universalPayload,proto3" json:"universal_payload,omitempty"` + VerificationData string `protobuf:"bytes,10,opt,name=verification_data,json=verificationData,proto3" json:"verification_data,omitempty"` + RevertInstructions *RevertInstructions `protobuf:"bytes,11,opt,name=revert_instructions,json=revertInstructions,proto3" json:"revert_instructions,omitempty"` } func (m *Inbound) Reset() { *m = Inbound{} } func (*Inbound) ProtoMessage() {} func (*Inbound) Descriptor() ([]byte, []int) { - return fileDescriptor_fab6d3ca71d1e2a5, []int{3} + return fileDescriptor_fab6d3ca71d1e2a5, []int{4} } func (m *Inbound) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -491,6 +539,13 @@ func (m *Inbound) GetVerificationData() string { return "" } +func (m *Inbound) GetRevertInstructions() *RevertInstructions { + if m != nil { + return m.RevertInstructions + } + return nil +} + type PCTx struct { TxHash string `protobuf:"bytes,1,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` Sender string `protobuf:"bytes,2,opt,name=sender,proto3" json:"sender,omitempty"` @@ -503,7 +558,7 @@ type PCTx struct { func (m *PCTx) Reset() { *m = PCTx{} } func (*PCTx) ProtoMessage() {} func (*PCTx) Descriptor() ([]byte, []int) { - return fileDescriptor_fab6d3ca71d1e2a5, []int{4} + return fileDescriptor_fab6d3ca71d1e2a5, []int{5} } func (m *PCTx) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -584,7 +639,7 @@ func (m *OutboundObservation) Reset() { *m = OutboundObservation{} } func (m *OutboundObservation) String() string { return proto.CompactTextString(m) } func (*OutboundObservation) ProtoMessage() {} func (*OutboundObservation) Descriptor() ([]byte, []int) { - return fileDescriptor_fab6d3ca71d1e2a5, []int{5} + return fileDescriptor_fab6d3ca71d1e2a5, []int{6} } func (m *OutboundObservation) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -634,23 +689,23 @@ func (m *OutboundObservation) GetTxHash() string { return "" } -type Originating_Pc_TX struct { +type OriginatingPcTx struct { TxHash string `protobuf:"bytes,1,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` LogIndex string `protobuf:"bytes,2,opt,name=log_index,json=logIndex,proto3" json:"log_index,omitempty"` } -func (m *Originating_Pc_TX) Reset() { *m = Originating_Pc_TX{} } -func (m *Originating_Pc_TX) String() string { return proto.CompactTextString(m) } -func (*Originating_Pc_TX) ProtoMessage() {} -func (*Originating_Pc_TX) Descriptor() ([]byte, []int) { - return fileDescriptor_fab6d3ca71d1e2a5, []int{6} +func (m *OriginatingPcTx) Reset() { *m = OriginatingPcTx{} } +func (m *OriginatingPcTx) String() string { return proto.CompactTextString(m) } +func (*OriginatingPcTx) ProtoMessage() {} +func (*OriginatingPcTx) Descriptor() ([]byte, []int) { + return fileDescriptor_fab6d3ca71d1e2a5, []int{7} } -func (m *Originating_Pc_TX) XXX_Unmarshal(b []byte) error { +func (m *OriginatingPcTx) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *Originating_Pc_TX) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *OriginatingPcTx) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_Originating_Pc_TX.Marshal(b, m, deterministic) + return xxx_messageInfo_OriginatingPcTx.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -660,26 +715,26 @@ func (m *Originating_Pc_TX) XXX_Marshal(b []byte, deterministic bool) ([]byte, e return b[:n], nil } } -func (m *Originating_Pc_TX) XXX_Merge(src proto.Message) { - xxx_messageInfo_Originating_Pc_TX.Merge(m, src) +func (m *OriginatingPcTx) XXX_Merge(src proto.Message) { + xxx_messageInfo_OriginatingPcTx.Merge(m, src) } -func (m *Originating_Pc_TX) XXX_Size() int { +func (m *OriginatingPcTx) XXX_Size() int { return m.Size() } -func (m *Originating_Pc_TX) XXX_DiscardUnknown() { - xxx_messageInfo_Originating_Pc_TX.DiscardUnknown(m) +func (m *OriginatingPcTx) XXX_DiscardUnknown() { + xxx_messageInfo_OriginatingPcTx.DiscardUnknown(m) } -var xxx_messageInfo_Originating_Pc_TX proto.InternalMessageInfo +var xxx_messageInfo_OriginatingPcTx proto.InternalMessageInfo -func (m *Originating_Pc_TX) GetTxHash() string { +func (m *OriginatingPcTx) GetTxHash() string { if m != nil { return m.TxHash } return "" } -func (m *Originating_Pc_TX) GetLogIndex() string { +func (m *OriginatingPcTx) GetLogIndex() string { if m != nil { return m.LogIndex } @@ -687,24 +742,26 @@ func (m *Originating_Pc_TX) GetLogIndex() string { } type OutboundTx struct { - DestinationChain string `protobuf:"bytes,1,opt,name=destination_chain,json=destinationChain,proto3" json:"destination_chain,omitempty"` - Recipient string `protobuf:"bytes,2,opt,name=recipient,proto3" json:"recipient,omitempty"` - Amount string `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount,omitempty"` - AssetAddr string `protobuf:"bytes,4,opt,name=asset_addr,json=assetAddr,proto3" json:"asset_addr,omitempty"` - Sender string `protobuf:"bytes,5,opt,name=sender,proto3" json:"sender,omitempty"` - Payload string `protobuf:"bytes,6,opt,name=payload,proto3" json:"payload,omitempty"` - GasLimit string `protobuf:"bytes,7,opt,name=gas_limit,json=gasLimit,proto3" json:"gas_limit,omitempty"` - TxType TxType `protobuf:"varint,8,opt,name=tx_type,json=txType,proto3,enum=uexecutor.v1.TxType" json:"tx_type,omitempty"` - PcTx *Originating_Pc_TX `protobuf:"bytes,9,opt,name=pc_tx,json=pcTx,proto3" json:"pc_tx,omitempty"` - ObservedTx *OutboundObservation `protobuf:"bytes,10,opt,name=observed_tx,json=observedTx,proto3" json:"observed_tx,omitempty"` - Id string `protobuf:"bytes,11,opt,name=id,proto3" json:"id,omitempty"` - OutboundStatus Status `protobuf:"varint,12,opt,name=outbound_status,json=outboundStatus,proto3,enum=uexecutor.v1.Status" json:"outbound_status,omitempty"` + DestinationChain string `protobuf:"bytes,1,opt,name=destination_chain,json=destinationChain,proto3" json:"destination_chain,omitempty"` + Recipient string `protobuf:"bytes,2,opt,name=recipient,proto3" json:"recipient,omitempty"` + Amount string `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount,omitempty"` + AssetAddr string `protobuf:"bytes,4,opt,name=asset_addr,json=assetAddr,proto3" json:"asset_addr,omitempty"` + Sender string `protobuf:"bytes,5,opt,name=sender,proto3" json:"sender,omitempty"` + Payload string `protobuf:"bytes,6,opt,name=payload,proto3" json:"payload,omitempty"` + GasLimit string `protobuf:"bytes,7,opt,name=gas_limit,json=gasLimit,proto3" json:"gas_limit,omitempty"` + TxType TxType `protobuf:"varint,8,opt,name=tx_type,json=txType,proto3,enum=uexecutor.v1.TxType" json:"tx_type,omitempty"` + PcTx *OriginatingPcTx `protobuf:"bytes,9,opt,name=pc_tx,json=pcTx,proto3" json:"pc_tx,omitempty"` + ObservedTx *OutboundObservation `protobuf:"bytes,10,opt,name=observed_tx,json=observedTx,proto3" json:"observed_tx,omitempty"` + Id string `protobuf:"bytes,11,opt,name=id,proto3" json:"id,omitempty"` + OutboundStatus Status `protobuf:"varint,12,opt,name=outbound_status,json=outboundStatus,proto3,enum=uexecutor.v1.Status" json:"outbound_status,omitempty"` + RevertInstructions *RevertInstructions `protobuf:"bytes,13,opt,name=revert_instructions,json=revertInstructions,proto3" json:"revert_instructions,omitempty"` + PcRevertExecution *PCTx `protobuf:"bytes,14,opt,name=pc_revert_execution,json=pcRevertExecution,proto3" json:"pc_revert_execution,omitempty"` } func (m *OutboundTx) Reset() { *m = OutboundTx{} } func (*OutboundTx) ProtoMessage() {} func (*OutboundTx) Descriptor() ([]byte, []int) { - return fileDescriptor_fab6d3ca71d1e2a5, []int{7} + return fileDescriptor_fab6d3ca71d1e2a5, []int{8} } func (m *OutboundTx) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -789,7 +846,7 @@ func (m *OutboundTx) GetTxType() TxType { return TxType_UNSPECIFIED_TX } -func (m *OutboundTx) GetPcTx() *Originating_Pc_TX { +func (m *OutboundTx) GetPcTx() *OriginatingPcTx { if m != nil { return m.PcTx } @@ -817,6 +874,20 @@ func (m *OutboundTx) GetOutboundStatus() Status { return Status_UNSPECIFIED } +func (m *OutboundTx) GetRevertInstructions() *RevertInstructions { + if m != nil { + return m.RevertInstructions + } + return nil +} + +func (m *OutboundTx) GetPcRevertExecution() *PCTx { + if m != nil { + return m.PcRevertExecution + } + return nil +} + type UniversalTx struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` InboundTx *Inbound `protobuf:"bytes,2,opt,name=inbound_tx,json=inboundTx,proto3" json:"inbound_tx,omitempty"` @@ -828,7 +899,7 @@ type UniversalTx struct { func (m *UniversalTx) Reset() { *m = UniversalTx{} } func (*UniversalTx) ProtoMessage() {} func (*UniversalTx) Descriptor() ([]byte, []int) { - return fileDescriptor_fab6d3ca71d1e2a5, []int{8} + return fileDescriptor_fab6d3ca71d1e2a5, []int{9} } func (m *UniversalTx) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -900,10 +971,11 @@ func init() { proto.RegisterType((*Params)(nil), "uexecutor.v1.Params") proto.RegisterType((*UniversalPayload)(nil), "uexecutor.v1.UniversalPayload") proto.RegisterType((*UniversalAccountId)(nil), "uexecutor.v1.UniversalAccountId") + proto.RegisterType((*RevertInstructions)(nil), "uexecutor.v1.RevertInstructions") proto.RegisterType((*Inbound)(nil), "uexecutor.v1.Inbound") proto.RegisterType((*PCTx)(nil), "uexecutor.v1.PCTx") proto.RegisterType((*OutboundObservation)(nil), "uexecutor.v1.OutboundObservation") - proto.RegisterType((*Originating_Pc_TX)(nil), "uexecutor.v1.Originating_Pc_TX") + proto.RegisterType((*OriginatingPcTx)(nil), "uexecutor.v1.OriginatingPcTx") proto.RegisterType((*OutboundTx)(nil), "uexecutor.v1.OutboundTx") proto.RegisterType((*UniversalTx)(nil), "uexecutor.v1.UniversalTx") } @@ -911,91 +983,98 @@ func init() { func init() { proto.RegisterFile("uexecutor/v1/types.proto", fileDescriptor_fab6d3ca71d1e2a5) } var fileDescriptor_fab6d3ca71d1e2a5 = []byte{ - // 1341 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x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fc, 0xf3, 0xd7, 0x5d, 0x39, - 0x81, 0x31, 0x13, 0xd5, 0x8d, 0xdf, 0x73, 0x20, 0x8f, 0x6c, 0x6b, 0x4e, 0x1d, 0x97, 0x4c, 0x06, - 0xe4, 0x62, 0xc2, 0x88, 0x81, 0xd6, 0x20, 0xe7, 0x31, 0x45, 0xda, 0x96, 0x76, 0xaa, 0x6a, 0xce, - 0x63, 0x68, 0x13, 0x8a, 0xc9, 0xee, 0x55, 0x35, 0x34, 0x10, 0x82, 0x82, 0x41, 0x3c, 0xa2, 0xe4, - 0x85, 0x53, 0xac, 0xd1, 0x3d, 0xa8, 0x9a, 0xc4, 0xc5, 0x13, 0x6b, 0x6a, 0x79, 0x4a, 0x41, 0x04, - 0x2a, 0x26, 0x71, 0x4f, 0xb8, 0x8d, 0x3e, 0x86, 0xf5, 0x29, 0x09, 0xf0, 0x2b, 0x4a, 0xf1, 0x8c, - 0x3a, 0xd8, 0x24, 0xae, 0x52, 0x14, 0x29, 0xab, 0x53, 0x12, 0x1c, 0x51, 0x3a, 0xa0, 0xce, 0x31, - 0x71, 0xd1, 0x0b, 0x50, 0x78, 0xda, 0xcc, 0xb1, 0x98, 0x63, 0x79, 0x17, 0x99, 0xfc, 0x92, 0xc8, - 0xdf, 0x9c, 0x92, 0x60, 0x10, 0x85, 0x93, 0xba, 0x4d, 0x28, 0xda, 0xcc, 0xd6, 0xa9, 0x52, 0x0e, - 0x51, 0x0a, 0x03, 0xdd, 0x85, 0x8a, 0x41, 0x89, 0x31, 0xb1, 0x6c, 0xaa, 0x54, 0x42, 0x40, 0xb1, - 0x8d, 0x3e, 0x83, 0xd2, 0x1c, 0xf3, 0x66, 0x28, 0xd5, 0x6d, 0x69, 0x67, 0xed, 0x59, 0x7d, 0x2f, - 0xdd, 0x8c, 0xbd, 0x53, 0xea, 0x58, 0xaf, 0x2c, 0x9d, 0x78, 0x16, 0xb3, 0xb5, 0x8b, 0x19, 0x55, - 0x8b, 0x73, 0xfe, 0xef, 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f, 0xfc, 0xf6, 0xa1, 0xbe, 0xf2, 0xed, 0x0b, 0xd3, 0xf2, 0xc6, 0xfe, 0xf9, - 0x9e, 0xce, 0xa6, 0xfb, 0x33, 0xdf, 0x1d, 0x8b, 0x27, 0x52, 0xac, 0x9e, 0x88, 0xe5, 0x13, 0x9b, - 0x19, 0x74, 0x3f, 0xd8, 0x4f, 0x84, 0x24, 0x7e, 0x54, 0x9f, 0x97, 0xc4, 0xcf, 0xe3, 0x4f, 0xff, - 0x09, 0x00, 0x00, 0xff, 0xff, 0xc1, 0x10, 0x80, 0x01, 0x71, 0x0b, 0x00, 0x00, + // 1449 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x57, 0xbb, 0x6f, 0xdb, 0xd6, + 0x1a, 0x37, 0xf5, 0xd6, 0x27, 0xc7, 0xa2, 0x8f, 0x9d, 0x84, 0x79, 0x58, 0x76, 0x94, 0x9b, 0x1b, + 0xc3, 0x17, 0xb1, 0x91, 0xdc, 0xdc, 0x00, 0x57, 0x40, 0x07, 0x59, 0x92, 0x1d, 0xb5, 0xae, 0xa4, + 0x52, 0x94, 0x91, 0x76, 0x39, 0x38, 0x26, 0x4f, 0x28, 0xa2, 0x12, 0x29, 0xf0, 0xa1, 0xd2, 0x43, + 0xa7, 0x6e, 0x1d, 0x8a, 0x0e, 0x1d, 0x32, 0x66, 0xec, 0xd8, 0x3f, 0x23, 0x63, 0xc6, 0x02, 0x5d, + 0x8a, 0x64, 0x68, 0x81, 0xfe, 0x13, 0xc5, 0x39, 0x24, 0x45, 0x52, 0xb6, 0x83, 0xb6, 0x4b, 0xcc, + 0xef, 0xfd, 0xfa, 0x7d, 0xdf, 0x89, 0x40, 0xf2, 0xa8, 0x4f, 0x55, 0xcf, 0xb5, 0xec, 0x83, 0xf9, + 0xe3, 0x03, 0xf7, 0x7c, 0x46, 0x9d, 0xfd, 0x99, 0x6d, 0xb9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c7, 0xde, 0xd9, 0xbe, 0x6a, 0x4d, 0x0f, 0x66, + 0x9e, 0x33, 0xe6, 0xb7, 0x9c, 0x7f, 0x3d, 0xe2, 0x9f, 0x8f, 0x4c, 0x4b, 0xa3, 0x07, 0xfe, 0x41, + 0x0c, 0x2e, 0xfe, 0x9b, 0xe5, 0xac, 0xc0, 0x7f, 0x7d, 0xfc, 0xf7, 0xcf, 0x00, 0x00, 0x00, 0xff, + 0xff, 0xaf, 0xb5, 0x0b, 0x1e, 0xd0, 0x0c, 0x00, 0x00, } func (this *Params) Equal(that interface{}) bool { @@ -1100,6 +1179,30 @@ func (this *UniversalAccountId) Equal(that interface{}) bool { } return true } +func (this *RevertInstructions) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*RevertInstructions) + if !ok { + that2, ok := that.(RevertInstructions) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.FundRecipient != that1.FundRecipient { + return false + } + return true +} func (this *Inbound) Equal(that interface{}) bool { if that == nil { return this == nil @@ -1149,6 +1252,9 @@ func (this *Inbound) Equal(that interface{}) bool { if this.VerificationData != that1.VerificationData { return false } + if !this.RevertInstructions.Equal(that1.RevertInstructions) { + return false + } return true } func (this *PCTx) Equal(that interface{}) bool { @@ -1220,14 +1326,14 @@ func (this *OutboundObservation) Equal(that interface{}) bool { } return true } -func (this *Originating_Pc_TX) Equal(that interface{}) bool { +func (this *OriginatingPcTx) Equal(that interface{}) bool { if that == nil { return this == nil } - that1, ok := that.(*Originating_Pc_TX) + that1, ok := that.(*OriginatingPcTx) if !ok { - that2, ok := that.(Originating_Pc_TX) + that2, ok := that.(OriginatingPcTx) if ok { that1 = &that2 } else { @@ -1302,6 +1408,12 @@ func (this *OutboundTx) Equal(that interface{}) bool { if this.OutboundStatus != that1.OutboundStatus { return false } + if !this.RevertInstructions.Equal(that1.RevertInstructions) { + return false + } + if !this.PcRevertExecution.Equal(that1.PcRevertExecution) { + return false + } return true } func (this *UniversalTx) Equal(that interface{}) bool { @@ -1511,6 +1623,36 @@ func (m *UniversalAccountId) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *RevertInstructions) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RevertInstructions) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RevertInstructions) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.FundRecipient) > 0 { + i -= len(m.FundRecipient) + copy(dAtA[i:], m.FundRecipient) + i = encodeVarintTypes(dAtA, i, uint64(len(m.FundRecipient))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func (m *Inbound) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1531,6 +1673,18 @@ func (m *Inbound) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.RevertInstructions != nil { + { + size, err := m.RevertInstructions.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x5a + } if len(m.VerificationData) > 0 { i -= len(m.VerificationData) copy(dAtA[i:], m.VerificationData) @@ -1713,7 +1867,7 @@ func (m *OutboundObservation) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *Originating_Pc_TX) Marshal() (dAtA []byte, err error) { +func (m *OriginatingPcTx) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1723,12 +1877,12 @@ func (m *Originating_Pc_TX) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *Originating_Pc_TX) MarshalTo(dAtA []byte) (int, error) { +func (m *OriginatingPcTx) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *Originating_Pc_TX) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *OriginatingPcTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1770,6 +1924,30 @@ func (m *OutboundTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.PcRevertExecution != nil { + { + size, err := m.PcRevertExecution.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x72 + } + if m.RevertInstructions != nil { + { + size, err := m.RevertInstructions.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x6a + } if m.OutboundStatus != 0 { i = encodeVarintTypes(dAtA, i, uint64(m.OutboundStatus)) i-- @@ -2026,6 +2204,19 @@ func (m *UniversalAccountId) Size() (n int) { return n } +func (m *RevertInstructions) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.FundRecipient) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + return n +} + func (m *Inbound) Size() (n int) { if m == nil { return 0 @@ -2071,6 +2262,10 @@ func (m *Inbound) Size() (n int) { if l > 0 { n += 1 + l + sovTypes(uint64(l)) } + if m.RevertInstructions != nil { + l = m.RevertInstructions.Size() + n += 1 + l + sovTypes(uint64(l)) + } return n } @@ -2124,7 +2319,7 @@ func (m *OutboundObservation) Size() (n int) { return n } -func (m *Originating_Pc_TX) Size() (n int) { +func (m *OriginatingPcTx) Size() (n int) { if m == nil { return 0 } @@ -2193,6 +2388,14 @@ func (m *OutboundTx) Size() (n int) { if m.OutboundStatus != 0 { n += 1 + sovTypes(uint64(m.OutboundStatus)) } + if m.RevertInstructions != nil { + l = m.RevertInstructions.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.PcRevertExecution != nil { + l = m.PcRevertExecution.Size() + n += 1 + l + sovTypes(uint64(l)) + } return n } @@ -2775,6 +2978,88 @@ func (m *UniversalAccountId) Unmarshal(dAtA []byte) error { } return nil } +func (m *RevertInstructions) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RevertInstructions: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RevertInstructions: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FundRecipient", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FundRecipient = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *Inbound) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -3115,6 +3400,42 @@ func (m *Inbound) Unmarshal(dAtA []byte) error { } m.VerificationData = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RevertInstructions", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.RevertInstructions == nil { + m.RevertInstructions = &RevertInstructions{} + } + if err := m.RevertInstructions.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTypes(dAtA[iNdEx:]) @@ -3473,7 +3794,7 @@ func (m *OutboundObservation) Unmarshal(dAtA []byte) error { } return nil } -func (m *Originating_Pc_TX) Unmarshal(dAtA []byte) error { +func (m *OriginatingPcTx) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3496,10 +3817,10 @@ func (m *Originating_Pc_TX) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Originating_Pc_TX: wiretype end group for non-group") + return fmt.Errorf("proto: OriginatingPcTx: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Originating_Pc_TX: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: OriginatingPcTx: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -3889,7 +4210,7 @@ func (m *OutboundTx) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.PcTx == nil { - m.PcTx = &Originating_Pc_TX{} + m.PcTx = &OriginatingPcTx{} } if err := m.PcTx.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -3982,6 +4303,78 @@ func (m *OutboundTx) Unmarshal(dAtA []byte) error { break } } + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RevertInstructions", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.RevertInstructions == nil { + m.RevertInstructions = &RevertInstructions{} + } + if err := m.RevertInstructions.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PcRevertExecution", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.PcRevertExecution == nil { + m.PcRevertExecution = &PCTx{} + } + if err := m.PcRevertExecution.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTypes(dAtA[iNdEx:]) diff --git a/x/uexecutor/types/universal_tx_test.go b/x/uexecutor/types/universal_tx_test.go index 070a9127..4299c6df 100644 --- a/x/uexecutor/types/universal_tx_test.go +++ b/x/uexecutor/types/universal_tx_test.go @@ -39,7 +39,7 @@ func TestUniversalTx_ValidateBasic(t *testing.T) { Payload: "0xabcdef", GasLimit: "21000", TxType: types.TxType_FUNDS_AND_PAYLOAD, - PcTx: &types.Originating_Pc_TX{ + PcTx: &types.OriginatingPcTx{ TxHash: "0xpc123", LogIndex: "1", }, From 4d8c3b4a8b6bb44e3f81a56f5569e1159533dc6a Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Mon, 15 Dec 2025 12:37:01 +0530 Subject: [PATCH 052/120] feat: modified txType proto --- proto/uexecutor/v1/types.proto | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/proto/uexecutor/v1/types.proto b/proto/uexecutor/v1/types.proto index 8d9b7542..dea73186 100644 --- a/proto/uexecutor/v1/types.proto +++ b/proto/uexecutor/v1/types.proto @@ -69,13 +69,13 @@ enum Status { } enum TxType { - UNSPECIFIED_TX = 0; - GAS = 1; // fee abstraction - FUNDS = 2; // synthetic - FUNDS_AND_PAYLOAD = 3; // synthetic + payload exec - GAS_AND_PAYLOAD = 4; // fee abstraction + payload exec - PAYLOAD = 5; - INBOUND_REVERT = 6; + UNSPECIFIED_TX = 0; + GAS = 1; + GAS_AND_PAYLOAD = 2; + FUNDS = 3; + FUNDS_AND_PAYLOAD = 4; + PAYLOAD = 5; + INBOUND_REVERT = 6; } message RevertInstructions { From 28a6dcf2eb68505f0ff9014a006f2450d44a9ae2 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Mon, 15 Dec 2025 12:39:24 +0530 Subject: [PATCH 053/120] chore: added modified protobuf --- api/uexecutor/v1/types.pulsar.go | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/api/uexecutor/v1/types.pulsar.go b/api/uexecutor/v1/types.pulsar.go index d4c566c8..c75a101e 100644 --- a/api/uexecutor/v1/types.pulsar.go +++ b/api/uexecutor/v1/types.pulsar.go @@ -7382,10 +7382,10 @@ type TxType int32 const ( TxType_UNSPECIFIED_TX TxType = 0 - TxType_GAS TxType = 1 // fee abstraction - TxType_FUNDS TxType = 2 // synthetic - TxType_FUNDS_AND_PAYLOAD TxType = 3 // synthetic + payload exec - TxType_GAS_AND_PAYLOAD TxType = 4 // fee abstraction + payload exec + TxType_GAS TxType = 1 + TxType_GAS_AND_PAYLOAD TxType = 2 + TxType_FUNDS TxType = 3 + TxType_FUNDS_AND_PAYLOAD TxType = 4 TxType_PAYLOAD TxType = 5 TxType_INBOUND_REVERT TxType = 6 ) @@ -7395,18 +7395,18 @@ var ( TxType_name = map[int32]string{ 0: "UNSPECIFIED_TX", 1: "GAS", - 2: "FUNDS", - 3: "FUNDS_AND_PAYLOAD", - 4: "GAS_AND_PAYLOAD", + 2: "GAS_AND_PAYLOAD", + 3: "FUNDS", + 4: "FUNDS_AND_PAYLOAD", 5: "PAYLOAD", 6: "INBOUND_REVERT", } TxType_value = map[string]int32{ "UNSPECIFIED_TX": 0, "GAS": 1, - "FUNDS": 2, - "FUNDS_AND_PAYLOAD": 3, - "GAS_AND_PAYLOAD": 4, + "GAS_AND_PAYLOAD": 2, + "FUNDS": 3, + "FUNDS_AND_PAYLOAD": 4, "PAYLOAD": 5, "INBOUND_REVERT": 6, } @@ -8348,10 +8348,10 @@ var file_uexecutor_v1_types_proto_rawDesc = []byte{ 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x4f, 0x42, 0x53, 0x45, 0x52, 0x56, 0x45, 0x44, 0x10, 0x02, 0x2a, 0x7d, 0x0a, 0x06, 0x54, 0x78, 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x0e, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, - 0x5f, 0x54, 0x58, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x47, 0x41, 0x53, 0x10, 0x01, 0x12, 0x09, - 0x0a, 0x05, 0x46, 0x55, 0x4e, 0x44, 0x53, 0x10, 0x02, 0x12, 0x15, 0x0a, 0x11, 0x46, 0x55, 0x4e, - 0x44, 0x53, 0x5f, 0x41, 0x4e, 0x44, 0x5f, 0x50, 0x41, 0x59, 0x4c, 0x4f, 0x41, 0x44, 0x10, 0x03, - 0x12, 0x13, 0x0a, 0x0f, 0x47, 0x41, 0x53, 0x5f, 0x41, 0x4e, 0x44, 0x5f, 0x50, 0x41, 0x59, 0x4c, + 0x5f, 0x54, 0x58, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x47, 0x41, 0x53, 0x10, 0x01, 0x12, 0x13, + 0x0a, 0x0f, 0x47, 0x41, 0x53, 0x5f, 0x41, 0x4e, 0x44, 0x5f, 0x50, 0x41, 0x59, 0x4c, 0x4f, 0x41, + 0x44, 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x46, 0x55, 0x4e, 0x44, 0x53, 0x10, 0x03, 0x12, 0x15, + 0x0a, 0x11, 0x46, 0x55, 0x4e, 0x44, 0x53, 0x5f, 0x41, 0x4e, 0x44, 0x5f, 0x50, 0x41, 0x59, 0x4c, 0x4f, 0x41, 0x44, 0x10, 0x04, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x41, 0x59, 0x4c, 0x4f, 0x41, 0x44, 0x10, 0x05, 0x12, 0x12, 0x0a, 0x0e, 0x49, 0x4e, 0x42, 0x4f, 0x55, 0x4e, 0x44, 0x5f, 0x52, 0x45, 0x56, 0x45, 0x52, 0x54, 0x10, 0x06, 0x42, 0xb2, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x75, From c61279c010bed228f9a41e051dd82a86527940c9 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Mon, 15 Dec 2025 12:40:34 +0530 Subject: [PATCH 054/120] feat: created a tx_type mapping to add tx_type in outbound --- x/uexecutor/types/tx_type.go | 37 ++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 x/uexecutor/types/tx_type.go diff --git a/x/uexecutor/types/tx_type.go b/x/uexecutor/types/tx_type.go new file mode 100644 index 00000000..a4bef026 --- /dev/null +++ b/x/uexecutor/types/tx_type.go @@ -0,0 +1,37 @@ +package types + +// Solidity TX_TYPE (uint8) → Cosmos TxType +func SolidityTxTypeToProto(txTypeUint8 uint8) TxType { + switch txTypeUint8 { + case 0: + return TxType_GAS + case 1: + return TxType_GAS_AND_PAYLOAD + case 2: + return TxType_FUNDS + case 3: + return TxType_FUNDS_AND_PAYLOAD + case 4: + return TxType_PAYLOAD + case 5: + return TxType_INBOUND_REVERT + default: + return TxType_UNSPECIFIED_TX + } +} + +// Cosmos TxType → Solidity uint8 (for emitting events from core module if ever needed) +func ProtoTxTypeToSolidity(txType TxType) uint8 { + switch txType { + case TxType_GAS: + return 0 + case TxType_GAS_AND_PAYLOAD: + return 1 + case TxType_FUNDS: + return 2 + case TxType_FUNDS_AND_PAYLOAD: + return 3 + default: + return 0 // fallback + } +} From 097b46c6196e7be075f949f6ce85d4c6fc97baff Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Mon, 15 Dec 2025 12:40:54 +0530 Subject: [PATCH 055/120] feat: added a default revert inbound outbound id --- x/uexecutor/types/keys.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/x/uexecutor/types/keys.go b/x/uexecutor/types/keys.go index 2e26b7e3..62406cac 100755 --- a/x/uexecutor/types/keys.go +++ b/x/uexecutor/types/keys.go @@ -85,3 +85,8 @@ func GetOutboundId( hash := sha256.Sum256([]byte(data)) return hex.EncodeToString(hash[:]) } + +// Outbound Id for a inbound revert tx +func GetOutboundRevertId() string { + return "0" +} From 124523cfb6cdba9854e7012097911250740f56a7 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Mon, 15 Dec 2025 12:41:23 +0530 Subject: [PATCH 056/120] feat: added fn to decode UniversalTxWithdraw Event --- x/uexecutor/types/abi.go | 61 ------------- x/uexecutor/types/gateway_pc_event_decode.go | 93 ++++++++++++++++++++ 2 files changed, 93 insertions(+), 61 deletions(-) create mode 100644 x/uexecutor/types/gateway_pc_event_decode.go diff --git a/x/uexecutor/types/abi.go b/x/uexecutor/types/abi.go index f2a7720c..5b2bb248 100644 --- a/x/uexecutor/types/abi.go +++ b/x/uexecutor/types/abi.go @@ -1,12 +1,9 @@ package types import ( - "encoding/hex" - fmt "fmt" "math/big" "strings" - evmtypes "github.com/cosmos/evm/x/vm/types" "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/common" "github.com/pushchain/push-chain-node/utils" @@ -720,61 +717,3 @@ func NewAbiUniversalAccountId(proto *UniversalAccountId) (AbiUniversalAccountId, Owner: owner, }, nil } - -type UniversalWithdrawEvent struct { - Sender string - ChainId string - Token string - Target string - Amount *big.Int - GasToken string - GasFee *big.Int - GasLimit *big.Int - Payload string - ProtocolFee *big.Int -} - -func DecodeUniversalTxWithdrawFromLog(log *evmtypes.Log) (*UniversalWithdrawEvent, error) { - if len(log.Topics) < 3 { - return nil, fmt.Errorf("insufficient topics for UniversalTxWithdraw") - } - - event := &UniversalWithdrawEvent{} - - // Indexed params - event.Sender = common.HexToAddress(log.Topics[1]).Hex() - event.Token = common.HexToAddress(log.Topics[2]).Hex() - - // ABI types - stringType, _ := abi.NewType("string", "", nil) - bytesType, _ := abi.NewType("bytes", "", nil) - uint256Type, _ := abi.NewType("uint256", "", nil) - addressType, _ := abi.NewType("address", "", nil) - - arguments := abi.Arguments{ - {Type: stringType}, // chainId - {Type: bytesType}, // target - {Type: uint256Type}, // amount - {Type: addressType}, // gasToken - {Type: uint256Type}, // gasFee - {Type: uint256Type}, // gasLimit - {Type: bytesType}, // payload - {Type: uint256Type}, // protocolFee - } - - values, err := arguments.Unpack(log.Data) - if err != nil { - return nil, err - } - - event.ChainId = values[0].(string) - event.Target = "0x" + hex.EncodeToString(values[1].([]byte)) - event.Amount = values[2].(*big.Int) - event.GasToken = values[3].(common.Address).Hex() - event.GasFee = values[4].(*big.Int) - event.GasLimit = values[5].(*big.Int) - event.Payload = "0x" + hex.EncodeToString(values[6].([]byte)) - event.ProtocolFee = values[7].(*big.Int) - - return event, nil -} diff --git a/x/uexecutor/types/gateway_pc_event_decode.go b/x/uexecutor/types/gateway_pc_event_decode.go new file mode 100644 index 00000000..d2742dc0 --- /dev/null +++ b/x/uexecutor/types/gateway_pc_event_decode.go @@ -0,0 +1,93 @@ +package types + +import ( + "encoding/hex" + "fmt" + "math/big" + + evmtypes "github.com/cosmos/evm/x/vm/types" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/common" +) + +type UniversalTxWithdrawEvent struct { + Sender string // 0x... address + ChainId string // destination chain (CAIP-2 string) + Token string // 0x... ERC20 or zero address for native + Target string // 0x-hex encoded bytes (non-EVM recipient) + Amount *big.Int // amount of Token to bridge + GasToken string // 0x... token used to pay gas fee + GasFee *big.Int // amount of GasToken paid to relayer + GasLimit *big.Int // gas limit for destination execution + Payload string // 0x-hex calldata + ProtocolFee *big.Int // fee kept by protocol + RevertRecipient string // where funds go on full revert + TxType TxType // ← single source of truth from proto +} + +func DecodeUniversalTxWithdrawFromLog(log *evmtypes.Log) (*UniversalTxWithdrawEvent, error) { + if len(log.Topics) == 0 || log.Topics[0] != UniversalTxWithdrawEventSig { + return nil, fmt.Errorf("not a UniversalTxWithdraw event") + } + if len(log.Topics) < 3 { + return nil, fmt.Errorf("insufficient topics") + } + + event := &UniversalTxWithdrawEvent{ + Sender: common.HexToAddress(log.Topics[1]).Hex(), + Token: common.HexToAddress(log.Topics[2]).Hex(), + } + + // Define types exactly once + stringType, _ := abi.NewType("string", "", nil) + bytesType, _ := abi.NewType("bytes", "", nil) + uint256Type, _ := abi.NewType("uint256", "", nil) + addressType, _ := abi.NewType("address", "", nil) + uint8Type, _ := abi.NewType("uint8", "", nil) + + arguments := abi.Arguments{ + {Type: stringType}, // chainId + {Type: bytesType}, // target + {Type: uint256Type}, // amount + {Type: addressType}, // gasToken + {Type: uint256Type}, // gasFee + {Type: uint256Type}, // gasLimit + {Type: bytesType}, // payload + {Type: uint256Type}, // protocolFee + {Type: addressType}, // revertRecipient + {Type: uint8Type}, // txType ← now included! + } + + values, err := arguments.Unpack(log.Data) + if err != nil { + fmt.Println(err) + return nil, fmt.Errorf("failed to unpack UniversalTxWithdraw: %w", err) + } + + if len(values) != 10 { + return nil, fmt.Errorf("unexpected number of unpacked values: %d", len(values)) + } + + i := 0 + event.ChainId = values[i].(string) + i++ + event.Target = "0x" + hex.EncodeToString(values[i].([]byte)) + i++ + event.Amount = values[i].(*big.Int) + i++ + event.GasToken = values[i].(common.Address).Hex() + i++ + event.GasFee = values[i].(*big.Int) + i++ + event.GasLimit = values[i].(*big.Int) + i++ + event.Payload = "0x" + hex.EncodeToString(values[i].([]byte)) + i++ + event.ProtocolFee = values[i].(*big.Int) + i++ + event.RevertRecipient = values[i].(common.Address).Hex() + i++ + event.TxType = SolidityTxTypeToProto(values[i].(uint8)) + + return event, nil +} From c21b86b8d51776b155ee1f6d5c210f7839a53cce Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Mon, 15 Dec 2025 12:47:22 +0530 Subject: [PATCH 057/120] fix: fixed extraction of evm chainId in utils --- utils/conversion.go | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/utils/conversion.go b/utils/conversion.go index e82bf0bc..c6693bde 100644 --- a/utils/conversion.go +++ b/utils/conversion.go @@ -18,13 +18,23 @@ func StringToBigInt(s string) *big.Int { // Returns evm chainId, e.g. push-chain-42101 -> 42101 func ExtractEvmChainID(chainID string) (string, error) { - parts := strings.Split(chainID, "-") - last := parts[len(parts)-1] + parts := strings.Split(chainID, "_") + if len(parts) != 2 { + return "", fmt.Errorf("invalid chain-id format: %s", chainID) + } + + idPart := parts[1] + idParts := strings.Split(idPart, "-") + if len(idParts) < 1 { + return "", fmt.Errorf("invalid chain-id format: %s", chainID) + } + + evmChainID := idParts[0] // Ensure numeric - if _, ok := new(big.Int).SetString(last, 10); !ok { + if _, ok := new(big.Int).SetString(evmChainID, 10); !ok { return "", fmt.Errorf("invalid EVM chain id in tendermint chain-id: %s", chainID) } - return last, nil + return evmChainID, nil } From 16e9ee5c44a6dd3ef0da0e343ffe4e0997e99ca0 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Mon, 15 Dec 2025 12:48:08 +0530 Subject: [PATCH 058/120] feat: added RevertInstructions in the outbound --- x/uexecutor/keeper/create_outbound.go | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/x/uexecutor/keeper/create_outbound.go b/x/uexecutor/keeper/create_outbound.go index f59925f0..80d0f6d8 100644 --- a/x/uexecutor/keeper/create_outbound.go +++ b/x/uexecutor/keeper/create_outbound.go @@ -50,11 +50,14 @@ func (k Keeper) BuildOutboundsFromReceipt( Sender: event.Sender, Payload: event.Payload, GasLimit: event.GasLimit.String(), - TxType: types.TxType_FUNDS_AND_PAYLOAD, + TxType: event.TxType, PcTx: &types.OriginatingPcTx{ TxHash: receipt.Hash, LogIndex: fmt.Sprintf("%d", lg.Index), }, + RevertInstructions: &types.RevertInstructions{ + FundRecipient: event.RevertRecipient, + }, OutboundStatus: types.Status_PENDING, Id: types.GetOutboundId(utxId, receipt.Hash, lg.Index), } @@ -111,7 +114,7 @@ func (k Keeper) AttachOutboundsToExistingUniversalTx( return err } - return k.attachOutboundsToUtx(ctx, utx.Id, outbounds) + return k.attachOutboundsToUtx(ctx, utx.Id, outbounds, "") } // CreateUniversalTxFromReceiptIfOutbound @@ -141,19 +144,19 @@ func (k Keeper) CreateUniversalTxFromReceiptIfOutbound( return err } - return k.attachOutboundsToUtx(ctx, utx.Id, outbounds) + return k.attachOutboundsToUtx(ctx, utx.Id, outbounds, "") } func (k Keeper) attachOutboundsToUtx( ctx sdk.Context, utxId string, outbounds []*types.OutboundTx, + revertMsg string, // revert msg if the outbound is for a inbound revert ) error { if len(outbounds) == 0 { return nil } - return k.UpdateUniversalTx(ctx, utxId, func(utx *types.UniversalTx) error { for _, outbound := range outbounds { @@ -166,6 +169,14 @@ func (k Keeper) attachOutboundsToUtx( return fmt.Errorf("failed to encode outbound txID: %w", err) } + var pcTxHash string + var logIndex string + + if outbound.PcTx != nil { + pcTxHash = outbound.PcTx.TxHash + logIndex = outbound.PcTx.LogIndex + } + evt, err := types.NewOutboundCreatedEvent(types.OutboundCreatedEvent{ UniversalTxId: utxId, OutboundId: outbound.Id, @@ -178,8 +189,9 @@ func (k Keeper) attachOutboundsToUtx( Payload: outbound.Payload, GasLimit: outbound.GasLimit, TxType: outbound.TxType.String(), - PcTxHash: outbound.PcTx.TxHash, - LogIndex: outbound.PcTx.LogIndex, + PcTxHash: pcTxHash, + LogIndex: logIndex, + RevertMsg: revertMsg, }) if err == nil { ctx.EventManager().EmitEvent(evt) From c1cb7b34df37c6171342b98185a5320daf02d293 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Mon, 15 Dec 2025 12:51:26 +0530 Subject: [PATCH 059/120] feat: added revert outbound creation in inbound funds --- x/uexecutor/keeper/execute_inbound_funds.go | 31 +++++++++++++++++---- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/x/uexecutor/keeper/execute_inbound_funds.go b/x/uexecutor/keeper/execute_inbound_funds.go index ef828dd7..332f2b63 100644 --- a/x/uexecutor/keeper/execute_inbound_funds.go +++ b/x/uexecutor/keeper/execute_inbound_funds.go @@ -11,16 +11,18 @@ import ( func (k Keeper) ExecuteInboundFunds(ctx context.Context, utx types.UniversalTx) error { sdkCtx := sdk.UnwrapSDKContext(ctx) + inbound := utx.InboundTx + receipt, err := k.depositPRC20( sdkCtx, - utx.InboundTx.SourceChain, - utx.InboundTx.AssetAddr, - common.HexToAddress(utx.InboundTx.Recipient), // recipient is inbound recipient - utx.InboundTx.Amount, + inbound.SourceChain, + inbound.AssetAddr, + common.HexToAddress(inbound.Recipient), // recipient is inbound recipient + inbound.Amount, ) _, ueModuleAddressStr := k.GetUeModuleAddress(ctx) - universalTxKey := types.GetInboundUniversalTxKey(*utx.InboundTx) + universalTxKey := types.GetInboundUniversalTxKey(*inbound) updateErr := k.UpdateUniversalTx(ctx, universalTxKey, func(utx *types.UniversalTx) error { pcTx := types.PCTx{ TxHash: "", // no hash if depositPRC20 failed @@ -48,5 +50,24 @@ func (k Keeper) ExecuteInboundFunds(ctx context.Context, utx types.UniversalTx) return updateErr } + if err != nil { + revertOutbound := types.OutboundTx{ + DestinationChain: inbound.SourceChain, + Recipient: func() string { + if inbound.RevertInstructions != nil { + return inbound.RevertInstructions.FundRecipient + } + return inbound.Sender + }(), + Amount: inbound.Amount, + AssetAddr: inbound.AssetAddr, + Sender: inbound.Sender, + TxType: types.TxType_INBOUND_REVERT, + OutboundStatus: types.Status_PENDING, + Id: types.GetOutboundRevertId(), + } + _ = k.attachOutboundsToUtx(sdkCtx, utx.Id, []*types.OutboundTx{&revertOutbound}, err.Error()) + } + return nil } From 25e3c1fe08824bcdb014b619d219eff23ff27810 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Mon, 15 Dec 2025 12:51:38 +0530 Subject: [PATCH 060/120] feat: added revert outbound creation in inbound funds_and_payload --- .../execute_inbound_funds_and_payload.go | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/x/uexecutor/keeper/execute_inbound_funds_and_payload.go b/x/uexecutor/keeper/execute_inbound_funds_and_payload.go index f2f9c579..5229b030 100644 --- a/x/uexecutor/keeper/execute_inbound_funds_and_payload.go +++ b/x/uexecutor/keeper/execute_inbound_funds_and_payload.go @@ -16,6 +16,9 @@ func (k Keeper) ExecuteInboundFundsAndPayload(ctx context.Context, utx types.Uni _, ueModuleAddressStr := k.GetUeModuleAddress(ctx) universalTxKey := types.GetInboundUniversalTxKey(*utx.InboundTx) + shouldRevert := false + var revertReason string + // Build universalAccountId universalAccountId := types.UniversalAccountId{ ChainNamespace: strings.Split(utx.InboundTx.SourceChain, ":")[0], @@ -33,8 +36,12 @@ func (k Keeper) ExecuteInboundFundsAndPayload(ctx context.Context, utx types.Uni ueaAddr, isDeployed, err := k.CallFactoryToGetUEAAddressForOrigin(sdkCtx, ueModuleAccAddress, factoryAddress, &universalAccountId) if err != nil { execErr = fmt.Errorf("factory lookup failed: %w", err) + shouldRevert = true + revertReason = execErr.Error() } else if !isDeployed { execErr = fmt.Errorf("UEA is not deployed") + shouldRevert = true + revertReason = execErr.Error() } else { // --- Step 2: deposit PRC20 into UEA receipt, err = k.depositPRC20( @@ -46,6 +53,8 @@ func (k Keeper) ExecuteInboundFundsAndPayload(ctx context.Context, utx types.Uni ) if err != nil { execErr = fmt.Errorf("depositPRC20 failed: %w", err) + shouldRevert = true + revertReason = execErr.Error() } } @@ -75,6 +84,31 @@ func (k Keeper) ExecuteInboundFundsAndPayload(ctx context.Context, utx types.Uni // If deposit failed, stop here (don’t attempt payload execution) if execErr != nil { + if shouldRevert { + revertOutbound := &types.OutboundTx{ + DestinationChain: utx.InboundTx.SourceChain, + Recipient: func() string { + if utx.InboundTx.RevertInstructions != nil { + return utx.InboundTx.RevertInstructions.FundRecipient + } + return utx.InboundTx.Sender + }(), + Amount: utx.InboundTx.Amount, + AssetAddr: utx.InboundTx.AssetAddr, + Sender: utx.InboundTx.Sender, + TxType: types.TxType_INBOUND_REVERT, + OutboundStatus: types.Status_PENDING, + Id: types.GetOutboundRevertId(), + } + + _ = k.attachOutboundsToUtx( + sdkCtx, + universalTxKey, + []*types.OutboundTx{revertOutbound}, + revertReason, + ) + } + return nil } From e8e3203a8858904119772f09abe01ee800384169 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Mon, 15 Dec 2025 12:51:49 +0530 Subject: [PATCH 061/120] feat: added revert outbound creation in inbound gas --- x/uexecutor/keeper/execute_inbound_gas.go | 40 +++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/x/uexecutor/keeper/execute_inbound_gas.go b/x/uexecutor/keeper/execute_inbound_gas.go index a9c28fcc..c0103a10 100644 --- a/x/uexecutor/keeper/execute_inbound_gas.go +++ b/x/uexecutor/keeper/execute_inbound_gas.go @@ -27,15 +27,22 @@ func (k Keeper) ExecuteInboundGas(ctx context.Context, inbound types.Inbound) er var execErr error var receipt *evmtypes.MsgEthereumTxResponse + shouldRevert := false + var revertReason string + // --- step 1: get token config tokenConfig, err := k.uregistryKeeper.GetTokenConfig(ctx, inbound.SourceChain, inbound.AssetAddr) if err != nil { execErr = fmt.Errorf("GetTokenConfig failed: %w", err) + shouldRevert = true + revertReason = execErr.Error() } else { // --- step 2: parse amount amount := new(big.Int) if amount, ok := amount.SetString(inbound.Amount, 10); !ok { execErr = fmt.Errorf("invalid amount: %s", inbound.Amount) + shouldRevert = true + revertReason = execErr.Error() } else { // --- step 3: resolve / deploy UEA prc20AddressHex := common.HexToAddress(tokenConfig.NativeRepresentation.ContractAddress) @@ -49,12 +56,16 @@ func (k Keeper) ExecuteInboundGas(ctx context.Context, inbound types.Inbound) er ueaAddr, isDeployed, fErr := k.CallFactoryToGetUEAAddressForOrigin(sdkCtx, ueModuleAccAddress, factoryAddress, &universalAccountId) if fErr != nil { execErr = fmt.Errorf("CallFactory failed: %w", fErr) + shouldRevert = true + revertReason = execErr.Error() } else { if !isDeployed { // Deploy new UEA and record a pcTx for it deployReceipt, dErr := k.DeployUEAV2(ctx, ueModuleAccAddress, &universalAccountId) if dErr != nil { execErr = fmt.Errorf("DeployUEA failed: %w", dErr) + shouldRevert = true + revertReason = execErr.Error() } else { // Parse deployed address from return data deployedAddr := common.BytesToAddress(deployReceipt.Ret) @@ -78,6 +89,10 @@ func (k Keeper) ExecuteInboundGas(ctx context.Context, inbound types.Inbound) er if execErr == nil { // --- step 4: deposit + swap receipt, execErr = k.CallPRC20DepositAutoSwap(sdkCtx, prc20AddressHex, ueaAddr, amount) + if execErr != nil { + shouldRevert = true + revertReason = execErr.Error() + } } } } @@ -108,6 +123,31 @@ func (k Keeper) ExecuteInboundGas(ctx context.Context, inbound types.Inbound) er return updateErr } + if execErr != nil && shouldRevert { + revertOutbound := &types.OutboundTx{ + DestinationChain: inbound.SourceChain, + Recipient: func() string { + if inbound.RevertInstructions != nil { + return inbound.RevertInstructions.FundRecipient + } + return inbound.Sender + }(), + Amount: inbound.Amount, + AssetAddr: inbound.AssetAddr, + Sender: inbound.Sender, + TxType: types.TxType_INBOUND_REVERT, + OutboundStatus: types.Status_PENDING, + Id: types.GetOutboundRevertId(), + } + + _ = k.attachOutboundsToUtx( + sdkCtx, + universalTxKey, + []*types.OutboundTx{revertOutbound}, + revertReason, + ) + } + // Never return execErr, only nil return nil } From 4051120b16c8f591294cec69106743770f5446cd Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Mon, 15 Dec 2025 12:51:57 +0530 Subject: [PATCH 062/120] feat: added revert outbound creation in inbound gas_and_payload --- .../keeper/execute_inbound_gas_and_payload.go | 85 +++++++++++++++---- 1 file changed, 69 insertions(+), 16 deletions(-) diff --git a/x/uexecutor/keeper/execute_inbound_gas_and_payload.go b/x/uexecutor/keeper/execute_inbound_gas_and_payload.go index de264b5e..fd8d463f 100644 --- a/x/uexecutor/keeper/execute_inbound_gas_and_payload.go +++ b/x/uexecutor/keeper/execute_inbound_gas_and_payload.go @@ -14,7 +14,7 @@ import ( func (k Keeper) ExecuteInboundGasAndPayload(ctx context.Context, utx types.UniversalTx) error { sdkCtx := sdk.UnwrapSDKContext(ctx) - _, ueModuleAddressStr := k.GetUeModuleAddress(ctx) + ueModuleAccAddress, ueModuleAddressStr := k.GetUeModuleAddress(ctx) universalTxKey := types.GetInboundUniversalTxKey(*utx.InboundTx) universalAccountId := types.UniversalAccountId{ @@ -24,26 +24,39 @@ func (k Keeper) ExecuteInboundGasAndPayload(ctx context.Context, utx types.Unive } factoryAddress := common.HexToAddress(types.FACTORY_PROXY_ADDRESS_HEX) - ueModuleAccAddress, _ := k.GetUeModuleAddress(ctx) var execErr error var receipt *evmtypes.MsgEthereumTxResponse var ueaAddr common.Address + shouldRevert := false + var revertReason string + // --- Step 1: token config tokenConfig, err := k.uregistryKeeper.GetTokenConfig(ctx, utx.InboundTx.SourceChain, utx.InboundTx.AssetAddr) if err != nil { execErr = fmt.Errorf("GetTokenConfig failed: %w", err) + shouldRevert = true + revertReason = execErr.Error() } else { // --- Step 2: parse amount amount := new(big.Int) if amount, ok := amount.SetString(utx.InboundTx.Amount, 10); !ok { execErr = fmt.Errorf("invalid amount: %s", utx.InboundTx.Amount) + shouldRevert = true + revertReason = execErr.Error() } else { - // --- Step 3: check factory for UEA - ueaAddrRes, isDeployed, fErr := k.CallFactoryToGetUEAAddressForOrigin(sdkCtx, ueModuleAccAddress, factoryAddress, &universalAccountId) + // --- Step 3: resolve / deploy UEA + ueaAddrRes, isDeployed, fErr := k.CallFactoryToGetUEAAddressForOrigin( + sdkCtx, + ueModuleAccAddress, + factoryAddress, + &universalAccountId, + ) if fErr != nil { execErr = fmt.Errorf("factory lookup failed: %w", fErr) + shouldRevert = true + revertReason = execErr.Error() } else { ueaAddr = ueaAddrRes @@ -51,12 +64,11 @@ func (k Keeper) ExecuteInboundGasAndPayload(ctx context.Context, utx types.Unive deployReceipt, dErr := k.DeployUEAV2(ctx, ueModuleAccAddress, &universalAccountId) if dErr != nil { execErr = fmt.Errorf("DeployUEAV2 failed: %w", dErr) + shouldRevert = true + revertReason = execErr.Error() } else { - // Parse deployed address from return data - deployedAddr := common.BytesToAddress(deployReceipt.Ret) - ueaAddr = deployedAddr + ueaAddr = common.BytesToAddress(deployReceipt.Ret) - // Store deployment pcTx deployPcTx := types.PCTx{ TxHash: deployReceipt.Hash, Sender: ueModuleAddressStr, @@ -73,8 +85,19 @@ func (k Keeper) ExecuteInboundGasAndPayload(ctx context.Context, utx types.Unive if execErr == nil { // --- Step 4: deposit + autoswap - prc20AddressHex := common.HexToAddress(tokenConfig.NativeRepresentation.ContractAddress) - receipt, execErr = k.CallPRC20DepositAutoSwap(sdkCtx, prc20AddressHex, ueaAddr, amount) + prc20AddressHex := common.HexToAddress( + tokenConfig.NativeRepresentation.ContractAddress, + ) + receipt, execErr = k.CallPRC20DepositAutoSwap( + sdkCtx, + prc20AddressHex, + ueaAddr, + amount, + ) + if execErr != nil { + shouldRevert = true + revertReason = execErr.Error() + } } } } @@ -93,6 +116,7 @@ func (k Keeper) ExecuteInboundGasAndPayload(ctx context.Context, utx types.Unive depositPcTx.GasUsed = receipt.GasUsed depositPcTx.Status = "SUCCESS" } + updateErr := k.UpdateUniversalTx(ctx, universalTxKey, func(utx *types.UniversalTx) error { utx.PcTx = append(utx.PcTx, &depositPcTx) if execErr != nil { @@ -104,17 +128,41 @@ func (k Keeper) ExecuteInboundGasAndPayload(ctx context.Context, utx types.Unive return updateErr } - // If deposit failed, don’t attempt payload execution - if execErr != nil { + // --- create revert ONLY for pre-deposit / deposit failures + if execErr != nil && shouldRevert { + revertOutbound := &types.OutboundTx{ + DestinationChain: utx.InboundTx.SourceChain, + Recipient: func() string { + if utx.InboundTx.RevertInstructions != nil { + return utx.InboundTx.RevertInstructions.FundRecipient + } + return utx.InboundTx.Sender + }(), + Amount: utx.InboundTx.Amount, + AssetAddr: utx.InboundTx.AssetAddr, + Sender: utx.InboundTx.Sender, + TxType: types.TxType_INBOUND_REVERT, + OutboundStatus: types.Status_PENDING, + Id: types.GetOutboundRevertId(), + } + + _ = k.attachOutboundsToUtx( + sdkCtx, + universalTxKey, + []*types.OutboundTx{revertOutbound}, + revertReason, + ) + return nil } + // --- funds deposited successfully → continue with payload + ueModuleAddr, _ := k.GetUeModuleAddress(ctx) - // --- Step 5: compute and store payload hash + // --- Step 5: payload hash payloadHashErr := k.StoreVerifiedPayloadHash(sdkCtx, utx, ueaAddr, ueModuleAddr) if payloadHashErr != nil { - // Update UniversalTx with payload hash error and stop errorPcTx := types.PCTx{ Sender: ueModuleAddressStr, BlockHeight: uint64(sdkCtx.BlockHeight()), @@ -130,7 +178,13 @@ func (k Keeper) ExecuteInboundGasAndPayload(ctx context.Context, utx types.Unive } // --- Step 6: execute payload - receipt, err = k.ExecutePayloadV2(ctx, ueModuleAddr, &universalAccountId, utx.InboundTx.UniversalPayload, utx.InboundTx.VerificationData) + receipt, err = k.ExecutePayloadV2( + ctx, + ueModuleAddr, + &universalAccountId, + utx.InboundTx.UniversalPayload, + utx.InboundTx.VerificationData, + ) payloadPcTx := types.PCTx{ Sender: ueModuleAddressStr, @@ -162,6 +216,5 @@ func (k Keeper) ExecuteInboundGasAndPayload(ctx context.Context, utx types.Unive return updateErr } - // never return execErr or err return nil } From f05cfe59cb992c73a3844992f2ce30e0a2cb4eb1 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Mon, 15 Dec 2025 12:52:35 +0530 Subject: [PATCH 063/120] feat: added RevertMsg in the OutboundCreation Event --- x/uexecutor/types/events.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/x/uexecutor/types/events.go b/x/uexecutor/types/events.go index e9949d89..e7caffd3 100644 --- a/x/uexecutor/types/events.go +++ b/x/uexecutor/types/events.go @@ -26,6 +26,7 @@ type OutboundCreatedEvent struct { TxType string `json:"tx_type"` PcTxHash string `json:"pc_tx_hash"` LogIndex string `json:"log_index"` + RevertMsg string `json:"revert_msg"` } // NewOutboundCreatedEvent creates a Cosmos SDK event for outbound creation. @@ -54,6 +55,7 @@ func NewOutboundCreatedEvent(e OutboundCreatedEvent) (sdk.Event, error) { sdk.NewAttribute("tx_type", e.TxType), sdk.NewAttribute("pc_tx_hash", e.PcTxHash), sdk.NewAttribute("log_index", e.LogIndex), + sdk.NewAttribute("revert_msg", e.RevertMsg), sdk.NewAttribute("data", string(bz)), // full JSON payload for indexers ) From 15a9e7bdb2c8616fbbc9a8d54e0e85b3c54c31e8 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Mon, 15 Dec 2025 12:52:58 +0530 Subject: [PATCH 064/120] chore: added generated protobuf --- x/uexecutor/types/types.pb.go | 202 +++++++++++++++++----------------- 1 file changed, 101 insertions(+), 101 deletions(-) diff --git a/x/uexecutor/types/types.pb.go b/x/uexecutor/types/types.pb.go index 89269c92..f677d75b 100644 --- a/x/uexecutor/types/types.pb.go +++ b/x/uexecutor/types/types.pb.go @@ -132,9 +132,9 @@ type TxType int32 const ( TxType_UNSPECIFIED_TX TxType = 0 TxType_GAS TxType = 1 - TxType_FUNDS TxType = 2 - TxType_FUNDS_AND_PAYLOAD TxType = 3 - TxType_GAS_AND_PAYLOAD TxType = 4 + TxType_GAS_AND_PAYLOAD TxType = 2 + TxType_FUNDS TxType = 3 + TxType_FUNDS_AND_PAYLOAD TxType = 4 TxType_PAYLOAD TxType = 5 TxType_INBOUND_REVERT TxType = 6 ) @@ -142,9 +142,9 @@ const ( var TxType_name = map[int32]string{ 0: "UNSPECIFIED_TX", 1: "GAS", - 2: "FUNDS", - 3: "FUNDS_AND_PAYLOAD", - 4: "GAS_AND_PAYLOAD", + 2: "GAS_AND_PAYLOAD", + 3: "FUNDS", + 4: "FUNDS_AND_PAYLOAD", 5: "PAYLOAD", 6: "INBOUND_REVERT", } @@ -152,9 +152,9 @@ var TxType_name = map[int32]string{ var TxType_value = map[string]int32{ "UNSPECIFIED_TX": 0, "GAS": 1, - "FUNDS": 2, - "FUNDS_AND_PAYLOAD": 3, - "GAS_AND_PAYLOAD": 4, + "GAS_AND_PAYLOAD": 2, + "FUNDS": 3, + "FUNDS_AND_PAYLOAD": 4, "PAYLOAD": 5, "INBOUND_REVERT": 6, } @@ -983,98 +983,98 @@ func init() { func init() { proto.RegisterFile("uexecutor/v1/types.proto", fileDescriptor_fab6d3ca71d1e2a5) } var fileDescriptor_fab6d3ca71d1e2a5 = []byte{ - // 1449 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x57, 0xbb, 0x6f, 0xdb, 0xd6, - 0x1a, 0x37, 0xf5, 0xd6, 0x27, 0xc7, 0xa2, 0x8f,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 0x6a, - 0x3b, 0x64, 0x32, 0x20, 0xe7, 0x13, 0x8b, 0x68, 0x68, 0x0d, 0x32, 0xae, 0x25, 0x09, 0x3b, 0xc2, - 0x6e, 0x59, 0xce, 0xb8, 0x16, 0xda, 0x84, 0x7c, 0xec, 0xbd, 0x2c, 0x07, 0x04, 0x42, 0x90, 0xd3, - 0x88, 0x4b, 0xa4, 0x2c, 0x67, 0xf2, 0x6f, 0x74, 0x07, 0xca, 0x3a, 0x71, 0xf0, 0xc4, 0x98, 0x1a, - 0xae, 0x94, 0xe3, 0x82, 0x92, 0x4e, 0x9c, 0x13, 0x46, 0xa3, 0x07, 0x50, 0x9d, 0x12, 0x1f, 0xbf, - 0xa4, 0x14, 0xcf, 0xa8, 0x8d, 0x75, 0xe2, 0x48, 0x79, 0xae, 0xb2, 0x3a, 0x25, 0xfe, 0x11, 0xa5, - 0x03, 0x6a, 0x1f, 0x13, 0x07, 0x3d, 0x03, 0x89, 0xa9, 0xcd, 0x6c, 0xc3, 0xb2, 0x0d, 0xf7, 0x3c, - 0xa5, 0x5f, 0xe0, 0xfa, 0x9b, 0x53, 0xe2, 0x0f, 0x42, 0x71, 0x6c, 0xb7, 0x09, 0x79, 0xd3, 0x32, - 0x55, 0x2a, 0x15, 0x83, 0x2c, 0x39, 0x81, 0x6e, 0x43, 0x49, 0xa3, 0x44, 0x9b, 0x18, 0x26, 0x95, - 0x4a, 0x41, 0x42, 0x11, 0x8d, 0xfe, 0x07, 0x85, 0x39, 0x66, 0xc3, 0x90, 0xca, 0x3b, 0xc2, 0xee, - 0xda, 0x93, 0xda, 0x7e, 0x72, 0x18, 0xfb, 0xa7, 0xd4, 0x36, 0x5e, 0x1a, 0x2a, 0x71, 0x0d, 0xcb, - 0x54, 0xce, 0x67, 0x54, 0xce, 0xcf, 0xd9, 0x9f, 0xc6, 0x6e, 0xb2, 0xa5, 0x77, 0xe2, 0x96, 0x7a, - 0x51, 0x1f, 0xf1, 0x2c, 0x68, 0x64, 0xfd,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23, 0x9f, 0x76, 0xda, 0x62, 0x66, 0xef, 0x6b, 0x28, 0x04, - 0x37, 0x04, 0x21, 0x58, 0x4b, 0x58, 0x61, 0xe5, 0x85, 0xb8, 0x82, 0x8a, 0x90, 0x3d, 0x6e, 0xb2, - 0x96, 0x94, 0x21, 0x7f, 0x34, 0xea, 0xb5, 0x87, 0x62, 0x86, 0x55, 0xc3, 0x3f, 0x71, 0x93, 0xe5, - 0xdd, 0xfc, 0xfc, 0xa4, 0xdf, 0x6c, 0x8b, 0x59, 0x96, 0xe1, 0x71, 0x33, 0xcd, 0xcc, 0xf1, 0xc0, - 0x21, 0x91, 0x67, 0x01, 0xa2, 0x76, 0x86, 0x3d, 0x28, 0x1c, 0x0e, 0xde, 0xbc, 0xab, 0x09, 0x6f, - 0xdf, 0xd5, 0x84, 0x5f, 0xdf, 0xd5, 0x84, 0xef, 0xdf, 0xd7, 0x56, 0xde, 0xbe, 0xaf, 0xad, 0xfc, - 0xfc, 0xbe, 0xb6, 0xf2, 0xc5, 0x33, 0xdd, 0x70, 0xc7, 0xde, 0xd9, 0xbe, 0x6a, 0x4d, 0x0f, 0x66, - 0x9e, 0x33, 0xe6, 0xb7, 0x9c, 0x7f, 0x3d, 0xe2, 0x9f, 0x8f, 0x4c, 0x4b, 0xa3, 0x07, 0xfe, 0x41, - 0x0c, 0x2e, 0xfe, 0x9b, 0xe5, 0xac, 0xc0, 0x7f, 0x7d, 0xfc, 0xf7, 0xcf, 0x00, 0x00, 0x00, 0xff, - 0xff, 0xaf, 0xb5, 0x0b, 0x1e, 0xd0, 0x0c, 0x00, 0x00, + // 1450 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x57, 0x3b, 0x6f, 0xdb, 0xd6, + 0x17, 0x37, 0xf5, 0xd6, 0x91, 0x63, 0x51, 0xd7, 0x76, 0xc2, 0x3c, 0x2c, 0x3b, 0xca, 0x3f, 0x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, 0x15, 0xad, 0x41, 0xca, 0x31, 0x25, 0x61, 0x47, 0xd8, 0x2d, + 0xca, 0x29, 0xc7, 0x44, 0x1b, 0x90, 0x8d, 0xbc, 0x17, 0x65, 0x9f, 0x40, 0x08, 0x32, 0x2a, 0x71, + 0x88, 0x94, 0xe6, 0x4c, 0xfe, 0x8d, 0x6e, 0x43, 0x51, 0x23, 0x36, 0x9e, 0xe8, 0x53, 0xdd, 0x91, + 0x32, 0x5c, 0x50, 0xd0, 0x88, 0x7d, 0xc2, 0x68, 0x74, 0x1f, 0xca, 0x53, 0xe2, 0xe1, 0x17, 0x94, + 0xe2, 0x19, 0xb5, 0xb0, 0x46, 0x6c, 0x29, 0xcb, 0x55, 0x56, 0xa7, 0xc4, 0x3b, 0xa2, 0xb4, 0x4f, + 0xad, 0x63, 0x62, 0xa3, 0xa7, 0x20, 0x31, 0xb5, 0x99, 0xa5, 0x9b, 0x96, 0xee, 0x9c, 0x27, 0xf4, + 0x73, 0x5c, 0x7f, 0x63, 0x4a, 0xbc, 0x7e, 0x20, 0x8e, 0xec, 0x36, 0x20, 0x6b, 0x98, 0x86, 0x42, + 0xa5, 0xbc, 0x9f, 0x25, 0x27, 0xd0, 0x2d, 0x28, 0xa8, 0x94, 0xa8, 0x13, 0xdd, 0xa0, 0x52, 0xc1, + 0x4f, 0x28, 0xa4, 0xd1, 0x47, 0x90, 0x9b, 0x63, 0x36, 0x0c, 0xa9, 0xb8, 0x23, 0xec, 0xae, 0x3d, + 0xae, 0xee, 0xc7, 0x87, 0xb1, 0x7f, 0x4a, 0x2d, 0xfd, 0x85, 0xae, 0x10, 0x47, 0x37, 0x8d, 0xe1, + 0xf9, 0x8c, 0xca, 0xd9, 0x39, 0xfb, 0x53, 0xdf, 0x8d, 0xb7, 0xf4, 0x76, 0xd4, 0x52, 0x37, 0xec, + 0x23, 0x9e, 0xf9, 0x8d, 0xac, 0xbd, 0x14, 0x00, 0x2d, 0xba, 0xdb, 0x50, 0x14, 0xd3, 0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, 0x39, 0x76, 0x17, 0x15, + 0xec, 0x78, 0xb5, 0x9f, 0x04, 0x58, 0xef, 0xb9, 0x0e, 0xaf, 0xab, 0x77, 0x66, 0x53, 0x6b, 0xce, + 0x3b, 0x8b, 0x24, 0xc8, 0xdb, 0xae, 0xa2, 0x50, 0xdb, 0xe6, 0x95, 0x15, 0xe4, 0x90, 0xbc, 0x90, + 0x67, 0xea, 0x62, 0x9e, 0xb1, 0xb6, 0xa4, 0xe3, 0x6d, 0xa9, 0x3f, 0x08, 0xf3, 0xa8, 0x46, 0x79, + 0x98, 0x41, 0x74, 0x6c, 0x46, 0xe1, 0x6b, 0x53, 0x28, 0xf7, 0x2c, 0x5d, 0xd3, 0x0d, 0xe2, 0xe8, + 0x86, 0xd6, 0x57, 0xde, 0xd7, 0xeb, 0x04, 0x8c, 0x53, 0x49, 0x18, 0xd7, 0xff, 0x77, 0xc9, 0x8d, + 0x30, 0x23, 0xcf, 0xd8, 0xef, 0xc2, 0x0f, 0x59, 0x80, 0xb0, 0x0b, 0x43, 0x8f, 0xe1, 0x4f, 0xa5, + 0xb6, 0xc3, 0x75, 0x4c, 0x23, 0xb1, 0xc6, 0x62, 0x4c, 0xe0, 0xef, 0x72, 0x62, 0x35, 0x53, 0x57, + 0xaf, 0x66, 0xfa, 0x3d, 0xab, 0x99, 0x59, 0x5e, 0xcd, 0x08, 0x3f, 0xd9, 0x04, 0x7e, 0x24, 0xc8, + 0x87, 0xcb, 0xe5, 0x43, 0x20, 0x24, 0x93, 0x0f, 0x52, 0x7e, 0xe9, 0x41, 0xfa, 0x97, 0xcb, 0xfc, + 0x18, 0xb2, 0xbc, 0x2f, 0xc1, 0x02, 0x6f, 0x25, 0x95, 0x97, 0x06, 0x23, 0x67, 0x66, 0x6c, 0x3c, + 0x87, 0x50, 0xf2, 0x07, 0x48, 0x55, 0x66, 0x09, 0xdc, 0xf2, 0xee, 0x92, 0xe5, 0x45, 0xa0, 0xc9, + 0x10, 0x5a, 0x0d, 0x3d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0x82, 0x10, 0xac, 0xc5, 0xac, 0xf0, 0xf0, 0xb9, 0xb8, 0x82, 0xf2, 0x90, 0x3e, 0x6e, 0xb0, 0x96, + 0xac, 0x43, 0xf9, 0xb8, 0x31, 0xc0, 0x0d, 0x96, 0x6a, 0xe3, 0xcb, 0x93, 0x5e, 0xa3, 0x25, 0xa6, + 0x50, 0x11, 0xb2, 0x47, 0xa3, 0x6e, 0x8b, 0x95, 0xbe, 0x09, 0x15, 0xfe, 0x99, 0xd0, 0xc8, 0xf0, + 0xc0, 0x01, 0x91, 0x65, 0x01, 0xc2, 0x76, 0x06, 0x3d, 0xc8, 0x1d, 0xf6, 0x5f, 0xbf, 0xad, 0x0a, + 0x6f, 0xde, 0x56, 0x85, 0xdf, 0xdf, 0x56, 0x85, 0x1f, 0xdf, 0x55, 0x57, 0xde, 0xbc, 0xab, 0xae, + 0xfc, 0xfa, 0xae, 0xba, 0xf2, 0xd5, 0x53, 0x4d, 0x77, 0xc6, 0xee, 0xd9, 0xbe, 0x62, 0x4e, 0x0f, + 0x66, 0xae, 0x3d, 0xe6, 0xb7, 0x9c, 0x7f, 0x3d, 0xe4, 0x9f, 0x0f, 0x0d, 0x53, 0xa5, 0x07, 0xde, + 0x41, 0x04, 0x2e, 0xfe, 0x9b, 0xe5, 0x2c, 0xc7, 0x7f, 0x7d, 0x7c, 0xf8, 0x77, 0x00, 0x00, 0x00, + 0xff, 0xff, 0x3f, 0xd0, 0x71, 0xd8, 0xd0, 0x0c, 0x00, 0x00, } func (this *Params) Equal(that interface{}) bool { From ec019ed519b4f196957ffc133b43281c2bcabecd Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Mon, 15 Dec 2025 12:53:43 +0530 Subject: [PATCH 065/120] tests: fixed universal_tx types tests --- x/uexecutor/types/universal_tx_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/x/uexecutor/types/universal_tx_test.go b/x/uexecutor/types/universal_tx_test.go index 4299c6df..3aee598c 100644 --- a/x/uexecutor/types/universal_tx_test.go +++ b/x/uexecutor/types/universal_tx_test.go @@ -43,7 +43,8 @@ func TestUniversalTx_ValidateBasic(t *testing.T) { TxHash: "0xpc123", LogIndex: "1", }, - Id: "0", + Id: "0", + OutboundStatus: types.Status_PENDING, }, }, UniversalStatus: types.UniversalTxStatus_PC_EXECUTED_SUCCESS, From 1f9bf5189fd1cdbc8585e81c765de771a4bd7bd4 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Mon, 15 Dec 2025 12:53:53 +0530 Subject: [PATCH 066/120] tests: fixed outbound_tx types tests --- x/uexecutor/types/outbound_tx_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/x/uexecutor/types/outbound_tx_test.go b/x/uexecutor/types/outbound_tx_test.go index 270dfa05..f8e719e7 100644 --- a/x/uexecutor/types/outbound_tx_test.go +++ b/x/uexecutor/types/outbound_tx_test.go @@ -21,7 +21,8 @@ func baseValidOutbound() types.OutboundTx { TxHash: "0xpc123", LogIndex: "1", }, - Id: "0", + Id: "0", + OutboundStatus: types.Status_PENDING, } } From 4b86136abc5e0927fac108ec476336c0eb20197e Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Mon, 15 Dec 2025 12:54:19 +0530 Subject: [PATCH 067/120] tests: updated universal_gateway_pc bytecode in integration tests --- test/utils/bytecode.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/utils/bytecode.go b/test/utils/bytecode.go index 1c32ba3e..fbaf7215 100644 --- a/test/utils/bytecode.go +++ b/test/utils/bytecode.go @@ -8,7 +8,7 @@ const HANDLER_CONTRACT_BYTECODE = "6080604052600436106102ae575f3560e01c80638456c const PRC20_CREATION_BYTECODE = "608060405234801561000f575f80fd5b50600436106101a5575f3560e01c806374be2150116100e8578063c701262611610093578063eddeb1231161006e578063eddeb12314610457578063f687d12a1461046a578063f97c007a1461047d578063fc5fecd514610486575f80fd5b8063c7012626146103cb578063d9eeebed146103de578063dd62ed3e14610412575f80fd5b8063b84c8246116100c3578063b84c82461461037e578063c47f002714610391578063c6f1b7e7146103a4575f80fd5b806374be21501461033c57806395d89b4114610363578063a9059cbb1461036b575f80fd5b806323b872dd1161015357806347e7ef241161012e57806347e7ef24146102a1578063609c92b8146102b4578063701cd43b146102e857806370a0823114610307575f80fd5b806323b872dd14610266578063313ce5671461027957806342966c681461028e575f80fd5b8063091d278811610183578063091d278814610224578063095ea7b31461023b57806318160ddd1461025e575f80fd5b8063044d9371146101a957806306fdde03146101fa57806307e2bd8d1461020f575b5f80fd5b6101d07f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b610202610499565b6040516101f1919061143c565b61022261021d366004611479565b610529565b005b61022d60015481565b6040519081526020016101f1565b61024e610249366004611494565b6105ef565b60405190151581526020016101f1565b60065461022d565b61024e6102743660046114be565b6106ae565b60055460405160ff90911681526020016101f1565b61024e61029c3660046114fc565b61079b565b61024e6102af366004611494565b6107ae565b6102db7f000000000000000000000000000000000000000000000000000000000000000081565b6040516101f19190611513565b5f546101d09073ffffffffffffffffffffffffffffffffffffffff1681565b61022d610315366004611479565b73ffffffffffffffffffffffffffffffffffffffff165f9081526007602052604090205490565b61022d7f000000000000000000000000000000000000000000000000000000000000000081565b610202610879565b61024e610379366004611494565b610888565b61022261038c36600461157f565b61089d565b61022261039f36600461157f565b61091c565b6101d07f000000000000000000000000000000000000000000000000000000000000000081565b61024e6103d936600461166f565b610997565b6103e6610af9565b6040805173ffffffffffffffffffffffffffffffffffffffff90931683526020830191909152016101f1565b61022d6104203660046116e1565b73ffffffffffffffffffffffffffffffffffffffff9182165f90815260086020908152604080832093909416825291909152205490565b6102226104653660046114fc565b610d04565b6102226104783660046114fc565b610da8565b61022d60025481565b6103e66104943660046114fc565b610e4c565b6060600380546104a890611718565b80601f01602080910402602001604051908101604052809291908181526020018280546104d490611718565b801561051f5780601f106104f65761010080835404028352916020019161051f565b820191905f5260205f20905b81548152906001019060200180831161050257829003601f168201915b5050505050905090565b73ffffffffffffffffffffffffffffffffffffffff8116610576576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040519081527f412d5a95dc32cbb6bd9319bccf1bc1febeda71e734893a440f1f6853252fe99f906020015b60405180910390a150565b5f73ffffffffffffffffffffffffffffffffffffffff831661063d576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b335f81815260086020908152604080832073ffffffffffffffffffffffffffffffffffffffff881680855290835292819020869055518581529192917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a35060015b92915050565b5f6106ba848484611055565b73ffffffffffffffffffffffffffffffffffffffff84165f90815260086020908152604080832033845290915290205482811015610724576040517f10bad14700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff85165f81815260086020908152604080832033808552908352928190208786039081905590519081529192917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3506001949350505050565b5f6107a6338361119c565b506001919050565b5f6107b983836112ed565b6040517fffffffffffffffffffffffffffffffffffffffff0000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000060601b1660208201527f67fc7bdaed5b0ec550d8706b87d60568ab70c6b781263c70101d54cd1564aab390603401604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152908290526108689186908690611769565b60405180910390a150600192915050565b6060600480546104a890611718565b5f610894338484611055565b50600192915050565b3373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000161461090c576040517f6626eaef00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600461091882826117ef565b5050565b3373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000161461098b576040517f6626eaef00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600361091882826117ef565b5f805f6109a2610af9565b6040517f23b872dd00000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000081166024830152604482018390529294509092505f918416906323b872dd906064016020604051808303815f875af1158015610a42573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610a669190611906565b905080610a9f576040517f0a7cd6d600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610aa9338661119c565b7f9ffbffc04a397460ee1dbe8c9503e098090567d6b7f4b3c02a8617d800b6d9553388888886600254604051610ae496959493929190611925565b60405180910390a15060019695505050505050565b5f80546040517f7471e6970000000000000000000000000000000000000000000000000000000081527f00000000000000000000000000000000000000000000000000000000000000006004820152829173ffffffffffffffffffffffffffffffffffffffff1690637471e69790602401602060405180830381865afa158015610b85573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610ba991906119a5565b915073ffffffffffffffffffffffffffffffffffffffff8216610bf8576040517f3d5729c100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f80546040517fd7fd7afb0000000000000000000000000000000000000000000000000000000081527f0000000000000000000000000000000000000000000000000000000000000000600482015273ffffffffffffffffffffffffffffffffffffffff9091169063d7fd7afb90602401602060405180830381865afa158015610c84573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610ca891906119c0565b9050805f03610ce3576040517fe661aed000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600254600154610cf39083611a04565b610cfd9190611a1b565b9150509091565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610d73576040517f6626eaef00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60028190556040518181527fef13af88e424b5d15f49c77758542c1938b08b8b95b91ed0751f98ba99000d8f906020016105e4565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610e17576040517f6626eaef00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60018190556040518181527fff5788270f43bfc1ca41c503606d2594aa3023a1a7547de403a3e2f146a4a80a906020016105e4565b5f80546040517f7471e6970000000000000000000000000000000000000000000000000000000081527f00000000000000000000000000000000000000000000000000000000000000006004820152829173ffffffffffffffffffffffffffffffffffffffff1690637471e69790602401602060405180830381865afa158015610ed8573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610efc91906119a5565b915073ffffffffffffffffffffffffffffffffffffffff8216610f4b576040517f3d5729c100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f80546040517fd7fd7afb0000000000000000000000000000000000000000000000000000000081527f0000000000000000000000000000000000000000000000000000000000000000600482015273ffffffffffffffffffffffffffffffffffffffff9091169063d7fd7afb90602401602060405180830381865afa158015610fd7573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610ffb91906119c0565b9050805f03611036576040517fe661aed000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002546110438583611a04565b61104d9190611a1b565b915050915091565b73ffffffffffffffffffffffffffffffffffffffff8316158061108c575073ffffffffffffffffffffffffffffffffffffffff8216155b156110c3576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff83165f9081526007602052604090205481811015611122576040517ffe382aa700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8085165f8181526007602052604080822086860390559286168082529083902080548601905591517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9061118e9086815260200190565b60405180910390a350505050565b73ffffffffffffffffffffffffffffffffffffffff82166111e9576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805f03611222576040517f1f2a200500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff82165f9081526007602052604090205481811015611281576040517ffe382aa700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff83165f8181526007602090815260408083208686039055600680548790039055518581529192917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3505050565b73ffffffffffffffffffffffffffffffffffffffff821661133a576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805f03611373576040517f1f2a200500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600680548201905573ffffffffffffffffffffffffffffffffffffffff82165f818152600760209081526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b5f81518084525f5b818110156113ff576020818501810151868301820152016113e3565b505f6020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b602081525f61144e60208301846113db565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff81168114611476575f80fd5b50565b5f60208284031215611489575f80fd5b813561144e81611455565b5f80604083850312156114a5575f80fd5b82356114b081611455565b946020939093013593505050565b5f805f606084860312156114d0575f80fd5b83356114db81611455565b925060208401356114eb81611455565b929592945050506040919091013590565b5f6020828403121561150c575f80fd5b5035919050565b602081016003831061154c577f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b91905290565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f6020828403121561158f575f80fd5b813567ffffffffffffffff8111156115a5575f80fd5b8201601f810184136115b5575f80fd5b803567ffffffffffffffff8111156115cf576115cf611552565b6040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0603f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8501160116810181811067ffffffffffffffff8211171561163b5761163b611552565b604052818152828201602001861015611652575f80fd5b816020840160208301375f91810160200191909152949350505050565b5f805f60408486031215611681575f80fd5b833567ffffffffffffffff811115611697575f80fd5b8401601f810186136116a7575f80fd5b803567ffffffffffffffff8111156116bd575f80fd5b8660208284010111156116ce575f80fd5b6020918201979096509401359392505050565b5f80604083850312156116f2575f80fd5b82356116fd81611455565b9150602083013561170d81611455565b809150509250929050565b600181811c9082168061172c57607f821691505b602082108103611763577f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b50919050565b606081525f61177b60608301866113db565b73ffffffffffffffffffffffffffffffffffffffff9490941660208301525060400152919050565b601f8211156117ea57805f5260205f20601f840160051c810160208510156117c85750805b601f840160051c820191505b818110156117e7575f81556001016117d4565b50505b505050565b815167ffffffffffffffff81111561180957611809611552565b61181d816118178454611718565b846117a3565b6020601f82116001811461186e575f83156118385750848201515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600385901b1c1916600184901b1784556117e7565b5f848152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08516915b828110156118bb578785015182556020948501946001909201910161189b565b50848210156118f757868401517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600387901b60f8161c191681555b50505050600190811b01905550565b5f60208284031215611916575f80fd5b8151801515811461144e575f80fd5b73ffffffffffffffffffffffffffffffffffffffff8716815260a060208201528460a0820152848660c08301375f60c086830101525f60c07fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8801168301019050846040830152836060830152826080830152979650505050505050565b5f602082840312156119b5575f80fd5b815161144e81611455565b5f602082840312156119d0575f80fd5b5051919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b80820281158282048414176106a8576106a86119d7565b808201808211156106a8576106a86119d756fea26469706673582212206be692aa215f21df823c52c689a11caa03254730bfade7b8b36788d6a72ba61764736f6c634300081a0033" -const UNIVERSAL_GATEWAY_PC_BYTECODE = "6080806040526004361015610012575f80fd5b5f3560e01c90816301ffc9a714610f0c57508063248a9ca314610e9c5780632f2ff15d14610e2157806336568abe14610d995780633f4ba83a14610cc15780635c975abb14610c62578063720b3fbf14610a955780637f57735014610a455780638456cb591461096a5780638e6185601461084157806391d14854146107ad578063a217fddf14610775578063bdfd61ce1461058e578063c1ee135a1461053d578063d547741f146104bb578063e63ab1e9146104635763f8c8765e146100d7575f80fd5b3461045f5760807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261045f5761010e610feb565b610116610fc8565b9060443573ffffffffffffffffffffffffffffffffffffffff811680910361045f576064359173ffffffffffffffffffffffffffffffffffffffff831680930361045f577ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00549360ff8560401c16159467ffffffffffffffff811680159081610457575b600114908161044d575b159081610444575b5061041c578560017fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000008316177ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00556103c7575b5073ffffffffffffffffffffffffffffffffffffffff82161580156103a9575b80156103a1575b8015610399575b61037157610281610287926102406117b5565b6102486117b5565b6102506117b5565b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f005561027c6117b5565b611292565b50611379565b507fffffffffffffffffffffffff00000000000000000000000000000000000000005f5416175f557fffffffffffffffffffffffff000000000000000000000000000000000000000060015416176001556102de57005b7fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054167ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00557fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602060405160018152a1005b7fd92e233d000000000000000000000000000000000000000000000000000000005f5260045ffd5b50831561022d565b508215610226565b5073ffffffffffffffffffffffffffffffffffffffff81161561021f565b7fffffffffffffffffffffffffffffffffffffffffffffff0000000000000000001668010000000000000001177ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00555f6101ff565b7ff92ee8a9000000000000000000000000000000000000000000000000000000005f5260045ffd5b9050155f6101ac565b303b1591506101a4565b87915061019a565b5f80fd5b3461045f575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261045f5760206040517f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a8152f35b3461045f5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261045f5761053b6004356104f8610fc8565b90610536610531825f527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800602052600160405f20015490565b61120c565b61158f565b005b3461045f575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261045f57602073ffffffffffffffffffffffffffffffffffffffff60015416604051908152f35b3461045f5760c07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261045f5760043567ffffffffffffffff811161045f576105dd90369060040161100e565b6105e5610fc8565b9160643567ffffffffffffffff811161045f5761060690369060040161100e565b91909260a4359367ffffffffffffffff851161045f5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc863603011261045f5773ffffffffffffffffffffffffffffffffffffffff61072e61074c927fd06cdc8c91fe8c2e8750b89bd0805f8111fb1bed700d3c2a4394c3aca1993239966106f06106e2976106956116eb565b61069d61173e565b6106a561103c565b977f6569703135353a3131313535313131000000000000000000000000000000000060208a0152604051998a996101208b526101208b0190611060565b9189830360208b01526110bd565b91604435604088015273778d3206374f8ac265728e18e3fe2ae6b93e4ce46060880152606f608088015260de60a088015286830360c08801526110bd565b9661014d60e0850152838803610100850152169533956004016110fb565b0390a360017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055005b3461045f575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261045f5760206040515f8152f35b3461045f5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261045f576107e4610fc8565b6004355f527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b62680060205273ffffffffffffffffffffffffffffffffffffffff60405f2091165f52602052602060ff60405f2054166040519015158152f35b3461045f5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261045f57610878610feb565b335f9081527fb7db2dd08fcb62d0c9e08c51941cae53c267786a0b75803fb7960902fc8ef97d602052604090205460ff161561093a5773ffffffffffffffffffffffffffffffffffffffff906108cc6116eb565b1680156103715773ffffffffffffffffffffffffffffffffffffffff600154827fffffffffffffffffffffffff0000000000000000000000000000000000000000821617600155167fd0ef78509e8ed82196200827f0d10672cfab667994f990456881f413c1c475eb5f80a3005b7fe2517d3f000000000000000000000000000000000000000000000000000000005f52336004525f60245260445ffd5b3461045f575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261045f576109a0611184565b6109a86116eb565b6109b06116eb565b60017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff007fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f033005416177fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f03300557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586020604051338152a1005b3461045f575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261045f57602073ffffffffffffffffffffffffffffffffffffffff5f5416604051908152f35b3461045f5760a07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261045f5760043567ffffffffffffffff811161045f57610ae490369060040161100e565b90610aed610fc8565b916084359167ffffffffffffffff831161045f5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc843603011261045f57610b356116eb565b610b3d61173e565b610b4561103c565b7f6569703135353a31313135353131310000000000000000000000000000000000602082015260405191602083019083821067ffffffffffffffff831117610c355761072e610be994610bf773ffffffffffffffffffffffffffffffffffffffff937fd06cdc8c91fe8c2e8750b89bd0805f8111fb1bed700d3c2a4394c3aca19932399861074c966040525f84526040519889986101208a526101208a0190611060565b9188830360208a01526110bd565b90604435604087015273778d3206374f8ac265728e18e3fe2ae6b93e4ce46060870152606f608087015260de60a087015285820360c0870152611060565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b3461045f575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261045f57602060ff7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f0330054166040519015158152f35b3461045f575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261045f57610cf7611184565b610cff611697565b610d07611697565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff007fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f0330054167fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f03300557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6020604051338152a1005b3461045f5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261045f57610dd0610fc8565b3373ffffffffffffffffffffffffffffffffffffffff821603610df95761053b9060043561158f565b7f6697b232000000000000000000000000000000000000000000000000000000005f5260045ffd5b3461045f5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261045f5761053b600435610e5e610fc8565b90610e97610531825f527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800602052600160405f20015490565b61147d565b3461045f5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261045f576020610f046004355f527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800602052600160405f20015490565b604051908152f35b3461045f5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261045f57600435907fffffffff00000000000000000000000000000000000000000000000000000000821680920361045f57817f7965db0b0000000000000000000000000000000000000000000000000000000060209314908115610f9e575b5015158152f35b7f01ffc9a70000000000000000000000000000000000000000000000000000000091501483610f97565b6024359073ffffffffffffffffffffffffffffffffffffffff8216820361045f57565b6004359073ffffffffffffffffffffffffffffffffffffffff8216820361045f57565b9181601f8401121561045f5782359167ffffffffffffffff831161045f576020838186019501011161045f57565b604051906040820182811067ffffffffffffffff821117610c3557604052600f8252565b91908251928382525f5b8481106110a85750507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f845f6020809697860101520116010190565b8060208092840101518282860101520161106a565b601f82602094937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe093818652868601375f8582860101520116010190565b803573ffffffffffffffffffffffffffffffffffffffff811680910361045f57825260208101357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18236030181121561045f57016020813591019067ffffffffffffffff811161045f57803603821361045f5760408381602061118196015201916110bd565b90565b335f9081527f75442b0a96088b5456bc4ed01394c96a4feec0f883c9494257d76b96ab1c9b6b602052604090205460ff16156111bc57565b7fe2517d3f000000000000000000000000000000000000000000000000000000005f52336004527f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a60245260445ffd5b805f527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b62680060205260405f2073ffffffffffffffffffffffffffffffffffffffff33165f5260205260ff60405f205416156112635750565b7fe2517d3f000000000000000000000000000000000000000000000000000000005f523360045260245260445ffd5b73ffffffffffffffffffffffffffffffffffffffff81165f9081527fb7db2dd08fcb62d0c9e08c51941cae53c267786a0b75803fb7960902fc8ef97d602052604090205460ff166113745773ffffffffffffffffffffffffffffffffffffffff165f8181527fb7db2dd08fcb62d0c9e08c51941cae53c267786a0b75803fb7960902fc8ef97d6020526040812080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790553391907f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d8180a4600190565b505f90565b73ffffffffffffffffffffffffffffffffffffffff81165f9081527f75442b0a96088b5456bc4ed01394c96a4feec0f883c9494257d76b96ab1c9b6b602052604090205460ff166113745773ffffffffffffffffffffffffffffffffffffffff165f8181527f75442b0a96088b5456bc4ed01394c96a4feec0f883c9494257d76b96ab1c9b6b6020526040812080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790553391907f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a907f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9080a4600190565b805f527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b62680060205260405f2073ffffffffffffffffffffffffffffffffffffffff83165f5260205260ff60405f205416155f1461158957805f527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b62680060205260405f2073ffffffffffffffffffffffffffffffffffffffff83165f5260205260405f2060017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0082541617905573ffffffffffffffffffffffffffffffffffffffff339216907f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d5f80a4600190565b50505f90565b805f527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b62680060205260405f2073ffffffffffffffffffffffffffffffffffffffff83165f5260205260ff60405f2054165f1461158957805f527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b62680060205260405f2073ffffffffffffffffffffffffffffffffffffffff83165f5260205260405f207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00815416905573ffffffffffffffffffffffffffffffffffffffff339216907ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b5f80a4600190565b60ff7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f033005416156116c357565b7f8dfc202b000000000000000000000000000000000000000000000000000000005f5260045ffd5b60ff7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f03300541661171657565b7fd93c0665000000000000000000000000000000000000000000000000000000005f5260045ffd5b60027f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00541461178d5760027f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b7f3ee5aeb5000000000000000000000000000000000000000000000000000000005f5260045ffd5b60ff7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005460401c16156117e457565b7fd7e6bcf8000000000000000000000000000000000000000000000000000000005f5260045ffdfea2646970667358221220bb7a75539e61b76064a9aab2c5227e4c770c8dc2778e33d796b5ae3e5c51fb1c64736f6c634300081a0033" +const UNIVERSAL_GATEWAY_PC_BYTECODE = "6080806040526004361015610012575f80fd5b5f3560e01c90816301ffc9a714610f0a57508063248a9ca314610e9a5780632f2ff15d14610e1f57806336568abe14610d975780633f4ba83a14610cbf5780635c975abb14610c60578063718a35b014610a705780637f57735014610a205780638456cb59146109455780638e6185601461081c57806391d1485414610788578063941e1679146105c6578063a217fddf1461058e578063c1ee135a1461053d578063d547741f146104bb578063e63ab1e9146104635763f8c8765e146100d7575f80fd5b3461045f5760807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261045f5761010e610fe9565b610116610fc6565b9060443573ffffffffffffffffffffffffffffffffffffffff811680910361045f576064359173ffffffffffffffffffffffffffffffffffffffff831680930361045f577ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00549360ff8560401c16159467ffffffffffffffff811680159081610457575b600114908161044d575b159081610444575b5061041c578560017fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000008316177ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00556103c7575b5073ffffffffffffffffffffffffffffffffffffffff82161580156103a9575b80156103a1575b8015610399575b610371576102816102879261024061172a565b61024861172a565b61025061172a565b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f005561027c61172a565b611207565b506112ee565b507fffffffffffffffffffffffff00000000000000000000000000000000000000005f5416175f557fffffffffffffffffffffffff000000000000000000000000000000000000000060015416176001556102de57005b7fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054167ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00557fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602060405160018152a1005b7fd92e233d000000000000000000000000000000000000000000000000000000005f5260045ffd5b50831561022d565b508215610226565b5073ffffffffffffffffffffffffffffffffffffffff81161561021f565b7fffffffffffffffffffffffffffffffffffffffffffffff0000000000000000001668010000000000000001177ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00555f6101ff565b7ff92ee8a9000000000000000000000000000000000000000000000000000000005f5260045ffd5b9050155f6101ac565b303b1591506101a4565b87915061019a565b5f80fd5b3461045f575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261045f5760206040517f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a8152f35b3461045f5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261045f5761053b6004356104f8610fc6565b90610536610531825f527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800602052600160405f20015490565b611181565b611504565b005b3461045f575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261045f57602073ffffffffffffffffffffffffffffffffffffffff60015416604051908152f35b3461045f575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261045f5760206040515f8152f35b3461045f5760c07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261045f5760043567ffffffffffffffff811161045f5761061590369060040161100c565b9061061e610fc6565b60643567ffffffffffffffff811161045f5761063e90369060040161100c565b909160a4359373ffffffffffffffffffffffffffffffffffffffff851680950361045f577fe6350fe250f203decf959be66b79b05c66597a0e317492c141dfb4dc89692a4a9373ffffffffffffffffffffffffffffffffffffffff93610705610743936106a9611660565b6106b16116b3565b6106b961103a565b997f6569703135353a3131313535313131000000000000000000000000000000000060208c01526106f76040519b6101408d526101408d019061105e565b918b830360208d01526110bb565b9160443560408a015273778d3206374f8ac265728e18e3fe2ae6b93e4ce460608a0152606f60808a015260de60a08a015288830360c08a01526110bb565b9361014d60e0870152610100860152600361012086015216928033930390a360017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055005b3461045f5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261045f576107bf610fc6565b6004355f527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b62680060205273ffffffffffffffffffffffffffffffffffffffff60405f2091165f52602052602060ff60405f2054166040519015158152f35b3461045f5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261045f57610853610fe9565b335f9081527fb7db2dd08fcb62d0c9e08c51941cae53c267786a0b75803fb7960902fc8ef97d602052604090205460ff16156109155773ffffffffffffffffffffffffffffffffffffffff906108a7611660565b1680156103715773ffffffffffffffffffffffffffffffffffffffff600154827fffffffffffffffffffffffff0000000000000000000000000000000000000000821617600155167fd0ef78509e8ed82196200827f0d10672cfab667994f990456881f413c1c475eb5f80a3005b7fe2517d3f000000000000000000000000000000000000000000000000000000005f52336004525f60245260445ffd5b3461045f575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261045f5761097b6110f9565b610983611660565b61098b611660565b60017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff007fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f033005416177fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f03300557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586020604051338152a1005b3461045f575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261045f57602073ffffffffffffffffffffffffffffffffffffffff5f5416604051908152f35b3461045f5760a07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261045f5760043567ffffffffffffffff811161045f57610abf90369060040161100c565b90610ac8610fc6565b916084359173ffffffffffffffffffffffffffffffffffffffff831680930361045f57610af3611660565b610afb6116b3565b610b0361103a565b937f6569703135353a31313135353131310000000000000000000000000000000000602086015260405192602084019380851067ffffffffffffffff861117610c3357610bb073ffffffffffffffffffffffffffffffffffffffff94610bee937fe6350fe250f203decf959be66b79b05c66597a0e317492c141dfb4dc89692a4a976040525f8452610ba26040519a6101408c526101408c019061105e565b918a830360208c01526110bb565b90604435604089015273778d3206374f8ac265728e18e3fe2ae6b93e4ce46060890152606f608089015260de60a089015287820360c089015261105e565b9361014d60e0870152610100860152600261012086015216928033930390a360017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055005b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b3461045f575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261045f57602060ff7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f0330054166040519015158152f35b3461045f575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261045f57610cf56110f9565b610cfd61160c565b610d0561160c565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff007fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f0330054167fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f03300557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6020604051338152a1005b3461045f5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261045f57610dce610fc6565b3373ffffffffffffffffffffffffffffffffffffffff821603610df75761053b90600435611504565b7f6697b232000000000000000000000000000000000000000000000000000000005f5260045ffd5b3461045f5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261045f5761053b600435610e5c610fc6565b90610e95610531825f527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800602052600160405f20015490565b6113f2565b3461045f5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261045f576020610f026004355f527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800602052600160405f20015490565b604051908152f35b3461045f5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261045f57600435907fffffffff00000000000000000000000000000000000000000000000000000000821680920361045f57817f7965db0b0000000000000000000000000000000000000000000000000000000060209314908115610f9c575b5015158152f35b7f01ffc9a70000000000000000000000000000000000000000000000000000000091501483610f95565b6024359073ffffffffffffffffffffffffffffffffffffffff8216820361045f57565b6004359073ffffffffffffffffffffffffffffffffffffffff8216820361045f57565b9181601f8401121561045f5782359167ffffffffffffffff831161045f576020838186019501011161045f57565b604051906040820182811067ffffffffffffffff821117610c3357604052600f8252565b91908251928382525f5b8481106110a65750507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f845f6020809697860101520116010190565b80602080928401015182828601015201611068565b601f82602094937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe093818652868601375f8582860101520116010190565b335f9081527f75442b0a96088b5456bc4ed01394c96a4feec0f883c9494257d76b96ab1c9b6b602052604090205460ff161561113157565b7fe2517d3f000000000000000000000000000000000000000000000000000000005f52336004527f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a60245260445ffd5b805f527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b62680060205260405f2073ffffffffffffffffffffffffffffffffffffffff33165f5260205260ff60405f205416156111d85750565b7fe2517d3f000000000000000000000000000000000000000000000000000000005f523360045260245260445ffd5b73ffffffffffffffffffffffffffffffffffffffff81165f9081527fb7db2dd08fcb62d0c9e08c51941cae53c267786a0b75803fb7960902fc8ef97d602052604090205460ff166112e95773ffffffffffffffffffffffffffffffffffffffff165f8181527fb7db2dd08fcb62d0c9e08c51941cae53c267786a0b75803fb7960902fc8ef97d6020526040812080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790553391907f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d8180a4600190565b505f90565b73ffffffffffffffffffffffffffffffffffffffff81165f9081527f75442b0a96088b5456bc4ed01394c96a4feec0f883c9494257d76b96ab1c9b6b602052604090205460ff166112e95773ffffffffffffffffffffffffffffffffffffffff165f8181527f75442b0a96088b5456bc4ed01394c96a4feec0f883c9494257d76b96ab1c9b6b6020526040812080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790553391907f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a907f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9080a4600190565b805f527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b62680060205260405f2073ffffffffffffffffffffffffffffffffffffffff83165f5260205260ff60405f205416155f146114fe57805f527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b62680060205260405f2073ffffffffffffffffffffffffffffffffffffffff83165f5260205260405f2060017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0082541617905573ffffffffffffffffffffffffffffffffffffffff339216907f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d5f80a4600190565b50505f90565b805f527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b62680060205260405f2073ffffffffffffffffffffffffffffffffffffffff83165f5260205260ff60405f2054165f146114fe57805f527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b62680060205260405f2073ffffffffffffffffffffffffffffffffffffffff83165f5260205260405f207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00815416905573ffffffffffffffffffffffffffffffffffffffff339216907ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b5f80a4600190565b60ff7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f0330054161561163857565b7f8dfc202b000000000000000000000000000000000000000000000000000000005f5260045ffd5b60ff7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f03300541661168b57565b7fd93c0665000000000000000000000000000000000000000000000000000000005f5260045ffd5b60027f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0054146117025760027f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b7f3ee5aeb5000000000000000000000000000000000000000000000000000000005f5260045ffd5b60ff7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005460401c161561175957565b7fd7e6bcf8000000000000000000000000000000000000000000000000000000005f5260045ffdfea2646970667358221220e7a214536e314b0cefcdbd66637098a202820c2c9a023cb121eccaa7757bcb4d64736f6c634300081a0033" // GetUEAProxyBytecode returns the UEA proxy contract bytecode func GetUEAProxyBytecode() string { From 3f0a255e0ae7772f92e28decf9b8c00f3ce5140e Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Mon, 15 Dec 2025 12:57:37 +0530 Subject: [PATCH 068/120] tests: added pc chain id in the integration test setup --- test/utils/setup_app.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/utils/setup_app.go b/test/utils/setup_app.go index 2c832db5..238e89c0 100644 --- a/test/utils/setup_app.go +++ b/test/utils/setup_app.go @@ -37,6 +37,8 @@ func SetAppWithValidators(t *testing.T) (*app.ChainApp, sdk.Context, sdk.Account ctx := app.BaseApp.NewContext(true) + ctx = ctx.WithChainID("push_42101-1") + // start with block height 1 ctx = ctx.WithBlockHeight(1) @@ -64,6 +66,8 @@ func SetAppWithMultipleValidators(t *testing.T, numVals int) (*app.ChainApp, sdk ctx := app.BaseApp.NewContext(true) + ctx = ctx.WithChainID("push_42101-1") + // start with block height 1 ctx = ctx.WithBlockHeight(1) From 82aa6e532265531b9873eafeb1620f82e14de278 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Mon, 15 Dec 2025 12:57:55 +0530 Subject: [PATCH 069/120] tests: fixed executePayload test --- test/integration/uexecutor/execute_payload_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/integration/uexecutor/execute_payload_test.go b/test/integration/uexecutor/execute_payload_test.go index 60fb0c18..48ce2771 100644 --- a/test/integration/uexecutor/execute_payload_test.go +++ b/test/integration/uexecutor/execute_payload_test.go @@ -59,7 +59,7 @@ func TestExecutePayload(t *testing.T) { MaxFeePerGas: "1000000000", MaxPriorityFeePerGas: "200000000", Nonce: "1", - Deadline: "9999999999", + Deadline: "0", VType: uexecutortypes.VerificationType(0), } @@ -85,7 +85,7 @@ func TestExecutePayload(t *testing.T) { Signer: "cosmos1xpurwdecvsenyvpkxvmnge3cv93nyd34xuersef38pjnxen9xfsk2dnz8yek2drrv56qmn2ak9", UniversalAccountId: validUA, UniversalPayload: validUP, - VerificationData: "0x075bcd15", + VerificationData: "0x91987784d56359fa91c3e3e0332f4f0cffedf9c081eb12874a63b41d5b5e5c660dc827947c2ae26e658d0551ad4b2d2aa073d62691429a0ae239d2cc58055bf11c", } _, err = ms.ExecutePayload(ctx, msg) From 2249f8ddbeb8b267134961e9dc44abd24c3711fa Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Mon, 15 Dec 2025 12:58:24 +0530 Subject: [PATCH 070/120] tests: fixed initiate outbound test as per new format of UniversalTxWithdraw event --- .../uexecutor/inbound_initiated_outbound_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/integration/uexecutor/inbound_initiated_outbound_test.go b/test/integration/uexecutor/inbound_initiated_outbound_test.go index 60a832fc..5a6ceead 100644 --- a/test/integration/uexecutor/inbound_initiated_outbound_test.go +++ b/test/integration/uexecutor/inbound_initiated_outbound_test.go @@ -119,12 +119,12 @@ func setupInboundInitiatedOutboundTest(t *testing.T, numVals int) (*app.ChainApp require.NoError(t, err) // signature - validVerificationData := "0x4ac452e4e2db243b06e58d3720aeecf690c3636d9b407e1207d66c4118a1b17541a142b25108540a15b2ccbdd6dd7c16d541e3bde52679194bc76ecfad3b1fd11b" + validVerificationData := "0xad94645ee4375e1280ea95848da186e36118abf4aa0e95294e45dc9a141db30e4ed15990f75c7b02908091fc626e05c4921fb8bc5ea8fa1a62ecd001d7ce61871c" validUP := &uexecutortypes.UniversalPayload{ To: utils.GetDefaultAddresses().UniversalGatewayPCAddr.Hex(), Value: "0", - Data: "0x720b3fbf00000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4800000000000000000000000000000000000000000000000000000000000f4240000000000000000000000000000000000000000000000000000000000007a12000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000141234567890abcdef1234567890abcdef12345678000000000000000000000000000000000000000000000000f1000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000009726566756e642d6d650000000000000000000000000000000000000000000000", + Data: "0x718a35b000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4800000000000000000000000000000000000000000000000000000000000f4240000000000000000000000000000000000000000000000000000000000007a1200000000000000000000000001234567890abcdef1234567890abcdef1234567800000000000000000000000000000000000000000000000000000000000000141234567890abcdef1234567890abcdef12345678000000000000000000000000", GasLimit: "21000000", MaxFeePerGas: "1000000000", MaxPriorityFeePerGas: "200000000", @@ -189,7 +189,7 @@ func TestInboundInitiatedOutbound(t *testing.T) { // checks require.Equal(t, "0x1234567890abcdef1234567890abcdef12345678", out.Recipient) require.Equal(t, "1000000", out.Amount) - require.Equal(t, uexecutortypes.TxType_FUNDS_AND_PAYLOAD, out.TxType) + require.Equal(t, uexecutortypes.TxType_FUNDS, out.TxType) require.Equal(t, uexecutortypes.Status_PENDING, out.OutboundStatus) }) } From 0da6a0a65d23d25957350b264022f7e64f4df335 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Mon, 15 Dec 2025 12:58:44 +0530 Subject: [PATCH 071/120] tests: added tests for checking if revert outbound is getting created --- .../inbound_synthetic_bridge_test.go | 80 +++++++++++++++++++ 1 file changed, 80 insertions(+) diff --git a/test/integration/uexecutor/inbound_synthetic_bridge_test.go b/test/integration/uexecutor/inbound_synthetic_bridge_test.go index 1fff6f09..1b3059d8 100644 --- a/test/integration/uexecutor/inbound_synthetic_bridge_test.go +++ b/test/integration/uexecutor/inbound_synthetic_bridge_test.go @@ -119,6 +119,9 @@ func setupInboundBridgeTest(t *testing.T, numVals int) (*app.ChainApp, sdk.Conte TxType: uexecutortypes.TxType_FUNDS, UniversalPayload: nil, VerificationData: "", + RevertInstructions: &uexecutortypes.RevertInstructions{ + FundRecipient: testAddress, + }, } return app, ctx, universalVals, inbound, validators @@ -360,4 +363,81 @@ func TestInboundSyntheticBridge(t *testing.T) { } t.Logf("All %d pc_tx.tx_hash values are unique", len(txHashes)) }) + + t.Run("creates outbound revert when pre-deposit step fails", func(t *testing.T) { + app, ctx, vals, inbound, coreVals := setupInboundBridgeTest(t, 4) + + // --- Remove token config to force pre-deposit failure + app.UregistryKeeper.RemoveTokenConfig(ctx, inbound.SourceChain, inbound.AssetAddr) + + // reach quorum + for i := 0; i < 3; i++ { + valAddr, err := sdk.ValAddressFromBech32(coreVals[i].OperatorAddress) + require.NoError(t, err) + coreValAcc := sdk.AccAddress(valAddr).String() + + err = utils.ExecVoteInbound(t, ctx, app, vals[i], coreValAcc, inbound) + require.NoError(t, err) + } + + // Fetch universal tx + q := uexecutorkeeper.Querier{Keeper: app.UexecutorKeeper} + resp, err := q.GetUniversalTx( + sdk.WrapSDKContext(ctx), + &uexecutortypes.QueryGetUniversalTxRequest{ + Id: uexecutortypes.GetInboundUniversalTxKey(*inbound), + }, + ) + require.NoError(t, err) + require.NotNil(t, resp.UniversalTx) + + // --- Assert outbound revert exists + foundRevert := false + for _, ob := range resp.UniversalTx.OutboundTx { + if ob.TxType == uexecutortypes.TxType_INBOUND_REVERT { + foundRevert = true + require.Equal(t, inbound.SourceChain, ob.DestinationChain) + require.Equal(t, inbound.Amount, ob.Amount) + require.Equal(t, inbound.AssetAddr, ob.AssetAddr) + } + } + + require.True(t, foundRevert, "expected INBOUND_REVERT outbound to be created") + }) + + t.Run("does not create outbound revert on successful inbound execution", func(t *testing.T) { + app, ctx, vals, inbound, coreVals := setupInboundBridgeTest(t, 4) + + // reach quorum (happy path) + for i := 0; i < 3; i++ { + valAddr, err := sdk.ValAddressFromBech32(coreVals[i].OperatorAddress) + require.NoError(t, err) + coreValAcc := sdk.AccAddress(valAddr).String() + + err = utils.ExecVoteInbound(t, ctx, app, vals[i], coreValAcc, inbound) + require.NoError(t, err) + } + + // Fetch universal tx + q := uexecutorkeeper.Querier{Keeper: app.UexecutorKeeper} + resp, err := q.GetUniversalTx( + sdk.WrapSDKContext(ctx), + &uexecutortypes.QueryGetUniversalTxRequest{ + Id: uexecutortypes.GetInboundUniversalTxKey(*inbound), + }, + ) + require.NoError(t, err) + require.NotNil(t, resp.UniversalTx) + + // --- Assert NO inbound revert exists + for _, ob := range resp.UniversalTx.OutboundTx { + require.NotEqual( + t, + uexecutortypes.TxType_INBOUND_REVERT, + ob.TxType, + "should not create inbound revert on successful execution", + ) + } + }) + } From c161720d2761af7ea25da57f6c27ee969f0922e9 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Mon, 15 Dec 2025 12:59:20 +0530 Subject: [PATCH 072/120] feat: modified UniversalTxWithdrawEvent signature in uexecutor module --- x/uexecutor/types/constants.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/uexecutor/types/constants.go b/x/uexecutor/types/constants.go index 02b6f7e7..91ba7b8b 100644 --- a/x/uexecutor/types/constants.go +++ b/x/uexecutor/types/constants.go @@ -43,5 +43,5 @@ const ( ) var UniversalTxWithdrawEventSig = crypto.Keccak256Hash([]byte( - "UniversalTxWithdraw(address,string,address,bytes,uint256,address,uint256,uint256,bytes,uint256,(address,bytes))", + "UniversalTxWithdraw(address,string,address,bytes,uint256,address,uint256,uint256,bytes,uint256,address,uint8)", )).Hex() From 7065bc90905c87fddc2ffbfe32cd1db28ccb1793 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Mon, 15 Dec 2025 16:40:07 +0530 Subject: [PATCH 073/120] feat: added REVERTED in outbound status --- proto/uexecutor/v1/types.proto | 2 ++ 1 file changed, 2 insertions(+) diff --git a/proto/uexecutor/v1/types.proto b/proto/uexecutor/v1/types.proto index dea73186..5f9b104d 100644 --- a/proto/uexecutor/v1/types.proto +++ b/proto/uexecutor/v1/types.proto @@ -66,6 +66,7 @@ enum Status { UNSPECIFIED = 0; PENDING = 1; OBSERVED = 2; + REVERTED = 3; } enum TxType { @@ -123,6 +124,7 @@ message OutboundObservation { bool success = 1; // whether execution succeeded uint64 block_height = 2; // block height on external chain string tx_hash = 3; // external chain tx hash + string error_msg = 4; } message OriginatingPcTx { From 3b7cf3a24379d266912777e0e7bb28f1a06f55cf Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Mon, 15 Dec 2025 16:40:45 +0530 Subject: [PATCH 074/120] chore: added generated protobuf --- api/uexecutor/v1/types.pulsar.go | 307 +++++++++++++++++++------------ 1 file changed, 192 insertions(+), 115 deletions(-) diff --git a/api/uexecutor/v1/types.pulsar.go b/api/uexecutor/v1/types.pulsar.go index c75a101e..22ac9209 100644 --- a/api/uexecutor/v1/types.pulsar.go +++ b/api/uexecutor/v1/types.pulsar.go @@ -4095,6 +4095,7 @@ var ( fd_OutboundObservation_success protoreflect.FieldDescriptor fd_OutboundObservation_block_height protoreflect.FieldDescriptor fd_OutboundObservation_tx_hash protoreflect.FieldDescriptor + fd_OutboundObservation_error_msg protoreflect.FieldDescriptor ) func init() { @@ -4103,6 +4104,7 @@ func init() { fd_OutboundObservation_success = md_OutboundObservation.Fields().ByName("success") fd_OutboundObservation_block_height = md_OutboundObservation.Fields().ByName("block_height") fd_OutboundObservation_tx_hash = md_OutboundObservation.Fields().ByName("tx_hash") + fd_OutboundObservation_error_msg = md_OutboundObservation.Fields().ByName("error_msg") } var _ protoreflect.Message = (*fastReflection_OutboundObservation)(nil) @@ -4188,6 +4190,12 @@ func (x *fastReflection_OutboundObservation) Range(f func(protoreflect.FieldDesc return } } + if x.ErrorMsg != "" { + value := protoreflect.ValueOfString(x.ErrorMsg) + if !f(fd_OutboundObservation_error_msg, value) { + return + } + } } // Has reports whether a field is populated. @@ -4209,6 +4217,8 @@ func (x *fastReflection_OutboundObservation) Has(fd protoreflect.FieldDescriptor return x.BlockHeight != uint64(0) case "uexecutor.v1.OutboundObservation.tx_hash": return x.TxHash != "" + case "uexecutor.v1.OutboundObservation.error_msg": + return x.ErrorMsg != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.OutboundObservation")) @@ -4231,6 +4241,8 @@ func (x *fastReflection_OutboundObservation) Clear(fd protoreflect.FieldDescript x.BlockHeight = uint64(0) case "uexecutor.v1.OutboundObservation.tx_hash": x.TxHash = "" + case "uexecutor.v1.OutboundObservation.error_msg": + x.ErrorMsg = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.OutboundObservation")) @@ -4256,6 +4268,9 @@ func (x *fastReflection_OutboundObservation) Get(descriptor protoreflect.FieldDe case "uexecutor.v1.OutboundObservation.tx_hash": value := x.TxHash return protoreflect.ValueOfString(value) + case "uexecutor.v1.OutboundObservation.error_msg": + value := x.ErrorMsg + return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.OutboundObservation")) @@ -4282,6 +4297,8 @@ func (x *fastReflection_OutboundObservation) Set(fd protoreflect.FieldDescriptor x.BlockHeight = value.Uint() case "uexecutor.v1.OutboundObservation.tx_hash": x.TxHash = value.Interface().(string) + case "uexecutor.v1.OutboundObservation.error_msg": + x.ErrorMsg = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.OutboundObservation")) @@ -4308,6 +4325,8 @@ func (x *fastReflection_OutboundObservation) Mutable(fd protoreflect.FieldDescri panic(fmt.Errorf("field block_height of message uexecutor.v1.OutboundObservation is not mutable")) case "uexecutor.v1.OutboundObservation.tx_hash": panic(fmt.Errorf("field tx_hash of message uexecutor.v1.OutboundObservation is not mutable")) + case "uexecutor.v1.OutboundObservation.error_msg": + panic(fmt.Errorf("field error_msg of message uexecutor.v1.OutboundObservation is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.OutboundObservation")) @@ -4327,6 +4346,8 @@ func (x *fastReflection_OutboundObservation) NewField(fd protoreflect.FieldDescr return protoreflect.ValueOfUint64(uint64(0)) case "uexecutor.v1.OutboundObservation.tx_hash": return protoreflect.ValueOfString("") + case "uexecutor.v1.OutboundObservation.error_msg": + return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: uexecutor.v1.OutboundObservation")) @@ -4406,6 +4427,10 @@ func (x *fastReflection_OutboundObservation) ProtoMethods() *protoiface.Methods if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } + l = len(x.ErrorMsg) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -4435,6 +4460,13 @@ func (x *fastReflection_OutboundObservation) ProtoMethods() *protoiface.Methods i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } + if len(x.ErrorMsg) > 0 { + i -= len(x.ErrorMsg) + copy(dAtA[i:], x.ErrorMsg) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ErrorMsg))) + i-- + dAtA[i] = 0x22 + } if len(x.TxHash) > 0 { i -= len(x.TxHash) copy(dAtA[i:], x.TxHash) @@ -4577,6 +4609,38 @@ func (x *fastReflection_OutboundObservation) ProtoMethods() *protoiface.Methods } x.TxHash = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 4: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ErrorMsg", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.ErrorMsg = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -7335,6 +7399,7 @@ const ( Status_UNSPECIFIED Status = 0 Status_PENDING Status = 1 Status_OBSERVED Status = 2 + Status_REVERTED Status = 3 ) // Enum value maps for Status. @@ -7343,11 +7408,13 @@ var ( 0: "UNSPECIFIED", 1: "PENDING", 2: "OBSERVED", + 3: "REVERTED", } Status_value = map[string]int32{ "UNSPECIFIED": 0, "PENDING": 1, "OBSERVED": 2, + "REVERTED": 3, } ) @@ -7860,6 +7927,7 @@ type OutboundObservation struct { Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` // whether execution succeeded BlockHeight uint64 `protobuf:"varint,2,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` // block height on external chain TxHash string `protobuf:"bytes,3,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` // external chain tx hash + ErrorMsg string `protobuf:"bytes,4,opt,name=error_msg,json=errorMsg,proto3" json:"error_msg,omitempty"` } func (x *OutboundObservation) Reset() { @@ -7903,6 +7971,13 @@ func (x *OutboundObservation) GetTxHash() string { return "" } +func (x *OutboundObservation) GetErrorMsg() string { + if x != nil { + return x.ErrorMsg + } + return "" +} + type OriginatingPcTx struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -8246,127 +8321,129 @@ var file_uexecutor_v1_types_proto_rawDesc = []byte{ 0x73, 0x67, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x73, 0x67, 0x3a, 0x1c, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x0f, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2f, 0x70, 0x63, 0x5f, 0x74, 0x78, - 0x22, 0x94, 0x01, 0x0a, 0x13, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x4f, 0x62, 0x73, + 0x22, 0xb1, 0x01, 0x0a, 0x13, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, 0x3a, 0x27, - 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x1e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, - 0x6f, 0x72, 0x2f, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x6f, 0x62, 0x73, 0x65, - 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x6d, 0x0a, 0x0f, 0x4f, 0x72, 0x69, 0x67, 0x69, - 0x6e, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x63, 0x54, 0x78, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x78, - 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x78, 0x48, - 0x61, 0x73, 0x68, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x6f, 0x67, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x6f, 0x67, 0x49, 0x6e, 0x64, 0x65, 0x78, - 0x3a, 0x24, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x1b, 0x75, 0x65, 0x78, 0x65, 0x63, - 0x75, 0x74, 0x6f, 0x72, 0x2f, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6e, 0x67, - 0x5f, 0x70, 0x63, 0x5f, 0x74, 0x78, 0x22, 0x8e, 0x05, 0x0a, 0x0a, 0x4f, 0x75, 0x74, 0x62, 0x6f, - 0x75, 0x6e, 0x64, 0x54, 0x78, 0x12, 0x2b, 0x0a, 0x11, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x10, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x61, - 0x69, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, - 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x73, 0x73, 0x65, - 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x73, - 0x73, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, - 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, - 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x67, 0x61, 0x73, - 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x67, 0x61, - 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x2d, 0x0a, 0x07, 0x74, 0x78, 0x5f, 0x74, 0x79, 0x70, - 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, - 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x78, 0x54, 0x79, 0x70, 0x65, 0x52, 0x06, 0x74, - 0x78, 0x54, 0x79, 0x70, 0x65, 0x12, 0x32, 0x0a, 0x05, 0x70, 0x63, 0x5f, 0x74, 0x78, 0x18, 0x09, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, - 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x50, - 0x63, 0x54, 0x78, 0x52, 0x04, 0x70, 0x63, 0x54, 0x78, 0x12, 0x42, 0x0a, 0x0b, 0x6f, 0x62, 0x73, - 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, 0x74, 0x78, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, - 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x75, - 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x0a, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x54, 0x78, 0x12, 0x0e, 0x0a, - 0x02, 0x69, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x3d, 0x0a, - 0x0f, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, - 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0e, 0x6f, 0x75, - 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x51, 0x0a, 0x13, - 0x72, 0x65, 0x76, 0x65, 0x72, 0x74, 0x5f, 0x69, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x75, 0x65, 0x78, 0x65, - 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x76, 0x65, 0x72, 0x74, 0x49, - 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x12, 0x72, 0x65, 0x76, - 0x65, 0x72, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, - 0x42, 0x0a, 0x13, 0x70, 0x63, 0x5f, 0x72, 0x65, 0x76, 0x65, 0x72, 0x74, 0x5f, 0x65, 0x78, 0x65, - 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x75, - 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x43, 0x54, 0x78, - 0x52, 0x11, 0x70, 0x63, 0x52, 0x65, 0x76, 0x65, 0x72, 0x74, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, - 0x69, 0x6f, 0x6e, 0x3a, 0x22, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, - 0x2a, 0x15, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2f, 0x6f, 0x75, 0x74, 0x62, - 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x74, 0x78, 0x22, 0xa8, 0x02, 0x0a, 0x0b, 0x55, 0x6e, 0x69, 0x76, - 0x65, 0x72, 0x73, 0x61, 0x6c, 0x54, 0x78, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x34, 0x0a, 0x0a, 0x69, 0x6e, 0x62, 0x6f, 0x75, - 0x6e, 0x64, 0x5f, 0x74, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x75, 0x65, - 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x62, 0x6f, 0x75, - 0x6e, 0x64, 0x52, 0x09, 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x54, 0x78, 0x12, 0x27, 0x0a, - 0x05, 0x70, 0x63, 0x5f, 0x74, 0x78, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x75, - 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x43, 0x54, 0x78, - 0x52, 0x04, 0x70, 0x63, 0x54, 0x78, 0x12, 0x39, 0x0a, 0x0b, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, - 0x6e, 0x64, 0x5f, 0x74, 0x78, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x75, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, 0x12, 0x1b, + 0x0a, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x6d, 0x73, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x08, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x73, 0x67, 0x3a, 0x27, 0xe8, 0xa0, 0x1f, + 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x1e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2f, + 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x6d, 0x0a, 0x0f, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x74, + 0x69, 0x6e, 0x67, 0x50, 0x63, 0x54, 0x78, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x78, 0x5f, 0x68, 0x61, + 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, + 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x6f, 0x67, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x6f, 0x67, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x3a, 0x24, 0xe8, + 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x1b, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, + 0x72, 0x2f, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x63, + 0x5f, 0x74, 0x78, 0x22, 0x8e, 0x05, 0x0a, 0x0a, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, + 0x54, 0x78, 0x12, 0x2b, 0x0a, 0x11, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x64, + 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, + 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x16, 0x0a, + 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, + 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x61, + 0x64, 0x64, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x73, 0x73, 0x65, 0x74, + 0x41, 0x64, 0x64, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, + 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, + 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x67, 0x61, 0x73, 0x5f, 0x6c, 0x69, + 0x6d, 0x69, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x67, 0x61, 0x73, 0x4c, 0x69, + 0x6d, 0x69, 0x74, 0x12, 0x2d, 0x0a, 0x07, 0x74, 0x78, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x08, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, + 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x78, 0x54, 0x79, 0x70, 0x65, 0x52, 0x06, 0x74, 0x78, 0x54, 0x79, + 0x70, 0x65, 0x12, 0x32, 0x0a, 0x05, 0x70, 0x63, 0x5f, 0x74, 0x78, 0x18, 0x09, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1d, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, + 0x2e, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x63, 0x54, 0x78, + 0x52, 0x04, 0x70, 0x63, 0x54, 0x78, 0x12, 0x42, 0x0a, 0x0b, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, + 0x65, 0x64, 0x5f, 0x74, 0x78, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x75, 0x74, 0x62, 0x6f, - 0x75, 0x6e, 0x64, 0x54, 0x78, 0x52, 0x0a, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x54, - 0x78, 0x12, 0x4a, 0x0a, 0x10, 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x5f, 0x73, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x75, 0x65, - 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x69, 0x76, 0x65, - 0x72, 0x73, 0x61, 0x6c, 0x54, 0x78, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0f, 0x75, 0x6e, - 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x3a, 0x23, 0x98, - 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x16, 0x75, 0x65, 0x78, 0x65, - 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2f, 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x5f, - 0x74, 0x78, 0x2a, 0x47, 0x0a, 0x10, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x12, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, - 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x10, 0x00, 0x12, 0x1b, - 0x0a, 0x17, 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x54, 0x78, 0x56, 0x65, 0x72, - 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x10, 0x01, 0x2a, 0x83, 0x02, 0x0a, 0x11, - 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x54, 0x78, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x12, 0x23, 0x0a, 0x1f, 0x55, 0x4e, 0x49, 0x56, 0x45, 0x52, 0x53, 0x41, 0x4c, 0x5f, 0x54, - 0x58, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, - 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x49, 0x4e, 0x42, 0x4f, 0x55, 0x4e, - 0x44, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x01, 0x12, 0x1d, 0x0a, 0x19, 0x50, - 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x49, 0x4e, 0x42, 0x4f, 0x55, 0x4e, 0x44, 0x5f, 0x45, - 0x58, 0x45, 0x43, 0x55, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x02, 0x12, 0x17, 0x0a, 0x13, 0x50, 0x43, - 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x45, 0x44, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, - 0x53, 0x10, 0x03, 0x12, 0x16, 0x0a, 0x12, 0x50, 0x43, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, - 0x45, 0x44, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x04, 0x12, 0x15, 0x0a, 0x11, 0x50, - 0x43, 0x5f, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x52, 0x45, 0x56, 0x45, 0x52, 0x54, - 0x10, 0x05, 0x12, 0x14, 0x0a, 0x10, 0x4f, 0x55, 0x54, 0x42, 0x4f, 0x55, 0x4e, 0x44, 0x5f, 0x50, - 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x06, 0x12, 0x14, 0x0a, 0x10, 0x4f, 0x55, 0x54, 0x42, - 0x4f, 0x55, 0x4e, 0x44, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x07, 0x12, 0x13, - 0x0a, 0x0f, 0x4f, 0x55, 0x54, 0x42, 0x4f, 0x55, 0x4e, 0x44, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, - 0x44, 0x10, 0x08, 0x12, 0x0c, 0x0a, 0x08, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x45, 0x44, 0x10, - 0x09, 0x2a, 0x34, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0f, 0x0a, 0x0b, 0x55, - 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, - 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x4f, 0x42, 0x53, - 0x45, 0x52, 0x56, 0x45, 0x44, 0x10, 0x02, 0x2a, 0x7d, 0x0a, 0x06, 0x54, 0x78, 0x54, 0x79, 0x70, - 0x65, 0x12, 0x12, 0x0a, 0x0e, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, - 0x5f, 0x54, 0x58, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x47, 0x41, 0x53, 0x10, 0x01, 0x12, 0x13, - 0x0a, 0x0f, 0x47, 0x41, 0x53, 0x5f, 0x41, 0x4e, 0x44, 0x5f, 0x50, 0x41, 0x59, 0x4c, 0x4f, 0x41, - 0x44, 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x46, 0x55, 0x4e, 0x44, 0x53, 0x10, 0x03, 0x12, 0x15, - 0x0a, 0x11, 0x46, 0x55, 0x4e, 0x44, 0x53, 0x5f, 0x41, 0x4e, 0x44, 0x5f, 0x50, 0x41, 0x59, 0x4c, - 0x4f, 0x41, 0x44, 0x10, 0x04, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x41, 0x59, 0x4c, 0x4f, 0x41, 0x44, - 0x10, 0x05, 0x12, 0x12, 0x0a, 0x0e, 0x49, 0x4e, 0x42, 0x4f, 0x55, 0x4e, 0x44, 0x5f, 0x52, 0x45, - 0x56, 0x45, 0x52, 0x54, 0x10, 0x06, 0x42, 0xb2, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x75, - 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x54, 0x79, 0x70, - 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x41, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, - 0x70, 0x75, 0x73, 0x68, 0x2d, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2d, 0x6e, 0x6f, 0x64, 0x65, 0x2f, - 0x61, 0x70, 0x69, 0x2f, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x31, - 0x3b, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x55, - 0x58, 0x58, 0xaa, 0x02, 0x0c, 0x55, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x56, - 0x31, 0xca, 0x02, 0x0c, 0x55, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x5c, 0x56, 0x31, - 0xe2, 0x02, 0x18, 0x55, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x5c, 0x56, 0x31, 0x5c, - 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0d, 0x55, 0x65, - 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x75, 0x6e, 0x64, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, + 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x54, 0x78, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, + 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x3d, 0x0a, 0x0f, 0x6f, 0x75, + 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x0c, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, + 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0e, 0x6f, 0x75, 0x74, 0x62, 0x6f, + 0x75, 0x6e, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x51, 0x0a, 0x13, 0x72, 0x65, 0x76, + 0x65, 0x72, 0x74, 0x5f, 0x69, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x76, 0x65, 0x72, 0x74, 0x49, 0x6e, 0x73, 0x74, + 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x12, 0x72, 0x65, 0x76, 0x65, 0x72, 0x74, + 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x42, 0x0a, 0x13, + 0x70, 0x63, 0x5f, 0x72, 0x65, 0x76, 0x65, 0x72, 0x74, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x75, 0x65, 0x78, 0x65, + 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x43, 0x54, 0x78, 0x52, 0x11, 0x70, + 0x63, 0x52, 0x65, 0x76, 0x65, 0x72, 0x74, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, + 0x3a, 0x22, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x15, 0x75, + 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2f, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, + 0x64, 0x5f, 0x74, 0x78, 0x22, 0xa8, 0x02, 0x0a, 0x0b, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, + 0x61, 0x6c, 0x54, 0x78, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x02, 0x69, 0x64, 0x12, 0x34, 0x0a, 0x0a, 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, + 0x74, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, + 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x52, + 0x09, 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x54, 0x78, 0x12, 0x27, 0x0a, 0x05, 0x70, 0x63, + 0x5f, 0x74, 0x78, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x75, 0x65, 0x78, 0x65, + 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x43, 0x54, 0x78, 0x52, 0x04, 0x70, + 0x63, 0x54, 0x78, 0x12, 0x39, 0x0a, 0x0b, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, + 0x74, 0x78, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, + 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, + 0x54, 0x78, 0x52, 0x0a, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x54, 0x78, 0x12, 0x4a, + 0x0a, 0x10, 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, + 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, + 0x6c, 0x54, 0x78, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0f, 0x75, 0x6e, 0x69, 0x76, 0x65, + 0x72, 0x73, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x3a, 0x23, 0x98, 0xa0, 0x1f, 0x00, + 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x16, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x6f, 0x72, 0x2f, 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x5f, 0x74, 0x78, 0x2a, + 0x47, 0x0a, 0x10, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, + 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x12, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x56, 0x65, 0x72, + 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x10, 0x00, 0x12, 0x1b, 0x0a, 0x17, 0x75, + 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x54, 0x78, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x10, 0x01, 0x2a, 0x83, 0x02, 0x0a, 0x11, 0x55, 0x6e, 0x69, + 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x54, 0x78, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x23, + 0x0a, 0x1f, 0x55, 0x4e, 0x49, 0x56, 0x45, 0x52, 0x53, 0x41, 0x4c, 0x5f, 0x54, 0x58, 0x5f, 0x53, + 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, + 0x44, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x49, 0x4e, 0x42, 0x4f, 0x55, 0x4e, 0x44, 0x5f, 0x53, + 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x01, 0x12, 0x1d, 0x0a, 0x19, 0x50, 0x45, 0x4e, 0x44, + 0x49, 0x4e, 0x47, 0x5f, 0x49, 0x4e, 0x42, 0x4f, 0x55, 0x4e, 0x44, 0x5f, 0x45, 0x58, 0x45, 0x43, + 0x55, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x02, 0x12, 0x17, 0x0a, 0x13, 0x50, 0x43, 0x5f, 0x45, 0x58, + 0x45, 0x43, 0x55, 0x54, 0x45, 0x44, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x03, + 0x12, 0x16, 0x0a, 0x12, 0x50, 0x43, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x45, 0x44, 0x5f, + 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x04, 0x12, 0x15, 0x0a, 0x11, 0x50, 0x43, 0x5f, 0x50, + 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x52, 0x45, 0x56, 0x45, 0x52, 0x54, 0x10, 0x05, 0x12, + 0x14, 0x0a, 0x10, 0x4f, 0x55, 0x54, 0x42, 0x4f, 0x55, 0x4e, 0x44, 0x5f, 0x50, 0x45, 0x4e, 0x44, + 0x49, 0x4e, 0x47, 0x10, 0x06, 0x12, 0x14, 0x0a, 0x10, 0x4f, 0x55, 0x54, 0x42, 0x4f, 0x55, 0x4e, + 0x44, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x07, 0x12, 0x13, 0x0a, 0x0f, 0x4f, + 0x55, 0x54, 0x42, 0x4f, 0x55, 0x4e, 0x44, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x08, + 0x12, 0x0c, 0x0a, 0x08, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x45, 0x44, 0x10, 0x09, 0x2a, 0x42, + 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0f, 0x0a, 0x0b, 0x55, 0x4e, 0x53, 0x50, + 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x45, 0x4e, + 0x44, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x4f, 0x42, 0x53, 0x45, 0x52, 0x56, + 0x45, 0x44, 0x10, 0x02, 0x12, 0x0c, 0x0a, 0x08, 0x52, 0x45, 0x56, 0x45, 0x52, 0x54, 0x45, 0x44, + 0x10, 0x03, 0x2a, 0x7d, 0x0a, 0x06, 0x54, 0x78, 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x0e, + 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x5f, 0x54, 0x58, 0x10, 0x00, + 0x12, 0x07, 0x0a, 0x03, 0x47, 0x41, 0x53, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x47, 0x41, 0x53, + 0x5f, 0x41, 0x4e, 0x44, 0x5f, 0x50, 0x41, 0x59, 0x4c, 0x4f, 0x41, 0x44, 0x10, 0x02, 0x12, 0x09, + 0x0a, 0x05, 0x46, 0x55, 0x4e, 0x44, 0x53, 0x10, 0x03, 0x12, 0x15, 0x0a, 0x11, 0x46, 0x55, 0x4e, + 0x44, 0x53, 0x5f, 0x41, 0x4e, 0x44, 0x5f, 0x50, 0x41, 0x59, 0x4c, 0x4f, 0x41, 0x44, 0x10, 0x04, + 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x41, 0x59, 0x4c, 0x4f, 0x41, 0x44, 0x10, 0x05, 0x12, 0x12, 0x0a, + 0x0e, 0x49, 0x4e, 0x42, 0x4f, 0x55, 0x4e, 0x44, 0x5f, 0x52, 0x45, 0x56, 0x45, 0x52, 0x54, 0x10, + 0x06, 0x42, 0xb2, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, + 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x41, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x70, 0x75, 0x73, 0x68, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x2d, + 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2d, 0x6e, 0x6f, 0x64, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x75, + 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x31, 0x3b, 0x75, 0x65, 0x78, 0x65, + 0x63, 0x75, 0x74, 0x6f, 0x72, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x55, 0x58, 0x58, 0xaa, 0x02, 0x0c, + 0x55, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0c, 0x55, + 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x18, 0x55, 0x65, + 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0d, 0x55, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x6f, 0x72, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( From a5139fb7194deff42488fc1317e40097cc21a743 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Mon, 15 Dec 2025 16:41:40 +0530 Subject: [PATCH 075/120] tests: added helpers in integration tests for outbound voting --- .../inbound_initiated_outbound_test.go | 12 +++++- test/utils/helpers.go | 41 +++++++++++++++++++ 2 files changed, 51 insertions(+), 2 deletions(-) diff --git a/test/integration/uexecutor/inbound_initiated_outbound_test.go b/test/integration/uexecutor/inbound_initiated_outbound_test.go index 5a6ceead..72a7f067 100644 --- a/test/integration/uexecutor/inbound_initiated_outbound_test.go +++ b/test/integration/uexecutor/inbound_initiated_outbound_test.go @@ -105,6 +105,13 @@ func setupInboundInitiatedOutboundTest(t *testing.T, numVals int) (*app.ChainApp // SaveGrant takes (ctx, grantee, granter, authz.Authorization, *time.Time) err = app.AuthzKeeper.SaveGrant(ctx, uniValAddr, coreValAddr, auth, &exp) require.NoError(t, err) + + // Define grant for MsgVoteOutbound + outboundAuth := authz.NewGenericAuthorization( + sdk.MsgTypeURL(&uexecutortypes.MsgVoteOutbound{}), + ) + err = app.AuthzKeeper.SaveGrant(ctx, uniValAddr, coreValAddr, outboundAuth, &exp) + require.NoError(t, err) } validUA := &uexecutortypes.UniversalAccountId{ @@ -119,12 +126,12 @@ func setupInboundInitiatedOutboundTest(t *testing.T, numVals int) (*app.ChainApp require.NoError(t, err) // signature - validVerificationData := "0xad94645ee4375e1280ea95848da186e36118abf4aa0e95294e45dc9a141db30e4ed15990f75c7b02908091fc626e05c4921fb8bc5ea8fa1a62ecd001d7ce61871c" + validVerificationData := "0x928958fffec8ca9ea8505ed154615be009ecf0818586aed9cd9d6c8b92fcf0e304bdf26b3cdb3317adfc2251bae109ddcf3e4a93deeec137d5ff662ec7ff3c221b" validUP := &uexecutortypes.UniversalPayload{ To: utils.GetDefaultAddresses().UniversalGatewayPCAddr.Hex(), Value: "0", - Data: "0x718a35b000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4800000000000000000000000000000000000000000000000000000000000f4240000000000000000000000000000000000000000000000000000000000007a1200000000000000000000000001234567890abcdef1234567890abcdef1234567800000000000000000000000000000000000000000000000000000000000000141234567890abcdef1234567890abcdef12345678000000000000000000000000", + Data: "0x718a35b000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000e0600000000000000000000000000000000000000000000000000000000000f4240000000000000000000000000000000000000000000000000000000000007a1200000000000000000000000001234567890abcdef1234567890abcdef1234567800000000000000000000000000000000000000000000000000000000000000141234567890abcdef1234567890abcdef12345678000000000000000000000000", GasLimit: "21000000", MaxFeePerGas: "1000000000", MaxPriorityFeePerGas: "200000000", @@ -189,6 +196,7 @@ func TestInboundInitiatedOutbound(t *testing.T) { // checks require.Equal(t, "0x1234567890abcdef1234567890abcdef12345678", out.Recipient) require.Equal(t, "1000000", out.Amount) + require.Equal(t, "0x0000000000000000000000000000000000000e06", out.AssetAddr) require.Equal(t, uexecutortypes.TxType_FUNDS, out.TxType) require.Equal(t, uexecutortypes.Status_PENDING, out.OutboundStatus) }) diff --git a/test/utils/helpers.go b/test/utils/helpers.go index 83c45c7a..4472bfff 100644 --- a/test/utils/helpers.go +++ b/test/utils/helpers.go @@ -1,10 +1,12 @@ package utils import ( + "fmt" "testing" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/pushchain/push-chain-node/app" + "github.com/stretchr/testify/require" uexecutortypes "github.com/pushchain/push-chain-node/x/uexecutor/types" @@ -37,6 +39,45 @@ func ExecVoteInbound( return err } +func ExecVoteOutbound( + t *testing.T, + ctx sdk.Context, + app *app.ChainApp, + universalAddr string, // universal validator (grantee) + coreValAddr string, // core validator (signer) + utxId string, // universal tx id + outbound *uexecutortypes.OutboundTx, + success bool, + errorMsg string, +) error { + t.Helper() + + // Encode the real outbound tx_id (this is what validators vote on) + txIDHex, err := uexecutortypes.EncodeOutboundTxIDHex(utxId, outbound.Id) + require.NoError(t, err) + + observed := &uexecutortypes.OutboundObservation{ + Success: success, + ErrorMsg: errorMsg, + TxHash: fmt.Sprintf("0xobserved-%s", outbound.Id), + BlockHeight: 1, + } + + msg := &uexecutortypes.MsgVoteOutbound{ + Signer: coreValAddr, + TxId: txIDHex, + ObservedTx: observed, + } + + execMsg := authz.NewMsgExec( + sdk.MustAccAddressFromBech32(universalAddr), + []sdk.Msg{msg}, + ) + + _, err = app.AuthzKeeper.Exec(ctx, &execMsg) + return err +} + // ExecVoteGasPrice executes a MsgVoteGasPrice on behalf of the core validator // through the universal validator using authz Exec. func ExecVoteGasPrice( From 8b655ca3ce07c59a34c65d01e1f7c5a2a9a4eebc Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Mon, 15 Dec 2025 16:42:57 +0530 Subject: [PATCH 076/120] feat: modified outbound voting behavior to revert if already finalised --- x/uexecutor/keeper/msg_vote_outbound.go | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/x/uexecutor/keeper/msg_vote_outbound.go b/x/uexecutor/keeper/msg_vote_outbound.go index cc59c314..7abbcdf2 100644 --- a/x/uexecutor/keeper/msg_vote_outbound.go +++ b/x/uexecutor/keeper/msg_vote_outbound.go @@ -2,6 +2,7 @@ package keeper import ( "context" + "fmt" "cosmossdk.io/errors" sdk "github.com/cosmos/cosmos-sdk/types" @@ -45,8 +46,8 @@ func (k Keeper) VoteOutbound( } // Prevent double-finalization - if outbound.OutboundStatus == types.Status_OBSERVED { - return nil + if outbound.OutboundStatus != types.Status_PENDING { + return fmt.Errorf("outbound with key %s is already finalized", outboundId) } // Use temp context to prevent partial writes @@ -80,10 +81,8 @@ func (k Keeper) VoteOutbound( return err } - // Step 6: Finalize outbound (refund if failed) - if err := k.FinalizeOutbound(ctx, utxId, outbound); err != nil { - return err - } + // Step 6: Finalize outbound (refund if failed) - Don't return error + _ = k.FinalizeOutbound(ctx, utxId, outbound) return nil } From 818870ac12ffe7c43627cc904c7854699672767c Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Mon, 15 Dec 2025 16:43:27 +0530 Subject: [PATCH 077/120] feat: added MsgVoteOutbound msg in gasless --- x/uexecutor/types/gasless.go | 1 + 1 file changed, 1 insertion(+) diff --git a/x/uexecutor/types/gasless.go b/x/uexecutor/types/gasless.go index 08fb24db..fe8ecd90 100644 --- a/x/uexecutor/types/gasless.go +++ b/x/uexecutor/types/gasless.go @@ -17,6 +17,7 @@ func IsGaslessTx(tx sdk.Tx) bool { sdk.MsgTypeURL(&MsgDeployUEA{}), sdk.MsgTypeURL(&MsgMintPC{}), sdk.MsgTypeURL(&MsgVoteInbound{}), + sdk.MsgTypeURL(&MsgVoteOutbound{}), sdk.MsgTypeURL(&MsgVoteGasPrice{}), } ) From 4145eec4fddb5eb915b6f6159beb29b50cd97e74 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Mon, 15 Dec 2025 16:43:42 +0530 Subject: [PATCH 078/120] chore: added generated protobuf --- x/uexecutor/types/types.pb.go | 242 +++++++++++++++++++++------------- 1 file changed, 150 insertions(+), 92 deletions(-) diff --git a/x/uexecutor/types/types.pb.go b/x/uexecutor/types/types.pb.go index f677d75b..0ce76679 100644 --- a/x/uexecutor/types/types.pb.go +++ b/x/uexecutor/types/types.pb.go @@ -105,18 +105,21 @@ const ( Status_UNSPECIFIED Status = 0 Status_PENDING Status = 1 Status_OBSERVED Status = 2 + Status_REVERTED Status = 3 ) var Status_name = map[int32]string{ 0: "UNSPECIFIED", 1: "PENDING", 2: "OBSERVED", + 3: "REVERTED", } var Status_value = map[string]int32{ "UNSPECIFIED": 0, "PENDING": 1, "OBSERVED": 2, + "REVERTED": 3, } func (x Status) String() string { @@ -633,6 +636,7 @@ type OutboundObservation struct { Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` BlockHeight uint64 `protobuf:"varint,2,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` TxHash string `protobuf:"bytes,3,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` + ErrorMsg string `protobuf:"bytes,4,opt,name=error_msg,json=errorMsg,proto3" json:"error_msg,omitempty"` } func (m *OutboundObservation) Reset() { *m = OutboundObservation{} } @@ -689,6 +693,13 @@ func (m *OutboundObservation) GetTxHash() string { return "" } +func (m *OutboundObservation) GetErrorMsg() string { + if m != nil { + return m.ErrorMsg + } + return "" +} + type OriginatingPcTx struct { TxHash string `protobuf:"bytes,1,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` LogIndex string `protobuf:"bytes,2,opt,name=log_index,json=logIndex,proto3" json:"log_index,omitempty"` @@ -983,98 +994,99 @@ func init() { func init() { proto.RegisterFile("uexecutor/v1/types.proto", fileDescriptor_fab6d3ca71d1e2a5) } var fileDescriptor_fab6d3ca71d1e2a5 = []byte{ - // 1450 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x57, 0x3b, 0x6f, 0xdb, 0xd6, - 0x17, 0x37, 0xf5, 0xd6, 0x91, 0x63, 0x51, 0xd7, 0x76, 0xc2, 0x3c, 0x2c, 0x3b, 0xca, 0x3f, 0xff, - 0x18, 0x2e, 0x62, 0x23, 0x69, 0x1a, 0xa0, 0x02, 0x3a, 0xc8, 0x92, 0xec, 0xa8, 0x75, 0x25, 0x95, - 0x92, 0x8c, 0xb4, 0xcb, 0xc5, 0x35, 0x79, 0x43, 0x11, 0x95, 0x48, 0x81, 0x0f, 0x95, 0x1e, 0x3a, - 0x75, 0xeb, 0x50, 0x74, 0xe8, 0x90, 0x31, 0x63, 0xc7, 0x7e, 0x8c, 0x8c, 0x19, 0x0b, 0x74, 0x29, - 0x92, 0xa1, 0x05, 0xfa, 0x25, 0x8a, 0x7b, 0x49, 0x8a, 0xa4, 0x6c, 0x07, 0x6d, 0x97, 0x98, 0xe7, - 0xfd, 0xfa, 0x9d, 0x73, 0x23, 0x90, 0x5c, 0xea, 0x51, 0xc5, 0x75, 0x4c, 0xeb, 0x60, 0xfe, 0xe8, - 0xc0, 0x39, 0x9f, 0x51, 0x7b, 0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0xd5, 0x53, 0x4d, 0x77, 0xc6, 0xee, 0xd9, 0xbe, 0x62, 0x4e, 0x0f, - 0x66, 0xae, 0x3d, 0xe6, 0xb7, 0x9c, 0x7f, 0x3d, 0xe4, 0x9f, 0x0f, 0x0d, 0x53, 0xa5, 0x07, 0xde, - 0x41, 0x04, 0x2e, 0xfe, 0x9b, 0xe5, 0x2c, 0xc7, 0x7f, 0x7d, 0x7c, 0xf8, 0x77, 0x00, 0x00, 0x00, - 0xff, 0xff, 0x3f, 0xd0, 0x71, 0xd8, 0xd0, 0x0c, 0x00, 0x00, + // 1461 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x57, 0x4b, 0x6f, 0xdb, 0x46, + 0x10, 0x36, 0xf5, 0xd6, 0xc8, 0xb1, 0xa8, 0xb5, 0x9d, 0x30, 0x0f, 0xcb, 0x8e, 0xd2, 0x34, 0x86, + 0x8b, 0xd8, 0x48, 0xda, 0x06, 0xa8, 0x80, 0x1e, 0x64, 0x89, 0x76, 0xd4, 0xba, 0x92, 0x4a, 0x49, + 0x46, 0xda, 0xcb, 0x62, 0x4d, 0x6e, 0x24, 0xa2, 0x12, 0x29, 0xf0, 0xa1, 0xd2, 0x87, 0x9e, 0x7a, + 0xeb, 0xa1, 0xe8, 0x31, 0xc7, 0x1c, 0x7b, 0x6c, 0xff, 0x45, 0x8e, 0x39, 0x16, 0xe8, 0xa5, 0x48, + 0x0e, 0x2d, 0xd0, 0x3f, 0x51, 0xec, 0x92, 0x14, 0x49, 0xd9, 0x0e, 0xda, 0x5e, 0x24, 0xce, 0x63, + 0x67, 0xbf, 0x99, 0xf9, 0x66, 0x28, 0x81, 0xe4, 0x52, 0x8f, 0xaa, 0xae, 0x63, 0x5a, 0x07, 0xf3, + 0x47, 0x07, 0xce, 0xf9, 0x8c, 0xda, 0xfb, 0x33, 0xcb, 0x74, 0x4c, 0xb4, 0xba, 0xb0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 0x7e, 0x7b, 0x5b, 0x5d, 0xf9, + 0xfa, 0xc9, 0x48, 0x77, 0xc6, 0xee, 0xd9, 0xbe, 0x6a, 0x4e, 0x0f, 0x66, 0xae, 0x3d, 0xe6, 0x9b, + 0x9d, 0x3f, 0x3d, 0xe4, 0x8f, 0x0f, 0x0d, 0x53, 0xa3, 0x07, 0xde, 0x41, 0x44, 0x35, 0xfe, 0xf7, + 0xe6, 0x2c, 0xc7, 0xff, 0xa8, 0x7c, 0xf8, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x13, 0x7e, 0xb5, + 0xc7, 0xfb, 0x0c, 0x00, 0x00, } func (this *Params) Equal(that interface{}) bool { @@ -1324,6 +1336,9 @@ func (this *OutboundObservation) Equal(that interface{}) bool { if this.TxHash != that1.TxHash { return false } + if this.ErrorMsg != that1.ErrorMsg { + return false + } return true } func (this *OriginatingPcTx) Equal(that interface{}) bool { @@ -1842,6 +1857,13 @@ func (m *OutboundObservation) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.ErrorMsg) > 0 { + i -= len(m.ErrorMsg) + copy(dAtA[i:], m.ErrorMsg) + i = encodeVarintTypes(dAtA, i, uint64(len(m.ErrorMsg))) + i-- + dAtA[i] = 0x22 + } if len(m.TxHash) > 0 { i -= len(m.TxHash) copy(dAtA[i:], m.TxHash) @@ -2316,6 +2338,10 @@ func (m *OutboundObservation) Size() (n int) { if l > 0 { n += 1 + l + sovTypes(uint64(l)) } + l = len(m.ErrorMsg) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } return n } @@ -3773,6 +3799,38 @@ func (m *OutboundObservation) Unmarshal(dAtA []byte) error { } m.TxHash = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ErrorMsg", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ErrorMsg = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTypes(dAtA[iNdEx:]) From 9d23828b88d59b895e4447a826d332a1eb4b8eb3 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Mon, 15 Dec 2025 16:44:34 +0530 Subject: [PATCH 079/120] feat: added revert outbound feature --- x/uexecutor/keeper/outbound.go | 53 ++++++++++++++++++++++++++++------ 1 file changed, 44 insertions(+), 9 deletions(-) diff --git a/x/uexecutor/keeper/outbound.go b/x/uexecutor/keeper/outbound.go index 592b8aea..6ca4322b 100644 --- a/x/uexecutor/keeper/outbound.go +++ b/x/uexecutor/keeper/outbound.go @@ -3,7 +3,10 @@ package keeper import ( "context" "fmt" + "math/big" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/ethereum/go-ethereum/common" "github.com/pushchain/push-chain-node/x/uexecutor/types" ) @@ -41,12 +44,7 @@ func (k Keeper) FinalizeOutbound(ctx context.Context, utxId string, outbound typ } obs := outbound.ObservedTx - if obs == nil { - return nil - } - - // If outbound succeeded -> nothing to do - if obs.Success { + if obs == nil || obs.Success { return nil } @@ -56,8 +54,45 @@ func (k Keeper) FinalizeOutbound(ctx context.Context, utxId string, outbound typ return nil } - // Parse amount and mint as per revert Instruction - // TODO + sdkCtx := sdk.UnwrapSDKContext(ctx) + + // Decide refund recipient safely + recipient := outbound.Sender + if outbound.RevertInstructions != nil && + outbound.RevertInstructions.FundRecipient != "" { + recipient = outbound.RevertInstructions.FundRecipient + } + + // Mint tokens back + amount := new(big.Int) + amount, ok := amount.SetString(outbound.Amount, 10) + if !ok { + return fmt.Errorf("invalid amount: %s", outbound.Amount) + } + receipt, err := k.CallPRC20Deposit(sdkCtx, common.HexToAddress(outbound.AssetAddr), common.HexToAddress(recipient), amount) + + // Update outbound status + outbound.OutboundStatus = types.Status_REVERTED + + pcTx := types.PCTx{ + TxHash: "", // no hash if depositPRC20 failed + Sender: outbound.Sender, + GasUsed: 0, + BlockHeight: uint64(sdkCtx.BlockHeight()), + } + + if err != nil { + pcTx.Status = "FAILED" + pcTx.ErrorMsg = err.Error() + } else { + pcTx.TxHash = receipt.Hash + pcTx.GasUsed = receipt.GasUsed + pcTx.Status = "SUCCESS" + pcTx.ErrorMsg = "" + } + + outbound.PcRevertExecution = &pcTx + // Store Reverted tx in Outbound - return nil + return k.UpdateOutbound(ctx, utxId, outbound) } From b8831b5497cb57e3edefe3460279519cc6b4c9bb Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Mon, 15 Dec 2025 16:45:15 +0530 Subject: [PATCH 080/120] tests: added tests for revert in a outbound failure observation --- .../uexecutor/vote_outbound_test.go | 290 ++++++++++++++++++ 1 file changed, 290 insertions(+) create mode 100644 test/integration/uexecutor/vote_outbound_test.go diff --git a/test/integration/uexecutor/vote_outbound_test.go b/test/integration/uexecutor/vote_outbound_test.go new file mode 100644 index 00000000..a9479420 --- /dev/null +++ b/test/integration/uexecutor/vote_outbound_test.go @@ -0,0 +1,290 @@ +package integrationtest + +import ( + "fmt" + "testing" + "time" + + sdk "github.com/cosmos/cosmos-sdk/types" + authz "github.com/cosmos/cosmos-sdk/x/authz" + stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + "github.com/stretchr/testify/require" + + "github.com/pushchain/push-chain-node/app" + utils "github.com/pushchain/push-chain-node/test/utils" + uexecutortypes "github.com/pushchain/push-chain-node/x/uexecutor/types" +) + +func setupOutboundVotingTest( + t *testing.T, + numVals int, +) ( + *app.ChainApp, + sdk.Context, + []string, // universal validators + string, // utxId + *uexecutortypes.OutboundTx, // outbound + []stakingtypes.Validator, // core validators +) { + + app, ctx, universalVals, inbound, coreVals, _ := + setupInboundInitiatedOutboundTest(t, numVals) + + // reach quorum for inbound + for i := 0; i < 3; i++ { + valAddr, err := sdk.ValAddressFromBech32(coreVals[i].OperatorAddress) + require.NoError(t, err) + + coreAcc := sdk.AccAddress(valAddr).String() + err = utils.ExecVoteInbound( + t, + ctx, + app, + universalVals[i], + coreAcc, + inbound, + ) + require.NoError(t, err) + } + + utxId := uexecutortypes.GetInboundUniversalTxKey(*inbound) + + utx, found, err := app.UexecutorKeeper.GetUniversalTx(ctx, utxId) + require.NoError(t, err) + require.True(t, found) + require.Len(t, utx.OutboundTx, 1) + + return app, ctx, universalVals, utxId, utx.OutboundTx[0], coreVals +} + +func TestOutboundVoting(t *testing.T) { + + t.Run("less than quorum outbound votes keeps outbound pending", func(t *testing.T) { + app, ctx, vals, utxId, outbound, coreVals := + setupOutboundVotingTest(t, 4) + + // grant authz for outbound voting + for i, val := range coreVals { + accAddr, err := sdk.ValAddressFromBech32(val.OperatorAddress) + require.NoError(t, err) + + coreAcc := sdk.AccAddress(accAddr) + uniAcc := sdk.MustAccAddressFromBech32(vals[i]) + + auth := authz.NewGenericAuthorization( + sdk.MsgTypeURL(&uexecutortypes.MsgVoteOutbound{}), + ) + exp := ctx.BlockTime().Add(time.Hour) + + err = app.AuthzKeeper.SaveGrant(ctx, uniAcc, coreAcc, auth, &exp) + require.NoError(t, err) + } + + // only 1 vote + valAddr, _ := sdk.ValAddressFromBech32(coreVals[0].OperatorAddress) + coreAcc := sdk.AccAddress(valAddr).String() + + err := utils.ExecVoteOutbound( + t, + ctx, + app, + vals[0], + coreAcc, + utxId, + outbound, + true, + "", + ) + require.NoError(t, err) + + utx, _, err := app.UexecutorKeeper.GetUniversalTx(ctx, utxId) + require.NoError(t, err) + require.Equal( + t, + uexecutortypes.Status_PENDING, + utx.OutboundTx[0].OutboundStatus, + ) + }) + + t.Run("quorum reached finalizes outbound successfully", func(t *testing.T) { + app, ctx, vals, utxId, outbound, coreVals := + setupOutboundVotingTest(t, 4) + + for i := 0; i < 3; i++ { + valAddr, err := sdk.ValAddressFromBech32(coreVals[i].OperatorAddress) + require.NoError(t, err) + + coreAcc := sdk.AccAddress(valAddr).String() + err = utils.ExecVoteOutbound( + t, + ctx, + app, + vals[i], + coreAcc, + utxId, + outbound, + true, + "", + ) + require.NoError(t, err) + } + + utx, _, err := app.UexecutorKeeper.GetUniversalTx(ctx, utxId) + require.NoError(t, err) + + ob := utx.OutboundTx[0] + require.Equal(t, uexecutortypes.Status_OBSERVED, ob.OutboundStatus) + require.NotNil(t, ob.ObservedTx) + require.True(t, ob.ObservedTx.Success) + }) + + t.Run("duplicate outbound vote fails", func(t *testing.T) { + app, ctx, vals, utxId, outbound, coreVals := + setupOutboundVotingTest(t, 4) + + valAddr, _ := sdk.ValAddressFromBech32(coreVals[0].OperatorAddress) + coreAcc := sdk.AccAddress(valAddr).String() + + err := utils.ExecVoteOutbound( + t, + ctx, + app, + vals[0], + coreAcc, + utxId, + outbound, + true, + "", + ) + require.NoError(t, err) + + err = utils.ExecVoteOutbound( + t, + ctx, + app, + vals[0], + coreAcc, + utxId, + outbound, + true, + "", + ) + require.Error(t, err) + require.Contains(t, err.Error(), "already voted") + }) + + t.Run("vote after outbound finalized fails", func(t *testing.T) { + app, ctx, vals, utxId, outbound, coreVals := + setupOutboundVotingTest(t, 4) + + // finalize + for i := 0; i < 3; i++ { + valAddr, _ := sdk.ValAddressFromBech32(coreVals[i].OperatorAddress) + coreAcc := sdk.AccAddress(valAddr).String() + + err := utils.ExecVoteOutbound( + t, + ctx, + app, + vals[i], + coreAcc, + utxId, + outbound, + true, + "", + ) + require.NoError(t, err) + } + + // extra vote + valAddr, _ := sdk.ValAddressFromBech32(coreVals[3].OperatorAddress) + coreAcc := sdk.AccAddress(valAddr).String() + + err := utils.ExecVoteOutbound( + t, + ctx, + app, + vals[3], + coreAcc, + utxId, + outbound, + true, + "", + ) + require.Error(t, err) + require.Contains(t, err.Error(), "already finalized") + }) + + t.Run("outbound failure triggers revert execution", func(t *testing.T) { + app, ctx, vals, utxId, outbound, coreVals := + setupOutboundVotingTest(t, 4) + + // Reach quorum with FAILED observation + for i := 0; i < 3; i++ { + valAddr, _ := sdk.ValAddressFromBech32(coreVals[i].OperatorAddress) + coreAcc := sdk.AccAddress(valAddr).String() + + err := utils.ExecVoteOutbound( + t, + ctx, + app, + vals[i], + coreAcc, + utxId, + outbound, + false, + "execution reverted", // revert reason + ) + require.NoError(t, err) + } + + utx, _, err := app.UexecutorKeeper.GetUniversalTx(ctx, utxId) + require.NoError(t, err) + + fmt.Println(utx) + + ob := utx.OutboundTx[0] + + require.Equal(t, uexecutortypes.Status_REVERTED, ob.OutboundStatus) + require.NotNil(t, ob.PcRevertExecution) + + pc := ob.PcRevertExecution + require.Equal(t, "SUCCESS", pc.Status) + require.NotEmpty(t, pc.TxHash) + }) + + t.Run("revert recipient defaults to sender when revert instructions missing", func(t *testing.T) { + app, ctx, vals, utxId, outbound, coreVals := + setupOutboundVotingTest(t, 4) + + // explicitly remove revert instructions + outbound.RevertInstructions = nil + + for i := 0; i < 3; i++ { + valAddr, _ := sdk.ValAddressFromBech32(coreVals[i].OperatorAddress) + coreAcc := sdk.AccAddress(valAddr).String() + + err := utils.ExecVoteOutbound( + t, + ctx, + app, + vals[i], + coreAcc, + utxId, + outbound, + false, + "failed", + ) + require.NoError(t, err) + } + + utx, _, err := app.UexecutorKeeper.GetUniversalTx(ctx, utxId) + require.NoError(t, err) + + ob := utx.OutboundTx[0] + + require.Equal(t, uexecutortypes.Status_REVERTED, ob.OutboundStatus) + require.Equal(t, outbound.Sender, ob.PcRevertExecution.Sender) + }) + +} From 0aa7a0fd8671eec01152605f94a2fb1f76998388 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Tue, 16 Dec 2025 16:35:56 +0530 Subject: [PATCH 081/120] feat: modified outbound proto msg --- proto/uexecutor/v1/types.proto | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/proto/uexecutor/v1/types.proto b/proto/uexecutor/v1/types.proto index 5f9b104d..0e223320 100644 --- a/proto/uexecutor/v1/types.proto +++ b/proto/uexecutor/v1/types.proto @@ -143,17 +143,18 @@ message OutboundTx { string destination_chain = 1; // chain where this outbound is sent string recipient = 2; // recipient on destination chain string amount = 3; // token amount - string asset_addr = 4; // token contract if applicable - string sender = 5; // sender of the outbound tx - string payload = 6; // payload to be executed - string gas_limit = 7; // gas limit to be used for the outbound tx - TxType tx_type = 8; // outbound tx type - OriginatingPcTx pc_tx = 9; // pc_tx that originated the outbound - OutboundObservation observed_tx = 10; // observed tx on destination chain - string id = 11; // id of outbound tx - Status outbound_status = 12; // status of outbound tx - RevertInstructions revert_instructions = 13; - PCTx pc_revert_execution = 14; + string external_asset_addr = 4; // asset addr destination chain + string prc20_asset_addr = 5; // prc20 contract addr + string sender = 6; // sender of the outbound tx + string payload = 7; // payload to be executed + string gas_limit = 8; // gas limit to be used for the outbound tx + TxType tx_type = 9; // outbound tx type + OriginatingPcTx pc_tx = 10; // pc_tx that originated the outbound + OutboundObservation observed_tx = 11; // observed tx on destination chain + string id = 12; // id of outbound tx + Status outbound_status = 13; // status of outbound tx + RevertInstructions revert_instructions = 14; + PCTx pc_revert_execution = 15; } message UniversalTx { From 21fae13ff42d7af5f1e5488b9b1a52cc0da44c76 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Tue, 16 Dec 2025 16:36:26 +0530 Subject: [PATCH 082/120] chore: added generated protobuf --- api/uexecutor/v1/types.pulsar.go | 382 ++++++++++++++++++------------- 1 file changed, 229 insertions(+), 153 deletions(-) diff --git a/api/uexecutor/v1/types.pulsar.go b/api/uexecutor/v1/types.pulsar.go index 22ac9209..191ca5f8 100644 --- a/api/uexecutor/v1/types.pulsar.go +++ b/api/uexecutor/v1/types.pulsar.go @@ -5165,7 +5165,8 @@ var ( fd_OutboundTx_destination_chain protoreflect.FieldDescriptor fd_OutboundTx_recipient protoreflect.FieldDescriptor fd_OutboundTx_amount protoreflect.FieldDescriptor - fd_OutboundTx_asset_addr protoreflect.FieldDescriptor + fd_OutboundTx_external_asset_addr protoreflect.FieldDescriptor + fd_OutboundTx_prc20_asset_addr protoreflect.FieldDescriptor fd_OutboundTx_sender protoreflect.FieldDescriptor fd_OutboundTx_payload protoreflect.FieldDescriptor fd_OutboundTx_gas_limit protoreflect.FieldDescriptor @@ -5184,7 +5185,8 @@ func init() { fd_OutboundTx_destination_chain = md_OutboundTx.Fields().ByName("destination_chain") fd_OutboundTx_recipient = md_OutboundTx.Fields().ByName("recipient") fd_OutboundTx_amount = md_OutboundTx.Fields().ByName("amount") - fd_OutboundTx_asset_addr = md_OutboundTx.Fields().ByName("asset_addr") + fd_OutboundTx_external_asset_addr = md_OutboundTx.Fields().ByName("external_asset_addr") + fd_OutboundTx_prc20_asset_addr = md_OutboundTx.Fields().ByName("prc20_asset_addr") fd_OutboundTx_sender = md_OutboundTx.Fields().ByName("sender") fd_OutboundTx_payload = md_OutboundTx.Fields().ByName("payload") fd_OutboundTx_gas_limit = md_OutboundTx.Fields().ByName("gas_limit") @@ -5280,9 +5282,15 @@ func (x *fastReflection_OutboundTx) Range(f func(protoreflect.FieldDescriptor, p return } } - if x.AssetAddr != "" { - value := protoreflect.ValueOfString(x.AssetAddr) - if !f(fd_OutboundTx_asset_addr, value) { + if x.ExternalAssetAddr != "" { + value := protoreflect.ValueOfString(x.ExternalAssetAddr) + if !f(fd_OutboundTx_external_asset_addr, value) { + return + } + } + if x.Prc20AssetAddr != "" { + value := protoreflect.ValueOfString(x.Prc20AssetAddr) + if !f(fd_OutboundTx_prc20_asset_addr, value) { return } } @@ -5367,8 +5375,10 @@ func (x *fastReflection_OutboundTx) Has(fd protoreflect.FieldDescriptor) bool { return x.Recipient != "" case "uexecutor.v1.OutboundTx.amount": return x.Amount != "" - case "uexecutor.v1.OutboundTx.asset_addr": - return x.AssetAddr != "" + case "uexecutor.v1.OutboundTx.external_asset_addr": + return x.ExternalAssetAddr != "" + case "uexecutor.v1.OutboundTx.prc20_asset_addr": + return x.Prc20AssetAddr != "" case "uexecutor.v1.OutboundTx.sender": return x.Sender != "" case "uexecutor.v1.OutboundTx.payload": @@ -5411,8 +5421,10 @@ func (x *fastReflection_OutboundTx) Clear(fd protoreflect.FieldDescriptor) { x.Recipient = "" case "uexecutor.v1.OutboundTx.amount": x.Amount = "" - case "uexecutor.v1.OutboundTx.asset_addr": - x.AssetAddr = "" + case "uexecutor.v1.OutboundTx.external_asset_addr": + x.ExternalAssetAddr = "" + case "uexecutor.v1.OutboundTx.prc20_asset_addr": + x.Prc20AssetAddr = "" case "uexecutor.v1.OutboundTx.sender": x.Sender = "" case "uexecutor.v1.OutboundTx.payload": @@ -5458,8 +5470,11 @@ func (x *fastReflection_OutboundTx) Get(descriptor protoreflect.FieldDescriptor) case "uexecutor.v1.OutboundTx.amount": value := x.Amount return protoreflect.ValueOfString(value) - case "uexecutor.v1.OutboundTx.asset_addr": - value := x.AssetAddr + case "uexecutor.v1.OutboundTx.external_asset_addr": + value := x.ExternalAssetAddr + return protoreflect.ValueOfString(value) + case "uexecutor.v1.OutboundTx.prc20_asset_addr": + value := x.Prc20AssetAddr return protoreflect.ValueOfString(value) case "uexecutor.v1.OutboundTx.sender": value := x.Sender @@ -5517,8 +5532,10 @@ func (x *fastReflection_OutboundTx) Set(fd protoreflect.FieldDescriptor, value p x.Recipient = value.Interface().(string) case "uexecutor.v1.OutboundTx.amount": x.Amount = value.Interface().(string) - case "uexecutor.v1.OutboundTx.asset_addr": - x.AssetAddr = value.Interface().(string) + case "uexecutor.v1.OutboundTx.external_asset_addr": + x.ExternalAssetAddr = value.Interface().(string) + case "uexecutor.v1.OutboundTx.prc20_asset_addr": + x.Prc20AssetAddr = value.Interface().(string) case "uexecutor.v1.OutboundTx.sender": x.Sender = value.Interface().(string) case "uexecutor.v1.OutboundTx.payload": @@ -5585,8 +5602,10 @@ func (x *fastReflection_OutboundTx) Mutable(fd protoreflect.FieldDescriptor) pro panic(fmt.Errorf("field recipient of message uexecutor.v1.OutboundTx is not mutable")) case "uexecutor.v1.OutboundTx.amount": panic(fmt.Errorf("field amount of message uexecutor.v1.OutboundTx is not mutable")) - case "uexecutor.v1.OutboundTx.asset_addr": - panic(fmt.Errorf("field asset_addr of message uexecutor.v1.OutboundTx is not mutable")) + case "uexecutor.v1.OutboundTx.external_asset_addr": + panic(fmt.Errorf("field external_asset_addr of message uexecutor.v1.OutboundTx is not mutable")) + case "uexecutor.v1.OutboundTx.prc20_asset_addr": + panic(fmt.Errorf("field prc20_asset_addr of message uexecutor.v1.OutboundTx is not mutable")) case "uexecutor.v1.OutboundTx.sender": panic(fmt.Errorf("field sender of message uexecutor.v1.OutboundTx is not mutable")) case "uexecutor.v1.OutboundTx.payload": @@ -5618,7 +5637,9 @@ func (x *fastReflection_OutboundTx) NewField(fd protoreflect.FieldDescriptor) pr return protoreflect.ValueOfString("") case "uexecutor.v1.OutboundTx.amount": return protoreflect.ValueOfString("") - case "uexecutor.v1.OutboundTx.asset_addr": + case "uexecutor.v1.OutboundTx.external_asset_addr": + return protoreflect.ValueOfString("") + case "uexecutor.v1.OutboundTx.prc20_asset_addr": return protoreflect.ValueOfString("") case "uexecutor.v1.OutboundTx.sender": return protoreflect.ValueOfString("") @@ -5725,7 +5746,11 @@ func (x *fastReflection_OutboundTx) ProtoMethods() *protoiface.Methods { if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - l = len(x.AssetAddr) + l = len(x.ExternalAssetAddr) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Prc20AssetAddr) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } @@ -5808,7 +5833,7 @@ func (x *fastReflection_OutboundTx) ProtoMethods() *protoiface.Methods { copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- - dAtA[i] = 0x72 + dAtA[i] = 0x7a } if x.RevertInstructions != nil { encoded, err := options.Marshal(x.RevertInstructions) @@ -5822,19 +5847,19 @@ func (x *fastReflection_OutboundTx) ProtoMethods() *protoiface.Methods { copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- - dAtA[i] = 0x6a + dAtA[i] = 0x72 } if x.OutboundStatus != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.OutboundStatus)) i-- - dAtA[i] = 0x60 + dAtA[i] = 0x68 } if len(x.Id) > 0 { i -= len(x.Id) copy(dAtA[i:], x.Id) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Id))) i-- - dAtA[i] = 0x5a + dAtA[i] = 0x62 } if x.ObservedTx != nil { encoded, err := options.Marshal(x.ObservedTx) @@ -5848,7 +5873,7 @@ func (x *fastReflection_OutboundTx) ProtoMethods() *protoiface.Methods { copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- - dAtA[i] = 0x52 + dAtA[i] = 0x5a } if x.PcTx != nil { encoded, err := options.Marshal(x.PcTx) @@ -5862,38 +5887,45 @@ func (x *fastReflection_OutboundTx) ProtoMethods() *protoiface.Methods { copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- - dAtA[i] = 0x4a + dAtA[i] = 0x52 } if x.TxType != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.TxType)) i-- - dAtA[i] = 0x40 + dAtA[i] = 0x48 } if len(x.GasLimit) > 0 { i -= len(x.GasLimit) copy(dAtA[i:], x.GasLimit) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.GasLimit))) i-- - dAtA[i] = 0x3a + dAtA[i] = 0x42 } if len(x.Payload) > 0 { i -= len(x.Payload) copy(dAtA[i:], x.Payload) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Payload))) i-- - dAtA[i] = 0x32 + dAtA[i] = 0x3a } if len(x.Sender) > 0 { i -= len(x.Sender) copy(dAtA[i:], x.Sender) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Sender))) i-- + dAtA[i] = 0x32 + } + if len(x.Prc20AssetAddr) > 0 { + i -= len(x.Prc20AssetAddr) + copy(dAtA[i:], x.Prc20AssetAddr) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Prc20AssetAddr))) + i-- dAtA[i] = 0x2a } - if len(x.AssetAddr) > 0 { - i -= len(x.AssetAddr) - copy(dAtA[i:], x.AssetAddr) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AssetAddr))) + if len(x.ExternalAssetAddr) > 0 { + i -= len(x.ExternalAssetAddr) + copy(dAtA[i:], x.ExternalAssetAddr) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ExternalAssetAddr))) i-- dAtA[i] = 0x22 } @@ -6065,7 +6097,7 @@ func (x *fastReflection_OutboundTx) ProtoMethods() *protoiface.Methods { iNdEx = postIndex case 4: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AssetAddr", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ExternalAssetAddr", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -6093,9 +6125,41 @@ func (x *fastReflection_OutboundTx) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.AssetAddr = string(dAtA[iNdEx:postIndex]) + x.ExternalAssetAddr = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 5: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Prc20AssetAddr", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Prc20AssetAddr = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) } @@ -6127,7 +6191,7 @@ func (x *fastReflection_OutboundTx) ProtoMethods() *protoiface.Methods { } x.Sender = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 6: + case 7: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) } @@ -6159,7 +6223,7 @@ func (x *fastReflection_OutboundTx) ProtoMethods() *protoiface.Methods { } x.Payload = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 7: + case 8: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field GasLimit", wireType) } @@ -6191,7 +6255,7 @@ func (x *fastReflection_OutboundTx) ProtoMethods() *protoiface.Methods { } x.GasLimit = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 8: + case 9: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TxType", wireType) } @@ -6210,7 +6274,7 @@ func (x *fastReflection_OutboundTx) ProtoMethods() *protoiface.Methods { break } } - case 9: + case 10: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PcTx", wireType) } @@ -6246,7 +6310,7 @@ func (x *fastReflection_OutboundTx) ProtoMethods() *protoiface.Methods { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex - case 10: + case 11: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ObservedTx", wireType) } @@ -6282,7 +6346,7 @@ func (x *fastReflection_OutboundTx) ProtoMethods() *protoiface.Methods { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex - case 11: + case 12: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) } @@ -6314,7 +6378,7 @@ func (x *fastReflection_OutboundTx) ProtoMethods() *protoiface.Methods { } x.Id = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 12: + case 13: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field OutboundStatus", wireType) } @@ -6333,7 +6397,7 @@ func (x *fastReflection_OutboundTx) ProtoMethods() *protoiface.Methods { break } } - case 13: + case 14: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RevertInstructions", wireType) } @@ -6369,7 +6433,7 @@ func (x *fastReflection_OutboundTx) ProtoMethods() *protoiface.Methods { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex - case 14: + case 15: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PcRevertExecution", wireType) } @@ -8029,17 +8093,18 @@ type OutboundTx struct { DestinationChain string `protobuf:"bytes,1,opt,name=destination_chain,json=destinationChain,proto3" json:"destination_chain,omitempty"` // chain where this outbound is sent Recipient string `protobuf:"bytes,2,opt,name=recipient,proto3" json:"recipient,omitempty"` // recipient on destination chain Amount string `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount,omitempty"` // token amount - AssetAddr string `protobuf:"bytes,4,opt,name=asset_addr,json=assetAddr,proto3" json:"asset_addr,omitempty"` // token contract if applicable - Sender string `protobuf:"bytes,5,opt,name=sender,proto3" json:"sender,omitempty"` // sender of the outbound tx - Payload string `protobuf:"bytes,6,opt,name=payload,proto3" json:"payload,omitempty"` // payload to be executed - GasLimit string `protobuf:"bytes,7,opt,name=gas_limit,json=gasLimit,proto3" json:"gas_limit,omitempty"` // gas limit to be used for the outbound tx - TxType TxType `protobuf:"varint,8,opt,name=tx_type,json=txType,proto3,enum=uexecutor.v1.TxType" json:"tx_type,omitempty"` // outbound tx type - PcTx *OriginatingPcTx `protobuf:"bytes,9,opt,name=pc_tx,json=pcTx,proto3" json:"pc_tx,omitempty"` // pc_tx that originated the outbound - ObservedTx *OutboundObservation `protobuf:"bytes,10,opt,name=observed_tx,json=observedTx,proto3" json:"observed_tx,omitempty"` // observed tx on destination chain - Id string `protobuf:"bytes,11,opt,name=id,proto3" json:"id,omitempty"` // id of outbound tx - OutboundStatus Status `protobuf:"varint,12,opt,name=outbound_status,json=outboundStatus,proto3,enum=uexecutor.v1.Status" json:"outbound_status,omitempty"` // status of outbound tx - RevertInstructions *RevertInstructions `protobuf:"bytes,13,opt,name=revert_instructions,json=revertInstructions,proto3" json:"revert_instructions,omitempty"` - PcRevertExecution *PCTx `protobuf:"bytes,14,opt,name=pc_revert_execution,json=pcRevertExecution,proto3" json:"pc_revert_execution,omitempty"` + ExternalAssetAddr string `protobuf:"bytes,4,opt,name=external_asset_addr,json=externalAssetAddr,proto3" json:"external_asset_addr,omitempty"` // asset addr destination chain + Prc20AssetAddr string `protobuf:"bytes,5,opt,name=prc20_asset_addr,json=prc20AssetAddr,proto3" json:"prc20_asset_addr,omitempty"` // prc20 contract addr + Sender string `protobuf:"bytes,6,opt,name=sender,proto3" json:"sender,omitempty"` // sender of the outbound tx + Payload string `protobuf:"bytes,7,opt,name=payload,proto3" json:"payload,omitempty"` // payload to be executed + GasLimit string `protobuf:"bytes,8,opt,name=gas_limit,json=gasLimit,proto3" json:"gas_limit,omitempty"` // gas limit to be used for the outbound tx + TxType TxType `protobuf:"varint,9,opt,name=tx_type,json=txType,proto3,enum=uexecutor.v1.TxType" json:"tx_type,omitempty"` // outbound tx type + PcTx *OriginatingPcTx `protobuf:"bytes,10,opt,name=pc_tx,json=pcTx,proto3" json:"pc_tx,omitempty"` // pc_tx that originated the outbound + ObservedTx *OutboundObservation `protobuf:"bytes,11,opt,name=observed_tx,json=observedTx,proto3" json:"observed_tx,omitempty"` // observed tx on destination chain + Id string `protobuf:"bytes,12,opt,name=id,proto3" json:"id,omitempty"` // id of outbound tx + OutboundStatus Status `protobuf:"varint,13,opt,name=outbound_status,json=outboundStatus,proto3,enum=uexecutor.v1.Status" json:"outbound_status,omitempty"` // status of outbound tx + RevertInstructions *RevertInstructions `protobuf:"bytes,14,opt,name=revert_instructions,json=revertInstructions,proto3" json:"revert_instructions,omitempty"` + PcRevertExecution *PCTx `protobuf:"bytes,15,opt,name=pc_revert_execution,json=pcRevertExecution,proto3" json:"pc_revert_execution,omitempty"` } func (x *OutboundTx) Reset() { @@ -8083,9 +8148,16 @@ func (x *OutboundTx) GetAmount() string { return "" } -func (x *OutboundTx) GetAssetAddr() string { +func (x *OutboundTx) GetExternalAssetAddr() string { if x != nil { - return x.AssetAddr + return x.ExternalAssetAddr + } + return "" +} + +func (x *OutboundTx) GetPrc20AssetAddr() string { + if x != nil { + return x.Prc20AssetAddr } return "" } @@ -8339,111 +8411,115 @@ var file_uexecutor_v1_types_proto_rawDesc = []byte{ 0x01, 0x28, 0x09, 0x52, 0x08, 0x6c, 0x6f, 0x67, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x3a, 0x24, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x1b, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2f, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x63, - 0x5f, 0x74, 0x78, 0x22, 0x8e, 0x05, 0x0a, 0x0a, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, + 0x5f, 0x74, 0x78, 0x22, 0xc9, 0x05, 0x0a, 0x0a, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x54, 0x78, 0x12, 0x2b, 0x0a, 0x11, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x63, 0x69, 0x70, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, - 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x61, - 0x64, 0x64, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x73, 0x73, 0x65, 0x74, - 0x41, 0x64, 0x64, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, - 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, - 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x67, 0x61, 0x73, 0x5f, 0x6c, 0x69, - 0x6d, 0x69, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x67, 0x61, 0x73, 0x4c, 0x69, - 0x6d, 0x69, 0x74, 0x12, 0x2d, 0x0a, 0x07, 0x74, 0x78, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x08, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, - 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x78, 0x54, 0x79, 0x70, 0x65, 0x52, 0x06, 0x74, 0x78, 0x54, 0x79, - 0x70, 0x65, 0x12, 0x32, 0x0a, 0x05, 0x70, 0x63, 0x5f, 0x74, 0x78, 0x18, 0x09, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1d, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, - 0x2e, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x63, 0x54, 0x78, - 0x52, 0x04, 0x70, 0x63, 0x54, 0x78, 0x12, 0x42, 0x0a, 0x0b, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, - 0x65, 0x64, 0x5f, 0x74, 0x78, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x75, 0x65, - 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x75, 0x74, 0x62, 0x6f, - 0x75, 0x6e, 0x64, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, - 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x54, 0x78, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, - 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x3d, 0x0a, 0x0f, 0x6f, 0x75, - 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x0c, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, - 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0e, 0x6f, 0x75, 0x74, 0x62, 0x6f, - 0x75, 0x6e, 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x51, 0x0a, 0x13, 0x72, 0x65, 0x76, - 0x65, 0x72, 0x74, 0x5f, 0x69, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, - 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x76, 0x65, 0x72, 0x74, 0x49, 0x6e, 0x73, 0x74, - 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x12, 0x72, 0x65, 0x76, 0x65, 0x72, 0x74, - 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x42, 0x0a, 0x13, - 0x70, 0x63, 0x5f, 0x72, 0x65, 0x76, 0x65, 0x72, 0x74, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x75, 0x65, 0x78, 0x65, - 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x43, 0x54, 0x78, 0x52, 0x11, 0x70, - 0x63, 0x52, 0x65, 0x76, 0x65, 0x72, 0x74, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, - 0x3a, 0x22, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x15, 0x75, - 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2f, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, - 0x64, 0x5f, 0x74, 0x78, 0x22, 0xa8, 0x02, 0x0a, 0x0b, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, - 0x61, 0x6c, 0x54, 0x78, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x02, 0x69, 0x64, 0x12, 0x34, 0x0a, 0x0a, 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, - 0x74, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, - 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x52, - 0x09, 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x54, 0x78, 0x12, 0x27, 0x0a, 0x05, 0x70, 0x63, - 0x5f, 0x74, 0x78, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x75, 0x65, 0x78, 0x65, - 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x43, 0x54, 0x78, 0x52, 0x04, 0x70, - 0x63, 0x54, 0x78, 0x12, 0x39, 0x0a, 0x0b, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, - 0x74, 0x78, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, - 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, - 0x54, 0x78, 0x52, 0x0a, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x54, 0x78, 0x12, 0x4a, - 0x0a, 0x10, 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, - 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, - 0x6c, 0x54, 0x78, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0f, 0x75, 0x6e, 0x69, 0x76, 0x65, - 0x72, 0x73, 0x61, 0x6c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x3a, 0x23, 0x98, 0xa0, 0x1f, 0x00, - 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x16, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, - 0x6f, 0x72, 0x2f, 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x5f, 0x74, 0x78, 0x2a, - 0x47, 0x0a, 0x10, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, - 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x12, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x56, 0x65, 0x72, - 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x10, 0x00, 0x12, 0x1b, 0x0a, 0x17, 0x75, - 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x54, 0x78, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x10, 0x01, 0x2a, 0x83, 0x02, 0x0a, 0x11, 0x55, 0x6e, 0x69, - 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x54, 0x78, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x23, - 0x0a, 0x1f, 0x55, 0x4e, 0x49, 0x56, 0x45, 0x52, 0x53, 0x41, 0x4c, 0x5f, 0x54, 0x58, 0x5f, 0x53, - 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, - 0x44, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x49, 0x4e, 0x42, 0x4f, 0x55, 0x4e, 0x44, 0x5f, 0x53, - 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x01, 0x12, 0x1d, 0x0a, 0x19, 0x50, 0x45, 0x4e, 0x44, - 0x49, 0x4e, 0x47, 0x5f, 0x49, 0x4e, 0x42, 0x4f, 0x55, 0x4e, 0x44, 0x5f, 0x45, 0x58, 0x45, 0x43, - 0x55, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x02, 0x12, 0x17, 0x0a, 0x13, 0x50, 0x43, 0x5f, 0x45, 0x58, - 0x45, 0x43, 0x55, 0x54, 0x45, 0x44, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x03, - 0x12, 0x16, 0x0a, 0x12, 0x50, 0x43, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x45, 0x44, 0x5f, - 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x04, 0x12, 0x15, 0x0a, 0x11, 0x50, 0x43, 0x5f, 0x50, - 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x52, 0x45, 0x56, 0x45, 0x52, 0x54, 0x10, 0x05, 0x12, - 0x14, 0x0a, 0x10, 0x4f, 0x55, 0x54, 0x42, 0x4f, 0x55, 0x4e, 0x44, 0x5f, 0x50, 0x45, 0x4e, 0x44, - 0x49, 0x4e, 0x47, 0x10, 0x06, 0x12, 0x14, 0x0a, 0x10, 0x4f, 0x55, 0x54, 0x42, 0x4f, 0x55, 0x4e, - 0x44, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x07, 0x12, 0x13, 0x0a, 0x0f, 0x4f, - 0x55, 0x54, 0x42, 0x4f, 0x55, 0x4e, 0x44, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x08, - 0x12, 0x0c, 0x0a, 0x08, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x45, 0x44, 0x10, 0x09, 0x2a, 0x42, - 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0f, 0x0a, 0x0b, 0x55, 0x4e, 0x53, 0x50, - 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x45, 0x4e, - 0x44, 0x49, 0x4e, 0x47, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x4f, 0x42, 0x53, 0x45, 0x52, 0x56, - 0x45, 0x44, 0x10, 0x02, 0x12, 0x0c, 0x0a, 0x08, 0x52, 0x45, 0x56, 0x45, 0x52, 0x54, 0x45, 0x44, - 0x10, 0x03, 0x2a, 0x7d, 0x0a, 0x06, 0x54, 0x78, 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x0e, - 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x5f, 0x54, 0x58, 0x10, 0x00, - 0x12, 0x07, 0x0a, 0x03, 0x47, 0x41, 0x53, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x47, 0x41, 0x53, - 0x5f, 0x41, 0x4e, 0x44, 0x5f, 0x50, 0x41, 0x59, 0x4c, 0x4f, 0x41, 0x44, 0x10, 0x02, 0x12, 0x09, - 0x0a, 0x05, 0x46, 0x55, 0x4e, 0x44, 0x53, 0x10, 0x03, 0x12, 0x15, 0x0a, 0x11, 0x46, 0x55, 0x4e, - 0x44, 0x53, 0x5f, 0x41, 0x4e, 0x44, 0x5f, 0x50, 0x41, 0x59, 0x4c, 0x4f, 0x41, 0x44, 0x10, 0x04, - 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x41, 0x59, 0x4c, 0x4f, 0x41, 0x44, 0x10, 0x05, 0x12, 0x12, 0x0a, - 0x0e, 0x49, 0x4e, 0x42, 0x4f, 0x55, 0x4e, 0x44, 0x5f, 0x52, 0x45, 0x56, 0x45, 0x52, 0x54, 0x10, - 0x06, 0x42, 0xb2, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, - 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x41, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x70, 0x75, 0x73, 0x68, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x2d, - 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2d, 0x6e, 0x6f, 0x64, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x75, - 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x31, 0x3b, 0x75, 0x65, 0x78, 0x65, - 0x63, 0x75, 0x74, 0x6f, 0x72, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x55, 0x58, 0x58, 0xaa, 0x02, 0x0c, - 0x55, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0c, 0x55, - 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x18, 0x55, 0x65, - 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0d, 0x55, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, - 0x6f, 0x72, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x2e, 0x0a, 0x13, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, + 0x6c, 0x5f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x11, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x41, 0x73, 0x73, 0x65, + 0x74, 0x41, 0x64, 0x64, 0x72, 0x12, 0x28, 0x0a, 0x10, 0x70, 0x72, 0x63, 0x32, 0x30, 0x5f, 0x61, + 0x73, 0x73, 0x65, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0e, 0x70, 0x72, 0x63, 0x32, 0x30, 0x41, 0x73, 0x73, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x12, + 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, + 0x61, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, + 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x67, 0x61, 0x73, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x08, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x67, 0x61, 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x2d, + 0x0a, 0x07, 0x74, 0x78, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x14, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x54, + 0x78, 0x54, 0x79, 0x70, 0x65, 0x52, 0x06, 0x74, 0x78, 0x54, 0x79, 0x70, 0x65, 0x12, 0x32, 0x0a, + 0x05, 0x70, 0x63, 0x5f, 0x74, 0x78, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x75, + 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x72, 0x69, 0x67, + 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x63, 0x54, 0x78, 0x52, 0x04, 0x70, 0x63, 0x54, + 0x78, 0x12, 0x42, 0x0a, 0x0b, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, 0x74, 0x78, + 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x4f, 0x62, + 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x6f, 0x62, 0x73, 0x65, 0x72, + 0x76, 0x65, 0x64, 0x54, 0x78, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x3d, 0x0a, 0x0f, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, + 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, + 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x52, 0x0e, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x12, 0x51, 0x0a, 0x13, 0x72, 0x65, 0x76, 0x65, 0x72, 0x74, 0x5f, 0x69, + 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x0e, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x20, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, + 0x2e, 0x52, 0x65, 0x76, 0x65, 0x72, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x52, 0x12, 0x72, 0x65, 0x76, 0x65, 0x72, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x72, + 0x75, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x42, 0x0a, 0x13, 0x70, 0x63, 0x5f, 0x72, 0x65, + 0x76, 0x65, 0x72, 0x74, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0f, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, + 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x43, 0x54, 0x78, 0x52, 0x11, 0x70, 0x63, 0x52, 0x65, 0x76, 0x65, + 0x72, 0x74, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x22, 0x98, 0xa0, 0x1f, + 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x15, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, + 0x74, 0x6f, 0x72, 0x2f, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x74, 0x78, 0x22, + 0xa8, 0x02, 0x0a, 0x0b, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x54, 0x78, 0x12, + 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, + 0x34, 0x0a, 0x0a, 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x74, 0x78, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, + 0x76, 0x31, 0x2e, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x09, 0x69, 0x6e, 0x62, 0x6f, + 0x75, 0x6e, 0x64, 0x54, 0x78, 0x12, 0x27, 0x0a, 0x05, 0x70, 0x63, 0x5f, 0x74, 0x78, 0x18, 0x03, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, + 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x43, 0x54, 0x78, 0x52, 0x04, 0x70, 0x63, 0x54, 0x78, 0x12, 0x39, + 0x0a, 0x0b, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x74, 0x78, 0x18, 0x04, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, + 0x76, 0x31, 0x2e, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x54, 0x78, 0x52, 0x0a, 0x6f, + 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x54, 0x78, 0x12, 0x4a, 0x0a, 0x10, 0x75, 0x6e, 0x69, + 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x1f, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, + 0x76, 0x31, 0x2e, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x54, 0x78, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x52, 0x0f, 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x3a, 0x23, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, + 0xe7, 0xb0, 0x2a, 0x16, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2f, 0x75, 0x6e, + 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, 0x6c, 0x5f, 0x74, 0x78, 0x2a, 0x47, 0x0a, 0x10, 0x56, 0x65, + 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, + 0x0a, 0x12, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x10, 0x00, 0x12, 0x1b, 0x0a, 0x17, 0x75, 0x6e, 0x69, 0x76, 0x65, 0x72, + 0x73, 0x61, 0x6c, 0x54, 0x78, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x10, 0x01, 0x2a, 0x83, 0x02, 0x0a, 0x11, 0x55, 0x6e, 0x69, 0x76, 0x65, 0x72, 0x73, 0x61, + 0x6c, 0x54, 0x78, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x23, 0x0a, 0x1f, 0x55, 0x4e, 0x49, + 0x56, 0x45, 0x52, 0x53, 0x41, 0x4c, 0x5f, 0x54, 0x58, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, + 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x13, + 0x0a, 0x0f, 0x49, 0x4e, 0x42, 0x4f, 0x55, 0x4e, 0x44, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, + 0x53, 0x10, 0x01, 0x12, 0x1d, 0x0a, 0x19, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x49, + 0x4e, 0x42, 0x4f, 0x55, 0x4e, 0x44, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x49, 0x4f, 0x4e, + 0x10, 0x02, 0x12, 0x17, 0x0a, 0x13, 0x50, 0x43, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x45, + 0x44, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x03, 0x12, 0x16, 0x0a, 0x12, 0x50, + 0x43, 0x5f, 0x45, 0x58, 0x45, 0x43, 0x55, 0x54, 0x45, 0x44, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, + 0x44, 0x10, 0x04, 0x12, 0x15, 0x0a, 0x11, 0x50, 0x43, 0x5f, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, + 0x47, 0x5f, 0x52, 0x45, 0x56, 0x45, 0x52, 0x54, 0x10, 0x05, 0x12, 0x14, 0x0a, 0x10, 0x4f, 0x55, + 0x54, 0x42, 0x4f, 0x55, 0x4e, 0x44, 0x5f, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x06, + 0x12, 0x14, 0x0a, 0x10, 0x4f, 0x55, 0x54, 0x42, 0x4f, 0x55, 0x4e, 0x44, 0x5f, 0x53, 0x55, 0x43, + 0x43, 0x45, 0x53, 0x53, 0x10, 0x07, 0x12, 0x13, 0x0a, 0x0f, 0x4f, 0x55, 0x54, 0x42, 0x4f, 0x55, + 0x4e, 0x44, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x08, 0x12, 0x0c, 0x0a, 0x08, 0x43, + 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x45, 0x44, 0x10, 0x09, 0x2a, 0x42, 0x0a, 0x06, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x12, 0x0f, 0x0a, 0x0b, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, + 0x45, 0x44, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, + 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x4f, 0x42, 0x53, 0x45, 0x52, 0x56, 0x45, 0x44, 0x10, 0x02, 0x12, + 0x0c, 0x0a, 0x08, 0x52, 0x45, 0x56, 0x45, 0x52, 0x54, 0x45, 0x44, 0x10, 0x03, 0x2a, 0x7d, 0x0a, + 0x06, 0x54, 0x78, 0x54, 0x79, 0x70, 0x65, 0x12, 0x12, 0x0a, 0x0e, 0x55, 0x4e, 0x53, 0x50, 0x45, + 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x5f, 0x54, 0x58, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x47, + 0x41, 0x53, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x47, 0x41, 0x53, 0x5f, 0x41, 0x4e, 0x44, 0x5f, + 0x50, 0x41, 0x59, 0x4c, 0x4f, 0x41, 0x44, 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x46, 0x55, 0x4e, + 0x44, 0x53, 0x10, 0x03, 0x12, 0x15, 0x0a, 0x11, 0x46, 0x55, 0x4e, 0x44, 0x53, 0x5f, 0x41, 0x4e, + 0x44, 0x5f, 0x50, 0x41, 0x59, 0x4c, 0x4f, 0x41, 0x44, 0x10, 0x04, 0x12, 0x0b, 0x0a, 0x07, 0x50, + 0x41, 0x59, 0x4c, 0x4f, 0x41, 0x44, 0x10, 0x05, 0x12, 0x12, 0x0a, 0x0e, 0x49, 0x4e, 0x42, 0x4f, + 0x55, 0x4e, 0x44, 0x5f, 0x52, 0x45, 0x56, 0x45, 0x52, 0x54, 0x10, 0x06, 0x42, 0xb2, 0x01, 0x0a, + 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, + 0x31, 0x42, 0x0a, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x41, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x75, 0x73, 0x68, + 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x2d, 0x63, 0x68, 0x61, 0x69, 0x6e, + 0x2d, 0x6e, 0x6f, 0x64, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, + 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x31, 0x3b, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, + 0x76, 0x31, 0xa2, 0x02, 0x03, 0x55, 0x58, 0x58, 0xaa, 0x02, 0x0c, 0x55, 0x65, 0x78, 0x65, 0x63, + 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0c, 0x55, 0x65, 0x78, 0x65, 0x63, 0x75, + 0x74, 0x6f, 0x72, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x18, 0x55, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x6f, 0x72, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0xea, 0x02, 0x0d, 0x55, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x3a, 0x3a, 0x56, + 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( From 14c919f19255600cb4c6d269e121a955446c827b Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Tue, 16 Dec 2025 16:37:24 +0530 Subject: [PATCH 083/120] feat: added a keeper method in uregistry to get token config by prc20 --- x/uregistry/keeper/keeper.go | 44 ++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/x/uregistry/keeper/keeper.go b/x/uregistry/keeper/keeper.go index 90411fcb..1b5df4b7 100755 --- a/x/uregistry/keeper/keeper.go +++ b/x/uregistry/keeper/keeper.go @@ -3,6 +3,7 @@ package keeper import ( "context" "errors" + "strings" "github.com/cosmos/cosmos-sdk/codec" @@ -137,3 +138,46 @@ func (k Keeper) GetTokenConfig(ctx context.Context, chain, address string) (type func (k Keeper) SchemaBuilder() *collections.SchemaBuilder { return k.schemaBuilder } + +func (k Keeper) GetTokenConfigByPRC20( + ctx context.Context, + chain string, + prc20Addr string, +) (types.TokenConfig, error) { + + prc20Addr = strings.ToLower(strings.TrimSpace(prc20Addr)) + + var found *types.TokenConfig + + err := k.TokenConfigs.Walk(ctx, nil, func( + key string, + cfg types.TokenConfig, + ) (bool, error) { + + // chain must match + if cfg.Chain != chain { + return false, nil + } + + if cfg.NativeRepresentation == nil { + return false, nil + } + + if strings.ToLower(cfg.NativeRepresentation.ContractAddress) == prc20Addr { + found = &cfg + return true, nil // stop walk + } + + return false, nil + }) + + if err != nil { + return types.TokenConfig{}, err + } + + if found == nil { + return types.TokenConfig{}, collections.ErrNotFound + } + + return *found, nil +} From 9bd5a9e0a728bb74189a7bb9516571b7707b7fd2 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Tue, 16 Dec 2025 16:38:05 +0530 Subject: [PATCH 084/120] feat: updated outbound validateBasic --- x/uexecutor/types/outbound_tx.go | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/x/uexecutor/types/outbound_tx.go b/x/uexecutor/types/outbound_tx.go index d8e20229..a9be1d24 100644 --- a/x/uexecutor/types/outbound_tx.go +++ b/x/uexecutor/types/outbound_tx.go @@ -69,9 +69,15 @@ func (p OutboundTx) ValidateBasic() error { } } - // asset_addr required when amount is involved - if (p.TxType == TxType_FUNDS || p.TxType == TxType_FUNDS_AND_PAYLOAD) && strings.TrimSpace(p.AssetAddr) == "" { - return errors.Wrap(sdkerrors.ErrInvalidAddress, "asset_addr cannot be empty for funds tx") + // external_asset_addr required when amount is involved + if (p.TxType == TxType_FUNDS || p.TxType == TxType_FUNDS_AND_PAYLOAD) && strings.TrimSpace(p.ExternalAssetAddr) == "" { + return errors.Wrap(sdkerrors.ErrInvalidAddress, "external_asset_addr cannot be empty for funds tx") + } + + if strings.TrimSpace(p.Prc20AssetAddr) != "" { + if !utils.IsValidAddress(p.Prc20AssetAddr, utils.HEX) { + return errors.Wrapf(sdkerrors.ErrInvalidAddress, "invalid prc20 address: %s", p.Sender) + } } // gas_limit (uint) From 54f9856d387bfef95cc914c00f7e8a13e0a901f7 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Tue, 16 Dec 2025 16:38:36 +0530 Subject: [PATCH 085/120] refactor: updated mock uregistry keeper in uexecutor module --- x/uexecutor/mocks/mock_uregistrykeeper.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/x/uexecutor/mocks/mock_uregistrykeeper.go b/x/uexecutor/mocks/mock_uregistrykeeper.go index 8d66223c..fdb88db8 100644 --- a/x/uexecutor/mocks/mock_uregistrykeeper.go +++ b/x/uexecutor/mocks/mock_uregistrykeeper.go @@ -65,6 +65,21 @@ func (mr *MockUregistryKeeperMockRecorder) GetTokenConfig(ctx, chain, address in return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetTokenConfig", reflect.TypeOf((*MockUregistryKeeper)(nil).GetTokenConfig), ctx, chain, address) } +// GetTokenConfigByPRC20 mocks base method. +func (m *MockUregistryKeeper) GetTokenConfigByPRC20(ctx context.Context, chain, prc20Addr string) (uregistrytypes.TokenConfig, error) { + m.ctrl.T.Helper() + ret := m.ctrl.Call(m, "GetTokenConfigByPRC20", ctx, chain, prc20Addr) + ret0, _ := ret[0].(uregistrytypes.TokenConfig) + ret1, _ := ret[1].(error) + return ret0, ret1 +} + +// GetTokenConfigByPRC20 indicates an expected call of GetTokenConfigByPRC20. +func (mr *MockUregistryKeeperMockRecorder) GetTokenConfigByPRC20(ctx, chain, prc20Addr interface{}) *gomock.Call { + mr.mock.ctrl.T.Helper() + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetTokenConfigByPRC20", reflect.TypeOf((*MockUregistryKeeper)(nil).GetTokenConfigByPRC20), ctx, chain, prc20Addr) +} + // IsChainInboundEnabled mocks base method. func (m *MockUregistryKeeper) IsChainInboundEnabled(ctx context.Context, chain string) (bool, error) { m.ctrl.T.Helper() From 6de1de0fb62f93d87a080bea281116f1830d4e17 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Tue, 16 Dec 2025 16:39:30 +0530 Subject: [PATCH 086/120] feat: modified outbound creation with Prc20AssetAddr --- x/uexecutor/keeper/create_outbound.go | 34 ++++++++++++++++++--------- x/uexecutor/keeper/outbound.go | 2 +- x/uexecutor/types/expected_keepers.go | 5 ++++ 3 files changed, 29 insertions(+), 12 deletions(-) diff --git a/x/uexecutor/keeper/create_outbound.go b/x/uexecutor/keeper/create_outbound.go index 80d0f6d8..536937dd 100644 --- a/x/uexecutor/keeper/create_outbound.go +++ b/x/uexecutor/keeper/create_outbound.go @@ -13,6 +13,7 @@ import ( ) func (k Keeper) BuildOutboundsFromReceipt( + ctx context.Context, utxId string, receipt *evmtypes.MsgEthereumTxResponse, ) ([]*types.OutboundTx, error) { @@ -42,15 +43,26 @@ func (k Keeper) BuildOutboundsFromReceipt( return nil, fmt.Errorf("failed to decode UniversalTxWithdraw: %w", err) } + // Get the external asset addr + tokenCfg, err := k.uregistryKeeper.GetTokenConfigByPRC20( + ctx, + event.ChainId, + event.Token, // PRC20 address + ) + if err != nil { + return nil, err + } + outbound := &types.OutboundTx{ - DestinationChain: event.ChainId, - Recipient: event.Target, - Amount: event.Amount.String(), - AssetAddr: event.Token, - Sender: event.Sender, - Payload: event.Payload, - GasLimit: event.GasLimit.String(), - TxType: event.TxType, + DestinationChain: event.ChainId, + Recipient: event.Target, + Amount: event.Amount.String(), + ExternalAssetAddr: tokenCfg.Address, + Prc20AssetAddr: event.Token, + Sender: event.Sender, + Payload: event.Payload, + GasLimit: event.GasLimit.String(), + TxType: event.TxType, PcTx: &types.OriginatingPcTx{ TxHash: receipt.Hash, LogIndex: fmt.Sprintf("%d", lg.Index), @@ -109,7 +121,7 @@ func (k Keeper) AttachOutboundsToExistingUniversalTx( receipt *evmtypes.MsgEthereumTxResponse, utx types.UniversalTx, ) error { - outbounds, err := k.BuildOutboundsFromReceipt(utx.Id, receipt) + outbounds, err := k.BuildOutboundsFromReceipt(ctx, utx.Id, receipt) if err != nil { return err } @@ -130,7 +142,7 @@ func (k Keeper) CreateUniversalTxFromReceiptIfOutbound( return errors.Wrap(err, "failed to create UniversalTx key") } - outbounds, err := k.BuildOutboundsFromReceipt(universalTxKey, receipt) + outbounds, err := k.BuildOutboundsFromReceipt(ctx, universalTxKey, receipt) if err != nil { return err } @@ -184,7 +196,7 @@ func (k Keeper) attachOutboundsToUtx( DestinationChain: outbound.DestinationChain, Recipient: outbound.Recipient, Amount: outbound.Amount, - AssetAddr: outbound.AssetAddr, + AssetAddr: outbound.ExternalAssetAddr, Sender: outbound.Sender, Payload: outbound.Payload, GasLimit: outbound.GasLimit, diff --git a/x/uexecutor/keeper/outbound.go b/x/uexecutor/keeper/outbound.go index 6ca4322b..f812652a 100644 --- a/x/uexecutor/keeper/outbound.go +++ b/x/uexecutor/keeper/outbound.go @@ -69,7 +69,7 @@ func (k Keeper) FinalizeOutbound(ctx context.Context, utxId string, outbound typ if !ok { return fmt.Errorf("invalid amount: %s", outbound.Amount) } - receipt, err := k.CallPRC20Deposit(sdkCtx, common.HexToAddress(outbound.AssetAddr), common.HexToAddress(recipient), amount) + receipt, err := k.CallPRC20Deposit(sdkCtx, common.HexToAddress(outbound.Prc20AssetAddr), common.HexToAddress(recipient), amount) // Update outbound status outbound.OutboundStatus = types.Status_REVERTED diff --git a/x/uexecutor/types/expected_keepers.go b/x/uexecutor/types/expected_keepers.go index 1346328f..49bef48e 100644 --- a/x/uexecutor/types/expected_keepers.go +++ b/x/uexecutor/types/expected_keepers.go @@ -22,6 +22,11 @@ type UregistryKeeper interface { IsChainOutboundEnabled(ctx context.Context, chain string) (bool, error) IsChainInboundEnabled(ctx context.Context, chain string) (bool, error) GetTokenConfig(ctx context.Context, chain, address string) (uregistrytypes.TokenConfig, error) + GetTokenConfigByPRC20( + ctx context.Context, + chain string, + prc20Addr string, + ) (uregistrytypes.TokenConfig, error) } // EVMKeeper defines the expected interface for the EVM module. From c2887d493a90b9219593eca71448ebc2081ee001 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Tue, 16 Dec 2025 16:40:08 +0530 Subject: [PATCH 087/120] feat: modified revert outbound creation with Prc20AssetAddr --- x/uexecutor/keeper/execute_inbound_funds.go | 12 ++++++------ .../keeper/execute_inbound_funds_and_payload.go | 12 ++++++------ x/uexecutor/keeper/execute_inbound_gas.go | 12 ++++++------ .../keeper/execute_inbound_gas_and_payload.go | 12 ++++++------ 4 files changed, 24 insertions(+), 24 deletions(-) diff --git a/x/uexecutor/keeper/execute_inbound_funds.go b/x/uexecutor/keeper/execute_inbound_funds.go index 332f2b63..138ffbef 100644 --- a/x/uexecutor/keeper/execute_inbound_funds.go +++ b/x/uexecutor/keeper/execute_inbound_funds.go @@ -59,12 +59,12 @@ func (k Keeper) ExecuteInboundFunds(ctx context.Context, utx types.UniversalTx) } return inbound.Sender }(), - Amount: inbound.Amount, - AssetAddr: inbound.AssetAddr, - Sender: inbound.Sender, - TxType: types.TxType_INBOUND_REVERT, - OutboundStatus: types.Status_PENDING, - Id: types.GetOutboundRevertId(), + Amount: inbound.Amount, + ExternalAssetAddr: inbound.AssetAddr, + Sender: inbound.Sender, + TxType: types.TxType_INBOUND_REVERT, + OutboundStatus: types.Status_PENDING, + Id: types.GetOutboundRevertId(), } _ = k.attachOutboundsToUtx(sdkCtx, utx.Id, []*types.OutboundTx{&revertOutbound}, err.Error()) } diff --git a/x/uexecutor/keeper/execute_inbound_funds_and_payload.go b/x/uexecutor/keeper/execute_inbound_funds_and_payload.go index 5229b030..b396e7fc 100644 --- a/x/uexecutor/keeper/execute_inbound_funds_and_payload.go +++ b/x/uexecutor/keeper/execute_inbound_funds_and_payload.go @@ -93,12 +93,12 @@ func (k Keeper) ExecuteInboundFundsAndPayload(ctx context.Context, utx types.Uni } return utx.InboundTx.Sender }(), - Amount: utx.InboundTx.Amount, - AssetAddr: utx.InboundTx.AssetAddr, - Sender: utx.InboundTx.Sender, - TxType: types.TxType_INBOUND_REVERT, - OutboundStatus: types.Status_PENDING, - Id: types.GetOutboundRevertId(), + Amount: utx.InboundTx.Amount, + ExternalAssetAddr: utx.InboundTx.AssetAddr, + Sender: utx.InboundTx.Sender, + TxType: types.TxType_INBOUND_REVERT, + OutboundStatus: types.Status_PENDING, + Id: types.GetOutboundRevertId(), } _ = k.attachOutboundsToUtx( diff --git a/x/uexecutor/keeper/execute_inbound_gas.go b/x/uexecutor/keeper/execute_inbound_gas.go index c0103a10..7527fbc2 100644 --- a/x/uexecutor/keeper/execute_inbound_gas.go +++ b/x/uexecutor/keeper/execute_inbound_gas.go @@ -132,12 +132,12 @@ func (k Keeper) ExecuteInboundGas(ctx context.Context, inbound types.Inbound) er } return inbound.Sender }(), - Amount: inbound.Amount, - AssetAddr: inbound.AssetAddr, - Sender: inbound.Sender, - TxType: types.TxType_INBOUND_REVERT, - OutboundStatus: types.Status_PENDING, - Id: types.GetOutboundRevertId(), + Amount: inbound.Amount, + ExternalAssetAddr: inbound.AssetAddr, + Sender: inbound.Sender, + TxType: types.TxType_INBOUND_REVERT, + OutboundStatus: types.Status_PENDING, + Id: types.GetOutboundRevertId(), } _ = k.attachOutboundsToUtx( diff --git a/x/uexecutor/keeper/execute_inbound_gas_and_payload.go b/x/uexecutor/keeper/execute_inbound_gas_and_payload.go index fd8d463f..c6e17663 100644 --- a/x/uexecutor/keeper/execute_inbound_gas_and_payload.go +++ b/x/uexecutor/keeper/execute_inbound_gas_and_payload.go @@ -138,12 +138,12 @@ func (k Keeper) ExecuteInboundGasAndPayload(ctx context.Context, utx types.Unive } return utx.InboundTx.Sender }(), - Amount: utx.InboundTx.Amount, - AssetAddr: utx.InboundTx.AssetAddr, - Sender: utx.InboundTx.Sender, - TxType: types.TxType_INBOUND_REVERT, - OutboundStatus: types.Status_PENDING, - Id: types.GetOutboundRevertId(), + Amount: utx.InboundTx.Amount, + ExternalAssetAddr: utx.InboundTx.AssetAddr, + Sender: utx.InboundTx.Sender, + TxType: types.TxType_INBOUND_REVERT, + OutboundStatus: types.Status_PENDING, + Id: types.GetOutboundRevertId(), } _ = k.attachOutboundsToUtx( From 95ad1b5547b6cae5f0f6d69dfa5181beb967cd5e Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Tue, 16 Dec 2025 16:40:35 +0530 Subject: [PATCH 088/120] tests: updated unit tests as per new outbound proto change --- x/uexecutor/types/outbound_tx_test.go | 21 +++++++++++---------- x/uexecutor/types/universal_tx_test.go | 17 +++++++++-------- 2 files changed, 20 insertions(+), 18 deletions(-) diff --git a/x/uexecutor/types/outbound_tx_test.go b/x/uexecutor/types/outbound_tx_test.go index f8e719e7..1f3d7a10 100644 --- a/x/uexecutor/types/outbound_tx_test.go +++ b/x/uexecutor/types/outbound_tx_test.go @@ -9,14 +9,15 @@ import ( func baseValidOutbound() types.OutboundTx { return types.OutboundTx{ - DestinationChain: "eip155:11155111", - Recipient: "0x000000000000000000000000000000000000beef", - Sender: "0x000000000000000000000000000000000000dead", - Amount: "1000", - AssetAddr: "0x000000000000000000000000000000000000cafe", - Payload: "0xabcdef", - GasLimit: "21000", - TxType: types.TxType_FUNDS_AND_PAYLOAD, + DestinationChain: "eip155:11155111", + Recipient: "0x000000000000000000000000000000000000beef", + Sender: "0x000000000000000000000000000000000000dead", + Amount: "1000", + ExternalAssetAddr: "0x000000000000000000000000000000000000cafe", + Prc20AssetAddr: "0x000000000000000000000000000000000000bafe", + Payload: "0xabcdef", + GasLimit: "21000", + TxType: types.TxType_FUNDS_AND_PAYLOAD, PcTx: &types.OriginatingPcTx{ TxHash: "0xpc123", LogIndex: "1", @@ -49,7 +50,7 @@ func TestOutboundTx_ValidateBasic(t *testing.T) { ob := baseValidOutbound() ob.TxType = types.TxType_PAYLOAD ob.Amount = "" - ob.AssetAddr = "" + ob.ExternalAssetAddr = "" return ob }(), expectError: false, @@ -121,7 +122,7 @@ func TestOutboundTx_ValidateBasic(t *testing.T) { outbound: func() types.OutboundTx { ob := baseValidOutbound() ob.TxType = types.TxType_FUNDS - ob.AssetAddr = "" + ob.ExternalAssetAddr = "" return ob }(), expectError: true, diff --git a/x/uexecutor/types/universal_tx_test.go b/x/uexecutor/types/universal_tx_test.go index 3aee598c..1c90beee 100644 --- a/x/uexecutor/types/universal_tx_test.go +++ b/x/uexecutor/types/universal_tx_test.go @@ -31,14 +31,15 @@ func TestUniversalTx_ValidateBasic(t *testing.T) { }, OutboundTx: []*types.OutboundTx{ { - DestinationChain: "eip155:11155111", - Recipient: "0x000000000000000000000000000000000000beef", - Sender: "0x000000000000000000000000000000000000dead", - Amount: "1000", - AssetAddr: "0x000000000000000000000000000000000000cafe", - Payload: "0xabcdef", - GasLimit: "21000", - TxType: types.TxType_FUNDS_AND_PAYLOAD, + DestinationChain: "eip155:11155111", + Recipient: "0x000000000000000000000000000000000000beef", + Sender: "0x000000000000000000000000000000000000dead", + Amount: "1000", + ExternalAssetAddr: "0x000000000000000000000000000000000000cafe", + Prc20AssetAddr: "0x000000000000000000000000000000000000bafe", + Payload: "0xabcdef", + GasLimit: "21000", + TxType: types.TxType_FUNDS_AND_PAYLOAD, PcTx: &types.OriginatingPcTx{ TxHash: "0xpc123", LogIndex: "1", From c10022fb7a5a30a77bae5f38ebe8b926ad879248 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Tue, 16 Dec 2025 16:40:53 +0530 Subject: [PATCH 089/120] tests: updated integration tests as per new outbound proto change --- .../uexecutor/inbound_initiated_outbound_test.go | 8 +++++--- .../uexecutor/inbound_synthetic_bridge_payload_test.go | 10 ++++++---- .../uexecutor/inbound_synthetic_bridge_test.go | 7 ++++--- test/utils/constants.go | 2 ++ 4 files changed, 17 insertions(+), 10 deletions(-) diff --git a/test/integration/uexecutor/inbound_initiated_outbound_test.go b/test/integration/uexecutor/inbound_initiated_outbound_test.go index 72a7f067..c47114bd 100644 --- a/test/integration/uexecutor/inbound_initiated_outbound_test.go +++ b/test/integration/uexecutor/inbound_initiated_outbound_test.go @@ -50,10 +50,11 @@ func setupInboundInitiatedOutboundTest(t *testing.T, numVals int) (*app.ChainApp prc20Address := utils.GetDefaultAddresses().PRC20USDCAddr testAddress := utils.GetDefaultAddresses().DefaultTestAddr + usdcAddress := utils.GetDefaultAddresses().ExternalUSDCAddr tokenConfigTest := uregistrytypes.TokenConfig{ Chain: "eip155:11155111", - Address: prc20Address.String(), + Address: usdcAddress.String(), Name: "USD Coin", Symbol: "USDC", Decimals: 6, @@ -146,7 +147,7 @@ func setupInboundInitiatedOutboundTest(t *testing.T, numVals int) (*app.ChainApp Sender: testAddress, Recipient: "", Amount: "1000000", - AssetAddr: prc20Address.String(), + AssetAddr: usdcAddress.String(), LogIndex: "1", TxType: uexecutortypes.TxType_FUNDS_AND_PAYLOAD, UniversalPayload: validUP, @@ -196,7 +197,8 @@ func TestInboundInitiatedOutbound(t *testing.T) { // checks require.Equal(t, "0x1234567890abcdef1234567890abcdef12345678", out.Recipient) require.Equal(t, "1000000", out.Amount) - require.Equal(t, "0x0000000000000000000000000000000000000e06", out.AssetAddr) + require.Equal(t, "0x0000000000000000000000000000000000000e07", out.ExternalAssetAddr) + require.Equal(t, "0x0000000000000000000000000000000000000e06", out.Prc20AssetAddr) require.Equal(t, uexecutortypes.TxType_FUNDS, out.TxType) require.Equal(t, uexecutortypes.Status_PENDING, out.OutboundStatus) }) diff --git a/test/integration/uexecutor/inbound_synthetic_bridge_payload_test.go b/test/integration/uexecutor/inbound_synthetic_bridge_payload_test.go index 5b4fbf31..ffb33174 100644 --- a/test/integration/uexecutor/inbound_synthetic_bridge_payload_test.go +++ b/test/integration/uexecutor/inbound_synthetic_bridge_payload_test.go @@ -44,10 +44,11 @@ func setupInboundBridgePayloadTest(t *testing.T, numVals int) (*app.ChainApp, sd prc20Address := utils.GetDefaultAddresses().PRC20USDCAddr testAddress := utils.GetDefaultAddresses().DefaultTestAddr + usdcAddress := utils.GetDefaultAddresses().ExternalUSDCAddr tokenConfigTest := uregistrytypes.TokenConfig{ Chain: "eip155:11155111", - Address: prc20Address.String(), + Address: usdcAddress.String(), Name: "USD Coin", Symbol: "USDC", Decimals: 6, @@ -133,7 +134,7 @@ func setupInboundBridgePayloadTest(t *testing.T, numVals int) (*app.ChainApp, sd Sender: testAddress, Recipient: "", Amount: "1000000", - AssetAddr: prc20Address.String(), + AssetAddr: usdcAddress.String(), LogIndex: "1", TxType: uexecutortypes.TxType_FUNDS_AND_PAYLOAD, UniversalPayload: validUP, @@ -144,7 +145,8 @@ func setupInboundBridgePayloadTest(t *testing.T, numVals int) (*app.ChainApp, sd } func TestInboundSyntheticBridgePayload(t *testing.T) { - prc20Address := utils.GetDefaultAddresses().PRC20USDCAddr + // prc20Address := utils.GetDefaultAddresses().PRC20USDCAddr + usdcAddress := utils.GetDefaultAddresses().ExternalUSDCAddr t.Run("less than quorum votes keeps inbound pending", func(t *testing.T) { app, ctx, vals, inbound, coreVals, _ := setupInboundBridgePayloadTest(t, 4) @@ -199,7 +201,7 @@ func TestInboundSyntheticBridgePayload(t *testing.T) { Sender: utils.GetDefaultAddresses().TargetAddr2, Recipient: "", Amount: "1000000", - AssetAddr: prc20Address.String(), + AssetAddr: usdcAddress.String(), LogIndex: "1", TxType: uexecutortypes.TxType_FUNDS_AND_PAYLOAD, UniversalPayload: validUP, diff --git a/test/integration/uexecutor/inbound_synthetic_bridge_test.go b/test/integration/uexecutor/inbound_synthetic_bridge_test.go index 1b3059d8..8031c07a 100644 --- a/test/integration/uexecutor/inbound_synthetic_bridge_test.go +++ b/test/integration/uexecutor/inbound_synthetic_bridge_test.go @@ -49,10 +49,11 @@ func setupInboundBridgeTest(t *testing.T, numVals int) (*app.ChainApp, sdk.Conte prc20Address := utils.GetDefaultAddresses().PRC20USDCAddr testAddress := utils.GetDefaultAddresses().DefaultTestAddr + usdcAddress := utils.GetDefaultAddresses().ExternalUSDCAddr tokenConfigTest := uregistrytypes.TokenConfig{ Chain: "eip155:11155111", - Address: prc20Address.String(), + Address: usdcAddress.String(), Name: "USD Coin", Symbol: "USDC", Decimals: 6, @@ -114,7 +115,7 @@ func setupInboundBridgeTest(t *testing.T, numVals int) (*app.ChainApp, sdk.Conte Sender: testAddress, Recipient: testAddress, Amount: "1000000", - AssetAddr: prc20Address.String(), + AssetAddr: usdcAddress.String(), LogIndex: "1", TxType: uexecutortypes.TxType_FUNDS, UniversalPayload: nil, @@ -398,7 +399,7 @@ func TestInboundSyntheticBridge(t *testing.T) { foundRevert = true require.Equal(t, inbound.SourceChain, ob.DestinationChain) require.Equal(t, inbound.Amount, ob.Amount) - require.Equal(t, inbound.AssetAddr, ob.AssetAddr) + require.Equal(t, inbound.AssetAddr, ob.ExternalAssetAddr) } } diff --git a/test/utils/constants.go b/test/utils/constants.go index 13f02331..dd88f68a 100644 --- a/test/utils/constants.go +++ b/test/utils/constants.go @@ -13,6 +13,7 @@ type Addresses struct { EVMImplAddr common.Address HandlerAddr common.Address PRC20USDCAddr common.Address + ExternalUSDCAddr common.Address UniversalGatewayPCAddr common.Address // Account addresses (hex format) @@ -33,6 +34,7 @@ func GetDefaultAddresses() Addresses { EVMImplAddr: common.HexToAddress("0x0000000000000000000000000000000000000e01"), HandlerAddr: common.HexToAddress("0x00000000000000000000000000000000000000C0"), PRC20USDCAddr: common.HexToAddress("0x0000000000000000000000000000000000000e06"), + ExternalUSDCAddr: common.HexToAddress("0x0000000000000000000000000000000000000e07"), UniversalGatewayPCAddr: common.HexToAddress("0x00000000000000000000000000000000000000B0"), DefaultTestAddr: "0x778d3206374f8ac265728e18e3fe2ae6b93e4ce4", CosmosTestAddr: "cosmos18pjnzwr9xdnx2vnpv5mxywfnv56xxef5cludl5", From 6b524bb65a5643abd65a4e872417e889f8bab33d Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Tue, 16 Dec 2025 16:41:03 +0530 Subject: [PATCH 090/120] chore: added generated protobuf --- x/uexecutor/types/types.pb.go | 320 ++++++++++++++++++++-------------- 1 file changed, 188 insertions(+), 132 deletions(-) diff --git a/x/uexecutor/types/types.pb.go b/x/uexecutor/types/types.pb.go index 0ce76679..4fa5acc6 100644 --- a/x/uexecutor/types/types.pb.go +++ b/x/uexecutor/types/types.pb.go @@ -756,17 +756,18 @@ type OutboundTx struct { DestinationChain string `protobuf:"bytes,1,opt,name=destination_chain,json=destinationChain,proto3" json:"destination_chain,omitempty"` Recipient string `protobuf:"bytes,2,opt,name=recipient,proto3" json:"recipient,omitempty"` Amount string `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount,omitempty"` - AssetAddr string `protobuf:"bytes,4,opt,name=asset_addr,json=assetAddr,proto3" json:"asset_addr,omitempty"` - Sender string `protobuf:"bytes,5,opt,name=sender,proto3" json:"sender,omitempty"` - Payload string `protobuf:"bytes,6,opt,name=payload,proto3" json:"payload,omitempty"` - GasLimit string `protobuf:"bytes,7,opt,name=gas_limit,json=gasLimit,proto3" json:"gas_limit,omitempty"` - TxType TxType `protobuf:"varint,8,opt,name=tx_type,json=txType,proto3,enum=uexecutor.v1.TxType" json:"tx_type,omitempty"` - PcTx *OriginatingPcTx `protobuf:"bytes,9,opt,name=pc_tx,json=pcTx,proto3" json:"pc_tx,omitempty"` - ObservedTx *OutboundObservation `protobuf:"bytes,10,opt,name=observed_tx,json=observedTx,proto3" json:"observed_tx,omitempty"` - Id string `protobuf:"bytes,11,opt,name=id,proto3" json:"id,omitempty"` - OutboundStatus Status `protobuf:"varint,12,opt,name=outbound_status,json=outboundStatus,proto3,enum=uexecutor.v1.Status" json:"outbound_status,omitempty"` - RevertInstructions *RevertInstructions `protobuf:"bytes,13,opt,name=revert_instructions,json=revertInstructions,proto3" json:"revert_instructions,omitempty"` - PcRevertExecution *PCTx `protobuf:"bytes,14,opt,name=pc_revert_execution,json=pcRevertExecution,proto3" json:"pc_revert_execution,omitempty"` + ExternalAssetAddr string `protobuf:"bytes,4,opt,name=external_asset_addr,json=externalAssetAddr,proto3" json:"external_asset_addr,omitempty"` + Prc20AssetAddr string `protobuf:"bytes,5,opt,name=prc20_asset_addr,json=prc20AssetAddr,proto3" json:"prc20_asset_addr,omitempty"` + Sender string `protobuf:"bytes,6,opt,name=sender,proto3" json:"sender,omitempty"` + Payload string `protobuf:"bytes,7,opt,name=payload,proto3" json:"payload,omitempty"` + GasLimit string `protobuf:"bytes,8,opt,name=gas_limit,json=gasLimit,proto3" json:"gas_limit,omitempty"` + TxType TxType `protobuf:"varint,9,opt,name=tx_type,json=txType,proto3,enum=uexecutor.v1.TxType" json:"tx_type,omitempty"` + PcTx *OriginatingPcTx `protobuf:"bytes,10,opt,name=pc_tx,json=pcTx,proto3" json:"pc_tx,omitempty"` + ObservedTx *OutboundObservation `protobuf:"bytes,11,opt,name=observed_tx,json=observedTx,proto3" json:"observed_tx,omitempty"` + Id string `protobuf:"bytes,12,opt,name=id,proto3" json:"id,omitempty"` + OutboundStatus Status `protobuf:"varint,13,opt,name=outbound_status,json=outboundStatus,proto3,enum=uexecutor.v1.Status" json:"outbound_status,omitempty"` + RevertInstructions *RevertInstructions `protobuf:"bytes,14,opt,name=revert_instructions,json=revertInstructions,proto3" json:"revert_instructions,omitempty"` + PcRevertExecution *PCTx `protobuf:"bytes,15,opt,name=pc_revert_execution,json=pcRevertExecution,proto3" json:"pc_revert_execution,omitempty"` } func (m *OutboundTx) Reset() { *m = OutboundTx{} } @@ -822,9 +823,16 @@ func (m *OutboundTx) GetAmount() string { return "" } -func (m *OutboundTx) GetAssetAddr() string { +func (m *OutboundTx) GetExternalAssetAddr() string { if m != nil { - return m.AssetAddr + return m.ExternalAssetAddr + } + return "" +} + +func (m *OutboundTx) GetPrc20AssetAddr() string { + if m != nil { + return m.Prc20AssetAddr } return "" } @@ -994,99 +1002,101 @@ func init() { func init() { proto.RegisterFile("uexecutor/v1/types.proto", fileDescriptor_fab6d3ca71d1e2a5) } var fileDescriptor_fab6d3ca71d1e2a5 = []byte{ - // 1461 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x57, 0x4b, 0x6f, 0xdb, 0x46, - 0x10, 0x36, 0xf5, 0xd6, 0xc8, 0xb1, 0xa8, 0xb5, 0x9d, 0x30, 0x0f, 0xcb, 0x8e, 0xd2, 0x34, 0x86, - 0x8b, 0xd8, 0x48, 0xda, 0x06, 0xa8, 0x80, 0x1e, 0x64, 0x89, 0x76, 0xd4, 0xba, 0x92, 0x4a, 0x49, - 0x46, 0xda, 0xcb, 0x62, 0x4d, 0x6e, 0x24, 0xa2, 0x12, 0x29, 0xf0, 0xa1, 0xd2, 0x87, 0x9e, 0x7a, - 0xeb, 0xa1, 0xe8, 0x31, 0xc7, 0x1c, 0x7b, 0x6c, 0xff, 0x45, 0x8e, 0x39, 0x16, 0xe8, 0xa5, 0x48, - 0x0e, 0x2d, 0xd0, 0x3f, 0x51, 0xec, 0x92, 0x14, 0x49, 0xd9, 0x0e, 0xda, 0x5e, 0x24, 0xce, 0x63, - 0x67, 0xbf, 0x99, 0xf9, 0x66, 0x28, 0x81, 0xe4, 0x52, 0x8f, 0xaa, 0xae, 0x63, 0x5a, 0x07, 0xf3, - 0x47, 0x07, 0xce, 0xf9, 0x8c, 0xda, 0xfb, 0x33, 0xcb, 0x74, 0x4c, 0xb4, 0xba, 0xb0, 0xec, 0xcf, - 0x1f, 0xdd, 0xda, 0x18, 0x99, 0x23, 0x93, 0x1b, 0x0e, 0xd8, 0x93, 0xef, 0x73, 0xab, 0x42, 0xa6, - 0xba, 0x61, 0x1e, 0xf0, 0x4f, 0x5f, 0x55, 0x3b, 0x82, 0x5c, 0x8f, 0x58, 0x64, 0x6a, 0xa3, 0x2d, - 0x00, 0xdb, 0x9c, 0x52, 0x3c, 0x27, 0x13, 0x97, 0x4a, 0xa9, 0x1d, 0x61, 0xb7, 0xa0, 0x14, 0x99, - 0xe6, 0x94, 0x29, 0xea, 0x5b, 0x2f, 0x5e, 0x6e, 0xaf, 0xfc, 0xf5, 0x72, 0x5b, 0xf8, 0xe1, 0xcf, - 0x5f, 0xf6, 0xc4, 0x08, 0xc6, 0x8c, 0x9f, 0xae, 0xfd, 0x9e, 0x02, 0x71, 0x68, 0xe8, 0x73, 0x6a, - 0xd9, 0x64, 0xd2, 0x23, 0xe7, 0x13, 0x93, 0x68, 0x68, 0x0d, 0x52, 0x8e, 0x29, 0x09, 0x3b, 0xc2, - 0x6e, 0x51, 0x49, 0x39, 0x26, 0xda, 0x80, 0x6c, 0x14, 0xbd, 0xa8, 0xf8, 0x02, 0x42, 0x90, 0xd1, - 0x88, 0x43, 0xa4, 0x34, 0x57, 0xf2, 0x67, 0x74, 0x1b, 0x8a, 0x23, 0x62, 0xe3, 0x89, 0x3e, 0xd5, - 0x1d, 0x29, 0xc3, 0x0d, 0x85, 0x11, 0xb1, 0x4f, 0x98, 0x8c, 0xee, 0x43, 0x79, 0x4a, 0x3c, 0xfc, - 0x9c, 0x52, 0x3c, 0xa3, 0x16, 0x1e, 0x11, 0x5b, 0xca, 0x72, 0x97, 0xd5, 0x29, 0xf1, 0x8e, 0x28, - 0xed, 0x51, 0xeb, 0x98, 0xd8, 0xe8, 0x09, 0x48, 0xcc, 0x6d, 0x66, 0xe9, 0xa6, 0xa5, 0x3b, 0xe7, - 0x09, 0xff, 0x1c, 0xf7, 0xdf, 0x98, 0x12, 0xaf, 0x17, 0x98, 0xa3, 0x73, 0x1b, 0x90, 0x35, 0x4c, - 0x43, 0xa5, 0x52, 0xde, 0x47, 0xc9, 0x05, 0x74, 0x0b, 0x0a, 0x1a, 0x25, 0xda, 0x44, 0x37, 0xa8, - 0x54, 0xf0, 0x01, 0x85, 0x32, 0xfa, 0x18, 0x72, 0x73, 0xcc, 0x9a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, 0xf7, - 0xe6, 0x2c, 0xc7, 0xff, 0xa8, 0x7c, 0xf8, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x13, 0x7e, 0xb5, - 0xc7, 0xfb, 0x0c, 0x00, 0x00, + // 1500 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x57, 0xcd, 0x6f, 0xdb, 0x46, + 0x16, 0x37, 0xf5, 0xad, 0x27, 0x47, 0xa2, 0xc6, 0x76, 0xc2, 0x7c, 0x58, 0x76, 0x94, 0xcd, 0xc6, + 0xf0, 0x22, 0xf6, 0xc6, 0xbb, 0x1b, 0x60, 0x05, 0xec, 0x41, 0x96, 0x68, 0x47, 0xbb, 0x5e, 0x49, + 0xa5, 0x24, 0x23, 0xed, 0x65, 0x30, 0x26, 0x27, 0x12, 0x51, 0x89, 0x14, 0xf8, 0xa1, 0xd2, 0x87, + 0x9e, 0x7a, 0xeb, 0xa9, 0xc7, 0x1c, 0x73, 0xec, 0xb1, 0xfd, 0x2f, 0xd2, 0x5b, 0x8e, 0x05, 0x7a, + 0x29, 0x92, 0x43, 0x0b, 0xf4, 0x9f, 0x28, 0x66, 0x48, 0x8a, 0xa4, 0x6c, 0x17, 0x41, 0x2f, 0xd2, + 0xbc, 0x8f, 0x79, 0xf3, 0x9b, 0xf7, 0x7e, 0xef, 0x8d, 0x04, 0x92, 0x4b, 0x3d, 0xaa, 0xba, 0x8e, + 0x69, 0x1d, 0x2e, 0x9e, 0x1d, 0x3a, 0x97, 0x73, 0x6a, 0x1f, 0xcc, 0x2d, 0xd3, 0x31, 0xd1, 0xfa, + 0xd2, 0x72, 0xb0, 0x78, 0x76, 0x6f, 0x73, 0x6c, 0x8e, 0x4d, 0x6e, 0x38, 0x64, 0x2b, 0xdf, 0xe7, + 0x5e, 0x95, 0xcc, 0x74, 0xc3, 0x3c, 0xe4, 0x9f, 0xbe, 0xaa, 0x7e, 0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df, 0xd7, 0x84, 0x6f, 0x3e, 0xd4, 0xd6, 0xde, 0x7d, + 0xa8, 0xad, 0xfd, 0xf8, 0xa1, 0xb6, 0xf6, 0xd9, 0xf3, 0xb1, 0xee, 0x4c, 0xdc, 0x8b, 0x03, 0xd5, + 0x9c, 0x1d, 0xce, 0x5d, 0x7b, 0xc2, 0x1f, 0x05, 0xbe, 0x7a, 0xca, 0x97, 0x4f, 0x0d, 0x53, 0xa3, + 0x87, 0xde, 0x61, 0x44, 0x35, 0xfe, 0xcf, 0xe8, 0x22, 0xc7, 0xff, 0xe3, 0xfc, 0xe3, 0xf7, 0x00, + 0x00, 0x00, 0xff, 0xff, 0x14, 0x3f, 0xa8, 0xf4, 0x36, 0x0d, 0x00, 0x00, } func (this *Params) Equal(that interface{}) bool { @@ -1396,7 +1406,10 @@ func (this *OutboundTx) Equal(that interface{}) bool { if this.Amount != that1.Amount { return false } - if this.AssetAddr != that1.AssetAddr { + if this.ExternalAssetAddr != that1.ExternalAssetAddr { + return false + } + if this.Prc20AssetAddr != that1.Prc20AssetAddr { return false } if this.Sender != that1.Sender { @@ -1956,7 +1969,7 @@ func (m *OutboundTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintTypes(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x72 + dAtA[i] = 0x7a } if m.RevertInstructions != nil { { @@ -1968,19 +1981,19 @@ func (m *OutboundTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintTypes(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x6a + dAtA[i] = 0x72 } if m.OutboundStatus != 0 { i = encodeVarintTypes(dAtA, i, uint64(m.OutboundStatus)) i-- - dAtA[i] = 0x60 + dAtA[i] = 0x68 } if len(m.Id) > 0 { i -= len(m.Id) copy(dAtA[i:], m.Id) i = encodeVarintTypes(dAtA, i, uint64(len(m.Id))) i-- - dAtA[i] = 0x5a + dAtA[i] = 0x62 } if m.ObservedTx != nil { { @@ -1992,7 +2005,7 @@ func (m *OutboundTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintTypes(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x52 + dAtA[i] = 0x5a } if m.PcTx != nil { { @@ -2004,38 +2017,45 @@ func (m *OutboundTx) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintTypes(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x4a + dAtA[i] = 0x52 } if m.TxType != 0 { i = encodeVarintTypes(dAtA, i, uint64(m.TxType)) i-- - dAtA[i] = 0x40 + dAtA[i] = 0x48 } if len(m.GasLimit) > 0 { i -= len(m.GasLimit) copy(dAtA[i:], m.GasLimit) i = encodeVarintTypes(dAtA, i, uint64(len(m.GasLimit))) i-- - dAtA[i] = 0x3a + dAtA[i] = 0x42 } if len(m.Payload) > 0 { i -= len(m.Payload) copy(dAtA[i:], m.Payload) i = encodeVarintTypes(dAtA, i, uint64(len(m.Payload))) i-- - dAtA[i] = 0x32 + dAtA[i] = 0x3a } if len(m.Sender) > 0 { i -= len(m.Sender) copy(dAtA[i:], m.Sender) i = encodeVarintTypes(dAtA, i, uint64(len(m.Sender))) i-- + dAtA[i] = 0x32 + } + if len(m.Prc20AssetAddr) > 0 { + i -= len(m.Prc20AssetAddr) + copy(dAtA[i:], m.Prc20AssetAddr) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Prc20AssetAddr))) + i-- dAtA[i] = 0x2a } - if len(m.AssetAddr) > 0 { - i -= len(m.AssetAddr) - copy(dAtA[i:], m.AssetAddr) - i = encodeVarintTypes(dAtA, i, uint64(len(m.AssetAddr))) + if len(m.ExternalAssetAddr) > 0 { + i -= len(m.ExternalAssetAddr) + copy(dAtA[i:], m.ExternalAssetAddr) + i = encodeVarintTypes(dAtA, i, uint64(len(m.ExternalAssetAddr))) i-- dAtA[i] = 0x22 } @@ -2380,7 +2400,11 @@ func (m *OutboundTx) Size() (n int) { if l > 0 { n += 1 + l + sovTypes(uint64(l)) } - l = len(m.AssetAddr) + l = len(m.ExternalAssetAddr) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.Prc20AssetAddr) if l > 0 { n += 1 + l + sovTypes(uint64(l)) } @@ -4093,7 +4117,7 @@ func (m *OutboundTx) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AssetAddr", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ExternalAssetAddr", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -4121,9 +4145,41 @@ func (m *OutboundTx) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.AssetAddr = string(dAtA[iNdEx:postIndex]) + m.ExternalAssetAddr = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Prc20AssetAddr", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Prc20AssetAddr = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) } @@ -4155,7 +4211,7 @@ func (m *OutboundTx) Unmarshal(dAtA []byte) error { } m.Sender = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 6: + case 7: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Payload", wireType) } @@ -4187,7 +4243,7 @@ func (m *OutboundTx) Unmarshal(dAtA []byte) error { } m.Payload = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 7: + case 8: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field GasLimit", wireType) } @@ -4219,7 +4275,7 @@ func (m *OutboundTx) Unmarshal(dAtA []byte) error { } m.GasLimit = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 8: + case 9: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field TxType", wireType) } @@ -4238,7 +4294,7 @@ func (m *OutboundTx) Unmarshal(dAtA []byte) error { break } } - case 9: + case 10: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field PcTx", wireType) } @@ -4274,7 +4330,7 @@ func (m *OutboundTx) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 10: + case 11: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ObservedTx", wireType) } @@ -4310,7 +4366,7 @@ func (m *OutboundTx) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 11: + case 12: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) } @@ -4342,7 +4398,7 @@ func (m *OutboundTx) Unmarshal(dAtA []byte) error { } m.Id = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 12: + case 13: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field OutboundStatus", wireType) } @@ -4361,7 +4417,7 @@ func (m *OutboundTx) Unmarshal(dAtA []byte) error { break } } - case 13: + case 14: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RevertInstructions", wireType) } @@ -4397,7 +4453,7 @@ func (m *OutboundTx) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex - case 14: + case 15: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field PcRevertExecution", wireType) } From ec02a3e444314b72d125f0369c95230ebc856562 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Fri, 19 Dec 2025 13:57:47 +0530 Subject: [PATCH 091/120] feat: updated the revert outbound ID --- x/uexecutor/types/keys.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/x/uexecutor/types/keys.go b/x/uexecutor/types/keys.go index 62406cac..e2f2c1e2 100755 --- a/x/uexecutor/types/keys.go +++ b/x/uexecutor/types/keys.go @@ -87,6 +87,8 @@ func GetOutboundId( } // Outbound Id for a inbound revert tx -func GetOutboundRevertId() string { - return "0" +func GetOutboundRevertId(inboundTxHash string) string { + data := fmt.Sprintf("%s:REVERT", inboundTxHash) + hash := sha256.Sum256([]byte(data)) + return hex.EncodeToString(hash[:]) } From 7ca86714b4a38338b41319efdce2ea7481136f34 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Fri, 19 Dec 2025 13:58:17 +0530 Subject: [PATCH 092/120] feat: updated revert outbound id in inbound impl --- x/uexecutor/keeper/execute_inbound_funds.go | 2 +- x/uexecutor/keeper/execute_inbound_funds_and_payload.go | 2 +- x/uexecutor/keeper/execute_inbound_gas.go | 2 +- x/uexecutor/keeper/execute_inbound_gas_and_payload.go | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/x/uexecutor/keeper/execute_inbound_funds.go b/x/uexecutor/keeper/execute_inbound_funds.go index 138ffbef..e99d5935 100644 --- a/x/uexecutor/keeper/execute_inbound_funds.go +++ b/x/uexecutor/keeper/execute_inbound_funds.go @@ -64,7 +64,7 @@ func (k Keeper) ExecuteInboundFunds(ctx context.Context, utx types.UniversalTx) Sender: inbound.Sender, TxType: types.TxType_INBOUND_REVERT, OutboundStatus: types.Status_PENDING, - Id: types.GetOutboundRevertId(), + Id: types.GetOutboundRevertId(inbound.TxHash), } _ = k.attachOutboundsToUtx(sdkCtx, utx.Id, []*types.OutboundTx{&revertOutbound}, err.Error()) } diff --git a/x/uexecutor/keeper/execute_inbound_funds_and_payload.go b/x/uexecutor/keeper/execute_inbound_funds_and_payload.go index b396e7fc..d96c4089 100644 --- a/x/uexecutor/keeper/execute_inbound_funds_and_payload.go +++ b/x/uexecutor/keeper/execute_inbound_funds_and_payload.go @@ -98,7 +98,7 @@ func (k Keeper) ExecuteInboundFundsAndPayload(ctx context.Context, utx types.Uni Sender: utx.InboundTx.Sender, TxType: types.TxType_INBOUND_REVERT, OutboundStatus: types.Status_PENDING, - Id: types.GetOutboundRevertId(), + Id: types.GetOutboundRevertId(utx.InboundTx.TxHash), } _ = k.attachOutboundsToUtx( diff --git a/x/uexecutor/keeper/execute_inbound_gas.go b/x/uexecutor/keeper/execute_inbound_gas.go index 7527fbc2..f1388e8e 100644 --- a/x/uexecutor/keeper/execute_inbound_gas.go +++ b/x/uexecutor/keeper/execute_inbound_gas.go @@ -137,7 +137,7 @@ func (k Keeper) ExecuteInboundGas(ctx context.Context, inbound types.Inbound) er Sender: inbound.Sender, TxType: types.TxType_INBOUND_REVERT, OutboundStatus: types.Status_PENDING, - Id: types.GetOutboundRevertId(), + Id: types.GetOutboundRevertId(inbound.TxHash), } _ = k.attachOutboundsToUtx( diff --git a/x/uexecutor/keeper/execute_inbound_gas_and_payload.go b/x/uexecutor/keeper/execute_inbound_gas_and_payload.go index c6e17663..cb90282e 100644 --- a/x/uexecutor/keeper/execute_inbound_gas_and_payload.go +++ b/x/uexecutor/keeper/execute_inbound_gas_and_payload.go @@ -143,7 +143,7 @@ func (k Keeper) ExecuteInboundGasAndPayload(ctx context.Context, utx types.Unive Sender: utx.InboundTx.Sender, TxType: types.TxType_INBOUND_REVERT, OutboundStatus: types.Status_PENDING, - Id: types.GetOutboundRevertId(), + Id: types.GetOutboundRevertId(utx.InboundTx.TxHash), } _ = k.attachOutboundsToUtx( From 2657251dbddaf852ec67e280d36f827142754894 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Fri, 19 Dec 2025 14:07:27 +0530 Subject: [PATCH 093/120] feat: updated MsgVoteOutbound protobuf encoding amino name --- proto/uexecutor/v1/tx.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proto/uexecutor/v1/tx.proto b/proto/uexecutor/v1/tx.proto index ddb8e163..c452fecf 100755 --- a/proto/uexecutor/v1/tx.proto +++ b/proto/uexecutor/v1/tx.proto @@ -159,7 +159,7 @@ message MsgVoteInboundResponse {} // MsgVoteOutbound allows a universal validator to vote on an outbound tx observation. message MsgVoteOutbound { - option (amino.name) = "ue/MsgVoteOutbound"; + option (amino.name) = "uexecutor/MsgVoteOutbound"; option (cosmos.msg.v1.signer) = "signer"; // signer is the Cosmos address initiating the tx (used for tx signing) From e3db357c24c2e4c5f49a180fbeaf6164803a6df2 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Fri, 19 Dec 2025 14:07:39 +0530 Subject: [PATCH 094/120] chore: added generated protobuf --- api/uexecutor/v1/tx.pulsar.go | 143 +++++++++++++++++----------------- 1 file changed, 72 insertions(+), 71 deletions(-) diff --git a/api/uexecutor/v1/tx.pulsar.go b/api/uexecutor/v1/tx.pulsar.go index b154f3f1..0bd51284 100644 --- a/api/uexecutor/v1/tx.pulsar.go +++ b/api/uexecutor/v1/tx.pulsar.go @@ -8279,7 +8279,7 @@ var file_uexecutor_v1_tx_proto_rawDesc = []byte{ 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x11, 0x75, 0x65, 0x2f, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x22, 0x18, 0x0a, 0x16, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xc0, 0x01, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x56, 0x6f, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xc7, 0x01, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x30, 0x0a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, @@ -8289,79 +8289,80 @@ var file_uexecutor_v1_tx_proto_rawDesc = []byte{ 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x4f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x6f, 0x62, 0x73, 0x65, 0x72, - 0x76, 0x65, 0x64, 0x54, 0x78, 0x3a, 0x22, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x69, 0x67, 0x6e, - 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x12, 0x75, 0x65, 0x2f, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, - 0x65, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x73, 0x67, - 0x56, 0x6f, 0x74, 0x65, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xd3, 0x01, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, - 0x47, 0x61, 0x73, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x30, 0x0a, 0x06, 0x73, 0x69, 0x67, 0x6e, - 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, - 0x6e, 0x67, 0x52, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x12, 0x2a, 0x0a, 0x11, 0x6f, 0x62, - 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x43, - 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x12, 0x21, 0x0a, 0x0c, - 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x3a, - 0x29, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, - 0x19, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2f, 0x4d, 0x73, 0x67, 0x56, 0x6f, - 0x74, 0x65, 0x47, 0x61, 0x73, 0x50, 0x72, 0x69, 0x63, 0x65, 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x73, - 0x67, 0x56, 0x6f, 0x74, 0x65, 0x47, 0x61, 0x73, 0x50, 0x72, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x9e, 0x05, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x54, 0x0a, - 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1d, 0x2e, - 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x25, 0x2e, 0x75, - 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x4b, 0x0a, 0x09, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x55, 0x45, 0x41, - 0x12, 0x1a, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, - 0x4d, 0x73, 0x67, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x55, 0x45, 0x41, 0x1a, 0x22, 0x2e, 0x75, - 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x44, - 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x55, 0x45, 0x41, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x42, 0x0a, 0x06, 0x4d, 0x69, 0x6e, 0x74, 0x50, 0x43, 0x12, 0x17, 0x2e, 0x75, 0x65, 0x78, + 0x76, 0x65, 0x64, 0x54, 0x78, 0x3a, 0x29, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x69, 0x67, 0x6e, + 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x19, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, + 0x2f, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, + 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x4f, 0x75, 0x74, 0x62, 0x6f, + 0x75, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xd3, 0x01, 0x0a, 0x0f, + 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x47, 0x61, 0x73, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, + 0x30, 0x0a, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x06, 0x73, 0x69, 0x67, 0x6e, 0x65, + 0x72, 0x12, 0x2a, 0x0a, 0x11, 0x6f, 0x62, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, 0x63, 0x68, + 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x6f, 0x62, + 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x14, 0x0a, + 0x05, 0x70, 0x72, 0x69, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x05, 0x70, 0x72, + 0x69, 0x63, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x6e, 0x75, 0x6d, + 0x62, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, 0x6c, 0x6f, 0x63, 0x6b, + 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x3a, 0x29, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x69, 0x67, + 0x6e, 0x65, 0x72, 0x8a, 0xe7, 0xb0, 0x2a, 0x19, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, + 0x72, 0x2f, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x47, 0x61, 0x73, 0x50, 0x72, 0x69, 0x63, + 0x65, 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x47, 0x61, 0x73, 0x50, + 0x72, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x9e, 0x05, 0x0a, + 0x03, 0x4d, 0x73, 0x67, 0x12, 0x54, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1d, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, + 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, + 0x61, 0x6d, 0x73, 0x1a, 0x25, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, + 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, + 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4b, 0x0a, 0x09, 0x44, 0x65, + 0x70, 0x6c, 0x6f, 0x79, 0x55, 0x45, 0x41, 0x12, 0x1a, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, + 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, + 0x55, 0x45, 0x41, 0x1a, 0x22, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, + 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x55, 0x45, 0x41, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x06, 0x4d, 0x69, 0x6e, 0x74, 0x50, + 0x43, 0x12, 0x17, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, + 0x2e, 0x4d, 0x73, 0x67, 0x4d, 0x69, 0x6e, 0x74, 0x50, 0x43, 0x1a, 0x1f, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x4d, 0x69, 0x6e, - 0x74, 0x50, 0x43, 0x1a, 0x1f, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, - 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x4d, 0x69, 0x6e, 0x74, 0x50, 0x43, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5a, 0x0a, 0x0e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x50, - 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x1f, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, - 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, - 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x1a, 0x27, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, - 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, - 0x65, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x4e, 0x0a, 0x0a, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x55, 0x45, 0x41, 0x12, 0x1b, - 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, - 0x67, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x55, 0x45, 0x41, 0x1a, 0x23, 0x2e, 0x75, 0x65, - 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x4d, 0x69, - 0x67, 0x72, 0x61, 0x74, 0x65, 0x55, 0x45, 0x41, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x51, 0x0a, 0x0b, 0x56, 0x6f, 0x74, 0x65, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x12, - 0x1c, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, - 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x1a, 0x24, 0x2e, + 0x74, 0x50, 0x43, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5a, 0x0a, 0x0e, 0x45, + 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x1f, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, - 0x56, 0x6f, 0x74, 0x65, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x54, 0x0a, 0x0c, 0x56, 0x6f, 0x74, 0x65, 0x4f, 0x75, 0x74, 0x62, 0x6f, - 0x75, 0x6e, 0x64, 0x12, 0x1d, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, - 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, - 0x6e, 0x64, 0x1a, 0x25, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, - 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, - 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x54, 0x0a, 0x0c, 0x56, 0x6f, 0x74, - 0x65, 0x47, 0x61, 0x73, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x1d, 0x2e, 0x75, 0x65, 0x78, 0x65, + 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x1a, 0x27, + 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, + 0x67, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4e, 0x0a, 0x0a, 0x4d, 0x69, 0x67, 0x72, 0x61, + 0x74, 0x65, 0x55, 0x45, 0x41, 0x12, 0x1b, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, + 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x55, + 0x45, 0x41, 0x1a, 0x23, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, + 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x65, 0x55, 0x45, 0x41, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x0b, 0x56, 0x6f, 0x74, 0x65, 0x49, + 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x1c, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x49, 0x6e, 0x62, + 0x6f, 0x75, 0x6e, 0x64, 0x1a, 0x24, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, + 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x49, 0x6e, 0x62, 0x6f, 0x75, + 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x54, 0x0a, 0x0c, 0x56, 0x6f, + 0x74, 0x65, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x12, 0x1d, 0x2e, 0x75, 0x65, 0x78, + 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, + 0x65, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x1a, 0x25, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, - 0x47, 0x61, 0x73, 0x50, 0x72, 0x69, 0x63, 0x65, 0x1a, 0x25, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, - 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x47, - 0x61, 0x73, 0x50, 0x72, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, - 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xaf, 0x01, 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x75, - 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x41, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2f, 0x70, 0x75, 0x73, - 0x68, 0x2d, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2d, 0x6e, 0x6f, 0x64, 0x65, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2f, 0x76, 0x31, 0x3b, 0x75, 0x65, - 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x55, 0x58, 0x58, 0xaa, - 0x02, 0x0c, 0x55, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x56, 0x31, 0xca, 0x02, - 0x0c, 0x55, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x18, - 0x55, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, - 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0d, 0x55, 0x65, 0x78, 0x65, 0x63, - 0x75, 0x74, 0x6f, 0x72, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x54, 0x0a, 0x0c, 0x56, 0x6f, 0x74, 0x65, 0x47, 0x61, 0x73, 0x50, 0x72, 0x69, 0x63, 0x65, + 0x12, 0x1d, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, + 0x4d, 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x47, 0x61, 0x73, 0x50, 0x72, 0x69, 0x63, 0x65, 0x1a, + 0x25, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, 0x76, 0x31, 0x2e, 0x4d, + 0x73, 0x67, 0x56, 0x6f, 0x74, 0x65, 0x47, 0x61, 0x73, 0x50, 0x72, 0x69, 0x63, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xaf, 0x01, + 0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x2e, + 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x41, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x63, 0x68, + 0x61, 0x69, 0x6e, 0x2f, 0x70, 0x75, 0x73, 0x68, 0x2d, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x2d, 0x6e, + 0x6f, 0x64, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, + 0x72, 0x2f, 0x76, 0x31, 0x3b, 0x75, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x76, 0x31, + 0xa2, 0x02, 0x03, 0x55, 0x58, 0x58, 0xaa, 0x02, 0x0c, 0x55, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x6f, 0x72, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0c, 0x55, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, + 0x72, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x18, 0x55, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, + 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, + 0x02, 0x0d, 0x55, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x6f, 0x72, 0x3a, 0x3a, 0x56, 0x31, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( From 31d1d72c8cd7f33d4d1eedd413465312849066bb Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Fri, 19 Dec 2025 14:07:44 +0530 Subject: [PATCH 095/120] chore: added generated protobuf --- x/uexecutor/types/tx.pb.go | 122 ++++++++++++++++++------------------- 1 file changed, 61 insertions(+), 61 deletions(-) diff --git a/x/uexecutor/types/tx.pb.go b/x/uexecutor/types/tx.pb.go index 62fcd68a..0e1ead47 100644 --- a/x/uexecutor/types/tx.pb.go +++ b/x/uexecutor/types/tx.pb.go @@ -880,67 +880,67 @@ func init() { func init() { proto.RegisterFile("uexecutor/v1/tx.proto", fileDescriptor_88d6216044506365) } var fileDescriptor_88d6216044506365 = []byte{ - // 951 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x96, 0xbf, 0x6f, 0xdb, 0x46, - 0x14, 0xc7, 0x4d, 0x5b, 0x56, 0xa0, 0x27, 0x35, 0xb1, 0x68, 0x39, 0x92, 0xe9, 0x44, 0xb1, 0x99, - 0xb6, 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0f, 0x00, 0x00, 0xff, 0xff, 0x9f, - 0x1a, 0x67, 0x88, 0x70, 0x0b, 0x00, 0x00, + // 950 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x56, 0xbf, 0x6f, 0xdb, 0x46, + 0x14, 0x36, 0x6d, 0x59, 0x81, 0x9e, 0xd4, 0xc4, 0xa2, 0xe5, 0x48, 0xa6, 0x13, 0xc5, 0x66, 0xda, + 0xc6, 0x75, 0x6a, 0xb1, 0x71, 0x81, 0x0c, 0xda, 0xac, 0xc4, 0x68, 0x0d, 0x43, 0x89, 0xca, 0xda, + 0x1d, 0xb2, 0x08, 0x27, 0xf1, 0x4a, 0x11, 0xb5, 0x78, 0x04, 0xef, 0x28, 0xd0, 0x5b, 0xd1, 0xb1, + 0x53, 0xa7, 0x8e, 0xdd, 0x8b, 0x2e, 0x1e, 0xfa, 0x07, 0x74, 0x6b, 0xb6, 0x06, 0x2d, 0x0a, 0x74, + 0x2a, 0x0a, 0x7b, 0xf0, 0xbf, 0x51, 0xf0, 0x48, 0x1e, 0x7f, 0x48, 0x76, 0x02, 0x4f, 0x5e, 0x84, + 0xe3, 0xf7, 0xbd, 0xf7, 0xf1, 0x7d, 0xef, 0xee, 0xf4, 0x08, 0x2b, 0x1e, 0xf6, 0xf1, 0xd0, 0x63, + 0xc4, 0xd5, 0x26, 0x4f, 0x34, 0xe6, 0xb7, 0x1c, 0x97, 0x30, 0x22, 0x57, 0x04, 0xdc, 0x9a, 0x3c, + 0x51, 0xaa, 0x68, 0x6c, 0xd9, 0x44, 0xe3, 0xbf, 0x61, 0x80, 0x52, 0x1f, 0x12, 0x3a, 0x26, 0x54, + 0x1b, 0x53, 0x33, 0x48, 0x1c, 0x53, 0x33, 0x22, 0x1a, 0x59, 0xc1, 0x13, 0x07, 0xd3, 0x88, 0xa9, + 0x99, 0xc4, 0x24, 0x7c, 0xa9, 0x05, 0xab, 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ff, + 0x9c, 0x37, 0xe7, 0x5e, 0x3d, 0x35, 0x2d, 0x36, 0xf2, 0x06, 0xad, 0x21, 0x19, 0x6b, 0x8e, 0x47, + 0x47, 0xfc, 0xa6, 0xf1, 0xd5, 0x36, 0x5f, 0x6e, 0xdb, 0xc4, 0xc0, 0x9a, 0xaf, 0x25, 0xf7, 0x82, + 0x7f, 0x09, 0x0f, 0x8a, 0xfc, 0xcb, 0xf6, 0xd3, 0xff, 0x03, 0x00, 0x00, 0xff, 0xff, 0x83, 0x92, + 0xd4, 0x5a, 0x77, 0x0b, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. From d5bafcd49676b47e4834a09ad6c42411f9e274a0 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Fri, 19 Dec 2025 14:07:56 +0530 Subject: [PATCH 096/120] tests: fixed integration tests --- .../integration/uexecutor/inbound_initiated_outbound_test.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/test/integration/uexecutor/inbound_initiated_outbound_test.go b/test/integration/uexecutor/inbound_initiated_outbound_test.go index c47114bd..9efe26c8 100644 --- a/test/integration/uexecutor/inbound_initiated_outbound_test.go +++ b/test/integration/uexecutor/inbound_initiated_outbound_test.go @@ -78,10 +78,9 @@ func setupInboundInitiatedOutboundTest(t *testing.T, numVals int) (*app.ChainApp fmt.Sprintf("universal-validator-%d", i), )).String() - pubkey := fmt.Sprintf("pubkey-%d", i) - network := uvalidatortypes.NetworkInfo{Ip: fmt.Sprintf("192.168.0.%d", i+1)} + network := uvalidatortypes.NetworkInfo{PeerId: fmt.Sprintf("temp%d", i+1), MultiAddrs: []string{"temp"}} - err := app.UvalidatorKeeper.AddUniversalValidator(ctx, coreValAddr, pubkey, network) + err := app.UvalidatorKeeper.AddUniversalValidator(ctx, coreValAddr, network) require.NoError(t, err) universalVals[i] = universalValAddr From 287d602a1b8c859f72d2d42dce93e2f06d0a7fa0 Mon Sep 17 00:00:00 2001 From: aman035 Date: Tue, 23 Dec 2025 15:07:18 +0530 Subject: [PATCH 097/120] refactor: db structure --- universalClient/chains/push/event_parser.go | 18 ++-- universalClient/chains/push/types.go | 9 +- universalClient/db/db.go | 3 +- universalClient/store/models.go | 89 ++++++++++--------- .../tss/coordinator/coordinator.go | 28 +++--- .../tss/coordinator/coordinator_test.go | 12 +-- universalClient/tss/coordinator/types.go | 8 +- universalClient/tss/docs/ARCHITECTURE.md | 2 +- universalClient/tss/eventstore/store.go | 42 ++++----- universalClient/tss/eventstore/store_test.go | 22 ++--- .../tss/sessionmanager/sessionmanager.go | 54 +++++------ .../tss/sessionmanager/sessionmanager_test.go | 24 ++--- 12 files changed, 158 insertions(+), 153 deletions(-) diff --git a/universalClient/chains/push/event_parser.go b/universalClient/chains/push/event_parser.go index 7e222572..83319d09 100644 --- a/universalClient/chains/push/event_parser.go +++ b/universalClient/chains/push/event_parser.go @@ -83,8 +83,8 @@ func convertProcessType(chainType string) string { } } -// ToTSSEventRecord converts the parsed event to a TSSEvent database record. -func (e *TSSProcessEvent) ToTSSEventRecord() *store.TSSEvent { +// ToTSSEventRecord converts the parsed event to a PCEvent database record. +func (e *TSSProcessEvent) ToTSSEventRecord() *store.PCEvent { // Serialize participants as event data var eventData []byte if len(e.Participants) > 0 { @@ -97,13 +97,13 @@ func (e *TSSProcessEvent) ToTSSEventRecord() *store.TSSEvent { eventData, _ = json.Marshal(data) } - return &store.TSSEvent{ - EventID: e.EventID(), - BlockNumber: e.BlockHeight, - ProtocolType: e.ProcessType, - Status: eventstore.StatusPending, - ExpiryHeight: e.ExpiryHeight, - EventData: eventData, + return &store.PCEvent{ + EventID: e.EventID(), + BlockHeight: e.BlockHeight, + ExpiryBlockHeight: e.ExpiryHeight, + Type: e.ProcessType, + Status: eventstore.StatusPending, + EventData: eventData, } } diff --git a/universalClient/chains/push/types.go b/universalClient/chains/push/types.go index 15bf4b63..16057fae 100644 --- a/universalClient/chains/push/types.go +++ b/universalClient/chains/push/types.go @@ -19,11 +19,12 @@ const ( ProcessTypeQuorumChange = "TSS_PROCESS_QUORUM_CHANGE" ) -// Protocol type values for TSSEvent.ProtocolType field. +// Protocol type values for PCEvent.Type field. const ( - ProtocolTypeKeygen = "keygen" - ProtocolTypeKeyrefresh = "keyrefresh" - ProtocolTypeQuorumChange = "quorumchange" + ProtocolTypeKeygen = "KEYGEN" + ProtocolTypeKeyrefresh = "KEYREFRESH" + ProtocolTypeQuorumChange = "QUORUM_CHANGE" + ProtocolTypeSign = "SIGN" ) // Default configuration values. diff --git a/universalClient/db/db.go b/universalClient/db/db.go index 6f77aefa..29fa3158 100644 --- a/universalClient/db/db.go +++ b/universalClient/db/db.go @@ -35,8 +35,7 @@ var ( &store.ChainState{}, &store.ChainTransaction{}, &store.GasVoteTransaction{}, - &store.TSSEvent{}, - &store.ChainTSSTransaction{}, + &store.PCEvent{}, // Add additional models here as needed. } ) diff --git a/universalClient/store/models.go b/universalClient/store/models.go index 3400b520..992a4b14 100644 --- a/universalClient/store/models.go +++ b/universalClient/store/models.go @@ -1,66 +1,71 @@ // Package store contains GORM-backed SQLite models used by the Universal Validator. +// +// Database Structure (database file: chain_data.db): +// +// chains/ +// ├── push/ +// │ └── chain_data.db +// │ ├── chain_states +// │ └── events +// └── {external_chain_caip_format}/ +// └── chain_data.db +// ├── chain_states +// ├── chain_transactions +// └── gas_vote_transactions package store import ( "gorm.io/gorm" ) -// ChainState tracks the state for the chain this database belongs to. -// Since each chain has its own database, there's only one row per database. +// ChainState tracks synchronization state for a chain. +// One record per database (each chain has its own DB). type ChainState struct { gorm.Model - LastBlock uint64 - // Can add more chain-specific state fields as needed (e.g., LastSync, Metadata) + LastBlock uint64 // Last processed block height } -// ChainTransaction tracks transactions for the chain this database belongs to. -// Since each chain has its own database, ChainID is not needed. +// ChainTransaction tracks inbound transaction events from external chains +// (Ethereum, Solana, etc.) that need processing and voting on Push chain. +// +// TODO: Rename to ECEvent (External Chain Event) and update table name to "events" type ChainTransaction struct { gorm.Model - TxHash string `gorm:"uniqueIndex:idx_tx_hash_log_index"` - LogIndex uint `gorm:"uniqueIndex:idx_tx_hash_log_index"` - BlockNumber uint64 - EventIdentifier string + TxHash string `gorm:"uniqueIndex:idx_tx_hash_log_index"` // Transaction hash from external chain + LogIndex uint `gorm:"uniqueIndex:idx_tx_hash_log_index"` // Log index within transaction + BlockNumber uint64 // Block number (or slot for Solana) on external chain + EventIdentifier string // Event type identifier Status string `gorm:"index"` // "confirmation_pending", "awaiting_vote", "confirmed", "failed", "reorged" - Confirmations uint64 - ConfirmationType string // "STANDARD" or "FAST" - which confirmation type this tx requires - Data []byte // Store raw event data - VoteTxHash string // Transaction hash of the vote on pchain + Confirmations uint64 // Number of block confirmations received + ConfirmationType string // "STANDARD" or "FAST" + Data []byte // Raw JSON-encoded event data + VoteTxHash string // Vote transaction hash on Push chain (empty until voted) } -// GasVoteTransaction tracks gas price votes for the chain this database belongs to. -// Since each chain has its own database, ChainID is not needed. -// Uses GORM's built-in CreatedAt/UpdatedAt for timestamp tracking. +// GasVoteTransaction tracks gas price votes sent to Push chain for an external chain. type GasVoteTransaction struct { gorm.Model - GasPrice uint64 `gorm:"not null"` // Gas price voted for (in wei) - VoteTxHash string `gorm:"index"` // On-chain vote transaction hash - Status string `gorm:"default:'success'"` - ErrorMsg string `gorm:"type:text"` // Error message if vote failed + GasPrice uint64 `gorm:"not null"` // Gas price voted for (wei for EVM chains, lamports for Solana chains) + VoteTxHash string `gorm:"index"` // Vote transaction hash on Push chain + Status string `gorm:"default:'success'"` // "success" or "failed" + ErrorMsg string `gorm:"type:text"` // Error message if vote failed } -// TSSEvent tracks TSS protocol events (KeyGen, KeyRefresh, Sign) from Push Chain. -type TSSEvent struct { +// PCEvent tracks Push Chain events (TSS protocol events: KeyGen, KeyRefresh, QuorumChange, Sign). +// Table name: "events" (PC_EVENTS) +type PCEvent struct { gorm.Model - EventID string `gorm:"uniqueIndex;not null"` // Unique identifier for the event - BlockNumber uint64 `gorm:"index;not null"` // Block number when event was detected - ProtocolType string // "keygen", "keyrefresh", or "sign" - Status string `gorm:"index;not null"` // "PENDING", "IN_PROGRESS", "SUCCESS" - ExpiryHeight uint64 `gorm:"index;not null"` // Block height when event expires - EventData []byte // Raw event data from chain - VoteTxHash string // Transaction hash of the vote on pchain - ErrorMsg string `gorm:"type:text"` // Error message if status is FAILED + EventID string `gorm:"uniqueIndex;not null"` // Unique event identifier (typically process ID) + BlockHeight uint64 `gorm:"index;not null"` // Block height on Push chain where event was detected + ExpiryBlockHeight uint64 `gorm:"index;not null"` // Block height when event expires + Type string // "KEYGEN", "KEYREFRESH", "QUORUM_CHANGE", or "SIGN" + Status string `gorm:"index;not null"` // "PENDING", "IN_PROGRESS", "BROADCASTED", "COMPLETED", "REVERTED" + EventData []byte // Raw JSON-encoded event data from chain + TxHash string // Transaction hash on Push chain (empty until voted) + ErrorMsg string `gorm:"type:text"` // Error message if processing failed } -// ExternalChainSignature tracks signatures that need to be broadcasted to external chains. -// Created when a Sign protocol completes successfully. -// TODO: Finalize Structure -type ChainTSSTransaction struct { - gorm.Model - TSSEventID uint `gorm:"index;not null"` // Reference to TSSEvent - Status string `gorm:"index;not null"` // "PENDING" or "SUCCESS" (after broadcast) - Signature []byte `gorm:"not null"` // ECDSA signature (65 bytes: R(32) + S(32) + RecoveryID(1)) - MessageHash []byte `gorm:"not null"` // Message hash that was signed - BroadcastTxHash string `gorm:"index"` // Transaction hash after successful broadcast - ErrorMsg string `gorm:"type:text"` // Error message if broadcast failed +// TableName specifies the table name for PCEvent. +func (PCEvent) TableName() string { + return "events" } diff --git a/universalClient/tss/coordinator/coordinator.go b/universalClient/tss/coordinator/coordinator.go index a5bb2624..5b09998d 100644 --- a/universalClient/tss/coordinator/coordinator.go +++ b/universalClient/tss/coordinator/coordinator.go @@ -371,13 +371,13 @@ func (c *Coordinator) processPendingEvents(ctx context.Context) error { for _, event := range events { c.logger.Info(). Str("event_id", event.EventID). - Str("protocol_type", event.ProtocolType). - Uint64("block_number", event.BlockNumber). + Str("type", event.Type). + Uint64("block_height", event.BlockHeight). Msg("processing event as coordinator") // Get participants based on protocol type (using cached allValidators) - participants := getParticipantsForProtocol(event.ProtocolType, allValidators) + participants := getParticipantsForProtocol(event.Type, allValidators) if participants == nil { - c.logger.Debug().Str("event_id", event.EventID).Str("protocol_type", event.ProtocolType).Msg("unknown protocol type") + c.logger.Debug().Str("event_id", event.EventID).Str("type", event.Type).Msg("unknown protocol type") continue } if len(participants) == 0 { @@ -398,7 +398,7 @@ func (c *Coordinator) processPendingEvents(ctx context.Context) error { // processEventAsCoordinator processes a TSS event as the coordinator. // Creates setup message based on event type and sends to all participants. -func (c *Coordinator) processEventAsCoordinator(ctx context.Context, event store.TSSEvent, participants []*types.UniversalValidator) error { +func (c *Coordinator) processEventAsCoordinator(ctx context.Context, event store.PCEvent, participants []*types.UniversalValidator) error { // Sort participants by party ID for consistency sortedParticipants := make([]*types.UniversalValidator, len(participants)) copy(sortedParticipants, participants) @@ -428,16 +428,16 @@ func (c *Coordinator) processEventAsCoordinator(ctx context.Context, event store // Create setup message based on event type var setupData []byte var err error - switch event.ProtocolType { - case "keygen", "keyrefresh": + switch event.Type { + case string(ProtocolKeygen), string(ProtocolKeyrefresh): // Keygen and keyrefresh use the same setup structure setupData, err = c.createKeygenSetup(threshold, partyIDs) - case "quorumchange": + case string(ProtocolQuorumChange): setupData, err = c.createQcSetup(ctx, threshold, partyIDs, sortedParticipants) - case "sign": + case string(ProtocolSign): setupData, err = c.createSignSetup(ctx, event.EventData, partyIDs) default: - err = errors.Errorf("unknown protocol type: %s", event.ProtocolType) + err = errors.Errorf("unknown protocol type: %s", event.Type) } if err != nil { @@ -741,13 +741,13 @@ func (c *Coordinator) createQcSetup(ctx context.Context, threshold int, partyIDs // For sign: returns all (Active + Pending Leave) validators. func getEligibleForProtocol(protocolType string, allValidators []*types.UniversalValidator) []*types.UniversalValidator { switch protocolType { - case "keygen", "quorumchange": + case string(ProtocolKeygen), string(ProtocolQuorumChange): // Active + Pending Join return getQuorumChangeParticipants(allValidators) - case "keyrefresh": + case string(ProtocolKeyrefresh): // Active + Pending Leave return getSignEligible(allValidators) - case "sign": + case string(ProtocolSign): // Active + Pending Leave return getSignEligible(allValidators) default: @@ -761,7 +761,7 @@ func getEligibleForProtocol(protocolType string, allValidators []*types.Universa // For other protocols: returns all eligible participants (same as getEligibleForProtocol). func getParticipantsForProtocol(protocolType string, allValidators []*types.UniversalValidator) []*types.UniversalValidator { // For sign, we need random subset; for others, same as eligible - if protocolType == "sign" { + if protocolType == string(ProtocolSign) { return getSignParticipants(allValidators) } // For other protocols, return all eligible (same logic) diff --git a/universalClient/tss/coordinator/coordinator_test.go b/universalClient/tss/coordinator/coordinator_test.go index 403cc2a4..40f7bff4 100644 --- a/universalClient/tss/coordinator/coordinator_test.go +++ b/universalClient/tss/coordinator/coordinator_test.go @@ -101,7 +101,7 @@ func (m *mockPushCoreClient) setGetBlockNumError(err error) { func setupTestCoordinator(t *testing.T) (*Coordinator, *mockPushCoreClient, *eventstore.Store) { db, err := gorm.Open(sqlite.Open(":memory:"), &gorm.Config{}) require.NoError(t, err) - require.NoError(t, db.AutoMigrate(&store.TSSEvent{})) + require.NoError(t, db.AutoMigrate(&store.PCEvent{})) evtStore := eventstore.NewStore(db, zerolog.Nop()) @@ -238,7 +238,7 @@ func TestGetEligibleUV(t *testing.T) { require.True(t, hasValidators, "validators should be set in setup") t.Run("keygen protocol", func(t *testing.T) { - eligible := coord.GetEligibleUV("keygen") + eligible := coord.GetEligibleUV("KEYGEN") // Should return Active + Pending Join: validator1, validator2, validator3 require.Len(t, eligible, 3) addresses := make(map[string]bool) @@ -253,7 +253,7 @@ func TestGetEligibleUV(t *testing.T) { }) t.Run("keyrefresh protocol", func(t *testing.T) { - eligible := coord.GetEligibleUV("keyrefresh") + eligible := coord.GetEligibleUV("KEYREFRESH") // Should return only Active: validator1, validator2 (not validator3 which is PendingJoin) assert.Len(t, eligible, 2) addresses := make(map[string]bool) @@ -268,7 +268,7 @@ func TestGetEligibleUV(t *testing.T) { }) t.Run("quorumchange protocol", func(t *testing.T) { - eligible := coord.GetEligibleUV("quorumchange") + eligible := coord.GetEligibleUV("QUORUM_CHANGE") // Should return Active + Pending Join: validator1, validator2, validator3 require.Len(t, eligible, 3) addresses := make(map[string]bool) @@ -283,7 +283,7 @@ func TestGetEligibleUV(t *testing.T) { }) t.Run("sign protocol", func(t *testing.T) { - eligible := coord.GetEligibleUV("sign") + eligible := coord.GetEligibleUV("SIGN") // Should return random subset of Active + Pending Leave // validator1 and validator2 are Active, validator3 is PendingJoin (not eligible) // So should return validator1 and validator2 (or subset if >2/3 threshold applies) @@ -301,7 +301,7 @@ func TestGetEligibleUV(t *testing.T) { coord.allValidators = nil coord.mu.Unlock() - eligible := coord.GetEligibleUV("keygen") + eligible := coord.GetEligibleUV("KEYGEN") assert.Nil(t, eligible) }) } diff --git a/universalClient/tss/coordinator/types.go b/universalClient/tss/coordinator/types.go index 8b754778..83ef2227 100644 --- a/universalClient/tss/coordinator/types.go +++ b/universalClient/tss/coordinator/types.go @@ -13,10 +13,10 @@ type SendFunc func(ctx context.Context, peerID string, data []byte) error type ProtocolType string const ( - ProtocolKeygen ProtocolType = "keygen" - ProtocolKeyrefresh ProtocolType = "keyrefresh" - ProtocolQuorumChange ProtocolType = "quorumchange" - ProtocolSign ProtocolType = "sign" + ProtocolKeygen ProtocolType = "KEYGEN" + ProtocolKeyrefresh ProtocolType = "KEYREFRESH" + ProtocolQuorumChange ProtocolType = "QUORUM_CHANGE" + ProtocolSign ProtocolType = "SIGN" ) // Message represents a simple message with type, eventId, payload, and participants. diff --git a/universalClient/tss/docs/ARCHITECTURE.md b/universalClient/tss/docs/ARCHITECTURE.md index 5d908af7..530e7bc8 100644 --- a/universalClient/tss/docs/ARCHITECTURE.md +++ b/universalClient/tss/docs/ARCHITECTURE.md @@ -148,7 +148,7 @@ Database access layer for TSS events. Provides methods for getting pending event - `GetPendingEvents()` - Gets events ready to be processed - `UpdateStatus()` - Updates event status -- `UpdateStatusAndBlockNumber()` - Updates status and block number +- `UpdateStatusAndBlockHeight()` - Updates status and block height - `ResetInProgressEventsToPending()` - Resets IN_PROGRESS events on startup - `GetEventsByStatus()` - Queries events by status diff --git a/universalClient/tss/eventstore/store.go b/universalClient/tss/eventstore/store.go index 229f802a..ef45366d 100644 --- a/universalClient/tss/eventstore/store.go +++ b/universalClient/tss/eventstore/store.go @@ -31,8 +31,8 @@ func NewStore(db *gorm.DB, logger zerolog.Logger) *Store { // GetPendingEvents returns all pending events that are ready to be processed. // Events are ready if they are at least `minBlockConfirmation` blocks behind the current block. -func (s *Store) GetPendingEvents(currentBlock uint64, minBlockConfirmation uint64) ([]store.TSSEvent, error) { - var events []store.TSSEvent +func (s *Store) GetPendingEvents(currentBlock uint64, minBlockConfirmation uint64) ([]store.PCEvent, error) { + var events []store.PCEvent // Only get events that are old enough (at least minBlockConfirmation blocks behind) minBlock := currentBlock - minBlockConfirmation @@ -40,16 +40,16 @@ func (s *Store) GetPendingEvents(currentBlock uint64, minBlockConfirmation uint6 minBlock = 0 } - if err := s.db.Where("status = ? AND block_number <= ?", StatusPending, minBlock). - Order("block_number ASC, created_at ASC"). + if err := s.db.Where("status = ? AND block_height <= ?", StatusPending, minBlock). + Order("block_height ASC, created_at ASC"). Find(&events).Error; err != nil { return nil, errors.Wrap(err, "failed to query pending events") } // Filter out expired events - var validEvents []store.TSSEvent + var validEvents []store.PCEvent for _, event := range events { - if event.ExpiryHeight > 0 && currentBlock > event.ExpiryHeight { + if event.ExpiryBlockHeight > 0 && currentBlock > event.ExpiryBlockHeight { // Mark as expired if err := s.UpdateStatus(event.EventID, StatusExpired, ""); err != nil { s.logger.Warn().Err(err).Str("event_id", event.EventID).Msg("failed to mark event as expired") @@ -63,8 +63,8 @@ func (s *Store) GetPendingEvents(currentBlock uint64, minBlockConfirmation uint6 } // GetEvent retrieves an event by ID. -func (s *Store) GetEvent(eventID string) (*store.TSSEvent, error) { - var event store.TSSEvent +func (s *Store) GetEvent(eventID string) (*store.PCEvent, error) { + var event store.PCEvent if err := s.db.Where("event_id = ?", eventID).First(&event).Error; err != nil { return nil, err } @@ -77,7 +77,7 @@ func (s *Store) UpdateStatus(eventID, status, errorMsg string) error { if errorMsg != "" { update["error_msg"] = errorMsg } - result := s.db.Model(&store.TSSEvent{}). + result := s.db.Model(&store.PCEvent{}). Where("event_id = ?", eventID). Updates(update) if result.Error != nil { @@ -89,13 +89,13 @@ func (s *Store) UpdateStatus(eventID, status, errorMsg string) error { return nil } -// UpdateStatusAndBlockNumber updates the status and block number of an event. -func (s *Store) UpdateStatusAndBlockNumber(eventID, status string, blockNumber uint64) error { +// UpdateStatusAndBlockHeight updates the status and block height of an event. +func (s *Store) UpdateStatusAndBlockHeight(eventID, status string, blockHeight uint64) error { update := map[string]any{ "status": status, - "block_number": blockNumber, + "block_height": blockHeight, } - result := s.db.Model(&store.TSSEvent{}). + result := s.db.Model(&store.PCEvent{}). Where("event_id = ?", eventID). Updates(update) if result.Error != nil { @@ -108,8 +108,8 @@ func (s *Store) UpdateStatusAndBlockNumber(eventID, status string, blockNumber u } // GetEventsByStatus returns all events with the given status. -func (s *Store) GetEventsByStatus(status string, limit int) ([]store.TSSEvent, error) { - var events []store.TSSEvent +func (s *Store) GetEventsByStatus(status string, limit int) ([]store.PCEvent, error) { + var events []store.PCEvent query := s.db.Where("status = ?", status).Order("created_at DESC") if limit > 0 { query = query.Limit(limit) @@ -122,7 +122,7 @@ func (s *Store) GetEventsByStatus(status string, limit int) ([]store.TSSEvent, e // ClearExpiredAndSuccessfulEvents deletes both expired and successful events. func (s *Store) ClearExpiredAndSuccessfulEvents() (int64, error) { - result := s.db.Where("status IN ?", []string{StatusExpired, StatusSuccess}).Delete(&store.TSSEvent{}) + result := s.db.Where("status IN ?", []string{StatusExpired, StatusSuccess}).Delete(&store.PCEvent{}) if result.Error != nil { return 0, errors.Wrap(result.Error, "failed to clear expired and successful events") } @@ -136,7 +136,7 @@ func (s *Store) ClearExpiredAndSuccessfulEvents() (int64, error) { // This should be called on node startup to handle cases where the node crashed // while events were in progress, causing sessions to be lost from memory. func (s *Store) ResetInProgressEventsToPending() (int64, error) { - result := s.db.Model(&store.TSSEvent{}). + result := s.db.Model(&store.PCEvent{}). Where("status = ?", StatusInProgress). Update("status", StatusPending) if result.Error != nil { @@ -150,15 +150,15 @@ func (s *Store) ResetInProgressEventsToPending() (int64, error) { return result.RowsAffected, nil } -// CreateEvent stores a new TSSEvent. Returns error if event already exists. -func (s *Store) CreateEvent(event *store.TSSEvent) error { +// CreateEvent stores a new PCEvent. Returns error if event already exists. +func (s *Store) CreateEvent(event *store.PCEvent) error { if err := s.db.Create(event).Error; err != nil { return errors.Wrapf(err, "failed to create event %s", event.EventID) } s.logger.Info(). Str("event_id", event.EventID). - Str("protocol_type", event.ProtocolType). - Uint64("block_number", event.BlockNumber). + Str("type", event.Type). + Uint64("block_height", event.BlockHeight). Msg("stored new TSS event") return nil } diff --git a/universalClient/tss/eventstore/store_test.go b/universalClient/tss/eventstore/store_test.go index 4907dc9d..ba4dbe88 100644 --- a/universalClient/tss/eventstore/store_test.go +++ b/universalClient/tss/eventstore/store_test.go @@ -19,7 +19,7 @@ func setupTestDB(t *testing.T) *gorm.DB { t.Fatalf("failed to open test database: %v", err) } - if err := db.AutoMigrate(&store.TSSEvent{}); err != nil { + if err := db.AutoMigrate(&store.PCEvent{}); err != nil { t.Fatalf("failed to migrate database: %v", err) } @@ -34,18 +34,18 @@ func setupTestStore(t *testing.T) *Store { } // createTestEvent creates a test TSS event in the database. -func createTestEvent(t *testing.T, s *Store, eventID string, blockNumber uint64, status string, expiryHeight uint64) { +func createTestEvent(t *testing.T, s *Store, eventID string, blockHeight uint64, status string, expiryHeight uint64) { eventData, _ := json.Marshal(map[string]interface{}{ "key_id": "test-key-1", }) - event := store.TSSEvent{ - EventID: eventID, - BlockNumber: blockNumber, - ProtocolType: "keygen", - Status: status, - ExpiryHeight: expiryHeight, - EventData: eventData, + event := store.PCEvent{ + EventID: eventID, + BlockHeight: blockHeight, + ExpiryBlockHeight: expiryHeight, + Type: "KEYGEN", + Status: status, + EventData: eventData, } if err := s.db.Create(&event).Error; err != nil { @@ -220,8 +220,8 @@ func TestGetEvent(t *testing.T) { if event.EventID != "event-1" { t.Errorf("GetEvent() event ID = %s, want event-1", event.EventID) } - if event.BlockNumber != 100 { - t.Errorf("GetEvent() block number = %d, want 100", event.BlockNumber) + if event.BlockHeight != 100 { + t.Errorf("GetEvent() block height = %d, want 100", event.BlockHeight) } if event.Status != StatusPending { t.Errorf("GetEvent() status = %s, want %s", event.Status, StatusPending) diff --git a/universalClient/tss/sessionmanager/sessionmanager.go b/universalClient/tss/sessionmanager/sessionmanager.go index 0feb9841..4551b45d 100644 --- a/universalClient/tss/sessionmanager/sessionmanager.go +++ b/universalClient/tss/sessionmanager/sessionmanager.go @@ -144,7 +144,7 @@ func (sm *SessionManager) handleSetupMessage(ctx context.Context, senderPeerID s sm.mu.Lock() sm.sessions[msg.EventID] = &sessionState{ session: session, - protocolType: event.ProtocolType, + protocolType: event.Type, coordinator: senderPeerID, expiryTime: time.Now().Add(sm.sessionExpiryTime), participants: msg.Participants, @@ -158,7 +158,7 @@ func (sm *SessionManager) handleSetupMessage(ctx context.Context, senderPeerID s sm.logger.Info(). Str("event_id", msg.EventID). - Str("protocol", event.ProtocolType). + Str("protocol", event.Type). Msg("created session from setup message") // 8. Send ACK to coordinator @@ -368,7 +368,7 @@ func (sm *SessionManager) handleSessionFinished(ctx context.Context, eventID str // Handle based on protocol type switch state.protocolType { - case "keygen": + case string(coordinator.ProtocolKeygen): // Save keyshare using SHA256 hash of eventID if err := sm.keyshareManager.Store(result.Keyshare, storageID); err != nil { return errors.Wrapf(err, "failed to store keyshare for event %s", eventID) @@ -382,7 +382,7 @@ func (sm *SessionManager) handleSessionFinished(ctx context.Context, eventID str Str("keyshare_hash", hex.EncodeToString(keyshareHash[:])). Msg("saved keyshare from keygen") - case "keyrefresh": + case string(coordinator.ProtocolKeyrefresh): // Save new keyshare using SHA256 hash of eventID if err := sm.keyshareManager.Store(result.Keyshare, storageID); err != nil { return errors.Wrapf(err, "failed to store keyshare for event %s", eventID) @@ -396,7 +396,7 @@ func (sm *SessionManager) handleSessionFinished(ctx context.Context, eventID str Str("keyshare_hash", hex.EncodeToString(keyshareHash[:])). Msg("saved new keyshare from keyrefresh") - case "quorumchange": + case string(coordinator.ProtocolQuorumChange): // Quorumchange produces a new keyshare // Save new keyshare using SHA256 hash of eventID if err := sm.keyshareManager.Store(result.Keyshare, storageID); err != nil { @@ -412,7 +412,7 @@ func (sm *SessionManager) handleSessionFinished(ctx context.Context, eventID str Int("participant_count", len(result.Participants)). Msg("saved new keyshare from quorumchange with updated participants") - case "sign": + case string(coordinator.ProtocolSign): // TODO: Save signature to database for outbound Tx Processing sm.logger.Info(). Str("event_id", eventID). @@ -425,7 +425,7 @@ func (sm *SessionManager) handleSessionFinished(ctx context.Context, eventID str } // Vote on TSS key process (keygen/keyrefresh/quorumchange only) - if sm.voteHandler != nil && (state.protocolType == "keygen" || state.protocolType == "keyrefresh" || state.protocolType == "quorumchange") { + if sm.voteHandler != nil && (state.protocolType == string(coordinator.ProtocolKeygen) || state.protocolType == string(coordinator.ProtocolKeyrefresh) || state.protocolType == string(coordinator.ProtocolQuorumChange)) { pubKeyHex := hex.EncodeToString(result.PublicKey) paEventIDInt, err := strconv.ParseUint(eventID, 10, 64) @@ -456,11 +456,11 @@ func (sm *SessionManager) handleSessionFinished(ctx context.Context, eventID str } // createSession creates a new DKLS session based on event type. -func (sm *SessionManager) createSession(ctx context.Context, event *store.TSSEvent, msg *coordinator.Message) (dkls.Session, error) { +func (sm *SessionManager) createSession(ctx context.Context, event *store.PCEvent, msg *coordinator.Message) (dkls.Session, error) { threshold := coordinator.CalculateThreshold(len(msg.Participants)) - switch event.ProtocolType { - case "keygen": + switch event.Type { + case string(coordinator.ProtocolKeygen): return dkls.NewKeygenSession( msg.Payload, // setupData msg.EventID, // sessionID @@ -469,7 +469,7 @@ func (sm *SessionManager) createSession(ctx context.Context, event *store.TSSEve threshold, ) - case "keyrefresh": + case string(coordinator.ProtocolKeyrefresh): // Get current keyID keyID, err := sm.coordinator.GetCurrentTSSKeyId() if err != nil { @@ -491,7 +491,7 @@ func (sm *SessionManager) createSession(ctx context.Context, event *store.TSSEve oldKeyshare, ) - case "quorumchange": + case string(coordinator.ProtocolQuorumChange): // Get current keyID keyID, err := sm.coordinator.GetCurrentTSSKeyId() if err != nil { @@ -525,7 +525,7 @@ func (sm *SessionManager) createSession(ctx context.Context, event *store.TSSEve oldKeyshare, ) - case "sign": + case string(coordinator.ProtocolSign): // Get current keyID keyID, err := sm.coordinator.GetCurrentTSSKeyId() if err != nil { @@ -555,16 +555,16 @@ func (sm *SessionManager) createSession(ctx context.Context, event *store.TSSEve ) default: - return nil, errors.Errorf("unknown protocol type: %s", event.ProtocolType) + return nil, errors.Errorf("unknown protocol type: %s", event.Type) } } // validateParticipants validates that participants match protocol requirements. // For keygen/keyrefresh: participants must match exactly with eligible participants (same elements). // For sign: participants must be a valid >2/3 subset of eligible participants. -func (sm *SessionManager) validateParticipants(participants []string, event *store.TSSEvent) error { +func (sm *SessionManager) validateParticipants(participants []string, event *store.PCEvent) error { // Get eligible validators for this protocol - eligible := sm.coordinator.GetEligibleUV(string(event.ProtocolType)) + eligible := sm.coordinator.GetEligibleUV(string(event.Type)) if len(eligible) == 0 { return errors.New("no eligible validators for protocol") } @@ -584,26 +584,26 @@ func (sm *SessionManager) validateParticipants(participants []string, event *sto participantSet := make(map[string]bool) for _, partyID := range participants { if !eligibleSet[partyID] { - return errors.Errorf("participant %s is not eligible for protocol %s", partyID, event.ProtocolType) + return errors.Errorf("participant %s is not eligible for protocol %s", partyID, event.Type) } participantSet[partyID] = true } // Protocol-specific validation - switch event.ProtocolType { - case "keygen", "keyrefresh", "quorumchange": + switch event.Type { + case string(coordinator.ProtocolKeygen), string(coordinator.ProtocolKeyrefresh), string(coordinator.ProtocolQuorumChange): // For keygen, keyrefresh, and quorumchange: participants must match exactly with eligible participants if len(participants) != len(eligibleList) { - return errors.Errorf("participants count %d does not match eligible count %d for %s", len(participants), len(eligibleList), event.ProtocolType) + return errors.Errorf("participants count %d does not match eligible count %d for %s", len(participants), len(eligibleList), event.Type) } // Check all eligible are in participants for _, eligibleID := range eligibleList { if !participantSet[eligibleID] { - return errors.Errorf("eligible participant %s is missing from participants list for %s", eligibleID, event.ProtocolType) + return errors.Errorf("eligible participant %s is missing from participants list for %s", eligibleID, event.Type) } } - case "sign": + case string(coordinator.ProtocolSign): // For sign: participants must be exactly equal to threshold (no more, no less) threshold := coordinator.CalculateThreshold(len(eligibleList)) if len(participants) != threshold { @@ -612,7 +612,7 @@ func (sm *SessionManager) validateParticipants(participants []string, event *sto // All participants must be from eligible set (already validated above) default: - return errors.Errorf("unknown protocol type: %s", event.ProtocolType) + return errors.Errorf("unknown protocol type: %s", event.Type) } return nil @@ -698,9 +698,9 @@ func (sm *SessionManager) checkExpiredSessions(ctx context.Context, blockDelay u // Clean up session sm.cleanSession(eventID, state) - // Update event: mark as pending and set new block number (current + delay) - newBlockNumber := currentBlock + blockDelay - if err := sm.eventStore.UpdateStatusAndBlockNumber(eventID, eventstore.StatusPending, newBlockNumber); err != nil { + // Update event: mark as pending and set new block height (current + delay) + newBlockHeight := currentBlock + blockDelay + if err := sm.eventStore.UpdateStatusAndBlockHeight(eventID, eventstore.StatusPending, newBlockHeight); err != nil { sm.logger.Warn(). Err(err). Str("event_id", eventID). @@ -708,7 +708,7 @@ func (sm *SessionManager) checkExpiredSessions(ctx context.Context, blockDelay u } else { sm.logger.Info(). Str("event_id", eventID). - Uint64("new_block_number", newBlockNumber). + Uint64("new_block_height", newBlockHeight). Msg("expired session removed, event marked as pending for retry") } } diff --git a/universalClient/tss/sessionmanager/sessionmanager_test.go b/universalClient/tss/sessionmanager/sessionmanager_test.go index 9fb6262b..d27daf56 100644 --- a/universalClient/tss/sessionmanager/sessionmanager_test.go +++ b/universalClient/tss/sessionmanager/sessionmanager_test.go @@ -70,7 +70,7 @@ func (m *mockSession) Close() { func setupTestSessionManager(t *testing.T) (*SessionManager, *coordinator.Coordinator, *eventstore.Store, *keyshare.Manager, *pushcore.Client, *gorm.DB) { db, err := gorm.Open(sqlite.Open(":memory:"), &gorm.Config{}) require.NoError(t, err) - require.NoError(t, db.AutoMigrate(&store.TSSEvent{})) + require.NoError(t, db.AutoMigrate(&store.PCEvent{})) evtStore := eventstore.NewStore(db, zerolog.Nop()) keyshareMgr, err := keyshare.NewManager(t.TempDir(), "test-password") @@ -173,11 +173,11 @@ func TestHandleSetupMessage_Validation(t *testing.T) { ctx := context.Background() // Create a test event by inserting it directly into the database - event := store.TSSEvent{ - EventID: "event1", - ProtocolType: "keygen", - Status: eventstore.StatusPending, - BlockNumber: 100, + event := store.PCEvent{ + EventID: "event1", + BlockHeight: 100, + Type: "KEYGEN", + Status: eventstore.StatusPending, } require.NoError(t, testDB.Create(&event).Error) @@ -248,7 +248,7 @@ func TestHandleStepMessage_Validation(t *testing.T) { sm.mu.Lock() sm.sessions["event1"] = &sessionState{ session: mockSess, - protocolType: "keygen", + protocolType: "KEYGEN", coordinator: "coordinator1", expiryTime: time.Now().Add(5 * time.Minute), participants: []string{"validator2", "validator3"}, @@ -274,11 +274,11 @@ func TestSessionManager_Integration(t *testing.T) { ctx := context.Background() // Create a keygen event by inserting it directly into the database - event := store.TSSEvent{ - EventID: "keygen-event", - ProtocolType: "keygen", - Status: eventstore.StatusPending, - BlockNumber: 100, + event := store.PCEvent{ + EventID: "keygen-event", + BlockHeight: 100, + Type: "KEYGEN", + Status: eventstore.StatusPending, } require.NoError(t, testDB.Create(&event).Error) From d925e0c67398ef9c1911d761221b20daeb1a4b47 Mon Sep 17 00:00:00 2001 From: aman035 Date: Mon, 5 Jan 2026 16:53:39 +0530 Subject: [PATCH 098/120] refactor: change pushTSSListener to generic PushListener --- universalClient/chains/push/client.go | 225 ++++++++++ universalClient/chains/push/client_test.go | 247 +++++++++++ universalClient/chains/push/event_parser.go | 315 ++++++++++---- .../chains/push/event_parser_test.go | 391 ++++++++++++++++++ universalClient/chains/push/event_watcher.go | 349 +++++++++++----- .../chains/push/event_watcher_test.go | 350 ++++++++++++++++ universalClient/chains/push/listener.go | 128 ------ universalClient/chains/push/types.go | 44 -- universalClient/core/client.go | 39 +- 9 files changed, 1707 insertions(+), 381 deletions(-) create mode 100644 universalClient/chains/push/client.go create mode 100644 universalClient/chains/push/client_test.go create mode 100644 universalClient/chains/push/event_parser_test.go create mode 100644 universalClient/chains/push/event_watcher_test.go delete mode 100644 universalClient/chains/push/listener.go delete mode 100644 universalClient/chains/push/types.go diff --git a/universalClient/chains/push/client.go b/universalClient/chains/push/client.go new file mode 100644 index 00000000..609048b7 --- /dev/null +++ b/universalClient/chains/push/client.go @@ -0,0 +1,225 @@ +// Package push provides a client for listening to Push Chain events. +// It handles event polling, parsing, and persistence with proper error handling, +// graceful shutdown, and concurrent safety. +package push + +import ( + "context" + "errors" + "fmt" + "sync" + "sync/atomic" + "time" + + "github.com/pushchain/push-chain-node/universalClient/pushcore" + "github.com/pushchain/push-chain-node/universalClient/store" + "github.com/rs/zerolog" + "gorm.io/gorm" +) + +// Default configuration values. +const ( + DefaultPollInterval = 5 * time.Second + DefaultChunkSize = 1000 + DefaultQueryLimit = 100 + + minPollInterval = 1 * time.Second + maxPollInterval = 5 * time.Minute +) + +// Sentinel errors for the Push listener. +var ( + ErrAlreadyRunning = errors.New("push listener is already running") + ErrNotRunning = errors.New("push listener is not running") + ErrNilClient = errors.New("push client cannot be nil") + ErrNilDatabase = errors.New("database connection cannot be nil") + ErrInvalidInterval = errors.New("poll interval out of valid range") +) + +// Config holds configuration for the Push listener. +type Config struct { + // PollInterval is the duration between polling cycles. + // Must be between 1 second and 5 minutes. + PollInterval time.Duration + + // ChunkSize is the number of blocks to process in each batch. + // Defaults to 1000 if not specified. + ChunkSize uint64 + + // QueryLimit is the maximum number of transactions to fetch per query. + // Defaults to 100 if not specified. + QueryLimit uint64 +} + +// Validate validates the configuration and applies defaults where necessary. +func (c *Config) Validate() error { + if c.PollInterval < minPollInterval || c.PollInterval > maxPollInterval { + return fmt.Errorf("%w: must be between %v and %v, got %v", + ErrInvalidInterval, minPollInterval, maxPollInterval, c.PollInterval) + } + return nil +} + +// applyDefaults sets default values for zero-value fields. +func (c *Config) applyDefaults() { + if c.PollInterval == 0 { + c.PollInterval = DefaultPollInterval + } + if c.ChunkSize == 0 { + c.ChunkSize = DefaultChunkSize + } + if c.QueryLimit == 0 { + c.QueryLimit = DefaultQueryLimit + } +} + +// PushClient defines the interface for interacting with the Push chain. +// This allows for easier testing and dependency injection. +type PushClient interface { + GetLatestBlockNum() (uint64, error) + GetTxsByEvents(query string, minHeight, maxHeight uint64, limit uint64) ([]*pushcore.TxResult, error) +} + +// Listener listens for events from the Push chain and stores them in the database. +type Listener struct { + logger zerolog.Logger + pushClient PushClient + db *gorm.DB + cfg Config + + watcher *EventWatcher + mu sync.RWMutex + running atomic.Bool + stopCh chan struct{} +} + +// NewListener creates a new Push event listener. +// Returns an error if required dependencies are nil or configuration is invalid. +func NewListener( + client PushClient, + db *gorm.DB, + logger zerolog.Logger, + cfg *Config, +) (*Listener, error) { + if client == nil { + return nil, ErrNilClient + } + if db == nil { + return nil, ErrNilDatabase + } + + // Use default config if nil + if cfg == nil { + cfg = &Config{} + } + + // Apply defaults first + cfg.applyDefaults() + + // Then validate + if err := cfg.Validate(); err != nil { + return nil, fmt.Errorf("invalid configuration: %w", err) + } + + return &Listener{ + logger: logger.With().Str("component", "push_listener").Logger(), + pushClient: client, + db: db, + cfg: *cfg, + stopCh: make(chan struct{}), + }, nil +} + +// Start begins listening for events from the Push chain. +// Returns ErrAlreadyRunning if the listener is already running. +func (l *Listener) Start(ctx context.Context) error { + if !l.running.CompareAndSwap(false, true) { + return ErrAlreadyRunning + } + + l.mu.Lock() + defer l.mu.Unlock() + + // Load last processed block from chain_states + startBlock, err := l.getLastProcessedBlock() + if err != nil { + l.running.Store(false) + return fmt.Errorf("failed to get last processed block: %w", err) + } + + l.logger.Info(). + Uint64("start_block", startBlock). + Dur("poll_interval", l.cfg.PollInterval). + Uint64("chunk_size", l.cfg.ChunkSize). + Msg("starting Push event listener") + + // Reset stop channel for new run + l.stopCh = make(chan struct{}) + + // Create and start event watcher + l.watcher = NewEventWatcher( + l.pushClient, + l.db, + l.logger, + l.cfg, + startBlock, + ) + + if err := l.watcher.Start(ctx); err != nil { + l.running.Store(false) + return fmt.Errorf("failed to start event watcher: %w", err) + } + + l.logger.Info().Msg("Push event listener started successfully") + return nil +} + +// Stop gracefully stops the listener. +// Returns ErrNotRunning if the listener is not running. +func (l *Listener) Stop() error { + if !l.running.CompareAndSwap(true, false) { + return ErrNotRunning + } + + l.mu.Lock() + defer l.mu.Unlock() + + l.logger.Info().Msg("stopping Push event listener") + + // Signal stop + close(l.stopCh) + + // Stop the watcher + if l.watcher != nil { + l.watcher.Stop() + l.watcher = nil + } + + l.logger.Info().Msg("Push event listener stopped successfully") + return nil +} + +// IsRunning returns whether the listener is currently running. +func (l *Listener) IsRunning() bool { + return l.running.Load() +} + +// getLastProcessedBlock reads the last processed block from chain_states. +func (l *Listener) getLastProcessedBlock() (uint64, error) { + var chainState store.ChainState + result := l.db.First(&chainState) + + if result.Error != nil { + if errors.Is(result.Error, gorm.ErrRecordNotFound) { + l.logger.Info().Msg("no previous state found, starting from block 0") + return 0, nil + } + return 0, fmt.Errorf("failed to query chain state: %w", result.Error) + } + + l.logger.Info(). + Uint64("block", chainState.LastBlock). + Msg("resuming from last processed block") + + return chainState.LastBlock, nil +} diff --git a/universalClient/chains/push/client_test.go b/universalClient/chains/push/client_test.go new file mode 100644 index 00000000..0a84e385 --- /dev/null +++ b/universalClient/chains/push/client_test.go @@ -0,0 +1,247 @@ +package push + +import ( + "context" + "testing" + "time" + + "github.com/pushchain/push-chain-node/universalClient/pushcore" + "github.com/pushchain/push-chain-node/universalClient/store" + "github.com/rs/zerolog" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "gorm.io/driver/sqlite" + "gorm.io/gorm" + gormlogger "gorm.io/gorm/logger" +) + +// mockPushClient implements PushClient for testing. +type mockPushClient struct { + latestBlock uint64 + txResults []*pushcore.TxResult + err error +} + +func (m *mockPushClient) GetLatestBlockNum() (uint64, error) { + return m.latestBlock, m.err +} + +func (m *mockPushClient) GetTxsByEvents(query string, minHeight, maxHeight uint64, limit uint64) ([]*pushcore.TxResult, error) { + return m.txResults, m.err +} + +func newTestDB(t *testing.T) *gorm.DB { + db, err := gorm.Open(sqlite.Open(":memory:"), &gorm.Config{ + Logger: gormlogger.Default.LogMode(gormlogger.Silent), + }) + require.NoError(t, err) + + // Use the actual store types for migration + err = db.AutoMigrate(&store.ChainState{}, &store.PCEvent{}) + require.NoError(t, err) + + return db +} + +func TestNewListener(t *testing.T) { + logger := zerolog.Nop() + db := newTestDB(t) + client := &mockPushClient{} + + t.Run("success with nil config", func(t *testing.T) { + listener, err := NewListener(client, db, logger, nil) + require.NoError(t, err) + require.NotNil(t, listener) + + // Verify defaults applied + assert.Equal(t, DefaultPollInterval, listener.cfg.PollInterval) + assert.Equal(t, uint64(DefaultChunkSize), listener.cfg.ChunkSize) + assert.Equal(t, uint64(DefaultQueryLimit), listener.cfg.QueryLimit) + }) + + t.Run("success with custom config", func(t *testing.T) { + cfg := &Config{ + PollInterval: 10 * time.Second, + ChunkSize: 500, + QueryLimit: 50, + } + listener, err := NewListener(client, db, logger, cfg) + require.NoError(t, err) + require.NotNil(t, listener) + + assert.Equal(t, 10*time.Second, listener.cfg.PollInterval) + assert.Equal(t, uint64(500), listener.cfg.ChunkSize) + assert.Equal(t, uint64(50), listener.cfg.QueryLimit) + }) + + t.Run("nil client error", func(t *testing.T) { + listener, err := NewListener(nil, db, logger, nil) + require.Error(t, err) + assert.ErrorIs(t, err, ErrNilClient) + assert.Nil(t, listener) + }) + + t.Run("nil database error", func(t *testing.T) { + listener, err := NewListener(client, nil, logger, nil) + require.Error(t, err) + assert.ErrorIs(t, err, ErrNilDatabase) + assert.Nil(t, listener) + }) + + t.Run("invalid poll interval - too short", func(t *testing.T) { + cfg := &Config{ + PollInterval: 100 * time.Millisecond, // Less than minPollInterval + } + listener, err := NewListener(client, db, logger, cfg) + require.Error(t, err) + assert.Contains(t, err.Error(), "poll interval") + assert.Nil(t, listener) + }) + + t.Run("invalid poll interval - too long", func(t *testing.T) { + cfg := &Config{ + PollInterval: 10 * time.Minute, // More than maxPollInterval + } + listener, err := NewListener(client, db, logger, cfg) + require.Error(t, err) + assert.Contains(t, err.Error(), "poll interval") + assert.Nil(t, listener) + }) +} + +func TestListener_StartStop(t *testing.T) { + logger := zerolog.Nop() + db := newTestDB(t) + client := &mockPushClient{latestBlock: 100} + + listener, err := NewListener(client, db, logger, nil) + require.NoError(t, err) + + ctx, cancel := context.WithCancel(context.Background()) + defer cancel() + + t.Run("start successfully", func(t *testing.T) { + err := listener.Start(ctx) + require.NoError(t, err) + assert.True(t, listener.IsRunning()) + }) + + t.Run("start when already running returns error", func(t *testing.T) { + err := listener.Start(ctx) + require.Error(t, err) + assert.ErrorIs(t, err, ErrAlreadyRunning) + }) + + t.Run("stop successfully", func(t *testing.T) { + err := listener.Stop() + require.NoError(t, err) + assert.False(t, listener.IsRunning()) + }) + + t.Run("stop when not running returns error", func(t *testing.T) { + err := listener.Stop() + require.Error(t, err) + assert.ErrorIs(t, err, ErrNotRunning) + }) +} + +func TestListener_IsRunning(t *testing.T) { + logger := zerolog.Nop() + db := newTestDB(t) + client := &mockPushClient{latestBlock: 100} + + listener, err := NewListener(client, db, logger, nil) + require.NoError(t, err) + + assert.False(t, listener.IsRunning()) + + ctx := context.Background() + err = listener.Start(ctx) + require.NoError(t, err) + assert.True(t, listener.IsRunning()) + + err = listener.Stop() + require.NoError(t, err) + assert.False(t, listener.IsRunning()) +} + +func TestConfig_Validate(t *testing.T) { + tests := []struct { + name string + cfg Config + wantErr bool + }{ + { + name: "valid config", + cfg: Config{PollInterval: 5 * time.Second}, + wantErr: false, + }, + { + name: "min poll interval", + cfg: Config{PollInterval: 1 * time.Second}, + wantErr: false, + }, + { + name: "max poll interval", + cfg: Config{PollInterval: 5 * time.Minute}, + wantErr: false, + }, + { + name: "too short poll interval", + cfg: Config{PollInterval: 500 * time.Millisecond}, + wantErr: true, + }, + { + name: "too long poll interval", + cfg: Config{PollInterval: 10 * time.Minute}, + wantErr: true, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + err := tt.cfg.Validate() + if tt.wantErr { + assert.Error(t, err) + } else { + assert.NoError(t, err) + } + }) + } +} + +func TestConfig_ApplyDefaults(t *testing.T) { + t.Run("all zero values", func(t *testing.T) { + cfg := &Config{} + cfg.applyDefaults() + + assert.Equal(t, DefaultPollInterval, cfg.PollInterval) + assert.Equal(t, uint64(DefaultChunkSize), cfg.ChunkSize) + assert.Equal(t, uint64(DefaultQueryLimit), cfg.QueryLimit) + }) + + t.Run("partial values", func(t *testing.T) { + cfg := &Config{ + PollInterval: 10 * time.Second, + } + cfg.applyDefaults() + + assert.Equal(t, 10*time.Second, cfg.PollInterval) + assert.Equal(t, uint64(DefaultChunkSize), cfg.ChunkSize) + assert.Equal(t, uint64(DefaultQueryLimit), cfg.QueryLimit) + }) + + t.Run("all values set", func(t *testing.T) { + cfg := &Config{ + PollInterval: 10 * time.Second, + ChunkSize: 500, + QueryLimit: 50, + } + cfg.applyDefaults() + + assert.Equal(t, 10*time.Second, cfg.PollInterval) + assert.Equal(t, uint64(500), cfg.ChunkSize) + assert.Equal(t, uint64(50), cfg.QueryLimit) + }) +} + diff --git a/universalClient/chains/push/event_parser.go b/universalClient/chains/push/event_parser.go index 83319d09..312a35a5 100644 --- a/universalClient/chains/push/event_parser.go +++ b/universalClient/chains/push/event_parser.go @@ -2,113 +2,262 @@ package push import ( "encoding/json" + "errors" "fmt" "strconv" abci "github.com/cometbft/cometbft/abci/types" "github.com/pushchain/push-chain-node/universalClient/store" - "github.com/pushchain/push-chain-node/universalClient/tss/eventstore" ) -// ParseTSSProcessInitiatedEvent parses a tss_process_initiated event from ABCI events. -// Returns nil if the event is not a tss_process_initiated event. -func ParseTSSProcessInitiatedEvent(events []abci.Event, blockHeight uint64, txHash string) (*TSSProcessEvent, error) { - for _, event := range events { - if event.Type != EventTypeTssProcessInitiated { - continue - } +// Event type constants as emitted by the Push chain. +const ( + EventTypeTSSProcessInitiated = "tss_process_initiated" + EventTypeOutboundCreated = "outbound_created" +) - parsed := &TSSProcessEvent{ - BlockHeight: blockHeight, - TxHash: txHash, - } +// TSS event attribute keys. +const ( + AttrKeyProcessID = "process_id" + AttrKeyProcessType = "process_type" + AttrKeyParticipants = "participants" + AttrKeyExpiryHeight = "expiry_height" +) - // Track which required fields were found (process_id=0 is valid!) - foundProcessID := false - - for _, attr := range event.Attributes { - switch attr.Key { - case AttrKeyProcessID: - id, err := strconv.ParseUint(attr.Value, 10, 64) - if err != nil { - return nil, fmt.Errorf("failed to parse process_id: %w", err) - } - parsed.ProcessID = id - foundProcessID = true - - case AttrKeyProcessType: - parsed.ProcessType = convertProcessType(attr.Value) - - case AttrKeyParticipants: - var participants []string - if err := json.Unmarshal([]byte(attr.Value), &participants); err != nil { - return nil, fmt.Errorf("failed to parse participants: %w", err) - } - parsed.Participants = participants - - case AttrKeyExpiryHeight: - height, err := strconv.ParseUint(attr.Value, 10, 64) - if err != nil { - return nil, fmt.Errorf("failed to parse expiry_height: %w", err) - } - parsed.ExpiryHeight = height - } - } +// TSS process type values as defined in the Push chain. +const ( + ChainProcessTypeKeygen = "TSS_PROCESS_KEYGEN" + ChainProcessTypeRefresh = "TSS_PROCESS_REFRESH" + ChainProcessTypeQuorumChange = "TSS_PROCESS_QUORUM_CHANGE" +) - // Validate required fields - if !foundProcessID { - return nil, fmt.Errorf("missing process_id in event") - } - if parsed.ProcessType == "" { - return nil, fmt.Errorf("missing process_type in event") - } +// Outbound event attribute keys. +const ( + AttrKeyTxID = "tx_id" + AttrKeyUniversalTxID = "utx_id" + AttrKeyOutboundID = "outbound_id" + AttrKeyDestinationChain = "destination_chain" + AttrKeyRecipient = "recipient" + AttrKeyAmount = "amount" + AttrKeyAssetAddr = "asset_addr" + AttrKeySender = "sender" + AttrKeyPayload = "payload" + AttrKeyGasLimit = "gas_limit" + AttrKeyTxType = "tx_type" + AttrKeyPcTxHash = "pc_tx_hash" + AttrKeyLogIndex = "log_index" + AttrKeyRevertMsg = "revert_msg" + AttrKeyData = "data" +) - return parsed, nil - } +// Protocol type values for internal event classification. +const ( + ProtocolTypeKeygen = "KEYGEN" + ProtocolTypeKeyrefresh = "KEYREFRESH" + ProtocolTypeQuorumChange = "QUORUM_CHANGE" + ProtocolTypeSign = "SIGN" +) + +// Event status values. +const ( + StatusPending = "PENDING" +) - return nil, nil // No tss_process_initiated event found +// OutboundExpiryOffset is the number of blocks after event detection +// before an outbound event expires. +const OutboundExpiryOffset = 400 + +// Parser errors. +var ( + ErrMissingProcessID = errors.New("missing required attribute: process_id") + ErrMissingProcessType = errors.New("missing required attribute: process_type") + ErrMissingTxID = errors.New("missing required attribute: tx_id") + ErrInvalidProcessID = errors.New("invalid process_id format") + ErrInvalidExpiryHeight = errors.New("invalid expiry_height format") + ErrInvalidParticipants = errors.New("invalid participants format") +) + +// OutboundEventData represents the structured data for an outbound event. +type OutboundEventData struct { + UniversalTxID string `json:"utx_id"` + OutboundID string `json:"outbound_id"` + TxID string `json:"tx_id"` + DestinationChain string `json:"destination_chain"` + Recipient string `json:"recipient"` + Amount string `json:"amount"` + AssetAddr string `json:"asset_addr"` + Sender string `json:"sender"` + Payload string `json:"payload"` + GasLimit string `json:"gas_limit"` + TxType string `json:"tx_type"` + PcTxHash string `json:"pc_tx_hash"` + LogIndex string `json:"log_index"` + RevertMsg string `json:"revert_msg"` } -// convertProcessType converts chain process type to internal protocol type. -func convertProcessType(chainType string) string { - switch chainType { - case ProcessTypeKeygen: - return ProtocolTypeKeygen - case ProcessTypeRefresh: - return ProtocolTypeKeyrefresh - case ProcessTypeQuorumChange: - return ProtocolTypeQuorumChange +// ParseEvent parses a Push chain event from an ABCI event. +// Returns nil if the event type is not recognized. +// Sets BlockHeight and Status on successfully parsed events. +func ParseEvent(event abci.Event, blockHeight uint64) (*store.PCEvent, error) { + var parsed *store.PCEvent + var err error + + switch event.Type { + case EventTypeTSSProcessInitiated: + parsed, err = parseTSSEvent(event) + case EventTypeOutboundCreated: + parsed, err = parseOutboundEvent(event) default: - return chainType // Return as-is if unknown + // Unknown event type - not an error, just skip + return nil, nil + } + + if err != nil { + return nil, fmt.Errorf("failed to parse %s event: %w", event.Type, err) + } + + if parsed == nil { + return nil, nil } + + // Set common fields + parsed.BlockHeight = blockHeight + parsed.Status = StatusPending + + // Set expiry for outbound events (block seen + 400) + if event.Type == EventTypeOutboundCreated { + parsed.ExpiryBlockHeight = blockHeight + OutboundExpiryOffset + } + + return parsed, nil } -// ToTSSEventRecord converts the parsed event to a PCEvent database record. -func (e *TSSProcessEvent) ToTSSEventRecord() *store.PCEvent { - // Serialize participants as event data - var eventData []byte - if len(e.Participants) > 0 { - data := map[string]interface{}{ - "process_id": e.ProcessID, - // TODO: Maybe while tss process participants can be read from this rather than chain - "participants": e.Participants, - "tx_hash": e.TxHash, +// parseTSSEvent parses a tss_process_initiated event. +func parseTSSEvent(event abci.Event) (*store.PCEvent, error) { + attrs := extractAttributes(event) + + // Parse required fields + processIDStr, ok := attrs[AttrKeyProcessID] + if !ok { + return nil, ErrMissingProcessID + } + + processID, err := strconv.ParseUint(processIDStr, 10, 64) + if err != nil { + return nil, fmt.Errorf("%w: %v", ErrInvalidProcessID, err) + } + + processTypeStr, ok := attrs[AttrKeyProcessType] + if !ok { + return nil, ErrMissingProcessType + } + + protocolType := convertProcessType(processTypeStr) + + // Parse optional fields + var expiryHeight uint64 + if expiryStr, ok := attrs[AttrKeyExpiryHeight]; ok { + expiryHeight, err = strconv.ParseUint(expiryStr, 10, 64) + if err != nil { + return nil, fmt.Errorf("%w: %v", ErrInvalidExpiryHeight, err) } - eventData, _ = json.Marshal(data) + } + + var participants []string + if participantsStr, ok := attrs[AttrKeyParticipants]; ok { + if err := json.Unmarshal([]byte(participantsStr), &participants); err != nil { + return nil, fmt.Errorf("%w: %v", ErrInvalidParticipants, err) + } + } + + // Build event data + eventData, err := buildTSSEventData(processID, participants) + if err != nil { + return nil, fmt.Errorf("failed to build event data: %w", err) } return &store.PCEvent{ - EventID: e.EventID(), - BlockHeight: e.BlockHeight, - ExpiryBlockHeight: e.ExpiryHeight, - Type: e.ProcessType, - Status: eventstore.StatusPending, + EventID: fmt.Sprintf("%d", processID), + ExpiryBlockHeight: expiryHeight, + Type: protocolType, EventData: eventData, + }, nil +} + +// parseOutboundEvent parses an outbound_created event. +func parseOutboundEvent(event abci.Event) (*store.PCEvent, error) { + attrs := extractAttributes(event) + + // Parse required field + txID, ok := attrs[AttrKeyTxID] + if !ok { + return nil, ErrMissingTxID + } + + // Build structured event data + outboundData := OutboundEventData{ + UniversalTxID: attrs[AttrKeyUniversalTxID], + OutboundID: attrs[AttrKeyOutboundID], + TxID: txID, + DestinationChain: attrs[AttrKeyDestinationChain], + Recipient: attrs[AttrKeyRecipient], + Amount: attrs[AttrKeyAmount], + AssetAddr: attrs[AttrKeyAssetAddr], + Sender: attrs[AttrKeySender], + Payload: attrs[AttrKeyPayload], + GasLimit: attrs[AttrKeyGasLimit], + TxType: attrs[AttrKeyTxType], + PcTxHash: attrs[AttrKeyPcTxHash], + LogIndex: attrs[AttrKeyLogIndex], + RevertMsg: attrs[AttrKeyRevertMsg], + } + + eventData, err := json.Marshal(outboundData) + if err != nil { + return nil, fmt.Errorf("failed to marshal outbound event data: %w", err) + } + + return &store.PCEvent{ + EventID: txID, + Type: ProtocolTypeSign, + EventData: eventData, + }, nil +} + +// extractAttributes extracts all attributes from an ABCI event into a map. +func extractAttributes(event abci.Event) map[string]string { + attrs := make(map[string]string, len(event.Attributes)) + for _, attr := range event.Attributes { + attrs[attr.Key] = attr.Value } + return attrs } -// EventID returns the unique event ID for this process. -// Format: "{process_id}" -func (e *TSSProcessEvent) EventID() string { - return fmt.Sprintf("%d", e.ProcessID) +// buildTSSEventData constructs the JSON event data for TSS events. +func buildTSSEventData(processID uint64, participants []string) ([]byte, error) { + if len(participants) == 0 { + return nil, nil + } + + data := map[string]interface{}{ + "process_id": processID, + "participants": participants, + } + + return json.Marshal(data) +} + +// convertProcessType converts a chain process type to an internal protocol type. +func convertProcessType(chainType string) string { + switch chainType { + case ChainProcessTypeKeygen: + return ProtocolTypeKeygen + case ChainProcessTypeRefresh: + return ProtocolTypeKeyrefresh + case ChainProcessTypeQuorumChange: + return ProtocolTypeQuorumChange + default: + // Return as-is for unknown types to maintain forward compatibility + return chainType + } } diff --git a/universalClient/chains/push/event_parser_test.go b/universalClient/chains/push/event_parser_test.go new file mode 100644 index 00000000..ca348526 --- /dev/null +++ b/universalClient/chains/push/event_parser_test.go @@ -0,0 +1,391 @@ +package push + +import ( + "encoding/json" + "testing" + + abci "github.com/cometbft/cometbft/abci/types" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func TestParseEvent_TSSEvent(t *testing.T) { + tests := []struct { + name string + event abci.Event + blockHeight uint64 + wantEventID string + wantType string + wantExpiry uint64 + wantErr bool + errContains string + }{ + { + name: "valid keygen event", + event: abci.Event{ + Type: EventTypeTSSProcessInitiated, + Attributes: []abci.EventAttribute{ + {Key: AttrKeyProcessID, Value: "123"}, + {Key: AttrKeyProcessType, Value: ChainProcessTypeKeygen}, + {Key: AttrKeyExpiryHeight, Value: "1000"}, + {Key: AttrKeyParticipants, Value: `["val1","val2","val3"]`}, + }, + }, + blockHeight: 500, + wantEventID: "123", + wantType: ProtocolTypeKeygen, + wantExpiry: 1000, + wantErr: false, + }, + { + name: "valid refresh event", + event: abci.Event{ + Type: EventTypeTSSProcessInitiated, + Attributes: []abci.EventAttribute{ + {Key: AttrKeyProcessID, Value: "456"}, + {Key: AttrKeyProcessType, Value: ChainProcessTypeRefresh}, + }, + }, + blockHeight: 600, + wantEventID: "456", + wantType: ProtocolTypeKeyrefresh, + wantExpiry: 0, + wantErr: false, + }, + { + name: "valid quorum change event", + event: abci.Event{ + Type: EventTypeTSSProcessInitiated, + Attributes: []abci.EventAttribute{ + {Key: AttrKeyProcessID, Value: "789"}, + {Key: AttrKeyProcessType, Value: ChainProcessTypeQuorumChange}, + {Key: AttrKeyExpiryHeight, Value: "2000"}, + }, + }, + blockHeight: 700, + wantEventID: "789", + wantType: ProtocolTypeQuorumChange, + wantExpiry: 2000, + wantErr: false, + }, + { + name: "missing process_id", + event: abci.Event{ + Type: EventTypeTSSProcessInitiated, + Attributes: []abci.EventAttribute{ + {Key: AttrKeyProcessType, Value: ChainProcessTypeKeygen}, + }, + }, + blockHeight: 500, + wantErr: true, + errContains: "process_id", + }, + { + name: "missing process_type", + event: abci.Event{ + Type: EventTypeTSSProcessInitiated, + Attributes: []abci.EventAttribute{ + {Key: AttrKeyProcessID, Value: "123"}, + }, + }, + blockHeight: 500, + wantErr: true, + errContains: "process_type", + }, + { + name: "invalid process_id", + event: abci.Event{ + Type: EventTypeTSSProcessInitiated, + Attributes: []abci.EventAttribute{ + {Key: AttrKeyProcessID, Value: "not-a-number"}, + {Key: AttrKeyProcessType, Value: ChainProcessTypeKeygen}, + }, + }, + blockHeight: 500, + wantErr: true, + errContains: "process_id", + }, + { + name: "invalid expiry_height", + event: abci.Event{ + Type: EventTypeTSSProcessInitiated, + Attributes: []abci.EventAttribute{ + {Key: AttrKeyProcessID, Value: "123"}, + {Key: AttrKeyProcessType, Value: ChainProcessTypeKeygen}, + {Key: AttrKeyExpiryHeight, Value: "invalid"}, + }, + }, + blockHeight: 500, + wantErr: true, + errContains: "expiry_height", + }, + { + name: "invalid participants json", + event: abci.Event{ + Type: EventTypeTSSProcessInitiated, + Attributes: []abci.EventAttribute{ + {Key: AttrKeyProcessID, Value: "123"}, + {Key: AttrKeyProcessType, Value: ChainProcessTypeKeygen}, + {Key: AttrKeyParticipants, Value: "not-valid-json"}, + }, + }, + blockHeight: 500, + wantErr: true, + errContains: "participants", + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + result, err := ParseEvent(tt.event, tt.blockHeight) + + if tt.wantErr { + require.Error(t, err) + if tt.errContains != "" { + assert.Contains(t, err.Error(), tt.errContains) + } + return + } + + require.NoError(t, err) + require.NotNil(t, result) + + assert.Equal(t, tt.wantEventID, result.EventID) + assert.Equal(t, tt.wantType, result.Type) + assert.Equal(t, tt.wantExpiry, result.ExpiryBlockHeight) + assert.Equal(t, tt.blockHeight, result.BlockHeight) + assert.Equal(t, StatusPending, result.Status) + }) + } +} + +func TestParseEvent_OutboundEvent(t *testing.T) { + tests := []struct { + name string + event abci.Event + blockHeight uint64 + wantEventID string + wantExpiry uint64 + wantErr bool + errContains string + }{ + { + name: "valid outbound event", + event: abci.Event{ + Type: EventTypeOutboundCreated, + Attributes: []abci.EventAttribute{ + {Key: AttrKeyTxID, Value: "0x123abc"}, + {Key: AttrKeyUniversalTxID, Value: "utx-001"}, + {Key: AttrKeyOutboundID, Value: "out-001"}, + {Key: AttrKeyDestinationChain, Value: "ethereum"}, + {Key: AttrKeyRecipient, Value: "0xrecipient"}, + {Key: AttrKeyAmount, Value: "1000000"}, + {Key: AttrKeyAssetAddr, Value: "0xtoken"}, + {Key: AttrKeySender, Value: "0xsender"}, + {Key: AttrKeyPayload, Value: "0x"}, + {Key: AttrKeyGasLimit, Value: "21000"}, + {Key: AttrKeyTxType, Value: "TRANSFER"}, + {Key: AttrKeyPcTxHash, Value: "0xpctxhash"}, + {Key: AttrKeyLogIndex, Value: "0"}, + {Key: AttrKeyRevertMsg, Value: ""}, + }, + }, + blockHeight: 1000, + wantEventID: "0x123abc", + wantExpiry: 1000 + OutboundExpiryOffset, // blockHeight + 400 + wantErr: false, + }, + { + name: "minimal outbound event (only tx_id)", + event: abci.Event{ + Type: EventTypeOutboundCreated, + Attributes: []abci.EventAttribute{ + {Key: AttrKeyTxID, Value: "0xminimal"}, + }, + }, + blockHeight: 500, + wantEventID: "0xminimal", + wantExpiry: 500 + OutboundExpiryOffset, + wantErr: false, + }, + { + name: "missing tx_id", + event: abci.Event{ + Type: EventTypeOutboundCreated, + Attributes: []abci.EventAttribute{ + {Key: AttrKeyUniversalTxID, Value: "utx-001"}, + }, + }, + blockHeight: 500, + wantErr: true, + errContains: "tx_id", + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + result, err := ParseEvent(tt.event, tt.blockHeight) + + if tt.wantErr { + require.Error(t, err) + if tt.errContains != "" { + assert.Contains(t, err.Error(), tt.errContains) + } + return + } + + require.NoError(t, err) + require.NotNil(t, result) + + assert.Equal(t, tt.wantEventID, result.EventID) + assert.Equal(t, ProtocolTypeSign, result.Type) + assert.Equal(t, tt.wantExpiry, result.ExpiryBlockHeight) + assert.Equal(t, tt.blockHeight, result.BlockHeight) + assert.Equal(t, StatusPending, result.Status) + }) + } +} + +func TestParseEvent_OutboundEventData(t *testing.T) { + event := abci.Event{ + Type: EventTypeOutboundCreated, + Attributes: []abci.EventAttribute{ + {Key: AttrKeyTxID, Value: "0x123abc"}, + {Key: AttrKeyUniversalTxID, Value: "utx-001"}, + {Key: AttrKeyOutboundID, Value: "out-001"}, + {Key: AttrKeyDestinationChain, Value: "ethereum"}, + {Key: AttrKeyRecipient, Value: "0xrecipient"}, + {Key: AttrKeyAmount, Value: "1000000"}, + {Key: AttrKeyAssetAddr, Value: "0xtoken"}, + {Key: AttrKeySender, Value: "0xsender"}, + {Key: AttrKeyPayload, Value: "0xpayload"}, + {Key: AttrKeyGasLimit, Value: "21000"}, + {Key: AttrKeyTxType, Value: "TRANSFER"}, + {Key: AttrKeyPcTxHash, Value: "0xpctxhash"}, + {Key: AttrKeyLogIndex, Value: "5"}, + {Key: AttrKeyRevertMsg, Value: "revert reason"}, + }, + } + + result, err := ParseEvent(event, 1000) + require.NoError(t, err) + require.NotNil(t, result) + + // Unmarshal event data and verify all fields + var data OutboundEventData + err = json.Unmarshal(result.EventData, &data) + require.NoError(t, err) + + assert.Equal(t, "0x123abc", data.TxID) + assert.Equal(t, "utx-001", data.UniversalTxID) + assert.Equal(t, "out-001", data.OutboundID) + assert.Equal(t, "ethereum", data.DestinationChain) + assert.Equal(t, "0xrecipient", data.Recipient) + assert.Equal(t, "1000000", data.Amount) + assert.Equal(t, "0xtoken", data.AssetAddr) + assert.Equal(t, "0xsender", data.Sender) + assert.Equal(t, "0xpayload", data.Payload) + assert.Equal(t, "21000", data.GasLimit) + assert.Equal(t, "TRANSFER", data.TxType) + assert.Equal(t, "0xpctxhash", data.PcTxHash) + assert.Equal(t, "5", data.LogIndex) + assert.Equal(t, "revert reason", data.RevertMsg) +} + +func TestParseEvent_UnknownEventType(t *testing.T) { + event := abci.Event{ + Type: "unknown_event_type", + Attributes: []abci.EventAttribute{ + {Key: "some_key", Value: "some_value"}, + }, + } + + result, err := ParseEvent(event, 1000) + require.NoError(t, err) + assert.Nil(t, result, "unknown event types should return nil without error") +} + +func TestConvertProcessType(t *testing.T) { + tests := []struct { + input string + expected string + }{ + {ChainProcessTypeKeygen, ProtocolTypeKeygen}, + {ChainProcessTypeRefresh, ProtocolTypeKeyrefresh}, + {ChainProcessTypeQuorumChange, ProtocolTypeQuorumChange}, + {"UNKNOWN_TYPE", "UNKNOWN_TYPE"}, // Unknown types returned as-is + {"", ""}, + } + + for _, tt := range tests { + t.Run(tt.input, func(t *testing.T) { + result := convertProcessType(tt.input) + assert.Equal(t, tt.expected, result) + }) + } +} + +func TestExtractAttributes(t *testing.T) { + event := abci.Event{ + Type: "test", + Attributes: []abci.EventAttribute{ + {Key: "key1", Value: "value1"}, + {Key: "key2", Value: "value2"}, + {Key: "key3", Value: ""}, + }, + } + + attrs := extractAttributes(event) + + assert.Len(t, attrs, 3) + assert.Equal(t, "value1", attrs["key1"]) + assert.Equal(t, "value2", attrs["key2"]) + assert.Equal(t, "", attrs["key3"]) +} + +func TestBuildTSSEventData(t *testing.T) { + t.Run("with participants", func(t *testing.T) { + data, err := buildTSSEventData(123, []string{"val1", "val2"}) + require.NoError(t, err) + require.NotNil(t, data) + + var result map[string]interface{} + err = json.Unmarshal(data, &result) + require.NoError(t, err) + + assert.Equal(t, float64(123), result["process_id"]) + participants := result["participants"].([]interface{}) + assert.Len(t, participants, 2) + assert.Equal(t, "val1", participants[0]) + assert.Equal(t, "val2", participants[1]) + }) + + t.Run("without participants", func(t *testing.T) { + data, err := buildTSSEventData(123, nil) + require.NoError(t, err) + assert.Nil(t, data) + + data, err = buildTSSEventData(123, []string{}) + require.NoError(t, err) + assert.Nil(t, data) + }) +} + +func TestOutboundExpiryOffset(t *testing.T) { + // Verify the constant is set correctly + assert.Equal(t, uint64(400), uint64(OutboundExpiryOffset)) + + // Verify expiry calculation + blockHeight := uint64(1000) + event := abci.Event{ + Type: EventTypeOutboundCreated, + Attributes: []abci.EventAttribute{ + {Key: AttrKeyTxID, Value: "0xtest"}, + }, + } + + result, err := ParseEvent(event, blockHeight) + require.NoError(t, err) + assert.Equal(t, blockHeight+OutboundExpiryOffset, result.ExpiryBlockHeight) +} + diff --git a/universalClient/chains/push/event_watcher.go b/universalClient/chains/push/event_watcher.go index 68100b93..1a60a3fa 100644 --- a/universalClient/chains/push/event_watcher.go +++ b/universalClient/chains/push/event_watcher.go @@ -2,162 +2,250 @@ package push import ( "context" + "errors" + "fmt" + "sync" + "sync/atomic" "time" abci "github.com/cometbft/cometbft/abci/types" "github.com/pushchain/push-chain-node/universalClient/pushcore" - "github.com/pushchain/push-chain-node/universalClient/tss/eventstore" + "github.com/pushchain/push-chain-node/universalClient/store" "github.com/rs/zerolog" + "gorm.io/gorm" ) -// EventWatcher polls the Push chain for TSS events and stores them in the database. +// Event queries for fetching specific event types from the chain. +const ( + TSSEventQuery = EventTypeTSSProcessInitiated + ".process_id>=0" + OutboundEventQuery = EventTypeOutboundCreated + ".tx_id EXISTS" +) + +// EventWatcher polls the Push chain for events and stores them in the database. +// It handles graceful shutdown, concurrent safety, and persistent state tracking. type EventWatcher struct { - logger zerolog.Logger - pushClient *pushcore.Client - eventStore *eventstore.Store - pollInterval time.Duration - lastBlock uint64 - - ctx context.Context - cancel context.CancelFunc + logger zerolog.Logger + pushClient PushClient + db *gorm.DB + cfg Config + + lastBlock atomic.Uint64 + ctx context.Context + cancel context.CancelFunc + wg sync.WaitGroup + stopped atomic.Bool } // NewEventWatcher creates a new event watcher. func NewEventWatcher( - client *pushcore.Client, - store *eventstore.Store, + client PushClient, + db *gorm.DB, logger zerolog.Logger, + cfg Config, + startBlock uint64, ) *EventWatcher { - return &EventWatcher{ - logger: logger.With().Str("component", "push_event_watcher").Logger(), - pushClient: client, - eventStore: store, - pollInterval: DefaultPollInterval, - lastBlock: 0, + w := &EventWatcher{ + logger: logger.With().Str("component", "event_watcher").Logger(), + pushClient: client, + db: db, + cfg: cfg, } -} - -// SetPollInterval sets the polling interval. -func (w *EventWatcher) SetPollInterval(interval time.Duration) { - w.pollInterval = interval -} - -// SetLastBlock sets the starting block for polling. -func (w *EventWatcher) SetLastBlock(block uint64) { - w.lastBlock = block + w.lastBlock.Store(startBlock) + return w } // Start begins the event watching loop. -func (w *EventWatcher) Start(ctx context.Context) { +// The watcher will continue until Stop is called or the context is cancelled. +func (w *EventWatcher) Start(ctx context.Context) error { w.ctx, w.cancel = context.WithCancel(ctx) + w.stopped.Store(false) + + w.wg.Add(1) go w.watchLoop() + + return nil } -// Stop stops the event watching loop. +// Stop gracefully stops the event watcher and waits for the watch loop to exit. func (w *EventWatcher) Stop() { + if w.stopped.Swap(true) { + return // Already stopped + } + if w.cancel != nil { w.cancel() } + + // Wait for the watch loop to complete + w.wg.Wait() +} + +// LastProcessedBlock returns the last block number that was successfully processed. +func (w *EventWatcher) LastProcessedBlock() uint64 { + return w.lastBlock.Load() } -// watchLoop is the main polling loop that queries for TSS events. +// watchLoop is the main polling loop that queries for Push chain events. func (w *EventWatcher) watchLoop() { - ticker := time.NewTicker(w.pollInterval) + defer w.wg.Done() + + ticker := time.NewTicker(w.cfg.PollInterval) defer ticker.Stop() - // Initial poll - w.pollForEvents() + // Perform initial poll on startup + if err := w.pollForEvents(); err != nil { + w.logger.Error().Err(err).Msg("initial poll failed") + } for { select { case <-w.ctx.Done(): - w.logger.Info().Msg("event watcher stopped") + w.logger.Info().Msg("event watcher shutting down") return case <-ticker.C: - w.pollForEvents() + if err := w.pollForEvents(); err != nil { + w.logger.Error().Err(err).Msg("poll cycle failed") + } } } } -// pollForEvents queries the chain for new TSS events. -func (w *EventWatcher) pollForEvents() { - // Get the latest block number +// pollForEvents queries the chain for new events and stores them. +// Processes blocks in configurable chunks to avoid overwhelming the chain. +func (w *EventWatcher) pollForEvents() error { latestBlock, err := w.pushClient.GetLatestBlockNum() if err != nil { - w.logger.Error().Err(err).Msg("failed to get latest block number") - return + return fmt.Errorf("failed to get latest block: %w", err) } - // Skip if we're already caught up - if w.lastBlock >= latestBlock { - return + currentBlock := w.lastBlock.Load() + + // Already caught up + if currentBlock >= latestBlock { + return nil } - // Query for TSS events since the last processed block - minHeight := w.lastBlock + 1 - if w.lastBlock == 0 { - // First run - only get events from recent blocks to avoid scanning entire chain - if latestBlock > 1000 { - minHeight = latestBlock - 1000 - } else { - minHeight = 1 + return w.processBlockRange(currentBlock, latestBlock) +} + +// processBlockRange processes all blocks from start to end in chunks. +func (w *EventWatcher) processBlockRange(start, end uint64) error { + processedBlock := start + + for processedBlock < end { + // Check for cancellation between chunks + select { + case <-w.ctx.Done(): + return w.ctx.Err() + default: + } + + // Calculate chunk boundaries + minHeight := processedBlock + 1 + maxHeight := min(processedBlock+w.cfg.ChunkSize, end) + + // Process this chunk + newEvents, err := w.processChunk(minHeight, maxHeight) + if err != nil { + return fmt.Errorf("failed to process blocks %d-%d: %w", minHeight, maxHeight, err) + } + + if newEvents > 0 { + w.logger.Info(). + Int("new_events", newEvents). + Uint64("from_block", minHeight). + Uint64("to_block", maxHeight). + Msg("processed events") + } + + // Update state + processedBlock = maxHeight + w.lastBlock.Store(processedBlock) + + // Persist progress to database + if err := w.persistBlockProgress(processedBlock); err != nil { + w.logger.Error(). + Err(err). + Uint64("block", processedBlock). + Msg("failed to persist block progress") + // Continue processing - state will be recovered on restart } } + return nil +} + +// processChunk processes a single chunk of blocks and returns the number of new events stored. +func (w *EventWatcher) processChunk(minHeight, maxHeight uint64) (int, error) { w.logger.Debug(). Uint64("min_height", minHeight). - Uint64("max_height", latestBlock). - Msg("polling for TSS events") + Uint64("max_height", maxHeight). + Msg("querying events") + + newEventsCount := 0 + + // Query TSS events + tssCount, err := w.queryAndStoreEvents(TSSEventQuery, minHeight, maxHeight, "TSS") + if err != nil { + return 0, fmt.Errorf("TSS query failed: %w", err) + } + newEventsCount += tssCount + + // Query outbound events + outboundCount, err := w.queryAndStoreEvents(OutboundEventQuery, minHeight, maxHeight, "outbound") + if err != nil { + return 0, fmt.Errorf("outbound query failed: %w", err) + } + newEventsCount += outboundCount + + return newEventsCount, nil +} - // Query transactions with tss_process_initiated events +// queryAndStoreEvents queries for events matching the query and stores them. +func (w *EventWatcher) queryAndStoreEvents(query string, minHeight, maxHeight uint64, eventType string) (int, error) { txResults, err := w.pushClient.GetTxsByEvents( - DefaultEventQuery, + query, minHeight, - latestBlock, - 100, // limit + maxHeight, + w.cfg.QueryLimit, ) if err != nil { - w.logger.Error().Err(err).Msg("failed to query TSS events") - return + return 0, err } - // Process each transaction newEventsCount := 0 for _, txResult := range txResults { events := w.extractEventsFromTx(txResult) for _, event := range events { - if w.storeEvent(event) { + if stored, err := w.storeEvent(event); err != nil { + w.logger.Error(). + Err(err). + Str("event_id", event.EventID). + Str("event_type", eventType). + Msg("failed to store event") + } else if stored { newEventsCount++ } } } - if newEventsCount > 0 { - w.logger.Info(). - Int("new_events", newEventsCount). - Uint64("from_block", minHeight). - Uint64("to_block", latestBlock). - Msg("processed TSS events") - } - - // Update the last processed block - w.lastBlock = latestBlock + return newEventsCount, nil } -// extractEventsFromTx extracts TSS events from a transaction result. -func (w *EventWatcher) extractEventsFromTx(txResult *pushcore.TxResult) []*TSSProcessEvent { +// extractEventsFromTx extracts Push chain events from a transaction result. +func (w *EventWatcher) extractEventsFromTx(txResult *pushcore.TxResult) []*store.PCEvent { if txResult == nil || txResult.TxResponse == nil || txResult.TxResponse.TxResponse == nil { return nil } - var events []*TSSProcessEvent - - // Get events from the transaction response txResp := txResult.TxResponse.TxResponse + blockHeight := uint64(txResult.Height) + txHash := txResult.TxHash + + events := make([]*store.PCEvent, 0, len(txResp.Events)) - // Convert SDK events to ABCI events for parsing - abciEvents := make([]abci.Event, 0, len(txResp.Events)) for _, evt := range txResp.Events { + // Convert SDK event attributes to ABCI format attrs := make([]abci.EventAttribute, 0, len(evt.Attributes)) for _, attr := range evt.Attributes { attrs = append(attrs, abci.EventAttribute{ @@ -165,50 +253,93 @@ func (w *EventWatcher) extractEventsFromTx(txResult *pushcore.TxResult) []*TSSPr Value: attr.Value, }) } - abciEvents = append(abciEvents, abci.Event{ + + abciEvent := abci.Event{ Type: evt.Type, Attributes: attrs, - }) + } + + parsed, err := ParseEvent(abciEvent, blockHeight) + if err != nil { + w.logger.Warn(). + Err(err). + Str("tx_hash", txHash). + Str("event_type", evt.Type). + Msg("failed to parse event") + continue + } + + if parsed != nil { + parsed.TxHash = txHash + events = append(events, parsed) + } } - // Parse TSS events - parsed, err := ParseTSSProcessInitiatedEvent(abciEvents, uint64(txResult.Height), txResult.TxHash) - if err != nil { - w.logger.Warn(). - Err(err). - Str("tx_hash", txResult.TxHash). - Msg("failed to parse TSS event") - return nil + return events +} + +// storeEvent stores a Push chain event in the database if it doesn't already exist. +// Returns (true, nil) if a new event was stored, (false, nil) if it already existed, +// or (false, error) if storage failed. +func (w *EventWatcher) storeEvent(event *store.PCEvent) (bool, error) { + // Check for existing event + var existing store.PCEvent + err := w.db.Where("event_id = ?", event.EventID).First(&existing).Error + if err == nil { + // Event already exists + return false, nil + } + if !errors.Is(err, gorm.ErrRecordNotFound) { + return false, fmt.Errorf("failed to check existing event: %w", err) } - if parsed != nil { - events = append(events, parsed) + // Store new event + if err := w.db.Create(event).Error; err != nil { + return false, fmt.Errorf("failed to create event: %w", err) } - return events + w.logger.Debug(). + Str("event_id", event.EventID). + Str("type", event.Type). + Uint64("block_height", event.BlockHeight). + Msg("stored new event") + + return true, nil } -// storeEvent stores a TSS event in the database if it doesn't already exist. -// Returns true if a new event was stored, false if it already existed. -func (w *EventWatcher) storeEvent(event *TSSProcessEvent) bool { - eventID := event.EventID() +// persistBlockProgress updates the last processed block in chain_states. +func (w *EventWatcher) persistBlockProgress(blockNumber uint64) error { + var chainState store.ChainState + + err := w.db.First(&chainState).Error + if err != nil && !errors.Is(err, gorm.ErrRecordNotFound) { + return fmt.Errorf("failed to query chain state: %w", err) + } - // Check if event already exists - existing, err := w.eventStore.GetEvent(eventID) - if err == nil && existing != nil { - return false + if errors.Is(err, gorm.ErrRecordNotFound) { + // Create new record + chainState = store.ChainState{LastBlock: blockNumber} + if err := w.db.Create(&chainState).Error; err != nil { + return fmt.Errorf("failed to create chain state: %w", err) + } + return nil } - // Use eventstore to create - record := event.ToTSSEventRecord() - if err := w.eventStore.CreateEvent(record); err != nil { - w.logger.Error().Err(err).Str("event_id", eventID).Msg("failed to store TSS event") - return false + // Update existing record if we've progressed + if blockNumber > chainState.LastBlock { + chainState.LastBlock = blockNumber + if err := w.db.Save(&chainState).Error; err != nil { + return fmt.Errorf("failed to update chain state: %w", err) + } } - return true + + return nil } -// GetLastBlock returns the last processed block height. -func (w *EventWatcher) GetLastBlock() uint64 { - return w.lastBlock +// min returns the smaller of two uint64 values. +func min(a, b uint64) uint64 { + if a < b { + return a + } + return b } diff --git a/universalClient/chains/push/event_watcher_test.go b/universalClient/chains/push/event_watcher_test.go new file mode 100644 index 00000000..78c55432 --- /dev/null +++ b/universalClient/chains/push/event_watcher_test.go @@ -0,0 +1,350 @@ +package push + +import ( + "context" + "testing" + "time" + + "github.com/pushchain/push-chain-node/universalClient/pushcore" + "github.com/pushchain/push-chain-node/universalClient/store" + "github.com/rs/zerolog" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "gorm.io/driver/sqlite" + "gorm.io/gorm" + gormlogger "gorm.io/gorm/logger" +) + +func newTestDBForWatcher(t *testing.T) *gorm.DB { + db, err := gorm.Open(sqlite.Open(":memory:"), &gorm.Config{ + Logger: gormlogger.Default.LogMode(gormlogger.Silent), + }) + require.NoError(t, err) + + err = db.AutoMigrate(&store.ChainState{}, &store.PCEvent{}) + require.NoError(t, err) + + return db +} + +type mockPushClientForWatcher struct { + latestBlock uint64 + txResults map[string][]*pushcore.TxResult // query -> results + getBlockErr error + getTxsErr error + queriesMade []string +} + +func (m *mockPushClientForWatcher) GetLatestBlockNum() (uint64, error) { + return m.latestBlock, m.getBlockErr +} + +func (m *mockPushClientForWatcher) GetTxsByEvents(query string, minHeight, maxHeight uint64, limit uint64) ([]*pushcore.TxResult, error) { + m.queriesMade = append(m.queriesMade, query) + if m.getTxsErr != nil { + return nil, m.getTxsErr + } + if results, ok := m.txResults[query]; ok { + return results, nil + } + return nil, nil +} + +func TestNewEventWatcher(t *testing.T) { + logger := zerolog.Nop() + db := newTestDBForWatcher(t) + client := &mockPushClientForWatcher{} + cfg := Config{ + PollInterval: 5 * time.Second, + ChunkSize: 1000, + QueryLimit: 100, + } + + watcher := NewEventWatcher(client, db, logger, cfg, 100) + + require.NotNil(t, watcher) + assert.Equal(t, uint64(100), watcher.LastProcessedBlock()) +} + +func TestEventWatcher_StartStop(t *testing.T) { + logger := zerolog.Nop() + db := newTestDBForWatcher(t) + client := &mockPushClientForWatcher{latestBlock: 100} + cfg := Config{ + PollInterval: 100 * time.Millisecond, + ChunkSize: 1000, + QueryLimit: 100, + } + + watcher := NewEventWatcher(client, db, logger, cfg, 100) + + ctx, cancel := context.WithCancel(context.Background()) + defer cancel() + + err := watcher.Start(ctx) + require.NoError(t, err) + + // Give it time to start + time.Sleep(50 * time.Millisecond) + + watcher.Stop() + + // Verify it can be stopped multiple times without issue + watcher.Stop() +} + +func TestEventWatcher_LastProcessedBlock(t *testing.T) { + logger := zerolog.Nop() + db := newTestDBForWatcher(t) + client := &mockPushClientForWatcher{latestBlock: 100} + cfg := Config{ + PollInterval: 5 * time.Second, + ChunkSize: 1000, + QueryLimit: 100, + } + + watcher := NewEventWatcher(client, db, logger, cfg, 50) + assert.Equal(t, uint64(50), watcher.LastProcessedBlock()) +} + +func TestEventWatcher_StoreEvent(t *testing.T) { + logger := zerolog.Nop() + db := newTestDBForWatcher(t) + client := &mockPushClientForWatcher{latestBlock: 100} + cfg := Config{ + PollInterval: 5 * time.Second, + ChunkSize: 1000, + QueryLimit: 100, + } + + watcher := NewEventWatcher(client, db, logger, cfg, 0) + + t.Run("store new event", func(t *testing.T) { + event := &store.PCEvent{ + EventID: "test-event-1", + TxHash: "0xhash1", + BlockHeight: 100, + Type: ProtocolTypeSign, + Status: StatusPending, + EventData: []byte(`{"test": "data"}`), + } + + stored, err := watcher.storeEvent(event) + require.NoError(t, err) + assert.True(t, stored) + + // Verify it's in the database + var found store.PCEvent + err = db.Where("event_id = ?", "test-event-1").First(&found).Error + require.NoError(t, err) + assert.Equal(t, "test-event-1", found.EventID) + }) + + t.Run("skip duplicate event", func(t *testing.T) { + event := &store.PCEvent{ + EventID: "test-event-1", // Same as above + TxHash: "0xhash2", + BlockHeight: 101, + Type: ProtocolTypeSign, + Status: StatusPending, + } + + stored, err := watcher.storeEvent(event) + require.NoError(t, err) + assert.False(t, stored, "duplicate event should not be stored") + }) + + t.Run("store different event", func(t *testing.T) { + event := &store.PCEvent{ + EventID: "test-event-2", + TxHash: "0xhash3", + BlockHeight: 102, + Type: ProtocolTypeKeygen, + Status: StatusPending, + } + + stored, err := watcher.storeEvent(event) + require.NoError(t, err) + assert.True(t, stored) + }) +} + +func TestEventWatcher_PersistBlockProgress(t *testing.T) { + logger := zerolog.Nop() + db := newTestDBForWatcher(t) + client := &mockPushClientForWatcher{latestBlock: 100} + cfg := Config{ + PollInterval: 5 * time.Second, + ChunkSize: 1000, + QueryLimit: 100, + } + + watcher := NewEventWatcher(client, db, logger, cfg, 0) + + t.Run("create new chain state", func(t *testing.T) { + err := watcher.persistBlockProgress(100) + require.NoError(t, err) + + var state store.ChainState + err = db.First(&state).Error + require.NoError(t, err) + assert.Equal(t, uint64(100), state.LastBlock) + }) + + t.Run("update existing chain state", func(t *testing.T) { + err := watcher.persistBlockProgress(200) + require.NoError(t, err) + + var state store.ChainState + err = db.First(&state).Error + require.NoError(t, err) + assert.Equal(t, uint64(200), state.LastBlock) + }) + + t.Run("skip update if not progressed", func(t *testing.T) { + err := watcher.persistBlockProgress(150) // Less than 200 + require.NoError(t, err) + + var state store.ChainState + err = db.First(&state).Error + require.NoError(t, err) + assert.Equal(t, uint64(200), state.LastBlock) // Should still be 200 + }) +} + +func TestEventWatcher_QueryAndStoreEvents(t *testing.T) { + logger := zerolog.Nop() + db := newTestDBForWatcher(t) + client := &mockPushClientForWatcher{ + latestBlock: 100, + txResults: make(map[string][]*pushcore.TxResult), + } + cfg := Config{ + PollInterval: 5 * time.Second, + ChunkSize: 1000, + QueryLimit: 100, + } + + watcher := NewEventWatcher(client, db, logger, cfg, 0) + + t.Run("no results", func(t *testing.T) { + count, err := watcher.queryAndStoreEvents(TSSEventQuery, 1, 100, "TSS") + require.NoError(t, err) + assert.Equal(t, 0, count) + }) +} + +func TestEventWatcher_ProcessChunk(t *testing.T) { + logger := zerolog.Nop() + db := newTestDBForWatcher(t) + client := &mockPushClientForWatcher{ + latestBlock: 100, + txResults: make(map[string][]*pushcore.TxResult), + } + cfg := Config{ + PollInterval: 5 * time.Second, + ChunkSize: 1000, + QueryLimit: 100, + } + + watcher := NewEventWatcher(client, db, logger, cfg, 0) + + t.Run("processes both TSS and outbound queries", func(t *testing.T) { + client.queriesMade = nil // Reset + + _, err := watcher.processChunk(1, 100) + require.NoError(t, err) + + // Should have made two queries - one for TSS, one for outbound + assert.Len(t, client.queriesMade, 2) + assert.Contains(t, client.queriesMade, TSSEventQuery) + assert.Contains(t, client.queriesMade, OutboundEventQuery) + }) +} + +func TestEventWatcher_PollForEvents_CaughtUp(t *testing.T) { + logger := zerolog.Nop() + db := newTestDBForWatcher(t) + client := &mockPushClientForWatcher{ + latestBlock: 100, + txResults: make(map[string][]*pushcore.TxResult), + } + cfg := Config{ + PollInterval: 5 * time.Second, + ChunkSize: 1000, + QueryLimit: 100, + } + + // Start at block 100, latest is 100 - should be caught up + watcher := NewEventWatcher(client, db, logger, cfg, 100) + + err := watcher.pollForEvents() + require.NoError(t, err) + + // No queries should have been made since we're caught up + assert.Len(t, client.queriesMade, 0) +} + +func TestEventWatcher_PollForEvents_ProcessesNewBlocks(t *testing.T) { + logger := zerolog.Nop() + db := newTestDBForWatcher(t) + client := &mockPushClientForWatcher{ + latestBlock: 200, + txResults: make(map[string][]*pushcore.TxResult), + } + cfg := Config{ + PollInterval: 5 * time.Second, + ChunkSize: 1000, + QueryLimit: 100, + } + + // Start at block 100, latest is 200 - should process new blocks + watcher := NewEventWatcher(client, db, logger, cfg, 100) + + // Need to start the watcher to initialize context (then stop it to run manual poll) + ctx, cancel := context.WithCancel(context.Background()) + defer cancel() + err := watcher.Start(ctx) + require.NoError(t, err) + watcher.Stop() + + // Re-create watcher for clean test + client.queriesMade = nil + watcher = NewEventWatcher(client, db, logger, cfg, 100) + watcher.ctx, watcher.cancel = context.WithCancel(context.Background()) + defer watcher.cancel() + + err = watcher.pollForEvents() + require.NoError(t, err) + + // Should have processed blocks and updated last block + assert.Equal(t, uint64(200), watcher.LastProcessedBlock()) + + // Should have made queries (2 per chunk: TSS + outbound) + assert.GreaterOrEqual(t, len(client.queriesMade), 2) +} + +func TestMin(t *testing.T) { + tests := []struct { + a, b uint64 + expected uint64 + }{ + {1, 2, 1}, + {2, 1, 1}, + {0, 0, 0}, + {100, 100, 100}, + {0, 100, 0}, + } + + for _, tt := range tests { + result := min(tt.a, tt.b) + assert.Equal(t, tt.expected, result) + } +} + +func TestEventQueries(t *testing.T) { + // Verify query constants are correctly formed + assert.Equal(t, "tss_process_initiated.process_id>=0", TSSEventQuery) + assert.Equal(t, "outbound_created.tx_id EXISTS", OutboundEventQuery) +} + diff --git a/universalClient/chains/push/listener.go b/universalClient/chains/push/listener.go deleted file mode 100644 index f0b37121..00000000 --- a/universalClient/chains/push/listener.go +++ /dev/null @@ -1,128 +0,0 @@ -package push - -import ( - "context" - "sync" - "time" - - "github.com/pushchain/push-chain-node/universalClient/pushcore" - "github.com/pushchain/push-chain-node/universalClient/tss/eventstore" - "github.com/rs/zerolog" -) - -// PushTSSEventListener listens for TSS events from the Push chain -// and stores them in the database for processing. -type PushTSSEventListener struct { - logger zerolog.Logger - watcher *EventWatcher - - mu sync.RWMutex - running bool - healthy bool -} - -// NewPushTSSEventListener creates a new Push TSS event listener. -func NewPushTSSEventListener( - client *pushcore.Client, - store *eventstore.Store, - logger zerolog.Logger, -) *PushTSSEventListener { - return &PushTSSEventListener{ - logger: logger.With().Str("component", "push_tss_listener").Logger(), - watcher: NewEventWatcher(client, store, logger), - running: false, - healthy: false, - } -} - -// Config holds configuration for the listener. -type Config struct { - PollInterval time.Duration - StartBlock uint64 -} - -// DefaultConfig returns the default listener configuration. -func DefaultConfig() Config { - return Config{ - PollInterval: DefaultPollInterval, - StartBlock: 0, // Start from the beginning (or recent blocks) - } -} - -// WithConfig applies configuration to the listener. -func (l *PushTSSEventListener) WithConfig(cfg Config) *PushTSSEventListener { - if cfg.PollInterval > 0 { - l.watcher.SetPollInterval(cfg.PollInterval) - } - if cfg.StartBlock > 0 { - l.watcher.SetLastBlock(cfg.StartBlock) - } - return l -} - -// Start begins listening for TSS events from the Push chain. -func (l *PushTSSEventListener) Start(ctx context.Context) error { - l.mu.Lock() - defer l.mu.Unlock() - - if l.running { - return nil // Already running - } - - l.logger.Info().Msg("starting Push TSS event listener") - - // Start the event watcher - l.watcher.Start(ctx) - - l.running = true - l.healthy = true - - l.logger.Info().Msg("Push TSS event listener started") - return nil -} - -// Stop stops the listener. -func (l *PushTSSEventListener) Stop() error { - l.mu.Lock() - defer l.mu.Unlock() - - if !l.running { - return nil // Already stopped - } - - l.logger.Info().Msg("stopping Push TSS event listener") - - l.watcher.Stop() - - l.running = false - l.healthy = false - - l.logger.Info().Msg("Push TSS event listener stopped") - return nil -} - -// IsHealthy returns whether the listener is operating normally. -func (l *PushTSSEventListener) IsHealthy() bool { - l.mu.RLock() - defer l.mu.RUnlock() - return l.healthy -} - -// IsRunning returns whether the listener is currently running. -func (l *PushTSSEventListener) IsRunning() bool { - l.mu.RLock() - defer l.mu.RUnlock() - return l.running -} - -// GetLastProcessedBlock returns the last block height that was processed. -func (l *PushTSSEventListener) GetLastProcessedBlock() uint64 { - return l.watcher.GetLastBlock() -} - -// SetHealthy sets the health status (useful for testing or external health checks). -func (l *PushTSSEventListener) SetHealthy(healthy bool) { - l.mu.Lock() - defer l.mu.Unlock() - l.healthy = healthy -} diff --git a/universalClient/chains/push/types.go b/universalClient/chains/push/types.go deleted file mode 100644 index 16057fae..00000000 --- a/universalClient/chains/push/types.go +++ /dev/null @@ -1,44 +0,0 @@ -package push - -import "time" - -// Event type constants from the utss module. -const ( - // EventTypeTssProcessInitiated is emitted when a TSS key process is initiated on-chain. - EventTypeTssProcessInitiated = "tss_process_initiated" - - // Event attribute keys - AttrKeyProcessID = "process_id" - AttrKeyProcessType = "process_type" - AttrKeyParticipants = "participants" - AttrKeyExpiryHeight = "expiry_height" - - // Process type values from the chain - ProcessTypeKeygen = "TSS_PROCESS_KEYGEN" - ProcessTypeRefresh = "TSS_PROCESS_REFRESH" - ProcessTypeQuorumChange = "TSS_PROCESS_QUORUM_CHANGE" -) - -// Protocol type values for PCEvent.Type field. -const ( - ProtocolTypeKeygen = "KEYGEN" - ProtocolTypeKeyrefresh = "KEYREFRESH" - ProtocolTypeQuorumChange = "QUORUM_CHANGE" - ProtocolTypeSign = "SIGN" -) - -// Default configuration values. -const ( - DefaultPollInterval = 5 * time.Second - DefaultEventQuery = EventTypeTssProcessInitiated + ".process_id>=0" -) - -// TSSProcessEvent represents a parsed tss_process_initiated event from the chain. -type TSSProcessEvent struct { - ProcessID uint64 // Process ID from the event - ProcessType string // "keygen" or "keyrefresh" - Participants []string // List of validator addresses - ExpiryHeight uint64 // Block height when this process expires - BlockHeight uint64 // Block height when the event occurred - TxHash string // Transaction hash containing this event -} diff --git a/universalClient/core/client.go b/universalClient/core/client.go index 61376b4a..0d827d92 100644 --- a/universalClient/core/client.go +++ b/universalClient/core/client.go @@ -17,7 +17,6 @@ import ( "github.com/pushchain/push-chain-node/universalClient/db" "github.com/pushchain/push-chain-node/universalClient/pushcore" "github.com/pushchain/push-chain-node/universalClient/tss" - "github.com/pushchain/push-chain-node/universalClient/tss/eventstore" "github.com/pushchain/push-chain-node/universalClient/tss/vote" "github.com/rs/zerolog" ) @@ -45,8 +44,8 @@ type UniversalClient struct { chainCacheJob *cron.ChainCacheJob chainRegistryJob *cron.ChainRegistryJob - // Push TSS event listener - pushTSSListener *push.PushTSSEventListener + // Push event listener + pushListener *push.Listener // TSS Node (optional, enabled via config) tssNode *tss.Node @@ -124,13 +123,15 @@ func NewUniversalClient(ctx context.Context, log zerolog.Logger, dbManager *db.C // Register as observer for chain addition events chainRegistry.SetObserver(uc) - // Create TSS event listener for Push chain events - tssDB, err := dbManager.GetChainDB("universal-validator") + // Create Push chain event listener + pushDB, err := dbManager.GetChainDB("push") if err != nil { - return nil, fmt.Errorf("failed to get TSS database: %w", err) + return nil, fmt.Errorf("failed to get Push database: %w", err) + } + uc.pushListener, err = push.NewListener(pushCore, pushDB.Client(), log, nil) + if err != nil { + return nil, fmt.Errorf("failed to create Push listener: %w", err) } - tssEventStore := eventstore.NewStore(tssDB.Client(), log) - uc.pushTSSListener = push.NewPushTSSEventListener(pushCore, tssEventStore, log) // Perform mandatory startup validation log.Info().Msg("🔐 Validating hotkey and AuthZ permissions...") @@ -183,7 +184,7 @@ func NewUniversalClient(ctx context.Context, log zerolog.Logger, dbManager *db.C LibP2PListen: cfg.TSSP2PListen, HomeDir: constant.DefaultNodeHome, Password: cfg.TSSPassword, - Database: tssDB, + Database: pushDB, PushCore: pushCore, Logger: log, VoteHandler: tssVoteHandler, @@ -250,12 +251,12 @@ func (uc *UniversalClient) Start() error { } } - // Start the Push TSS event listener - if uc.pushTSSListener != nil { - if err := uc.pushTSSListener.Start(uc.ctx); err != nil { - uc.log.Error().Err(err).Msg("failed to start Push TSS listener") + // Start the Push event listener + if uc.pushListener != nil { + if err := uc.pushListener.Start(uc.ctx); err != nil { + uc.log.Error().Err(err).Msg("failed to start Push listener") } else { - uc.log.Info().Msg("✅ Push TSS event listener started") + uc.log.Info().Msg("✅ Push event listener started") } } @@ -303,9 +304,13 @@ func (uc *UniversalClient) Start() error { uc.gasPriceFetcher.Stop() } - // Stop Push TSS event listener - if uc.pushTSSListener != nil { - uc.pushTSSListener.Stop() + // Stop Push event listener + if uc.pushListener != nil { + if err := uc.pushListener.Stop(); err != nil { + uc.log.Error().Err(err).Msg("error stopping Push listener") + } else { + uc.log.Info().Msg("✅ Push listener stopped") + } } // Stop TSS node From 6d4efcedac6a897f79737684b9ccf378d5abe605 Mon Sep 17 00:00:00 2001 From: aman035 Date: Mon, 5 Jan 2026 16:56:04 +0530 Subject: [PATCH 099/120] change model comments --- universalClient/store/models.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/universalClient/store/models.go b/universalClient/store/models.go index 992a4b14..42893e17 100644 --- a/universalClient/store/models.go +++ b/universalClient/store/models.go @@ -55,13 +55,13 @@ type GasVoteTransaction struct { // Table name: "events" (PC_EVENTS) type PCEvent struct { gorm.Model - EventID string `gorm:"uniqueIndex;not null"` // Unique event identifier (typically process ID) - BlockHeight uint64 `gorm:"index;not null"` // Block height on Push chain where event was detected + EventID string `gorm:"uniqueIndex;not null"` // Unique event identifier + BlockHeight uint64 `gorm:"index;not null"` // Block height where event was detected ExpiryBlockHeight uint64 `gorm:"index;not null"` // Block height when event expires Type string // "KEYGEN", "KEYREFRESH", "QUORUM_CHANGE", or "SIGN" Status string `gorm:"index;not null"` // "PENDING", "IN_PROGRESS", "BROADCASTED", "COMPLETED", "REVERTED" EventData []byte // Raw JSON-encoded event data from chain - TxHash string // Transaction hash on Push chain (empty until voted) + TxHash string // Transaction hash ( Voting Tx for "KEYGEN", "KEYREFRESH", "QUORUM_CHANGE", External Chain Broadcast Tx for "SIGN") ErrorMsg string `gorm:"type:text"` // Error message if processing failed } From 0ae7ea9a250319d380d2e0b8851cfeef1d2979cd Mon Sep 17 00:00:00 2001 From: aman035 Date: Thu, 8 Jan 2026 13:52:51 +0530 Subject: [PATCH 100/120] refactor: event parser --- universalClient/chains/push/event_parser.go | 32 +++++-------------- .../chains/push/event_parser_test.go | 9 +++--- 2 files changed, 13 insertions(+), 28 deletions(-) diff --git a/universalClient/chains/push/event_parser.go b/universalClient/chains/push/event_parser.go index 312a35a5..5ca88955 100644 --- a/universalClient/chains/push/event_parser.go +++ b/universalClient/chains/push/event_parser.go @@ -8,12 +8,14 @@ import ( abci "github.com/cometbft/cometbft/abci/types" "github.com/pushchain/push-chain-node/universalClient/store" + uexecutortypes "github.com/pushchain/push-chain-node/x/uexecutor/types" + utsstypes "github.com/pushchain/push-chain-node/x/utss/types" ) -// Event type constants as emitted by the Push chain. +// Event type constants const ( - EventTypeTSSProcessInitiated = "tss_process_initiated" - EventTypeOutboundCreated = "outbound_created" + EventTypeTSSProcessInitiated = utsstypes.EventTypeTssProcessInitiated + EventTypeOutboundCreated = uexecutortypes.EventTypeOutboundCreated ) // TSS event attribute keys. @@ -77,24 +79,6 @@ var ( ErrInvalidParticipants = errors.New("invalid participants format") ) -// OutboundEventData represents the structured data for an outbound event. -type OutboundEventData struct { - UniversalTxID string `json:"utx_id"` - OutboundID string `json:"outbound_id"` - TxID string `json:"tx_id"` - DestinationChain string `json:"destination_chain"` - Recipient string `json:"recipient"` - Amount string `json:"amount"` - AssetAddr string `json:"asset_addr"` - Sender string `json:"sender"` - Payload string `json:"payload"` - GasLimit string `json:"gas_limit"` - TxType string `json:"tx_type"` - PcTxHash string `json:"pc_tx_hash"` - LogIndex string `json:"log_index"` - RevertMsg string `json:"revert_msg"` -} - // ParseEvent parses a Push chain event from an ABCI event. // Returns nil if the event type is not recognized. // Sets BlockHeight and Status on successfully parsed events. @@ -195,9 +179,9 @@ func parseOutboundEvent(event abci.Event) (*store.PCEvent, error) { } // Build structured event data - outboundData := OutboundEventData{ - UniversalTxID: attrs[AttrKeyUniversalTxID], - OutboundID: attrs[AttrKeyOutboundID], + outboundData := uexecutortypes.OutboundCreatedEvent{ + UniversalTxId: attrs[AttrKeyUniversalTxID], + OutboundId: attrs[AttrKeyOutboundID], TxID: txID, DestinationChain: attrs[AttrKeyDestinationChain], Recipient: attrs[AttrKeyRecipient], diff --git a/universalClient/chains/push/event_parser_test.go b/universalClient/chains/push/event_parser_test.go index ca348526..9ab91f25 100644 --- a/universalClient/chains/push/event_parser_test.go +++ b/universalClient/chains/push/event_parser_test.go @@ -7,6 +7,8 @@ import ( abci "github.com/cometbft/cometbft/abci/types" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + + uexecutortypes "github.com/pushchain/push-chain-node/x/uexecutor/types" ) func TestParseEvent_TSSEvent(t *testing.T) { @@ -272,13 +274,13 @@ func TestParseEvent_OutboundEventData(t *testing.T) { require.NotNil(t, result) // Unmarshal event data and verify all fields - var data OutboundEventData + var data uexecutortypes.OutboundCreatedEvent err = json.Unmarshal(result.EventData, &data) require.NoError(t, err) assert.Equal(t, "0x123abc", data.TxID) - assert.Equal(t, "utx-001", data.UniversalTxID) - assert.Equal(t, "out-001", data.OutboundID) + assert.Equal(t, "utx-001", data.UniversalTxId) + assert.Equal(t, "out-001", data.OutboundId) assert.Equal(t, "ethereum", data.DestinationChain) assert.Equal(t, "0xrecipient", data.Recipient) assert.Equal(t, "1000000", data.Amount) @@ -388,4 +390,3 @@ func TestOutboundExpiryOffset(t *testing.T) { require.NoError(t, err) assert.Equal(t, blockHeight+OutboundExpiryOffset, result.ExpiryBlockHeight) } - From 6e22aaf2ce336280622da2f9b620858e0581bf1c Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Thu, 8 Jan 2026 16:29:11 +0530 Subject: [PATCH 101/120] refactor: removed outbound id helper as now txId is generated in universal gateway --- x/uexecutor/types/keys.go | 9 --------- 1 file changed, 9 deletions(-) diff --git a/x/uexecutor/types/keys.go b/x/uexecutor/types/keys.go index e2f2c1e2..d2c7c880 100755 --- a/x/uexecutor/types/keys.go +++ b/x/uexecutor/types/keys.go @@ -77,15 +77,6 @@ func GetOutboundBallotKey( return hex.EncodeToString(hash[:]), nil } -func GetOutboundId( - utxId, pcTxHash string, - logIndex uint64, -) string { - data := fmt.Sprintf("%s:%s:%d", utxId, pcTxHash, logIndex) - hash := sha256.Sum256([]byte(data)) - return hex.EncodeToString(hash[:]) -} - // Outbound Id for a inbound revert tx func GetOutboundRevertId(inboundTxHash string) string { data := fmt.Sprintf("%s:REVERT", inboundTxHash) From 6ba59e85a2eccf89d5b450a118d13285ba85aebd Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Thu, 8 Jan 2026 16:29:56 +0530 Subject: [PATCH 102/120] feat: updated universalTxwithdraw event to UniversalTxOutboundEvent decoding --- x/uexecutor/types/gateway_pc_event_decode.go | 25 ++++++++++---------- 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/x/uexecutor/types/gateway_pc_event_decode.go b/x/uexecutor/types/gateway_pc_event_decode.go index d2742dc0..8a2da39b 100644 --- a/x/uexecutor/types/gateway_pc_event_decode.go +++ b/x/uexecutor/types/gateway_pc_event_decode.go @@ -10,7 +10,8 @@ import ( "github.com/ethereum/go-ethereum/common" ) -type UniversalTxWithdrawEvent struct { +type UniversalTxOutboundEvent struct { + TxID string // 0x... bytes32 Sender string // 0x... address ChainId string // destination chain (CAIP-2 string) Token string // 0x... ERC20 or zero address for native @@ -25,20 +26,21 @@ type UniversalTxWithdrawEvent struct { TxType TxType // ← single source of truth from proto } -func DecodeUniversalTxWithdrawFromLog(log *evmtypes.Log) (*UniversalTxWithdrawEvent, error) { - if len(log.Topics) == 0 || log.Topics[0] != UniversalTxWithdrawEventSig { - return nil, fmt.Errorf("not a UniversalTxWithdraw event") +func DecodeUniversalTxOutboundFromLog(log *evmtypes.Log) (*UniversalTxOutboundEvent, error) { + if len(log.Topics) == 0 || log.Topics[0] != UniversalTxOutboundEventSig { + return nil, fmt.Errorf("not a UniversalTxOutbound event") } - if len(log.Topics) < 3 { + if len(log.Topics) < 4 { return nil, fmt.Errorf("insufficient topics") } - event := &UniversalTxWithdrawEvent{ - Sender: common.HexToAddress(log.Topics[1]).Hex(), - Token: common.HexToAddress(log.Topics[2]).Hex(), + event := &UniversalTxOutboundEvent{ + TxID: log.Topics[1], + Sender: common.HexToAddress(log.Topics[2]).Hex(), + Token: common.HexToAddress(log.Topics[3]).Hex(), } - // Define types exactly once + // ABI types stringType, _ := abi.NewType("string", "", nil) bytesType, _ := abi.NewType("bytes", "", nil) uint256Type, _ := abi.NewType("uint256", "", nil) @@ -55,13 +57,12 @@ func DecodeUniversalTxWithdrawFromLog(log *evmtypes.Log) (*UniversalTxWithdrawEv {Type: bytesType}, // payload {Type: uint256Type}, // protocolFee {Type: addressType}, // revertRecipient - {Type: uint8Type}, // txType ← now included! + {Type: uint8Type}, // txType } values, err := arguments.Unpack(log.Data) if err != nil { - fmt.Println(err) - return nil, fmt.Errorf("failed to unpack UniversalTxWithdraw: %w", err) + return nil, fmt.Errorf("failed to unpack UniversalTxOutbound: %w", err) } if len(values) != 10 { From 008d2eda1622c4dd51e6cebe95ee35111ce9d455 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Thu, 8 Jan 2026 16:31:02 +0530 Subject: [PATCH 103/120] feat: updated UniversalTxOutboundEvent signature --- x/uexecutor/keeper/create_outbound.go | 6 +++--- x/uexecutor/types/constants.go | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/x/uexecutor/keeper/create_outbound.go b/x/uexecutor/keeper/create_outbound.go index 536937dd..fe5bb59a 100644 --- a/x/uexecutor/keeper/create_outbound.go +++ b/x/uexecutor/keeper/create_outbound.go @@ -34,11 +34,11 @@ func (k Keeper) BuildOutboundsFromReceipt( continue } - if strings.ToLower(lg.Topics[0]) != strings.ToLower(types.UniversalTxWithdrawEventSig) { + if strings.ToLower(lg.Topics[0]) != strings.ToLower(types.UniversalTxOutboundEventSig) { continue } - event, err := types.DecodeUniversalTxWithdrawFromLog(lg) + event, err := types.DecodeUniversalTxOutboundFromLog(lg) if err != nil { return nil, fmt.Errorf("failed to decode UniversalTxWithdraw: %w", err) } @@ -71,7 +71,7 @@ func (k Keeper) BuildOutboundsFromReceipt( FundRecipient: event.RevertRecipient, }, OutboundStatus: types.Status_PENDING, - Id: types.GetOutboundId(utxId, receipt.Hash, lg.Index), + Id: event.TxID, } outbounds = append(outbounds, outbound) diff --git a/x/uexecutor/types/constants.go b/x/uexecutor/types/constants.go index 91ba7b8b..35d94535 100644 --- a/x/uexecutor/types/constants.go +++ b/x/uexecutor/types/constants.go @@ -42,6 +42,6 @@ const ( DefaultExpiryAfterBlocks = 10000 ) -var UniversalTxWithdrawEventSig = crypto.Keccak256Hash([]byte( - "UniversalTxWithdraw(address,string,address,bytes,uint256,address,uint256,uint256,bytes,uint256,address,uint8)", +var UniversalTxOutboundEventSig = crypto.Keccak256Hash([]byte( + "UniversalTxOutbound(bytes32,address,string,address,bytes,uint256,address,uint256,uint256,bytes,uint256,address,uint8)", )).Hex() From b60098993e0c450a2e77b5fac65d006fb0a78bf0 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Thu, 8 Jan 2026 16:31:58 +0530 Subject: [PATCH 104/120] tests: removed migrate uea integration tests --- .../integration/uexecutor/migrate_uea_test.go | 147 ------------------ 1 file changed, 147 deletions(-) delete mode 100644 test/integration/uexecutor/migrate_uea_test.go diff --git a/test/integration/uexecutor/migrate_uea_test.go b/test/integration/uexecutor/migrate_uea_test.go deleted file mode 100644 index cf6ab9d1..00000000 --- a/test/integration/uexecutor/migrate_uea_test.go +++ /dev/null @@ -1,147 +0,0 @@ -package integrationtest - -import ( - "testing" - - "cosmossdk.io/math" - "github.com/ethereum/go-ethereum/common" - utils "github.com/pushchain/push-chain-node/test/utils" - uexecutorkeeper "github.com/pushchain/push-chain-node/x/uexecutor/keeper" - uexecutortypes "github.com/pushchain/push-chain-node/x/uexecutor/types" - uregistrytypes "github.com/pushchain/push-chain-node/x/uregistry/types" - "github.com/stretchr/testify/require" -) - -func TestMigrateUEA(t *testing.T) { - app, ctx, _ := utils.SetAppWithValidators(t) - - chainConfigTest := uregistrytypes.ChainConfig{ - Chain: "eip155:11155111", - VmType: uregistrytypes.VmType_EVM, - PublicRpcUrl: "https://sepolia.drpc.org", - GatewayAddress: "0x28E0F09bE2321c1420Dc60Ee146aACbD68B335Fe", - BlockConfirmation: &uregistrytypes.BlockConfirmation{ - FastInbound: 5, - StandardInbound: 12, - }, - GatewayMethods: []*uregistrytypes.GatewayMethods{&uregistrytypes.GatewayMethods{ - Name: "addFunds", - Identifier: "", - EventIdentifier: "0xb28f49668e7e76dc96d7aabe5b7f63fecfbd1c3574774c05e8204e749fd96fbd", - }}, - Enabled: &uregistrytypes.ChainEnabled{ - IsInboundEnabled: true, - IsOutboundEnabled: true, - }, - } - - app.UregistryKeeper.AddChainConfig(ctx, &chainConfigTest) - - params := app.FeeMarketKeeper.GetParams(ctx) - params.BaseFee = math.LegacyNewDec(1000000000) - app.FeeMarketKeeper.SetParams(ctx, params) - - ms := uexecutorkeeper.NewMsgServerImpl(app.UexecutorKeeper) - - t.Run("Success!", func(t *testing.T) { - migratedAddress, newEVMImplAddr := utils.DeployMigrationContract(t, app, ctx) - - validUA := &uexecutortypes.UniversalAccountId{ - ChainNamespace: "eip155", - ChainId: "11155111", - Owner: "0x778d3206374f8ac265728e18e3fe2ae6b93e4ce4", - } - - validTxHash := "0x770f8df204a925dbfc3d73c7d532c832bd5fe78ed813835b365320e65b105ec2" - - validMP := &uexecutortypes.MigrationPayload{ - Migration: migratedAddress.Hex(), - Nonce: "0", - Deadline: "0", - } - - msgDeploy := &uexecutortypes.MsgDeployUEA{ - Signer: "cosmos1xpurwdecvsenyvpkxvmnge3cv93nyd34xuersef38pjnxen9xfsk2dnz8yek2drrv56qmn2ak9", - UniversalAccountId: validUA, - TxHash: validTxHash, - } - - deployUEAResponse, err := ms.DeployUEA(ctx, msgDeploy) - require.NoError(t, err) - - msgMint := &uexecutortypes.MsgMintPC{ - Signer: "cosmos1xpurwdecvsenyvpkxvmnge3cv93nyd34xuersef38pjnxen9xfsk2dnz8yek2drrv56qmn2ak9", - UniversalAccountId: validUA, - TxHash: validTxHash, - } - - _, err = ms.MintPC(ctx, msgMint) - require.NoError(t, err) - - msg := &uexecutortypes.MsgMigrateUEA{ - Signer: "cosmos1xpurwdecvsenyvpkxvmnge3cv93nyd34xuersef38pjnxen9xfsk2dnz8yek2drrv56qmn2ak9", - UniversalAccountId: validUA, - MigrationPayload: validMP, - Signature: "0xd1d343e944b77d71542ff15b545244464d0a9bb5606a69ca97d123abc52ec84a54cd46e50cf771fcdf40df0cdb047c50c1dcc17f6482d5def3895ad94e0b1cad1c", - } - - _, err = ms.MigrateUEA(ctx, msg) - require.NoError(t, err) - - logicAfterMigration := app.EVMKeeper.GetState(ctx, common.BytesToAddress(deployUEAResponse.UEA[12:]), common.HexToHash("0x868a771a75a4aa6c2be13e9a9617cb8ea240ed84a3a90c8469537393ec3e115d")) - require.Equal(t, newEVMImplAddr, common.BytesToAddress(logicAfterMigration.Bytes())) - - }) - t.Run("Invalid Migration Payload!", func(t *testing.T) { - validUA := &uexecutortypes.UniversalAccountId{ - ChainNamespace: "eip155", - ChainId: "11155111", - Owner: "0x778d3206374f8ac265728e18e3fe2ae6b93e4ce4", - } - - // validTxHash := "0x770f8df204a925dbfc3d73c7d532c832bd5fe78ed813835b365320e65b105ec2" - - validMP := &uexecutortypes.MigrationPayload{ - Migration: "", - Nonce: "1", - Deadline: "9999999999", - } - - msg := &uexecutortypes.MsgMigrateUEA{ - Signer: "cosmos1xpurwdecvsenyvpkxvmnge3cv93nyd34xuersef38pjnxen9xfsk2dnz8yek2drrv56qmn2ak9", - UniversalAccountId: validUA, - MigrationPayload: validMP, - } - - _, err := ms.MigrateUEA(ctx, msg) - require.ErrorContains(t, err, "invalid migration payload") - - }) - - t.Run("Invalid Signature Data", func(t *testing.T) { - validUA := &uexecutortypes.UniversalAccountId{ - ChainNamespace: "eip155", - ChainId: "11155111", - Owner: "0x778d3206374f8ac265728e18e3fe2ae6b93e4ce4", - } - - // validTxHash := "0x770f8df204a925dbfc3d73c7d532c832bd5fe78ed813835b365320e65b105ec2" - - validMP := &uexecutortypes.MigrationPayload{ - Migration: "0x527F3692F5C53CfA83F7689885995606F93b6164", - Nonce: "1", - Deadline: "9999999999", - } - - msg := &uexecutortypes.MsgMigrateUEA{ - Signer: "cosmos1xpurwdecvsenyvpkxvmnge3cv93nyd34xuersef38pjnxen9xfsk2dnz8yek2drrv56qmn2ak9", - UniversalAccountId: validUA, - MigrationPayload: validMP, - Signature: "0xZZZZ", - } - - _, err := ms.MigrateUEA(ctx, msg) - require.ErrorContains(t, err, "invalid signature format") - - }) -} From ee6f467e89a5bbb51d1d8da2f6ec8219fc6cd9e1 Mon Sep 17 00:00:00 2001 From: Nilesh Gupta Date: Thu, 8 Jan 2026 16:32:36 +0530 Subject: [PATCH 105/120] tests: modified outbound initiation integration tests as per new new event structure --- .../uexecutor/inbound_initiated_outbound_test.go | 12 +++--------- test/utils/bytecode.go | 2 +- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/test/integration/uexecutor/inbound_initiated_outbound_test.go b/test/integration/uexecutor/inbound_initiated_outbound_test.go index 9efe26c8..11652a8e 100644 --- a/test/integration/uexecutor/inbound_initiated_outbound_test.go +++ b/test/integration/uexecutor/inbound_initiated_outbound_test.go @@ -18,12 +18,6 @@ import ( uvalidatortypes "github.com/pushchain/push-chain-node/x/uvalidator/types" ) -// This is the SELECTOR for withdraw(address,bytes,address,uint,uint,RevertInstructions) -var withdrawSelector = "0x720b3fbf" - -// Hardcoded test event signature of UniversalTxWithdraw -const UniversalTxWithdrawEventSig = "UniversalTxWithdraw" - func setupInboundInitiatedOutboundTest(t *testing.T, numVals int) (*app.ChainApp, sdk.Context, []string, *uexecutortypes.Inbound, []stakingtypes.Validator, common.Address) { app, ctx, _, validators := utils.SetAppWithMultipleValidators(t, numVals) @@ -126,12 +120,12 @@ func setupInboundInitiatedOutboundTest(t *testing.T, numVals int) (*app.ChainApp require.NoError(t, err) // signature - validVerificationData := "0x928958fffec8ca9ea8505ed154615be009ecf0818586aed9cd9d6c8b92fcf0e304bdf26b3cdb3317adfc2251bae109ddcf3e4a93deeec137d5ff662ec7ff3c221b" + validVerificationData := "0x4c719b6c0e03cc7faadc7b679eea3bf301983e28ef241baa4e0b2dc17b3bc09f1a8221abf166bd8cbe38aefdda7d62f9f944e28431b9982b6e2d4d1b8594446b1c" validUP := &uexecutortypes.UniversalPayload{ To: utils.GetDefaultAddresses().UniversalGatewayPCAddr.Hex(), Value: "0", - Data: "0x718a35b000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000e0600000000000000000000000000000000000000000000000000000000000f4240000000000000000000000000000000000000000000000000000000000007a1200000000000000000000000001234567890abcdef1234567890abcdef1234567800000000000000000000000000000000000000000000000000000000000000141234567890abcdef1234567890abcdef12345678000000000000000000000000", + Data: "0xb3ca1fbc000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000e0600000000000000000000000000000000000000000000000000000000000f4240000000000000000000000000000000000000000000000000000000000007a12000000000000000000000000000000000000000000000000000000000000001000000000000000000000000001234567890abcdef1234567890abcdef1234567800000000000000000000000000000000000000000000000000000000000000141234567890abcdef1234567890abcdef123456780000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", GasLimit: "21000000", MaxFeePerGas: "1000000000", MaxPriorityFeePerGas: "200000000", @@ -188,7 +182,7 @@ func TestInboundInitiatedOutbound(t *testing.T) { ) require.Equal(t, - "222", + "21000", out.GasLimit, "Gas limit must match event (gasFeeUsed) value", ) diff --git a/test/utils/bytecode.go b/test/utils/bytecode.go index d7602c5d..7e8177be 100644 --- a/test/utils/bytecode.go +++ b/test/utils/bytecode.go @@ -10,7 +10,7 @@ const HANDLER_CONTRACT_BYTECODE = "6080604052600436106102ae575f3560e01c80638456c const PRC20_CREATION_BYTECODE = "608060405234801561000f575f80fd5b50600436106101a5575f3560e01c806374be2150116100e8578063c701262611610093578063eddeb1231161006e578063eddeb12314610457578063f687d12a1461046a578063f97c007a1461047d578063fc5fecd514610486575f80fd5b8063c7012626146103cb578063d9eeebed146103de578063dd62ed3e14610412575f80fd5b8063b84c8246116100c3578063b84c82461461037e578063c47f002714610391578063c6f1b7e7146103a4575f80fd5b806374be21501461033c57806395d89b4114610363578063a9059cbb1461036b575f80fd5b806323b872dd1161015357806347e7ef241161012e57806347e7ef24146102a1578063609c92b8146102b4578063701cd43b146102e857806370a0823114610307575f80fd5b806323b872dd14610266578063313ce5671461027957806342966c681461028e575f80fd5b8063091d278811610183578063091d278814610224578063095ea7b31461023b57806318160ddd1461025e575f80fd5b8063044d9371146101a957806306fdde03146101fa57806307e2bd8d1461020f575b5f80fd5b6101d07f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b610202610499565b6040516101f1919061143c565b61022261021d366004611479565b610529565b005b61022d60015481565b6040519081526020016101f1565b61024e610249366004611494565b6105ef565b60405190151581526020016101f1565b60065461022d565b61024e6102743660046114be565b6106ae565b60055460405160ff90911681526020016101f1565b61024e61029c3660046114fc565b61079b565b61024e6102af366004611494565b6107ae565b6102db7f000000000000000000000000000000000000000000000000000000000000000081565b6040516101f19190611513565b5f546101d09073ffffffffffffffffffffffffffffffffffffffff1681565b61022d610315366004611479565b73ffffffffffffffffffffffffffffffffffffffff165f9081526007602052604090205490565b61022d7f000000000000000000000000000000000000000000000000000000000000000081565b610202610879565b61024e610379366004611494565b610888565b61022261038c36600461157f565b61089d565b61022261039f36600461157f565b61091c565b6101d07f000000000000000000000000000000000000000000000000000000000000000081565b61024e6103d936600461166f565b610997565b6103e6610af9565b6040805173ffffffffffffffffffffffffffffffffffffffff90931683526020830191909152016101f1565b61022d6104203660046116e1565b73ffffffffffffffffffffffffffffffffffffffff9182165f90815260086020908152604080832093909416825291909152205490565b6102226104653660046114fc565b610d04565b6102226104783660046114fc565b610da8565b61022d60025481565b6103e66104943660046114fc565b610e4c565b6060600380546104a890611718565b80601f01602080910402602001604051908101604052809291908181526020018280546104d490611718565b801561051f5780601f106104f65761010080835404028352916020019161051f565b820191905f5260205f20905b81548152906001019060200180831161050257829003601f168201915b5050505050905090565b73ffffffffffffffffffffffffffffffffffffffff8116610576576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040519081527f412d5a95dc32cbb6bd9319bccf1bc1febeda71e734893a440f1f6853252fe99f906020015b60405180910390a150565b5f73ffffffffffffffffffffffffffffffffffffffff831661063d576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b335f81815260086020908152604080832073ffffffffffffffffffffffffffffffffffffffff881680855290835292819020869055518581529192917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a35060015b92915050565b5f6106ba848484611055565b73ffffffffffffffffffffffffffffffffffffffff84165f90815260086020908152604080832033845290915290205482811015610724576040517f10bad14700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff85165f81815260086020908152604080832033808552908352928190208786039081905590519081529192917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3506001949350505050565b5f6107a6338361119c565b506001919050565b5f6107b983836112ed565b6040517fffffffffffffffffffffffffffffffffffffffff0000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000060601b1660208201527f67fc7bdaed5b0ec550d8706b87d60568ab70c6b781263c70101d54cd1564aab390603401604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152908290526108689186908690611769565b60405180910390a150600192915050565b6060600480546104a890611718565b5f610894338484611055565b50600192915050565b3373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000161461090c576040517f6626eaef00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600461091882826117ef565b5050565b3373ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000161461098b576040517f6626eaef00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600361091882826117ef565b5f805f6109a2610af9565b6040517f23b872dd00000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000081166024830152604482018390529294509092505f918416906323b872dd906064016020604051808303815f875af1158015610a42573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610a669190611906565b905080610a9f576040517f0a7cd6d600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610aa9338661119c565b7f9ffbffc04a397460ee1dbe8c9503e098090567d6b7f4b3c02a8617d800b6d9553388888886600254604051610ae496959493929190611925565b60405180910390a15060019695505050505050565b5f80546040517f7471e6970000000000000000000000000000000000000000000000000000000081527f00000000000000000000000000000000000000000000000000000000000000006004820152829173ffffffffffffffffffffffffffffffffffffffff1690637471e69790602401602060405180830381865afa158015610b85573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610ba991906119a5565b915073ffffffffffffffffffffffffffffffffffffffff8216610bf8576040517f3d5729c100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f80546040517fd7fd7afb0000000000000000000000000000000000000000000000000000000081527f0000000000000000000000000000000000000000000000000000000000000000600482015273ffffffffffffffffffffffffffffffffffffffff9091169063d7fd7afb90602401602060405180830381865afa158015610c84573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610ca891906119c0565b9050805f03610ce3576040517fe661aed000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600254600154610cf39083611a04565b610cfd9190611a1b565b9150509091565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610d73576040517f6626eaef00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60028190556040518181527fef13af88e424b5d15f49c77758542c1938b08b8b95b91ed0751f98ba99000d8f906020016105e4565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610e17576040517f6626eaef00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60018190556040518181527fff5788270f43bfc1ca41c503606d2594aa3023a1a7547de403a3e2f146a4a80a906020016105e4565b5f80546040517f7471e6970000000000000000000000000000000000000000000000000000000081527f00000000000000000000000000000000000000000000000000000000000000006004820152829173ffffffffffffffffffffffffffffffffffffffff1690637471e69790602401602060405180830381865afa158015610ed8573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610efc91906119a5565b915073ffffffffffffffffffffffffffffffffffffffff8216610f4b576040517f3d5729c100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f80546040517fd7fd7afb0000000000000000000000000000000000000000000000000000000081527f0000000000000000000000000000000000000000000000000000000000000000600482015273ffffffffffffffffffffffffffffffffffffffff9091169063d7fd7afb90602401602060405180830381865afa158015610fd7573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610ffb91906119c0565b9050805f03611036576040517fe661aed000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002546110438583611a04565b61104d9190611a1b565b915050915091565b73ffffffffffffffffffffffffffffffffffffffff8316158061108c575073ffffffffffffffffffffffffffffffffffffffff8216155b156110c3576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff83165f9081526007602052604090205481811015611122576040517ffe382aa700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8085165f8181526007602052604080822086860390559286168082529083902080548601905591517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9061118e9086815260200190565b60405180910390a350505050565b73ffffffffffffffffffffffffffffffffffffffff82166111e9576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805f03611222576040517f1f2a200500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff82165f9081526007602052604090205481811015611281576040517ffe382aa700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff83165f8181526007602090815260408083208686039055600680548790039055518581529192917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3505050565b73ffffffffffffffffffffffffffffffffffffffff821661133a576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805f03611373576040517f1f2a200500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600680548201905573ffffffffffffffffffffffffffffffffffffffff82165f818152600760209081526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b5f81518084525f5b818110156113ff576020818501810151868301820152016113e3565b505f6020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b602081525f61144e60208301846113db565b9392505050565b73ffffffffffffffffffffffffffffffffffffffff81168114611476575f80fd5b50565b5f60208284031215611489575f80fd5b813561144e81611455565b5f80604083850312156114a5575f80fd5b82356114b081611455565b946020939093013593505050565b5f805f606084860312156114d0575f80fd5b83356114db81611455565b925060208401356114eb81611455565b929592945050506040919091013590565b5f6020828403121561150c575f80fd5b5035919050565b602081016003831061154c577f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b91905290565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f6020828403121561158f575f80fd5b813567ffffffffffffffff8111156115a5575f80fd5b8201601f810184136115b5575f80fd5b803567ffffffffffffffff8111156115cf576115cf611552565b6040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0603f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8501160116810181811067ffffffffffffffff8211171561163b5761163b611552565b604052818152828201602001861015611652575f80fd5b816020840160208301375f91810160200191909152949350505050565b5f805f60408486031215611681575f80fd5b833567ffffffffffffffff811115611697575f80fd5b8401601f810186136116a7575f80fd5b803567ffffffffffffffff8111156116bd575f80fd5b8660208284010111156116ce575f80fd5b6020918201979096509401359392505050565b5f80604083850312156116f2575f80fd5b82356116fd81611455565b9150602083013561170d81611455565b809150509250929050565b600181811c9082168061172c57607f821691505b602082108103611763577f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b50919050565b606081525f61177b60608301866113db565b73ffffffffffffffffffffffffffffffffffffffff9490941660208301525060400152919050565b601f8211156117ea57805f5260205f20601f840160051c810160208510156117c85750805b601f840160051c820191505b818110156117e7575f81556001016117d4565b50505b505050565b815167ffffffffffffffff81111561180957611809611552565b61181d816118178454611718565b846117a3565b6020601f82116001811461186e575f83156118385750848201515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600385901b1c1916600184901b1784556117e7565b5f848152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08516915b828110156118bb578785015182556020948501946001909201910161189b565b50848210156118f757868401517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600387901b60f8161c191681555b50505050600190811b01905550565b5f60208284031215611916575f80fd5b8151801515811461144e575f80fd5b73ffffffffffffffffffffffffffffffffffffffff8716815260a060208201528460a0820152848660c08301375f60c086830101525f60c07fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8801168301019050846040830152836060830152826080830152979650505050505050565b5f602082840312156119b5575f80fd5b815161144e81611455565b5f602082840312156119d0575f80fd5b5051919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b80820281158282048414176106a8576106a86119d7565b808201808211156106a8576106a86119d756fea26469706673582212206be692aa215f21df823c52c689a11caa03254730bfade7b8b36788d6a72ba61764736f6c634300081a0033" -const UNIVERSAL_GATEWAY_PC_BYTECODE = "6080806040526004361015610012575f80fd5b5f3560e01c90816301ffc9a714610f0a57508063248a9ca314610e9a5780632f2ff15d14610e1f57806336568abe14610d975780633f4ba83a14610cbf5780635c975abb14610c60578063718a35b014610a705780637f57735014610a205780638456cb59146109455780638e6185601461081c57806391d1485414610788578063941e1679146105c6578063a217fddf1461058e578063c1ee135a1461053d578063d547741f146104bb578063e63ab1e9146104635763f8c8765e146100d7575f80fd5b3461045f5760807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261045f5761010e610fe9565b610116610fc6565b9060443573ffffffffffffffffffffffffffffffffffffffff811680910361045f576064359173ffffffffffffffffffffffffffffffffffffffff831680930361045f577ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00549360ff8560401c16159467ffffffffffffffff811680159081610457575b600114908161044d575b159081610444575b5061041c578560017fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000008316177ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00556103c7575b5073ffffffffffffffffffffffffffffffffffffffff82161580156103a9575b80156103a1575b8015610399575b610371576102816102879261024061172a565b61024861172a565b61025061172a565b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f005561027c61172a565b611207565b506112ee565b507fffffffffffffffffffffffff00000000000000000000000000000000000000005f5416175f557fffffffffffffffffffffffff000000000000000000000000000000000000000060015416176001556102de57005b7fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054167ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00557fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602060405160018152a1005b7fd92e233d000000000000000000000000000000000000000000000000000000005f5260045ffd5b50831561022d565b508215610226565b5073ffffffffffffffffffffffffffffffffffffffff81161561021f565b7fffffffffffffffffffffffffffffffffffffffffffffff0000000000000000001668010000000000000001177ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00555f6101ff565b7ff92ee8a9000000000000000000000000000000000000000000000000000000005f5260045ffd5b9050155f6101ac565b303b1591506101a4565b87915061019a565b5f80fd5b3461045f575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261045f5760206040517f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a8152f35b3461045f5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261045f5761053b6004356104f8610fc6565b90610536610531825f527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800602052600160405f20015490565b611181565b611504565b005b3461045f575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261045f57602073ffffffffffffffffffffffffffffffffffffffff60015416604051908152f35b3461045f575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261045f5760206040515f8152f35b3461045f5760c07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261045f5760043567ffffffffffffffff811161045f5761061590369060040161100c565b9061061e610fc6565b60643567ffffffffffffffff811161045f5761063e90369060040161100c565b909160a4359373ffffffffffffffffffffffffffffffffffffffff851680950361045f577fe6350fe250f203decf959be66b79b05c66597a0e317492c141dfb4dc89692a4a9373ffffffffffffffffffffffffffffffffffffffff93610705610743936106a9611660565b6106b16116b3565b6106b961103a565b997f6569703135353a3131313535313131000000000000000000000000000000000060208c01526106f76040519b6101408d526101408d019061105e565b918b830360208d01526110bb565b9160443560408a015273778d3206374f8ac265728e18e3fe2ae6b93e4ce460608a0152606f60808a015260de60a08a015288830360c08a01526110bb565b9361014d60e0870152610100860152600361012086015216928033930390a360017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055005b3461045f5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261045f576107bf610fc6565b6004355f527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b62680060205273ffffffffffffffffffffffffffffffffffffffff60405f2091165f52602052602060ff60405f2054166040519015158152f35b3461045f5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261045f57610853610fe9565b335f9081527fb7db2dd08fcb62d0c9e08c51941cae53c267786a0b75803fb7960902fc8ef97d602052604090205460ff16156109155773ffffffffffffffffffffffffffffffffffffffff906108a7611660565b1680156103715773ffffffffffffffffffffffffffffffffffffffff600154827fffffffffffffffffffffffff0000000000000000000000000000000000000000821617600155167fd0ef78509e8ed82196200827f0d10672cfab667994f990456881f413c1c475eb5f80a3005b7fe2517d3f000000000000000000000000000000000000000000000000000000005f52336004525f60245260445ffd5b3461045f575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261045f5761097b6110f9565b610983611660565b61098b611660565b60017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff007fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f033005416177fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f03300557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586020604051338152a1005b3461045f575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261045f57602073ffffffffffffffffffffffffffffffffffffffff5f5416604051908152f35b3461045f5760a07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261045f5760043567ffffffffffffffff811161045f57610abf90369060040161100c565b90610ac8610fc6565b916084359173ffffffffffffffffffffffffffffffffffffffff831680930361045f57610af3611660565b610afb6116b3565b610b0361103a565b937f6569703135353a31313135353131310000000000000000000000000000000000602086015260405192602084019380851067ffffffffffffffff861117610c3357610bb073ffffffffffffffffffffffffffffffffffffffff94610bee937fe6350fe250f203decf959be66b79b05c66597a0e317492c141dfb4dc89692a4a976040525f8452610ba26040519a6101408c526101408c019061105e565b918a830360208c01526110bb565b90604435604089015273778d3206374f8ac265728e18e3fe2ae6b93e4ce46060890152606f608089015260de60a089015287820360c089015261105e565b9361014d60e0870152610100860152600261012086015216928033930390a360017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055005b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b3461045f575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261045f57602060ff7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f0330054166040519015158152f35b3461045f575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261045f57610cf56110f9565b610cfd61160c565b610d0561160c565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff007fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f0330054167fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f03300557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6020604051338152a1005b3461045f5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261045f57610dce610fc6565b3373ffffffffffffffffffffffffffffffffffffffff821603610df75761053b90600435611504565b7f6697b232000000000000000000000000000000000000000000000000000000005f5260045ffd5b3461045f5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261045f5761053b600435610e5c610fc6565b90610e95610531825f527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800602052600160405f20015490565b6113f2565b3461045f5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261045f576020610f026004355f527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800602052600160405f20015490565b604051908152f35b3461045f5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261045f57600435907fffffffff00000000000000000000000000000000000000000000000000000000821680920361045f57817f7965db0b0000000000000000000000000000000000000000000000000000000060209314908115610f9c575b5015158152f35b7f01ffc9a70000000000000000000000000000000000000000000000000000000091501483610f95565b6024359073ffffffffffffffffffffffffffffffffffffffff8216820361045f57565b6004359073ffffffffffffffffffffffffffffffffffffffff8216820361045f57565b9181601f8401121561045f5782359167ffffffffffffffff831161045f576020838186019501011161045f57565b604051906040820182811067ffffffffffffffff821117610c3357604052600f8252565b91908251928382525f5b8481106110a65750507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f845f6020809697860101520116010190565b80602080928401015182828601015201611068565b601f82602094937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe093818652868601375f8582860101520116010190565b335f9081527f75442b0a96088b5456bc4ed01394c96a4feec0f883c9494257d76b96ab1c9b6b602052604090205460ff161561113157565b7fe2517d3f000000000000000000000000000000000000000000000000000000005f52336004527f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a60245260445ffd5b805f527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b62680060205260405f2073ffffffffffffffffffffffffffffffffffffffff33165f5260205260ff60405f205416156111d85750565b7fe2517d3f000000000000000000000000000000000000000000000000000000005f523360045260245260445ffd5b73ffffffffffffffffffffffffffffffffffffffff81165f9081527fb7db2dd08fcb62d0c9e08c51941cae53c267786a0b75803fb7960902fc8ef97d602052604090205460ff166112e95773ffffffffffffffffffffffffffffffffffffffff165f8181527fb7db2dd08fcb62d0c9e08c51941cae53c267786a0b75803fb7960902fc8ef97d6020526040812080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790553391907f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d8180a4600190565b505f90565b73ffffffffffffffffffffffffffffffffffffffff81165f9081527f75442b0a96088b5456bc4ed01394c96a4feec0f883c9494257d76b96ab1c9b6b602052604090205460ff166112e95773ffffffffffffffffffffffffffffffffffffffff165f8181527f75442b0a96088b5456bc4ed01394c96a4feec0f883c9494257d76b96ab1c9b6b6020526040812080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790553391907f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a907f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9080a4600190565b805f527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b62680060205260405f2073ffffffffffffffffffffffffffffffffffffffff83165f5260205260ff60405f205416155f146114fe57805f527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b62680060205260405f2073ffffffffffffffffffffffffffffffffffffffff83165f5260205260405f2060017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0082541617905573ffffffffffffffffffffffffffffffffffffffff339216907f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d5f80a4600190565b50505f90565b805f527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b62680060205260405f2073ffffffffffffffffffffffffffffffffffffffff83165f5260205260ff60405f2054165f146114fe57805f527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b62680060205260405f2073ffffffffffffffffffffffffffffffffffffffff83165f5260205260405f207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00815416905573ffffffffffffffffffffffffffffffffffffffff339216907ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b5f80a4600190565b60ff7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f0330054161561163857565b7f8dfc202b000000000000000000000000000000000000000000000000000000005f5260045ffd5b60ff7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f03300541661168b57565b7fd93c0665000000000000000000000000000000000000000000000000000000005f5260045ffd5b60027f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0054146117025760027f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055565b7f3ee5aeb5000000000000000000000000000000000000000000000000000000005f5260045ffd5b60ff7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005460401c161561175957565b7fd7e6bcf8000000000000000000000000000000000000000000000000000000005f5260045ffdfea2646970667358221220e7a214536e314b0cefcdbd66637098a202820c2c9a023cb121eccaa7757bcb4d64736f6c634300081a0033" +const UNIVERSAL_GATEWAY_PC_BYTECODE = "6080806040526004361015610012575f80fd5b5f3560e01c90816301ffc9a714610f6857508063248a9ca314610ef85780632f2ff15d14610e7d57806336568abe14610df55780633f4ba83a14610d1d5780635c975abb14610cbe5780637f57735014610c6e5780638456cb5914610b935780638e61856014610a6a57806391d14854146109d6578063a217fddf1461099e578063affed0e014610963578063b3ca1fbc1461058e578063c1ee135a1461053d578063d547741f146104bb578063e63ab1e9146104635763f8c8765e146100d7575f80fd5b3461045f5760807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261045f5761010e611047565b610116611024565b9060443573ffffffffffffffffffffffffffffffffffffffff811680910361045f576064359173ffffffffffffffffffffffffffffffffffffffff831680930361045f577ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00549360ff8560401c16159467ffffffffffffffff811680159081610457575b600114908161044d575b159081610444575b5061041c578560017fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000008316177ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00556103c7575b5073ffffffffffffffffffffffffffffffffffffffff82161580156103a9575b80156103a1575b8015610399575b61037157610281610287926102406117ef565b6102486117ef565b6102506117ef565b60017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f005561027c6117ef565b6112c6565b506113ad565b507fffffffffffffffffffffffff00000000000000000000000000000000000000005f5416175f557fffffffffffffffffffffffff000000000000000000000000000000000000000060015416176001556102de57005b7fffffffffffffffffffffffffffffffffffffffffffffff00ffffffffffffffff7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a0054167ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00557fc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2602060405160018152a1005b7fd92e233d000000000000000000000000000000000000000000000000000000005f5260045ffd5b50831561022d565b508215610226565b5073ffffffffffffffffffffffffffffffffffffffff81161561021f565b7fffffffffffffffffffffffffffffffffffffffffffffff0000000000000000001668010000000000000001177ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00555f6101ff565b7ff92ee8a9000000000000000000000000000000000000000000000000000000005f5260045ffd5b9050155f6101ac565b303b1591506101a4565b87915061019a565b5f80fd5b3461045f575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261045f5760206040517f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a8152f35b3461045f5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261045f5761053b6004356104f8611024565b90610536610531825f527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800602052600160405f20015490565b611240565b6115c3565b005b3461045f575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261045f57602073ffffffffffffffffffffffffffffffffffffffff60015416604051908152f35b3461045f5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261045f5760043567ffffffffffffffff811161045f578060040160c07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc833603011261045f5761060761171f565b60027f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00541461093b5761063981611772565b6040805191610648828461106a565b600f83527f6569703135353a313131353531313100000000000000000000000000000000006020840152600254946001860180871161090e576002556024810193610692856110ab565b9360448301359460848401936106a8858a6110cc565b97909a67ffffffffffffffff89116108e1578451956106ef601f8b017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0166020018861106a565b8987526020870197368e8c011161045f576107e36107da6107f99f8f9d60a499610807976107c273ffffffffffffffffffffffffffffffffffffffff9f61082f9f908f915f6020886107cb996107d29b8637830101525190209281519373ffffffffffffffffffffffffffffffffffffffff928593602085019733895216908401528d6060840152608083015260c060a083015261079060e083018c61111d565b9060c0830152037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0810183528261106a565b5190209f6110ab565b9d806110cc565b93909f6110cc565b979096016110ab565b9c87519e8f93610140855261014085019061111d565b92602081850391015261117a565b938b0152600160608b015261520860808b015261520860a08b015289830360c08b015261117a565b9461520860e08801521661010086015260048110156108b4577fd8352005a8b681f8cf230f28f60cef58ebe9a25d92e88f72cb6cb78799a6ca6d9173ffffffffffffffffffffffffffffffffffffffff9161012087015216938033940390a460017f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0055005b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602160045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b7f3ee5aeb5000000000000000000000000000000000000000000000000000000005f5260045ffd5b3461045f575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261045f576020600254604051908152f35b3461045f575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261045f5760206040515f8152f35b3461045f5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261045f57610a0d611024565b6004355f527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b62680060205273ffffffffffffffffffffffffffffffffffffffff60405f2091165f52602052602060ff60405f2054166040519015158152f35b3461045f5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261045f57610aa1611047565b335f9081527fb7db2dd08fcb62d0c9e08c51941cae53c267786a0b75803fb7960902fc8ef97d602052604090205460ff1615610b635773ffffffffffffffffffffffffffffffffffffffff90610af561171f565b1680156103715773ffffffffffffffffffffffffffffffffffffffff600154827fffffffffffffffffffffffff0000000000000000000000000000000000000000821617600155167fd0ef78509e8ed82196200827f0d10672cfab667994f990456881f413c1c475eb5f80a3005b7fe2517d3f000000000000000000000000000000000000000000000000000000005f52336004525f60245260445ffd5b3461045f575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261045f57610bc96111b8565b610bd161171f565b610bd961171f565b60017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff007fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f033005416177fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f03300557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586020604051338152a1005b3461045f575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261045f57602073ffffffffffffffffffffffffffffffffffffffff5f5416604051908152f35b3461045f575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261045f57602060ff7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f0330054166040519015158152f35b3461045f575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261045f57610d536111b8565b610d5b6116cb565b610d636116cb565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff007fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f0330054167fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f03300557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6020604051338152a1005b3461045f5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261045f57610e2c611024565b3373ffffffffffffffffffffffffffffffffffffffff821603610e555761053b906004356115c3565b7f6697b232000000000000000000000000000000000000000000000000000000005f5260045ffd5b3461045f5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261045f5761053b600435610eba611024565b90610ef3610531825f527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800602052600160405f20015490565b6114b1565b3461045f5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261045f576020610f606004355f527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b626800602052600160405f20015490565b604051908152f35b3461045f5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261045f57600435907fffffffff00000000000000000000000000000000000000000000000000000000821680920361045f57817f7965db0b0000000000000000000000000000000000000000000000000000000060209314908115610ffa575b5015158152f35b7f01ffc9a70000000000000000000000000000000000000000000000000000000091501483610ff3565b6024359073ffffffffffffffffffffffffffffffffffffffff8216820361045f57565b6004359073ffffffffffffffffffffffffffffffffffffffff8216820361045f57565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff8211176108e157604052565b3573ffffffffffffffffffffffffffffffffffffffff8116810361045f5790565b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18136030182121561045f570180359067ffffffffffffffff821161045f5760200191813603831361045f57565b91908251928382525f5b8481106111655750507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f845f6020809697860101520116010190565b80602080928401015182828601015201611127565b601f82602094937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe093818652868601375f8582860101520116010190565b335f9081527f75442b0a96088b5456bc4ed01394c96a4feec0f883c9494257d76b96ab1c9b6b602052604090205460ff16156111f057565b7fe2517d3f000000000000000000000000000000000000000000000000000000005f52336004527f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a60245260445ffd5b805f527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b62680060205260405f2073ffffffffffffffffffffffffffffffffffffffff33165f5260205260ff60405f205416156112975750565b7fe2517d3f000000000000000000000000000000000000000000000000000000005f523360045260245260445ffd5b73ffffffffffffffffffffffffffffffffffffffff81165f9081527fb7db2dd08fcb62d0c9e08c51941cae53c267786a0b75803fb7960902fc8ef97d602052604090205460ff166113a85773ffffffffffffffffffffffffffffffffffffffff165f8181527fb7db2dd08fcb62d0c9e08c51941cae53c267786a0b75803fb7960902fc8ef97d6020526040812080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790553391907f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d8180a4600190565b505f90565b73ffffffffffffffffffffffffffffffffffffffff81165f9081527f75442b0a96088b5456bc4ed01394c96a4feec0f883c9494257d76b96ab1c9b6b602052604090205460ff166113a85773ffffffffffffffffffffffffffffffffffffffff165f8181527f75442b0a96088b5456bc4ed01394c96a4feec0f883c9494257d76b96ab1c9b6b6020526040812080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790553391907f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a907f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9080a4600190565b805f527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b62680060205260405f2073ffffffffffffffffffffffffffffffffffffffff83165f5260205260ff60405f205416155f146115bd57805f527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b62680060205260405f2073ffffffffffffffffffffffffffffffffffffffff83165f5260205260405f2060017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0082541617905573ffffffffffffffffffffffffffffffffffffffff339216907f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d5f80a4600190565b50505f90565b805f527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b62680060205260405f2073ffffffffffffffffffffffffffffffffffffffff83165f5260205260ff60405f2054165f146115bd57805f527f02dd7bc7dec4dceedda775e58dd541e08a116c6c53815c0bd028192f7b62680060205260405f2073ffffffffffffffffffffffffffffffffffffffff83165f5260205260405f207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00815416905573ffffffffffffffffffffffffffffffffffffffff339216907ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b5f80a4600190565b60ff7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f033005416156116f757565b7f8dfc202b000000000000000000000000000000000000000000000000000000005f5260045ffd5b60ff7fcd5ed15c6e187e77e9aee88184c21f4f2182ab5827cb3b7e07fbedcd63f03300541661174a57565b7fd93c0665000000000000000000000000000000000000000000000000000000005f5260045ffd5b61177f60808201826110cc565b15801592604001351591506117e85781806117e0575b6117d957816117d1575b506117cc577fb4fa3fb3000000000000000000000000000000000000000000000000000000005f5260045ffd5b600190565b90505f61179f565b5050600390565b508015611795565b5050600290565b60ff7ff0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a005460401c161561181e57565b7fd7e6bcf8000000000000000000000000000000000000000000000000000000005f5260045ffdfea26469706673582212206796924c3fa73cff81856f96b0134a35adc90b65de0eff7f3363998084206a5064736f6c634300081a0033" const UEA_MIGRATION_BYTECODE = "608060405234801561000f575f80fd5b506004361061006f575f3560e01c80639538c4b31161004d5780639538c4b3146100e7578063a5df53a01461010b578063f6829c321461012a575f80fd5b806352fa5c221461007357806367f102111461007d5780638c9ec7f5146100c7575b5f80fd5b61007b610132565b005b60025461009d9073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b60015461009d9073ffffffffffffffffffffffffffffffffffffffff1681565b6100fb6100f5366004610248565b3b151590565b60405190151581526020016100be565b5f5461009d9073ffffffffffffffffffffffffffffffffffffffff1681565b61007b61018a565b610e077f868a771a75a4aa6c2be13e9a9617cb8ea240ed84a3a90c8469537393ec3e115d81815560405190919081907f310ba5f1d2ed074b51e2eccd052a47ae9ab7c6b800d1fca3db3999d6a592ca03905f90a25050565b5f5473ffffffffffffffffffffffffffffffffffffffff1630036101da576040517f82b4290000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60025473ffffffffffffffffffffffffffffffffffffffff167f868a771a75a4aa6c2be13e9a9617cb8ea240ed84a3a90c8469537393ec3e115d81815560405190919081907f310ba5f1d2ed074b51e2eccd052a47ae9ab7c6b800d1fca3db3999d6a592ca03905f90a25050565b5f60208284031215610258575f80fd5b813573ffffffffffffffffffffffffffffffffffffffff8116811461027b575f80fd5b939250505056fea2646970667358221220b7392b390eabe1d8398ca6a63c585fe969825199b6bfe2a285e4edf564c16b6a64736f6c634300081a0033" From 493220718080a4e2280993beb4c6587e88e1ff1d Mon Sep 17 00:00:00 2001 From: aman035 Date: Thu, 8 Jan 2026 17:25:22 +0530 Subject: [PATCH 106/120] add: sign hashed event data --- .../tss/coordinator/coordinator.go | 63 +++++++++------ .../tss/coordinator/coordinator_test.go | 77 +++++++++++++++++++ 2 files changed, 118 insertions(+), 22 deletions(-) diff --git a/universalClient/tss/coordinator/coordinator.go b/universalClient/tss/coordinator/coordinator.go index 5b09998d..43513072 100644 --- a/universalClient/tss/coordinator/coordinator.go +++ b/universalClient/tss/coordinator/coordinator.go @@ -4,6 +4,7 @@ import ( "context" "crypto/sha256" "encoding/json" + "fmt" "sort" "sync" "time" @@ -17,6 +18,7 @@ import ( "github.com/pushchain/push-chain-node/universalClient/store" "github.com/pushchain/push-chain-node/universalClient/tss/eventstore" "github.com/pushchain/push-chain-node/universalClient/tss/keyshare" + uexecutortypes "github.com/pushchain/push-chain-node/x/uexecutor/types" "github.com/pushchain/push-chain-node/x/uvalidator/types" ) @@ -641,36 +643,53 @@ func (c *Coordinator) createSignSetup(ctx context.Context, eventData []byte, par participantIDs = append(participantIDs, []byte(partyID)...) } - // Extract message string from eventData and hash it - var message string - // Try to parse as JSON first (in case eventData is JSON with "message" field) - var eventDataJSON map[string]interface{} - if err := json.Unmarshal(eventData, &eventDataJSON); err == nil { - // Successfully parsed as JSON, try to get "message" field - if msg, ok := eventDataJSON["message"].(string); ok { - message = msg - } else { - return nil, errors.New("event data JSON does not contain 'message' string field") - } - } else { - // Not JSON, treat eventData as the message string directly - message = string(eventData) - } - - if message == "" { - return nil, errors.New("message is empty") + // Build the message hash to sign from outbound event data + messageHash, err := buildSignMessageHash(eventData) + if err != nil { + return nil, errors.Wrap(err, "failed to build sign message hash") } - // Hash the message to get messageHash (SHA256) - messageHash := sha256.Sum256([]byte(message)) - - setupData, err := session.DklsSignSetupMsgNew(keyIDBytes, nil, messageHash[:], participantIDs) + setupData, err := session.DklsSignSetupMsgNew(keyIDBytes, nil, messageHash, participantIDs) if err != nil { return nil, errors.Wrap(err, "failed to create sign setup") } return setupData, nil } +// buildSignMessageHash creates a deterministic message hash from outbound event data. +// The hash includes all critical fields that must be validated on the destination chain. +// Format: sha256(txId|destinationChain|recipient|amount|assetAddr|sender|payload|gasLimit) +func buildSignMessageHash(eventData []byte) ([]byte, error) { + if len(eventData) == 0 { + return nil, errors.New("event data is empty") + } + + var data uexecutortypes.OutboundCreatedEvent + if err := json.Unmarshal(eventData, &data); err != nil { + return nil, errors.Wrap(err, "failed to unmarshal outbound event data") + } + + if data.TxID == "" { + return nil, errors.New("outbound event missing tx_id") + } + + // Create canonical message string and hash it + message := fmt.Sprintf( + "%s|%s|%s|%s|%s|%s|%s|%s", + data.TxID, + data.DestinationChain, + data.Recipient, + data.Amount, + data.AssetAddr, + data.Sender, + data.Payload, + data.GasLimit, + ) + + hash := sha256.Sum256([]byte(message)) + return hash[:], nil +} + // createQcSetup creates a quorumchange setup message. // Quorumchange changes the participant set of an existing key. // oldParticipantIndices: indices of Active validators (staying participants) diff --git a/universalClient/tss/coordinator/coordinator_test.go b/universalClient/tss/coordinator/coordinator_test.go index 40f7bff4..2d503983 100644 --- a/universalClient/tss/coordinator/coordinator_test.go +++ b/universalClient/tss/coordinator/coordinator_test.go @@ -482,3 +482,80 @@ func TestCoordinator_StartStop(t *testing.T) { coord.mu.RUnlock() assert.False(t, running, "coordinator should be stopped") } + +func TestBuildSignMessageHash(t *testing.T) { + t.Run("valid outbound event data", func(t *testing.T) { + eventData := []byte(`{ + "tx_id": "0x123abc", + "destination_chain": "ethereum", + "recipient": "0xrecipient", + "amount": "1000000", + "asset_addr": "0xtoken", + "sender": "0xsender", + "payload": "0x", + "gas_limit": "21000" + }`) + + hash, err := buildSignMessageHash(eventData) + require.NoError(t, err) + assert.Len(t, hash, 32) // SHA256 produces 32 bytes + }) + + t.Run("deterministic hash", func(t *testing.T) { + eventData := []byte(`{"tx_id": "0x123", "destination_chain": "eth", "recipient": "0x1", "amount": "100", "asset_addr": "0x2", "sender": "0x3", "payload": "", "gas_limit": "21000"}`) + + hash1, err := buildSignMessageHash(eventData) + require.NoError(t, err) + + hash2, err := buildSignMessageHash(eventData) + require.NoError(t, err) + + assert.Equal(t, hash1, hash2) + }) + + t.Run("different tx_id produces different hash", func(t *testing.T) { + eventData1 := []byte(`{"tx_id": "0x123", "destination_chain": "eth", "recipient": "0x1", "amount": "100", "asset_addr": "0x2", "sender": "0x3", "payload": "", "gas_limit": "21000"}`) + eventData2 := []byte(`{"tx_id": "0x456", "destination_chain": "eth", "recipient": "0x1", "amount": "100", "asset_addr": "0x2", "sender": "0x3", "payload": "", "gas_limit": "21000"}`) + + hash1, err := buildSignMessageHash(eventData1) + require.NoError(t, err) + + hash2, err := buildSignMessageHash(eventData2) + require.NoError(t, err) + + assert.NotEqual(t, hash1, hash2) + }) + + t.Run("different amount produces different hash", func(t *testing.T) { + eventData1 := []byte(`{"tx_id": "0x123", "destination_chain": "eth", "recipient": "0x1", "amount": "100", "asset_addr": "0x2", "sender": "0x3", "payload": "", "gas_limit": "21000"}`) + eventData2 := []byte(`{"tx_id": "0x123", "destination_chain": "eth", "recipient": "0x1", "amount": "200", "asset_addr": "0x2", "sender": "0x3", "payload": "", "gas_limit": "21000"}`) + + hash1, err := buildSignMessageHash(eventData1) + require.NoError(t, err) + + hash2, err := buildSignMessageHash(eventData2) + require.NoError(t, err) + + assert.NotEqual(t, hash1, hash2) + }) + + t.Run("missing tx_id", func(t *testing.T) { + eventData := []byte(`{"destination_chain": "ethereum"}`) + + _, err := buildSignMessageHash(eventData) + require.Error(t, err) + assert.Contains(t, err.Error(), "tx_id") + }) + + t.Run("invalid json", func(t *testing.T) { + _, err := buildSignMessageHash([]byte("not json")) + require.Error(t, err) + assert.Contains(t, err.Error(), "unmarshal") + }) + + t.Run("empty event data", func(t *testing.T) { + _, err := buildSignMessageHash([]byte{}) + require.Error(t, err) + assert.Contains(t, err.Error(), "empty") + }) +} From 2b7e22a5cdd3f3ec162c5f08ce7af98561849fd5 Mon Sep 17 00:00:00 2001 From: aman035 Date: Thu, 8 Jan 2026 17:27:59 +0530 Subject: [PATCH 107/120] add: initial evm & svm tx builders --- universalClient/chains/common/outbound.go | 67 ++++ .../chains/evm/outbound_tx_builder.go | 312 ++++++++++++++++++ .../chains/svm/outbound_tx_builder.go | 300 +++++++++++++++++ 3 files changed, 679 insertions(+) create mode 100644 universalClient/chains/common/outbound.go create mode 100644 universalClient/chains/evm/outbound_tx_builder.go create mode 100644 universalClient/chains/svm/outbound_tx_builder.go diff --git a/universalClient/chains/common/outbound.go b/universalClient/chains/common/outbound.go new file mode 100644 index 00000000..6a22e711 --- /dev/null +++ b/universalClient/chains/common/outbound.go @@ -0,0 +1,67 @@ +package common + +import ( + "context" + "math/big" + + uexecutortypes "github.com/pushchain/push-chain-node/x/uexecutor/types" +) + +// OutboundTxData is an alias for uexecutortypes.OutboundCreatedEvent. +// This represents the data needed to create an outbound transaction. +type OutboundTxData = uexecutortypes.OutboundCreatedEvent + +// OutboundTxResult represents the result of building an outbound transaction. +type OutboundTxResult struct { + // RawTx is the serialized unsigned transaction ready for signing + RawTx []byte `json:"raw_tx"` + + // SigningHash is the hash that needs to be signed by TSS + // For EVM: keccak256 hash of the transaction + // For Solana: the message hash + SigningHash []byte `json:"signing_hash"` + + // Nonce is the transaction nonce (EVM) or recent blockhash (Solana) + Nonce uint64 `json:"nonce,omitempty"` + + // GasPrice is the gas price used (EVM only) + GasPrice *big.Int `json:"gas_price,omitempty"` + + // GasLimit is the gas limit used + GasLimit uint64 `json:"gas_limit"` + + // ChainID is the destination chain ID + ChainID string `json:"chain_id"` +} + +// OutboundTxBuilder defines the interface for building outbound transactions. +// Each chain type (EVM, SVM) implements this interface. +type OutboundTxBuilder interface { + // BuildTransaction creates an unsigned transaction from outbound data. + // Returns the transaction result containing the raw tx and signing hash. + BuildTransaction(ctx context.Context, data *OutboundTxData) (*OutboundTxResult, error) + + // GetSigningHash returns just the hash that needs to be signed. + // This is used when you only need the hash without building the full tx. + GetSigningHash(ctx context.Context, data *OutboundTxData) ([]byte, error) + + // AssembleSignedTransaction combines the unsigned transaction with the TSS signature. + // Returns the fully signed transaction ready for broadcast. + AssembleSignedTransaction(unsignedTx []byte, signature []byte, recoveryID byte) ([]byte, error) + + // BroadcastTransaction sends the signed transaction to the network. + // Returns the transaction hash. + BroadcastTransaction(ctx context.Context, signedTx []byte) (string, error) + + // GetChainID returns the chain identifier this builder is configured for. + GetChainID() string +} + +// OutboundTxBuilderFactory creates OutboundTxBuilder instances for different chains. +type OutboundTxBuilderFactory interface { + // CreateBuilder creates an OutboundTxBuilder for the specified chain. + CreateBuilder(chainID string) (OutboundTxBuilder, error) + + // SupportsChain returns true if the factory can create a builder for the chain. + SupportsChain(chainID string) bool +} diff --git a/universalClient/chains/evm/outbound_tx_builder.go b/universalClient/chains/evm/outbound_tx_builder.go new file mode 100644 index 00000000..aa772658 --- /dev/null +++ b/universalClient/chains/evm/outbound_tx_builder.go @@ -0,0 +1,312 @@ +package evm + +import ( + "context" + "crypto/ecdsa" + "encoding/hex" + "fmt" + "math/big" + "strings" + + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/crypto" + "github.com/ethereum/go-ethereum/ethclient" + "github.com/ethereum/go-ethereum/rlp" + "github.com/rs/zerolog" + + chaincommon "github.com/pushchain/push-chain-node/universalClient/chains/common" +) + +// OutboundTxBuilder builds outbound transactions for EVM chains. +type OutboundTxBuilder struct { + client *Client + chainID *big.Int + caipChainID string + gatewayAddr common.Address + tssPublicKey *ecdsa.PublicKey // TSS public key for deriving sender address + logger zerolog.Logger +} + +// NewOutboundTxBuilder creates a new EVM outbound transaction builder. +func NewOutboundTxBuilder( + client *Client, + gatewayAddr common.Address, + tssPublicKey *ecdsa.PublicKey, + logger zerolog.Logger, +) *OutboundTxBuilder { + return &OutboundTxBuilder{ + client: client, + chainID: big.NewInt(client.chainID), + caipChainID: client.GetConfig().Chain, + gatewayAddr: gatewayAddr, + tssPublicKey: tssPublicKey, + logger: logger.With().Str("component", "evm_outbound_builder").Logger(), + } +} + +// BuildTransaction creates an unsigned EVM transaction from outbound data. +func (b *OutboundTxBuilder) BuildTransaction(ctx context.Context, data *chaincommon.OutboundTxData) (*chaincommon.OutboundTxResult, error) { + if data == nil { + return nil, fmt.Errorf("outbound data is nil") + } + + b.logger.Debug(). + Str("tx_id", data.TxID). + Str("recipient", data.Recipient). + Str("amount", data.Amount). + Msg("building EVM outbound transaction") + + // Parse amount + amount, ok := new(big.Int).SetString(data.Amount, 10) + if !ok { + return nil, fmt.Errorf("invalid amount: %s", data.Amount) + } + + // Parse gas limit + gasLimit, ok := new(big.Int).SetString(data.GasLimit, 10) + if !ok { + gasLimit = big.NewInt(21000) // Default gas limit + } + + // Get nonce for TSS address + tssAddr := b.getTSSAddress() + nonce, err := b.getNonce(ctx, tssAddr) + if err != nil { + return nil, fmt.Errorf("failed to get nonce: %w", err) + } + + // Get gas price + gasPrice, err := b.getGasPrice(ctx) + if err != nil { + return nil, fmt.Errorf("failed to get gas price: %w", err) + } + + // Build transaction data (call to gateway contract) + txData, err := b.buildGatewayCallData(data) + if err != nil { + return nil, fmt.Errorf("failed to build gateway call data: %w", err) + } + + // Create the transaction + tx := types.NewTx(&types.LegacyTx{ + Nonce: nonce, + GasPrice: gasPrice, + Gas: gasLimit.Uint64(), + To: &b.gatewayAddr, + Value: amount, + Data: txData, + }) + + // Get the signer + signer := types.NewEIP155Signer(b.chainID) + + // Get the signing hash + signingHash := signer.Hash(tx) + + // Serialize the unsigned transaction + rawTx, err := rlp.EncodeToBytes(tx) + if err != nil { + return nil, fmt.Errorf("failed to encode transaction: %w", err) + } + + return &chaincommon.OutboundTxResult{ + RawTx: rawTx, + SigningHash: signingHash[:], + Nonce: nonce, + GasPrice: gasPrice, + GasLimit: gasLimit.Uint64(), + ChainID: b.caipChainID, + }, nil +} + +// GetSigningHash returns just the hash that needs to be signed. +func (b *OutboundTxBuilder) GetSigningHash(ctx context.Context, data *chaincommon.OutboundTxData) ([]byte, error) { + result, err := b.BuildTransaction(ctx, data) + if err != nil { + return nil, err + } + return result.SigningHash, nil +} + +// AssembleSignedTransaction combines the unsigned transaction with the TSS signature. +func (b *OutboundTxBuilder) AssembleSignedTransaction(unsignedTx []byte, signature []byte, recoveryID byte) ([]byte, error) { + if len(signature) != 64 { + return nil, fmt.Errorf("invalid signature length: expected 64, got %d", len(signature)) + } + + // Decode the unsigned transaction + var tx types.Transaction + if err := rlp.DecodeBytes(unsignedTx, &tx); err != nil { + return nil, fmt.Errorf("failed to decode unsigned transaction: %w", err) + } + + // Create the signature with recovery ID + // EIP-155: V = chainID * 2 + 35 + recoveryID + v := new(big.Int).Mul(b.chainID, big.NewInt(2)) + v.Add(v, big.NewInt(35)) + v.Add(v, big.NewInt(int64(recoveryID))) + + r := new(big.Int).SetBytes(signature[:32]) + s := new(big.Int).SetBytes(signature[32:64]) + + // Create signed transaction + signer := types.NewEIP155Signer(b.chainID) + signedTx, err := tx.WithSignature(signer, append(append(r.Bytes(), s.Bytes()...), v.Bytes()...)) + if err != nil { + return nil, fmt.Errorf("failed to add signature to transaction: %w", err) + } + + // Serialize the signed transaction + signedTxBytes, err := rlp.EncodeToBytes(signedTx) + if err != nil { + return nil, fmt.Errorf("failed to encode signed transaction: %w", err) + } + + return signedTxBytes, nil +} + +// BroadcastTransaction sends the signed transaction to the network. +func (b *OutboundTxBuilder) BroadcastTransaction(ctx context.Context, signedTx []byte) (string, error) { + // Decode the signed transaction + var tx types.Transaction + if err := rlp.DecodeBytes(signedTx, &tx); err != nil { + return "", fmt.Errorf("failed to decode signed transaction: %w", err) + } + + // Send the transaction + var txHash string + err := b.client.executeWithFailover(ctx, "broadcast_tx", func(client *ethclient.Client) error { + if err := client.SendTransaction(ctx, &tx); err != nil { + return err + } + txHash = tx.Hash().Hex() + return nil + }) + if err != nil { + return "", fmt.Errorf("failed to broadcast transaction: %w", err) + } + + b.logger.Info(). + Str("tx_hash", txHash). + Msg("outbound transaction broadcasted") + + return txHash, nil +} + +// GetChainID returns the chain identifier. +func (b *OutboundTxBuilder) GetChainID() string { + return b.caipChainID +} + +// getTSSAddress derives the TSS address from the public key. +func (b *OutboundTxBuilder) getTSSAddress() common.Address { + if b.tssPublicKey == nil { + return common.Address{} + } + return crypto.PubkeyToAddress(*b.tssPublicKey) +} + +// getNonce gets the current nonce for an address. +func (b *OutboundTxBuilder) getNonce(ctx context.Context, addr common.Address) (uint64, error) { + var nonce uint64 + err := b.client.executeWithFailover(ctx, "get_nonce", func(client *ethclient.Client) error { + var innerErr error + nonce, innerErr = client.PendingNonceAt(ctx, addr) + return innerErr + }) + return nonce, err +} + +// getGasPrice gets the current gas price. +func (b *OutboundTxBuilder) getGasPrice(ctx context.Context) (*big.Int, error) { + var gasPrice *big.Int + err := b.client.executeWithFailover(ctx, "get_gas_price", func(client *ethclient.Client) error { + var innerErr error + gasPrice, innerErr = client.SuggestGasPrice(ctx) + return innerErr + }) + return gasPrice, err +} + +// buildGatewayCallData builds the call data for the gateway contract. +// This encodes the function call to execute the outbound transaction. +func (b *OutboundTxBuilder) buildGatewayCallData(data *chaincommon.OutboundTxData) ([]byte, error) { + // Parse recipient address + if !common.IsHexAddress(data.Recipient) { + return nil, fmt.Errorf("invalid recipient address: %s", data.Recipient) + } + recipient := common.HexToAddress(data.Recipient) + + // Parse amount + amount, ok := new(big.Int).SetString(data.Amount, 10) + if !ok { + return nil, fmt.Errorf("invalid amount: %s", data.Amount) + } + + // Parse asset address + var assetAddr common.Address + if data.AssetAddr != "" && data.AssetAddr != "0x" { + if !common.IsHexAddress(data.AssetAddr) { + return nil, fmt.Errorf("invalid asset address: %s", data.AssetAddr) + } + assetAddr = common.HexToAddress(data.AssetAddr) + } + + // Parse payload + var payload []byte + if data.Payload != "" && data.Payload != "0x" { + payloadHex := strings.TrimPrefix(data.Payload, "0x") + var err error + payload, err = hex.DecodeString(payloadHex) + if err != nil { + return nil, fmt.Errorf("invalid payload hex: %w", err) + } + } + + // Build the ABI-encoded call data + // Function: executeOutbound(bytes32 txId, address recipient, uint256 amount, address asset, bytes payload) + // Selector: first 4 bytes of keccak256("executeOutbound(bytes32,address,uint256,address,bytes)") + + // For now, return a simple transfer call data + // In production, this should be the actual gateway contract ABI encoding + callData := buildExecuteOutboundCallData(data.TxID, recipient, amount, assetAddr, payload) + + return callData, nil +} + +// buildExecuteOutboundCallData creates the ABI-encoded call data for executeOutbound. +func buildExecuteOutboundCallData(txID string, recipient common.Address, amount *big.Int, asset common.Address, payload []byte) []byte { + // Function selector for executeOutbound(bytes32,address,uint256,address,bytes) + // keccak256("executeOutbound(bytes32,address,uint256,address,bytes)")[:4] + selector := crypto.Keccak256([]byte("executeOutbound(bytes32,address,uint256,address,bytes)"))[:4] + + // Encode txID as bytes32 + txIDBytes := common.HexToHash(txID) + + // Build the call data + // This is a simplified encoding - in production use go-ethereum's abi package + data := make([]byte, 0, 4+32*5+len(payload)) + data = append(data, selector...) + data = append(data, txIDBytes[:]...) + data = append(data, common.LeftPadBytes(recipient[:], 32)...) + data = append(data, common.LeftPadBytes(amount.Bytes(), 32)...) + data = append(data, common.LeftPadBytes(asset[:], 32)...) + + // Dynamic data offset for payload (5 * 32 = 160) + offset := big.NewInt(160) + data = append(data, common.LeftPadBytes(offset.Bytes(), 32)...) + + // Payload length + payloadLen := big.NewInt(int64(len(payload))) + data = append(data, common.LeftPadBytes(payloadLen.Bytes(), 32)...) + + // Payload data (padded to 32 bytes) + if len(payload) > 0 { + paddedPayload := make([]byte, ((len(payload)+31)/32)*32) + copy(paddedPayload, payload) + data = append(data, paddedPayload...) + } + + return data +} diff --git a/universalClient/chains/svm/outbound_tx_builder.go b/universalClient/chains/svm/outbound_tx_builder.go new file mode 100644 index 00000000..ba0d5541 --- /dev/null +++ b/universalClient/chains/svm/outbound_tx_builder.go @@ -0,0 +1,300 @@ +package svm + +import ( + "context" + "crypto/sha256" + "encoding/hex" + "fmt" + "math/big" + "strings" + + bin "github.com/gagliardetto/binary" + "github.com/gagliardetto/solana-go" + "github.com/gagliardetto/solana-go/rpc" + "github.com/rs/zerolog" + + chaincommon "github.com/pushchain/push-chain-node/universalClient/chains/common" +) + +// OutboundTxBuilder builds outbound transactions for Solana chains. +type OutboundTxBuilder struct { + client *Client + caipChainID string + gatewayProgram solana.PublicKey + tssPublicKey solana.PublicKey // TSS public key (ed25519) + logger zerolog.Logger +} + +// NewOutboundTxBuilder creates a new Solana outbound transaction builder. +func NewOutboundTxBuilder( + client *Client, + gatewayProgram solana.PublicKey, + tssPublicKey solana.PublicKey, + logger zerolog.Logger, +) *OutboundTxBuilder { + return &OutboundTxBuilder{ + client: client, + caipChainID: client.GetConfig().Chain, + gatewayProgram: gatewayProgram, + tssPublicKey: tssPublicKey, + logger: logger.With().Str("component", "svm_outbound_builder").Logger(), + } +} + +// BuildTransaction creates an unsigned Solana transaction from outbound data. +func (b *OutboundTxBuilder) BuildTransaction(ctx context.Context, data *chaincommon.OutboundTxData) (*chaincommon.OutboundTxResult, error) { + if data == nil { + return nil, fmt.Errorf("outbound data is nil") + } + + b.logger.Debug(). + Str("tx_id", data.TxID). + Str("recipient", data.Recipient). + Str("amount", data.Amount). + Msg("building Solana outbound transaction") + + // Get recent blockhash + recentBlockhash, err := b.getRecentBlockhash(ctx) + if err != nil { + return nil, fmt.Errorf("failed to get recent blockhash: %w", err) + } + + // Build the instruction for the gateway program + instruction, err := b.buildGatewayInstruction(data) + if err != nil { + return nil, fmt.Errorf("failed to build gateway instruction: %w", err) + } + + // Create the transaction + tx, err := solana.NewTransaction( + []solana.Instruction{instruction}, + recentBlockhash, + solana.TransactionPayer(b.tssPublicKey), + ) + if err != nil { + return nil, fmt.Errorf("failed to create transaction: %w", err) + } + + // Get the message to sign + messageBytes, err := tx.Message.MarshalBinary() + if err != nil { + return nil, fmt.Errorf("failed to marshal message: %w", err) + } + + // The signing hash is the message itself for Solana (ed25519 signs the message directly) + signingHash := messageBytes + + // Serialize the unsigned transaction + rawTx, err := tx.MarshalBinary() + if err != nil { + return nil, fmt.Errorf("failed to marshal transaction: %w", err) + } + + return &chaincommon.OutboundTxResult{ + RawTx: rawTx, + SigningHash: signingHash, + ChainID: b.caipChainID, + }, nil +} + +// GetSigningHash returns just the hash that needs to be signed. +func (b *OutboundTxBuilder) GetSigningHash(ctx context.Context, data *chaincommon.OutboundTxData) ([]byte, error) { + result, err := b.BuildTransaction(ctx, data) + if err != nil { + return nil, err + } + return result.SigningHash, nil +} + +// AssembleSignedTransaction combines the unsigned transaction with the TSS signature. +func (b *OutboundTxBuilder) AssembleSignedTransaction(unsignedTx []byte, signature []byte, recoveryID byte) ([]byte, error) { + if len(signature) != 64 { + return nil, fmt.Errorf("invalid signature length: expected 64, got %d", len(signature)) + } + + // Decode the unsigned transaction + tx, err := solana.TransactionFromDecoder(bin.NewBinDecoder(unsignedTx)) + if err != nil { + return nil, fmt.Errorf("failed to decode unsigned transaction: %w", err) + } + + // Create Solana signature from the 64-byte signature + var sig solana.Signature + copy(sig[:], signature) + + // Add the signature to the transaction + tx.Signatures = []solana.Signature{sig} + + // Serialize the signed transaction + signedTx, err := tx.MarshalBinary() + if err != nil { + return nil, fmt.Errorf("failed to marshal signed transaction: %w", err) + } + + return signedTx, nil +} + +// BroadcastTransaction sends the signed transaction to the network. +func (b *OutboundTxBuilder) BroadcastTransaction(ctx context.Context, signedTx []byte) (string, error) { + // Decode the signed transaction + tx, err := solana.TransactionFromDecoder(bin.NewBinDecoder(signedTx)) + if err != nil { + return "", fmt.Errorf("failed to decode signed transaction: %w", err) + } + + // Get RPC client + rpcClient, err := b.client.getRPCClient() + if err != nil { + return "", fmt.Errorf("failed to get RPC client: %w", err) + } + + // Send the transaction + sig, err := rpcClient.SendTransaction(ctx, tx) + if err != nil { + return "", fmt.Errorf("failed to send transaction: %w", err) + } + + txHash := sig.String() + b.logger.Info(). + Str("tx_hash", txHash). + Msg("outbound transaction broadcasted") + + return txHash, nil +} + +// GetChainID returns the chain identifier. +func (b *OutboundTxBuilder) GetChainID() string { + return b.caipChainID +} + +// getRecentBlockhash gets a recent blockhash for the transaction. +func (b *OutboundTxBuilder) getRecentBlockhash(ctx context.Context) (solana.Hash, error) { + rpcClient, err := b.client.getRPCClient() + if err != nil { + return solana.Hash{}, fmt.Errorf("failed to get RPC client: %w", err) + } + + resp, err := rpcClient.GetLatestBlockhash(ctx, rpc.CommitmentFinalized) + if err != nil { + return solana.Hash{}, fmt.Errorf("failed to get latest blockhash: %w", err) + } + + return resp.Value.Blockhash, nil +} + +// buildGatewayInstruction builds the instruction for the gateway program. +func (b *OutboundTxBuilder) buildGatewayInstruction(data *chaincommon.OutboundTxData) (solana.Instruction, error) { + // Parse recipient as Solana public key + recipient, err := solana.PublicKeyFromBase58(data.Recipient) + if err != nil { + return nil, fmt.Errorf("invalid recipient address: %w", err) + } + + // Parse amount + amount, ok := new(big.Int).SetString(data.Amount, 10) + if !ok { + return nil, fmt.Errorf("invalid amount: %s", data.Amount) + } + + // Parse asset address (if provided) + var assetMint solana.PublicKey + if data.AssetAddr != "" && data.AssetAddr != "0x" { + assetMint, err = solana.PublicKeyFromBase58(data.AssetAddr) + if err != nil { + return nil, fmt.Errorf("invalid asset address: %w", err) + } + } + + // Parse payload + var payload []byte + if data.Payload != "" && data.Payload != "0x" { + payloadHex := strings.TrimPrefix(data.Payload, "0x") + payload, err = hex.DecodeString(payloadHex) + if err != nil { + return nil, fmt.Errorf("invalid payload hex: %w", err) + } + } + + // Build the instruction data + instructionData := buildExecuteOutboundInstructionData(data.TxID, amount, payload) + + // Build account metas + accounts := []*solana.AccountMeta{ + {PublicKey: b.tssPublicKey, IsSigner: true, IsWritable: true}, // Payer/Signer + {PublicKey: recipient, IsSigner: false, IsWritable: true}, // Recipient + {PublicKey: b.gatewayProgram, IsSigner: false, IsWritable: false}, // Gateway program + } + + // Add asset mint if token transfer + if assetMint != (solana.PublicKey{}) { + accounts = append(accounts, &solana.AccountMeta{ + PublicKey: assetMint, + IsSigner: false, + IsWritable: false, + }) + } + + return &gatewayInstruction{ + programID: b.gatewayProgram, + accounts: accounts, + data: instructionData, + }, nil +} + +// gatewayInstruction implements solana.Instruction for the gateway program. +type gatewayInstruction struct { + programID solana.PublicKey + accounts []*solana.AccountMeta + data []byte +} + +func (i *gatewayInstruction) ProgramID() solana.PublicKey { + return i.programID +} + +func (i *gatewayInstruction) Accounts() []*solana.AccountMeta { + return i.accounts +} + +func (i *gatewayInstruction) Data() ([]byte, error) { + return i.data, nil +} + +// buildExecuteOutboundInstructionData creates the instruction data for executeOutbound. +func buildExecuteOutboundInstructionData(txID string, amount *big.Int, payload []byte) []byte { + // Instruction discriminator for "execute_outbound" + // This is typically the first 8 bytes of sha256("global:execute_outbound") + discriminator := sha256.Sum256([]byte("global:execute_outbound")) + + // Build instruction data + data := make([]byte, 0, 8+32+8+4+len(payload)) + + // Discriminator (8 bytes) + data = append(data, discriminator[:8]...) + + // TxID as bytes32 (32 bytes) + txIDBytes := make([]byte, 32) + txIDHex := strings.TrimPrefix(txID, "0x") + if decoded, err := hex.DecodeString(txIDHex); err == nil { + copy(txIDBytes, decoded) + } + data = append(data, txIDBytes...) + + // Amount as u64 (8 bytes, little-endian) + amountBytes := make([]byte, 8) + amountU64 := amount.Uint64() + for i := 0; i < 8; i++ { + amountBytes[i] = byte(amountU64 >> (8 * i)) + } + data = append(data, amountBytes...) + + // Payload length (4 bytes, little-endian) + payloadLen := uint32(len(payload)) + data = append(data, byte(payloadLen), byte(payloadLen>>8), byte(payloadLen>>16), byte(payloadLen>>24)) + + // Payload data + data = append(data, payload...) + + return data +} + From 5c12b0a1ef1c44567fdf79949988ea8b303165cf Mon Sep 17 00:00:00 2001 From: aman035 Date: Fri, 9 Jan 2026 13:44:59 +0530 Subject: [PATCH 108/120] add: fetch gas price from pc --- universalClient/pushcore/pushCore.go | 78 ++++++- universalClient/pushcore/pushCore_test.go | 260 +++++++++++++++++++++- 2 files changed, 325 insertions(+), 13 deletions(-) diff --git a/universalClient/pushcore/pushCore.go b/universalClient/pushcore/pushCore.go index b2be90ba..e53dc9da 100644 --- a/universalClient/pushcore/pushCore.go +++ b/universalClient/pushcore/pushCore.go @@ -4,6 +4,7 @@ import ( "context" "errors" "fmt" + "math/big" "net/url" "strings" "sync/atomic" @@ -16,6 +17,7 @@ import ( "github.com/cosmos/cosmos-sdk/types/tx" "github.com/cosmos/cosmos-sdk/x/authz" "github.com/pushchain/push-chain-node/universalClient/constant" + uexecutortypes "github.com/pushchain/push-chain-node/x/uexecutor/types" uregistrytypes "github.com/pushchain/push-chain-node/x/uregistry/types" utsstypes "github.com/pushchain/push-chain-node/x/utss/types" uvalidatortypes "github.com/pushchain/push-chain-node/x/uvalidator/types" @@ -28,14 +30,15 @@ import ( // Client is a minimal fan-out client over multiple gRPC endpoints. // Each call tries endpoints in round-robin order and returns the first success. type Client struct { - logger zerolog.Logger - eps []uregistrytypes.QueryClient - uvalidatorClients []uvalidatortypes.QueryClient - utssClients []utsstypes.QueryClient - cmtClients []cmtservice.ServiceClient - txClients []tx.ServiceClient // for querying transactions by events - conns []*grpc.ClientConn // owned connections for Close() - rr uint32 // round-robin counter + logger zerolog.Logger + eps []uregistrytypes.QueryClient + uvalidatorClients []uvalidatortypes.QueryClient + utssClients []utsstypes.QueryClient + uexecutorClients []uexecutortypes.QueryClient // for gas price queries + cmtClients []cmtservice.ServiceClient + txClients []tx.ServiceClient // for querying transactions by events + conns []*grpc.ClientConn // owned connections for Close() + rr uint32 // round-robin counter } // New dials the provided gRPC URLs (best-effort) and builds a Client. @@ -61,6 +64,7 @@ func New(urls []string, logger zerolog.Logger) (*Client, error) { c.eps = append(c.eps, uregistrytypes.NewQueryClient(conn)) c.uvalidatorClients = append(c.uvalidatorClients, uvalidatortypes.NewQueryClient(conn)) c.utssClients = append(c.utssClients, utsstypes.NewQueryClient(conn)) + c.uexecutorClients = append(c.uexecutorClients, uexecutortypes.NewQueryClient(conn)) c.cmtClients = append(c.cmtClients, cmtservice.NewServiceClient(conn)) c.txClients = append(c.txClients, tx.NewServiceClient(conn)) } @@ -86,6 +90,7 @@ func (c *Client) Close() error { c.eps = nil c.uvalidatorClients = nil c.utssClients = nil + c.uexecutorClients = nil c.cmtClients = nil c.txClients = nil return firstErr @@ -435,9 +440,9 @@ func (c *Client) GetCurrentTSSKeyId() (string, error) { // TxResult represents a transaction result with its events. type TxResult struct { - TxHash string - Height int64 - TxResponse *tx.GetTxResponse + TxHash string + Height int64 + TxResponse *tx.GetTxResponse } // GetTxsByEvents queries transactions matching the given event query. @@ -540,3 +545,54 @@ func (c *Client) GetBlockByHeight(height int64) (*cmtservice.GetBlockByHeightRes return nil, fmt.Errorf("pushcore: GetBlockByHeight failed on all %d endpoints: %w", len(c.cmtClients), lastErr) } + +// GetGasPrice returns the median gas price for a specific chain from the on-chain oracle. +// The gas price is voted on by universal validators and stored on-chain. +// chainID should be in CAIP-2 format (e.g., "eip155:84532" for Base Sepolia). +// Returns the median price in the chain's native unit (Wei for EVM chains, lamports for Solana). +func (c *Client) GetGasPrice(ctx context.Context, chainID string) (*big.Int, error) { + if len(c.uexecutorClients) == 0 { + return nil, errors.New("pushcore: no endpoints configured") + } + + if chainID == "" { + return nil, errors.New("pushcore: chainID is required") + } + + start := int(atomic.AddUint32(&c.rr, 1)-1) % len(c.uexecutorClients) + + var lastErr error + for i := 0; i < len(c.uexecutorClients); i++ { + idx := (start + i) % len(c.uexecutorClients) + client := c.uexecutorClients[idx] + + resp, err := client.GasPrice(ctx, &uexecutortypes.QueryGasPriceRequest{ + ChainId: chainID, + }) + if err == nil && resp.GasPrice != nil { + // Get the median price using MedianIndex + if len(resp.GasPrice.Prices) == 0 { + return nil, fmt.Errorf("pushcore: no gas prices available for chain %s", chainID) + } + + medianIdx := resp.GasPrice.MedianIndex + if medianIdx >= uint64(len(resp.GasPrice.Prices)) { + // Fallback to first price if median index is out of bounds + medianIdx = 0 + } + + medianPrice := resp.GasPrice.Prices[medianIdx] + return new(big.Int).SetUint64(medianPrice), nil + } + + lastErr = err + c.logger.Debug(). + Int("attempt", i+1). + Int("endpoint_index", idx). + Str("chain_id", chainID). + Err(err). + Msg("GetGasPrice failed; trying next endpoint") + } + + return nil, fmt.Errorf("pushcore: GetGasPrice failed on all %d endpoints for chain %s: %w", len(c.uexecutorClients), chainID, lastErr) +} diff --git a/universalClient/pushcore/pushCore_test.go b/universalClient/pushcore/pushCore_test.go index fcf43a6a..1ad0f904 100644 --- a/universalClient/pushcore/pushCore_test.go +++ b/universalClient/pushcore/pushCore_test.go @@ -2,8 +2,10 @@ package pushcore import ( "context" + "math/big" "testing" + uexecutortypes "github.com/pushchain/push-chain-node/x/uexecutor/types" uregistrytypes "github.com/pushchain/push-chain-node/x/uregistry/types" "github.com/rs/zerolog" "github.com/stretchr/testify/assert" @@ -175,7 +177,7 @@ func TestNew_ErrorHandling(t *testing.T) { t.Run("partial connection success", func(t *testing.T) { // Mix of potentially valid and definitely invalid URLs urls := []string{ - "localhost:9090", // Might work + "localhost:9090", // Might work "invalid-host-that-doesnt-exist:99999", // Will fail } @@ -477,4 +479,258 @@ func TestExtractHostnameFromURL(t *testing.T) { } }) } -} \ No newline at end of file +} + +func TestClient_GetGasPrice(t *testing.T) { + logger := zerolog.Nop() + ctx := context.Background() + + t.Run("no endpoints configured", func(t *testing.T) { + client := &Client{ + logger: logger, + uexecutorClients: []uexecutortypes.QueryClient{}, + } + + price, err := client.GetGasPrice(ctx, "eip155:84532") + require.Error(t, err) + assert.Contains(t, err.Error(), "no endpoints configured") + assert.Nil(t, price) + }) + + t.Run("empty chainID", func(t *testing.T) { + client := &Client{ + logger: logger, + uexecutorClients: []uexecutortypes.QueryClient{nil}, // Has endpoint but chainID is empty + } + + price, err := client.GetGasPrice(ctx, "") + require.Error(t, err) + assert.Contains(t, err.Error(), "chainID is required") + assert.Nil(t, price) + }) +} + +func TestClient_GetGasPrice_WithMock(t *testing.T) { + logger := zerolog.Nop() + ctx := context.Background() + + t.Run("successful gas price retrieval", func(t *testing.T) { + mockClient := &mockUExecutorQueryClient{ + gasPriceResp: &uexecutortypes.QueryGasPriceResponse{ + GasPrice: &uexecutortypes.GasPrice{ + ObservedChainId: "eip155:84532", + Signers: []string{"validator1", "validator2", "validator3"}, + Prices: []uint64{1000000000, 2000000000, 3000000000}, // 1, 2, 3 gwei + BlockNums: []uint64{100, 101, 102}, + MedianIndex: 1, // Median is 2 gwei (index 1) + }, + }, + } + + client := &Client{ + logger: logger, + uexecutorClients: []uexecutortypes.QueryClient{mockClient}, + } + + price, err := client.GetGasPrice(ctx, "eip155:84532") + require.NoError(t, err) + require.NotNil(t, price) + + // Expected median price is 2000000000 (2 gwei) + expectedPrice := big.NewInt(2000000000) + assert.Equal(t, expectedPrice, price) + }) + + t.Run("single validator price", func(t *testing.T) { + mockClient := &mockUExecutorQueryClient{ + gasPriceResp: &uexecutortypes.QueryGasPriceResponse{ + GasPrice: &uexecutortypes.GasPrice{ + ObservedChainId: "eip155:1", + Signers: []string{"validator1"}, + Prices: []uint64{5000000000}, // 5 gwei + BlockNums: []uint64{100}, + MedianIndex: 0, + }, + }, + } + + client := &Client{ + logger: logger, + uexecutorClients: []uexecutortypes.QueryClient{mockClient}, + } + + price, err := client.GetGasPrice(ctx, "eip155:1") + require.NoError(t, err) + require.NotNil(t, price) + assert.Equal(t, big.NewInt(5000000000), price) + }) + + t.Run("empty prices array", func(t *testing.T) { + mockClient := &mockUExecutorQueryClient{ + gasPriceResp: &uexecutortypes.QueryGasPriceResponse{ + GasPrice: &uexecutortypes.GasPrice{ + ObservedChainId: "eip155:84532", + Signers: []string{}, + Prices: []uint64{}, // Empty + BlockNums: []uint64{}, + MedianIndex: 0, + }, + }, + } + + client := &Client{ + logger: logger, + uexecutorClients: []uexecutortypes.QueryClient{mockClient}, + } + + price, err := client.GetGasPrice(ctx, "eip155:84532") + require.Error(t, err) + assert.Contains(t, err.Error(), "no gas prices available") + assert.Nil(t, price) + }) + + t.Run("median index out of bounds fallback", func(t *testing.T) { + mockClient := &mockUExecutorQueryClient{ + gasPriceResp: &uexecutortypes.QueryGasPriceResponse{ + GasPrice: &uexecutortypes.GasPrice{ + ObservedChainId: "eip155:84532", + Signers: []string{"validator1"}, + Prices: []uint64{1500000000}, + BlockNums: []uint64{100}, + MedianIndex: 99, // Out of bounds + }, + }, + } + + client := &Client{ + logger: logger, + uexecutorClients: []uexecutortypes.QueryClient{mockClient}, + } + + price, err := client.GetGasPrice(ctx, "eip155:84532") + require.NoError(t, err) + require.NotNil(t, price) + // Should fallback to first price + assert.Equal(t, big.NewInt(1500000000), price) + }) + + t.Run("chain not found error", func(t *testing.T) { + mockClient := &mockUExecutorQueryClient{ + err: assert.AnError, + } + + client := &Client{ + logger: logger, + uexecutorClients: []uexecutortypes.QueryClient{mockClient}, + } + + price, err := client.GetGasPrice(ctx, "unknown-chain") + require.Error(t, err) + assert.Contains(t, err.Error(), "GetGasPrice failed") + assert.Nil(t, price) + }) + + t.Run("round robin failover", func(t *testing.T) { + // First client fails, second succeeds + failingClient := &mockUExecutorQueryClient{ + err: assert.AnError, + } + successClient := &mockUExecutorQueryClient{ + gasPriceResp: &uexecutortypes.QueryGasPriceResponse{ + GasPrice: &uexecutortypes.GasPrice{ + ObservedChainId: "eip155:84532", + Prices: []uint64{1000000000}, + MedianIndex: 0, + }, + }, + } + + client := &Client{ + logger: logger, + uexecutorClients: []uexecutortypes.QueryClient{failingClient, successClient}, + } + + price, err := client.GetGasPrice(ctx, "eip155:84532") + require.NoError(t, err) + require.NotNil(t, price) + assert.Equal(t, big.NewInt(1000000000), price) + }) + + t.Run("all endpoints fail", func(t *testing.T) { + client := &Client{ + logger: logger, + uexecutorClients: []uexecutortypes.QueryClient{ + &mockUExecutorQueryClient{err: assert.AnError}, + &mockUExecutorQueryClient{err: assert.AnError}, + }, + } + + price, err := client.GetGasPrice(ctx, "eip155:84532") + require.Error(t, err) + assert.Contains(t, err.Error(), "failed on all 2 endpoints") + assert.Nil(t, price) + }) + + t.Run("various chain IDs", func(t *testing.T) { + chainIDs := []string{ + "eip155:1", // Ethereum Mainnet + "eip155:84532", // Base Sepolia + "eip155:137", // Polygon + "solana:mainnet", // Solana Mainnet + } + + for _, chainID := range chainIDs { + mockClient := &mockUExecutorQueryClient{ + gasPriceResp: &uexecutortypes.QueryGasPriceResponse{ + GasPrice: &uexecutortypes.GasPrice{ + ObservedChainId: chainID, + Prices: []uint64{1000000000}, + MedianIndex: 0, + }, + }, + } + + client := &Client{ + logger: logger, + uexecutorClients: []uexecutortypes.QueryClient{mockClient}, + } + + price, err := client.GetGasPrice(ctx, chainID) + require.NoError(t, err, "Failed for chainID: %s", chainID) + require.NotNil(t, price) + } + }) +} + +// mockUExecutorQueryClient implements uexecutortypes.QueryClient for testing +type mockUExecutorQueryClient struct { + gasPriceResp *uexecutortypes.QueryGasPriceResponse + err error +} + +func (m *mockUExecutorQueryClient) GasPrice(ctx context.Context, req *uexecutortypes.QueryGasPriceRequest, opts ...grpc.CallOption) (*uexecutortypes.QueryGasPriceResponse, error) { + if m.err != nil { + return nil, m.err + } + return m.gasPriceResp, nil +} + +func (m *mockUExecutorQueryClient) Params(ctx context.Context, req *uexecutortypes.QueryParamsRequest, opts ...grpc.CallOption) (*uexecutortypes.QueryParamsResponse, error) { + return nil, nil +} + +func (m *mockUExecutorQueryClient) AllPendingInbounds(ctx context.Context, req *uexecutortypes.QueryAllPendingInboundsRequest, opts ...grpc.CallOption) (*uexecutortypes.QueryAllPendingInboundsResponse, error) { + return nil, nil +} + +func (m *mockUExecutorQueryClient) GetUniversalTx(ctx context.Context, req *uexecutortypes.QueryGetUniversalTxRequest, opts ...grpc.CallOption) (*uexecutortypes.QueryGetUniversalTxResponse, error) { + return nil, nil +} + +func (m *mockUExecutorQueryClient) AllUniversalTx(ctx context.Context, req *uexecutortypes.QueryAllUniversalTxRequest, opts ...grpc.CallOption) (*uexecutortypes.QueryAllUniversalTxResponse, error) { + return nil, nil +} + +func (m *mockUExecutorQueryClient) AllGasPrices(ctx context.Context, req *uexecutortypes.QueryAllGasPricesRequest, opts ...grpc.CallOption) (*uexecutortypes.QueryAllGasPricesResponse, error) { + return nil, nil +} From 1cc3e45902fc783f481c0ef897806dce859b2d60 Mon Sep 17 00:00:00 2001 From: aman035 Date: Fri, 9 Jan 2026 13:45:34 +0530 Subject: [PATCH 109/120] refactor: outbound tx builder changes --- universalClient/chains/common/outbound.go | 13 ++++---- .../chains/evm/outbound_tx_builder.go | 33 ++++--------------- .../chains/svm/outbound_tx_builder.go | 19 ++++------- 3 files changed, 19 insertions(+), 46 deletions(-) diff --git a/universalClient/chains/common/outbound.go b/universalClient/chains/common/outbound.go index 6a22e711..a1656eaf 100644 --- a/universalClient/chains/common/outbound.go +++ b/universalClient/chains/common/outbound.go @@ -21,7 +21,7 @@ type OutboundTxResult struct { // For Solana: the message hash SigningHash []byte `json:"signing_hash"` - // Nonce is the transaction nonce (EVM) or recent blockhash (Solana) + // Nonce is the transaction nonce (EVM only) Nonce uint64 `json:"nonce,omitempty"` // GasPrice is the gas price used (EVM only) @@ -32,18 +32,19 @@ type OutboundTxResult struct { // ChainID is the destination chain ID ChainID string `json:"chain_id"` + + // Blockhash is the recent blockhash used (Solana only) + Blockhash []byte `json:"blockhash,omitempty"` } // OutboundTxBuilder defines the interface for building outbound transactions. // Each chain type (EVM, SVM) implements this interface. type OutboundTxBuilder interface { // BuildTransaction creates an unsigned transaction from outbound data. + // gasPrice: the gas price from on-chain oracle (passed by coordinator) + // Fetches nonce from destination chain. // Returns the transaction result containing the raw tx and signing hash. - BuildTransaction(ctx context.Context, data *OutboundTxData) (*OutboundTxResult, error) - - // GetSigningHash returns just the hash that needs to be signed. - // This is used when you only need the hash without building the full tx. - GetSigningHash(ctx context.Context, data *OutboundTxData) ([]byte, error) + BuildTransaction(ctx context.Context, data *OutboundTxData, gasPrice *big.Int) (*OutboundTxResult, error) // AssembleSignedTransaction combines the unsigned transaction with the TSS signature. // Returns the fully signed transaction ready for broadcast. diff --git a/universalClient/chains/evm/outbound_tx_builder.go b/universalClient/chains/evm/outbound_tx_builder.go index aa772658..0a866af6 100644 --- a/universalClient/chains/evm/outbound_tx_builder.go +++ b/universalClient/chains/evm/outbound_tx_builder.go @@ -46,15 +46,20 @@ func NewOutboundTxBuilder( } // BuildTransaction creates an unsigned EVM transaction from outbound data. -func (b *OutboundTxBuilder) BuildTransaction(ctx context.Context, data *chaincommon.OutboundTxData) (*chaincommon.OutboundTxResult, error) { +// gasPrice is provided by the caller (from pushcore oracle). +func (b *OutboundTxBuilder) BuildTransaction(ctx context.Context, data *chaincommon.OutboundTxData, gasPrice *big.Int) (*chaincommon.OutboundTxResult, error) { if data == nil { return nil, fmt.Errorf("outbound data is nil") } + if gasPrice == nil { + return nil, fmt.Errorf("gas price is nil") + } b.logger.Debug(). Str("tx_id", data.TxID). Str("recipient", data.Recipient). Str("amount", data.Amount). + Str("gas_price", gasPrice.String()). Msg("building EVM outbound transaction") // Parse amount @@ -76,12 +81,6 @@ func (b *OutboundTxBuilder) BuildTransaction(ctx context.Context, data *chaincom return nil, fmt.Errorf("failed to get nonce: %w", err) } - // Get gas price - gasPrice, err := b.getGasPrice(ctx) - if err != nil { - return nil, fmt.Errorf("failed to get gas price: %w", err) - } - // Build transaction data (call to gateway contract) txData, err := b.buildGatewayCallData(data) if err != nil { @@ -120,15 +119,6 @@ func (b *OutboundTxBuilder) BuildTransaction(ctx context.Context, data *chaincom }, nil } -// GetSigningHash returns just the hash that needs to be signed. -func (b *OutboundTxBuilder) GetSigningHash(ctx context.Context, data *chaincommon.OutboundTxData) ([]byte, error) { - result, err := b.BuildTransaction(ctx, data) - if err != nil { - return nil, err - } - return result.SigningHash, nil -} - // AssembleSignedTransaction combines the unsigned transaction with the TSS signature. func (b *OutboundTxBuilder) AssembleSignedTransaction(unsignedTx []byte, signature []byte, recoveryID byte) ([]byte, error) { if len(signature) != 64 { @@ -218,17 +208,6 @@ func (b *OutboundTxBuilder) getNonce(ctx context.Context, addr common.Address) ( return nonce, err } -// getGasPrice gets the current gas price. -func (b *OutboundTxBuilder) getGasPrice(ctx context.Context) (*big.Int, error) { - var gasPrice *big.Int - err := b.client.executeWithFailover(ctx, "get_gas_price", func(client *ethclient.Client) error { - var innerErr error - gasPrice, innerErr = client.SuggestGasPrice(ctx) - return innerErr - }) - return gasPrice, err -} - // buildGatewayCallData builds the call data for the gateway contract. // This encodes the function call to execute the outbound transaction. func (b *OutboundTxBuilder) buildGatewayCallData(data *chaincommon.OutboundTxData) ([]byte, error) { diff --git a/universalClient/chains/svm/outbound_tx_builder.go b/universalClient/chains/svm/outbound_tx_builder.go index ba0d5541..09e2c698 100644 --- a/universalClient/chains/svm/outbound_tx_builder.go +++ b/universalClient/chains/svm/outbound_tx_builder.go @@ -42,10 +42,12 @@ func NewOutboundTxBuilder( } // BuildTransaction creates an unsigned Solana transaction from outbound data. -func (b *OutboundTxBuilder) BuildTransaction(ctx context.Context, data *chaincommon.OutboundTxData) (*chaincommon.OutboundTxResult, error) { +// gasPrice is accepted for interface compatibility but not used for Solana (uses compute units instead). +func (b *OutboundTxBuilder) BuildTransaction(ctx context.Context, data *chaincommon.OutboundTxData, gasPrice *big.Int) (*chaincommon.OutboundTxResult, error) { if data == nil { return nil, fmt.Errorf("outbound data is nil") } + // Note: gasPrice is not used for Solana transactions (they use compute units) b.logger.Debug(). Str("tx_id", data.TxID). @@ -94,18 +96,10 @@ func (b *OutboundTxBuilder) BuildTransaction(ctx context.Context, data *chaincom RawTx: rawTx, SigningHash: signingHash, ChainID: b.caipChainID, + Blockhash: recentBlockhash[:], }, nil } -// GetSigningHash returns just the hash that needs to be signed. -func (b *OutboundTxBuilder) GetSigningHash(ctx context.Context, data *chaincommon.OutboundTxData) ([]byte, error) { - result, err := b.BuildTransaction(ctx, data) - if err != nil { - return nil, err - } - return result.SigningHash, nil -} - // AssembleSignedTransaction combines the unsigned transaction with the TSS signature. func (b *OutboundTxBuilder) AssembleSignedTransaction(unsignedTx []byte, signature []byte, recoveryID byte) ([]byte, error) { if len(signature) != 64 { @@ -220,8 +214,8 @@ func (b *OutboundTxBuilder) buildGatewayInstruction(data *chaincommon.OutboundTx // Build account metas accounts := []*solana.AccountMeta{ - {PublicKey: b.tssPublicKey, IsSigner: true, IsWritable: true}, // Payer/Signer - {PublicKey: recipient, IsSigner: false, IsWritable: true}, // Recipient + {PublicKey: b.tssPublicKey, IsSigner: true, IsWritable: true}, // Payer/Signer + {PublicKey: recipient, IsSigner: false, IsWritable: true}, // Recipient {PublicKey: b.gatewayProgram, IsSigner: false, IsWritable: false}, // Gateway program } @@ -297,4 +291,3 @@ func buildExecuteOutboundInstructionData(txID string, amount *big.Int, payload [ return data } - From 26de2858c3d34b871736dda8aa937845deec548f Mon Sep 17 00:00:00 2001 From: aman035 Date: Fri, 9 Jan 2026 13:46:35 +0530 Subject: [PATCH 110/120] add: tx sending and verification --- .../tss/coordinator/coordinator.go | 88 ++++++----- .../tss/coordinator/coordinator_test.go | 139 +++++++++++++----- universalClient/tss/coordinator/types.go | 17 +++ .../tss/sessionmanager/sessionmanager.go | 118 +++++++++++++++ .../tss/sessionmanager/sessionmanager_test.go | 3 + universalClient/tss/tss.go | 9 ++ 6 files changed, 301 insertions(+), 73 deletions(-) diff --git a/universalClient/tss/coordinator/coordinator.go b/universalClient/tss/coordinator/coordinator.go index 43513072..ddfcf7bb 100644 --- a/universalClient/tss/coordinator/coordinator.go +++ b/universalClient/tss/coordinator/coordinator.go @@ -2,9 +2,7 @@ package coordinator import ( "context" - "crypto/sha256" "encoding/json" - "fmt" "sort" "sync" "time" @@ -14,6 +12,7 @@ import ( session "go-wrapper/go-dkls/sessions" + "github.com/pushchain/push-chain-node/universalClient/chains/common" "github.com/pushchain/push-chain-node/universalClient/pushcore" "github.com/pushchain/push-chain-node/universalClient/store" "github.com/pushchain/push-chain-node/universalClient/tss/eventstore" @@ -27,6 +26,7 @@ type Coordinator struct { eventStore *eventstore.Store pushCore *pushcore.Client keyshareManager *keyshare.Manager + txBuilderFactory common.OutboundTxBuilderFactory validatorAddress string coordinatorRange uint64 pollInterval time.Duration @@ -56,6 +56,7 @@ func NewCoordinator( eventStore *eventstore.Store, pushCore *pushcore.Client, keyshareManager *keyshare.Manager, + txBuilderFactory common.OutboundTxBuilderFactory, validatorAddress string, coordinatorRange uint64, pollInterval time.Duration, @@ -69,6 +70,7 @@ func NewCoordinator( eventStore: eventStore, pushCore: pushCore, keyshareManager: keyshareManager, + txBuilderFactory: txBuilderFactory, validatorAddress: validatorAddress, coordinatorRange: coordinatorRange, pollInterval: pollInterval, @@ -429,6 +431,7 @@ func (c *Coordinator) processEventAsCoordinator(ctx context.Context, event store // Create setup message based on event type var setupData []byte + var signMetadata *SignMetadata var err error switch event.Type { case string(ProtocolKeygen), string(ProtocolKeyrefresh): @@ -437,7 +440,7 @@ func (c *Coordinator) processEventAsCoordinator(ctx context.Context, event store case string(ProtocolQuorumChange): setupData, err = c.createQcSetup(ctx, threshold, partyIDs, sortedParticipants) case string(ProtocolSign): - setupData, err = c.createSignSetup(ctx, event.EventData, partyIDs) + setupData, signMetadata, err = c.createSignSetup(ctx, event.EventData, partyIDs) default: err = errors.Errorf("unknown protocol type: %s", event.Type) } @@ -452,6 +455,7 @@ func (c *Coordinator) processEventAsCoordinator(ctx context.Context, event store EventID: event.EventID, Payload: setupData, Participants: partyIDs, + SignMetadata: signMetadata, // nil for non-sign events } setupMsgBytes, err := json.Marshal(setupMsg) if err != nil { @@ -615,19 +619,20 @@ func (c *Coordinator) createKeygenSetup(threshold int, partyIDs []string) ([]byt return setupData, nil } -// createSignSetup creates a sign setup message. -// Requires loading the keyshare to extract keyID and messageHash from event data. -func (c *Coordinator) createSignSetup(ctx context.Context, eventData []byte, partyIDs []string) ([]byte, error) { +// createSignSetup creates a sign setup message and returns the sign metadata. +// Uses the OutboundTxBuilder to build the actual transaction for the destination chain. +// Returns the setup data, sign metadata (for participant verification), and error. +func (c *Coordinator) createSignSetup(ctx context.Context, eventData []byte, partyIDs []string) ([]byte, *SignMetadata, error) { // Get current TSS keyId from pushCore keyIDStr, err := c.pushCore.GetCurrentTSSKeyId() if err != nil { - return nil, errors.Wrap(err, "failed to get current TSS keyId") + return nil, nil, errors.Wrap(err, "failed to get current TSS keyId") } // Load keyshare to ensure it exists (validation) keyshareBytes, err := c.keyshareManager.Get(keyIDStr) if err != nil { - return nil, errors.Wrapf(err, "failed to load keyshare for keyId %s", keyIDStr) + return nil, nil, errors.Wrapf(err, "failed to load keyshare for keyId %s", keyIDStr) } _ = keyshareBytes // Keyshare is loaded for validation, keyID is derived from string @@ -643,23 +648,28 @@ func (c *Coordinator) createSignSetup(ctx context.Context, eventData []byte, par participantIDs = append(participantIDs, []byte(partyID)...) } - // Build the message hash to sign from outbound event data - messageHash, err := buildSignMessageHash(eventData) + // Build the transaction and get signing parameters + txResult, err := c.buildSignTransaction(ctx, eventData) if err != nil { - return nil, errors.Wrap(err, "failed to build sign message hash") + return nil, nil, errors.Wrap(err, "failed to build sign transaction") } - setupData, err := session.DklsSignSetupMsgNew(keyIDBytes, nil, messageHash, participantIDs) + setupData, err := session.DklsSignSetupMsgNew(keyIDBytes, nil, txResult.SigningHash, participantIDs) if err != nil { - return nil, errors.Wrap(err, "failed to create sign setup") + return nil, nil, errors.Wrap(err, "failed to create sign setup") } - return setupData, nil + + // Create sign metadata with gas price and signing hash for participant verification + signMetadata := &SignMetadata{ + GasPrice: txResult.GasPrice, + SigningHash: txResult.SigningHash, + } + + return setupData, signMetadata, nil } -// buildSignMessageHash creates a deterministic message hash from outbound event data. -// The hash includes all critical fields that must be validated on the destination chain. -// Format: sha256(txId|destinationChain|recipient|amount|assetAddr|sender|payload|gasLimit) -func buildSignMessageHash(eventData []byte) ([]byte, error) { +// buildSignTransaction builds the outbound transaction using the appropriate OutboundTxBuilder. +func (c *Coordinator) buildSignTransaction(ctx context.Context, eventData []byte) (*common.OutboundTxResult, error) { if len(eventData) == 0 { return nil, errors.New("event data is empty") } @@ -673,21 +683,33 @@ func buildSignMessageHash(eventData []byte) ([]byte, error) { return nil, errors.New("outbound event missing tx_id") } - // Create canonical message string and hash it - message := fmt.Sprintf( - "%s|%s|%s|%s|%s|%s|%s|%s", - data.TxID, - data.DestinationChain, - data.Recipient, - data.Amount, - data.AssetAddr, - data.Sender, - data.Payload, - data.GasLimit, - ) - - hash := sha256.Sum256([]byte(message)) - return hash[:], nil + if data.DestinationChain == "" { + return nil, errors.New("outbound event missing destination_chain") + } + + if c.txBuilderFactory == nil { + return nil, errors.New("tx builder factory not configured") + } + + // Get gas price from pushcore oracle + gasPrice, err := c.pushCore.GetGasPrice(ctx, data.DestinationChain) + if err != nil { + return nil, errors.Wrapf(err, "failed to get gas price for chain %s", data.DestinationChain) + } + + // Get the builder for the destination chain + builder, err := c.txBuilderFactory.CreateBuilder(data.DestinationChain) + if err != nil { + return nil, errors.Wrapf(err, "failed to create tx builder for chain %s", data.DestinationChain) + } + + // Build the transaction with the gas price from oracle + txResult, err := builder.BuildTransaction(ctx, &data, gasPrice) + if err != nil { + return nil, errors.Wrap(err, "failed to build transaction") + } + + return txResult, nil } // createQcSetup creates a quorumchange setup message. diff --git a/universalClient/tss/coordinator/coordinator_test.go b/universalClient/tss/coordinator/coordinator_test.go index 2d503983..efc37444 100644 --- a/universalClient/tss/coordinator/coordinator_test.go +++ b/universalClient/tss/coordinator/coordinator_test.go @@ -3,6 +3,7 @@ package coordinator import ( "context" "errors" + "math/big" "sync" "testing" "time" @@ -13,6 +14,7 @@ import ( "gorm.io/driver/sqlite" "gorm.io/gorm" + "github.com/pushchain/push-chain-node/universalClient/chains/common" "github.com/pushchain/push-chain-node/universalClient/pushcore" "github.com/pushchain/push-chain-node/universalClient/store" "github.com/pushchain/push-chain-node/universalClient/tss/eventstore" @@ -149,6 +151,7 @@ func setupTestCoordinator(t *testing.T) (*Coordinator, *mockPushCoreClient, *eve evtStore, testClient, keyshareMgr, + nil, // txBuilderFactory - nil for most tests "validator1", 100, // coordinatorRange 100*time.Millisecond, @@ -483,8 +486,22 @@ func TestCoordinator_StartStop(t *testing.T) { assert.False(t, running, "coordinator should be stopped") } -func TestBuildSignMessageHash(t *testing.T) { - t.Run("valid outbound event data", func(t *testing.T) { +func TestGetSigningHash(t *testing.T) { + ctx := context.Background() + + // Note: "valid outbound event data" test requires integration with pushcore.GetGasPrice + // which cannot be easily mocked. The validation tests below cover error paths. + + t.Run("gas price fetch fails with minimal pushCore", func(t *testing.T) { + coord, _, _ := setupTestCoordinator(t) + + mockFactory := &mockTxBuilderFactory{ + builders: map[string]*mockTxBuilder{ + "ethereum": {signingHash: []byte("mock-signing-hash-32-bytes-long!")}, + }, + } + coord.txBuilderFactory = mockFactory + eventData := []byte(`{ "tx_id": "0x123abc", "destination_chain": "ethereum", @@ -496,66 +513,108 @@ func TestBuildSignMessageHash(t *testing.T) { "gas_limit": "21000" }`) - hash, err := buildSignMessageHash(eventData) - require.NoError(t, err) - assert.Len(t, hash, 32) // SHA256 produces 32 bytes + // With minimal pushCore, gas price fetch will fail + _, err := coord.buildSignTransaction(ctx, eventData) + require.Error(t, err) + assert.Contains(t, err.Error(), "failed to get gas price") }) - t.Run("deterministic hash", func(t *testing.T) { - eventData := []byte(`{"tx_id": "0x123", "destination_chain": "eth", "recipient": "0x1", "amount": "100", "asset_addr": "0x2", "sender": "0x3", "payload": "", "gas_limit": "21000"}`) - - hash1, err := buildSignMessageHash(eventData) - require.NoError(t, err) + t.Run("missing tx_id", func(t *testing.T) { + coord, _, _ := setupTestCoordinator(t) + coord.txBuilderFactory = &mockTxBuilderFactory{} - hash2, err := buildSignMessageHash(eventData) - require.NoError(t, err) + eventData := []byte(`{"destination_chain": "ethereum"}`) - assert.Equal(t, hash1, hash2) + _, err := coord.buildSignTransaction(ctx, eventData) + require.Error(t, err) + assert.Contains(t, err.Error(), "tx_id") }) - t.Run("different tx_id produces different hash", func(t *testing.T) { - eventData1 := []byte(`{"tx_id": "0x123", "destination_chain": "eth", "recipient": "0x1", "amount": "100", "asset_addr": "0x2", "sender": "0x3", "payload": "", "gas_limit": "21000"}`) - eventData2 := []byte(`{"tx_id": "0x456", "destination_chain": "eth", "recipient": "0x1", "amount": "100", "asset_addr": "0x2", "sender": "0x3", "payload": "", "gas_limit": "21000"}`) - - hash1, err := buildSignMessageHash(eventData1) - require.NoError(t, err) + t.Run("missing destination_chain", func(t *testing.T) { + coord, _, _ := setupTestCoordinator(t) + coord.txBuilderFactory = &mockTxBuilderFactory{} - hash2, err := buildSignMessageHash(eventData2) - require.NoError(t, err) + eventData := []byte(`{"tx_id": "0x123"}`) - assert.NotEqual(t, hash1, hash2) + _, err := coord.buildSignTransaction(ctx, eventData) + require.Error(t, err) + assert.Contains(t, err.Error(), "destination_chain") }) - t.Run("different amount produces different hash", func(t *testing.T) { - eventData1 := []byte(`{"tx_id": "0x123", "destination_chain": "eth", "recipient": "0x1", "amount": "100", "asset_addr": "0x2", "sender": "0x3", "payload": "", "gas_limit": "21000"}`) - eventData2 := []byte(`{"tx_id": "0x123", "destination_chain": "eth", "recipient": "0x1", "amount": "200", "asset_addr": "0x2", "sender": "0x3", "payload": "", "gas_limit": "21000"}`) - - hash1, err := buildSignMessageHash(eventData1) - require.NoError(t, err) + t.Run("nil factory", func(t *testing.T) { + coord, _, _ := setupTestCoordinator(t) + // Factory is nil by default in test setup - hash2, err := buildSignMessageHash(eventData2) - require.NoError(t, err) - - assert.NotEqual(t, hash1, hash2) - }) - - t.Run("missing tx_id", func(t *testing.T) { - eventData := []byte(`{"destination_chain": "ethereum"}`) + eventData := []byte(`{"tx_id": "0x123", "destination_chain": "ethereum"}`) - _, err := buildSignMessageHash(eventData) + _, err := coord.buildSignTransaction(ctx, eventData) require.Error(t, err) - assert.Contains(t, err.Error(), "tx_id") + assert.Contains(t, err.Error(), "factory not configured") }) t.Run("invalid json", func(t *testing.T) { - _, err := buildSignMessageHash([]byte("not json")) + coord, _, _ := setupTestCoordinator(t) + coord.txBuilderFactory = &mockTxBuilderFactory{} + + _, err := coord.buildSignTransaction(ctx, []byte("not json")) require.Error(t, err) assert.Contains(t, err.Error(), "unmarshal") }) t.Run("empty event data", func(t *testing.T) { - _, err := buildSignMessageHash([]byte{}) + coord, _, _ := setupTestCoordinator(t) + + _, err := coord.buildSignTransaction(ctx, []byte{}) require.Error(t, err) assert.Contains(t, err.Error(), "empty") }) } + +// mockTxBuilder implements common.OutboundTxBuilder for testing +type mockTxBuilder struct { + signingHash []byte + err error +} + +func (m *mockTxBuilder) BuildTransaction(ctx context.Context, data *common.OutboundTxData, gasPrice *big.Int) (*common.OutboundTxResult, error) { + if m.err != nil { + return nil, m.err + } + return &common.OutboundTxResult{ + SigningHash: m.signingHash, + Nonce: 1, + GasPrice: gasPrice, + GasLimit: 21000, + ChainID: "ethereum", + RawTx: []byte("raw-tx-data"), + }, nil +} + +func (m *mockTxBuilder) AssembleSignedTransaction(unsignedTx []byte, signature []byte, recoveryID byte) ([]byte, error) { + return nil, nil +} + +func (m *mockTxBuilder) BroadcastTransaction(ctx context.Context, signedTx []byte) (string, error) { + return "", nil +} + +func (m *mockTxBuilder) GetChainID() string { + return "mock-chain" +} + +// mockTxBuilderFactory implements common.OutboundTxBuilderFactory for testing +type mockTxBuilderFactory struct { + builders map[string]*mockTxBuilder +} + +func (m *mockTxBuilderFactory) CreateBuilder(chainID string) (common.OutboundTxBuilder, error) { + if builder, ok := m.builders[chainID]; ok { + return builder, nil + } + return nil, errors.New("unsupported chain: " + chainID) +} + +func (m *mockTxBuilderFactory) SupportsChain(chainID string) bool { + _, ok := m.builders[chainID] + return ok +} diff --git a/universalClient/tss/coordinator/types.go b/universalClient/tss/coordinator/types.go index 83ef2227..b0b64bf8 100644 --- a/universalClient/tss/coordinator/types.go +++ b/universalClient/tss/coordinator/types.go @@ -2,6 +2,7 @@ package coordinator import ( "context" + "math/big" ) // SendFunc is a function type for sending messages to participants. @@ -19,10 +20,26 @@ const ( ProtocolSign ProtocolType = "SIGN" ) +// SignMetadata contains the signing parameters from the coordinator. +// Participants independently build the transaction using these parameters +// and verify the resulting hash matches before signing. +type SignMetadata struct { + // GasPrice is the gas price chosen by coordinator from the on-chain oracle. + GasPrice *big.Int `json:"gas_price"` + + // SigningHash is the hash computed by the coordinator. + // Participants verify this matches their independently computed hash. + SigningHash []byte `json:"signing_hash"` +} + // Message represents a simple message with type, eventId, payload, and participants. type Message struct { Type string `json:"type"` // "setup", "ack", "begin", "step" EventID string `json:"eventId"` Payload []byte `json:"payload"` Participants []string `json:"participants"` // Array of PartyIDs (validator addresses) participating in this process + + // SignMetadata is included for SIGN protocol setup messages. + // Participants use this to verify the signing hash before proceeding. + SignMetadata *SignMetadata `json:"sign_metadata,omitempty"` } diff --git a/universalClient/tss/sessionmanager/sessionmanager.go b/universalClient/tss/sessionmanager/sessionmanager.go index 4551b45d..395792be 100644 --- a/universalClient/tss/sessionmanager/sessionmanager.go +++ b/universalClient/tss/sessionmanager/sessionmanager.go @@ -1,10 +1,12 @@ package sessionmanager import ( + "bytes" "context" "crypto/sha256" "encoding/hex" "encoding/json" + "math/big" "strconv" "sync" "time" @@ -12,12 +14,15 @@ import ( "github.com/pkg/errors" "github.com/rs/zerolog" + "github.com/pushchain/push-chain-node/universalClient/chains/common" + "github.com/pushchain/push-chain-node/universalClient/pushcore" "github.com/pushchain/push-chain-node/universalClient/store" "github.com/pushchain/push-chain-node/universalClient/tss/coordinator" "github.com/pushchain/push-chain-node/universalClient/tss/dkls" "github.com/pushchain/push-chain-node/universalClient/tss/eventstore" "github.com/pushchain/push-chain-node/universalClient/tss/keyshare" "github.com/pushchain/push-chain-node/universalClient/tss/vote" + uexecutortypes "github.com/pushchain/push-chain-node/x/uexecutor/types" ) // SendFunc is a function type for sending messages to participants. @@ -38,6 +43,8 @@ type SessionManager struct { eventStore *eventstore.Store coordinator *coordinator.Coordinator keyshareManager *keyshare.Manager + pushCore *pushcore.Client // For validating gas prices + txBuilderFactory common.OutboundTxBuilderFactory // For building tx to verify hash send SendFunc partyID string // Our validator address (pushvaloper format) logger zerolog.Logger @@ -54,6 +61,8 @@ func NewSessionManager( eventStore *eventstore.Store, coord *coordinator.Coordinator, keyshareManager *keyshare.Manager, + pushCore *pushcore.Client, + txBuilderFactory common.OutboundTxBuilderFactory, send SendFunc, partyID string, sessionExpiryTime time.Duration, @@ -64,6 +73,8 @@ func NewSessionManager( eventStore: eventStore, coordinator: coord, keyshareManager: keyshareManager, + pushCore: pushCore, + txBuilderFactory: txBuilderFactory, send: send, partyID: partyID, sessionExpiryTime: sessionExpiryTime, @@ -134,6 +145,13 @@ func (sm *SessionManager) handleSetupMessage(ctx context.Context, senderPeerID s } sm.mu.Unlock() + // 4.5. For SIGN events, verify the signing hash independently + if event.Type == string(coordinator.ProtocolSign) { + if err := sm.verifySignMetadata(ctx, event, msg.SignMetadata); err != nil { + return errors.Wrap(err, "sign metadata verification failed") + } + } + // 5. Create session based on protocol type session, err := sm.createSession(ctx, event, msg) if err != nil { @@ -714,3 +732,103 @@ func (sm *SessionManager) checkExpiredSessions(ctx context.Context, blockDelay u } } } + +// GasPriceTolerancePercent defines the acceptable deviation from oracle gas price (e.g., 10 = 10%) +const GasPriceTolerancePercent = 10 + +// verifySignMetadata validates the coordinator's signing request by: +// 1. Verifying the gas price is within acceptable range of on-chain oracle +// 2. Building the transaction independently using the same gas price +// 3. Comparing the resulting hash with coordinator's hash - must match exactly +func (sm *SessionManager) verifySignMetadata(ctx context.Context, event *store.PCEvent, meta *coordinator.SignMetadata) error { + if meta == nil { + return errors.New("sign metadata is required for SIGN events") + } + + if meta.GasPrice == nil { + return errors.New("gas price is missing in metadata") + } + + if len(meta.SigningHash) == 0 { + return errors.New("signing hash is missing in metadata") + } + + // Parse the event data to get outbound transaction details + var outboundData uexecutortypes.OutboundCreatedEvent + if err := json.Unmarshal(event.EventData, &outboundData); err != nil { + return errors.Wrap(err, "failed to parse outbound event data") + } + + // 1. Validate gas price is reasonable (within tolerance of oracle price) + if err := sm.validateGasPrice(ctx, outboundData.DestinationChain, meta.GasPrice); err != nil { + return errors.Wrap(err, "gas price validation failed") + } + + // 2. Build the transaction independently using the same gas price + if sm.txBuilderFactory == nil { + sm.logger.Warn().Msg("txBuilderFactory not configured, skipping hash verification") + return nil + } + + builder, err := sm.txBuilderFactory.CreateBuilder(outboundData.DestinationChain) + if err != nil { + return errors.Wrapf(err, "failed to create tx builder for chain %s", outboundData.DestinationChain) + } + + // Build transaction with the coordinator's gas price + txResult, err := builder.BuildTransaction(ctx, &outboundData, meta.GasPrice) + if err != nil { + return errors.Wrap(err, "failed to build transaction for verification") + } + + // 3. Compare hashes - must match exactly + if !bytes.Equal(txResult.SigningHash, meta.SigningHash) { + sm.logger.Error(). + Str("our_hash", hex.EncodeToString(txResult.SigningHash)). + Str("coordinator_hash", hex.EncodeToString(meta.SigningHash)). + Str("event_id", event.EventID). + Msg("signing hash mismatch - rejecting signing request") + return errors.New("signing hash mismatch: our computed hash does not match coordinator's hash") + } + + sm.logger.Debug(). + Str("event_id", event.EventID). + Str("gas_price", meta.GasPrice.String()). + Str("signing_hash", hex.EncodeToString(meta.SigningHash)). + Msg("sign metadata verified - hash matches") + + return nil +} + +// validateGasPrice checks that the provided gas price is within acceptable bounds of the oracle price. +func (sm *SessionManager) validateGasPrice(ctx context.Context, chainID string, gasPrice *big.Int) error { + if sm.pushCore == nil { + sm.logger.Warn().Msg("pushCore not configured, skipping gas price validation") + return nil + } + + if gasPrice == nil { + return errors.New("gas price is nil") + } + + // Get the current oracle gas price + oraclePrice, err := sm.pushCore.GetGasPrice(ctx, chainID) + if err != nil { + return errors.Wrap(err, "failed to get oracle gas price") + } + + // Check if gas price is within tolerance + // Allow coordinator's price to be within ±GasPriceTolerancePercent of oracle price + tolerance := new(big.Int).Div(oraclePrice, big.NewInt(100/GasPriceTolerancePercent)) + minPrice := new(big.Int).Sub(oraclePrice, tolerance) + maxPrice := new(big.Int).Add(oraclePrice, tolerance) + + if gasPrice.Cmp(minPrice) < 0 { + return errors.Errorf("gas price %s is too low (min: %s, oracle: %s)", gasPrice.String(), minPrice.String(), oraclePrice.String()) + } + if gasPrice.Cmp(maxPrice) > 0 { + return errors.Errorf("gas price %s is too high (max: %s, oracle: %s)", gasPrice.String(), maxPrice.String(), oraclePrice.String()) + } + + return nil +} diff --git a/universalClient/tss/sessionmanager/sessionmanager_test.go b/universalClient/tss/sessionmanager/sessionmanager_test.go index d27daf56..65176617 100644 --- a/universalClient/tss/sessionmanager/sessionmanager_test.go +++ b/universalClient/tss/sessionmanager/sessionmanager_test.go @@ -115,6 +115,7 @@ func setupTestSessionManager(t *testing.T) (*SessionManager, *coordinator.Coordi evtStore, testClient, keyshareMgr, + nil, // txBuilderFactory - nil for tests "validator1", 100, // coordinatorRange 100*time.Millisecond, @@ -136,6 +137,8 @@ func setupTestSessionManager(t *testing.T) (*SessionManager, *coordinator.Coordi evtStore, coord, keyshareMgr, + nil, // pushCore - nil for testing + nil, // txBuilderFactory - nil for testing sendFn, "validator1", 3*time.Minute, // sessionExpiryTime diff --git a/universalClient/tss/tss.go b/universalClient/tss/tss.go index 622542ec..68cf5876 100644 --- a/universalClient/tss/tss.go +++ b/universalClient/tss/tss.go @@ -15,6 +15,7 @@ import ( "github.com/pkg/errors" "github.com/rs/zerolog" + "github.com/pushchain/push-chain-node/universalClient/chains/common" "github.com/pushchain/push-chain-node/universalClient/db" "github.com/pushchain/push-chain-node/universalClient/pushcore" "github.com/pushchain/push-chain-node/universalClient/tss/coordinator" @@ -45,6 +46,9 @@ type Config struct { DialTimeout time.Duration IOTimeout time.Duration + // Outbound transaction builder factory (required for sign operations) + TxBuilderFactory common.OutboundTxBuilderFactory + // Session expiry checker configuration SessionExpiryTime time.Duration // How long a session can be inactive before expiring (default: 5m) SessionExpiryCheckInterval time.Duration // How often to check for expired sessions (default: 30s) @@ -92,6 +96,7 @@ type Node struct { keyshareManager *keyshare.Manager database *db.DB pushCore *pushcore.Client + txBuilderFactory common.OutboundTxBuilderFactory logger zerolog.Logger eventStore *eventstore.Store coordinator *coordinator.Coordinator @@ -220,6 +225,7 @@ func NewNode(ctx context.Context, cfg Config) (*Node, error) { keyshareManager: mgr, database: database, pushCore: cfg.PushCore, + txBuilderFactory: cfg.TxBuilderFactory, logger: logger, eventStore: evtStore, sessionManager: nil, // Will be initialized in Start() @@ -285,6 +291,7 @@ func (n *Node) Start(ctx context.Context) error { n.eventStore, n.pushCore, n.keyshareManager, + n.txBuilderFactory, // OutboundTxBuilderFactory for building transactions n.validatorAddress, n.coordinatorRange, n.coordinatorPollInterval, @@ -302,6 +309,8 @@ func (n *Node) Start(ctx context.Context) error { n.eventStore, n.coordinator, n.keyshareManager, + n.pushCore, // For gas price verification + n.txBuilderFactory, // For building tx to verify signing hash func(ctx context.Context, peerID string, data []byte) error { return n.Send(ctx, peerID, data) }, From aabb09f9af492daf089e230f215a28bd750843cb Mon Sep 17 00:00:00 2001 From: aman035 Date: Mon, 12 Jan 2026 14:07:54 +0530 Subject: [PATCH 111/120] add: store changes --- universalClient/tss/eventstore/store.go | 71 ++++++++++++++------ universalClient/tss/eventstore/store_test.go | 63 +++++++---------- 2 files changed, 75 insertions(+), 59 deletions(-) diff --git a/universalClient/tss/eventstore/store.go b/universalClient/tss/eventstore/store.go index ef45366d..4118d3fa 100644 --- a/universalClient/tss/eventstore/store.go +++ b/universalClient/tss/eventstore/store.go @@ -8,11 +8,22 @@ import ( "github.com/pushchain/push-chain-node/universalClient/store" ) +// Event statuses for TSS operations const ( - StatusPending = "PENDING" + // StatusPending - Event is waiting to be processed (TSS signing not started) + StatusPending = "PENDING" + + // StatusInProgress - TSS signing is in progress StatusInProgress = "IN_PROGRESS" - StatusSuccess = "SUCCESS" - StatusExpired = "EXPIRED" + + // StatusBroadcasted - Transaction sent to external chain (for sign events) + StatusBroadcasted = "BROADCASTED" + + // StatusCompleted - Successfully completed (key events: vote sent, sign events: confirmed) + StatusCompleted = "COMPLETED" + + // StatusReverted - Event reverted + StatusReverted = "REVERTED" ) // Store provides database access for TSS events. @@ -30,7 +41,7 @@ func NewStore(db *gorm.DB, logger zerolog.Logger) *Store { } // GetPendingEvents returns all pending events that are ready to be processed. -// Events are ready if they are at least `minBlockConfirmation` blocks behind the current block. +// Events are ready if they are at least `minBlockConfirmation` blocks behind the current block and not expired. func (s *Store) GetPendingEvents(currentBlock uint64, minBlockConfirmation uint64) ([]store.PCEvent, error) { var events []store.PCEvent @@ -40,26 +51,28 @@ func (s *Store) GetPendingEvents(currentBlock uint64, minBlockConfirmation uint6 minBlock = 0 } - if err := s.db.Where("status = ? AND block_height <= ?", StatusPending, minBlock). + // Get pending events that are not expired + if err := s.db.Where("status = ? AND block_height <= ? AND expiry_block_height > ?", + StatusPending, minBlock, currentBlock). Order("block_height ASC, created_at ASC"). Find(&events).Error; err != nil { return nil, errors.Wrap(err, "failed to query pending events") } - // Filter out expired events - var validEvents []store.PCEvent - for _, event := range events { - if event.ExpiryBlockHeight > 0 && currentBlock > event.ExpiryBlockHeight { - // Mark as expired - if err := s.UpdateStatus(event.EventID, StatusExpired, ""); err != nil { - s.logger.Warn().Err(err).Str("event_id", event.EventID).Msg("failed to mark event as expired") - } - continue - } - validEvents = append(validEvents, event) + return events, nil +} + +// GetExpiredPendingEvents returns pending events that have expired (expiry_block_height <= currentBlock). +func (s *Store) GetExpiredPendingEvents(currentBlock uint64) ([]store.PCEvent, error) { + var events []store.PCEvent + + if err := s.db.Where("status = ? AND expiry_block_height <= ?", StatusPending, currentBlock). + Order("block_height ASC, created_at ASC"). + Find(&events).Error; err != nil { + return nil, errors.Wrap(err, "failed to query expired pending events") } - return validEvents, nil + return events, nil } // GetEvent retrieves an event by ID. @@ -120,15 +133,15 @@ func (s *Store) GetEventsByStatus(status string, limit int) ([]store.PCEvent, er return events, nil } -// ClearExpiredAndSuccessfulEvents deletes both expired and successful events. -func (s *Store) ClearExpiredAndSuccessfulEvents() (int64, error) { - result := s.db.Where("status IN ?", []string{StatusExpired, StatusSuccess}).Delete(&store.PCEvent{}) +// ClearTerminalEvents deletes completed and reverted events. +func (s *Store) ClearTerminalEvents() (int64, error) { + result := s.db.Where("status IN ?", []string{StatusCompleted, StatusReverted}).Delete(&store.PCEvent{}) if result.Error != nil { - return 0, errors.Wrap(result.Error, "failed to clear expired and successful events") + return 0, errors.Wrap(result.Error, "failed to clear expired and completed events") } s.logger.Info(). Int64("deleted_count", result.RowsAffected). - Msg("cleared expired and successful events") + Msg("cleared expired and completed events") return result.RowsAffected, nil } @@ -162,3 +175,17 @@ func (s *Store) CreateEvent(event *store.PCEvent) error { Msg("stored new TSS event") return nil } + +// UpdateTxHash updates the TxHash field for an event (used after broadcasting). +func (s *Store) UpdateTxHash(eventID, txHash string) error { + result := s.db.Model(&store.PCEvent{}). + Where("event_id = ?", eventID). + Update("tx_hash", txHash) + if result.Error != nil { + return errors.Wrapf(result.Error, "failed to update tx_hash for event %s", eventID) + } + if result.RowsAffected == 0 { + return errors.Errorf("event %s not found", eventID) + } + return nil +} diff --git a/universalClient/tss/eventstore/store_test.go b/universalClient/tss/eventstore/store_test.go index ba4dbe88..c2f9180b 100644 --- a/universalClient/tss/eventstore/store_test.go +++ b/universalClient/tss/eventstore/store_test.go @@ -119,8 +119,8 @@ func TestGetPendingEvents(t *testing.T) { s := setupTestStore(t) createTestEvent(t, s, "pending-1", 80, StatusPending, 200) createTestEvent(t, s, "in-progress-1", 80, StatusInProgress, 200) - createTestEvent(t, s, "success-1", 80, StatusSuccess, 200) - createTestEvent(t, s, "expired-1", 80, StatusExpired, 200) + createTestEvent(t, s, "success-1", 80, StatusCompleted, 200) + createTestEvent(t, s, "reverted-1", 80, StatusReverted, 200) events, err := s.GetPendingEvents(100, 10) if err != nil { @@ -134,30 +134,19 @@ func TestGetPendingEvents(t *testing.T) { } }) - t.Run("filters expired events", func(t *testing.T) { + t.Run("excludes expired events", func(t *testing.T) { s := setupTestStore(t) - // Create expired event (expiry at 90, current block is 100) - createTestEvent(t, s, "expired-1", 80, StatusPending, 90) - createTestEvent(t, s, "valid-1", 80, StatusPending, 200) + // Create events with different expiry heights + createTestEvent(t, s, "expired-1", 80, StatusPending, 90) // expired (expiry 90 < current 100) + createTestEvent(t, s, "valid-1", 80, StatusPending, 200) // not expired (expiry 200 > current 100) + createTestEvent(t, s, "valid-2", 80, StatusPending, 101) // not expired (expiry 101 > current 100) events, err := s.GetPendingEvents(100, 10) if err != nil { t.Fatalf("GetPendingEvents() error = %v, want nil", err) } - if len(events) != 1 { - t.Errorf("GetPendingEvents() returned %d events, want 1", len(events)) - } - if events[0].EventID != "valid-1" { - t.Errorf("GetPendingEvents() event ID = %s, want valid-1", events[0].EventID) - } - - // Verify expired event was marked as expired - expiredEvent, err := s.GetEvent("expired-1") - if err != nil { - t.Fatalf("GetEvent() error = %v, want nil", err) - } - if expiredEvent.Status != StatusExpired { - t.Errorf("expired event status = %s, want %s", expiredEvent.Status, StatusExpired) + if len(events) != 2 { + t.Errorf("GetPendingEvents() returned %d events, want 2", len(events)) } }) @@ -289,7 +278,7 @@ func TestUpdateStatus(t *testing.T) { t.Run("update non-existent event", func(t *testing.T) { s := setupTestStore(t) - err := s.UpdateStatus("non-existent", StatusSuccess, "") + err := s.UpdateStatus("non-existent", StatusCompleted, "") if err == nil { t.Fatal("UpdateStatus() error = nil, want error") } @@ -309,12 +298,12 @@ func TestUpdateStatus(t *testing.T) { } // IN_PROGRESS -> SUCCESS - if err := s.UpdateStatus("event-1", StatusSuccess, ""); err != nil { + if err := s.UpdateStatus("event-1", StatusCompleted, ""); err != nil { t.Fatalf("UpdateStatus() error = %v", err) } event, _ = s.GetEvent("event-1") - if event.Status != StatusSuccess { - t.Errorf("UpdateStatus() status = %s, want %s", event.Status, StatusSuccess) + if event.Status != StatusCompleted { + t.Errorf("UpdateStatus() status = %s, want %s", event.Status, StatusCompleted) } }) } @@ -324,8 +313,8 @@ func TestGetEventsByStatus(t *testing.T) { s := setupTestStore(t) createTestEvent(t, s, "pending-1", 100, StatusPending, 200) createTestEvent(t, s, "pending-2", 101, StatusPending, 200) - createTestEvent(t, s, "success-1", 102, StatusSuccess, 200) - createTestEvent(t, s, "expired-1", 103, StatusExpired, 200) + createTestEvent(t, s, "success-1", 102, StatusCompleted, 200) + createTestEvent(t, s, "reverted-1", 103, StatusReverted, 200) events, err := s.GetEventsByStatus(StatusPending, 0) if err != nil { @@ -362,7 +351,7 @@ func TestGetEventsByStatus(t *testing.T) { s := setupTestStore(t) createTestEvent(t, s, "pending-1", 100, StatusPending, 200) - events, err := s.GetEventsByStatus(StatusSuccess, 0) + events, err := s.GetEventsByStatus(StatusCompleted, 0) if err != nil { t.Fatalf("GetEventsByStatus() error = %v, want nil", err) } @@ -386,30 +375,30 @@ func TestGetEventsByStatus(t *testing.T) { }) } -func TestClearExpiredAndSuccessfulEvents(t *testing.T) { +func TestClearTerminalEvents(t *testing.T) { t.Run("clear both expired and successful events", func(t *testing.T) { s := setupTestStore(t) - createTestEvent(t, s, "success-1", 100, StatusSuccess, 200) - createTestEvent(t, s, "expired-1", 101, StatusExpired, 200) + createTestEvent(t, s, "success-1", 100, StatusCompleted, 200) + createTestEvent(t, s, "reverted-1", 101, StatusReverted, 200) createTestEvent(t, s, "pending-1", 102, StatusPending, 200) createTestEvent(t, s, "in-progress-1", 103, StatusInProgress, 200) - deleted, err := s.ClearExpiredAndSuccessfulEvents() + deleted, err := s.ClearTerminalEvents() if err != nil { - t.Fatalf("ClearExpiredAndSuccessfulEvents() error = %v, want nil", err) + t.Fatalf("ClearTerminalEvents() error = %v, want nil", err) } if deleted != 2 { - t.Errorf("ClearExpiredAndSuccessfulEvents() deleted %d events, want 2", deleted) + t.Errorf("ClearTerminalEvents() deleted %d events, want 2", deleted) } // Verify both types are gone - success, _ := s.GetEventsByStatus(StatusSuccess, 0) + success, _ := s.GetEventsByStatus(StatusCompleted, 0) if len(success) != 0 { - t.Errorf("GetEventsByStatus(StatusSuccess) returned %d events, want 0", len(success)) + t.Errorf("GetEventsByStatus(StatusCompleted) returned %d events, want 0", len(success)) } - expired, _ := s.GetEventsByStatus(StatusExpired, 0) + expired, _ := s.GetEventsByStatus(StatusReverted, 0) if len(expired) != 0 { - t.Errorf("GetEventsByStatus(StatusExpired) returned %d events, want 0", len(expired)) + t.Errorf("GetEventsByStatus(StatusReverted) returned %d events, want 0", len(expired)) } // Verify other events still exist From 5fd2da1ef834300252e183a40b939ac762906a93 Mon Sep 17 00:00:00 2001 From: aman035 Date: Mon, 12 Jan 2026 15:32:23 +0530 Subject: [PATCH 112/120] add: handler fns and tests --- universalClient/tss/vote/handler.go | 247 ++++++++-- universalClient/tss/vote/handler_test.go | 574 +++++++++++++++++++++++ 2 files changed, 774 insertions(+), 47 deletions(-) create mode 100644 universalClient/tss/vote/handler_test.go diff --git a/universalClient/tss/vote/handler.go b/universalClient/tss/vote/handler.go index 59efd3e5..69d85f39 100644 --- a/universalClient/tss/vote/handler.go +++ b/universalClient/tss/vote/handler.go @@ -8,6 +8,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/rs/zerolog" + uexecutortypes "github.com/pushchain/push-chain-node/x/uexecutor/types" utsstypes "github.com/pushchain/push-chain-node/x/utss/types" ) @@ -33,63 +34,63 @@ func NewHandler(txSigner TxSigner, log zerolog.Logger, granter string) *Handler } } -// VoteTssKeyProcess votes on a completed TSS key process. -// Returns vote tx hash on success, error on failure. -func (h *Handler) VoteTssKeyProcess(ctx context.Context, tssPubKey string, keyID string, processId uint64) (string, error) { - h.log.Info(). - Str("tss_pubkey", tssPubKey). - Str("key_id", keyID). - Msg("starting TSS key process vote") +const ( + // Default gas limit for vote transactions + defaultGasLimit = uint64(500000000) + // Default fee amount for vote transactions + defaultFeeAmount = "1000000000000000000upc" + // Default timeout for vote transactions + defaultVoteTimeout = 30 * time.Second +) - // Validate inputs +// validateHandler checks that the handler is properly configured +func (h *Handler) validateHandler() error { if h.txSigner == nil { - return "", fmt.Errorf("txSigner is nil - cannot sign transactions") + return fmt.Errorf("txSigner is nil - cannot sign transactions") } - if h.granter == "" { - return "", fmt.Errorf("granter address is empty - AuthZ not properly configured") + return fmt.Errorf("granter address is empty - AuthZ not properly configured") } + return nil +} - // Create MsgVoteTssKeyProcess - msg := &utsstypes.MsgVoteTssKeyProcess{ - Signer: h.granter, // The granter (operator) is the signer - TssPubkey: tssPubKey, - KeyId: keyID, - ProcessId: processId, +// prepareTxParams prepares gas limit and fee amount for transactions +func (h *Handler) prepareTxParams() (uint64, sdk.Coins, error) { + feeAmount, err := sdk.ParseCoinsNormalized(defaultFeeAmount) + if err != nil { + return 0, nil, fmt.Errorf("failed to parse fee amount: %w", err) } + return defaultGasLimit, feeAmount, nil +} - h.log.Debug(). - Str("msg_signer", msg.Signer). - Str("tss_pubkey", msg.TssPubkey). - Str("key_id", msg.KeyId). - Msg("created MsgVoteTssKeyProcess message") - - // Wrap message for AuthZ execution - msgs := []sdk.Msg{msg} - - // Configure gas and fees - using same values as other vote handlers - gasLimit := uint64(500000000) - feeAmount, err := sdk.ParseCoinsNormalized("1000000000000000000upc") +// broadcastVoteTx handles the common transaction broadcasting logic +// Returns the transaction hash on success, error on failure. +func (h *Handler) broadcastVoteTx( + ctx context.Context, + msgs []sdk.Msg, + memo string, + logFields map[string]interface{}, + errorPrefix string, +) (string, error) { + gasLimit, feeAmount, err := h.prepareTxParams() if err != nil { - return "", fmt.Errorf("failed to parse fee amount: %w", err) + return "", err } - memo := fmt.Sprintf("Vote on TSS key process: %s", keyID) - h.log.Debug(). Uint64("gas_limit", gasLimit). Str("fee_amount", feeAmount.String()). Str("memo", memo). + Fields(logFields). Msg("prepared transaction parameters, calling SignAndBroadcastAuthZTx") - // Create timeout context for the AuthZ transaction (30 second timeout) - voteCtx, cancel := context.WithTimeout(ctx, 30*time.Second) + // Create timeout context for the AuthZ transaction + voteCtx, cancel := context.WithTimeout(ctx, defaultVoteTimeout) defer cancel() // Sign and broadcast the AuthZ transaction - h.log.Info(). - Str("key_id", keyID). - Msg("calling SignAndBroadcastAuthZTx") + logEvent := h.log.Info().Fields(logFields) + logEvent.Msg("calling SignAndBroadcastAuthZTx") txResp, err := h.txSigner.SignAndBroadcastAuthZTx( voteCtx, @@ -100,40 +101,192 @@ func (h *Handler) VoteTssKeyProcess(ctx context.Context, tssPubKey string, keyID ) h.log.Debug(). - Str("key_id", keyID). + Fields(logFields). Bool("success", err == nil). Msg("SignAndBroadcastAuthZTx completed") if err != nil { h.log.Error(). - Str("key_id", keyID). + Fields(logFields). Err(err). Msg("SignAndBroadcastAuthZTx failed") - return "", fmt.Errorf("failed to broadcast TSS vote transaction: %w", err) + return "", fmt.Errorf("failed to broadcast %s transaction: %w", errorPrefix, err) } h.log.Debug(). - Str("key_id", keyID). + Fields(logFields). Str("response_tx_hash", txResp.TxHash). Uint32("response_code", txResp.Code). Msg("received transaction response, checking status") if txResp.Code != 0 { h.log.Error(). - Str("key_id", keyID). + Fields(logFields). Str("response_tx_hash", txResp.TxHash). Uint32("response_code", txResp.Code). Str("raw_log", txResp.RawLog). - Msg("TSS vote transaction was rejected by blockchain") - return "", fmt.Errorf("TSS vote transaction failed with code %d: %s", txResp.Code, txResp.RawLog) + Str("error_prefix", errorPrefix). + Msg("vote transaction was rejected by blockchain") + return "", fmt.Errorf("%s transaction failed with code %d: %s", errorPrefix, txResp.Code, txResp.RawLog) } + return txResp.TxHash, nil +} + +// VoteTssKeyProcess votes on a completed TSS key process. +// Returns vote tx hash on success, error on failure. +func (h *Handler) VoteTssKeyProcess(ctx context.Context, tssPubKey string, keyID string, processId uint64) (string, error) { h.log.Info(). - Str("tx_hash", txResp.TxHash). + Str("tss_pubkey", tssPubKey). + Str("key_id", keyID). + Msg("starting TSS key process vote") + + // Validate handler configuration + if err := h.validateHandler(); err != nil { + return "", err + } + + // Create MsgVoteTssKeyProcess + msg := &utsstypes.MsgVoteTssKeyProcess{ + Signer: h.granter, // The granter (operator) is the signer + TssPubkey: tssPubKey, + KeyId: keyID, + ProcessId: processId, + } + + h.log.Debug(). + Str("msg_signer", msg.Signer). + Str("tss_pubkey", msg.TssPubkey). + Str("key_id", msg.KeyId). + Msg("created MsgVoteTssKeyProcess message") + + // Wrap message for AuthZ execution + msgs := []sdk.Msg{msg} + memo := fmt.Sprintf("Vote on TSS key process: %s", keyID) + + logFields := map[string]interface{}{ + "key_id": keyID, + } + + txHash, err := h.broadcastVoteTx(ctx, msgs, memo, logFields, "TSS vote") + if err != nil { + return "", err + } + + h.log.Info(). + Str("tx_hash", txHash). Str("key_id", keyID). Str("tss_pubkey", tssPubKey). - Int64("gas_used", txResp.GasUsed). Msg("successfully voted on TSS key process") - return txResp.TxHash, nil + return txHash, nil +} + +// VoteOutbound votes on an outbound transaction observation. +// txID is the outbound tx ID (abi.encode(utxId, outboundId)). +// isSuccess indicates whether the transaction succeeded. +// For success: txHash and blockHeight must be provided (blockHeight > 0). +// For revert: reason must be provided; txHash and blockHeight are optional (if txHash is provided, blockHeight must be > 0). +func (h *Handler) VoteOutbound(ctx context.Context, txID string, isSuccess bool, txHash string, blockHeight uint64, reason string) (string, error) { + if isSuccess { + h.log.Info(). + Str("tx_id", txID). + Str("tx_hash", txHash). + Uint64("block_height", blockHeight). + Msg("starting outbound success vote") + } else { + h.log.Info(). + Str("tx_id", txID). + Str("reason", reason). + Str("tx_hash", txHash). + Uint64("block_height", blockHeight). + Msg("starting outbound revert vote") + } + + // Validate handler configuration + if err := h.validateHandler(); err != nil { + return "", err + } + + // Validate specific inputs + if txID == "" { + return "", fmt.Errorf("txID cannot be empty") + } + + if isSuccess { + if txHash == "" { + return "", fmt.Errorf("txHash cannot be empty for success vote") + } + if blockHeight == 0 { + return "", fmt.Errorf("blockHeight must be > 0 for success vote") + } + } else { + if reason == "" { + return "", fmt.Errorf("reason cannot be empty for revert vote") + } + // If txHash is provided, blockHeight must be > 0 + if txHash != "" && blockHeight == 0 { + return "", fmt.Errorf("blockHeight must be > 0 when txHash is provided") + } + } + + // Create OutboundObservation + observedTx := uexecutortypes.OutboundObservation{ + Success: isSuccess, + BlockHeight: blockHeight, + TxHash: txHash, + ErrorMsg: reason, + } + + // Create MsgVoteOutbound + msg := &uexecutortypes.MsgVoteOutbound{ + Signer: h.granter, + TxId: txID, + ObservedTx: &observedTx, + } + + h.log.Debug(). + Str("msg_signer", msg.Signer). + Str("tx_id", msg.TxId). + Bool("success", observedTx.Success). + Str("tx_hash", observedTx.TxHash). + Uint64("block_height", observedTx.BlockHeight). + Str("error_msg", observedTx.ErrorMsg). + Msg("created MsgVoteOutbound message") + + // Wrap message for AuthZ execution + msgs := []sdk.Msg{msg} + + var memo string + if isSuccess { + memo = fmt.Sprintf("Vote outbound success: %s", txID) + } else { + memo = fmt.Sprintf("Vote outbound revert: %s - %s", txID, reason) + } + + logFields := map[string]interface{}{ + "tx_id": txID, + "is_success": isSuccess, + } + + voteTxHash, err := h.broadcastVoteTx(ctx, msgs, memo, logFields, "outbound vote") + if err != nil { + return "", err + } + + if isSuccess { + h.log.Info(). + Str("tx_hash", voteTxHash). + Str("tx_id", txID). + Str("external_tx_hash", txHash). + Msg("successfully voted on outbound success") + } else { + h.log.Info(). + Str("tx_hash", voteTxHash). + Str("tx_id", txID). + Str("reason", reason). + Msg("successfully voted on outbound revert") + } + + return voteTxHash, nil } diff --git a/universalClient/tss/vote/handler_test.go b/universalClient/tss/vote/handler_test.go new file mode 100644 index 00000000..ac01caa3 --- /dev/null +++ b/universalClient/tss/vote/handler_test.go @@ -0,0 +1,574 @@ +package vote + +import ( + "context" + "errors" + "testing" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/rs/zerolog" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" + "github.com/stretchr/testify/require" + + uexecutortypes "github.com/pushchain/push-chain-node/x/uexecutor/types" + utsstypes "github.com/pushchain/push-chain-node/x/utss/types" +) + +// MockTxSigner is a mock implementation of TxSigner +type MockTxSigner struct { + mock.Mock +} + +func (m *MockTxSigner) SignAndBroadcastAuthZTx( + ctx context.Context, + msgs []sdk.Msg, + memo string, + gasLimit uint64, + feeAmount sdk.Coins, +) (*sdk.TxResponse, error) { + args := m.Called(ctx, msgs, memo, gasLimit, feeAmount) + if args.Get(0) == nil { + return nil, args.Error(1) + } + return args.Get(0).(*sdk.TxResponse), args.Error(1) +} + +func TestNewHandler(t *testing.T) { + mockSigner := &MockTxSigner{} + logger := zerolog.Nop() + granter := "push1test123" + + handler := NewHandler(mockSigner, logger, granter) + + assert.NotNil(t, handler) + assert.Equal(t, mockSigner, handler.txSigner) + assert.Equal(t, granter, handler.granter) +} + +func TestHandler_validateHandler(t *testing.T) { + tests := []struct { + name string + txSigner TxSigner + granter string + wantError bool + errorMsg string + }{ + { + name: "valid handler", + txSigner: &MockTxSigner{}, + granter: "push1test123", + wantError: false, + }, + { + name: "nil txSigner", + txSigner: nil, + granter: "push1test123", + wantError: true, + errorMsg: "txSigner is nil", + }, + { + name: "empty granter", + txSigner: &MockTxSigner{}, + granter: "", + wantError: true, + errorMsg: "granter address is empty", + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + handler := &Handler{ + txSigner: tt.txSigner, + granter: tt.granter, + log: zerolog.Nop(), + } + + err := handler.validateHandler() + if tt.wantError { + require.Error(t, err) + assert.Contains(t, err.Error(), tt.errorMsg) + } else { + require.NoError(t, err) + } + }) + } +} + +func TestHandler_prepareTxParams(t *testing.T) { + handler := &Handler{ + log: zerolog.Nop(), + } + + gasLimit, feeAmount, err := handler.prepareTxParams() + + require.NoError(t, err) + assert.Equal(t, defaultGasLimit, gasLimit) + assert.NotNil(t, feeAmount) + assert.Equal(t, "1000000000000000000upc", feeAmount.String()) +} + +func TestHandler_VoteTssKeyProcess_Success(t *testing.T) { + mockSigner := &MockTxSigner{} + logger := zerolog.Nop() + granter := "push1test123" + handler := NewHandler(mockSigner, logger, granter) + + tssPubKey := "0x1234567890abcdef" + keyID := "key-123" + processId := uint64(42) + expectedTxHash := "0xabcdef123456" + + // Setup mock response + mockSigner.On("SignAndBroadcastAuthZTx", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything). + Return(&sdk.TxResponse{ + TxHash: expectedTxHash, + Code: 0, + GasUsed: 100000, + }, nil) + + txHash, err := handler.VoteTssKeyProcess(context.Background(), tssPubKey, keyID, processId) + + require.NoError(t, err) + assert.Equal(t, expectedTxHash, txHash) + mockSigner.AssertExpectations(t) +} + +func TestHandler_VoteTssKeyProcess_ValidationErrors(t *testing.T) { + tests := []struct { + name string + txSigner TxSigner + granter string + wantError bool + errorMsg string + }{ + { + name: "nil txSigner", + txSigner: nil, + granter: "push1test123", + wantError: true, + errorMsg: "txSigner is nil", + }, + { + name: "empty granter", + txSigner: &MockTxSigner{}, + granter: "", + wantError: true, + errorMsg: "granter address is empty", + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + handler := NewHandler(tt.txSigner, zerolog.Nop(), tt.granter) + + _, err := handler.VoteTssKeyProcess(context.Background(), "0x123", "key-123", 1) + + require.Error(t, err) + assert.Contains(t, err.Error(), tt.errorMsg) + }) + } +} + +func TestHandler_VoteTssKeyProcess_BroadcastError(t *testing.T) { + mockSigner := &MockTxSigner{} + handler := NewHandler(mockSigner, zerolog.Nop(), "push1test123") + + broadcastErr := errors.New("network error") + mockSigner.On("SignAndBroadcastAuthZTx", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything). + Return(nil, broadcastErr) + + _, err := handler.VoteTssKeyProcess(context.Background(), "0x123", "key-123", 1) + + require.Error(t, err) + assert.Contains(t, err.Error(), "failed to broadcast TSS vote transaction") + assert.Contains(t, err.Error(), "network error") +} + +func TestHandler_VoteTssKeyProcess_TransactionRejected(t *testing.T) { + mockSigner := &MockTxSigner{} + handler := NewHandler(mockSigner, zerolog.Nop(), "push1test123") + + mockSigner.On("SignAndBroadcastAuthZTx", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything). + Return(&sdk.TxResponse{ + TxHash: "0xrejected", + Code: 5, + RawLog: "insufficient funds", + }, nil) + + _, err := handler.VoteTssKeyProcess(context.Background(), "0x123", "key-123", 1) + + require.Error(t, err) + assert.Contains(t, err.Error(), "TSS vote transaction failed with code 5") + assert.Contains(t, err.Error(), "insufficient funds") +} + +func TestHandler_VoteOutbound_Success(t *testing.T) { + mockSigner := &MockTxSigner{} + handler := NewHandler(mockSigner, zerolog.Nop(), "push1test123") + + txID := "0xtx123" + txHash := "0xexternal123" + blockHeight := uint64(1000) + expectedVoteTxHash := "0xvote123" + + mockSigner.On("SignAndBroadcastAuthZTx", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything). + Return(&sdk.TxResponse{ + TxHash: expectedVoteTxHash, + Code: 0, + GasUsed: 200000, + }, nil) + + voteTxHash, err := handler.VoteOutbound(context.Background(), txID, true, txHash, blockHeight, "") + + require.NoError(t, err) + assert.Equal(t, expectedVoteTxHash, voteTxHash) + + // Verify the message was created correctly + calls := mockSigner.Calls + require.Len(t, calls, 1) + msgs := calls[0].Arguments[1].([]sdk.Msg) + require.Len(t, msgs, 1) + msg, ok := msgs[0].(*uexecutortypes.MsgVoteOutbound) + require.True(t, ok) + assert.Equal(t, txID, msg.TxId) + assert.True(t, msg.ObservedTx.Success) + assert.Equal(t, txHash, msg.ObservedTx.TxHash) + assert.Equal(t, blockHeight, msg.ObservedTx.BlockHeight) +} + +func TestHandler_VoteOutbound_Revert(t *testing.T) { + mockSigner := &MockTxSigner{} + handler := NewHandler(mockSigner, zerolog.Nop(), "push1test123") + + txID := "0xtx123" + reason := "transaction reverted" + expectedVoteTxHash := "0xvote456" + + mockSigner.On("SignAndBroadcastAuthZTx", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything). + Return(&sdk.TxResponse{ + TxHash: expectedVoteTxHash, + Code: 0, + GasUsed: 200000, + }, nil) + + voteTxHash, err := handler.VoteOutbound(context.Background(), txID, false, "", 0, reason) + + require.NoError(t, err) + assert.Equal(t, expectedVoteTxHash, voteTxHash) + + // Verify the message was created correctly + calls := mockSigner.Calls + require.Len(t, calls, 1) + msgs := calls[0].Arguments[1].([]sdk.Msg) + require.Len(t, msgs, 1) + msg, ok := msgs[0].(*uexecutortypes.MsgVoteOutbound) + require.True(t, ok) + assert.Equal(t, txID, msg.TxId) + assert.False(t, msg.ObservedTx.Success) + assert.Equal(t, reason, msg.ObservedTx.ErrorMsg) +} + +func TestHandler_VoteOutbound_RevertWithTxHash(t *testing.T) { + mockSigner := &MockTxSigner{} + handler := NewHandler(mockSigner, zerolog.Nop(), "push1test123") + + txID := "0xtx123" + txHash := "0xexternal456" + blockHeight := uint64(2000) + reason := "transaction reverted on chain" + expectedVoteTxHash := "0xvote789" + + mockSigner.On("SignAndBroadcastAuthZTx", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything). + Return(&sdk.TxResponse{ + TxHash: expectedVoteTxHash, + Code: 0, + GasUsed: 200000, + }, nil) + + voteTxHash, err := handler.VoteOutbound(context.Background(), txID, false, txHash, blockHeight, reason) + + require.NoError(t, err) + assert.Equal(t, expectedVoteTxHash, voteTxHash) + + // Verify the message was created correctly + calls := mockSigner.Calls + require.Len(t, calls, 1) + msgs := calls[0].Arguments[1].([]sdk.Msg) + require.Len(t, msgs, 1) + msg, ok := msgs[0].(*uexecutortypes.MsgVoteOutbound) + require.True(t, ok) + assert.False(t, msg.ObservedTx.Success) + assert.Equal(t, txHash, msg.ObservedTx.TxHash) + assert.Equal(t, blockHeight, msg.ObservedTx.BlockHeight) + assert.Equal(t, reason, msg.ObservedTx.ErrorMsg) +} + +func TestHandler_VoteOutbound_ValidationErrors(t *testing.T) { + tests := []struct { + name string + txSigner TxSigner + granter string + txID string + isSuccess bool + txHash string + blockHeight uint64 + reason string + wantError bool + errorMsg string + }{ + { + name: "nil txSigner", + txSigner: nil, + granter: "push1test123", + txID: "0xtx123", + isSuccess: true, + txHash: "0xhash", + blockHeight: 1000, + wantError: true, + errorMsg: "txSigner is nil", + }, + { + name: "empty granter", + txSigner: &MockTxSigner{}, + granter: "", + txID: "0xtx123", + isSuccess: true, + txHash: "0xhash", + blockHeight: 1000, + wantError: true, + errorMsg: "granter address is empty", + }, + { + name: "empty txID", + txSigner: &MockTxSigner{}, + granter: "push1test123", + txID: "", + isSuccess: true, + txHash: "0xhash", + blockHeight: 1000, + wantError: true, + errorMsg: "txID cannot be empty", + }, + { + name: "success vote - empty txHash", + txSigner: &MockTxSigner{}, + granter: "push1test123", + txID: "0xtx123", + isSuccess: true, + txHash: "", + blockHeight: 1000, + wantError: true, + errorMsg: "txHash cannot be empty for success vote", + }, + { + name: "success vote - zero blockHeight", + txSigner: &MockTxSigner{}, + granter: "push1test123", + txID: "0xtx123", + isSuccess: true, + txHash: "0xhash", + blockHeight: 0, + wantError: true, + errorMsg: "blockHeight must be > 0 for success vote", + }, + { + name: "revert vote - empty reason", + txSigner: &MockTxSigner{}, + granter: "push1test123", + txID: "0xtx123", + isSuccess: false, + txHash: "", + blockHeight: 0, + reason: "", + wantError: true, + errorMsg: "reason cannot be empty for revert vote", + }, + { + name: "revert vote - txHash provided but zero blockHeight", + txSigner: &MockTxSigner{}, + granter: "push1test123", + txID: "0xtx123", + isSuccess: false, + txHash: "0xhash", + blockHeight: 0, + reason: "some reason", + wantError: true, + errorMsg: "blockHeight must be > 0 when txHash is provided", + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + handler := NewHandler(tt.txSigner, zerolog.Nop(), tt.granter) + + _, err := handler.VoteOutbound(context.Background(), tt.txID, tt.isSuccess, tt.txHash, tt.blockHeight, tt.reason) + + require.Error(t, err) + assert.Contains(t, err.Error(), tt.errorMsg) + }) + } +} + +func TestHandler_VoteOutbound_BroadcastError(t *testing.T) { + mockSigner := &MockTxSigner{} + handler := NewHandler(mockSigner, zerolog.Nop(), "push1test123") + + broadcastErr := errors.New("broadcast failed") + mockSigner.On("SignAndBroadcastAuthZTx", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything). + Return(nil, broadcastErr) + + _, err := handler.VoteOutbound(context.Background(), "0xtx123", true, "0xhash", 1000, "") + + require.Error(t, err) + assert.Contains(t, err.Error(), "failed to broadcast outbound vote transaction") + assert.Contains(t, err.Error(), "broadcast failed") +} + +func TestHandler_VoteOutbound_TransactionRejected(t *testing.T) { + mockSigner := &MockTxSigner{} + handler := NewHandler(mockSigner, zerolog.Nop(), "push1test123") + + mockSigner.On("SignAndBroadcastAuthZTx", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything). + Return(&sdk.TxResponse{ + TxHash: "0xrejected", + Code: 10, + RawLog: "invalid signature", + }, nil) + + _, err := handler.VoteOutbound(context.Background(), "0xtx123", true, "0xhash", 1000, "") + + require.Error(t, err) + assert.Contains(t, err.Error(), "outbound vote transaction failed with code 10") + assert.Contains(t, err.Error(), "invalid signature") +} + +func TestHandler_broadcastVoteTx_ContextTimeout(t *testing.T) { + mockSigner := &MockTxSigner{} + handler := NewHandler(mockSigner, zerolog.Nop(), "push1test123") + + // Create a context that's already cancelled + ctx, cancel := context.WithCancel(context.Background()) + cancel() + + msgs := []sdk.Msg{&utsstypes.MsgVoteTssKeyProcess{}} + logFields := map[string]interface{}{"test": "value"} + + // Mock should not be called because context is cancelled + // But we'll set it up anyway to verify timeout behavior + mockSigner.On("SignAndBroadcastAuthZTx", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything). + Return(nil, context.Canceled) + + _, err := handler.broadcastVoteTx(ctx, msgs, "test memo", logFields, "test") + + require.Error(t, err) + assert.Contains(t, err.Error(), "failed to broadcast test transaction") +} + +func TestHandler_broadcastVoteTx_VerifyParameters(t *testing.T) { + mockSigner := &MockTxSigner{} + handler := NewHandler(mockSigner, zerolog.Nop(), "push1test123") + + msgs := []sdk.Msg{&utsstypes.MsgVoteTssKeyProcess{ + Signer: "push1test123", + TssPubkey: "0x123", + KeyId: "key-123", + ProcessId: 1, + }} + memo := "test memo" + logFields := map[string]interface{}{"key_id": "key-123"} + + expectedTxHash := "0xsuccess" + mockSigner.On("SignAndBroadcastAuthZTx", mock.Anything, msgs, memo, defaultGasLimit, mock.MatchedBy(func(feeAmount sdk.Coins) bool { + return feeAmount.String() == "1000000000000000000upc" + })). + Return(&sdk.TxResponse{ + TxHash: expectedTxHash, + Code: 0, + }, nil) + + txHash, err := handler.broadcastVoteTx(context.Background(), msgs, memo, logFields, "test") + + require.NoError(t, err) + assert.Equal(t, expectedTxHash, txHash) + mockSigner.AssertExpectations(t) +} + +func TestHandler_VoteTssKeyProcess_MessageCreation(t *testing.T) { + mockSigner := &MockTxSigner{} + granter := "push1operator123" + handler := NewHandler(mockSigner, zerolog.Nop(), granter) + + tssPubKey := "0xabcdef123456" + keyID := "key-456" + processId := uint64(99) + + mockSigner.On("SignAndBroadcastAuthZTx", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything). + Return(&sdk.TxResponse{ + TxHash: "0xhash", + Code: 0, + }, nil). + Run(func(args mock.Arguments) { + msgs := args.Get(1).([]sdk.Msg) + require.Len(t, msgs, 1) + msg, ok := msgs[0].(*utsstypes.MsgVoteTssKeyProcess) + require.True(t, ok) + assert.Equal(t, granter, msg.Signer) + assert.Equal(t, tssPubKey, msg.TssPubkey) + assert.Equal(t, keyID, msg.KeyId) + assert.Equal(t, processId, msg.ProcessId) + }) + + _, err := handler.VoteTssKeyProcess(context.Background(), tssPubKey, keyID, processId) + require.NoError(t, err) + mockSigner.AssertExpectations(t) +} + +func TestHandler_VoteOutbound_MemoFormat(t *testing.T) { + mockSigner := &MockTxSigner{} + handler := NewHandler(mockSigner, zerolog.Nop(), "push1test123") + + txID := "0xtx789" + + // Test success memo + mockSigner.On("SignAndBroadcastAuthZTx", mock.Anything, mock.Anything, "Vote outbound success: 0xtx789", mock.Anything, mock.Anything). + Return(&sdk.TxResponse{TxHash: "0xhash1", Code: 0}, nil) + + _, err := handler.VoteOutbound(context.Background(), txID, true, "0xhash", 1000, "") + require.NoError(t, err) + + // Reset mock + mockSigner.ExpectedCalls = nil + mockSigner.Calls = nil + + // Test revert memo + reason := "expired" + mockSigner.On("SignAndBroadcastAuthZTx", mock.Anything, mock.Anything, "Vote outbound revert: 0xtx789 - expired", mock.Anything, mock.Anything). + Return(&sdk.TxResponse{TxHash: "0xhash2", Code: 0}, nil) + + _, err = handler.VoteOutbound(context.Background(), txID, false, "", 0, reason) + require.NoError(t, err) + mockSigner.AssertExpectations(t) +} + +func TestHandler_broadcastVoteTx_ContextCancellation(t *testing.T) { + mockSigner := &MockTxSigner{} + handler := NewHandler(mockSigner, zerolog.Nop(), "push1test123") + + msgs := []sdk.Msg{&utsstypes.MsgVoteTssKeyProcess{}} + logFields := map[string]interface{}{} + + // Create a context that's already cancelled + ctx, cancel := context.WithCancel(context.Background()) + cancel() + + // Mock should return context cancelled error + mockSigner.On("SignAndBroadcastAuthZTx", mock.Anything, mock.Anything, mock.Anything, mock.Anything, mock.Anything). + Return(nil, context.Canceled) + + _, err := handler.broadcastVoteTx(ctx, msgs, "test", logFields, "test") + + // Should return error due to cancelled context + require.Error(t, err) + assert.Contains(t, err.Error(), "failed to broadcast test transaction") +} From 9082042a408c8d813f4f1d524c3b752bdefdcc29 Mon Sep 17 00:00:00 2001 From: aman035 Date: Mon, 12 Jan 2026 16:17:24 +0530 Subject: [PATCH 113/120] refactor: remove unnecessary fns from store --- universalClient/tss/eventstore/store.go | 33 +++---- universalClient/tss/eventstore/store_test.go | 93 +++----------------- 2 files changed, 25 insertions(+), 101 deletions(-) diff --git a/universalClient/tss/eventstore/store.go b/universalClient/tss/eventstore/store.go index 4118d3fa..5b657fe1 100644 --- a/universalClient/tss/eventstore/store.go +++ b/universalClient/tss/eventstore/store.go @@ -24,6 +24,9 @@ const ( // StatusReverted - Event reverted StatusReverted = "REVERTED" + + // StatusExpired - Event expired (for key events) + StatusExpired = "EXPIRED" ) // Store provides database access for TSS events. @@ -62,14 +65,15 @@ func (s *Store) GetPendingEvents(currentBlock uint64, minBlockConfirmation uint6 return events, nil } -// GetExpiredPendingEvents returns pending events that have expired (expiry_block_height <= currentBlock). -func (s *Store) GetExpiredPendingEvents(currentBlock uint64) ([]store.PCEvent, error) { +// GetExpiredEvents returns all expired events (PENDING, IN_PROGRESS, or BROADCASTED) that have expired. +func (s *Store) GetExpiredEvents(currentBlock uint64) ([]store.PCEvent, error) { var events []store.PCEvent - if err := s.db.Where("status = ? AND expiry_block_height <= ?", StatusPending, currentBlock). + if err := s.db.Where("status IN ? AND expiry_block_height <= ?", + []string{StatusPending, StatusInProgress, StatusBroadcasted}, currentBlock). Order("block_height ASC, created_at ASC"). Find(&events).Error; err != nil { - return nil, errors.Wrap(err, "failed to query expired pending events") + return nil, errors.Wrap(err, "failed to query expired events") } return events, nil @@ -120,28 +124,15 @@ func (s *Store) UpdateStatusAndBlockHeight(eventID, status string, blockHeight u return nil } -// GetEventsByStatus returns all events with the given status. -func (s *Store) GetEventsByStatus(status string, limit int) ([]store.PCEvent, error) { - var events []store.PCEvent - query := s.db.Where("status = ?", status).Order("created_at DESC") - if limit > 0 { - query = query.Limit(limit) - } - if err := query.Find(&events).Error; err != nil { - return nil, errors.Wrapf(err, "failed to query events with status %s", status) - } - return events, nil -} - -// ClearTerminalEvents deletes completed and reverted events. +// ClearTerminalEvents deletes completed, reverted, and expired events. func (s *Store) ClearTerminalEvents() (int64, error) { - result := s.db.Where("status IN ?", []string{StatusCompleted, StatusReverted}).Delete(&store.PCEvent{}) + result := s.db.Where("status IN ?", []string{StatusCompleted, StatusReverted, StatusExpired}).Delete(&store.PCEvent{}) if result.Error != nil { - return 0, errors.Wrap(result.Error, "failed to clear expired and completed events") + return 0, errors.Wrap(result.Error, "failed to clear terminal events") } s.logger.Info(). Int64("deleted_count", result.RowsAffected). - Msg("cleared expired and completed events") + Msg("cleared terminal events") return result.RowsAffected, nil } diff --git a/universalClient/tss/eventstore/store_test.go b/universalClient/tss/eventstore/store_test.go index c2f9180b..619a4d79 100644 --- a/universalClient/tss/eventstore/store_test.go +++ b/universalClient/tss/eventstore/store_test.go @@ -308,73 +308,6 @@ func TestUpdateStatus(t *testing.T) { }) } -func TestGetEventsByStatus(t *testing.T) { - t.Run("get events by status", func(t *testing.T) { - s := setupTestStore(t) - createTestEvent(t, s, "pending-1", 100, StatusPending, 200) - createTestEvent(t, s, "pending-2", 101, StatusPending, 200) - createTestEvent(t, s, "success-1", 102, StatusCompleted, 200) - createTestEvent(t, s, "reverted-1", 103, StatusReverted, 200) - - events, err := s.GetEventsByStatus(StatusPending, 0) - if err != nil { - t.Fatalf("GetEventsByStatus() error = %v, want nil", err) - } - if len(events) != 2 { - t.Errorf("GetEventsByStatus() returned %d events, want 2", len(events)) - } - // Should be ordered by created_at DESC - if events[0].EventID != "pending-2" { - t.Errorf("GetEventsByStatus() first event ID = %s, want pending-2", events[0].EventID) - } - if events[1].EventID != "pending-1" { - t.Errorf("GetEventsByStatus() second event ID = %s, want pending-1", events[1].EventID) - } - }) - - t.Run("get events with limit", func(t *testing.T) { - s := setupTestStore(t) - createTestEvent(t, s, "pending-1", 100, StatusPending, 200) - createTestEvent(t, s, "pending-2", 101, StatusPending, 200) - createTestEvent(t, s, "pending-3", 102, StatusPending, 200) - - events, err := s.GetEventsByStatus(StatusPending, 2) - if err != nil { - t.Fatalf("GetEventsByStatus() error = %v, want nil", err) - } - if len(events) != 2 { - t.Errorf("GetEventsByStatus() returned %d events, want 2", len(events)) - } - }) - - t.Run("no events with status", func(t *testing.T) { - s := setupTestStore(t) - createTestEvent(t, s, "pending-1", 100, StatusPending, 200) - - events, err := s.GetEventsByStatus(StatusCompleted, 0) - if err != nil { - t.Fatalf("GetEventsByStatus() error = %v, want nil", err) - } - if len(events) != 0 { - t.Errorf("GetEventsByStatus() returned %d events, want 0", len(events)) - } - }) - - t.Run("limit zero returns all", func(t *testing.T) { - s := setupTestStore(t) - createTestEvent(t, s, "pending-1", 100, StatusPending, 200) - createTestEvent(t, s, "pending-2", 101, StatusPending, 200) - - events, err := s.GetEventsByStatus(StatusPending, 0) - if err != nil { - t.Fatalf("GetEventsByStatus() error = %v, want nil", err) - } - if len(events) != 2 { - t.Errorf("GetEventsByStatus() returned %d events, want 2", len(events)) - } - }) -} - func TestClearTerminalEvents(t *testing.T) { t.Run("clear both expired and successful events", func(t *testing.T) { s := setupTestStore(t) @@ -391,24 +324,24 @@ func TestClearTerminalEvents(t *testing.T) { t.Errorf("ClearTerminalEvents() deleted %d events, want 2", deleted) } - // Verify both types are gone - success, _ := s.GetEventsByStatus(StatusCompleted, 0) - if len(success) != 0 { - t.Errorf("GetEventsByStatus(StatusCompleted) returned %d events, want 0", len(success)) + // Verify both types are gone by trying to get them + successEvent, err := s.GetEvent("success-1") + if err == nil && successEvent != nil { + t.Errorf("ClearTerminalEvents() did not delete completed event") } - expired, _ := s.GetEventsByStatus(StatusReverted, 0) - if len(expired) != 0 { - t.Errorf("GetEventsByStatus(StatusReverted) returned %d events, want 0", len(expired)) + revertedEvent, err := s.GetEvent("reverted-1") + if err == nil && revertedEvent != nil { + t.Errorf("ClearTerminalEvents() did not delete reverted event") } // Verify other events still exist - pending, _ := s.GetEventsByStatus(StatusPending, 0) - if len(pending) != 1 { - t.Errorf("GetEventsByStatus(StatusPending) returned %d events, want 1", len(pending)) + pendingEvent, err := s.GetEvent("pending-1") + if err != nil || pendingEvent == nil { + t.Errorf("ClearTerminalEvents() incorrectly deleted pending event") } - inProgress, _ := s.GetEventsByStatus(StatusInProgress, 0) - if len(inProgress) != 1 { - t.Errorf("GetEventsByStatus(StatusInProgress) returned %d events, want 1", len(inProgress)) + inProgressEvent, err := s.GetEvent("in-progress-1") + if err != nil || inProgressEvent == nil { + t.Errorf("ClearTerminalEvents() incorrectly deleted in-progress event") } }) } From 0a88773b9d012970f91bbcc297c225e5e095b909 Mon Sep 17 00:00:00 2001 From: aman035 Date: Mon, 12 Jan 2026 16:44:02 +0530 Subject: [PATCH 114/120] handle tx broadcast --- universalClient/chains/common/outbound.go | 4 + .../chains/evm/outbound_tx_builder.go | 9 + .../chains/svm/outbound_tx_builder.go | 13 ++ .../tss/sessionmanager/sessionmanager.go | 155 +++++++++++++++--- 4 files changed, 159 insertions(+), 22 deletions(-) diff --git a/universalClient/chains/common/outbound.go b/universalClient/chains/common/outbound.go index a1656eaf..a1e86eab 100644 --- a/universalClient/chains/common/outbound.go +++ b/universalClient/chains/common/outbound.go @@ -54,6 +54,10 @@ type OutboundTxBuilder interface { // Returns the transaction hash. BroadcastTransaction(ctx context.Context, signedTx []byte) (string, error) + // GetTxHash extracts the transaction hash from a signed transaction. + // This can be calculated before broadcasting, so we can always store it. + GetTxHash(signedTx []byte) (string, error) + // GetChainID returns the chain identifier this builder is configured for. GetChainID() string } diff --git a/universalClient/chains/evm/outbound_tx_builder.go b/universalClient/chains/evm/outbound_tx_builder.go index 0a866af6..52753dcb 100644 --- a/universalClient/chains/evm/outbound_tx_builder.go +++ b/universalClient/chains/evm/outbound_tx_builder.go @@ -184,6 +184,15 @@ func (b *OutboundTxBuilder) BroadcastTransaction(ctx context.Context, signedTx [ return txHash, nil } +// GetTxHash extracts the transaction hash from a signed transaction. +func (b *OutboundTxBuilder) GetTxHash(signedTx []byte) (string, error) { + var tx types.Transaction + if err := rlp.DecodeBytes(signedTx, &tx); err != nil { + return "", fmt.Errorf("failed to decode signed transaction: %w", err) + } + return tx.Hash().Hex(), nil +} + // GetChainID returns the chain identifier. func (b *OutboundTxBuilder) GetChainID() string { return b.caipChainID diff --git a/universalClient/chains/svm/outbound_tx_builder.go b/universalClient/chains/svm/outbound_tx_builder.go index 09e2c698..223441cf 100644 --- a/universalClient/chains/svm/outbound_tx_builder.go +++ b/universalClient/chains/svm/outbound_tx_builder.go @@ -156,6 +156,19 @@ func (b *OutboundTxBuilder) BroadcastTransaction(ctx context.Context, signedTx [ return txHash, nil } +// GetTxHash extracts the transaction hash from a signed transaction. +// For Solana, the txHash is the signature of the transaction. +func (b *OutboundTxBuilder) GetTxHash(signedTx []byte) (string, error) { + tx, err := solana.TransactionFromDecoder(bin.NewBinDecoder(signedTx)) + if err != nil { + return "", fmt.Errorf("failed to decode signed transaction: %w", err) + } + if len(tx.Signatures) == 0 { + return "", fmt.Errorf("transaction has no signatures") + } + return tx.Signatures[0].String(), nil +} + // GetChainID returns the chain identifier. func (b *OutboundTxBuilder) GetChainID() string { return b.caipChainID diff --git a/universalClient/tss/sessionmanager/sessionmanager.go b/universalClient/tss/sessionmanager/sessionmanager.go index 395792be..9d01b2ed 100644 --- a/universalClient/tss/sessionmanager/sessionmanager.go +++ b/universalClient/tss/sessionmanager/sessionmanager.go @@ -28,6 +28,9 @@ import ( // SendFunc is a function type for sending messages to participants. type SendFunc func(ctx context.Context, peerID string, data []byte) error +// retryBlockDelay is the number of blocks to delay before retrying a failed event +const retryBlockDelay = 10 + // sessionState holds all state for a single session. type sessionState struct { session dkls.Session @@ -431,41 +434,57 @@ func (sm *SessionManager) handleSessionFinished(ctx context.Context, eventID str Msg("saved new keyshare from quorumchange with updated participants") case string(coordinator.ProtocolSign): - // TODO: Save signature to database for outbound Tx Processing sm.logger.Info(). Str("event_id", eventID). Str("signature", hex.EncodeToString(result.Signature)). Str("public_key", hex.EncodeToString(result.PublicKey)). - Msg("signature generated and verified from sign session") + Msg("signature generated from sign session") + + // Get event data for broadcasting + event, err := sm.eventStore.GetEvent(eventID) + if err != nil { + return errors.Wrapf(err, "failed to get event %s for broadcasting", eventID) + } + + // All nodes broadcast for redundancy - duplicates are handled gracefully + if err := sm.handleSigningComplete(ctx, eventID, event.EventData, result.Signature); err != nil { + // handleSigningComplete only returns errors for critical failures (e.g., GetTxHash, UpdateTxHash, UpdateStatus) + // Broadcast errors are logged but don't cause function to return error + sm.logger.Error().Err(err).Str("event_id", eventID).Msg("failed to complete signing process") + return errors.Wrapf(err, "failed to complete signing process for event %s", eventID) + } default: return errors.Errorf("unknown protocol type: %s", state.protocolType) } - // Vote on TSS key process (keygen/keyrefresh/quorumchange only) - if sm.voteHandler != nil && (state.protocolType == string(coordinator.ProtocolKeygen) || state.protocolType == string(coordinator.ProtocolKeyrefresh) || state.protocolType == string(coordinator.ProtocolQuorumChange)) { - pubKeyHex := hex.EncodeToString(result.PublicKey) - - paEventIDInt, err := strconv.ParseUint(eventID, 10, 64) - if err != nil { - return errors.Wrapf(err, "failed to parse process id from %s", eventID) - } - voteTxHash, err := sm.voteHandler.VoteTssKeyProcess(ctx, pubKeyHex, storageID, paEventIDInt) - if err != nil { - sm.logger.Warn().Err(err).Str("event_id", eventID).Msg("TSS vote failed - marking PENDING") + // Vote and mark completed for key events (keygen/keyrefresh/quorumchange) + // SIGN events are handled separately in handleSigningComplete + if state.protocolType != string(coordinator.ProtocolSign) { + if sm.voteHandler != nil { + pubKeyHex := hex.EncodeToString(result.PublicKey) - if err := sm.eventStore.UpdateStatus(eventID, eventstore.StatusPending, err.Error()); err != nil { - return errors.Wrapf(err, "failed to update event status to PENDING") + paEventIDInt, err := strconv.ParseUint(eventID, 10, 64) + if err != nil { + return errors.Wrapf(err, "failed to parse process id from %s", eventID) + } + voteTxHash, err := sm.voteHandler.VoteTssKeyProcess(ctx, pubKeyHex, storageID, paEventIDInt) + if err != nil { + // Vote failed after TSS signing - do NOT retry, let it expire naturally + // This prevents double signing since TSS signing is already complete + sm.logger.Error(). + Err(err). + Str("event_id", eventID). + Msg("TSS vote failed after signing - event will expire naturally (no retry to prevent double signing)") + // Leave event in IN_PROGRESS status - it will expire and be handled by maintenance handler + return errors.Wrapf(err, "failed to vote for key process after TSS signing") } - return nil // Event will be retried + sm.logger.Info().Str("vote_tx_hash", voteTxHash).Str("event_id", eventID).Msg("TSS vote succeeded") } - sm.logger.Info().Str("vote_tx_hash", voteTxHash).Str("event_id", eventID).Msg("TSS vote succeeded") - } - - // Update event status to SUCCESS (only reached if vote succeeded or not required) - if err := sm.eventStore.UpdateStatus(eventID, eventstore.StatusSuccess, ""); err != nil { - return errors.Wrapf(err, "failed to update event status") + if err := sm.eventStore.UpdateStatus(eventID, eventstore.StatusCompleted, ""); err != nil { + return errors.Wrapf(err, "failed to update event status") + } } sm.logger.Info().Str("event_id", eventID).Msg("session finished successfully") @@ -832,3 +851,95 @@ func (sm *SessionManager) validateGasPrice(ctx context.Context, chainID string, return nil } + +// handleSigningComplete assembles and broadcasts the signed transaction. +// All nodes call this for redundancy - duplicate broadcasts are handled gracefully by the chain. +func (sm *SessionManager) handleSigningComplete(ctx context.Context, eventID string, eventData []byte, signature []byte) error { + // Parse event data to get outbound details + var outboundData uexecutortypes.OutboundCreatedEvent + if err := json.Unmarshal(eventData, &outboundData); err != nil { + return errors.Wrap(err, "failed to parse outbound event data") + } + + if sm.txBuilderFactory == nil { + return errors.New("tx builder factory not configured") + } + + // Get builder for destination chain + builder, err := sm.txBuilderFactory.CreateBuilder(outboundData.DestinationChain) + if err != nil { + return errors.Wrapf(err, "failed to create tx builder for chain %s", outboundData.DestinationChain) + } + + // Get gas price from oracle (same as was used during signing) + gasPrice, err := sm.pushCore.GetGasPrice(ctx, outboundData.DestinationChain) + if err != nil { + return errors.Wrapf(err, "failed to get gas price for chain %s", outboundData.DestinationChain) + } + + // Build the transaction (same deterministic result as coordinator) + txResult, err := builder.BuildTransaction(ctx, &outboundData, gasPrice) + if err != nil { + return errors.Wrap(err, "failed to build transaction") + } + + sm.logger.Info(). + Str("event_id", eventID). + Str("destination_chain", outboundData.DestinationChain). + Int("signature_len", len(signature)). + Msg("assembling and broadcasting signed transaction") + + // Extract recovery ID from signature (if present, last byte) + var recoveryID byte = 0 + sigBytes := signature + if len(signature) == 65 { + recoveryID = signature[64] + sigBytes = signature[:64] + } + + // Assemble signed transaction + signedTx, err := builder.AssembleSignedTransaction(txResult.RawTx, sigBytes, recoveryID) + if err != nil { + return errors.Wrap(err, "failed to assemble signed transaction") + } + + // Calculate txHash from signed transaction (can be done before broadcasting) + txHash, err := builder.GetTxHash(signedTx) + if err != nil { + return errors.Wrap(err, "failed to get tx hash from signed transaction") + } + + // Format tx hash in CAIP format: {chainId}:{txHash} + caipTxHash := outboundData.DestinationChain + ":" + txHash + + // Always store the txHash (calculated from signed tx, independent of broadcast) + if err := sm.eventStore.UpdateTxHash(eventID, caipTxHash); err != nil { + sm.logger.Error().Err(err).Str("event_id", eventID).Msg("failed to update tx hash") + } + + // Broadcast to destination chain (errors are logged but don't prevent marking as BROADCASTED) + _, broadcastErr := builder.BroadcastTransaction(ctx, signedTx) + if broadcastErr != nil { + sm.logger.Warn(). + Err(broadcastErr). + Str("event_id", eventID). + Str("tx_hash", txHash). + Str("caip_tx_hash", caipTxHash). + Msg("broadcast failed - txHash stored, will expire automatically if not confirmed") + } else { + sm.logger.Info(). + Str("event_id", eventID). + Str("tx_hash", txHash). + Str("caip_tx_hash", caipTxHash). + Str("destination_chain", outboundData.DestinationChain). + Msg("transaction broadcasted successfully") + } + + // Mark as BROADCASTED since we have the txHash (will expire automatically if not confirmed) + if err := sm.eventStore.UpdateStatus(eventID, eventstore.StatusBroadcasted, ""); err != nil { + sm.logger.Error().Err(err).Str("event_id", eventID).Msg("failed to update event status to BROADCASTED") + return errors.Wrap(err, "failed to update event status to BROADCASTED") + } + + return nil +} From 53494aa7d2b6ac4f3a27440e51611acf5d57d917 Mon Sep 17 00:00:00 2001 From: aman035 Date: Mon, 12 Jan 2026 16:56:16 +0530 Subject: [PATCH 115/120] add: maintenance for revert, expirt and clear db --- .../tss/maintenance/maintenance.go | 301 ++++++++++++++++++ 1 file changed, 301 insertions(+) create mode 100644 universalClient/tss/maintenance/maintenance.go diff --git a/universalClient/tss/maintenance/maintenance.go b/universalClient/tss/maintenance/maintenance.go new file mode 100644 index 00000000..88ad2207 --- /dev/null +++ b/universalClient/tss/maintenance/maintenance.go @@ -0,0 +1,301 @@ +// Package maintenance handles TSS event maintenance tasks including expiry processing and database cleanup. +package maintenance + +import ( + "context" + "sync" + "time" + + "github.com/pkg/errors" + "github.com/rs/zerolog" + + "github.com/pushchain/push-chain-node/universalClient/pushcore" + "github.com/pushchain/push-chain-node/universalClient/store" + "github.com/pushchain/push-chain-node/universalClient/tss/eventstore" +) + +// OutboundVoter handles voting for outbound transaction results. +type OutboundVoter interface { + // VoteOutbound votes on an outbound transaction observation. + // isSuccess indicates whether the transaction succeeded. + // For success: txHash and blockHeight must be provided (blockHeight > 0). + // For revert: reason must be provided; txHash and blockHeight are optional (if txHash is provided, blockHeight must be > 0). + VoteOutbound(ctx context.Context, txID string, isSuccess bool, txHash string, blockHeight uint64, reason string) (string, error) +} + +// Config contains configuration for the maintenance handler. +type Config struct { + // PollInterval is how often to check for expired events (default: 30s) + PollInterval time.Duration + + // CleanupInterval is how often to clean up terminal events (default: 1h) + CleanupInterval time.Duration +} + +// DefaultConfig returns sensible defaults. +func DefaultConfig() Config { + return Config{ + PollInterval: 30 * time.Second, + CleanupInterval: 1 * time.Hour, + } +} + +// TODO: Handle BROADCASTED events completion via chain event listeners. +// Instead of polling for transaction confirmations, chain event listeners should: +// 1. Listen to gateway contract events on each chain +// 2. When a gateway event is received with enough confirmations for that chain, +// mark the corresponding BROADCASTED event as COMPLETED +// 3. Vote for outbound success/revert based on the gateway event result +// This will be implemented in the chain-specific event listeners. + +// Handler handles TSS event maintenance tasks including expiry processing and database cleanup. +type Handler struct { + eventStore *eventstore.Store + pushCore *pushcore.Client + voter OutboundVoter + config Config + logger zerolog.Logger + + mu sync.RWMutex + running bool + stopCh chan struct{} +} + +// NewHandler creates a new maintenance handler. +func NewHandler( + eventStore *eventstore.Store, + pushCore *pushcore.Client, + voter OutboundVoter, + config Config, + logger zerolog.Logger, +) *Handler { + if config.PollInterval == 0 || config.CleanupInterval == 0 { + defaultConfig := DefaultConfig() + if config.PollInterval == 0 { + config.PollInterval = defaultConfig.PollInterval + } + if config.CleanupInterval == 0 { + config.CleanupInterval = defaultConfig.CleanupInterval + } + } + return &Handler{ + eventStore: eventStore, + pushCore: pushCore, + voter: voter, + config: config, + logger: logger.With().Str("component", "tss_maintenance").Logger(), + stopCh: make(chan struct{}), + } +} + +// Start begins the maintenance handler. +func (h *Handler) Start(ctx context.Context) error { + h.mu.Lock() + if h.running { + h.mu.Unlock() + return errors.New("maintenance handler already running") + } + h.running = true + h.mu.Unlock() + + h.logger.Info(). + Dur("poll_interval", h.config.PollInterval). + Dur("cleanup_interval", h.config.CleanupInterval). + Msg("starting TSS maintenance handler") + + go h.runLoop(ctx) + return nil +} + +// Stop stops the maintenance handler. +func (h *Handler) Stop() { + h.mu.Lock() + defer h.mu.Unlock() + + if !h.running { + return + } + + close(h.stopCh) + h.running = false + h.logger.Info().Msg("TSS maintenance handler stopped") +} + +func (h *Handler) runLoop(ctx context.Context) { + expiryTicker := time.NewTicker(h.config.PollInterval) + defer expiryTicker.Stop() + + cleanupTicker := time.NewTicker(h.config.CleanupInterval) + defer cleanupTicker.Stop() + + // Run immediately on start + h.checkExpired(ctx) + h.clearTerminalEvents(ctx) + + for { + select { + case <-ctx.Done(): + return + case <-h.stopCh: + return + case <-expiryTicker.C: + h.checkExpired(ctx) + case <-cleanupTicker.C: + h.clearTerminalEvents(ctx) + } + } +} + +func (h *Handler) checkExpired(ctx context.Context) { + // Handle expired events + if err := h.handleExpiredEvents(ctx); err != nil { + h.logger.Error().Err(err).Msg("error handling expired events") + } +} + +// clearTerminalEvents clears expired, reverted, and completed events from the database. +func (h *Handler) clearTerminalEvents(ctx context.Context) { + deletedCount, err := h.eventStore.ClearTerminalEvents() + if err != nil { + h.logger.Error().Err(err).Msg("error clearing terminal events") + return + } + + if deletedCount > 0 { + h.logger.Info(). + Int64("deleted_count", deletedCount). + Msg("cleared terminal events (expired, reverted, completed) from database") + } +} + +// handleExpiredEvents finds and processes expired events. +func (h *Handler) handleExpiredEvents(ctx context.Context) error { + currentBlock, err := h.pushCore.GetLatestBlockNum() + if err != nil { + return errors.Wrap(err, "failed to get current block") + } + + // Get all expired events (PENDING, IN_PROGRESS, or BROADCASTED) + events, err := h.eventStore.GetExpiredEvents(currentBlock) + if err != nil { + return errors.Wrap(err, "failed to get expired events") + } + + if len(events) == 0 { + return nil + } + + h.logger.Info().Int("count", len(events)).Msg("processing expired events") + + for _, event := range events { + if err := h.processExpiredEvent(ctx, &event); err != nil { + h.logger.Error(). + Err(err). + Str("event_id", event.EventID). + Str("type", event.Type). + Str("status", event.Status). + Msg("failed to process expired event") + } + } + + return nil +} + +func (h *Handler) processExpiredEvent(ctx context.Context, event *store.PCEvent) error { + h.logger.Info(). + Str("event_id", event.EventID). + Str("type", event.Type). + Str("status", event.Status). + Uint64("expiry_block", event.ExpiryBlockHeight). + Msg("processing expired event") + + switch event.Type { + case "KEYGEN", "KEYREFRESH", "QUORUM_CHANGE": + // For key events, mark as EXPIRED + if err := h.eventStore.UpdateStatus(event.EventID, eventstore.StatusExpired, "expired"); err != nil { + return errors.Wrap(err, "failed to mark key event as expired") + } + h.logger.Info(). + Str("event_id", event.EventID). + Str("status", event.Status). + Msg("key event marked as expired") + + case "SIGN": + // For sign events, vote for revert on Push chain and mark as REVERTED + // For outbound events, txID is the eventID + txID := event.EventID + + // Determine reason based on current status + var reason string + var txHash string + var blockHeight uint64 + + switch event.Status { + case eventstore.StatusPending: + reason = "expired before signing completed" + // No txHash or blockHeight for pending events + case eventstore.StatusInProgress: + reason = "expired during TSS signing" + // No txHash or blockHeight for in-progress events + case eventstore.StatusBroadcasted: + reason = "expired after broadcast, no confirmations received" + // If broadcasted, we might have a txHash + if event.TxHash != "" { + // Parse CAIP format to get raw hash (chain expects simple hash, not CAIP) + var err error + _, txHash, err = parseCaipTxHash(event.TxHash) + if err != nil { + h.logger.Warn().Err(err).Str("event_id", event.EventID).Msg("failed to parse txHash, voting without it") + txHash = "" + } + } + default: + reason = "expired" + } + + if h.voter != nil { + voteTxHash, err := h.voter.VoteOutbound(ctx, txID, false, txHash, blockHeight, reason) + if err != nil { + h.logger.Error().Err(err).Str("event_id", event.EventID).Msg("failed to vote for revert") + // Still mark as reverted locally + } else { + h.logger.Info(). + Str("event_id", event.EventID). + Str("vote_tx_hash", voteTxHash). + Str("original_status", event.Status). + Msg("voted for outbound revert (expired)") + } + } + + if err := h.eventStore.UpdateStatus(event.EventID, eventstore.StatusReverted, reason); err != nil { + return errors.Wrap(err, "failed to mark sign event as reverted") + } + h.logger.Info(). + Str("event_id", event.EventID). + Str("original_status", event.Status). + Msg("sign event marked as reverted (expired)") + + default: + h.logger.Warn().Str("event_id", event.EventID).Str("type", event.Type).Msg("unknown event type for expiry handling") + } + + return nil +} + +// parseCaipTxHash parses a CAIP format tx hash: {chainId}:{txHash} +func parseCaipTxHash(caipTxHash string) (chainID, txHash string, err error) { + // Find the last colon (chainID can contain colons, e.g., "eip155:11155111") + lastColon := -1 + for i := len(caipTxHash) - 1; i >= 0; i-- { + if caipTxHash[i] == ':' { + lastColon = i + break + } + } + + if lastColon == -1 || lastColon == 0 || lastColon == len(caipTxHash)-1 { + return "", "", errors.Errorf("invalid CAIP tx hash format: %s", caipTxHash) + } + + return caipTxHash[:lastColon], caipTxHash[lastColon+1:], nil +} From 6c9f5f20ecd78efc76bc2d8cffcd654db4779d3d Mon Sep 17 00:00:00 2001 From: aman035 Date: Tue, 13 Jan 2026 18:35:20 +0530 Subject: [PATCH 116/120] refactor: api remove unnecessary handler --- universalClient/api/handlers.go | 22 +-- universalClient/api/handlers_test.go | 45 ----- universalClient/api/routes.go | 3 - universalClient/api/routes_test.go | 19 +-- universalClient/api/server.go | 6 +- universalClient/api/server_test.go | 246 +-------------------------- universalClient/api/types.go | 17 -- 7 files changed, 15 insertions(+), 343 deletions(-) delete mode 100644 universalClient/api/types.go diff --git a/universalClient/api/handlers.go b/universalClient/api/handlers.go index c1245742..7a594e62 100644 --- a/universalClient/api/handlers.go +++ b/universalClient/api/handlers.go @@ -1,29 +1,9 @@ package api -import ( - "encoding/json" - "net/http" -) +import "net/http" // handleHealth handles GET /health func (s *Server) handleHealth(w http.ResponseWriter, r *http.Request) { w.WriteHeader(http.StatusOK) w.Write([]byte("OK")) } - -// handleChainConfigs handles GET /api/v1/chain-configs -func (s *Server) handleChainData(w http.ResponseWriter, r *http.Request) { - if r.Method != http.MethodGet { - http.Error(w, "Method not allowed", http.StatusMethodNotAllowed) - return - } - - configs := s.client.GetAllChainData() - - response := queryResponse{ - Data: configs, - } - - w.Header().Set("Content-Type", "application/json") - json.NewEncoder(w).Encode(response) -} diff --git a/universalClient/api/handlers_test.go b/universalClient/api/handlers_test.go index 1af7d642..197c0cb0 100644 --- a/universalClient/api/handlers_test.go +++ b/universalClient/api/handlers_test.go @@ -1,21 +1,17 @@ package api import ( - "encoding/json" "net/http" "net/http/httptest" "testing" "github.com/rs/zerolog" "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" ) func TestHandleHealth(t *testing.T) { logger := zerolog.New(zerolog.NewTestWriter(t)) - mockClient := NewMockUniversalClient() server := &Server{ - client: mockClient, logger: logger, } @@ -29,44 +25,3 @@ func TestHandleHealth(t *testing.T) { assert.Equal(t, "OK", w.Body.String()) }) } - -func TestHandleChainData(t *testing.T) { - logger := zerolog.New(zerolog.NewTestWriter(t)) - mockClient := NewMockUniversalClient() - server := &Server{ - client: mockClient, - logger: logger, - } - - t.Run("GET chain data success", func(t *testing.T) { - req := httptest.NewRequest(http.MethodGet, "/api/v1/chain-data", nil) - w := httptest.NewRecorder() - - server.handleChainData(w, req) - - assert.Equal(t, http.StatusOK, w.Code) - assert.Equal(t, "application/json", w.Header().Get("Content-Type")) - - var response map[string]interface{} - err := json.Unmarshal(w.Body.Bytes(), &response) - require.NoError(t, err) - - // Check that we have data field - assert.Contains(t, response, "data") - - // Verify the data is an array - data, ok := response["data"].([]interface{}) - assert.True(t, ok) - assert.Len(t, data, 2) - }) - - t.Run("Non-GET method not allowed", func(t *testing.T) { - req := httptest.NewRequest(http.MethodPost, "/api/v1/chain-data", nil) - w := httptest.NewRecorder() - - server.handleChainData(w, req) - - assert.Equal(t, http.StatusMethodNotAllowed, w.Code) - assert.Contains(t, w.Body.String(), "Method not allowed") - }) -} \ No newline at end of file diff --git a/universalClient/api/routes.go b/universalClient/api/routes.go index ac636621..75e9ffa7 100644 --- a/universalClient/api/routes.go +++ b/universalClient/api/routes.go @@ -9,8 +9,5 @@ func (s *Server) setupRoutes() *http.ServeMux { // Health check endpoint mux.HandleFunc("/health", s.handleHealth) - // API v1 endpoints - mux.HandleFunc("/api/v1/chain-configs", s.handleChainData) - return mux } diff --git a/universalClient/api/routes_test.go b/universalClient/api/routes_test.go index f644a265..63a4e2e1 100644 --- a/universalClient/api/routes_test.go +++ b/universalClient/api/routes_test.go @@ -11,14 +11,12 @@ import ( func TestSetupRoutes(t *testing.T) { logger := zerolog.New(zerolog.NewTestWriter(t)) - mockClient := NewMockUniversalClient() server := &Server{ - client: mockClient, logger: logger, } - + mux := server.setupRoutes() - + // Test that all routes are registered correctly testCases := []struct { name string @@ -30,26 +28,21 @@ func TestSetupRoutes(t *testing.T) { path: "/health", expectedStatus: http.StatusOK, }, - { - name: "Chain configs endpoint", - path: "/api/v1/chain-configs", - expectedStatus: http.StatusOK, - }, { name: "Non-existent endpoint", path: "/api/v1/non-existent", expectedStatus: http.StatusNotFound, }, } - + for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { req := httptest.NewRequest(http.MethodGet, tc.path, nil) w := httptest.NewRecorder() - + mux.ServeHTTP(w, req) - + assert.Equal(t, tc.expectedStatus, w.Code) }) } -} \ No newline at end of file +} diff --git a/universalClient/api/server.go b/universalClient/api/server.go index f358ec52..a98a496c 100644 --- a/universalClient/api/server.go +++ b/universalClient/api/server.go @@ -9,17 +9,15 @@ import ( "github.com/rs/zerolog" ) -// Server provides HTTP endpoints for querying configuration data +// Server provides HTTP endpoints type Server struct { - client universalClientInterface logger zerolog.Logger server *http.Server } // NewServer creates a new Server instance -func NewServer(client universalClientInterface, logger zerolog.Logger, port int) *Server { +func NewServer(logger zerolog.Logger, port int) *Server { s := &Server{ - client: client, logger: logger, } diff --git a/universalClient/api/server_test.go b/universalClient/api/server_test.go index b95f5214..65c44b0b 100644 --- a/universalClient/api/server_test.go +++ b/universalClient/api/server_test.go @@ -1,8 +1,6 @@ package api import ( - "encoding/json" - "io" "net/http" "net/http/httptest" "testing" @@ -11,137 +9,21 @@ import ( "github.com/rs/zerolog" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - - "github.com/pushchain/push-chain-node/universalClient/cache" - uregistrytypes "github.com/pushchain/push-chain-node/x/uregistry/types" ) -// MockUniversalClient implements UniversalClientInterface for testing -type MockUniversalClient struct { - chainConfigs []*uregistrytypes.ChainConfig - tokenConfigs []*uregistrytypes.TokenConfig - lastUpdate time.Time - forceUpdateErr error - forceUpdateCalled bool -} - -func NewMockUniversalClient() *MockUniversalClient { - enabled := &uregistrytypes.ChainEnabled{ - IsInboundEnabled: true, - IsOutboundEnabled: true, - } - return &MockUniversalClient{ - chainConfigs: []*uregistrytypes.ChainConfig{ - { - Chain: "eip155:1", - VmType: uregistrytypes.VmType_EVM, - GatewayAddress: "0x123", - Enabled: enabled, - }, - { - Chain: "solana:mainnet", - VmType: uregistrytypes.VmType_SVM, - GatewayAddress: "11111111111111111111111111111111", - Enabled: enabled, - }, - }, - tokenConfigs: []*uregistrytypes.TokenConfig{ - { - Chain: "eip155:1", - Address: "0xAAA", - Symbol: "USDT", - Decimals: 6, - }, - { - Chain: "eip155:1", - Address: "0xBBB", - Symbol: "USDC", - Decimals: 6, - }, - { - Chain: "solana:mainnet", - Address: "So11111111111111111111111111111111111111112", - Symbol: "SOL", - Decimals: 9, - }, - }, - lastUpdate: time.Now(), - } -} - -func (m *MockUniversalClient) GetAllChainConfigs() []*uregistrytypes.ChainConfig { - return m.chainConfigs -} - -func (m *MockUniversalClient) GetAllTokenConfigs() []*uregistrytypes.TokenConfig { - return m.tokenConfigs -} - -func (m *MockUniversalClient) GetTokenConfigsByChain(chain string) []*uregistrytypes.TokenConfig { - configs := []*uregistrytypes.TokenConfig{} - for _, tc := range m.tokenConfigs { - if tc.Chain == chain { - configs = append(configs, tc) - } - } - return configs -} - -func (m *MockUniversalClient) GetTokenConfig(chain, address string) *uregistrytypes.TokenConfig { - for _, tc := range m.tokenConfigs { - if tc.Chain == chain && tc.Address == address { - return tc - } - } - return nil -} - -func (m *MockUniversalClient) GetCacheLastUpdate() time.Time { - return m.lastUpdate -} - -func (m *MockUniversalClient) GetChainConfig(chain string) *uregistrytypes.ChainConfig { - for _, cfg := range m.chainConfigs { - if cfg.Chain == chain { - return cfg - } - } - return nil -} - -func (m *MockUniversalClient) ForceConfigUpdate() error { - m.forceUpdateCalled = true - return m.forceUpdateErr -} - -// GetAllChainData implements universalClientInterface -func (m *MockUniversalClient) GetAllChainData() []*cache.ChainData { - // Convert chainConfigs to ChainData format - data := make([]*cache.ChainData, len(m.chainConfigs)) - for i, cfg := range m.chainConfigs { - data[i] = &cache.ChainData{ - Config: cfg, - UpdatedAt: m.lastUpdate, - } - } - return data -} - func TestNewServer(t *testing.T) { logger := zerolog.New(zerolog.NewTestWriter(t)) - mockClient := NewMockUniversalClient() t.Run("Create server with valid config", func(t *testing.T) { - server := NewServer(mockClient, logger, 8080) + server := NewServer(logger, 8080) assert.NotNil(t, server) - assert.Equal(t, mockClient, server.client) assert.NotNil(t, server.server) assert.Equal(t, ":8080", server.server.Addr) }) t.Run("Create server with different port", func(t *testing.T) { - server := NewServer(mockClient, logger, 9090) + server := NewServer(logger, 9090) assert.NotNil(t, server) assert.Equal(t, ":9090", server.server.Addr) @@ -150,11 +32,10 @@ func TestNewServer(t *testing.T) { func TestServerStartStop(t *testing.T) { logger := zerolog.New(zerolog.NewTestWriter(t)) - mockClient := NewMockUniversalClient() t.Run("Start and stop server", func(t *testing.T) { // Use a random port to avoid conflicts - server := NewServer(mockClient, logger, 0) + server := NewServer(logger, 0) // Start server err := server.Start() @@ -163,17 +44,13 @@ func TestServerStartStop(t *testing.T) { // Give server time to start time.Sleep(200 * time.Millisecond) - // Verify server is running by making a health check request - // Note: We're using port 0, so we can't easily test the actual HTTP endpoint - // In a real test, we'd get the actual port from the listener - // Stop server err = server.Stop() assert.NoError(t, err) }) + t.Run("Start with nil server", func(t *testing.T) { server := &Server{ - client: mockClient, logger: logger, server: nil, } @@ -181,9 +58,9 @@ func TestServerStartStop(t *testing.T) { assert.Error(t, err) assert.Contains(t, err.Error(), "query server is nil") }) + t.Run("Stop with nil server", func(t *testing.T) { server := &Server{ - client: mockClient, logger: logger, server: nil, } @@ -194,11 +71,10 @@ func TestServerStartStop(t *testing.T) { func TestServerIntegration(t *testing.T) { logger := zerolog.New(zerolog.NewTestWriter(t)) - mockClient := NewMockUniversalClient() t.Run("Server lifecycle with HTTP client", func(t *testing.T) { // Create server on a specific port - server := NewServer(mockClient, logger, 18080) + server := NewServer(logger, 18080) // Start server err := server.Start() @@ -220,9 +96,7 @@ func TestServerIntegration(t *testing.T) { // Test handler functions directly using httptest func TestHealthHandler(t *testing.T) { logger := zerolog.New(zerolog.NewTestWriter(t)) - mockClient := NewMockUniversalClient() server := &Server{ - client: mockClient, logger: logger, } @@ -239,111 +113,3 @@ func TestHealthHandler(t *testing.T) { assert.Equal(t, "OK", w.Body.String()) }) } - -// TestGetAllChainConfigsHandler removed - handler doesn't exist - -// TestGetAllTokenConfigsHandler removed - handler doesn't exist - -func TestInvalidMethods(t *testing.T) { - logger := zerolog.New(zerolog.NewTestWriter(t)) - mockClient := NewMockUniversalClient() - server := &Server{ - client: mockClient, - logger: logger, - } - - tests := []struct { - name string - handler http.HandlerFunc - method string - expectedMsg string - }{ - { - name: "POST to health check", - handler: http.HandlerFunc(server.handleHealth), - method: http.MethodPost, - expectedMsg: "method not allowed", - }, - { - name: "DELETE to chain data", - handler: http.HandlerFunc(server.handleChainData), - method: http.MethodDelete, - expectedMsg: "method not allowed", - }, - } - - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - req := httptest.NewRequest(tt.method, "/test", nil) - w := httptest.NewRecorder() - - tt.handler(w, req) - - // Most handlers should return 405 for wrong methods - // but implementation may vary - body, _ := io.ReadAll(w.Body) - t.Logf("Response: %d - %s", w.Code, string(body)) - }) - } -} - -// Table-driven tests for various scenarios -func TestAPIEndpointsTable(t *testing.T) { - logger := zerolog.New(zerolog.NewTestWriter(t)) - mockClient := NewMockUniversalClient() - server := &Server{ - client: mockClient, - logger: logger, - } - - tests := []struct { - name string - handler http.HandlerFunc - method string - url string - wantStatus int - checkBody func(t *testing.T, body []byte) - }{ - { - name: "health check", - handler: http.HandlerFunc(server.handleHealth), - method: http.MethodGet, - url: "/health", - wantStatus: http.StatusOK, - checkBody: func(t *testing.T, body []byte) { - // handleHealth returns plain "OK" - assert.Equal(t, "OK", string(body)) - }, - }, - { - name: "chain data", - handler: http.HandlerFunc(server.handleChainData), - method: http.MethodGet, - url: "/api/v1/chain-data", - wantStatus: http.StatusOK, - checkBody: func(t *testing.T, body []byte) { - var resp map[string]interface{} - err := json.Unmarshal(body, &resp) - require.NoError(t, err) - assert.Contains(t, resp, "data") - data, ok := resp["data"].([]interface{}) - require.True(t, ok) - assert.Len(t, data, 2) - }, - }, - } - - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - req := httptest.NewRequest(tt.method, tt.url, nil) - w := httptest.NewRecorder() - - tt.handler(w, req) - - assert.Equal(t, tt.wantStatus, w.Code) - if tt.checkBody != nil { - tt.checkBody(t, w.Body.Bytes()) - } - }) - } -} diff --git a/universalClient/api/types.go b/universalClient/api/types.go deleted file mode 100644 index 86b26fa1..00000000 --- a/universalClient/api/types.go +++ /dev/null @@ -1,17 +0,0 @@ -package api - -import "github.com/pushchain/push-chain-node/universalClient/cache" - -type universalClientInterface interface { - GetAllChainData() []*cache.ChainData -} - -// QueryResponse represents the standard query response format -type queryResponse struct { - Data interface{} `json:"data"` -} - -// ErrorResponse represents an error response -type errorResponse struct { - Error string `json:"error"` -} From fc48e17e76f60635d2e74c738a43ce3004cbaf74 Mon Sep 17 00:00:00 2001 From: aman035 Date: Tue, 13 Jan 2026 20:03:08 +0530 Subject: [PATCH 117/120] refactor: pushcore functions --- universalClient/core/client.go | 4 +- universalClient/core/startup_validator.go | 132 ++- universalClient/pushcore/pushCore.go | 731 ++++++-------- universalClient/pushcore/pushCore_test.go | 954 ++++++++++-------- .../tss/coordinator/coordinator.go | 37 +- .../tss/coordinator/coordinator_test.go | 37 +- .../tss/maintenance/maintenance.go | 2 +- .../tss/sessionmanager/sessionmanager.go | 6 +- 8 files changed, 1059 insertions(+), 844 deletions(-) diff --git a/universalClient/core/client.go b/universalClient/core/client.go index 0d827d92..b3a8af98 100644 --- a/universalClient/core/client.go +++ b/universalClient/core/client.go @@ -140,7 +140,7 @@ func NewUniversalClient(ctx context.Context, log zerolog.Logger, dbManager *db.C ctx, log, cfg, - cfg.PushChainGRPCURLs[0], + pushCore, ) validationResult, err := startupValidator.ValidateStartupRequirements() @@ -209,7 +209,7 @@ func NewUniversalClient(ctx context.Context, log zerolog.Logger, dbManager *db.C // Create query server log.Info().Int("port", cfg.QueryServerPort).Msg("Creating query server") - uc.queryServer = api.NewServer(uc, log, cfg.QueryServerPort) + uc.queryServer = api.NewServer(log, cfg.QueryServerPort) return uc, nil } diff --git a/universalClient/core/startup_validator.go b/universalClient/core/startup_validator.go index 0f3ebe31..41d51f14 100644 --- a/universalClient/core/startup_validator.go +++ b/universalClient/core/startup_validator.go @@ -3,8 +3,10 @@ package core import ( "context" "fmt" + "time" "github.com/cosmos/cosmos-sdk/codec" + codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/crypto/keyring" "github.com/cosmos/cosmos-sdk/x/authz" "github.com/pushchain/push-chain-node/universalClient/config" @@ -24,12 +26,19 @@ type StartupValidationResult struct { Messages []string // List of authorized message types } +// GrantInfo represents information about a single AuthZ grant. +type GrantInfo struct { + Granter string // Address of the granter + MessageType string // Authorized message type + Expiration *time.Time // Grant expiration time (nil if no expiration) +} + // StartupValidator validates startup requirements type StartupValidator struct { - log zerolog.Logger - config *config.Config - grpcURL string - cdc *codec.ProtoCodec // Cached codec + log zerolog.Logger + config *config.Config + pushCore *pushcore.Client + cdc *codec.ProtoCodec // Cached codec } // NewStartupValidator creates a new startup validator @@ -37,7 +46,7 @@ func NewStartupValidator( ctx context.Context, log zerolog.Logger, config *config.Config, - grpcURL string, + pushCore *pushcore.Client, ) *StartupValidator { // Create codec once and cache it interfaceRegistry := keys.CreateInterfaceRegistryWithEVMSupport() @@ -45,10 +54,10 @@ func NewStartupValidator( uetypes.RegisterInterfaces(interfaceRegistry) return &StartupValidator{ - log: log.With().Str("component", "startup_validator").Logger(), - config: config, - grpcURL: grpcURL, - cdc: codec.NewProtoCodec(interfaceRegistry), + log: log.With().Str("component", "startup_validator").Logger(), + config: config, + pushCore: pushCore, + cdc: codec.NewProtoCodec(interfaceRegistry), } } @@ -84,8 +93,21 @@ func (sv *StartupValidator) ValidateStartupRequirements() (*StartupValidationRes Str("key_address", keyAddr.String()). Msg("Using hotkey from keyring") - // Validate AuthZ permissions using the pushcore package - granter, authorizedMsgs, err := pushcore.QueryGrantsWithRetry(sv.grpcURL, keyAddr.String(), sv.cdc, sv.log) + // Query AuthZ grants using pushcore (returns raw response) + grantResp, err := sv.pushCore.GetGranteeGrants(keyAddr.String()) + if err != nil { + return nil, fmt.Errorf("failed to query AuthZ grants: %w", err) + } + + // Extract grant information from the raw response + grants := extractGrantInfo(grantResp, sv.cdc) + + if len(grants) == 0 { + return nil, fmt.Errorf("no AuthZ grants found. Please grant permissions:\npuniversald tx authz grant %s generic --msg-type=/uexecutor.v1.MsgVoteInbound --from ", keyAddr.String()) + } + + // Validate that all required message types are authorized + granter, authorizedMsgs, err := sv.validateGrants(grants, keyAddr.String()) if err != nil { return nil, fmt.Errorf("AuthZ validation failed: %w", err) } @@ -104,3 +126,91 @@ func (sv *StartupValidator) ValidateStartupRequirements() (*StartupValidationRes }, nil } +// validateGrants validates that all required message types are present in the grants. +// It filters out expired grants and checks that all required messages are authorized. +func (sv *StartupValidator) validateGrants(grants []GrantInfo, granteeAddr string) (string, []string, error) { + now := time.Now() + authorizedMessages := make(map[string]string) // msgType -> granter + var granter string + + // Process grants and filter out expired ones + for _, grant := range grants { + // Skip expired grants + if grant.Expiration != nil && grant.Expiration.Before(now) { + continue + } + + // Check if this is a required message + for _, requiredMsg := range constant.SupportedMessages { + if grant.MessageType == requiredMsg { + authorizedMessages[grant.MessageType] = grant.Granter + if granter == "" { + granter = grant.Granter + } + break + } + } + } + + // Check if all required messages are authorized + var missingMessages []string + for _, requiredMsg := range constant.SupportedMessages { + if _, ok := authorizedMessages[requiredMsg]; !ok { + missingMessages = append(missingMessages, requiredMsg) + } + } + + if len(missingMessages) > 0 { + return "", nil, fmt.Errorf("missing AuthZ grants for: %v\nGrant permissions using:\npuniversald tx authz grant %s generic --msg-type= --from ", missingMessages, granteeAddr) + } + + // Return authorized messages + authorizedList := make([]string, 0, len(authorizedMessages)) + for msgType := range authorizedMessages { + authorizedList = append(authorizedList, msgType) + } + + return granter, authorizedList, nil +} + +// extractGrantInfo extracts grant information from the AuthZ grant response. +// It only processes GenericAuthorization grants and returns their message types. +func extractGrantInfo(grantResp *authz.QueryGranteeGrantsResponse, cdc *codec.ProtoCodec) []GrantInfo { + var grants []GrantInfo + + for _, grant := range grantResp.Grants { + if grant.Authorization == nil { + continue + } + + // Only process GenericAuthorization + if grant.Authorization.TypeUrl != "/cosmos.authz.v1beta1.GenericAuthorization" { + continue + } + + msgType, err := extractMessageType(grant.Authorization, cdc) + if err != nil { + continue // Skip if we can't extract the message type + } + + // grant.Expiration is already *time.Time, so we can use it directly + expiration := grant.Expiration + + grants = append(grants, GrantInfo{ + Granter: grant.Granter, + MessageType: msgType, + Expiration: expiration, + }) + } + + return grants +} + +// extractMessageType extracts the message type from a GenericAuthorization protobuf Any. +func extractMessageType(authzAny *codectypes.Any, cdc *codec.ProtoCodec) (string, error) { + var genericAuth authz.GenericAuthorization + if err := cdc.Unmarshal(authzAny.Value, &genericAuth); err != nil { + return "", err + } + return genericAuth.Msg, nil +} diff --git a/universalClient/pushcore/pushCore.go b/universalClient/pushcore/pushCore.go index e53dc9da..e7985195 100644 --- a/universalClient/pushcore/pushCore.go +++ b/universalClient/pushcore/pushCore.go @@ -1,3 +1,6 @@ +// Package pushcore provides a client for interacting with Push Chain gRPC endpoints. +// It implements a fan-out pattern that tries multiple endpoints in round-robin order +// to provide high availability and fault tolerance. package pushcore import ( @@ -8,15 +11,11 @@ import ( "net/url" "strings" "sync/atomic" - "time" cmtservice "github.com/cosmos/cosmos-sdk/client/grpc/cmtservice" - "github.com/cosmos/cosmos-sdk/codec" - codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/types/query" "github.com/cosmos/cosmos-sdk/types/tx" "github.com/cosmos/cosmos-sdk/x/authz" - "github.com/pushchain/push-chain-node/universalClient/constant" uexecutortypes "github.com/pushchain/push-chain-node/x/uexecutor/types" uregistrytypes "github.com/pushchain/push-chain-node/x/uregistry/types" utsstypes "github.com/pushchain/push-chain-node/x/utss/types" @@ -27,23 +26,38 @@ import ( "google.golang.org/grpc/credentials/insecure" ) -// Client is a minimal fan-out client over multiple gRPC endpoints. -// Each call tries endpoints in round-robin order and returns the first success. +// Client is a fan-out client that connects to multiple Push Chain gRPC endpoints. +// It implements round-robin failover, trying each endpoint in sequence until one succeeds. type Client struct { - logger zerolog.Logger - eps []uregistrytypes.QueryClient - uvalidatorClients []uvalidatortypes.QueryClient - utssClients []utsstypes.QueryClient - uexecutorClients []uexecutortypes.QueryClient // for gas price queries - cmtClients []cmtservice.ServiceClient - txClients []tx.ServiceClient // for querying transactions by events - conns []*grpc.ClientConn // owned connections for Close() - rr uint32 // round-robin counter + logger zerolog.Logger // Logger for client operations + eps []uregistrytypes.QueryClient // Registry query clients + uvalidatorClients []uvalidatortypes.QueryClient // Universal validator query clients + utssClients []utsstypes.QueryClient // TSS query clients + uexecutorClients []uexecutortypes.QueryClient // Executor query clients (for gas price queries) + cmtClients []cmtservice.ServiceClient // CometBFT service clients + txClients []tx.ServiceClient // Transaction service clients + conns []*grpc.ClientConn // Owned gRPC connections (for cleanup) + rr uint32 // Round-robin counter for endpoint selection } -// New dials the provided gRPC URLs (best-effort) and builds a Client. -// - Uses insecure transport by default. -// - Skips endpoints that fail to dial; requires at least one success. +// TxResult represents a transaction result with its associated events and metadata. +type TxResult struct { + TxHash string // Transaction hash + Height int64 // Block height where the transaction was included + TxResponse *tx.GetTxResponse // Full transaction response from the chain +} + +// New creates a new Client by dialing the provided gRPC URLs. +// It attempts to connect to all endpoints and skips any that fail to dial. +// At least one endpoint must succeed, otherwise an error is returned. +// +// Parameters: +// - urls: List of gRPC endpoint URLs (schemes are automatically detected) +// - logger: Logger instance for client operations +// +// Returns: +// - *Client: A configured client instance, or nil on error +// - error: Error if all endpoints fail to connect func New(urls []string, logger zerolog.Logger) (*Client, error) { if len(urls) == 0 { return nil, errors.New("pushcore: at least one gRPC URL is required") @@ -78,7 +92,8 @@ func New(urls []string, logger zerolog.Logger) (*Client, error) { return c, nil } -// Close closes all owned connections. +// Close gracefully closes all gRPC connections owned by the client. +// Returns the first error encountered, if any. func (c *Client) Close() error { var firstErr error for _, conn := range c.conns { @@ -96,44 +111,307 @@ func (c *Client) Close() error { return firstErr } -// GetAllChainConfigs tries each endpoint once in round-robin order. -// If all endpoints fail, returns the last error. -func (c *Client) GetAllChainConfigs(ctx context.Context) ([]*uregistrytypes.ChainConfig, error) { - if len(c.eps) == 0 { - return nil, errors.New("pushcore: no endpoints configured") - } - - start := int(atomic.AddUint32(&c.rr, 1)-1) % len(c.eps) +// retryWithRoundRobin executes a function across multiple endpoints in round-robin order. +// It tries each endpoint until one succeeds or all fail. +// +// Parameters: +// - numClients: Number of client endpoints available +// - rrCounter: Pointer to round-robin counter (atomic) +// - operation: Function to execute for each attempt, receives the endpoint index +// - operationName: Name of the operation (for logging and error messages) +// - logger: Logger for debug messages +// +// Returns: +// - T: Result from the operation if successful +// - error: Error if all endpoints fail +func retryWithRoundRobin[T any]( + numClients int, + rrCounter *uint32, + operation func(idx int) (T, error), + operationName string, + logger zerolog.Logger, +) (T, error) { + var zero T + if numClients == 0 { + return zero, errors.New("pushcore: no endpoints configured") + } + + start := int(atomic.AddUint32(rrCounter, 1)-1) % numClients var lastErr error - for i := 0; i < len(c.eps); i++ { - idx := (start + i) % len(c.eps) - qc := c.eps[idx] + for i := 0; i < numClients; i++ { + idx := (start + i) % numClients - resp, err := qc.AllChainConfigs(ctx, &uregistrytypes.QueryAllChainConfigsRequest{}) + result, err := operation(idx) if err == nil { - return resp.Configs, nil + return result, nil } lastErr = err - c.logger.Debug(). + logger.Debug(). Int("attempt", i+1). Int("endpoint_index", idx). Err(err). - Msg("GetAllChainConfigs failed; trying next endpoint") + Msgf("%s failed; trying next endpoint", operationName) } - return nil, fmt.Errorf("pushcore: GetAllChainConfigs failed on all %d endpoints: %w", len(c.eps), lastErr) + return zero, fmt.Errorf("pushcore: %s failed on all %d endpoints: %w", operationName, numClients, lastErr) +} + +// GetAllChainConfigs retrieves all chain configurations from Push Chain. +// It tries each endpoint in round-robin order until one succeeds. +// +// Parameters: +// - ctx: Context for the request +// +// Returns: +// - []*uregistrytypes.ChainConfig: List of chain configurations +// - error: Error if all endpoints fail +func (c *Client) GetAllChainConfigs(ctx context.Context) ([]*uregistrytypes.ChainConfig, error) { + return retryWithRoundRobin( + len(c.eps), + &c.rr, + func(idx int) ([]*uregistrytypes.ChainConfig, error) { + resp, err := c.eps[idx].AllChainConfigs(ctx, &uregistrytypes.QueryAllChainConfigsRequest{}) + if err != nil { + return nil, err + } + return resp.Configs, nil + }, + "GetAllChainConfigs", + c.logger, + ) +} + +// GetLatestBlock retrieves the latest block from Push Chain. +// It tries each endpoint in round-robin order until one succeeds. +// +// Returns: +// - uint64: Latest block height +// - error: Error if all endpoints fail +func (c *Client) GetLatestBlock() (uint64, error) { + return retryWithRoundRobin( + len(c.cmtClients), + &c.rr, + func(idx int) (uint64, error) { + resp, err := c.cmtClients[idx].GetLatestBlock(context.Background(), &cmtservice.GetLatestBlockRequest{}) + if err != nil { + return 0, err + } + if resp.SdkBlock == nil { + return 0, errors.New("pushcore: SdkBlock is nil") + } + return uint64(resp.SdkBlock.Header.Height), nil + }, + "GetLatestBlock", + c.logger, + ) +} + +// GetAllUniversalValidators retrieves all universal validators from Push Chain. +// It tries each endpoint in round-robin order until one succeeds. +// +// Returns: +// - []*uvalidatortypes.UniversalValidator: List of universal validators +// - error: Error if all endpoints fail +func (c *Client) GetAllUniversalValidators() ([]*uvalidatortypes.UniversalValidator, error) { + return retryWithRoundRobin( + len(c.uvalidatorClients), + &c.rr, + func(idx int) ([]*uvalidatortypes.UniversalValidator, error) { + resp, err := c.uvalidatorClients[idx].AllUniversalValidators(context.Background(), &uvalidatortypes.QueryUniversalValidatorsSetRequest{}) + if err != nil { + return nil, err + } + return resp.UniversalValidator, nil + }, + "GetAllUniversalValidators", + c.logger, + ) +} + +// GetCurrentKey retrieves the current TSS key from Push Chain. +// It tries each endpoint in round-robin order until one succeeds. +// +// Returns: +// - *utsstypes.TssKey: TSS key +// - error: Error if all endpoints fail or no key exists +func (c *Client) GetCurrentKey() (*utsstypes.TssKey, error) { + return retryWithRoundRobin( + len(c.utssClients), + &c.rr, + func(idx int) (*utsstypes.TssKey, error) { + resp, err := c.utssClients[idx].CurrentKey(context.Background(), &utsstypes.QueryCurrentKeyRequest{}) + if err != nil { + return nil, err + } + if resp.Key == nil { + return nil, errors.New("pushcore: no TSS key found") + } + return resp.Key, nil + }, + "GetCurrentKey", + c.logger, + ) +} + +// GetTxsByEvents queries transactions matching the given event query. +// The query should follow Cosmos SDK event query format, e.g., "tss_process_initiated.process_id EXISTS". +// +// Parameters: +// - eventQuery: Cosmos SDK event query string +// - minHeight: Minimum block height to search (0 means no minimum) +// - maxHeight: Maximum block height to search (0 means no maximum) +// - limit: Maximum number of results to return (0 defaults to 100) +// +// Returns: +// - []*TxResult: List of matching transaction results +// - error: Error if all endpoints fail +func (c *Client) GetTxsByEvents(eventQuery string, minHeight, maxHeight uint64, limit uint64) ([]*TxResult, error) { + // Build the query events (same for all attempts) + events := []string{eventQuery} + if minHeight > 0 { + events = append(events, fmt.Sprintf("tx.height>=%d", minHeight)) + } + if maxHeight > 0 { + events = append(events, fmt.Sprintf("tx.height<=%d", maxHeight)) + } + + // Set pagination limit + pageLimit := limit + if pageLimit == 0 { + pageLimit = 100 // default limit + } + + // Join events with AND to create query string (SDK v0.50+ uses Query field) + queryString := strings.Join(events, " AND ") + + return retryWithRoundRobin( + len(c.txClients), + &c.rr, + func(idx int) ([]*TxResult, error) { + req := &tx.GetTxsEventRequest{ + Query: queryString, + Pagination: &query.PageRequest{ + Limit: pageLimit, + }, + OrderBy: tx.OrderBy_ORDER_BY_ASC, + } + + resp, err := c.txClients[idx].GetTxsEvent(context.Background(), req) + if err != nil { + return nil, err + } + + results := make([]*TxResult, 0, len(resp.TxResponses)) + for _, txResp := range resp.TxResponses { + results = append(results, &TxResult{ + TxHash: txResp.TxHash, + Height: txResp.Height, + TxResponse: &tx.GetTxResponse{ + Tx: resp.Txs[len(results)], + TxResponse: txResp, + }, + }) + } + return results, nil + }, + "GetTxsByEvents", + c.logger, + ) +} + +// GetGasPrice retrieves the median gas price for a specific chain from the on-chain oracle. +// The gas price is voted on by universal validators and stored on-chain. +// +// Parameters: +// - ctx: Context for the request +// - chainID: Chain identifier in CAIP-2 format (e.g., "eip155:84532" for Base Sepolia) +// +// Returns: +// - *big.Int: Median gas price in the chain's native unit (Wei for EVM chains, lamports for Solana) +// - error: Error if all endpoints fail or chainID is invalid +func (c *Client) GetGasPrice(ctx context.Context, chainID string) (*big.Int, error) { + if chainID == "" { + return nil, errors.New("pushcore: chainID is required") + } + + return retryWithRoundRobin( + len(c.uexecutorClients), + &c.rr, + func(idx int) (*big.Int, error) { + resp, err := c.uexecutorClients[idx].GasPrice(ctx, &uexecutortypes.QueryGasPriceRequest{ + ChainId: chainID, + }) + if err != nil { + return nil, err + } + if resp.GasPrice == nil { + return nil, errors.New("pushcore: GasPrice response is nil") + } + + // Get the median price using MedianIndex + if len(resp.GasPrice.Prices) == 0 { + return nil, fmt.Errorf("pushcore: no gas prices available for chain %s", chainID) + } + + medianIdx := resp.GasPrice.MedianIndex + if medianIdx >= uint64(len(resp.GasPrice.Prices)) { + // Fallback to first price if median index is out of bounds + medianIdx = 0 + } + + medianPrice := resp.GasPrice.Prices[medianIdx] + return new(big.Int).SetUint64(medianPrice), nil + }, + "GetGasPrice", + c.logger, + ) +} + +// GetGranteeGrants queries AuthZ grants for a grantee using round-robin logic. +// This function only queries and returns raw grant data; it does not perform validation or processing. +// +// Parameters: +// - granteeAddr: Address of the grantee to query grants for +// +// Returns: +// - *authz.QueryGranteeGrantsResponse: Raw grant response from the chain +// - error: Error if all endpoints fail +func (c *Client) GetGranteeGrants(granteeAddr string) (*authz.QueryGranteeGrantsResponse, error) { + // Create authz clients from existing connections + authzClients := make([]authz.QueryClient, len(c.conns)) + for i, conn := range c.conns { + authzClients[i] = authz.NewQueryClient(conn) + } + + return retryWithRoundRobin( + len(authzClients), + &c.rr, + func(idx int) (*authz.QueryGranteeGrantsResponse, error) { + return authzClients[idx].GranteeGrants(context.Background(), &authz.QueryGranteeGrantsRequest{ + Grantee: granteeAddr, + }) + }, + "GetGranteeGrants", + c.logger, + ) } // CreateGRPCConnection creates a gRPC connection with appropriate transport security. -// It automatically detects whether to use TLS based on the URL scheme (https:// or http://). +// It automatically detects whether to use TLS based on the URL scheme. +// // The function handles: // - https:// URLs: Uses TLS with default credentials // - http:// or no scheme: Uses insecure connection // - Automatically adds default port 9090 if no port is specified // -// The endpoint is processed to remove the scheme prefix before dialing. +// Parameters: +// - endpoint: gRPC endpoint URL (scheme is optional, port defaults to 9090) +// +// Returns: +// - *grpc.ClientConn: gRPC client connection +// - error: Error if connection fails func CreateGRPCConnection(endpoint string) (*grpc.ClientConn, error) { if endpoint == "" { return nil, fmt.Errorf("empty endpoint provided") @@ -182,12 +460,14 @@ func CreateGRPCConnection(endpoint string) (*grpc.ClientConn, error) { } // ExtractHostnameFromURL extracts the hostname from a URL string. -// It handles various URL formats including: -// - Full URLs with scheme (https://example.com:443) -// - URLs without scheme (example.com:9090) -// - Plain hostnames (example.com) +// It handles various URL formats including full URLs with scheme, URLs without scheme, and plain hostnames. +// +// Parameters: +// - grpcURL: URL string in any format (with or without scheme/port) // -// The function returns just the hostname without port or scheme. +// Returns: +// - string: Hostname without port or scheme +// - error: Error if hostname cannot be extracted func ExtractHostnameFromURL(grpcURL string) (string, error) { if grpcURL == "" { return "", fmt.Errorf("empty URL provided") @@ -229,370 +509,3 @@ func ExtractHostnameFromURL(grpcURL string) (string, error) { return hostname, nil } - -// QueryGrantsWithRetry queries AuthZ grants for a grantee with retry logic -func QueryGrantsWithRetry(grpcURL, granteeAddr string, cdc *codec.ProtoCodec, log zerolog.Logger) (string, []string, error) { - // Simple retry: 15s, then 30s - timeouts := []time.Duration{15 * time.Second, 30 * time.Second} - - for attempt, timeout := range timeouts { - conn, err := CreateGRPCConnection(grpcURL) - if err != nil { - return "", nil, err - } - defer conn.Close() - - ctx, cancel := context.WithTimeout(context.Background(), timeout) - defer cancel() - - // Single gRPC call to get all grants - authzClient := authz.NewQueryClient(conn) - grantResp, err := authzClient.GranteeGrants(ctx, &authz.QueryGranteeGrantsRequest{ - Grantee: granteeAddr, - }) - - if err == nil { - // Process the grants - return processGrants(grantResp, granteeAddr, cdc) - } - - // On timeout, retry with longer timeout - if ctx.Err() == context.DeadlineExceeded && attempt < len(timeouts)-1 { - log.Warn(). - Int("attempt", attempt+1). - Dur("timeout", timeout). - Msg("Timeout querying grants, retrying...") - time.Sleep(2 * time.Second) - continue - } - - return "", nil, fmt.Errorf("failed to query grants: %w", err) - } - - return "", nil, fmt.Errorf("failed after all retries") -} - -// processGrants processes the AuthZ grant response -func processGrants(grantResp *authz.QueryGranteeGrantsResponse, granteeAddr string, cdc *codec.ProtoCodec) (string, []string, error) { - if len(grantResp.Grants) == 0 { - return "", nil, fmt.Errorf("no AuthZ grants found. Please grant permissions:\npuniversald tx authz grant %s generic --msg-type=/uexecutor.v1.MsgVoteInbound --from ", granteeAddr) - } - - authorizedMessages := make(map[string]string) // msgType -> granter - var granter string - - // Check each grant for our required message types - for _, grant := range grantResp.Grants { - if grant.Authorization == nil { - continue - } - - // Only process GenericAuthorization - if grant.Authorization.TypeUrl != "/cosmos.authz.v1beta1.GenericAuthorization" { - continue - } - - msgType, err := extractMessageType(grant.Authorization, cdc) - if err != nil { - continue // Skip if we can't extract the message type - } - - // Check if this is a required message - for _, requiredMsg := range constant.SupportedMessages { - if msgType == requiredMsg { - // Check if grant is not expired - if grant.Expiration != nil && grant.Expiration.Before(time.Now()) { - continue // Skip expired grants - } - - authorizedMessages[msgType] = grant.Granter - if granter == "" { - granter = grant.Granter - } - break - } - } - } - - // Check if all required messages are authorized - var missingMessages []string - for _, requiredMsg := range constant.SupportedMessages { - if _, ok := authorizedMessages[requiredMsg]; !ok { - missingMessages = append(missingMessages, requiredMsg) - } - } - - if len(missingMessages) > 0 { - return "", nil, fmt.Errorf("missing AuthZ grants for: %v\nGrant permissions using:\npuniversald tx authz grant %s generic --msg-type= --from ", missingMessages, granteeAddr) - } - - // Return authorized messages - authorizedList := make([]string, 0, len(authorizedMessages)) - for msgType := range authorizedMessages { - authorizedList = append(authorizedList, msgType) - } - - return granter, authorizedList, nil -} - -// extractMessageType extracts the message type from a GenericAuthorization -func extractMessageType(authzAny *codectypes.Any, cdc *codec.ProtoCodec) (string, error) { - var genericAuth authz.GenericAuthorization - if err := cdc.Unmarshal(authzAny.Value, &genericAuth); err != nil { - return "", err - } - return genericAuth.Msg, nil -} - -// GetLatestBlockNum returns the latest block number from Push Chain. -// It tries each endpoint in round-robin order until one succeeds. -func (c *Client) GetLatestBlockNum() (uint64, error) { - if len(c.cmtClients) == 0 { - return 0, errors.New("pushcore: no endpoints configured") - } - - start := int(atomic.AddUint32(&c.rr, 1)-1) % len(c.cmtClients) - - var lastErr error - for i := 0; i < len(c.cmtClients); i++ { - idx := (start + i) % len(c.cmtClients) - client := c.cmtClients[idx] - - resp, err := client.GetLatestBlock(context.Background(), &cmtservice.GetLatestBlockRequest{}) - if err == nil && resp.SdkBlock != nil { - return uint64(resp.SdkBlock.Header.Height), nil - } - - lastErr = err - c.logger.Debug(). - Int("attempt", i+1). - Int("endpoint_index", idx). - Err(err). - Msg("GetLatestBlockNum failed; trying next endpoint") - } - - return 0, fmt.Errorf("pushcore: GetLatestBlockNum failed on all %d endpoints: %w", len(c.cmtClients), lastErr) -} - -// GetUniversalValidators returns all universal validators from Push Chain. -// It tries each endpoint in round-robin order until one succeeds. -func (c *Client) GetUniversalValidators() ([]*uvalidatortypes.UniversalValidator, error) { - if len(c.uvalidatorClients) == 0 { - return nil, errors.New("pushcore: no endpoints configured") - } - - start := int(atomic.AddUint32(&c.rr, 1)-1) % len(c.uvalidatorClients) - - var lastErr error - for i := 0; i < len(c.uvalidatorClients); i++ { - idx := (start + i) % len(c.uvalidatorClients) - client := c.uvalidatorClients[idx] - - resp, err := client.AllUniversalValidators(context.Background(), &uvalidatortypes.QueryUniversalValidatorsSetRequest{}) - if err == nil { - return resp.UniversalValidator, nil - } - - lastErr = err - c.logger.Debug(). - Int("attempt", i+1). - Int("endpoint_index", idx). - Err(err). - Msg("GetUniversalValidators failed; trying next endpoint") - } - - return nil, fmt.Errorf("pushcore: GetUniversalValidators failed on all %d endpoints: %w", len(c.uvalidatorClients), lastErr) -} - -// GetCurrentTSSKeyId returns the current TSS key ID from Push Chain. -// It tries each endpoint in round-robin order until one succeeds. -// Returns empty string if no key exists. -func (c *Client) GetCurrentTSSKeyId() (string, error) { - if len(c.utssClients) == 0 { - return "", errors.New("pushcore: no endpoints configured") - } - - start := int(atomic.AddUint32(&c.rr, 1)-1) % len(c.utssClients) - - var lastErr error - for i := 0; i < len(c.utssClients); i++ { - idx := (start + i) % len(c.utssClients) - client := c.utssClients[idx] - - resp, err := client.CurrentKey(context.Background(), &utsstypes.QueryCurrentKeyRequest{}) - if err == nil { - if resp.Key != nil { - return resp.Key.KeyId, nil - } - return "", nil // No key exists - } - - lastErr = err - c.logger.Debug(). - Int("attempt", i+1). - Int("endpoint_index", idx). - Err(err). - Msg("GetCurrentTSSKeyId failed; trying next endpoint") - } - - return "", fmt.Errorf("pushcore: GetCurrentTSSKeyId failed on all %d endpoints: %w", len(c.utssClients), lastErr) -} - -// TxResult represents a transaction result with its events. -type TxResult struct { - TxHash string - Height int64 - TxResponse *tx.GetTxResponse -} - -// GetTxsByEvents queries transactions matching the given event query. -// The query should follow Cosmos SDK event query format, e.g., "tss_process_initiated.process_id EXISTS" -// minHeight and maxHeight can be used to filter by block range (0 means no limit). -func (c *Client) GetTxsByEvents(eventQuery string, minHeight, maxHeight uint64, limit uint64) ([]*TxResult, error) { - if len(c.txClients) == 0 { - return nil, errors.New("pushcore: no endpoints configured") - } - - start := int(atomic.AddUint32(&c.rr, 1)-1) % len(c.txClients) - - var lastErr error - for i := 0; i < len(c.txClients); i++ { - idx := (start + i) % len(c.txClients) - client := c.txClients[idx] - - // Build the query events - events := []string{eventQuery} - - // Add height range filters if specified - if minHeight > 0 { - events = append(events, fmt.Sprintf("tx.height>=%d", minHeight)) - } - if maxHeight > 0 { - events = append(events, fmt.Sprintf("tx.height<=%d", maxHeight)) - } - - // Set pagination limit - pageLimit := limit - if pageLimit == 0 { - pageLimit = 100 // default limit - } - - // Join events with AND to create query string (SDK v0.50+ uses Query field) - queryString := strings.Join(events, " AND ") - - req := &tx.GetTxsEventRequest{ - Query: queryString, - Pagination: &query.PageRequest{ - Limit: pageLimit, - }, - OrderBy: tx.OrderBy_ORDER_BY_ASC, - } - - resp, err := client.GetTxsEvent(context.Background(), req) - if err == nil { - results := make([]*TxResult, 0, len(resp.TxResponses)) - for _, txResp := range resp.TxResponses { - results = append(results, &TxResult{ - TxHash: txResp.TxHash, - Height: txResp.Height, - TxResponse: &tx.GetTxResponse{ - Tx: resp.Txs[len(results)], - TxResponse: txResp, - }, - }) - } - return results, nil - } - - lastErr = err - c.logger.Debug(). - Int("attempt", i+1). - Int("endpoint_index", idx). - Err(err). - Msg("GetTxsByEvents failed; trying next endpoint") - } - - return nil, fmt.Errorf("pushcore: GetTxsByEvents failed on all %d endpoints: %w", len(c.txClients), lastErr) -} - -// GetBlockByHeight returns block information for a specific height. -func (c *Client) GetBlockByHeight(height int64) (*cmtservice.GetBlockByHeightResponse, error) { - if len(c.cmtClients) == 0 { - return nil, errors.New("pushcore: no endpoints configured") - } - - start := int(atomic.AddUint32(&c.rr, 1)-1) % len(c.cmtClients) - - var lastErr error - for i := 0; i < len(c.cmtClients); i++ { - idx := (start + i) % len(c.cmtClients) - client := c.cmtClients[idx] - - resp, err := client.GetBlockByHeight(context.Background(), &cmtservice.GetBlockByHeightRequest{ - Height: height, - }) - if err == nil { - return resp, nil - } - - lastErr = err - c.logger.Debug(). - Int("attempt", i+1). - Int("endpoint_index", idx). - Err(err). - Msg("GetBlockByHeight failed; trying next endpoint") - } - - return nil, fmt.Errorf("pushcore: GetBlockByHeight failed on all %d endpoints: %w", len(c.cmtClients), lastErr) -} - -// GetGasPrice returns the median gas price for a specific chain from the on-chain oracle. -// The gas price is voted on by universal validators and stored on-chain. -// chainID should be in CAIP-2 format (e.g., "eip155:84532" for Base Sepolia). -// Returns the median price in the chain's native unit (Wei for EVM chains, lamports for Solana). -func (c *Client) GetGasPrice(ctx context.Context, chainID string) (*big.Int, error) { - if len(c.uexecutorClients) == 0 { - return nil, errors.New("pushcore: no endpoints configured") - } - - if chainID == "" { - return nil, errors.New("pushcore: chainID is required") - } - - start := int(atomic.AddUint32(&c.rr, 1)-1) % len(c.uexecutorClients) - - var lastErr error - for i := 0; i < len(c.uexecutorClients); i++ { - idx := (start + i) % len(c.uexecutorClients) - client := c.uexecutorClients[idx] - - resp, err := client.GasPrice(ctx, &uexecutortypes.QueryGasPriceRequest{ - ChainId: chainID, - }) - if err == nil && resp.GasPrice != nil { - // Get the median price using MedianIndex - if len(resp.GasPrice.Prices) == 0 { - return nil, fmt.Errorf("pushcore: no gas prices available for chain %s", chainID) - } - - medianIdx := resp.GasPrice.MedianIndex - if medianIdx >= uint64(len(resp.GasPrice.Prices)) { - // Fallback to first price if median index is out of bounds - medianIdx = 0 - } - - medianPrice := resp.GasPrice.Prices[medianIdx] - return new(big.Int).SetUint64(medianPrice), nil - } - - lastErr = err - c.logger.Debug(). - Int("attempt", i+1). - Int("endpoint_index", idx). - Str("chain_id", chainID). - Err(err). - Msg("GetGasPrice failed; trying next endpoint") - } - - return nil, fmt.Errorf("pushcore: GetGasPrice failed on all %d endpoints for chain %s: %w", len(c.uexecutorClients), chainID, lastErr) -} diff --git a/universalClient/pushcore/pushCore_test.go b/universalClient/pushcore/pushCore_test.go index 1ad0f904..4e3f55b9 100644 --- a/universalClient/pushcore/pushCore_test.go +++ b/universalClient/pushcore/pushCore_test.go @@ -5,8 +5,13 @@ import ( "math/big" "testing" + cmtservice "github.com/cosmos/cosmos-sdk/client/grpc/cmtservice" + sdktypes "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/tx" uexecutortypes "github.com/pushchain/push-chain-node/x/uexecutor/types" uregistrytypes "github.com/pushchain/push-chain-node/x/uregistry/types" + utsstypes "github.com/pushchain/push-chain-node/x/utss/types" + uvalidatortypes "github.com/pushchain/push-chain-node/x/uvalidator/types" "github.com/rs/zerolog" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -35,9 +40,8 @@ func TestNew(t *testing.T) { errMsg: "at least one gRPC URL is required", }, { - name: "valid URL without port", - urls: []string{"localhost"}, - // Should succeed as CreateGRPCConnection adds default port + name: "valid URL without port", + urls: []string{"localhost"}, wantErr: false, }, { @@ -61,10 +65,9 @@ func TestNew(t *testing.T) { wantErr: false, }, { - name: "mix of valid and invalid URLs", - urls: []string{"localhost:9090", "invalid-url-that-will-fail:99999", "localhost:9091"}, - // Should still succeed as long as at least one connection works - wantErr: false, + name: "mix of valid and invalid URLs", + urls: []string{"localhost:9090", "invalid-url-that-will-fail:99999", "localhost:9091"}, + wantErr: false, // Should succeed if at least one works }, } @@ -77,15 +80,14 @@ func TestNew(t *testing.T) { assert.Contains(t, err.Error(), tt.errMsg) assert.Nil(t, client) } else { - // Note: The connections might fail in test environment, but we're testing the logic - // The function might still return an error if ALL connections fail + // In test environment, connections might fail if err != nil { - // Check if it's because all connections failed + // If all connections failed, that's expected in test env assert.Contains(t, err.Error(), "all dials failed") + assert.Nil(t, client) } else { require.NotNil(t, client) assert.NotNil(t, client.logger) - // Clean up _ = client.Close() } } @@ -99,24 +101,20 @@ func TestClient_Close(t *testing.T) { t.Run("close with no connections", func(t *testing.T) { client := &Client{ logger: logger, - eps: nil, conns: nil, } err := client.Close() assert.NoError(t, err) assert.Nil(t, client.conns) - assert.Nil(t, client.eps) }) - t.Run("close with mock connections", func(t *testing.T) { - // Create a client with a valid connection + t.Run("close with connections", func(t *testing.T) { client, err := New([]string{"localhost:9090"}, logger) if err != nil { - // If we can't create a connection (common in test env), create a mock client + // If connection fails, create a mock client client = &Client{ logger: logger, - eps: []uregistrytypes.QueryClient{}, conns: []*grpc.ClientConn{}, } } @@ -124,7 +122,6 @@ func TestClient_Close(t *testing.T) { err = client.Close() assert.NoError(t, err) assert.Nil(t, client.conns) - assert.Nil(t, client.eps) }) } @@ -144,57 +141,459 @@ func TestClient_GetAllChainConfigs(t *testing.T) { assert.Nil(t, configs) }) - // Skip round-robin test as we can't mock the interface easily without nil pointers - // The actual round-robin logic is simple enough and tested by the error message count + t.Run("successful query with mock", func(t *testing.T) { + mockClient := &mockRegistryQueryClient{ + allChainConfigsResp: &uregistrytypes.QueryAllChainConfigsResponse{ + Configs: []*uregistrytypes.ChainConfig{ + {Chain: "eip155:1"}, + {Chain: "eip155:84532"}, + }, + }, + } + + client := &Client{ + logger: logger, + eps: []uregistrytypes.QueryClient{mockClient}, + } + + configs, err := client.GetAllChainConfigs(ctx) + require.NoError(t, err) + require.Len(t, configs, 2) + assert.Equal(t, "eip155:1", configs[0].Chain) + }) + + t.Run("round robin failover", func(t *testing.T) { + failingClient := &mockRegistryQueryClient{err: assert.AnError} + successClient := &mockRegistryQueryClient{ + allChainConfigsResp: &uregistrytypes.QueryAllChainConfigsResponse{ + Configs: []*uregistrytypes.ChainConfig{ + {Chain: "eip155:1"}, + }, + }, + } + + client := &Client{ + logger: logger, + eps: []uregistrytypes.QueryClient{failingClient, successClient}, + } + + configs, err := client.GetAllChainConfigs(ctx) + require.NoError(t, err) + require.Len(t, configs, 1) + }) + + t.Run("all endpoints fail", func(t *testing.T) { + client := &Client{ + logger: logger, + eps: []uregistrytypes.QueryClient{ + &mockRegistryQueryClient{err: assert.AnError}, + &mockRegistryQueryClient{err: assert.AnError}, + }, + } + + configs, err := client.GetAllChainConfigs(ctx) + require.Error(t, err) + assert.Contains(t, err.Error(), "failed on all 2 endpoints") + assert.Nil(t, configs) + }) } -// Removed TestClient_RoundRobinCounter as it would require nil pointer handling +func TestClient_GetLatestBlock(t *testing.T) { + logger := zerolog.Nop() + + t.Run("no endpoints configured", func(t *testing.T) { + client := &Client{ + logger: logger, + cmtClients: []cmtservice.ServiceClient{}, + } + + blockNum, err := client.GetLatestBlock() + require.Error(t, err) + assert.Contains(t, err.Error(), "no endpoints configured") + assert.Equal(t, uint64(0), blockNum) + }) -func TestNew_ErrorHandling(t *testing.T) { + t.Run("successful query with mock", func(t *testing.T) { + mockClient := &mockCometBFTServiceClient{ + getLatestBlockResp: &cmtservice.GetLatestBlockResponse{ + SdkBlock: &cmtservice.Block{ + Header: cmtservice.Header{ + Height: 12345, + }, + }, + }, + } + + client := &Client{ + logger: logger, + cmtClients: []cmtservice.ServiceClient{mockClient}, + } + + blockNum, err := client.GetLatestBlock() + require.NoError(t, err) + assert.Equal(t, uint64(12345), blockNum) + }) + + t.Run("nil SdkBlock error", func(t *testing.T) { + mockClient := &mockCometBFTServiceClient{ + getLatestBlockResp: &cmtservice.GetLatestBlockResponse{ + SdkBlock: nil, + }, + } + + client := &Client{ + logger: logger, + cmtClients: []cmtservice.ServiceClient{mockClient}, + } + + blockNum, err := client.GetLatestBlock() + require.Error(t, err) + assert.Contains(t, err.Error(), "SdkBlock is nil") + assert.Equal(t, uint64(0), blockNum) + }) +} + +func TestClient_GetAllUniversalValidators(t *testing.T) { logger := zerolog.Nop() - t.Run("all connections fail", func(t *testing.T) { - // Use URLs that will definitely fail to connect - urls := []string{ - "invalid-host-that-doesnt-exist:99999", - "another-invalid-host:88888", + t.Run("no endpoints configured", func(t *testing.T) { + client := &Client{ + logger: logger, + uvalidatorClients: []uvalidatortypes.QueryClient{}, } - client, err := New(urls, logger) + validators, err := client.GetAllUniversalValidators() + require.Error(t, err) + assert.Contains(t, err.Error(), "no endpoints configured") + assert.Nil(t, validators) + }) - // Should get an error about all dials failing - if err != nil { - assert.Contains(t, err.Error(), "all dials failed") - assert.Contains(t, err.Error(), "2 urls") // Should mention the number of URLs tried - assert.Nil(t, client) - } else { - // If somehow it succeeded, make sure to clean up - require.NotNil(t, client) - _ = client.Close() + t.Run("successful query with mock", func(t *testing.T) { + mockClient := &mockUValidatorQueryClient{ + allUniversalValidatorsResp: &uvalidatortypes.QueryUniversalValidatorsSetResponse{ + UniversalValidator: []*uvalidatortypes.UniversalValidator{ + {}, + {}, + }, + }, + } + + client := &Client{ + logger: logger, + uvalidatorClients: []uvalidatortypes.QueryClient{mockClient}, } + + validators, err := client.GetAllUniversalValidators() + require.NoError(t, err) + require.Len(t, validators, 2) }) +} - t.Run("partial connection success", func(t *testing.T) { - // Mix of potentially valid and definitely invalid URLs - urls := []string{ - "localhost:9090", // Might work - "invalid-host-that-doesnt-exist:99999", // Will fail +func TestClient_GetCurrentKey(t *testing.T) { + logger := zerolog.Nop() + + t.Run("no endpoints configured", func(t *testing.T) { + client := &Client{ + logger: logger, + utssClients: []utsstypes.QueryClient{}, } - client, err := New(urls, logger) + key, err := client.GetCurrentKey() + require.Error(t, err) + assert.Contains(t, err.Error(), "no endpoints configured") + assert.Nil(t, key) + }) - // This should succeed if at least one connection works - // or fail if all connections fail - if err != nil { - assert.Contains(t, err.Error(), "all dials failed") - } else { - require.NotNil(t, client) - _ = client.Close() + t.Run("successful query with key", func(t *testing.T) { + mockClient := &mockUTSSQueryClient{ + currentKeyResp: &utsstypes.QueryCurrentKeyResponse{ + Key: &utsstypes.TssKey{ + KeyId: "key-123", + }, + }, + } + + client := &Client{ + logger: logger, + utssClients: []utsstypes.QueryClient{mockClient}, + } + + key, err := client.GetCurrentKey() + require.NoError(t, err) + require.NotNil(t, key) + assert.Equal(t, "key-123", key.KeyId) + }) + + t.Run("no key exists (nil key)", func(t *testing.T) { + mockClient := &mockUTSSQueryClient{ + currentKeyResp: &utsstypes.QueryCurrentKeyResponse{ + Key: nil, + }, + } + + client := &Client{ + logger: logger, + utssClients: []utsstypes.QueryClient{mockClient}, + } + + key, err := client.GetCurrentKey() + require.Error(t, err) + assert.Contains(t, err.Error(), "no TSS key found") + assert.Nil(t, key) + }) +} + +func TestClient_GetTxsByEvents(t *testing.T) { + logger := zerolog.Nop() + + t.Run("no endpoints configured", func(t *testing.T) { + client := &Client{ + logger: logger, + txClients: []tx.ServiceClient{}, + } + + txs, err := client.GetTxsByEvents("test.event", 0, 0, 0) + require.Error(t, err) + assert.Contains(t, err.Error(), "no endpoints configured") + assert.Nil(t, txs) + }) + + t.Run("successful query with mock", func(t *testing.T) { + mockClient := &mockTxServiceClient{ + getTxsEventResp: &tx.GetTxsEventResponse{ + Txs: []*tx.Tx{ + {Body: &tx.TxBody{}}, + }, + TxResponses: []*sdktypes.TxResponse{ + { + Height: 100, + TxHash: "0x123", + }, + }, + }, + } + + client := &Client{ + logger: logger, + txClients: []tx.ServiceClient{mockClient}, + } + + txs, err := client.GetTxsByEvents("test.event", 0, 0, 0) + require.NoError(t, err) + require.Len(t, txs, 1) + assert.Equal(t, "0x123", txs[0].TxHash) + assert.Equal(t, int64(100), txs[0].Height) + }) + + t.Run("with height filters", func(t *testing.T) { + mockClient := &mockTxServiceClient{ + getTxsEventResp: &tx.GetTxsEventResponse{ + Txs: []*tx.Tx{}, + TxResponses: []*sdktypes.TxResponse{}, + }, + } + + client := &Client{ + logger: logger, + txClients: []tx.ServiceClient{mockClient}, + } + + txs, err := client.GetTxsByEvents("test.event", 100, 200, 50) + require.NoError(t, err) + assert.NotNil(t, txs) + }) +} + +func TestClient_GetGasPrice(t *testing.T) { + logger := zerolog.Nop() + ctx := context.Background() + + t.Run("no endpoints configured", func(t *testing.T) { + client := &Client{ + logger: logger, + uexecutorClients: []uexecutortypes.QueryClient{}, + } + + price, err := client.GetGasPrice(ctx, "eip155:84532") + require.Error(t, err) + assert.Contains(t, err.Error(), "no endpoints configured") + assert.Nil(t, price) + }) + + t.Run("empty chainID", func(t *testing.T) { + client := &Client{ + logger: logger, + uexecutorClients: []uexecutortypes.QueryClient{&mockUExecutorQueryClient{}}, + } + + price, err := client.GetGasPrice(ctx, "") + require.Error(t, err) + assert.Contains(t, err.Error(), "chainID is required") + assert.Nil(t, price) + }) + + t.Run("successful gas price retrieval", func(t *testing.T) { + mockClient := &mockUExecutorQueryClient{ + gasPriceResp: &uexecutortypes.QueryGasPriceResponse{ + GasPrice: &uexecutortypes.GasPrice{ + ObservedChainId: "eip155:84532", + Signers: []string{"validator1", "validator2", "validator3"}, + Prices: []uint64{1000000000, 2000000000, 3000000000}, + BlockNums: []uint64{100, 101, 102}, + MedianIndex: 1, // Median is 2 gwei (index 1) + }, + }, + } + + client := &Client{ + logger: logger, + uexecutorClients: []uexecutortypes.QueryClient{mockClient}, + } + + price, err := client.GetGasPrice(ctx, "eip155:84532") + require.NoError(t, err) + require.NotNil(t, price) + assert.Equal(t, big.NewInt(2000000000), price) + }) + + t.Run("single validator price", func(t *testing.T) { + mockClient := &mockUExecutorQueryClient{ + gasPriceResp: &uexecutortypes.QueryGasPriceResponse{ + GasPrice: &uexecutortypes.GasPrice{ + ObservedChainId: "eip155:1", + Signers: []string{"validator1"}, + Prices: []uint64{5000000000}, + BlockNums: []uint64{100}, + MedianIndex: 0, + }, + }, + } + + client := &Client{ + logger: logger, + uexecutorClients: []uexecutortypes.QueryClient{mockClient}, + } + + price, err := client.GetGasPrice(ctx, "eip155:1") + require.NoError(t, err) + assert.Equal(t, big.NewInt(5000000000), price) + }) + + t.Run("empty prices array", func(t *testing.T) { + mockClient := &mockUExecutorQueryClient{ + gasPriceResp: &uexecutortypes.QueryGasPriceResponse{ + GasPrice: &uexecutortypes.GasPrice{ + ObservedChainId: "eip155:84532", + Signers: []string{}, + Prices: []uint64{}, + BlockNums: []uint64{}, + MedianIndex: 0, + }, + }, + } + + client := &Client{ + logger: logger, + uexecutorClients: []uexecutortypes.QueryClient{mockClient}, + } + + price, err := client.GetGasPrice(ctx, "eip155:84532") + require.Error(t, err) + assert.Contains(t, err.Error(), "no gas prices available") + assert.Nil(t, price) + }) + + t.Run("median index out of bounds fallback", func(t *testing.T) { + mockClient := &mockUExecutorQueryClient{ + gasPriceResp: &uexecutortypes.QueryGasPriceResponse{ + GasPrice: &uexecutortypes.GasPrice{ + ObservedChainId: "eip155:84532", + Signers: []string{"validator1"}, + Prices: []uint64{1500000000}, + BlockNums: []uint64{100}, + MedianIndex: 99, // Out of bounds + }, + }, + } + + client := &Client{ + logger: logger, + uexecutorClients: []uexecutortypes.QueryClient{mockClient}, + } + + price, err := client.GetGasPrice(ctx, "eip155:84532") + require.NoError(t, err) + // Should fallback to first price + assert.Equal(t, big.NewInt(1500000000), price) + }) + + t.Run("round robin failover", func(t *testing.T) { + failingClient := &mockUExecutorQueryClient{err: assert.AnError} + successClient := &mockUExecutorQueryClient{ + gasPriceResp: &uexecutortypes.QueryGasPriceResponse{ + GasPrice: &uexecutortypes.GasPrice{ + ObservedChainId: "eip155:84532", + Prices: []uint64{1000000000}, + MedianIndex: 0, + }, + }, + } + + client := &Client{ + logger: logger, + uexecutorClients: []uexecutortypes.QueryClient{failingClient, successClient}, + } + + price, err := client.GetGasPrice(ctx, "eip155:84532") + require.NoError(t, err) + assert.Equal(t, big.NewInt(1000000000), price) + }) + + t.Run("all endpoints fail", func(t *testing.T) { + client := &Client{ + logger: logger, + uexecutorClients: []uexecutortypes.QueryClient{ + &mockUExecutorQueryClient{err: assert.AnError}, + &mockUExecutorQueryClient{err: assert.AnError}, + }, } + + price, err := client.GetGasPrice(ctx, "eip155:84532") + require.Error(t, err) + assert.Contains(t, err.Error(), "failed on all 2 endpoints") + assert.Nil(t, price) }) } -// Removed TestClient_GetAllChainConfigs_ErrorPropagation as it would require nil pointer handling +func TestClient_GetGranteeGrants(t *testing.T) { + logger := zerolog.Nop() + + t.Run("no endpoints configured", func(t *testing.T) { + client := &Client{ + logger: logger, + conns: []*grpc.ClientConn{}, + } + + grants, err := client.GetGranteeGrants("cosmos1abc...") + require.Error(t, err) + assert.Contains(t, err.Error(), "no endpoints configured") + assert.Nil(t, grants) + }) + + t.Run("successful query with mock", func(t *testing.T) { + // Note: This test requires actual gRPC connections, so we'll test the error case + // For a full mock test, we'd need to set up a gRPC server + client := &Client{ + logger: logger, + conns: []*grpc.ClientConn{}, + } + + grants, err := client.GetGranteeGrants("cosmos1abc...") + require.Error(t, err) + assert.Contains(t, err.Error(), "no endpoints configured") + assert.Nil(t, grants) + }) +} func TestCreateGRPCConnection(t *testing.T) { tests := []struct { @@ -205,158 +604,62 @@ func TestCreateGRPCConnection(t *testing.T) { }{ { name: "empty endpoint", - endpoint: "", - wantErr: true, - errorContains: "empty endpoint", - }, - { - name: "http endpoint without port", - endpoint: "http://localhost", - wantErr: false, - }, - { - name: "https endpoint without port", - endpoint: "https://localhost", - wantErr: false, - }, - { - name: "http endpoint with port", - endpoint: "http://localhost:9090", - wantErr: false, - }, - { - name: "https endpoint with port", - endpoint: "https://localhost:9090", - wantErr: false, - }, - { - name: "endpoint without scheme and without port", - endpoint: "localhost", - wantErr: false, - }, - { - name: "endpoint without scheme but with port", - endpoint: "localhost:9090", - wantErr: false, - }, - { - name: "endpoint with custom port", - endpoint: "localhost:8080", - wantErr: false, - }, - { - name: "endpoint with invalid port format", - endpoint: "localhost:", - wantErr: false, // Should add default port - }, - { - name: "endpoint with path after colon", - endpoint: "http://localhost:/path", - wantErr: false, // Should add default port - }, - } - - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - conn, err := CreateGRPCConnection(tt.endpoint) - - if tt.wantErr { - require.Error(t, err) - if tt.errorContains != "" { - assert.Contains(t, err.Error(), tt.errorContains) - } - assert.Nil(t, conn) - } else { - require.NoError(t, err) - require.NotNil(t, conn) - // Clean up connection - err = conn.Close() - assert.NoError(t, err) - } - }) - } -} - -func TestCreateGRPCConnection_PortHandling(t *testing.T) { - tests := []struct { - name string - endpoint string - expectedContains string // What the processed endpoint should contain - }{ - { - name: "adds default port when missing", - endpoint: "localhost", - expectedContains: ":9090", - }, - { - name: "preserves existing port", - endpoint: "localhost:8080", - expectedContains: ":8080", + endpoint: "", + wantErr: true, + errorContains: "empty endpoint", }, { - name: "adds port to http endpoint", - endpoint: "http://localhost", - expectedContains: ":9090", + name: "http endpoint without port", + endpoint: "http://localhost", + wantErr: false, }, { - name: "adds port to https endpoint", - endpoint: "https://localhost", - expectedContains: ":9090", + name: "https endpoint without port", + endpoint: "https://localhost", + wantErr: false, }, { - name: "handles empty port", - endpoint: "localhost:", - expectedContains: ":9090", + name: "http endpoint with port", + endpoint: "http://localhost:9090", + wantErr: false, }, - } - - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - conn, err := CreateGRPCConnection(tt.endpoint) - require.NoError(t, err) - require.NotNil(t, conn) - - // Get the target from the connection - target := conn.Target() - assert.Contains(t, target, tt.expectedContains, "Expected target to contain %s, got %s", tt.expectedContains, target) - - // Clean up - err = conn.Close() - assert.NoError(t, err) - }) - } -} - -func TestCreateGRPCConnection_TLSHandling(t *testing.T) { - tests := []struct { - name string - endpoint string - // Note: We can't easily test if TLS is actually enabled without attempting a real connection - // But we can verify the function doesn't error for different schemes - }{ { - name: "https should not error", + name: "https endpoint with port", endpoint: "https://localhost:9090", + wantErr: false, }, { - name: "http should not error", - endpoint: "http://localhost:9090", + name: "endpoint without scheme and without port", + endpoint: "localhost", + wantErr: false, }, { - name: "no scheme should not error", + name: "endpoint without scheme but with port", endpoint: "localhost:9090", + wantErr: false, + }, + { + name: "endpoint with custom port", + endpoint: "localhost:8080", + wantErr: false, }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { conn, err := CreateGRPCConnection(tt.endpoint) - require.NoError(t, err) - require.NotNil(t, conn) - // Clean up - err = conn.Close() - assert.NoError(t, err) + if tt.wantErr { + require.Error(t, err) + if tt.errorContains != "" { + assert.Contains(t, err.Error(), tt.errorContains) + } + assert.Nil(t, conn) + } else { + require.NoError(t, err) + require.NotNil(t, conn) + _ = conn.Close() + } }) } } @@ -387,12 +690,6 @@ func TestExtractHostnameFromURL(t *testing.T) { expectedHostname: "localhost", wantErr: false, }, - { - name: "http URL without port", - url: "http://api.test.com", - expectedHostname: "api.test.com", - wantErr: false, - }, { name: "plain hostname without port", url: "example.com", @@ -443,13 +740,6 @@ func TestExtractHostnameFromURL(t *testing.T) { wantErr: true, errorContains: "could not extract hostname", }, - { - name: "URL with only port", - url: ":9090", - expectedHostname: "", - wantErr: true, - errorContains: "could not extract hostname", - }, { name: "IPv4 address", url: "192.168.1.1:9090", @@ -481,229 +771,95 @@ func TestExtractHostnameFromURL(t *testing.T) { } } -func TestClient_GetGasPrice(t *testing.T) { - logger := zerolog.Nop() - ctx := context.Background() - - t.Run("no endpoints configured", func(t *testing.T) { - client := &Client{ - logger: logger, - uexecutorClients: []uexecutortypes.QueryClient{}, - } - - price, err := client.GetGasPrice(ctx, "eip155:84532") - require.Error(t, err) - assert.Contains(t, err.Error(), "no endpoints configured") - assert.Nil(t, price) - }) - - t.Run("empty chainID", func(t *testing.T) { - client := &Client{ - logger: logger, - uexecutorClients: []uexecutortypes.QueryClient{nil}, // Has endpoint but chainID is empty - } +// Mock implementations - price, err := client.GetGasPrice(ctx, "") - require.Error(t, err) - assert.Contains(t, err.Error(), "chainID is required") - assert.Nil(t, price) - }) +type mockRegistryQueryClient struct { + uregistrytypes.QueryClient + allChainConfigsResp *uregistrytypes.QueryAllChainConfigsResponse + err error } -func TestClient_GetGasPrice_WithMock(t *testing.T) { - logger := zerolog.Nop() - ctx := context.Background() - - t.Run("successful gas price retrieval", func(t *testing.T) { - mockClient := &mockUExecutorQueryClient{ - gasPriceResp: &uexecutortypes.QueryGasPriceResponse{ - GasPrice: &uexecutortypes.GasPrice{ - ObservedChainId: "eip155:84532", - Signers: []string{"validator1", "validator2", "validator3"}, - Prices: []uint64{1000000000, 2000000000, 3000000000}, // 1, 2, 3 gwei - BlockNums: []uint64{100, 101, 102}, - MedianIndex: 1, // Median is 2 gwei (index 1) - }, - }, - } - - client := &Client{ - logger: logger, - uexecutorClients: []uexecutortypes.QueryClient{mockClient}, - } - - price, err := client.GetGasPrice(ctx, "eip155:84532") - require.NoError(t, err) - require.NotNil(t, price) - - // Expected median price is 2000000000 (2 gwei) - expectedPrice := big.NewInt(2000000000) - assert.Equal(t, expectedPrice, price) - }) - - t.Run("single validator price", func(t *testing.T) { - mockClient := &mockUExecutorQueryClient{ - gasPriceResp: &uexecutortypes.QueryGasPriceResponse{ - GasPrice: &uexecutortypes.GasPrice{ - ObservedChainId: "eip155:1", - Signers: []string{"validator1"}, - Prices: []uint64{5000000000}, // 5 gwei - BlockNums: []uint64{100}, - MedianIndex: 0, - }, - }, - } - - client := &Client{ - logger: logger, - uexecutorClients: []uexecutortypes.QueryClient{mockClient}, - } - - price, err := client.GetGasPrice(ctx, "eip155:1") - require.NoError(t, err) - require.NotNil(t, price) - assert.Equal(t, big.NewInt(5000000000), price) - }) - - t.Run("empty prices array", func(t *testing.T) { - mockClient := &mockUExecutorQueryClient{ - gasPriceResp: &uexecutortypes.QueryGasPriceResponse{ - GasPrice: &uexecutortypes.GasPrice{ - ObservedChainId: "eip155:84532", - Signers: []string{}, - Prices: []uint64{}, // Empty - BlockNums: []uint64{}, - MedianIndex: 0, - }, - }, - } - - client := &Client{ - logger: logger, - uexecutorClients: []uexecutortypes.QueryClient{mockClient}, - } - - price, err := client.GetGasPrice(ctx, "eip155:84532") - require.Error(t, err) - assert.Contains(t, err.Error(), "no gas prices available") - assert.Nil(t, price) - }) - - t.Run("median index out of bounds fallback", func(t *testing.T) { - mockClient := &mockUExecutorQueryClient{ - gasPriceResp: &uexecutortypes.QueryGasPriceResponse{ - GasPrice: &uexecutortypes.GasPrice{ - ObservedChainId: "eip155:84532", - Signers: []string{"validator1"}, - Prices: []uint64{1500000000}, - BlockNums: []uint64{100}, - MedianIndex: 99, // Out of bounds - }, - }, - } +func (m *mockRegistryQueryClient) AllChainConfigs(ctx context.Context, req *uregistrytypes.QueryAllChainConfigsRequest, opts ...grpc.CallOption) (*uregistrytypes.QueryAllChainConfigsResponse, error) { + if m.err != nil { + return nil, m.err + } + return m.allChainConfigsResp, nil +} - client := &Client{ - logger: logger, - uexecutorClients: []uexecutortypes.QueryClient{mockClient}, - } +func (m *mockRegistryQueryClient) ChainConfig(ctx context.Context, req *uregistrytypes.QueryChainConfigRequest, opts ...grpc.CallOption) (*uregistrytypes.QueryChainConfigResponse, error) { + return nil, nil +} - price, err := client.GetGasPrice(ctx, "eip155:84532") - require.NoError(t, err) - require.NotNil(t, price) - // Should fallback to first price - assert.Equal(t, big.NewInt(1500000000), price) - }) +type mockCometBFTServiceClient struct { + cmtservice.ServiceClient + getLatestBlockResp *cmtservice.GetLatestBlockResponse + err error +} - t.Run("chain not found error", func(t *testing.T) { - mockClient := &mockUExecutorQueryClient{ - err: assert.AnError, - } +func (m *mockCometBFTServiceClient) GetLatestBlock(ctx context.Context, req *cmtservice.GetLatestBlockRequest, opts ...grpc.CallOption) (*cmtservice.GetLatestBlockResponse, error) { + if m.err != nil { + return nil, m.err + } + return m.getLatestBlockResp, nil +} - client := &Client{ - logger: logger, - uexecutorClients: []uexecutortypes.QueryClient{mockClient}, - } +func (m *mockCometBFTServiceClient) GetBlockByHeight(ctx context.Context, req *cmtservice.GetBlockByHeightRequest, opts ...grpc.CallOption) (*cmtservice.GetBlockByHeightResponse, error) { + return nil, nil +} - price, err := client.GetGasPrice(ctx, "unknown-chain") - require.Error(t, err) - assert.Contains(t, err.Error(), "GetGasPrice failed") - assert.Nil(t, price) - }) +type mockUValidatorQueryClient struct { + uvalidatortypes.QueryClient + allUniversalValidatorsResp *uvalidatortypes.QueryUniversalValidatorsSetResponse + err error +} - t.Run("round robin failover", func(t *testing.T) { - // First client fails, second succeeds - failingClient := &mockUExecutorQueryClient{ - err: assert.AnError, - } - successClient := &mockUExecutorQueryClient{ - gasPriceResp: &uexecutortypes.QueryGasPriceResponse{ - GasPrice: &uexecutortypes.GasPrice{ - ObservedChainId: "eip155:84532", - Prices: []uint64{1000000000}, - MedianIndex: 0, - }, - }, - } +func (m *mockUValidatorQueryClient) AllUniversalValidators(ctx context.Context, req *uvalidatortypes.QueryUniversalValidatorsSetRequest, opts ...grpc.CallOption) (*uvalidatortypes.QueryUniversalValidatorsSetResponse, error) { + if m.err != nil { + return nil, m.err + } + return m.allUniversalValidatorsResp, nil +} - client := &Client{ - logger: logger, - uexecutorClients: []uexecutortypes.QueryClient{failingClient, successClient}, - } +func (m *mockUValidatorQueryClient) UniversalValidator(ctx context.Context, req *uvalidatortypes.QueryUniversalValidatorRequest, opts ...grpc.CallOption) (*uvalidatortypes.QueryUniversalValidatorResponse, error) { + return nil, nil +} - price, err := client.GetGasPrice(ctx, "eip155:84532") - require.NoError(t, err) - require.NotNil(t, price) - assert.Equal(t, big.NewInt(1000000000), price) - }) +type mockUTSSQueryClient struct { + utsstypes.QueryClient + currentKeyResp *utsstypes.QueryCurrentKeyResponse + err error +} - t.Run("all endpoints fail", func(t *testing.T) { - client := &Client{ - logger: logger, - uexecutorClients: []uexecutortypes.QueryClient{ - &mockUExecutorQueryClient{err: assert.AnError}, - &mockUExecutorQueryClient{err: assert.AnError}, - }, - } +func (m *mockUTSSQueryClient) CurrentKey(ctx context.Context, req *utsstypes.QueryCurrentKeyRequest, opts ...grpc.CallOption) (*utsstypes.QueryCurrentKeyResponse, error) { + if m.err != nil { + return nil, m.err + } + return m.currentKeyResp, nil +} - price, err := client.GetGasPrice(ctx, "eip155:84532") - require.Error(t, err) - assert.Contains(t, err.Error(), "failed on all 2 endpoints") - assert.Nil(t, price) - }) +func (m *mockUTSSQueryClient) KeyById(ctx context.Context, req *utsstypes.QueryKeyByIdRequest, opts ...grpc.CallOption) (*utsstypes.QueryKeyByIdResponse, error) { + return nil, nil +} - t.Run("various chain IDs", func(t *testing.T) { - chainIDs := []string{ - "eip155:1", // Ethereum Mainnet - "eip155:84532", // Base Sepolia - "eip155:137", // Polygon - "solana:mainnet", // Solana Mainnet - } - - for _, chainID := range chainIDs { - mockClient := &mockUExecutorQueryClient{ - gasPriceResp: &uexecutortypes.QueryGasPriceResponse{ - GasPrice: &uexecutortypes.GasPrice{ - ObservedChainId: chainID, - Prices: []uint64{1000000000}, - MedianIndex: 0, - }, - }, - } +type mockTxServiceClient struct { + tx.ServiceClient + getTxsEventResp *tx.GetTxsEventResponse + err error +} - client := &Client{ - logger: logger, - uexecutorClients: []uexecutortypes.QueryClient{mockClient}, - } +func (m *mockTxServiceClient) GetTxsEvent(ctx context.Context, req *tx.GetTxsEventRequest, opts ...grpc.CallOption) (*tx.GetTxsEventResponse, error) { + if m.err != nil { + return nil, m.err + } + return m.getTxsEventResp, nil +} - price, err := client.GetGasPrice(ctx, chainID) - require.NoError(t, err, "Failed for chainID: %s", chainID) - require.NotNil(t, price) - } - }) +func (m *mockTxServiceClient) GetTx(ctx context.Context, req *tx.GetTxRequest, opts ...grpc.CallOption) (*tx.GetTxResponse, error) { + return nil, nil } -// mockUExecutorQueryClient implements uexecutortypes.QueryClient for testing type mockUExecutorQueryClient struct { + uexecutortypes.QueryClient gasPriceResp *uexecutortypes.QueryGasPriceResponse err error } diff --git a/universalClient/tss/coordinator/coordinator.go b/universalClient/tss/coordinator/coordinator.go index ddfcf7bb..1751415a 100644 --- a/universalClient/tss/coordinator/coordinator.go +++ b/universalClient/tss/coordinator/coordinator.go @@ -162,15 +162,15 @@ func (c *Coordinator) GetMultiAddrsFromPeerID(ctx context.Context, peerID string // GetLatestBlockNum gets the latest block number from pushCore. func (c *Coordinator) GetLatestBlockNum() (uint64, error) { - return c.pushCore.GetLatestBlockNum() + return c.pushCore.GetLatestBlock() } // IsPeerCoordinator checks if the given peerID is the coordinator for the current block. // Uses cached allValidators for performance. func (c *Coordinator) IsPeerCoordinator(ctx context.Context, peerID string) (bool, error) { - currentBlock, err := c.pushCore.GetLatestBlockNum() + currentBlock, err := c.pushCore.GetLatestBlock() if err != nil { - return false, errors.Wrap(err, "failed to get latest block number") + return false, errors.Wrap(err, "failed to get latest block") } // Use cached validators @@ -215,9 +215,16 @@ func (c *Coordinator) IsPeerCoordinator(ctx context.Context, peerID string) (boo return coordValidatorAddr == validatorAddress, nil } -// GetCurrentTSSKeyId gets the current TSS key ID from pushCore. -func (c *Coordinator) GetCurrentTSSKeyId() (string, error) { - return c.pushCore.GetCurrentTSSKeyId() +// GetCurrentTSSKey gets the current TSS key ID and public key from pushCore. +func (c *Coordinator) GetCurrentTSSKey() (string, string, error) { + key, err := c.pushCore.GetCurrentKey() + if err != nil { + return "", "", err + } + if key == nil { + return "", "", nil // No key exists + } + return key.KeyId, key.TssPubkey, nil } // GetEligibleUV returns eligible validators for the given protocol type. @@ -298,7 +305,7 @@ func (c *Coordinator) pollLoop(ctx context.Context) { // updateValidators fetches and caches all validators. func (c *Coordinator) updateValidators() { - allValidators, err := c.pushCore.GetUniversalValidators() + allValidators, err := c.pushCore.GetAllUniversalValidators() if err != nil { c.logger.Warn().Err(err).Msg("failed to update validators cache") return @@ -313,9 +320,9 @@ func (c *Coordinator) updateValidators() { // processPendingEvents checks if this node is coordinator, and only then reads DB and processes events. func (c *Coordinator) processPendingEvents(ctx context.Context) error { - currentBlock, err := c.pushCore.GetLatestBlockNum() + currentBlock, err := c.pushCore.GetLatestBlock() if err != nil { - return errors.Wrap(err, "failed to get latest block number") + return errors.Wrap(err, "failed to get latest block") } // Use cached validators (updated at polling interval) @@ -624,10 +631,14 @@ func (c *Coordinator) createKeygenSetup(threshold int, partyIDs []string) ([]byt // Returns the setup data, sign metadata (for participant verification), and error. func (c *Coordinator) createSignSetup(ctx context.Context, eventData []byte, partyIDs []string) ([]byte, *SignMetadata, error) { // Get current TSS keyId from pushCore - keyIDStr, err := c.pushCore.GetCurrentTSSKeyId() + key, err := c.pushCore.GetCurrentKey() if err != nil { return nil, nil, errors.Wrap(err, "failed to get current TSS keyId") } + if key == nil { + return nil, nil, errors.New("no TSS key exists") + } + keyIDStr := key.KeyId // Load keyshare to ensure it exists (validation) keyshareBytes, err := c.keyshareManager.Get(keyIDStr) @@ -720,10 +731,14 @@ func (c *Coordinator) buildSignTransaction(ctx context.Context, eventData []byte // @dev - Although tss lib can also take pending leave participants in oldParticipantIndices, we don't use that since it needs to be considered that old participants are gone and will only result in errors. func (c *Coordinator) createQcSetup(ctx context.Context, threshold int, partyIDs []string, participants []*types.UniversalValidator) ([]byte, error) { // Get current TSS keyId from pushCore - keyIDStr, err := c.pushCore.GetCurrentTSSKeyId() + key, err := c.pushCore.GetCurrentKey() if err != nil { return nil, errors.Wrap(err, "failed to get current TSS keyId") } + if key == nil { + return nil, errors.New("no TSS key exists") + } + keyIDStr := key.KeyId // Load old keyshare to get the key we're changing oldKeyshareBytes, err := c.keyshareManager.Get(keyIDStr) diff --git a/universalClient/tss/coordinator/coordinator_test.go b/universalClient/tss/coordinator/coordinator_test.go index efc37444..c5f37443 100644 --- a/universalClient/tss/coordinator/coordinator_test.go +++ b/universalClient/tss/coordinator/coordinator_test.go @@ -19,6 +19,7 @@ import ( "github.com/pushchain/push-chain-node/universalClient/store" "github.com/pushchain/push-chain-node/universalClient/tss/eventstore" "github.com/pushchain/push-chain-node/universalClient/tss/keyshare" + utsstypes "github.com/pushchain/push-chain-node/x/utss/types" "github.com/pushchain/push-chain-node/x/uvalidator/types" ) @@ -29,6 +30,7 @@ type mockPushCoreClient struct { latestBlock uint64 validators []*types.UniversalValidator currentTSSKeyId string + currentTSSPubkey string getBlockNumErr error getValidatorsErr error getKeyIdErr error @@ -36,22 +38,24 @@ type mockPushCoreClient struct { func newMockPushCoreClient() *mockPushCoreClient { return &mockPushCoreClient{ - latestBlock: 100, - currentTSSKeyId: "test-key-id", - validators: []*types.UniversalValidator{}, + latestBlock: 100, + currentTSSKeyId: "test-key-id", + currentTSSPubkey: "test-pubkey", + validators: []*types.UniversalValidator{}, } } -func (m *mockPushCoreClient) GetLatestBlockNum() (uint64, error) { +func (m *mockPushCoreClient) GetLatestBlock() (uint64, error) { m.mu.RLock() defer m.mu.RUnlock() if m.getBlockNumErr != nil { return 0, m.getBlockNumErr } + // Create a mock block response return m.latestBlock, nil } -func (m *mockPushCoreClient) GetUniversalValidators() ([]*types.UniversalValidator, error) { +func (m *mockPushCoreClient) GetAllUniversalValidators() ([]*types.UniversalValidator, error) { m.mu.RLock() defer m.mu.RUnlock() if m.getValidatorsErr != nil { @@ -60,13 +64,30 @@ func (m *mockPushCoreClient) GetUniversalValidators() ([]*types.UniversalValidat return m.validators, nil } -func (m *mockPushCoreClient) GetCurrentTSSKeyId() (string, error) { +func (m *mockPushCoreClient) GetCurrentKey() (*utsstypes.TssKey, error) { m.mu.RLock() defer m.mu.RUnlock() if m.getKeyIdErr != nil { - return "", m.getKeyIdErr + return nil, m.getKeyIdErr } - return m.currentTSSKeyId, nil + if m.currentTSSKeyId == "" { + return nil, nil // No key exists + } + return &utsstypes.TssKey{ + KeyId: m.currentTSSKeyId, + TssPubkey: m.currentTSSPubkey, + }, nil +} + +func (m *mockPushCoreClient) GetCurrentTSSKey() (string, string, error) { + key, err := m.GetCurrentKey() + if err != nil { + return "", "", err + } + if key == nil { + return "", "", errors.New("no TSS key found") + } + return key.KeyId, key.TssPubkey, nil } func (m *mockPushCoreClient) Close() error { diff --git a/universalClient/tss/maintenance/maintenance.go b/universalClient/tss/maintenance/maintenance.go index 88ad2207..f7e0fff3 100644 --- a/universalClient/tss/maintenance/maintenance.go +++ b/universalClient/tss/maintenance/maintenance.go @@ -170,7 +170,7 @@ func (h *Handler) clearTerminalEvents(ctx context.Context) { // handleExpiredEvents finds and processes expired events. func (h *Handler) handleExpiredEvents(ctx context.Context) error { - currentBlock, err := h.pushCore.GetLatestBlockNum() + currentBlock, err := h.pushCore.GetLatestBlock() if err != nil { return errors.Wrap(err, "failed to get current block") } diff --git a/universalClient/tss/sessionmanager/sessionmanager.go b/universalClient/tss/sessionmanager/sessionmanager.go index 9d01b2ed..83cef323 100644 --- a/universalClient/tss/sessionmanager/sessionmanager.go +++ b/universalClient/tss/sessionmanager/sessionmanager.go @@ -508,7 +508,7 @@ func (sm *SessionManager) createSession(ctx context.Context, event *store.PCEven case string(coordinator.ProtocolKeyrefresh): // Get current keyID - keyID, err := sm.coordinator.GetCurrentTSSKeyId() + keyID, _, err := sm.coordinator.GetCurrentTSSKey() if err != nil { return nil, errors.Wrap(err, "failed to get current TSS keyId") } @@ -530,7 +530,7 @@ func (sm *SessionManager) createSession(ctx context.Context, event *store.PCEven case string(coordinator.ProtocolQuorumChange): // Get current keyID - keyID, err := sm.coordinator.GetCurrentTSSKeyId() + keyID, _, err := sm.coordinator.GetCurrentTSSKey() if err != nil { return nil, errors.Wrap(err, "failed to get current TSS keyId for quorumchange") } @@ -564,7 +564,7 @@ func (sm *SessionManager) createSession(ctx context.Context, event *store.PCEven case string(coordinator.ProtocolSign): // Get current keyID - keyID, err := sm.coordinator.GetCurrentTSSKeyId() + keyID, _, err := sm.coordinator.GetCurrentTSSKey() if err != nil { return nil, errors.Wrap(err, "failed to get current TSS keyId") } From 24ff47a33ab12db8d5aeae6b78ec02eb0232e592 Mon Sep 17 00:00:00 2001 From: aman035 Date: Tue, 13 Jan 2026 20:21:43 +0530 Subject: [PATCH 118/120] refactor: constant package --- universalClient/authz/tx_signer.go | 2 +- universalClient/config/config.go | 11 ++++------- universalClient/config/config_test.go | 9 +++++---- universalClient/constant/constant.go | 16 ++++++++++++---- universalClient/core/startup_validator.go | 4 ++-- 5 files changed, 24 insertions(+), 18 deletions(-) diff --git a/universalClient/authz/tx_signer.go b/universalClient/authz/tx_signer.go index f3db474d..b859bf3f 100644 --- a/universalClient/authz/tx_signer.go +++ b/universalClient/authz/tx_signer.go @@ -432,7 +432,7 @@ func (ts *TxSigner) broadcastTransaction(_ context.Context, txBytes []byte) (*sd // checks if a message type is allowed for AuthZ execution func isAllowedMsgType(msgType string) bool { - return slices.Contains(constant.SupportedMessages, msgType) + return slices.Contains(constant.RequiredMsgGrants, msgType) } // parseSequenceMismatch attempts to parse expected and got sequence numbers from a raw log diff --git a/universalClient/config/config.go b/universalClient/config/config.go index 8138ab57..8fa7c628 100644 --- a/universalClient/config/config.go +++ b/universalClient/config/config.go @@ -6,11 +6,8 @@ import ( "fmt" "os" "path/filepath" -) -const ( - configSubdir = "config" - configFileName = "pushuv_config.json" + "github.com/pushchain/push-chain-node/universalClient/constant" ) //go:embed default_config.json @@ -172,12 +169,12 @@ func Save(cfg *Config, basePath string) error { return fmt.Errorf("invalid config: %w", err) } - configDir := filepath.Join(basePath, configSubdir) + configDir := filepath.Join(basePath, constant.ConfigSubdir) if err := os.MkdirAll(configDir, 0o750); err != nil { return fmt.Errorf("failed to create config directory: %w", err) } - configFile := filepath.Join(configDir, configFileName) + configFile := filepath.Join(configDir, constant.ConfigFileName) data, err := json.MarshalIndent(cfg, "", " ") if err != nil { return fmt.Errorf("failed to marshal config: %w", err) @@ -191,7 +188,7 @@ func Save(cfg *Config, basePath string) error { // Load reads and returns the config from /config/pushuv_config.json. func Load(basePath string) (Config, error) { - configFile := filepath.Join(basePath, configSubdir, configFileName) + configFile := filepath.Join(basePath, constant.ConfigSubdir, constant.ConfigFileName) data, err := os.ReadFile(filepath.Clean(configFile)) if err != nil { return Config{}, fmt.Errorf("failed to read config file: %w", err) diff --git a/universalClient/config/config_test.go b/universalClient/config/config_test.go index f444e0bb..e64951f8 100644 --- a/universalClient/config/config_test.go +++ b/universalClient/config/config_test.go @@ -6,6 +6,7 @@ import ( "path/filepath" "testing" + "github.com/pushchain/push-chain-node/universalClient/constant" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) @@ -238,7 +239,7 @@ func TestSaveAndLoad(t *testing.T) { require.NoError(t, err) // Verify file exists - configPath := filepath.Join(tempDir, configSubdir, configFileName) + configPath := filepath.Join(tempDir, constant.ConfigSubdir, constant.ConfigFileName) _, err = os.Stat(configPath) assert.NoError(t, err) @@ -278,12 +279,12 @@ func TestSaveAndLoad(t *testing.T) { t.Run("Load invalid JSON", func(t *testing.T) { // Create config directory - configDir := filepath.Join(tempDir, "invalid", configSubdir) + configDir := filepath.Join(tempDir, "invalid", constant.ConfigSubdir) err := os.MkdirAll(configDir, 0o750) require.NoError(t, err) // Write invalid JSON - configPath := filepath.Join(configDir, configFileName) + configPath := filepath.Join(configDir, constant.ConfigFileName) err = os.WriteFile(configPath, []byte("{invalid json}"), 0o600) require.NoError(t, err) @@ -305,7 +306,7 @@ func TestSaveAndLoad(t *testing.T) { require.NoError(t, err) // Verify directory was created - configDir := filepath.Join(newDir, configSubdir) + configDir := filepath.Join(newDir, constant.ConfigSubdir) _, err = os.Stat(configDir) assert.NoError(t, err) }) diff --git a/universalClient/constant/constant.go b/universalClient/constant/constant.go index 3b3b1950..e7d27fc1 100644 --- a/universalClient/constant/constant.go +++ b/universalClient/constant/constant.go @@ -2,19 +2,27 @@ package constant import "os" -// Node configuration constants +// / (e.g., /home/universal/.puniversal) +// └── config/ +// +// └── pushuv_config.json const ( NodeDir = ".puniversal" + + ConfigSubdir = "config" + ConfigFileName = "pushuv_config.json" ) var ( DefaultNodeHome = os.ExpandEnv("$HOME/") + NodeDir ) -// SupportedMessages contains all the supported message type URLs -// that the Universal Validator should process. -var SupportedMessages = []string{ +// RequiredMsgGrants contains all the required message type URLs +// that must be granted via AuthZ for the Universal Validator to function. +// These messages are executed on behalf of the core validator by the grantee (hotkey of the Universal Validator). +var RequiredMsgGrants = []string{ "/uexecutor.v1.MsgVoteInbound", "/uexecutor.v1.MsgVoteGasPrice", + "/uexecutor.v1.MsgVoteOutbound", "/utss.v1.MsgVoteTssKeyProcess", } diff --git a/universalClient/core/startup_validator.go b/universalClient/core/startup_validator.go index 41d51f14..80c050e3 100644 --- a/universalClient/core/startup_validator.go +++ b/universalClient/core/startup_validator.go @@ -141,7 +141,7 @@ func (sv *StartupValidator) validateGrants(grants []GrantInfo, granteeAddr strin } // Check if this is a required message - for _, requiredMsg := range constant.SupportedMessages { + for _, requiredMsg := range constant.RequiredMsgGrants { if grant.MessageType == requiredMsg { authorizedMessages[grant.MessageType] = grant.Granter if granter == "" { @@ -154,7 +154,7 @@ func (sv *StartupValidator) validateGrants(grants []GrantInfo, granteeAddr strin // Check if all required messages are authorized var missingMessages []string - for _, requiredMsg := range constant.SupportedMessages { + for _, requiredMsg := range constant.RequiredMsgGrants { if _, ok := authorizedMessages[requiredMsg]; !ok { missingMessages = append(missingMessages, requiredMsg) } From 2f32bcfc453e44d8b9bc87efff61b90f2c310ead Mon Sep 17 00:00:00 2001 From: aman035 Date: Tue, 13 Jan 2026 20:31:22 +0530 Subject: [PATCH 119/120] fix: push client --- universalClient/chains/push/client.go | 2 +- universalClient/chains/push/client_test.go | 3 +-- universalClient/chains/push/event_watcher.go | 2 +- universalClient/chains/push/event_watcher_test.go | 13 ++++++------- 4 files changed, 9 insertions(+), 11 deletions(-) diff --git a/universalClient/chains/push/client.go b/universalClient/chains/push/client.go index 609048b7..68cd81de 100644 --- a/universalClient/chains/push/client.go +++ b/universalClient/chains/push/client.go @@ -76,7 +76,7 @@ func (c *Config) applyDefaults() { // PushClient defines the interface for interacting with the Push chain. // This allows for easier testing and dependency injection. type PushClient interface { - GetLatestBlockNum() (uint64, error) + GetLatestBlock() (uint64, error) GetTxsByEvents(query string, minHeight, maxHeight uint64, limit uint64) ([]*pushcore.TxResult, error) } diff --git a/universalClient/chains/push/client_test.go b/universalClient/chains/push/client_test.go index 0a84e385..0feda53e 100644 --- a/universalClient/chains/push/client_test.go +++ b/universalClient/chains/push/client_test.go @@ -22,7 +22,7 @@ type mockPushClient struct { err error } -func (m *mockPushClient) GetLatestBlockNum() (uint64, error) { +func (m *mockPushClient) GetLatestBlock() (uint64, error) { return m.latestBlock, m.err } @@ -244,4 +244,3 @@ func TestConfig_ApplyDefaults(t *testing.T) { assert.Equal(t, uint64(50), cfg.QueryLimit) }) } - diff --git a/universalClient/chains/push/event_watcher.go b/universalClient/chains/push/event_watcher.go index 1a60a3fa..d3951f92 100644 --- a/universalClient/chains/push/event_watcher.go +++ b/universalClient/chains/push/event_watcher.go @@ -113,7 +113,7 @@ func (w *EventWatcher) watchLoop() { // pollForEvents queries the chain for new events and stores them. // Processes blocks in configurable chunks to avoid overwhelming the chain. func (w *EventWatcher) pollForEvents() error { - latestBlock, err := w.pushClient.GetLatestBlockNum() + latestBlock, err := w.pushClient.GetLatestBlock() if err != nil { return fmt.Errorf("failed to get latest block: %w", err) } diff --git a/universalClient/chains/push/event_watcher_test.go b/universalClient/chains/push/event_watcher_test.go index 78c55432..c082c2ec 100644 --- a/universalClient/chains/push/event_watcher_test.go +++ b/universalClient/chains/push/event_watcher_test.go @@ -28,14 +28,14 @@ func newTestDBForWatcher(t *testing.T) *gorm.DB { } type mockPushClientForWatcher struct { - latestBlock uint64 - txResults map[string][]*pushcore.TxResult // query -> results - getBlockErr error - getTxsErr error - queriesMade []string + latestBlock uint64 + txResults map[string][]*pushcore.TxResult // query -> results + getBlockErr error + getTxsErr error + queriesMade []string } -func (m *mockPushClientForWatcher) GetLatestBlockNum() (uint64, error) { +func (m *mockPushClientForWatcher) GetLatestBlock() (uint64, error) { return m.latestBlock, m.getBlockErr } @@ -347,4 +347,3 @@ func TestEventQueries(t *testing.T) { assert.Equal(t, "tss_process_initiated.process_id>=0", TSSEventQuery) assert.Equal(t, "outbound_created.tx_id EXISTS", OutboundEventQuery) } - From 0424cff5150daaf37dfc8ca9375c33e85238f835 Mon Sep 17 00:00:00 2001 From: aman035 Date: Tue, 13 Jan 2026 20:31:40 +0530 Subject: [PATCH 120/120] fix: message types --- cmd/puniversald/authz/messages.go | 12 ++++++------ cmd/puniversald/authz/messages_test.go | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/cmd/puniversald/authz/messages.go b/cmd/puniversald/authz/messages.go index 026f0382..bb6782e8 100644 --- a/cmd/puniversald/authz/messages.go +++ b/cmd/puniversald/authz/messages.go @@ -26,18 +26,18 @@ func ParseMessageFromArgs(msgType string, msgArgs []string) (sdk.Msg, error) { return nil, fmt.Errorf("invalid tx type (must be number 0-4): %w", err) } - var txType uetypes.InboundTxType + var txType uetypes.TxType switch txTypeInt { case 0: - txType = uetypes.InboundTxType_UNSPECIFIED_TX + txType = uetypes.TxType_UNSPECIFIED_TX case 1: - txType = uetypes.InboundTxType_GAS + txType = uetypes.TxType_GAS case 2: - txType = uetypes.InboundTxType_FUNDS + txType = uetypes.TxType_FUNDS case 3: - txType = uetypes.InboundTxType_FUNDS_AND_PAYLOAD + txType = uetypes.TxType_FUNDS_AND_PAYLOAD case 4: - txType = uetypes.InboundTxType_GAS_AND_PAYLOAD + txType = uetypes.TxType_GAS_AND_PAYLOAD default: return nil, fmt.Errorf("invalid tx type: %d (must be 0-4)", txTypeInt) } diff --git a/cmd/puniversald/authz/messages_test.go b/cmd/puniversald/authz/messages_test.go index 6b331d18..5d4094ce 100644 --- a/cmd/puniversald/authz/messages_test.go +++ b/cmd/puniversald/authz/messages_test.go @@ -56,7 +56,7 @@ func TestParseMsgVoteInbound(t *testing.T) { assert.Equal(t, "1000", voteMsg.Inbound.Amount) assert.Equal(t, "0xasset", voteMsg.Inbound.AssetAddr) assert.Equal(t, "1", voteMsg.Inbound.LogIndex) - assert.Equal(t, uetypes.InboundTxType_GAS, voteMsg.Inbound.TxType) + assert.Equal(t, uetypes.TxType_GAS, voteMsg.Inbound.TxType) }, }, { @@ -77,7 +77,7 @@ func TestParseMsgVoteInbound(t *testing.T) { validate: func(t *testing.T, msg interface{}) { voteMsg, ok := msg.(*uetypes.MsgVoteInbound) require.True(t, ok) - assert.Equal(t, uetypes.InboundTxType_FUNDS, voteMsg.Inbound.TxType) + assert.Equal(t, uetypes.TxType_FUNDS, voteMsg.Inbound.TxType) }, }, { @@ -98,7 +98,7 @@ func TestParseMsgVoteInbound(t *testing.T) { validate: func(t *testing.T, msg interface{}) { voteMsg, ok := msg.(*uetypes.MsgVoteInbound) require.True(t, ok) - assert.Equal(t, uetypes.InboundTxType_UNSPECIFIED_TX, voteMsg.Inbound.TxType) + assert.Equal(t, uetypes.TxType_UNSPECIFIED_TX, voteMsg.Inbound.TxType) }, }, {