-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GITBOOK-268: Adding Public Node Snapshot for Cronos
- Loading branch information
1 parent
acac477
commit cb0ced4
Showing
2 changed files
with
67 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
66 changes: 66 additions & 0 deletions
66
for-node-hosts/running-nodes/cronos-mainnet/public-node-sync.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
# Public Node Sync | ||
|
||
## Introduction | ||
|
||
{% hint style="info" %} | ||
Note | ||
|
||
As of `v0.9.0`, we have merged the binary to support both levelDB and rocksDB. Therefore, make sure to select the right[`app-db-backend`](https://github.com/crypto-org-chain/cronos/releases/tag/v1.0.2)in your`app.toml`.  | ||
{% endhint %} | ||
|
||
This guide provides step-by-step instructions to perform a faster sync for Cronosd using Public Node Sync snapshots. Please note that the type of snapshot provided is pruned. If you require more complete data or run a full node, consider using [Quicksync](https://docs.cronos.org/for-node-hosts/running-nodes/cronos-mainnet/quicksync). | ||
|
||
## Step 1: Download Public Node Snapshot | ||
|
||
Users can visit [Public Node Page](https://www.publicnode.com/snapshots#cronos) and download the snapshots for Cronos. Make sure to select “Cronos” and download the `lz4` file.  | ||
|
||
## Step 2: Extract Public Node Snapshot | ||
|
||
To start with Public Node Sync, run `brew install lz4` in a new terminal.  | ||
|
||
## Step 3: Cronosd Setup | ||
|
||
Download the latest version of Cronosd from [Cronos Chain Github](https://github.com/crypto-org-chain/cronos/releases/latest) based on your preferred operating system.  | ||
|
||
Extract the downloaded file (`Cronos_1.3.0_Darwin_arm64.tar.gz` is used as an example). After you download and unzip the `cronosd` to the location you desire. In terminal, change directory to the `bin` folder, where `cronosd` is located.  | ||
|
||
Follow the step from [Step 2-1 Initialize and Step 2-2 Configure cronosd](https://docs.cronos.org/for-node-hosts/running-nodes/cronos-mainnet#step-2-1-initialize-cronosd) to initialize and setup `cronosd`.  | ||
|
||
Make sure you also implement the changes from [Step 0 : Notes on Network Upgrade](https://docs.cronos.org/for-node-hosts/running-nodes/cronos-mainnet#step-0-notes-on-network-upgrade), and add these config items from [`v0.7.0`](https://github.com/crypto-org-chain/cronos/releases/tag/v0.7.0) into `app.toml` before upgrade: | ||
|
||
<pre class="language-bash"><code class="lang-bash">### JSON RPC Configuration ### | ||
<strong>[json-rpc] | ||
</strong>feehistory-cap = 100 | ||
logs-cap = 10000 | ||
block-range-cap = 10000 | ||
http-timeout="30s" | ||
http-idle-timeout="120s" | ||
|
||
### EVM Configuration ### | ||
[evm] | ||
max-tx-gas-wanted=500000 | ||
</code></pre> | ||
|
||
 Perform [Run Everything](https://docs.cronos.org/for-node-hosts/running-nodes/cronos-mainnet#step-3.-run-everything), `Cronosd` should be able to sync.  | ||
|
||
## Step 4: Extract Data from the Public Node Sync Snapshot | ||
|
||
After you successfully start `cronosd`, you should find a new folder named `.cronos` under `/Users/<username>.` Move the `.lz4` snapshot file (e.g., `Cronos-pruned-15250257-15250267.tar.lz4`) into the `.cronos` directory. \ | ||
\ | ||
Decompress with `lz4` and `tar` by: | ||
|
||
```bash | ||
lz4 -d Users/<username>/.cronos/Cronos-pruned-15250257-15250267.tar.lz4 | tar -xv | ||
``` | ||
|
||
{% hint style="info" %} | ||
Note | ||
|
||
All of the above files should be extracted to `/Users/<username>/.cronos/data` | ||
{% endhint %} | ||
|
||
## Step 5: Run Cronosd  | ||
|
||
Now your `cronosd` is updated to the latest height as the Public Node Sync file, you can run the node now with `cronosd start`.  | ||
|
||
That's it! You are now running a synced node on Cronos mainnet.  |