Update documentation

This commit is contained in:
The MMGen Project 2019-05-25 15:47:20 +00:00
commit d470c2a3b7
Signed by: mmgen
GPG key ID: 3F8B1861E32B7DA2
10 changed files with 512 additions and 424 deletions

View file

@ -113,6 +113,8 @@ the more prosaic 2048-word [BIP39 wordlist][bw] used in most wallets today.
> #### [Altcoin and Forkcoin support (ETH,ETC,XMR,ZEC,LTC,BCH and 144 Bitcoin-derived alts)][f]
> #### [Subwallets][U]
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
[**Forum**][4] |
@ -139,3 +141,4 @@ Donate (BTC,BCH): 15TLdmi5NYLdqmtCqczUs5pBPkJDXRs83w
[ew]: https://github.com/spesmilo/electrum/blob/1.9.5/lib/mnemonic.py
[bw]: https://github.com/bitcoin/bips/blob/master/bip-0039/english.txt
[fl]: https://en.wiktionary.org/wiki/Wiktionary:Frequency_lists/Contemporary_poetry
[U]: https://github.com/mmgen/mmgen/wiki/Subwallets

View file

@ -16,17 +16,23 @@ binaries are available for Bitcoin Core, Bitcoin ABC and Litecoin. See the
### Compile and install Bitcoin Core:
> Clone the Bitcoin Core repository from Github, configure, and build:
> Clone the Bitcoin Core repository from Github:
$ git clone https://github.com/bitcoin/bitcoin.git
$ cd bitcoin
> Configure and build:
$ git tag # look for your desired version in the tag list
$ git checkout <version>
$ ./autogen.sh
$ ./configure --without-gui --with-incompatible-bdb
$ make -j4
> The '-j4' option will speed the build process up by using 4 cores of a 4-core
> processor, if you have them. If overheating issues are a problem for your CPU
> or you're short on memory, you may want to omit it or use '-j2'.
> or you're short on memory, you may want to omit the option or reduce the
> number of cores used.
> For more detailed build information, consult the file [doc/build-unix.md][bu]
> in the bitcoin source repository.
@ -44,14 +50,13 @@ binaries are available for Bitcoin Core, Bitcoin ABC and Litecoin. See the
> regarding its safety or reliability.*
> If you want to transact BCH, also known as “Bitcoin Cash” or “Bcash”, then
> clone the Bitcoin ABC repository, and configure and build exactly as you did
> with Bitcoin Core above:
> first clone the Bitcoin ABC repository:
$ git clone https://github.com/Bitcoin-ABC/bitcoin-abc
$ cd bitcoin-abc
$ ./autogen.sh
$ ./configure --without-gui --with-incompatible-bdb
$ make -j4
> Then configure and build using the same configure and build steps as with
> Bitcoin Core above.
> The resulting executable is also named 'bitcoind', so you must install it
> under a different name to avoid overwriting your Core daemon:
@ -61,15 +66,16 @@ binaries are available for Bitcoin Core, Bitcoin ABC and Litecoin. See the
> From now on, you'll invoke the daemon as 'bitcoind-abc' instead of 'bitcoind'.
### Compile and install Litecoin (optional):
### Compile and install Litecoin Core (optional):
> Clone the Litecoin repository, compile and install:
> Clone the Litecoin Core repository:
$ git clone https://github.com/litecoin-project/litecoin.git
$ cd litecoin
$ ./autogen.sh
$ ./configure --without-gui --with-incompatible-bdb
$ make -j4
> Configure and build using the configure and build steps for Bitcoin Core,
> and then install as follows:
$ cd src
$ sudo install -sv litecoind litecoin-cli /usr/local/bin

View file

