Commit Graph

342 Commits

Author SHA1 Message Date
Christopher Goes 5a56c3f03d
Merge PR #1575: ready-for-review: sdk.AccAddress natively bech32 2018-07-10 04:18:23 +02:00
ValarDragon 592419c83a Reduce code complexity of testnet command 2018-07-09 15:29:16 -07:00
ValarDragon 2b5ccdbf87 Reduce code complexity in AnteHandler, and GetExternalIP 2018-07-09 15:29:16 -07:00
Sunny Aggarwal 25d976feb4 works? 2018-07-09 01:47:38 -07:00
sunnya97 7ac220beb6 asdf 2018-07-09 00:59:51 -07:00
ValarDragon 611e4faa3a gaiad: Genesis txs now use bech32 encoding of address and pubkey
* `gaiad init gen-tx` makes the outputted file use bech32, with acct prefix
* `gaiad init --gen-txs` only reads bech32 with acct prefixes

The reason for using the account prefix is that in principle you could
have genesis transactions for non-validators.

Closes #1475
2018-07-07 14:23:19 -07:00
Ismail Khoffi abce54ea60
Merge branch 'develop' into sort_getsignbytes 2018-07-06 01:31:34 +01:00
Liamsi b7f902fba5 sort *all* GetSignBytes:
- call MustSortJSON before return JSON bytes to guarantee alphabetic
ordering

