forked from cerc-io/ipld-eth-server
Update date-syncing doc
This commit is contained in:
parent
4580f0fc2e
commit
481988cb08
@ -7,10 +7,21 @@ Syncs block headers from a running Ethereum node into the VulcanizeDB table `hea
|
|||||||
- Validates headers from the last 15 blocks to ensure that data is up to date.
|
- Validates headers from the last 15 blocks to ensure that data is up to date.
|
||||||
- Useful when you want a minimal baseline from which to track targeted data on the blockchain (e.g. individual smart contract storage values or event logs).
|
- Useful when you want a minimal baseline from which to track targeted data on the blockchain (e.g. individual smart contract storage values or event logs).
|
||||||
|
|
||||||
##### Usage
|
#### Usage
|
||||||
1. Start Ethereum node.
|
- Run: `./vulcanizedb headerSync --config <config.toml> --starting-block-number <block-number>`
|
||||||
1. In a separate terminal start VulcanizeDB:
|
- The config file must be formatted as follows, and should contain an ipc path to a running Ethereum node:
|
||||||
`./vulcanizedb headerSync --config <config.toml> --starting-block-number <block-number>`
|
```toml
|
||||||
|
[database]
|
||||||
|
name = "vulcanize_public"
|
||||||
|
hostname = "localhost"
|
||||||
|
user = "vulcanize"
|
||||||
|
password = "vulcanize"
|
||||||
|
port = 5432
|
||||||
|
|
||||||
|
[client]
|
||||||
|
ipcPath = <path to a running Ethereum node>
|
||||||
|
```
|
||||||
|
- Alternatively, the ipc path can be passed as a flag instead `--client-ipcPath`.
|
||||||
|
|
||||||
## sync
|
## sync
|
||||||
Syncs blocks, transactions, receipts and logs from a running Ethereum node into VulcanizeDB tables named
|
Syncs blocks, transactions, receipts and logs from a running Ethereum node into VulcanizeDB tables named
|
||||||
@ -19,21 +30,47 @@ Syncs blocks, transactions, receipts and logs from a running Ethereum node into
|
|||||||
- Validates headers from the last 15 blocks to ensure that data is up to date.
|
- Validates headers from the last 15 blocks to ensure that data is up to date.
|
||||||
- Useful when you want to maintain a broad cache of what's happening on the blockchain.
|
- Useful when you want to maintain a broad cache of what's happening on the blockchain.
|
||||||
|
|
||||||
##### Usage
|
#### Usage
|
||||||
1. Start Ethereum node (**if fast syncing your Ethereum node, wait for initial sync to finish**).
|
- Run `./vulcanizedb sync --config <config.toml> --starting-block-number <block-number>`
|
||||||
1. In a separate terminal start VulcanizeDB:
|
- The config file must be formatted as follows, and should contain an ipc path to a running Ethereum node:
|
||||||
`./vulcanizedb sync --config <config.toml> --starting-block-number <block-number>`
|
```toml
|
||||||
|
[database]
|
||||||
|
name = "vulcanize_public"
|
||||||
|
hostname = "localhost"
|
||||||
|
user = "vulcanize"
|
||||||
|
password = "vulcanize"
|
||||||
|
port = 5432
|
||||||
|
|
||||||
|
[client]
|
||||||
|
ipcPath = <path to a running Ethereum node>
|
||||||
|
```
|
||||||
|
- Alternatively, the ipc path can be passed as a flag instead `--client-ipcPath`.
|
||||||
|
|
||||||
|
*Please note, that if you are fast syncing your Ethereum node, wait for the initial sync to finish.*
|
||||||
|
|
||||||
## coldImport
|
## coldImport
|
||||||
Syncs VulcanizeDB from Geth's underlying LevelDB datastore and persists Ethereum blocks,
|
Syncs VulcanizeDB from Geth's underlying LevelDB datastore and persists Ethereum blocks,
|
||||||
transactions, receipts and logs into VulcanizeDB tables named `blocks`, `uncles`,
|
transactions, receipts and logs into VulcanizeDB tables named `blocks`, `uncles`,
|
||||||
`full_sync_transactions`, `full_sync_receipts` and `logs` respectively.
|
`full_sync_transactions`, `full_sync_receipts` and `logs` respectively.
|
||||||
|
|
||||||
##### Usage
|
#### Usage
|
||||||
1. Assure node is not running, and that it has synced to the desired block height.
|
1. Ensure the Ethereum node you're point at is not running, and that it has synced to the desired block height.
|
||||||
1. Start vulcanize_db
|
1. Run `./vulcanizedb coldImport --config <config.toml>`
|
||||||
- `./vulcanizedb coldImport --config <config.toml>`
|
|
||||||
1. Optional flags:
|
1. Optional flags:
|
||||||
- `--starting-block-number <block number>`/`-s <block number>`: block number to start syncing from
|
- `--starting-block-number <block number>`/`-s <block number>`: block number to start syncing from
|
||||||
- `--ending-block-number <block number>`/`-e <block number>`: block number to sync to
|
- `--ending-block-number <block number>`/`-e <block number>`: block number to sync to
|
||||||
- `--all`/`-a`: sync all missing blocks
|
- `--all`/`-a`: sync all missing blocks
|
||||||
|
|
||||||
|
The config file can be formatted as follows, and must contain the LevelDB path.
|
||||||
|
|
||||||
|
```toml
|
||||||
|
[database]
|
||||||
|
name = "vulcanize_public"
|
||||||
|
hostname = "localhost"
|
||||||
|
user = "vulcanize"
|
||||||
|
password = "vulcanize"
|
||||||
|
port = 5432
|
||||||
|
|
||||||
|
[client]
|
||||||
|
leveldbpath = "/Users/user/Library/Ethereum/geth/chaindata"
|
||||||
|
```
|
||||||
|
Loading…
Reference in New Issue
Block a user