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
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
Federico Kunze
82c9ae3949
LGTM alerts audit ( #7440 )
...
* LGTM alerts audit
* Update x/simulation/mock_tendermint.go
Co-authored-by: Alessio Treglia <alessio@tendermint.com>
* Update x/staking/keeper/delegation.go
Co-authored-by: Alessio Treglia <alessio@tendermint.com>
* comment false positive
Co-authored-by: Alessio Treglia <alessio@tendermint.com>
2020-10-02 15:13:58 +02:00
Marie Gauthier
91ca8ad3c1
Migrate BaseAccount PubKey to use Any ( #7268 )
...
* WIP on BaseAccount protobuf pub_key
* WIP on BaseAccount.PubKey
* WIP on BaseAccount pub key
* Update PubKey
* Update Account
* Docs
* WIP on protobuf keys
* Use Type() and Bytes() in sr25519 pub key Equals
* Add tests
* Add few more tests
* Update other pub/priv key types Equals
* Fix PrivKey's Sign method
* Rename variables in tests
* Fix infinite recursive calls
* Use tm ed25519 keys
* Add Sign and VerifySignature tests
* Remove ed25519 and sr25519 references
* proto linting
* Add proto crypto file
* Implement some of the new multisig proto type methods
* Add tests for MultisigThresholdPubKey
* Add tests for pubkey pb/amino conversion functions
* Move crypto types.go and register new proto pubkeys
* Add missing pointer ref
* Address review comments
* panic in MultisigThresholdPubKey VerifySignature
* Fix compile errors
* Remove pk conversion in ante handler
* Use internal crypto.PubKey in multisig
* Add tests for MultisigThresholdPubKey VerifyMultisignature
* Only keep LegacyAminoMultisigThresholdPubKey and move to proto keys to v1
* Remove conversion functions and introduce internal PubKey type
* Override Amino marshaling for proto pubkeys
* Merge master
* Make proto-gen
* Start removal of old PubKeyMultisigThreshold references
* Fix tests
* Fix solomachine
* Fix ante handler tests
* Pull latest go-amino
* Remove ed25519
* Remove old secp256k1 PubKey and PrivKey
* Uncomment test case
* Fix linting issues
* More linting
* Revert tests keys values
* Add Amino overrides to proto keys
* Add pubkey test
* Fix tests
* Use threshold isntead of K
* Standardize Type
* Revert standardize types commit
* Fix build
* Fix lint
* Fix lint
* Add comment
* Register crypto.PubKey
* Add empty key in BuildSimTx
* Simplify proto names
* Unpack interfaces for signing desc
* Fix IBC tests?
* Format proto
* Use secp256k1 in ibc
* Fixed merge issues
* Uncomment tests
* Update x/ibc/testing/solomachine.go
* UnpackInterfaces for solomachine types
* Remove old multisig
* Add amino marshal for multisig
* Fix lint
* Correctly register amino
* One test left!
* Remove old struct
* Fix test
* Fix test
* Unpack into tmcrypto
* Remove old threshold pubkey tests
* Fix register amino
* Fix lint
* Use sdk crypto PubKey in multisig UnpackInterfaces
* Potential fix?
* Register LegacyAminoPubKey
* Register our own PubKey
* Register tmcrypto PubKey
* Register both PubKeys
* Register interfaces in test
* Refactor fiels
* Add comments
* Remove old cosmos-sdk/crypto/keys reference
* Use anil's suggestion
* Add norace back
* Use our own ed25519
* Fix pubkey types
* Fix network tests
* Fix more tests
* Make ibc work?
* Use TM pubkey in NewValidator
* Fix lint
* Put interface in tpyes
* rerun CI
* Better name register
* Remove stray code
* Add ed25519 tests
* Check nil
* Correct interface impl assert
* rerun CI
* Add fix for Bech32
* Address comments
* FIx lint
* Add tests for solomachine unpack interfaces
* Fix query tx by hash
* Better name in amino register
* Fix lint
* Add back ed25519 test (fixes #7352 )
* go mod tidy
* Fix merge issues
* Sort import
* Add test for backwards-compatibility
* Fix tests
* Fix merge issue
* Update client/context.go
Co-authored-by: Cory <cjlevinson@gmail.com>
* Update types/address.go
Co-authored-by: Cory <cjlevinson@gmail.com>
* Address feedback
* Add comment
* Fix BaseAccount SetPubKey and address further comments
* Lint
* Remove unnecessary use of copy in getPubKeyFromString
* Update comment
Co-authored-by: Aaron Craelius <aaronc@users.noreply.github.com>
Co-authored-by: Aaron Craelius <aaron@regen.network>
Co-authored-by: Amaury Martiny <amaury.martiny@protonmail.com>
Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com>
Co-authored-by: Cory <cjlevinson@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-09-25 08:41:16 +00:00
Marie
7f59723d88
Make JSONMarshaler methods require proto.Message ( #7054 )
...
* Make JSONMarshaler require proto.Message
* Use &msg with MarshalJSON
* Use *LegacyAmino in queriers instead of JSONMarshaler
* Revert ABCIMessageLogs String() and coins tests
* Use LegacyAmino in client/debug and fix subspace tests
* Use LegacyAmino in all legacy queriers and adapt simulation
* Make AminoCodec implement Marshaler and some godoc fixes
* Test fixes
* Remove unrelevant comment
* Use TxConfig.TxJSONEncoder
* Use encoding/json in genutil cli migrate/validate genesis cmds
* Address simulation related comments
* Use JSONMarshaler in cli tests
* Use proto.Message as respType in cli tests
* Use tmjson for tm GenesisDoc
* Update types/module/simulation.go
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
* Update types/module/module_test.go
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
* Add godoc comments
* Remove unused InsertKeyJSON
* Fix tests
Co-authored-by: Aaron Craelius <aaronc@users.noreply.github.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-08-26 09:39:38 +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
869531ca92
Merge PR #5495 : Replace Redundant Bech32 PubKey Functions
2020-01-09 09:04:28 -05:00
Marko
92d2dbe3ff
Merge PR #5244 : Add debug commands
2019-11-11 09:54:32 -05:00