generated from readthedocs/tutorial-template
-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ab29104
commit 5b81f6c
Showing
1 changed file
with
42 additions
and
90 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,107 +1,59 @@ | ||
# Ergo Full Node Manual Installation | ||
# Ergo Full Node Installation Guide | ||
|
||
## Initial Setup | ||
## Getting Started | ||
|
||
### Download the Ergo Client | ||
### Preparing Your Environment | ||
|
||
Initiate the process by establishing a designated folder (e.g., `~/ergo`) for the node operation and download the latest [Ergo client release](https://github.com/ergoplatform/ergo/releases/) `.jar` file. Alternatively, clone the Ergo repository and compile the `.jar` file from the source using [SBT](https://www.scala-sbt.org/) (`sbt assembly` command), or via [Docker](docker.md). | ||
1. **Create a Folder**: Start by creating a folder where you will keep all files related to your Ergo node. A good example is creating a folder named `ergo` in your home directory. | ||
|
||
### Create a configuration file | ||
2. **Download or Build the Ergo Client**: | ||
- **Download**: Visit the [Ergo GitHub releases page](https://github.com/ergoplatform/ergo/releases/) and download the latest `.jar` file. | ||
- **Build from Source**: If you prefer, you can clone the Ergo repository and compile the `.jar` file yourself using [SBT](https://www.scala-sbt.org/) by running `sbt assembly`. Alternatively, you can set up using Docker by following the guide in [Docker setup](docker.md). | ||
|
||
/// details | ergo.conf | ||
{type: note, open: false} | ||
The filename `ergo.conf` can be modified as desired. This file is a repository for all configuration parameters, and only parameters differing from the default values need to be overwritten. | ||
/// | ||
### Setting Up Your Node | ||
|
||
1. **Create a Configuration File**: In the `ergo` folder, create a text file named `ergo.conf`. This file will contain settings for your node. Only override the default values if necessary. | ||
|
||
Subsequently, create an `ergo.conf` configuration file in the same directory as the `.jar` file, containing the following: | ||
/// details | ergo.conf | ||
{type: note, open: false} | ||
You can rename `ergo.conf` to any name you prefer. This file should include any settings you want to change from their default values. | ||
/// | ||
|
||
```bash | ||
ergo { | ||
node { | ||
mining = false | ||
Start with this basic configuration: | ||
```bash | ||
ergo { | ||
node { | ||
mining = false | ||
} | ||
} | ||
} | ||
``` | ||
|
||
Launch the node with the command: | ||
|
||
```bash | ||
java -jar -Xmx4G ergo-*.jar --mainnet -c ergo.conf | ||
``` | ||
|
||
See [this page](node-faq.md#java) for getting setup with java. | ||
|
||
|
||
/// details | -Xmx Flag | ||
{type: tip, open: false} | ||
|
||
* The `-Xmx4G` flag determines the JVM's max heap size; recommended setting is `4-6G` based on available memory. | ||
* During the initial syncing process, allocate more memory using `-Xmx4g`. Upon completion of the syncing process, reduce this to `-Xmx1g`. | ||
/// | ||
Following the execution of this command, the node will commence syncing. Wait for the API initialization before proceeding to the next step. | ||
|
||
|
||
--- | ||
|
||
## API Security | ||
|
||
### Generate Secret Password | ||
|
||
To secure the API, set a unique and robust secret password (avoid using the demonstration secret `hello`). | ||
|
||
### Compute Secret's Hash | ||
|
||
Use the API at [127.0.0.1:9053/swagger#/utils/hashBlake2b](http://127.0.0.1:9053/swagger#/utils/hashBlake2b) to compute your secret's `Blake2b` hash. | ||
|
||
> **Note:** Ensure the `.jar` file is actively running to access the API at `127.0.0.1`, which denotes your local machine. | ||
![Compute Hash of secret](https://user-images.githubusercontent.com/23208922/69916676-ed233400-1483-11ea-8582-f61c38478d31.png) | ||
|
||
### Update Configuration File | ||
|
||
After obtaining the hash response, input it into the `ergo.conf` file. For instance, the `Blake2b` hash of `hello` is `324dcf027dd4a30a932c441f365a25e86b173defa4b8e58948253471b81b72cf`. | ||
|
||
![response](https://user-images.githubusercontent.com/23208922/69916509-c3690d80-1481-11ea-869f-630cd59cc525.png) | ||
|
||
Update the configuration file with the API key hash: | ||
|
||
```bash | ||
ergo { | ||
node { | ||
mining = false | ||
} | ||
} | ||
|
||
scorex { | ||
restApi { | ||
apiKeyHash = "324dcf027dd4a30a932c441f365a25e86b173defa4b8e58948253471b81b72cf" | ||
} | ||
} | ||
``` | ||
|
||
Restart the node to initiate syncing and enable API access. | ||
|
||
--- | ||
|
||
## Node Synchronization Verification | ||
|
||
During synchronization, the panel displays "Active synchronization". | ||
|
||
![active synchronization](https://user-images.githubusercontent.com/23208922/71128146-94d58b80-2212-11ea-9010-5b61a91e8549.png) | ||
scorex { | ||
restApi { | ||
apiKeyHash = "324dcf027dd4a30a932c441f365a25e86b173defa4b8e58948253471b81b72cf" | ||
} | ||
} | ||
``` | ||
|
||
Upon completion of synchronization, the panel updates to "Node is synced". | ||
2. **Launch Your Node**: Open a command line in your `ergo` folder and run the following command: | ||
```bash | ||
java -jar -Xmx4G ergo-*.jar --mainnet -c ergo.conf | ||
``` | ||
|
||
![synced](https://user-images.githubusercontent.com/23208922/71301767-8da4ae00-23c9-11ea-8fc0-a92a9d78b821.png) | ||
/// details | -Xmx Flag | ||
{type: tip, open: false} | ||
The `-Xmx4G` command sets the maximum amount of memory the node can use to 4 GB. Adjust this value based on your computer's available memory. | ||
/// | ||
3. **Wait for Initialization**: Once you run the command, your node will start syncing with the Ergo network. This process can take some time, so patience is key. | ||
Additional verification can be performed at [127.0.0.1:9053/info](http://127.0.0.1:9053/info) by comparing the block height to the latest block height at [explorer.ergoplatform.com](https://explorer.ergoplatform.com/en/). | ||
## Verifying Node Synchronization | ||
--- | ||
1. **Monitor Synchronization**: Go to `127.0.0.1:9053/panel` in your web browser to see if your node is actively syncing. It should say "Active synchronization." | ||
2. **Check Sync Status**: Once synchronization is complete, the panel will indicate "Node is synced." You can also check `127.0.0.1:9053/info` to compare the block height with what is reported on [Ergo Explorer](https://explorer.ergoplatform.com/en/). | ||
## Additional Resources | ||
## Resources | ||
- [Troubleshooting Guide](troubleshooting.md) | ||
- [Frequently Asked Questions (FAQ)](node-faq.md) | ||
- [Using the TestNet Tutorial](testnet.md) | ||
* [Troubleshooting Guide](troubleshooting.md) | ||
* [Frequently Asked Questions (FAQ)](node-faq.md) | ||
* [Using the TestNet Tutorial](testnet.md) |