Bugfixes, documentation update

This commit is contained in:
philemon 2014-03-31 23:55:44 +04:00
commit c40dae3ce9
14 changed files with 544 additions and 104 deletions

View file

@ -61,9 +61,9 @@ mnemonic.
### Download/Install
> #### [Install on Microsoft Windows](doc/MMGenWindowsInstall.md)
> #### [Install on Microsoft Windows](doc/MMGenInstallMSWin.md)
> #### [Install on Debian/Ubuntu Linux](doc/MMGenLinuxInstall.md)
> #### [Install on Debian/Ubuntu Linux](doc/MMGenInstallLinux.md)
### Using MMGen

0
__init__.py Normal file
View file

View file

@ -0,0 +1,134 @@
MMGen = Multi-Mode GENerator
============================
##### a Bitcoin cold storage solution for the command line
Build Bitcoind on Microsoft Windows
-----------------------------------
#### Build the Berkeley Database (v5.0):
Grab the [v5.0 tarball][01], or browse the [download page][02] for different
versions. Unpack the archive to `C:\` and execute the following from your MSYS
shell:
$ cd /c/db-5.0.32/build_unix
$ ../dist/configure --enable-mingw --enable-cxx --disable-replication
Edit the source file `db.h` in the `build_unix` directory, moving to line 113
and replacing the statement `typedef pthread_t db_threadid_t;` with `typedef
u_int32_t db_threadid_t;`.
Since the script creates the file, this must be done **after** the configure
script is run. Now execute:
$ make
$ make install
#### Install the MASM assembler (optional but recommended):
Get the file [MASMsetup.exe][03] from the Microsoft website. With a tool
like 7zip, open the cab file inside and the file inside it, which begins with
`FL_ml_exe`. Copy this file to your path, renaming it to `ml.exe`.
#### Build the Boost libraries:
Browse the [download page][06], or get the [tarball][04] from sourceforge.
Unpack `boost_1_55_0.tar.gz` to `C:\`, and type the following from your DOS
prompt:
cd \boost_1_55_0
boostrap.bat
bjam toolset=gcc link=static threading=single --build-type=minimal stage --with-system --with-filesystem --with-program_options --with-chrono --with-test
bjam toolset=gcc link=static threading=multi --build-type=minimal stage --with-thread
These commands build just the few libraries we need, avoiding the time-consuming
process of building the whole boost package.
#### Build Bitcoind:
Download Sipa's watchonly bitcoind [tarball][05] from GitHub and unzip it
to `C:\`.
From the MSYS prompt:
$ cd /c/bitcoin-watchonly
Add the following lines to the end of `src/leveldb/build_detect_platform`:
$ echo "DIRS=$DIRS" >> $OUTPUT
$ echo "PORT_FILE=$PORT_FILE" >> $OUTPUT
Make the following changes to `src/leveldb/Makefile`:
> After the line `include build_config.mk` add the following line:
SOURCES=$(shell for i in $(DIRS); do echo $$i/*.cc; done)
> Change the line `LIBOBJECTS = $(SOURCES:.cc=.o)`
> to read `LIBOBJECTS = $(SOURCES:.cc=.o) $(PORT_FILE:.cc=.o)`
> Change the line `all: $(SHARED) $(LIBRARY)`
> to read `all: $(LIBRARY)`
For each of the following files:
src/rpcdump.cpp
src/rpcnet.cpp
src/rpcwallet.cpp
src/wallet.cpp
src/walletdb.cpp
add the line `#include <winsock2.h>` at the beginning, before the first
`#include` statement.
In the following files:
src/leveldb/db/db_test.cc
src/leveldb/db/db_bench.cc
src/leveldb/db/autocompact_test.cc
src/leveldb/db/leveldb_main.cc
delete everything from `int main(int argc,..` to the end of the file.
Do the following file-copying operations (needs to be done just once):
$ cp /mingw/bin/autoreconf-2.68 /mingw/bin/autoreconf
$ cp /mingw/bin/autoconf-2.68 /mingw/bin/autoconf
$ cp /mingw/bin/automake-1.11 /mingw/bin/automake
$ cp /mingw/bin/aclocal-1.11 /mingw/bin/aclocal
Generate the `configure` script:
$ sh autogen.sh
Edit the just-created `configure` script:
> After the line:
LIBS="$LIBS $BOOST_LIBS $BOOST_CHRONO_LIB"
> add the line:
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS"
Export variables for `configure` to pass to the preprocessor and linker:
$ export CPPFLAGS="-I/usr/local/BerkeleyDB.5.0/include -I/usr/local/ssl/include"
$ export LDFLAGS="-static -L/usr/local/BerkeleyDB.5.0/lib -L/usr/local/ssl/lib"
$ export BOOST_ROOT=/c/boost_1_55_0
Run `configure` and then `make`:
$ ./configure --without-qt --with-incompatible-bdb
$ make src/bitcoind.exe
Strip the executable (`strip src/bitcoind.exe`), copy it to your path and test
by running `bitcoind`. You may need to supply an argument to the `-datadir`
option so the daemon can find your wallet and configuration file.
[01]: http://download.oracle.com/berkeley-db/db-5.0.32.tar.gz
[02]: http://www.oracle.com/technetwork/database/database-technologies/berkeleydb/downloads/index-082944.html
[03]: http://www.microsoft.com/en-gb/download/details.aspx?id=12654
[04]: http://sourceforge.net/projects/boost/files/boost/1.55.0/boost_1_55_0.tar.gz/download
[05]: https://codeload.github.com/sipa/bitcoin/zip/watchonly
[06]: http://www.boost.org/users/download/

