- create a compact JSON dump of the MMGen tracking wallet with `twexport`
- recreate a working tracking wallet with updated balances from the dump in
just a few minutes with `twimport`
- the import operation leverages the `scantxoutset` RPC call to selectively
rescan only required blocks, reducing block rescan time to typically just
a few seconds
- to recover historical transactions for viewing with `mmgen-tool txhist`,
a full blockchain rescan may be performed on the recreated wallet using
`mmgen-tool rescan_blockchain`
- supported coins: BTC, BCH, LTC
Display nicely formatted info about all transactions known to the tracking
wallet.
Interactive mode presents the user with an interface similar to `mmgen-tool
twview` or `mmgen-txcreate -i`, providing various sort, filter, column format
and printing options.
`--coin=ltc` and `--coin=bch` are also supported. Use of `--rpc-backend=aio`
speeds up operation significantly under Linux.
Usage examples:
# Non-interactive mode, tabular output:
$ mmgen-tool txhist
# Non-interactive mode, full output:
$ mmgen-tool txhist detail=1
# Show only transactions newer than 100000 blocks from chain tip:
$ mmgen-tool txhist sinceblock=-100000
# Interactive mode:
$ mmgen-tool txhist interactive=1
Testing/demo:
$ test/test.py -n -X bob_txhist1 regtest
$ test/test.py -Se regtest:bob_txhist1
$ test/test.py -Se regtest:bob_txhist2
$ test/test.py -Se regtest:bob_txhist3
$ test/test.py -Se regtest:bob_txhist4
$ test/test.py -Se regtest:bob_txhist_interactive
The Requests library honors the *_PROXY environment variables by default
(a dangerous and insecure policy in the opinion of the MMGen Project).
Thus if the user had one of these variables set and explicitly requested the
`requests` backend via the `--rpc-backend` option, JSON-RPC communications
would have gone over the configured proxy.
Only the `mmgen-xmrwallet` command uses `requests` as its default backend,
so only it was affected by this vulnerability in the default configuration,
i.e. without use of `--rpc-backend`.
This patch sets `trust_env=False` to disable the dangerous behavior.