@ -8,7 +8,7 @@ machine.
The bitcoin daemon on the **online computer** requires a complete and
up-to-date blockchain for tracking addresses. Since its work is more CPU and
disk intensive, a more powerful computer is required here. You'll also need
plenty of free disk space for the growing blockchain (~160GB at the time of
plenty of free disk space for the growing blockchain (~220GB at the time of
writing).
Two blockchain operations are especially resource-intensive: **synchronizing
@ -21,15 +21,15 @@ more low-powered computer as your online machine.
> **Bitcoin Core:**
>> Go to the Bitcoin Core [download page][01]. Choose the 32-bit or 64-bit
>> versions appropriate for your online and offline computers. Windows users
>> should choose the executable installer.
>> Go to the Bitcoin Core download page ([here][00] or [here][01]). Choose the
>> 32-bit or 64-bit versions appropriate for your online and offline computers.
>> Windows users should choose the executable installer.
> **Bitcoin ABC (optional):**
>> If you wish to transact BCH (Bcash), then download the appropriate [Bitcoin
>> ABC binary][abc] for your system as well. Windows users should choose the
>> executable installer.
>> executable installer.
>> *Consider the Bitcoin ABC binaries untrusted software. The author of the
>> MMGen project makes no guarantees regarding their safety or reliability.*
@ -43,26 +43,32 @@ more low-powered computer as your online machine.
> **Bitcoin Core:**
>> **Windows:** Run the Windows installer with the default settings. Add
>> 'C:\Program Files\Bitcoin\daemon' to your [path][05].
>> **Linux:** Unpack the archive and copy the 'bitcoind' and 'bitcoin-cli'
>> binaries to /usr/local/bin.
>> **Windows:** Run the Windows installer with the default settings.
>> At the end of the installation process, uncheck the Run box to prevent the
>> client from starting.
>> Add `C:\Program Files\Bitcoin\daemon` to your [path][05].
>> **Linux:** Unpack the archive and copy the `bitcoind` and `bitcoin-cli`
>> binaries to `/usr/local/bin`.
> **Bitcoin ABC (optional):**
>> **Windows:** Run the Windows installer, installing into the alternate
>> folder 'C:\Program Files\Bitcoin_ABC'. Add 'C:\Program Files\Bitcoin_ABC\daemon'
>> to your [path][05]. Rename the file 'bitcoind' in that folder to
>> 'bitcoind-abc'.
>> **Linux:** Unpack the archive, rename 'bitcoind' to 'bitcoind-abc' and
>> copy it to /usr/local/bin.
>> **Windows:** Run the Windows installer with the default settings.
>> At the end of the installation process, uncheck the Run box to prevent the
>> client from starting.
>> Add `C:\Program Files\Bitcoin-abc\daemon` to your [path][05].
>> Rename the file `bitcoind` in that folder to `bitcoind-abc` and
>> `bitcoin-cli` to `bitcoin-cli-abc`.
>> **Linux:** Unpack the archive, rename `bitcoind` to `bitcoind-abc` and
>> copy it to `/usr/local/bin`.
> **Litecoin (optional):**
>> **Windows:** Run the Windows installer with the default settings. Add
>> 'C:\Program Files\Litecoin\daemon' to your [path][05].
>> **Linux:** Unpack the archive and copy the 'litecoind' and
>> 'litecoin-cli' binaries to /usr/local/bin.
>> **Windows:** Run the Windows installer with the default settings.
>> At the end of the installation process, uncheck the Run box to prevent the
>> client from starting.
>> Add `C:\Program Files\Litecoin\daemon` to your [path][05].
>> **Linux:** Unpack the archive and copy the `litecoind` and
>> `litecoin-cli` binaries to `/usr/local/bin`.
### <a name='a_r'>Run (both online and offline computers):</a>
@ -104,7 +110,7 @@ more low-powered computer as your online machine.
$ bitcoin-cli help
# ABC:
$ bitcoin-cli --rpcport=8442 help
$ bitcoin-cli-abc --rpcport=8442 help
# Litecoin:
$ litecoin-cli help
@ -113,18 +119,21 @@ more low-powered computer as your online machine.
> your wallet.dat out of harm's way** before starting the daemon. The new
> wallet now created will be used as your **tracking wallet**.
> If you're connected to the Internet, bitcoind will begin downloading and
> If you're connected to the Internet, the daemon(s) will begin downloading and
> verifying the blockchain. This can take from several hours to several days
> depending on the speed of your computer and Internet connection. You can
> speed up your initial block download enormously by adding the `-assumevalid`
> option, followed by a recent block hash, to the command line. Recent block
> hashes can be found on any blockchain explorer site.
> depending on the speed of your computer, the size of the blockchain(s) in
> question and your Internet connection. You can speed up your initial block
> download enormously by adding the `-assumevalid` option, followed by a recent
> block hash, to the command line. Recent block hashes can be found on any
> blockchain explorer site.
> For the offline daemons you may add the options `-maxconnections=0 -listen=0`
> to the command line. Note that offline daemons start very quickly, since they
> have no blockchains, and use practically no CPU once running.
> have a blockchain consisting of one block, and use practically no CPU power
> once running.
[01]: https://bitcoin.org/en/download
[00]: https://bitcoin.org/bin/
[01]: https://bitcoincore.org/bin/
[bd]: https://bitcoin.org/bin/blockchain/
[05]: Editing-the-user-path-in-Windows
[abc]: https://download.bitcoinabc.org/

View file

@ -3,9 +3,9 @@
> Install required Debian/Ubuntu packages:
$ sudo apt-get install autoconf git libgmp-dev libssl-dev libtool wipe
$ sudo apt-get install python3-dev python3-ecdsa python3-pexpect python3-setuptools python3-crypto python3-nacl python3-pip
$ sudo apt-get install python3-dev python3-ecdsa python3-pexpect python3-setuptools python3-cryptography python3-nacl python3-pip python3-gmpy2
> Using the [pip3][P] installer, install the Python scrypt library:
> Using the [pip3][P] installer, install the Python scrypt library (optional for Python >= v3.6):
$ sudo -H pip3 install scrypt

View file

@ -8,7 +8,7 @@ machine.
The bitcoin daemon on the **online computer** requires a complete and
up-to-date blockchain for tracking addresses. Since its work is more CPU and
disk intensive, a more powerful computer is required here. You'll also need
plenty of free disk space for the growing blockchain (~160GB at the time of
plenty of free disk space for the growing blockchain (~220GB at the time of
writing).
Two blockchain operations are especially resource-intensive: **synchronizing
@ -21,15 +21,15 @@ more low-powered computer as your online machine.
> **Bitcoin Core:**
>> Go to the Bitcoin Core [download page][01]. Choose the 32-bit or 64-bit
>> versions appropriate for your online and offline computers. Windows users
>> should choose the executable installer.
>> Go to the Bitcoin Core download page ([here][00] or [here][01]). Choose the
>> 32-bit or 64-bit versions appropriate for your online and offline computers.
>> Windows users should choose the executable installer.
> **Bitcoin ABC (optional):**
>> If you wish to transact BCH (Bcash), then download the appropriate [Bitcoin
>> ABC binary][abc] for your system as well. Windows users should choose the
>> executable installer.
>> executable installer.
>> *Consider the Bitcoin ABC binaries untrusted software. The author of the
>> MMGen project makes no guarantees regarding their safety or reliability.*
@ -43,26 +43,32 @@ more low-powered computer as your online machine.
> **Bitcoin Core:**
>> **Windows:** Run the Windows installer with the default settings. Add
>> 'C:\Program Files\Bitcoin\daemon' to your [path][05].
>> **Linux:** Unpack the archive and copy the 'bitcoind' and 'bitcoin-cli'
>> binaries to /usr/local/bin.
>> **Windows:** Run the Windows installer with the default settings.
>> At the end of the installation process, uncheck the Run box to prevent the
>> client from starting.
>> Add `C:\Program Files\Bitcoin\daemon` to your [path][05].
>> **Linux:** Unpack the archive and copy the `bitcoind` and `bitcoin-cli`
>> binaries to `/usr/local/bin`.
> **Bitcoin ABC (optional):**
>> **Windows:** Run the Windows installer, installing into the alternate
>> folder 'C:\Program Files\Bitcoin_ABC'. Add 'C:\Program Files\Bitcoin_ABC\daemon'
>> to your [path][05]. Rename the file 'bitcoind' in that folder to
>> 'bitcoind-abc'.
>> **Linux:** Unpack the archive, rename 'bitcoind' to 'bitcoind-abc' and
>> copy it to /usr/local/bin.
>> **Windows:** Run the Windows installer with the default settings.
>> At the end of the installation process, uncheck the Run box to prevent the
>> client from starting.
>> Add `C:\Program Files\Bitcoin-abc\daemon` to your [path][05].
>> Rename the file `bitcoind` in that folder to `bitcoind-abc` and
>> `bitcoin-cli` to `bitcoin-cli-abc`.
>> **Linux:** Unpack the archive, rename `bitcoind` to `bitcoind-abc` and
>> copy it to `/usr/local/bin`.
> **Litecoin (optional):**
>> **Windows:** Run the Windows installer with the default settings. Add
>> 'C:\Program Files\Litecoin\daemon' to your [path][05].
>> **Linux:** Unpack the archive and copy the 'litecoind' and
>> 'litecoin-cli' binaries to /usr/local/bin.
>> **Windows:** Run the Windows installer with the default settings.
>> At the end of the installation process, uncheck the Run box to prevent the
>> client from starting.
>> Add `C:\Program Files\Litecoin\daemon` to your [path][05].
>> **Linux:** Unpack the archive and copy the `litecoind` and
>> `litecoin-cli` binaries to `/usr/local/bin`.
### <a name='a_r'>Run (both online and offline computers):</a>
@ -104,7 +110,7 @@ more low-powered computer as your online machine.
$ bitcoin-cli help
# ABC:
$ bitcoin-cli --rpcport=8442 help
$ bitcoin-cli-abc --rpcport=8442 help
# Litecoin:
$ litecoin-cli help
@ -113,18 +119,21 @@ more low-powered computer as your online machine.
> your wallet.dat out of harm's way** before starting the daemon. The new
> wallet now created will be used as your **tracking wallet**.
> If you're connected to the Internet, bitcoind will begin downloading and
> If you're connected to the Internet, the daemon(s) will begin downloading and
> verifying the blockchain. This can take from several hours to several days
> depending on the speed of your computer and Internet connection. You can
> speed up your initial block download enormously by adding the `-assumevalid`
> option, followed by a recent block hash, to the command line. Recent block
> hashes can be found on any blockchain explorer site.
> depending on the speed of your computer, the size of the blockchain(s) in
> question and your Internet connection. You can speed up your initial block
> download enormously by adding the `-assumevalid` option, followed by a recent
> block hash, to the command line. Recent block hashes can be found on any
> blockchain explorer site.
> For the offline daemons you may add the options `-maxconnections=0 -listen=0`
> to the command line. Note that offline daemons start very quickly, since they
> have no blockchains, and use practically no CPU once running.
> have a blockchain consisting of one block, and use practically no CPU power
> once running.
[01]: https://bitcoin.org/en/download
[00]: https://bitcoin.org/bin/
[01]: https://bitcoincore.org/bin/
[bd]: https://bitcoin.org/bin/blockchain/
[05]: Editing-the-user-path-in-Windows
[abc]: https://download.bitcoinabc.org/

View file

@ -1,218 +0,0 @@
***Warning: though the MMGen installation process on Windows has become easier,
it still requires patience, and the user experience is less than optimal.
You're urged to use the prebuilt [MMGenLive][20] USB image instead. It's now
the preferred way for all non-Linux users to run MMGen.***
### 1. Create the build directory:
Enter your MSYS environment, create the directory `/build` and move to it.
This is where you'll be unpacking and building archives:
$ mkdir /build
$ cd /build
If the machine you're installing on is online, you can download the various
tarballs and zipped archives you need from the Internet exactly as described in
the instructions below. If you're offline, you'll need to download them first
on another machine and then transfer them to the install computer using a USB
stick, for example.
In either case, you'll probably be downloading the archives to a folder
somewhere outside the root of your MSYS filesystem. To access it within MSYS,
use `/c/` for drive `C:`, `/d/` for drive `D:` and so forth. A full path to an
archive would thus look something like this:
`/c/my_downloaded_archives/archive_name.tar.gz`.
### 2. Build OpenSSL:
Grab the v1.0.x [tarball][06] from openssl.org, unpack and build:
$ tar -xzf <path to openssl archive>/openssl-1.0.2j.tar.gz
$ cd openssl-1.0.2j
$ ./Configure mingw64 --openssldir=/usr
$ make
$ make install
### 3. Build the Scrypt Python module:
The latest scrypt tarball available from [Python][07] at this writing
(scrypt-0.8.0.tar.gz) has missing files and doesn't build, so grab the latest
[zipfile][07z] from the scrypt source repository, unzip and build:
$ cd /build
$ unzip <path to scrypt archive>/91d194b6a6bd.zip
$ cd mhallin-py-scrypt-91d194b6a6bd
Open the file `setup.py` in your text editor. Change the line reading
from setuptools import setup, Extension
to read
from distutils.core import setup, Extension
Right before the line beginning with
scrypt_module = Extension(
add the following lines (with no indentation):
library_dirs = [r'c:\mingw64\x86_64-w4-mingw32\lib','/msys/lib']
includes = [r'c:\msys\include']
Save `setup.py`, build and install:
$ python setup.py build --compiler=mingw32
$ python setup.py install
Now, to solve a problem with the interpreter not finding the scrypt extension
module, we have to do this little fixup:
$ cd /mingw/opt/lib/python2.7/site-packages
$ unzip scrypt*.egg
### 4. Build the pycrypto Python module:
Download the latest pycrypto [tarball][02] from the Python website and unpack it:
$ cd /build
$ tar -xzf <path to pycrypto archive>/pycrypto-2.6.1.tar.gz
$ cd pycrypto-2.6.1
Open the file `setup.py` in your text editor. Remove *exactly* four spaces at
the beginning of this line:
self.__remove_extensions(["CryptoPublicKey._fastmath"])
to move it one level of indentation to the left. Save the file and exit the
editor. Now build and install:
$ python setup.py build --compiler=mingw32
$ python setup.py install
### 5. Install the ecdsa Python module:
Grab the latest python-ecdsa [tarball][03], unpack and build:
$ cd /build
$ tar -xzf <path to ecdsa archive>/ecdsa-0.13.tar.gz
$ cd ecdsa-0.13
$ python setup.py install
### 6. Install the ed25519ll Python module (required for Monero address generation):
Grab the latest ed25519ll [tarball][43], unpack and build:
$ cd /build
$ tar -xzf <path to ed25519ll archive>/ed25519ll-0.6.tar.gz
$ cd ed25519ll-0.6
Open the file `setup.py` in your text editor. Change the line reading
plat_name = get_platform().replace('-', '_')
to read
plat_name = 'win64'
Exit the editor and run:
$ python setup.py install
### 7. Install the pysha3 Python module (required for Monero and Ethereum address generation):
Grab the latest pysha3 [tarball][44], unpack and build:
$ cd /build
$ tar -xzf <path to pysha3 archive>/pysha3-1.0.2.tar.gz
$ cd pysha3-1.0.2
$ python setup.py install
### 8. Install the colorama Python module:
Grab the latest colorama [tarball][14], unpack and build:
$ cd /build
$ tar -xzf <path to colorama archive>/colorama-0.3.7.tar.gz
$ cd colorama-0.3.7
$ python setup.py install
### 9. Install the pexpect Python module (needed for test suite):
Grab the latest pexpect [tarball][15], unpack and build:
$ cd /build
$ tar -xzf <path to pexpect archive>/pexpect-4.2.1.tar.gz
$ cd pexpect-4.2.1
$ python setup.py install
### 10. Install sdelete utility (needed for secure wallet deletion):
Grab the latest SDelete [zip archive][16], unzip and copy `sdelete.exe` to
your execution path (`c:\windows`, for example).
### 11. Build libsecp256k1:
Libsecp256k1 requires GNU autotools to build, and they're not included in the
MinGW-64 distribution for some reason, so you'll have to retrieve and unpack
them yourself. You'll need these archives:
> * [autoconf][31]
> * [automake][32]
> * [libtool][33]
Unpack them in your /mingw directory and fix up some filenames:
$ cd /mingw
$ tar -xzf <path to>/autoconf2.5-2.68-1-mingw32-bin.tar.lzma
$ tar -xzf <path to>/automake1.11-1.11.1-1-mingw32-bin.tar.lzma
$ tar -xzf <path to>/libtool-2.4-1-mingw32-bin.tar.lzma
$ cd bin
$ cp autoconf-* autoconf
$ cp automake-* automake
$ cp aclocal-* aclocal
$ cp autoreconf-* autoreconf
Now get the latest libsecp256k1 [zip archive][11] from GitHub, unpack, build and
install:
$ cd /build
$ unzip.exe <path to libsecp256k1 archive>/master.zip
$ cd secp256k1-master
$ ./autogen.sh
$ ./configure
$ make
$ make install
### 12. Install MMGen:
Get the [zip archive][10] of the latest stable version from GitHub, unpack and install:
$ cd /build
$ unzip.exe <path to mmgen archive>/stable_mswin.zip
$ cd mmgen-stable_mswin
$ python setup.py build --compiler=mingw32
$ sudo ./setup.py install
After first installing and starting the [Bitcoin daemon][77], you may then run
the MMGen test suite to make sure your installation's working:
$ test/test.py -s
[02]: https://pypi.python.org/packages/60/db/645aa9af249f059cc3a368b118de33889219e0362141e75d4eaf6f80f163/pycrypto-2.6.1.tar.gz#md5=55a61a054aa66812daf5161a0d5d7eda
[03]: https://pypi.python.org/packages/f9/e5/99ebb176e47f150ac115ffeda5fedb6a3dbb3c00c74a59fd84ddf12f5857/ecdsa-0.13.tar.gz#md5=1f60eda9cb5c46722856db41a3ae6670
[06]: https://www.openssl.org/source/openssl-1.0.2j.tar.gz
[07]: https://pypi.python.org/pypi/scrypt/
[07z]: https://bitbucket.org/mhallin/py-scrypt/get/91d194b6a6bd.zip
[10]: https://github.com/mmgen/mmgen/archive/stable_mswin.zip
[14]: https://pypi.python.org/packages/f0/d0/21c6449df0ca9da74859edc40208b3a57df9aca7323118c913e58d442030/colorama-0.3.7.tar.gz#md5=349d2b02618d3d39e5c6aede36fe3c1a
[15]: https://pypi.python.org/packages/e8/13/d0b0599099d6cd23663043a2a0bb7c61e58c6ba359b2656e6fb000ef5b98/pexpect-4.2.1.tar.gz#md5=3694410001a99dff83f0b500a1ca1c95
[16]: https://download.sysinternals.com/files/SDelete.zip
[20]: https://github.com/mmgen/MMGenLive
[11]: https://github.com/bitcoin-core/secp256k1/archive/master.zip
[31]: https://sourceforge.net/projects/mingw/files/MinGW/Extension/autoconf/autoconf2.5/autoconf2.5-2.68-1/autoconf2.5-2.68-1-mingw32-bin.tar.lzma
[32]: https://sourceforge.net/projects/mingw/files/MinGW/Extension/automake/automake1.11/automake1.11-1.11.1-1/automake1.11-1.11.1-1-mingw32-bin.tar.lzma
[33]: https://sourceforge.net/projects/mingw/files/MinGW/Extension/libtool/libtool-2.4-1/libtool-2.4-1-mingw32-bin.tar.lzma
[77]: Install-Bitcoind
[43]: https://pypi.python.org/packages/8a/34/b27ee501205893cf7cc537b4e6553a557eaaca14c4755aa1eaa500afac57/ed25519ll-0.6.tar.gz#md5=35b3190ffefb631e7c5a45d96d768f80
[44]: https://pypi.python.org/packages/73/bf/978d424ac6c9076d73b8fdc8ab8ad46f98af0c34669d736b1d83c758afee/pysha3-1.0.2.tar.gz#md5=59cd2db7a9988c1f3f6aee40145e0c96

View file

@ -1,25 +1,281 @@
***Warning: though the MMGen installation process on Windows is now easier,
it still requires patience, and the user experience is less than optimal.
You're urged to use the prebuilt [MMGenLive][20] USB image instead. It's now
the preferred way for all non-Linux users to run MMGen.***
## Introduction
***Windows XP warning: MMGen is no longer officially supported on Windows XP due
to incompatibilities with the Crypto.Random module. The scripts run, but the
security of your random numbers cannot be guaranteed. Use at your own risk.***
MMGen is supported on Microsoft Windows via [MSYS2][mh], which provides a
Unix-like command-line environment within Windows. Windows 7 and later versions
are supported.
Install MMGen on Windows by completing the following three steps:
MSYS2 is the successor project to MinGW-64 and the earlier MSYS, bringing many
improvements such as package management and support for Python 3. The MSYS2
project page is located [here][mp] and its wiki [here][mw].
>> 1. Install MinGW and MSYS ([WinXP][03]|[>=Win7][01]), if you haven't already;
>> 2. Install MMGen's dependencies (excluding the bitcoin daemons) and MMGen itself ([WinXP][04]|[>=Win7][02]); and
>> 3. [Install the offline and online bitcoin daemons (bitcoind)][07].
*Note: an [older version][ov] of MMGen can be run under MinGW-64 and MSYS, but
its use is deprecated. Installation instructions for MMGen under MinGW-64 and
MSYS are archived [here][di] for historical interest only.*
Congratulations, your MMGen installation is now complete! Now you can
proceed to [**Getting Started with MMGen**][08].
Before you get started, just a reminder that MMGen must be installed on two
computers, one online and one offline, to be used securely. All operations
involving private data—wallet generation, address generation and transaction
signing—are handled offline, while the online installation takes care of
tracking balances and creating and sending transactions.
[01]: Install-MinGW-64-and-MSYS-on-Microsoft-Windows
[02]: Install-MMGen-and-Its-Dependencies-on-Microsoft-Windows
[03]: Install-MinGW-and-MSYS-on-Windows-XP
[04]: Install-MMGen-and-Its-Dependencies-on-Windows-XP
[07]: Install-Bitcoind
[08]: Getting-Started-with-MMGen
[20]: https://github.com/mmgen/MMGenLive
This means that once you’ve finished the install process, the computer you’ve
designated for offline use must be taken offline **permanently.** Furthermore,
its wi-fi and bluetooth interfaces should be disabled as well to safeguard
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.
### 1. Install MSYS2
Download the MSYS2 executable installer for your architecture from the [MSYS2
homepage][mh], but ignore the installation instructions there.
Run the installer, accepting all defaults. At the end of the installation,
uncheck “Run MSYS2 now” and click Finish.
### 2. Set up PowerShell as your MSYS2 terminal
MMGen is incompatible with the terminal provided by the MSYS2 project. However,
it works just fine with Windows’ native PowerShell.
Drag or copy a PowerShell icon to the desktop, rename it to “MSYS2”, then right
click the icon and select Properties. After the existing path in the Target
text window, append a space followed by the text `C:\\msys64\usr\bin\bash.exe
--login`
Save your changes and double click the icon to launch your MSYS2-enabled
PowerShell. From now on, all your work will be done in this terminal.
### 3. Upgrade MSYS2
#### Online users:
> Optionally download and edit your mirror lists as described in **Offline
> users** 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.
> Now complete updating the packages:
$ pacman -Su
#### Offline users:
> 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
> flash drive works ideally for this.
> It’s highly recommended to update the mirror list files located in the
> directory `/etc/pacman.d`, as these lists allow you to specify the servers
> you’ll be downloading from. To view the contents of these files, issue the
> following commands in your terminal:
$ cat /etc/pacman.d/mirrorlist.msys
$ cat /etc/pacman.d/mirrorlist.mingw64
$ cat /etc/pacman.d/mirrorlist.mingw32
> Note that the first-listed server is the one used by default. On your online
> computer, download more recent versions of these files from the MSYS2 Github
> repository:
>> <https://raw.githubusercontent.com/msys2/MSYS2-packages/master/pacman-mirrors/mirrorlist.msys>
>> <https://raw.githubusercontent.com/msys2/MSYS2-packages/master/pacman-mirrors/mirrorlist.mingw64>
>> <https://raw.githubusercontent.com/msys2/MSYS2-packages/master/pacman-mirrors/mirrorlist.mingw32>
> Optionally edit the files using a text editor such as Notepad, placing the
> server you wish to use first in the list. Security-conscious users will
> prefer the HTTPS servers. The yandex mirror seems to be the fastest as of
> this writing. Now transfer the mirror files to your offline computer,
> replacing the old ones at `C:\\msys64\etc\pacman.d`. You can check that the
> files have indeed been replaced by reissuing the `cat` commands above.
> You need to update your database files as well. The database files and their
> associated signature files can be listed by issuing the following command:
$ ls /var/lib/pacman/sync
> Download up-to-date versions of these files from the MSYS2 project site:
>> <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>
> Copy the files to your offline machine as you did with the mirror files, replacing
> the originals at `C:\msys64\var\lib\pacman\sync`.
> Now issue the following command:
$ pacman -Sup
> This will produce a list of download URLs. If you add `> urls.txt` to the end
> of this command, its output will be saved in the file `urls.txt`, which you
> can then copy to your online machine. (This redirection trick works for most
> shell commands, by the way.) On your online machine, download the files
> listed in `urls.txt`. Transfer the downloaded files to your offline machine,
> copying them to the package cache directory `C:\msys64\var\cache\pacman\pkg`.
> 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. Your mirror lists were overwritten by the upgrade
> operation, so you must restore them from your modified versions.
> Now reissue the `pacman -Sup` command, which will generate a much longer list
> of URLs this time. Download and copy the listed files to the package cache
> directory just as you did with the previous list. Invoke `pacman -Su` once
> again to complete your system upgrade.
### 4. Install MSYS2 MMGen dependencies
Now that your system’s fully up to date, you’re ready to install the packages
specifically required by MMGen.
#### Offline users:
> 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 the downloaded files to
> the package cache directory of your offline machine just as you did with the
> system upgrade.
Install the packages and their dependencies:
$ pacman -S tar git nano vim \
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-libsodium \
mingw64/mingw-w64-x86_64-python3-pynacl \
mingw64/mingw-w64-x86_64-python3-pip
### 5. Set your PATH environmental variable
Open your shell’s runtime configuration file in a text editor:
$ nano ~/.bashrc
Add the following line to the end of the file, save and exit:
export PATH="/mingw64/bin:$PATH:/c/Program Files/Bitcoin/daemon:/c/Program Files/Litecoin/daemon:/c/Program Files/Bitcoin-abc/daemon"
Close and reopen the terminal window to update your working environment.
### 6. Install the remaining MMGen dependencies
Three of MMGen’s Python dependencies, `ecdsa`, `py_ecc` and `mypy_extensions`,
are not provided by MSYS2. If you’re online, you can install them using the pip
package installer as follows:
$ pip3 install --no-deps ecdsa==0.13 py_ecc==1.6.0 mypy_extensions==0.4.1
For an offline install, first download the packages on your online machine like
this:
$ pip3 download --no-deps ecdsa==0.13 py_ecc==1.6.0 mypy_extensions==0.4.1
Then transfer the `*.whl` files to your offline machine, `cd` to the directory
containing the files and install them as follows:
$ pip3 install --no-deps *.whl
### 7. Install MMGen
Now you’re ready to install MMGen itself. On your online machine, clone the
repository:
$ git clone https://github.com/mmgen/mmgen
Cloning into ’mmgen’...
If you’re doing an offline install, you can then copy the cloned mmgen directory
to your offline machine.
Enter the directory and install:
$ cd mmgen
$ git checkout stable_msys2
$ ./setup.py install
### 8. Install and launch your coin daemons
At this point your MMGen installation will be able to generate wallets, along
with keys and addresses for all supported coins. However, if you intend to do
any transacting, as you probably do, you’ll need to install and launch a coin
daemon or daemons. MMGen has full transaction support for BTC, BCH, LTC, ETH,
ETC and ERC20 tokens.
Go to the [**Install Bitcoind and other supported coin daemons**][ib] wiki page
and follow the instructions for your coins of choice. You can skip the parts
about adding to the Windows path, since your `PATH` variable was taken care of
in Step 5. Note that the daemons must be installed on both your online and
offline machines.
To transact ETH, ETC or ERC20 tokens you’ll need the latest Windows `parity.exe`
binary from the [Parity Github repository][pg]. Parity, unlike the other coin
daemons, needs to be installed on the online machine only. Copy the binary to
your executable path, preferably `C:\\msys64\usr\local\bin`. If the target
directory doesn’t exist yet, create it in your terminal like this:
$ mkdir -p /usr/local/bin
Typically you’ll wish to launch Parity as follows:
$ parity.exe --jsonrpc-apis=all
More information on Parity’s command-line options can be found [here][pl].
### 9. You’re done!
Congratulations, your installation is now complete, and you can proceed to
[**Getting Started with MMGen**][gs]. Before doing so, however, you might want
to acquaint yourself with some caveats regarding running MMGen on
Microsoft Windows:
+ [Autosigning][X] is not supported on Windows and is not likely to be in the
future.
+ [Monero wallet creation/syncing][M] support is also lacking due to password
file descriptor issues with `monero-wallet-cli`.
+ Due to unpredictable behavior of MSYS2's Python `getpass()` implementation,
passwords containing non-ASCII characters should be entered using the
`--echo-passphrase` option or via a password file. Otherwise, these
symbols might end up being silently ignored.
If you have an all-ASCII wallet password and wish to silence the annoying
warning you’re getting before every password prompt, set `mswin_pw_warning`
to `false` in `mmgen.cfg`.
If you *really* don't want to have your passwords echoed, you may test whether
`getpass()` is reading your non-ASCII input correctly by running the script
`test/misc/password_entry.py`. If the script reads back the characters
exactly as you entered them, then you’re probably safe and can go ahead and
disable the warning.
+ Though MSYS2 support is well tested and considered stable, it’s a new feature
and other glitches might remain. If you think you've found a bug, don't
hesistate to file an issue at <https://github.com/mmgen/mmgen/issues>.
[mh]: https://www.msys2.org
[mp]: https://sourceforge.net/projects/msys2
[mw]: https://github.com/msys2/msys2/wiki
[ov]: https://github.com/mmgen/mmgen/releases/tag/v0.9.8
[di]: Deprecated-MSWin-Installation
[ib]: Install-Bitcoind
[gs]: Getting-Started-with-MMGen
[pg]: https://github.com/paritytech/parity-ethereum/releases
[pl]: Altcoin-and-Forkcoin-Support#a_par
[X]: autosign-[MMGen-command-help]
[M]: Altcoin-and-Forkcoin-Support#a_xmr

View file

@ -1,82 +0,0 @@
MinGW (Minimal GNU for Windows) provides the gcc compiler and related tools for
compiling source code into Windows binaries. MSYS provides a Unix-like
environment with basic Unix shell commands. MinGW and MSYS are part of the
same project and are designed to be used together.
Complete hypertexed lists of the required MinGW and MSYS archive files are
provided below for convenient downloading. Save the archives into two separate
temporary directories (`mingw` and `msys`, for example).
> * [MinGW archive list][02]
> * [MSYS archive list][03]
##### Note: these lists were up to date at the time of writing (April 2014). More recent versions may be available in the [MinGW repository][01] as you read this, but hunting for them isn't likely to be worth your time.
Unpack the basic-bsdtar archive (in the MinGW archives) and copy the executable
`basic-bsdtar.exe` to your path (e.g. `C:\WINDOWS\system32`).
From the DOS prompt, run `mkdir C:\mingw` to create the directory `C:\mingw`.
Run `cd C:\mingw` to move to the directory. Unpack each of the MinGW archives
(except for `basic-bsdtar`) as follows:
basic-bsdtar -xf <path to archive>
Create a `C:\msys` directory the same way, move to it and repeat the above
unpacking procedure with the MSYS archives.
Add `C:\mingw\bin` to your user path. Consult [this page][05] for instructions
on editing your user path.
Close the command prompt window and open a new one. Launch the MSYS shell with
the command `C:\msys\bin\bash.exe --login`. You'll now be in the home
directory of your MSYS environment.
If you want be able to launch MSYS from an icon instead of typing the above
command all the time, then do the following: Make a copy of the "Command Line"
icon on your desktop and rename it to "MSYS". Right click on the icon, select
"Properties" and change the highlighted command path to `C:\msys\bin\bash.exe
--login`. You may also want to change the "Home Folder" field to your MSYS home
directory, `C:\msys\home\Admin` for the Admin user.
Note: At this point you're advised to read [**A word on text editors**][00]
before proceeding further with your installation.
Run the command `mount c:/mingw /mingw` to include your MinGW installation in
the MSYS tree. So you won't have to run this command every time you log in to
MSYS, open the file `/etc/fstab` in your text editor and add the line `c:/mingw
/mingw` (if it's not already there).
#### Unix commands and environment:
If you're new to Unix, you should learn a few key commands:
> * `ls` - view directory contents (`ls -l` for a long view)
> * `rm` - remove files (`rm -r` to remove entire directory trees)
> * `rmdir` - remove an empty directory
> * `cp` - copy a file (`cp -a` to copy directory trees)
> * `mv` - move a file or directory
> * `cat` - output a file to screen
> * `less` - view a file page-by-page, with scrollback
Command help texts can be accessed with the `--help` switch. The MSYS root
directory is `/`. Drive letter `C:` can be accessed as `/c/`.
Environmental variables may be viewed with the `env` command. Individual
variables may be displayed like this:
$ echo $PATH
and set like this:
$ set PATH=$PATH:/home/Admin/bin
Sometimes variables must be exported to be visible to called programs:
$ export PATH
[00]: A-word-on-text-editors
[01]: http://sourceforge.net/projects/mingw/files/
[02]: Required-MinGW-Archives
[03]: Required-MSYS-Archives
[05]: Editing-the-user-path-in-Windows

View file

@ -2,7 +2,7 @@
#### [Full support for Ethereum (ETH), Ethereum Classic (ETC) and ERC20 Tokens](#a_eth)
* [Install and run Parity Ethereum](#a_par)
* [Install the Pyethereum library](#a_pe)
* [Install Ethereum dependencies](#a_ed)
* [Transacting and other basic operations](#a_tx)
* [Creating and deploying ERC20 tokens](#a_dt)
@ -41,41 +41,21 @@ To run the daemon offline, use `--mode=offline`, otherwise `--mode=active`.
You may require other options as well. Consult `parity --help` for the full
list.
#### <a name='a_pe'>Install the Pyethereum library</a>
#### <a name='a_ed'>Install Ethereum dependencies</a>
Signing of ETH and ETC transactions is handled by the [pyethereum][y] library.
Ensure that Python version 3.6 or above is installed on your system:
First, using the [pip3][P] Python package installer, install the following
dependencies:
$ python3 --version
*Note: Ubuntu Xenial users will have to upgrade the Python interpreter and
Python dependencies listed in the [Install wiki][iw] from version 3.5 to 3.6
before proceeding. This can be done by adding the Bionic repository to
'sources.list' and reinstalling the relevant packages with '-t bionic'*
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'
$ sudo -H pip3 install wheel future pysha3 PyYAML py_ecc rlp
Install the Ethereum-specific Python dependencies. The `--no-deps` option
will prevent pip from installing a lot of unneeded stuff:
As of this writing, the current “stable” version of pyethereum (2.3.2) is
broken, so we must check out a more recent version from Github:
$ git clone https://github.com/ethereum/pyethereum
$ cd pyethereum
$ git checkout b704a5c
To prevent the library from auto-installing a lot of unneeded dependencies
(Pycryptodome in particular, which would stomp on our existing Pycrypto
installation) we need to edit the file 'requirements.txt' and remove the
following unneeded packages:
coincurve
pbkdf2
pyethash
pycryptodome
repoze.lru
Now we can proceed with the install:
$ sudo python3 ./setup.py install
$ sudo -H pip3 install --no-deps py_ecc==1.6.0 mypy_extensions==0.4.1
#### <a name='a_tx'>Transacting and other basic operations</a>

View file

@ -0,0 +1,125 @@
### Introduction
Beginning with Version 0.11.0, every MMGen wallet has a two sets of
associated subwallets with “long“ and “short” seeds.
An MMGen subwallet is identical to an ordinary MMGen wallet in every respect.
This provides a real-world security benefit, as it prevents an attacker from
knowing whether the wallet is indeed a subwallet, i.e. whether it has a parent
from which it was derived.
Subwallets are specified by a “Subseed Index” consisting of:
a) an integer in the range 1-1000000, plus
b) an optional single letter, ‘L’ or ‘S’
The letter designates the length of the subwallet’s seed. If omitted, ‘L’ is
assumed.
Long (‘L’) subwallets have the same seed length as their parent wallet
(typically 256 bits), while short (‘S’) subwallets always have 128-bit seeds.
Long and short subwallets for a given index are derived independently, so both
may be used.
If you have a default wallet installed, you may view the Seed IDs of its
subwallets like this:
$ mmgen-tool list_subseeds 1-5
Parent Seed: DF449DA4 (256 bits)
Long Subseeds Short Subseeds
------------- --------------
1L: FC9A8735 1S: 930E1AD5
2L: 62B02F54 2S: DF14AB49
3L: 9E884E99 3S: AD3ABD98
4L: DB595AE1 4S: 3E885EC4
5L: 36D5A0D1 5S: 30D66FF5
Here a range of 1-5 was chosen. Indexes of up to one million are allowed, which
means every wallet has a total of two million potential subwallets.
Subwallets may be referenced either by their Subseed Index or Seed ID:
$ mmgen-tool get_subseed 4S
3E885EC4
$ mmgen-tool get_subseed_by_seed_id 3E885EC4
4S
### Subwallet generation
To generate a subwallet, use the `mmgen-subwalletgen` command. For example,
you’d generate your default wallet’s 4th short subwallet as follows:
$ mmgen-subwalletgen 4S
...
MMGen wallet written to file '3E885EC4-ABCDEF00[128,3].mmdat'
And view its seed phrase like this:
$ mmgen-walletconv -qS -o words 3E885EC4-ABCDEF00[128,3].mmdat
...
peaceful marry wrong surround treasure sort use favorite enough wolf suspend path
Since wallets generated by `mmgen-subwalletgen` are just ordinary wallets, you
can use them anywhere you’d use an ordinary MMGen wallet.
Being ordinary wallets, subwallets may be used to generate other subwallets in
turn, leading to hierarchies of arbitrary depth. However, this is inadvisable
in practice for two reasons: Firstly, it creates accounting complexity,
requiring the user to independently keep track of a derivation tree. More
importantly, however, it leads to the danger of Seed ID collisions between
subseeds at different levels of the hierarchy, as MMGen checks and avoids ID
collisions only among sibling subseeds and their parent.
An exception to this caveat would be a multi-user setup where sibling subwallets
are distributed to different users as their default wallets. Since the subseeds
derived from these subwallets are private to each user, Seed ID collisions among
them don’t present a problem.
A safe rule of thumb, therefore, is for *each user* to limit his/her installation
to a single master wallet and derive all subwallets from this single parent.
### Address generation and transaction signing using the parent wallet
A parent wallet may be used to generate keys and addresses for its associated
subwallets. Given our above example (a default wallet having subwallet 4S with
Seed ID 3E885EC4), the following two commands are equivalent:
# Generate ten bech32 addresses from the subwallet:
$ mmgen-addrgen --type=bech32 3E885EC4-ABCDEF00[128,3].mmdat 1-10
# Do the same thing, but using the parent wallet:
$ mmgen-addrgen --type=bech32 --subwallet=4S 1-10
The same goes for transaction signing. Consider a transaction that spends to
and from addresses in the subwallet:
$ mmgen-txcreate 3E885EC4:B:2
(choose an input from subwallet 3E885EC4)
Transaction written to file '<something>.rawtx'
This transaction can now be signed either with the subwallet itself:
$ mmgen-txsign *.rawtx 3E885EC4-ABCDEF00[128,3].mmdat
...
Signed transaction written to file '<something>.sigtx'
Or with its parent wallet:
$ mmgen-txsign *.rawtx
...
Found subseed 3E885EC4 (DF449DA4:4S)
...
Signed transaction written to file '<something>.sigtx'
The latter command works “by magic” because by default each wallet scans its
first 100 subwallets for Seed IDs. For a transaction containing addresses from
a subwallet with an index higher than 100, say 144, we must extend the parent
wallet’s search like this:
$ mmgen-txsign --subseeds=144 *.rawtx
This is basically all you need to know about subwallets. For live versions of
the above examples that can be run as-is, see commits 7538a94, d1b8aef and
82086c9.