@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.
Files changed (46) hide show
  1. package/Makefile +0 -1
  2. package/ante/ante.go +2 -2
  3. package/app/app.go +96 -73
  4. package/app/sim_test.go +2 -0
  5. package/app/upgrade.go +6 -6
  6. package/daemon/cmd/root_test.go +0 -1
  7. package/git-revision.txt +1 -1
  8. package/go.mod +116 -83
  9. package/go.sum +130 -162
  10. package/package.json +2 -2
  11. package/proto/agoric/swingset/msgs.proto +0 -1
  12. package/proto/agoric/vbank/msgs.proto +1 -5
  13. package/proto/agoric/vibc/msgs.proto +2 -45
  14. package/scripts/protocgen.sh +1 -10
  15. package/tests/integrations/types/aminojson_test.go +2 -18
  16. package/third_party/proto/cosmos/base/query/v1beta1/pagination.proto +3 -2
  17. package/third_party/proto/cosmos/upgrade/v1beta1/upgrade.proto +3 -2
  18. package/third_party/proto/ibc/core/channel/v1/channel.proto +22 -6
  19. package/third_party/proto/ibc/core/client/v1/client.proto +53 -6
  20. package/types/address_hooks.go +2 -2
  21. package/types/address_hooks_test.go +3 -3
  22. package/types/ibc_packet.go +3 -3
  23. package/types/ibc_packet_test.go +3 -3
  24. package/x/swingset/types/msgs.pb.go +89 -90
  25. package/x/vbank/types/msgs.pb.go +8 -10
  26. package/x/vibc/alias.go +1 -0
  27. package/x/vibc/keeper/keeper.go +81 -40
  28. package/x/vibc/keeper/migrations.go +1 -1
  29. package/x/vibc/keeper/triggers.go +4 -8
  30. package/x/vibc/types/expected_keepers.go +20 -7
  31. package/x/vibc/types/ibc_module.go +20 -13
  32. package/x/vibc/types/msgs.go +3 -60
  33. package/x/vibc/types/msgs.pb.go +31 -683
  34. package/x/vibc/types/receiver.go +2 -2
  35. package/x/vlocalchain/vlocalchain_test.go +1 -1
  36. package/x/vtransfer/ibc_middleware.go +17 -15
  37. package/x/vtransfer/ibc_middleware_test.go +53 -30
  38. package/x/vtransfer/keeper/keeper.go +28 -19
  39. package/x/vtransfer/types/expected_keepers.go +8 -15
  40. package/x/vtransfer/utils_test.go +9 -4
  41. package/go.work +0 -39
  42. package/go.work.sum +0 -2636
  43. package/proto/Dockerfile +0 -14
  44. package/x/vibc/keeper/dynamic_router.go +0 -176
  45. package/x/vibc/keeper/dynamic_router_test.go +0 -240
  46. 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
- // 1350 bytes of a gzipped FileDescriptorProto
833
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x57, 0x4d, 0x6c, 0x1b, 0x45,
834
- 0x14, 0xce, 0xd6, 0x49, 0x5a, 0x8f, 0xdd, 0x26, 0xde, 0x94, 0xc4, 0xd9, 0x16, 0x8f, 0xbb, 0xa5,
835
- 0x92, 0x1b, 0x1a, 0x5b, 0x84, 0x0a, 0x21, 0x97, 0x03, 0xd9, 0x96, 0x1f, 0x0b, 0xa5, 0x2a, 0x1b,
836
- 0x55, 0xa0, 0xa2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82, 0x33, 0x3b, 0xba, 0xeb, 0xb4, 0xe5, 0x04, 0x91, 0xbf, 0x3a, 0xd8, 0x5d,
848
- 0x9a, 0xf3, 0x7a, 0x8e, 0xa3, 0x61, 0xc7, 0x36, 0x90, 0xa6, 0x63, 0x0d, 0xb9, 0xdd, 0x70, 0xe7,
849
- 0xdb, 0x83, 0xdd, 0x25, 0x41, 0xe5, 0x33, 0xc5, 0x37, 0xc1, 0xa4, 0xd7, 0x73, 0x71, 0xf5, 0x58,
850
- 0xbd, 0xd0, 0x98, 0x54, 0x2e, 0xf7, 0x23, 0x48, 0xe4, 0x41, 0x04, 0x4b, 0xd4, 0x63, 0x2c, 0x1d,
851
- 0xe2, 0x8d, 0xcc, 0x10, 0x2f, 0x81, 0x82, 0x6e, 0x6c, 0x56, 0x0b, 0x75, 0xa1, 0x31, 0xa9, 0x48,
852
- 0xfd, 0x08, 0xc6, 0xe2, 0x20, 0x82, 0x80, 0xfa, 0xd1, 0x8d, 0x4d, 0x99, 0x9a, 0xc7, 0xb8, 0xf8,
853
- 0x89, 0x00, 0x8a, 0xb8, 0xb7, 0xe1, 0xda, 0x61, 0x88, 0x82, 0xea, 0x64, 0x5d, 0x68, 0x94, 0x15,
854
- 0xd4, 0x8f, 0x60, 0x0a, 0x0e, 0x22, 0x38, 0x4b, 0xa7, 0x72, 0x48, 0xfe, 0x3b, 0x82, 0xcb, 0x96,
855
- 0x1d, 0xde, 0xed, 0x6d, 0x34, 0x0d, 0xdf, 0x65, 0xfb, 0xcd, 0xfe, 0x96, 0xb1, 0xb9, 0xd9, 0x0a,
856
- 0x77, 0xba, 0x08, 0x37, 0x57, 0x0d, 0x63, 0xd5, 0x34, 0x03, 0x84, 0x71, 0x1c, 0xf8, 0x29, 0x07,
857
- 0x59, 0xba, 0xb1, 0xa3, 0xe9, 0x14, 0x52, 0xd3, 0x25, 0xda, 0xf5, 0x3f, 0xbf, 0x86, 0x13, 0x0f,
858
- 0x0f, 0x76, 0x97, 0x16, 0xf8, 0x79, 0x0c, 0xef, 0xbc, 0x7c, 0x06, 0x2c, 0x8e, 0x1c, 0x87, 0x8a,
859
- 0x70, 0xd7, 0xf7, 0x30, 0x92, 0xbf, 0x17, 0xc0, 0xcc, 0x1a, 0xb6, 0xde, 0xd1, 0x1d, 0x07, 0x85,
860
- 0xab, 0x46, 0x68, 0xfb, 0x9e, 0x88, 0xc1, 0x94, 0xbf, 0xed, 0xa1, 0xa0, 0x2a, 0x10, 0x4e, 0xb7,
861
- 0xfb, 0x11, 0xa4, 0xc0, 0x20, 0x82, 0x65, 0xca, 0x87, 0x88, 0x4f, 0x87, 0x0b, 0x75, 0x2d, 0xce,
862
- 0x83, 0x69, 0x9d, 0x2c, 0x5f, 0x3d, 0x56, 0x17, 0x1a, 0x45, 0x95, 0x49, 0xed, 0x5a, 0xc2, 0xef,
863
- 0x19, 0xce, 0x2f, 0x1b, 0xac, 0xbc, 0x08, 0x16, 0x72, 0xf1, 0x73, 0x6e, 0x3f, 0x0b, 0xe0, 0x34,
864
- 0xd7, 0xad, 0x77, 0x91, 0x67, 0x1e, 0x25, 0xc1, 0x73, 0xa0, 0x8c, 0xe3, 0x18, 0xb4, 0x21, 0x9a,
865
- 0x25, 0x9c, 0xc6, 0xd5, 0x3e, 0x9f, 0x70, 0x95, 0x72, 0x5c, 0x33, 0xc1, 0xcb, 0x35, 0x70, 0x76,
866
- 0x1c, 0x29, 0xce, 0xfa, 0xaf, 0x02, 0x28, 0xaf, 0x61, 0xeb, 0x46, 0xe0, 0x6f, 0xd9, 0x38, 0x66,
867
- 0x7b, 0x05, 0x9c, 0xf0, 0x6c, 0x63, 0xd3, 0xd3, 0x5d, 0x44, 0x08, 0x17, 0x15, 0x18, 0x57, 0x5e,
868
- 0x82, 0xa5, 0x95, 0x97, 0x20, 0xb2, 0xca, 0x95, 0xe2, 0x07, 0xe0, 0x38, 0xe3, 0x41, 0x02, 0x2e,
869
- 0x2b, 0x7a, 0x3f, 0x82, 0x09, 0x34, 0x88, 0xe0, 0x29, 0x56, 0x1a, 0x14, 0x78, 0x3a, 0x1b, 0x96,
870
- 0xb8, 0x17, 0x3f, 0x04, 0xa5, 0xae, 0xbf, 0x8d, 0x02, 0xed, 0x8e, 0xa3, 0x5b, 0xb8, 0x5a, 0x20,
871
- 0x6d, 0xe3, 0xf6, 0x5e, 0x04, 0xc1, 0x8d, 0x18, 0x7e, 0x3d, 0x46, 0xfb, 0x11, 0x04, 0x5d, 0x2e,
872
- 0x0d, 0x22, 0x58, 0xa1, 0x11, 0xa5, 0xd8, 0x63, 0x4b, 0xff, 0x9b, 0x83, 0xdd, 0xa5, 0xcc, 0x5c,
873
- 0x5a, 0xda, 0x19, 0xe0, 0x7f, 0x52, 0xe1, 0x67, 0x92, 0xac, 0x10, 0x79, 0x56, 0xf0, 0xc3, 0x95,
874
- 0xe7, 0x49, 0x8a, 0x73, 0x99, 0x67, 0xc1, 0xaf, 0x93, 0x60, 0x76, 0x0d, 0x5b, 0x1d, 0x0f, 0x87,
875
- 0xba, 0xe3, 0x28, 0x3d, 0xcf, 0x74, 0x90, 0xf8, 0x32, 0x98, 0xde, 0x20, 0x23, 0x96, 0x07, 0xf5,
876
- 0x7e, 0x04, 0x19, 0x32, 0x88, 0xe0, 0x49, 0x4a, 0x84, 0xca, 0xac, 0xd1, 0x31, 0x6d, 0x6e, 0x27,
877
- 0x8e, 0x1d, 0xcd, 0x4e, 0x88, 0x5b, 0xa0, 0x62, 0xf8, 0x6e, 0x37, 0x86, 0x91, 0xa9, 0x31, 0x2a,
878
- 0x05, 0x12, 0x4c, 0xa7, 0x1f, 0xc1, 0xd9, 0x54, 0xa9, 0x24, 0xa4, 0x16, 0x68, 0x4c, 0x79, 0x8d,
879
- 0x1c, 0x9f, 0xfd, 0x88, 0x3d, 0xe5, 0x3c, 0x02, 0x8b, 0xef, 0x81, 0x4a, 0xcf, 0xcb, 0xac, 0x8c,
880
- 0xed, 0x07, 0x88, 0xa4, 0x43, 0x41, 0x69, 0xc6, 0xe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, 0x0a, 0x59, 0x9d, 0xbe, 0x87, 0xaf, 0xfa, 0x26, 0x6a,
892
- 0x5f, 0xfe, 0xf8, 0x60, 0x77, 0x29, 0x5d, 0x38, 0xe6, 0x76, 0x2e, 0x93, 0x8b, 0xf7, 0xd3, 0x07,
893
- 0x4d, 0x86, 0x96, 0xfc, 0x2a, 0x98, 0xcb, 0x88, 0x49, 0x7d, 0x89, 0x17, 0xc1, 0x74, 0x80, 0x70,
894
- 0xcf, 0x09, 0x19, 0xd5, 0x4a, 0x5a, 0x40, 0x14, 0x97, 0x55, 0x66, 0x20, 0x7f, 0x21, 0x80, 0x6a,
895
- 0xbe, 0x14, 0xb9, 0x9f, 0x6d, 0x30, 0x97, 0x3f, 0x7c, 0xcd, 0x36, 0x89, 0xd3, 0x49, 0xe5, 0x8d,
896
- 0x7e, 0x04, 0x2b, 0xb9, 0x43, 0xe9, 0x98, 0x83, 0x08, 0x56, 0xc7, 0x9e, 0x6a, 0xc7, 0x24, 0xe7,
897
- 0x3a, 0x3a, 0x43, 0x1d, 0x85, 0xe4, 0x1f, 0xe8, 0x35, 0xb1, 0x8e, 0x3c, 0x93, 0x24, 0xd5, 0x91,
898
- 0x45, 0x22, 0x7e, 0x3e, 0xa6, 0xb7, 0xe0, 0xff, 0xa4, 0xb7, 0xc4, 0x31, 0xa6, 0xab, 0x64, 0x3b,
899
- 0xcd, 0x3a, 0x28, 0x91, 0x40, 0x35, 0xdb, 0x33, 0xd1, 0x7d, 0xf6, 0x22, 0x5c, 0x89, 0xef, 0x1a,
900
- 0x02, 0x77, 0x62, 0x34, 0xbd, 0x6b, 0x52, 0x8c, 0xd0, 0xce, 0xd8, 0xa8, 0x99, 0xb1, 0x78, 0x1d,
901
- 0x50, 0x49, 0x33, 0xf5, 0x50, 0x67, 0xd7, 0x49, 0x2b, 0x26, 0x4a, 0xd0, 0x6b, 0x7a, 0xa8, 0xa7,
902
- 0x44, 0x39, 0x44, 0x3c, 0xa6, 0x16, 0x6a, 0x3a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 0x7b, 0x35, 0xe1, 0xb7, 0xbd, 0x9a, 0xf0, 0xd9, 0x7e,
914
- 0x6d, 0xe2, 0xd1, 0x7e, 0x6d, 0xe2, 0x97, 0xfd, 0xda, 0xc4, 0xad, 0x2b, 0x99, 0x7e, 0xb4, 0x4a,
915
- 0xbf, 0x91, 0xa9, 0x5f, 0xd2, 0x8f, 0x2c, 0xdf, 0xd1, 0x3d, 0x2b, 0x69, 0x54, 0x99, 0xdb, 0x86,
916
- 0x34, 0xaa, 0x8d, 0x69, 0xf2, 0xf1, 0xfc, 0xe2, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x9a, 0x43,
917
- 0x34, 0x23, 0xe8, 0x0f, 0x00, 0x00,
831
+ // 1346 bytes of a gzipped FileDescriptorProto
832
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x57, 0x4d, 0x6c, 0x1b, 0xc5,
833
+ 0x17, 0xcf, 0xd6, 0x49, 0x5a, 0x8f, 0xdd, 0x26, 0xde, 0xf4, 0x9f, 0x38, 0xdb, 0xfe, 0x3d, 0xee,
834
+ 0x96, 0x4a, 0x6e, 0x68, 0x6c, 0x11, 0x2a, 0x84, 0x5c, 0x0e, 0x64, 0x5b, 0x3e, 0x2c, 0xe4, 0xaa,
835
+ 0x6c, 0x54, 0x81, 0x8a, 0xaa, 0x65, 0xb3, 0x3b, 0xdd, 0x6e, 0xb3, 0x1f, 0xd6, 0xce, 0x3a, 0x69,
836
+ 0x8a, 0xc4, 0x81, 0xde, 0x90, 0x90, 0x40, 0x5c, 0x10, 0x27, 0xc4, 0x89, 0x63, 0x0e, 0x9c, 0x11,
837
+ 0x47, 0x8e, 0x15, 0x5c, 0x38, 0x2d, 0x28, 0x45, 0x04, 0x99, 0x9b, 0x8f, 0x9c, 0xd0, 0xce, 0xcc,
838
+ 0xce, 0xae, 0xd7, 0x6e, 0xc3, 0xa1, 0x22, 0x5c, 0xec, 0x79, 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x21, 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.
@@ -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
- // 160 bytes of a gzipped FileDescriptorProto
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, 0xa4, 0xc4, 0x93, 0xf3, 0x8b, 0x73,
34
- 0xf3, 0x8b, 0x41, 0x0a, 0xf4, 0xcb, 0x0c, 0x41, 0x14, 0x44, 0x99, 0x11, 0x0f, 0x17, 0xb3, 0x6f,
35
- 0x71, 0xba, 0x14, 0x6b, 0xc3, 0xf3, 0x0d, 0x5a, 0x8c, 0x4e, 0x41, 0x27, 0x1e, 0xc9, 0x31, 0x5e,
36
- 0x78, 0x24, 0xc7, 0xf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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
@@ -22,5 +22,6 @@ var (
22
22
 
23
23
  type (
24
24
  Keeper = keeper.Keeper
25
+ ScopedKeeper = types.ScopedKeeper
25
26
  MsgSendPacket = types.MsgSendPacket
26
27
  )
@@ -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
- clienttypes "github.com/cosmos/ibc-go/v10/modules/core/02-client/types"
8
- channeltypes "github.com/cosmos/ibc-go/v10/modules/core/04-channel/types"
9
- porttypes "github.com/cosmos/ibc-go/v10/modules/core/05-port/types"
10
- ibcexported "github.com/cosmos/ibc-go/v10/modules/core/exported"
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
- scope *DynamicPortScope
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
- // dynamic port scope.
50
- func (k Keeper) WithScope(scope *DynamicPortScope) Keeper {
51
- k.scope = scope
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.scope.PushAction(ctx, action)
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
- return k.SendPacket(ctx, sourcePort, sourceChannel, timeoutHeight, timeoutTimestamp, data)
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
- return k.WriteAcknowledgement(ctx, packet, ack)
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
- channelPacket := agtypes.CopyToChannelPacket(packet)
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
- err := k.channelKeeper.ChanCloseInit(ctx, portID, channelID)
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
- return k.BindPort(ctx, portID)
158
- }
159
-
160
- // BindPort dynamically binds an exact port ID to the vibc IBC module.
161
- func (k Keeper) BindPort(ctx sdk.Context, portID string) error {
162
- return k.scope.BindPort(ctx, portID)
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
- return k.TimeoutExecuted(ctx, packet)
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
- // TimeoutExecuted defines a wrapper function for the channel Keeper's function
182
- // in order to expose it to the vibc IBC handler.
183
- func (k Keeper) TimeoutExecuted(ctx sdk.Context, packet ibcexported.PacketI) error {
184
- channelPacket := agtypes.CopyToChannelPacket(packet)
185
- return k.channelKeeper.TimeoutExecuted(ctx, channelPacket)
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/v10/modules/core/exported"
6
+ ibcexported "github.com/cosmos/ibc-go/v8/modules/core/exported"
7
7
  )
8
8
 
9
9
  // Migrator handles in-place store migrations.
@@ -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/v10/modules/core/exported"
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: target,
65
- ChannelVersion: channelVersion,
66
- Packet: agtypes.CopyToIBCPacket(packet),
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)