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

IBC rate limit query #4246

Merged
merged 11 commits into from
Jan 22, 2025
Merged

IBC rate limit query #4246

merged 11 commits into from
Jan 22, 2025

Conversation

grarco
Copy link
Collaborator

@grarco grarco commented Jan 17, 2025

Describe your changes

Adds a query to retrieve the ibc rate limit for a specific token.

Checklist before merging

  • If this PR has some consensus breaking changes, I added the corresponding breaking:: labels
    • This will require 2 reviewers to approve the changes
  • If this PR requires changes to the docs or specs, a corresponding PR is opened in the namada-docs repo
    • Relevant PR if applies:
  • If this PR affects services such as namada-indexer or namada-masp-indexer, a corresponding PR is opened in that repo
    • Relevant PR if applies:

grarco added a commit that referenced this pull request Jan 17, 2025
@grarco grarco force-pushed the grarco/query-ibc-rate-limits branch from 0464530 to 8a4ba07 Compare January 17, 2025 19:13
@grarco grarco marked this pull request as ready for review January 17, 2025 19:13
crates/sdk/src/rpc.rs Outdated Show resolved Hide resolved
@grarco grarco requested review from yito88 and brentstone January 17, 2025 19:18
@grarco
Copy link
Collaborator Author

grarco commented Jan 17, 2025

@brentstone I've also added a cli command for the query. Let me know if we only need the sdk function so that I can revert that change

Copy link

codecov bot commented Jan 17, 2025

Codecov Report

Attention: Patch coverage is 43.39623% with 30 lines in your changes missing coverage. Please review.

Project coverage is 74.02%. Comparing base (c70475b) to head (3859e51).
Report is 12 commits behind head on main.

Files with missing lines Patch % Lines
crates/sdk/src/rpc.rs 24.32% 28 Missing ⚠️
crates/ibc/src/parameters.rs 50.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4246      +/-   ##
==========================================
- Coverage   74.03%   74.02%   -0.01%     
==========================================
  Files         345      345              
  Lines      109877   109920      +43     
==========================================
+ Hits        81349    81370      +21     
- Misses      28528    28550      +22     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

crates/sdk/src/rpc.rs Outdated Show resolved Hide resolved
@brentstone brentstone requested a review from yito88 January 18, 2025 08:34
@brentstone
Copy link
Collaborator

@grarco I've fixed up some things and I think the PR is rdy now

@brentstone brentstone added this to the v1.1.0 milestone Jan 18, 2025
@grarco grarco force-pushed the grarco/query-ibc-rate-limits branch 2 times, most recently from 3f0d76d to 979fcb4 Compare January 20, 2025 18:03
throughput_str
);
}
Err(_) => {
Copy link
Collaborator Author

@grarco grarco Jan 20, 2025

Choose a reason for hiding this comment

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

Actually, given the way the ibc vp validates transactions, this logic is wrong. The sdk query_ibc_rate_limits function returns an error if just one of the two keys is missing and in here we fallback to the default values for both, but the vp does actually support setting only one of the two and then using the default param for the other one. I'll try to rework this

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done in 9a1b9b3

Copy link
Collaborator

Choose a reason for hiding this comment

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

thx, gotcha!

grarco added a commit that referenced this pull request Jan 20, 2025
@grarco grarco force-pushed the grarco/query-ibc-rate-limits branch from 979fcb4 to 2fdf5e6 Compare January 20, 2025 21:25
@brentstone brentstone requested a review from tzemanovic January 21, 2025 06:20
Copy link
Member

@tzemanovic tzemanovic left a comment

Choose a reason for hiding this comment

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

just 1 suggestion, otherwise lgtm

@brentstone brentstone force-pushed the grarco/query-ibc-rate-limits branch from 2fdf5e6 to 96d24aa Compare January 22, 2025 15:43
@brentstone brentstone requested a review from tzemanovic January 22, 2025 15:45
@tzemanovic tzemanovic added the merge Ready to merge - mergifyio bot will add the PR to merge queue when all checks pass label Jan 22, 2025
@mergify mergify bot merged commit 0f54f09 into main Jan 22, 2025
23 of 25 checks passed
@mergify mergify bot deleted the grarco/query-ibc-rate-limits branch January 22, 2025 18:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli client IBC merge Ready to merge - mergifyio bot will add the PR to merge queue when all checks pass non-breaking-change SDK
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants