Emmanuel T Odeke
59cd0659a5
codec: remove unused and untest ProtoMarshalJSONIndent ( #6668 )
...
Noticed from coverage reports and from offline consultation
with Alexander and Aaron, that this function can be removed.
2020-07-10 14:33:35 +02:00
Emmanuel T Odeke
c9ec4be3a8
codec: add as much visible coverage ( #6670 )
...
As part of an audit, adds as much visible coverage from
73.4% to about 84.2%, but after #6668 is merged, we'll
have it about 88.X% and the coverage report seems to show
only missing cases of not common scenarios, e.g. a case that'll
make jsonpb.Marshaling to fail, and which will return an error
anyways.
2020-07-10 13:01:25 +02:00
Emmanuel T Odeke
2da1a63288
Merge PR #6667 : codec: remove unused, untested and expensive MarshalIndentFromJSON
2020-07-09 14:28:27 -04: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
849429ecda
Add proper support for Any in gRPC queries ( #6594 )
...
* Add proper gRPC Any support via AnyUnpacker
* Wire up grpc query router AnyUnpacker
2020-07-03 16:42:12 +00:00
Aaron Craelius
99ea4b759a
Fix testdata proto-gen ( #6568 )
2020-07-01 15:26:29 +00:00
Aaron Craelius
712d23740f
Migrate x/auth cmd's to TxGenerator marshaling ( #6391 )
...
* Migrate encode, decode, and broadcast cmd's to use TxGenerator marshal methods
* Fix tests, add EncodingConfig
* Add simapp/encoding.go and wire up with simcli
* add godocs
* fix tests
* Debugging CLI Tests
* Fix integration test
* 6391 - lint issues and code coverage (#6414 )
* fixed lint issue of "txEncodeRespStr"
* added tests for encode.go
* WIP: added tests for decode.go
* added txEncoder at bytes
* updated decode test
* updated txBytes to use TxEncoder in decoder test
* added a require after TxEncoder
* removed file save
* debug decode command
* fixed decode tests
* added decode cli
* updated encode and decode in a single file
* separated decode test from encode test
* review changes
* removed register interface
* review change
* Fix tests
* WIP add test for tx sign
* removed commented code
* Fix flags
* WIP add test for sign
* Address review suggestions
* fixed command issue
* Add tests for TxEncoder
* Revert sign changes
* Fix TxEncoder tests
* Fix GetSign Cmd
* Add tx test
* Remove duplicate validation
* Add tests for TxDecoder
* Fix tests
* Fix tests
* Output to clientCtx.Output
* Fix cli_tests
Co-authored-by: atheeshp <59333759+atheeshp@users.noreply.github.com>
Co-authored-by: atheesh <atheesh@vitwit.com>
Co-authored-by: anilCSE <anil@vitwit.com>
Co-authored-by: sahith-narahari <sahithnarahari@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-06-18 20:29:41 +00:00
Aaron Craelius
257354dbff
x/bank: convert query CLI commands to use gRPC query client ( #6367 )
...
* Convert x/bank query cli methods to use gRPC query client
* WIP on x/bank cli query migration
* lint
* Fix integration tests
* Remove Println in favor of updated PrintOutput
* Add PrintOutput tests
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-06-18 03:36:25 -04:00
Alexander Bezobchuk
7871910359
Simapp Localnet ( #6421 )
...
* Setup localnet
* Fix compose
* Fix file perms
* Fix build
* Codec + lint updates
* lint++
2020-06-12 16:23:08 +00:00
Marko
b618e0a827
add comments to why its nolint ( #6366 )
...
* add comments to why its nolint
* fix spelling
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-06-08 13:47:18 +00:00
Aaron Craelius
4e0a475751
Make client.Context implement gRPC ClientConn ( #6342 )
...
* Add QueryConn to client.Context
* Add integration test
* imports
* spelling
* Make client.Context implement grpc ClientConn
Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-06-08 13:41:30 +00:00
Aaron Craelius
1e6953ccdf
Fix proto3 JSON ( #6345 )
...
* Fix jsonpb
* linting
* cleanup
Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
2020-06-05 14:20:41 +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
Aaron Craelius
e94b6736ed
Merge PR #6325 : Add GRPCRouter
2020-06-03 09:33:51 -04:00
Aaron Craelius
70767c87c4
Update x/gov to use Any ( #6147 )
...
* Update x/gov to use Any
* Fixes
* Remove MsgSubmitProposalLegacy
* Update CHANGELOG.md
* Add RegisterInterfaces for x/distribution, x/params, & x/upgrade
* Fix query JSON issue
* Fix gov tests
* Revert custom Any Equals
* Re-remove types
* Rename receivers
* Fix imports in gov
* Sort imports
* Make amino JSON signing work with Any
* Run proto-gen
* Create full amino wrapper
* Fix errors
* Fixes
* Fix tests
* Test fixes
* Fix tests
* Linting
* Update ADR 019 and CHANGELOG
* Updated ADR 019
* Extract Marshal/UnmarshalProposal
* fix error
* lint
* linting
* linting
* Update client/keys/parse.go
Co-authored-by: Marko <marbar3778@yahoo.com>
* linting
* Update docs/architecture/adr-019-protobuf-state-encoding.md
Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
* Update docs/architecture/adr-019-protobuf-state-encoding.md
Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
* Address review feedback
* Add godocs
* Fix errors
* fix errors
* revert file
* Address review feedback
* Address review feedback
* Stacktrace debug flag
* Fix tests
* Address review feedback
Co-authored-by: sahith-narahari <sahithnarahari@gmail.com>
Co-authored-by: Marko <marbar3778@yahoo.com>
Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
2020-05-19 20:17:29 +00:00
Aaron Craelius
9d022c17b7
Add amino compatibility layer for proto Any ( #6151 )
...
* WIP on Any amino compatibility layer
* Add tests & JSON
* Refactor Marshal/UnmarshalAny
* remove extra test
* Add support for nested Any's
* Add docs
* Update codec/any_test.go
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-05-06 20:47:03 +00:00
Aaron Craelius
386217209d
Merge PR #6076 : Proto Any init + evidence
2020-05-05 10:28:20 -04:00
Alessio Treglia
2879c0702c
x/ibc: fix missing return statement ( #6099 )
...
* enable the wsl linter
Fix various wsl-related warnings.
x/ibc/04-channel/keeper/handshake.go: fix missing return statement in ChanOpenTry().
* goimports -w files
* remove unknown linter references
* run make format
* Revert "run make format"
This reverts commit f810b62b9e4993f08506663d4e5f2ec2228a9863.
* run make format
2020-04-29 22:36:34 -04:00
Marko
4b3eb0ea98
ci: migrate long sims ( #6084 )
...
Cancel ci if no .go files have been touched. There is no clean way of
doing this so i opted to `exit 1` on the diff job if no go files were
changed and have builds depend on diff passing
- migrate proto checks to github actions.
- providing make commands to use buf within docker.
- test-sim-multi-seed-long migration to github actions. Follows same
logic and only runs on release branches.
- add protobuf section to CONTRIBUTING.md.
2020-04-28 16:13:36 +02:00
Aaron Craelius
cc90f2e002
Merge pull request #6085 : Move codec/std to std
2020-04-27 15:40:50 -04:00
Alexander Bezobchuk
fea231556a
Move ModuleAccount to x/auth ( #6029 )
...
* Move ModuleAccount to x/auth
* Update x/auth module
* Update x/staking
* Update x/mint
* Update x/gov
* Update x/distribution
* Update simapp
* Update x/bank
* Update std codec
* Add changelog entries
* Update CHANGELOG.md
Co-Authored-By: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
2020-04-20 19:32:10 +00:00
Alexander Bezobchuk
1083fa948e
Merge PR #6010 : Merge x/supply into x/bank
2020-04-20 11:22:12 -04:00
Aaron Craelius
bb4642ad0d
Decouple client/tx from x/auth ( #5992 )
...
As part of #5864 part 2), this PR decouples the new client/tx
package from x/auth (as an incremental step to deprecating
all the tx logic in x/auth) and adds StdFee, StdSignature,
StdSignMsgBase and StdTxBase to codec/std, while
deprecating the corresponding types in x/auth.
2020-04-15 23:55:02 +02:00
Aaron Craelius
58a6c4c007
Merge PR #5942 : Tx Client Migration: x/gov
2020-04-14 15:05:14 -04:00
Aleksandr Bezobchuk
6135912e53
JSON Proto changes
2020-03-26 12:46:10 -04:00
Aleksandr Bezobchuk
486fa5b4b0
Fix constructors
2020-03-24 18:55:53 -04:00
Aleksandr Bezobchuk
98f62db242
Fix linting
2020-03-15 14:10:15 -04:00
Aleksandr Bezobchuk
f60cd5a2b5
Merge branch 'master' into bez/proto-client-init
2020-03-14 12:34:34 -04:00
Jonathan Gimeno
2e42f9cb74
Favor marshal unmashal binare bare ( #5799 )
...
* change abci file to use BinaryBare
* change all calls to EncodeLengthPrefixed to BinaryBare in distribution keeper store.
* change all calls to EncodeLengthPrefixed to BinaryBare in mint keeper store.
* change all calls to EncodeLengthPrefixed to BinaryBare in auth keeper store.
* change all calls to EncodeLengthPrefixed to BinaryBare in distribution keeper store.
* change all calls to EncodeLengthPrefixed to BinaryBare in staking keeper store.
* change all calls to EncodeLengthPrefixed to BinaryBare in staking keeper store.
* change all calls to EncodeLengthPrefixed to BinaryBare in gov keeper store.
* change all calls to EncodeLengthPrefixed to BinaryBare in slashing keeper store.
* update decoder test
* migrate decoder
* migrate gov simulation decoder
* migrate baseapp_test
* refactor QuerySubspace
* refactor coedc std codec
* migrate keybase
* migrate iavl store
* migrate root multi
* migrate ante basic
* migrate tx type to bare
* migrate auth client
* update auth types
* update decoder
* migrate supply decoder
* migrate stake encoding
* migrate staking simulation
* migrate genutil
* migrate simapp test helpers
* migrate docs
* upgrade changelog
* Update CHANGELOG.md
Co-Authored-By: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
2020-03-13 19:58:43 +00:00
Aleksandr Bezobchuk
c49af0b8dd
Update context
2020-03-13 13:59:14 -04:00
Aleksandr Bezobchuk
217cae2021
DRY code
2020-03-13 09:57:15 -04:00
Aleksandr Bezobchuk
0a79849d6e
Test tx
2020-03-13 09:51:11 -04:00
Aleksandr Bezobchuk
d635de4c47
Msgs tests
2020-03-13 09:35:03 -04:00
Aleksandr Bezobchuk
edb0927c53
reorder fields
2020-03-13 09:34:55 -04:00
Aleksandr Bezobchuk
b38d3ae69a
Update ADR and types
2020-03-12 15:35:22 -04:00
Aleksandr Bezobchuk
53a43dc2a1
Fix API
2020-03-12 13:46:35 -04:00
Aleksandr Bezobchuk
34f9fc439a
Implement canonical signing
2020-03-12 13:32:03 -04:00
Aleksandr Bezobchuk
3a94f42e11
Implement app-level tx
2020-03-12 10:53:27 -04:00
Aleksandr Bezobchuk
615fcd7645
Define message proto
2020-03-12 09:30:05 -04:00
Aleksandr Bezobchuk
69ba71c28d
Add pkg doc
2020-03-05 09:44:11 -05:00
Aleksandr Bezobchuk
3f2f4b984e
Move pkg to std/
2020-03-05 09:32:43 -05:00
Alessio Treglia
5a2e59ebb2
Exclude proto files from format ( #5706 )
...
* Don't change proto files on make format
The format target does not need to depend on tools.
Thus remove dependency.
* Run make format
Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
2020-02-27 07:53:22 -03:00
Alexander Bezobchuk
53bf2271d5
Merge PR #5600 : Migrate x/staking to Protobuf
2020-02-06 14:21:02 -05:00
Alexander Bezobchuk
26d6e49d6a
Merge PR #5491 : Protobuf Introduction + Types
2020-01-24 10:32:00 -05:00
Marko
3a4f1fc4d4
Merge PR #4881 : Linting Galore
2019-08-19 12:06:27 -04:00
Alexander Bezobchuk
478eda1f7e
Merge PR #4846 : Add RegisterEvidences
2019-08-05 12:42:34 -04:00
Alexander Bezobchuk
6606007297
Merge PR #4435 : Simulation: Params from File
...
* Move distr params to simulation param generator
* Cleanup sim params output
* Print params when possible instead of entire genesis struct
* Update module param simulator keys
* Rename module params simulator keys
* Add/fix missing module params and implement SimParams
* UPdate sim test to accept params file
* Allow weights to be provided from file
* Create doc.go
* Remove TODO
* Implement MustMarshalJSONIndent
* Use mustMarshalJSONIndent for non-codec
* Remove TODO
* Fix doc.go
* Update points
* Update simapp/doc.go
Co-Authored-By: Alessio Treglia <quadrispro@ubuntu.com>
* Update simapp/doc.go
Co-Authored-By: Alessio Treglia <quadrispro@ubuntu.com>
* Cleanup appStateFn
* Use constants for simulation parameter keys
* Update msgs.go
* minor formatting
2019-06-08 16:55:47 -04:00
frog power 4000
73e5ef7c13
reduce module interdependancy, /client refactor ( #4415 )
...
* abstract staking BuildCreateValidatorMsg, genutil defines its own flags
* client/ refactor
* staking move keys from keeper to types
2019-05-28 09:44:04 +01:00
Alessio Treglia
85021d4ca9
No packages must depend on cmd/gaia/ ( #4048 )
...
Preparation work for moving gaia out of the SDK.
2019-04-04 15:36:39 +01: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