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

docs: adding line about module accounts / invariants #1597

Merged
merged 4 commits into from
Jun 28, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/middleware/ics29-fee/fee-distribution.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ If a counterparty payee is not registered for the forward relayer on the destina
A transaction must be submitted to the destination chain including a `CounterpartyPayee` address of an account on the source chain.
The transaction must be signed by the `Relayer`.

Note: If a module account address is used as the `CounterpartyPayee` it is recommended to [turn off invariant checks](https://github.com/cosmos/ibc-go/blob/71d7480c923f4227453e8a80f51be01ae7ee845e/testing/simapp/app.go#L659) for that module.
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it possible for us to rephrase this wording? Invariants breaking isn't just a matter of a node crashing, it represents a potential exploitable situation in the module itself, so disabling the invariants doesn't solve the issue. Instead, the module needs to be reconstructed such that it can account for payments being made by relayer incentivization

Copy link
Contributor

Choose a reason for hiding this comment

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

@charleenfei is going to open a PR to document that the preferred flow would be to use the module account of the fee grant because receiving/sending funds goes through the bank module and doesn't break things. Maybe this would help?

Copy link
Contributor

Choose a reason for hiding this comment

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

yup, that'd be perfect


```go
type MsgRegisterCounterpartyPayee struct {
// unique port identifier
Expand Down Expand Up @@ -63,6 +65,8 @@ If a payee is not registered for the reverse or timeout relayer on the source ch
A transaction must be submitted to the source chain including a `Payee` address of an account on the source chain.
The transaction must be signed by the `Relayer`.

Note: If a module account address is used as the `Payee` it is recommended to [turn off invariant checks](https://github.com/cosmos/ibc-go/blob/71d7480c923f4227453e8a80f51be01ae7ee845e/testing/simapp/app.go#L659) for that module.

```go
type MsgRegisterPayee struct {
// unique port identifier
Expand Down