99437a96fb
Add efficient implementation of fmt and use for errors.
2018-03-17 15:23:22 +01:00
bb875303c2
Add NewErrorWithCause()
2018-03-17 14:44:12 +01:00
de36bfe31c
Add TMLibs/Error from Cosmos-SDK/Error
2018-03-17 13:56:39 +01:00
90cd89eab0
Unexpose r.rand ( #167 )
2018-03-17 05:18:22 -07:00
6d61ca3bb5
New -> NewRand
2018-03-17 12:34:23 +01:00
536c27de8e
common/random.go supports seeding and *Rand ( #121 )
...
* common/random.go supports seeding and *Rand
* Ensure determinism
2018-03-17 04:28:53 -07:00
ff1ec0260e
Merge pull request #1318 from tendermint/bucky/testnet-cmd-fix
...
testnet cmd: ensure config dir exists. closes #1290
2018-03-17 00:05:30 +01:00
a3800da0a1
Update Gopkg.lock to use go-amino
2018-03-16 07:01:02 -07:00
7dee27c851
Merge pull request #76 from tendermint/update-go-amino
...
wire -> amino
2018-03-16 06:48:32 -07:00
7cb3188fbc
testnet cmd: ensure config dir exists. closes #1290
2018-03-16 14:26:43 +01:00
9b9022f8df
privVal: Improve SocketClient network code ( #1315 )
...
Follow-up to feedback from #1286 , this change simplifies the connection
handling in the SocketClient and makes the communication via TCP more
robust. It introduces the tcpTimeoutListener to encapsulate accept and
i/o timeout handling as well as connection keep-alive, this type could
likely be upgraded to handle more fine-grained tuning of the tcp stack
(linger, nodelay, etc.) according to the properties we desire. The same
methods should be applied to the RemoteSigner which will be overhauled
when the priv_val_server is fleshed out.
* require private key
* simplify connect logic
* break out conn upgrades to tcpTimeoutListener
* extend test coverage and simplify component setup
2018-03-16 16:32:17 +04:00
68e049d3af
Merge pull request #1244 from tendermint/1147-using-mark-good-and-stop-peer-for-error
...
Using MarkGood and StopPeerForError
2018-03-15 18:58:29 +01:00
d289c9286e
Implement NewPrefixDB ( #164 )
...
* encodeByteSlice uses uvarint for length instead of varint
* Implemented NewPrefixDB
* Fix flowrate test (#165 )
* Complete implementation and fix tests
* Add tests for MemBatch Write[Sync]
2018-03-15 09:43:23 -07:00
86ddf17db0
add a todo
...
Refs #1281
2018-03-15 11:58:20 +04:00
a655500047
fix copy-pasted comment [ci skip]
2018-03-15 11:58:20 +04:00
714f885dac
mark peer as good if it contributed enough votes or block parts
...
Refs #1147
2018-03-15 11:58:20 +04:00
b0d8f552c5
return err if peer has sent a vote that does not match our round
2018-03-15 11:58:20 +04:00
63cb69cb96
comment out ErrAddingVote because it breaks byzantine_test
2018-03-15 11:58:20 +04:00
266974cb59
stop peer if it sends invalid vote
2018-03-15 11:58:20 +04:00
bcf54b0aa3
PanicSanity is deprecated
2018-03-15 11:58:20 +04:00
d86855ad7a
stop peer if it sends us msg with unknown channel
2018-03-15 11:58:20 +04:00
d0c67bbe16
stop peer if evidence is not valid
2018-03-15 11:58:20 +04:00
4242352852
stop peer on decoding error
2018-03-15 11:58:19 +04:00
f299689573
return back defaultChannelCapacity
2018-03-15 11:58:19 +04:00
baf457e6d4
return error if peer sent us a block we didn't expect with a height too far ahead/behind
2018-03-15 11:58:19 +04:00
0c7e871ef0
[blockchain] replace timeoutsCh with more abstract errorsCh
2018-03-15 11:58:19 +04:00
87ce804b4a
cmn.PanicSanity is deprecated
2018-03-15 11:58:19 +04:00
2a258a2c3f
revert removing private peers from persistent
2018-03-15 11:55:30 +04:00
a40518c7da
revert adding dial_peers's private flag
2018-03-15 11:55:30 +04:00
31deaa4a79
fix broken merge
2018-03-15 11:55:30 +04:00
736ea055a8
add a test for pex reactor
2018-03-15 11:55:30 +04:00
a39aec0bae
rename private_peers to private_peer_ids to distinguish from peers
2018-03-15 11:55:30 +04:00
8bef3eb1f4
private peers
...
Refs #1126
2018-03-15 11:55:29 +04:00
244d88dfda
Merge pull request #1314 from tendermint/add-go-amino-as-source-to-wire
...
Add go amino as source to wire
2018-03-15 01:10:38 +01:00
791f95bac3
Merge pull request #215 from tendermint/bucky/fees-gas
...
comment some fields in ResponseCheck/DeliverTx. closes #214
2018-03-14 18:47:26 +01:00
76e1dd41e4
fix Makefile's .PHONY
2018-03-14 21:42:35 +04:00
e39187a063
add go-amino as source for go-wire
2018-03-14 21:42:17 +04:00
f7afa3d91f
comment some fields in ResponseCheck/DeliverTx. closes #214
2018-03-13 13:40:41 +01:00
121f0d3fcf
types: compile time assert to, and document sort.Interface
...
Fixes #212
Declare the purpose of the Less, Len, Swap methods
so that readers can see why they are defined.
Raised by an auditor in their report, as it looked like a security
concern but actually sort.Interface requires those methods implemented.
2018-03-12 14:46:06 -07:00
cd2ba4aa7f
Merge pull request #1286 from tendermint/feature/xla-priv-val-invert-dial
...
Invert privVal socket communication
2018-03-12 16:49:32 +01:00
73407e7cff
add CODEOWNERS file
2018-03-12 12:37:19 +04:00
47b8a8864b
remove any mention of glide
2018-03-12 12:34:43 +04:00
f499ce8713
update go-amino
2018-03-12 12:29:25 +04:00
0de19420f6
cmd/tendermint/commands/lite: add tcp scheme to address URLs ( #1297 )
...
Noticed while investigating
https://github.com/tendermint/tendermint/issues/970
As reported by @zramsay, we'd get the warning
from tendermint/rpc/lib because we were passing in
scheme-less addresses, so by default use "tcp".
Also by default, "node" (nodeAddr) has been set to:
"tcp://localhost:46657"
instead of the bare:
"localhost:46657"
This change is just to clean up such warnings as
they spuriously would spook users for a package "lite"
that claims to be secure.
2018-03-12 10:03:11 +04:00
b1cc688a61
encodeByteSlice uses uvarint for length instead of varint ( #161 )
2018-03-12 09:46:31 +04:00
f3000d0c84
Merge pull request #1292 from tendermint/1125-exp-backoff-for-ensure-peers
...
exponential backoff for addrs in the address book
2018-03-11 19:57:49 +01:00
fc5b0471d9
use time.Since
2018-03-11 14:13:34 +04:00
264bce4ddd
skip dialing based on last time dialed
2018-03-11 14:00:49 +04:00
0f41570c80
fixes from bucky's review
2018-03-11 13:22:37 +04:00
8723c91db9
types: Hash invoked for nil Data and Header should not panic
...
Fixes https://github.com/tendermint/tendermint/issues/1298
Fixes https://github.com/tendermint/tendermint/issues/1299
Found while writing tests in https://github.com/tendermint/tendermint/pull/1300
2018-03-10 21:44:08 -08:00