Anton Kaliaev
e06bbaf303
refactor TestNoBlockMessageResponse to eliminate a race condition
7 years ago
Ethan Buchman
2802a06a08
blockchain/store: comment about panics
7 years ago
Ethan Buchman
0bbf38141a
blockchain/pool: some comments and small changes
7 years ago
Anton Kaliaev
d64a48e0ee
set logger on blockchain pool
7 years ago
Anton Kaliaev
0a7b2ab52c
fix invalid memory address or nil pointer dereference error (Refs #762 )
https://github.com/tendermint/tendermint/issues/762#issuecomment-338276055
```
E[10-19|04:52:38.969] Stopping peer for error module=p2p peer="Peer{MConn{178.62.46.14:46656} B14916FAF38A out}" err="Error: runtime error: invalid memory address or nil pointer dereference\nStack: goroutine 529485 [running]:\nruntime/debug.Stack(0xc4355cfb38, 0xb463e0, 0x11b1c30)\n\t/usr/local/go/src/runtime/debug/stack.go:24 +0xa7\ngithub.com/cosmos/gaia/vendor/github.com/tendermint/tendermint/p2p.(*MConnection)._recover(0xc439a28870)\n\t/home/ubuntu/go/src/github.com/cosmos/gaia/vendor/github.com/tendermint/tendermint/p2p/connection.go:206 +0x6e\npanic(0xb463e0, 0x11b1c30)\n\t/usr/local/go/src/runtime/panic.go:491 +0x283\ngithub.com/cosmos/gaia/vendor/github.com/tendermint/tendermint/blockchain.(*bpPeer).decrPending(0x0, 0x381)\n\t/home/ubuntu/go/src/github.com/cosmos/gaia/vendor/github.com/tendermint/tendermint/blockchain/pool.go:376 +0x22\ngithub.com/cosmos/gaia/vendor/github.com/tendermint/tendermint/blockchain.(*BlockPool).AddBlock(0xc4200e4000, 0xc4266d1f00, 0x40, 0xc432ac9640, 0x381)\n\t/home/ubuntu/go/src/github.com/cosmos/gaia/vendor/github.com/tendermint/tendermint/blockchain/pool.go:215 +0x139\ngithub.com/cosmos/gaia/vendor/github.com/tendermint/tendermint/blockchain.(*BlockchainReactor).Receive(0xc42050a780, 0xc420257740, 0x1171be0, 0xc42ff302d0, 0xc4384b2000, 0x381, 0x1000)\n\t/home/ubuntu/go/src/github.com/cosmos/gaia/vendor/github.com/tendermint/tendermint/blockchain/reactor.go:160 +0x712\ngithub.com/cosmos/gaia/vendor/github.com/tendermint/tendermint/p2p.createMConnection.func1(0x11e5040, 0xc4384b2000, 0x381, 0x1000)\n\t/home/ubuntu/go/src/github.com/cosmos/gaia/vendor/github.com/tendermint/tendermint/p2p/peer.go:334 +0xbd\ngithub.com/cosmos/gaia/vendor/github.com/tendermint/tendermint/p2p.(*MConnection).recvRoutine(0xc439a28870)\n\t/home/ubuntu/go/src/github.com/cosmos/gaia/vendor/github.com/tendermint/tendermint/p2p/connection.go:475 +0x4a3\ncreated by github.com/cosmos/gaia/vendor/github.com/tendermint/tendermint/p2p.(*MConnection).OnStart\n\t/home/ubuntu/go/src/github.com/cosmos/gaia/vendor/github.com/tendermint/tendermint/p2p/connection.go:170 +0x187\n"
```
7 years ago
Anton Kaliaev
716364182d
[state] expose ChainID and Params
```
jaekwon
Yeah we should definitely expose ChainID.
ConsensusParams is small enough, we can just write it.
```
https://github.com/tendermint/tendermint/pull/676#discussion_r144123203
7 years ago
Anton Kaliaev
1971e149fb
ChainID() and Params() do not return errors
- remove state#GenesisDoc() method
7 years ago
Emmanuel Odeke
7939d62ef0
all, state: unexpose GenesisDoc, ChainID fields make them accessor methods
Fixes #671
Unexpose GenesisDoc and ChainID fields to avoid them being
serialized to the DB on every block write/state.Save()
A GenesisDoc can now be alternatively written to the state's
database, by serializing its JSON as a value of key "genesis-doc".
There are now accessors and a setter for these attributes:
- state.GenesisDoc() (*types.GenesisDoc, error)
- state.ChainID() (string, error)
- state.SetGenesisDoc(*types.GenesisDoc)
This is a breaking change since it changes how the state's
serialization and requires that if loading the GenesisDoc entirely
from the database, you'll need to set its value in the database
as the GenesisDoc's JSON marshaled bytes.
7 years ago
Ethan Buchman
659768783f
blockchain: fixing reactor tests
7 years ago
Emmanuel Odeke
068f01368f
blockchain/reactor: respondWithNoResponseMessage for missing height
Fixes #514
Replaces #540
If a peer requests a block with a height that we don't have
respond with a bcNoBlockResponseMessage.
However, according to the Tendermint spec, if all nodes are honest
this condition shouldn't occur, so this is a possible hint of an
dishonest node.
7 years ago
Zach Ramsay
d56b44f3a5
all: no more anonymous imports
7 years ago
Ethan Buchman
8c6bd44929
log stack trace on consensus failure
7 years ago
Ethan Buchman
3a03fe5a15
updated to match adr 005
7 years ago
Ethan Buchman
2b6db268cf
genesis json tests and mv ConsensusParams to types
7 years ago
Ethan Buchman
1f3e4d2d9a
move PartSetSize out of the config, into ConsensusParams
7 years ago
Ethan Buchman
29bfcb0a31
minor comments/changes
7 years ago
Ethan Buchman
aea8629272
peer interface
7 years ago
ramil
6f8d385dfa
fast sync status
7 years ago
Adrian Brink
05c0dfac12
First crack it providing fast-sync endpoint
7 years ago
Ethan Buchman
0d1fa8e884
fixes from review
7 years ago
Ethan Buchman
77a3d03385
blockchain: explain isCaughtUp logic
7 years ago
Ethan Buchman
3c0128a680
undo some megacheck suggestions
7 years ago
Anton Kaliaev
b4ece65726
standardize key for errors (should be "err")
7 years ago
zramsay
cf31f8d06f
core: apply megacheck vet tool (unused, gosimple, staticcheck)
8 years ago
Anton Kaliaev
c9cd8de9c6
set logger
8 years ago
Anton Kaliaev
3e1343dc6b
has as a base16 string
8 years ago
Anton Kaliaev
f803544195
new logging
8 years ago
Ethan Buchman
75b6c5215f
fewer structs. remove viper from consensus
8 years ago
Ethan Buchman
29c0e6e4f4
remove viper from blockchain and state
8 years ago
Ethan Buchman
fcf78a5da7
cleanup go-config/viper and some unnamed imports
8 years ago
Rigel Rozanski
cefb2bede0
adding viper
int
int
8 years ago
Ethan Buchman
56c60fba23
go-p2p -> tendermint/p2p
8 years ago
Ethan Buchman
d1926bcad1
use tmlibs
8 years ago
Ethan Buchman
cb279bf662
state: ABCIResponses, s.Save() in ApplyBlock
8 years ago
Ethan Buchman
00847cdc6b
blockpool: fix removePeer bug
8 years ago
Anton Kaliaev
c3f1b08b6a
tx indexing (Refs #237 )
save transactions to blockstore
move to a separate module
benchmark KVIndexer
batch write transactions
Benchmarks:
```
BenchmarkKVIndexerIndex-2 100000 516300 ns/op
PASS
ok github.com/tendermint/tendermint/blockchain/tx 56.506s
5,16 s for 10000 transactions
1 s for 2000 transactions
```
```
BenchmarkKVIndexerIndex-2 h 3000000 8622 ns/op
PASS
ok github.com/tendermint/tendermint/blockchain/tx 34.210s
86 ms for 10000 transactions
16 ms for 2000 transactions
```
```
BenchmarkKVIndexerIndex1-2 5000000 7160 ns/op
BenchmarkKVIndexerIndex500-2 20000 1750411 ns/op
BenchmarkKVIndexerIndex1000-2 10000 3573973 ns/op
BenchmarkKVIndexerIndex2000-2 5000 7836851 ns/op
BenchmarkKVIndexerIndex10000-2 1000 33438980 ns/op
PASS
ok github.com/tendermint/tendermint/blockchain/tx 209.482s
7,8 ms for 2000 transactions
```
[state] write test for ApplyBlock
review comments
- move txindexer to state
- fix type
save Tx Index as well
do not store tx itself in the result
8 years ago
Ethan Buchman
4fd1471f11
remove BaseService.OnStart
8 years ago
Anton Kalyaev
eef9124d1b
fix typo
8 years ago
Anton Kaliaev
2c724d5eee
remove warning messages in favor of "Send failed"
8 years ago
Anton Kaliaev
6dbe9febce
log warning if peer send failed (Refs #174 )
make lint happy
remove dead code
remove not needed go-common dependency
check peer.Send failures (Refs #174 )
8 years ago
Ethan Buchman
f9df4294f3
move some interfaces to types/services.go
8 years ago
Ethan Buchman
99b068b313
BlockMeta uses BlockID
8 years ago
Ethan Buchman
c9698e4848
fixes from review
8 years ago
Ethan Buchman
b2376058a1
blockchain: thread safe store.Height()
8 years ago
Ethan Buchman
8390e88e27
fix flowrate dep and test
8 years ago
Ethan Buchman
2425711734
blockchain: use ApplyBlock
8 years ago
Jae Kwon
6f88d04ac4
call db.SetSync when necessary
8 years ago
Ethan Buchman
5046d5b181
more handshake replay cleanup
8 years ago
Ethan Buchman
655b6300f5
val set changes
8 years ago
Jae Kwon
d83fc02597
MakePartSet takes partSize from config. fix replay test
8 years ago