diff --git a/Getting-Started-with-MMGen.md b/Getting-Started-with-MMGen.md index a098e61..4cf66ff 100644 --- a/Getting-Started-with-MMGen.md +++ b/Getting-Started-with-MMGen.md @@ -27,6 +27,9 @@ * With an online (hot) wallet * With an offline (cold storage) wallet +#### Altcoin support +* Bitcoin Cash (BCH) + ### Preliminaries #### Before you begin @@ -50,12 +53,12 @@ followed by `--help`. Note that most command options have long and short versions. For example, the `--help` option may be abbreviated to `-h`. Exceptions are the options listed by `--longhelp`, which have no short versions. -MMGen commands are generally interactive, informing you at every step and +MMGen commands are generally interactive, providing you with information and prompting you for input. The `--verbose` or `-v` option requests commands to be more wordy, while the `--quiet` or `-q` option suppresses all but the most essential information. These options are available for all MMGen commands. The `--yes` option (available only for certain commands) suppresses even more -information and can be used to make some commands non-interactive or scriptable. +information and can be used to make some commands non-interactive and scriptable. Certain options require parameters, such as the `--seed-len` option, for instance, which takes a parameter of '128', '192' or '256'. Commands may also @@ -75,7 +78,7 @@ Sample MMGen command invocations: Just like Bitcoin Core, MMGen has its own data directory and configuration file. The data directory is '.mmgen' in the user's home directory and the config file is 'mmgen.cfg'. The config file contains global settings which you may -wish to edit at some point to customize MMGen to your needs. These settings +wish to edit at some point to customize your installation. These settings include the maximum transaction fee; the user name, password and hostname used for communicating with bitcoind; and a number of others. @@ -87,15 +90,15 @@ import operations on an offline computer with no blockchain and no bitcoin balance. If you want to practice creating, signing and sending transactions with real -bitcoins, however, you'll need a fully synced blockchain and some actual coins -to play with. +bitcoins, however, you'll need a fully synced blockchain and some coins to play +with. This involves an expenditure of both time and money. -Fortunately, there's an alternative: MMGen's **regtest mode** feature creates a -virtual network of two users, Bob and Alice, who transact with each other on a -private blockchain. All of MMGen's functionality is available in regtest mode, -making it an ideal way to learn to use the MMGen wallet without risking real -coins. You may wish to pause here and perform the steps in the tutorial [MMGen -Quick Start with Regtest Mode][06] before continuing on. +Fortunately, there's an alternative: MMGen's **regtest mode** creates a virtual +network of two users, Bob and Alice, who transact with each other on a private +blockchain. All of MMGen's functionality is available in regtest mode, making +it an ideal way to learn to use the MMGen wallet without risking real coins. +You may wish to pause here and perform the steps in the tutorial [MMGen Quick +Start with Regtest Mode][06] before continuing on. ### Basic Operations @@ -124,8 +127,9 @@ On your offline computer, generate an MMGen wallet: generated, so your IDs will of course be different than these. The Seed ID never changes and is used to identify all keys/addresses generated -by this wallet. You should make a note of it. The Key ID changes whenever the -wallet’s password or hash preset are changed and is less important. +by this wallet. Since it's your wallet's primary identifier, you should +memorize it visually. The Key ID changes whenever the wallet’s password or hash +preset are changed and doesn't need to be memorized. ‘256’ is the seed length; ‘3’ is the scrypt hash preset. These values are configurable: type `mmgen-walletgen --help` for details. @@ -176,9 +180,9 @@ backwards compatibility, legacy addresses are generated by default. To generate compressed addresses, specify `--type=compressed` on the command line. Legacy addresses are of interest only for existing pre-Segwit MMGen -installations, so it's unlikely you'll wish to generate them. Compressed -addresses are the preferable choice for Bitcoin Cash (BCH) wallets, since -Bitcoin Cash doesn't support Segwit. +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 @@ -196,13 +200,13 @@ Bitcoin Cash doesn't support Segwit. 1 13jbRxWjswXtaDzLBJDboMcIe6nLohFb9M ... -Note that for non-legacy address types the code letter is present in the +Note that for non-legacy address types the code letter is included in the filename. To fund your MMGen wallet, first import the addresses into your tracking wallet and then spend some BTC into any of them. If you run out of addresses, generate -more. To generate a hundred addresses, for example, you’d specify an address -range of ‘1-100’. +more. To generate a hundred addresses you’d specify an address range of +‘1-100’. Let’s say you’ve decided to spend some BTC into the first four addresses above. Begin by importing these addresses into the tracking wallet on your online @@ -243,8 +247,8 @@ Save the file, copy it onto a USB stick and transfer it to your online computer. On your online computer, go to your bitcoind data directory and move any existing 'wallet.dat' file out of harm’s way. Start bitcoind and let it -generate a new 'wallet.dat', which you’ll use as your tracking wallet. -Import your ten addresses into the new tracking wallet with the command: +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 @@ -269,10 +273,10 @@ track and spend funds from another wallet using MMGen without having to go through the network. To use it, you must save the keys corresponding to the addresses where the funds are stored in a separate file to use during signing.* -Note that each address has a unique ID (the ‘MMGen ID’) consisting of its Seed -ID, its address type code letter and its index. Addresses of different types -may be imported into the same tracking wallet; since they're generated from -different sub-seeds you needn't worry about key reuse. +Note that each address has a unique ID (the ‘MMGen ID’) consisting of a Seed ID, +address type code letter, and index. Addresses of different types may be +imported into the same tracking wallet; since they're generated from different +sub-seeds you needn't worry about key reuse. Now that your addresses are being tracked, you may go ahead and send some BTC to them over the Bitcoin network. If you send 0.1, 0.2, 0.3 and 0.4 BTC @@ -304,10 +308,9 @@ issue the following command: 'mmgen-txcreate' accepts either MMGen IDs or Bitcoin addresses as arguments. -NOTE: For backwards compatibility, the code letter may be omitted from the MMGen -ID for legacy addresses. Thus address ‘89ABCDEF:L:5’, for example, may be -expressed as ‘89ABCDEF:5’. For other address types the code letter is -mandatory. +NOTE: For backwards compatibility, legacy addresses may omit the code letter +from the MMGen ID. Thus address ‘89ABCDEF:L:5’ may be expressed as +‘89ABCDEF:5’. For other address types the code letter is mandatory. 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: @@ -317,7 +320,7 @@ the change to 89ABCDEF:S:8, you’d do this: 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 seed in the above examples are already imported and tracked, so you’re OK. If -you wanted to send to 89ABCDEF:S:11 instead, you'd have to import it first. +you wanted to send to 89ABCDEF:S:11, you'd have to import it first. Let’s go with the first of our two examples above. @@ -406,7 +409,7 @@ of MMGen’s more advanced features, continue reading. #### Using the mnemonic, seed and hexseed formats -Continuing our example above, generate a mnemonic from the default wallet: +Using your default wallet from the exercises above, generate a mnemonic: $ mmgen-walletconv -o words ... @@ -501,8 +504,9 @@ 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 -A hexseed can be used to generate keys even without the MMGen software, -using basic command-line utilities, as explained in [this tutorial][03]. +Mnemonics and hexseeds can be used to generate keys even without the MMGen +software, using basic command-line utilities, as explained in [this +tutorial][03]. #### Mnemonics, seeds and hexseeds: additional information @@ -512,21 +516,28 @@ format: $ mmgen-addrgen -i words 1-10 ... - Enter mnemonic data: + 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: -This means that you may keep your seed entirely in your head, as either a -mnemonic, seed or hexseed, and never record it anywhere on any medium. +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 +screen of course, being secret data. + +The mnemonic prompt feature allows you to store and use your seed entirely in +your head if you wish, never recording it on a persistent physical medium. With the `-S` option, MMGen commands may be requested to print wallet data to -screen instead of a file. To safeguard against over-the-shoulder, Van Eck -phreaking and other side-channel attacks, you’ll be prompted before this -sensitive data is actually displayed. MMGen never prints unencrypted private -data to screen by default. +screen instead of a file. To safeguard against over-the-shoulder, Tempest and +other side-channel attacks, you’ll be prompted before this sensitive data is +actually displayed. MMGen never prints decrypted private data to screen unless +you ask it to. The output of any MMGen command may be written to a directory of your choice using the `-d` option. For example, on a Linux system you can use `-d /dev/shm` to write keys and seeds to volatile memory instead of disk, -ensuring that no trace of this sensitive data remains once your computer’s been +ensuring that no trace of secret data remains once your computer’s been powered down. #### Incognito wallets @@ -838,9 +849,23 @@ them in turn until you get a confirmation: $ mmgen-txsend 124FFF[0.1,150].sigtx # ...if this doesn't confirm, then $ mmgen-txsend 73DABB[0.1,200].sigtx +### Altcoin support + +#### Bitcoin Cash (BCH) + +To use MMGen with Bitcoin Cash (BCH), first make sure the Bitcoin ABC +daemon is properly installed ([source][si])([binaries][bi]), running and +listening for RPC connections on [port 8442][p8]. + +Then just add the `--coin=bch` option to all your MMGen commands. It's that +simple! + [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 [04]: https://bitcoin.org/en/developer-examples#testnet [05]: https://bitcoin.org/en/developer-examples#regtest-mode [06]: https://github.com/mmgen/mmgen/wiki/MMGen-Quick-Start-with-Regtest-Mode +[si]: Install-Bitcoind-from-Source-on-Debian-or-Ubuntu-Linux +[bi]: Install-Bitcoind#a_d +[p8]: Install-Bitcoind#a_r diff --git a/Home.md b/Home.md index a1f889b..464f426 100644 --- a/Home.md +++ b/Home.md @@ -14,3 +14,5 @@ > #### [MMGen command help](MMGen-command-help) > #### [Recovering your keys without the MMGen software](Recovering-Your-Keys-Without-the-MMGen-Software) + +> #### [Bitcoin Cash (BCH) support](Getting-Started-with-MMGen#a_bch) diff --git a/Install-Bitcoind-from-Source-on-Debian-or-Ubuntu-Linux.md b/Install-Bitcoind-from-Source-on-Debian-or-Ubuntu-Linux.md index 5e9f8a0..f95224a 100644 --- a/Install-Bitcoind-from-Source-on-Debian-or-Ubuntu-Linux.md +++ b/Install-Bitcoind-from-Source-on-Debian-or-Ubuntu-Linux.md @@ -70,10 +70,9 @@ ARM binaries are available for both Bitcoin Core and Bitcoin ABC. See the $ curl -O 'https://raw.githubusercontent.com/mmgen/MMGenLive/master/home.mmgen/bin/mmlive-node-{start,stop}' $ sudo install mmlive-node-{start,stop} /usr/local/bin -Refer to **Run:** on the [binary installation page][01] for instructions on -running your freshly compiled bitcoin daemon(s). +Refer to [Run][02] on the binary installation page for instructions on running +the bitcoin daemon(s). [01]: Install-Bitcoind -[dl]: https://bitcoin.org/en/download -[gs]: Getting-Started-with-MMGen +[02]: Install-Bitcoind#a_r [bu]: https://github.com/bitcoin/bitcoin/blob/master/doc/build-unix.md diff --git a/Install-Bitcoind.md b/Install-Bitcoind.md index 422f3d2..6e49417 100644 --- a/Install-Bitcoind.md +++ b/Install-Bitcoind.md @@ -16,65 +16,93 @@ synchronize often (once a week, for example) and take care to import your addresses **before** spending into them, then it's possible to use a low-powered netbook as your online machine. -### Download: +### Download: > **Bitcoin Core:** ->> Go to the Bitcoin Core [main download page][01]. Choose the 32-bit or 64-bit ->> versions appropriate for your online and offline computers. +>> Go to the Bitcoin Core [download page][01]. Choose the 32-bit or 64-bit +>> versions appropriate for your online and offline computers. Windows users +>> should choose the executable installer. > **Bitcoin ABC (optional):** ->> If you wish to transact BCH, a.k.a "Bitcoin Cash” or “Bcash”, then download ->> the appropriate [Bitcoin ABC binary][abc] for your system as well. Windows ->> users should download the zip file rather than the installer. Both Windows ->> and Linux users **must** rename the binary to 'bitcoind-abc' before ->> installing it in their executable path. +>> If you wish to transact BCH (Bcash), then download the appropriate [Bitcoin +>> ABC binary][abc] for your system as well. Windows users should choose the +>> executable installer. >> *Regard the Bitcoin ABC binaries as untrusted software. The author of the >> MMGen project makes no guarantees regarding their safety or reliability.* -### Install (both online and offline computers): +### Install (both online and offline computers): -> **Windows users:** +> **Bitcoin Core:** ->> Run the Windows installer. When it's finished, determine where it installed ->> 'bitcoind.exe' (probably in `C:\Program Files\Bitcoin\daemon`) and append ->> that path to your [PATH variable][05]. +>> **Windows users:** Run the Windows installer with the default settings. +>> **Linux users:** Unpack the archive and copy the bitcoind and bitcoin-cli +>> binaries to /usr/local/bin. -> **Linux users:** +> **Bitcoin ABC (optional):** ->> Unpack the tar archive and copy the bitcoind executable in bin/ to your ->> execution path or just run it in place. +>> **Windows users:** Run the Windows installer, installing into the alternate +>> folder C:\Program Files\Bitcoin_ABC. **Linux users:** Unpack the archive and +>> rename bitcoind to bitcoind-abc. Copy it to /usr/local/bin. -### Run (both Windows and Linux): +### Run (both online and offline computers): -> **On the online computer:** +> **Windows:** ->> Open a terminal and start bitcoind with the command: +>> In the Windows command-line environment processes don't fork to run in the +>> background, so you'll have to run each daemon in a separate terminal window. +>> If you're running Core only, open an MSYS terminal and start the daemon with +>> the command: + + $ bitcoind + +>> To run Bitcoin Core and Bitcoin ABC simultaneously, open two MSYS terminals. +>> In the first, run the command: + + $ /c/Program\ Files/Bitcoin/daemon/bitcoind.exe + +>> In the second, run: + + $ mkdir /c/Users/yourusername/AppData/Roaming/Bitcoin_ABC + $ /c/Program\ Files/Bitcoin_ABC/daemon/bitcoind.exe -rpcport=8442 -datadir=/c/Users/yourusername/AppData/Roaming/Bitcoin_ABC + +> **Linux:** + +>> Run the Core daemon: $ bitcoind -daemon ->> Warning: If you're using an existing Bitcoin Core installation, **move your ->> wallet.dat out of harm's way** before starting bitcoind. The new wallet now ->> created will be used as your **tracking wallet**. +>> Run the ABC daemon (if applicable): ->> If you're connected to the Internet, bitcoind will begin downloading and ->> verifying the blockchain. This can take from several hours to several days ->> (depending on the speed of your computer) for an initial download. + $ mkdir ~/.bitcoin-abc + $ bitcoind-abc -daemon -rpcport=8442 -datadir=~/.bitcoin-abc -> **On the offline computer:** +> Communicate with your daemons like this: ->> Open a terminal and start bitcoind with the command: +>> Core: - $ bitcoind -daemon -maxconnections=0 -listen=0 + $ bitcoin-cli help ->> Note that in the absence of a blockchain the offline daemon starts very ->> quickly and uses practically no CPU once running. +>> ABC: ->> *Note for Windows users:* Under Windows, the bitcoind daemon doesn't fork to ->> run as a background process, so you'll have to run it in a separate terminal ->> window + $ bitcoin-cli -rpcport=8442 help + +> Warning: If you're using an existing Bitcoin Core or ABC installation, **move +> your wallet.dat out of harm's way** before starting the daemon. The new +> wallet now created will be used as your **tracking wallet**. + +> If you're connected to the Internet, bitcoind will begin downloading and +> verifying the blockchain. This can take from several hours to several days +> depending on the speed of your computer and Internet connection. The initial +> block download can be sped up enormously by adding the `-assumevalid` option, +> followed by a recent block hash, to the command line. The block hash can be +> found on a blockchain explorer site. + +> For the offline daemon you may add the options `-maxconnections=0 -listen=0` +> to the command line. Note that in the absence of a blockchain the offline +> daemon starts very quickly and uses practically no CPU once running. [01]: https://bitcoin.org/en/download [bd]: https://bitcoin.org/bin/blockchain/