-
Notifications
You must be signed in to change notification settings - Fork 624
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
Find Elegant Solution if Fee Escrow account is out of balance #821
Comments
Should we close the channel? That would allow the counterparty to close as well I guess maybe we would assume in this case we want to pause the channel until a fix is hard forked in? It is interesting to think about how a middleware could close a channel (overriding the connected base application) |
After some discussion:
|
I'm working on this in smaller pieces, but in general:
|
After some more thought, the existence of insufficient balance of the escrow account doesn't need to disable all channels (whether it occurs on channel closure or fee distribution). Part of these channels will be on the receiving side and thus have no interaction with the escrow module I'll add a single mapping to a boolean in the keeper which will indicate if the fee escrow module is locked (due to insufficient balance) |
…istribution (#1251) ## Description closes: #821 --- Before we can merge this PR, please make sure that all the following items have been checked off. If any of the checklist items are not applicable, please leave them but write a little note why. - [x] Targeted PR against correct branch (see [CONTRIBUTING.md](https://github.com/cosmos/ibc-go/blob/master/CONTRIBUTING.md#pr-targeting)) - [x] Linked to Github issue with discussion and accepted design OR link to spec that describes this work. - [x] Code follows the [module structure standards](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules/structure.md). - [x] Wrote unit and integration [tests](https://github.com/cosmos/ibc-go/blob/master/CONTRIBUTING.md#testing) - [x] Updated relevant documentation (`docs/`) or specification (`x/<module>/spec/`) - [x] Added relevant `godoc` [comments](https://blog.golang.org/godoc-documenting-go-code). - [x] Added a relevant changelog entry to the `Unreleased` section in `CHANGELOG.md` - [x] Re-reviewed `Files changed` in the Github PR explorer - [x] Review `Codecov Report` in the comment section below once CI passes
The current way to deal with the worst-case scenario of when escrow account is out of balance is to disable the fee module on all channels.
However, this will only happen on our channel end. The other channel end will continue with the fee module enabled since there isn't a good way to communicate that our side has disabled fees once the channel is already open.
This will lead to an invalid state where one side has fee enabled and the other side does not.
We should determine a better way to handle this case.
Perhaps we keep fee enabled, but just do not distribute the fee on our side.
Thanks to @soareschen for pointing this out
The text was updated successfully, but these errors were encountered: