481bc13e52
UserOpts: set _default_to_none to True
2022-01-20 12:04:52 +00:00
b79865dba4
AttrCtrl: add _default_to_none flag
2022-01-20 12:04:51 +00:00
523a8cc5c3
replace global variable 'subseeds' with SubSeedList.dfl_len
2022-01-19 11:43:53 +00:00
54e9799989
test suite: minor cleanups
2022-01-19 11:43:52 +00:00
b46cbd1ddd
replace global variables 'seed_lens' and 'dfl_seed_len'
...
- g.seed_lens -> Seed.lens
- g.dfl_seed_len -> Seed.dfl_lens
2022-01-19 11:43:52 +00:00
b995cbf71e
permit execution of tests with optimization set
...
- all tests except object tests now run with PYTHONOPTIMIZE=2
2022-01-19 11:43:52 +00:00
6b3ea8b251
permit execution of scripts with docstrings removed
...
- scripts now run with PYTHONOPTIMIZE=2, though PYTHONOPTIMIZE should never be
set in a production environment
2022-01-19 11:43:51 +00:00
3fa644b35b
remove two more assert statements with side-effects
...
- these were overlooked in e7d531db0
- scripts now run with PYTHONOPTIMIZE=1, though this should never be set
in a production environment
2022-01-19 11:43:51 +00:00
69f8d7d2fe
whitespace, cleanups (minor)
2022-01-19 11:43:50 +00:00
67067aa7d5
baseconv: set constants in initializer
2022-01-18 09:11:00 +00:00
e7d531db07
remove assert statements that affect branching
...
- assert statements are still used throughout the MMGen code base for essential
checks, so use of PYTHONOPTIMIZE will lead to failures.
2022-01-18 09:11:00 +00:00
20a0ac03fc
wallet.Mnemonic: remove redundant pad calculation code
2022-01-18 09:11:00 +00:00
3dde478ebd
tooltest2.py: use mnemonic vectors from unit tests
2022-01-18 09:10:59 +00:00
83859767aa
gentest.py: cleanups, improve arg parsing and data caching
2022-01-18 09:10:59 +00:00
d6f82fb6c9
baseconv: move Monero mnemonic code to new xmrseed class
...
- a new unit test has also been added
Testing:
$ test/unit_tests.py mn_entry xmrseed
$ test/tooltest2.py hex2mn mn2hex
$ test/test.py ref ref3_addr
2022-01-18 09:10:59 +00:00
786a10c937
baseconv: disable Tirosh wordlist, minor cleanups in tool.py
2022-01-18 09:10:58 +00:00
7b890a2c95
baseconv.py: convert class methods to instance methods
2022-01-18 09:10:58 +00:00
4496f795d7
bip39.py: cleanups
2022-01-18 09:10:58 +00:00
16dff263a9
move BIP39 wordlist to mn_bip39.py
2022-01-18 09:10:57 +00:00
85941cb6e4
minor help notes cleanups
2022-01-18 09:10:57 +00:00
32c522c039
overhaul public key and address generation code
...
- pubkey generation code has been rewritten and moved from addr.py to
keygen.py
- address generation code has been rewritten and moved from addr.py to
addrgen.py
- keygen/addrgen classes now present a consistent API across all pubkey and
address types
- key/address operations and related data objects now use bytes internally
instead of hex strings
- pubkey generator backends are now selected using the `--keygen-backend`
option
- for Monero pubkeys, the new `nacl` backend has replaced `ed25519ll_djbec`
as the default
- a minimal unit test has been added
Examples:
# Generate a random Monero keypair using the unoptimized 'ed25519' backend:
$ mmgen-tool --coin=xmr --keygen-backend=3 randpair
# Generate an LTC Bech32 address list from the default wallet using the
# 'python-ecdsa' backend:
$ mmgen-addrgen --coin=ltc --type=bech32 --keygen-backend=2 1-10
Testing:
# Run the minimal unit test:
$ test/unit_tests_py gen
# Compare BTC Segwit addresses from default 'libsecp256k1' backend to
# 'pycoin' library, with edge cases and 10,000 random rounds:
$ test/gentest.py --type=segwit 1:pycoin 10000
# Test all configured Monero backends against 'moneropy', with edge cases
# and 10 random rounds:
$ test/gentest.py --coin=xmr all:moneropy 10
# Test the 'nacl' and 'ed25519ll_djbec' backends against each other, with
# edge cases and 1000 random rounds:
$ test/gentest.py --coin=xmr 1:2 1000
# Test the speed of the Monero 'nacl' backend using 10,000 rounds:
$ test/gentest.py --coin=xmr 1 10000
# Same for Zcash:
$ test/gentest.py --coin=zec --type=zcash_z 1 10000
2022-01-15 14:00:12 +00:00
2807c628ee
ed25519.py: whitespace fixes
2022-01-15 14:00:11 +00:00
7cb44abd78
minor fixes and cleanups
2022-01-15 14:00:11 +00:00
b43d827b50
rewrite test/gentest.py utility
...
- support for testing all configured generators in one go has also been added
(via the 'all' subparameter)
2022-01-15 14:00:11 +00:00
3799411071
test.py, gendiff.py: minor fixes
2022-01-15 14:00:10 +00:00
2bbf186de5
obj.py: cleanups
2022-01-15 14:00:10 +00:00
d08503129e
obj.py: move TwLabel and TwMMGenID to tw.py
2022-01-15 14:00:10 +00:00
126a09d57d
obj.py: move MMGenAddrType and other address-related data objects to addr.py
2022-01-15 14:00:09 +00:00
0138a6fa49
whitespace, cleanups, minor fixes
2022-01-15 14:00:09 +00:00
16d7e73fe1
move IPPort to rpc.py
2022-01-15 14:00:09 +00:00
8d957a15dd
new get_keccak() function to select internal keccak_256 module
2022-01-15 14:00:08 +00:00
545406aea4
addr.py: move PubKey and PrivKey to key.py
2022-01-15 14:00:08 +00:00
e0352568db
addr.py: move AddrList and related classes to addrlist.py
...
- also move PasswordList to passwdlist.py
- add a minimal unit test
Testing:
$ test/unit_tests.py addrlist
2022-01-15 14:00:08 +00:00
5961d1c36d
addr.py: move AddrData and TwAddrData classes to addrdata.py
2022-01-15 14:00:08 +00:00
012fea543f
addr.py: move address file-related methods to new AddrFile class
...
- AddrFile subclasses: KeyAddrFile,KeyFile,PasswordFile
2022-01-15 14:00:07 +00:00
74ec5efd63
move Hilite,InitErrors to objmethods.py
2022-01-15 14:00:07 +00:00
b877e865bb
move AsyncInit to base_obj.py
2022-01-15 14:00:07 +00:00
d669229da0
move CoinAmt and related classes to amt.py
2022-01-15 14:00:06 +00:00
4bb1b1533a
move SeedID class to seed.py
2022-01-15 14:00:06 +00:00
b3d7f23440
seed.py: move subseed-related classes to subseed.py
...
- for increased efficiency, Seed() now loads subseeds on demand
2022-01-15 14:00:06 +00:00
ff450b0ec5
seed.py: move seedsplit related classes to seedsplit.py
2022-01-15 14:00:05 +00:00
e250492baa
update documentation from wiki
2022-01-08 10:37:35 +00:00
1559532192
add v13.0.2 release notes
2022-01-08 10:37:07 +00:00
c53c9d2c25
led.py: update deprecated Event method
2022-01-06 20:25:33 +00:00
15414aa378
run_session(): minor code cleanup
2022-01-06 20:24:23 +00:00
c4cad63a4e
rpc.py, test suite: close files and sockets properly
2022-01-06 20:24:22 +00:00
6e0519dc12
led.py, test.py autosign: improve LED simulation code
2022-01-06 20:24:22 +00:00
a7422d11c0
whitespace changes
2022-01-06 20:24:22 +00:00
0880229e94
use open() strictly as context manager
2022-01-06 20:24:21 +00:00
1f5ef587dd
util.py: open_file_or_exit() -> open_or_die()
2022-01-06 20:24:21 +00:00