-
Notifications
You must be signed in to change notification settings - Fork 69
Blockchains
The blockchain (and wallet) databases for each fork are held in the appdata folder for each Machinaris container, when run as mode=fullnode
(default). Some examples on disk:
- Chia container: ~/.machinaris/mainnet/
- Flax container: ~/.machinaris/flax/mainnet/
- Chives container: ~/.machinaris/chives/mainnet/
When starting with a fresh install of Machinaris, there are 3 ways to get your blockchain database up to fully synced. When synced you will be able to farm plots. By default, the standard sync occurs via connections to peers on the blockchain network.
The default option to sync a blockchain database from the start of the chain, the standard sync proceeds by connecting to peers on the network, each providing small parts of the overall blockchain as it grows. This is much like the bittorrent protocol allows file downloads. Once fully synced and farming, this is also how the fullnode stays synced as transactions are added to the blockchain.
NOTE: This is the safest way to sync your blockchain. However, it can take days to complete from scratch, particularly for the large Chia blockchain.
Alternatively, for users migrating to Machinaris from another Chia installation, it is possible to use your synced blockchain database instead. After initially launching Machinaris the first time, just stop the machinaris
container and then:
rm -rf ~/.machinaris/mainnet/
cp /path/to/your/mainnet ~/.machinaris/
Then start the Machinaris container again. The Chia farming services will use the blockchain and wallet dbs that you have copied over above, also saving days of syncing time.
NOTE: This often works, but is not guaranteed to work. In particular, your database may not be cleanly copied or imported. If errors are encountered, please delete the ~/.machinaris/mainnet folder and perform a standard sync upon restarting Machinaris. You may also need to copy your old config.yaml file from the mainnet/config
folder across, or at least the pool settings within it.
Here's an even more detailed example than above. In this case, the Maize DB must be downloaded via web-browser first:
docker-compose stop machinaris-maize
docker-compose rm -f machinaris-maize
rm -rf ~/.machinaris-maize
mkdir -p ~/.machinaris-maize/maize/mainet/db
mv /PATH/TO/blockchain_v2_mainnet.sqlite ~/.machinaris-maize/maize/mainnet/db/
docker-compose up -d machinaris-maize
docker logs -f machinaris-maize
Then also watch the ~/.machinaris-maize/maize/mainnet/log/debug.log
file as the blockchain starts. Add connections via Machinaris WebUI from https://alltheblocks.net/maize to get over the missing connections issue some blockchains face.
A much faster alternative, often only 30-60 minutes, is for Machinaris to download a fully synced blockchain database automatically on first launch. However, like any Internet file download, there are risks with this approach. For the Chia blockchain database, by far the largest, Machinaris will automatically download from https://sweetchia.com.
Other download sources can be found in each launch script. Currently these blockchains can DB download within Machinaris: Cactus, Chia, Chives, Flax, Flora, HDDCoin, Staicoin, Stor
NOTE: By choosing 'Download New' for the 'Initial Blockchain' choice, you are acknowledging you understand and accept these risks.
CHIA NETWORK INC, CHIA™, the CHIA BLOCKCHAIN™, the CHIA PROTOCOL™, CHIALISP™ and the “leaf Logo” (including the leaf logo alone when it refers to or indicates Chia), are trademarks or registered trademarks of Chia Network, Inc., a Delaware corporation. There is no affiliation between the Machinaris project and the main Chia Network project.