16
doc/MMGenEditPathMSWin.md Normal file
View file

@ -0,0 +1,16 @@
MMGen = Multi-Mode GENerator
============================
##### a Bitcoin cold storage solution for the command line
### Editing the user path in Windows:
1. Right-click on your "My Computer" icon and select "Properties".
2. Click on the "Advanced" tab, then on the "Environment Variables" button.
3. A dialogue window will pop up. Edit the path variable in the **top** text
box, adding your entry (`c:\mingw\bin`, for example) to the end. If there
is no PATH variable listed there, create it. Path entries are separated
by semicolons in Windows, so if the PATH variable already exists and has
entries, you must separate your entry from the preceding one with a
semicolon. As a guide for the format, you may examine the **system** PATH
variable in the **bottom** text box. **Do not** edit the system PATH,
however, as this can lead to unintended consequences for your computer.

View file

@ -0,0 +1,47 @@
MMGen = Multi-Mode GENerator
============================
##### a Bitcoin cold storage solution for the command line
### Required MSYS Archives:
* [msysCORE-bin][]
* [msysCORE-doc][]
* [msysCORE-ext][]
* [libtermcap-dll][]
* [bash-bin][]
* [libiconv-dll][]
* [less-bin][]
* [make-bin][]
* [tar-bin][]
* [libregex-dll][]
* [coreutils-bin][]
* [sed-bin][]
* [grep-bin][]
* [gzip-bin][]
* [termcap-bin][]
* [gawk-bin][]
* [perl-bin][]
* [m4-bin][]
* [libcrypt-dll][]
* [libintl-dll][]
[msysCORE-bin]: http://sourceforge.net/projects/mingw/files/MSYS/Base/msys-core/msys-1.0.18-1/msysCORE-1.0.18-1-msys-1.0.18-bin.tar.lzma
[msysCORE-doc]: http://sourceforge.net/projects/mingw/files/MSYS/Base/msys-core/msys-1.0.18-1/msysCORE-1.0.18-1-msys-1.0.18-doc.tar.lzma
[msysCORE-ext]: http://sourceforge.net/projects/mingw/files/MSYS/Base/msys-core/msys-1.0.18-1/msysCORE-1.0.18-1-msys-1.0.18-ext.tar.lzma
[libtermcap-dll]: http://sourceforge.net/projects/mingw/files/MSYS/Base/termcap/termcap-0.20050421_1-2/libtermcap-0.20050421_1-2-msys-1.0.13-dll-0.tar.lzma
[bash-bin]: http://sourceforge.net/projects/mingw/files/MSYS/Base/bash/bash-3.1.17-4/bash-3.1.17-4-msys-1.0.16-bin.tar.lzma
[libiconv-dll]: http://sourceforge.net/projects/mingw/files/MSYS/Base/libiconv/libiconv-1.14-1/libiconv-1.14-1-msys-1.0.17-dll-2.tar.lzma
[less-bin]: http://sourceforge.net/projects/mingw/files/MSYS/Base/less/less-436-2/less-436-2-msys-1.0.13-bin.tar.lzma
[make-bin]: http://sourceforge.net/projects/mingw/files/MSYS/Base/make/make-3.81-3/make-3.81-3-msys-1.0.13-bin.tar.lzma
[tar-bin]: http://sourceforge.net/projects/mingw/files/MSYS/Base/tar/tar-1.23-1/tar-1.23-1-msys-1.0.13-bin.tar.lzma
[libregex-dll]: http://sourceforge.net/projects/mingw/files/MSYS/Base/regex/regex-1.20090805-2/libregex-1.20090805-2-msys-1.0.13-dll-1.tar.lzma
[coreutils-bin]: http://sourceforge.net/projects/mingw/files/MSYS/Base/coreutils/coreutils-5.97-3/coreutils-5.97-3-msys-1.0.13-bin.tar.lzma
[sed-bin]: http://sourceforge.net/projects/mingw/files/MSYS/Base/sed/sed-4.2.1-2/sed-4.2.1-2-msys-1.0.13-bin.tar.lzma
[grep-bin]: http://sourceforge.net/projects/mingw/files/MSYS/Base/grep/grep-2.5.4-2/grep-2.5.4-2-msys-1.0.13-bin.tar.lzma
[gzip-bin]: http://sourceforge.net/projects/mingw/files/MSYS/Base/gzip/gzip-1.3.12-2/gzip-1.3.12-2-msys-1.0.13-bin.tar.lzma
[termcap-bin]: http://sourceforge.net/projects/mingw/files/MSYS/Base/termcap/termcap-0.20050421_1-2/termcap-0.20050421_1-2-msys-1.0.13-bin.tar.lzma
[gawk-bin]: http://sourceforge.net/projects/mingw/files/MSYS/Base/gawk/gawk-3.1.7-2/gawk-3.1.7-2-msys-1.0.13-bin.tar.lzma
[perl-bin]: http://sourceforge.net/projects/mingw/files/MSYS/Extension/perl/perl-5.8.8-1/perl-5.8.8-1-msys-1.0.17-bin.tar.lzma
[m4-bin]: http://sourceforge.net/projects/mingw/files/MSYS/Extension/m4/m4-1.4.16-2/m4-1.4.16-2-msys-1.0.17-bin.tar.lzma
[libcrypt-dll]: http://sourceforge.net/projects/mingw/files/MSYS/Extension/crypt/crypt-1.1_1-3/libcrypt-1.1_1-3-msys-1.0.13-dll-0.tar.lzma
[libintl-dll]: http://sourceforge.net/projects/mingw/files/MSYS/Base/gettext/gettext-0.18.1.1-1/libintl-0.18.1.1-1-msys-1.0.17-dll-8.tar.lzma

