-
Notifications
You must be signed in to change notification settings - Fork 161
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
fix: ibc transfer memo and receiver length check #2551
fix: ibc transfer memo and receiver length check #2551
Conversation
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the WalkthroughThe Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
Actions performedReview triggered.
|
|
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.
Actionable comments posted: 4
Outside diff range and nitpick comments (1)
util/ibc/ibc.go (1)
14-30
: The constantsMaximumReceiverLength
andMaximumMemoLength
are set to very high values. Consider whether these limits are practical or if they should be reduced to prevent potential abuse.It might be beneficial to consult with the network security team or check the typical lengths used in the industry to set these constants appropriately.
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (9)
- CHANGELOG.md (1 hunks)
- RELEASE_NOTES.md (1 hunks)
- app/upgrades.go (1 hunks)
- tests/e2e/e2e_ibc_test.go (2 hunks)
- tests/e2e/setup/utils.go (1 hunks)
- util/ibc/ibc.go (2 hunks)
- util/ibc/ibc_test.go (2 hunks)
- util/sdkutil/string.go (2 hunks)
- x/oracle/keeper/historic_price.go (1 hunks)
Additional context used
GitHub Check: codecov/patch
util/sdkutil/string.go
[warning] 35-35: util/sdkutil/string.go#L35
Added line #L35 was not covered by tests
[warning] 37-40: util/sdkutil/string.go#L37-L40
Added lines #L37 - L40 were not covered by tests
[warning] 42-42: util/sdkutil/string.go#L42
Added line #L42 was not covered by testsutil/ibc/ibc.go
[warning] 50-50: util/ibc/ibc.go#L50
Added line #L50 was not covered by testsx/oracle/keeper/historic_price.go
[warning] 48-48: x/oracle/keeper/historic_price.go#L48
Added line #L48 was not covered by tests
LanguageTool
RELEASE_NOTES.md
[typographical] ~11-~11: It appears that a comma is missing. (DURING_THAT_TIME_COMMA)
Context: ...rocedure) document. ## v6.5.0 In this release we are adding validations to ibc-transf...
[uncategorized] ~15-~15: Possible missing article found. (AI_HYDRA_LEO_MISSING_THE)
Context: ...se updates our dependencies and applies latest patches to the v6.4.x line. All validat...
[grammar] ~47-~47: The auxiliary verb ‘do’ requires the base form of the verb. (DID_BASEFORM)
Context: ...ved that Price Feeder doesn't correctly re-established a connection after the chain upgrade. ...
[uncategorized] ~51-~51: Possible missing comma found. (AI_HYDRA_LEO_MISSING_COMMA)
Context: ...ld the binary from source on the server machine you probably don't need any change. How...
[uncategorized] ~60-~60: You might be missing the article “the” here. (AI_EN_LECTOR_MISSING_DETERMINER_THE)
Context: .... ### Upgrade instructions - Download latest binary or build from source. - Make sur...
[uncategorized] ~65-~65: You might be missing the article “the” here. (AI_EN_LECTOR_MISSING_DETERMINER_THE)
Context: ...hain upgrade. - Swap binaries. - Ensure latest Price Feeder (see [compatibility matrix...CHANGELOG.md
[grammar] ~107-~107: Using ‘plenty’ without ‘of’ is considered to be informal. (PLENTY_OF_NOUNS)
Context: .../pull/2368) Fix inflow amount calculation. Previously, the inflow amount of the t...
[grammar] ~209-~209: Did you mean “limiting”? Or maybe you should add a pronoun? In active voice, ‘allow’ + ‘to’ takes an object, usually a pronoun. (ALLOW_TO)
Context: ...veragedLiquidate.MaxRepay` which allows to limit the liquidation size using the leverage...
[grammar] ~342-~342: The singular proper name ‘Bridge’ must be used with a third-person or a past tense verb. (HE_VERB_AGR)
Context: ...-network/umee/pull/1967) Gravity Bridge phase out phase-2: disable Umee -> Ethereum t...
[grammar] ~343-~343: The singular proper name ‘Bridge’ must be used with a third-person or a past tense verb. (HE_VERB_AGR)
Context: ...-network/umee/pull/1967) Gravity Bridge phase out phase-2: disable Umee -> Ethereum t...
[grammar] ~393-~393: Make sure that the singular noun after the number ‘4.1’ is correct. (CD_POINT_CD_NN)
Context: ...e/pull/1807) Fixes BNB ibc denom in 4.1 migration - [1812](https://github.com/umee-networ...
[style] ~411-~411: In contexts where ‘if’ is followed by ‘or’, using ‘whether’ may be more appropriate (and formal). (IF_WHETHER)
Context: ...rowand
MsgRepay` won't return errors if there is nothing to withdraw, borrow or...
[duplication] ~462-~462: Possible typo: you repeated a word (ENGLISH_WORD_REPEAT_RULE)
Context: ...e/pull/1555) Updates IBC to v5.1.0 that adds adds optional memo field to `FungibleTokenPa...
[uncategorized] ~519-~519: A comma may be missing after the conjunctive/linking adverb ‘Also’. (SENT_START_CONJUNCTIVE_LINKING_ADVERB_COMMA)
Context: ...ableLend, docs, and internal functions. Also QueryLoaned similar queries to QuerySup...
[misspelling] ~523-~523: This word is normally spelled as one. (EN_COMPOUNDS_PROTO_TYPES)
Context: ...roto getters in x/leverage and x/oracle proto types. - [1126](https://github.com/umee-netwo...
[uncategorized] ~544-~544: Possible missing comma found. (AI_HYDRA_LEO_MISSING_COMMA)
Context: ...umee/pull/1157) AddedPrintOrErr
util function optimizing the CLI code flow. - [1118](...
[duplication] ~642-~642: Possible typo: you repeated a word (ENGLISH_WORD_REPEAT_RULE)
Context: ...k/umee/pull/1358/files) Disable Gravity Bridge bridge messages. ### Improvements - [#1355](...
Additional comments not posted (5)
util/ibc/ibc.go (1)
40-50
: The error handling inGetFundsFromPacket
is correctly implemented. However, ensure that the error messages are consistent and informative.Tools
GitHub Check: codecov/patch
[warning] 50-50: util/ibc/ibc.go#L50
Added line #L50 was not covered by testsapp/upgrades.go (1)
54-54
: The registration of the upgrade handler forv6.5
follows established patterns and uses the encapsulated function correctly.x/oracle/keeper/historic_price.go (1)
48-48
: The removal of the//nolint: goconst
directive and the addition of error wrapping enhance error clarity and maintainability.Tools
GitHub Check: codecov/patch
[warning] 48-48: x/oracle/keeper/historic_price.go#L48
Added line #L48 was not covered by teststests/e2e/setup/utils.go (1)
145-148
: The enhancements in error handling and logging when IBC transfer quotas are exceeded improve the robustness and clarity of theSendIBC
function.CHANGELOG.md (1)
51-51
: The entry for PR 2551 in the changelog correctly links to the pull request and briefly describes the change. However, the description could be more specific about what the validation checks for, such as length restrictions or format validations.
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.
pre-approving.
I think that this is a really good way of addressing the issue, I think that it's important that any transaction size management is actually not done in the relay software, but instead enforced by the chain. The sizes that you have chosen here make sense to me, I do just want to caution that I think that it's possible that someone wanting to interrupt chain functionality in a timed way may Just send lots of little transactions, but this is way better than nothing. Thank you! Are you guys able to let me know the longest block times experienced while two wallets were attempting to do IBC transactions with them? Is the hub Channel currently working? |
Hi @faddat . Thanks for looking into it , and your work and precautious to alarm the community. We don't have information about "longest block times experienced..." |
Description
closes: #XXXX
Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
!
to the type prefix if API or client breaking changeCHANGELOG.md
Reviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
I have...
Summary by CodeRabbit
New Features
ibc-transfer
message receiver and memo fields to reduce spam transactions.Bug Fixes
SendIBC
function for transaction hash outputs.Tests