-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
feegrant filtered msgs #8604
feegrant filtered msgs #8604
Conversation
Codecov Report
@@ Coverage Diff @@
## master #8604 +/- ##
==========================================
+ Coverage 58.97% 59.00% +0.03%
==========================================
Files 576 577 +1
Lines 32377 32481 +104
==========================================
+ Hits 19095 19167 +72
- Misses 11041 11052 +11
- Partials 2241 2262 +21
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FilteredFeeAllowance looks right. How about keep things simple and just pass []sdk.Msg
into the allowance?
google.protobuf.Any allowance = 1 [(cosmos_proto.accepts_interface) = "FeeAllowanceI"]; | ||
|
||
// allowed_messages are the messages for which the grantee has the access. | ||
repeated string allowed_messages = 2; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes sense.
…egrant-filtered-msgs
…egrant-filtered-msgs
…egrant-filtered-msgs
…smos-sdk into atheesh/feegrant-filtered-msgs
…egrant-filtered-msgs
…egrant-filtered-msgs
…smos-sdk into atheesh/feegrant-filtered-msgs
@robert-zaremba suggesting we should go with the same (10 gas / iteration) as in #8984 |
…egrant-filtered-msgs
…smos-sdk into atheesh/feegrant-filtered-msgs
Updated gas cost as per the discussion, @robert-zaremba, @clevinson or @AmauryM can you confirm the changes and add automerge label if it is fine. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, if we can avoid panics that'd be ideal
func (a *AllowedMsgFeeAllowance) PrepareForExport(dumpTime time.Time, dumpHeight int64) FeeAllowanceI { | ||
allowance, err := a.GetAllowance() | ||
if err != nil { | ||
panic("failed to get allowance") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would change the signature here to return an error
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AmauryM this is in exporting genesis, I think panic is fine here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall LGTM. One small question, Afaik we removed feegrant/ante/ante.go
in #8682. Any reason this is introduced again?
This PR a bit older than the #8682. earlier, ante file was present in feegrant itself and the changes made here. May be that's why it is showing the |
…egrant-filtered-msgs
Description
closes: #8563
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.
docs/
) or specification (x/<module>/spec/
)godoc
comments.Unreleased
section inCHANGELOG.md
Files changed
in the Github PR explorerCodecov Report
in the comment section below once CI passes