6944 Commits

Author SHA1 Message Date
Ismail Khoffi
1ee32d3089 playing with show validator cmd and experimenting with spawning new
sessions / connections if the connection is lost
2018-12-13 12:26:11 +01:00
Ismail Khoffi
8a993c6486 merge develop and update changelog pending 2018-12-12 14:19:15 +01:00
Ismail Khoffi
3547ce2516 Rework PR to memoize public key on init:
- split PubKeyMsg into PubKeyRequest / PubKeyResponse like other msgs
 - NewRemoteSignerClient sends a pubkey request (once), return this err
 OnStart()
 - NewRemoteSignerClient returns an error if retrieving the pubkey fails
 - remove GetAddress from PrivValidator interface
 - GetPublicKey doesn't err but returns memoized public key from init
 - fix tests
2018-12-12 13:59:40 +01:00
mircea-c
f7e463f6d3 circleci: add a job to automatically update docs (#3005) 2018-12-12 13:48:53 +04:00
Dev Ojha
bc2a9b20c0 mempool: add a comment and missing changelog entry (#2996)
Refs #2994
2018-12-12 13:31:35 +04:00
Zach
9e075d8dd5 docs: enable full-text search (#3004) 2018-12-12 13:20:02 +04:00
Zach
8003786c9a docs: fixes from 'first time' review (#2999) 2018-12-11 22:21:54 +04:00
Daniil Lashin
2594cec116 add UnconfirmedTxs/NumUnconfirmedTxs methods to HTTP/Local clients (#2964) 2018-12-11 12:41:02 +04:00
Dev Ojha
df32ea4be5 Make testing logger that doesn't write to stdout (#2997) 2018-12-11 12:17:21 +04:00
Anton Kaliaev
f69e2c6d6c p2p: set MConnection#created during init (#2990)
Fixes #2715

In crawlPeersRoutine, which is performed when seedMode is run, there is
logic that disconnects the peer's state information at 3-hour intervals
through the duration value. The duration value is calculated by
referring to the created value of MConnection. When MConnection is
created for the first time, the created value is not initiated, so it is
not disconnected every 3 hours but every time it is disconnected. So,
normal nodes are connected to seedNode and disconnected immediately, so
address exchange does not work properly.

https://github.com/tendermint/tendermint/blob/master/p2p/pex/pex_reactor.go#L629
This point is not work correctly.
I think,
https://github.com/tendermint/tendermint/blob/master/p2p/conn/connection.go#L148
created variable is missing the current time setting.
2018-12-10 15:24:58 -05:00
Dev Ojha
d5d0d2bd77 Make mempool fail txs with negative gas wanted (#2994)
This is only one part of #2989. We also need to fix the application,
and add rules to consensus to ensure this.
2018-12-10 12:56:49 -05:00
Ismail Khoffi
3d5e06ff7c Anton's suggested changes 2018-12-10 11:19:02 +01:00
Anton Kaliaev
41eaf0e31d turn off strict routability every time (#2983)
previously, we're turning it off only when --populate-persistent-peers
flag was used, which is obviously incorrect.

Fixes https://github.com/cosmos/cosmos-sdk/issues/2983
2018-12-09 13:29:51 -05:00
Ismail Khoffi
e33f256359 fix unused import 2018-12-09 13:03:06 +01:00
Zach
68b467886a docs: relative links in docs/spec/readme.md, js-amino lib (#2977)
Co-Authored-By: zramsay <zach.ramsay@gmail.com>
2018-12-07 19:41:19 +04:00
Ismail Khoffi
5c09275691 wrap error in remote signer only 2018-12-07 12:17:49 +01:00
Ismail Khoffi
094699f9bc only use "github.com/pkg/errors" to avoid aliasing 2018-12-07 11:52:40 +01:00
Ismail Khoffi
c8ab062ce9
Merge branch 'develop' into 2926_dont_panic 2018-12-07 11:32:28 +01:00
Ismail Khoffi
1765eb2cd2 more review comments:
- consistently wrap error
 - add changelog entry
2018-12-07 11:31:14 +01:00
Leo Wang
2f64717bb5 return an error if validator set is empty in genesis file and after InitChain (#2971)
Fixes #2951
2018-12-07 12:30:58 +04:00
Anton Kaliaev
c4a1cfc5c2
don't ignore key when executing CONTAINS (#2924)
Fixes #2912
2018-12-07 12:28:02 +04:00
Ethan Buchman
0f96bea41d
Merge pull request #2976 from tendermint/master
Merge pull request #2975 from tendermint/release/v0.27.0
2018-12-05 16:51:04 -05:00
Ethan Buchman
9c236ffd6c
Merge pull request #2975 from tendermint/release/v0.27.0
Release/v0.27.0
v0.27.0
2018-12-05 16:50:36 -05:00
Ethan Buchman
9f8761d105
update changelog and upgrading (#2974) v0.27.0-rc1 2018-12-05 15:19:30 -05:00
Anton Kaliaev
5413c11150 kv indexer: add separator to start key when matching ranges (#2925)
* kv indexer: add separator to start key when matching ranges

to avoid including false positives

Refs #2908

* refactor code

* add a test case
2018-12-05 14:21:46 -05:00
Ethan Buchman
a14fd8eba0
p2p: fix peer count mismatch #2332 (#2969)
* p2p: test case for peer count mismatch #2332

* p2p: fix peer count mismatch #2332

* changelog

* use httptest.Server to scrape Prometheus metrics
v0.27.0-rc0
2018-12-05 07:32:27 -05:00
Ethan Buchman
1bb7e31d63
p2p: panic on transport error (#2968)
* p2p: panic on transport error

Addresses #2823. Currently, the acceptRoutine exits if the transport returns
an error trying to accept a new connection. Once this happens, the node
can't accept any new connections. So here, we panic instead. While we
could potentially be more intelligent by rerunning the acceptRoutine, the
error may indicate something more fundamental (eg. file desriptor limit)
that requires a restart anyways. We can leave it to process managers to
handle that restart, and notify operators about the panic.

* changelog
2018-12-04 19:16:06 -05:00
Ethan Buchman
222b8978c8
Minor log changes (#2959)
* node: allow state and code to have diff block versions

* node: pex is a log module
2018-12-04 08:30:29 -05:00
Anton Kaliaev
d9a1aad5c5
docs: add client#Start/Stop to examples in RPC docs (#2939)
follow-up on https://github.com/tendermint/tendermint/pull/2936
2018-12-03 16:17:06 +04:00
Anton Kaliaev
8ef0c2681d
check if deliverTxResCh is still open, return an err otherwise (#2947)
deliverTxResCh, like any other eventBus (pubsub) channel, is closed when
eventBus is stopped. We must check if the channel is still open. The
alternative approach is to not close any channels, which seems a bit
odd.

Fixes #2408
2018-12-03 16:15:36 +04:00
Ismail Khoffi
df20323cd2 a few uncaught asserts replaced with require 2018-12-03 12:08:20 +01:00
Ismail Khoffi
f17c04c892 more review comments: require instead assert & wrap errors 2018-12-03 12:03:50 +01:00
Ismail Khoffi
50ac191f9d Address more review comments: require instead assert & wrap errors 2018-12-01 12:26:40 +01:00
Ismail Khoffi
977a138b1f Review comments: wrap errors 2018-12-01 12:08:57 +01:00
Anton Kaliaev
1c6ed0e7d0
Review comments: @melekes suggestions
use require instead of assert

Co-Authored-By: Liamsi <Ismail.Khoffi@gmail.com>
2018-12-01 11:59:36 +01:00
Anton Kaliaev
80c464c9b4
Review comments: @melekes suggestions
require instead of assert

Co-Authored-By: Liamsi <Ismail.Khoffi@gmail.com>
2018-12-01 11:59:11 +01:00
Anton Kaliaev
5233ac154f
Review comments: @melekes suggestions
require instead of assert

Co-Authored-By: Liamsi <Ismail.Khoffi@gmail.com>
2018-12-01 11:58:56 +01:00
Anton Kaliaev
db04ff4896
Review comments: @melekes suggestions
require instead of assert

Co-Authored-By: Liamsi <Ismail.Khoffi@gmail.com>
2018-12-01 11:58:40 +01:00
Anton Kaliaev
394edc9230
Review comments: @melekes suggestions
require instead of assert

Co-Authored-By: Liamsi <Ismail.Khoffi@gmail.com>
2018-12-01 11:58:25 +01:00
Anton Kaliaev
1fa463ecab
Review comments: @melekes suggestions
require instead of assert

Co-Authored-By: Liamsi <Ismail.Khoffi@gmail.com>
2018-12-01 11:58:00 +01:00
Anton Kaliaev
d79d2093ff
Review comments: @melekes suggestions
require instead of assert

Co-Authored-By: Liamsi <Ismail.Khoffi@gmail.com>
2018-12-01 11:57:39 +01:00
Anton Kaliaev
78b7a41319
Review comments: @melekes suggestions
Co-Authored-By: Liamsi <Ismail.Khoffi@gmail.com>
2018-12-01 11:57:20 +01:00
Ismail Khoffi
c4d93fd27b explicitly type MaxTotalVotingPower to int64 (#2953) 2018-11-30 14:43:16 -05:00
Ethan Buchman
dc2a338d96
Bucky/v0.27.0 (#2950)
* update changelog

* changelog, upgrading, version
2018-11-30 14:05:16 -05:00
Ismail Khoffi
725ed7969a Add some ProposerPriority tests (#2946)
* WIP: tests for #2785

* rebase onto develop

* add Bucky's test without changing ValidatorSet.Update

* make TestValidatorSetBasic fail

* add ProposerPriority preserving fix to ValidatorSet.Update to fix
TestValidatorSetBasic

* fix randValidator_ to stay in bounds of MaxTotalVotingPower

* check for expected proposer and remove some duplicate code

* actually limit the voting power of random validator ...

* fix test
2018-11-29 17:03:41 -05:00
Ismail Khoffi
417c30b9c1 PrivValidator.GetAddress() and PrivValidator.GetPublicKey() return an
error instead of panic
2018-11-29 18:52:19 +01:00
Ethan Buchman
44b769b1ac
types: ValidatorSet.Update preserves Accum (#2941)
* types: ValidatorSet.Update preserves ProposerPriority

This solves the other issue discovered as part of #2718,
where Accum (now called ProposerPriority) is reset to
0 every time a validator is updated.

* update changelog

* add test

* update comment

* Update types/validator_set_test.go

Co-Authored-By: ebuchman <ethan@coinculture.info>
v0.27.0-dev1
2018-11-29 08:26:12 -05:00
Anton Kaliaev
380afaa678
docs: update ecosystem.json: add Rust ABCI (#2945) 2018-11-29 15:57:11 +04:00
Ismail Khoffi
b30c34e713 rename Accum -> ProposerPriority: (#2932)
- rename fields, methods, comments, tests
v0.27.0-dev0
2018-11-28 15:35:09 -05:00
Dev Ojha
4039276085 remove unnecessary "crypto" import alias (#2940) 2018-11-28 23:53:04 +04:00