Commit Graph

7247 Commits

Author SHA1 Message Date
Alessio Treglia 28347acad0
ci: remove unused update-qa job (#7329) 2020-09-16 16:53:03 +01:00
colin axnér b2d48a9e81
Merge PR #7327: remove resulting value return from AddCoins and SubtractCoins 2020-09-16 08:40:47 -04: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
Alessio Treglia d4266dcde8
update .gitignore (#7325) 2020-09-16 11:08:42 +01:00
Alessio Treglia d97f32e5f0
pipe go test -race output into tparse (#7309) 2020-09-16 10:31:14 +01:00
Cory 0d2599b922
add changelog entry for 0.39.1 (#7321)
Co-authored-by: Marko <marbar3778@yahoo.com>
2020-09-16 09:00:40 +00:00
puneet2019 a38e8fe103
Removing an incomplete sentence. (#7313)
I think the train of thoughts were interrupted here, removing it for completeness.

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Marko <marbar3778@yahoo.com>
2020-09-16 08:57:38 +00:00
Marko 41845021b7
ci: fix (#7323) 2020-09-16 10:54:54 +02:00
Aditya 984c2d4179
Retrieve Epoch from ChainID (#7280)
* add functions to parse epoch from height

* remove 0 epoch hardcoding

* fix tendermint tests

* fix tests

* start update docs

* progress

* better parsing of chainID

* fix update and misbehaviour logic and add tests

* update docs

* docfix

* Apply suggestions from code review

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

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

* change self checks to use epochs

* address rest of reviews

* rename epoch number to version in docs

* wrap up rest of TODOs

* Update x/ibc/02-client/genesis.go

* add self validate test

* Apply suggestions from code review

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

* fix godoc

Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com>
2020-09-15 21:09:48 +00:00
colin axnér 5dc434fbca
Uncomment and fix tests in ibc-transfer (#7282)
* WIP fixing relay_test

* fix send and recv tests

* update ack tests

* update relay and tests

* comment test

* remove func and uncomment test

Co-authored-by: Jack Zampolin <jack.zampolin@gmail.com>
2020-09-15 11:27:51 +00:00
Alessio Treglia 7ada179aef
enable -race on go test (#7305)
Introduce 'norace' build tag that is used to
filter out test files containing test cases
or test suites that, if run with the -race
flag on would cause race conditions.

Supersede #7300.
2020-09-15 10:43:46 +01:00
Jack Zampolin a8990eab71
Quick fixes for IBC (#7302)
* Fix page variable for querying consensus state of a node

* Add pointer where required

Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com>
2020-09-15 09:21:42 +00:00
dependabot[bot] 1d462c6b18
Bump github.com/magiconair/properties from 1.8.2 to 1.8.3 (#7308)
* Bump github.com/magiconair/properties from 1.8.2 to 1.8.3

Bumps [github.com/magiconair/properties](https://github.com/magiconair/properties) from 1.8.2 to 1.8.3.
- [Release notes](https://github.com/magiconair/properties/releases)
- [Changelog](https://github.com/magiconair/properties/blob/master/CHANGELOG.md)
- [Commits](https://github.com/magiconair/properties/compare/v1.8.2...v1.8.3)

Signed-off-by: dependabot[bot] <support@github.com>

* run go mod tidy

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alessio Treglia <alessio@tendermint.com>
2020-09-15 08:57:57 +00:00
colin axnér 4d9c32f44f
Remove UNINITIALIZED usage from connection and channel (#7297)
* remove UNINITALIZED connection state

* remove uninit channel state

* add back uninitalized def in proto file

* fix typo

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-09-14 21:41:23 +00:00
Michael FIG 63c3a6eeca
feat: allow "any" to specify a "binary" with no arch/os deps (#7230) 2020-09-14 21:32:10 +00:00
colin axnér 813be217e3
Remove GetHeight from ConsensusState (#7274)
* remove height from tm consensus state

* various updates to removing dep on GetHeight

* inital addition of wrapper around consensus state with height

* fix tests

* remove GetHeight interface func

* wip test

* add test

* apply @AdityaSripal comments

* apply @fedekunze suggestions

Co-authored-by: Aditya <adityasripal@gmail.com>
2020-09-14 18:16:42 +00:00
Alexander Bezobchuk 7ae84898de
Merge PR #7265: Tendermint Block Pruning 2020-09-14 10:12:49 -04:00
Alessio Treglia 56e3bc1945
proto tools install script (#7294)
Follow up of #7266 (comment)

Replace the convoluted Makefile in contrib/devtools/
with a separate (almost) idempotent install script.
2020-09-14 14:30:12 +01:00
Erik Grinaker 5e16c215ba
test: fix data race in snapshots.ChunkReader test (#7299)
Co-authored-by: Alessio Treglia <alessio@tendermint.com>
Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
2020-09-14 14:00:08 +01:00
Alessio Treglia f640ad6cea
Makefile: reorganise test rules (#7290)
Adding a new test suite is now as easy as write a oneliner.

Format test output with tparse if available:
 go get github.com/mfridman/tparse

Ref #7287
2020-09-14 13:00:33 +01:00
Alessio Treglia 46a8e94740
run make format && go mod tidy (#7298) 2020-09-14 12:42:09 +01:00
Alessio Treglia 6cd4ac9b50
baseapp: fix TestGRPCRouter (#7293) 2020-09-14 11:30:17 +01:00
dependabot[bot] c96867f3dd
Bump github.com/tendermint/go-amino from 0.15.1 to 0.16.0 (#7295)
Bumps [github.com/tendermint/go-amino](https://github.com/tendermint/go-amino) from 0.15.1 to 0.16.0.
- [Release notes](https://github.com/tendermint/go-amino/releases)
- [Changelog](https://github.com/tendermint/go-amino/blob/v0.16.0/CHANGELOG.md)
- [Commits](https://github.com/tendermint/go-amino/compare/v0.15.1...v0.16.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-09-14 09:29:41 +00:00
dependabot[bot] 201787bba3
Bump github.com/gorilla/handlers from 1.5.0 to 1.5.1 (#7296)
Bumps [github.com/gorilla/handlers](https://github.com/gorilla/handlers) from 1.5.0 to 1.5.1.
- [Release notes](https://github.com/gorilla/handlers/releases)
- [Commits](https://github.com/gorilla/handlers/compare/v1.5.0...v1.5.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-09-14 03:51:08 -03:00
Alessio Treglia c26ef79ed0
move client/testutil -> x/auth/testutil (#7292)
We should never break the
top-level-packages-do-not-depend-on-x-packages rule.
2020-09-14 03:21:29 +01:00
Alessio Treglia 606956b668
Reproducible buildsystem (#7247)
Provide a simple Docker-based mechanism for application
developers to provide reproducible builds. Unlike gaia's
current reproducible buildsystem, this does not depend on
external tools, e.g. `gitian-builder`.

`build-simd-linux` now builds `simd` in a deterministic
Linux container.
2020-09-13 20:55:35 +01:00
Anil Kumar Kammari cfb5fc03e5
Merge PR #7094: Add x/auth cli tests 2020-09-13 09:52:09 -04:00
Alessio Treglia f413d3a5d0
use os.UserHomeDir() to get user's home dir (#7288) 2020-09-13 12:18:02 +01:00
Alessio Treglia 9544718d7e
Merge PR #7286: simapp: merge node and client config directories
Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
2020-09-12 10:03:20 -04:00
Murthy Vitwit 1c3172576c
Add staking CLI tests (#7111)
* add cli test to GetQueryCmdValidator, Pool and Params methods

* modify TestGetQueryCmdValidator testcase

* add test script for GetQueryCmdValidators method

* added tests for x/staking delegation commands

* fix tests

* added tests for queries

Co-authored-by: Anil Kumar Kammari <anil@vitwit.com>
Co-authored-by: atheeshp <59333759+atheeshp@users.noreply.github.com>
Co-authored-by: SaReN <sahithnarahari@gmail.com>
Co-authored-by: atheesh <atheesh@vitwit.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-11 22:39:53 +00:00
John Adler 2bb9a241bb
ADR-027: Make rules more precise (#7220)
* Update changelog.

* Fix typos.

* Remove 'by default' from packed encoding rule.

* Further specify longer requirement.

* Clarify that bool must have value of 1 if included.

* Fix typo variant -> varint.

* Disambiguate rule 3.

* Add more reasoning for requirements on zeroes.

* Reword rules to make bit restrictions clearer. Add exception for negative int32.

* Add reference for signed integer encoding.

* Clarify rule for signed int requirement.

* Deterministic -> bijective.

* Normalize spacing in 'protobuf 3'.

* Add background to clarify 70 bits.

* Fix nit: all -> most.

* Clarify is -> must.

Co-authored-by: Alessio Treglia <alessio@tendermint.com>
2020-09-11 14:46:37 +00:00
Amaury Martiny c94fd4afc5
Return app_hash in InitChain (#7208)
* Return app_hash in InitChain

* Hash empty string
2020-09-11 14:22:18 +00:00
Alessio Treglia 32eccde501
cosmovisor: various small improvements (#7275)
{,cosmosvisor/}Makefile: Add Makefile to cosmovisor/
subdirectory and integrate build target into the
top-directory Makefile.

cosmovisor/:

Create Golang-idiomatic cmd/ subdirectory to make
`cosmosvisor` binary (instead of a binary named `cmd`)
automatically installable with `go get`.

Minor changes to error handling:

- Plain error strings bring more value than the whole
  stacktrace in case of dumb configuration errors.

- Output errors to /dev/stderr instead of /dev/stdout.

Remove dependency on github.com/pkg/errors.
2020-09-11 10:42:11 +01:00
Alessio Treglia d4b0e5baab
client: fix validator's command pagination default page (#7278)
Fix issue encountered in the stargate-2 testnet:

 Error: RPC error -32603 - Internal error: page should be within [1, 1] range, given 0

Co-authored-by: Helder Moreira <helder@tendermint.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-09-10 18:36:49 +00:00
SaReN b2348180b8
Migrate {x/auth, x/gov, x/staking} missing CLI queries to proto (#6994)
* Fix error code

* Fix decoder

* Fix typo

* Fix decode

* refactor

* Migrate SearchTxsResult to proto

* fix MarkEventsToIndex

* lint++

* Fix output

* Add QueryTxCmd cli test

* Add fmt

* Put txBuilder in types/tx

* Add GetAnyTx in TxBuilder

* Add new IsAnyTx

* Rename to IntoAny

* Fix bug

* fmt

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

* Fix ibc CLI to use proto

* Fix any MarshalJSON

* Fix test

* Make tx.Tx implement sdk.Tx

* Register sdk.Tx

* Fix lint

* Allow DefaultJSONTxEncoder to take tx.Tx

* refactor

* Rename variable

* remove fmt

Co-authored-by: Anil Kumar Kammari <anil@vitwit.com>
Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Aleksandr Bezobchuk <aleks.bezobchuk@gmail.com>
Co-authored-by: Amaury Martiny <amaury.martiny@protonmail.com>
Co-authored-by: Marie <marie.gauthier63@gmail.com>
2020-09-10 18:26:47 +00:00
colin axnér d84296a5fc
add zero height (#7270)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-09-09 15:25:49 +00:00
colin axnér ec74416276
x/ibc: move solo machine sequence to client state (#7271)
* update proto

* move solo machine sequence to client state

Co-authored-by: Christopher Goes <cwgoes@pluranimity.org>
2020-09-09 12:14:11 -03:00
Robert Zaremba 93dd06ad4c
Makefile: use go install in the build target (#7248)
go install also caches dependency packages and
it's faster than go build.

Co-authored-by: Alessio Treglia <alessio@tendermint.com>
2020-09-09 12:31:39 +01:00
colin axnér b4f146b62d
Add standard acknowledgement to channels and apply usage in ibc transfer (#7263)
* gen ack proto type

* remove transfer ack

* change ics20 ack to use standard type

* update commented tests

* small typo fix

* revert back to module cdc

* update docs

* fix lint

* nit

* update ack event emission

* Update x/ibc-transfer/spec/01_concepts.md

* add comment for onacknowledgement

* Update proto/ibc/channel/channel.proto

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Christopher Goes <cwgoes@pluranimity.org>
2020-09-09 10:01:28 +00:00
Robert Zaremba 1755bf3b46
FromABCIEvidence function parameter rename (#7269) 2020-09-09 09:32:58 +00:00
dependabot[bot] 5dc3f4c6c8
Bump google.golang.org/grpc from 1.31.1 to 1.32.0 (#7267)
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.31.1 to 1.32.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.31.1...v1.32.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-09-09 04:19:16 -03:00
Anil Kumar Kammari a9547b54ff
Add proto formatting tool (#7266)
* Add proto format option

* Add clang format options

* Fix proto format

* Fix fmt

* Fix SpacesInSquareBrackets to match with SpacesInSquareBrackets setting
2020-09-08 22:06:54 +00:00
Robert Zaremba 9856327d95
Merge PR #7251: Cleanup of evidence types 2020-09-08 09:33:53 -07:00
Alexander Bezobchuk 325be6ff21
Merge PR #7209: Create Vesting Account Message 2020-09-08 09:09:50 -07:00
dauTT fcf5186717
Enforce ICS 20 (transfer) to only use UNORDERED channels (#6992)
* Enforce ICS 20 (transfer) to only use UNORDERED channels

* Cosmetic changes

* Fix tests

* revert and fix test issue

* add tests

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Colin Axner <colinaxner@berkeley.edu>
Co-authored-by: colin axnér <25233464+colin-axner@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-09-08 14:04:54 +00:00
Erik Grinaker 4faeefebd2
Add state sync support (#7166)
* Add state sync support

* fix incorrect test tempdir

* proto: move and update Protobuf schemas

* proto: lint fixes

* comment tweaks

* don't use type aliasing

* don't call .Error() when logging errors

* use create terminology instead of take for snapshots

* reuse chunk hasher

* simplify key encoding code

* track chunk index in Manager

* add restoreDone message for Manager

* add a ready channel to Snapshotter.Restore()

* add comment on streaming IO API

* use sdkerrors for error handling

* fix incorrect error

* tweak changelog

* syntax fix

* update test code after merge
2020-09-08 09:05:44 +00:00
dauTT d61fa43108
x/ibc: mock own privValidator rather than relying on the one from tendermint (#7241)
* 1) Create PrivValidator mock in x/ibc/testing/mock/privval.go
2) Adjust tests accordingly

* Add tests

Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2020-09-07 21:44:23 +00:00
Jack Zampolin 2539f6e488
Ensure unpacking of connection interfaces in msgs (#7252) 2020-09-07 17:08:11 +00:00
colin axnér 221a28f876
Abstract Tendermint ABCI proof queries for IBC into a single function (#7250)
* add single query function

* fix lint
2020-09-07 15:39:46 +00: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