Ethan Buchman
fd60621a8e
update cswal test
2017-10-23 10:03:54 -04:00
Anton Kaliaev
75b78bfb72
panic on marshal/unmarshal failures for genesisDoc
2017-10-17 13:33:57 +04:00
Anton Kaliaev
6469e2ccca
save genesis doc in DB to prevent user errors
...
https://github.com/tendermint/tendermint/pull/676#discussion_r144411458
2017-10-16 10:51:58 +04:00
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
2017-10-16 10:34:02 +04:00
Anton Kaliaev
1971e149fb
ChainID() and Params() do not return errors
...
- remove state#GenesisDoc() method
2017-10-16 10:34:02 +04:00
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.
2017-10-16 10:34:01 +04:00
Zach Ramsay
d56b44f3a5
all: no more anonymous imports
2017-10-04 16:40:45 -04:00
Ethan Buchman
ddb3d8945d
p2p: allow listener with no external connection
2017-09-22 10:13:23 -04:00
Ethan Buchman
756818f940
fixes from review
2017-09-21 21:44:36 -04:00
Ethan Buchman
2131f8d330
some fixes from review
2017-09-21 17:21:20 -04:00
Ethan Buchman
75b97a5a65
PrivValidatorFS is like old PrivValidator, for now
2017-09-21 16:46:31 -04:00
Ethan Buchman
779c2a22d0
node: NewNode takes DBProvider and GenDocProvider
2017-09-21 15:54:33 -04:00
Ethan Buchman
944ebccfe9
more PrivValidator interface
2017-09-21 15:51:20 -04:00
Ethan Buchman
fd1b0b997a
PrivValidator interface
2017-09-21 15:51:20 -04:00
Adrian Brink
7dd3c007c7
Refactor priv_validator
...
Users can now just pass an object that implements the Signer interface.
2017-09-21 15:50:43 -04:00
Ethan Buchman
83048fb2fe
Merge pull request #604 from tendermint/bugfix/ws-io-timeout
...
Biff up RPC WSClient
2017-08-25 17:59:34 -04:00
Anton Kaliaev
2fd8496bc1
correct handling of pings and pongs
...
server:
- always has read & write timeouts
- ping handler never blocks the reader (see A)
- sends regular pings to check up on a client
A:
at some point server write buffer can become full, so in order not to
block reads from a client (see
https://github.com/gorilla/websocket/issues/97 ), server may skip some
pongs. As a result, client may disconnect. But you either have to do
that or block the reader. There is no third way.
client:
- optional read & write timeouts
- optional ping/pong to measure latency
2017-08-10 17:53:49 -04:00
Ethan Buchman
49278a7f9c
Merge pull request #579 from tendermint/feature/sync_status
...
Add fast-sync status to Status() call
2017-08-09 23:51:25 -04:00
Ethan Buchman
37f1390473
CreateEmptyBlocks and CreateEmptyBlocksInterval
2017-08-08 16:22:37 -04:00
Ethan Buchman
3444bee47f
fixes from review; use mempool.TxsAvailable() directly
2017-07-28 23:42:43 -04:00
Ethan Buchman
124032e3e9
NoEmptyBlocks config option
2017-07-28 22:11:45 -04:00
Ethan Buchman
4beac54bd9
no empty blocks
2017-07-28 22:11:45 -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
Anton Kaliaev
b4ece65726
standardize key for errors (should be "err")
2017-06-14 12:50:49 +04:00
Ethan Buchman
ee88272216
enable unsafe rpc routes in tests via flag
2017-05-26 14:20:23 -04:00
Ethan Buchman
fc6611b2d9
[config] RPCConfig
2017-05-24 13:56:12 -04:00
Ethan Buchman
fe87623674
Merge pull request #501 from tendermint/feature/493-per-module-log-levels
...
Feature/493 per module log levels
2017-05-16 23:33:21 +02:00
Adrian Brink
eb9ca23250
log whether node is a validator in each round
2017-05-16 14:01:52 +02:00
Anton Kaliaev
05a8204508
per module log levels (Refs #493 )
2017-05-16 13:57:28 +02:00
Anton Kaliaev
f8fdbe3dbc
changes as per Bucky's review
2017-05-13 16:22:51 +02:00
Anton Kaliaev
c9cd8de9c6
set logger
2017-05-13 10:25:00 +02:00
Anton Kaliaev
f803544195
new logging
2017-05-13 10:24:58 +02:00
Ethan Buchman
edd7263f06
fixes from review
2017-05-05 12:25:53 -04:00
Ethan Buchman
46151720f8
fix tests
2017-05-04 22:46:41 -04:00
Ethan Frey
6b059e0063
Accept relative paths in all configs, TODO: must SetRoot
2017-05-04 22:46:40 -04:00
Ethan Frey
604bf03f3a
Pulled out all config structs (except p2p.PeerConfig) into config package
2017-05-04 22:46:40 -04:00
Ethan Buchman
7db7bbe464
node: ConfigFromViper
2017-05-04 22:43:55 -04:00
Ethan Buchman
75b6c5215f
fewer structs. remove viper from consensus
2017-05-04 22:43:55 -04:00
Ethan Buchman
d8fb226ec4
new config
2017-05-04 22:43:55 -04:00
Ethan Buchman
95c74b2ccd
remove some more viper
2017-05-04 22:43:55 -04:00
Ethan Buchman
f0e7f0acf8
remove viper from rpc except test
2017-05-04 22:43:55 -04:00
Ethan Buchman
1fcc9dc654
remove viper from proxy
2017-05-04 22:39:22 -04:00
Ethan Buchman
7c0f51e24b
remove viper from mempool
2017-05-04 22:39:22 -04:00
Ethan Buchman
29c0e6e4f4
remove viper from blockchain and state
2017-05-04 22:39:21 -04:00
Ethan Buchman
cc6dde96c1
rpc -> rpc/lib and rpc/tendermint -> rpc
2017-04-26 19:57:33 -04:00
Ethan Buchman
fcf78a5da7
cleanup go-config/viper and some unnamed imports
2017-04-25 14:54:56 -04:00
Rigel Rozanski
cefb2bede0
adding viper
...
int
int
2017-04-25 13:42:22 -04:00
Ethan Buchman
56c60fba23
go-p2p -> tendermint/p2p
2017-04-21 18:19:41 -04:00
Ethan Buchman
9e82d132ce
go-rpc -> tendermint/rpc
2017-04-21 18:19:29 -04:00
Ethan Buchman
d1926bcad1
use tmlibs
2017-04-21 18:12:54 -04:00
Ethan Buchman
fa451fc55c
tendermint/rpc -> tendermint/rpc/tendermint
2017-04-21 18:10:41 -04:00
Ethan Frey
e325ffc681
Lots of updates to use new go-crypto / json style
2017-04-21 16:51:17 -04:00
Ethan Buchman
9d2de2b756
tx_indexer -> tx_index
2017-04-18 20:55:40 -04:00
Ethan Buchman
b6a04a3456
more fixes from review
2017-04-18 20:11:53 -04:00
Ethan Buchman
f4d0076344
TxResult includes Tx. /tx only works if indexer active
2017-04-18 19:56:41 -04:00
Ethan Buchman
90d1ed87fd
add tx_indexer to NodeInfo
2017-04-13 14:18:20 -04:00
Anton Kaliaev
63704454a3
expose `/tx?hash="XXXXXXXXXXXX"` RPC call
2017-04-10 22:44:07 +04:00
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
2017-04-10 22:44:07 +04:00
Ethan Buchman
4fd1471f11
remove BaseService.OnStart
2017-03-28 12:09:11 -04:00
Ethan Buchman
1208296dc0
DialSeeds takes an AddrBook
2017-03-05 23:14:15 -05:00
Ethan Buchman
05d8cd50b5
update glide and node.go for update to p2p.AddrBook
2017-03-04 23:45:54 -05:00
Anton Kaliaev
4090a31d19
save seeds to addrBook (Refs #335 )
2017-03-04 23:23:02 -05:00
Ethan Buchman
8192bb0aaf
stop rpc listeners in node.OnStop()
2017-03-03 19:47:39 -05:00
Ethan Frey
7c26be3242
Begin implementation of local client
2017-02-24 17:05:13 +01:00
Ethan Buchman
0765613778
move handshake to consensus package
2017-02-20 19:52:36 -05:00
Ethan Buchman
6403b2f468
fixes for handshake replay through consensus
2017-02-17 10:51:05 -05:00
Ethan Buchman
cbe6dbe7a1
handshake replay through consensus using mockApp
2017-02-16 17:56:45 -05:00
Jae Kwon
1af930441c
Support new Query message for proofs
2017-01-28 08:27:13 -08:00
Jae Kwon
9a2dd8bc92
Refactor Node; Node is a simple BaseService
2017-01-15 16:59:10 -08:00
Jae Kwon
a073b1db9c
Refactor replay console -> replay_file in consensus/replay_file.go
2017-01-15 16:19:02 -08:00
Ethan Buchman
f347143b3d
Merge branch 'master' into develop
...
Conflicts:
cmd/tendermint/flags.go
glide.lock
glide.yaml
node/node.go
rpc/core/routes.go
version/version.go
2017-01-12 20:48:10 -05:00
Ethan Buchman
c147b41013
TMSP -> ABCI
2017-01-12 15:53:32 -05:00
Ethan Buchman
db437e7a45
broadcast_tx via grpc
2016-12-02 00:29:25 -05:00
Ethan Buchman
8b80f8ee05
feature flag: pex reactor
2016-11-30 23:07:45 -05:00
Ethan Buchman
e0db20c0cf
update privValidatorIndex on valset change
2016-11-22 20:38:14 -05:00
Ethan Buchman
a3d863f83b
consensus: track index of privVal
2016-11-22 20:38:14 -05:00
Ethan Buchman
07597dfd45
post rebase fixes for BlockID, partSize
2016-11-16 16:13:17 -05:00
Ethan Buchman
4360c360a4
move handshake to state, use Handshaker, more tests
2016-11-16 13:29:22 -05:00
Ethan Buchman
befd8b0cb2
post rebase fixes
2016-11-16 13:27:06 -05:00
Ethan Buchman
d3ae920bd0
state: ApplyBlock
2016-11-16 13:25:13 -05:00
Ethan Buchman
a0e4253edc
handshake
2016-11-16 13:25:13 -05:00
Jae Kwon
d83fc02597
MakePartSet takes partSize from config. fix replay test
2016-11-16 01:23:16 -05:00
Jae Kwon
c1729addce
Fix BFT issue where VoteSetMaj23Message wasn't being sent where prs.Round == blockStore.Round()
2016-11-15 18:48:35 -05:00
Jae Kwon
3d3d8b5b7b
cswal -> cs_wal_dir
2016-10-30 03:55:27 -07:00
Jae Kwon
eab4e1cfa1
Remove redundant cs.WAL from NewNode()
2016-10-17 16:37:32 -07:00
Ethan Buchman
2113b6f4bb
rpc: use interfaces for pipe
2016-10-14 21:38:49 -04:00
Ethan Buchman
35d4cca8bb
type safe events
2016-10-10 03:10:29 -04:00
Ethan Buchman
c7e578ac0d
check tmsp client err and set mustConnect=false
2016-09-11 16:08:46 -04:00
Ethan Buchman
caeda30b72
proxy: wrap NewTMSPClient in ClientCreator
2016-09-10 17:19:47 -04:00
Ethan Buchman
41918d619c
expose query and info through rpc
2016-09-10 17:14:42 -04:00
Ethan Buchman
bfa690b6f7
config: reduce timeouts during test
2016-09-10 15:16:23 -04:00
Ethan Buchman
035ca7ef61
proxy: NewAppConns takes a NewTMSPClient func
2016-09-09 23:55:24 -04:00
Ethan Buchman
9bb32f41f1
config: filter_peers defaults to false
2016-09-08 18:56:02 -04:00
Ethan Buchman
943ad0e93f
filter peers by addr/pubkey. closes #244
2016-08-25 14:20:11 -04:00
Ethan Buchman
d9205a85d5
query conn
2016-08-24 01:45:45 -04:00
Ethan Buchman
3a7ee13ece
proxy: typed app conns
2016-08-24 01:45:45 -04:00
Ethan Buchman
bd429f3d4f
config: all urls use tcp:// or unix:// prefix
2016-08-10 02:16:41 -04:00
Ethan Buchman
65ebc344ac
broadcast_commit
2016-07-05 14:26:20 -04:00
Ethan Buchman
cac3cefd98
set log level. use p2p config
2016-06-11 20:19:58 -07:00
Ethan Buchman
6365c5efb5
bring back unsafe_set_config
2016-06-11 20:19:40 -07:00
Ethan Buchman
2a1e7a427d
support tmsp via grpc
2016-05-23 14:46:32 -04:00
Ethan Buchman
b2e612fb79
default empty seeds. some node methods
2016-05-11 14:45:20 -04:00
Jae Kwon
ad17090a0f
No global config
2016-05-08 15:00:58 -07:00
Ethan Buchman
ae295bd9b6
bump rpc version; add consensus version
2016-04-19 20:45:33 -04:00
Ethan Buchman
0df4a723e9
support in process tmsp apps
2016-04-13 19:24:12 -04:00
Jae Kwon
d5ab243cfd
Fix #198 ; Do not fast-sync when lone validator
2016-03-24 18:08:18 -07:00
Jae Kwon
a8ee0377d5
Use tmsp.Client interface
2016-03-24 10:42:05 -07:00
Jae Kwon
c3980cb165
Warn on proxy hash mismatch, not fail
2016-03-23 20:22:45 -07:00
Jae Kwon
8183e3201b
CommitSync() returns tmsp.Result
2016-03-23 02:49:30 -07:00
Jae Kwon
03115cbf93
Fix tests; Tests run in their own directory
2016-03-06 15:05:50 -08:00
Ethan Buchman
3891e4d66d
config: cswal_light, mempool_broadcast, mempool_reap
2016-03-03 06:31:59 +00:00
Ethan Buchman
94a1978ce4
allow nil or dummy for in-proc
2016-02-26 21:29:46 -05:00
Ethan Buchman
e2920d9702
use nil-app for in-proc
2016-02-26 20:07:04 -05:00
Ethan Buchman
254693bf86
rpc_laddr is a list
2016-02-19 00:21:07 +00:00
Jae Kwon
d17d4fa106
Fix tmsp/example import paths
2016-02-14 15:03:55 -08:00
Jae Kwon
a6d37a49a2
s/GetHash/Commit/g
2016-02-14 13:11:01 -08:00
Jae Kwon
df2933d40d
Merge branch 'blackstar'
2016-02-08 13:49:27 -08:00
Jae Kwon
a4f57e164b
BroadcastTx results
2016-02-08 00:48:58 -08:00
Ethan Buchman
cbf7ad61f3
change local app to dummy from counter
2016-02-06 11:07:50 -05:00
Jae Kwon
24af8e3da2
Merge branch 'tmsp_v02'
2016-01-28 20:03:34 -08:00
Jae Kwon
0f1cf243fd
Merge remote-tracking branch 'origin/replay'
2016-01-28 19:53:22 -08:00
Jae Kwon
236c7afe9e
Conform to TMSP v0.2
2016-01-25 14:34:08 -08:00
Ethan Buchman
3cce757adc
move DialSeeds to go-p2p and add to rpc
2016-01-20 13:12:42 -05:00
Ethan Buchman
26f0e2bc2d
msgLogFP -> write ahead log
2016-01-18 14:44:45 -05:00
Ethan Buchman
3b06368569
rebase fixes
2016-01-14 20:15:33 -05:00
Ethan Buchman
6bcf53195f
consensus: use replay log to avoid sign regression
2016-01-14 18:58:12 -05:00
Ethan Buchman
2b13386d7b
consensus: replay console
2016-01-14 18:58:11 -05:00
Ethan Buchman
6aaa5fb0bf
consensus: msg saving and replay
2016-01-14 18:58:11 -05:00
Ethan Buchman
3fdb4c03ab
rpc: TMResult and TMEventData
2016-01-13 18:38:55 -05:00
Ethan Buchman
799efb0629
merge/rebase fixes
2016-01-12 19:39:53 -05:00
Ethan Buchman
ee449a94c8
move ResultEvent to go-events
2016-01-12 19:15:10 -05:00
Ethan Buchman
fb59255095
use TendermintResult for rpctypes.Result
2016-01-12 19:15:10 -05:00
Ethan Buchman
0be13d1d27
move alert, events, rpc into own repos
2016-01-12 19:15:10 -05:00
Ethan Buchman
96547d0ca8
ws fixes; rpc tests
2016-01-12 19:14:02 -05:00
Jae Kwon
790cde028b
Remove NewNodeDefault...
2016-01-12 16:04:34 -08:00
Jae Kwon
c9dbd81178
Merge remote-tracking branch 'remotes/origin/signer'
...
Conflicts:
types/priv_validator.go
2016-01-12 15:58:48 -08:00
Jae Kwon
3e3c0083c7
Make order be decided first; Remove TMSP Commit/Rollback
2016-01-08 16:51:20 -08:00
Jae Kwon
f288e58c81
Prefix TMSP messages with length
2015-12-20 08:18:39 -08:00
Ethan Buchman
28ec3d48fa
signer interface for validators
2015-12-16 13:07:07 -05:00
Jae Kwon
c95b89e98c
Merge remote-tracking branch 'origin/consensus_refactor' into consensus_refactor_jae
2015-12-14 09:33:11 -08:00
Ethan Buchman
b9e143d956
Fireable -> EventSwitch; rs in EventDataRoundState; fixes from review
2015-12-14 00:38:19 -05:00
Jae Kwon
67e74756f4
Remove PEX/AddrBook
2015-12-05 18:10:26 -08:00
Jae Kwon
f37f578b1d
Add RemoteAddr and ListenAddr to NodeInfo
2015-12-05 09:13:21 -08:00
Jae Kwon
ef43af19ab
Tendermint <-> Application refactor
2015-12-01 20:12:01 -08:00
Jae Kwon
d69b5c5ab6
Conform to go-wire 1.0
2015-11-10 13:10:43 -08:00
Jae Kwon
e12f9d10e7
Bare consensus refactor
2015-11-01 11:34:08 -08:00
Jae Kwon
c4ed55d801
Refactor to move common libraries out of project
2015-10-22 17:39:06 -07:00
Jae Kwon
7c12c5aee3
Fix config bug where chain_id is default magic. Always read from genesis
2015-10-20 17:39:03 -07:00
Jae Kwon
26905b1260
Make Tendermint genesis agnostic; wait for file to start node
2015-10-18 07:20:05 -07:00