799beebd36
fix consensus tests
2018-04-05 17:54:26 +03:00
45ec5fd170
WIP consensus
2018-04-05 07:05:45 -07:00
6e39ec6e26
do not even try to dial ourselves
...
also, remove address from the book (plus mark it as our address)
and return an error if we fail to parse peers list
2018-04-05 15:45:52 +02:00
d38a6cc7ea
trim whitespace from elements of lists (like persistent_peers
)
...
Refs #1380
2018-04-05 16:42:26 +03:00
7f6ee7a46b
add a comment for NewSwitch
2018-04-05 15:27:47 +02:00
34b77fcad4
log error when we fail to add new address
2018-04-05 15:27:47 +02:00
3b3f45d49b
use addrbook#AddOurAddress to store our address
2018-04-05 15:27:47 +02:00
3284a13fee
add test
...
Refs #1275
2018-04-05 15:27:47 +02:00
fc9ffee2e3
remove unused tracking because it leads to memory leaks in tests
...
see https://blog.cosmos.network/debugging-the-memory-leak-in-tendermint-210186711420
2018-04-05 15:27:47 +02:00
3a672cb2a9
update changelog [ci skip]
2018-04-05 15:27:46 +02:00
4b8e342309
fix panic: lookup testing on 10.0.2.3:53: no such host
2018-04-05 15:27:46 +02:00
5a2fa71b03
use combination of IP and port, not just IP
2018-04-05 15:27:46 +02:00
9a57ef9cbf
do not dial ourselves (ok, maybe just once)
...
Refs #1275
2018-04-05 15:27:46 +02:00
59ca9bf480
update to tmlibs v0.8.1
2018-04-05 16:16:36 +03:00
7cce07bc99
Merge pull request #1352 from tendermint/1228-require-id
...
p2p: require all addresses come with an ID no matter what
2018-04-05 15:55:41 +03:00
0ae66f75ce
Merge pull request #1420 from tendermint/1414-data-race
...
protect Record* peerStateStats functions by mutex
2018-04-05 15:53:15 +03:00
5d1c758730
Fix evidence
2018-04-05 05:43:23 -07:00
1b9323f105
Fix blockchain tests
2018-04-05 05:17:43 -07:00
2e24b64fc1
Add IsEmpty; Publish 0.8.1
2018-04-05 03:14:53 -07:00
cee7b5cb54
GetSelectionWithBias
...
Refs #1130
2018-04-05 12:00:16 +02:00
1585152341
https://github.com/tendermint/tendermint/pull/1128#discussion_r162799294
...
Refs #1130
2018-04-05 12:00:16 +02:00
8e699c2bfd
defaultSeedDisconnectWaitPeriod should be at least as long as we expect
...
it to take for a peer to become MarkGood
Refs #1130
2018-04-05 12:00:16 +02:00
904a3115a6
require addresses to have an ID by default
...
Refs #1228
2018-04-05 11:55:29 +02:00
a506cf47ad
protect Record* peerStateStats functions by mutex
...
Fixes #1414
DATA RACE:
```
Read at 0x00c4214ee940 by goroutine 146:
github.com/tendermint/tendermint/consensus.(*peerStateStats).String()
<autogenerated>:1 +0x57
fmt.(*pp).handleMethods()
/usr/local/go/src/fmt/print.go:596 +0x3f4
fmt.(*pp).printArg()
/usr/local/go/src/fmt/print.go:679 +0x11f
fmt.(*pp).doPrintf()
/usr/local/go/src/fmt/print.go:996 +0x319
fmt.Sprintf()
/usr/local/go/src/fmt/print.go:196 +0x73
github.com/tendermint/tendermint/consensus.(*PeerState).StringIndented()
github.com/tendermint/tendermint/consensus/_test/_obj_test/reactor.go:1426 +0x573
github.com/tendermint/tendermint/consensus.(*PeerState).String()
github.com/tendermint/tendermint/consensus/_test/_obj_test/reactor.go:1419 +0x66
github.com/go-logfmt/logfmt.safeString()
/home/ubuntu/go/src/github.com/go-logfmt/logfmt/encode.go:299 +0x9d
github.com/go-logfmt/logfmt.writeValue()
/home/ubuntu/go/src/github.com/go-logfmt/logfmt/encode.go:217 +0x5a0
github.com/go-logfmt/logfmt.(*Encoder).EncodeKeyval()
/home/ubuntu/go/src/github.com/go-logfmt/logfmt/encode.go:61 +0x1dd
github.com/tendermint/tmlibs/log.tmfmtLogger.Log()
/home/ubuntu/go/src/github.com/tendermint/tmlibs/log/tmfmt_logger.go:107 +0x1001
github.com/tendermint/tmlibs/log.(*tmfmtLogger).Log()
<autogenerated>:1 +0x93
github.com/go-kit/kit/log.(*context).Log()
/home/ubuntu/go/src/github.com/go-kit/kit/log/log.go:124 +0x248
github.com/tendermint/tmlibs/log.(*tmLogger).Debug()
/home/ubuntu/go/src/github.com/tendermint/tmlibs/log/tm_logger.go:64 +0x1d0
github.com/tendermint/tendermint/consensus.(*PeerState).PickSendVote()
github.com/tendermint/tendermint/consensus/_test/_obj_test/reactor.go:1059 +0x242
github.com/tendermint/tendermint/consensus.(*ConsensusReactor).gossipVotesForHeight()
github.com/tendermint/tendermint/consensus/_test/_obj_test/reactor.go:789 +0x6ef
github.com/tendermint/tendermint/consensus.(*ConsensusReactor).gossipVotesRoutine()
github.com/tendermint/tendermint/consensus/_test/_obj_test/reactor.go:723 +0x1039
Previous write at 0x00c4214ee940 by goroutine 21:
github.com/tendermint/tendermint/consensus.(*PeerState).RecordVote()
github.com/tendermint/tendermint/consensus/_test/_obj_test/reactor.go:1242 +0x15a
github.com/tendermint/tendermint/consensus.(*ConsensusReactor).Receive()
github.com/tendermint/tendermint/consensus/_test/_obj_test/reactor.go:309 +0x32e6
github.com/tendermint/tendermint/p2p.createMConnection.func1()
/home/ubuntu/go/src/github.com/tendermint/tendermint/p2p/peer.go:365 +0xea
github.com/tendermint/tendermint/p2p/conn.(*MConnection).recvRoutine()
/home/ubuntu/go/src/github.com/tendermint/tendermint/p2p/conn/connection.go:531 +0x779
```
2018-04-05 11:42:45 +02:00
7689c15413
Merge pull request #1378 from tendermint/bucky/disable-test-libs
...
comment out test_libs because of gcc dep in tmlibs
2018-04-05 11:06:30 +02:00
f907113c19
Net_info should print the ID of peers ( #1312 )
2018-04-05 11:02:23 +02:00
140f962201
Merge pull request #1406 from tendermint/docker
...
Update dockerfile and readme
2018-04-05 10:57:19 +02:00
c23d907f12
Merge pull request #1391 from tendermint/581-include-validator-power
...
Include validator power in /status
2018-04-05 11:18:45 +03:00
105847b7dd
Fix comments
2018-04-05 08:13:13 +01:00
9c02c8ce93
Add import/export of public keys #79
2018-04-04 23:29:00 +01:00
fb7bde9c24
Add cause in Error.Error()
2018-04-04 13:43:19 -07:00
390de81bbc
Release version 0.8.0
2018-04-04 12:30:13 -07:00
1b51cbc224
Changed wallet addresses ( #84 )
...
* Changed wallets to basecli 0.13-compatible keys
2018-04-04 12:04:09 -04:00
ed782e7508
include validator's voting power in /status
...
Refs #581
2018-04-04 11:34:59 +02:00
0732526465
use more relaxing < and >= ops instead of !=
...
an example of Search from godocs:
```
package main
import (
"fmt"
"sort"
)
func main() {
a := []int{1, 3, 6, 10, 15, 21, 28, 36, 45, 55}
x := 6
i := sort.Search(len(a), func(i int) bool { return a[i] >= x })
if i < len(a) && a[i] == x {
fmt.Printf("found %d at index %d in %v\n", x, i, a)
} else {
fmt.Printf("%d not found in %v\n", x, a)
}
}
```
2018-04-04 10:42:35 +02:00
39a4963782
document funcs in validator_set.go
2018-04-04 10:42:35 +02:00
37ce6b195a
ValidatorSet#GetByAddress: return -1 if no validator was found
2018-04-04 10:42:34 +02:00
7aa6d36258
Merge pull request #1412 from tendermint/bucky/exit-conR-subscribe-routine
...
consensus: check for closed subscription channels and exit routine
2018-04-03 23:53:48 +03:00
5c3d3f0875
Merge pull request #194 from Tilkal/random-missing-methods
...
Random missing methods
2018-04-03 23:52:16 +03:00
991017fc41
Merge pull request #1336 from tendermint/zarko/1308-add-light-client-spec
...
Add light client spec
2018-04-03 23:02:32 +03:00
5f548c7679
consensus: close pubsub channels. fixes #1372
2018-04-03 22:57:32 +03:00
d14aacf03e
Merge pull request #1300 from tendermint/lite-proxy-hardening-and-tests
...
lite/proxy: Validation* tests and hardening for nil dereferences
2018-04-03 22:43:38 +03:00
39ff4d22e9
minor cleanup
2018-04-03 22:34:18 +03:00
74486f7f93
Add Int63n() and RandInt63n().
2018-04-03 16:24:38 +02:00
d66d43d2ea
Add Int31n() and RandInt31n().
2018-04-03 16:23:36 +02:00
196f8410ba
WIP commit; Fix types/results_test
2018-04-03 07:03:08 -07:00
f457435199
HexBytes formatting; Make computeHashFromAunts more defensive
2018-04-03 07:02:19 -07:00
8462493cbf
[rpc] fix subscribing using an abci.ResponseDeliverTx tag
...
Refs #1369
2018-04-03 15:53:13 +02:00
47b8bd1728
wrote a test for EventBus#PublishEventTx
...
Refs #1369
2018-04-03 15:53:13 +02:00
89cdde7f1e
Fix state tests
2018-04-03 06:50:53 -07:00