Braydon Fuller
05d55efb22
indexer: fix memory and cpu exhaustion for addrindex
2019-05-15 12:02:48 -07:00
Braydon Fuller
b9e8c7b8de
changelog: merge blockstore and indexer changes
2019-05-15 12:02:47 -07:00
Braydon Fuller
8bff122253
indexer: use chain and blocks for indexer, remove chain client
2019-05-15 12:02:47 -07:00
Braydon Fuller
f9aab08c46
indexer: add block position to tx
2019-05-15 12:02:47 -07:00
Javed Khan
9f89c79bd7
indexer: work with blockstore
2019-05-15 12:02:47 -07:00
Javed Khan
51ac4a720b
changelog: add indexer to changelog
2019-05-15 12:02:46 -07:00
Javed Khan
33de39ca0a
migrate: remove txindex and addrindex from chaindb
2019-05-15 12:02:46 -07:00
Javed Khan
05794f5cb3
indexer: add module indexer
...
module indexer introduces a extensible architecture for indexing the
chain. It provides a base class which handles syncing with the chain,
handling re-orgs, interruptions, dynamic toggling, etc. TXIndexer
and AddrIndexer are provided for indexing transactions and addresses,
using the same flags as before i.e --index-tx and --index-address.
Indexes are stored in a different database and can be maintained
independently of the chain.
2019-05-15 12:02:41 -07:00
Braydon Fuller
81b840a634
Merge pull request #769 from braydonf/wallet-tx-conflict
...
wallet: handle multiple conflicting inputs
2019-05-14 22:56:29 -07:00
Braydon Fuller
eba7bbeddc
wallet: handle multiple conflicting inputs
2019-05-14 14:29:41 -07:00
Orfeas Stefanos Thyfronitis Litos
07f7338503
Replace 285 with 293 in blockstore README ( #767 )
...
* Replace 285 with 293 in blockstore README
* Mention block size after boundaries
2019-05-12 17:55:48 +05:30
Braydon Fuller
af19d802f5
Merge pull request #765 from tuxcanfly/fix-fee-overflow-err
...
chain: add fee overflow test; rename error
2019-05-06 16:29:41 -07:00
Javed Khan
d53fa0a1c5
chain: extend try..finally; restore consts to copy
2019-05-07 03:59:15 +05:30
Javed Khan
49143b2c16
chain: reset consensus params on assert fail
2019-05-07 03:48:31 +05:30
Javed Khan
4bc0bb2366
chain: add fee overflow test; rename error
2019-05-07 03:27:42 +05:30
Javed Khan
812dc1a6f3
Merge pull request #764 from braydonf/checkpoint
...
blockchain: do not accept forked chain older than last checkpoint
2019-05-07 00:23:19 +05:30
Braydon Fuller
46f83fe5ae
Merge pull request #763 from pinheadmz/docslint
...
linter: cover docs/examples
2019-05-03 09:33:14 -07:00
Braydon Fuller
c54abb79f1
Merge pull request #760 from kilpatty/node-http-reset-enforce
...
node-http: add check for height being below tip
2019-05-03 09:19:08 -07:00
Braydon Fuller
b68207610c
blockchain: do not accept forked chain older than last checkpoint
...
This has been patched in both bitcoind and btcd around February 20th, 2014. It was
shortly followed by a headers-first synchronization of blocks.
- d8b4b49667
- 50b6e10b57
2019-05-02 14:44:10 -07:00
Matthew Zipkin
ff6570fa45
linter: cover docs/examples
2019-05-02 08:16:11 -07:00
kilpatty
d5514d9dcb
node-http: add check for height being below tip
...
This commit simply adds an enforce line to check that the height being
requested to reset to is below the chain tip. This way we return a bad
request error rather than a internal server error.
2019-04-30 21:43:48 -05:00
Braydon Fuller
d601b6a303
Merge pull request #703 from braydonf/blockstore
...
Add file block storage
2019-04-12 10:55:27 -07:00
Braydon Fuller
54383578fb
test: configurable and unique test directory path
...
- Multiple parallel runs of the same test will not conflict
as a unique identifier is added to the test directory.
- The base test directory can be configured for various
environments, and can be changed via the environment
variable `TEMP`, see the implementation of `os.tmpdir()`
for specific details.
2019-04-11 10:15:51 -07:00
Braydon Fuller
50fe51ca32
blockstore: close file if write or read throws
2019-04-08 13:26:16 -07:00
Braydon Fuller
3457ccc91b
blockchain: remove blocks after commit
2019-04-08 13:24:54 -07:00
Braydon Fuller
83824d73b1
blockstore: optimize block read and index
...
There is potential for around a 10% to 23% increase to the performance
of block reads by using `allocUnsafe`, however there is already around
a 3 to 6 times increase to the performance. While it's safe to use
`allocUnsafe` as the number of bytes read is checked to be the same
size as the buffer allocation, there is a potential for test cases
to introduce _other_ behavior for `fs.read` that may not have the
same behavior, though this isn't currently the case.
2019-04-08 13:20:00 -07:00
Braydon Fuller
41ce504175
bcoin: expose blockstore module
2019-04-08 13:18:59 -07:00
Braydon Fuller
8337176e07
migrate: add time to migrate and compaction log message
2019-04-08 13:18:59 -07:00
Braydon Fuller
f3e517c3c0
blockstore: fix logger, improve messages
2019-04-08 13:18:58 -07:00
Braydon Fuller
f24f64b483
changelog: add blockstore changes and migration notes
2019-04-08 13:18:58 -07:00
Javed Khan
6af6353906
blockstore: add README and docs
2019-04-08 13:18:58 -07:00
Braydon Fuller
961f6eddb5
blockstore: index undo blocks from files
2019-04-08 13:18:57 -07:00
Braydon Fuller
8fc605c4a9
blockstore: index after write interrupt and use less memory
2019-04-08 13:18:57 -07:00
Braydon Fuller
5cbbcf5409
blockstore: do not write block twice
2019-04-08 13:18:57 -07:00
Braydon Fuller
58e623e30a
test: minor, cleanup and clarity
2019-04-08 13:18:56 -07:00
Braydon Fuller
747a8e707b
blockstore: tests and fixes for blockstore error cases
2019-04-08 13:18:56 -07:00
Braydon Fuller
0f0cb00c54
blockstore: minor, spelling
2019-04-08 13:18:56 -07:00
Braydon Fuller
bdcb392a9c
blockchain: do not check blockstore with spv
2019-04-08 13:18:56 -07:00
Braydon Fuller
d1e747cf2f
blockstore: minor, update comments and docs
2019-04-08 13:18:55 -07:00
Braydon Fuller
2ba3ee6354
migrate: move block undo coins to blockstore
2019-04-08 13:18:55 -07:00
Braydon Fuller
8b6ec89a64
blockchain: use blockstore for undo coins
2019-04-08 13:18:55 -07:00
Braydon Fuller
89d3253f29
blockstore: add ensure method to create directories
2019-04-08 13:18:54 -07:00
Braydon Fuller
0b0dd58a91
node: add blockstore to full node
2019-04-08 13:18:54 -07:00
Braydon Fuller
11af5456ce
blockstore: additional options and create function
2019-04-08 13:18:54 -07:00
Javed Khan
8748e4dd2d
migrate: move blocks to blockstore files
2019-04-08 13:18:53 -07:00
Javed Khan
6be21203af
blockchain: integrate blockstore into chaindb
2019-04-08 13:18:53 -07:00
Braydon Fuller
3cec13ef5e
blockstore: add block data types with an undo type
2019-04-08 13:18:53 -07:00
Braydon Fuller
abd2ae4b5d
blockstore: prevent blocks writes at the same position
2019-04-08 13:18:53 -07:00
Braydon Fuller
2d08b296f7
blockstore: recover from block write interrupt
2019-04-08 13:18:52 -07:00
Braydon Fuller
64fb7c1d88
bench: add bench json output for blockstore
2019-04-08 13:18:52 -07:00