modified: Altcoin-and-Forkcoin-Support.md

modified:   Install-MMGen-on-Debian-or-Ubuntu-Linux.md
modified:   Install-MMGen-on-Microsoft-Windows.md
modified:   MMGen-Quick-Start-with-Regtest-Mode.md
modified:   Test-Suite.md
The MMGen Project 2021-10-06 21:10:46 +00:00
commit 890b9bf477
Signed by: mmgen
GPG key ID: 3F8B1861E32B7DA2
5 changed files with 255 additions and 228 deletions

@ -1,67 +1,75 @@
## Table of Contents
#### [Full support for Ethereum (ETH), Ethereum Classic (ETC) and ERC20 Tokens](#a_eth)
* [Install and run OpenEthereum](#a_oe)
* [Install Ethereum dependencies](#a_ed)
***NOTE: the following instructions apply to the current master branch. If
you’re running the stable version of MMGen, check out the stable tag and
refer to the version of this file located in `doc/wiki/using-mmgen`.***
#### [Introduction](#a_g)
#### [Ethereum (ETH), Ethereum Classic (ETC) and ERC20 Tokens](#a_eth)
* [Install the Ethereum dependencies](#a_ed)
* [Install and run Geth or OpenEthereum](#a_oe)
* [Transacting and other basic operations](#a_tx)
* [Creating and deploying ERC20 tokens](#a_dt)
#### [Full support for Bitcoin Cash Node (BCH) and Litecoin](#a_bch)
#### [Bitcoin Cash Node (BCH) and Litecoin (LTC)](#a_bch)
#### [Monero (XMR)](#a_xmr)
#### [Key/address generation for Zcash (ZEC)](#a_zec)
#### [Key/address generation and wallet creation/syncing for Monero (XMR)](#a_xmr)
#### [Key/address generation for 144 Bitcoin-derived altcoins](#a_kg)
#### [Key/address generation support for 144 Bitcoin-derived altcoins](#a_kg)
### <a name='a_g'>Introduction</a>
### <a name='a_eth'>Full support for Ethereum (ETH), Ethereum Classic (ETC) and ERC20 Tokens</a>
Depending on your setup, the instructions on this page may apply to your
offline machine, your online machine, or both. If you’re confused as to
which, please familiarize yourself with the basics of MMGen by reading the
[**Getting Started**][gs] guide.
Ethereum, Ethereum Classic and ERC20 tokens are fully supported by MMGen, on the
same level as Bitcoin. In addition, ERC20 token creation and deployment are
supported via the `create-token.py` script.
### <a name='a_eth'>Ethereum (ETH), Ethereum Classic (ETC) and ERC20 Tokens</a>
#### <a name='a_oe'>Install and run OpenEthereum</a>
MMGen supports all operations for Ethereum, Ethereum Classic and ERC20 tokens.
In addition, ERC20 token creation and deployment are supported via the
`create-token.py` script.
MMGen uses OpenEthereum to communicate with the Ethereum blockchain. For
information on installing OpenEthereum on your system, visit the OpenEthereum
[wiki][ow] or [Git repository][og]. OpenEthereum is not used for transaction
signing, so you needn’t install it on your offline machine.
#### <a name='a_ed'>Install the Ethereum dependencies</a>
OpenEthereum has dropped support for Ethereum Classic, so MMGen now supports
transacting this coin via the legacy [Parity][pd] daemon. Invoke parity with
`--chain=classic --ports-shift=100`. Other command-line options are the same
as for OpenEthereum.
From the MMGen repository root, type:
If you’re running your daemon and MMGen on different machines, add the
$ pip3 install --no-deps --user -r eth-requirements.txt
#### <a name='a_oe'>Install and run Geth or OpenEthereum</a>
MMGen can use either Go-Ethereum (Geth) or OpenEthereum to communicate with
the Ethereum network. For information on installing Geth or OE on your
system, visit the the Geth [Github repo][ge], or the OpenEthereum [wiki][ow]
or [Github repo][og]. The daemons are not used for transaction signing, so
you needn’t install them on your offline machine.
For Geth, the following command-line options are required:
--http --http.api=eth,web3,txpool --http.port=8745
Geth and OE have dropped support for Ethereum Classic, but MMGen supports
transacting ETC via the legacy [Parity][pd] daemon. Invoke Parity with
`--chain=classic --jsonrpc-port=8645`. Other command-line options are the
same as for OpenEthereum.
If you’re running OE or Parity on a different machine from MMGen, add the
following options to the daemon command line:
--jsonrpc-hosts=all --jsonrpc-interface=<IP of OpenEthereum’s host>
--jsonrpc-hosts=all --jsonrpc-interface=<daemon IP address>
To run the daemon offline, use `--mode=offline`, otherwise `--mode=active`.
To run OE or Parity offline, use `--mode=offline`, otherwise `--mode=active`.
MMGen can also be used with Parity’s light client mode, which queries other
nodes on the network for blockchain data. Add the `--light` option to the
Parity command line and read the applicable note in the [Transacting](#a_tx)
section below.
You may require other options as well. Consult `openethereum --help` or
`parity --help` for the full list.
#### <a name='a_ed'>Install Ethereum dependencies</a>
Ensure that Python version 3.6 or above is installed on your system:
$ python3 --version
If the version is below 3.6.0, then you must upgrade the Python interpreter and
Python dependencies listed in the [Install wiki][iw] before proceeding. Ubuntu
users can do this by adding the Bionic repository to 'sources.list' and
reinstalling the relevant packages with '-t bionic'
Install the Ethereum-specific Python dependencies. The `--no-deps` option
will prevent pip from installing a lot of unneeded stuff:
$ sudo -H pip3 install --no-deps py_ecc==1.6.0 mypy_extensions==0.4.1
You may require other options as well. Invoke your daemon with the `--help`
switch for more complete information.
#### <a name='a_tx'>Transacting and other basic operations</a>
@ -84,8 +92,8 @@ Basic operations with ETH, ETC and ERC20 tokens work as described in the
##### Transacting example:
*Note: All addresses and filenames in the examples to follow are bogus. You
must replace them with real ones.*
*Note: All addresses and filenames in the examples to follow are bogus and
must be replaced with real ones.*
Generate some ETH addresses with your default wallet:
@ -127,44 +135,23 @@ To transact ETH instead of EOS, omit the `--token` and `--token-addr` arguments.
##### Install the Solidity compiler
To deploy Ethereum contracts with MMGen, you need between **v0.5.1** and
**v0.5.3** of the the Solidity compiler (`solc`) installed on your system. The
best way to ensure you have the correct version is to compile it from source.
Alternatively, on Ubuntu 18.04 systems a binary distribution is also available.
Instructions for installing it are provided below.
##### *To compile solc from source:*
To deploy Ethereum contracts with MMGen, you need version **0.8.7** of the
Solidity compiler (`solc`) installed on your system. Although binary builds
may be available for some distributions, the best way to ensure you have the
correct version is to compile it from source.
Clone the repository and build:
$ git clone --recursive https://github.com/ethereum/solidity.git
$ cd solidity
$ git checkout v0.5.1 # or v0.5.3, if not Raspbian Stretch
$ ./scripts/install_deps.sh # Raspbian Stretch: add `DISTRO='Debian'` after line 55
$ git checkout v0.8.7
$ ./scripts/install_deps.sh
$ mkdir build
$ cd build
$ cmake -DUSE_CVC4=OFF -DUSE_Z3=OFF ..
$ make solc
$ make -j4 solc
$ sudo install -v --strip solc/solc /usr/local/bin
##### *To install solc from binary distribution (Ubuntu 18.04):*
First add the following line to your /etc/apt/sources.list:
deb http://ppa.launchpad.net/ethereum/ethereum/ubuntu bionic main
Now obtain the Ethereum PPA key `2A518C819BE37D2C2031944D1C52189C923F6CA9`
from a PGP keyserver using your method of choice. Save the key to file, and
then add it to your APT keyring as follows:
$ sudo apt-key add <key file>
Now you can proceed with the install:
$ sudo apt-get update
$ sudo apt-get install solc
$ solc --version # make sure the version is correct!
##### Create and deploy a token
*Note: All addresses and filenames in the examples to follow are bogus. You
@ -195,10 +182,10 @@ View your MFT tracking wallet:
$ mmgen-tool --coin=eth --token=mft twview
Other token parameters can also be customized. Type `scripts/create-token.py --help`
Other token parameters can be customized too. Type `scripts/create-token.py --help`
for details.
### <a name='a_bch'>Full support for Bitcoin Cash Node (BCH) and Litecoin</a>
### <a name='a_bch'>Bitcoin Cash Node (BCH) and Litecoin (LTC)</a>
Bitcoin Cash Node (BCH) and Litecoin are fully supported by MMGen, on the same
level as Bitcoin.
@ -214,6 +201,50 @@ MMGen requires that the bitcoin-bchn daemon be listening on non-standard
Then just add the `--coin=bch` or `--coin=ltc` option to all your MMGen
commands. It’s that simple!
### <a name='a_xmr'>Monero (XMR)</a>
MMGen’s Monero support includes automated wallet creation/syncing and
transaction creation/relaying via the `mmgen-xmrwallet` command. Make sure
that [Monerod][M] is installed and running and that `monero-wallet-rpc` is
located in your executable path.
*NOTE: by storing the Monero blockchain on a removable drive and installing
Monerod on both your online and offline machines, it’s possible to perform
wallet and transaction creation operations offline and thus avoid exposing
private data on your online machine.*
To generate five Monero key/address pairs from your default wallet, invoke the
following, making sure to answer ‘y’ at the Encrypt prompt:
$ mmgen-keygen --coin=xmr 1-5
In addition to spend and view keys, the resulting key/address file also
includes a wallet password for each address (the double SHA256 hash of the
spend key, truncated to 16 bytes).
Now create a Monero wallet for each address in the file by invoking the
following command:
$ mmgen-xmrwallet create *XMR*.akeys.mmenc
Each wallet will be uniquely named using the address index and encrypted with
the address’ unique wallet password. No user interaction is required during
the creation process. By default, wallets are synced to the current block
height, as they’re assumed to be empty, but this behavior can be overridden:
$ mmgen-xmrwallet --restore-height=123456 create *XMR*.akeys.mmenc
To keep your wallets in sync as the Monero blockchain grows, use the `sync`
subcommand:
$ mmgen-xmrwallet sync *XMR*.akeys.mmenc
No user interaction is required here either, which is very helpful when you
have multiple wallets requiring long sync times.
`mmgen-xmrwallet` supports transacting via the `sweep` and `transfer`
subcommands. Type `mmgen-xmrwallet --help` for details.
### <a name='a_zec'>Key/address generation for Zcash (ZEC)</a>
MMGen’s enhanced support for Zcash includes generation of **z-addresses.**
@ -233,56 +264,7 @@ To generate Zcash t-addresses, just omit the `--type` argument:
$ mmgen-keygen --coin=zec 1-10
### <a name='a_xmr'>Key/address generation and wallet creation/syncing for Monero (XMR)</a>
Generate ten Monero key/address pairs from your default wallet:
$ mmgen-keygen --coin=xmr 1-10
MMGen’s enhanced support for Monero includes automated Monero wallet creation
and syncing tools.
*Note that the use of these tools requires private data to be exposed on a
network-connected machine in order to unlock the Monero wallets, which is a
violation of MMGen’s security policy.*
Install the following dependencies:
$ sudo -H pip3 install pysha3
$ sudo -H pip3 install ed25519ll # optional, but greatly speeds up address generation
In addition to spend and view keys, Monero key/address files also include a
wallet password for each address (the password is the double SHA256 of the spend
key, truncated to 16 bytes). This allows you to generate a wallet from each
key in the key/address file by running the following command:
$ monero-wallet-cli --generate-from-spend-key MyMoneroWallet
and pasting in the key and password data when prompted. [Monerod][M] must be
installed and running and `monero-wallet-cli` be located in your executable
path. Launch monerod with the `--bg-mining-enable` switch.
To save your time and labor, the `mmgen-tool` utility includes a command that
completely automates this process:
$ mmgen-tool keyaddrlist2monerowallets *XMR*.akeys.mmenc
This will generate a uniquely-named Monero wallet for each key/address pair in
the key/address file and encrypt it with its respective password. No user
interaction is required. By default, wallets are synced to the current block
height, as they’re assumed to be empty, but this behavior can be overridden:
$ mmgen-tool keyaddrlist2monerowallets *XMR*.akeys.mmenc blockheight=123456
To keep your wallets in sync as the Monero blockchain grows, `mmgen-tool`
includes another utility:
$ mmgen-tool syncmonerowallets *XMR*.akeys.mmenc
This command also requires no user interaction, a very handy feature when you
have a large batch of wallets requiring long sync times.
### <a name='a_kg'>Key/address generation support for 144 Bitcoin-derived altcoins</a>
### <a name='a_kg'>Key/address generation for 144 Bitcoin-derived altcoins</a>
To generate key/address pairs for these coins, just specify the coin’s symbol
with the `--coin` argument:
@ -327,8 +309,9 @@ the MMGen Project.
[M]: https://getmonero.org/downloads/#linux
[U]: https://github.com/mmgen/MMGenLive/blob/master/home.mmgen/bin/mmlive-daemon-upgrade
[X]: autosign-[MMGen-command-help]
[gs]: Getting-Started-with-MMGen
[bo]: Getting-Started-with-MMGen#a_bo
[si]: Install-Bitcoind-from-Source-on-Debian-or-Ubuntu-Linux
[bi]: Install-Bitcoind#a_d
[p8]: Install-Bitcoind#a_r
[iw]: Install-MMGen-on-Debian-or-Ubuntu-Linux
[ge]: https://github.com/ethereum/go-ethereum

@ -1,32 +1,36 @@
#### Perform the following steps on both your online and offline computers:
***NOTE: the following instructions apply to the current master branch. If
you’re running the stable version of MMGen, check out the stable tag and
refer to the version of this file located in `doc/wiki/using-mmgen`.***
Install required Debian/Ubuntu packages:
*NOTE: the instructions on this page are for a Bitcoin-only setup. For
altcoin support, additional installation steps are required. See
[**Altcoin and Forkcoin Support**][af] for more information.*
$ sudo apt-get install autoconf git libgmp-dev libssl-dev libpcre3-dev libtool wipe curl
$ sudo apt-get install python3-dev python3-ecdsa python3-pexpect python3-setuptools python3-cryptography python3-nacl python3-pip python3-gmpy2 python3-sha3 python3-requests python3-aiohttp python3-socks
### Perform the following steps on both your online and offline computers:
Using the [pip3][P] installer, install the scrypt Python package:
For computers with no Internet connection, see **Note for offline machines** below.
$ sudo -H pip3 install scrypt
#### Install required packages:
Install the secp256k1 library:
##### Debian/Ubuntu:
$ git clone https://github.com/bitcoin-core/secp256k1.git
$ cd secp256k1
$ ./autogen.sh
$ ./configure
$ make
$ sudo make install
$ sudo ldconfig
$ cd ..
$ sudo apt-get install git gcc libtool make autoconf libgmp-dev libssl-dev libpcre3-dev libmpfr-dev libmpc-dev python3-dev python3-pip
Install MMGen:
##### Arch Linux:
$ sudo pacman -S git gcc libtool make autoconf automake autogen pcre python-pip
#### Upgrade the build tools:
$ pip3 install --user --upgrade pip setuptools build wheel
#### Install MMGen:
$ git clone https://github.com/mmgen/mmgen.git
$ cd mmgen
$ git checkout stable_linux # see 'Note' below
$ ./setup.py build
$ sudo ./setup.py install # see 'Testing Note' below
$ python3 -m build --no-isolation
$ pip3 install --user --upgrade dist/*.whl # see 'Testing Note' below
$ cd ..
**Note:** if you want to use features that have appeared since the latest
@ -37,35 +41,44 @@ security vulnerabilities are more likely to be present in new code than in a
stable release. In addition, new code may require dependencies or installation
steps not yet covered in the documentation.
**Testing Note:** MMGen may be tested in place prior to installation. Refer to
the [Test Suite][ts] wiki page for details.
Install your coin daemon(s). To install prebuilt binaries, go [here][01]. To
install from source, go [here][02].
#### *Note for offline machines:*
**Testing Note:** MMGen may be tested in place prior to installation. Refer to
the [Test Suite][ts] wiki page for details.
> Your offline machine must be connected to the Internet to retrieve and install
> the above packages as described above. This is normally not a problem, as you
> can simply take the machine offline permanently after the install is done,
> preferably removing or disabling its network interfaces.
##### Note for offline machines:
> However, if your machine is already offline and you wish to leave it that way,
> or if it lacks a network interface entirely, then you’ll need to take roughly
> the following steps:
The computer you’ve designated for offline use must be connected to the
Internet to retrieve and install the above packages as described above. This
is normally not a problem, as you can simply take it offline permanently after
the install is done, preferably removing or disabling its network interfaces.
>> If your offline and offline machines have the same architecture, then you can
>> download the Debian/Ubuntu packages and their dependencies on your online
>> machine using `apt-get download`. Otherwise, you must retrieve the packages
>> manually from `packages.debian.org` or `packages.ubuntu.com`.
>>
>> Download any required Python packages using `pip3 download`.
>>
>> Transfer the downloaded files and cloned Git repositories to your offline
>> computer using a USB stick or other removable medium. Install the
>> Debian/Ubuntu packages with `sudo dpkg -i` and the Python packages with `pip3
>> install`. Install MMGen and the secp256k1 library from the copied Git
>> repositories as described above.
However, if your machine is already offline and you wish to leave it that way,
or if it lacks a network interface entirely, then you’ll need to take roughly
the following steps:
> If your offline and offline computers have the same architecture, then
> download the Debian/Ubuntu packages and their dependencies on the online
> one using `apt-get download`. Otherwise, retrieve the packages manually
> from `packages.debian.org` or `packages.ubuntu.com`.
>
> Download any required Python packages using `pip3 download`, or manually
> from [pypi.org][pi] if your online and offline computers have different
> architecture.
>
> Transfer the downloaded files and cloned Git repositories to your offline
> computer using a USB stick or other removable medium. Install the
> Debian/Ubuntu packages with `sudo dpkg -i` and the Python packages with `pip3
> install --user`.
>
> Clone the [secp256k1][ec] repository and copy it to `~/.cache` directory on
> the offline machine (or copy it from your online machine’s `~/.cache`).
> Copy the MMGen repository to the offline machine and install MMGen as
> described above. If your online and offline machines have different
> architecture, then make sure to clean up any build/dist files in the
> repositories before installing (in `secp256k1` this is accomplished by `make
> clean`).
Congratulations, your installation is now complete! You can now proceed to
[**Getting Started with MMGen**][gs].
@ -74,5 +87,6 @@ Congratulations, your installation is now complete! You can now proceed to
[02]: Install-Bitcoind-from-Source-on-Debian-or-Ubuntu-Linux
[ts]: Test-Suite
[gs]: Getting-Started-with-MMGen
[03]: https://pypi.python.org/packages/source/p/pexpect/pexpect-3.1.tar.gz
[P]: https://pypi.org/project/pip
[pi]: https://pypi.org
[af]: Altcoin-and-Forkcoin-Support
[ec]: https://github.com/bitcoin-core/secp256k1.git

@ -25,8 +25,8 @@ against the possibility of private data leakage.
With some extra steps, it’s possible to perform the installation on a machine
that’s *already* offline. These steps will be additionally outlined in
sections entitled “Offline users”. When doing an online install you may skip
over these sections.
sections entitled **Offline install.** When doing an online install you may
skip over these sections.
### 1. Install MSYS2
@ -61,22 +61,21 @@ will produce a listing of the same directory.
#### Online users:
> Optionally download and edit your mirror lists as described in **Offline
> users** below.
> Optionally edit your mirror lists as described in **Offline install** below.
> Update the package database and core system packages:
$ pacman -Syu
> Exit and restart the terminal. If you’re using custom mirror lists, they were
> overwritten by the update operation, so you must restore them from your
> modified versions.
> Exit and restart the terminal. If you’re using modified mirror lists, they
> may have been overwritten by the update operation, in which case you should
> restore them from your modified versions.
> Now complete updating the packages:
> Now complete upgrading the system:
$ pacman -Su
#### Offline users:
#### Offline install:
> You must now download the required database and package files from the
> Internet on your online computer and copy them to your offline box. A USB
@ -97,53 +96,50 @@ will produce a listing of the same directory.
$ ls /var/lib/pacman/sync
> Download up-to-date versions of these files from the MSYS2 project site:
> Download up-to-date versions of these files from a fast MSYS2 mirror:
>> <https://downloads.sourceforge.net/project/msys2/REPOS/MSYS2/x86_64/msys.db>
>> <https://downloads.sourceforge.net/project/msys2/REPOS/MSYS2/x86_64/msys.db.sig>
>> <https://downloads.sourceforge.net/project/msys2/REPOS/MINGW/x86_64/mingw64.db>
>> <https://downloads.sourceforge.net/project/msys2/REPOS/MINGW/x86_64/mingw64.db.sig>
>> <https://downloads.sourceforge.net/project/msys2/REPOS/MINGW/i686/mingw32.db>
>> <https://downloads.sourceforge.net/project/msys2/REPOS/MINGW/i686/mingw32.db.sig>
>> <https://downloads.sourceforge.net/project/msys2/REPOS/MINGW/clang64/clang64.db>
>> <https://downloads.sourceforge.net/project/msys2/REPOS/MINGW/clang64/clang64.db.sig>
>> <https://downloads.sourceforge.net/project/msys2/REPOS/MINGW/ucrt64/ucrt64.db>
>> <https://downloads.sourceforge.net/project/msys2/REPOS/MINGW/ucrt64/ucrt64.db.sig>
>> <https://mirror.yandex.ru/mirrors/msys2/msys/x86_64/msys.db>
>> <https://mirror.yandex.ru/mirrors/msys2/msys/x86_64/msys.db.sig>
>> <https://mirror.yandex.ru/mirrors/msys2/mingw/x86_64/mingw64.db>
>> <https://mirror.yandex.ru/mirrors/msys2/mingw/x86_64/mingw64.db.sig>
>> <https://mirror.yandex.ru/mirrors/msys2/mingw/i686/mingw32.db>
>> <https://mirror.yandex.ru/mirrors/msys2/mingw/i686/mingw32.db.sig>
>> <https://mirror.yandex.ru/mirrors/msys2/mingw/clang64/clang64.db>
>> <https://mirror.yandex.ru/mirrors/msys2/mingw/clang64/clang64.db.sig>
>> <https://mirror.yandex.ru/mirrors/msys2/mingw/ucrt64/ucrt64.db>
>> <https://mirror.yandex.ru/mirrors/msys2/mingw/ucrt64/ucrt64.db.sig>
> Copy the files to your offline machine as you did with the mirror files, replacing
> the originals at `C:\msys64\var\lib\pacman\sync`.
> Copy the files to your offline machine, replacing the originals at
> `C:\msys64\var\lib\pacman\sync`.
> Now issue the following command:
$ pacman -Sup > urls.txt
> This command may cause your MSYS terminal window to close. If so, simply
> This command may cause your MSYS terminal window to close. If so, just
> reopen another one.
> The command's output is now saved in the file `urls.txt` (this redirection
> trick using '>' works for most shell commands, by the way). Copy `urls.txt`
> to your online machine and download the URLs listed in it. Transfer the
> downloaded files to your offline machine, copying them to the package cache
> directory `C:\msys64\var\cache\pacman\pkg`.
> to your online machine and download the URLs listed in it.
> Now issue the following command to perform the initial upgrade:
$ pacman -Su
> When the process is finished, close your terminal window as requested and
> reopen another one. If any mirror lists have have been added by the upgrade
> operation, you may wish to edit them as you did above.
> Now reissue the `pacman -Sup` command, which will generate a much longer list
> of URLs this time. Download the listed files on your online machine. Create
> a new folder on your offline machine:
> Create a new folder on your offline machine:
$ mkdir packages1
> Copy the downloaded package files to this folder and execute the following
> command to install them:
Transfer the downloaded package files to the offline machine and place them in
this folder.
$ (cd packages1; pacman -U *)
> Now issue the following command to install the packages:
$ pacman -U packages1/*
> When the process is finished, close your terminal window and reopen another
> one.
> Now reissue the `pacman -Sup` command, which will generate a much longer list
> of URLs this time. Repeat the same download/copy/install procedure with the
> new URLs, only using a new `packages2` directory instead of `packages1`.
> Your system upgrade is now complete.
@ -152,30 +148,34 @@ will produce a listing of the same directory.
Now that your system’s fully up to date, you’re ready to install the packages
specifically required by MMGen.
#### Offline users:
#### Offline install:
> The command `pacman -S <pgknames>` installs the requested MSYS2 packages,
> while `pacman -Sp <pgknames>` prints a list of download URLs for the packages
> and their dependencies. So before running the command shown below, you’ll
> first need to issue it with `-Sp` instead of `-S` to produce a URL list.
> Download these URLs on your online machine and copy and install the
> downloaded files to the your offline machine just as you did in the previous
> step, substituting `packages2` for `packages1` in both commands.
> As you’ve probably noticed by now, the command `pacman -S <pgknames>`
> installs MSYS2 packages and their dependencies, while `pacman -Sp
> <pgknames>` prints a list of download URLs for the same packages and
> dependencies. So before running the command shown below, you must first
> issue it with `-Sp` instead of `-S` to produce a URL list. Then repeat the
> above download/copy/install steps once again with the new URLs, replacing
> `packages2` with `packages3`.
Install the packages and their dependencies:
Install the MMGen requirements and their dependencies:
$ pacman -S tar git vim autoconf automake-wrapper autogen \
mingw64/mingw-w64-x86_64-libtool \
mingw64/mingw-w64-x86_64-pcre \
mingw64/mingw-w64-x86_64-gcc \
mingw64/mingw-w64-x86_64-make \
mingw64/mingw-w64-x86_64-python3-cryptography \
mingw64/mingw-w64-x86_64-python3-six \
mingw64/mingw-w64-x86_64-python3-pexpect \
mingw64/mingw-w64-x86_64-python3-gmpy2 \
mingw64/mingw-w64-x86_64-pcre \
mingw64/mingw-w64-x86_64-libsodium \
mingw64/mingw-w64-x86_64-python3-pynacl \
mingw64/mingw-w64-x86_64-python3-pip \
mingw64/mingw-w64-x86_64-gcc
mingw64/mingw-w64-x86_64-python-build \
mingw64/mingw-w64-x86_64-python-wheel \
mingw64/mingw-w64-x86_64-python-cryptography \
mingw64/mingw-w64-x86_64-python-six \
mingw64/mingw-w64-x86_64-python-pexpect \
mingw64/mingw-w64-x86_64-python-gmpy2 \
mingw64/mingw-w64-x86_64-python-pynacl \
mingw64/mingw-w64-x86_64-python-pip \
mingw64/mingw-w64-x86_64-python-pysocks \
mingw64/mingw-w64-x86_64-python-requests
### 5. Set up your environment

@ -14,6 +14,7 @@ This tutorial provides a quick, hands-on introduction.
1. Initialize MMGen regtest mode and start the regtest daemon:
$ mmgen-regtest setup
$ mmgen-regtest start
2. Generate Bob’s MMGen wallet:

@ -16,6 +16,22 @@ platforms may be much slower.
## Quick start
### Container setup (if applicable)
The test suite requires the `/dev/loopX` devices to exist and be enabled. If
you’re running in an LXC container, note that only privileged containers allow
loop devices. You may enable them in the config file as follows:
lxc.cgroup2.devices.allow = b 7:0 rwm # /dev/loop0
lxc.cgroup2.devices.allow = b 7:1 rwm # /dev/loop1
lxc.cgroup2.devices.allow = b 7:2 rwm # /dev/loop2
Every time the container is started, the files must be created afresh:
# mknod /dev/loop0 b 7 0
# mknod /dev/loop1 b 7 1
# mknod /dev/loop2 b 7 2
### BTC-only testing
Clone the Bitcoin Core repo somewhere on your system:
@ -24,16 +40,16 @@ Clone the Bitcoin Core repo somewhere on your system:
Install the Bitcoin Core daemon [(source)][sd] [(binaries)][bd].
Point the test suite to your copy of the Bitcoin Core repo:
Point the test suite to your copy of the Bitcoin Core repo:
$ export CORE_REPO_ROOT=/path/to/bitcoin/core/repo
CD to the MMGen repository root and build without installing:
$ cd path/to/mmgen/repo
$ python3 setup.py build
$ python3 setup.py build_ext --inplace
Run the test suite, skipping altcoin tests:
Run the test suite in fast mode, skipping altcoin tests:
$ test/test-release.sh -F noalt
@ -42,8 +58,9 @@ Run the test suite, skipping altcoin tests:
Make sure the [Bitcoin Cash Node][cnd], [Litecoin][ld] and [Monero][md]
daemons are installed on your system.
Install [OpenEthereum, Parity, the Ethereum dependencies][oe] and the
[Solidity compiler][sc] as described on the Altcoin-and-Forkcoin-Support page.
Install [OpenEthereum, Parity, Geth, the Ethereum dependencies][oe] and
optionally the [Solidity compiler][sc] as described on the
Altcoin-and-Forkcoin-Support page.
In addition, you must install the following helper programs and libraries (MSYS2
users can omit MoneroPy and Zcash-Mini):
@ -75,8 +92,10 @@ users can omit MoneroPy and Zcash-Mini):
$ sudo apt-get install golang # skip this if Go is already installed
$ git clone https://github.com/FiloSottile/zcash-mini
$ cd zcash-mini
$ make
$ sudo install --strip ./bin/zcash-mini /usr/local/bin
$ go mod init zcash-mini
$ go mod tidy
$ go build -mod=mod
$ sudo install --strip ./zcash-mini /usr/local/bin
$ cd ..
#### Ethkey
@ -94,6 +113,16 @@ Alternatively, you may build ethkey from source:
$ sudo install --strip ./target/release/ethkey /usr/local/bin
$ cd ..
#### Monero note
The Monero test (`test/test-release xmr`) creates a private network and mines
coins, so is therefore non-deterministic and prone to random failures. If you
experience one, just restart the test. To test relaying of transactions via
SOCKS proxy, an SSH tunnel to `localhost` will be set up, so ensure that your
SSH daemon is configured with the appropriate permissions.
### Run the tests
Now you can run the test suite for all coins:
$ test/test-release.sh -F
@ -111,7 +140,7 @@ arguments required by the tests are described in detail on their help screens.
High-level testing of the MMGen system is performed by `test/test.py`, which
uses the `pexpect` library to simulate interactive operation of MMGen user
commands. Launching `test/test.py` with the `-e` option will display the
commands. Running `test/test.py` with the `-e` option will display the
commands’ output on the screen as they’re being run.
| Test | What it tests |