Bric3d
64879c1e6a
1417 status response format ( #1424 )
...
* Reformated the ResultStatus
* fix misuse of ResultStatus.
* updated changelog
* Fixed tests
* fixed rpc helper tests
* fixed rpc_tests
* fixed mock/status_test
* fixed typo
* fixed ommitempty on validatorstatus and the changelog
* fixed extra line in changelog
* Updated usage of the /status json response in tests after breaking changes
* Updated remaining tests with changes after searching the codebase for usage
* Reformated the ResultStatus
* fix misuse of ResultStatus.
* updated changelog
* Fixed tests
* fixed rpc helper tests
* fixed rpc_tests
* fixed mock/status_test
* fixed typo
* fixed ommitempty on validatorstatus and the changelog
* Updated usage of the /status json response in tests after breaking changes
* Updated remaining tests with changes after searching the codebase for usage
* rebased against develop
2018-04-11 10:38:34 +02:00
Vladislav Dmitriyev
7c22e47629
Replaced NodeInfo's pubkey to ID ( #1443 )
...
* Replaced NodeInfo PubKey to NodeID
* Fixed tests and replaced NodeID with ID
* Removed unnecessary method ID()
* Fixed codec_test.go
* Fixed codec_test.go
* Removed unnecessary bracket
* Fixed all tests
* Fixed peer_set_test.go
* Fixed peer_test.go
* Fixed common_test.go
* Fixed common_test.go
* Renamed node_id to id
* Removed peer.ID() from RPC net.go
* Replaced NodeInfo pubKey to ID
* Fixed codec_test.go
* Fixed peer_set_test.go
* Fix pex_reactor_test.go
* Refactored code for privateKey initiali
* Fixed peer_set_test.go
* Fixed test.proto and removed orphan string in codec_test.go
* Fixed pointer to a string
* generate node_key when running tendermint init
* [docs] prefix IPs with node IDs
Refs #1429
* gen_node_key cmd
* [docs/specification/secure-p2p] add a note about config
* 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
```
* removed excessive comment
Refs https://github.com/tendermint/tendermint/pull/1446#discussion_r180353446
* use the tag interface for pubsub. (#1438 )
* use the tag interface for pubsub.
* update tmlibs.
* Fix unresolved conflict.
* improve `show_node_id` (#1433 )
* fix show_node_id
* make LoadNodeKey public
* make LoadNodeKey public
* remove if
* remove if
2018-04-11 10:11:11 +02:00
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
```
2018-04-10 11:15:16 +02:00
Ethan Buchman
c170800fbd
Merge branch 'develop' into jae/aminoify
2018-04-07 16:16:53 +03:00
Jae Kwon
3ca5292dc9
Fix rpc tests
2018-04-05 21:19:14 -07:00
Jae Kwon
c541d58d2f
WIP: fix rpc/core
2018-04-05 16:07:29 -07:00
Jae Kwon
e4492afbad
Merge
2018-04-05 08:17:10 -07:00
Zaki Manian
f907113c19
Net_info should print the ID of peers ( #1312 )
2018-04-05 11:02:23 +02:00
Anton Kaliaev
ed782e7508
include validator's voting power in /status
...
Refs #581
2018-04-04 11:34:59 +02:00
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.
2018-04-02 10:21:17 +02:00
Anton Kaliaev
2d857c4b1b
add hash field to ResultTx (/tx and /tx_search endpoints) ( #1374 )
...
Refs #1367
2018-03-28 15:44:58 +02:00
Anton Kaliaev
460599ef75
fix comment
2018-03-19 20:01:43 +03:00
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
2018-03-19 19:39:37 +03:00
Anton Kaliaev
a40518c7da
revert adding dial_peers's private flag
2018-03-15 11:55:30 +04:00
Anton Kaliaev
8bef3eb1f4
private peers
...
Refs #1126
2018-03-15 11:55:29 +04:00
Ethan Buchman
e7747f7d66
it compiles
2018-02-03 03:52:17 -05:00
Ethan Buchman
7a5060dc52
replace data.Bytes with cmn.HexBytes
2018-02-03 03:47:01 -05:00
Ethan Buchman
0d7d16005a
fixes
2018-01-20 21:44:30 -05:00
Ethan Buchman
940db715f4
Merge pull request #1104 from tendermint/p2p-consolidate
...
WIP: P2P consolidate
2018-01-18 19:00:35 -05:00
Ethan Buchman
3368eeb03e
fix tests
2018-01-14 01:19:07 -05:00
Ethan Buchman
8b74a8d6ac
NodeInfo not a pointer
2018-01-14 01:15:33 -05:00
Ethan Buchman
b1485b181a
Merge branch 'p2p-consolidate' into p2p-id
2018-01-13 15:20:23 -05:00
Ethan Buchman
e2b3b5b58c
dial_persistent_peers -> dial_peers with persistent option
2018-01-13 14:50:58 -05:00
Ethan Buchman
e6b70baae0
Merge branch 'develop' into 864-distinguish-between-seeds-and-manual-peers
2018-01-13 14:34:32 -05:00
Anton Kaliaev
b40aa91b41
document event subscriptions
...
Refs #1100
2018-01-12 12:53:34 -06:00
Anton Kaliaev
1b455883d2
readd /dial_seeds
2018-01-09 17:54:28 -06:00
Anton Kaliaev
e4897b7bdd
rename manual peers to persistent peers
2018-01-09 16:18:05 -06:00
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
2018-01-09 16:03:24 -06:00
Zach
e0e600df05
Merge branch 'develop' into config
2018-01-06 05:30:38 +00:00
Ethan Buchman
a17105fd46
p2p: peer.Key -> peer.ID
2018-01-01 22:39:05 -05:00
Ethan Buchman
0acca7fe69
final updates for state
2017-12-28 23:15:54 -05:00
Ethan Buchman
f55135578c
state: move methods to funcs
2017-12-28 23:15:54 -05:00
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
2017-12-28 20:49:02 +00:00
Ethan Buchman
7a18fa887d
evidence linked with consensus/node. compiles
2017-12-26 20:26:21 -05:00
Ethan Buchman
336c2f4fe1
rpc: fix getHeight
2017-12-26 20:08:25 -05:00
Ethan Buchman
801e3dfacf
rpc: getHeight helper function
2017-12-26 19:37:42 -05:00
Ethan Buchman
4171bd3bae
fixes
2017-12-26 19:24:45 -05:00
Ethan Frey
d65234ed51
Add /block_results?height=H as rpc endpoint
...
Expose it in rpc client
Move ABCIResults into tendermint/types from tendermint/state
2017-12-26 19:24:25 -05:00
Anton Kaliaev
90cdffa067
fixes after my own review (Refs #945 )
2017-12-10 11:29:36 -06:00
Anton Kaliaev
950a64f756
bring back transparent websocket (Refs #945 )
2017-12-10 01:18:10 -06:00
Anton Kaliaev
5ff0bb2100
default moniker to the host name (Refs #920 )
2017-12-07 12:49:29 -06:00
Ethan Buchman
167d0e82f9
fixes and version bump
2017-12-06 03:33:03 -05:00
Ethan Buchman
42e77de6a3
changelog; minor stuff; update glide
2017-12-06 02:45:38 -05:00
Ethan Buchman
d0dc04001e
rpc: make time human readable. closes #926
2017-12-06 01:25:11 -05:00
Ethan Buchman
9af8da7aad
update for new abci int types
2017-12-02 01:47:55 -05:00
Anton Kaliaev
10f7858453
use rand.Int63n, remove underflow check, remove unnecessary cast
2017-12-01 19:22:18 -06:00
Anton Kaliaev
922af7c405
int64 height
...
uint64 is considered dangerous. the details will follow in a blog post.
2017-12-01 19:04:53 -06:00
Ethan Buchman
e9f8e56895
fixes from rebase
2017-12-01 17:25:44 -05:00
Anton Kaliaev
f1fbf995f7
protect ourselves again underflow (Refs #911 )
2017-12-01 17:17:22 -05:00
Anton Kaliaev
b3492356e6
uint64 height (Refs #911 )
2017-12-01 17:17:22 -05:00
Anton Kaliaev
58789c52cd
add example for tx_search endpoint
2017-11-29 15:30:12 -06:00
Anton Kaliaev
acbc0717d4
add client methods
2017-11-29 15:19:44 -06:00
Anton Kaliaev
1e19860585
fixes from my own review
2017-11-29 14:24:18 -06:00
Anton Kaliaev
2a5e8c4a47
add minimal documentation for tx_search RPC method [ci skip]
2017-11-29 14:24:18 -06:00
Anton Kaliaev
91f2184003
fixes after bucky's review
2017-11-29 14:24:18 -06:00
Anton Kaliaev
3e577ccf4f
add `tx_search` RPC endpoint
2017-11-29 14:24:18 -06:00
Anton Kaliaev
f65e357d2b
adapt Tendermint to new abci.Client interface
...
which was introduced in https://github.com/tendermint/abci/pull/130
2017-11-29 14:23:44 -06:00
Anton Kaliaev
4a31532897
remove unreachable code
2017-11-29 14:23:44 -06:00
Anton Kaliaev
29cd1a1b8f
rewrite indexer to be a listener of eventBus
2017-11-29 14:23:44 -06:00
Zach Ramsay
57ea4987f7
linting: apply errcheck part1
2017-11-27 22:39:11 +00:00
Ethan Buchman
a969e24177
crank context timeouts
2017-11-15 01:42:15 +00:00
Anton Kaliaev
fcdd30b2d3
fixes from Bucky's review 2
2017-11-02 13:20:05 -05:00
Anton Kaliaev
61d76a273f
fixes from Bucky's and Emmanuel's reviews
2017-10-30 11:12:01 -05:00
Anton Kaliaev
f6539737de
new pubsub package
...
comment out failing consensus tests for now
rewrite rpc httpclient to use new pubsub package
import pubsub as tmpubsub, query as tmquery
make event IDs constants
EventKey -> EventTypeKey
rename EventsPubsub to PubSub
mempool does not use pubsub
rename eventsSub to pubsub
new subscribe API
fix channel size issues and consensus tests bugs
refactor rpc client
add missing discardFromChan method
add mutex
rename pubsub to eventBus
remove IsRunning from WSRPCConnection interface (not needed)
add a comment in broadcastNewRoundStepsAndVotes
rename registerEventCallbacks to broadcastNewRoundStepsAndVotes
See https://dave.cheney.net/2014/03/19/channel-axioms
stop eventBuses after reactor tests
remove unnecessary Unsubscribe
return subscribe helper function
move discardFromChan to where it is used
subscribe now returns an err
this gives us ability to refuse to subscribe if pubsub is at its max
capacity.
use context for control overflow
cache queries
handle err when subscribing in replay_test
rename testClientID to testSubscriber
extract var
set channel buffer capacity to 1 in replay_file
fix byzantine_test
unsubscribe from single event, not all events
refactor httpclient to return events to appropriate channels
return failing testReplayCrashBeforeWriteVote test
fix TestValidatorSetChanges
refactor code a bit
fix testReplayCrashBeforeWriteVote
add comment
fix TestValidatorSetChanges
fixes from Bucky's review
update comment [ci skip]
test TxEventBuffer
update changelog
fix TestValidatorSetChanges (2nd attempt)
only do wg.Done when no errors
benchmark event bus
create pubsub server inside NewEventBus
only expose config params (later if needed)
set buffer capacity to 0 so we are not testing cache
new tx event format: key = "Tx" plus a tag {"tx.hash": XYZ}
This should allow to subscribe to all transactions! or a specific one
using a query: "tm.events.type = Tx and tx.hash = '013ABF99434...'"
use TimeoutCommit instead of afterPublishEventNewBlockTimeout
TimeoutCommit is the time a node waits after committing a block, before
it goes into the next height. So it will finish everything from the last
block, but then wait a bit. The idea is this gives it time to hear more
votes from other validators, to strengthen the commit it includes in the
next block. But it also gives it time to hear about new transactions.
waitForBlockWithUpdatedVals
rewrite WAL crash tests
Task:
test that we can recover from any WAL crash.
Solution:
the old tests were relying on event hub being run in the same thread (we
were injecting the private validator's last signature).
when considering a rewrite, we considered two possible solutions: write
a "fuzzy" testing system where WAL is crashing upon receiving a new
message, or inject failures and trigger them in tests using something
like https://github.com/coreos/gofail .
remove sleep
no cs.Lock around wal.Save
test different cases (empty block, non-empty block, ...)
comments
add comments
test 4 cases: empty block, non-empty block, non-empty block with smaller part size, many blocks
fixes as per Bucky's last review
reset subscriptions on UnsubscribeAll
use a simple counter to track message for which we panicked
also, set a smaller part size for all test cases
2017-10-30 00:32:22 -05:00
Ethan Frey
f653ba63bf
Separated out certifiers.Commit from rpc structs
2017-10-25 16:43:18 +02:00
Anton Kaliaev
db413aadfd
fixes from @cloudhead review
2017-10-13 15:03:21 +04:00
Anton Kaliaev
5433e5771e
support historical abci queries (Refs #482 )
2017-10-13 15:03:20 +04:00
Ethan Buchman
9fb45c5b5a
remove a stale comment
2017-10-10 10:52:26 -04:00
Anton Kaliaev
dc0e8de9b0
extract some of the consensus types into ./types
...
so they can be used in rpc/core/types/responses.go.
```
So, it seems like we could use the actual structs here, but we don't want to have to import consensus to get them, as then clients are importing too much crap. So probably we should move some types from consensus into consensus/types so we can import.
Will these raw messages be identical to:
type ResultDumpConsensusState struct {
RoundState cstypes.RoundState
PeerRoundStates map[string]cstypes.PeerRoundState
}
```
https://github.com/tendermint/tendermint/pull/724#discussion_r143598193
2017-10-10 12:39:21 +04:00
Anton Kaliaev
d6a87d3c43
[rpc] DumpConsensusState: output state as json rather than string
...
Before:
```
{
"jsonrpc": "2.0",
"id": "",
"result": {
"round_state": "RoundState{\n H:10 R:0 S:RoundStepNewHeight\n StartTime: 2017-10-09 13:07:24.841134374 +0400 +04\n CommitTime: 2017-10-09 13:07:23.841134374 +0400 +04\n Validators: ValidatorSet{\n Proposer: Validator{EF243CC0E9B88D0161D24D733BDE9003518CEA27 {PubKeyEd25519{2E0B9301334FCDAB193D514022F81BA09BBEC028685C96602BE9DD0BD4F9E202}} VP:10 A:0}\n Validators:\n Validator{EF243CC0E9B88D0161D24D733BDE9003518CEA27 {PubKeyEd25519{2E0B9301334FCDAB193D514022F81BA09BBEC028685C96602BE9DD0BD4F9E202}} VP:10 A:0}\n }\n Proposal: \u003cnil\u003e\n ProposalBlock: nil-PartSet nil-Block\n LockedRound: 0\n LockedBlock: nil-PartSet nil-Block\n Votes: HeightVoteSet{H:10 R:0~0\n VoteSet{H:10 R:0 T:1 +2/3:\u003cnil\u003e BA{1:_} map[]}\n VoteSet{H:10 R:0 T:2 +2/3:\u003cnil\u003e BA{1:_} map[]}\n }\n LastCommit: VoteSet{H:9 R:0 T:2 +2/3:947F67A7B85439AF2CD5DFED376C51AC7BD67AEE:1:365E9983E466 BA{1:X} map[]}\n LastValidators: ValidatorSet{\n Proposer: Validator{EF243CC0E9B88D0161D24D733BDE9003518CEA27 {PubKeyEd25519{2E0B9301334FCDAB193D514022F81BA09BBEC028685C96602BE9DD0BD4F9E202}} VP:10 A:0}\n Validators:\n Validator{EF243CC0E9B88D0161D24D733BDE9003518CEA27 {PubKeyEd25519{2E0B9301334FCDAB193D514022F81BA09BBEC028685C96602BE9DD0BD4F9E202}} VP:10 A:0}\n }\n}",
"peer_round_states": []
}
}
```
After:
```
{
"jsonrpc": "2.0",
"id": "",
"result": {
"round_state": {
"Height": 1691,
"Round": 0,
"Step": 1,
"StartTime": "2017-10-09T14:08:09.129491764+04:00",
"CommitTime": "2017-10-09T14:08:08.129491764+04:00",
"Validators": {
"validators": [
{
"address": "EF243CC0E9B88D0161D24D733BDE9003518CEA27",
"pub_key": {
"type": "ed25519",
"data": "2E0B9301334FCDAB193D514022F81BA09BBEC028685C96602BE9DD0BD4F9E202"
},
"voting_power": 10,
"accum": 0
}
],
"proposer": {
"address": "EF243CC0E9B88D0161D24D733BDE9003518CEA27",
"pub_key": {
"type": "ed25519",
"data": "2E0B9301334FCDAB193D514022F81BA09BBEC028685C96602BE9DD0BD4F9E202"
},
"voting_power": 10,
"accum": 0
}
},
"Proposal": null,
"ProposalBlock": null,
"ProposalBlockParts": null,
"LockedRound": 0,
"LockedBlock": null,
"LockedBlockParts": null,
"Votes": {},
"CommitRound": -1,
"LastCommit": {},
"LastValidators": {
"validators": [
{
"address": "EF243CC0E9B88D0161D24D733BDE9003518CEA27",
"pub_key": {
"type": "ed25519",
"data": "2E0B9301334FCDAB193D514022F81BA09BBEC028685C96602BE9DD0BD4F9E202"
},
"voting_power": 10,
"accum": 0
}
],
"proposer": {
"address": "EF243CC0E9B88D0161D24D733BDE9003518CEA27",
"pub_key": {
"type": "ed25519",
"data": "2E0B9301334FCDAB193D514022F81BA09BBEC028685C96602BE9DD0BD4F9E202"
},
"voting_power": 10,
"accum": 0
}
}
},
"peer_round_states": {
"75EC8F15D244A421202F9725CD4DE509EE50303670310CF7530EF25E2B7C524B": {
"Height": 1691,
"Round": 0,
"Step": 1,
"StartTime": "2017-10-09T14:08:08.563251997+04:00",
"Proposal": false,
"ProposalBlockPartsHeader": {
"total": 0,
"hash": ""
},
"ProposalBlockParts": null,
"ProposalPOLRound": -1,
"ProposalPOL": null,
"Prevotes": null,
"Precommits": null,
"LastCommitRound": 0,
"LastCommit": null,
"CatchupCommitRound": -1,
"CatchupCommit": null
}
}
}
}
```
2017-10-09 14:09:26 +04:00
Zach Ramsay
d56b44f3a5
all: no more anonymous imports
2017-10-04 16:40:45 -04:00
Ethan Buchman
8311f5c611
abci.Info takes a struct; less merkleeyes
2017-09-22 11:42:40 -04:00
Ethan Buchman
3089bbf2b8
Amount -> Power. Closes #166
2017-09-21 14:59:27 -04:00
Dave Bryson
60a1f49a5c
updated json response to match spec by @davebryson
2017-09-18 16:35:50 -04:00
Ethan Buchman
aea8629272
peer interface
2017-09-15 18:40:59 -04:00
Ethan Buchman
9deb647303
fixes from review
2017-09-04 18:29:51 -04:00
Ethan Buchman
f0f1ebe013
rpc: Block and Commit take pointers; return latest on nil
2017-09-03 16:07:37 -04:00
Ethan Buchman
e2e8746044
rpc: historical validators
2017-09-03 16:07:37 -04:00
Ethan Buchman
f2349b1092
Merge pull request #526 from tendermint/feature/rpc-docs
...
RPC docs
2017-08-25 18:10:21 -04:00
Zach Ramsay
b3796e0aaa
rpc: typo fixes
2017-08-16 15:18:55 -04:00
Anton Kaliaev
d24083b257
generate md for Slate
2017-08-16 15:17:08 -04:00
Anton Kaliaev
83ec9f773a
wrote docs for rpc methods [ci skip]
...
for all of them except unsafe
2017-08-16 15:17:08 -04:00
Ethan Buchman
b0728260e9
comments
2017-08-09 23:51:09 -04:00
ramil
6f8d385dfa
fast sync status
2017-07-17 09:44:23 +03:00
Adrian Brink
05c0dfac12
First crack it providing fast-sync endpoint
2017-07-10 19:30:54 +02:00
Ethan Buchman
c7cd62b449
Merge branch 'master' into develop
2017-05-29 10:53:33 -04:00
Ethan Buchman
4f27752468
[rpc] dont enable unsafe by default; limit /blockchain_info to 20 blocks
2017-05-24 11:31:31 -04:00
spring1843
cf686d4f83
Fix commonly misspelled words
2017-05-20 21:43:00 -07:00
Anton Kaliaev
f803544195
new logging
2017-05-13 10:24:58 +02:00
Ethan Buchman
75989342b0
fixes from rebase
2017-05-04 23:03:42 -04:00
Ethan Buchman
f0e7f0acf8
remove viper from rpc except test
2017-05-04 22:43:55 -04:00
Ethan Buchman
efeadcc0f4
some cleanup from review
2017-04-28 23:18:38 -04:00
Ethan Buchman
4e781961e9
remove TMResult. ::drinks champagne::
2017-04-28 22:26:23 -04:00
Ethan Buchman
07e59e63f9
TMEventDataInner
2017-04-28 17:57:06 -04:00
Ethan Frey
bff8402fe8
Fix json for TMResult to not include "TMResultInner"
2017-04-28 15:26:06 +02:00
Ethan Frey
f6f1f1992c
Prepare rpc responses for go-data compatibility, still use go-wire
2017-04-28 14:46:04 +02:00
Ethan Buchman
c930f43cbe
rpc: fix tests
2017-04-27 19:56:14 -04:00
Ethan Buchman
a518d08839
rpc: response types use Result instead of pb Response
2017-04-27 19:34:25 -04:00
Ethan Buchman
cdf650fba9
rpc: repsonse types use data.Bytes
2017-04-27 19:06:07 -04:00
Ethan Buchman
cc6dde96c1
rpc -> rpc/lib and rpc/tendermint -> rpc
2017-04-26 19:57:33 -04:00