Commit Graph

129 Commits

Author SHA1 Message Date
Frank Yang 8bb2569abc R4R: Fix /txs/encode endpoint (#4212)
Closes: #4141
2019-05-06 15:53:12 +01:00
Frank Yang 1cfc868d86 Support query txs' TotalCount in GET /txs (#4214)
Closes: #3942
2019-05-04 12:09:02 +01:00
Alessio Treglia df362ff3e6
Upgrade Go to 1.12.4 (#4261) 2019-05-03 11:33:41 +01:00
Alexander Bezobchuk 29ed730aff
Merge PR #4244: Param Proposal Simulation Messages; Minting Params Fix 2019-05-02 16:50:01 -04:00
Alessio Treglia 38f93128eb
Remove baseapp dependency on the version package (#4250)
The version package is meant to be a convenience utility
that provides SDK consumers with a ready-to-use version
command that produces app's versioning information from
flags passed at compile time.
It will not make sense anymore for the baseapp package
to depend on the version package once gaia will have been
migrated away from the SDK main repository as we neither
want to make assumptions nor set expectations on downstream
apps buildsystems. Thus BaseApp now provides SetAppVersion()
and AppVersion() to to allow SDK consumers to set BaseApp's
version information string once the struct is initialised.
2019-05-02 20:37:44 +01:00
Aaron Craelius 114de631a5 Allow custom key types and address formats (#4232)
Add additional parameter to NewAnteHandler for custom SignatureVerificationGasConsumer (the existing one is now called DefaultSigVerificationGasConsumer).

Add addressVerifier field to sdk.Config which allows for custom address verification (to override the current fixed 20 byte address format).

DefaultSigVerificationGasConsumer now uses type switching as opposed to string comparison.
Other zones like Ethermint can now concretely specify which key types they accept.

Closes: #3685
2019-05-02 20:36:42 +01:00
Alessio Treglia 4e70a37c6b Merge PR #4228: gaiakeyutil -> gaiacli keys parse 2019-05-02 09:34:02 -04:00
Alexander Bezobchuk 5653c768bb
Merge PR #4234: Allow tx send (generate-only) to actually work offline 2019-04-30 12:47:26 -04:00
Alexander Bezobchuk 5ca93ac574 Merge PR #4206: Param Change Proposal
* Add params error types

* Update param module keeper to take a codespace

* Update imports

* Implement SetRaw and SetRawWithSubkey

* Implement ParamChange and update aliases

* Add types codec

* Implement ParameterChangeProposal

* Implement TestParameterChangeProposal

* Fix linting errors

* Update tags

* Implement content

* Updata params aliases

* Finish params handler and proposal types

* Move deposit and vote logic to types package

* Move proposal type to types package

* Move errors to types package

* Update proposal

* Move gov messages to types package

* Minor updates to naming

* Move keys to types package

* Move codec to types package

* Move proposal types to types package

* Update aliases

* Add governance alias types

* Implement governance router

* Update gov aliases

* Update gov keeper

* Update private functions needed for the keeper

* Update godocs

* Update the gov message handler

* Update Gaia app

* Make updates to auth

* Update the message codec in the keeper

* Update gov end blocker

* Update types tests

* Minor tweaks

* Add legacy genesis logic

* Update gov aliases

* Move gov keys to types package

* Revertt to using gov/types in params

* Implement params handler test

* Update governance tests

* Fix endblocker tests

* Fix governance querier tests

* Add seal support to gov router

* Update simulationCreateMsgSubmitProposal

* Disable software upgrade proposals

* Move params keys to types package

* Implement param module proposal client logic

* Update gov client logic

* Update gaia app client hooks

* Fix linting errors

* Fix ValidateBasic

* Remove legacy files

* Update paramchange to use strings

* Update paramchange cli cmd

* Update ValidateBasic and errors

* Use PostCommands when adding child cmds

* Fix codec logic

* Update params client and handler

* Update IsValidProposalType

* Update SubmitProposal to test exec

* Implement TestGaiaCLISubmitParamChangeProposal

* Implement TestSubmitParamChangeProposal

* Update swagger.yaml

* Update gaiacli.md

* Update gov spec docs

* Fix linting errors

* Fix unit tests

* Add pending log entries

* Update docs

* Update docs

* Update client/lcd/swagger-ui/swagger.yaml

Co-Authored-By: alexanderbez <alexanderbez@users.noreply.github.com>

* Update docs/cosmos-hub/gaiacli.md

Co-Authored-By: alexanderbez <alexanderbez@users.noreply.github.com>

* Update cmd/gaia/cli_test/test_helpers.go

Co-Authored-By: alexanderbez <alexanderbez@users.noreply.github.com>

* Update client/lcd/test_helpers.go

Co-Authored-By: alexanderbez <alexanderbez@users.noreply.github.com>

* Update docs/cosmos-hub/gaiacli.md

Co-Authored-By: alexanderbez <alexanderbez@users.noreply.github.com>

* Update docs/cosmos-hub/gaiacli.md

Co-Authored-By: alexanderbez <alexanderbez@users.noreply.github.com>

* Update docs/cosmos-hub/gaiacli.md

Co-Authored-By: alexanderbez <alexanderbez@users.noreply.github.com>

* Update x/gov/types/proposal.go

Co-Authored-By: alexanderbez <alexanderbez@users.noreply.github.com>

* Update docs/cosmos-hub/gaiacli.md

Co-Authored-By: alexanderbez <alexanderbez@users.noreply.github.com>

* Update docs/cosmos-hub/gaiacli.md

Co-Authored-By: alexanderbez <alexanderbez@users.noreply.github.com>

* Address PR comments

* Update docs/cosmos-hub/gaiacli.md

Co-Authored-By: alexanderbez <alexanderbez@users.noreply.github.com>

* Update gov docs to include quorum notes

* Add logs to handleParameterChangeProposal

* Update docs/spec/governance/02_state.md

Co-Authored-By: alexanderbez <alexanderbez@users.noreply.github.com>

* Support and use new StatusFailed when proposal passes but fails exec

* Add docs/notes warning on param validity

* Update docs

* Update docs/spec/governance/02_state.md

Co-Authored-By: alexanderbez <alexanderbez@users.noreply.github.com>

* Update docs/spec/governance/02_state.md

Co-Authored-By: alexanderbez <alexanderbez@users.noreply.github.com>

* Minor doc update

* Update x/gov/client/cli/tx.go

Co-Authored-By: alexanderbez <alexanderbez@users.noreply.github.com>

* Fix usage of fromAddr

* Rige code style  suggestion

* Update x/params/types/proposal.go

Co-Authored-By: alexanderbez <alexanderbez@users.noreply.github.com>

* Fix CI lint errors

* Update NewModuleClient godoc

* Add godoc to rtr.Seal() call

* Rename files

* Rename NewProposalHandler
2019-04-30 12:31:38 -04:00
Juan Leni 1306a25e42 Adding support for Ledger Cosmos App v1.5 (#4227)
This PR adds support for the latest version of the Cosmos App (v.1.5).
The app is not been released yet by Ledger but the PR is backwards compatible.
We can later remove backwards compatibility and enforce v1.5 only.

When creating a new account, `gaiacli` now shows the account/index and address in the device and requires user confirmation.

Related PRs:
https://github.com/cosmos/ledger-cosmos-go/pull/3
https://github.com/cosmos/ledger-cosmos-go/pull/4
https://github.com/cosmos/ledger-cosmos-go/pull/5
https://github.com/cosmos/ledger-cosmos-go/pull/6

Changes in the app can be found here:
https://github.com/LedgerHQ/ledger-app-cosmos/pull/5
2019-04-30 09:58:21 +01:00
Alexander Bezobchuk f0f7b7dab7
Merge PR #4230: Minor cleanup in tx tags and response format 2019-04-29 23:50:44 -04:00
Frank Yang 5344e8d768 Merge PR #4220: Empty mnemonic should return error during key recovery 2019-04-29 12:49:35 -04:00
Alexander Bezobchuk ec4a1e8f2a
Merge PR #4207: Add rewards and commission tags in txs 2019-04-26 19:11:45 -04:00
Aleksandr Bezobchuk e7ca82d808
Merge branch 'develop' into release/v0.34.2 2019-04-25 21:40:33 -04:00
Alexander Bezobchuk 0e54369850 Merge PR #4177: Update Staking Validators Rest Query
* Support pagination and status query params for /staking/validators

* Rename BondStatusToString to String
2019-04-24 11:48:39 -04:00
Alexander Bezobchuk c6cb84c558
Merge PR #4059: Add support for graceful halt via server config 2019-04-23 09:33:11 -04:00
Alessio Treglia 93e8f467fe
Turn --from into a positional argument in gaiacli tx send (#4146)
Closes: #4142
2019-04-18 19:48:52 +01:00
Frank Yang 1b726ad88a Translate doc clients to chinese. (#4129) 2019-04-17 17:10:57 +01:00
Alessio Treglia a75a8d3311 Merge PR #4138: Upgrade tendermint to 0.31.5 2019-04-16 20:58:31 -04:00
Alessio Treglia 769370801d Merge PR #4101: Return per-validator rewards when querying delegator rewards 2019-04-16 09:43:08 -04:00
Frank Yang c4f53facd9 R4R: Fix incorrect `$GOBIN` in `Install Go`. (#4113)
Fix empty path in `Install Go`.

This bug was fixed by #3975, and broken by #4089
2019-04-16 10:05:28 +01:00
Frank Yang dfe58f8d8d Merge PR #4123: Fix typo in docs; fix url error and outdated command description of doc clients 2019-04-15 18:47:17 -04:00
Alexander Bezobchuk 585b68ec70
Merge PR #4100: Return correct error on invalid messages 2019-04-15 12:25:04 -04:00
Aleksandr Bezobchuk 046932b084
Merge branch 'develop' into release/v0.34.0 2019-04-15 10:10:52 -04:00
Alexander Bezobchuk 722d122da7
Merge PR #4079: Implement Invariant Benchmarks 2019-04-12 18:52:16 -04:00
Alessio Treglia 3c88ddc2f5 Merge PR #4083: Replace gaiad --assert-invariants-blockly with --inv-check-period
* Remove old broken flag
* Support --inv-check-period which asserts invariants every nth period
2019-04-10 19:33:50 -04:00
Alexander Bezobchuk 94b7d8f467 Fix queryDelegatorTotalRewards (#4078)
Return [] instead of null by making the initial
value an empty slice literal opposed to nil.

Closes: #3705
2019-04-10 18:08:50 +01:00
Marin Basic b50b25d0a9 Replace all REST query empty result HTTP Status codes to 200 (#4065)
All query params that are empty now returns success
(http.StatusOK) instead of mixed http status codes
(http.StatusNoContent/http.StatusBadRequest/
http.StatusInternalServerError)

Closes: #2007
2019-04-10 18:07:21 +01:00
Federico Kunze 8550d87319 unified sender tag (#4057)
Closes: #3775
2019-04-10 18:03:44 +01:00
Aleksandr Bezobchuk ace9910e94
Update change log 2019-04-10 11:24:46 -04:00
Federico Kunze eb51a6f84b remove duplicated account check and test (#4068) 2019-04-10 13:10:44 +01:00
frog power 4000 02a0e393c5 Run missing invariants during simulations (#4080) 2019-04-10 02:34:38 +01:00
Federico Kunze 2cd2289a11 add category tags (#4049)
Closes: #3774
2019-04-09 13:55:01 +01:00
wangjj9219 65338f6642 There's no check for chain-id in TxBuilder.SignStdTx #3945 (#3946)
Close: #3945
2019-04-09 13:46:13 +01:00
Federico Kunze c0a607ce74 fix and cleanup action tags (#4045)
Closes: #3966 #3793
2019-04-08 23:51:02 +01:00
Alessio Treglia fbc6bdae18
gaiad: ExportGenesisFile() incorrectly overwrites genesis (#4063)
ExportGenesisFile() overwrites all non-gaia related
sections of the genesis.json file as it always
creates a new one from scratch.

Remove cmd/gaia/init.LoadGenesisDoc() in favor of
tendermint's types.GenesisDocFromFile().

Closes: #4066
2019-04-08 18:54:45 +01:00
Federico Kunze bec468953e Merge PR #4023: Genesis port script v0.33.x to v0.34.0 2019-04-08 12:49:14 -04:00
Frank Yang 9e7440a92c Merge PR #4064: Remove dep/vendor from documentation and version cmd
* Remove `dep` and `vendor` from documentation
* Replace vendor with go.sum hash in version command
2019-04-08 11:00:17 -04:00
frog power 4000 cec3065a36
Revert "Return errors instead of panic (#3782)" (#4054)
This reverts commit 985aae5575.
2019-04-05 16:20:58 -04:00
Frank Yang 055d219301 Add `GO111MODULE=on` to environment. (#4042) 2019-04-04 15:38:02 +01:00
Marin Basic 985aae5575 Return errors instead of panic (#3782)
This is related to issue #3741 where fetching data from
invalid store, package panic.

Modify subspace.go to return errors instead of panic.

Also update other packages that import subspace and
handle errors.
2019-04-04 08:10:56 +01:00
Aleksandr Bezobchuk 1024562737
Fix pending log entry 2019-04-03 10:51:35 -04:00
Alexander Bezobchuk 0e55b6eada Merge PR #4028: Hex Encode Data in Tx Responses 2019-04-03 07:49:34 -07:00
Aleksandr Bezobchuk d8833d760d
Remove pending files 2019-04-03 09:39:06 -04:00
Alexander Bezobchuk bf17e1b020
Merge PR #4029: Update Tendermint to v0.31.3 2019-04-03 09:03:21 -04:00
Alexander Bezobchuk e2928d5b70
Merge PR ##4007: Add Block Time in Txs Responses 2019-04-02 21:09:37 -04:00
Frank Yang bc8d2d4414 R4R: Rename validator.GetJailed() to validator.IsJailed() #3245 (#4017)
Closes: #3245
2019-04-02 15:43:22 +02:00
Alexander Bezobchuk b95ade93bd Merge PR #4011: Mint/Inflation Querier, LCD and CLI
* A few godoc updates

* More minor tweaks and reformatting

* Implement initial minting querier

* Implement stringer interface for minting params

* Minor cleanup

* Add minting CLI commands

* Implement inflation query command

* Implement annual provisions query and CLI command

* Update x/mint/client/module_client.go

Co-Authored-By: alexanderbez <alexanderbez@users.noreply.github.com>

* Update x/mint/client/module_client.go

Co-Authored-By: alexanderbez <alexanderbez@users.noreply.github.com>

* Update x/mint/client/module_client.go

Co-Authored-By: alexanderbez <alexanderbez@users.noreply.github.com>

* Update x/mint/querier.go

Co-Authored-By: alexanderbez <alexanderbez@users.noreply.github.com>

* Add minting REST client routes/handlers

* Fix build issues

* Implement querier unit tests

* Update gaiacli docs

* Implement LCD tests

* Update Swagger docs

* Add pending log entry

* add examples

Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com>

* revert adding examples

Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com>
2019-04-01 10:28:36 -07:00
Alexander Bezobchuk 120e08f12d
Merge PR #3851: Enable Transfers
Remove forked bank router from Gaia
2019-04-01 11:38:31 -04:00
Alessio Treglia 273c5253fd
Fix docker_image ci job (#4004)
- Always build regardless of the branch;
  push only from develop and master.
- Add curl to packages dependencies in Dockerfile
  to allow golangci-lint to be downloaded.

Closes: #3977
2019-03-29 18:31:55 +01:00
Alexander Bezobchuk 92f653b35c
Merge PR #4001: Upgrade Tendermint to v0.31.1 2019-03-29 13:13:45 -04:00
frog power 4000 df4394185e
Merge PR #3656: Broken-Invar Tx - aka. Crisis module
* beginning thinking on issue

* ...

* working

* working

* working fee pool distribution

* spek outline

* spec update

* gas refund calculations

* simulation saved to ~/.gaiad/simulations/

* lean simulation output

int

* cleanup bank simulation messages

* operation messges

int

* lint

* move simulation to its own module

* move simulation log code to log.go

* logger overhaul

int

* distribution comments

* fix compiling

* cleanup modifications to x/distribution/keeper/allocation.go

int

int

int

* gov bug

* result.IsOK() minimization

* importExport typo bug

* pending

* address @alexanderbez comments

* simple @cwgoes comments addressed

* event logging unified approach

* distr module name constant

* implementing

* compiles

* gaia integration

* proper constant fee removal

* crisis genesis

* go.sum update

* ...

* debugging

* fix sum errors

* missing err checks

* working implementing CLI

* remove query command

* crisis expected keepers in other modules

* crisis testing infrastructure

* working

* tests complete

* modify handler to still panic if not enough pool coins, docs working

* spec tags

* docs complete

* CL

* assert invariants on a blockly basis gaiad functionality

* gaiad CL

* transaction details in runtime invariance panic

* Apply suggestions from code review

Co-Authored-By: rigelrozanski <rigel.rozanski@gmail.com>

* sender tags

* @mossid suggestions

int

* @cwgoes comments final

* Apply suggestions from code review

Co-Authored-By: rigelrozanski <rigel.rozanski@gmail.com>

* bug seems fixed (#3998)

* delete unused line in zero height export bug
2019-03-28 19:27:47 -04:00
Karoly Albert Szabo 5bb6090e38 Add route for querying signing_info for all validators (#3952)
Also remove duplicate pagination:
- move function to extract query params into types/rest
- adjust pagination values locally until available in tendermint for validators

Code cleanup:
- helper function in test
- fix pagination description in swagger.yaml
- uint instead of int when possible

Closes: #3226
Closes: #3991
2019-03-28 18:43:33 +00:00
Frank Yang e5897d8d91 Merge PR #3996: Update DOCS_README
Update references to make targets
2019-03-28 12:39:21 -04:00
Jack Zampolin 38b7c0705c Implement client functionality for the community pool (#3939)
Fixes: #3937
2019-03-28 01:05:36 +00:00
Alexander Bezobchuk f635b1cd14 Fix Proposal Stringer (#3986)
Fix the `Stringer` interface implementation for the `Proposal` type:
- Add missing description.
- Fix indentation.
2019-03-27 21:08:20 +00:00
Karoly Albert Szabo 8550d14071 Gaiad gentx optional flags (#3897)
Add website, details and identity to gentx

Closes: #3858
2019-03-27 18:38:35 +00:00
Alexander Bezobchuk ea46da7126
Merge PR #3970: Fix Tx Sign Offline Mode
- Add shorthand flags `-a` and `-s` for the account and sequence numbers respectively
- Mark the account and sequence numbers required during "offline" mode
- Always do an RPC query for account and sequence number during "online" mode
  - If clients wish to provide such values, they must use `--offline`. This makes the whole flow/UX easier to reason about.

closes: #3893
2019-03-26 10:36:10 -04:00
Frank Yang 83f3d1e192 Merge PR #3975: Missing `source ~/.bash_profile` when setting the go environment 2019-03-25 22:04:55 -07:00
Juan Leni 2dfba4ec9b Merge PR #3962: Upgrading ledger dependencies 2019-03-25 20:28:25 -07:00
Alexander Bezobchuk 2b43e25d55
Merge PR #3954: Tx Broadcasting Sync by Default 2019-03-25 20:54:23 -04:00
Frank Yang 5c2077c150 Merge PR #3935: Modify stake to uatom in gaia's doc
* Modify stake to atom in gaia's doc. #3833

* Scale up the amount from atom to uatom.

* Scale up the amount from atom to uatom.

* Update docs/gaia/validators/validator-setup.md

Co-Authored-By: yangyanqing <yangyanqing.cn@gmail.com>

* modify for review
2019-03-25 17:15:54 -04:00
Alexander Bezobchuk 59765cecb1 Merge PR #3857: Remove Shares Concept from Unbond/Redelegate UX
* Remove shares concept from unbonding and redelegation

* Remove redundant staking REST type declerations

* Rename staking REST request types

* Fix slashing tests

* Fix staking tests

* Fix integration tests

* Add safety checks for when validator tokens are zero

* Attempt to fix simulation

* Add pending log entry

* Update docs

* Implement and use SharesFromTokens

* Rename ShareTokens and ShareTokensTruncated

* Rename Delegation to Amount in DelegateRequest

* Implement and use SharesFromTokensTruncated

* Update MsgDelegate to use Amount instead of Value

* Use constructors in staking sim messages

* Implement and use ValidateUnbondAmount
2019-03-25 17:13:02 -04:00
frog power 4000 2ca86c8605 Merge PR #3898: Circuit breaker high level explanation 2019-03-25 16:37:05 +01:00
Alexander Bezobchuk 8528ac7665
Merge PR #3960: Disable Keybase for Generate Only in CLI 2019-03-25 11:27:24 -04:00
Alexander Bezobchuk dd7de2acaf
Merge PR #3951: Remove ';' delimiting support from ParseDecCoins 2019-03-25 10:38:15 -04:00
Frank Yang 424adf1461 Merge PR #3953: Codespace should be lowercase 2019-03-20 16:45:02 -07:00
Karoly Albert Szabo 7438a650e6 Validate genesis before running gentx (#3927)
Closes: #3825
2019-03-20 19:02:11 +01:00
Alexander Bezobchuk 386116f9e2 Merge PR: #3918 Allow Unrated Decreases to Validator Commission Rates
* Allow arbitrary decreases to validator commission rates

* Implement TestCommissionValidate

* Implement TestCommissionValidateNewRate

* Add comments to unit tests
2019-03-19 22:04:25 -04:00
Alessio Treglia 236bc237a9
Add changelog pending entry 2019-03-19 18:25:30 +01:00
Alessio Treglia cdf2b7a7c5
gometalinter -> golangci-lint migration (#3933)
{,scripts/}Makefile:
- Remove gometalinter, install golangci-lint.
- Remove distinction between tools and devtools.
  Just tools is enough.
- test_lint -> lint
  Migrating away from underscore separated names.
- Remove unnecessary targets.
- Drop tendermint/lint. Incompatbile with golangci-lint
  and no longer necessary anyway.
- Fix misleading message in go-mod-cache.
- New ci-target to avoid download tools twice.
- Run tests with -mod=readonly.

Port tools/gometalinter.json to .golangci.yml
Update CircleCI config accordingly.

Closes: #3896
2019-03-19 17:52:43 +01:00
frog power 4000 ea9aecdff4
Merge PR #3894: Minting mechanism explanatory docs
* minting spec concepts

* cl

* Update docs/spec/mint/01_concepts.md

Co-Authored-By: rigelrozanski <rigel.rozanski@gmail.com>

* typo address @alexanderbez

* Apply suggestions from code review

Co-Authored-By: rigelrozanski <rigel.rozanski@gmail.com>

* commit for CI to restart
2019-03-18 11:11:31 -04:00
Alessio Treglia 6ce4d5efd1
replace dep with go mod (#3907)
Replace sha1sum with jack's gosum and get rid of
vendor-deps.
Also don't compute hash on vendor/ contents.
Instead hash go.sum.

Disable unconvert lint check. It does not
work very well with go mod.

Remove update_vendor_deps once and for all.

Upgrade to go 1.12

Closes: #3919 #3630
2019-03-18 13:45:25 +01:00
Alexander Bezobchuk 5f92fef4b0
Fix TruncateDecimal (#3913) 2019-03-16 16:14:37 -07:00
Frank Yang 3d2886dc49 Remove Height Flag from CLI Queries #3883 (#3910)
Closes: #3883
2019-03-16 17:26:40 +01:00
Alexander Bezobchuk 25408e7856 Merge PR #3747: Implement initial simple denom convert utils 2019-03-16 14:18:27 +01:00
Frank Yang 8d6d8adb5f Merge PR #3899: Using `gaiacli config node` breaks ~/config/config.toml (#3903)
Config file need to be truncated while rewriting.
2019-03-15 16:08:33 +01:00
frog power 4000 f0d1efa43c Merge PR #3819: Simulation Refactor 2019-03-14 19:13:15 +01:00
Alessio Treglia 648b43288b Merge PR #3828: Add sdkch to maintain PENDING.md effectively and free of file conflicts
Closes: #2380
2019-03-14 14:24:53 +01:00