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

Make the fee event correct before v1.13 goes to prod #1092

Closed
4 tasks
arnabmitra opened this issue Sep 26, 2022 · 0 comments · Fixed by #1107
Closed
4 tasks

Make the fee event correct before v1.13 goes to prod #1092

arnabmitra opened this issue Sep 26, 2022 · 0 comments · Fixed by #1107
Assignees

Comments

@arnabmitra
Copy link
Contributor

arnabmitra commented Sep 26, 2022

Summary of Bug

Make the fee event correct before v1.13 goes to prod.
Currently

events := sdk.Events{sdk.NewEvent(sdk.EventTypeTx,
		sdk.NewAttribute(sdk.AttributeKeyFee, feeTx.GetFee().String()),
	),
	

Which is correct in case of success

But in failure case, this is not right because the fee charged is only the

sdk.NewEvent(sdk.EventTypeTx,
			sdk.NewAttribute(AttributeKeyMinFeeCharged, baseFeeToConsume.String()),
		),

so proposed fix is to set this value to baseFeeToConsume.String( initially but to swap it out to total fee charged value
if the runMsgs is a success, will require changes to baseapp.go to do that.

We also need to emit the suppressed sdk SendCoin events from the FeeInvoker distribution of funds. These include the rollup of fees to the FeeModule and Recipients of msgfees and event for the Swept Fee amount.

Version

v.1.12 (current production)

Steps to Reproduce

Send a tx which will fail, fee charged will be only the min_fee_charged event but fee event will be whatever is sent in.


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@arnabmitra arnabmitra changed the title Make the fees field correct before v1.13 goes to prod Make the fees event correct before v1.13 goes to prod Sep 26, 2022
@arnabmitra arnabmitra changed the title Make the fees event correct before v1.13 goes to prod Make the fee event correct before v1.13 goes to prod Sep 26, 2022
@iramiller iramiller moved this from Todo to Done in Provenance Core Protocol Team Jun 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging a pull request may close this issue.

2 participants