Commit Graph

122 Commits

Author SHA1 Message Date
Jeremiah Andrews 2378e3431c Fix linter errors 2018-09-03 07:58:57 -07:00
Alessio Treglia 76a16ab288
Modify AnteHandler to take a simulate boolean parameter 2018-08-25 20:12:14 +01:00
Alessio Treglia 7e8feec738
Incorporating @cwgoes comments 2018-08-24 15:20:53 +01:00
Alessio Treglia e959478e61
comment getContextForAnte(), rename applyTxMode() 2018-08-24 10:16:51 +01:00
Alessio Treglia f432c0c383
Simulate transactions before actual execution
* Change --gas=0 semantic in order to enable gas auto estimate.
* REST clients have been modified to simulate the execution of
  the tx first to then populate the context with the estimated
  gas amount returned by the simulation.
* The simulation returns both an unadjusted gas estimate and an
  adjusted one. The adjustment is required to ensure that the
  ensuing execution doesn't fail due to state changes that might
  have occurred. Gas adjustment can be controlled via the CLI's
  --gas-adjustment flag.
* Tiny refactorig of REST endpoints error handling.

Closes: #1246
2018-08-24 10:16:51 +01:00
Sunny Aggarwal 44bf69e564 run queries against cachewrapped commit state, not checkstate 2018-08-22 00:15:18 -07:00
Sunny Aggarwal 97f7b88a9f addressed Jae's comments 2018-08-22 00:15:18 -07:00
Sunny Aggarwal 0134c3b7f1 Address Anton's comments 2018-08-22 00:15:18 -07:00
Sunny Aggarwal cc1d1fbcf7 moved queryrouter to behind baseapp seal 2018-08-22 00:12:44 -07:00
Sunny Aggarwal 804baa70f4 added querier to gov module 2018-08-22 00:12:44 -07:00
Sunny Aggarwal 1d1a95656a custom queriables 2018-08-22 00:11:23 -07:00
Christopher Goes 3d50567034
Merge PR #1783: Slashing, validator set, and governance simulation 2018-08-16 17:36:15 +02:00
Dev Ojha b2a4aecc44 Upgrade to tm version 23.0. (#1927)
* Start upgrade. Currently go test ./... hangs.

* (squash this) Fix staking tests

* wip

* note what changes need to be made to make this work on tm v0.23.0

* Fix addr -> pubkey map

* cleanup code

* Fix slashing test failures except for begin blocker

* fix all slashing tests

* fix lcd tests

* Address PR comments

* add link to changelog.

* (wip) start making addrToPubkey map persisted. Since amino can't handle maps,
we have to change from what this commit is doing.

* Use the correct method of storing a map

* (squash this) address PR comments

* Did you run 'make'?

* remove gaiadebug binary
2018-08-12 03:33:48 -04:00
Joon 7b54e4b786 Merge pull request #1812: Add BaseApp.Seal
* Merge pull request #1812: Add BaseApp.Seal

fix pow

move setter functions

apply requests

* fix errors

* fix test

* fix test

* changelog
2018-08-01 00:23:25 -04:00
Jeremiah Andrews 0166cf2aa0 Add test which fails without patch, comment on patch 2018-07-25 22:13:58 -07:00
Jeremiah Andrews 6ea0a1b66f fix gaiad export 2018-07-25 22:13:58 -07:00
Aditya Sripal 48885b4093 merge 2018-07-19 11:38:44 -07:00
Aditya Sripal 1e87b5e02e remove old comment 2018-07-19 11:36:36 -07:00
Aditya Sripal 5015c46e06 revert change to queryApp encoding 2018-07-19 11:35:31 -07:00
Joon aa525418e1 Merge PR #1373: Initialization of POS chain 2018-07-19 08:39:40 +02:00
Aditya Sripal 218c9b3702 Merge branch 'develop' of https://github.com/cosmos/cosmos-sdk into aditya/cleanup 2018-07-18 17:48:15 -07:00
Christopher Goes cbf432d34c
Merge PR #1746: Remove ctx.IsCheckTx
* Remove ctx.IsCheckTx
* Changelog to Pending
* Typo
* Simulate instead of Check in SignCheckDeliver
* Add descriptive comment
* Change to 'CheckTx implements ABCI'
* Alphabetize changelog
2018-07-19 02:42:19 +02:00
Aditya Sripal 46b87666bd fmt 2018-07-18 16:34:15 -07:00
Aditya Sripal 81f3e794fe make breaking changes 2018-07-18 16:24:16 -07:00
Aditya Sripal aa3a64d289 Test recover in ante 2018-07-13 10:53:12 -07:00
Aditya Sripal 4751727351 fmt 2018-07-12 19:06:54 -07:00
Aditya Sripal 98c19516c5 merge 2018-07-12 18:34:54 -07:00
Aditya Sripal fa31165438 Refactor BaseApp without breaking change 2018-07-12 18:32:48 -07:00
Alexander Bezobchuk 5983a07fb6 Merge PR #1599: Implementation of TraceKVStore 2018-07-13 01:58:51 +02:00
Jeremiah Andrews 338c7b5e4c Merge pull request #1603: Adding option functions to NewBaseApp
* adding option functions to baseapp constructor

* Added simple test and changed godoc

* remove unrelated changelog updates
2018-07-10 15:10:59 -04:00
ValarDragon 985037d2bd Fix unformatted files 2018-07-09 22:08:01 -07:00
mossid 4761612288 Merge pull request #1400: Cleanup Baseapp
fix lint

apply requests

revert removing newCtx

refactor

fix errors
2018-07-09 23:59:30 -04:00
ValarDragon 30c4abb394 Fix golint error 2018-07-09 16:27:51 -07:00
ValarDragon 472e168a72 Minor refactor to reduce complexity, add nolint 2018-07-09 16:24:20 -07:00
ValarDragon 99e91dd276 Add nolints on remaining functions 2018-07-09 16:16:43 -07:00
ValarDragon e906272ca0 Reduce complexity of baseapp query 2018-07-09 15:29:16 -07:00
ValarDragon 0c5358c267 Continue reducing code complexity:
* Adds a Min function to Int, and uses that in the slash function
* Adds a getHeight helper function to iavlstore
* Adds a splitPath function to baseapp
* Changes cyclo param from 10 to 11
2018-07-09 15:29:16 -07:00
Ethan Buchman 6159554d8a fixes from review 2018-07-07 14:50:19 -04:00
Ethan Buchman fe7ae1151d baseapp: refactor tests
* simplify mock tx type, msgs, and handlers
* remove dependencies on auth and bank
* dedup with setupBaseApp
* lots of comments and cleanup
* fixes where we weren't checking results
* use some table driven tests
* remove TestValidatorChange - its not testing anything since baseapp
doesnt track validator changes
* prepare for CheckTx only running the AnteHandler
* fix runTx gas handling and add more tests
* new tests for multi-msgs
2018-07-07 13:41:36 -04:00
Ethan Buchman f78f30c67a update for tm v0.22.0. tmlibs->tendermint/libs 2018-07-02 16:34:06 -04:00
Christopher Goes 59aadf42aa
Ledger integration (#931)
Merges the keybase and Ledger code from go-crypto (which is no more) into the SDK
Adds support for Ledger into gaiacli
Cherry-picks updated error handling from #1158
2018-06-29 02:54:47 +02:00
Dev Ojha ac3adff1e8 Merge PR #1438: Tools: Add errcheck linter
This linter ensures that all errors are checked.
This is disabled in the client directories, since its not needed on
those writes
2018-06-29 00:52:10 +02:00
Aditya 9b4838d96e Merge PR #1367: Set ChainID on InitChain
* Added chain-id to context in InitChain
* Fix bug in test
* fmt
* Appease linter
* updated changelog
* Remove chainID hack
* setCheckState in InitChain
* Fix bug
* Fix initialization errors in example tests
* Initialize app tests with default stake genesis
* fix comments
2018-06-28 00:45:10 +02:00
Rigel 6f140d7296 Merge PR #1119: Unbonding, Redelegation
* stake/fees spec updates
* staking overview.md revisions, moving files
* docs reorganization
* staking spec state revisions
* transaction stake updates
* complete staking spec update
* WIP adding unbonding/redelegation commands
* added msg types for unbonding, redelegation
* stake sub-package reorg
* working stake reorg
* modify lcd tests to not use hardcoded json strings
* add description update
* index keys
* key managment for unbonding redelegation complete
* update stake errors
* completed handleMsgCompleteUnbonding fn
* updated to use begin/complete unbonding/redelegation
* fix token shares bug
* develop docs into unbonding
* got non-tests compiling after merge develop
* working fixing tests
* PrivlegedKeeper -> PrivilegedKeeper
* tests compile
* fix some tests
* fixing tests
* remove PrivilegedKeeper
* get unbonding bug
* only rpc sig verification failed tests now
* move percent unbonding/redelegation to the CLI and out of handler logic
* remove min unbonding height
* add lcd txs
* add pool sanity checks, fix a buncha tests
* fix ante. set lcd log to debug (#1322)
* redelegation tests, adding query functionality for bonds
* add self-delegations at genesis ref #1165
* PR comments (mostly) addressed
* cleanup, added Query LCD functionality
* test cleanup/fixes
* fix governance test
* SlashValidatorSet -> ValidatorSet
* changelog
* stake lcd fix
* x/auth: fix chainID in ante
* fix lcd test
* fix lint, update lint make command for spelling
* lowercase error string
* don't expose coinkeeper in staking
* remove a few duplicate lines in changelog
* chain_id in stake lcd tests
* added transient redelegation
* 'transient' => 'transitive'
* Re-add nolint instruction
* Fix tiny linter error
2018-06-27 04:00:12 +02:00
Dev Ojha 2e97baabf6 Merge PR #1358: Fix typos and gofmt files
* Fix typos
* gofmt -s files
* Add mispellings and gofmt checks to circle CI
* circleci: Install misspell in the linting step
2018-06-25 20:23:17 +02:00
Joon ec6acda6a4 Merge PR #1331: Remove TxBytes from NewContext 2018-06-22 03:03:05 +02:00
Aditya f049a56376 Merge PR #1266: Multiple messages
* Started work on multiple msgs, types and x/auth tests pass
* Fix issues in x, examples, and baseapp
* Added baseapp tests for multiple msgs
* Documentation fixes
* Fix baseapp tests with sdk.Int
* Modify test
* Transaction handling is now atomic
* Fix test comment
* Minor doc fixes and code cleanup
* Added baseapp result changes
* Use address in validator update accumulation
* Started work on multiple msgs, types and x/auth tests pass
* Fix issues in x, examples, and baseapp
* Added baseapp tests for multiple msgs
* Documentation fixes
* Fix baseapp tests with sdk.Int
* Modify test
* Transaction handling is now atomic
* Fix test comment
* Minor doc fixes and code cleanup
* Added baseapp result changes
* Use address in validator update accumulation
* Added ante tests for multisigner
* Remove validatorUpdates from tx result
* Better error logs
* Put Memo in StdSignBytes and formatting
* Updated changelog
2018-06-22 00:05:25 +02:00
Fabian 42e72956f4 Merge PR #1252: Query node version
introduce non store queries
add version query
update lcd spec
changelog
moved version query into baseapp
2018-06-14 07:49:21 +02:00
David Kajpust ec2fedd36c Merge PR #1227: Set all Error strings 1st letters to lowercase. Fixes issue #1154 2018-06-13 21:13:22 +02:00
Christopher Goes be7ec5bc07
Merge PR #1115: Update SDK to ABCI v11 2018-06-05 01:42:01 +02:00