-
Notifications
You must be signed in to change notification settings - Fork 691
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
deps!: use cosmos-sdk v0.45.16-lsm-ics #2643
Merged
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
1016c69
deps: use cosmos-sdk v0.45.16-lsm-ics
MSalopek 52463f4
deps&rebase: use cosmos-sdk v0.45.16-lsm-ics
MSalopek 48b8b29
add local testing script
MSalopek a00461c
fix: update test_helpers; use latest lsm/ics versions
MSalopek d77b032
Merge branch 'main' into masa/tests-gaia-lsm-ics
MSalopek 0952f5e
chore: bump iqlusion:cosmos-sdk to latest
MSalopek 7fb9cf8
Merge branch 'main' into masa/tests-gaia-lsm-ics
MSalopek 4343315
Jstr/lsm e2e tests (#2679)
riley-stride 003c089
Add lsm params to upgrade handler (#2686)
sampocs 7b1e69b
chore: bump cosmos-sdk and ics to latest
MSalopek 80ccd20
Fix staking & distribution e2e test with LSM (#2687)
sampocs 1012aa2
Merge branch 'main' into masa/tests-gaia-lsm-ics
MSalopek a0a4b54
chore: appease lint rules
MSalopek 63e1de4
docs: Add LSM docs (#2683)
riley-stride ffb2e57
Merge branch 'main' into masa/tests-gaia-lsm-ics
mpoke 7b5a06a
bump SDK to 0.45.16-ics-lsm-rc0 and ICS to 2.0.0-lsm-rc0
mpoke be57325
add .changelog entries
mpoke 6a99e8d
use sdk.Dec
shaspitz a28eb3b
Update constants.go
shaspitz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
- Add Liquid Staking Module (LSM) and initialize the LSM params: | ||
ValidatorBondFactor, ValidatorLiquidStakingCap, GlobalLiquidStakingCap | ||
([\#2643](https://github.com/cosmos/gaia/pull/2643)) |
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,3 @@ | ||
- Bump [interchain-security](https://github.com/cosmos/interchain-security) to | ||
[v2.0.0-lsm](https://github.com/cosmos/interchain-security/releases/tag/v2.0.0-lsm) | ||
([\#2643](https://github.com/cosmos/gaia/pull/2643)) |
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,3 @@ | ||
- Bump [cosmos-sdk](https://github.com/cosmos/cosmos-sdk) to | ||
[v0.45.16-ics-lsm](https://github.com/cosmos/ibc-go/releases/tag/v0.45.16-ics-lsm) | ||
([\#2643](https://github.com/cosmos/gaia/pull/2643)) |
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,3 @@ | ||
- Add Liquid Staking Module (LSM) and initialize the LSM params: | ||
ValidatorBondFactor, ValidatorLiquidStakingCap, GlobalLiquidStakingCap | ||
([\#2643](https://github.com/cosmos/gaia/pull/2643)) |
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,3 @@ | ||
- Add Liquid Staking Module (LSM) and initialize the LSM params: | ||
ValidatorBondFactor, ValidatorLiquidStakingCap, GlobalLiquidStakingCap | ||
([\#2643](https://github.com/cosmos/gaia/pull/2643)) |
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
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,65 @@ | ||
#!/bin/bash | ||
set -eux | ||
|
||
# User balance of stake tokens | ||
USER_COINS="100000000000stake" | ||
# Amount of stake tokens staked | ||
STAKE="100000000stake" | ||
# Node IP address | ||
NODE_IP="127.0.0.1" | ||
|
||
# Home directory | ||
HOME_DIR="/Users/msalopek" | ||
|
||
# Validator moniker | ||
MONIKER="coordinator" | ||
|
||
# Validator directory | ||
PROV_NODE_DIR=${HOME_DIR}/provider-${MONIKER} | ||
|
||
# Coordinator key | ||
PROV_KEY=${MONIKER}-key | ||
|
||
|
||
# Clean start | ||
pkill -f gaiad &> /dev/null || true | ||
rm -rf ${PROV_NODE_DIR} | ||
|
||
# Build file and node directory structure | ||
gaiad init $MONIKER --chain-id provider --home ${PROV_NODE_DIR} | ||
jq ".app_state.gov.voting_params.voting_period = \"20s\" | .app_state.staking.params.unbonding_time = \"86400s\"" \ | ||
${PROV_NODE_DIR}/config/genesis.json > \ | ||
${PROV_NODE_DIR}/edited_genesis.json && mv ${PROV_NODE_DIR}/edited_genesis.json ${PROV_NODE_DIR}/config/genesis.json | ||
|
||
sleep 1 | ||
|
||
# Create account keypair | ||
gaiad keys add $PROV_KEY --home ${PROV_NODE_DIR} --keyring-backend test --output json > ${PROV_NODE_DIR}/${PROV_KEY}.json 2>&1 | ||
sleep 1 | ||
|
||
# Add stake to user | ||
PROV_ACCOUNT_ADDR=$(jq -r '.address' ${PROV_NODE_DIR}/${PROV_KEY}.json) | ||
gaiad add-genesis-account $PROV_ACCOUNT_ADDR $USER_COINS --home ${PROV_NODE_DIR} --keyring-backend test | ||
sleep 1 | ||
|
||
|
||
# Stake 1/1000 user's coins | ||
gaiad gentx $PROV_KEY $STAKE --chain-id provider --home ${PROV_NODE_DIR} --keyring-backend test --moniker $MONIKER | ||
sleep 1 | ||
|
||
gaiad collect-gentxs --home ${PROV_NODE_DIR} --gentx-dir ${PROV_NODE_DIR}/config/gentx/ | ||
sleep 1 | ||
|
||
sed -i -r "/node =/ s/= .*/= \"tcp:\/\/${NODE_IP}:26658\"/" ${PROV_NODE_DIR}/config/client.toml | ||
sed -i -r 's/timeout_commit = "5s"/timeout_commit = "3s"/g' ${PROV_NODE_DIR}/config/config.toml | ||
sed -i -r 's/timeout_propose = "3s"/timeout_propose = "1s"/g' ${PROV_NODE_DIR}/config/config.toml | ||
|
||
|
||
# Start gaia | ||
gaiad start \ | ||
--home ${PROV_NODE_DIR} \ | ||
--rpc.laddr tcp://${NODE_IP}:26658 \ | ||
--grpc.address ${NODE_IP}:9091 \ | ||
--address tcp://${NODE_IP}:26655 \ | ||
--p2p.laddr tcp://${NODE_IP}:26656 \ | ||
--grpc-web.enable=false &> ${PROV_NODE_DIR}/logs |
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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Why are you saying that?
RunMigrations
should bump the staking ConsensusVersion to 3 (https://github.com/cosmos/cosmos-sdk/blob/201528c4c4c1661a4b7e3a5510f40fb6865df689/x/staking/module.go#L168) and execute the Migrate2to3 method. This call will add the LSM params (by calling MigrateParamsStore). Then we change the default values of these params in the upgrade handler.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.
@riley-stride By the way, shouldn't we call
RefreshTotalLiquidStaked
after updating the param values? At the moment it's called by the migration code code in the SDK, see https://github.com/cosmos/cosmos-sdk/blob/201528c4c4c1661a4b7e3a5510f40fb6865df689/x/staking/migrations/v3/store.go#L143There 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.
RefreshTotalLiquidStaked
doesn't reference the params. It just sets theTotalLiquidStakedTokens
andLiquidShares
on each validator