@agoric/cosmos 0.34.2-dev-4ea2a82.0.4ea2a82 → 0.34.2-dev-2858da6.0.2858da6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Makefile +0 -1
- package/ante/ante.go +2 -2
- package/app/app.go +96 -73
- package/app/sim_test.go +2 -0
- package/app/upgrade.go +6 -6
- package/daemon/cmd/root_test.go +0 -1
- package/git-revision.txt +1 -1
- package/go.mod +116 -83
- package/go.sum +130 -162
- package/package.json +2 -2
- package/proto/agoric/swingset/msgs.proto +0 -1
- package/proto/agoric/vbank/msgs.proto +1 -5
- package/proto/agoric/vibc/msgs.proto +2 -45
- package/scripts/protocgen.sh +1 -10
- package/tests/integrations/types/aminojson_test.go +2 -18
- package/third_party/proto/cosmos/base/query/v1beta1/pagination.proto +3 -2
- package/third_party/proto/cosmos/upgrade/v1beta1/upgrade.proto +3 -2
- package/third_party/proto/ibc/core/channel/v1/channel.proto +22 -6
- package/third_party/proto/ibc/core/client/v1/client.proto +53 -6
- package/types/address_hooks.go +2 -2
- package/types/address_hooks_test.go +3 -3
- package/types/ibc_packet.go +3 -3
- package/types/ibc_packet_test.go +3 -3
- package/x/swingset/types/msgs.pb.go +89 -90
- package/x/vbank/types/msgs.pb.go +8 -10
- package/x/vibc/alias.go +1 -0
- package/x/vibc/keeper/keeper.go +81 -40
- package/x/vibc/keeper/migrations.go +1 -1
- package/x/vibc/keeper/triggers.go +4 -8
- package/x/vibc/types/expected_keepers.go +20 -7
- package/x/vibc/types/ibc_module.go +20 -13
- package/x/vibc/types/msgs.go +3 -60
- package/x/vibc/types/msgs.pb.go +31 -683
- package/x/vibc/types/receiver.go +2 -2
- package/x/vlocalchain/vlocalchain_test.go +1 -1
- package/x/vtransfer/ibc_middleware.go +17 -15
- package/x/vtransfer/ibc_middleware_test.go +53 -30
- package/x/vtransfer/keeper/keeper.go +28 -19
- package/x/vtransfer/types/expected_keepers.go +8 -15
- package/x/vtransfer/utils_test.go +9 -4
- package/go.work +0 -39
- package/go.work.sum +0 -2636
- package/proto/Dockerfile +0 -14
- package/x/vibc/keeper/dynamic_router.go +0 -176
- package/x/vibc/keeper/dynamic_router_test.go +0 -240
- package/x/vibc/keeper/scope.go +0 -114
|
@@ -6,10 +6,6 @@ package types
|
|
|
6
6
|
import (
|
|
7
7
|
context "context"
|
|
8
8
|
fmt "fmt"
|
|
9
|
-
io "io"
|
|
10
|
-
math "math"
|
|
11
|
-
math_bits "math/bits"
|
|
12
|
-
|
|
13
9
|
_ "github.com/cosmos/cosmos-proto"
|
|
14
10
|
github_com_cosmos_cosmos_sdk_types "github.com/cosmos/cosmos-sdk/types"
|
|
15
11
|
_ "github.com/cosmos/cosmos-sdk/types/msgservice"
|
|
@@ -20,6 +16,9 @@ import (
|
|
|
20
16
|
grpc "google.golang.org/grpc"
|
|
21
17
|
codes "google.golang.org/grpc/codes"
|
|
22
18
|
status "google.golang.org/grpc/status"
|
|
19
|
+
io "io"
|
|
20
|
+
math "math"
|
|
21
|
+
math_bits "math/bits"
|
|
23
22
|
)
|
|
24
23
|
|
|
25
24
|
// Reference imports to suppress errors if they are not otherwise used.
|
|
@@ -829,92 +828,92 @@ func init() {
|
|
|
829
828
|
func init() { proto.RegisterFile("agoric/swingset/msgs.proto", fileDescriptor_788baa062b181a57) }
|
|
830
829
|
|
|
831
830
|
var fileDescriptor_788baa062b181a57 = []byte{
|
|
832
|
-
//
|
|
833
|
-
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x57, 0x4d, 0x6c, 0x1b,
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
0xba, 0xe3, 0x28,
|
|
876
|
-
|
|
877
|
-
0x8e, 0x1d, 0xcd, 0x4e, 0x88,
|
|
878
|
-
0x05, 0x12, 0x4c,
|
|
879
|
-
0x1c, 0x9f, 0xfd,
|
|
880
|
-
0xed, 0x07, 0x88, 0xa4, 0x43, 0x41, 0x69, 0xc6, 0xeb, 0x66, 0x95,
|
|
881
|
-
0xe7, 0x41, 0xe6, 0x3c, 0x0f, 0x8b, 0x5f,
|
|
882
|
-
0xe9, 0x41, 0x68, 0xdf, 0xd1, 0x8d, 0xb0, 0x3a,
|
|
883
|
-
0xb1, 0x37, 0xaf, 0x52, 0xc3,
|
|
884
|
-
0xf2, 0x5d, 0x3b, 0x24, 0x09, 0x3e,
|
|
885
|
-
0x40, 0x35, 0x0f, 0xb4, 0xcf, 0xc4, 0x59,
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
0x56,
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
831
|
+
// 1346 bytes of a gzipped FileDescriptorProto
|
|
832
|
+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9a, 0x21, 0x1d, 0x6a, 0x73, 0x96,
|
|
915
|
+
0x7c, 0x35, 0xbf, 0xf8, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, 0x0c, 0x25, 0xac, 0x25, 0xe1, 0x0f,
|
|
916
|
+
0x00, 0x00,
|
|
918
917
|
}
|
|
919
918
|
|
|
920
919
|
// Reference imports to suppress errors if they are not otherwise used.
|
package/x/vbank/types/msgs.pb.go
CHANGED
|
@@ -6,7 +6,6 @@ package types
|
|
|
6
6
|
import (
|
|
7
7
|
context "context"
|
|
8
8
|
fmt "fmt"
|
|
9
|
-
_ "github.com/cosmos/cosmos-sdk/types/msgservice"
|
|
10
9
|
grpc1 "github.com/cosmos/gogoproto/grpc"
|
|
11
10
|
proto "github.com/cosmos/gogoproto/proto"
|
|
12
11
|
grpc "google.golang.org/grpc"
|
|
@@ -27,17 +26,16 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
|
|
|
27
26
|
func init() { proto.RegisterFile("agoric/vbank/msgs.proto", fileDescriptor_4f9d0954f3583404) }
|
|
28
27
|
|
|
29
28
|
var fileDescriptor_4f9d0954f3583404 = []byte{
|
|
30
|
-
//
|
|
29
|
+
// 141 bytes of a gzipped FileDescriptorProto
|
|
31
30
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x4f, 0x4c, 0xcf, 0x2f,
|
|
32
31
|
0xca, 0x4c, 0xd6, 0x2f, 0x4b, 0x4a, 0xcc, 0xcb, 0xd6, 0xcf, 0x2d, 0x4e, 0x2f, 0xd6, 0x2b, 0x28,
|
|
33
|
-
0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x81, 0x48, 0xe8, 0x81, 0x25,
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
0x16, 0x19, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0xe3, 0x8b, 0x6a, 0x41, 0xaa, 0x00, 0x00, 0x00,
|
|
32
|
+
0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x81, 0x48, 0xe8, 0x81, 0x25, 0x8c, 0x58, 0xb9, 0x98, 0x7d, 0x8b,
|
|
33
|
+
0xd3, 0x9d, 0x82, 0x4e, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e, 0xf1, 0xc1, 0x23, 0x39, 0xc6,
|
|
34
|
+
0x09, 0x8f, 0xe5, 0x18, 0x2e, 0x3c, 0x96, 0x63, 0xb8, 0xf1, 0x58, 0x8e, 0x21, 0xca, 0x22, 0x3d,
|
|
35
|
+
0xb3, 0x24, 0xa3, 0x34, 0x49, 0x2f, 0x39, 0x3f, 0x57, 0xdf, 0x11, 0x62, 0x24, 0xc4, 0x00, 0xdd,
|
|
36
|
+
0xe2, 0x94, 0x6c, 0xfd, 0xf4, 0xfc, 0x9c, 0xc4, 0xbc, 0x74, 0xfd, 0xe4, 0xfc, 0xe2, 0xdc, 0xfc,
|
|
37
|
+
0x62, 0xfd, 0x0a, 0xa8, 0x6d, 0x25, 0x95, 0x05, 0xa9, 0xc5, 0x49, 0x6c, 0x60, 0xfb, 0x8c, 0x01,
|
|
38
|
+
0x01, 0x00, 0x00, 0xff, 0xff, 0xdc, 0x56, 0x36, 0x19, 0x8a, 0x00, 0x00, 0x00,
|
|
41
39
|
}
|
|
42
40
|
|
|
43
41
|
// Reference imports to suppress errors if they are not otherwise used.
|
package/x/vibc/alias.go
CHANGED
package/x/vibc/keeper/keeper.go
CHANGED
|
@@ -1,15 +1,20 @@
|
|
|
1
1
|
package keeper
|
|
2
2
|
|
|
3
3
|
import (
|
|
4
|
+
"fmt"
|
|
5
|
+
|
|
6
|
+
corestore "cosmossdk.io/core/store"
|
|
4
7
|
"github.com/cosmos/cosmos-sdk/codec"
|
|
5
8
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
|
6
9
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
sdkioerrors "cosmossdk.io/errors"
|
|
11
|
+
capability "github.com/cosmos/ibc-go/modules/capability/types"
|
|
12
|
+
clienttypes "github.com/cosmos/ibc-go/v8/modules/core/02-client/types"
|
|
13
|
+
channeltypes "github.com/cosmos/ibc-go/v8/modules/core/04-channel/types"
|
|
14
|
+
porttypes "github.com/cosmos/ibc-go/v8/modules/core/05-port/types"
|
|
15
|
+
host "github.com/cosmos/ibc-go/v8/modules/core/24-host"
|
|
16
|
+
ibcexported "github.com/cosmos/ibc-go/v8/modules/core/exported"
|
|
11
17
|
|
|
12
|
-
agtypes "github.com/Agoric/agoric-sdk/golang/cosmos/types"
|
|
13
18
|
"github.com/Agoric/agoric-sdk/golang/cosmos/vm"
|
|
14
19
|
"github.com/Agoric/agoric-sdk/golang/cosmos/x/vibc/types"
|
|
15
20
|
)
|
|
@@ -25,36 +30,43 @@ type Keeper struct {
|
|
|
25
30
|
cdc codec.Codec
|
|
26
31
|
|
|
27
32
|
channelKeeper types.ChannelKeeper
|
|
33
|
+
portKeeper types.PortKeeper
|
|
28
34
|
clientKeeper types.ClientKeeper
|
|
29
35
|
|
|
30
36
|
// Filled out by `WithScope`
|
|
31
|
-
|
|
37
|
+
scopedKeeper types.ScopedKeeper
|
|
38
|
+
storeService corestore.KVStoreService
|
|
39
|
+
pushAction vm.ActionPusher
|
|
32
40
|
}
|
|
33
41
|
|
|
34
42
|
// NewKeeper creates a new vibc Keeper instance
|
|
35
43
|
func NewKeeper(
|
|
36
44
|
cdc codec.Codec,
|
|
37
45
|
channelKeeper types.ChannelKeeper,
|
|
46
|
+
portKeeper types.PortKeeper,
|
|
38
47
|
clientKeeper types.ClientKeeper,
|
|
39
48
|
) Keeper {
|
|
40
49
|
|
|
41
50
|
return Keeper{
|
|
42
51
|
cdc: cdc,
|
|
43
52
|
channelKeeper: channelKeeper,
|
|
53
|
+
portKeeper: portKeeper,
|
|
44
54
|
clientKeeper: clientKeeper,
|
|
45
55
|
}
|
|
46
56
|
}
|
|
47
57
|
|
|
48
58
|
// WithScope returns a new Keeper copied from the receiver, but with the given
|
|
49
|
-
//
|
|
50
|
-
func (k Keeper) WithScope(
|
|
51
|
-
k.
|
|
59
|
+
// store key, scoped keeper, and push action.
|
|
60
|
+
func (k Keeper) WithScope(storeService corestore.KVStoreService, scopedKeeper types.ScopedKeeper, pushAction vm.ActionPusher) Keeper {
|
|
61
|
+
k.storeService = storeService
|
|
62
|
+
k.scopedKeeper = scopedKeeper
|
|
63
|
+
k.pushAction = pushAction
|
|
52
64
|
return k
|
|
53
65
|
}
|
|
54
66
|
|
|
55
67
|
// PushAction sends a vm.Action to the VM controller.
|
|
56
68
|
func (k Keeper) PushAction(ctx sdk.Context, action vm.Action) error {
|
|
57
|
-
return k.
|
|
69
|
+
return k.pushAction(ctx, action)
|
|
58
70
|
}
|
|
59
71
|
|
|
60
72
|
// GetICS4Wrapper returns the ICS4Wrapper interface for the keeper.
|
|
@@ -78,10 +90,20 @@ func (k Keeper) GetChannel(ctx sdk.Context, portID, channelID string) (channelty
|
|
|
78
90
|
func (k Keeper) ReceiveChanOpenInit(ctx sdk.Context, order channeltypes.Order, connectionHops []string,
|
|
79
91
|
portID, rPortID, version string,
|
|
80
92
|
) error {
|
|
93
|
+
capName := host.PortPath(portID)
|
|
94
|
+
portCap, ok := k.GetCapability(ctx, capName)
|
|
95
|
+
if !ok {
|
|
96
|
+
return sdkioerrors.Wrapf(porttypes.ErrInvalidPort, "could not retrieve port capability at: %s", capName)
|
|
97
|
+
}
|
|
81
98
|
counterparty := channeltypes.Counterparty{
|
|
82
99
|
PortId: rPortID,
|
|
83
100
|
}
|
|
84
|
-
channelID, err := k.channelKeeper.ChanOpenInit(ctx, order, connectionHops, portID, counterparty, version)
|
|
101
|
+
channelID, chanCap, err := k.channelKeeper.ChanOpenInit(ctx, order, connectionHops, portID, portCap, counterparty, version)
|
|
102
|
+
if err != nil {
|
|
103
|
+
return err
|
|
104
|
+
}
|
|
105
|
+
chanCapName := host.ChannelCapabilityPath(portID, channelID)
|
|
106
|
+
err = k.ClaimCapability(ctx, chanCap, chanCapName)
|
|
85
107
|
if err != nil {
|
|
86
108
|
return err
|
|
87
109
|
}
|
|
@@ -98,32 +120,44 @@ func (k Keeper) ReceiveSendPacket(ctx sdk.Context, packet ibcexported.PacketI) (
|
|
|
98
120
|
timeoutTimestamp := packet.GetTimeoutTimestamp()
|
|
99
121
|
data := packet.GetData()
|
|
100
122
|
|
|
101
|
-
|
|
123
|
+
capName := host.ChannelCapabilityPath(sourcePort, sourceChannel)
|
|
124
|
+
chanCap, ok := k.GetCapability(ctx, capName)
|
|
125
|
+
if !ok {
|
|
126
|
+
return 0, sdkioerrors.Wrapf(channeltypes.ErrChannelCapabilityNotFound, "could not retrieve channel capability at: %s", capName)
|
|
127
|
+
}
|
|
128
|
+
return k.SendPacket(ctx, chanCap, sourcePort, sourceChannel, timeoutHeight, timeoutTimestamp, data)
|
|
102
129
|
}
|
|
103
130
|
|
|
104
131
|
// SendPacket defines a wrapper function for the channel Keeper's function
|
|
105
132
|
// in order to expose it to the vibc IBC handler.
|
|
106
133
|
func (k Keeper) SendPacket(
|
|
107
134
|
ctx sdk.Context,
|
|
135
|
+
chanCap *capability.Capability,
|
|
108
136
|
sourcePort string,
|
|
109
137
|
sourceChannel string,
|
|
110
138
|
timeoutHeight clienttypes.Height,
|
|
111
139
|
timeoutTimestamp uint64,
|
|
112
140
|
data []byte,
|
|
113
141
|
) (uint64, error) {
|
|
114
|
-
return k.channelKeeper.SendPacket(ctx, sourcePort, sourceChannel, timeoutHeight, timeoutTimestamp, data)
|
|
142
|
+
return k.channelKeeper.SendPacket(ctx, chanCap, sourcePort, sourceChannel, timeoutHeight, timeoutTimestamp, data)
|
|
115
143
|
}
|
|
116
144
|
|
|
117
145
|
// ReceiveWriteAcknowledgement wraps the keeper's WriteAcknowledgment function.
|
|
118
146
|
func (k Keeper) ReceiveWriteAcknowledgement(ctx sdk.Context, packet ibcexported.PacketI, ack ibcexported.Acknowledgement) error {
|
|
119
|
-
|
|
147
|
+
portID := packet.GetDestPort()
|
|
148
|
+
channelID := packet.GetDestChannel()
|
|
149
|
+
capName := host.ChannelCapabilityPath(portID, channelID)
|
|
150
|
+
chanCap, ok := k.GetCapability(ctx, capName)
|
|
151
|
+
if !ok {
|
|
152
|
+
return sdkioerrors.Wrapf(channeltypes.ErrChannelCapabilityNotFound, "could not retrieve channel capability at: %s", capName)
|
|
153
|
+
}
|
|
154
|
+
return k.WriteAcknowledgement(ctx, chanCap, packet, ack)
|
|
120
155
|
}
|
|
121
156
|
|
|
122
157
|
// WriteAcknowledgement defines a wrapper function for the channel Keeper's function
|
|
123
158
|
// in order to expose it to the vibc IBC handler.
|
|
124
|
-
func (k Keeper) WriteAcknowledgement(ctx sdk.Context, packet ibcexported.PacketI, ack ibcexported.Acknowledgement) error {
|
|
125
|
-
|
|
126
|
-
return k.channelKeeper.WriteAcknowledgement(ctx, channelPacket, ack)
|
|
159
|
+
func (k Keeper) WriteAcknowledgement(ctx sdk.Context, chanCap *capability.Capability, packet ibcexported.PacketI, ack ibcexported.Acknowledgement) error {
|
|
160
|
+
return k.channelKeeper.WriteAcknowledgement(ctx, chanCap, packet, ack)
|
|
127
161
|
}
|
|
128
162
|
|
|
129
163
|
// ReceiveWriteOpenTryChannel wraps the keeper's WriteOpenTryChannel function.
|
|
@@ -144,7 +178,12 @@ func (k Keeper) WriteOpenTryChannel(ctx sdk.Context, portID, channelID string, o
|
|
|
144
178
|
// ReceiveChanCloseInit is a wrapper function for the channel Keeper's function
|
|
145
179
|
// in order to expose it to the vibc IBC handler.
|
|
146
180
|
func (k Keeper) ReceiveChanCloseInit(ctx sdk.Context, portID, channelID string) error {
|
|
147
|
-
|
|
181
|
+
capName := host.ChannelCapabilityPath(portID, channelID)
|
|
182
|
+
chanCap, ok := k.GetCapability(ctx, capName)
|
|
183
|
+
if !ok {
|
|
184
|
+
return sdkioerrors.Wrapf(channeltypes.ErrChannelCapabilityNotFound, "could not retrieve channel capability at: %s", capName)
|
|
185
|
+
}
|
|
186
|
+
err := k.channelKeeper.ChanCloseInit(ctx, portID, channelID, chanCap)
|
|
148
187
|
if err != nil {
|
|
149
188
|
return err
|
|
150
189
|
}
|
|
@@ -154,33 +193,35 @@ func (k Keeper) ReceiveChanCloseInit(ctx sdk.Context, portID, channelID string)
|
|
|
154
193
|
// ReceiveBindPort is a wrapper function for the port Keeper's function in order
|
|
155
194
|
// to expose it to the vibc IBC handler.
|
|
156
195
|
func (k Keeper) ReceiveBindPort(ctx sdk.Context, portID string) error {
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
// RevokePort removes a previously dynamic exact port binding.
|
|
166
|
-
func (k Keeper) RevokePort(ctx sdk.Context, portID string) error {
|
|
167
|
-
return k.scope.RevokePort(ctx, portID)
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
// LoadDynamicPortBindings rehydrates persisted dynamic bindings into the live router.
|
|
171
|
-
func (k Keeper) LoadDynamicPortBindings(ctx sdk.Context) error {
|
|
172
|
-
return k.scope.LoadBindings(ctx)
|
|
196
|
+
portPath := host.PortPath(portID)
|
|
197
|
+
_, ok := k.GetCapability(ctx, portPath)
|
|
198
|
+
if ok {
|
|
199
|
+
return fmt.Errorf("port %s is already bound", portID)
|
|
200
|
+
}
|
|
201
|
+
cap := k.portKeeper.BindPort(ctx, portID)
|
|
202
|
+
return k.ClaimCapability(ctx, cap, portPath)
|
|
173
203
|
}
|
|
174
204
|
|
|
175
205
|
// ReceiveTimeoutExecuted is a wrapper function for the channel Keeper's
|
|
176
206
|
// function in order to expose it to the vibc IBC handler.
|
|
177
207
|
func (k Keeper) ReceiveTimeoutExecuted(ctx sdk.Context, packet ibcexported.PacketI) error {
|
|
178
|
-
|
|
208
|
+
portID := packet.GetSourcePort()
|
|
209
|
+
channelID := packet.GetSourceChannel()
|
|
210
|
+
capName := host.ChannelCapabilityPath(portID, channelID)
|
|
211
|
+
chanCap, ok := k.GetCapability(ctx, capName)
|
|
212
|
+
if !ok {
|
|
213
|
+
return sdkioerrors.Wrapf(channeltypes.ErrChannelCapabilityNotFound, "could not retrieve channel capability at: %s", capName)
|
|
214
|
+
}
|
|
215
|
+
return k.channelKeeper.TimeoutExecuted(ctx, chanCap, packet)
|
|
179
216
|
}
|
|
180
217
|
|
|
181
|
-
//
|
|
182
|
-
//
|
|
183
|
-
func (k Keeper)
|
|
184
|
-
|
|
185
|
-
|
|
218
|
+
// ClaimCapability allows the vibc module to claim a capability that IBC module
|
|
219
|
+
// passes to it.
|
|
220
|
+
func (k Keeper) ClaimCapability(ctx sdk.Context, cap *capability.Capability, name string) error {
|
|
221
|
+
return k.scopedKeeper.ClaimCapability(ctx, cap, name)
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
// GetCapability allows the vibc module to retrieve a capability.
|
|
225
|
+
func (k Keeper) GetCapability(ctx sdk.Context, name string) (*capability.Capability, bool) {
|
|
226
|
+
return k.scopedKeeper.GetCapability(ctx, name)
|
|
186
227
|
}
|
|
@@ -3,7 +3,7 @@ package keeper
|
|
|
3
3
|
import (
|
|
4
4
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
|
5
5
|
|
|
6
|
-
ibcexported "github.com/cosmos/ibc-go/
|
|
6
|
+
ibcexported "github.com/cosmos/ibc-go/v8/modules/core/exported"
|
|
7
7
|
|
|
8
8
|
agtypes "github.com/Agoric/agoric-sdk/golang/cosmos/types"
|
|
9
9
|
"github.com/Agoric/agoric-sdk/golang/cosmos/x/vibc/types"
|
|
@@ -32,14 +32,12 @@ func (k Keeper) TriggerWriteAcknowledgement(
|
|
|
32
32
|
func (k Keeper) TriggerOnAcknowledgementPacket(
|
|
33
33
|
ctx sdk.Context,
|
|
34
34
|
target string,
|
|
35
|
-
channelVersion string,
|
|
36
35
|
packet ibcexported.PacketI,
|
|
37
36
|
acknowledgement []byte,
|
|
38
37
|
relayer sdk.AccAddress,
|
|
39
38
|
) error {
|
|
40
39
|
event := types.AcknowledgementPacketEvent{
|
|
41
40
|
Target: target,
|
|
42
|
-
ChannelVersion: channelVersion,
|
|
43
41
|
Packet: agtypes.CopyToIBCPacket(packet),
|
|
44
42
|
Acknowledgement: acknowledgement,
|
|
45
43
|
Relayer: relayer,
|
|
@@ -56,15 +54,13 @@ func (k Keeper) TriggerOnAcknowledgementPacket(
|
|
|
56
54
|
func (k Keeper) TriggerOnTimeoutPacket(
|
|
57
55
|
ctx sdk.Context,
|
|
58
56
|
target string,
|
|
59
|
-
channelVersion string,
|
|
60
57
|
packet ibcexported.PacketI,
|
|
61
58
|
relayer sdk.AccAddress,
|
|
62
59
|
) error {
|
|
63
60
|
event := types.TimeoutPacketEvent{
|
|
64
|
-
Target:
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
Relayer: relayer,
|
|
61
|
+
Target: target,
|
|
62
|
+
Packet: agtypes.CopyToIBCPacket(packet),
|
|
63
|
+
Relayer: relayer,
|
|
68
64
|
}
|
|
69
65
|
|
|
70
66
|
err := k.PushAction(ctx, event)
|