From 83e9899b38bbef7fef710177239053df39723757 Mon Sep 17 00:00:00 2001 From: MMGen Date: Sun, 14 Jan 2018 17:24:36 +0300 Subject: [PATCH] Version 0.9.6 --- README.md | 2 +- cmds/mmgen-addrgen | 2 +- cmds/mmgen-addrimport | 2 +- cmds/mmgen-autosign | 2 +- cmds/mmgen-keygen | 2 +- cmds/mmgen-passchg | 2 +- cmds/mmgen-passgen | 2 +- cmds/mmgen-regtest | 2 +- cmds/mmgen-split | 2 +- cmds/mmgen-tool | 2 +- cmds/mmgen-txbump | 2 +- cmds/mmgen-txcreate | 2 +- cmds/mmgen-txdo | 2 +- cmds/mmgen-txsend | 2 +- cmds/mmgen-txsign | 2 +- cmds/mmgen-walletchk | 2 +- cmds/mmgen-walletconv | 2 +- cmds/mmgen-walletgen | 2 +- ...d-from-Source-on-Debian-or-Ubuntu-Linux.md | 11 +- ...Install-MMGen-on-Debian-or-Ubuntu-Linux.md | 6 +- ...d-Its-Dependencies-on-Microsoft-Windows.md | 159 +++--- .../using-mmgen/Getting-Started-with-MMGen.md | 527 ++++++++++-------- extmod/secp256k1mod.c | 2 +- mmgen/addr.py | 4 +- mmgen/altcoin.py | 2 +- mmgen/color.py | 2 +- mmgen/common.py | 2 +- mmgen/crypto.py | 2 +- mmgen/filename.py | 2 +- mmgen/globalvars.py | 15 +- mmgen/license.py | 2 +- mmgen/main.py | 2 +- mmgen/main_addrgen.py | 2 +- mmgen/main_addrimport.py | 2 +- mmgen/main_passgen.py | 2 +- mmgen/main_regtest.py | 2 +- mmgen/main_split.py | 2 +- mmgen/main_tool.py | 2 +- mmgen/main_txbump.py | 2 +- mmgen/main_txcreate.py | 2 +- mmgen/main_txdo.py | 2 +- mmgen/main_txsend.py | 2 +- mmgen/main_txsign.py | 2 +- mmgen/main_wallet.py | 2 +- mmgen/mn_electrum.py | 2 +- mmgen/mn_tirosh.py | 2 +- mmgen/obj.py | 6 +- mmgen/opts.py | 2 +- mmgen/protocol.py | 4 +- mmgen/regtest.py | 28 +- mmgen/rpc.py | 2 +- mmgen/seed.py | 2 +- mmgen/sha256.py | 2 +- mmgen/term.py | 2 +- mmgen/test.py | 2 +- mmgen/tool.py | 2 +- mmgen/tw.py | 2 +- mmgen/tx.py | 2 +- mmgen/txsign.py | 2 +- mmgen/util.py | 2 +- scripts/test-release.sh | 33 +- scripts/tx-btc2bch.py | 2 +- setup.py | 2 +- test/gentest.py | 2 +- test/mmgen_pexpect.py | 2 +- test/objtest.py | 2 +- test/scrambletest.py | 7 +- test/test.py | 16 +- test/tooltest.py | 2 +- 69 files changed, 542 insertions(+), 388 deletions(-) diff --git a/README.md b/README.md index 22733ced..4886af89 100644 --- a/README.md +++ b/README.md @@ -109,7 +109,7 @@ future use in an address file, which addresses may safely be made public. > #### [Recovering your keys without the MMGen software][r] -> #### [Forkcoin and Altcoin support (BCH,LTC,ETH,ETC,DASH,ZEC)][x] +> #### [Forkcoin and Altcoin support (BCH,LTC,ETH,ETC,ZEC,XMR and 144 Bitcoin-derived alts)][x] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/cmds/mmgen-addrgen b/cmds/mmgen-addrgen index 037ea5de..6f92797c 100755 --- a/cmds/mmgen-addrgen +++ b/cmds/mmgen-addrgen @@ -1,7 +1,7 @@ #!/usr/bin/env python # mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution -# Copyright (C)2013-2017 Philemon +# Copyright (C)2013-2018 The MMGen Project # # This program is free software: you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free Software diff --git a/cmds/mmgen-addrimport b/cmds/mmgen-addrimport index 39505615..8358986a 100755 --- a/cmds/mmgen-addrimport +++ b/cmds/mmgen-addrimport @@ -1,7 +1,7 @@ #!/usr/bin/env python # mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution -# Copyright (C)2013-2017 Philemon +# Copyright (C)2013-2018 The MMGen Project # # This program is free software: you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free Software diff --git a/cmds/mmgen-autosign b/cmds/mmgen-autosign index ecfb2b82..ec57b761 100755 --- a/cmds/mmgen-autosign +++ b/cmds/mmgen-autosign @@ -1,7 +1,7 @@ #!/usr/bin/env python # # mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution -# Copyright (C)2013-2017 Philemon +# Copyright (C)2013-2018 The MMGen Project # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/cmds/mmgen-keygen b/cmds/mmgen-keygen index e68daf70..7555af6b 100755 --- a/cmds/mmgen-keygen +++ b/cmds/mmgen-keygen @@ -1,7 +1,7 @@ #!/usr/bin/env python # mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution -# Copyright (C)2013-2017 Philemon +# Copyright (C)2013-2018 The MMGen Project # # This program is free software: you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free Software diff --git a/cmds/mmgen-passchg b/cmds/mmgen-passchg index fa06e1ac..e8ae0971 100755 --- a/cmds/mmgen-passchg +++ b/cmds/mmgen-passchg @@ -1,7 +1,7 @@ #!/usr/bin/env python # mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution -# Copyright (C)2013-2017 Philemon +# Copyright (C)2013-2018 The MMGen Project # # This program is free software: you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free Software diff --git a/cmds/mmgen-passgen b/cmds/mmgen-passgen index d5bf204f..707d973a 100755 --- a/cmds/mmgen-passgen +++ b/cmds/mmgen-passgen @@ -1,7 +1,7 @@ #!/usr/bin/env python # mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution -# Copyright (C)2013-2017 Philemon +# Copyright (C)2013-2018 The MMGen Project # # This program is free software: you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free Software diff --git a/cmds/mmgen-regtest b/cmds/mmgen-regtest index 9766b5a9..f59c4d44 100755 --- a/cmds/mmgen-regtest +++ b/cmds/mmgen-regtest @@ -1,7 +1,7 @@ #!/usr/bin/env python # mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution -# Copyright (C)2013-2017 Philemon +# Copyright (C)2013-2018 The MMGen Project # # This program is free software: you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free Software diff --git a/cmds/mmgen-split b/cmds/mmgen-split index e0161754..d8446071 100755 --- a/cmds/mmgen-split +++ b/cmds/mmgen-split @@ -1,7 +1,7 @@ #!/usr/bin/env python # mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution -# Copyright (C)2013-2017 Philemon +# Copyright (C)2013-2018 The MMGen Project # # This program is free software: you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free Software diff --git a/cmds/mmgen-tool b/cmds/mmgen-tool index df25ec7d..7760cc92 100755 --- a/cmds/mmgen-tool +++ b/cmds/mmgen-tool @@ -1,7 +1,7 @@ #!/usr/bin/env python # mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution -# Copyright (C)2013-2017 Philemon +# Copyright (C)2013-2018 The MMGen Project # # This program is free software: you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free Software diff --git a/cmds/mmgen-txbump b/cmds/mmgen-txbump index 7ae848dd..272e3e32 100755 --- a/cmds/mmgen-txbump +++ b/cmds/mmgen-txbump @@ -1,7 +1,7 @@ #!/usr/bin/env python # mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution -# Copyright (C)2013-2017 Philemon +# Copyright (C)2013-2018 The MMGen Project # # This program is free software: you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free Software diff --git a/cmds/mmgen-txcreate b/cmds/mmgen-txcreate index 71e5a773..f2300b57 100755 --- a/cmds/mmgen-txcreate +++ b/cmds/mmgen-txcreate @@ -1,7 +1,7 @@ #!/usr/bin/env python # mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution -# Copyright (C)2013-2017 Philemon +# Copyright (C)2013-2018 The MMGen Project # # This program is free software: you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free Software diff --git a/cmds/mmgen-txdo b/cmds/mmgen-txdo index 490a06e6..57e37fe7 100755 --- a/cmds/mmgen-txdo +++ b/cmds/mmgen-txdo @@ -1,7 +1,7 @@ #!/usr/bin/env python # mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution -# Copyright (C)2013-2017 Philemon +# Copyright (C)2013-2018 The MMGen Project # # This program is free software: you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free Software diff --git a/cmds/mmgen-txsend b/cmds/mmgen-txsend index bd11a137..e8bfd12b 100755 --- a/cmds/mmgen-txsend +++ b/cmds/mmgen-txsend @@ -1,7 +1,7 @@ #!/usr/bin/env python # mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution -# Copyright (C)2013-2017 Philemon +# Copyright (C)2013-2018 The MMGen Project # # This program is free software: you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free Software diff --git a/cmds/mmgen-txsign b/cmds/mmgen-txsign index 4dbcad69..08580798 100755 --- a/cmds/mmgen-txsign +++ b/cmds/mmgen-txsign @@ -1,7 +1,7 @@ #!/usr/bin/env python # mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution -# Copyright (C)2013-2017 Philemon +# Copyright (C)2013-2018 The MMGen Project # # This program is free software: you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free Software diff --git a/cmds/mmgen-walletchk b/cmds/mmgen-walletchk index 11e727b7..4e333dcf 100755 --- a/cmds/mmgen-walletchk +++ b/cmds/mmgen-walletchk @@ -1,7 +1,7 @@ #!/usr/bin/env python # mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution -# Copyright (C)2013-2017 Philemon +# Copyright (C)2013-2018 The MMGen Project # # This program is free software: you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free Software diff --git a/cmds/mmgen-walletconv b/cmds/mmgen-walletconv index 787f4421..e8119357 100755 --- a/cmds/mmgen-walletconv +++ b/cmds/mmgen-walletconv @@ -1,7 +1,7 @@ #!/usr/bin/env python # mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution -# Copyright (C)2013-2017 Philemon +# Copyright (C)2013-2018 The MMGen Project # # This program is free software: you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free Software diff --git a/cmds/mmgen-walletgen b/cmds/mmgen-walletgen index 1679f32e..52df9b89 100755 --- a/cmds/mmgen-walletgen +++ b/cmds/mmgen-walletgen @@ -1,7 +1,7 @@ #!/usr/bin/env python # mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution -# Copyright (C)2013-2017 Philemon +# Copyright (C)2013-2018 The MMGen Project # # This program is free software: you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free Software diff --git a/doc/wiki/install-linux/Install-Bitcoind-from-Source-on-Debian-or-Ubuntu-Linux.md b/doc/wiki/install-linux/Install-Bitcoind-from-Source-on-Debian-or-Ubuntu-Linux.md index debbd9f4..5b58e404 100644 --- a/doc/wiki/install-linux/Install-Bitcoind-from-Source-on-Debian-or-Ubuntu-Linux.md +++ b/doc/wiki/install-linux/Install-Bitcoind-from-Source-on-Debian-or-Ubuntu-Linux.md @@ -73,15 +73,16 @@ binaries are available for Bitcoin Core, Bitcoin ABC and Litecoin. See the $ cd src $ sudo install -sv litecoind litecoin-cli /usr/local/bin -> To simplify the starting and stopping of several daemons on the same machine, -> download and use the node start and stop scripts from the MMGenLive project: +Refer to [Run][02] on the binary installation page for instructions on running +your coin daemon(s). + +Alternatively, you may download and use the node start and stop scripts from the +MMGenLive project, which simplify starting and stopping multiple daemons on the +same machine: $ curl -O 'https://raw.githubusercontent.com/mmgen/MMGenLive/master/home.mmgen/bin/mmlive-node-{start,stop}' $ sudo install -v mmlive-node-{start,stop} /usr/local/bin -Refer to [Run][02] on the binary installation page for instructions on running -your coin daemon(s). - [01]: Install-Bitcoind [02]: Install-Bitcoind#a_r [bu]: https://github.com/bitcoin/bitcoin/blob/master/doc/build-unix.md diff --git a/doc/wiki/install-linux/Install-MMGen-on-Debian-or-Ubuntu-Linux.md b/doc/wiki/install-linux/Install-MMGen-on-Debian-or-Ubuntu-Linux.md index c40e0737..18e63d15 100644 --- a/doc/wiki/install-linux/Install-MMGen-on-Debian-or-Ubuntu-Linux.md +++ b/doc/wiki/install-linux/Install-MMGen-on-Debian-or-Ubuntu-Linux.md @@ -2,11 +2,11 @@ > Install required Debian/Ubuntu packages: - $ sudo apt-get install python-pip python-dev python-pexpect python-ecdsa python-scrypt libssl-dev git autoconf libtool wipe python-setuptools libgmp-dev + $ sudo apt-get install python-dev python-pexpect python-ecdsa python-scrypt libssl-dev git autoconf libtool wipe python-setuptools libgmp-dev python-crypto python-nacl python-pysha3 python-pip -> Install the Python Cryptography Toolkit: +> Install fast ed25519 Python package (optional, but recommended for Monero addresses): - $ sudo -H pip install pycrypto + $ sudo pip install ed25519ll > Install the secp256k1 library: diff --git a/doc/wiki/install-mswin/Install-MMGen-and-Its-Dependencies-on-Microsoft-Windows.md b/doc/wiki/install-mswin/Install-MMGen-and-Its-Dependencies-on-Microsoft-Windows.md index 7f5280de..65262968 100644 --- a/doc/wiki/install-mswin/Install-MMGen-and-Its-Dependencies-on-Microsoft-Windows.md +++ b/doc/wiki/install-mswin/Install-MMGen-and-Its-Dependencies-on-Microsoft-Windows.md @@ -8,8 +8,8 @@ the preferred way for all non-Linux users to run MMGen.*** 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 + $ 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 @@ -27,11 +27,11 @@ archive would thus look something like this: Grab the v1.0.x [tarball][06] from openssl.org, unpack and build: - $ tar -xzf /openssl-1.0.2j.tar.gz - $ cd openssl-1.0.2j - $ ./Configure mingw64 --openssldir=/usr - $ make - $ make install + $ tar -xzf /openssl-1.0.2j.tar.gz + $ cd openssl-1.0.2j + $ ./Configure mingw64 --openssldir=/usr + $ make + $ make install ### 3. Build the Scrypt Python module: @@ -39,90 +39,119 @@ 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 /91d194b6a6bd.zip - $ cd mhallin-py-scrypt-91d194b6a6bd + $ cd /build + $ unzip /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 + from setuptools import setup, Extension to read - from distutils.core import setup, Extension + from distutils.core import setup, Extension Right before the line beginning with - scrypt_module = Extension( + 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'] + 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 + $ 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 + $ 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 /pycrypto-2.6.1.tar.gz - $ cd pycrypto-2.6.1 + $ cd /build + $ tar -xzf /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"]) + 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 + $ 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 /ecdsa-0.13.tar.gz - $ cd ecdsa-0.13 - $ python setup.py install + $ cd /build + $ tar -xzf /ecdsa-0.13.tar.gz + $ cd ecdsa-0.13 + $ python setup.py install -### 6. Install the colorama Python module: +### 6. Install the ed25519ll Python module (required for Monero address generation): + +Grab the latest ed25519ll [tarball][43], unpack and build: + + $ cd /build + $ tar -xzf /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 /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 /colorama-0.3.7.tar.gz - $ cd colorama-0.3.7 - $ python setup.py install + $ cd /build + $ tar -xzf /colorama-0.3.7.tar.gz + $ cd colorama-0.3.7 + $ python setup.py install -### 7. Install the pexpect Python module (needed for test suite): +### 9. Install the pexpect Python module (needed for test suite): Grab the latest pexpect [tarball][15], unpack and build: - $ cd /build - $ tar -xzf /pexpect-4.2.1.tar.gz - $ cd pexpect-4.2.1 - $ python setup.py install + $ cd /build + $ tar -xzf /pexpect-4.2.1.tar.gz + $ cd pexpect-4.2.1 + $ python setup.py install -### 8. Install sdelete utility (needed for secure wallet deletion): +### 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). -### 9. Build libsecp256k1: +### 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 @@ -134,41 +163,41 @@ them yourself. You'll need these archives: Unpack them in your /mingw directory and fix up some filenames: - $ cd /mingw - $ tar -xzf /autoconf2.5-2.68-1-mingw32-bin.tar.lzma - $ tar -xzf /automake1.11-1.11.1-1-mingw32-bin.tar.lzma - $ tar -xzf /libtool-2.4-1-mingw32-bin.tar.lzma - $ cd bin - $ cp autoconf-* autoconf - $ cp automake-* automake - $ cp aclocal-* aclocal - $ cp autoreconf-* autoreconf + $ cd /mingw + $ tar -xzf /autoconf2.5-2.68-1-mingw32-bin.tar.lzma + $ tar -xzf /automake1.11-1.11.1-1-mingw32-bin.tar.lzma + $ tar -xzf /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 /master.zip - $ cd secp256k1-master - $ ./autogen.sh - $ ./configure - $ make - $ make install + $ cd /build + $ unzip.exe /master.zip + $ cd secp256k1-master + $ ./autogen.sh + $ ./configure + $ make + $ make install -### 10. Install MMGen: +### 12. Install MMGen: Get the [zip archive][10] of the latest stable version from GitHub, unpack and install: - $ cd /build - $ unzip.exe /stable_mswin.zip - $ cd mmgen-stable_mswin - $ python setup.py build --compiler=mingw32 - $ sudo ./setup.py install + $ cd /build + $ unzip.exe /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 + $ 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 @@ -185,3 +214,5 @@ the MMGen test suite to make sure your installation's working: [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 diff --git a/doc/wiki/using-mmgen/Getting-Started-with-MMGen.md b/doc/wiki/using-mmgen/Getting-Started-with-MMGen.md index e42f4d30..990d7928 100644 --- a/doc/wiki/using-mmgen/Getting-Started-with-MMGen.md +++ b/doc/wiki/using-mmgen/Getting-Started-with-MMGen.md @@ -27,7 +27,10 @@ * With an online (hot) wallet * With an offline (cold storage) wallet -#### Forkcoin and Altcoin support (BCH,LTC) +#### Forkcoin and Altcoin support +* Full support for Bcash (BCH) and Litecoin +* Enhanced key/address generation support for Zcash (ZEC) and Monero (XMR) +* Key/address generation support for ETH, ETC and 144 Bitcoin-derived altcoins ### Preliminaries @@ -67,10 +70,10 @@ options on the command line. Sample MMGen command invocations: - $ mmgen-txcreate --help - $ mmgen-addrgen --verbose 1-10 - $ mmgen-walletgen - $ mmgen-walletgen --quiet --seed-len 128 + $ mmgen-txcreate --help + $ mmgen-addrgen --verbose 1-10 + $ mmgen-walletgen + $ mmgen-walletgen --quiet --seed-len 128 #### Configuration file @@ -118,9 +121,9 @@ source in all commands where a seed source is required.* On your offline computer, generate an MMGen wallet: - $ mmgen-walletgen - ... - MMGen wallet written to file '/home/username/.mmgen/89ABCDEF-76543210[256,3].mmdat' + $ mmgen-walletgen + ... + MMGen wallet written to file '/home/username/.mmgen/89ABCDEF-76543210[256,3].mmdat' ‘89ABCDEF’ is the Seed ID; ‘76543210’ is the Key ID. These are randomly generated, so your IDs will of course be different than these. @@ -146,29 +149,31 @@ printed out on paper. Another highly recommended way to back up your wallet is to generate a mnemonic or seed file as described below and memorize it. If you have an average or better memory, you'll find memorizing your mnemonic to be -surprisingly easy. +surprisingly easy. And the peace of mind that comes with knowing that your coins +are recoverable **even if you lose all your physical backups** can't be +overestimated. #### Generate addresses (offline computer) Now generate ten Segwit addresses with your just-created wallet: - $ mmgen-addrgen --type=segwit 1-10 - ... - Addresses written to file '89ABCDEF-S[1-10].addrs' + $ mmgen-addrgen --type=segwit 1-10 + ... + Addresses written to file '89ABCDEF-S[1-10].addrs' - $ cat '89ABCDEF-S[1-10].addrs' - 89ABCDEF SEGWIT { - 1 36bNmyYISiptuvJG3X7MPwiiS4HYvD7ksE - 2 3AmkUxrfy5dMrfmeYwTxLxfIswUCcpeysc - 3 3HgYCsfqYzIg7LVVfDTp7gYJocJEiDAy6N - 4 34Tu3z1tiexXDonNsFIkvzqutE5E3pTK8s - 5 3PeI55vtp2bX2uKDkAAR2c6ekHNYe4Hcq7 - 6 3FEqfEsSILwXPfMvVvVuUovzTaaST62Mnf - 7 3LTTzuhMqPLwQ4IGCwwugny6ZMtUQJSJ1 - 8 3F9495H8EJLb54wirgZkVgI47SP7M2RQWv - 9 3JbrCyt7BdxRE9GX1N7GiEct8UnIjPmpYd - 10 3H7vVTk4ejUbQXw45I6g5qvPBSe9bsjDqh - } + $ cat '89ABCDEF-S[1-10].addrs' + 89ABCDEF SEGWIT { + 1 36bNmyYISiptuvJG3X7MPwiiS4HYvD7ksE + 2 3AmkUxrfy5dMrfmeYwTxLxfIswUCcpeysc + 3 3HgYCsfqYzIg7LVVfDTp7gYJocJEiDAy6N + 4 34Tu3z1tiexXDonNsFIkvzqutE5E3pTK8s + 5 3PeI55vtp2bX2uKDkAAR2c6ekHNYe4Hcq7 + 6 3FEqfEsSILwXPfMvVvVuUovzTaaST62Mnf + 7 3LTTzuhMqPLwQ4IGCwwugny6ZMtUQJSJ1 + 8 3F9495H8EJLb54wirgZkVgI47SP7M2RQWv + 9 3JbrCyt7BdxRE9GX1N7GiEct8UnIjPmpYd + 10 3H7vVTk4ejUbQXw45I6g5qvPBSe9bsjDqh + } Note that the address range ‘1-10’ specified on the command line is included in the resulting filename. @@ -183,21 +188,21 @@ installations, and it's unlikely you'll wish to generate them. Compressed addresses are the preferred choice for Bitcoin Cash (BCH) wallets, since Bitcoin Cash doesn't support Segwit. - # legacy uncompressed - $ mmgen-addrgen 1-10 - ... - $ cat '89ABCDEF[1-10].addrs' - 89ABCDEF { - 1 12GiSWo9zIQgkCmjAaLIrbPwXhKry2jHhj - ... + # legacy uncompressed + $ mmgen-addrgen 1-10 + ... + $ cat '89ABCDEF[1-10].addrs' + 89ABCDEF { + 1 12GiSWo9zIQgkCmjAaLIrbPwXhKry2jHhj + ... - # compressed P2PKH - $ mmgen-addrgen --type=compressed 1-10 - ... - $ cat '89ABCDEF-C[1-10].addrs' - 89ABCDEF COMPRESSED { - 1 13jbRxWjswXtaDzLBJDboMcIe6nLohFb9M - ... + # compressed P2PKH + $ mmgen-addrgen --type=compressed 1-10 + ... + $ cat '89ABCDEF-C[1-10].addrs' + 89ABCDEF COMPRESSED { + 1 13jbRxWjswXtaDzLBJDboMcIe6nLohFb9M + ... Note that for non-legacy address types the code letter is included in the filename. @@ -215,27 +220,27 @@ provide the addresses with labels. We’ll use the labels ‘Donations’, ‘S Make a copy of the address file - $ cp '89ABCDEF-S[1-10].addrs' my.addrs + $ cp '89ABCDEF-S[1-10].addrs' my.addrs and edit it using the text editor of your choice, - $ nano my.addrs + $ nano my.addrs adding labels to the addresses you’ve chosen to spend to: - # My first MMGen addresses - 89ABCDEF SEGWIT { - 1 36bNmyYISiptuvJG3X7MPwiiS4HYvD7ksE Donations - 2 3AmkUxrfy5dMrfmeYwTxLxfIswUCcpeysc Storage 1 - 3 3HgYCsfqYzIg7LVVfDTp7gYJocJEiDAy6N Storage 2 - 4 34Tu3z1tiexXDonNsFIkvzqutE5E3pTK8s Storage 3 - 5 3PeI55vtp2bX2uKDkAAR2c6ekHNYe4Hcq7 - 6 3FEqfEsSILwXPfMvVvVuUovzTaaST62Mnf - 7 3LTTzuhMqPLwQ4IGCwwugny6ZMtUQJSJ1 - 8 3F9495H8EJLb54wirgZkVgI47SP7M2RQWv - 9 3JbrCyt7BdxRE9GX1N7GiEct8UnIjPmpYd - 10 3H7vVTk4ejUbQXw45I6g5qvPBSe9bsjDqh - } + # My first MMGen addresses + 89ABCDEF SEGWIT { + 1 36bNmyYISiptuvJG3X7MPwiiS4HYvD7ksE Donations + 2 3AmkUxrfy5dMrfmeYwTxLxfIswUCcpeysc Storage 1 + 3 3HgYCsfqYzIg7LVVfDTp7gYJocJEiDAy6N Storage 2 + 4 34Tu3z1tiexXDonNsFIkvzqutE5E3pTK8s Storage 3 + 5 3PeI55vtp2bX2uKDkAAR2c6ekHNYe4Hcq7 + 6 3FEqfEsSILwXPfMvVvVuUovzTaaST62Mnf + 7 3LTTzuhMqPLwQ4IGCwwugny6ZMtUQJSJ1 + 8 3F9495H8EJLb54wirgZkVgI47SP7M2RQWv + 9 3JbrCyt7BdxRE9GX1N7GiEct8UnIjPmpYd + 10 3H7vVTk4ejUbQXw45I6g5qvPBSe9bsjDqh + } Any line beginning with ‘#’ is a comment. Comments may be placed at the ends of lines as well. @@ -249,22 +254,22 @@ existing 'wallet.dat' file out of harm’s way. Start bitcoind and let it generate a new 'wallet.dat'; this you’ll use as your tracking wallet. Import your ten addresses into the new tracking wallet with the command: - $ mmgen-addrimport --batch my.addrs + $ mmgen-addrimport --batch my.addrs These addresses will now be tracked: any BTC transferred to them will show up in your listing of address balances. Balances can be viewed using `mmgen-tool listaddresses` (the `showempty` option requests the inclusion of addresses with empty balances). - $ mmgen-tool listaddresses showempty=1 - MMGenID ADDRESS COMMENT BALANCE - 89ABCDEF:S:1 36bNmyYISiptuvJG3X7MPwiiS4HYvD7ksE Donations 0 - 89ABCDEF:S:2 3AmkUxrfy5dMrfmeYwTxLxfIswUCcpeysc Storage 1 0 - 89ABCDEF:S:3 3HgYCsfqYzIg7LVVfDTp7gYJocJEiDAy6N Storage 2 0 - 89ABCDEF:S:4 34Tu3z1tiexXDonNsFIkvzqutE5E3pTK8s Storage 3 0 - 89ABCDEF:S:5 3PeI55vtp2bX2uKDkAAR2c6ekHNYe4Hcq7 0 - ... - TOTAL: 0 BTC + $ mmgen-tool listaddresses showempty=1 + MMGenID ADDRESS COMMENT BALANCE + 89ABCDEF:S:1 36bNmyYISiptuvJG3X7MPwiiS4HYvD7ksE Donations 0 + 89ABCDEF:S:2 3AmkUxrfy5dMrfmeYwTxLxfIswUCcpeysc Storage 1 0 + 89ABCDEF:S:3 3HgYCsfqYzIg7LVVfDTp7gYJocJEiDAy6N Storage 2 0 + 89ABCDEF:S:4 34Tu3z1tiexXDonNsFIkvzqutE5E3pTK8s Storage 3 0 + 89ABCDEF:S:5 3PeI55vtp2bX2uKDkAAR2c6ekHNYe4Hcq7 0 + ... + TOTAL: 0 BTC *While not covered in this introduction, note that it’s also possible to [import ordinary Bitcoin addresses into your tracking wallet][01]. This allows you to @@ -282,13 +287,13 @@ them over the Bitcoin network. If you send 0.1, 0.2, 0.3 and 0.4 BTC respectively, your address listing will look like this after the transactions have confirmed: - $ mmgen-tool listaddresses - MMGenID COMMENT BALANCE - 89ABCDEF:S:1 Donations 0.1 - 89ABCDEF:S:2 Storage 1 0.2 - 89ABCDEF:S:3 Storage 2 0.3 - 89ABCDEF:S:4 Storage 3 0.4 - TOTAL: 1 BTC + $ mmgen-tool listaddresses + MMGenID COMMENT BALANCE + 89ABCDEF:S:1 Donations 0.1 + 89ABCDEF:S:2 Storage 1 0.2 + 89ABCDEF:S:3 Storage 2 0.3 + 89ABCDEF:S:4 Storage 3 0.4 + TOTAL: 1 BTC #### Create a transaction (online computer) @@ -303,7 +308,7 @@ To send 0.1 BTC to the a third-party address 3AmkUxrfy5dMrfmeYwTxLxfIswUCcpeysc, for example, and send the change back to yourself at address 89ABCDEF:S:5, you’d issue the following command: - $ mmgen-txcreate 3AmkUxrfy5dMrfmeYwTxLxfIswUCcpeysc,0.1 89ABCDEF:S:5 + $ mmgen-txcreate 3AmkUxrfy5dMrfmeYwTxLxfIswUCcpeysc,0.1 89ABCDEF:S:5 'mmgen-txcreate' accepts either MMGen IDs or Bitcoin addresses as arguments. @@ -314,7 +319,7 @@ from the MMGen ID. Thus address ‘89ABCDEF:L:5’ may be expressed as To send 0.1 BTC to each of addresses 89ABCDEF:S:6 and 89ABCDEF:S:7 and return the change to 89ABCDEF:S:8, you’d do this: - $ mmgen-txcreate 89ABCDEF:S:6,0.1 89ABCDEF:S:7,0.1 89ABCDEF:S:8 + $ mmgen-txcreate 89ABCDEF:S:6,0.1 89ABCDEF:S:7,0.1 89ABCDEF:S:8 As you can see, each send address is followed by a comma and the amount. The address with no amount is the change address. All addresses belonging to your @@ -330,20 +335,20 @@ criteria: transaction ID, address, amount and transaction age. Your overall balance in BTC appears at the top of the screen. In our example, the display will look something like this: - UNSPENT OUTPUTS (sort order: Age) Total BTC: 1 - Num TX id Vout Address Amt(BTC) Age(d) - 1) e9742b16... 5 3L3kxmi.. 89ABCDEF:S:1 Donations 0.1 1 - 2) fa84d709... 6 3N4dSGj.. 89ABCDEF:S:2 Storage 1 0.2 1 - 3) 8dde8ef5... 6 3M1fVDc.. 89ABCDEF:S:3 Storage 1 0.3 1 - 4) c76874c7... 0 3E8MFoC.. 89ABCDEF:S:4 Storage 3 0.4 1 + UNSPENT OUTPUTS (sort order: Age) Total BTC: 1 + Num TX id Vout Address Amt(BTC) Age(d) + 1) e9742b16... 5 3L3kxmi.. 89ABCDEF:S:1 Donations 0.1 1 + 2) fa84d709... 6 3N4dSGj.. 89ABCDEF:S:2 Storage 1 0.2 1 + 3) 8dde8ef5... 6 3M1fVDc.. 89ABCDEF:S:3 Storage 1 0.3 1 + 4) c76874c7... 0 3E8MFoC.. 89ABCDEF:S:4 Storage 3 0.4 1 - Sort options: [t]xid, [a]mount, a[d]dress, [A]ge, [r]everse, [M]mgen addr - Display options: show [D]ays, [g]roup, show [m]mgen addr, r[e]draw screen - 'q'=quit view, 'p'=print to file, 'v'=pager view, 'w'=wide view, 'l'=add label: + Sort options: [t]xid, [a]mount, a[d]dress, [A]ge, [r]everse, [M]mgen addr + Display options: show [D]ays, [g]roup, show [m]mgen addr, r[e]draw screen + 'q'=quit view, 'p'=print to file, 'v'=pager view, 'w'=wide view, 'l'=add label: After quitting the menu with 'q', you’ll see the following prompt: - Enter a range or space-separated list of outputs to spend: + Enter a range or space-separated list of outputs to spend: Here you must choose unspent outputs of sufficient value to cover the send amount of 0.1 BTC, plus the transaction fee (for more on fees, see ‘Transaction @@ -351,7 +356,7 @@ Fees’ under ‘Advanced Topics’ below). Output #2 is worth 0.2 BTC, which i sufficient, so we’ll choose that. After several more prompts and confirmations, your transaction will be saved: - Transaction written to file 'FEDCBA[0.1].rawtx' + Transaction written to file 'FEDCBA[0.1].rawtx' Note that the transaction filename consists of a unique MMGen Transaction ID plus the non-change spend amount. @@ -364,9 +369,9 @@ and change addresses. This feature will be appreciated by privacy-conscious use Now transfer the the raw transaction file to your offline computer and sign it using your default wallet: - $ mmgen-txsign FEDCBA[0.1].rawtx - ... - Signed transaction written to file 'FEDCBA[0.1].sigtx' + $ mmgen-txsign FEDCBA[0.1].rawtx + ... + Signed transaction written to file 'FEDCBA[0.1].sigtx' Note that the signed transaction file has a new extension, '.sigtx'. @@ -377,9 +382,9 @@ network. Start bitcoind if it's not already running, and make sure your blockchain is fully synced. Then copy the signed transaction file to your online computer and issue the command: - $ mmgen-txsend FEDCBA[0.1].sigtx - ... - Transaction sent: abcd1234.... + $ mmgen-txsend FEDCBA[0.1].sigtx + ... + Transaction sent: abcd1234.... Like all MMGen commands, 'mmgen-txsend' is interactive, so you’ll be prompted before the transaction is actually broadcast. If the send was successful, a @@ -389,13 +394,13 @@ in our case). Once the transaction is broadcast to the network and confirmed, your address listing should look something like this: - $ mmgen-tool listaddresses minconf=1 - MMGenID COMMENT BALANCE - 89ABCDEF:S:1 Donations 0.1 - 89ABCDEF:S:3 Storage 2 0.3 - 89ABCDEF:S:4 Storage 3 0.4 - 89ABCDEF:S:5 Storage 1 0.0999 - TOTAL: 0.8999 BTC + $ mmgen-tool listaddresses minconf=1 + MMGenID COMMENT BALANCE + 89ABCDEF:S:1 Donations 0.1 + 89ABCDEF:S:3 Storage 2 0.3 + 89ABCDEF:S:4 Storage 3 0.4 + 89ABCDEF:S:5 Storage 1 0.0999 + TOTAL: 0.8999 BTC Since you’ve sent 0.1 BTC to a third party, your balance has declined by 0.1 BTC plus the tx fee of 0.0001 BTC. To verify that your transaction’s received its @@ -410,14 +415,14 @@ of MMGen’s more advanced features, continue reading. Using your default wallet from the exercises above, generate a mnemonic: - $ mmgen-walletconv -o words - ... - Mnemonic data written to file '89ABCDEF.mmwords' + $ mmgen-walletconv -o words + ... + Mnemonic data written to file '89ABCDEF.mmwords' - $ cat 89ABCDEF.mmwords - pleasure tumble spider laughter many stumble secret bother after search - float absent path strong curtain savior worst suspend bright touch away - dirty measure thorn + $ cat 89ABCDEF.mmwords + pleasure tumble spider laughter many stumble secret bother after search + float absent path strong curtain savior worst suspend bright touch away + dirty measure thorn Since our seed is 256 bits long, the mnemonic contains 24 words. 128-bit and 192-bit seeds generate shorter mnemonics of 12 and 18 words, respectively. @@ -435,21 +440,21 @@ The mnemonic is a complete representation of your seed and may be used anywhere where you’d use an MMGen wallet. You can generate addresses with it just as you do with a wallet: - $ mmgen-addrgen --type=segwit 89ABCDEF.mmwords 1-10 - ... - Address data written to file '89ABCDEF-S[1-10].addrs' + $ mmgen-addrgen --type=segwit 89ABCDEF.mmwords 1-10 + ... + Address data written to file '89ABCDEF-S[1-10].addrs' You can use it to sign transactions: - $ mmgen-txsign FEDCBA[0.1].rawtx 89ABCDEF.mmwords - ... - Signed transaction written to file 'FEDCBA[0.1].sigtx' + $ mmgen-txsign FEDCBA[0.1].rawtx 89ABCDEF.mmwords + ... + Signed transaction written to file 'FEDCBA[0.1].sigtx' The mnemonic can also be used to regenerate a lost wallet: - $ mmgen-walletconv 89ABCDEF.mmwords - ... - MMGen wallet written to file '89ABCDEF-01234567[256,3].mmdat' + $ mmgen-walletconv 89ABCDEF.mmwords + ... + MMGen wallet written to file '89ABCDEF-01234567[256,3].mmdat' Note that the regenerated wallet has a different Key ID but of course the same Seed ID. @@ -458,50 +463,50 @@ An alternative to mnemonics, seed files provide yet another way of representing your seed. They bear the extension '.mmseed' and are generated exactly the same way as mnemonic files: - $ mmgen-walletconv -o seed - ... - Seed data written to file '89ABCDEF.mmseed' + $ mmgen-walletconv -o seed + ... + Seed data written to file '89ABCDEF.mmseed' They can be used just like mnemonics to regenerate a wallet: - $ mmgen-walletconv 89ABCDEF.mmseed - ... - MMGen wallet written to file '89ABCDEF-23456701[256,3].mmdat' + $ mmgen-walletconv 89ABCDEF.mmseed + ... + MMGen wallet written to file '89ABCDEF-23456701[256,3].mmdat' Here’s a sample seed file for a 256-bit seed: - $ cat 8B7392ED.mmseed - f4c84b C5ZT wWpT Jsoi wRVw 2dm9 Aftd WLb8 FggQ eC8h Szjd da9L + $ cat 8B7392ED.mmseed + f4c84b C5ZT wWpT Jsoi wRVw 2dm9 Aftd WLb8 FggQ eC8h Szjd da9L And for a 128-bit seed: - $ cat 8E0DFB78.mmseed - 0fe02f XnyC NfPH piuW dQ2d nM47 VU + $ cat 8E0DFB78.mmseed + 0fe02f XnyC NfPH piuW dQ2d nM47 VU As you can see, seed files are short enough to be easily written out by hand or memorized. And their built-in checksum makes it easy to test your memory using a simple Unix shell command: - $ echo -n XnyC NfPH piuW dQ2d nM47 VU | tr -d ' '| sha256sum | cut -c 1-6 - 0fe02f + $ echo -n XnyC NfPH piuW dQ2d nM47 VU | tr -d ' '| sha256sum | cut -c 1-6 + 0fe02f Or you can do the same thing with 'mmgen-tool': - $ mmgen-tool str2id6 'XnyC NfPH piuW dQ2d nM47 VU' - 0fe02f + $ mmgen-tool str2id6 'XnyC NfPH piuW dQ2d nM47 VU' + 0fe02f Beginning with version 0.9.0, MMGen also supports seed files in hexadecimal (hexseed) format. Hexseed files are identical to seed files but encoded in hexadecimal rather than base 58. They bear the extension '.mmhex': - $ cat FE3C6545.mmhex - afc3fe 456d 7f5f 1c4b fe3b c916 b875 60ae 6a3e + $ cat FE3C6545.mmhex + afc3fe 456d 7f5f 1c4b fe3b c916 b875 60ae 6a3e You can easily check that a hexseed is correct by generating its Seed ID with standard command-line tools: - $ echo 456d 7f5f 1c4b fe3b c916 b875 60ae 6a3e | tr -d ' ' | xxd -r -p | sha256sum -b | xxd -r -p | sha256sum -b | cut -c 1-8 - fe3c6545 + $ echo 456d 7f5f 1c4b fe3b c916 b875 60ae 6a3e | tr -d ' ' | xxd -r -p | sha256sum -b | xxd -r -p | sha256sum -b | cut -c 1-8 + fe3c6545 Mnemonics and hexseeds can be used to generate keys even without the MMGen software, using basic command-line utilities, as explained in [this @@ -513,12 +518,12 @@ All MMGen commands that take mnemonic, seed or hexseed data may receive the data from a prompt instead of a file. Just omit the file name and specify the input format: - $ mmgen-addrgen -i words 1-10 - ... - Choose a mnemonic length: 1) 12 words, 2) 18 words, 3) 24 words: 1 - Mnemonic length of 12 words chosen. OK? (Y/n): y - Enter your 12-word mnemonic, hitting RETURN or SPACE after each word: - Enter word #1: + $ mmgen-addrgen -i words 1-10 + ... + Choose a mnemonic length: 1) 12 words, 2) 18 words, 3) 24 words: 1 + Mnemonic length of 12 words chosen. OK? (Y/n): y + Enter your 12-word mnemonic, hitting RETURN or SPACE after each word: + Enter word #1: MMGen prompts you for each of the mnemonic's words individually, checking it for validity and reprompting if necessary. What you type is not displayed on the @@ -557,28 +562,28 @@ If you plan to store your incognito wallet in an insecure location such as cloud storage, you’re advised to use a strong scrypt (hash) preset and a strong password. These can be changed using the 'mmgen-passchg' utility: - $ mmgen-passchg -p 5 89ABCDEF-01234567[256,3].mmdat - ... - Hash preset of wallet: '3' - Enter old passphrase for MMGen wallet: - ... - Hash preset changed to '5' - Enter new passphrase for MMGen wallet: - ... - MMGen wallet written to file '89ABCDEF-87654321[256,5].mmdat' + $ mmgen-passchg -p 5 89ABCDEF-01234567[256,3].mmdat + ... + Hash preset of wallet: '3' + Enter old passphrase for MMGen wallet: + ... + Hash preset changed to '5' + Enter new passphrase for MMGen wallet: + ... + MMGen wallet written to file '89ABCDEF-87654321[256,5].mmdat' The scrypt preset is the numeral in the wallet filename following the seed length. As you can see, it’s now changed to '5'. Now export your new toughened wallet to incognito format, using the `-k` option to leave the passphrase unchanged: - $ mmgen-walletconv -k -o incog 89ABCDEF-87654321[256,5].mmdat - ... - Reusing passphrase at user request - ... - New Incog Wallet ID: ECA86420 - ... - Incognito data written to file '89ABCDEF-87654321-ECA86420[256,5].mmincog' + $ mmgen-walletconv -k -o incog 89ABCDEF-87654321[256,5].mmdat + ... + Reusing passphrase at user request + ... + New Incog Wallet ID: ECA86420 + ... + Incognito data written to file '89ABCDEF-87654321-ECA86420[256,5].mmincog' Incog wallets have a special identifier, the Incog ID, which can be used to locate the wallet data if you’ve forgotten where you hid it (see the example @@ -587,15 +592,15 @@ should be kept secret. Incog wallets can also be output to hexadecimal format: - $ mmgen-walletconv -k -o incox 89ABCDEF-87654321[256,5].mmdat - ... - Hex incognito data written to file '89ABCDEF-87654321-CA86420E[256,5].mmincox' + $ mmgen-walletconv -k -o incox 89ABCDEF-87654321[256,5].mmdat + ... + Hex incognito data written to file '89ABCDEF-87654321-CA86420E[256,5].mmincox' - $ cat 89ABCDEF-87654321-1EE402F4[256,5].mmincox - 6772 edb2 10cf ad0d c7dd 484b cc7e 42e9 - 4fe6 e07a 1ce2 da02 6da7 94e4 c068 57a8 - 3706 c5ce 56e0 7590 e677 6c6e 750a d057 - b43a 21f9 82c7 6bd1 fe96 bad9 2d54 c4c0 + $ cat 89ABCDEF-87654321-1EE402F4[256,5].mmincox + 6772 edb2 10cf ad0d c7dd 484b cc7e 42e9 + 4fe6 e07a 1ce2 da02 6da7 94e4 c068 57a8 + 3706 c5ce 56e0 7590 e677 6c6e 750a d057 + b43a 21f9 82c7 6bd1 fe96 bad9 2d54 c4c0 Note that the Incog ID is different here: it’s generated from an init vector, which is a different random number each time, making the incog data as a whole @@ -608,14 +613,14 @@ the wrong hands. Your incognito wallet (whether hex or binary) can be used just like any other MMGen wallet, mnemonic or seed file to generate addresses and sign transactions: - $ mmgen-addrgen --type=segwit 89ABCDEF-87654321-CA86420E[256,5].mmincox 101-110 - ... - Generated 10 addresses - Addresses written to file '89ABCDEF-S[101-110].addrs' + $ mmgen-addrgen --type=segwit 89ABCDEF-87654321-CA86420E[256,5].mmincox 101-110 + ... + Generated 10 addresses + Addresses written to file '89ABCDEF-S[101-110].addrs' - $ mmgen-txsign FABCDE[0.3].rawtx 89ABCDEF-87654321-CA86420E[256,5].mmincox - ... - Signed transaction written to file FABCDE[0.3].sigtx + $ mmgen-txsign FABCDE[0.3].rawtx 89ABCDEF-87654321-CA86420E[256,5].mmincox + ... + Signed transaction written to file FABCDE[0.3].sigtx ##### Hidden incognito wallets @@ -624,14 +629,14 @@ a specified offset in a file or partition in a single convenient operation, with the random file being created automatically if necessary. Here’s how you’d create a 1GB file 'random.dat' and hide a wallet in it at offset 123456789: - $ mmgen-walletconv -k -o hincog -J random.dat,123456789 89ABCDEF-87654321[256,5].mmdat - ... - New Incog Wallet ID: ED1F2ACB - ... - Requested file 'random.dat' does not exist. Create? (Y/n): Y - Enter file size: 1G - ... - Data written to file 'random.dat' at offset 123456789 + $ mmgen-walletconv -k -o hincog -J random.dat,123456789 89ABCDEF-87654321[256,5].mmdat + ... + New Incog Wallet ID: ED1F2ACB + ... + Requested file 'random.dat' does not exist. Create? (Y/n): Y + Enter file size: 1G + ... + Data written to file 'random.dat' at offset 123456789 Your ‘random’ file can now be uploaded to a cloud storage service, for example, or some other location on the Net, preferably non-public one (in a real-life @@ -642,9 +647,9 @@ Now let’s say at some point in the future you download this file to recover your wallet and realize you’ve forgotten the offset where the data is hidden. If you’ve saved your Incog ID, you’re in luck: - $ mmgen-tool find_incog_data random.dat ED1F2ACB - ... - Incog data for ID ED1F2ACB found at offset 123456789 + $ mmgen-tool find_incog_data random.dat ED1F2ACB + ... + Incog data for ID ED1F2ACB found at offset 123456789 The search process can be slow, so patience is required. In addition, on large files ‘false positives’ are a distinct possibility, in which case you’ll @@ -654,13 +659,13 @@ real offset. Hidden incog wallets are nearly as convenient to use as ordinary ones. Generating ten addresses with your hidden incog data is as easy as this: - $ mmgen-addrgen -H random.dat,123456789 101-110 + $ mmgen-addrgen -H random.dat,123456789 101-110 Transaction signing uses the same syntax: - $ mmgen-txsign -H random.dat,123456789 ABCDEF[0.1].rawtx - ... - Signed transaction written to file 'ABCDEF[0.1].sigtx' + $ mmgen-txsign -H random.dat,123456789 ABCDEF[0.1].rawtx + ... + Signed transaction written to file 'ABCDEF[0.1].sigtx' ### Advanced Topics @@ -692,9 +697,9 @@ well as addresses, thus functioning as a hot wallet for a range of addresses. Assuming your hot address range begins at 1001, you could start by creating a key-address file for a hundred hot addresses like this: - $ mmgen-keygen --type=segwit 1001-1100 - ... - Secret keys written to file '89ABCDEF-S[1001-1100].akeys.mmenc' + $ mmgen-keygen --type=segwit 1001-1100 + ... + Secret keys written to file '89ABCDEF-S[1001-1100].akeys.mmenc' `mmgen-keygen` prompts you for a password to encrypt the key-address file with. This is a wise precaution, as it provides at least some security for keys that @@ -703,14 +708,14 @@ will be stored on an online machine. Now copy the key-address file to your online machine and import the addresses into your tracking wallet: - $ mmgen-addrimport --batch --keyaddr-file '89ABCDEF-S[1001-1100].akeys.mmenc' + $ mmgen-addrimport --batch --keyaddr-file '89ABCDEF-S[1001-1100].akeys.mmenc' After funding your hot wallet by spending into some addresses in this range you can do quickie transactions with these funds using the `mmgen-txdo` command: - $ mmgen-txdo -M '89ABCDEF-S[1001-1100].akeys.mmenc' 1AmkUxrfy5dMrfmeYwTxLxfIswUCcpeysc,0.1 89ABCDEF:S:1010 - ... - Transaction sent: dcea1357.... + $ mmgen-txdo -M '89ABCDEF-S[1001-1100].akeys.mmenc' 1AmkUxrfy5dMrfmeYwTxLxfIswUCcpeysc,0.1 89ABCDEF:S:1010 + ... + Transaction sent: dcea1357.... The `--mmgen-keys-from-file` or `-M` option is required when using a key-address file in place of a default wallet. Note that your change address @@ -721,7 +726,7 @@ Using `mmgen-txdo` with a default online hot wallet is even simpler. For a hot wallet with Seed ID 0FDE89AB, for instance, creating and sending a transaction would look like this: - $ mmgen-txdo 1AmkUxrfy5dMrfmeYwTxLxfIswUCcpeysc,0.1 0FDE89AB:S:10 + $ mmgen-txdo 1AmkUxrfy5dMrfmeYwTxLxfIswUCcpeysc,0.1 0FDE89AB:S:10 #### Transaction Fees @@ -773,11 +778,11 @@ incrementally increasing fees will created online and then signed offline. Create, sign and send a BIP 125 replaceable transaction with a fee of 50 satoshis per byte: - $ mmgen-txdo --rbf --tx-fee 50s 1AmkUxrfy5dMrfmeYwTxLxfIswUCcpeysc,0.1 0FDE89AB:S:5 - ... - Signed transaction written to file 'FEDCBB[0.1,50].sigtx' - ... - Transaction sent: dcba4321.... + $ mmgen-txdo --rbf --tx-fee 50s 1AmkUxrfy5dMrfmeYwTxLxfIswUCcpeysc,0.1 0FDE89AB:S:5 + ... + Signed transaction written to file 'FEDCBB[0.1,50].sigtx' + ... + Transaction sent: dcba4321.... Here you've sent 0.1 BTC to a third-party address and the change back to yourself at address #5 of your default hot wallet with Seed ID 0FDE89AB. @@ -788,11 +793,11 @@ of the fee in the filename identifies the transaction as replaceable. If the transaction fails to confirm in your desired timeframe, then create, sign and send a replacement transaction with a higher fee, say 100 satoshis per byte: - $ mmgen-txbump --send --tx-fee 100s --output-to-reduce c 'FEDCBB[0.1,50].sigtx' - ... - Signed transaction written to file 'DAE123[0.1,100].sigtx' - ... - Transaction sent: eef01357.... + $ mmgen-txbump --send --tx-fee 100s --output-to-reduce c 'FEDCBB[0.1,50].sigtx' + ... + Signed transaction written to file 'DAE123[0.1,100].sigtx' + ... + Transaction sent: eef01357.... The `--send` switch instructs `mmgen-txbump` to sign and send the transaction after creating it. The `--output-to-reduce` switch with an argument of 'c' @@ -815,44 +820,48 @@ you'll need to supply it on the command line as a parameter to the `-M` option. To achieve the same result as in the above example using a cold wallet, just create the initial transaction with `mmgen-txcreate` instead of `mmgen-txdo`: - $ mmgen-txcreate --rbf --tx-fee 50s 1AmkUxrfy5dMrfmeYwTxLxfIswUCcpeysc,0.1 89ABCDEF:S:5 - ... - Transaction written to file 'FEDCBC[0.1,50].rawtx' + $ mmgen-txcreate --rbf --tx-fee 50s 1AmkUxrfy5dMrfmeYwTxLxfIswUCcpeysc,0.1 89ABCDEF:S:5 + ... + Transaction written to file 'FEDCBC[0.1,50].rawtx' Now create a series of transactions with incrementally increasing fees for offline signing: - $ mmgen-txbump --tx-fee 100s --output-to-reduce c 'FEDCBC[0.1,50].rawtx' - $ mmgen-txbump --tx-fee 150s --output-to-reduce c 'FEDCBC[0.1,50].rawtx' - $ mmgen-txbump --tx-fee 200s --output-to-reduce c 'FEDCBC[0.1,50].rawtx' + $ mmgen-txbump --tx-fee 100s --output-to-reduce c 'FEDCBC[0.1,50].rawtx' + $ mmgen-txbump --tx-fee 150s --output-to-reduce c 'FEDCBC[0.1,50].rawtx' + $ mmgen-txbump --tx-fee 200s --output-to-reduce c 'FEDCBC[0.1,50].rawtx' To speed things up, add the `--yes` switch to make `mmgen-txbump` completely non-interactive. The result will be four raw transaction files with increasing fees, like this: - FEDCBC[0.1,50].rawtx - 3EBB00[0.1,100].rawtx - 124FFF[0.1,150].rawtx - 73DABB[0.1,200].rawtx + FEDCBC[0.1,50].rawtx + 3EBB00[0.1,100].rawtx + 124FFF[0.1,150].rawtx + 73DABB[0.1,200].rawtx Copy the files to an empty folder, transfer the folder to your offline machine and batch sign them: - $ mmgen-txsign -d my_folder --yes my_folder/*.rawtx + $ mmgen-txsign -d my_folder --yes my_folder/*.rawtx Then copy the signed transaction files back to your online machine and broadcast them in turn until you get a confirmation: - $ mmgen-txsend FEDCBC[0.1,50].sigtx # ...if this doesn't confirm, then - $ mmgen-txsend 3EBB00[0.1,100].sigtx # ...if this doesn't confirm, then - $ mmgen-txsend 124FFF[0.1,150].sigtx # ...if this doesn't confirm, then - $ mmgen-txsend 73DABB[0.1,200].sigtx + $ mmgen-txsend FEDCBC[0.1,50].sigtx # ...if this doesn't confirm, then + $ mmgen-txsend 3EBB00[0.1,100].sigtx # ...if this doesn't confirm, then + $ mmgen-txsend 124FFF[0.1,150].sigtx # ...if this doesn't confirm, then + $ mmgen-txsend 73DABB[0.1,200].sigtx -### Forkcoin and Altcoin support (BCH,LTC) +### Forkcoin and Altcoin support -To use MMGen with Bitcoin Cash (BCH) or Litecoin (LTC), first make sure the -Bitcoin ABC or Litecoin daemon is properly installed -([source][si])([binaries][bi]), [running][p8] and synced. +#### Full support for Bcash (BCH) and Litecoin + +Bcash and Litecoin are fully supported by MMGen, on the same level as Bitcoin. + +To use MMGen with Bcash or Litecoin, first make sure the respective Bitcoin ABC +and Litecoin daemons are properly installed ([source][si])([binaries][bi]), +[running][p8] and synced. MMGen requires that the bitcoin-abc daemon be listening on non-standard [RPC port 8442][p8]. @@ -860,6 +869,84 @@ MMGen requires that the bitcoin-abc 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! +#### Enhanced key/address generation support for Zcash (ZEC) and Monero (XMR) + +MMGen's enhanced key/address generation support for Zcash and Monero includes +**Zcash z-addresses** and automated Monero wallet creation. + +Generate ten Zcash z-address key/address pairs from your default wallet: + + $ mmgen-keygen --coin=zec --type=zcash_z 1-10 + +The addresses' view keys are included in the file as well. + +NOTE: Since your key/address file will probably be used on an online computer, +you should encrypt it with a good password when prompted to do so. The file can +decrypted as required using the `mmgen-tool decrypt` command. If you choose a +non-standard Scrypt hash preset, take care to remember it. + +To generate Zcash t-addresses, just omit the `--type` argument: + + $ mmgen-keygen --coin=zec 1-10 + +Generate ten Monero address pairs from your default wallet: + + $ mmgen-keygen --coin=xmr 1-10 + +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 easily generate wallets for +each address by running the following command + + $ monero-wallet-cli --generate-from-spend-key MyMoneroWallet + +and pasting in the key and password data when prompted. Monerod must be +running and `monero-wallet-cli` be located in your executable path. + +This process is completely automated by the `mmgen-tool` utility: + + $ mmgen-tool keyaddrlist2monerowallet *XMR*.akeys.mmenc + +This will generate Monero wallets for each key/address pair in the key/address +file and encrypt them with their respective passwords. No user interaction is +required. By default, wallets are synced to the current block height, as +they're assumed to be empty. This behavior can be overridden: + + $ mmgen-tool keyaddrlist2monerowallet *XMR*.akeys.mmenc blockheight=123456 + +#### Key/address generation support for ETH, ETC and 144 Bitcoin-derived altcoins + +To generate key/address pairs for these coins, just specify the coin's symbol +with the `--coin` argument: + + # For DASH: + $ mmgen-keygen --coin=dash 1-10 + # For Emercoin: + $ mmgen-keygen --coin=emc 1-10 + +If it's just the addresses you want, then use `mmgen-addrgen` instead: + + $ mmgen-addrgen --coin=dash 1-10 + +Regarding encryption of key/address files, see the note for Zcash above. + +Here's a complete list of supported altcoins as of this writing: + + 2give,42,611,ac,acoin,alf,anc,apex,arco,arg,aur,bcf,blk,bmc,bqc,bsty,btcd, + btq,bucks,cann,cash,cat,cbx,ccn,cdn,chc,clam,con,cpc,crps,csh,dash,dcr,dfc, + dgb,dgc,doge,doged,dope,dvc,efl,emc,emd,enrg,esp,fai,fc2,fibre,fjc,flo,flt, + fst,ftc,gcr,good,grc,gun,ham,html5,hyp,icash,infx,inpay,ipc,jbs,judge,lana, + lat,ldoge,lmc,ltc,mars,mcar,mec,mint,mobi,mona,moon,mrs,mue,mxt,myr,myriad, + mzc,neos,neva,nka,nlg,nmc,nto,nvc,ok,omc,omni,onion,onx,part,pink,pivx,pkb, + pnd,pot,ppc,ptc,pxc,qrk,rain,rbt,rby,rdd,ric,sdc,sib,smly,song,spr,start, + sys,taj,tit,tpc,trc,ttc,tx,uno,via,vpn,vtc,wash,wdc,wisc,wkc,wsx,xcn,xgb, + xmg,xpm,xpoke,xred,xst,xvc,zet,zlq,zoom,zrc,bch,etc,eth,ltc,xmr,zec + +Note that support for these coins is EXPERIMENTAL. Many of them have received +only minimal testing, or no testing at all. At startup you'll be informed of +the level of your selected coin's support reliability as deemed by the MMGen +Project. + [01]: https://github.com/mmgen/mmgen/wiki/Tracking-and-spending-ordinary-Bitcoin-addresses [02]: https://tpfaucet.appspot.com [03]: Recovering-Your-Keys-Without-the-MMGen-Software diff --git a/extmod/secp256k1mod.c b/extmod/secp256k1mod.c index ec176673..3ea1bb93 100755 --- a/extmod/secp256k1mod.c +++ b/extmod/secp256k1mod.c @@ -1,6 +1,6 @@ /* mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution - Copyright (C)2013-2017 Philemon + Copyright (C)2013-2018 The MMGen Project This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software diff --git a/mmgen/addr.py b/mmgen/addr.py index 1202cd59..6ff90af6 100755 --- a/mmgen/addr.py +++ b/mmgen/addr.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # # mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution -# Copyright (C)2013-2017 Philemon +# Copyright (C)2013-2018 The MMGen Project # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -92,6 +92,8 @@ class AddrGeneratorZcashZ(AddrGenerator): def to_addr(self,pubhex): # pubhex is really privhex key = pubhex.decode('hex') assert len(key) == 32,'{}: incorrect privkey length'.format(len(key)) + if g.platform == 'win': + ydie(1,'Zcash z-addresses not supported on Windows platform') from nacl.bindings import crypto_scalarmult_base p2 = crypto_scalarmult_base(self.zhash256(key,1)) from mmgen.protocol import _b58chk_encode diff --git a/mmgen/altcoin.py b/mmgen/altcoin.py index 50344f3e..18d47dca 100755 --- a/mmgen/altcoin.py +++ b/mmgen/altcoin.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # # mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution -# Copyright (C)2013-2017 Philemon +# Copyright (C)2013-2018 The MMGen Project # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/mmgen/color.py b/mmgen/color.py index 139964f4..23e2ccaa 100755 --- a/mmgen/color.py +++ b/mmgen/color.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # # mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution -# Copyright (C)2013-2017 Philemon +# Copyright (C)2013-2018 The MMGen Project # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/mmgen/common.py b/mmgen/common.py index 1ed29bd7..9973badd 100755 --- a/mmgen/common.py +++ b/mmgen/common.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # # mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution -# Copyright (C)2013-2017 Philemon +# Copyright (C)2013-2018 The MMGen Project # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/mmgen/crypto.py b/mmgen/crypto.py index 43108366..4ec44564 100755 --- a/mmgen/crypto.py +++ b/mmgen/crypto.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # # mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution -# Copyright (C)2013-2017 Philemon +# Copyright (C)2013-2018 The MMGen Project # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/mmgen/filename.py b/mmgen/filename.py index 5cf53444..17d8074a 100755 --- a/mmgen/filename.py +++ b/mmgen/filename.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # # mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution -# Copyright (C)2013-2017 Philemon +# Copyright (C)2013-2018 The MMGen Project # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/mmgen/globalvars.py b/mmgen/globalvars.py index a70225e6..1eb6a497 100755 --- a/mmgen/globalvars.py +++ b/mmgen/globalvars.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # # mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution -# Copyright (C)2013-2017 Philemon +# Copyright (C)2013-2018 The MMGen Project # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -38,16 +38,16 @@ class g(object): # Constants: - version = '0.9.599' - release_date = 'December 2017' + version = '0.9.6' + release_date = 'January 2018' proj_name = 'MMGen' proj_url = 'https://github.com/mmgen/mmgen' prog_name = os.path.basename(sys.argv[0]) author = 'The MMGen Project' email = '' - Cdates = '2013-2017' - keywords = 'Bitcoin, BTC, cryptocurrency, wallet, cold storage, offline, online, spending, open-source, command-line, Python, Linux, Bitcoin Core, bitcoind, hd, deterministic, hierarchical, secure, anonymous, Electrum, seed, mnemonic, brainwallet, Scrypt, utility, script, scriptable, blockchain, raw, transaction, permissionless, console, terminal, curses, ansi, color, tmux, remote, client, daemon, RPC, json, entropy, xterm, rxvt, PowerShell, MSYS, MinGW, mswin, Armbian, Raspbian, Raspberry Pi, Orange Pi, BCash, BCH, Litecoin, LTC, altcoin, ZEC, Zcash, DASH, ETH, Ethereum, Classic, SHA256Compress' + Cdates = '2013-2018' + keywords = 'Bitcoin, BTC, cryptocurrency, wallet, cold storage, offline, online, spending, open-source, command-line, Python, Linux, Bitcoin Core, bitcoind, hd, deterministic, hierarchical, secure, anonymous, Electrum, seed, mnemonic, brainwallet, Scrypt, utility, script, scriptable, blockchain, raw, transaction, permissionless, console, terminal, curses, ansi, color, tmux, remote, client, daemon, RPC, json, entropy, xterm, rxvt, PowerShell, MSYS, MinGW, mswin, Armbian, Raspbian, Raspberry Pi, Orange Pi, BCash, BCH, Litecoin, LTC, altcoin, ZEC, Zcash, DASH, Dashpay, ETH, Ethereum, Classic, SHA256Compress, XMR, Monero, EMC, Emercoin' max_int = 0xffffffff stdin_tty = bool(sys.stdin.isatty() or os.getenv('MMGEN_TEST_SUITE')) http_timeout = 60 @@ -169,9 +169,8 @@ class g(object): key_generator = 2 # secp256k1 is default hash_presets = { -# Scrypt params: -# ID N p r -# N is a power of two + # Scrypt params: + # ID N p r (N is an exponent of two) '1': [12, 8, 1], '2': [13, 8, 4], '3': [14, 8, 8], diff --git a/mmgen/license.py b/mmgen/license.py index 21cd5cc5..7ace0087 100755 --- a/mmgen/license.py +++ b/mmgen/license.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # # mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution -# Copyright (C)2013-2017 Philemon +# Copyright (C)2013-2018 The MMGen Project # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/mmgen/main.py b/mmgen/main.py index e77646cf..752a9c31 100755 --- a/mmgen/main.py +++ b/mmgen/main.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # # mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution -# Copyright (C)2013-2017 Philemon +# Copyright (C)2013-2018 The MMGen Project # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/mmgen/main_addrgen.py b/mmgen/main_addrgen.py index 71c5e7a4..a49f9cef 100755 --- a/mmgen/main_addrgen.py +++ b/mmgen/main_addrgen.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # # mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution -# Copyright (C)2013-2017 Philemon +# Copyright (C)2013-2018 The MMGen Project # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/mmgen/main_addrimport.py b/mmgen/main_addrimport.py index 068bafc8..dfed5503 100755 --- a/mmgen/main_addrimport.py +++ b/mmgen/main_addrimport.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # # mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution -# Copyright (C)2013-2017 Philemon +# Copyright (C)2013-2018 The MMGen Project # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/mmgen/main_passgen.py b/mmgen/main_passgen.py index 9e8fb0ef..1e1594e0 100755 --- a/mmgen/main_passgen.py +++ b/mmgen/main_passgen.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # # mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution -# Copyright (C)2013-2017 Philemon +# Copyright (C)2013-2018 The MMGen Project # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/mmgen/main_regtest.py b/mmgen/main_regtest.py index a9554512..7e720596 100755 --- a/mmgen/main_regtest.py +++ b/mmgen/main_regtest.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # # mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution -# Copyright (C)2013-2017 Philemon +# Copyright (C)2013-2018 The MMGen Project # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/mmgen/main_split.py b/mmgen/main_split.py index 0c27a17c..5011d04b 100755 --- a/mmgen/main_split.py +++ b/mmgen/main_split.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # # mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution -# Copyright (C)2013-2017 Philemon +# Copyright (C)2013-2018 The MMGen Project # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/mmgen/main_tool.py b/mmgen/main_tool.py index 632b4bf3..f5969992 100755 --- a/mmgen/main_tool.py +++ b/mmgen/main_tool.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # # mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution -# Copyright (C)2013-2017 Philemon +# Copyright (C)2013-2018 The MMGen Project # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/mmgen/main_txbump.py b/mmgen/main_txbump.py index 46715d50..3fc05cdd 100755 --- a/mmgen/main_txbump.py +++ b/mmgen/main_txbump.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # # mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution -# Copyright (C)2013-2017 Philemon +# Copyright (C)2013-2018 The MMGen Project # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/mmgen/main_txcreate.py b/mmgen/main_txcreate.py index 0fb1593b..9db78651 100755 --- a/mmgen/main_txcreate.py +++ b/mmgen/main_txcreate.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # # mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution -# Copyright (C)2013-2017 Philemon +# Copyright (C)2013-2018 The MMGen Project # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/mmgen/main_txdo.py b/mmgen/main_txdo.py index 313ec940..c801eaf3 100755 --- a/mmgen/main_txdo.py +++ b/mmgen/main_txdo.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # # mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution -# Copyright (C)2013-2017 Philemon +# Copyright (C)2013-2018 The MMGen Project # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/mmgen/main_txsend.py b/mmgen/main_txsend.py index 9cf76d40..71d08908 100755 --- a/mmgen/main_txsend.py +++ b/mmgen/main_txsend.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # # mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution -# Copyright (C)2013-2017 Philemon +# Copyright (C)2013-2018 The MMGen Project # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/mmgen/main_txsign.py b/mmgen/main_txsign.py index 56f0bd8c..58f28ba3 100755 --- a/mmgen/main_txsign.py +++ b/mmgen/main_txsign.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # # mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution -# Copyright (C)2013-2017 Philemon +# Copyright (C)2013-2018 The MMGen Project # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/mmgen/main_wallet.py b/mmgen/main_wallet.py index 3a809a0e..be242d3e 100755 --- a/mmgen/main_wallet.py +++ b/mmgen/main_wallet.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # # mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution -# Copyright (C)2013-2017 Philemon +# Copyright (C)2013-2018 The MMGen Project # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/mmgen/mn_electrum.py b/mmgen/mn_electrum.py index 2f0028f9..a8c81e3e 100755 --- a/mmgen/mn_electrum.py +++ b/mmgen/mn_electrum.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # # mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution -# Copyright (C)2013-2017 Philemon +# Copyright (C)2013-2018 The MMGen Project # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/mmgen/mn_tirosh.py b/mmgen/mn_tirosh.py index df023752..d3282999 100755 --- a/mmgen/mn_tirosh.py +++ b/mmgen/mn_tirosh.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # # mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution -# Copyright (C)2013-2017 Philemon +# Copyright (C)2013-2018 The MMGen Project # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/mmgen/obj.py b/mmgen/obj.py index 46563a02..839b07ce 100755 --- a/mmgen/obj.py +++ b/mmgen/obj.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # # mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution -# Copyright (C)2013-2017 Philemon +# Copyright (C)2013-2018 The MMGen Project # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -364,7 +364,7 @@ class CoinAddr(str,Hilite,InitErrors,MMGenObject): cls.arg_chk(cls,on_fail) from mmgen.globalvars import g try: - assert set(s) <= set(ascii_letters+digits),'contains non-ascii characters' + assert set(s) <= set(ascii_letters+digits),'contains non-alphanumeric characters' me = str.__new__(cls,s) va = g.proto.verify_addr(s,hex_width=cls.hex_width,return_dict=True) assert va,'failed verification' @@ -479,7 +479,7 @@ class TwMMGenID(str,Hilite,InitErrors,MMGenObject): from mmgen.globalvars import g assert s.split(':',1)[0] == g.proto.base_coin.lower(),( "not a string beginning with the prefix '{}:'".format(g.proto.base_coin.lower())) - assert set(s[4:]) <= set(ascii_letters+digits),'contains non-ascii characters' + assert set(s[4:]) <= set(ascii_letters+digits),'contains non-alphanumeric characters' assert len(s) > 4,'not more that four characters long' ret,sort_key,idtype = str(s),'z_'+s,'non-mmgen' except Exception as f: diff --git a/mmgen/opts.py b/mmgen/opts.py index fa682598..1f4b83c5 100755 --- a/mmgen/opts.py +++ b/mmgen/opts.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # # mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution -# Copyright (C)2013-2017 Philemon +# Copyright (C)2013-2018 The MMGen Project # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/mmgen/protocol.py b/mmgen/protocol.py index 0dcfae1c..1604759a 100755 --- a/mmgen/protocol.py +++ b/mmgen/protocol.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # # MMGen = Multi-Mode GENerator, command-line Bitcoin cold storage solution -# Copyright (C)2013-2017 Philemon +# Copyright (C)2013-2018 The MMGen Project # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -382,7 +382,7 @@ class CoinProtocol(MMGenObject): 'eth': (EthereumProtocol,EthereumTestnetProtocol,2), 'etc': (EthereumClassicProtocol,EthereumClassicTestnetProtocol,2), 'zec': (ZcashProtocol,ZcashTestnetProtocol,2), - 'xmr': (MoneroProtocol,MoneroTestnetProtocol,2) + 'xmr': (MoneroProtocol,MoneroTestnetProtocol,None) } def __new__(cls,coin,testnet): coin = coin.lower() diff --git a/mmgen/regtest.py b/mmgen/regtest.py index 1b7883df..e8b1bb92 100755 --- a/mmgen/regtest.py +++ b/mmgen/regtest.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # # mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution -# Copyright (C)2013-2017 Philemon +# Copyright (C)2013-2018 The MMGen Project # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -34,21 +34,23 @@ rpc_password = 'hodltothemoon' tr_wallet = lambda user: os.path.join(daemon_dir,'wallet.dat.'+user) common_args = lambda: ( - '-rpcuser={}'.format(rpc_user), - '-rpcpassword={}'.format(rpc_password), - '-rpcport={}'.format(rpc_port), - '-regtest', - '-datadir={}'.format(data_dir)) + '--rpcuser={}'.format(rpc_user), + '--rpcpassword={}'.format(rpc_password), + '--rpcport={}'.format(rpc_port), + '--regtest', + '--datadir={}'.format(data_dir)) def start_daemon(user,quiet=False,daemon=True,reindex=False): + # requires Bitcoin ABC version >= 0.16.2 + add_args = ((),('--usecashaddr=0',))[g.proto.daemon_name=='bitcoind-abc'] cmd = ( g.proto.daemon_name, - '-listen=0', - '-keypool=1', - '-wallet={}'.format(os.path.basename(tr_wallet(user))) - ) + common_args() - if daemon: cmd += ('-daemon',) - if reindex: cmd += ('-reindex',) + '--listen=0', + '--keypool=1', + '--wallet={}'.format(os.path.basename(tr_wallet(user))) + ) + add_args + common_args() + if daemon: cmd += ('--daemon',) + if reindex: cmd += ('--reindex',) if not g.debug or quiet: vmsg('{}'.format(' '.join(cmd))) p = subprocess.Popen(cmd,stdout=PIPE,stderr=PIPE) err = process_output(p,silent=False)[1] @@ -239,7 +241,7 @@ def get_current_user_win(quiet=False): return None def get_current_user_unix(quiet=False): - p = start_cmd('pgrep','-af','{}.*-rpcport={}.*'.format(g.proto.daemon_name,rpc_port)) + p = start_cmd('pgrep','-af','{}.*--rpcport={}.*'.format(g.proto.daemon_name,rpc_port)) cmdline = p.stdout.read() if not cmdline: return None for k in ('miner','bob','alice'): diff --git a/mmgen/rpc.py b/mmgen/rpc.py index c4e9c62b..319ee829 100755 --- a/mmgen/rpc.py +++ b/mmgen/rpc.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # # mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution -# Copyright (C)2013-2017 Philemon +# Copyright (C)2013-2018 The MMGen Project # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/mmgen/seed.py b/mmgen/seed.py index 375d90c9..175d8ab4 100755 --- a/mmgen/seed.py +++ b/mmgen/seed.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # # mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution -# Copyright (C)2013-2017 Philemon +# Copyright (C)2013-2018 The MMGen Project # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/mmgen/sha256.py b/mmgen/sha256.py index 4574e54c..990f97f9 100755 --- a/mmgen/sha256.py +++ b/mmgen/sha256.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # # mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution -# Copyright (C)2013-2017 Philemon +# Copyright (C)2013-2018 The MMGen Project # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/mmgen/term.py b/mmgen/term.py index b61d3eda..c00f0ff6 100755 --- a/mmgen/term.py +++ b/mmgen/term.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # # mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution -# Copyright (C)2013-2017 Philemon +# Copyright (C)2013-2018 The MMGen Project # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/mmgen/test.py b/mmgen/test.py index b0d9bb92..204ef9ee 100755 --- a/mmgen/test.py +++ b/mmgen/test.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # # mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution -# Copyright (C)2013-2017 Philemon +# Copyright (C)2013-2018 The MMGen Project # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/mmgen/tool.py b/mmgen/tool.py index 058d5004..1826d057 100755 --- a/mmgen/tool.py +++ b/mmgen/tool.py @@ -2,7 +2,7 @@ # -*- coding: UTF-8 -*- # # mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution -# Copyright (C)2013-2017 Philemon +# Copyright (C)2013-2018 The MMGen Project # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/mmgen/tw.py b/mmgen/tw.py index f19250f4..0f21396d 100755 --- a/mmgen/tw.py +++ b/mmgen/tw.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # # mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution -# Copyright (C)2013-2017 Philemon +# Copyright (C)2013-2018 The MMGen Project # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/mmgen/tx.py b/mmgen/tx.py index f78f32b6..0d43840f 100755 --- a/mmgen/tx.py +++ b/mmgen/tx.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # # mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution -# Copyright (C)2013-2017 Philemon +# Copyright (C)2013-2018 The MMGen Project # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/mmgen/txsign.py b/mmgen/txsign.py index ecd11c28..75864117 100755 --- a/mmgen/txsign.py +++ b/mmgen/txsign.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # # mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution -# Copyright (C)2013-2017 Philemon +# Copyright (C)2013-2018 The MMGen Project # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/mmgen/util.py b/mmgen/util.py index de4f4d5e..37a8314f 100755 --- a/mmgen/util.py +++ b/mmgen/util.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # # mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution -# Copyright (C)2013-2017 Philemon +# Copyright (C)2013-2018 The MMGen Project # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/scripts/test-release.sh b/scripts/test-release.sh index fc8eaeb7..73a97eac 100755 --- a/scripts/test-release.sh +++ b/scripts/test-release.sh @@ -107,7 +107,8 @@ s_alts='The following tests will test generation operations for all supported al ROUNDS=100 ROUNDS_LOW=20 ROUNDS_SPEC=500 -t_alts=( +if [ "$MINGW" ]; then + t_alts=( 'test/scrambletest.py' 'test/test.py -n altcoin_ref' "test/gentest.py --coin=btc 2 $ROUNDS" @@ -118,8 +119,21 @@ t_alts=( "test/gentest.py --coin=ltc --type=segwit 2 $ROUNDS" "test/gentest.py --coin=zec 2 $ROUNDS" "test/gentest.py --coin=etc 2 $ROUNDS" - "test/gentest.py --coin=eth 2 $ROUNDS" + "test/gentest.py --coin=eth 2 $ROUNDS") +else + t_alts=( + 'test/scrambletest.py' + 'test/test.py -n altcoin_ref' + "test/gentest.py --coin=btc 2 $ROUNDS" + "test/gentest.py --coin=btc --type=compressed 2 $ROUNDS" + "test/gentest.py --coin=btc --type=segwit 2 $ROUNDS" + "test/gentest.py --coin=ltc 2 $ROUNDS" + "test/gentest.py --coin=ltc --type=compressed 2 $ROUNDS" + "test/gentest.py --coin=ltc --type=segwit 2 $ROUNDS" + "test/gentest.py --coin=zec 2 $ROUNDS" "test/gentest.py --coin=zec --type=zcash_z 2 $ROUNDS_SPEC" + "test/gentest.py --coin=etc 2 $ROUNDS" + "test/gentest.py --coin=eth 2 $ROUNDS" "test/gentest.py --coin=btc 2:ext $ROUNDS" "test/gentest.py --coin=btc --type=compressed 2:ext $ROUNDS" @@ -136,7 +150,7 @@ t_alts=( "test/gentest.py --all 2:pyethereum $ROUNDS_LOW" "test/gentest.py --all 2:keyconv $ROUNDS_LOW" "test/gentest.py --all 2:zcash_mini $ROUNDS_LOW") - +fi f_alts='Gen-only altcoin tests completed' i_monero='Monero' @@ -144,8 +158,9 @@ s_monero='Testing generation and wallet creation operations for Monero' s_monero='The monerod (mainnet) daemon must be running for the following tests' ROUNDS=1000 t_monero=( -'cmds/mmgen-keygen --accept-defaults --outdir $TMPDIR --coin=xmr test/ref/98831F3A.mmwords 3,99,2,22-29,101-109' -'cmds/mmgen-tool -q --accept-defaults --outdir $TMPDIR keyaddrlist2monerowallet $TMPDIR/988*XMR*akeys') +'python cmds/mmgen-keygen --accept-defaults --outdir $TMPDIR --coin=xmr test/ref/98831F3A.mmwords 3,99,2,22-29,101-109' +'python cmds/mmgen-tool -q --accept-defaults --outdir $TMPDIR keyaddrlist2monerowallet $TMPDIR/988*XMR*akeys') +[ "$MINGW" ] && t_monero=("$t_monero") f_monero='Monero tests completed' i_misc_ni='Miscellaneous operations (non-interactive)' @@ -243,8 +258,12 @@ t_tool=( 'test/tooltest.py --coin=dash cryptocoin' 'test/tooltest.py --coin=doge cryptocoin' 'test/tooltest.py --coin=emc cryptocoin' - 'test/tooltest.py --coin=zec cryptocoin' - 'test/tooltest.py --coin=zec --type=zcash_z cryptocoin') + 'test/tooltest.py --coin=zec cryptocoin') + +[ "$MINGW" ] || { + t_tool_len=${#t_tool[*]} + t_tool[$t_tool_len]='test/tooltest.py --coin=zec --type=zcash_z cryptocoin' +} f_tool='tooltest tests completed' i_gen='Gentest' diff --git a/scripts/tx-btc2bch.py b/scripts/tx-btc2bch.py index 5616b6d2..7bc73666 100755 --- a/scripts/tx-btc2bch.py +++ b/scripts/tx-btc2bch.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # # mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution -# Copyright (C)2013-2017 Philemon +# Copyright (C)2013-2018 The MMGen Project # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/setup.py b/setup.py index 558db279..3e0c1e27 100755 --- a/setup.py +++ b/setup.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # # mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution -# Copyright (C)2013-2017 Philemon +# Copyright (C)2013-2018 The MMGen Project # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/test/gentest.py b/test/gentest.py index 752187ed..ff6fb401 100755 --- a/test/gentest.py +++ b/test/gentest.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # # mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution -# Copyright (C)2013-2017 Philemon +# Copyright (C)2013-2018 The MMGen Project # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/test/mmgen_pexpect.py b/test/mmgen_pexpect.py index 5d8731d2..066de90b 100755 --- a/test/mmgen_pexpect.py +++ b/test/mmgen_pexpect.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- coding: UTF-8 -*- # mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution -# Copyright (C)2013-2017 Philemon +# Copyright (C)2013-2018 The MMGen Project # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/test/objtest.py b/test/objtest.py index 5e5f7aa6..d3aecc17 100755 --- a/test/objtest.py +++ b/test/objtest.py @@ -2,7 +2,7 @@ # -*- coding: UTF-8 -*- # # mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution -# Copyright (C)2013-2017 Philemon +# Copyright (C)2013-2018 The MMGen Project # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/test/scrambletest.py b/test/scrambletest.py index eac7293d..1c093a9c 100755 --- a/test/scrambletest.py +++ b/test/scrambletest.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # # mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution -# Copyright (C)2013-2017 Philemon +# Copyright (C)2013-2018 The MMGen Project # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -74,12 +74,15 @@ test_data = OrderedDict([ def run_tests(): for test in test_data: + if test == 'zec_zcash_z' and g.platform == 'win': + msg("Skipping 'zec_zcash_z' test for Windows platform") + continue try: coin,mmtype = test.split('_',1) except: coin,mmtype = test,None cmd_name = 'cmds/mmgen-addrgen' wf = 'test/ref/98831F3A.mmwords' type_arg = ['--type='+mmtype] if mmtype else [] - cmd = [cmd_name,'-qS','--coin='+coin] + type_arg + [wf,'1'] + cmd = ['python',cmd_name,'-qS','--coin='+coin] + type_arg + [wf,'1'] vmsg(green('Executing: {}'.format(' '.join(cmd)))) msg_r('Testing: --coin {:4} {:22}'.format(coin.upper(),type_arg[0] if type_arg else '')) p = subprocess.Popen(cmd,stdout=subprocess.PIPE,stderr=subprocess.PIPE) diff --git a/test/test.py b/test/test.py index f72df721..32ac114c 100755 --- a/test/test.py +++ b/test/test.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- coding: UTF-8 -*- # mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution -# Copyright (C)2013-2017 Philemon +# Copyright (C)2013-2018 The MMGen Project # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -1251,6 +1251,15 @@ def clean(usr_dirs=[]): die(1,'%s: invalid directory number' % d) cleandir(os.path.join('test','data_dir')) +def skip_for_win(): + if g.platform == 'win': + import traceback + f = traceback.extract_stack()[-2][-2] + msg("Skipping test '{}': not supported on Windows platform".format(f)) + return True + else: + return False + class MMGenTestSuite(object): def __init__(self): @@ -1897,8 +1906,7 @@ class MMGenTestSuite(object): # Miscellaneous tests def autosign(self,name): # tests everything except device detection, mount/unmount - if g.platform == 'win': - msg('Skipping {} (not supported)'.format(name)); return + if skip_for_win(): return fdata = (('btc',''),('bch',''),('ltc','litecoin')) tfns = [cfgs['8']['ref_tx_file'][c].format('') for c,d in fdata] tfs = [os.path.join(ref_dir,d[1],fn) for d,fn in zip(fdata,tfns)] @@ -2070,6 +2078,7 @@ class MMGenTestSuite(object): self.ref_addrfile_chk(name,ftype='addr',coin='ZEC',subdir='zcash',pfx='-ZEC-C') def ref_addrfile_chk_zec_z(self,name): + if skip_for_win(): return self.ref_addrfile_chk(name,ftype='addr',coin='ZEC',subdir='zcash',pfx='-ZEC-Z', mmtype='z',add_args=['mmtype=zcash_z']) @@ -2089,6 +2098,7 @@ class MMGenTestSuite(object): self.ref_addrfile_chk(name,ftype='keyaddr',coin='ZEC',subdir='zcash',pfx='-ZEC-C') def ref_keyaddrfile_chk_zec_z(self,name): + if skip_for_win(): return self.ref_addrfile_chk(name,ftype='keyaddr',coin='ZEC',subdir='zcash',pfx='-ZEC-Z', mmtype='z',add_args=['mmtype=zcash_z']) diff --git a/test/tooltest.py b/test/tooltest.py index a69ba4e1..2cc86bb1 100755 --- a/test/tooltest.py +++ b/test/tooltest.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # # mmgen = Multi-Mode GENerator, command-line Bitcoin cold storage solution -# Copyright (C)2013-2017 Philemon +# Copyright (C)2013-2018 The MMGen Project # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by