cosmos-sdk

A Framework for Building High Value Public Blockchains

APACHE-2.0 License

Downloads
4.6K
Stars
5.9K
Committers
583

Bot releases are hidden (Show)

cosmos-sdk - v0.39.2 - The Launchpad Series

Published by alessio almost 4 years ago

Cosmos SDK v0.39.2 Release Notes

This release fixes various bugs and brings coin's denom validation to the Cosmos SDK 0.39 release series.

See the Cosmos SDK 0.39.2 milestone on our issue tracker for details.

Allow ValidateDenom() to be customised per application

Applications can now customise types.Coin denomination validation by passing
their application-specific validation function to types.SetCoinDenomRegex().

Upgrade queries don't work after upgrade

New stores can now be registered during an on-chain upgrade. This is to
prevent blockchain state queries from stopping working after a successful upgrade.

ApproxRoot() infinite looping

The types.Dec.ApproxRoot() function has now a maximum number 100 iterations as backup boundary
condition to prevent the client's code from entering an endless loop.

Go 1.15

This is the first release of the Launchpad series that has been tested and built with go 1.15.

Tendermint's updates

Tendermint has received a few updates in the last development cycle.

The pings frequency for remote private validators and the number of GetPubKey requests
have been reduced to prevent validators from failing to sync when using remote signers.

A security vulnerability that affected the Go's encoding/binary package was reported.
Tendermint's v0.33.8 release was published with the objective to aid users in using the correct version of Go.
Please refer to this bug report for more information.

Known issues

Keyrings using the test backend that were created with applications built with Cosmos SDK v0.39.1
and go 1.15 may break with the following error after re-compiling with Cosmos SDK v0.39.2:

ERROR: aes.KeyUnwrap(): integrity check failed.

This is due to the update that the jose2go dependency
has received that made it fully compatible with go 1.15.

cosmos-sdk - v0.40.0-rc3

Published by clevinson almost 4 years ago

Updates since v0.40.0-rc2:

Improvements

  • (tendermint) #7828 Update tendermint dependency to v0.34.0-rc6
cosmos-sdk - v0.40.0-rc2

Published by clevinson almost 4 years ago

Client Breaking

  • (x/upgrade) #7697 Rename flag name "--time" to "--upgrade-time", "--info" to "--upgrade-info", to keep it consistent with help message.

API Breaking

  • (x/staking/types) #7447 Remove bech32 PubKey support:
    • ValidatorI interface update. GetConsPubKey renamed to TmConsPubKey (consensus public key must be a tendermint key). TmConsPubKey, GetConsAddr methods return error.
    • Validator update. Methods changed in ValidatorI (as described above) and ToTmValidator return error.
    • Validator.ConsensusPubkey type changed from string to codectypes.Any.
    • MsgCreateValidator.Pubkey type changed from string to codectypes.Any.
  • Deprecating and renaming MakeEncodingConfig to MakeTestEncodingConfig (both in simapp and simapp/params packages).
  • (tx) #7688 The gRPC simulate service method has been moved from cosmos.base.v1beta1.simulate to cosmos.tx.v1beta1, as a method in the Tx service.
  • #7764 Added module initialization options:
    • server/types.AppExporter requires extra argument: AppOptions.
    • server.AddCommands requires extra argument: addStartFlags types.ModuleInitFlags
    • x/crisis.NewAppModule has a new attribute: skipGenesisInvariants. PR

Features

  • (tx) #7688 Add a new Tx gRPC service with methods Simulate and GetTx (by hash).
  • Modules
    • x/crisis has a new function: AddModuleInitFlags, which will register optional crisis module flags for the start command.

Bug Fixes

  • (client) #7699 Fix panic in context when setting invalid nodeURI. WithNodeURI does not set the Client in the context.
  • (x/gov) #7641 Fix tally calculation precision error.

Improvements

  • (rest) #7649 Return an unsigned tx in legacy GET /tx endpoint when signature conversion fails
  • (cli) #7764 Update x/banking and x/crisis InitChain to improve node startup time
cosmos-sdk - v0.40.0-rc1

Published by clevinson almost 4 years ago

The v0.40.0-rc1 release contains the following updates since RC0:

Client Breaking Changes

  • Modules
    • (x/staking) #7499 BondStatus is now a protobuf enum instead of an int32, and JSON serialized using its protobuf name, so expect names like BOND_STATUS_UNBONDING as opposed to Unbonding.
    • (x/staking) #7556 The ABCI's Result.Data field for MsgBeginRedelegate and MsgUndelegate responses does not contain custom binary marshaled completionTime, but the protobuf encoded MsgBeginRedelegateResponse and MsgUndelegateResponse structs respectively
    • (x/evidence) #7538 The ABCI's Result.Data field for MsgSubmitEvidence responses does not contain the raw evidence's hash, but the protobuf encoded MsgSubmitEvidenceResponse struct.
    • (x/gov) #7533 The ABCI's Result.Data field for MsgSubmitProposal responses does not contain a raw binary encoding of the proposalID, but the protobuf encoded MsgSubmitSubmitProposalResponse struct.

API Breaking

  • (AppModule) #7518 #7584 Rename AppModule.RegisterQueryServices to AppModule.RegisterServices, as this method now registers multiple services (the gRPC query service and the protobuf Msg service). A Configurator struct is used to hold the different services.

Features

  • (modules) #7540 Protobuf service definitions can now be used for packing Msgs in transactions as defined in ADR 031. All modules now define a Msg protobuf service.
  • (codec) #7519 InterfaceRegistry now inherits jsonpb.AnyResolver, and has a RegisterCustomTypeURL method to support ADR 031 packing of Anys. AnyResolver is now a required parameter to RejectUnknownFields.
  • (baseapp) #7519 Add ServiceMsgRouter to BaseApp to handle routing of protobuf service Msgs. The two new types defined in ADR 031, sdk.ServiceMsg and sdk.MsgRequest are introduced with this router.
  • (cli) #7221 Add the option of emitting amino encoded json from the CLI

Bug Fixes

  • (kvstore) #7415 Allow new stores to be registered during on-chain upgrades.

Improvements

  • (tendermint) #7527 Update sdk to tendermint 0.34-rc5
  • (iavl) #7549 Update sdk to IAVL 0.15.0-rc4
cosmos-sdk - v0.40.0-rc0

Published by clevinson about 4 years ago

Cosmos SDK v0.40.0 "Stargate" Release Notes

This release introduces several new important updates to the Cosmos SDK. The release notes below provide an overview of the larger high-level changes introduced in the v0.40 (aka Stargate) release series.

That being said, this release does contain many more minor and module-level changes besides those mentioned below. For a comprehsive list of all breaking changes and improvements since the v0.39 release series, please see the changelog.

Protocol Buffer Migration

Stargate introduces protocol buffers as the new standard serialization format for blockchain state & wire communication within the Cosmos SDK. Protobuf definitions are organized into packages that mirror Cosmos SDK modules in the new ./proto directory of the SDK repo.

For an overview of the SDK's usage of protocol buffers, please look at the following ADRs and meta-issues which tracked the corresponding work:

As a high level summary these represent the following major changes to the SDK:

  • New protocol buffer based encoding for all blockchain state (direct queries to tendermint now return protobuf binary encoded data, as opposed to Amino encoded data)
  • New transaction signing path implemented according to ADR020 above
  • Two new querier APIs (see #5921 for details)
    • Support for new gRPC based querier services
    • gRPC Gateway for REST querying corresponding to the new gRPC querier services

Note: Existing Amino REST endpoints are all preserved, though they are planned to be deprecated in a future release.

Inter Blockchain Communication (IBC)

The x/ibc module is now available and ready for use. High level IBC documentation is available at docs.cosmos.network. For more details check the the module documentation in the x/ibc/core/spec directory, or the ICS specs below:

Single application binary #6571

Cosmos SDK now compiles to a single application binary, as opposed to seperate binaries for running a node and one for the CLI & REST server.

We've now included a barebones application simapp / simd for testing and demonstrating how an SDK application should be constructed.

Details of the CLI refactor can be found here.

Test Network Testing Framework #6489

Introduction of the testutil package. This package allows the creation of an entirely in-process testing cluster with fully operational Tendermint nodes constructed with SimApp. Each node has an RPC & API exposed. In addition, the network exposes a Local client that can be used to directly interface with Tendermint's RPC. The test network is entirely configurable.

Tendermint 0.34 #6365

Update to the latest version of tendermint which adds support for the following (in addition many other improvements):

  • ABCI update to give application control over block pruning
  • Support for arbitrary initial block height
  • Support for State Sync
  • Evidence handling for new types of evidence submitted by Tendermint from light clients

A more detailed list of Tendermint updates can be found here.

cosmos-sdk - v0.37.14

Published by tac0turtle about 4 years ago

Improvements

  • (tendermint) Bump Tendermint version to v0.32.13
cosmos-sdk - v0.39.1 - The Launchpad Series

Published by alessio about 4 years ago

Cosmos SDK v0.39.1 Release Notes

This release fixes the issue affecting the accounts migration from v0.38 to v0.39.

See the Cosmos SDK 0.39.1 milestone on our issue tracker for details.

Remove custom JSON serialization for account types

Account types JSON serialization has now changed to Amino. Changes are significant (e.g. integers are treated
as strings) thus it is required to migrate the exported state of an application before restarting the node
with a more recent version of the Cosmos SDK.

REST server's --unsafe-cors mode

This a UX improvement back ported from master that allows developers to disable CORS
restrictions during app development and testing by passing the --unsafe-cors option to the client's rest-server command.

Tendermint 0.33.7

Tendermint 0.33.7 brings an important regression fix. Please refer to this bug report for more information.

cosmos-sdk - v0.39.0 Launchpad

Published by alessio over 4 years ago

Cosmos SDK v0.39.0 Release Notes

This is the inaugural release of the Cosmos SDK 0.39 «Launchpad» release series.

See the CHANGELOG.md file or the Cosmos SDK 0.39.0 milestone on our issue tracker for details.

Changes to IAVL and store pruning

The pruning features introduced in the 0.38 release series are buggy and might lead to data loss,
even after upgrading to v0.39.0. When upgrading from 0.38 it is important to follow the instructions
below, to prevent data loss and database corruption.

Note: there are are several breaking changes with regard to IAVL, stores, and pruning settings that affect command line clients, server configuration, and Golang API.

Migrate an application from 0.38.5 to 0.39.0

The IAVL's v0.13.0 release introduced a pruning functionality that turned out to be buggy and flawed.
IAVL's new v0.14.0 release now commits and flushes every state to disk as it did in pre-v0.13.0 release.
The SDK's multi-store will track and ensure the proper heights are pruned. The operator can now set the pruning
options by passing a pruning configuration via command line option or app.toml. The pruning flag supports the following
options: default, everything, nothing, custom - see docs for further details. If the operator chooses custom, they
may want to provide either of the granular pruning values:

  • pruning-keep-recent
  • pruning-keep-every
  • pruning-interval

The former two options dictate how many recent versions are kept on disk and the offset of what versions are kept after that
respectively, and the latter defines the height interval in which versions are deleted in a batch. Note: there are are some
client application breaking changes with regard to IAVL, stores, and pruning settings.
An example patch follows:

From 5884171ba73c3054e98564c39adc9cbbab8d4646 Mon Sep 17 00:00:00 2001
From: Alessio Treglia <[email protected]>
Date: Tue, 14 Jul 2020 14:54:19 +0100
Subject: [PATCH 2/4] use new pruning options

---
 cmd/cnd/main.go | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/cmd/cnd/main.go b/cmd/cnd/main.go
index b0c86f4a..4a3a8518 100644
--- a/cmd/cnd/main.go
+++ b/cmd/cnd/main.go
@@ -23,7 +23,6 @@ import (
 	comgenutilcli "github.com/commercionetwork/commercionetwork/x/genutil/client/cli"
 	"github.com/cosmos/cosmos-sdk/baseapp"
 	"github.com/cosmos/cosmos-sdk/server"
-	"github.com/cosmos/cosmos-sdk/store"
 	genutilcli "github.com/cosmos/cosmos-sdk/x/genutil/client/cli"
 	"github.com/cosmos/cosmos-sdk/x/staking"
 )
@@ -87,9 +86,14 @@ func main() {
 }
 
 func newApp(logger log.Logger, db dbm.DB, traceStore io.Writer) abci.Application {
+	pruningOpts, err := server.GetPruningOptionsFromFlags()
+	if err != nil {
+		panic(err)
+	}
+
 	return app.NewCommercioNetworkApp(
 		logger, db, traceStore, true, invCheckPeriod,
-		baseapp.SetPruning(store.NewPruningOptionsFromString(viper.GetString("pruning"))),
+		baseapp.SetPruning(pruningOpts),
 		baseapp.SetMinGasPrices(viper.GetString(server.FlagMinGasPrices)),
 		baseapp.SetHaltHeight(uint64(viper.GetInt(server.FlagHaltHeight))),
 	)

Migrate a node from 0.38.5 to 0.39.0

Note: do not modify pruning settings with any release prior to v0.39.0 as that may cause data corruption.

The following instructions assume that **pruning settings have not been modified since the node started using 0.38.x. Note: the default pruning setting syncable used KeepEvery:100.

Chain Hard Fork (also know as The Tested Upgrade Path)

This strategy entails performing a hard fork of your chain.
It takes time, coordination and a few technical steps that the validators of the network must follow. Note: a software upgrade guide for gaia, the application that powers the Cosmos Hub, is available too. It contains detailed instructions on how to upgrade network nodes that apply to the vast majority of Cosmos SDK applications.

In preparation of the upgrade, you need to export the current state. This operation should be be performed on one node:

  • Stop the node and export the current state, e.g.: appd export --for-zero-height > export_genesis.json.
  • Manually replace the chain id and genesis time fields in export_genesis.json with the values that the network had agreed upon.

Follow these steps to perform the upgrade:

  • Make a backup copy of the old genesis.json file in your server application's config directory (e.g. $HOME/.appd/config/genesis.json) and replace it with export_genesis.json. Note: do rename export_genesis.json to genesis.json.
  • Replace the old binary with the new one and restart the service using the new binary.

Alternative strategies

Alternatively, you can follow one of the following strategies:

  • Replace the application server's binary and perform a full sync of the node from scratch.

  • If your node had started with using KeepEvery:1 (e.g. pruning settings nothing or everything), upgrading to v0.39.0 should be simple and safe.

  • Do halt block processing with --halt-height after committing a height divisible by KeepEvery - e.g. at block 147600 with KeepEvery:100. The node must never have processed a height beyond that at any time in its past. Upgrading to v0.39.0 is then safe.

  • Set the KeepEvery setting to the same as the previous KeepEvery setting (both <=v0.38.5 and v0.39.0 default to KeepEvery:100). Upgrade to v0.39.0 is then safe as long as you wait one KeepEvery interval plus one KeepRecent interval plus one pruning Interval before changing pruning settings or deleting the last <=v0.38.5 height (so wait 210 heights with the default configuration).

  • Otherwise, make sure the last version persisted with <=v0.38.5 is never deleted after upgrading to v0.39.0, as doing so may cause data loss and data corruption.

Regression in the signature verification when multiple transactions in the same block are sent from the same account

When multiple transactions in the same block are sent (and correctly signed) by the same account, chances are that some of them could be rejected and the error unauthorized: signature verification failed would be returned due to the account's sequence (nonce) getting stuck and not being incremented by the ante handler. This behaviour was a regression introduced in the v0.38 release series, it did not occur in the v0.37 release series and is now fixed in this release.

Changes to ABCI Query's "app/simulate" path

The app/simulate query path is used to simulate the execution transactions in order to obtain an estimate
of the gas consumption that would be required to actually execute them. The response used to return only
the amount of gas, it now returns the result of the transaction as well.

bank.send event comes with sender information

The bank.send event used to carry only the recipient and amount. It was assumed that the sender of the funds was message.sender.
This is often not true when a module call the bank keeper directly. This may be due to staking distribution, or via a cosmwasm contract that released funds (where I discovered the issue).

bank.send now contains the entire triple (sender, recipient, amount).

trace option is no longer ignored

The --trace option is reintroduced. It comes in very handy for debugging as it causes the full stack trace to be included in the ABCI error logs.

appcli keys parse command didn't honor client application's bech32 prefixes

The key parse command ignored the application-specific address bech32
prefixes and used to return cosmos*1-prefixed addresses regardless
of the client application's configuration.

cosmos-sdk - v0.38.5

Published by alexanderbez over 4 years ago

Improvements

  • (tendermint) Bump Tendermint version to v0.33.6.
cosmos-sdk - v0.37.13

Published by tac0turtle over 4 years ago

Improvements

  • (tendermint) Bump Tendermint version to v0.32.12.
  • (cosmos-ledger-go) Bump Cosmos Ledger Wallet library version to v0.11.1.
cosmos-sdk - v0.38.4

Published by alexanderbez over 4 years ago

Bug Fixes

  • (x/auth) #5950 Fix IncrementSequenceDecorator to use is IsReCheckTx instead of IsCheckTx to allow account sequence incrementing.
cosmos-sdk - v0.37.12

Published by tac0turtle over 4 years ago

Improvements

  • (tendermint) Bump Tendermint version to v0.32.11.
cosmos-sdk - v0.37.11

Published by alessio over 4 years ago

Bug Fixes

  • (x/staking) #6021 --trust-node's false default value prevents creation of the genesis transaction.
cosmos-sdk - v0.37.10

Published by alessio over 4 years ago

Bug Fixes

  • (client/context) #5964 Fix incorrect instantiation of tmlite verifier when --trust-node is off.
cosmos-sdk - v0.38.3

Published by alessio over 4 years ago

Improvements

  • (tendermint) Bump Tendermint version to v0.33.3.
cosmos-sdk - v0.37.9

Published by alexanderbez over 4 years ago

Improvements

  • (tendermint) Bump Tendermint version to v0.32.10.
cosmos-sdk - v0.38.2

Published by alexanderbez over 4 years ago

Bug Fixes

  • (baseapp) #5718 Remove call to ctx.BlockGasMeter during failed message validation which resulted in a panic when the tx execution mode was CheckTx.
  • (x/genutil) #5775 Fix ExportGenesis in x/genutil to export default genesis state ([]) instead of null.
  • (client) #5618 Fix crash on the client when the verifier is not set.
  • (crypto/keys/mintkey) #5823 fix errors handling in UnarmorPubKeyBytes (underlying armoring function's return error was not being checked).
  • (x/distribution) #5620 Fix nil pointer deref in distribution tax/rewward validation helpers.

Improvements

  • (rest) #5648 Enhance /txs usability:
    • Add tx.minheight key to filter transaction with an inclusive minimum block height
    • Add tx.maxheight key to filter transaction with an inclusive maximum block height
  • (crypto/keys) #5739 Print an error message if the password input failed.
cosmos-sdk - v0.37.8

Published by alexanderbez over 4 years ago

Bug Fixes

  • (rest) #5508 Fix x/distribution endpoints to properly return height in the response.
  • (x/genutil) #5499 Ensure DefaultGenesis returns valid and non-nil default genesis state.
  • (x/genutil) #5775 Fix ExportGenesis in x/genutil to export default genesis state ([]) instead of null.
  • (genesis) #5086 Ensure gentxs are always an empty array instead of nil.

Improvements

  • (rest) #5648 Enhance /txs usability:
    • Add tx.minheight key to filter transaction with an inclusive minimum block height
    • Add tx.maxheight key to filter transaction with an inclusive maximum block height
cosmos-sdk - v0.38.1

Published by alexanderbez over 4 years ago

Improvements

  • (modules) #5597 Add amount event attribute to the complete_unbonding and complete_redelegation events that reflect the total balances of the completed unbondings and redelegations respectively.

Bug Fixes

  • (types) #5579 The IAVL Store#Commit method has been refactored to delete a flushed version if it is not a snapshot version. The root multi-store now keeps track of commitInfo instead of types.CommitID. During Commit of the root multi-store, lastCommitInfo is updated from the saved state and is only flushed to disk if it is a snapshot version. During Query of the root multi-store, if the request height is the latest height, we'll use the store's lastCommitInfo. Otherwise, we fetch commitInfo from disk.
  • (x/bank) #5531 Added missing amount event to MsgMultiSend, emitted for each output.
  • (x/gov) #5622 Track any events emitted from a proposal's handler upon successful execution.
cosmos-sdk - v0.37.7

Published by alexanderbez over 4 years ago

Improvements

  • (modules) #5597 Add amount event attribute to the complete_unbonding and complete_redelegation events that reflect the total balances of the completed unbondings and redelegations respectively.

Bug Fixes

  • (x/gov) #5622 Track any events emitted from a proposal's handler upon successful execution.
  • (x/bank) #5531 Added missing amount event to MsgMultiSend, emitted for each output.