7491 Commits

Author SHA1 Message Date
Anton Kaliaev
86f7089396 add a changelog entry (#3802)
Refs https://github.com/tendermint/tendermint/pull/3758#issuecomment-510738955
2019-07-15 11:31:35 -04:00
Marko Baricevic
470f1efcc8 merge master 2019-07-15 11:34:01 +02:00
Marko
e0b9298134 libs: minor cleanup (#3794)
* more minor cleanup of libs

Remove unused `version.go`, `assert.go` and `libs/circle.yml`

* Update types/vote_set_test.go

Co-Authored-By: Anton Kaliaev <anton.kalyaev@gmail.com>

* spelling change
2019-07-14 18:02:48 +04:00
Marko
5d1459b584 libs/fail: clean up fail.go (#3785)
* Clean up `fail.go`

- Clean up fail.go
- Remove unneeded Func `FailRand()`

closes #2729

Signed-off-by: Marko Baricevic <marbar3778@yahoo.com>

* add in commented lines
2019-07-14 17:50:33 +04:00
Marko Baricevic
4e3b6bfb26 Merge remote-tracking branch 'origin' into marko/v0.32.1 2019-07-13 13:40:04 +02:00
Marko Baricevic
7a86e49312 moved abci change to features as it doesnt break the abci 2019-07-13 13:39:11 +02:00
Karoly Albert Szabo
78e634dd5c tm-monitor: add Context to RPC handlers (#3792)
* Fix rpc handle for tm-monitor

Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com>

* go imports file

Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com>

* go imports file

Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com>

* fix RPCUnmonitor too

Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com>
2019-07-13 10:09:27 +04:00
Karoly Albert Szabo
6d96cf4f05 tm-monitor: update build-docker Makefile target (#3790)
- build docker needs go111module on
- switch to golang:1.12 to have git available

Signed-off-by: Karoly Albert Szabo <szabo.karoly.a@gmail.com>
2019-07-13 09:57:43 +04:00
Marko Baricevic
744d65f173 Merge branch 'master' into marko/v0.32.1 2019-07-12 19:30:11 +02:00
Aditya
e7ac73177e upgrade go.mod (#3793)
upgrade levelDB to latest master
2019-07-12 19:29:36 +02:00
Marko Baricevic
1b69c6b56b include doc change for abci/app 2019-07-12 15:59:53 +02:00
Marko Baricevic
e5084a4787 Merge branch 'master' into marko/v0.32.1 2019-07-12 15:51:14 +02:00
Thane Thomson
eddb433d7c abci: Fix documentation regarding CheckTx type update (#3789)
* Update ABCI docs to reflect latest changes on PR #3744

* Add note about new Type parameter for CheckTx
2019-07-12 15:43:03 +02:00
Marko Baricevic
0787b79347 add link bump abci Version 2019-07-12 11:17:20 +02:00
Marko
823d916a11
Apply suggestions from code review
Comment from PR

Co-Authored-By: Ethan Buchman <ethan@coinculture.info>
2019-07-12 11:06:27 +02:00
Andy Nogueira
378a0e51bf docs: replace priv_validator.json with priv_validator_key.json (#3786) 2019-07-11 23:31:42 +04:00
Marko Baricevic
e8926867d8 wording change 2019-07-11 21:22:14 +02:00
Marko Baricevic
0f076e5fbe add links to changelog 2019-07-11 18:37:46 +02:00
Marko Baricevic
ac232caef3 Release branch for v0.32.1
Signed-off-by: Marko Baricevic <marbar3778@yahoo.com>
2019-07-11 18:34:21 +02:00
Marko
e9c9c558d7 libs/common: remove unused functions (#3784)
- The removed functions are not used in Iavl, Cosmos-sdk and tendermint repos
- Code-hygenie `whoop whoop`

Signed-off-by: Marko Baricevic <marbar3778@yahoo.com>
2019-07-10 18:40:20 +04:00
Anton Kaliaev
f05c2a9558
p2p: extract ID validation into a separate func (#3754)
* p2p: extract ID validation into a separate func

- NewNetAddress panics if ID is invalid
- NetAddress#Valid returns an error
- remove ErrAddrBookInvalidAddrNoID

Fixes #2722

* p2p: remove repetitive check in ReceiveAddrs

* fix netaddress test
2019-07-10 13:36:48 +04:00
Ashley Vega
d70871f41b testnet: add consensus_params to testnet config generation (#3781)
Also, document time_iota_ms.

Closes #3723

Commits:

* config: Add ConsensusParams when generating testnet config (#3723)

* docs: Add explanation of time_iota_ms (#3723)

* Update changelog_pending (#3723)
2019-07-10 13:27:17 +04:00
Marko
fc1eb46587 libs/common: remove heap.go (#3780)
* Remove file heap.go

- cmn.Heap is not being used in cosmos-sdk, iavl nor tendermint repo.

Signed-off-by: Marko Baricevic <marbar3778@yahoo.com>

* changelog entry

* Update CHANGELOG_PENDING.md

closes #2432
2019-07-10 13:06:03 +04:00
Alessio Treglia
ddee2d641f infrastructure for reproducible builds (#3770)
* Add deterministic buildsystem

* Update CircleCI config

* Enable build on all branches for testing purposes

* Revert "Enable build on all branches for testing purposes"

This reverts commit bf5cf66da94bf9c23787b42995b0409492805f03.

* Remove develop from branch filters

* Remove dangling reference to develop

* Upload binaries too

* Build for stable branches too
2019-07-10 12:48:31 +04:00
Marko
f2ada0a604 docs: quick link fixes throughout docs and repo (#3776)
* Quick link fixes throughout docs and repo

- used markdown link tester to find broken links

Signed-off-by: Marko Baricevic <marbar3778@yahoo.com>

* minor change remove slash

* pr comments

* minor fix

* remove docker.develop

* remove master tag
2019-07-08 21:54:24 +04:00
Sean Braithwaite
1d5fcc2281 adr: [43] blockchain riri-org (#3753)
* [adr] First draft on adr-042

* fix diagram urls

* Update docs/architecture/adr-042-blockchain-riri-org.md

Co-Authored-By: Marko <marbar3778@yahoo.com>

* Update docs/architecture/adr-042-blockchain-riri-org.md

Co-Authored-By: Marko <marbar3778@yahoo.com>

* Update docs/architecture/adr-042-blockchain-riri-org.md

Co-Authored-By: Marko <marbar3778@yahoo.com>

* add go syntax highlight

* more highlighting

* consistency fixes

* Add references

* new adr number

* Fixes based on feedback

* aditional state info

* Add details on getSchedule

* replace spaces with tabs

* fixes based on feedback

* add clarity around r.msgs

* clarify block processing

* fix off by one error

* additional details on ioRoutine

* Update docs/architecture/adr-043-blockchain-riri-org.md

Co-Authored-By: Anca Zamfir <ancazamfir@users.noreply.github.com>
2019-07-08 21:45:52 +04:00
Jay Namsayin
94e0176ac2 behaviour: return correct reason in MessageOutOfOrder (#3772) 2019-07-04 11:26:13 +04:00
Anton Kaliaev
f76684a05c
node: allow registration of custom reactors while creating node (#3771)
* change invocation of NewNode across

* custom reactor name are prefixed with CUSTOM_

* upgate changelog pending

* improve comments

* node: refactor NewNode to use functional options
2019-07-03 17:17:59 +04:00
Anton Kaliaev
e645442c9b
abci: minor cleanups in the socket client (#3758)
Follow up from #3512

Specifically:

    cli.conn.Close() need not be under the mutex (#3512 (comment))
    call the reqRes callback after the resCb so they always happen in the same order (#3512)

Fixes #3513
2019-07-02 22:01:29 +04:00
Anton Kaliaev
d041476819
p2p: dial addrs which came from seed instead of calling ensurePeers (#3762)
Calling ensurePeers outside of ensurePeersRoutine can lead to nodes
disconnecting from us due to "sent next PEX request too soon" error.

Solution is to just dial addrs we got from src instead of calling
ensurePeers.

Refs #2093

Fixes #3338
2019-07-02 21:19:58 +04:00
Thane Thomson
62f97a69e9 abci: Refactor CheckTx to notify of recheck (#3744)
As per #2127, this refactors the RequestCheckTx ProtoBuf struct to allow for a flag indicating whether a query is a recheck or not (and allows for possible future, more nuanced states).

In order to pass this extended information through to the ABCI app, the proxy.AppConnMempool (and, for consistency, the proxy.AppConnConsensus) interface seems to need to be refactored along with abcicli.Client.

And, as per this comment, I've made the following modification to the protobuf definition for the RequestCheckTx structure:

enum CheckTxType {
  New = 0;
  Recheck = 1;
}

message RequestCheckTx {
  bytes tx = 1;
  CheckTxType type = 2;
}

* Refactor ABCI CheckTx to notify of recheck

As per #2127, this refactors the `RequestCheckTx` ProtoBuf struct to allow for:

1. a flag indicating whether a query is a recheck or not (and allows for
   possible future, more nuanced states)
2. an `additional_data` bytes array to provide information for those more
   nuanced states.

In order to pass this extended information through to the ABCI app, the
`proxy.AppConnMempool` (and, for consistency, the
`proxy.AppConnConsensus`) interface seems to need to be refactored.

Commits:

* Fix linting issue

* Add CHANGELOG_PENDING entry

* Remove extraneous explicit initialization

* Update ABCI spec doc to include new CheckTx params

* Rename method param for consistency

* Rename CheckTxType enum values and remove additional_data param
2019-07-02 18:14:53 +04:00
Ivan Kushmantsev
d9481e3648 config: make possible to set absolute paths for TLS cert and key (#3765) 2019-07-01 12:48:54 +04:00
Marko
d4cf204087 libs: remove commented and unneeded code (#3757)
- libs/errors: commented out errors.go
- libs/common: unused colors.go
- libs/db: unused debugDB

Signed-off-by: Marko Baricevic <marbar3778@yahoo.com>
2019-06-30 11:56:24 +04:00
Ivan Kushmantsev
d069eb62df docs: remove confusing statement from contributing.md (#3764) 2019-06-30 11:46:31 +04:00
Peng Zhong
b2afc65908 docs: add readme image (#3763) 2019-06-29 11:06:44 +04:00
Marko
1014f8c84b docs: update to contributing.md (#3760)
* Update to contributing.md

- Add in section for Draft PR, instead of WIP
- Add make lint as part of the commit process.

Signed-off-by: Marko Baricevic <marbar3778@yahoo.com>

* mistake

* minor word change
2019-06-28 19:32:15 +04:00
Ethan Buchman
b73cfe8786
Merge pull request #3756 from tendermint/v0.32
V0.32
2019-06-26 11:27:24 -04:00
Ethan Buchman
747f99fdc1
changelog and version (#3750)
* changelog and version

* Add section on ABCI changes

* Update ABCI upgrade section to include events examples

* update upgrading

* more upgrading and changelog

* update changelog from pending

* refer to #rpc_changes

* minor word changes
v0.32.0
2019-06-25 07:57:50 -04:00
Mengjay Gao
eb08609de1 docs: update JS section of abci-cli.md (#3747) 2019-06-25 10:56:03 +04:00
Marko
e93e8e730d Added a disclaimer so the user is aware of binary (#3751)
* Added a disaclaimer so the user is aware of binary

- added disclaimer for `-s -w`

Signed-off-by: Marko Baricevic <marbar3778@yahoo.com>

* move up to compile
2019-06-24 14:13:25 -04:00
Marko
4c4bf0f131 Added flags '-s -w' to buildflags (#3742)
* Added flags '-s -w' to buildflags

Signed-off-by: Marko Baricevic <marbar3778@yahoo.com>

* added a condition for no strip

* minor changes

* on call discussions

* on call discussion v2
2019-06-24 10:32:24 -04:00
Thane Thomson
d88a639838 Make RPC bind to localhost by default (#3746)
* Make RPC bind to localhost by default

* Add CHANGELOG_PENDING entry

* Allow testnet command to override RPC listen address

* Update localnet test to bind RPC to 0.0.0.0

* Update p2p test to bind RPC to 0.0.0.0

* Remove rpc-laddr parameter

* Update localnet to use config template with RPC listen address override

* Use config template override method for RPC listen address

* Build config template into localnode image

* Build localnode image locally before starting localnet

* Move testnet config overrides into templates

* Revert deletion of config overrides

* Remove extraneous config parameter overrides
2019-06-24 10:32:12 -04:00
Anton Kaliaev
c37faf3ac1 docs: (rpc/broadcast_tx_*) write expectations for a client (#3749)
Refs #3322
2019-06-24 09:49:49 -04:00
Marko
a44c621d2d Remove double lint (#3748)
- Circel CI and Golangci were doing linting jobs, removed circleci

Signed-off-by: Marko Baricevic <marbar3778@yahoo.com>
2019-06-24 09:48:21 -04:00
Anton Kaliaev
3e7752c29d cs: exit if SwitchToConsensus fails (#3706)
Refs #3656
v0.32.0-dev2
2019-06-22 11:48:01 -04:00
Anton Kaliaev
1b77bf6f20 rpc/lib: write a test for TLS server (#3703)
* rpc/lib: write a test for TLS server

Refs #3700

* do not regenerate certificates

* add nolint
2019-06-22 11:44:12 -04:00
Anton Kaliaev
8fc8368438
node: run whole func in goroutine, not just logger.Error fn (#3743)
* node: run whole func in goroutine, not just logger.Error fn

Fixes #3741

* add a changelog entry
2019-06-22 10:30:23 +04:00
Thane Thomson
228bba799d state: add more tests for block validation (#3674)
* Expose priv validators for use in testing

* Generalize block header validation test past height 1

* Remove ineffectual assignment

* Remove redundant SaveState call

* Reorder comment for clarity

* Use the block executor ApplyBlock function instead of implementing a stripped-down version of it

* Remove commented-out code

* Remove unnecessary test

The required tests already appear to be implemented (implicitly) through
the TestValidateBlockHeader test.

* Allow for catching of specific error types during TestValidateBlockCommit

* Make return error testable

* Clean up and add TestValidateBlockCommit code

* Fix formatting

* Extract function to create a new mock test app

* Update comment for clarity

* Fix comment

* Add skeleton code for evidence-related test

* Allow for addressing priv val by address

* Generalize test beyond a single validator

* Generalize TestValidateBlockEvidence past first height

* Reorder code to clearly separate tests and utility code

* Use a common constant for stop height for testing in state/validation_test.go

* Refactor errors to resemble existing conventions

* Fix formatting

* Extract common helper functions

Having the tests littered with helper functions makes them less easily
readable imho, so I've pulled them out into a separate file. This also
makes it easier to see what helper functions are available during
testing, so we minimize the chance of duplication when writing new
tests.

* Remove unused parameter

* Remove unused parameters

* Add field keys

* Remove unused height constant

* Fix typo

* Fix incorrect return error

* Add field keys

* Use separate package for tests

This refactors all of the state package's tests into a state_test
package, so as to keep any usage of the state package's internal methods
explicit.

Any internal methods/constants used by tests are now explicitly exported
in state/export_test.go

* Refactor: extract helper function to make, validate, execute and commit a block

* Rename state function to makeState

* Remove redundant constant for number of validators

* Refactor mock evidence registration into TestMain

* Remove extraneous nVals variable

* Replace function-level TODOs with file-level TODO and explanation

* Remove extraneous comment

* Fix linting issues brought up by GolangCI (pulled in from latest merge from develop)
2019-06-21 17:29:29 -04:00
Ismail Khoffi
59497c362b Prepare nuking develop (#3726)
* Update Readme and contrib. guidelines: remove traces of master

Signed-off-by: Ismail Khoffi <Ismail.Khoffi@gmail.com>

* add simple example

Signed-off-by: Ismail Khoffi <Ismail.Khoffi@gmail.com>

* update contributing.md

* add link

* Update CONTRIBUTING.md

* add a note on master and releases

Signed-off-by: Ismail Khoffi <Ismail.Khoffi@gmail.com>

* update readme
2019-06-21 16:29:16 -04:00
needkane
2e5b2a9537 abci/examples: switch from hex to base64 pubkey in kvstore (#3641)
* abci/example: use base64 for update validator set

* update kvstore/README.md

* update CHANGELOG_PENDING.md and abci/example/kvstore/README.md
2019-06-21 15:18:49 +04:00