Skip to content

Commit af93506

Browse files
authored
Merge pull request #3575 from cosmos/release/v0.31.1
R4R: Release v0.31.1
2 parents 09688d0 + b9e5232 commit af93506

File tree

5 files changed

+44
-18
lines changed

5 files changed

+44
-18
lines changed

cmd/gaia/app/genesis.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ import (
2727

2828
var (
2929
// bonded tokens given to genesis validators/accounts
30-
freeFermionsAcc = staking.TokensFromTendermintPower(150)
31-
bondDenom = staking.DefaultBondDenom
30+
freeFermionsAcc = staking.TokensFromTendermintPower(150)
31+
defaultBondDenom = staking.DefaultBondDenom
3232
)
3333

3434
// State to Unmarshal
@@ -187,7 +187,7 @@ func GaiaAppGenState(cdc *codec.Codec, genDoc tmtypes.GenesisDoc, appGenTxs []js
187187

188188
for _, acc := range genesisState.Accounts {
189189
for _, coin := range acc.Coins {
190-
if coin.Denom == bondDenom {
190+
if coin.Denom == genesisState.StakingData.Params.BondDenom {
191191
stakingData.Pool.NotBondedTokens = stakingData.Pool.NotBondedTokens.
192192
Add(coin.Amount) // increase the supply
193193
}
@@ -401,7 +401,7 @@ func NewDefaultGenesisAccount(addr sdk.AccAddress) GenesisAccount {
401401
accAuth := auth.NewBaseAccountWithAddress(addr)
402402
coins := sdk.Coins{
403403
sdk.NewCoin("footoken", sdk.NewInt(1000)),
404-
sdk.NewCoin(bondDenom, freeFermionsAcc),
404+
sdk.NewCoin(defaultBondDenom, freeFermionsAcc),
405405
}
406406

407407
coins.Sort()

cmd/gaia/app/genesis_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ func makeGenesisState(t *testing.T, genTxs []auth.StdTx) GenesisState {
4141
msg := msgs[0].(staking.MsgCreateValidator)
4242

4343
acc := auth.NewBaseAccountWithAddress(sdk.AccAddress(msg.ValidatorAddr))
44-
acc.Coins = sdk.Coins{sdk.NewInt64Coin(bondDenom, 150)}
44+
acc.Coins = sdk.Coins{sdk.NewInt64Coin(defaultBondDenom, 150)}
4545
genAccs[i] = NewGenesisAccount(&acc)
4646
stakingData.Pool.NotBondedTokens = stakingData.Pool.NotBondedTokens.Add(sdk.NewInt(150)) // increase the supply
4747
}
@@ -55,7 +55,7 @@ func TestToAccount(t *testing.T) {
5555
priv := ed25519.GenPrivKey()
5656
addr := sdk.AccAddress(priv.PubKey().Address())
5757
authAcc := auth.NewBaseAccountWithAddress(addr)
58-
authAcc.SetCoins(sdk.Coins{sdk.NewInt64Coin(bondDenom, 150)})
58+
authAcc.SetCoins(sdk.Coins{sdk.NewInt64Coin(defaultBondDenom, 150)})
5959
genAcc := NewGenesisAccount(&authAcc)
6060
acc := genAcc.ToAccount()
6161
require.IsType(t, &auth.BaseAccount{}, acc)
@@ -104,7 +104,7 @@ func TestGaiaAppGenState(t *testing.T) {
104104
func makeMsg(name string, pk crypto.PubKey) auth.StdTx {
105105
desc := staking.NewDescription(name, "", "", "")
106106
comm := staking.CommissionMsg{}
107-
msg := staking.NewMsgCreateValidator(sdk.ValAddress(pk.Address()), pk, sdk.NewInt64Coin(bondDenom,
107+
msg := staking.NewMsgCreateValidator(sdk.ValAddress(pk.Address()), pk, sdk.NewInt64Coin(defaultBondDenom,
108108
50), desc, comm, sdk.OneInt())
109109
return auth.NewStdTx([]sdk.Msg{msg}, auth.StdFee{}, nil, "")
110110
}
@@ -151,7 +151,7 @@ func TestNewDefaultGenesisAccount(t *testing.T) {
151151
addr := secp256k1.GenPrivKeySecp256k1([]byte("")).PubKey().Address()
152152
acc := NewDefaultGenesisAccount(sdk.AccAddress(addr))
153153
require.Equal(t, sdk.NewInt(1000), acc.Coins.AmountOf("footoken"))
154-
require.Equal(t, staking.TokensFromTendermintPower(150), acc.Coins.AmountOf(bondDenom))
154+
require.Equal(t, staking.TokensFromTendermintPower(150), acc.Coins.AmountOf(defaultBondDenom))
155155
}
156156

157157
func TestGenesisStateSanitize(t *testing.T) {

docs/RELEASE_PROCESS.md

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
11
### `cosmos/cosmos-sdk` Release Process
22

3-
- [ ] 1. Decide on release designation (are we doing a patch, or minor version bump) and start a P.R. for the release
3+
- [ ] 1. Decide on release designation (are we doing a patch, or minor version bump) and start a branch for the release
44
- [ ] 2. Add commits/PRs that are desired for this release **that haven’t already been added to develop**
55
- [ ] 3. Merge items in `PENDING.md` into the `CHANGELOG.md`. While doing this make sure that each entry contains links to issues/PRs for each item
66
- [ ] 4. Summarize breaking API changes section under “Breaking Changes” section to the `CHANGELOG.md` to bring attention to any breaking API changes that affect RPC consumers.
77
- [ ] 5. Tag the commit `git tag -a { .Release.Name }-rcN -m 'Release { .Release.Name }'`
8-
- [ ] 6. Open a branch & PR to merge the pending release back into `develop`. If any changes are made to the release branch, they must also be made to the pending develop merge, and both must pass tests.
9-
- [ ] 7. Kick off 1 day of automated fuzz testing
10-
- [ ] 8. Release Lead assigns 2 people to perform [buddy testing script](/docs/RELEASE_TEST_SCRIPT.md) and update the relevant documentation
11-
- [ ] 9. If errors are found in either #6 or #7 go back to #2 (*NOTE*: be sure to increment the `rcN`)
12-
- [ ] 10. After #6 and #7 have successfully completed then merge the release PR and push the final annotated release tag (created with `git tag -a`)
8+
- [ ] 6. Open PRs for both `master` and `develop`. From now onwards ***no additional PRs targeting develop should be merged**. Additional commits can be added on top of the release branch though.
9+
- [ ] 7. Ensure both `master` and `develop` PRs ***pass tests***.
10+
- [ ] 8. Kick off 1 day of automated fuzz testing
11+
- [ ] 9. Release Lead assigns 2 people to perform [buddy testing script](/docs/RELEASE_TEST_SCRIPT.md) and update the relevant documentation
12+
- [ ] 10. If errors are found in either #6 or #7 go back to #2 (*NOTE*: be sure to increment the `rcN`)
13+
- [ ] 11. After #6 and #7 have successfully completed then merge the release PR create the final release annotated tag:
14+
- `git tag -a -m { .Release.Name } 'Release { .Release.Name }'
15+
- Merge **the release tag** to both `master` and `develop` so that both branches sit on top of the same commit: `branches='master develop' ; for b in $branches ; do git checkout $b ; git merge { .Release.Name } ; git push $b`.
16+
Alternatively merge both the aforementioned release PRs.
17+
- Push the final annotated release tag: `git push --tags`

docs/gaia/delegator-guide-cli.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,27 @@ This document contains all the necessary information for delegators to interact
44

55
It also contains instructions on how to manage accounts, restore accounts from the fundraiser and use a ledger nano device.
66

7+
__Very Important__: Please assure that you follow the steps described hereinafter
8+
carefully, as negligence in this significant process could lead to an indefinite
9+
loss of your Atoms. Therefore, read through the following instructions in their
10+
entirety prior to proceeding and reach out to us in case you need support.
11+
12+
Please also note that you are about to interact with the Cosmos Hub, a
13+
blockchain technology containing highly experimental software. While the
14+
blockchain has been developed in accordance to the state of the art and audited
15+
with utmost care, we can nevertheless expect to have issues, updates and bugs.
16+
Furthermore, interaction with blockchain technology requires
17+
advanced technical skills and always entails risks that are outside our control.
18+
By using the software, you confirm that you understand the inherent risks
19+
associated with cryptographic software (see also risk section of the
20+
[Interchain Cosmos Contribution terms](https://github.com/cosmos/cosmos/blob/master/fundraiser/Interchain%20Cosmos%20Contribution%20Terms%20-%20FINAL.pdf)) and that the Interchain Foundation and/or
21+
the Tendermint Team may not be held liable for potential damages arising out of the use of the
22+
software. Any use of this open source software released under the Apache 2.0 license is
23+
done at your own risk and on a "AS IS" basis, without warranties or conditions
24+
of any kind.
25+
26+
Please exercise extreme caution!
27+
728
## Table of contents
829

930
- [Installing `gaiacli`](#installing-gaiacli)

x/staking/simulation/invariants.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ func SupplyInvariants(ck bank.Keeper, k staking.Keeper,
5454
loose := sdk.ZeroDec()
5555
bonded := sdk.ZeroDec()
5656
am.IterateAccounts(ctx, func(acc auth.Account) bool {
57-
loose = loose.Add(sdk.NewDecFromInt(acc.GetCoins().AmountOf(staking.DefaultBondDenom)))
57+
loose = loose.Add(sdk.NewDecFromInt(acc.GetCoins().AmountOf(k.BondDenom(ctx))))
5858
return false
5959
})
6060
k.IterateUnbondingDelegations(ctx, func(_ int64, ubd staking.UnbondingDelegation) bool {
@@ -76,13 +76,13 @@ func SupplyInvariants(ck bank.Keeper, k staking.Keeper,
7676
feePool := d.GetFeePool(ctx)
7777

7878
// add outstanding fees
79-
loose = loose.Add(sdk.NewDecFromInt(f.GetCollectedFees(ctx).AmountOf(staking.DefaultBondDenom)))
79+
loose = loose.Add(sdk.NewDecFromInt(f.GetCollectedFees(ctx).AmountOf(k.BondDenom(ctx))))
8080

8181
// add community pool
82-
loose = loose.Add(feePool.CommunityPool.AmountOf(staking.DefaultBondDenom))
82+
loose = loose.Add(feePool.CommunityPool.AmountOf(k.BondDenom(ctx)))
8383

8484
// add yet-to-be-withdrawn
85-
loose = loose.Add(d.GetOutstandingRewards(ctx).AmountOf(staking.DefaultBondDenom))
85+
loose = loose.Add(d.GetOutstandingRewards(ctx).AmountOf(k.BondDenom(ctx)))
8686

8787
// Not-bonded tokens should equal coin supply plus unbonding delegations
8888
// plus tokens on unbonded validators

0 commit comments

Comments
 (0)