-
Notifications
You must be signed in to change notification settings - Fork 161
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: ibc transfer memo and receiver length check (#2551)
- Loading branch information
Showing
10 changed files
with
105 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,64 +6,10 @@ | |
|
||
The Release Procedure is defined in the [CONTRIBUTING](CONTRIBUTING.md#release-procedure) document. | ||
|
||
## v6.4.1 | ||
## v6.5.0 | ||
|
||
This release updates our dependencies and applies latest patches to the v6.4.x line. All validators must update to this patch release. | ||
In this release, we are introducing validations for the IBC transfer message receiver address and memo fields. These enhancements aim to address and resolve the recent incident involving spam IBC transfer transactions. | ||
|
||
## v6.4.0 | ||
|
||
Highlights: | ||
|
||
- Cosmos SDK v0.47.10 patch update. | ||
- IBC Hooks: we integrated ICS20 Memo handling. | ||
- Integrated Packet Forwarding Middleware. | ||
- Update `uibc/MsgGovUpdateQuota` Msg type to handle the new inflow parameters. | ||
- Update `uibc/QueryAllOutflowsResponse` to include denom symbol (token name) in every outflow. | ||
|
||
[CHANGELOG](CHANGELOG.md) | ||
|
||
### IBC Hooks | ||
|
||
This release brings the first part of the seamless cross-chain money market transactions. At UX, we want to provide the best User Experience for handling lending and leverage. In this release, we support the following `x/leverage` messages: | ||
|
||
- `MsgSupply` | ||
- `MsgSupplyCollateral` | ||
- `MsgLiquidate` | ||
|
||
The operation can only use tokens that are part of the IBC transfer (after any intermediate deductions) and the supplier / liquidator must be the IBC recipient (acting on someone else's behalf is not allowed). Authz is not supported. The remaining tokens will be credited to the recipient. | ||
|
||
Documentation: [x/uibc/README.md](https://github.com/umee-network/umee/blob/v6.4.0/x/uibc/README.md#ibc-ics20-hooks) | ||
|
||
### Validators | ||
|
||
**Upgrade Title** (for Cosmovisor): **v6.4**. | ||
|
||
Update Price Feeder to `umee/2.4.1+`. | ||
|
||
NOTE: after the upgrade, you should restart your Price Feeder. We observed that Price Feeder doesn't correctly re-established a connection after the chain upgrade. | ||
|
||
#### libwasmvm update | ||
|
||
Our dependencies have been updated. The binary requires `libwasmvm v1.5.2`. When you build the binary from source on the server machine you probably don't need any change. However, when you download a binary from GitHub, or from another source, make sure you update the `/usr/lib/libwasmvm.<cpu_arch>.so`. For example: | ||
|
||
- copy from `$GOPATH/pkg/mod/github.com/!cosm!wasm/[email protected]/internal/api/libwasmvm.$(uname -m).so` | ||
- or download from github `wget https://raw.githubusercontent.com/CosmWasm/wasmvm/v1.5.2/internal/api/libwasmvm.$(uname -m).so -O /lib/libwasmvm.$(uname -m).so` | ||
|
||
You don't need to do anything if you are using our Docker image. | ||
|
||
### Upgrade instructions | ||
|
||
- Download latest binary or build from source. | ||
- Make sure `libwasmvm.$(uname -m).so` is properly linked | ||
- Run the binary to make sure it works for you: `umeed version` | ||
- Wait for software upgrade proposal to pass and trigger the chain upgrade. | ||
- Swap binaries. | ||
- Ensure latest Price Feeder (see [compatibility matrix](https://github.com/umee-network/umee/#release-compatibility-matrix)) is running and ensure your price feeder configuration is up-to-date. | ||
- Restart the chain. | ||
- Restart Price Feeder. | ||
|
||
You can use Cosmovisor → see [instructions](https://github.com/umee-network/umee/#cosmovisor). | ||
|
||
#### Docker | ||
|
||
Docker images are available in [ghcr.io umee-network](https://github.com/umee-network/umee/pkgs/container/umeed) repository. | ||
- Maximum length for IBC transfer memo field: 32,768 characters | ||
- Maximum length for IBC transfer receiver address field: 2,048 characters | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package tsdk | ||
|
||
import "math/rand" | ||
|
||
func GenerateString(length uint) string { | ||
// character set used for generating a random string in GenerateString | ||
charset := "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" | ||
bytes := make([]byte, length) | ||
for i := range bytes { | ||
bytes[i] = charset[rand.Intn(len(charset))] //nolint | ||
} | ||
return string(bytes) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package tsdk_test | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/umee-network/umee/v6/tests/tsdk" | ||
"gotest.tools/v3/assert" | ||
) | ||
|
||
// TestGenerateString checks the randomness and length properties of the generated string. | ||
func TestGenerateString(t *testing.T) { | ||
length := 10 | ||
str := tsdk.GenerateString(uint(length)) | ||
assert.Equal(t, len(str), length, "Generated string length should match the input length") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters