Liamsi
d2c05bc5b9
Revert "delete everything" (includes everything non-go-crypto)
...
This reverts commit 96a3502
2018-06-20 17:35:30 -07:00
Liamsi
96a3502126
delete everything
2018-06-20 15:19:08 -07:00
Anton Kaliaev
205d8b8062
fixes after @xla review
...
- move prometheus metrics into internal packages
- *Option structs
- misc. format changes
2018-06-20 12:40:25 +04:00
Anton Kaliaev
e4bb3566a0
move metrics constructors to a separate package
2018-06-20 12:40:25 +04:00
Anton Kaliaev
84812145cb
friendly apis for constructors
2018-06-20 12:40:25 +04:00
Anton Kaliaev
b10b0da3fd
bundle imports
2018-06-20 12:40:11 +04:00
Anton Kaliaev
7efb73aa18
mempool size metric
2018-06-20 12:38:45 +04:00
Anton Kaliaev
3fa734ef5a
recheck only if there are txs left in the mempool ( #1645 )
2018-06-04 14:28:47 +04:00
Ethan Buchman
98b0c51b5f
fix possible mempool deadlock
2018-06-03 16:11:52 -04:00
Anton Kaliaev
202a43a5af
remove TODO
...
no longer relevant, I guess. since ABCI only defines 0 (success) code.
2018-05-18 10:48:13 +04:00
Anton Kaliaev
c9001d5a11
bound the mempool
...
Refs #345
2018-05-18 10:45:51 +04:00
Anton Kaliaev
ae572b9038
remove extra call to Exists
...
Refs #345
https://github.com/tendermint/tendermint/issues/1539#issuecomment-387240606
2018-05-18 10:17:09 +04:00
Anton Kaliaev
bbe1355957
log only hash, not tx itself
2018-05-17 10:00:59 +04:00
Anton Kaliaev
7c14fa820d
do not log txs at info level
...
BEFORE:
```
./tm-bench -c 5 -r 1000 127.0.0.1:46657
Stats Avg StdDev Max
Txs/sec 1826 843 2744
Blocks/sec 1.100 0.300 2
```
AFTER:
```
./tm-bench -T 30 -c 5 -r 1000 127.0.0.1:46657
Stats Avg StdDev Max
Txs/sec 6120 1970 9776
Blocks/sec 1.000 0.000 1
```
2018-05-17 10:00:59 +04:00
Ethan Buchman
1a1e4e767b
check max msg size in DecodeMessage
2018-04-09 15:18:47 +03:00
Jae Kwon
35a1d747b0
Fix mempool
2018-03-31 11:51:32 +02:00
Anton Kaliaev
4242352852
stop peer on decoding error
2018-03-15 11:58:19 +04:00
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
2018-02-27 18:01:10 +04:00
Anton Kaliaev
0ae0155cba
restore mempool memory leak tests
2018-02-19 15:34:33 -05:00
Anton Kaliaev
2a24ae90c1
fixes from Jae's review
...
1. remove pointer
2. add Quit() method to Service interface
2018-02-12 14:32:09 +04:00
Anton Kaliaev
84a0a1987c
comment out tests for now
...
https://github.com/tendermint/tendermint/pull/1173#issuecomment-363173047
2018-02-05 22:26:14 +04:00
Anton Kaliaev
11b68f1934
rewrite broadcastTxRoutine to use channels
...
https://play.golang.org/p/gN21yO9IRs3
```
func waitWithCancel(f func() *clist.CElement, ctx context.Context) *clist.CElement {
el := make(chan *clist.CElement, 1)
select {
case el <- f():
```
will just run f() blockingly, so this doesn't change much in terms of behavior.
2018-02-05 16:36:26 +04:00
Anton Kaliaev
202d9a2c0c
fix memory leak in mempool reactor
...
Leaking goroutine:
```
114 @ 0x42f2bc 0x42f3ae 0x440794 0x4403b9 0x468002 0x9fe32d 0x9ff78f 0xa025ed 0x45e571
```
Explanation:
it blocks on an empty clist forever. so unless theres txs coming in,
this go routine will just sit there, holding onto the peer too.
if we're constantly reconnecting to some peer, old instances are not
garbage collected, leading to memory leak.
Fixes https://github.com/cosmos/gaia/issues/108
Previous attempt https://github.com/tendermint/tendermint/pull/1156
2018-02-05 13:52:18 +04:00
Ethan Buchman
cd0fd06b0d
update for sdk2 libs. need to fix kv test
...
NOTE we only updating for tmlibs and abci
2018-02-03 03:35:02 -05:00
Ethan Buchman
57cc8ab977
Merge pull request #1143 from tendermint/1091-race-condition
...
call FlushSync before calling CommitSync
2018-01-24 14:22:43 -05:00
Ethan Buchman
260affd037
docs consolidation
2018-01-23 23:46:28 -05:00
Anton Kaliaev
5f3048bd09
call FlushSync before calling CommitSync
...
if we call it after, we might receive a "fresh" transaction from
`broadcast_tx_sync` before old transactions (which were not
committed).
Refs #1091
```
Commit is called with a lock on the mempool, meaning no calls to CheckTx
can start. However, since CheckTx is called async in the mempool
connection, some CheckTx might have already "sailed", when the lock is
released in the mempool and Commit proceeds.
Then, that spurious CheckTx has not yet "begun" in the ABCI app (stuck
in transport?). Instead, ABCI app manages to start to process the
Commit. Next, the spurious, "sailed" CheckTx happens in the wrong place.
```
2018-01-23 16:56:14 +04:00
Ethan Buchman
ee674f919f
StopPeerForError in blockchain and consensus
2018-01-21 13:32:04 -05:00
Ethan Buchman
6679fef2be
Merge pull request #1056 from tendermint/feature/mempool-spec
...
WIP: Mempool specification
2018-01-21 12:39:10 -05:00
Ethan Buchman
f06cc6630b
mempool: cfg.CacheSize and expose InitWAL
2018-01-19 01:03:03 -05:00
Ethan Frey
9cb45eb7df
Add skeleton for functionality and concurrency
2018-01-04 19:08:03 +01:00
Ethan Frey
17b61db40a
Document p2p and rpc messages
2018-01-04 18:12:48 +01:00
Ethan Frey
7b52499463
Start writing mempool specification
...
Include overview and configuration options.
2018-01-04 17:11:35 +01:00
Ethan Buchman
5b1f987ed1
mempool: remove Peer interface. use p2p.Peer
2017-12-26 20:24:12 -05:00
Ethan Buchman
d2db202a2d
mempool: assert -> require in test
2017-12-02 23:41:09 -05:00
Ethan Buchman
9af8da7aad
update for new abci int types
2017-12-02 01:47:55 -05:00
Ethan Buchman
c9be2b89f9
mempool: return error on cached txs
2017-12-02 01:15:11 -05: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
86af889dfb
remove unnecessary casts (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
1e19860585
fixes from my own review
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
69b5da766c
service#Start, service#Stop signatures were changed
...
See https://github.com/tendermint/tmlibs/issues/45
2017-11-29 10:38:58 -06:00
Emmanuel Odeke
3595b5931a
mempool: implement Mempool.CloseWAL
...
Fixes https://github.com/tendermint/tendermint/issues/890
Add a CloseWAL method to Mempool to close the underlying WAL file
and then discard it so that further writes to it will have no effect.
2017-11-27 21:37:25 -07:00
Zach Ramsay
68e7983c70
linting errors: afew more
2017-11-27 22:39:11 +00:00
Zach Ramsay
8f0237610e
linting errors: clean it all up
2017-11-27 22:39:11 +00:00
Zach Ramsay
b75d4f73e7
errcheck: PR comment fixes
2017-11-27 22:39:11 +00:00
Zach Ramsay
331857c9e6
linting: apply errcheck part2
2017-11-27 22:39:11 +00:00
Zach Ramsay
46ccbcbff6
linting: apply 'gofmt -s -w' throughout
2017-11-27 22:39:11 +00:00
Ethan Buchman
e69d36d54f
some more robust sleeps
2017-11-14 22:31:23 +00:00