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 module NTRN-393 #706

Merged
merged 98 commits into from
Oct 2, 2024
Merged

ibc rate limit module NTRN-393 #706

merged 98 commits into from
Oct 2, 2024

Conversation

quasisamurai
Copy link
Contributor

@quasisamurai quasisamurai commented Sep 3, 2024

This PR implements a neutron's adaptation of Osmosis' ibc-rate-limit.
It includes:

  • Module itself
  • Slightly reworked app.go's modules & keepers init
  • Rewritten & adapted tests
  • PR w updated contract by range team
  • Reworked params model
  • Int tests

TASK

@quasisamurai
Copy link
Contributor Author

pr0n00gler
pr0n00gler previously approved these changes Oct 1, 2024
suite.RegisterRateLimitingContract(addr)

// send 2.5% (quota is 5%)
fmt.Printf("Sending %s from A to B. Represented in chain A as wrapped? %v\n", denom, !native)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Remove printlns, please

Copy link
Contributor Author

Choose a reason for hiding this comment

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

discussed in dms, we decided to do so


// send 2.5% (quota is 5%)
fmt.Println("trying to send ", sendAmount)
r, _ := suite.AssertSend(true, suite.MessageFromAToB(denom, sendAmount))
Copy link
Collaborator

Choose a reason for hiding this comment

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

errors are not handles, fix it everywhere, please

Copy link
Contributor Author

@quasisamurai quasisamurai Oct 1, 2024

Choose a reason for hiding this comment

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

there is no need for that as soon as AssertSend is designed to handle (or expect) the error. behaviour depends on the first parameter

Copy link
Contributor

@sotnikov-s sotnikov-s left a comment

Choose a reason for hiding this comment

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

briefly looked at the code, more thoroughly looked at the tests — LGTM

@pr0n00gler pr0n00gler merged commit d943d12 into main Oct 2, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants