Skip to content

Commit

Permalink
merg
Browse files Browse the repository at this point in the history
  • Loading branch information
gamarin2 committed Jun 3, 2019
2 parents 0913fb6 + 59ac148 commit 167104c
Show file tree
Hide file tree
Showing 301 changed files with 3,543 additions and 40,743 deletions.
41 changes: 28 additions & 13 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ jobs:
command: |
make runsim tools TOOLS_DESTDIR=/tmp/workspace/bin
cp $GOPATH/bin/runsim /tmp/workspace/bin
cp $GOPATH/bin/statik /tmp/workspace/bin
- run:
name: cache go modules
command: |
Expand Down Expand Up @@ -240,16 +241,37 @@ jobs:
echo "Website build started"
fi
check_statik:
<<: *linux_defaults
parallelism: 1
steps:
- attach_workspace:
at: /tmp/workspace
- checkout
- restore_cache:
keys:
- go-mod-v1-{{ checksum "go.sum" }}
- run:
name: check if statik.go is up-to-date
command: |
set -ex
export PATH=/tmp/workspace/bin:$PATH
make update-swagger-docs
if [ -n "$(git status --porcelain)" ]; then
echo "swagger docs out of sync";
exit 1
else
echo "swagger docs are in sync";
fi
workflows:
version: 2
test-suite:
jobs:
- macos_ci:
filters:
branches:
only:
- master
- develop
- check_statik:
requires:
- setup_dependencies
- deploy_docs:
filters:
branches:
Expand Down Expand Up @@ -294,10 +316,3 @@ workflows:
- upload_coverage:
requires:
- test_cover
- reproducible_builds:
filters:
branches:
only:
- master
requires:
- setup_dependencies
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ tools-stamp
# Data - ideally these don't exist
baseapp/data/*
client/lcd/keys/*
client/lcd/statik/statik.go
mytestnet

# Testing
Expand Down
1 change: 1 addition & 0 deletions .pending/bugfixes/sdk/4383---currentStakeR
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#4383 - currentStakeRoundUp is now always atleast currentStake + smallest-decimal-precision
2 changes: 2 additions & 0 deletions .pending/bugfixes/sdk/4394-Fix-signature-c
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#4394 Fix signature count check to use the TxSigLimit param instead of
a default.
1 change: 1 addition & 0 deletions .pending/features/gaia/4373-Don-t-Burn-Depo
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#4373 Don't burn deposits for rejected governance proposals unless vetoed.
2 changes: 2 additions & 0 deletions .pending/features/sdk/2020-New-keys-export
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#2020 New keys export/import command line utilities to export/import private keys in ASCII format
that rely on Keybase's new underlying ExportPrivKey()/ImportPrivKey() API calls.
1 change: 1 addition & 0 deletions .pending/features/sdk/4144-Configurable-Be
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#4144 Allow for configurable BIP44 HD path and coin type.
2 changes: 2 additions & 0 deletions .pending/features/sdk/4318-Support-height-
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#4318 Support height queries. Queries against nodes that have the queried
height pruned will return an error.
1 change: 1 addition & 0 deletions .pending/features/sdk/Community-pool-spend
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Community pool spend proposal per Cosmos Hub governance proposal #7 "Activate the Community Pool"
1 change: 1 addition & 0 deletions .pending/improvements/sdk/3655-Improve-signatu
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#3655 Improve signature verification failure error message.
2 changes: 2 additions & 0 deletions .pending/improvements/sdk/4259-Coins-that-are-
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#4259 `Coins` that are `nil` are now JSON encoded as an empty array `[]`.
Decoding remains unchanged and behavior is left intact.
1 change: 1 addition & 0 deletions .pending/improvements/sdk/4379-close-db-write-
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#4379 close db write batch.
1 change: 1 addition & 0 deletions .pending/improvements/sdk/4384-WithdrawalTxSplitting
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#4384- Allow splitting withdrawal transaction in several chunks
2 changes: 2 additions & 0 deletions .pending/improvements/sdk/4403-parameter-chang
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#4403 Allow for parameter change proposals to supply only desired fields to be updated
in objects instead of the entire object (only applies to values that are objects).
1 change: 1 addition & 0 deletions .pending/improvements/sdk/4415-clienr-refactor
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#4415 /client refactor, reduce genutil dependancy on staking
40 changes: 40 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,45 @@
# Changelog

## 0.34.7

### Bug Fixes

#### SDK

* Fix gas consumption bug in `Undelegate` preventing the ability to sync from
genesis.

## 0.34.6

### Bug Fixes

#### SDK

* Unbonding from a validator is now only considered "complete" after the full
unbonding period has elapsed regardless of the validator's status.

## 0.34.5

### Bug Fixes

#### SDK

* [\#4273](https://github.com/cosmos/cosmos-sdk/issues/4273) Fix usage of `AppendTags` in x/staking/handler.go

### Improvements

### SDK

* [\#2286](https://github.com/cosmos/cosmos-sdk/issues/2286) Improve performance of `CacheKVStore` iterator.
* [\#3655](https://github.com/cosmos/cosmos-sdk/issues/3655) Improve signature verification failure error message.
* [\#4384](https://github.com/cosmos/cosmos-sdk/issues/4384) Allow splitting withdrawal transaction in several chunks.

#### Gaia CLI

* [\#4227](https://github.com/cosmos/cosmos-sdk/issues/4227) Support for Ledger App v1.5.
* [#4345](https://github.com/cosmos/cosmos-sdk/pull/4345) Update `ledger-cosmos-go`
to v0.10.3.

## 0.34.4

### Bug Fixes
Expand Down
11 changes: 3 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ ci: tools build test_cover lint test
build: go.sum
@go build -mod=readonly ./...

update_gaia_lite_docs:
@statik -src=client/lcd/swagger-ui -dest=client/lcd -f
update-swagger-docs:
@statik -src=client/lcd/swagger-ui -dest=client/lcd -f -m

dist:
@bash publish/dist.sh
Expand All @@ -44,11 +44,6 @@ go.sum: go.mod
@echo "--> Ensure dependencies have not been modified"
@go mod verify

draw_deps: tools
@# requires brew install graphviz or apt-get install graphviz
go get github.com/RobotsAndPencils/goviz
@goviz -i github.com/cosmos/cosmos-sdk/cmd/gaia/cmd/gaiad -d 2 | dot -Tpng -o dependency-graph.png

clean:
rm -rf snapcraft-local.yaml build/

Expand Down Expand Up @@ -191,7 +186,7 @@ snapcraft-local.yaml: snapcraft-local.yaml.in
# To avoid unintended conflicts with file names, always add to .PHONY
# unless there is a reason not to.
# https://www.gnu.org/software/make/manual/html_node/Phony-Targets.html
.PHONY: build dist clean draw_deps test test_unit test_cover lint \
.PHONY: build dist clean test test_unit test_cover lint \
benchmark devdoc_init devdoc devdoc_save devdoc_update runsim \
format test_sim_app_nondeterminism test_sim_modules test_sim_app_fast \
test_sim_app_custom_genesis_fast test_sim_app_custom_genesis_multi_seed \
Expand Down
12 changes: 4 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,6 @@ breaking changes.

**Note**: Requires [Go 1.12+](https://golang.org/dl/)

## Cosmos Hub Mainnet

To run a full-node for the mainnet of the Cosmos Hub, first [install `gaia`](./docs/cosmos-hub/installation.md), then follow [the guide](./docs/cosmos-hub/join-mainnet.md).

For status updates and genesis file, see the
[launch repo](https://github.com/cosmos/launch).


## Quick Start

To learn how the SDK works from a high-level perspective, go to the [SDK Intro](./docs/intro/README.md).
Expand All @@ -36,6 +28,10 @@ If you want to get started quickly and learn how to build on top of the SDK, ple

For more, please go to the [Cosmos SDK Docs](./docs/README.md)

## Cosmos Hub Mainnet

The Cosmos Hub application, `gaia`, has moved to its [own repository](https://github.com/cosmos/gaia). Go there to join the Cosmos Hub mainnet and more.

## Disambiguation

This Cosmos-SDK project is not related to the [React-Cosmos](https://github.com/react-cosmos/react-cosmos) project (yet). Many thanks to Evan Coury and Ovidiu (@skidding) for this Github organization name. As per our agreement, this disambiguation notice will stay here.
9 changes: 9 additions & 0 deletions baseapp/baseapp.go
Original file line number Diff line number Diff line change
Expand Up @@ -536,6 +536,15 @@ func handleQueryCustom(app *BaseApp, path []string, req abci.RequestQuery) (res
app.cms.CacheMultiStore(), app.checkState.ctx.BlockHeader(), true, app.logger,
).WithMinGasPrices(app.minGasPrices)

if req.Height > 0 {
cacheMS, err := app.cms.CacheMultiStoreWithVersion(req.Height)
if err != nil {
return sdk.ErrInternal(fmt.Sprintf("failed to load state at height %d; %s", req.Height, err)).QueryResult()
}

ctx = ctx.WithMultiStore(cacheMS)
}

// Passes the rest of the path as an argument to the querier.
//
// For example, in the path "custom/gov/proposal/test", the gov querier gets
Expand Down
160 changes: 160 additions & 0 deletions client/alias.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,160 @@
// nolint
// autogenerated code using github.com/rigelrozanski/multitool
// aliases generated for the following subdirectories:
// ALIASGEN: github.com/cosmos/cosmos-sdk/client/context
// ALIASGEN: github.com/cosmos/cosmos-sdk/client/flags
// ALIASGEN: github.com/cosmos/cosmos-sdk/client/keys
// ALIASGEN: github.com/cosmos/cosmos-sdk/client/lcd
// ALIASGEN: github.com/cosmos/cosmos-sdk/client/rest
// ALIASGEN: github.com/cosmos/cosmos-sdk/client/rpc
// ALIASGEN: github.com/cosmos/cosmos-sdk/client/tx
// ALIASGEN: github.com/cosmos/cosmos-sdk/client/utils
// ALIASGEN: github.com/cosmos/cosmos-sdk/client/input
package client

import (
"github.com/cosmos/cosmos-sdk/client/context"
"github.com/cosmos/cosmos-sdk/client/flags"
"github.com/cosmos/cosmos-sdk/client/input"
"github.com/cosmos/cosmos-sdk/client/keys"
"github.com/cosmos/cosmos-sdk/client/lcd"
"github.com/cosmos/cosmos-sdk/client/rest"
"github.com/cosmos/cosmos-sdk/client/rpc"
"github.com/cosmos/cosmos-sdk/client/tx"
"github.com/cosmos/cosmos-sdk/client/utils"
)

const (
DefaultGasAdjustment = flags.DefaultGasAdjustment
DefaultGasLimit = flags.DefaultGasLimit
GasFlagAuto = flags.GasFlagAuto
BroadcastBlock = flags.BroadcastBlock
BroadcastSync = flags.BroadcastSync
BroadcastAsync = flags.BroadcastAsync
FlagHome = flags.FlagHome
FlagUseLedger = flags.FlagUseLedger
FlagChainID = flags.FlagChainID
FlagNode = flags.FlagNode
FlagHeight = flags.FlagHeight
FlagGasAdjustment = flags.FlagGasAdjustment
FlagTrustNode = flags.FlagTrustNode
FlagFrom = flags.FlagFrom
FlagName = flags.FlagName
FlagAccountNumber = flags.FlagAccountNumber
FlagSequence = flags.FlagSequence
FlagMemo = flags.FlagMemo
FlagFees = flags.FlagFees
FlagGasPrices = flags.FlagGasPrices
FlagBroadcastMode = flags.FlagBroadcastMode
FlagPrintResponse = flags.FlagPrintResponse
FlagDryRun = flags.FlagDryRun
FlagGenerateOnly = flags.FlagGenerateOnly
FlagIndentResponse = flags.FlagIndentResponse
FlagListenAddr = flags.FlagListenAddr
FlagCORS = flags.FlagCORS
FlagMaxOpenConnections = flags.FlagMaxOpenConnections
FlagRPCReadTimeout = flags.FlagRPCReadTimeout
FlagRPCWriteTimeout = flags.FlagRPCWriteTimeout
FlagOutputDocument = flags.FlagOutputDocument
FlagSkipConfirmation = flags.FlagSkipConfirmation
DefaultKeyPass = keys.DefaultKeyPass
FlagAddress = keys.FlagAddress
FlagPublicKey = keys.FlagPublicKey
FlagBechPrefix = keys.FlagBechPrefix
FlagDevice = keys.FlagDevice
OutputFormatText = keys.OutputFormatText
OutputFormatJSON = keys.OutputFormatJSON
MinPassLength = input.MinPassLength
)

var (
// functions aliases
NewCLIContextWithFrom = context.NewCLIContextWithFrom
NewCLIContext = context.NewCLIContext
GetAccountDecoder = context.GetAccountDecoder
GetFromFields = context.GetFromFields
ErrInvalidAccount = context.ErrInvalidAccount
ErrVerifyCommit = context.ErrVerifyCommit
GetCommands = flags.GetCommands
PostCommands = flags.PostCommands
RegisterRestServerFlags = flags.RegisterRestServerFlags
ParseGas = flags.ParseGas
NewCompletionCmd = flags.NewCompletionCmd
MarshalJSON = keys.MarshalJSON
UnmarshalJSON = keys.UnmarshalJSON
Commands = keys.Commands
NewAddNewKey = keys.NewAddNewKey
NewRecoverKey = keys.NewRecoverKey
NewUpdateKeyReq = keys.NewUpdateKeyReq
NewDeleteKeyReq = keys.NewDeleteKeyReq
GetKeyInfo = keys.GetKeyInfo
GetPassphrase = keys.GetPassphrase
ReadPassphraseFromStdin = keys.ReadPassphraseFromStdin
NewKeyBaseFromHomeFlag = keys.NewKeyBaseFromHomeFlag
NewKeyBaseFromDir = keys.NewKeyBaseFromDir
NewInMemoryKeyBase = keys.NewInMemoryKeyBase
NewRestServer = lcd.NewRestServer
ServeCommand = lcd.ServeCommand
WriteGenerateStdTxResponse = rest.WriteGenerateStdTxResponse
BlockCommand = rpc.BlockCommand
GetChainHeight = rpc.GetChainHeight
BlockRequestHandlerFn = rpc.BlockRequestHandlerFn
LatestBlockRequestHandlerFn = rpc.LatestBlockRequestHandlerFn
RegisterRPCRoutes = rpc.RegisterRPCRoutes
CLIVersionRequestHandler = rpc.CLIVersionRequestHandler
NodeVersionRequestHandler = rpc.NodeVersionRequestHandler
StatusCommand = rpc.StatusCommand
NodeInfoRequestHandlerFn = rpc.NodeInfoRequestHandlerFn
NodeSyncingRequestHandlerFn = rpc.NodeSyncingRequestHandlerFn
ValidatorCommand = rpc.ValidatorCommand
GetValidators = rpc.GetValidators
ValidatorSetRequestHandlerFn = rpc.ValidatorSetRequestHandlerFn
LatestValidatorSetRequestHandlerFn = rpc.LatestValidatorSetRequestHandlerFn
BroadcastTxRequest = tx.BroadcastTxRequest
GetBroadcastCommand = tx.GetBroadcastCommand
EncodeTxRequestHandlerFn = tx.EncodeTxRequestHandlerFn
GetEncodeCommand = tx.GetEncodeCommand
SearchTxCmd = tx.SearchTxCmd
QueryTxCmd = tx.QueryTxCmd
QueryTxsByTagsRequestHandlerFn = tx.QueryTxsByTagsRequestHandlerFn
QueryTxRequestHandlerFn = tx.QueryTxRequestHandlerFn
RegisterTxRoutes = tx.RegisterTxRoutes
SearchTxs = tx.SearchTxs
ValidateTxResult = tx.ValidateTxResult
GenerateOrBroadcastMsgs = utils.GenerateOrBroadcastMsgs
CompleteAndBroadcastTxCLI = utils.CompleteAndBroadcastTxCLI
EnrichWithGas = utils.EnrichWithGas
CalculateGas = utils.CalculateGas
PrintUnsignedStdTx = utils.PrintUnsignedStdTx
SignStdTx = utils.SignStdTx
SignStdTxWithSignerAddress = utils.SignStdTxWithSignerAddress
ReadStdTxFromFile = utils.ReadStdTxFromFile
GetTxEncoder = utils.GetTxEncoder
PrepareTxBuilder = utils.PrepareTxBuilder
BufferStdin = input.BufferStdin
OverrideStdin = input.OverrideStdin
GetPassword = input.GetPassword
GetCheckPassword = input.GetCheckPassword
GetConfirmation = input.GetConfirmation
GetString = input.GetString
PrintPrefixed = input.PrintPrefixed

// variable aliases
LineBreak = flags.LineBreak
GasFlagVar = flags.GasFlagVar
)

type (
CLIContext = context.CLIContext
GasSetting = flags.GasSetting
AddNewKey = keys.AddNewKey
RecoverKey = keys.RecoverKey
UpdateKeyReq = keys.UpdateKeyReq
DeleteKeyReq = keys.DeleteKeyReq
RestServer = lcd.RestServer
ValidatorOutput = rpc.ValidatorOutput
ResultValidatorsOutput = rpc.ResultValidatorsOutput
BroadcastReq = tx.BroadcastReq
EncodeResp = tx.EncodeResp
GasEstimateResponse = utils.GasEstimateResponse
)
Loading

0 comments on commit 167104c

Please sign in to comment.