Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: nil receiver initiate for path #1177

Merged
merged 2 commits into from
Apr 26, 2023
Merged

fix: nil receiver initiate for path #1177

merged 2 commits into from
Apr 26, 2023

Conversation

mmsqe
Copy link
Contributor

@mmsqe mmsqe commented Apr 26, 2023

  • avoid panic due to assignment to entry in nil map
  • ensure path get written to config

@mmsqe mmsqe marked this pull request as ready for review April 26, 2023 15:52
Copy link
Member

@agouin agouin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for this!

@agouin agouin merged commit 1ee79e5 into cosmos:main Apr 26, 2023
viveksharmapoudel added a commit to icon-project/ibc-relay that referenced this pull request Jun 30, 2023
* Flush query should include begin and end block events (cosmos#1125)

* Include begin and end block events

* disable flushing when termination condition is set

* Still flush for FlushLifecycle

* Add sort for flush logging to avoid confusion

* pre_init messages (cosmos#1131)

* Wire initial messages into path processor caches so that retry logic will occur

* Fix counterparty keys

* Remove debug log

* fix default coin type (cosmos#1134)

* fix slip44 default

* Add test case

* build: bump to Go 1.20 + bump deps (cosmos#1132)

* build: bump to Go 1.20 + bump deps

This bumps the Go version to 1.20 and also bumps the SDK version to 0.47.0 and ibc-go to v7.0.0

* chore: update GH workflows to use Go 1.20 + update interchaintest deps

* chore: update missing deps in go.sum + use 1.20 in dockerfiles

* chore: bump to `setup-go/v4` and remove caching step

* chore: bump to `checkout/v3` and remove caching step

* chore: bump 1.20.2

* Fix flushing acks (cosmos#1139)

* Fix ordered channel closure (cosmos#1142)

* Fix ordered channel closure

* Increase timeout for scenarios test

* Fix tracking of init messages when IDs aren't the same

* bump interchaintest to include explicit port bindings

* Fix flush termination condition (cosmos#1141)

* bump to main sha (cosmos#1143)

* Pre-filter flush channels (cosmos#1146)

* Add channel close correlation (cosmos#1145)

* Add channel close correlation

* Switch to pre-close key

* make tx channel-close cli command work, add test coverage

* more sweet code removals

* update comment

* Fix flush on ordered channels (cosmos#1150)

* Fix flush on ordered channels

* Queue all packets at nextseqrecv or above

* Now that we have periodic flushing, skip blocks if they can't be queried (cosmos#1154)

* Lock config file for all write operations (cosmos#1156)

* Lock config file for all write operations

* Fix linter errs

* tidy

* more tidy

* Penumbra support v2 (cosmos#1144)

* Penumbra buf go gen

* Use go prefix override

* wip: penumbra relayer provider

remove copied-over cosmos provider tests, rename processor cosmos -> penumbra

rename ccp -> pcp

reformat into new relayer dir structure

update penumbra types to point to buf.build

building again

* fix penumbra

* fix: implement MsgSubmitMisbehaviour

* fix: remove unnecessary proto file + fix msg type cast

* chore: add removal of penumbra client protos in protocgen

* working penumbra relayer functionality

wip: unbase64?

wip: multiple messages per penumbra tx

wip: stub SendMessages impl

wip: attempt to split out common method

wip: use random anchor and work around path renaming

wip: improve logging

wip: changes during pairing

https://www.youtube.com/watch?v=RYonSOkZ5ZE

clean up logs

skip height bug workaround

drop debug panic

* update penumbra chain processor connection and channel message processing

* cleanup logging statements for review

Responding to review comments, honoring the style guide for logging, and
removing some unused reference code that was commented out while
debugging.

---------

Co-authored-by: Andrew Gouin <andrew@gouin.io>
Co-authored-by: Ava Howell <ava@penumbra.zone>
Co-authored-by: jtieri <justin@thetieris.com>
Co-authored-by: Ava Howell <ava@avahowell.me>
Co-authored-by: Conor Schaefer <conor@penumbralabs.xyz>
Co-authored-by: Justin Tieri <37750742+jtieri@users.noreply.github.com>

* --time-threshold example use cases (cosmos#1155)

* Make ICA waits more explicit (cosmos#1157)

* Make ICA waits more explicit

* poll for timeout

* poll for channel close confirm

* Comment out sqlite db file for scenarios tests

* Bump github.com/docker/docker in /interchaintest (cosmos#1160)

Bumps [github.com/docker/docker](https://github.com/docker/docker) from 20.10.19+incompatible to 20.10.24+incompatible.
- [Release notes](https://github.com/docker/docker/releases)
- [Commits](moby/moby@v20.10.19...v20.10.24)

---
updated-dependencies:
- dependency-name: github.com/docker/docker
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* bump version in docs (cosmos#1158)

* Bump github.com/opencontainers/runc in /interchaintest (cosmos#1153)

Bumps [github.com/opencontainers/runc](https://github.com/opencontainers/runc) from 1.1.3 to 1.1.5.
- [Release notes](https://github.com/opencontainers/runc/releases)
- [Changelog](https://github.com/opencontainers/runc/blob/v1.1.5/CHANGELOG.md)
- [Commits](opencontainers/runc@v1.1.3...v1.1.5)

---
updated-dependencies:
- dependency-name: github.com/opencontainers/runc
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Andrew Gouin <andrew@gouin.io>

* Fix QueryConnectionsUsingClient for cosmos (cosmos#1162)

* Make min query loop duration configurable (cosmos#1164)

* penumbra provider: update generated protos (cosmos#1168)

* Add sr25519 support (cosmos#1120)

* Migrate to cometbft

* Additional replaces

* Register comet proto types

* Add sr25519 support

* bump ictest

* Add keys test

* Update supported algos comment

* penumbra: update protos (cosmos#1170)

Updating the generated protos for Penumbra support. After lightly
editing the `scripts/protocgen.sh` script, I ran `make proto-gen`
and then committed the changes `relayer/chains/penumbra/`. Other
automatically updated protos I intentionally excluded from this PR, to
avoid side-effects.

Co-authored-by: Conor Schaefer <conor@penumbralabs.xyz>

* chore: add path name to logs in message processor (cosmos#1171)

* Fix multiple conn open init (cosmos#1173)

* allow register with extra_codecs (cosmos#1175)

* Harry/fee middleware (cosmos#1174)

* Register Counterparty relayer cmd and fee middleware test

* debugging the command

* debugging and finalizing the fee_middleware_test.

* debugging and finalizing the fee_middleware_test.

* merged with updated repo

* clear out some commanded code

* nits and suggestions post review

* more nits

* added one val no fullnode as chainspec

---------

Co-authored-by: Harry <harrycosmos@Harrys-MacBook-Pro.local>

* fix: nil receiver initiate for path (cosmos#1177)

* fix nil receiver initiate for path

ensure path get written to config

* add change doc

* feat: add max-gas-amount parameter in chain configs (cosmos#1178)

* add max fee

* add test

* add change doc

* Update cregistry/chain_info.go

* dep: bump sdk from v0.47.0 to v0.47.2 (cosmos#1180)

* bump sdk from v0.47.0 to v0.47.2

fix btcutil dep

* fix dep of hdkeychain

* Harry/rly tx channel (cosmos#1183)

* made a new method "logChannelOpenMessage" to log the newly opened channel into info level

* added fields

* some changes

---------

Co-authored-by: Harry <harrycosmos@Harrys-MacBook-Pro.local>

* Harry/rly tx transfer (cosmos#1184)

* made a new method "logChannelOpenMessage" to log the newly opened channel into info level

* added fields

* some changes

* recreated issue 1151, added logs

---------

Co-authored-by: Harry <harrycosmos@Harrys-MacBook-Pro.local>
Co-authored-by: Andrew Gouin <andrew@gouin.io>

* Better Error Messaging when failing to query the Block Height (cosmos#1189)

* better block data errors

* remove redundant field

* penumbra: update protos (cosmos#1181)

Matches the latest protos shipped with the Penumbra Testnet 52.

Co-authored-by: Conor Schaefer <conor@penumbralabs.xyz>
Co-authored-by: Justin Tieri <37750742+jtieri@users.noreply.github.com>

* Neutron launch fixes and optimizations (cosmos#1185)

* pipe max msgs through path processor

* only apply max msgs to packet msgs

* multiple msgs simultaneously on ordered chans

* flush should be more frequent if it fails or does not complete

* fix legacy

* handle feedback

* Problem: fixes in ibc-go v7.0.1 are not included (cosmos#1205)

* Problem: fixes in ibc-go v7.0.1 are not included

* add change doc

* Harry/rly address (cosmos#1204)

* added addresCmd to root and keys.go

* nicks

* nick

* made a common method "showAddressByChainAndKey" to be used by both addressCmd and keysShowCmd

---------

Co-authored-by: Harry <harrycosmos@Harrys-MacBook-Pro.local>
Co-authored-by: Andrew Gouin <andrew@gouin.io>

* deps: update to ibc-go v7.1.0-rc0 (cosmos#1207)

* Export wallet address for Prometheus metrics (cosmos#1206)

* export relayer address for pro

* address in updateFeesSpent

* make error messages consistent

* log error rather than return

* handle 0 balance

* chore: fix issue

* fix: connection key include

* chore: comment out flush

* fix: remove SET method from providerConfig

* chore: replace static naming with constant

* chore: packet timeout after relayer update

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Andrew Gouin <andrew@gouin.io>
Co-authored-by: Justin Tieri <37750742+jtieri@users.noreply.github.com>
Co-authored-by: Henry de Valence <hdevalence@hdevalence.ca>
Co-authored-by: Ava Howell <ava@penumbra.zone>
Co-authored-by: jtieri <justin@thetieris.com>
Co-authored-by: Ava Howell <ava@avahowell.me>
Co-authored-by: Conor Schaefer <conor@penumbralabs.xyz>
Co-authored-by: Dan Kanefsky <56059752+boojamya@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Conor Schaefer <conorsch@users.noreply.github.com>
Co-authored-by: mmsqe <tqd0800210105@gmail.com>
Co-authored-by: Cosmos-Harry <110472914+Cosmos-Harry@users.noreply.github.com>
Co-authored-by: Harry <harrycosmos@Harrys-MacBook-Pro.local>
Co-authored-by: mmsqe <mavis@crypto.com>
Co-authored-by: Keefer Taylor | Tessellated <keefer@tessellated.io>
Co-authored-by: izyak <test@test.com>
Co-authored-by: viveksharmapoudel <viveksharmapoudel@gmail.com>
izyak added a commit to izyak/ibc-relay-test that referenced this pull request Sep 7, 2023
* Flush query should include begin and end block events (cosmos#1125)

* Include begin and end block events

* disable flushing when termination condition is set

* Still flush for FlushLifecycle

* Add sort for flush logging to avoid confusion

* pre_init messages (cosmos#1131)

* Wire initial messages into path processor caches so that retry logic will occur

* Fix counterparty keys

* Remove debug log

* fix default coin type (cosmos#1134)

* fix slip44 default

* Add test case

* build: bump to Go 1.20 + bump deps (cosmos#1132)

* build: bump to Go 1.20 + bump deps

This bumps the Go version to 1.20 and also bumps the SDK version to 0.47.0 and ibc-go to v7.0.0

* chore: update GH workflows to use Go 1.20 + update interchaintest deps

* chore: update missing deps in go.sum + use 1.20 in dockerfiles

* chore: bump to `setup-go/v4` and remove caching step

* chore: bump to `checkout/v3` and remove caching step

* chore: bump 1.20.2

* Fix flushing acks (cosmos#1139)

* Fix ordered channel closure (cosmos#1142)

* Fix ordered channel closure

* Increase timeout for scenarios test

* Fix tracking of init messages when IDs aren't the same

* bump interchaintest to include explicit port bindings

* Fix flush termination condition (cosmos#1141)

* bump to main sha (cosmos#1143)

* Pre-filter flush channels (cosmos#1146)

* Add channel close correlation (cosmos#1145)

* Add channel close correlation

* Switch to pre-close key

* make tx channel-close cli command work, add test coverage

* more sweet code removals

* update comment

* Fix flush on ordered channels (cosmos#1150)

* Fix flush on ordered channels

* Queue all packets at nextseqrecv or above

* Now that we have periodic flushing, skip blocks if they can't be queried (cosmos#1154)

* Lock config file for all write operations (cosmos#1156)

* Lock config file for all write operations

* Fix linter errs

* tidy

* more tidy

* Penumbra support v2 (cosmos#1144)

* Penumbra buf go gen

* Use go prefix override

* wip: penumbra relayer provider

remove copied-over cosmos provider tests, rename processor cosmos -> penumbra

rename ccp -> pcp

reformat into new relayer dir structure

update penumbra types to point to buf.build

building again

* fix penumbra

* fix: implement MsgSubmitMisbehaviour

* fix: remove unnecessary proto file + fix msg type cast

* chore: add removal of penumbra client protos in protocgen

* working penumbra relayer functionality

wip: unbase64?

wip: multiple messages per penumbra tx

wip: stub SendMessages impl

wip: attempt to split out common method

wip: use random anchor and work around path renaming

wip: improve logging

wip: changes during pairing

https://www.youtube.com/watch?v=RYonSOkZ5ZE

clean up logs

skip height bug workaround

drop debug panic

* update penumbra chain processor connection and channel message processing

* cleanup logging statements for review

Responding to review comments, honoring the style guide for logging, and
removing some unused reference code that was commented out while
debugging.

---------

Co-authored-by: Andrew Gouin <andrew@gouin.io>
Co-authored-by: Ava Howell <ava@penumbra.zone>
Co-authored-by: jtieri <justin@thetieris.com>
Co-authored-by: Ava Howell <ava@avahowell.me>
Co-authored-by: Conor Schaefer <conor@penumbralabs.xyz>
Co-authored-by: Justin Tieri <37750742+jtieri@users.noreply.github.com>

* --time-threshold example use cases (cosmos#1155)

* Make ICA waits more explicit (cosmos#1157)

* Make ICA waits more explicit

* poll for timeout

* poll for channel close confirm

* Comment out sqlite db file for scenarios tests

* Bump github.com/docker/docker in /interchaintest (cosmos#1160)

Bumps [github.com/docker/docker](https://github.com/docker/docker) from 20.10.19+incompatible to 20.10.24+incompatible.
- [Release notes](https://github.com/docker/docker/releases)
- [Commits](moby/moby@v20.10.19...v20.10.24)

---
updated-dependencies:
- dependency-name: github.com/docker/docker
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* bump version in docs (cosmos#1158)

* Bump github.com/opencontainers/runc in /interchaintest (cosmos#1153)

Bumps [github.com/opencontainers/runc](https://github.com/opencontainers/runc) from 1.1.3 to 1.1.5.
- [Release notes](https://github.com/opencontainers/runc/releases)
- [Changelog](https://github.com/opencontainers/runc/blob/v1.1.5/CHANGELOG.md)
- [Commits](opencontainers/runc@v1.1.3...v1.1.5)

---
updated-dependencies:
- dependency-name: github.com/opencontainers/runc
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Andrew Gouin <andrew@gouin.io>

* Fix QueryConnectionsUsingClient for cosmos (cosmos#1162)

* Make min query loop duration configurable (cosmos#1164)

* penumbra provider: update generated protos (cosmos#1168)

* Add sr25519 support (cosmos#1120)

* Migrate to cometbft

* Additional replaces

* Register comet proto types

* Add sr25519 support

* bump ictest

* Add keys test

* Update supported algos comment

* penumbra: update protos (cosmos#1170)

Updating the generated protos for Penumbra support. After lightly
editing the `scripts/protocgen.sh` script, I ran `make proto-gen`
and then committed the changes `relayer/chains/penumbra/`. Other
automatically updated protos I intentionally excluded from this PR, to
avoid side-effects.

Co-authored-by: Conor Schaefer <conor@penumbralabs.xyz>

* chore: add path name to logs in message processor (cosmos#1171)

* Fix multiple conn open init (cosmos#1173)

* allow register with extra_codecs (cosmos#1175)

* Harry/fee middleware (cosmos#1174)

* Register Counterparty relayer cmd and fee middleware test

* debugging the command

* debugging and finalizing the fee_middleware_test.

* debugging and finalizing the fee_middleware_test.

* merged with updated repo

* clear out some commanded code

* nits and suggestions post review

* more nits

* added one val no fullnode as chainspec

---------

Co-authored-by: Harry <harrycosmos@Harrys-MacBook-Pro.local>

* fix: nil receiver initiate for path (cosmos#1177)

* fix nil receiver initiate for path

ensure path get written to config

* add change doc

* feat: add max-gas-amount parameter in chain configs (cosmos#1178)

* add max fee

* add test

* add change doc

* Update cregistry/chain_info.go

* dep: bump sdk from v0.47.0 to v0.47.2 (cosmos#1180)

* bump sdk from v0.47.0 to v0.47.2

fix btcutil dep

* fix dep of hdkeychain

* Harry/rly tx channel (cosmos#1183)

* made a new method "logChannelOpenMessage" to log the newly opened channel into info level

* added fields

* some changes

---------

Co-authored-by: Harry <harrycosmos@Harrys-MacBook-Pro.local>

* Harry/rly tx transfer (cosmos#1184)

* made a new method "logChannelOpenMessage" to log the newly opened channel into info level

* added fields

* some changes

* recreated issue 1151, added logs

---------

Co-authored-by: Harry <harrycosmos@Harrys-MacBook-Pro.local>
Co-authored-by: Andrew Gouin <andrew@gouin.io>

* Better Error Messaging when failing to query the Block Height (cosmos#1189)

* better block data errors

* remove redundant field

* penumbra: update protos (cosmos#1181)

Matches the latest protos shipped with the Penumbra Testnet 52.

Co-authored-by: Conor Schaefer <conor@penumbralabs.xyz>
Co-authored-by: Justin Tieri <37750742+jtieri@users.noreply.github.com>

* Neutron launch fixes and optimizations (cosmos#1185)

* pipe max msgs through path processor

* only apply max msgs to packet msgs

* multiple msgs simultaneously on ordered chans

* flush should be more frequent if it fails or does not complete

* fix legacy

* handle feedback

* Problem: fixes in ibc-go v7.0.1 are not included (cosmos#1205)

* Problem: fixes in ibc-go v7.0.1 are not included

* add change doc

* Harry/rly address (cosmos#1204)

* added addresCmd to root and keys.go

* nicks

* nick

* made a common method "showAddressByChainAndKey" to be used by both addressCmd and keysShowCmd

---------

Co-authored-by: Harry <harrycosmos@Harrys-MacBook-Pro.local>
Co-authored-by: Andrew Gouin <andrew@gouin.io>

* deps: update to ibc-go v7.1.0-rc0 (cosmos#1207)

* Export wallet address for Prometheus metrics (cosmos#1206)

* export relayer address for pro

* address in updateFeesSpent

* make error messages consistent

* log error rather than return

* handle 0 balance

* chore: fix issue

* fix: connection key include

* chore: comment out flush

* fix: remove SET method from providerConfig

* chore: replace static naming with constant

* chore: packet timeout after relayer update

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Andrew Gouin <andrew@gouin.io>
Co-authored-by: Justin Tieri <37750742+jtieri@users.noreply.github.com>
Co-authored-by: Henry de Valence <hdevalence@hdevalence.ca>
Co-authored-by: Ava Howell <ava@penumbra.zone>
Co-authored-by: jtieri <justin@thetieris.com>
Co-authored-by: Ava Howell <ava@avahowell.me>
Co-authored-by: Conor Schaefer <conor@penumbralabs.xyz>
Co-authored-by: Dan Kanefsky <56059752+boojamya@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Conor Schaefer <conorsch@users.noreply.github.com>
Co-authored-by: mmsqe <tqd0800210105@gmail.com>
Co-authored-by: Cosmos-Harry <110472914+Cosmos-Harry@users.noreply.github.com>
Co-authored-by: Harry <harrycosmos@Harrys-MacBook-Pro.local>
Co-authored-by: mmsqe <mavis@crypto.com>
Co-authored-by: Keefer Taylor | Tessellated <keefer@tessellated.io>
Co-authored-by: izyak <test@test.com>
Co-authored-by: viveksharmapoudel <viveksharmapoudel@gmail.com>
izyak added a commit to icon-project/ibc-relay that referenced this pull request Sep 8, 2023