mirror of
https://github.com/alexgo-io/stacks-blockchain-api.git
synced 2026-01-12 16:53:19 +08:00
docs: update
This commit is contained in:
20
README.md
20
README.md
@@ -111,9 +111,23 @@ The feature can be used via program args. For example, if there are breaking cha
|
||||
SQL schema, like adding a new column that requires events to be re-played, the following steps
|
||||
could be run:
|
||||
|
||||
### Event Replay Instructions
|
||||
### Event Replay V2
|
||||
|
||||
#### V1 BNS Data
|
||||
This version of the replay process relies on parquet files processing instead of TSV files.
|
||||
|
||||
There are some improvements on the replay process and this version is is, around, 10x times faster than the previous (V1) one.
|
||||
|
||||
__Note: the previous event-replay version is still available and can be used as well, for the same purpose.__
|
||||
|
||||
#### Instructions
|
||||
|
||||
To run the new event-replay, please follow the instructions at [stacks-event-replay](https://github.com/hirosystems/stacks-event-replay#installation) repository.
|
||||
|
||||
### Event Replay V1
|
||||
|
||||
#### Instructions
|
||||
|
||||
##### V1 BNS Data
|
||||
|
||||
**Optional but recommended** - If you want the V1 BNS data, there are going to be a few extra steps:
|
||||
|
||||
@@ -139,7 +153,7 @@ could be run:
|
||||
```
|
||||
1. Set the data's location as the value of `BNS_IMPORT_DIR` in your `.env` file.
|
||||
|
||||
#### Export and Import
|
||||
##### Export and Import
|
||||
|
||||
1. Ensure the API process is not running. When stopping the API, let the process exit gracefully so
|
||||
that any in-progress SQL writes can finish.
|
||||
|
||||
@@ -18,6 +18,12 @@ const cluster = (_cluster as unknown) as _cluster.Cluster; // typings fix
|
||||
import { FILE_PATH as raw_worker_path } from './workers/raw-worker';
|
||||
import { FILE_PATH as new_block_worker_path } from './workers/new-block-worker';
|
||||
|
||||
/**
|
||||
* This class is an entry point for the event-replay based on parquet files,
|
||||
* being responsible to start the replay process (check "do" method).
|
||||
*
|
||||
* It also has functions to prepare and finalize the database for an event-replay.
|
||||
*/
|
||||
export class ReplayController {
|
||||
private readonly db;
|
||||
private readonly dataset;
|
||||
@@ -265,7 +271,7 @@ export class ReplayController {
|
||||
};
|
||||
|
||||
/**
|
||||
*
|
||||
* This funtion is responsible to initialize the event-replay process.
|
||||
*/
|
||||
do = async () => {
|
||||
// NEW_BLOCK events
|
||||
|
||||
Reference in New Issue
Block a user