Skip to content

Commit 075a1d9

Browse files
authored
Merge pull request #419 from alephium/config-sample
Document Full Node Config
2 parents 8f8f8f7 + 505b1f5 commit 075a1d9

File tree

2 files changed

+88
-1
lines changed

2 files changed

+88
-1
lines changed

docs/5min-overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ In addition, all the transaction fees are burned with each block and Proof of Le
104104
The Total Supply is calculated by adding the tokens mined at the Genesis Block (see breakdown above) and the block rewards since the Mainnet Launch.
105105

106106
Alephium uses the CMC method to calculate the circulating supply of ALPH. It consists of: the total number of existing ALPH from which is subtracted the balance (locked & unlocked) from the private sale investors, the treasury, ecosystem, the advisors/contractors, the project-controlled assets and all locked ALPH from other addresses.
107-
In general, you can find our circulating supply on the front page of our [explorer](https://explorer.alephium.org/#/blocks). If you want a more in-depth explanation of the Coin Market Cap methodology, find it [here.](https://support.coinmarketcap.com/hc/en-us/articles/360043396252-Supply-Circulating-Total-Max-)
107+
In general, you can find our circulating supply on the front page of our [explorer](https://explorer.alephium.org). If you want a more in-depth explanation of the Coin Market Cap methodology, find it [here.](https://support.coinmarketcap.com/hc/en-us/articles/360043396252-Supply-Circulating-Total-Max-)
108108

109109
If you need the endpoints, find them here: [Total Supply](https://mainnet-backend.alephium.org/infos/supply/total-alph) = [Circulating Supply](https://mainnet-backend.alephium.org/infos/supply/circulating-alph) + [Reserved Supply](https://mainnet-backend.alephium.org/infos/supply/reserved-alph) + [Locked ALPH](https://mainnet-backend.alephium.org/infos/supply/locked-alph)
110110

docs/full-node/config.md

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
---
2+
sidebar_position: 12
3+
title: Configuration
4+
sidebar_label: Configuration
5+
---
6+
7+
The configuration of an Alephium full node can be tailored to your
8+
specific use case. To customize the settings, you can add key-value
9+
pairs to the `user.conf` file in
10+
[HOCON](https://github.com/lightbend/config/blob/main/HOCON.md)
11+
format.
12+
13+
## Examples
14+
15+
### Non-mining Node
16+
17+
For full node that validates transactions and blocks but doesn't
18+
engage in mining process, the default configurations are generally
19+
good enough, there is usually no need to customize anything.
20+
21+
### Support dApps
22+
23+
To support development and operation of dApps, it's recommended to
24+
enable persistence of [contract events](/sdk/events/#contract-events):
25+
26+
```
27+
alephium.node.event-log.enabled=true
28+
alephium.node.event-log.index-by-tx-id = true
29+
alephium.node.event-log.index-by-block-hash = true
30+
```
31+
32+
You can read more about the events configuration
33+
[here](/sdk/events/#configuration). By default, contract events are
34+
turned off to improve storage efficiency.
35+
36+
For public nodes, it is also recommended to enable [API
37+
key](/full-node/full-node-more#api-key) to control access to your full
38+
node's rest endpoints:
39+
40+
```
41+
alephium.api.api-key = "<YOUR KEY with 32+ characters>"
42+
```
43+
44+
### Mining Pool & Miners
45+
46+
Miners needs to [set up mining
47+
addresses](/mining/solo-mining-guide#miner-wallet) to begin
48+
mining. It is also preferrable to set up external address for the node
49+
to enhance discoverability:
50+
51+
```
52+
alephium.network.external-address = "x.x.x.x:9973" // Put your public IP here for better discovery
53+
alephium.mining.miner-addresses = ["1AuWeE5Cwt2ES3473qnpKFV96z57CYL6mbTY7hva9Xz3h", "12sxfxraVoU8FcSVd7P2SVr2cd2vi8d17KtrprrL7cBbV", "1E3vV7rFCgq5jo4NszxH5PqzyxvNXH5pvk2aQfMwmSxPB", "147nW43BH137TYjqEnvA9YfH1oFXKQxcvLZFwZauo7Ahy"]
54+
```
55+
56+
For mining pools, you can add the following lines in `user.conf` as
57+
well to have better block propagation:
58+
59+
```
60+
alephium.network.max-outbound-connections-per-group = 48
61+
alephium.network.max-inbound-connections-per-group = 256
62+
```
63+
64+
### Docker Environment
65+
66+
For docker environment, it's recommended to mount the local
67+
`user.conf` file into the container:
68+
69+
```yaml
70+
volumes:
71+
- ./user.conf:/alephium-home/.alephium/user.conf
72+
```
73+
74+
## Main Settings
75+
76+
| Setting | Description |
77+
|---------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
78+
| alephium.network.network-id | `0` for Mainnet, `1` for Testnet, `2` for Devnet. Default is `0`. |
79+
| alephium.network.external-address | External address of the full node to enhance discoverability |
80+
| alephium.api.api-key-enabled | `true` to enable API key for full node's API endpoints. |
81+
| alephium.api.api-key | 32+ characters API key. |
82+
| alephium.node.event-log.enabled | `true` to enable storing contract events, so we can query or subscribe events based on contract address. Default is `false`. |
83+
| alephium.node.event-log.contract-addresses | A list of addresses whose events will be stored. By default, it is `[]`, which means the events for all contracts will be stored if `alephium.node.event-log.enabled` is enabled. |
84+
| alephium.node.event-log.index-by-tx-id | `true` to enable querying events based on transaction id. Default is `false`. |
85+
| alephium.node.event-log.index-by-block-hash | `true` to enable querying events based on block hash. Default is `false`. |
86+
| alephium.wallet.enable | `true` to enable node wallet. Default is `true`. |
87+
| alephium.wallet.locking-timeout | Time of inactivity before node wallet is locked. |

0 commit comments

Comments
 (0)