View file

@ -0,0 +1,67 @@
MMGen = Multi-Mode GENerator
============================
##### a Bitcoin cold storage solution for the command line
### Required MinGW Archives:
* [bsdtar][]
* [gcc-core-bin][]
* [gcc-core-dev][]
* [gcc-core-dll][]
* [gcc-c++-bin][]
* [gcc-c++-dev][]
* [gcc-c++-dll][]
* [binutils-bin][]
* [binutils-dev][]
* [gettext-dev][]
* [gettext-dll][]
* [libintl-dll][]
* [gmp-dev][]
* [gmp-dll][]
* [libiconv-dev][]
* [libiconv-dll][]
* [mingwrt-dev][]
* [mingwrt-dll][]
* [mpc-dev][]
* [mpc-dll][]
* [mpfr-dev][]
* [mpfr-dll][]
* [pthreads-w32-dev][]
* [pthreads-w32-dll][]
* [w32api-dev][]
* [zlib-dev][]
* [zlib-dll][]
* [gettext-bin][]
* [autoconf2.5-bin][]
* [automake1.11-bin][]
[bsdtar]: http://sourceforge.net/projects/mingw/files/MinGW/Extension/bsdtar/basic-bsdtar-2.8.3-1/basic-bsdtar-2.8.3-1-mingw32-bin.zip
[gcc-core-bin]: http://sourceforge.net/projects/mingw/files/MinGW/Base/gcc/Version4/gcc-4.8.1-4/gcc-core-4.8.1-4-mingw32-bin.tar.lzma
[gcc-core-dev]: http://sourceforge.net/projects/mingw/files/MinGW/Base/gcc/Version4/gcc-4.8.1-4/gcc-core-4.8.1-4-mingw32-dev.tar.lzma
[gcc-core-dll]: http://sourceforge.net/projects/mingw/files/MinGW/Base/gcc/Version4/gcc-4.8.1-4/gcc-core-4.8.1-4-mingw32-dll.tar.lzma
[gcc-c++-bin]: http://sourceforge.net/projects/mingw/files/MinGW/Base/gcc/Version4/gcc-4.8.1-4/gcc-c++-4.8.1-4-mingw32-bin.tar.lzma
[gcc-c++-dev]: http://sourceforge.net/projects/mingw/files/MinGW/Base/gcc/Version4/gcc-4.8.1-4/gcc-c++-4.8.1-4-mingw32-dev.tar.lzma
[gcc-c++-dll]: http://sourceforge.net/projects/mingw/files/MinGW/Base/gcc/Version4/gcc-4.8.1-4/gcc-c++-4.8.1-4-mingw32-dll.tar.lzma
[binutils-bin]: http://sourceforge.net/projects/mingw/files/MinGW/Base/binutils/binutils-2.24/binutils-2.24-1-mingw32-bin.tar.xz
[binutils-dev]: http://sourceforge.net/projects/mingw/files/MinGW/Base/binutils/binutils-2.24/binutils-2.24-1-mingw32-dev.tar.xz
[gettext-dev]: http://sourceforge.net/projects/mingw/files/MinGW/Base/gettext/gettext-0.18.3.1-1/gettext-0.18.3.1-1-mingw32-dev.tar.lzma
[gettext-dll]: http://sourceforge.net/projects/mingw/files/MinGW/Base/gettext/gettext-0.18.3.1-1/gettext-0.18.3.1-1-mingw32-dll.tar.lzma
[libintl-dll]: http://sourceforge.net/projects/mingw/files/MinGW/Base/gettext/gettext-0.18.1.1-2/libintl-0.18.1.1-2-mingw32-dll-8.tar.lzma
[gmp-dev]: http://sourceforge.net/projects/mingw/files/MinGW/Base/gmp/gmp-5.1.2/gmp-5.1.2-1-mingw32-dev.tar.lzma
[gmp-dll]: http://sourceforge.net/projects/mingw/files/MinGW/Base/gmp/gmp-5.1.2/gmp-5.1.2-1-mingw32-dll.tar.lzma
[libiconv-dev]: http://sourceforge.net/projects/mingw/files/MinGW/Base/libiconv/libiconv-1.14-3/libiconv-1.14-3-mingw32-dev.tar.lzma
[libiconv-dll]: http://sourceforge.net/projects/mingw/files/MinGW/Base/libiconv/libiconv-1.14-3/libiconv-1.14-3-mingw32-dll.tar.lzma
[mingwrt-dev]: http://sourceforge.net/projects/mingw/files/MinGW/Base/mingw-rt/mingwrt-4.0.3/mingwrt-4.0.3-1-mingw32-dev.tar.lzma
[mingwrt-dll]: http://sourceforge.net/projects/mingw/files/MinGW/Base/mingw-rt/mingwrt-4.0.3/mingwrt-4.0.3-1-mingw32-dll.tar.lzma
[mpc-dev]: http://sourceforge.net/projects/mingw/files/MinGW/Base/mpc/mpc-1.0.1-2/mpc-1.0.1-2-mingw32-dev.tar.lzma
[mpc-dll]: http://sourceforge.net/projects/mingw/files/MinGW/Base/mpc/mpc-1.0.1-2/mpc-1.0.1-2-mingw32-dll.tar.lzma
[mpfr-dev]: http://sourceforge.net/projects/mingw/files/MinGW/Base/mpfr/mpfr-3.1.2-2/mpfr-3.1.2-2-mingw32-dev.tar.lzma
[mpfr-dll]: http://sourceforge.net/projects/mingw/files/MinGW/Base/mpfr/mpfr-3.1.2-2/mpfr-3.1.2-2-mingw32-dll.tar.lzma
[pthreads-w32-dev]: http://sourceforge.net/projects/mingw/files/MinGW/Base/pthreads-w32/pthreads-w32-2.9.1/pthreads-w32-2.9.1-1-mingw32-dev.tar.lzma
[pthreads-w32-dll]: http://sourceforge.net/projects/mingw/files/MinGW/Base/pthreads-w32/pthreads-w32-2.9.1/pthreads-w32-2.9.1-1-mingw32-dll.tar.lzma
[w32api-dev]: http://sourceforge.net/projects/mingw/files/MinGW/Base/w32api/w32api-4.0.3/w32api-4.0.3-1-mingw32-dev.tar.lzma
[zlib-dev]: http://sourceforge.net/projects/mingw/files/MinGW/Base/zlib/zlib-1.2.8/zlib-1.2.8-1-mingw32-dev.tar.lzma
[zlib-dll]: http://sourceforge.net/projects/mingw/files/MinGW/Base/zlib/zlib-1.2.8/zlib-1.2.8-1-mingw32-dll.tar.lzma
[gettext-bin]: http://sourceforge.net/projects/mingw/files/MinGW/Base/gettext/gettext-0.18.3.1-1/gettext-0.18.3.1-1-mingw32-bin.tar.lzma
[autoconf2.5-bin]: http://sourceforge.net/projects/mingw/files/MinGW/Extension/autoconf/autoconf2.5/autoconf2.5-2.68-1/autoconf2.5-2.68-1-mingw32-bin.tar.lzma
[automake1.11-bin]: http://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

