From a52e4f2b6b23e960bdeeabf2d5d5e7ca807df964 Mon Sep 17 00:00:00 2001 From: Charly Date: Thu, 25 May 2023 17:31:43 +0200 Subject: [PATCH 1/2] add `ACKUPGRADE` to 04-channel `State` enum (#3654) * update proto * update protodocs --- docs/client/swagger-ui/swagger.yaml | 490 +++++++++++++++++--- modules/core/04-channel/types/channel.pb.go | 121 ++--- proto/ibc/core/channel/v1/channel.proto | 3 + 3 files changed, 498 insertions(+), 116 deletions(-) diff --git a/docs/client/swagger-ui/swagger.yaml b/docs/client/swagger-ui/swagger.yaml index 0a27b915855..97f27e6704b 100644 --- a/docs/client/swagger-ui/swagger.yaml +++ b/docs/client/swagger-ui/swagger.yaml @@ -8886,6 +8886,7 @@ paths: - STATE_CLOSED - STATE_INITUPGRADE - STATE_TRYUPGRADE + - STATE_ACKUPGRADE default: STATE_UNINITIALIZED_UNSPECIFIED description: >- State defines if a channel is in one of the following @@ -8907,6 +8908,9 @@ paths: - STATE_TRYUPGRADE: A channel has acknowledged the upgrade handshake step on the counterparty chain. The counterparty chain that accepts the upgrade should set the channel state from OPEN to UPGRADETRY. + - STATE_ACKUPGRADE: A channel has verified the counterparty chain is in UPGRADETRY. + However, there are still in-flight packets on its end + waiting to be flushed before it can move to OPEN. ordering: title: whether the channel is ordered or unordered type: string @@ -9295,6 +9299,7 @@ paths: - STATE_CLOSED - STATE_INITUPGRADE - STATE_TRYUPGRADE + - STATE_ACKUPGRADE default: STATE_UNINITIALIZED_UNSPECIFIED description: >- State defines if a channel is in one of the following @@ -9316,6 +9321,9 @@ paths: - STATE_TRYUPGRADE: A channel has acknowledged the upgrade handshake step on the counterparty chain. The counterparty chain that accepts the upgrade should set the channel state from OPEN to UPGRADETRY. + - STATE_ACKUPGRADE: A channel has verified the counterparty chain is in UPGRADETRY. + However, there are still in-flight packets on its end + waiting to be flushed before it can move to OPEN. ordering: title: whether the channel is ordered or unordered type: string @@ -9355,6 +9363,15 @@ paths: title: >- opaque channel version, which is agreed upon during the handshake + upgrade_sequence: + type: string + format: uint64 + title: >- + upgrade sequence indicates the latest upgrade attempt + performed by this channel + + the value of 0 indicates the channel has never been + upgraded description: >- Channel defines pipeline for exactly-once packet delivery between specific @@ -12813,34 +12830,111 @@ paths: format: uint64 tags: - Query - /ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/upgrade_error: + /ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/upgrade: get: - summary: UpgradeError returns the error receipt if the upgrade handshake failed. - operationId: UpgradeError + summary: Upgrade returns the upgrade for a given port and channel id. + operationId: Upgrade responses: '200': description: A successful response. schema: type: object properties: - error_receipt: + upgrade: type: object properties: - sequence: + fields: + type: object + properties: + ordering: + type: string + enum: + - ORDER_NONE_UNSPECIFIED + - ORDER_UNORDERED + - ORDER_ORDERED + default: ORDER_NONE_UNSPECIFIED + description: >- + - ORDER_NONE_UNSPECIFIED: zero-value for channel + ordering + - ORDER_UNORDERED: packets can be delivered in any order, which may differ from the order in + which they were sent. + - ORDER_ORDERED: packets are delivered exactly in the order which they were sent + title: Order defines if a channel is ORDERED or UNORDERED + connection_hops: + type: array + items: + type: string + version: + type: string + description: >- + UpgradeFields are the fields in a channel end which may be + changed + + during a channel upgrade. + timeout: + type: object + properties: + height: + title: >- + block height after which the packet or upgrade times + out + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each + height while keeping + + RevisionNumber the same. However some consensus + algorithms may choose to + + reset the height in certain conditions e.g. hard + forks, state-machine + + breaking changes In these cases, the RevisionNumber is + incremented so that + + height continues to be monitonically increasing even + as the RevisionHeight + + gets reset + timestamp: + type: string + format: uint64 + title: >- + block timestamp (in nanoseconds) after which the + packet or upgrade times out + description: >- + Timeout defines an execution deadline structure for + 04-channel handlers. + + This includes packet lifecycle handlers as well as the + upgrade handshake handlers. + + A valid Timeout contains either one or both of a timestamp + and block height (sequence). + latest_sequence_send: type: string format: uint64 - title: the channel upgrade sequence - error: - type: string - title: the error message detailing the cause of failure description: >- - ErrorReceipt defines a type which encapsulates the upgrade - sequence and error associated with the + Upgrade is a verifiable type which contains the relevant + information - upgrade handshake failure. When a channel upgrade handshake is - aborted both chains are expected to increment to the + for an attempted upgrade. It provides the proposed changes to + the channel - next sequence. + end, the timeout for this upgrade attempt and the latest + packet sequence sent + + to allow the counterparty to block sends after the upgrade has + started. proof: type: string format: byte @@ -12875,8 +12969,8 @@ paths: gets reset title: >- - QueryUpgradeErrorResponse is the response type for the - Query/QueryUpgradeError RPC method + QueryUpgradeResponse is the response type for the + QueryUpgradeResponse RPC method default: description: An unexpected error response. schema: @@ -13079,23 +13173,40 @@ paths: type: string tags: - Query - /ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/upgrade_sequence: + /ibc/core/channel/v1/channels/{channel_id}/ports/{port_id}/upgrade_error: get: - summary: UpgradeSequence returns the upgrade sequence for a given channel. - operationId: UpgradeSequence + summary: UpgradeError returns the error receipt if the upgrade handshake failed. + operationId: UpgradeError responses: '200': description: A successful response. schema: type: object properties: - upgrade_sequence: - type: string - format: uint64 + error_receipt: + type: object + properties: + sequence: + type: string + format: uint64 + title: the channel upgrade sequence + error: + type: string + title: the error message detailing the cause of failure + description: >- + ErrorReceipt defines a type which encapsulates the upgrade + sequence and error associated with the + + upgrade handshake failure. When a channel upgrade handshake is + aborted both chains are expected to increment to the + + next sequence. proof: type: string format: byte + title: merkle proof of existence proof_height: + title: height at which the proof was retrieved type: object properties: revision_number: @@ -13123,16 +13234,9 @@ paths: RevisionHeight gets reset - title: >- - Height is a monotonically increasing data type - - that can be compared against another Height for the purposes - of updating and - - freezing clients title: >- - QueryUpgradeSequenceResponse is the response type for the - QueryUpgradeSequence RPC method + QueryUpgradeErrorResponse is the response type for the + Query/QueryUpgradeError RPC method default: description: An unexpected error response. schema: @@ -13363,6 +13467,7 @@ paths: - STATE_CLOSED - STATE_INITUPGRADE - STATE_TRYUPGRADE + - STATE_ACKUPGRADE default: STATE_UNINITIALIZED_UNSPECIFIED description: >- State defines if a channel is in one of the following @@ -13384,6 +13489,9 @@ paths: - STATE_TRYUPGRADE: A channel has acknowledged the upgrade handshake step on the counterparty chain. The counterparty chain that accepts the upgrade should set the channel state from OPEN to UPGRADETRY. + - STATE_ACKUPGRADE: A channel has verified the counterparty chain is in UPGRADETRY. + However, there are still in-flight packets on its end + waiting to be flushed before it can move to OPEN. ordering: title: whether the channel is ordered or unordered type: string @@ -13466,6 +13574,7 @@ paths: PageResponse page = 2; } height: + title: query block height type: object properties: revision_number: @@ -13493,13 +13602,6 @@ paths: RevisionHeight gets reset - title: >- - Height is a monotonically increasing data type - - that can be compared against another Height for the purposes - of updating and - - freezing clients title: |- QueryConnectionChannelsResponse is the Response type for the Query/QueryConnectionChannels RPC method @@ -17909,6 +18011,7 @@ definitions: - STATE_CLOSED - STATE_INITUPGRADE - STATE_TRYUPGRADE + - STATE_ACKUPGRADE default: STATE_UNINITIALIZED_UNSPECIFIED description: >- State defines if a channel is in one of the following states: @@ -17928,6 +18031,9 @@ definitions: - STATE_TRYUPGRADE: A channel has acknowledged the upgrade handshake step on the counterparty chain. The counterparty chain that accepts the upgrade should set the channel state from OPEN to UPGRADETRY. + - STATE_ACKUPGRADE: A channel has verified the counterparty chain is in UPGRADETRY. + However, there are still in-flight packets on its end waiting to be + flushed before it can move to OPEN. ordering: title: whether the channel is ordered or unordered type: string @@ -17963,6 +18069,14 @@ definitions: version: type: string title: opaque channel version, which is agreed upon during the handshake + upgrade_sequence: + type: string + format: uint64 + title: >- + upgrade sequence indicates the latest upgrade attempt performed by + this channel + + the value of 0 indicates the channel has never been upgraded description: |- Channel defines pipeline for exactly-once packet delivery between specific modules on separate blockchains, which has at least one end capable of @@ -18011,6 +18125,7 @@ definitions: - STATE_CLOSED - STATE_INITUPGRADE - STATE_TRYUPGRADE + - STATE_ACKUPGRADE default: STATE_UNINITIALIZED_UNSPECIFIED description: >- State defines if a channel is in one of the following states: @@ -18030,6 +18145,9 @@ definitions: - STATE_TRYUPGRADE: A channel has acknowledged the upgrade handshake step on the counterparty chain. The counterparty chain that accepts the upgrade should set the channel state from OPEN to UPGRADETRY. + - STATE_ACKUPGRADE: A channel has verified the counterparty chain is in UPGRADETRY. + However, there are still in-flight packets on its end waiting to be + flushed before it can move to OPEN. ordering: title: whether the channel is ordered or unordered type: string @@ -18546,6 +18664,7 @@ definitions: - STATE_CLOSED - STATE_INITUPGRADE - STATE_TRYUPGRADE + - STATE_ACKUPGRADE default: STATE_UNINITIALIZED_UNSPECIFIED description: >- State defines if a channel is in one of the following states: @@ -18566,6 +18685,9 @@ definitions: - STATE_TRYUPGRADE: A channel has acknowledged the upgrade handshake step on the counterparty chain. The counterparty chain that accepts the upgrade should set the channel state from OPEN to UPGRADETRY. + - STATE_ACKUPGRADE: A channel has verified the counterparty chain is in UPGRADETRY. + However, there are still in-flight packets on its end waiting to + be flushed before it can move to OPEN. ordering: title: whether the channel is ordered or unordered type: string @@ -18603,6 +18725,14 @@ definitions: version: type: string title: opaque channel version, which is agreed upon during the handshake + upgrade_sequence: + type: string + format: uint64 + title: >- + upgrade sequence indicates the latest upgrade attempt performed by + this channel + + the value of 0 indicates the channel has never been upgraded description: >- Channel defines pipeline for exactly-once packet delivery between specific @@ -18668,6 +18798,7 @@ definitions: - STATE_CLOSED - STATE_INITUPGRADE - STATE_TRYUPGRADE + - STATE_ACKUPGRADE default: STATE_UNINITIALIZED_UNSPECIFIED description: >- State defines if a channel is in one of the following states: @@ -18688,6 +18819,9 @@ definitions: - STATE_TRYUPGRADE: A channel has acknowledged the upgrade handshake step on the counterparty chain. The counterparty chain that accepts the upgrade should set the channel state from OPEN to UPGRADETRY. + - STATE_ACKUPGRADE: A channel has verified the counterparty chain is in UPGRADETRY. + However, there are still in-flight packets on its end waiting to + be flushed before it can move to OPEN. ordering: title: whether the channel is ordered or unordered type: string @@ -18814,6 +18948,7 @@ definitions: - STATE_CLOSED - STATE_INITUPGRADE - STATE_TRYUPGRADE + - STATE_ACKUPGRADE default: STATE_UNINITIALIZED_UNSPECIFIED description: >- State defines if a channel is in one of the following states: @@ -18834,6 +18969,9 @@ definitions: - STATE_TRYUPGRADE: A channel has acknowledged the upgrade handshake step on the counterparty chain. The counterparty chain that accepts the upgrade should set the channel state from OPEN to UPGRADETRY. + - STATE_ACKUPGRADE: A channel has verified the counterparty chain is in UPGRADETRY. + However, there are still in-flight packets on its end waiting to + be flushed before it can move to OPEN. ordering: title: whether the channel is ordered or unordered type: string @@ -18911,6 +19049,7 @@ definitions: PageResponse page = 2; } height: + title: query block height type: object properties: revision_number: @@ -18937,13 +19076,6 @@ definitions: RevisionHeight gets reset - title: >- - Height is a monotonically increasing data type - - that can be compared against another Height for the purposes of - updating and - - freezing clients title: |- QueryConnectionChannelsResponse is the Response type for the Query/QueryConnectionChannels RPC method @@ -19437,16 +19569,104 @@ definitions: title: >- QueryUpgradeErrorResponse is the response type for the Query/QueryUpgradeError RPC method - ibc.core.channel.v1.QueryUpgradeSequenceResponse: + ibc.core.channel.v1.QueryUpgradeResponse: type: object properties: - upgrade_sequence: - type: string - format: uint64 + upgrade: + type: object + properties: + fields: + type: object + properties: + ordering: + type: string + enum: + - ORDER_NONE_UNSPECIFIED + - ORDER_UNORDERED + - ORDER_ORDERED + default: ORDER_NONE_UNSPECIFIED + description: |- + - ORDER_NONE_UNSPECIFIED: zero-value for channel ordering + - ORDER_UNORDERED: packets can be delivered in any order, which may differ from the order in + which they were sent. + - ORDER_ORDERED: packets are delivered exactly in the order which they were sent + title: Order defines if a channel is ORDERED or UNORDERED + connection_hops: + type: array + items: + type: string + version: + type: string + description: |- + UpgradeFields are the fields in a channel end which may be changed + during a channel upgrade. + timeout: + type: object + properties: + height: + title: block height after which the packet or upgrade times out + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height + while keeping + + RevisionNumber the same. However some consensus algorithms may + choose to + + reset the height in certain conditions e.g. hard forks, + state-machine + + breaking changes In these cases, the RevisionNumber is + incremented so that + + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset + timestamp: + type: string + format: uint64 + title: >- + block timestamp (in nanoseconds) after which the packet or + upgrade times out + description: >- + Timeout defines an execution deadline structure for 04-channel + handlers. + + This includes packet lifecycle handlers as well as the upgrade + handshake handlers. + + A valid Timeout contains either one or both of a timestamp and + block height (sequence). + latest_sequence_send: + type: string + format: uint64 + description: >- + Upgrade is a verifiable type which contains the relevant information + + for an attempted upgrade. It provides the proposed changes to the + channel + + end, the timeout for this upgrade attempt and the latest packet + sequence sent + + to allow the counterparty to block sends after the upgrade has + started. proof: type: string format: byte + title: merkle proof of existence proof_height: + title: height at which the proof was retrieved type: object properties: revision_number: @@ -19473,16 +19693,9 @@ definitions: RevisionHeight gets reset - title: >- - Height is a monotonically increasing data type - - that can be compared against another Height for the purposes of - updating and - - freezing clients title: >- - QueryUpgradeSequenceResponse is the response type for the - QueryUpgradeSequence RPC method + QueryUpgradeResponse is the response type for the QueryUpgradeResponse RPC + method ibc.core.channel.v1.State: type: string enum: @@ -19493,6 +19706,7 @@ definitions: - STATE_CLOSED - STATE_INITUPGRADE - STATE_TRYUPGRADE + - STATE_ACKUPGRADE default: STATE_UNINITIALIZED_UNSPECIFIED description: >- State defines if a channel is in one of the following states: @@ -19512,3 +19726,163 @@ definitions: - STATE_TRYUPGRADE: A channel has acknowledged the upgrade handshake step on the counterparty chain. The counterparty chain that accepts the upgrade should set the channel state from OPEN to UPGRADETRY. + - STATE_ACKUPGRADE: A channel has verified the counterparty chain is in UPGRADETRY. + However, there are still in-flight packets on its end waiting to be + flushed before it can move to OPEN. + ibc.core.channel.v1.Timeout: + type: object + properties: + height: + title: block height after which the packet or upgrade times out + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height while + keeping + + RevisionNumber the same. However some consensus algorithms may choose + to + + reset the height in certain conditions e.g. hard forks, state-machine + + breaking changes In these cases, the RevisionNumber is incremented so + that + + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset + timestamp: + type: string + format: uint64 + title: >- + block timestamp (in nanoseconds) after which the packet or upgrade + times out + description: >- + Timeout defines an execution deadline structure for 04-channel handlers. + + This includes packet lifecycle handlers as well as the upgrade handshake + handlers. + + A valid Timeout contains either one or both of a timestamp and block + height (sequence). + ibc.core.channel.v1.Upgrade: + type: object + properties: + fields: + type: object + properties: + ordering: + type: string + enum: + - ORDER_NONE_UNSPECIFIED + - ORDER_UNORDERED + - ORDER_ORDERED + default: ORDER_NONE_UNSPECIFIED + description: |- + - ORDER_NONE_UNSPECIFIED: zero-value for channel ordering + - ORDER_UNORDERED: packets can be delivered in any order, which may differ from the order in + which they were sent. + - ORDER_ORDERED: packets are delivered exactly in the order which they were sent + title: Order defines if a channel is ORDERED or UNORDERED + connection_hops: + type: array + items: + type: string + version: + type: string + description: |- + UpgradeFields are the fields in a channel end which may be changed + during a channel upgrade. + timeout: + type: object + properties: + height: + title: block height after which the packet or upgrade times out + type: object + properties: + revision_number: + type: string + format: uint64 + title: the revision that the client is currently on + revision_height: + type: string + format: uint64 + title: the height within the given revision + description: >- + Normally the RevisionHeight is incremented at each height while + keeping + + RevisionNumber the same. However some consensus algorithms may + choose to + + reset the height in certain conditions e.g. hard forks, + state-machine + + breaking changes In these cases, the RevisionNumber is incremented + so that + + height continues to be monitonically increasing even as the + RevisionHeight + + gets reset + timestamp: + type: string + format: uint64 + title: >- + block timestamp (in nanoseconds) after which the packet or upgrade + times out + description: >- + Timeout defines an execution deadline structure for 04-channel + handlers. + + This includes packet lifecycle handlers as well as the upgrade + handshake handlers. + + A valid Timeout contains either one or both of a timestamp and block + height (sequence). + latest_sequence_send: + type: string + format: uint64 + description: >- + Upgrade is a verifiable type which contains the relevant information + + for an attempted upgrade. It provides the proposed changes to the channel + + end, the timeout for this upgrade attempt and the latest packet sequence + sent + + to allow the counterparty to block sends after the upgrade has started. + ibc.core.channel.v1.UpgradeFields: + type: object + properties: + ordering: + type: string + enum: + - ORDER_NONE_UNSPECIFIED + - ORDER_UNORDERED + - ORDER_ORDERED + default: ORDER_NONE_UNSPECIFIED + description: |- + - ORDER_NONE_UNSPECIFIED: zero-value for channel ordering + - ORDER_UNORDERED: packets can be delivered in any order, which may differ from the order in + which they were sent. + - ORDER_ORDERED: packets are delivered exactly in the order which they were sent + title: Order defines if a channel is ORDERED or UNORDERED + connection_hops: + type: array + items: + type: string + version: + type: string + description: |- + UpgradeFields are the fields in a channel end which may be changed + during a channel upgrade. diff --git a/modules/core/04-channel/types/channel.pb.go b/modules/core/04-channel/types/channel.pb.go index c951a6ccb83..09d744c2da9 100644 --- a/modules/core/04-channel/types/channel.pb.go +++ b/modules/core/04-channel/types/channel.pb.go @@ -47,6 +47,9 @@ const ( // A channel has acknowledged the upgrade handshake step on the counterparty chain. // The counterparty chain that accepts the upgrade should set the channel state from OPEN to UPGRADETRY. TRYUPGRADE State = 6 + // A channel has verified the counterparty chain is in UPGRADETRY. + // However, there are still in-flight packets on both ends waiting to be flushed before it can move to OPEN. + ACKUPGRADE State = 7 ) var State_name = map[int32]string{ @@ -57,6 +60,7 @@ var State_name = map[int32]string{ 4: "STATE_CLOSED", 5: "STATE_INITUPGRADE", 6: "STATE_TRYUPGRADE", + 7: "STATE_ACKUPGRADE", } var State_value = map[string]int32{ @@ -67,6 +71,7 @@ var State_value = map[string]int32{ "STATE_CLOSED": 4, "STATE_INITUPGRADE": 5, "STATE_TRYUPGRADE": 6, + "STATE_ACKUPGRADE": 7, } func (x State) String() string { @@ -572,64 +577,64 @@ func init() { func init() { proto.RegisterFile("ibc/core/channel/v1/channel.proto", fileDescriptor_c3a07336710636a0) } var fileDescriptor_c3a07336710636a0 = []byte{ - // 898 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x55, 0xcd, 0x6e, 0xdb, 0x46, - 0x10, 0x26, 0x65, 0xea, 0x6f, 0x64, 0x49, 0xf4, 0xa6, 0x4d, 0x09, 0x22, 0x95, 0x18, 0x23, 0x6d, - 0x95, 0x14, 0x11, 0xe3, 0xb4, 0xe8, 0xdf, 0xcd, 0xb6, 0xd8, 0x98, 0xa8, 0x21, 0x09, 0x94, 0x7c, - 0x68, 0x2e, 0x02, 0x45, 0x6e, 0x25, 0x22, 0x12, 0x97, 0x25, 0x57, 0x0a, 0x82, 0x9e, 0x0b, 0x04, - 0x3a, 0xf5, 0x05, 0x04, 0x14, 0xe8, 0x2b, 0xf4, 0x21, 0x02, 0xf4, 0x92, 0x63, 0x4e, 0x45, 0x61, - 0xbf, 0x48, 0xc1, 0xdd, 0xa5, 0x24, 0x07, 0x46, 0x50, 0x14, 0xe8, 0xad, 0x27, 0xee, 0x7c, 0xf3, - 0xcd, 0x37, 0xbb, 0xdf, 0x90, 0x5c, 0xb8, 0x1b, 0x8c, 0x3d, 0xd3, 0x23, 0x31, 0x36, 0xbd, 0xa9, - 0x1b, 0x86, 0x78, 0x66, 0x2e, 0x8f, 0xb2, 0x65, 0x3b, 0x8a, 0x09, 0x25, 0xe8, 0x56, 0x30, 0xf6, - 0xda, 0x29, 0xa5, 0x9d, 0xe1, 0xcb, 0x23, 0xfd, 0xbd, 0x09, 0x99, 0x10, 0x96, 0x37, 0xd3, 0x15, - 0xa7, 0xea, 0xcd, 0xad, 0xda, 0x2c, 0xc0, 0x21, 0x65, 0x62, 0x6c, 0xc5, 0x09, 0x87, 0xbf, 0xe7, - 0xa0, 0x78, 0xca, 0x55, 0xd0, 0x23, 0xc8, 0x27, 0xd4, 0xa5, 0x58, 0x93, 0x0d, 0xb9, 0x55, 0x7b, - 0xac, 0xb7, 0x6f, 0xe8, 0xd3, 0x1e, 0xa4, 0x0c, 0x87, 0x13, 0xd1, 0x17, 0x50, 0x22, 0xb1, 0x8f, - 0xe3, 0x20, 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 0x07, 0xea, 0xa6, 0x7f, 0x46, 0x2b, 0xe8, 0xb5, 0xd5, 0xda, - 0x80, 0x2d, 0xa2, 0x2b, 0x2f, 0x7f, 0x6b, 0x48, 0x0f, 0x9e, 0x43, 0x9e, 0xfd, 0x28, 0xd1, 0x3d, - 0xb8, 0xdd, 0x73, 0x3a, 0x96, 0x33, 0xea, 0xf6, 0xba, 0xd6, 0x5b, 0xa7, 0x67, 0x1b, 0x4c, 0x71, - 0x74, 0x08, 0x75, 0xce, 0xba, 0xe8, 0xb2, 0xa7, 0xd5, 0x51, 0x65, 0xbd, 0xba, 0x5a, 0x1b, 0xe5, - 0x0d, 0x90, 0x1e, 0x9f, 0x73, 0x32, 0x86, 0x38, 0xbe, 0x08, 0x79, 0xe3, 0x93, 0xc1, 0xab, 0xcb, - 0x86, 0xfc, 0xfa, 0xb2, 0x21, 0xff, 0x75, 0xd9, 0x90, 0x7f, 0xb9, 0x6a, 0x48, 0xaf, 0xaf, 0x1a, - 0xd2, 0x9b, 0xab, 0x86, 0xf4, 0xf4, 0xeb, 0x49, 0x40, 0xa7, 0x8b, 0x71, 0xdb, 0x23, 0x73, 0xd3, - 0x23, 0xc9, 0x9c, 0x24, 0x66, 0x30, 0xf6, 0x1e, 0x4e, 0x88, 0xb9, 0xfc, 0xd2, 0x9c, 0x13, 0x7f, - 0x31, 0xc3, 0x09, 0xbf, 0xa0, 0x1f, 0x7d, 0xfe, 0x30, 0xbb, 0xf1, 0xe9, 0x8b, 0x08, 0x27, 0xe3, - 0x02, 0xbb, 0xa1, 0x3f, 0xfb, 0x3b, 0x00, 0x00, 0xff, 0xff, 0xf1, 0xb0, 0x25, 0x8f, 0x12, 0x08, - 0x00, 0x00, + // 909 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x56, 0xcd, 0x8e, 0xda, 0x56, + 0x14, 0xc6, 0x8c, 0xf9, 0x3b, 0xcc,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, 0x49, 0x59, 0xed, 0xce, 0x93, 0x84, 0x55, 0xe0, 0xac, 0x14, 0xd1, 0xe4, 0x97, 0xbf, 0xd5, + 0x32, 0xf7, 0x9f, 0x43, 0x8e, 0xbd, 0x4e, 0xd1, 0x5d, 0x38, 0xea, 0x5b, 0x5d, 0xc3, 0x1a, 0xf7, + 0xfa, 0x3d, 0xe3, 0x2d, 0x8f, 0xd8, 0x6d, 0xc4, 0x38, 0x3a, 0x86, 0x2a, 0x67, 0x5d, 0xf4, 0xd8, + 0xd5, 0xe8, 0x2a, 0x92, 0x76, 0xb0, 0xde, 0xe8, 0xa5, 0x2d, 0x10, 0x9b, 0xc4, 0x39, 0x09, 0x43, + 0x98, 0x24, 0x52, 0x3e, 0xf8, 0x74, 0xf8, 0xea, 0xb2, 0x26, 0xbd, 0xbe, 0xac, 0x49, 0x7f, 0x5f, + 0xd6, 0xa4, 0x5f, 0xae, 0x6a, 0x99, 0xd7, 0x57, 0xb5, 0xcc, 0x9b, 0xab, 0x5a, 0xe6, 0xe9, 0xb7, + 0x53, 0x8f, 0xce, 0x96, 0x93, 0xa6, 0x43, 0x16, 0x2d, 0x87, 0x44, 0x0b, 0x12, 0xb5, 0xbc, 0x89, + 0xf3, 0x60, 0x4a, 0x5a, 0xab, 0xaf, 0x5b, 0x0b, 0xe2, 0x2e, 0xe7, 0x38, 0xe2, 0x9f, 0xf1, 0x87, + 0x5f, 0x3e, 0x48, 0xfe, 0x17, 0xd0, 0x17, 0x01, 0x8e, 0x26, 0x79, 0xf6, 0x1d, 0xff, 0xe2, 0x9f, + 0x00, 0x00, 0x00, 0xff, 0xff, 0x52, 0x38, 0xf7, 0x4b, 0x38, 0x08, 0x00, 0x00, } func (m *Channel) Marshal() (dAtA []byte, err error) { diff --git a/proto/ibc/core/channel/v1/channel.proto b/proto/ibc/core/channel/v1/channel.proto index 01c73b19b5c..80299141a3c 100644 --- a/proto/ibc/core/channel/v1/channel.proto +++ b/proto/ibc/core/channel/v1/channel.proto @@ -74,6 +74,9 @@ enum State { // A channel has acknowledged the upgrade handshake step on the counterparty chain. // The counterparty chain that accepts the upgrade should set the channel state from OPEN to UPGRADETRY. STATE_TRYUPGRADE = 6 [(gogoproto.enumvalue_customname) = "TRYUPGRADE"]; + // A channel has verified the counterparty chain is in UPGRADETRY. + // However, there are still in-flight packets on both ends waiting to be flushed before it can move to OPEN. + STATE_ACKUPGRADE = 7 [(gogoproto.enumvalue_customname) = "ACKUPGRADE"]; } // Order defines if a channel is ORDERED or UNORDERED From 7b7163c39527830915f9f631d2ea466a39ad3307 Mon Sep 17 00:00:00 2001 From: Charly Date: Fri, 26 May 2023 10:34:04 +0200 Subject: [PATCH 2/2] add event emitter for error receipts (#3659) --- modules/core/04-channel/keeper/events.go | 24 ++++++++++++++++++++++++ modules/core/04-channel/types/events.go | 1 + 2 files changed, 25 insertions(+) diff --git a/modules/core/04-channel/keeper/events.go b/modules/core/04-channel/keeper/events.go index d8574abd73b..62b5e5c0eed 100644 --- a/modules/core/04-channel/keeper/events.go +++ b/modules/core/04-channel/keeper/events.go @@ -292,3 +292,27 @@ func emitChannelUpgradeInitEvent(ctx sdk.Context, portID string, channelID strin ), }) } + +// emitErrorReceiptEvent emits an error receipt event +// +//lint:ignore U1000 Ignore unused function temporarily for debugging +func emitErrorReceiptEvent(ctx sdk.Context, portID string, channelID string, currentChannel types.Channel, upgrade types.Upgrade, err error) { + ctx.EventManager().EmitEvents(sdk.Events{ + sdk.NewEvent( + types.EventTypeChannelUpgradeInit, + sdk.NewAttribute(types.AttributeKeyPortID, portID), + sdk.NewAttribute(types.AttributeKeyChannelID, channelID), + sdk.NewAttribute(types.AttributeCounterpartyPortID, currentChannel.Counterparty.PortId), + sdk.NewAttribute(types.AttributeCounterpartyChannelID, currentChannel.Counterparty.ChannelId), + sdk.NewAttribute(types.AttributeKeyUpgradeConnectionHops, upgrade.Fields.ConnectionHops[0]), + sdk.NewAttribute(types.AttributeKeyUpgradeVersion, upgrade.Fields.Version), + sdk.NewAttribute(types.AttributeKeyUpgradeOrdering, upgrade.Fields.Ordering.String()), + sdk.NewAttribute(types.AttributeKeyUpgradeSequence, fmt.Sprintf("%d", currentChannel.UpgradeSequence)), + sdk.NewAttribute(types.AttributeKeyUpgradeErrorReceipt, err.Error()), + ), + sdk.NewEvent( + sdk.EventTypeMessage, + sdk.NewAttribute(sdk.AttributeKeyModule, types.AttributeValueCategory), + ), + }) +} diff --git a/modules/core/04-channel/types/events.go b/modules/core/04-channel/types/events.go index bd548ddbb17..517f6d1ea0f 100644 --- a/modules/core/04-channel/types/events.go +++ b/modules/core/04-channel/types/events.go @@ -44,6 +44,7 @@ const ( AttributeKeyUpgradeVersion = "upgrade_version" AttributeKeyUpgradeConnectionHops = "upgrade_connection_hops" AttributeKeyUpgradeOrdering = "upgrade_ordering" + AttributeKeyUpgradeErrorReceipt = "upgrade_error_receipt" ) // IBC channel events vars