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

RC v1.6.7 #77

Merged
merged 7 commits into from
May 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -924,6 +924,11 @@ func (app *App) registerUpgradeHandlers() {
return app.mm.RunMigrations(ctx, app.configurator, fromVM)
})

app.UpgradeKeeper.SetUpgradeHandler("v1.6.7", func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) {
app.Logger().Info("Starting v1.6.7 upgrade")
return app.mm.RunMigrations(ctx, app.configurator, fromVM)
})

upgradeInfo, err := app.UpgradeKeeper.ReadUpgradeInfoFromDisk()
if err != nil {
panic(fmt.Sprintf("failed to read upgrade info from disk %s", err))
Expand Down Expand Up @@ -1035,4 +1040,9 @@ func (app *App) registerUpgradeHandlers() {
storeUpgrades := storetypes.StoreUpgrades{}
app.SetStoreLoader(upgradetypes.UpgradeStoreLoader(upgradeInfo.Height, &storeUpgrades))
}

if upgradeInfo.Name == "v1.6.7" && !app.UpgradeKeeper.IsSkipHeight(upgradeInfo.Height) {
storeUpgrades := storetypes.StoreUpgrades{}
app.SetStoreLoader(upgradetypes.UpgradeStoreLoader(upgradeInfo.Height, &storeUpgrades))
}
}
16 changes: 14 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,21 @@ Please also make sure to have a look to the [contributing guidelines](https://gi

Information related to the Lum Network mainnet `lum-network-1` can be found in the [mainnet repository](https://github.com/lum-network/mainnet).

### v1.6.4 - `TODO` - Block `TODO`
### v1.6.7 - 2024-06-03 - Block 13241000
CosmosMillions: Fix ICQ issues and improve error management.

`TODO`
[Upgrade guide here](https://github.com/lum-network/mainnet/blob/master/upgrades/v1.6.7/guide.md).

### v1.6.6 - 2024-05-16 - Block 12969000
Vulnerability patch related to the Cosmos SDk.
CosmosMillions: Unlock HUAHUA Pool drawing procedure.

[Upgrade guide here](https://github.com/lum-network/mainnet/blob/master/upgrades/v1.6.6/guide.md).

### v1.6.5 - 2024-03-12 - Block 11992000
CosmosMillions: Add Close Pool feature and improve deposit retry for ICA operations.

[Upgrade guide here](https://github.com/lum-network/mainnet/blob/master/upgrades/v1.6.5/guide.md).

### v1.6.4 - 2024-02-01 - Block 11390000
CosmosMillions: Make ICA channel restoration unlock all entities and revamp the fee system to allow for more than one fee taker.
Expand Down
2 changes: 1 addition & 1 deletion tools/.env
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
GAIA_MNEMONIC=fiction inquiry pear evolve choose scatter spring weird cancel exile monster creek focus enforce celery object mistake desk glory broom welcome report car ritual
JUNO_MNEMONIC=trim ginger ask swift allow pair wait hollow nephew diet during couple ignore exclude network gentle giant machine deliver iron fall bachelor notice scheme
OSMOSIS_MNEMONIC=write away right various pilot tongue lava spray disease false series found shiver bright citizen unable daring fat funny inquiry decide skill fragile yellow
LUM_MNEMONIC=poem accuse sport census donor curious panther mean debris swap wire skin impose gym pretty dinosaur forget output dad steel venture farm gym pill
LUM_MNEMONIC="poem accuse sport census donor curious panther mean debris swap wire skin impose gym pretty dinosaur forget output dad steel venture farm gym pill"
10 changes: 5 additions & 5 deletions tools/config/hermes.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ port = 3001
id = 'gaia-devnet'
rpc_addr = 'http://gaia-local-net:26657'
grpc_addr = 'http://gaia-local-net:9090'
websocket_addr = 'ws://gaia-local-net:26657/websocket'
event_source = { mode = 'push', url = 'ws://gaia-local-net:26657/websocket', batch_delay = '500ms' }
rpc_timeout = '10s'
account_prefix = 'cosmos'
key_name = 'hrly1'
Expand All @@ -51,7 +51,7 @@ address_type = { derivation = 'cosmos' }
id = 'juno-devnet'
rpc_addr = 'http://juno-local-net:26657'
grpc_addr = 'http://juno-local-net:9090'
websocket_addr = 'ws://juno-local-net:26657/websocket'
event_source = { mode = 'push', url = 'ws://juno-local-net:26657/websocket', batch_delay = '500ms' }
rpc_timeout = '10s'
account_prefix = 'juno'
key_name = 'hrly2'
Expand All @@ -72,7 +72,7 @@ address_type = { derivation = 'cosmos' }
id = 'osmosis-devnet'
rpc_addr = 'http://osmosis-local-net:26657'
grpc_addr = 'http://osmosis-local-net:9090'
websocket_addr = 'ws://osmosis-local-net:26657/websocket'
event_source = { mode = 'push', url = 'ws://osmosis-local-net:26657/websocket', batch_delay = '500ms' }
rpc_timeout = '10s'
account_prefix = 'osmo'
key_name = 'hrly3'
Expand All @@ -90,10 +90,10 @@ trust_threshold = { numerator = '1', denominator = '3' }
address_type = { derivation = 'cosmos' }

[[chains]]
id = 'lumnetwork-testnet'
id = 'lum-devnet'
rpc_addr = 'http://host.docker.internal:26657'
grpc_addr = 'http://host.docker.internal:9090'
websocket_addr = 'ws://host.docker.internal:26657/websocket'
event_source = { mode = 'push', url = 'ws://host.docker.internal:26657/websocket', batch_delay = '500ms' }
rpc_timeout = '10s'
account_prefix = 'lum'
key_name = 'hrly4'
Expand Down
16 changes: 8 additions & 8 deletions tools/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ services:
sed -i 's/timeout_precommit_delta = "500ms"/timeout_precommit_delta = "200ms"/g' /home/juno/.juno/config/config.toml
sed -i 's/timeout_commit = "5s"/timeout_commit = "2s"/g' /home/juno/.juno/config/config.toml
sed -i 's/\("allow_messages": \)\[[^]]*\]/\1["\/cosmos.bank.v1beta1.MsgSend", "\/cosmos.bank.v1beta1.MsgMultiSend", "\/cosmos.staking.v1beta1.MsgDelegate", "\/cosmos.staking.v1beta1.MsgUndelegate", "\/cosmos.staking.v1beta1.MsgBeginRedelegate", "\/cosmos.staking.v1beta1.MsgRedeemTokensforShares", "\/cosmos.staking.v1beta1.MsgTokenizeShares", "\/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward", "\/cosmos.distribution.v1beta1.MsgSetWithdrawAddress", "\/ibc.applications.transfer.v1.MsgTransfer"]/' /home/juno/.juno/config/genesis.json
junod start --rpc.laddr tcp://0.0.0.0:26657 --pruning nothing
junod start --rpc.laddr tcp://0.0.0.0:26657 --grpc.address 0.0.0.0:9090 --pruning nothing

gaia-local-net:
build:
Expand Down Expand Up @@ -73,10 +73,10 @@ services:
gaiad keys add genesis_key --keyring-backend test
echo $GAIA_MNEMONIC | gaiad keys add relayer_key --keyring-backend test --recover
gaiad init genesis_key --chain-id=gaia-devnet
gaiad add-genesis-account `gaiad keys show genesis_key -a --keyring-backend test` 1000000000000000uatom --keyring-backend test
gaiad add-genesis-account `gaiad keys show relayer_key -a --keyring-backend test` 1000000000000000uatom --keyring-backend test
gaiad gentx genesis_key 1000000uatom --chain-id=gaia-devnet --keyring-backend test
gaiad collect-gentxs
gaiad genesis add-genesis-account `gaiad keys show genesis_key -a --keyring-backend test` 1000000000000000uatom --keyring-backend test
gaiad genesis add-genesis-account `gaiad keys show relayer_key -a --keyring-backend test` 1000000000000000uatom --keyring-backend test
gaiad genesis gentx genesis_key 1000000uatom --chain-id=gaia-devnet --keyring-backend test
gaiad genesis collect-gentxs
sed -i 's/"stake"/"uatom"/g' /home/gaia/.gaia/config/genesis.json
sed -i 's/minimum-gas-prices = ""/minimum-gas-prices = "0.001uatom"/g' /home/gaia/.gaia/config/app.toml
sed -i 's/timeout_propose = "3s"/timeout_propose = "1s"/g' /home/gaia/.gaia/config/config.toml
Expand All @@ -87,7 +87,7 @@ services:
sed -i 's/timeout_precommit_delta = "500ms"/timeout_precommit_delta = "200ms"/g' /home/gaia/.gaia/config/config.toml
sed -i 's/timeout_commit = "5s"/timeout_commit = "2s"/g' /home/gaia/.gaia/config/config.toml
sed -i 's/\("allow_messages": \)\[[^]]*\]/\1["\/cosmos.bank.v1beta1.MsgSend", "\/cosmos.bank.v1beta1.MsgMultiSend", "\/cosmos.staking.v1beta1.MsgDelegate", "\/cosmos.staking.v1beta1.MsgUndelegate", "\/cosmos.staking.v1beta1.MsgBeginRedelegate", "\/cosmos.staking.v1beta1.MsgRedeemTokensforShares", "\/cosmos.staking.v1beta1.MsgTokenizeShares", "\/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward", "\/cosmos.distribution.v1beta1.MsgSetWithdrawAddress", "\/ibc.applications.transfer.v1.MsgTransfer"]/' /home/gaia/.gaia/config/genesis.json
gaiad start --rpc.laddr tcp://0.0.0.0:26657 --pruning nothing
gaiad start --rpc.laddr tcp://0.0.0.0:26657 --grpc.address 0.0.0.0:9090 --pruning nothing

osmosis-local-net:
build:
Expand Down Expand Up @@ -131,7 +131,7 @@ services:
sed -i 's/timeout_precommit_delta = "500ms"/timeout_precommit_delta = "200ms"/g' /home/osmosis/.osmosisd/config/config.toml
sed -i 's/timeout_commit = "5s"/timeout_commit = "2s"/g' /home/osmosis/.osmosisd/config/config.toml
sed -i 's/\("allow_messages": \)\[[^]]*\]/\1["\/cosmos.bank.v1beta1.MsgSend", "\/cosmos.bank.v1beta1.MsgMultiSend", "\/cosmos.staking.v1beta1.MsgDelegate", "\/cosmos.staking.v1beta1.MsgUndelegate", "\/cosmos.staking.v1beta1.MsgBeginRedelegate", "\/cosmos.staking.v1beta1.MsgRedeemTokensforShares", "\/cosmos.staking.v1beta1.MsgTokenizeShares", "\/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward", "\/cosmos.distribution.v1beta1.MsgSetWithdrawAddress", "\/ibc.applications.transfer.v1.MsgTransfer"]/' /home/osmosis/.osmosisd/config/genesis.json
osmosisd start --rpc.laddr tcp://0.0.0.0:26657 --pruning nothing
osmosisd start --rpc.laddr tcp://0.0.0.0:26657 --grpc.address 0.0.0.0:9090 --pruning nothing

relayer-local-net:
build:
Expand Down Expand Up @@ -174,5 +174,5 @@ services:
echo $OSMOSIS_MNEMONIC > osmosis.txt
hermes keys add --key-name hrly3 --chain osmosis-devnet --mnemonic-file osmosis.txt --overwrite
echo $LUM_MNEMONIC > lum.txt
hermes keys add --key-name hrly4 --chain lumnetwork-testnet --mnemonic-file lum.txt --overwrite --hd-path "m/44'/880'/0'/0/0"
hermes keys add --key-name hrly4 --chain lum-devnet --mnemonic-file lum.txt --overwrite --hd-path "m/44'/880'/0'/0/0"
hermes start
4 changes: 2 additions & 2 deletions tools/dockerfiles/Dockerfile.gaia
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
FROM golang:1.18-alpine3.15 AS builder
FROM golang:1.21.10-alpine AS builder

WORKDIR /opt

RUN apk add --update curl make git libc-dev bash gcc linux-headers eudev-dev python3 nano

ENV COMMIT_HASH=v9.0.1
ENV COMMIT_HASH=v16.0.0

RUN git clone https://github.com/cosmos/gaia.git gaia-install \
&& cd gaia-install \
Expand Down
4 changes: 2 additions & 2 deletions tools/dockerfiles/Dockerfile.hermes
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
FROM rust:1.65-buster as builder
FROM rust:1.78-buster as builder

WORKDIR /opt

RUN apt update && apt install git bash curl nano htop -y

ENV COMMIT_HASH=v1.4.1
ENV COMMIT_HASH=v1.8.3
RUN git clone https://github.com/informalsystems/ibc-rs \
&& cd ibc-rs \
&& git checkout $COMMIT_HASH \
Expand Down
4 changes: 2 additions & 2 deletions tools/dockerfiles/Dockerfile.osmosis
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
FROM golang:1.19-alpine3.15 AS builder
FROM golang:1.22.3-alpine AS builder

WORKDIR /opt/

RUN set -eux; apk add --no-cache ca-certificates build-base; apk add git linux-headers

ENV COMMIT_HASH=v15.0.0
ENV COMMIT_HASH=v25.0.0

RUN git clone https://github.com/osmosis-labs/osmosis.git \
&& cd osmosis \
Expand Down
5 changes: 2 additions & 3 deletions x/icqueries/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package keeper

import (
"fmt"
"net/url"
"sort"
"strings"
"time"
Expand Down Expand Up @@ -121,7 +120,7 @@ func (k Keeper) VerifyKeyProof(ctx sdk.Context, msg *types.MsgSubmitQueryRespons
height := clienttypes.NewHeight(clienttypes.ParseChainID(query.ChainId), proofHeight+1)

// Confirm the query proof height occurred after the submission height
if proofHeight < query.SubmissionHeight {
if proofHeight <= query.SubmissionHeight {
return errorsmod.Wrapf(types.ErrInvalidICQProof, "Query proof height (%d) is older than the submission height (%d)", proofHeight, query.SubmissionHeight)
}

Expand Down Expand Up @@ -152,7 +151,7 @@ func (k Keeper) VerifyKeyProof(ctx sdk.Context, msg *types.MsgSubmitQueryRespons
var clientStateProof []*ics23.ProofSpec = tendermintClientState.ProofSpecs

// Get the merkle path and merkle proof
path := commitmenttypes.NewMerklePath([]string{pathParts[1], url.PathEscape(string(query.Request))}...)
path := commitmenttypes.NewMerklePath([]string{pathParts[1], string(query.Request)}...)
merkleProof, err := commitmenttypes.ConvertProofs(msg.ProofOps)
if err != nil {
return errorsmod.Wrapf(types.ErrInvalidICQProof, "Error converting proofs: %s", err.Error())
Expand Down
6 changes: 3 additions & 3 deletions x/millions/docs/relayer_setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ Once inside, you can type the following to create the links (repeat for each cha

### Create link for Gaia <=> Lum

`hermes create connection --a-chain lum-millions-1 --b-chain gaia-devnet`
`hermes create connection --a-chain lum-devnet --b-chain gaia-devnet`

`hermes create channel --a-chain lum-millions-1 --a-connection connection-0 --a-port transfer --b-port transfer`
`hermes create channel --a-chain lum-devnet --a-connection connection-0 --a-port transfer --b-port transfer`

Transactions may fail but will succeed at some point.

Expand Down Expand Up @@ -54,7 +54,7 @@ Then enter the container (replace ID inside)

Then type

`gaiad tx ibc-transfer transfer transfer channel-0 lum16rlynj5wvzwts5lqep0je5q4m3eaepn58hmzu5 1000000uatom --from genesis_key --keyring-backend test --chain-id gaia-devnet --fees 200uatom`
`gaiad tx ibc-transfer transfer transfer channel-0 lum1u33h97evzjpqkl9t8g7cd6wfvt2h9jzlahdzva 1000000uatom --from genesis_key --keyring-backend test --chain-id gaia-devnet --fees 200uatom`

If you type

Expand Down
7 changes: 7 additions & 0 deletions x/millions/keeper/keeper_draw.go
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,13 @@ func (k Keeper) OnQueryFreshPrizePoolCoinsOnRemoteZoneCompleted(ctx sdk.Context,
return nil, err
}
if draw.State != types.DrawState_IcqBalance {
// W're in the wrong state. If the state is already in error, and we are triggering because of an error, just ignore and don't return the error
// Because it's making the relayer trying to push again and again the same error
if isError && draw.State == types.DrawState_Failure {
return &draw, nil
}

// Otherwise we just process the error as expected
return &draw, errorsmod.Wrapf(types.ErrIllegalStateOperation, "state should be %s but is %s", types.DrawState_IcqBalance.String(), draw.State.String())
}

Expand Down
Loading