Ethan Frey
4265a94bfe
Update EndBlock parameters
...
* Update abci dependencies
* Modify references from Diffs to Changes
* Fixes issues #924
2017-12-19 12:28:08 -05:00
Ethan Frey
dedf03bb81
Add TotalTx to block header, issue #952
...
Update state to keep track of this info.
Change function args as needed.
Make NumTx also an int64 for consistency.
2017-12-13 12:20:53 +01: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
Anton Kaliaev
b3492356e6
uint64 height (Refs #911 )
2017-12-01 17:17:22 -05: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
29cd1a1b8f
rewrite indexer to be a listener of eventBus
2017-11-29 14:23:44 -06:00
Ethan Buchman
c2803b80e8
update changelog; fixes from rebase
2017-10-23 11:13:12 -04:00
Adrian Brink
036d3b59a3
Address reviews
2017-10-23 11:04:45 -04:00
Adrian Brink
782a836db0
Cleanup of code and code docs
...
This cleans up some of the code in the state package
2017-10-23 11:04:45 -04:00
Anton Kaliaev
c4646bf87f
make state#Params not a pointer
...
also remove the comment
2017-10-16 10:34:02 +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
Ethan Buchman
779c2a22d0
node: NewNode takes DBProvider and GenDocProvider
2017-09-21 15:54:33 -04:00
Ethan Buchman
1f0985689d
ConsensusParams ptr in GenesisDoc for json
2017-09-21 15:22:58 -04:00
Ethan Buchman
3089bbf2b8
Amount -> Power. Closes #166
2017-09-21 14:59:27 -04:00
Ethan Buchman
5feeb65cf0
dont use pointers for ConsensusParams
2017-09-21 14:59:24 -04:00
Ethan Buchman
2b6db268cf
genesis json tests and mv ConsensusParams to types
2017-09-21 14:51:29 -04:00
Ethan Buchman
14abdd57f3
genDoc.ValidateAndComplete
2017-09-21 14:51:29 -04:00
Ethan Buchman
bf576f0097
state: minor comment fixes
2017-09-12 14:37:32 -04:00
Adrian Brink
8eda3efa28
Cleanup lines to fit within 72 characters
2017-09-12 17:08:30 +02:00
Ethan Buchman
fae0603413
more fixes from review
2017-09-06 01:25:57 -04:00
Ethan Buchman
9deb647303
fixes from review
2017-09-04 18:29:51 -04:00
Ethan Buchman
78446fd99c
state: persist validators
2017-09-03 16:07:37 -04:00
Ethan Buchman
34beff117a
state: comments; use wire.BinaryBytes
2017-09-03 16:07:37 -04:00
Ethan Buchman
2750343de5
Merge branch 'apply-megacheck' into unstable
2017-06-23 21:38:22 -04:00
Anton Kaliaev
b4ece65726
standardize key for errors (should be "err")
2017-06-14 12:50:49 +04:00
zramsay
cf31f8d06f
core: apply megacheck vet tool (unused, gosimple, staticcheck)
2017-05-29 23:11:40 -04:00
Adrian Brink
eb9ca23250
log whether node is a validator in each round
2017-05-16 14:01:52 +02:00
Anton Kaliaev
f8fdbe3dbc
changes as per Bucky's review
2017-05-13 16:22:51 +02:00
Anton Kaliaev
f803544195
new logging
2017-05-13 10:24:58 +02:00
Ethan Buchman
29c0e6e4f4
remove viper from blockchain and state
2017-05-04 22:39:21 -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
d1926bcad1
use tmlibs
2017-04-21 18:12:54 -04:00
Ethan Buchman
29a893b193
update comment
2017-04-18 21:28:11 -04:00
Ethan Buchman
935f70a346
comments and cleanup
2017-04-18 21:28:10 -04:00
Ethan Buchman
5109746b1c
Handshake uses ApplyBlock, no ConsensuState
2017-04-18 21:28:10 -04:00
Ethan Buchman
1684ec163f
ABCIResponses not needed as field in state
2017-04-18 21:27:50 -04:00
Ethan Buchman
3a973b80ac
update glide
2017-04-18 21:27:31 -04:00
Ethan Buchman
cb279bf662
state: ABCIResponses, s.Save() in ApplyBlock
2017-04-18 21:27:31 -04:00
Ethan Buchman
d572bb0c5d
state/txindex and pkg per indexer impl
2017-04-18 19:29:02 -04:00
Anton Kaliaev
63704454a3
expose /tx?hash="XXXXXXXXXXXX"
RPC call
2017-04-10 22:44:07 +04:00
Anton Kaliaev
b08f29cb71
add config option for tx indexing and disable it by default
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
7228b11e3f
state: remove StateIntermediate
2017-02-17 19:13:35 -05:00
Jae Kwon
67ab574e98
Cleanup, add stub for VerifyCommitAny
2017-01-29 13:50:53 -08:00
Ethan Buchman
0e7694ca94
state: AppHashIsStale -> IntermediateState
2016-12-22 15:01:22 -05:00
Jae Kwon
6f88d04ac4
call db.SetSync when necessary
2016-12-06 02:52:07 -08:00
Ethan Buchman
0fe53dc5cf
remove privValIndex; Stale->AppHashIsStale
2016-12-02 00:27:36 -05:00