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

x/feegrant API Audit changes #9194

Merged
merged 15 commits into from
May 3, 2021
Merged

x/feegrant API Audit changes #9194

merged 15 commits into from
May 3, 2021

Conversation

technicallyty
Copy link
Contributor

@technicallyty technicallyty commented Apr 23, 2021

Description

-changes keeper methods and proto messages to be more streamlined
-add comments to msg and query server
-remove decorator from docs
-add coments to msgs.go
-remove decorator from godoc

ref: #9115


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.

  • Targeted PR against correct branch (see CONTRIBUTING.md)
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Code follows the module structure standards.
  • Wrote unit and integration tests
  • Updated relevant documentation (docs/) or specification (x/<module>/spec/)
  • Added relevant godoc comments.
  • Added a relevant changelog entry to the Unreleased section in CHANGELOG.md
  • Re-reviewed Files changed in the Github PR explorer
  • Review Codecov Report in the comment section below once CI passes

-add comments to msg and query server
-remove decorator from docs
-add coments to msgs.go
-remove decorator from godoc
Copy link
Contributor

@blushi blushi left a comment

Choose a reason for hiding this comment

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

It seems like we're missing this point:

Same as in x/authz, we should simplify msg and types naming. Also (a FeeAllowanceGrant) GetFeeGrant() method naming is a bit confusing. Why not just use GetAllowance()?

In particular, I guess FeeAllowanceGrant could become AllowanceGrant (or even just Grant?), BasicFeeAllowance -> BasicAllowance, etc.

x/feegrant/spec/01_concepts.md Show resolved Hide resolved
x/feegrant/spec/04_events.md Outdated Show resolved Hide resolved
technicallyty and others added 4 commits April 26, 2021 07:56
Co-authored-by: Marie Gauthier <marie.gauthier63@gmail.com>
*refactor proto msg names and functions
*add docs pertaining to auth's ante handler for deducted fees
@codecov
Copy link

codecov bot commented Apr 26, 2021

Codecov Report

Merging #9194 (3343f84) into master (711976e) will not change coverage.
The diff coverage is 78.75%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #9194   +/-   ##
=======================================
  Coverage   60.14%   60.14%           
=======================================
  Files         595      595           
  Lines       37194    37194           
=======================================
  Hits        22369    22369           
  Misses      12846    12846           
  Partials     1979     1979           
Impacted Files Coverage Δ
x/feegrant/types/basic_fee.go 75.00% <0.00%> (ø)
x/feegrant/types/filtered_fee.go 0.00% <0.00%> (ø)
x/feegrant/types/genesis.go 14.28% <0.00%> (ø)
x/feegrant/types/periodic_fee.go 56.25% <0.00%> (ø)
x/feegrant/types/grant.go 44.18% <18.18%> (ø)
x/feegrant/simulation/operations.go 76.99% <83.33%> (ø)
x/feegrant/client/testutil/suite.go 99.66% <100.00%> (ø)
x/feegrant/genesis.go 90.90% <100.00%> (ø)
x/feegrant/keeper/grpc_query.go 81.39% <100.00%> (ø)
x/feegrant/keeper/keeper.go 85.05% <100.00%> (ø)
... and 5 more

@technicallyty
Copy link
Contributor Author

technicallyty commented Apr 26, 2021

It seems like we're missing this point:

Same as in x/authz, we should simplify msg and types naming. Also (a FeeAllowanceGrant) GetFeeGrant() method naming is a bit confusing. Why not just use GetAllowance()?

In particular, I guess FeeAllowanceGrant could become AllowanceGrant (or even just Grant?), BasicFeeAllowance -> BasicAllowance, etc.

I slimmed down pretty much all the proto messages to be more to the point. FeeAllowanceGrant -> Grant and BasicFeeAllowance -> BasicAllowance etc. Let me know how this looks @blushi

Copy link
Member

@aaronc aaronc left a comment

Choose a reason for hiding this comment

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

Looks okay from an API perspective. Are we removing height based expiration in a separate PR?

@technicallyty
Copy link
Contributor Author

Looks okay from an API perspective. Are we removing height based expiration in a separate PR?

Yes @aleem1314 is taking care of that in another PR

Copy link
Contributor

@blushi blushi left a comment

Choose a reason for hiding this comment

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

LGTM!

@blushi blushi added A:automerge Automatically merge PR once all prerequisites pass. and removed A:automerge Automatically merge PR once all prerequisites pass. labels Apr 27, 2021
@amaury1093
Copy link
Contributor

@technicallyty Could you fix the conflicts?

@github-actions github-actions bot added C:CLI C:Simulations C:x/auth C:x/feegrant T:Docs Changes and features related to documentation. labels Apr 27, 2021
@aaronc aaronc added T: Proto Breaking Protobuf breaking changes: never don't do this! T: API Breaking Breaking changes that impact APIs and the SDK only (not state machine). labels Apr 27, 2021
@blushi blushi self-assigned this Apr 29, 2021
@blushi
Copy link
Contributor

blushi commented Apr 29, 2021

@technicallyty could you fix the lint issues?

@technicallyty
Copy link
Contributor Author

@AmauryM @blushi - lint + conflicts all cleared now 👍🏻

@blushi blushi added the A:automerge Automatically merge PR once all prerequisites pass. label May 3, 2021
@mergify mergify bot merged commit d3bcc15 into master May 3, 2021
@mergify mergify bot deleted the ty-9115-feegrant_audit branch May 3, 2021 12:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A:automerge Automatically merge PR once all prerequisites pass. C:CLI C:Simulations C:x/auth C:x/feegrant T: API Breaking Breaking changes that impact APIs and the SDK only (not state machine). T:Docs Changes and features related to documentation. T: Proto Breaking Protobuf breaking changes: never don't do this!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants