Using an On-disk Transaction Pool
Each instance of Cardano Node uses a temporary, local storage area to store unconfirmed submitted transactions prior to validation and inclusion in a block on the chain. By default, Cardano Node stores pending transactions in memory.
Note | In general, the storage area may be referred to as the mempool. |
Continuing a committment to provide long-term support for smaller, less costly computers, Cardano Node includes functionality to store the pool of pending transactions on disk. While using an on-disk transaction pool significantly reduces memory requirements for Cardano Node, performance is slightly slower.
To enable Cardano Node to use an on-disk transaction pool:
- To stop the Cardano Node instance on the computer where you want to enable an on-disk transaction pool, type the following command using a terminal window:sudo systemctl stop cardano-node.service
- Using a text editor, open the
$NODE_HOME/config*.jsonnode configuration file. - In the node configuration file, add or edit the following lines, where
<DatabasePath>is the absolute path to the directory where you want Cardano Node to store the live transaction pool on disk:"LedgerDB": {"Backend": "V2LSM","lsmDatabasePath": "<DatabasePath>","QueryBatchSize": 100000,"FlushFrequency": 100,"Snapshots": {"NumOfDiskSnapshots": 2,"SlotOffset": 0,"SnapshotInterval": 86400}}, - Save and close the
config*.jsonfile. - To create the directory where Cardano Node stores the live transaction pool, type:mkdir -p <DatabasePath>
- To back up and remove existing ledger snapshots from the copy of the blockchain residing on the local computer, type:cd $NODE_HOMEmkdir ./ledger.bakmv ./db/ledger/* ./ledger.bak
- To restart the Cardano Node instance, type:sudo systemctl start cardano-node.service
Note | Enabling an on-disk transaction pool may require replaying the copy of the blockchain ledger residing on the local computer. |
For more details, see the High Level Overview of UTxO-HD.
