Skip to content
New issue

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

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

Already on GitHub? # to your account

Emit events indicating total fees paid upon a packet relay in ics29 #2847

Closed
3 tasks
colin-axner opened this issue Nov 29, 2022 · 3 comments · Fixed by #2975
Closed
3 tasks

Emit events indicating total fees paid upon a packet relay in ics29 #2847

colin-axner opened this issue Nov 29, 2022 · 3 comments · Fixed by #2975
Assignees
Milestone

Comments

@colin-axner
Copy link
Contributor

Summary

Using the event system, an external user should be able to determine the amount of fees paid via ics29. Add an event upon distribution of fees.

Problem Definition

We currently only emit total fees escrowed (which doesn't indicate total fees paid)

Proposal

Add a function EmitDistributeFeeEvent to events.go

Within distributeFeeOnAcknowledgement keep track of the total fees not refunded. Pass the total amount into EmitDistributeFeeEvent

Within distributeFeeOnTimeoutEvent, call EmitDistributeFeeEvent using the timeoutFee


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged/assigned
@colin-axner
Copy link
Contributor Author

It's probably desirable to know which address is receiving the fee. Instead of batching up the total fees distributed, each time a non refund fee is distributed, emit a distribution event which includes the total amount and the address being distributed to

@crodriguezvega crodriguezvega moved this to Backlog in ibc-go Nov 29, 2022
@crodriguezvega crodriguezvega moved this from Backlog to Todo in ibc-go Dec 5, 2022
@crodriguezvega
Copy link
Contributor

crodriguezvega commented Dec 7, 2022

Background information shared by @adizere to inform priority:

it would be good if this can be done (not released, only drafted in a PR so we can use it in simd) as soon as possible -- if possible December or January, it would be amazing!
for context, we're doing a demo for relayer operators demonstrating the usefulness of fees, and this feature seems necessary we're still experimenting with things so we might have additional feedback by the way

@crodriguezvega
Copy link
Contributor

It's probably desirable to know which address is receiving the fee. Instead of batching up the total fees distributed, each time a non refund fee is distributed, emit a distribution event which includes the total amount and the address being distributed to

Given this comment by @colin-axner I think the easiest will be to call EmitDistributeFeeEvent inside distributeFee in the case when the call to k.bankKeeper.SendCoinsFromModuleToAccount does not return an error.

@damiannolan damiannolan self-assigned this Jan 3, 2023
@damiannolan damiannolan moved this from Todo to In progress in ibc-go Jan 3, 2023
@damiannolan damiannolan moved this from In progress to In review in ibc-go Jan 3, 2023
@crodriguezvega crodriguezvega added this to the v7.0.0 milestone Jan 8, 2023
@github-project-automation github-project-automation bot moved this from In review to Todo in ibc-go Jan 19, 2023
@crodriguezvega crodriguezvega moved this from Todo to Done in ibc-go Jan 22, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
Status: Done 🥳
Development

Successfully merging a pull request may close this issue.

3 participants