Anton Kaliaev
26c38e770e
fix data race
Closes #1442
```
WARNING: DATA RACE
Write at 0x00c4209de7c8 by goroutine 23:
github.com/tendermint/tendermint/types.(*Block).fillHeader()
/home/vagrant/go/src/github.com/tendermint/tendermint/types/block.go:88 +0x157
github.com/tendermint/tendermint/types.(*Block).Hash()
/home/vagrant/go/src/github.com/tendermint/tendermint/types/block.go:104 +0x121
github.com/tendermint/tendermint/types.(*Block).HashesTo()
/home/vagrant/go/src/github.com/tendermint/tendermint/types/block.go:135 +0x4f
github.com/tendermint/tendermint/consensus.(*ConsensusState).enterPrecommit()
/home/vagrant/go/src/github.com/tendermint/tendermint/consensus/state.go:1037 +0x182d
github.com/tendermint/tendermint/consensus.(*ConsensusState).addVote()
/home/vagrant/go/src/github.com/tendermint/tendermint/consensus/state.go:1425 +0x1a6c
github.com/tendermint/tendermint/consensus.(*ConsensusState).tryAddVote()
/home/vagrant/go/src/github.com/tendermint/tendermint/consensus/state.go:1318 +0x77
github.com/tendermint/tendermint/consensus.(*ConsensusState).handleMsg()
/home/vagrant/go/src/github.com/tendermint/tendermint/consensus/state.go:581 +0x7a9
github.com/tendermint/tendermint/consensus.(*ConsensusState).receiveRoutine()
/home/vagrant/go/src/github.com/tendermint/tendermint/consensus/state.go:539 +0x6c3
Previous read at 0x00c4209de7c8 by goroutine 47:
github.com/tendermint/tendermint/vendor/github.com/tendermint/tmlibs/common.(*HexBytes).MarshalJSON()
<autogenerated>:1 +0x52
github.com/tendermint/tendermint/vendor/github.com/tendermint/go-amino.invokeMarshalJSON()
/home/vagrant/go/src/github.com/tendermint/tendermint/vendor/github.com/tendermint/go-amino/json-encode.go:433 +0x88
github.com/tendermint/tendermint/vendor/github.com/tendermint/go-amino.(*Codec)._encodeReflectJSON()
/home/vagrant/go/src/github.com/tendermint/tendermint/vendor/github.com/tendermint/go-amino/json-encode.go:82 +0x8d2
github.com/tendermint/tendermint/vendor/github.com/tendermint/go-amino.(*Codec).encodeReflectJSON()
/home/vagrant/go/src/github.com/tendermint/tendermint/vendor/github.com/tendermint/go-amino/json-encode.go:50 +0x10e
github.com/tendermint/tendermint/vendor/github.com/tendermint/go-amino.(*Codec).encodeReflectJSONStruct()
/home/vagrant/go/src/github.com/tendermint/tendermint/vendor/github.com/tendermint/go-amino/json-encode.go:348 +0x539
github.com/tendermint/tendermint/vendor/github.com/tendermint/go-amino.(*Codec)._encodeReflectJSON()
/home/vagrant/go/src/github.com/tendermint/tendermint/vendor/github.com/tendermint/go-amino/json-encode.go:119 +0x83f
github.com/tendermint/tendermint/vendor/github.com/tendermint/go-amino.(*Codec).encodeReflectJSON()
/home/vagrant/go/src/github.com/tendermint/tendermint/vendor/github.com/tendermint/go-amino/json-encode.go:50 +0x10e
github.com/tendermint/tendermint/vendor/github.com/tendermint/go-amino.(*Codec).encodeReflectJSONStruct()
/home/vagrant/go/src/github.com/tendermint/tendermint/vendor/github.com/tendermint/go-amino/json-encode.go:348 +0x539
github.com/tendermint/tendermint/vendor/github.com/tendermint/go-amino.(*Codec)._encodeReflectJSON()
/home/vagrant/go/src/github.com/tendermint/tendermint/vendor/github.com/tendermint/go-amino/json-encode.go:119 +0x83f
github.com/tendermint/tendermint/vendor/github.com/tendermint/go-amino.(*Codec).encodeReflectJSON()
/home/vagrant/go/src/github.com/tendermint/tendermint/vendor/github.com/tendermint/go-amino/json-encode.go:50 +0x10e
github.com/tendermint/tendermint/vendor/github.com/tendermint/go-amino.(*Codec).encodeReflectJSONStruct()
/home/vagrant/go/src/github.com/tendermint/tendermint/vendor/github.com/tendermint/go-amino/json-encode.go:348 +0x539
github.com/tendermint/tendermint/vendor/github.com/tendermint/go-amino.(*Codec)._encodeReflectJSON()
/home/vagrant/go/src/github.com/tendermint/tendermint/vendor/github.com/tendermint/go-amino/json-encode.go:119 +0x83f
github.com/tendermint/tendermint/vendor/github.com/tendermint/go-amino.(*Codec).encodeReflectJSON()
/home/vagrant/go/src/github.com/tendermint/tendermint/vendor/github.com/tendermint/go-amino/json-encode.go:50 +0x10e
github.com/tendermint/tendermint/vendor/github.com/tendermint/go-amino.(*Codec).encodeReflectJSONStruct()
/home/vagrant/go/src/github.com/tendermint/tendermint/vendor/github.com/tendermint/go-amino/json-encode.go:348 +0x539
github.com/tendermint/tendermint/vendor/github.com/tendermint/go-amino.(*Codec)._encodeReflectJSON()
/home/vagrant/go/src/github.com/tendermint/tendermint/vendor/github.com/tendermint/go-amino/json-encode.go:119 +0x83f
github.com/tendermint/tendermint/vendor/github.com/tendermint/go-amino.(*Codec).encodeReflectJSON()
/home/vagrant/go/src/github.com/tendermint/tendermint/vendor/github.com/tendermint/go-amino/json-encode.go:50 +0x10e
github.com/tendermint/tendermint/vendor/github.com/tendermint/go-amino.(*Codec).MarshalJSON()
/home/vagrant/go/src/github.com/tendermint/tendermint/vendor/github.com/tendermint/go-amino/amino.go:296 +0x182
github.com/tendermint/tendermint/rpc/lib/types.NewRPCSuccessResponse()
/home/vagrant/go/src/github.com/tendermint/tendermint/rpc/lib/types/types.go:100 +0x12c
github.com/tendermint/tendermint/rpc/lib/server.makeJSONRPCHandler.func1()
/home/vagrant/go/src/github.com/tendermint/tendermint/rpc/lib/server/handlers.go:152 +0xab7
net/http.HandlerFunc.ServeHTTP()
/usr/lib/go-1.9/src/net/http/server.go:1918 +0x51
net/http.(*ServeMux).ServeHTTP()
/usr/lib/go-1.9/src/net/http/server.go:2254 +0xa2
github.com/tendermint/tendermint/rpc/lib/server.RecoverAndLogHandler.func1()
/home/vagrant/go/src/github.com/tendermint/tendermint/rpc/lib/server/http_server.go:138 +0x4fa
net/http.HandlerFunc.ServeHTTP()
/usr/lib/go-1.9/src/net/http/server.go:1918 +0x51
net/http.serverHandler.ServeHTTP()
/usr/lib/go-1.9/src/net/http/server.go:2619 +0xbc
net/http.(*conn).serve()
/usr/lib/go-1.9/src/net/http/server.go:1801 +0x83b
Goroutine 23 (running) created at:
github.com/tendermint/tendermint/consensus.(*ConsensusState).OnStart()
/home/vagrant/go/src/github.com/tendermint/tendermint/consensus/state.go:250 +0x35b
github.com/tendermint/tendermint/vendor/github.com/tendermint/tmlibs/common.(*BaseService).Start()
/home/vagrant/go/src/github.com/tendermint/tendermint/vendor/github.com/tendermint/tmlibs/common/service.go:130 +0x5fc
github.com/tendermint/tendermint/consensus.(*ConsensusReactor).OnStart()
/home/vagrant/go/src/github.com/tendermint/tendermint/consensus/reactor.go:69 +0x1b4
github.com/tendermint/tendermint/vendor/github.com/tendermint/tmlibs/common.(*BaseService).Start()
/home/vagrant/go/src/github.com/tendermint/tendermint/vendor/github.com/tendermint/tmlibs/common/service.go:130 +0x5fc
github.com/tendermint/tendermint/consensus.(*ConsensusReactor).Start()
<autogenerated>:1 +0x43
github.com/tendermint/tendermint/p2p.(*Switch).OnStart()
/home/vagrant/go/src/github.com/tendermint/tendermint/p2p/switch.go:177 +0x124
github.com/tendermint/tendermint/vendor/github.com/tendermint/tmlibs/common.(*BaseService).Start()
/home/vagrant/go/src/github.com/tendermint/tendermint/vendor/github.com/tendermint/tmlibs/common/service.go:130 +0x5fc
github.com/tendermint/tendermint/node.(*Node).OnStart()
/home/vagrant/go/src/github.com/tendermint/tendermint/node/node.go:416 +0xa1b
github.com/tendermint/tendermint/vendor/github.com/tendermint/tmlibs/common.(*BaseService).Start()
/home/vagrant/go/src/github.com/tendermint/tendermint/vendor/github.com/tendermint/tmlibs/common/service.go:130 +0x5fc
github.com/tendermint/tendermint/rpc/test.StartTendermint()
/home/vagrant/go/src/github.com/tendermint/tendermint/rpc/test/helpers.go:100 +0x5b
github.com/tendermint/tendermint/rpc/client_test.TestMain()
/home/vagrant/go/src/github.com/tendermint/tendermint/rpc/client/main_test.go:17 +0x4c
main.main()
github.com/tendermint/tendermint/rpc/client/_test/_testmain.go:76 +0x1cd
Goroutine 47 (running) created at:
net/http.(*Server).Serve()
/usr/lib/go-1.9/src/net/http/server.go:2720 +0x37c
net/http.Serve()
/usr/lib/go-1.9/src/net/http/server.go:2323 +0xe2
github.com/tendermint/tendermint/rpc/lib/server.StartHTTPServer.func1()
/home/vagrant/go/src/github.com/tendermint/tendermint/rpc/lib/server/http_server.go:35 +0xb3
```
7 years ago
Jae Kwon
fb64314d1c
Review from Anton
7 years ago
Jae Kwon
3ca5292dc9
Fix rpc tests
7 years ago
Jae Kwon
c541d58d2f
WIP: fix rpc/core
7 years ago
Jae Kwon
3037b5b7ca
Fix rpc/lib/...
7 years ago
Jae Kwon
e4492afbad
Merge
7 years ago
Zaki Manian
f907113c19
Net_info should print the ID of peers ( #1312 )
7 years ago
Anton Kaliaev
ed782e7508
include validator's voting power in /status
Refs #581
7 years ago
Anton Kaliaev
491c8ab4c1
[rpc/lib] log cert and key files in StartHTTPAndTLSServer
7 years ago
Anton Kaliaev
5ef8a6e887
deprecate not fully formed addresses
7 years ago
Anton Kaliaev
d694d47d22
[rpc/lib] rename vars according to Go conventions
7 years ago
Zaki Manian
ecdc1b9bb0
Add a method for creating an https server ( #1403 )
7 years ago
Thomas Corbière
2644a529f0
Fix lint errors ( #1390 )
* use increment and decrement operators.
* remove unnecessary else branches.
* fix package comment with leading space.
* fix receiver names.
* fix error strings.
* remove omittable code.
* remove redundant return statement.
* Revert changes (code is generated.)
* use cfg as receiver name for all config-related types.
* use lsi as the receiver name for the LastSignedInfo type.
7 years ago
Anton Kaliaev
2d857c4b1b
add hash field to ResultTx (/tx and /tx_search endpoints) ( #1374 )
Refs #1367
7 years ago
Anton Kaliaev
460599ef75
fix comment
7 years ago
Anton Kaliaev
830bb72d6f
add Health method to clients
Refs #1296
7 years ago
Constantine
152290db7e
Add `\health` rpc endpoint ( #1306 )
* Init `\health` rpc endpoint
* remove additional info from `\health` rpc endpoint
* Cleanup imports
* Added time threshold for health check
* Update rpc doc
* Remove unnecessary checks for blocktime creation lag
* Clean up of unnecessary config usage
7 years ago
Anton Kaliaev
a40518c7da
revert adding dial_peers's private flag
7 years ago
Anton Kaliaev
8bef3eb1f4
private peers
Refs #1126
7 years ago
Anton Kaliaev
0f41570c80
fixes from bucky's review
7 years ago
Alexander Simmerl
ee51ad8e29
Make RPC handler protocol agnostic ( #1276 )
7 years ago
Ethan Buchman
ca3655a409
types: p2pID -> P2PID
7 years ago
Zach
2cc63069c6
rename dummy to kvstore ( #1223 )
* remove accidental binary
* docs: s/Dummy&dummy/KVStore&kvstore/g
* glide update to abci
* update abci import paths
* dummy begone, hello kvstore
* RequestInitChain needs genesisBytes
* glide update
7 years ago
Anton Kaliaev
2a24ae90c1
fixes from Jae's review
1. remove pointer
2. add Quit() method to Service interface
7 years ago
Ethan Buchman
d34286c421
minor fixes - tests pass
7 years ago
Ethan Buchman
e7747f7d66
it compiles
7 years ago
Ethan Buchman
7a5060dc52
replace data.Bytes with cmn.HexBytes
7 years ago
Ethan Buchman
2679b7554b
lite: comment out iavl code - TODO #1183
7 years ago
Ethan Buchman
0d7d16005a
fixes
7 years ago
Ethan Buchman
3368eeb03e
fix tests
7 years ago
Ethan Buchman
8b74a8d6ac
NodeInfo not a pointer
7 years ago
Ethan Buchman
e2b3b5b58c
dial_persistent_peers -> dial_peers with persistent option
7 years ago
Anton Kaliaev
b40aa91b41
document event subscriptions
Refs #1100
7 years ago
Anton Kaliaev
1b455883d2
readd /dial_seeds
7 years ago
Anton Kaliaev
e4897b7bdd
rename manual peers to persistent peers
7 years ago
Anton Kaliaev
28fc15028a
distinguish between seeds and manual peers in the config/flags
- we only use seeds if we can’t connect to peers in the addrbook.
- we always connect to nodes given in config/flags
Refs #864
7 years ago
Adrian Brink
32311acd01
Vulnerability in light client proxy ( #1081 )
* Vulnerability in light client proxy
When calling GetCertifiedCommit the light client proxy would call
Certify and even on error return the Commit as if it had been correctly
certified.
Now it returns the error correctly and returns an empty Commit on error.
* Improve names for clarity
The lite package now contains StaticCertifier, DynamicCertifier and
InqueringCertifier. This also changes the method receivers from one
letter to two letter names, which will make future refactoring easier
and follows the coding standards.
* Fix test failures
* Rename files
* remove dead code
7 years ago
Ethan Buchman
a17105fd46
p2p: peer.Key -> peer.ID
7 years ago
Ethan Buchman
0acca7fe69
final updates for state
7 years ago
Ethan Buchman
f55135578c
state: move methods to funcs
7 years ago
Zach Ramsay
70ba608850
config: write all default options to config file
config: test the default file
docs: spiff up config
config: minor fixes & comments
config: simplify test
config; use a seperate config directory, #556
config: update docs & parameterize file paths
config: PR comments
config: use the default object
fix a rebase error
7 years ago
Ethan Buchman
7a18fa887d
evidence linked with consensus/node. compiles
7 years ago
Ethan Buchman
336c2f4fe1
rpc: fix getHeight
7 years ago
Ethan Buchman
801e3dfacf
rpc: getHeight helper function
7 years ago
Ethan Buchman
4171bd3bae
fixes
7 years ago
Ethan Frey
d65234ed51
Add /block_results?height=H as rpc endpoint
Expose it in rpc client
Move ABCIResults into tendermint/types from tendermint/state
7 years ago
Ethan Buchman
3ad055ef3a
fix randPort
7 years ago
Zach
12c5a57415
determinisitic linter ( #902 )
* linter: address gosimple lints
* linter: make deterministic & a rebase fix
* lint/rpc: fix a gosimple lint
* run linter in CI
* fix rebase mistake
* fix makefile
* ugh
* revert Makefile
* add metalinter to CI
* try this
* linter: last little fix
* need glide
* better
* okayy circle, have it your way
* lints: gosimple
* pr comments
7 years ago
Anton Kaliaev
90cdffa067
fixes after my own review (Refs #945 )
7 years ago
Anton Kaliaev
950a64f756
bring back transparent websocket (Refs #945 )
7 years ago