- moved SortJSON and MustSortJSON to types package to avoid cyclic
package dep
2018-07-06 01:12:57 +01:00
Christopher Goes 66fdb9585b Gopkg.lock & 'make format' 2018-07-06 02:09:33 +02:00
Christopher Goes 908fb39a65
Merge PR #1559: Fix genesis JSON key ordering
Inconsistent Genesis Generation Key Order
2018-07-05 23:05:05 +02:00
Liamsi 28245dba90 adhere to golint 2018-07-05 19:18:48 +01:00
Aleksandr Bezobchuk 51fdc9db2f Merge pull request #1559: Inconsistent Genesis Generation Key Order 2018-07-05 14:15:00 -04:00
Liamsi 97182dce21 Add test-cases, remove indentation 2018-07-05 19:10:35 +01:00
Liamsi 547390a238 WIP: add simple sorting using golang json.Marshal 2018-07-05 17:11:44 +01:00
Ethan Buchman d388036454 Merge PR #1520: various fixes for test_cli
* various fixes for test_cli
* linting
2018-07-03 06:33:53 +02:00
Aleksandr Bezobchuk e3e58435eb Merge branch 'develop' into bez/1269-basecoind-start-failure 2018-07-02 18:59:34 -04:00
Aleksandr Bezobchuk 61ce80135a Merge pull request #1509: Fix basecoin Example 2018-07-02 18:46:12 -04:00
Ethan Buchman f78f30c67a update for tm v0.22.0. tmlibs->tendermint/libs 2018-07-02 16:34:06 -04:00
Ethan Buchman 0845d8126e server: remove broken start test 2018-07-02 14:47:58 -04:00
Dev Ojha 955a0c9af7 Switch asserts to require (#1483)
* meta: Switch the majority of asserts to require

Switch most assert statements to require, to ease debugging.
Closes #1418

* Fix imports
2018-06-30 03:10:15 +02:00
Dev Ojha 097dd8a164 tools: Add unparam linter (#1443)
* tools: Add unparam linter

unparam detects unused parameters in functions, and a parameter to
a function which only ever takes on one value. The latter is an
indication that more tests are required.

There are many nolints in this PR, as I believe that writing tests
to fix alot of these situations is out of scope for this PR / it
will be changed in future commits. There are some nolints for
when we have to comply to normal api's.

* crypto/keys no longer used by x/gov/client/rest/rest.go
2018-06-29 18:22:24 -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
Dev Ojha eb097c4c5c Merge PR 1361: server: Use differing defaults from tendermint
When loading the config file, this now checks in the sdk if the file
already exists. If not, it writes a config with different defaults.
The defaults differ by having the profiler listen address set,
and increasing the receive / send rates.
2018-06-25 18:33:07 +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
Joon 3fa68249eb Merge PR #1254: Add prefixstore and lib refactor
* Merge pull request #1254: add prefixstore and lib refactor
add prefixstore
refactor lib
fix test
fix linter
in progress
in progress
add test for prefixstore
add KVStoreGetter, PrefixStoreGetter
move PrefixStoreGetter to types/
add tests
KVStore.Prefix(string) -> KVStore.Prefix([]byte)
fix mock
apply requests
pass lint, add test
apply requests
* Remove unnecessarily 'valid' boolean
2018-06-21 23:33:36 +02:00
Christopher Goes 918e217e1f
Merge PR #1280: Implement simple transaction memos
* AltBytes -> Memo, memo CLI support & thread-through
* Check memo size, update changelog
* Update existing testcases
* Nuke CircleCI caches
* Charge gas proportional to memo size
* Fix gas allocations in ante handler testcases
* Add testcases
* Update changelog
* Fix tiny CLI bug & add to CLI tests
* Add '--memo' to gaiacli
* Add testcase for large memos
* Address PR comments
2018-06-20 21:27:36 +02:00
Dev Ojha 1f88b0bf8f Merge PR #1281: Don't run defers if it would result in an NPE
* Don't run defers if it would result in an NPE
* Nuke CircleCI caches
2018-06-16 09:49:55 +02:00
Greg Szabo f8290a0fc3
Merge branch 'develop' into greg/testnet-command-2 2018-06-14 11:34:26 -07:00
Greg Szabo 17e88a5e00 Fixes requested by Rigel: GenTx, config package name 2018-06-13 17:30:16 -07:00
Dev Ojha bd362ee590 Merge PR #1090: Switch away from ephemeral ports
* Switch ports 4665x to be 2655x
This is done so the default ports aren't in the linux kernel's default ephemeral port range.
* Missed one doc file, change dep so gaiad works
* Update changelog, fix Gopkg.lock
2018-06-14 00:13:51 +02:00
Dev Ojha 0fa28cac3b Merge PR #1248: Sync to tendermint develop's latest revision 2018-06-13 23:44:41 +02:00
Greg Szabo bc206c315c
Merge branch 'develop' into greg/testnet-command-2 2018-06-13 12:30:51 -07: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 8753d6d59a
Revert "Merge PR #1228: Update to Tendermint develop" (#1231)
This reverts commit 1c8dbd1087.
2018-06-13 07:25:14 +02:00
Dev Ojha 1c8dbd1087 Merge PR #1228: Update to Tendermint develop 2018-06-13 06:42:52 +02:00
Greg Szabo 4c5e536b31 Added testnet command and localnet targets
Finished testnet command and introduced localnet targets in Makefile, together with gaiadnode Docker image

Fixed function parameter list - now starts with ctx

Separated GenTxConfig into a server/config package so both the server package and the mock package can use it

Adding server/config to app package

gaiadnode Docker image

Separated GenTxConfig into a server/config package so both the server package and the mock package can use it

Adding server/config to app package

Fixes requested by Rigel

Removed commented code

Global flag fixes
2018-06-12 11:25:03 -07:00
Ethan Buchman a277ba91c7 Merge PR #1178: Merge master (Tendermint updates)
* update to tm v0.19.6
* update tm to 0.17.4
* update for tm v0.19.9
* update godep
2018-06-09 06:34:27 +02:00
rigelrozanski b5d847288d move original mock into server 2018-06-07 21:33:06 -07:00
Christopher Goes 3fbee11ccc
Merge PR #1142: Export validators to genesis
* Validator export skeleton
* Update export command, add tests, update CHANGELOG
* Rename exportAppState to exportAppStateAndTMValidators
2018-06-06 18:38:13 +02:00
Zaki Manian ce850dca3b Switch from bech32cosmos to bech32 2018-06-01 16:23:58 +02:00
rigelrozanski 34686e8d61 unsafe_reset_all back to root 2018-06-01 01:35:39 -07:00
rigelrozanski 7ce9e000b6 update changelog, minor update 2018-06-01 00:53:54 -07:00
Jeremiah Andrews 744f78573e small fixes 2018-05-31 21:50:01 -07:00
Jeremiah Andrews 083ca8234b Refactored gaiacli and gaiad commands into subcommands 2018-05-31 21:50:01 -07:00
rigelrozanski 5515b60b0a better tooling for cli, couple lsd fixes 2018-05-31 18:46:25 -07:00
Zaki Manian a163a3558f Use public keys consistently for validators and all addresses are for accounts 2018-05-27 14:21:15 +02:00
Zaki Manian f33f49a840 Almost from scratch reimplementation of bech32cosmos integration. 2018-05-27 13:47:23 +02:00
Zach Ramsay d6708a40e8 gaiad: don't print command twice 2018-05-15 18:30:06 -04:00
rigelrozanski d2163017ce small efficiency increase 2018-05-14 09:39:29 -04:00
Adrian Brink 878a53bf0d
Prevent --gen-txs from failing silently
Instead of just failing silently if there is a non .json file or folder
in the gentx/ directory it now just skips that file or directory.

ref #940
2018-05-13 18:24:48 -04:00
Adrian Brink cd24244308
Sort all genesis transaction by node id
This ensures that users can rename the genesis transactions and they
will still be in the same order.
2018-05-13 18:19:42 -04:00
Christopher Goes 12ebad49e2
Export all genesis information (closes #946) 2018-05-07 01:01:01 +02:00
rigelrozanski 318e924145 refactor 2018-04-27 20:36:11 -04:00
rigelrozanski 10ddd7a3d3 refactor export function, working 2018-04-27 20:06:50 -04:00
Christopher Goes 10d2e5ae40 Move generateApp & exportApp to baseapp/helpers 2018-04-27 20:04:29 -04:00
Christopher Goes df4fdb3642 Rebase & merge changes 2018-04-27 20:03:43 -04:00
Christopher Goes f92e83d2e0 Swap to general `export` command 2018-04-27 20:02:26 -04:00
rigelrozanski 0f28f6738a updated some testnet docs, gen-txs now in the config folder 2018-04-26 15:52:20 -04:00
rigelrozanski ade42e74b7 better init test 2018-04-26 14:26:39 -04:00
rigelrozanski 05c5809bae gaia init automatic key processing 2018-04-26 14:26:39 -04:00
rigelrozanski d1c6216c0f gen-tx fix 2018-04-26 14:26:39 -04:00
rigelrozanski b9477ecbbe init refactor uses genesis transaction now 2018-04-26 14:26:39 -04:00
rigelrozanski 12f20d160a interim gen app tx refactor 2018-04-26 14:26:39 -04:00
rigelrozanski 4049c5d24f cwgoes comments, bug fix 2018-04-26 14:26:39 -04:00
rigelrozanski 525a852b01 bug fixes to init from-pieces command 2018-04-26 14:26:39 -04:00
rigelrozanski 201908949a stake init overhaul 2018-04-26 14:26:39 -04:00
rigelrozanski c8f5fcb27b init append functionality complete 2018-04-26 14:26:39 -04:00
rigelrozanski 556896679a ... 2018-04-26 14:26:39 -04:00
rigelrozanski 867d0e502c working genesis pieces 2018-04-26 14:26:39 -04:00
rigelrozanski 246e4bdac3 renames 2018-04-26 14:26:39 -04:00
rigelrozanski d4c2d6fd4c fix cli tests 2018-04-26 14:26:39 -04:00
rigelrozanski 55c1e1dcfc init refactor 2018-04-26 14:26:39 -04:00
rigelrozanski 6748aa7bc6 first stab init refactor 2018-04-26 14:26:39 -04:00
rigelrozanski f3fffcb7a2 more versatile init 2018-04-26 14:26:39 -04:00
rigelrozanski ca3d3be3af better key output 2018-04-20 12:51:47 -04:00
rigelrozanski bce7bf6e79 rm a couple comments 2018-04-19 16:33:17 -04:00
rigelrozanski ad0c776d94 show_validator now displays HEX by default, declare-candidacy also takes go-amino encoded 2018-04-19 15:18:31 -04:00
rigelrozanski d28efaac27 many renames / golint compliance 2018-04-19 00:49:24 -04:00
rigelrozanski c80b9674cd stake CLI various fixes, confirmed working 2018-04-18 12:19:35 -04:00
Ethan Buchman 5b32a3bad2 MarshalJSONIndent 2018-04-09 20:32:19 +03:00
Jae Kwon 49fdf80d9d WIP commit 2018-04-06 17:25:08 -07:00
Ethan Buchman 1f93e965fb add log_level flag 2018-04-05 14:16:20 +03:00
Ethan Buchman 9fbbdbbe0f server: consolidate files 2018-04-05 13:31:33 +03:00
Ethan Buchman 609ea0d0f0 more daemon refactoring 2018-04-05 13:24:53 +03:00
Ethan Buchman f79d06c9f3 refactor basecoind, change GenAppOptions 2018-04-05 13:09:02 +03:00
Christopher Goes 8c0cb25bab
Update for new context 2018-04-05 11:21:42 +02:00
Christopher Goes 74a2246b3e
Pass logger and config through CLI context (closes #725) 2018-04-05 11:20:05 +02:00
Christopher Goes 457092d662
TestStartStandAlone without cobra 2018-04-03 22:16:03 +02:00
Christopher Goes 3404ecca79
Avoid race condition with viper.Set (ref #668) 2018-04-03 22:16:03 +02:00
Christopher Goes fb3572c445
Enable TestStartWithTendermint (closes #668) 2018-04-03 22:16:03 +02:00
Christopher Goes ed54dc43f2
Add ChainID to testnet JSON (closes #773) 2018-04-03 22:16:03 +02:00
Ethan Buchman 8170d878b8 remove --testnet flag. just output all info on init 2018-04-01 02:57:47 +03:00
Christopher Goes 27d24610ab basecoind init --testnet (closes #718) 2018-03-29 12:04:52 +02:00
Christopher Goes fef3e157c0 Capture & return data.ToJSON error 2018-03-28 11:41:55 +02:00
Christopher Goes 4371667673 Add show_validator command (ref #704) 2018-03-28 11:41:55 +02:00
Christopher Goes 3126afd12b
Add show_node_id command (closes #704) 2018-03-26 20:13:46 +02:00
Adrian Brink 75674a9ec3
Implement Simple Staking as a module
The simple staking module allows validators to bond and add more stake
to their bond. It doesn't allow partial unbond and has no delegation.
The staking power per validator though is correctly reflected within the
consensus.
2018-03-20 12:14:35 +01:00
mossid df3a7095f0 modify server/start_test.go and Makefile to pass ci 2018-03-19 13:29:32 +01:00
Ethan Buchman 64852138b6 fix the tests. includes some hacks 2018-03-18 02:02:26 +01:00
Ethan Buchman 7f3a6e0c04 Options -> AppState 2018-03-17 23:10:44 +01:00
Ethan Buchman 683663f680 fixes post rebase 2018-03-17 23:09:04 +01:00
rigelrozanski 1778a27082 more of the go-bash stuff for REST 2018-03-17 22:14:19 +01:00
rigelrozanski f8a34094bf test_helper.go 2018-03-17 22:14:19 +01:00
rigelrozanski 11fdd831ee refactoring server new non-deterministic error :( 2018-03-17 22:14:19 +01:00
Ethan Buchman 62d6a5de46 crypto.Address -> sdk.Address 2018-03-02 02:49:07 -05:00
rigelrozanski 65f27f2daa basecli refactor 2018-03-01 02:36:57 +00:00
Ethan Frey 7848ee23db Addressed pr comments 2018-03-01 02:36:08 +00:00
Ethan Frey 34772f8b6e Unit test initialization bug 2018-03-01 02:36:08 +00:00
Ethan Frey d694dbe7c1 Add first server command tests 2018-03-01 02:36:08 +00:00
Ethan Frey 1f31fbeea8 Start writing test scaffold to test server 2018-03-01 02:34:05 +00:00
Ethan Frey 603c358574 Fix up server app_options initialization 2018-03-01 02:31:17 +00:00
Ethan Frey 94ddda6a1f Copy init code from tendermint so it runs properly 2018-03-01 02:31:17 +00:00
Ethan Frey 4e91a0db89 Add cli to basecoind, fix compatability issues 2018-03-01 02:31:17 +00:00
Ethan Frey c0f9a6f1cb Update dependencies to import tendermint 2018-03-01 02:30:14 +00:00
Ethan Frey 09e07bb44a Extracted initialization logic into server, default option generation in gaia 2018-03-01 02:30:14 +00:00
Ethan Frey 438d18e059 Pulled most of gaiad into server, with rough implementation 2018-03-01 02:30:13 +00:00
Ethan Buchman e45ad068fb move things to _attic 2018-01-06 15:35:22 -05:00
Ethan Frey 850796bad5 eyes example compiles - but doesnt work 2017-10-25 19:56:48 +02:00
Ethan Frey 7631680159 Cleanup names in genesis package 2017-10-20 13:42:03 +02:00
Ethan Frey 6305399baf Pulled genesis file parsing into own package, for clarity 2017-10-20 13:42:03 +02:00
Ethan Frey f65215ad92 Big cleanup of app dir
StoreApp just the queries, BaseApp with handler/ticker
Ticker now defined top level, as an interface, with context
Name for info taken as parameter, start cmd uses commandline name
Cleaner compisition of apps.
2017-10-20 13:42:03 +02:00
Ethan Frey 3a16fa9482 Clean up genesis handling 2017-10-20 13:42:03 +02:00
Ethan Frey c1d36eeb21 Fixed all tests 2017-10-20 13:42:03 +02:00
rigelrozanski f71c83305d GetInitCmd takes app options 2017-10-11 23:29:32 -04:00
rigelrozanski 1613da91ca genesis account coin denom flag 2017-10-11 14:06:57 -04:00
rigelrozanski 40c79a65b3 strings -> mycoin (cointype change) 2017-10-11 13:24:49 -04:00
rigelrozanski d3b4d42458 integrated init --static, fix tests 2017-10-10 03:13:02 -04:00
rigelrozanski 5a7566a81a init creates random priv_validator 2017-10-10 01:50:10 -04:00
rigelrozanski 1cbb4094b1 simplify tick start command 2017-10-09 05:18:40 -04:00
rigelrozanski 2ea45d8ec2 mycoin -> strings 2017-10-09 01:14:16 -04:00
rigelrozanski c04200ceeb start tick command choose command name 2017-10-06 15:43:15 -04:00
rigelrozanski 0e703d3f9e Tick StartCmd now adds flags properly 2017-10-05 15:09:12 -04:00
rigelrozanski 6eb884017b proper integration of tick functionality 2017-10-03 19:01:02 -04:00
Ethan Buchman 1f151d1232 update for tendermint 0.11 2017-10-02 14:40:42 -04:00
Ethan Frey 2951763660 Moved merkleeyes->iavl and updated references 2017-09-08 20:47:46 +02:00
rigelrozanski 4ac089f084 json testing, addressed init option PR comments 2017-09-06 01:19:20 -04:00
rigelrozanski 748a1e97e4 init --option can now use json 2017-09-06 01:19:20 -04:00
rigelrozanski eae60cedee added sep string var properly 2017-09-06 01:19:20 -04:00
Rigel Rozanski bfd4ce96bb added init option flag and tests 2017-09-06 01:19:20 -04:00
Ethan Frey 2887d0d288 Cleaned up root command to be less basecoin-specific 2017-09-04 16:50:09 +02:00
Ethan Frey ec6843928e Moved basecoin server commands out of examples dir to share them 2017-09-04 16:50:09 +02:00