Mantlemint
Note: Mantlemint is currently in beta. This means some of these instructions may not work as expected, or could be subject to change
What is Mantlemint?
Mantlemint is a fast core optimized for serving massive user queries. A mantlemint node will perform 3-4x more queries than a standard Secret Node.
Native query performance on RPC is slow and is not suitable for massive query handling, due to the inefficiencies introduced by IAVL tree. Mantlemint is running on fauxMerkleTree mode, basically removing the IAVL inefficiencies while using the same core to compute the same module outputs.
If you are looking to serve any kind of public node accepting varying degrees of end-user queries, it is recommended that you run a mantlemint instance alongside of your RPC. While mantlemint is indeed faster at resolving queries, due to the absence of IAVL tree and native tendermint, it cannot join p2p network by itself. Rather, you would have to relay finalized blocks to mantlemint, using RPC's websocket.
Mantlemint has been adapted for Secret Network from Terra.
Features
Superior LCD performance
With the exception of Tendermint RPC/Transactions.
Super reliable and effective LCD response cache to prevent unnecessary computation for query resolving
Fully archival; historical states are available with
?heightquery parameter.
Prerequisites
Fully synced RPC Node with Websockets available
To start a Mantlemint node, you'll need **** access to at least 1 running RPC node. Since Mantlemint cannot join p2p network by itself, it depends on RPC to receive recently proposed blocks. This RPC node should also have Websockets enabled. Websockets are how Mantlemint receives new blocks after it catches up to the current block.
Minimum Requirements
1TB of storage (recommended SATA or NVMe SSD)
16 GB of RAM (recommended 32 GB)
2 available CPU cores (recommended 4 cores)
Mantlemint can only be ran as a full archive node. For this reason it requires a large amount of storage (as of August 2022 this is currently 450GB).
Setup
1a. Build from source
a. Clone the repository https://github.com/scrtlabs/mantlemint
b. If you haven't already, install golang
c. Run go build -mod=readonly -o build/mantlemint ./sync.go
1b. Run from Binary
If you don't want to compile yourself, you can just download the mantlemint executable built for Ubuntu 20.04
2. Install SGX
Install SGX the same way you would for a node, as described in the Node Setup section
3. Download and unpack the secretd package
secretd package4. Register the node
To allow Mantlemint to sync blocks and run queries that contain encrypted data, we will need to register it.
5. Create a directory for mantlemint data
This directory should be separate from other mantlemint instances or secretd instances
6. Create an app.toml file
Create a config/app.toml file in your mantlemint directory, and set it with a similar app.toml file to what a secretd node uses
Example app.toml file:
7. Download Genesis File
8. Download a snapshot
To start mantlemint, we highly recommend using a snapshot. The earlier one starting from block 3340000. This will save having to switch out mantlemint binaries to account for network upgrades.
To download and unpack a snapshot, use the following command
Make sure the files are unpacked in your chosen mantlemint directory
Pro Tip: Currently Mantlemint is fully archival. That means snapshots are really large. This command will download and unpack the snapshot without having to use twice the storage amount
9. Finally, you run Mantlemint
Now we are ready to run Mantlemint. It's slightly awkward to run as you have to set multiple environment variables, but they're fairly straightforward. An example run command would be -
That's it!
Last updated
Was this helpful?