Commit Graph

6 Commits

Author SHA1 Message Date
Robert Zaremba be4a965599
codec: Rename codec and marshaler interfaces (#9226)
* codec: Rename codec and marshaler interfaces, ref: 8413

* codec: remove BinaryBare

* changelog update

* Update comments and documentation

* adding doc string comments

* Update CHANGELOG.md

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

* Update codec/codec.go

Co-authored-by: Marko <marbar3778@yahoo.com>

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Amaury <1293565+amaurym@users.noreply.github.com>
Co-authored-by: Marko <marbar3778@yahoo.com>
2021-04-29 10:46: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
Marie 320a852ee2
PubKey proto types (#7147)
* 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

* 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

* 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

* Add comment

* Simplify proto names

* Add comment about multisig codec

Co-authored-by: Aaron Craelius <aaronc@users.noreply.github.com>
Co-authored-by: Amaury Martiny <amaury.martiny@protonmail.com>
Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-09-16 11:08:55 +00:00
SaReN 23a9f46aad
Update tm pubkey references (#7102)
* Update pubkey references

* Update ledger_mock

* Migrate encoding from tm

* Update pubkey prefix

* revert ed25519 to tendermint key

* random account revert

* Revert ed25519 references

* revert secp key name

* test revert

* remove ed25519

* Update x/staking/types/validator.go

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

* Revert "remove ed25519"

This reverts commit 66d2e1d061aeae81c4c0a3daf718536b09dda19e.

* remove ed25519 & sr25519

* Apply suggestions from code review

* remove codec

Co-authored-by: Marko Baricevic <marbar3778@yahoo.com>
Co-authored-by: Amaury Martiny <amaury.martiny@protonmail.com>
2020-08-28 16:02: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
Alessio Treglia e0a81d2cca
crypto: move ledger code to its own subfolder (#6817)
crypto -> crypto/ledger:
- crypto.LedgerShowAddress -> ledger.ShowAddress
- crypto.NewPrivKeyLedgerSecp256k1 - > ledger.NewPrivKeySecp256k1
- crypto.NewPrivKeyLedgerSecp256k1Unsafe -> ledger.NewPrivKeySecp256k1Unsafe

Closes: #6780
2020-07-22 18:51:12 +02:00