Merge pull request #3575 from cosmos/release/v0.31.1
R4R: Release v0.31.1
This commit is contained in:
commit
af935066d2
|
@ -27,8 +27,8 @@ import (
|
|||
|
||||
var (
|
||||
// bonded tokens given to genesis validators/accounts
|
||||
freeFermionsAcc = staking.TokensFromTendermintPower(150)
|
||||
bondDenom = staking.DefaultBondDenom
|
||||
freeFermionsAcc = staking.TokensFromTendermintPower(150)
|
||||
defaultBondDenom = staking.DefaultBondDenom
|
||||
)
|
||||
|
||||
// State to Unmarshal
|
||||
|
@ -187,7 +187,7 @@ func GaiaAppGenState(cdc *codec.Codec, genDoc tmtypes.GenesisDoc, appGenTxs []js
|
|||
|
||||
for _, acc := range genesisState.Accounts {
|
||||
for _, coin := range acc.Coins {
|
||||
if coin.Denom == bondDenom {
|
||||
if coin.Denom == genesisState.StakingData.Params.BondDenom {
|
||||
stakingData.Pool.NotBondedTokens = stakingData.Pool.NotBondedTokens.
|
||||
Add(coin.Amount) // increase the supply
|
||||
}
|
||||
|
@ -401,7 +401,7 @@ func NewDefaultGenesisAccount(addr sdk.AccAddress) GenesisAccount {
|
|||
accAuth := auth.NewBaseAccountWithAddress(addr)
|
||||
coins := sdk.Coins{
|
||||
sdk.NewCoin("footoken", sdk.NewInt(1000)),
|
||||
sdk.NewCoin(bondDenom, freeFermionsAcc),
|
||||
sdk.NewCoin(defaultBondDenom, freeFermionsAcc),
|
||||
}
|
||||
|
||||
coins.Sort()
|
||||
|
|
|
@ -41,7 +41,7 @@ func makeGenesisState(t *testing.T, genTxs []auth.StdTx) GenesisState {
|
|||
msg := msgs[0].(staking.MsgCreateValidator)
|
||||
|
||||
acc := auth.NewBaseAccountWithAddress(sdk.AccAddress(msg.ValidatorAddr))
|
||||
acc.Coins = sdk.Coins{sdk.NewInt64Coin(bondDenom, 150)}
|
||||
acc.Coins = sdk.Coins{sdk.NewInt64Coin(defaultBondDenom, 150)}
|
||||
genAccs[i] = NewGenesisAccount(&acc)
|
||||
stakingData.Pool.NotBondedTokens = stakingData.Pool.NotBondedTokens.Add(sdk.NewInt(150)) // increase the supply
|
||||
}
|
||||
|
@ -55,7 +55,7 @@ func TestToAccount(t *testing.T) {
|
|||
priv := ed25519.GenPrivKey()
|
||||
addr := sdk.AccAddress(priv.PubKey().Address())
|
||||
authAcc := auth.NewBaseAccountWithAddress(addr)
|
||||
authAcc.SetCoins(sdk.Coins{sdk.NewInt64Coin(bondDenom, 150)})
|
||||
authAcc.SetCoins(sdk.Coins{sdk.NewInt64Coin(defaultBondDenom, 150)})
|
||||
genAcc := NewGenesisAccount(&authAcc)
|
||||
acc := genAcc.ToAccount()
|
||||
require.IsType(t, &auth.BaseAccount{}, acc)
|
||||
|
@ -104,7 +104,7 @@ func TestGaiaAppGenState(t *testing.T) {
|
|||
func makeMsg(name string, pk crypto.PubKey) auth.StdTx {
|
||||
desc := staking.NewDescription(name, "", "", "")
|
||||
comm := staking.CommissionMsg{}
|
||||
msg := staking.NewMsgCreateValidator(sdk.ValAddress(pk.Address()), pk, sdk.NewInt64Coin(bondDenom,
|
||||
msg := staking.NewMsgCreateValidator(sdk.ValAddress(pk.Address()), pk, sdk.NewInt64Coin(defaultBondDenom,
|
||||
50), desc, comm, sdk.OneInt())
|
||||
return auth.NewStdTx([]sdk.Msg{msg}, auth.StdFee{}, nil, "")
|
||||
}
|
||||
|
@ -151,7 +151,7 @@ func TestNewDefaultGenesisAccount(t *testing.T) {
|
|||
addr := secp256k1.GenPrivKeySecp256k1([]byte("")).PubKey().Address()
|
||||
acc := NewDefaultGenesisAccount(sdk.AccAddress(addr))
|
||||
require.Equal(t, sdk.NewInt(1000), acc.Coins.AmountOf("footoken"))
|
||||
require.Equal(t, staking.TokensFromTendermintPower(150), acc.Coins.AmountOf(bondDenom))
|
||||
require.Equal(t, staking.TokensFromTendermintPower(150), acc.Coins.AmountOf(defaultBondDenom))
|
||||
}
|
||||
|
||||
func TestGenesisStateSanitize(t *testing.T) {
|
||||
|
|
|
@ -1,12 +1,17 @@
|
|||
### `cosmos/cosmos-sdk` Release Process
|
||||
|
||||
- [ ] 1. Decide on release designation (are we doing a patch, or minor version bump) and start a P.R. for the release
|
||||
- [ ] 1. Decide on release designation (are we doing a patch, or minor version bump) and start a branch for the release
|
||||
- [ ] 2. Add commits/PRs that are desired for this release **that haven’t already been added to develop**
|
||||
- [ ] 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
|
||||
- [ ] 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.
|
||||
- [ ] 5. Tag the commit `git tag -a { .Release.Name }-rcN -m 'Release { .Release.Name }'`
|
||||
- [ ] 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.
|
||||
- [ ] 7. Kick off 1 day of automated fuzz testing
|
||||
- [ ] 8. Release Lead assigns 2 people to perform [buddy testing script](/docs/RELEASE_TEST_SCRIPT.md) and update the relevant documentation
|
||||
- [ ] 9. If errors are found in either #6 or #7 go back to #2 (*NOTE*: be sure to increment the `rcN`)
|
||||
- [ ] 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`)
|
||||
- [ ] 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.
|
||||
- [ ] 7. Ensure both `master` and `develop` PRs ***pass tests***.
|
||||
- [ ] 8. Kick off 1 day of automated fuzz testing
|
||||
- [ ] 9. Release Lead assigns 2 people to perform [buddy testing script](/docs/RELEASE_TEST_SCRIPT.md) and update the relevant documentation
|
||||
- [ ] 10. If errors are found in either #6 or #7 go back to #2 (*NOTE*: be sure to increment the `rcN`)
|
||||
- [ ] 11. After #6 and #7 have successfully completed then merge the release PR create the final release annotated tag:
|
||||
- `git tag -a -m { .Release.Name } 'Release { .Release.Name }'
|
||||
- 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`.
|
||||
Alternatively merge both the aforementioned release PRs.
|
||||
- Push the final annotated release tag: `git push --tags`
|
||||
|
|
|
@ -4,6 +4,27 @@ This document contains all the necessary information for delegators to interact
|
|||
|
||||
It also contains instructions on how to manage accounts, restore accounts from the fundraiser and use a ledger nano device.
|
||||
|
||||
__Very Important__: Please assure that you follow the steps described hereinafter
|
||||
carefully, as negligence in this significant process could lead to an indefinite
|
||||
loss of your Atoms. Therefore, read through the following instructions in their
|
||||
entirety prior to proceeding and reach out to us in case you need support.
|
||||
|
||||
Please also note that you are about to interact with the Cosmos Hub, a
|
||||
blockchain technology containing highly experimental software. While the
|
||||
blockchain has been developed in accordance to the state of the art and audited
|
||||
with utmost care, we can nevertheless expect to have issues, updates and bugs.
|
||||
Furthermore, interaction with blockchain technology requires
|
||||
advanced technical skills and always entails risks that are outside our control.
|
||||
By using the software, you confirm that you understand the inherent risks
|
||||
associated with cryptographic software (see also risk section of the
|
||||
[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
|
||||
the Tendermint Team may not be held liable for potential damages arising out of the use of the
|
||||
software. Any use of this open source software released under the Apache 2.0 license is
|
||||
done at your own risk and on a "AS IS" basis, without warranties or conditions
|
||||
of any kind.
|
||||
|
||||
Please exercise extreme caution!
|
||||
|
||||
## Table of contents
|
||||
|
||||
- [Installing `gaiacli`](#installing-gaiacli)
|
||||
|
|
|
@ -54,7 +54,7 @@ func SupplyInvariants(ck bank.Keeper, k staking.Keeper,
|
|||
loose := sdk.ZeroDec()
|
||||
bonded := sdk.ZeroDec()
|
||||
am.IterateAccounts(ctx, func(acc auth.Account) bool {
|
||||
loose = loose.Add(sdk.NewDecFromInt(acc.GetCoins().AmountOf(staking.DefaultBondDenom)))
|
||||
loose = loose.Add(sdk.NewDecFromInt(acc.GetCoins().AmountOf(k.BondDenom(ctx))))
|
||||
return false
|
||||
})
|
||||
k.IterateUnbondingDelegations(ctx, func(_ int64, ubd staking.UnbondingDelegation) bool {
|
||||
|
@ -76,13 +76,13 @@ func SupplyInvariants(ck bank.Keeper, k staking.Keeper,
|
|||
feePool := d.GetFeePool(ctx)
|
||||
|
||||
// add outstanding fees
|
||||
loose = loose.Add(sdk.NewDecFromInt(f.GetCollectedFees(ctx).AmountOf(staking.DefaultBondDenom)))
|
||||
loose = loose.Add(sdk.NewDecFromInt(f.GetCollectedFees(ctx).AmountOf(k.BondDenom(ctx))))
|
||||
|
||||
// add community pool
|
||||
loose = loose.Add(feePool.CommunityPool.AmountOf(staking.DefaultBondDenom))
|
||||
loose = loose.Add(feePool.CommunityPool.AmountOf(k.BondDenom(ctx)))
|
||||
|
||||
// add yet-to-be-withdrawn
|
||||
loose = loose.Add(d.GetOutstandingRewards(ctx).AmountOf(staking.DefaultBondDenom))
|
||||
loose = loose.Add(d.GetOutstandingRewards(ctx).AmountOf(k.BondDenom(ctx)))
|
||||
|
||||
// Not-bonded tokens should equal coin supply plus unbonding delegations
|
||||
// plus tokens on unbonded validators
|
||||
|
|
Loading…
Reference in New Issue