Commit Graph

62 Commits

Author SHA1 Message Date
Anil Kumar Kammari 4a233b8dcf
Rename GRPCRouter (#8079)
* rename GRPCRouter

* Update store/types/store.go

Co-authored-by: Robert Zaremba <robert@zaremba.ch>

* Fix gofmt

Co-authored-by: Robert Zaremba <robert@zaremba.ch>
2020-12-04 15:06:50 +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
Aaron Craelius 4a1b2fba43
Add Fee granter field (#7418)
* WIP on adding Fee granter field

* WIP on adding Fee granter field

* WIP on adding Fee granter field

* Update comments, add tests
2020-10-05 21:56:09 +00:00
Alexander Bezobchuk 9ae17669d6
Tx Height Timeout (#6089)
* Implement TxHeightTimeoutDecorator

* Update error message

* rename type

* set height timeout

* update tests

* update *SignDoc)

* rename

* remove dup

* fix build

* cli updates

* rest updates

* cl++

* Update x/auth/ante/basic.go

Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com>

* Update x/auth/ante/basic.go

Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com>

* Update x/auth/ante/basic.go

Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com>

* Update x/auth/ante/basic.go

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

* rename

* rename

* remove TimeoutHeight from SignDoc

* updates

* fix tests

* update IBC cmd flags

* use omitempty

* update godoc

* add test case to TestStdSignBytes

Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-08-07 23:32:22 +00:00
Aaron Craelius 2f44fbf2ab
Add support for protobuf TxGenerator and SIGN_MODE_DIRECT (#6385)
* Add TxWrapper, encoder, decoder and DirectModeHandler

* fix pkg name

* Update API and leave test TODO's

* Update TxWrapper API

* tests for tx wrapper (#6410)

* WIP: added test for direct mode handler

* updated code

* Add msg

* Update TxWrapper API

* Fix pubkey declaration

* Add pubkey for tests

* Fix SetFee

* Remove logs

* Avoid global var declaration for tests

* Add test for GetPubKeys

* Fix direct signing tests

* Add more test cases for GetSignBytes

* Revert SetFee API

* Remove logs

* Refactor tests

Co-authored-by: anilCSE <anil@vitwit.com>
Co-authored-by: sahith-narahari <sahithnarahari@gmail.com>

* Refactoring

* Refactoring

* Integrate SignatureV2 API

* Fix wrapper tests

* Fix tests

* Linting and API tweaks

* Update API

* WIP on updating API

* Fix tests

* Update to new SigVerifiableTx

* Rename

* Update docs to reflect ADR 020

* proto-gen

* proto docs

* cleanup

* cleanup

* cleanup

* cleanup

* cleanup

* cleanup

* cleanup

* Add tests

* Refactor and improving test coverage

* WIP on test coverage

* WIP on test coverage

* proto-gen

* Fix CompactBitArray.Size() bug

* Rename

* Remove Builder interface

* Address review comments

* Update x/auth/tx/sigs.go

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

* Update x/auth/tx/encoder.go

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

* Update x/auth/tx/encoder.go

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

* Address review feedback

* Fix build issues

* Resolve conflicts

* Fix ValidateBasic test coverage

* Add test for malicious multisig

Co-authored-by: atheeshp <59333759+atheeshp@users.noreply.github.com>
Co-authored-by: anilCSE <anil@vitwit.com>
Co-authored-by: sahith-narahari <sahithnarahari@gmail.com>
Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-07-06 17:03:45 +00:00
Aaron Craelius c13809062a
Update TxBuilder to use SignatureV2 (#6443)
* Update TxBuilder to use SignatureV2

* Fix unit tests

* Lint

* lint

* Cleanup

* Address review feedback

* Add Sign tests

* Add more cases for sign tests

* Fix lint

* Fix gofmt

* Deprecate StdTx

* Undeprecate StdTx, but leave a comment to use the protobuf Tx

* Address review comment

Co-authored-by: anilCSE <anil@vitwit.com>
2020-06-16 19:57:37 +00:00
Aaron Craelius 2e11c81668
Make sdk.Msg implement proto.Message (#6327)
* Make sdk.Msg implement proto.Message

* Cleaning up

* Cleaning up

* Update CHANGELOG.md

* Lint fixes

* Lint fixes

* fix tests

Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
2020-06-03 19:52:05 +00:00
Marko bef3689245
linter: enable nolintlint (#6162)
* nolintlint enable

* remove space

* fix tests

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-05-08 08:46:12 +00:00
Aleksandr Bezobchuk 217cae2021
DRY code 2020-03-13 09:57:15 -04:00
Aleksandr Bezobchuk b38d3ae69a
Update ADR and types 2020-03-12 15:35:22 -04:00
Alexander Bezobchuk 9a183ffbcc
Merge PR #5421: Refactor Error Handling 2019-12-27 12:57:54 -05:00
Alexander Bezobchuk dc84c99dee Revert "Generalize auth/types.StdSignature (#4507)" (#4512)
This reverts commit a32d5a46d7.
2019-06-08 11:04:52 +01:00
Alessio Treglia a32d5a46d7
Generalize auth/types.StdSignature (#4507)
New Signature interface available in the top level types package.
auth.StdSignature implements such interface. User defined auth
module can now define their own custom signature types.

Work carried out in the context of the following issues:
- #4488
- #4487
2019-06-07 14:21:35 +01:00
Artur Albov 0c6d53dc07 Merge PR #2959: Add TxEncoder to client TxBuilder 2018-12-12 22:29:42 +01:00
Alexander Bezobchuk 1ea0e4c457 Merge PR #2863: Transaction ValidateBasic
* Add ValidateBasic to Tx interface
* Update BaseApp unit tests
* Add missing return in ValidateBasic
* Update ValidateBasic to use IsNotNegative
* Add pending log entry
* Add unit test TestTxValidateBasic
* Fix broken lint regression
* Add sig count check to validation
* Add test case to TestTxValidateBasic
2018-11-21 11:16:56 +01:00
Sunny Aggarwal d666658ca9 Merge PR #2553: Renamed msg.Name() and msg.Type() to msg.Type() and msg.Route() 2018-10-23 21:23:55 +02:00
Dev Ojha 65137f6331 Merge PR #2343: Add a name field to the message type
This is to facillitate ease of implementing #1406. (Tags for messages
could then be added dynamically)

Ultimately once we make the router support hiearchical routing, (#770)
we can then remove the name field and just the parse info for tags from that.

Until then, we can parse the tag name as
`fmt.Sprintf("%s %s", msg.Type(), msg.Name())`
2018-09-17 22:34:06 +08:00
sunnya97 7ac220beb6 asdf 2018-07-09 00:59:51 -07: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
Ethan Buchman e8946e9b36 fixes from review 2018-06-28 19:06:37 -04:00
Dev Ojha 893bb4027d Merge PR #1377: types: remove GetMemo from Tx
This method is an unneccessary requirement on Tx. Auth casts the Tx
to StdTx, so the memo can be obtained in previous usecases from
StdTx. This also makes it more clear for when something is
implementing StdTx vs Tx.

Resolves #1375
2018-06-26 04:37:21 +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
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
Matt Bell 5c1a7694e5 Merge branch 'develop' into matt/stake-rest 2018-05-27 16:02:33 +09:00
Matt Bell efd1a3ac44 Typo fix 2018-05-25 09:32:12 +09:00
sunnya97 cb52712660 in progress 2018-05-23 19:49:35 -07:00
Rigel 64f445ed22
Merge pull request #985 from LLLeon/master
modify bad syntax for struct tag value
2018-05-14 10:29:11 -04:00
LLLeon 5da41a6c88 types: modify bad syntax for struct tag value 2018-05-13 17:34:56 +08:00
Christopher Goes a6589949fb
Remove unnecessary code 2018-05-01 00:19:28 +02:00
Sunny Aggarwal af0e71fa0d
got rid of Get on Msg interface 2018-05-01 00:15:15 +02:00
rigelrozanski db0a275b23 rational to Exposed Fields 2018-03-28 19:01:50 +02:00
rigelrozanski dc8636390c refactor, staking uses addresses instead of pubkey
staking refactoring working

working
2018-03-28 19:01:50 +02:00
Ethan Buchman e4b8010077 ParseAccount -> AccountDecoder 2018-03-21 02:22:15 +01:00
Ethan Buchman 64852138b6 fix the tests. includes some hacks 2018-03-18 02:02:26 +01:00
Ethan Buchman 683663f680 fixes post rebase 2018-03-17 23:09:04 +01:00
Ethan Buchman 7c3213fa00 fixes from review 2018-03-17 22:08:19 +01:00
Ethan Buchman 3babf8c2d9 fix and clean fees and x/auth 2018-03-17 19:54:18 +01:00
Ethan Buchman 45f8ccbe90 x/auth: cleanup ante handler 2018-03-17 18:34:06 +01:00
Ethan Buchman be7cb6c96c types: introduce StdFee 2018-03-17 18:34:06 +01:00
Ethan Buchman eb23803833 remove tx.GetFeePayer 2018-03-17 18:34:06 +01:00
Ethan Buchman 2336a20f5a fix cli to sign StdSignDoc. fixes #620 2018-03-14 13:11:19 +01:00
Ethan Buchman 661d0fd7e8 types: StdSignDoc includes sequence for each sig 2018-03-13 01:42:13 +01:00
Ethan Buchman a05ea5fcc9 implement replay protection 2018-03-13 01:42:13 +01:00
Ethan Buchman b906c141bd x/bank: remove Sequence from Input 2018-03-13 01:42:13 +01:00
rigelrozanski 6dec9353be working new cool module in basecoin 2018-03-04 17:21:37 +00:00
Ethan Buchman 62d6a5de46 crypto.Address -> sdk.Address 2018-03-02 02:49:07 -05:00
Ethan Frey c083678cae cleaned up basecli tx so it really works 2018-03-01 02:36:57 +00:00
Ethan Buchman c31f871de6 finish removing TestApp and TestTx 2018-02-17 16:32:30 -05:00
rigelrozanski da538a8bf6 more comments cleanup 2018-02-08 10:36:37 +00:00
Jae Kwon b95b67d520 Separation of Tx from Msg; CodeType 2018-01-26 06:54:03 -08:00