Skip to content

Commit

Permalink
docs: update
Browse files Browse the repository at this point in the history
  • Loading branch information
csgui committed Sep 22, 2023
1 parent 484d2ea commit 52323b8
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 4 deletions.
20 changes: 17 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand All @@ -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.
Expand Down
8 changes: 7 additions & 1 deletion src/event-replay/parquet-based/replay-controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -265,7 +271,7 @@ export class ReplayController {
};

/**
*
* This funtion is responsible to initialize the event-replay process.
*/
do = async () => {
// NEW_BLOCK events
Expand Down

0 comments on commit 52323b8

Please sign in to comment.