Documentation update for watchonly support in mainline daemon
modified: Build-Bitcoind-on-Microsoft-Windows.md modified: Getting-Started-with-MMGen.md modified: Home.md modified: Install-MMGen-on-Debian-or-Ubuntu-Linux.md modified: Install-the-Offline-Bitcoind.md
parent
1bff71d43d
commit
c73276c472
5 changed files with 103 additions and 49 deletions
|
|
@ -1,3 +1,5 @@
|
|||
#### Note: the following instructions are **out of date** and apply only to an older patched version of bitcoind supported by MMGen versions v0.7.7 and older. Windows users are advised to wait for the upcoming release of Bitcoin Core with built-in watch-only address support and install the binary.
|
||||
|
||||
##### Note: If during the compilation process you get "Missing Disk" pop-up error messages and have a card reader installed, you should temporarily disconnect your card reader.
|
||||
|
||||
##### Note: The following instructions assume you'll be unpacking all archives to `C:\`, the root directory on most Windows installations. If you choose to unpack to another location, the `cd` commands must be adjusted accordingly.
|
||||
|
|
|
|||
|
|
@ -92,13 +92,29 @@ Copy this file onto a USB stick and transfer it to your online computer.
|
|||
|
||||
#### <a name=04>Import addresses (online computer):</a>
|
||||
|
||||
On your online computer, start bitcoind and import the addresses into the
|
||||
tracking wallet with the command:
|
||||
On your online computer, go to your bitcoind data directory and move any
|
||||
existing 'wallet.dat' file out of the way. Start bitcoind and let it generate
|
||||
a new 'wallet.dat', which you'll use as your **tracking wallet**. Import your
|
||||
four addresses into the new tracking wallet with the command:
|
||||
|
||||
$ mmgen-addrimport my_addrs
|
||||
|
||||
These addresses will now be tracked by bitcoind. Any BTC transferred to them
|
||||
will show up in your listing of unspent outputs.
|
||||
will show up in your listing of address balances. Balances can be viewed with
|
||||
the 'mmgen-tool' utility:
|
||||
|
||||
$ mmgen-tool listaddresses
|
||||
No addresses with balances!
|
||||
|
||||
The 'showempty' option shows all tracked addresses, even ones with no balances,
|
||||
so the four imported addresses should now show up on the listing:
|
||||
|
||||
$ mmgen-tool listaddresses showempty=1
|
||||
ADDRESS COMMENT BALANCE
|
||||
89ABCDEF:1 Donations 0
|
||||
89ABCDEF:2 Storage 1 0
|
||||
89ABCDEF:3 Storage 2 0
|
||||
89ABCDEF:4 Storage 3 0
|
||||
|
||||
If you have any existing addresses with balances, you'll want to track them too.
|
||||
Make a plain list of these addresses, one address per line, and import the list
|
||||
|
|
@ -106,9 +122,10 @@ into the tracking wallet using 'mmgen-addrimport -l'.
|
|||
|
||||
$ mmgen-addrimport --rescan -l my_existing_addrs_with_balances
|
||||
|
||||
NOTE: The '--rescan' option must be used for all addresses with existing
|
||||
balances. Since the rescanning process is slow, you may want to do it in
|
||||
stages, a few addresses at a time.
|
||||
NOTE: The '--rescan' option forces a rescan of the entire block chain, which is
|
||||
required for all addresses with existing balances. Since the rescanning process
|
||||
is very slow, you'll save yourself a great deal of time by always importing
|
||||
new addresses BEFORE spending into them.
|
||||
|
||||
Continue in this fashion until you've imported all addresses with balances into
|
||||
your tracking wallet.
|
||||
|
|
@ -121,15 +138,17 @@ harmless until they're signed and broadcast to the network, so feel free to
|
|||
experiment with different transactions using different combinations of inputs
|
||||
and outputs.
|
||||
|
||||
First of all you'll want to examine your balances:
|
||||
First of all you'll want to examine your balances. Note that 'mmgen-tool
|
||||
listaddresses' shows only MMGen address balances; to view **all** balances,
|
||||
including your non-MMGen ones, use the 'mmgen-txcreate' command:
|
||||
|
||||
$ mmgen-txcreate -i
|
||||
|
||||
A list of all your unspent outputs will appear, along with a menu allowing you
|
||||
to sort the outputs by four criteria: transaction ID, address, amount and
|
||||
A list of all unspent outputs will appear, along with a menu allowing you to
|
||||
sort the outputs by four criteria: transaction ID, address, amount and
|
||||
transaction age. Your overall balance in BTC appears at the top of the screen.
|
||||
The list may be viewed in a pager or printed to file. If you have ten unspent
|
||||
outputs, your display will look something like this:
|
||||
The list may be viewed in a pager or printed to file. For a wallet with ten
|
||||
unspent outputs, the display might look something like this:
|
||||
|
||||
UNSPENT OUTPUTS (sort order: reverse amount) Total BTC: 39.72
|
||||
Num TX id Vout Address Amount (BTC) Age(days)
|
||||
|
|
@ -184,18 +203,24 @@ transaction fee of 0.001 BTC:
|
|||
The bare address with no amount is the **change address**. MMGen will compute
|
||||
the change amount (3.399 BTC in this case) automatically.
|
||||
|
||||
Alternatively, and more conveniently, you can list your three addresses in MMGen
|
||||
format:
|
||||
Note that the above transaction can be written much more elegantly and concisely
|
||||
using MMGen addresses in place of their Bitcoin equivalents:
|
||||
|
||||
$ mmgen-txcreate 89ABCDEF:2,3.3 89ABCDEF:3,3.3 89ABCDEF:4
|
||||
|
||||
Now hit ENTER, choose the transaction's input from the list (10 BTC, address
|
||||
1F9495H8EJL..., txid 04f97185...,2), and confirm. If all goes well,
|
||||
'mmgen-txcreate' will exit with the message:
|
||||
After hitting ENTER you'll be presented with the same display produced by the
|
||||
'-i' option above, plus an interactive menu. After quitting with 'q', you'll
|
||||
be prompted to choose the transaction's inputs.
|
||||
|
||||
Enter a range or space-separated list of outputs to spend:
|
||||
|
||||
Find the input with the 10 BTC balance in the list. This is input 1), so type
|
||||
'1' and ENTER. After several more prompts and confirmations 'mmgen-txcreate'
|
||||
will exit with the message:
|
||||
|
||||
Transaction data saved to file 'tx_1EDCBA[6.6].raw'
|
||||
|
||||
Note that the transaction has a unique ID, and the non-change output amount, 6.6
|
||||
Note that the transaction has a unique ID, and the non-change spend amount, 6.6
|
||||
BTC, is conveniently included in the filename.
|
||||
|
||||
#### <a name=06>Sign a transaction (offline computer):</a>
|
||||
|
|
@ -253,7 +278,7 @@ running, and execute the command:
|
|||
|
||||
$ mmgen-txsend tx_1EDCBA[6.6].sig
|
||||
|
||||
Like all mmgen commands, 'mmgen-txsend' is interactive, so you'll be asked for
|
||||
Like all MMGen commands, 'mmgen-txsend' is interactive, so you'll be asked for
|
||||
confirmation before the transaction is actually sent.
|
||||
|
||||
Once the transaction's confirmed by the network, your three new MMGen addresses
|
||||
|
|
|
|||
2
Home.md
2
Home.md
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
### Using MMGen
|
||||
|
||||
> #### See [Getting Started with MMGen](Getting-Started-with-MMGen)
|
||||
> #### [Getting Started with MMGen](Getting-Started-with-MMGen)
|
||||
|
||||
> #### [MMGen command help](MMGen-command-help)
|
||||
|
||||
|
|
|
|||
|
|
@ -19,9 +19,9 @@ Install vanitygen (optional but recommended):
|
|||
(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.
|
||||
generating keys as described in [Getting Started with MMGen][gs]. 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.
|
||||
|
||||
#### Install the offline bitcoind:
|
||||
|
||||
|
|
@ -29,20 +29,28 @@ Instructions [here][01].
|
|||
|
||||
#### Install the online bitcoind:
|
||||
|
||||
The bitcoin daemon on the **online machine**, a.k.a. the "watch-only" bitcoind,
|
||||
is used for tracking addresses and requires the full blockchain. For this, a
|
||||
more powerful computer is desirable. In particular, importing addresses is
|
||||
especially CPU-intensive. You'll also need plenty of free disk space for the
|
||||
rapidly-growing blockchain (~20GB at the time of writing).
|
||||
The bitcoin daemon on the **online machine** is used for tracking addresses and
|
||||
requires a full blockchain. Two operations involving the blockchain are
|
||||
especially CPU-intensive: **synchronizing the blockchain** and **importing
|
||||
existing addresses with balances**. If you synchronize often, once every
|
||||
several days, for example, and take care to import your addresses **before**
|
||||
spending into them, then even a low-powered notebook will suffice as your online
|
||||
machine (the author's online and offline machines are both netbooks, by the
|
||||
way). Otherwise, a more powerful computer is desirable. You'll also need
|
||||
plenty of free disk space for the growing blockchain, about 20GB in size at the
|
||||
time of this writing.
|
||||
|
||||
The standard bitcoin daemon at present lacks the watch-only address support we
|
||||
need, so you'll have to get and compile a patched version by Bitcoin core
|
||||
developer Pieter Wuille, aka Sipa. Fortunately, it builds out of the box
|
||||
when the proper dependencies are installed.
|
||||
Watch-only address support has now been included in the master branch of Bitcoin
|
||||
Core and will be included in the next release. When that happens, you may
|
||||
install the [binary build][dl] on your online machine just as you did on your
|
||||
offline one. In the meantime, it's possible to download the Bitcoin source code
|
||||
from Github and compile bitcoind yourself. On Linux this is a surprisingly easy
|
||||
process; everything builds right out of the box when the proper dependencies are
|
||||
installed.
|
||||
|
||||
The boost development packages are the dependencies you're most likely to be
|
||||
missing. Check that the following are on your system (package names may vary;
|
||||
the version should be 1.48 or greater):
|
||||
Make sure that the following development packages for the boost library are
|
||||
installed (package names may vary; the version should be 1.48 or greater, and
|
||||
version 1.54 on Ubuntu 13.10 is reported not to work):
|
||||
|
||||
libboost-system-dev
|
||||
libboost-filesystem-dev
|
||||
|
|
@ -51,22 +59,41 @@ the version should be 1.48 or greater):
|
|||
libboost-test-dev
|
||||
libboost-thread-dev
|
||||
|
||||
Download the bitcoin-watchonly [zip archive][00] (commit #a13f1e8 [[check][]])
|
||||
from GitHub, configure, and build:
|
||||
You'll also need the standard build tools such as automake, autoconf and
|
||||
libtool, but these are probably already on your system if you've done any
|
||||
compiling from source.
|
||||
|
||||
$ unzip watchonly.zip
|
||||
$ cd bitcoin-watchonly
|
||||
Clone the bitcoin repository from Github, configure, and build:
|
||||
|
||||
$ git clone https://github.com/bitcoin/bitcoin.git
|
||||
$ cd bitcoin
|
||||
$ ./autogen.sh
|
||||
$ ./configure (add --with-incompatible-bdb if libdb version > 4.8)
|
||||
$ make -j4 src/bitcoind
|
||||
$ ./configure --without-gui
|
||||
$ make -j4
|
||||
|
||||
If 'configure' complains about a missing libdb version 4.8, you have
|
||||
two options: either install the libdb4.8-dev package or use the add the
|
||||
'--with-incompatible-bdb' option to the 'configure' command line. Be warned
|
||||
that the latter option will result in your 'wallet.dat' files being incompatible
|
||||
with the binary bitcoind.
|
||||
|
||||
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. You'll use the new wallet
|
||||
created by the daemon upon startup as your **tracking wallet**.
|
||||
daemon:
|
||||
|
||||
$ src/bitcoind -daemon
|
||||
|
||||
and let it synchronize the blockchain, taking care to **move any existing
|
||||
wallet.dat out of harm's way** beforehand. You'll use the new wallet created by
|
||||
the daemon upon startup as your **tracking wallet**.
|
||||
|
||||
**NOTE:** Synchronizing the blockchain from scratch can take days if not weeks,
|
||||
so if you have no blockchain on your system, or one more than a month or two
|
||||
old, you're advised to use the [bootstrap.dat][bd] torrent file provided by the
|
||||
Bitcoin Core developers. Instructions are provided on the linked page.
|
||||
|
||||
Congratulations! Your MMGen installation is now complete.
|
||||
|
||||
[00]: https://codeload.github.com/sipa/bitcoin/zip/watchonly
|
||||
[01]: Install-the-Offline-Bitcoind
|
||||
[check]: https://github.com/sipa/bitcoin/tree/watchonly
|
||||
[dl]: https://bitcoin.org/en/download
|
||||
[bd]: https://bitcoin.org/bin/blockchain/
|
||||
[gs]: Getting-Started-with-MMGen
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
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. Windows and Linux
|
||||
transactions and is therefore run without a blockchain. The binary included
|
||||
in the Bitcoin Core release is just fine for this purpose. Windows and Linux
|
||||
binaries can be obtained [here][00].
|
||||
|
||||
After installation, locate the bitcoind executable, place it on your execution
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue