what made the success of Electrum is the ability to restore from seed
not saying it's bad, but bitcoin cannot exist if all users use these types of services. it makes bitcoin unstable, the consequence of hacks are bigger
1 ~/electrum/electrum$ cat *.py | wc -l
2 31081
3 ~/electrum/electrum$ cat ln*.py channel_db.py | wc -l
4 7844
1 ~/electrum/electrum$ ls *.py
2 address_synchronizer.py json_db.py paymentrequest_pb2.py
3 base_crash_reporter.py keystore.py paymentrequest.py
4 base_wizard.py lnaddr.py pem.py
5 bip32.py lnchannel.py plot.py
6 bitcoin.py lnhtlc.py plugin.py
7 blockchain.py lnmsg.py qrscanner.py
8 channel_db.py lnonion.py ripemd.py
9 coinchooser.py lnpeer.py rsakey.py
10 commands.py lnrouter.py segwit_addr.py
11 constants.py lnsweep.py simple_config.py
12 contacts.py lntransport.py sql_db.py
13 crypto.py lnutil.py storage.py
14 daemon.py lnverifier.py synchronizer.py
15 dnssec.py lnwatcher.py transaction.py
16 ecc_fast.py lnworker.py util.py
17 ecc.py logging.py verifier.py
18 exchange_rate.py mnemonic.py version.py
19 i18n.py msqr.py wallet.py
20 __init__.py network.py x509.py
21 interface.py old_mnemonic.py
similar to eclair
- to_local : after CSV
- to_remote : for them
- sent HTLCs : htlctx -> after CSV
- received HTLCs : if preimage then htlctx -> after CSV
- to_local : for them
- to_remote : for us
- sent HTLCs : we need preimagee
- received HTLCs : after CLTV
- to_local : before CSV
- to_remote : for us
- sent HTLCs:
- unspent : for us
- spent : before CSV
- received HTLCs:
- unspent : for us
- spent : before CSV
1 ./electrum/tests/regtest/start_bitcoind.sh
2 ./electrum/tests/regtest/start_electrumx.sh
3 bitcoin_cli="bitcoin-cli -rpcuser=doggman -rpcpassword=donkey -rpcport=18554 -regtest"
1 alice="./run_electrum --regtest -D /tmp/alice"
2 bob="./run_electrum --regtest -D /tmp/bob"
3 $alice -o create
4 $alice -o init_lightning
5 $bob -o create
6 $bob -o init_lightning
7 $bob -o setconfig lightning_listen localhost:9735
8 # fund Bob and mine a block
9 $bitcoin_cli sendtoaddress $($bob -o getunusedaddress) 1
10 $bitcoin_cli generatetoaddress 1 $($bitcoin_cli getnewaddress)
1 $bob daemon --server 127.0.0.1:51001:t -d
2 $bob load_wallet
3 $alice daemon --server 127.0.0.1:51001:t -d
4 $alice load_wallet
1 bob_node=$($bob nodeid)
2 channel=$($alice open_channel $bob_node 0.15)
3 # mine a few blocks
4 $bitcoin_cli generatetoaddress 3 $($bitcoin_cli getnewaddress)
1 request=$($bob add_lightning_request 0.01 -m "test")
2 $alice lnpay $request
1 ctx=$($alice get_channel_ctx $channel | jq '.hex' | tr -d '"')
1 request2=$($alice add_lightning_request 0.01 -m "test2")
2 $alice lnpay $request2
1 $bitcoin_cli sendrawtransaction $ctx
1 python3 -m unittest electrum.tests.regtest.TestLightning.test_breach
1 carol="./run_electrum --regtest -D /tmp/carol"
2 $carol -o create
3 $carol setconfig -o watchtower_host 127.0.0.1
4 $carol setconfig -o watchtower_port 12345
5 $alice setconfig -o watchtower_url http://127.0.0.1:12345
6 $carol daemon --server 127.0.0.1:51001:t -d
Table of Contents | t |
---|---|
Exposé | ESC |
Full screen slides | e |
Presenter View | p |
Source Files | s |
Slide Numbers | n |
Toggle screen blanking | b |
Show/hide slide context | c |
Notes | 2 |
Help | h |