View file

@ -0,0 +1,61 @@
MMGen = Multi-Mode GENerator
============================
##### a Bitcoin cold storage solution for the command line
Install MMGen and Its Dependencies on Microsoft Windows
-------------------------------------------------------
#### Install the Python interpreter:
Grab the [Windows 32-bit
installer](https://www.python.org/ftp/python/2.7.6/python-2.7.6.msi)
and run it, accepting the defaults. Make sure the Python base directory is in
your [path](MMGenEditPathMSWin.md).
#### Build the Scrypt Python module:
Grab the [latest tarball](https://pypi.python.org/pypi/scrypt/)
from python.org. Unpack to `C:\`, start the DOS prompt and run:
cd \scrypt-0.6.1
python setup.py build --compiler=mingw32
python setup.py install
#### Build OpenSSL:
Grab the [latest tarball](http://www.openssl.org/source/openssl-1.0.1f.tar.gz)
from the [openssl.org download page](http://www.openssl.org/source/). Unpack
to `C:\`, start your MSYS shell and run:
$ cd /c/openssl-1.0.1f
$ ./config
$ make
$ make install
#### Install the Pycrypto Python module:
Source code is available from the
[Pycrypto home page](https://www.dlitz.net/software/pycrypto/),
but it appears to build only with MS Visual Studio, not MinGW.
Until this situation is fixed, you can install the precompiled binaries
available from
[Voidspace](http://www.voidspace.org.uk/python/modules.shtml#pycrypto).
Download and run the
[Windows installer](http://www.voidspace.org.uk/downloads/pycrypto26/pycrypto-2.6.win32-py2.7.exe),
accepting the defaults.
#### Install the ecdsa Python module:
Grab the [tarball](https://pypi.python.org/pypi/ecdsa), unpack it, `cd` to the
archive root and run `python setup.py install`.
#### Install the bitcoin-python Python module:
Grab the [tarball](https://pypi.python.org/pypi/bitcoin-python/0.3),
unpack it, start your MSYS shell, `cd` to the archive root and run the command:
$ cp -a src/bitcoinrpc /c/Python27/Lib/site-packages
This is a workaround for the standard setup command, which fails here
due to a dependency problem. If your Python is installed in a different
location, you'll have to adjust the destination path accordingly.

74
doc/MMGenInstallLinux.md Normal file
View file

@ -0,0 +1,74 @@
MMGen = Multi-Mode GENerator
============================
##### a Bitcoin cold storage solution for the command line
Install on Debian/Ubuntu Linux:
----------------------------------------
**Perform the following steps on both your online and offline computers:**
Install the pip Python installer:
$ sudo apt-get install python-pip
Install required Python modules:
$ sudo pip install ecdsa scrypt pycrypto bitcoin-python
Install MMGen:
$ git clone https://github.com/mmgen/mmgen.git
$ cd mmgen; sudo ./setup.py install
Install vanitygen (optional but recommended):
$ git clone https://github.com/samr7/vanitygen.git
(build and put the "keyconv" executable in your path)
At this point you can begin trying out MMgen, creating a test wallet and
generating keys as described in **Using MMGen** below. To be able to track
addresses and create and sign transactions, however, you'll need to have
bitcoin daemons installed on your online and offline machines.
#### Bitcoind installation
The bitcoin daemon on the **offline machine** is used solely for signing
transactions and is therefore run without a blockchain. The version bundled
with the prebuilt Bitcoin-QT is just fine for this purpose. It can be obtained
here:
https://bitcoin.org/en/download
After installation, locate the bitcoind executable and start it up:
$ bitcoind -daemon -maxconnections=0
Note that in the absence of a blockchain the daemon starts very quickly and
uses practically no CPU once running. Thus a low-powered computer such as a
netbook can serve quite nicely as an offline signing machine.
On the **online machine**, the bitcoin daemon is used for tracking addresses
and requires a full, updated blockchain. For this a more powerful computer is
needed, especially when importing addresses. Plenty of free disk space is also
required to accommodate the rapidly-growing blockchain (20GB in size at the time
of writing).
The standard bitcoin daemon at present lacks the watch-only address support we
need, so we must get and compile the special watch-only enabled version created
by Bitcoin core developer Pieter Wuille, aka Sipa. If you have the necessary
dependencies installed, the build process is surprisingly painless.
$ curl -O https://codeload.github.com/sipa/bitcoin/zip/watchonly
$ unzip watchonly
$ cd bitcoin-watchonly
$ ./autogen.sh
$ ./configure
$ make -j4
(You may have to install the libboost-all-dev package for the build to succeed)
With your online machine connected to the Internet, start the freshly compiled
daemon and let it synchronize the blockchain, taking care to **move any
existing wallet.dat out of harm's way** beforehand. The daemon will create a
new wallet upon startup, which you'll use as your **tracking wallet**.
Congratulations! Your MMGen installation is now complete.

54
doc/MMGenInstallMSWin.md Normal file
View file

@ -0,0 +1,54 @@
MMGen = Multi-Mode GENerator
============================
##### a Bitcoin cold storage solution for the command line
Install on Microsoft Windows
----------------------------
The installation process on Windows can be divided into three steps:
1. [Install MinGW and MSYS][01], if you haven't already;
2. [Build MMGen's dependencies (excluding the watch-only bitcoind) and
install MMGen itself][02]; and
3. [Build the watch-only bitcoind][03].
After the second step you'll be able to use many of MMGen's features. You
must complete step 3 to be able to track addresses and create transactions,
however.
Getting MMGen up and running on MS Windows requires more work than with Linux,
but your patience will be rewarded with success in the end. Detailed,
step-by-step instructions for installing and building each component and
dependency have been provided to make the process go as smoothly as possible.
The instructions are designed for a computer not connected to the Internet.
They've been tested on the author's build machine running 32-bit Windows XP.
#### A word on text editors:
The installation process involves some editing of source code and configuration
files. Windows Notepad is a bad choice for this, because it doesn't handle
the line endings in Unix text files properly. Therefore, it's recommended you
install a file format-aware text editor like one of the following:
For an easy-to-use editor, try [nano][], available [here][04] as a
precompiled Windows binary. Just extract `nano.exe` from the archive and copy
it to your path.
For advanced users with some knowledge of vi commands, [Vim][], a full-featured
editor with advanced text highlighting capabilities, will be a better choice.
Grab the Windows installer [here][05] and run it, accepting the defaults.
After installing Vim, you should add its executable directory `C:\Program
Files\Vim\vim74` (the version number may change) to your user path.
Editing paths is explained [here][06].
[01]: MMGenInstallMinGW_MSYS.md
[02]: MMGenInstallDependenciesMSWin.md
[03]: MMGenBuildBitcoindMSWin.md
[06]: MMGenEditPathMSWin.md
[04]: http://mingw-and-ndk.googlecode.com/files/win-mingw-nano.7z
[05]: http://www.vim.org/download.php
[nano]: http://www.nano-editor.org/
[vim]: http://www.vim.org/

View file

@ -0,0 +1,85 @@
MMGen = Multi-Mode GENerator
============================
##### a Bitcoin cold storage solution for the command line
Install MinGW and MSYS on Microsoft Windows
-------------------------------------------
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). Note: these archives
were up-to-date at the time of writing (April 2014); if you have time to spare
and want to hunt for more recent versions on the [MinGW repository][01], feel
free to do so.
* [MinGW archive list][02]
* [MSYS archive list][03]
Open the basic-bsdtar archive (in the MinGW list) and copy the executable to
your path (e.g. C:\WINDOWS\system32).
From the DOS prompt, run `mkdir C:\mingw` to create the directory `C:\mingw`.
Move to this directory with the `cd` command and unpack each of the MinGW
archives (excepting the already-unpacked basic-bsdtar archive) there 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](MMGenEditPathMSWin.md)
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.
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).
If you want be able to launch MSYS from an icon, make a copy of the "Command
Line" icon on your desktop, rename it to your taste, right click on it, select
"Properties" and change the highlighted 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.
#### 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 $PAGER
and set like this:
$ set PAGER=/bin/less
Sometimes variables must be exported to be visible to called programs:
$ export PATH
[01]: http://sourceforge.net/projects/mingw/files/
[02]: MMGenGetMinGW_Archives.md
[03]: MMGenGetMSYS_Archives.md

View file

@ -1,78 +0,0 @@
MMGen = Multi-Mode GENerator
----------------------------
##### a Bitcoin cold storage solution for the command line
### Download/Install on Debian/Ubuntu Linux:
**Perform the following steps on both your online and offline
computers:**
Install the pip Python installer:
$ sudo apt-get install python-pip
Install required Python modules:
$ sudo pip install ecdsa scrypt pycrypto bitcoin-python
Install MMGen:
$ git clone https://github.com/mmgen/mmgen.git
$ cd mmgen; sudo ./setup.py install
Install vanitygen (optional but recommended):
$ git clone https://github.com/samr7/vanitygen.git
(build and put the 'keyconv' executable in your path)
At this point you can begin trying out MMgen, creating a test wallet
and generating keys as described in **Using MMGen** below. To be
able to track addresses and create and sign transactions, however,
you'll need to have bitcoin daemons installed on your online and
offline machines.
**Bitcoind installation**
The bitcoin daemon on the **offline machine** is used solely for
signing transactions and is therefore run without a blockchain.
The version bundled with the prebuilt Bitcoin-QT is just fine for this
purpose. It can be obtained here:
https://bitcoin.org/en/download
After installation, locate the bitcoind executable and start it up:
$ bitcoind -daemon -maxconnections=0
Note that in the absence of a blockchain the daemon starts very quickly
and uses practically no CPU once running.
Thus a low-powered computer such as a netbook can serve quite nicely
as an offline signing machine.
On the **online machine**, the bitcoin daemon is used for tracking
addresses and requires a full, updated blockchain. For
this a more powerful computer is needed, especially when importing
addresses. Plenty of free disk space is also required to accomodate
the rapidly-growing blockchain (20GB in size at the time of writing).
The standard bitcoin daemon at present lacks the watch-only address
support we need, so we must get and compile the special watch-only
enabled version created by Bitcoin core developer Pieter Wuille, aka
sipa. If you have the necessary dependencies installed, this process
is surprisingly painless.
$ curl -O https://codeload.github.com/sipa/bitcoin/zip/watchonly
$ unzip watchonly
$ cd bitcoin-watchonly
$ ./autogen.sh
$ ./configure
$ make -j4
(You may have to install the libboost-all-dev package for the build to succeed)
With your online machine connected to the Internet, start the freshly
compiled daemon and let it synchronize the blockchain, **taking care
to move any existing wallet.dat out of harm's way** beforehand.
The daemon will create a new wallet upon startup, which you'll use
as your **tracking wallet**.
Congratulations! Your MMGen installation is now complete.

View file

@ -1,22 +0,0 @@
MMGen = Multi-Mode GENerator
----------------------------
##### a Bitcoin cold storage solution for the command line
### Download/Install on Microsoft Windows
Compiling the watch-only bitcoind and the python scrypt module are the
main challenges for Windows installation.
To compile bitcoind, MinGW must first be installed
and the Berkeley DB and Boost libraries built from source.
The Python interpeter is required for building the python scrypt
module and installing the other python modules.
The build process involves some editing of source code and configuration
files, so it's useful to have a good text editor installed on the system.
MMGen's remaining components either require no compilation (the ecdsa and
bitcoin-python modules and MMGen itself) or can be found online in
precompiled form (the Python interpeter, pycrypto Python module and
vanitygen)
##### (to be continued...)

View file

@ -8,6 +8,8 @@ setup(
author_email = 'mmgen-py@yandex.com',
url = 'https://github.com/mmgen/mmgen',
py_modules = [
'__init__',
'mmgen.__init__',
'mmgen.addr',
'mmgen.bitcoin',
@ -29,6 +31,7 @@ setup(
'mmgen.rpc.proxy',
'mmgen.rpc.util',
'tests.__init__',
'tests.addr',
'tests.bitcoin',
'tests.mn_electrum',
@ -38,10 +41,9 @@ setup(
'tests.utils',
'tests.walletgen'
],
data_files=[('/usr/local/bin', [
data_files=[('bin', [
'mmgen-addrgen',
'mmgen-addrimport',
'mmgen-keygen',
'mmgen-passchg',
'mmgen-walletchk',
'mmgen-walletgen',

0
tests/__init__.py Normal file
View file