changelog: add indexer to changelog
This commit is contained in:
parent
33de39ca0a
commit
51ac4a720b
66
CHANGELOG.md
66
CHANGELOG.md
@ -112,6 +112,72 @@ for downloading the blocks again.
|
|||||||
- Updates to dependencies including `bcrypto` to version > 3.
|
- Updates to dependencies including `bcrypto` to version > 3.
|
||||||
- Various small fixes to run bcoin in a browser.
|
- Various small fixes to run bcoin in a browser.
|
||||||
|
|
||||||
|
## v1.x.x
|
||||||
|
|
||||||
|
### Migration
|
||||||
|
|
||||||
|
The chain indexing subsystem has been refactored to be more modular and
|
||||||
|
flexible.
|
||||||
|
|
||||||
|
A migration is required to cleanup the old indexes, if present.
|
||||||
|
|
||||||
|
``` bash
|
||||||
|
$ ./migrate/chaindb4to5.js ~/.bcoin/chain
|
||||||
|
```
|
||||||
|
|
||||||
|
**Note**: if enabled, tx and addr indexes will be regenerated by rescanning the
|
||||||
|
chain on next startup, this process might take a while. Please take the
|
||||||
|
potential downtime in re-indexing into account before upgrading.
|
||||||
|
|
||||||
|
Indexing has been made extensible so that new indexers such as a filter index
|
||||||
|
for BIP 157 can be implemented easily.
|
||||||
|
|
||||||
|
Users can toggle any indexing on/off anytime before or after the initial sync.
|
||||||
|
The indexer will start resyncing the chain state and replaying blocks to
|
||||||
|
process them for indexing. Once caught up, it will just index new blocks.
|
||||||
|
|
||||||
|
An index can be dropped by just deleting the corresponding database.
|
||||||
|
|
||||||
|
### Notable Changes
|
||||||
|
|
||||||
|
- `__lib/indexer__` `Indexer` implements the base methods which are common to
|
||||||
|
all indexers, including setting up the database, handling chain events such
|
||||||
|
as new block etc.
|
||||||
|
|
||||||
|
- By default, bcoin ships `TXIndexer`, `AddrIndexer` implementations. These
|
||||||
|
indexers preserve all the existing indexing functionality and can be enabled
|
||||||
|
via the same flags i.e. `--index-tx` `--index-address`, for compatibility.
|
||||||
|
|
||||||
|
- `Indexer` emits a `chain tip` with `[tip]`, where tip is an instance of
|
||||||
|
`BlockMeta`, when it is caught up with the chain.
|
||||||
|
|
||||||
|
- Database location can be configured via `--index-prefix` config option.
|
||||||
|
Default locations are `prefix` + `/index` e.g.: `~/.bcoin/testnet/index/tx`,
|
||||||
|
`~/.bcoin/testnet/index/addr`.
|
||||||
|
|
||||||
|
- `__/lib/blockchain/chain__` - `getSpentView` accepts a `TXMeta` insted of `TX`
|
||||||
|
|
||||||
|
- `__/lib/blockchain/chain__` - the following methods have been moved out of
|
||||||
|
the chain to the indexers. Using the methods on the chain is deprecated:
|
||||||
|
|
||||||
|
`node.txindex` implements:
|
||||||
|
|
||||||
|
+ `getMeta(hash)`
|
||||||
|
+ `getTX(hash)`
|
||||||
|
+ `hasTX(hash)`
|
||||||
|
+ `getSpentView(tx)`
|
||||||
|
|
||||||
|
`node.addrindex` implements:
|
||||||
|
|
||||||
|
+ `getCoinsByAddress(addrs)`
|
||||||
|
+ `getHashesByAddress(addrs)`
|
||||||
|
|
||||||
|
The following methods require `getHashesByAddress` in conjunction with
|
||||||
|
`node.txindex.getTX` and `node.txindex.getMeta` respectively.
|
||||||
|
|
||||||
|
+ `getTXByAddress(addrs)`
|
||||||
|
+ `getMetaByAddress(addrs)`
|
||||||
|
|
||||||
## v1.0.0
|
## v1.0.0
|
||||||
|
|
||||||
### Migration
|
### Migration
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user