You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Include UTxO HD installation/usage instructions in READMEs
* Added installation/usage instructions for UTxO HD to top-level README,
installation instructions, and node config file instructions.
* More documentation for `defaultLMDBLimits`.
* Other change: Parsing behaviour for LMDB mapsize should now allow
parsing more types of units. The previous parsing behaviour would only
parse 1024-based units such Mebibytes, Gibibytes, etc. Now, we can also
provide 1000-based units, for example.
* Fixed Redhat/Fedora/CentOS installation instructions, which was
missing an instruction to install OpenSSL libraries, amongst others.
* Crudely updated the Windows installation instructions.
* ``--topology`` - Filepath to a topology file describing which peers the node should connect to.
@@ -128,6 +130,12 @@ The general synopsis is as follows:
128
130
129
131
* ``--validate-db`` - Flag to revalidate all on-disk database files
130
132
133
+
* ``--in-memory-ledger-db-backend`` - Optionally use the in-memory backend of the UTxO HD feature: store the complete ledger state in memory. Incompatible with ``--lmdb-ledger-db-backend``.
134
+
135
+
* ``--lmdb-ledger-db-backend`` - Optionally use the LMDB backend of the UTxO HD feature: store parts of the ledger state on disk. Incompatible with ``--in-memory-ledger-db-backend``. The node uses the LMDB backend by default if no ``--*-db-backend`` flags are set.
136
+
137
+
* ``--lmdb-mapsize`` - Optionally set the mapsize (maximum database size) for the LMDB backend. By default, the mapsize (maximum database size) of the backend is set to 16 Gigabytes. Warning: if the database size exceeds the given mapsize, the node will abort. Therefore, the mapsize should be set to a value high enough to guarantee that the maximum database size will not be reached during the expected node uptime.
# Building the development version of the Cardano node on Windows
2
2
3
-
This document explains how to build a __DEVELOPMENT__ version of the `cardano-node`.
4
-
Note that this is *not* for building a __PRODUCTION__ version of the node.
3
+
This document explains how to build a __DEVELOPMENT__ version of the `cardano-node`. Note that this is *not* for building a __PRODUCTION__ version of the node.
5
4
6
-
To start building on `Windows`, you will need to install and configure specific tools outlined below. We recommend using [chocolatey](https://chocolatey.org), which provides the `choco` command to install these tools.
5
+
We recommend installing and using `git-bash` for development purposes, which is `git` when installed with `choco install git`.
7
6
8
-
You can run all the instructions that invoke `choco` in PowerShell with root privileges. We recommend installing and using `git-bash` for development purposes, which is `git` when installed with `choco install git`.
9
7
10
-
## Install GHC
8
+
## Install the Haskell environment
11
9
12
-
The recommended way is to run the following command in PowerShell:
10
+
The recommended way to install the Haskell tools is via [GHCup](https://www.haskell.org/ghcup/). Check [this page](https://www.haskell.org/ghcup/install/) for further explanation on the installation process.
13
11
14
-
```PowerShell
15
-
choco install --version 8.10.7 ghc
12
+
Once GHCup is installed, open a new terminal (to get an updated environment) and run:
13
+
14
+
```bash
15
+
ghcup install ghc 8.10.7
16
+
ghcup install cabal 3.6.2.0
17
+
ghcup set ghc 8.10.7
18
+
ghcup set cabal 3.6.2.0
16
19
```
17
20
21
+
Alternatively, with `ghcup tui` you can pick the specific versions of the tools that you want to install, in particular you should have installed and set:
22
+
-`cabal >= 3.6.2.0`
23
+
-`GHC >= 8.10.7`
24
+
18
25
## Install pkg-config
19
26
20
-
```PowerShell
27
+
To start building on `Windows`, you will need to install and configure specific tools outlined below. We recommend using [chocolatey](https://chocolatey.org), which provides the `choco` command to install some of these tools. You can run all the instructions that invoke `choco` in bash with root privileges.
28
+
29
+
```bash
21
30
choco install pkgconfiglite
22
31
```
23
32
24
33
## Install vcpkg
25
34
26
-
You will first need to install `vcpkg` to proceed with `libsodium` library installation (which is the next step).
35
+
You will first need to install `vcpkg` to proceed installing necessary libraries (which is the next step).
27
36
28
-
For this, use `git`(which you can also install using `choco`) and follow [these
For this, use `git`(which you can also install using `choco`) and follow [these instructions](https://github.com/microsoft/vcpkg#quick-start-windows).
30
38
31
-
You can now install `libsodium`with the following command:
39
+
You can now install `libsodium`, `openssl`, `secp256k1` and `lmdb`with the following commands:
To find system dependencies like `libsodium`, `cabal` uses `pkg-config`. On Windows, you will need to create the `libsodium.pc` description file in a correct
39
-
directory.
49
+
To find system dependencies like `libsodium`, `cabal` uses `pkg-config`. On Windows, you will need to create the `libsodium.pc` description file in a correct directory.
> Note that you need to replace `VCPKG_PATH` with the
58
-
absolute path, where you use `vcpkg`, and `LIBSODIUM_VERSION` with the version
59
-
number of `libsodium` which was installed on your system. Please verify that
60
-
the paths above contain
61
-
`libsodium.dll` file and headers.
67
+
> Note that you need to replace `VCPKG_PATH` with the absolute path, where you use `vcpkg`, and `LIBSODIUM_VERSION` with the version number of `libsodium` which was installed on your system. Please verify that the paths above contain `libsodium.dll` file and headers.
68
+
69
+
> Also, you cannot use `prefix=` in the `libsodium.pc` file. This might be changed for some other directory, `pkg-config` provides a switch to use the provided `prefix`, but there is no way to instruct `cabal` to do so.
70
+
71
+
Follow the same procedure of creating `.pc` files for `openssl`, `secp256k1` and `lmdb`.
72
+
73
+
Finally, ensure that
74
+
```
75
+
pkg-config --list-all
76
+
```
77
+
lists all packages: `libsodium`, `openssl`, `secp256k1` and `lmdb`.
62
78
63
-
> Also, you cannot use `prefix=` in the `libsodium.pc` file. This might be changed for
64
-
some other directory, `pkg-config` provides a switch to use the provided
65
-
`prefix`, but there is no way to instruct `cabal` to do so.
66
79
67
80
## `cabal` configuration
68
81
69
-
Go to the directory, where you cloned the `cardano-node` repository and add the command below
70
-
to your `cabal.project.local` file (if you don't already have it, create one):
82
+
Go to the directory, where you cloned the `cardano-node` repository and add the command below to your `cabal.project.local` file (if you don't already have it, create one):
on Windows (which is a limitation of the linker rather than `ghc` itself).
100
107
101
-
You can now verify whether the node runs:
108
+
> Note: using `--builddir /c/dist` with a succinct directory protects you from exceeding the [maximal path size](https://docs.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation) on Windows (which is a limitation of the linker rather than `ghc` itself).
109
+
110
+
You can now verify whether the node runs:
102
111
```bash
103
112
cabal run --builddir /c/dist exe:cardano-node -- run --help
If you are using a different flavor of Linux, you will need to use the correct package manager for your platform instead of `yum` or `apt-get`, and the names of the packages you need to install might differ. On MacOSX, use the Homebrew (`brew`) installer.
Copy file name to clipboardExpand all lines: doc/getting-started/understanding-config-files.md
+16
Original file line number
Diff line number
Diff line change
@@ -355,3 +355,19 @@ It is also possible to have more fine grained control over filtering of trace ou
355
355
}
356
356
}
357
357
```
358
+
359
+
#### UTxO HD
360
+
361
+
The UTxO HD feature of the consensus layer allows parts of the ledger state to be stored on-disk, whereas consensus previously kept the whole ledger state in memory. The node can be configured to use any of two *backends*:
362
+
363
+
* The *LMDB backend*, which is built around a Lightning Memory-Mapped Database (LMDB), stores parts of the ledger state on disk. Optionally, a configuration can be included that sets the mapsize (maximum size) of the on-disk database that is used to store parts of the ledger state. By default, the mapsize is set to 16 Gigabytes. **Warning**: if the database size exceeds the given mapsize, the node will abort. Therefore, the mapsize should be set to a value high enough to guarantee that the maximum database size will not be reached during the expected node uptime.
364
+
```json
365
+
"LedgerDBBackend": "LMDB",
366
+
"LMDBMapSize": "16G",
367
+
```
368
+
* The *InMemory backend* stores parts of the ledger state in memory.
369
+
```json
370
+
"LedgerDBBackend": "InMemory",
371
+
```
372
+
373
+
If no choice of backend is configured, then the node defaults to using the LMDB backend with the *default* mapsize. It is recommended not to opt for the in-memory backend if the machine that is running the node is constrained by the amount of available memory.
0 commit comments