PGP: 6694 D8DE 7BE8 EE56 31BE D950 2BD5 824B 7F94 70E6
what made the success of Electrum is the ability to restore from seed
show vascular image
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
gui, cli, passes tests
1 $bitcoin_cli generatetoaddress 1 $($bitcoin_cli getnewaddress)
2 $lncli getinfo
1 git clone [email protected]:spesmilo/electrum.git
2 cd electrum
3 git checkout lightning
1 alice="./run_electrum --regtest --lightning -D /tmp/alice"
2 $alice create
3 $bitcoin_cli sendtoaddress $($alice getunusedaddress) 1
4 $alice --server 127.0.0.1:51001:t
1 bob="./run_electrum --regtest --lightning -D /tmp/bob"
2 $bob create
3 $bitcoin_cli sendtoaddress $($bob getunusedaddress) 1
4 $bob --server 127.0.0.1:51001:t
alice opens channel, pays bob.
lightning dialog, closure, force closure
- 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 rm -rf /tmp/alice/ /tmp/bob/ /tmp/carol
2 $alice create > /dev/null
3 $bob create > /dev/null
4 $carol create > /dev/null
1 $bob setconfig lightning_listen localhost:9735
1 $carol setconfig watchtower_host 127.0.0.1
2 $carol setconfig watchtower_port 12345
1 $alice setconfig watchtower_url http://127.0.0.1:12345
2 $bitcoin_cli sendtoaddress $($alice getunusedaddress) 1
1 $alice daemon start --server 127.0.0.1:51001:t
2 $alice daemon load_wallet
3 $bob daemon start --server 127.0.0.1:51001:t
4 $bob daemon load_wallet
5
6 $carol daemon --server 127.0.0.1:51001:t -v
1 bob_node=$($bob nodeid)
2 $alice open_channel $bob_node 0.15
3 # mine a few blocks
4 $bitcoin_cli generatetoaddress 3 $($bitcoin_cli getnewaddress)
1 request=$($bob addinvoice 0.05 "test")
2 $alice lnpay $request
1 channel=$($bob list_channels|jq '.[] | .channel_point' | tr -d '"')
2 ctx=$($bob get_channel_ctx $channel | jq '.hex' | tr -d '"')
1 request=$($alice addinvoice 0.03 "test2")
2 $bob lnpay $request
1 $alice daemon stop
2 $bitcoin_cli sendrawtransaction $ctx
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 |