Commit graph

3,143 commits

Author SHA1 Message Date
1c5277572e
workaround for broken hashlib.scrypt() 2019-06-05 16:54:49 +03:00
a0ef43b3c5
SubSeed: generate() -> _generate() 2019-06-03 15:29:52 +03:00
a7fa06be94
SubSeed: make 'have_short' a class attr; new 'member_type' attr 2019-06-02 22:14:01 +03:00
855a33f67a
SubSeed: pass parent list rather than parent seed to constructor 2019-06-02 22:10:06 +03:00
6f1ee739b4
MMGenObject.pformat(): handle objects that contain their parent 2019-06-02 20:47:02 +03:00
2c17fa7540
delete class SubSeedBase 2019-06-02 19:49:47 +03:00
2952797621
new class: SubSeedList 2019-06-02 19:44:14 +03:00
1ebd4ce18b
test.py: test --show-hash-presets info screen 2019-05-29 14:26:53 +03:00
742d76824b
Version 0.11.0a (minor bugfix/feature subrelease) v0.11.0a
Significant changes since v0.11.0:

- 99a354f: re-enable network fee estimation support (fixes py3port regression)
- d7bfc83: support 80-screen-width tracking wallet labels
- 05f840d: fix --show-hash-presets option (thx to https://github.com/dooglus)
- 82dfd09: getbalance: fix incorrect display with 0-conf outputs
2019-05-29 12:14:22 +03:00
b74ada039d
test.py: improve regtest getbalance test, minor fixes 2019-05-29 12:05:05 +03:00
82dfd094ac
getbalance: fix incorrect display with 0-conf outputs 2019-05-29 12:02:24 +03:00
05f840d65e
fix --show-hash-presets option 2019-05-29 11:56:58 +03:00
25c7f16521
Merge pull request #2 from dooglus/patch-2
Fix spelling mistake.
2019-05-29 08:42:17 +00:00
93c1fb4401
version bump 2019-05-28 18:25:28 +03:00
d7bfc8307e
support 80-screen-width tracking wallet labels
Labels with double-wide CJK characters can already occupy 80 terminal cells.
Extend the same privilege to all labels.
2019-05-28 17:49:45 +03:00
Chris Moore
e6356b796b
Fix spelling mistake. 2019-05-28 06:52:42 -07:00
7ebfac59fd
test.py: force correct terminal width for spawned scripts 2019-05-27 18:40:13 +03:00
037acf0791
modularize objtest.py 2019-05-27 11:34:23 +03:00
99a354fed5
re-enable network fee estimation support (fixes py3port regression) 2019-05-27 11:31:00 +03:00
815f709c7b
BTCAmt: add 'from_decimal' option to constructor 2019-05-27 11:29:28 +03:00
c747c6108b
tx.py: rename variable: rel_fee -> fee_per_kb 2019-05-27 11:24:31 +03:00
e9678d65b2
Version 0.11.0 v0.11.0 2019-05-25 18:50:40 +03:00
d470c2a3b7
Update documentation 2019-05-25 18:47:21 +03:00
6741eb4ceb
add v0.11.0 release notes 2019-05-25 18:05:09 +03:00
11cca53660
test suite: minor fixes and additions 2019-05-25 18:04:14 +03:00
c7beb2e60c
test.py: add utf8 output tests 2019-05-25 15:50:09 +03:00
429ff7fa07
[msys2]: warn/exit on buggy, unsupported features 2019-05-22 12:52:31 +03:00
7ed00d98e5
test.py: add password_entry, mnemonic_entry tests 2019-05-21 16:09:33 +03:00
85236cd601
autosign: improve summary output, ts_autosign: refactor mnemonic entry code 2019-05-21 11:40:14 +03:00
13ab25764f
[msys2]: test suite fixes and additions 2019-05-20 18:44:32 +03:00
e879b7e548
minor fixes 2019-05-20 18:43:02 +03:00
1e75442bb9
eth: use local transactions module exclusively 2019-05-20 18:35:13 +03:00
5587f9f25c
regtest: support generatetoaddress RPC call 2019-05-20 18:16:32 +03:00
a59f10c841
test-release.sh: use strings instead of arrays for cmd lists 2019-05-20 18:15:14 +03:00
29cf6603af
[subseed]: include parent Seed ID in collision check 2019-05-17 14:45:11 +03:00
82086c9936
Subwallets, Part 3: transaction signing using the parent wallet
See commit 7538a94 for Part 1
See commit d1b8aef for Part 2

NOTE: to guard against Seed ID collisions, only the default or first wallet
specified in `mmgen-txsign` will be used for signing subwallet transactions.

Live example using MMGen regtest (Bob and Alice) mode:

    $ mmgen-regtest setup

    # Create a bogus wallet for Bob in mnemonic format:
    $ echo $(yes bee | head -n24) > bogus.mmwords

    # Convert the wallet and make it Bob's default:
    $ mkdir -p $HOME/.mmgen/regtest/btc/bob
    $ mmgen-walletconv -d $HOME/.mmgen/regtest/btc/bob bogus.mmwords
    ...
    MMGen wallet written to file /home/user/.mmgen/regtest/btc/bob/DF449DA4-*.mmdat

    # Choose two subwallets, 1S and 2L, and get their Seed IDs:
    $ mmgen-tool --bob get_subseed 1S # ==> 930E1AD5
    $ mmgen-tool --bob get_subseed 2L # ==> 62B02F54

    # Generate five bech32 addresses each from default wallet and subwallets:
    $ mmgen-addrgen --bob --type=bech32 1-5
    $ mmgen-addrgen --bob --type=bech32 --subwallet=1S 1-5
    $ mmgen-addrgen --bob --type=bech32 --subwallet=2L 1-5

    # Import the addresses into Bob's tracking wallet:
    $ mmgen-regtest bob
    $ mmgen-addrimport --bob DF449DA4*addrs
    $ mmgen-addrimport --bob 930E1AD5*addrs
    $ mmgen-addrimport --bob 62B02F54*addrs

    # Fund addresses from each of the wallets:
    $ mmgen-regtest send bcrt1q0v8eczv37ynl9zn8w3rh53xrkyuddrunuz74rd 10 # DF449DA4:B:1
    $ mmgen-regtest send bcrt1qtzxlnng6jd7yakzp7r69y6nmh5wp0wx7xg6e9w 10 # 930E1AD5:B:1
    $ mmgen-regtest send bcrt1qxnj0wgusq357qj62hq88thrw9cwanxc7926vrz 10 # 62B02F54:B:1

    # Create a transaction spending to and from each of the wallets:
    $ mmgen-txcreate --bob --tx-fee=3s DF449DA4:B:2,1.11 930E1AD5:B:2,1.23 62B02F54:B:2
    ...
    (choose inputs 1-3)
    ...
    Transaction written to file '<MMGen txid>[2.34].testnet.rawtx'

    # Sign the transaction:
    $ mmgen-txsign --bob *\[2.34\].testnet.rawtx
    ...
    Found subseed 930E1AD5 (DF449DA4:1S)
    ...
    Found subseed 62B02F54 (DF449DA4:2L)
    ...
    Signed transaction written to file '<MMGen txid>[2.34].testnet.sigtx'

    # Send the transaction:
    $ mmgen-txsend -q --bob *\[2.34\].testnet.sigtx
    Transaction sent: <BTC txid>

    # Mine a block and view the result:
    $ mmgen-regtest generate
    $ mmgen-tool --bob twview
2019-05-16 12:48:12 +03:00
83e54ccb6e
objtest.py: separate test vectors for coin,network pairs 2019-05-16 12:45:52 +03:00
2a880e7a93
various cleanups and fixes 2019-05-16 12:43:34 +03:00
af564ba7a6
Support bitcoin-abc v0.19.6 2019-05-16 12:41:50 +03:00
d1b8aefde6
Subwallets, Part 2: key/address generation using the parent wallet
See commit 7538a94 for Part 1

Examples:

    # Create a bogus wallet in mnemonic format for testing purposes:
    $ echo $(yes bee | head -n24) > bogus.mmwords

    # Get the Seed ID of the wallet's 5th short (128-bit) subwallet:
    $ mmgen-tool get_subseed 5S wallet=bogus.mmwords
    30D66FF5

    # Generate ten bech32 addresses from that subwallet:
    $ mmgen-addrgen --type=bech32 --subwallet=5S bogus.mmwords 1-10
    ...
    Addresses written to file '30D66FF5-B[1-10].addrs'

    # Same as above, but generate secret keys too:
    $ mmgen-keygen --type=bech32 --subwallet=5S bogus.mmwords 1-10
    ...
    Secret keys written to file '30D66FF5-B[1-10].akeys'
2019-05-14 13:45:53 +03:00
ab8b5d053e
modularize unit_tests.py 2019-05-14 10:42:06 +03:00
eca3007ed1
implement --fast option for unit tests 2019-05-13 12:21:01 +03:00
338cb77199
obj.py,eth/obj.py,protocol.py: exception handling cleanups 2019-05-13 11:49:35 +03:00
0bb1b3f73d
obj.py: make arg_chk a classmethod 2019-05-12 17:40:24 +03:00
7538a9460e
Subwallets, Part 1: basic framework and subwallet generation
Beginning with this commit, every MMGen wallet now has a two sets of associated
subwallets with “long“ and “short” seeds.

MMGen wallets and subwallets are functionally equivalent and externally
indistinguishable.  This has benefits, especially for real-world security, as
well as drawbacks.  For more information, see the `mmgen-subwalletgen` help
screen: https://github.com/mmgen/mmgen/wiki/subwalletgen-[MMGen-command-help]

This patch provides subwallet generation functionality and subseed display
utilities.  Support for transaction signing and address generation using a
subwallet's parent wallet will be added in a forthcoming patch.

Examples:

    # Create a bogus wallet in mnemonic format for testing purposes:
    $ echo $(yes bee | head -n24) > bogus.mmwords

    # List the wallet's first five subseed pairs:
    $ mmgen-tool list_subseeds 1-5 wallet=bogus.mmwords
    Parent Seed: DF449DA4 (256 bits)

     Long Subseeds     Short Subseeds
     -------------     --------------
      1L: FC9A8735       1S: 930E1AD5
      2L: 62B02F54       2S: DF14AB49
      3L: 9E884E99       3S: AD3ABD98
      4L: DB595AE1       4S: 3E885EC4
      5L: 36D5A0D1       5S: 30D66FF5

    # Generate the 5th short (128-bit) subwallet from the wallet:
    $ mmgen-subwalletgen bogus.mmwords 5S

    # Same as above, but output subwallet to mnemonic (seed phrase) format:
    $ mmgen-subwalletgen -o mn bogus.mmwords 5S
    ...
    Mnemonic data written to file '30D66FF5[128].mmwords'

    # View the subwallet's seed phrase:
    $ cat 30D66FF5[128].mmwords
    object capture field heart page observe road bond mother loser really army

    # Generate 10 addresses from the subwallet seed phrase:
    $ mmgen-addrgen 30D66FF5[128].mmwords 1-10
    ...
    Addresses written to file '30D66FF5[1-10].addrs'
2019-05-12 15:29:38 +03:00
2f274cba2d
new class: MMGenRange()
from mmgen.obj import MMGenRange
    r = MMGenRange('1-5') # initialize with string
    r2 = MMGenRange(1,5)  # or with integers
    assert r == r2
    assert r == (1,5)
    assert r.first == 1
    assert r.last == 5
    assert r.items == [1,2,3,4,5]

    r = MMGenRange('22') # initialize range of one item
    r2 = MMGenRange(22,22)
    assert r == r2

    r = MMGenRange('1-1000000') # memory-frugal iteration
    for n in r.iterate(): print(n)
2019-05-12 12:26:41 +03:00
3a09017804
various minor fixes and cleanups 2019-05-12 11:54:03 +03:00
11b04d4d9d
make Seed() attrs immutable 2019-05-07 13:00:36 +03:00
d558822941
autosign: print summary of non-MMGen output addresses and amounts
To allow the user to verify that transaction outputs have not been altered
by a compromised online MMGen installation, print a list of non-MMGen output
addresses and amounts for all signed transactions after every autosign run.

With --full-summary, print a full view of each signed transaction instead.
2019-04-24 17:39:22 +03:00
4a2cc07ef1
relocate test-release.sh script to test directory 2019-04-19 17:37:32 +03:00