Skip to content

Commit

Permalink
User recovery mechanism for non-refundable forwards (#143)
Browse files Browse the repository at this point in the history
* User recovery mechanism for non-refundable forwards

* handle recovery of funds that did not originate on the intermediate chain

* mocks

* test: non-refundable forwards dummy module (#144)

* wip: add dummy middleware to modify packets

* rm unused

* force inFlightPacket.Nonrefundable = true

* dummyware.AppModuleBasic

* test: create non-refundable pfm test cases

* Get source originating tests passing

* remove parallel

* lint

* fix test, update comments

* fix final test

---------

Co-authored-by: Justin Tieri <[email protected]>
Co-authored-by: Andrew Gouin <[email protected]>

* Remove unnecessary makefile

---------

Co-authored-by: Reece Williams <[email protected]>
Co-authored-by: Justin Tieri <[email protected]>
  • Loading branch information
3 people authored Nov 24, 2023
1 parent 2e44c42 commit b04e5c4
Show file tree
Hide file tree
Showing 11 changed files with 1,088 additions and 75 deletions.
1 change: 1 addition & 0 deletions .github/workflows/packet-forward-middleware.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ jobs:
- "ictest-forward"
- "ictest-timeout"
- "ictest-upgrade"
- "ictest-nonrefundable"
fail-fast: false

steps:
Expand Down
3 changes: 3 additions & 0 deletions middleware/packet-forward-middleware/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,9 @@ ictest-timeout:
ictest-upgrade:
cd e2e && go test -race -v -timeout 15m -run TestPFMUpgrade .

ictest-nonrefundable:
cd e2e && go test -race -v -timeout 15m -run TestNonRefundable .

###############################################################################
### Linting ###
###############################################################################
Expand Down
43 changes: 22 additions & 21 deletions middleware/packet-forward-middleware/e2e/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@ require (
github.com/cosmos/gogoproto v1.4.10
github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v7 v7.0.0-00000000000000-000000000000
github.com/cosmos/ibc-go/v7 v7.3.1
github.com/docker/docker v24.0.5+incompatible
github.com/strangelove-ventures/interchaintest/v7 v7.0.0-20231025031208-463fdf2292e8
github.com/docker/docker v24.0.7+incompatible
github.com/strangelove-ventures/interchaintest/v7 v7.0.1-0.20231121220910-a334ab4006ae
github.com/stretchr/testify v1.8.4
go.uber.org/zap v1.26.0
)

require (
cloud.google.com/go v0.110.4 // indirect
cloud.google.com/go/compute v1.20.1 // indirect
cloud.google.com/go v0.110.7 // indirect
cloud.google.com/go/compute v1.23.0 // indirect
cloud.google.com/go/compute/metadata v0.2.3 // indirect
cloud.google.com/go/iam v1.1.0 // indirect
cloud.google.com/go/iam v1.1.1 // indirect
cloud.google.com/go/storage v1.30.1 // indirect
cosmossdk.io/api v0.3.1 // indirect
cosmossdk.io/core v0.6.1 // indirect
Expand Down Expand Up @@ -62,6 +62,7 @@ require (
github.com/cosmos/iavl v0.20.0 // indirect
github.com/cosmos/ibc-go/modules/capability v1.0.0-rc1 // indirect
github.com/cosmos/ics23/go v0.10.0 // indirect
github.com/cosmos/interchain-security/v3 v3.1.1-0.20231102122221-81650a84f989 // indirect
github.com/cosmos/ledger-cosmos-go v0.13.0 // indirect
github.com/cosmos/rosetta-sdk-go v0.10.0 // indirect
github.com/creachadair/taskgroup v0.4.2 // indirect
Expand Down Expand Up @@ -92,16 +93,16 @@ require (
github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect
github.com/gogo/googleapis v1.4.1 // indirect
github.com/gogo/protobuf v1.3.3 // indirect
github.com/golang/glog v1.1.0 // indirect
github.com/golang/glog v1.1.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/mock v1.6.0 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/golang/snappy v0.0.4 // indirect
github.com/google/btree v1.1.2 // indirect
github.com/google/go-cmp v0.5.9 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/orderedcode v0.0.1 // indirect
github.com/google/s2a-go v0.1.4 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/google/uuid v1.3.1 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.2.3 // indirect
github.com/googleapis/gax-go/v2 v2.11.0 // indirect
github.com/gorilla/handlers v1.5.1 // indirect
Expand Down Expand Up @@ -196,23 +197,23 @@ require (
go.etcd.io/bbolt v1.3.7 // indirect
go.opencensus.io v0.24.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/crypto v0.12.0 // indirect
golang.org/x/crypto v0.14.0 // indirect
golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb // indirect
golang.org/x/mod v0.12.0 // indirect
golang.org/x/net v0.14.0 // indirect
golang.org/x/oauth2 v0.8.0 // indirect
golang.org/x/sync v0.3.0 // indirect
golang.org/x/sys v0.12.0 // indirect
golang.org/x/term v0.11.0 // indirect
golang.org/x/text v0.12.0 // indirect
golang.org/x/tools v0.12.0 // indirect
golang.org/x/net v0.17.0 // indirect
golang.org/x/oauth2 v0.11.0 // indirect
golang.org/x/sync v0.4.0 // indirect
golang.org/x/sys v0.13.0 // indirect
golang.org/x/term v0.13.0 // indirect
golang.org/x/text v0.13.0 // indirect
golang.org/x/tools v0.13.0 // indirect
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
google.golang.org/api v0.126.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20230706204954-ccb25ca9f130 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20230629202037-9506855d4529 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 // indirect
google.golang.org/grpc v1.57.0 // indirect
google.golang.org/genproto v0.0.0-20230822172742-b8732ec3820d // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230913181813-007df8e322eb // indirect
google.golang.org/grpc v1.59.0 // indirect
google.golang.org/protobuf v1.31.0 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce // indirect
Expand All @@ -230,7 +231,7 @@ require (
modernc.org/strutil v1.1.3 // indirect
modernc.org/token v1.0.1 // indirect
nhooyr.io/websocket v1.8.7 // indirect
pgregory.net/rapid v1.0.0 // indirect
pgregory.net/rapid v1.1.0 // indirect
sigs.k8s.io/yaml v1.3.0 // indirect
)

Expand Down
Loading

0 comments on commit b04e5c4

Please sign in to comment.