Commit Graph

45 Commits

Author SHA1 Message Date
Robert Zaremba 7bca49e2d2
refactor(client): add client/Context.Codec and deprecate JSONCodec (#9498)
* chore(types): add sdk.Context.Codec and deprecate JSONCodec

* Use clientContext.Codec rather than JSONCodec everywhere

* update tests to use clientContext.Codec

* added a note that EncodingConfig.Marshaler will be renamed to Codec

* update changelog

* fix tests to use clientCtx.WithCodec instead of WithJSONCodec

* fix genutil build

* Update simapp/params/encoding.go

Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>

Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>
2021-06-11 11:49:39 +00:00
Amaury d19791be89
Rename clientCtx.JSONMarshaler to JSONCodec (#9251)
* Rename clientCtx.JSONMarshaler to JSONCodec

* change md files

* Fix lint
2021-05-03 14:45:47 +00:00
Robert Zaremba 7568b6680a
Remove bech32 PubKey support (#7477)
* Move PubKey bech32 to legacy package and migrate the usage where possible

* update /server

* wip

* move proto json encoding helper functions to internal

* update internal/marshal

* wip

* update sections which needs legacybech32

* update validators output

* fix conflicts

* slashing update

* add more tests and helper function for ANY JSON serialization

* update slashing

* Update function documentation

* Rename code any-marshal helper functions

* Update pubkey unpacking test

* Update test comments

* solve TestDecodeStore

* solve legacytx issues

* all code compiles

* keyring tests

* keyring cleanup

* remove AssertMsg

* fix some tests

* fix add_ledger_test.go

* update cli tests

* debug cli test

* rename clashed bech32 names

* linter fixes

* update tmservice tests

* linter: update legacy deprecated checks

* fix names

* linting

* legacybech32 pubkey type rename

* fix staking client

* fix test compilation

* fix TestGetCmdQuerySigningInfo

* rename NewIfcJSONAnyMarshaler

* keyring: remove duplicated information from multinfo structure

* todo cleanups

* Update Changelog

* remove some legacybech32 from tests

* remove todos

* remove printlnJSON from /server CLI and amino encoding

* remove protocdc.MarshalJSON

* client/show remove duplicated function

* remove protocdc package

* comment update

* remove legacybech32.MustMarshalPubKey from a test

* add todo

* fix TestPublicKeyUnsafe test

* review update

* fix bech32 UnmarshalPubKey

* Use codec.MarshalIfcJSON

* fix linter issues

* merging conflict: fix codec.Unmarshal calls

* cleanups

* Update CHANGELOG.md

Co-authored-by: Aaron Craelius <aaron@regen.network>

* Reword changelog updates

* use pubkey.String for comparison in Test_runAddCmdLedgerWithCustomCoinType

* Update GetCmdQuerySigningInfo example

* cli: update keys add docs

* Add errors AsOf and errors.ErrIO type

* restore multisigPubKeyInfo structure bring it back to multiInfo struct

* Update codec/proto_codec.go

Co-authored-by: Marie Gauthier <marie.gauthier63@gmail.com>

* Update crypto/keys/ed25519/ed25519_test.go

Co-authored-by: Marie Gauthier <marie.gauthier63@gmail.com>

* Update codec/proto_codec.go

Co-authored-by: Marie Gauthier <marie.gauthier63@gmail.com>

* move pubkey any marshaling tests

* Apply suggestions from code review

Co-authored-by: Marie Gauthier <marie.gauthier63@gmail.com>

* review updates

* adding missing return

* errors: use IsOf instead of AsOf

* keyring: add a correct check for key not found in keyring.Get

* add checkKeyNotFound

* fix linter issues

* fix: keyring key not found check

* fix keyring tests

* fix linting issues

* cli tests

* fix: 'simd keys show <key> -p'

* fix: TestVerifyMultisignature

* rename keyring Bech32... functions to Mk...

* fix RunAddCmd

* Update pubkey display

* wip

* add more tests

* udate keyring output tests

* remove todo from ledger tests

* rename MkKeyOutput

* Changelog update

* solve liner issues

* add link to github issue

Co-authored-by: Aaron Craelius <aaron@regen.network>
Co-authored-by: Marie Gauthier <marie.gauthier63@gmail.com>
2021-03-25 14:53:22 +00:00
Michael FIG ce161c4f0c
fix: tendermint subcommands should not create missing files (#8481)
If the user specifies an incorrect `--home`, then the old behaviour
would automatically populate it with fresh values, but we should
fail instead.
2021-02-02 16:57:58 +00:00
Marie Gauthier 90e9370bd8
Replace tmcrypto.PubKey by our own cryptotypes.PubKey (#7419)
* WIP on removing tm pub/privkey

* Fix part of crypto tests

* Add PrivKeyLedgerSecp256K1 proto type

* Use BasePrivKey for ledger priv key type

* Refacto continued

* First round

* x/staking

* Continue porting

* x/* done

* Make build pass

* More conversion

* Remove IntoTmPubKey

* Fix test

* Remove crypto.PubKey in some other places

* Revert ledger changes

* Fix comment

* Remove useless function

* Add To/FromTmPublicKey

* Add migrate tests

* Fix test

* Fix another test

* Rename tm conversion functions

* Less code

* Rename BasePrivKey to LedgerPrivKey

* Add changelog

* Rename functions

Co-authored-by: Amaury Martiny <amaury.martiny@protonmail.com>
Co-authored-by: Alessio Treglia <alessio@tendermint.com>
2020-11-09 16:01:43 +00:00
Cory 56c08d1117
Bump to tendermint v0.34-rc6 (#7828)
* bump to tendermint v0.34-rc6

* update go.mod

* tendermint version is now accessible as tmversion.TMCoreSemVer

* add changelog entry

Co-authored-by: Amaury Martiny <amaury.martiny@protonmail.com>
2020-11-06 10:13:52 +00:00
Neeraj Murarka 61d5844705
Corrected 'unsafe-reset-all' help text (#7504) 2020-10-10 13:02:12 +02:00
Anil Kumar Kammari 64b6bb5270
rename RegisterCodec to RegisterLegacyAminoCodec (#7243)
* rename RegisterCodec to RegisterLegacyAminoCodec

* Add changelog

* gofmt

* rename codec.New() to codec.NewLegacyAmino()

* Add change log

* Update CHANGELOG.md

Co-authored-by: Amaury Martiny <amaury.martiny@protonmail.com>

* Fix

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Amaury Martiny <amaury.martiny@protonmail.com>
2020-09-07 14:47:12 +00:00
Marko 8de96d16f9
tendermint: update to rc3 (#6892)
* modify light imports

* change abci.header to tmproto.header

* use rc

* rc

* fix import

* Merge PR #6893: fix key imports

* fix rc2

* tendermint: update 3 (#6899)

* tendermint: update 4 (#6919)

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>

* tendermint: update 5 (#6923)

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>

* bump to latest master

* tendermint: update (#6972)

Co-authored-by: Aleksandr Bezobchuk <aleks.bezobchuk@gmail.com>
Co-authored-by: Cory Levinson <cjlevinson@gmail.com>

* Update x/ibc/07-tendermint/types/test_utils.go

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>

* address comment

* go mod

* bring back things

* fix test

* update tm proto files

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Aleksandr Bezobchuk <aleks.bezobchuk@gmail.com>
Co-authored-by: Cory Levinson <cjlevinson@gmail.com>
Co-authored-by: Federico Kunze <federico.kunze94@gmail.com>
2020-08-14 13:58:53 -04:00
Alexander Bezobchuk 8670a10564
Merge PR #6595: Single Binary & Command Refactor 2020-07-07 11:40:46 -04:00
Alexander Bezobchuk 9ebda4edb9
Server/simd: Viper Removal (#6599)
* init commit

* remove viper from tm cmds

* updates

* Undo x/bank/client/cli/tx.go

* Fix unit tests

* lint++

* rename var

* Fix genutil test

* fix test

* prefer cmd.Flags() over direct viper usage

* update

* fix ABCI error tests

* fix integration tests

* Add viper to context

* fix build

* fix unit test

* Implement and use AppOptions

* Revert Redact godoc

Co-authored-by: Alessio Treglia <alessio@tendermint.com>
2020-07-05 16:56:17 +00:00
Aaron Craelius 81d647e505
Move codec.RegisterCrypto and codec.Cdc to new packages (#6330)
* Move codec.Cdc to legacy_global.Cdc

* Update CHANGELOG.md

* Updates

* nit

* Fix imports

* Updates

* Use cosmos multisig instead of tendermint multisig everywhere

* Fix tests

* Rename legacy_global -> legacy

* Add doc.go

* Linting, move all RegisterCrypto calls to crypto/codec

* Update crypto/codec/amino.go

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-06-04 10:38:24 +00:00
Anton Kaliaev f0b72b93be
server: remove deprecated UpgradeOldPrivValFile (#6079)
* server: remove deprecated UpgradeOldPrivValFile

OldFilePV was deprecated in Tendermint Core v0.28 and will be removed in
upcoming v0.34.5 release.

* remove imports

* Add changelog entries

Co-authored-by: Aleksandr Bezobchuk <aleks.bezobchuk@gmail.com>
Co-authored-by: Alessio Treglia <alessio@tendermint.com>
2020-04-27 16:08:44 +00:00
Alexander Bezobchuk 72a2dae3db
Bump Tendermint v0.33.4 (#6055)
* Bump go.{mod,sum}

* Update APIs from Tendermint

* Add max clock drift to client state

* Test updates

* Update APIs from Tendermint

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-04-22 19:21:48 +00:00
Alexander Bezobchuk 869531ca92
Merge PR #5495: Replace Redundant Bech32 PubKey Functions 2020-01-09 09:04:28 -05:00
Federico Kunze e85a734a57 update x/genaccounts to match module spec (#4759) 2019-07-22 16:26:42 +01:00
Alessio Treglia e9810ac25c Merge PR #4433: Adopt YAML as human-readable text output 2019-05-31 09:14:34 -04:00
Alessio Treglia e7e3c32204 Merge PR #3553: Code cleanup, take #1
* add a bunch of tests, add DONTCOVER text tag

- Also fix flaky test (closes: #3559). Don't test values
  returned by queries since there's no way to query a
  specific height via REST.

* GetTempDir -> NewTestCaseDir
2019-02-08 22:45:41 +01:00
Alessio Treglia 493bbaa537 Merge PR #3360: Remove --json flag from all commands
* remove --json flag from all commands and CLIContext

gaiad tendermint show-{address,validator} now take --machine-parseable/-m
for machine parseable output.

Closes: #3249

* Revert machine-parseable thing
2019-01-24 11:15:44 +01:00
Alessio Treglia 145fe81544 Include Block and P2P protocols versions 2019-01-14 13:38:52 +00:00
Alessio Treglia ee9dd2250d Add tendermint version command 2019-01-12 13:52:12 +00:00
Alessio Treglia df567616a9 Upgrade tendermint to 0.28.0-dev0 (#3279) 2019-01-11 09:19:01 -08:00
Alessio Treglia 24a1670cf0 Run make format 2018-12-10 14:27:25 +00:00
Alexander Bezobchuk 811b863677 Use correct Bech32 prefix for show-address command (#2746)
* Use consensus address bech32 prefix
* Update show-address CLI description
2018-11-11 23:34:50 -08:00
Dev Ojha 6b55093c75 Merge PR #2324: rename wire to codec
* rename wire to codec

* fix formatting and cli

* fix the docs
2018-09-13 14:17:32 -04:00
Christopher Goes 1204857694 Merge PR #2122: Implement slashing period
* Update PENDING.md

* SlashingPeriod struct

* Seperate keys.go, constant prefixes

* Make linter happy

* Update Gopkg.lock

* Seek slashing period by infraction height

* Slashing period hooks

* Slashing period unit tests; bugfix

* Add simple hook tests

* Add sdk.ValidatorHooks interface

* No-op hooks

* Real hooks

* Fix iteration direction & duplicate key, update Gaia

* Correctly simulate past validator set signatures

* Tiny rename

* Update dep; 'make format'

* Add quick slashing period functionality test

* Additional unit tests

* Use current validators when selected

* Panic in the right place

* Address @rigelrozanski comments

* Fix linter errors

* Address @melekes suggestion

* Rename hook

* Update for new bech32 types

* 'make format'
2018-08-31 20:01:23 -04:00
Alexander Bezobchuk 2d92803b9f Merge PR #2040: Refactor Validator Account Types/Bech32 Prefixing
* Add new account bech32 prefixes with godocs

* Restructure spacing of existing account code

* Update account godocs

* More account godoc updates + new tm pub/addr helpers

* Update validator type to use new account types/bech32 prefixes

* Fix account documentation errors

* Update Bech32 prefix for consensus nodes

* Update Bech32 spec doc

* Fix account type tests

* Add missing account consensus functions, clear up godocs, and fix tests

* Add to TestRandBech32PubkeyConsistency check

* Update initialization of validator public keys

* Update query signing info command

* Implement new ConsAddress type with associated unit tests

* [WIP] Update stake and slashing parameters

* Update all calls to MustBech32ifyValPub

* [WIP] Validator operator API updates

* [WIP] Fix and update unit tests

* Fix gov logs (helping to debug failing tests)

* Fix gov tally

* Fix all broken x/ unit tests

* Update gaia app genesis address logic

* Fix linting errors

* Fix broken LCD tests

* Fix broken CLI tests

* Implement command to get validator address and pubkey from key name

* Add support for getting validator key information via REST endpoint

* Update PENDING log

* Update docs

* Revert GaiaGenTx.PubKey bech32 prefix

* Fix broken docs and cli tests

* Update genesis to use correct Bech32 (cons) prefix for pubkeys

* Update docs and unit tests to reflect new cosmos account bech32 prefix

* minor formatting
2018-08-31 00:06:44 -04:00
Matthew Slipper dc0f13214d Merge PR #2170: Add show-address command
* Add show-address command

Closes #1274.

* Add PENDING entry

* Add godoc

* Updates from code review
2018-08-30 21:38:28 -04:00
Matthew Slipper 0c0d282a0c Add plaintext flags to show keys; default print response to true; helptext updates
Closes #1970
Closes #1971
Closes #1967
Closes #1969
2018-08-21 15:36:53 -07:00
Matthew Slipper 8fa2c3b4ea Merge PR #1984: Replace _ with - in command names
Closes #1955
2018-08-14 10:23:42 +02:00
Ethan Buchman 1e6d26ad3d fix tmcmd.ResetAll properly 2018-06-29 17:52:00 -04:00
Ethan Buchman 300a360714 fix tmcmd.ResetAll 2018-06-25 16:45:27 -04:00
Ethan Buchman 2913d14239 Merge branch 'master' into develop 2018-06-08 19:31:48 -07:00
Ethan Buchman f3f2729b11 update for tm v0.19.9 2018-06-05 18:04:16 -07:00
Zaki Manian ce850dca3b Switch from bech32cosmos to bech32 2018-06-01 16:23:58 +02: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
rigelrozanski 05c5809bae gaia init automatic key processing 2018-04-26 14:26:39 -04:00
rigelrozanski 246e4bdac3 renames 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
Jae Kwon 49fdf80d9d WIP commit 2018-04-06 17:25:08 -07:00
Ethan Buchman 9fbbdbbe0f server: consolidate files 2018-04-05 13:31:33 +03:00