Closed zoedberg closed 4 years ago
I am bit confused with some changes, which diverge this file from the one we have for the mainnet. Can you pls explain rationale, and probably we will need to update mainnet compose after?
I've made the minimum changes in order to get all the services working on testnet (except for LIGHTNING_NETWORK_FLAG
value, that was already ok but I've changed it because it's the documented way).
I think that the mainnet compose was already in need of some fixes, but if you think that before my changes it was working, let's have a chat about it
Here is my setup: using the latest master from GitHub and running compose files:
orlovsky@pandora:/usr/local/src/docker$ git status
On branch master
Your branch is up to date with 'origin/master'.
nothing to commit, working tree clean
orlovsky@pandora:/usr/local/src/docker$ git fetch origin
orlovsky@pandora:/usr/local/src/docker$ cd docker-compose/mainnet/
orlovsky@pandora:/usr/local/src/docker/docker-compose/mainnet$ docker-compose ps
Name Command State Ports
--------------------------------------------------------------------------------------------------------------------------------------------------------
bitcoind-mainnet /bin/bash -c bitcoind -txi ... Up 18332/tcp, 18333/tcp, 18443/tcp, 18444/tcp, 0.0.0.0:8332->8332/tcp, 0.0.0.0:8333->8333/tcp
electrs-mainnet /bin/bash -c /usr/local/bi ... Up 4222/tcp, 4223/tcp, 0.0.0.0:4224->4224/tcp, 0.0.0.0:50001->50001/tcp, 60001/tcp, 60002/tcp
elementsd-liquidv1 /usr/local/bin/entrypoint ... Up 0.0.0.0:7041->7041/tcp, 0.0.0.0:7042->7042/tcp
lightningd-mainnet /bin/bash -c lightningd $L ... Up 0.0.0.0:9735->9735/tcp, 9835/tcp
orlovsky@pandora:/usr/local/src/docker/docker-compose/mainnet$ cd ../signet/
orlovsky@pandora:/usr/local/src/docker/docker-compose/signet$ docker-compose ps
Name Command State Ports
---------------------------------------------------------------------------------------------------------------
bitcoind-signet /bin/bash -c bitcoind -txi ... Up 0.0.0.0:38332->38332/tcp, 0.0.0.0:38333->38333/tcp
electrs-signet /bin/bash -c /usr/local/bi ... Up 0.0.0.0:34224->34224/tcp, 0.0.0.0:60601->60601/tcp
lightningd-signet /bin/bash -c lightningd $L ... Up 0.0.0.0:39735->9735/tcp, 9835/tcp
orlovsky@pandora:/usr/local/src/docker/docker-compose/signet$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
f24b49cb205d lnpbp/electrs:latest "/bin/bash -c '/usr/…" 4 days ago Up 7 minutes 0.0.0.0:4224->4224/tcp, 4222-4223/tcp, 60001-60002/tcp, 0.0.0.0:50001->50001/tcp electrs-mainnet
f16344761f57 lnpbp/lightningd:signet "/bin/bash -c 'light…" 4 days ago Up 7 minutes 9835/tcp, 0.0.0.0:39735->9735/tcp lightningd-signet
a60d8762888c lnpbp/elementsd:latest "/usr/local/bin/entr…" 4 days ago Up 7 minutes 0.0.0.0:7041-7042->7041-7042/tcp elementsd-liquidv1
fdfb02846fcf lnpbp/electrs:signet "/bin/bash -c '/usr/…" 4 days ago Up 7 minutes 0.0.0.0:34224->34224/tcp, 0.0.0.0:60601->60601/tcp electrs-signet
55afc1bc405e lnpbp/bitcoind:signet "/bin/bash -c 'bitco…" 4 days ago Up 7 minutes 0.0.0.0:38332-38333->38332-38333/tcp bitcoind-signet
9d05b63cc9eb lnpbp/lightningd:latest "/bin/bash -c 'light…" 4 days ago Up 28 seconds 0.0.0.0:9735->9735/tcp, 9835/tcp lightningd-mainnet
0526b717a1c9 lnpbp/bitcoind:latest "/bin/bash -c 'bitco…" 4 days ago Up 7 minutes 18332-18333/tcp, 0.0.0.0:8332-8333->8332-8333/tcp, 18443-18444/tcp bitcoind-mainnet
orlovsky@pandora:/usr/local/src/docker/docker-compose/signet$ cat ~/.bash_aliases
#!/bin/bash
alias bitcoin-cli='docker exec bitcoind-mainnet bitcoin-cli -rpcpassword=bitcoin -rpcuser=bitcoin'
alias lightning-cli='docker exec lightningd-mainnet lightning-cli --mainnet --lightning-dir /var/lib/lightningd'
alias liquid-cli='docker exec elementsd-liquidv1 elements-cli -chain=liquidv1 -rpccookiefile=/var/lib/elementsd/liquidv1/.cookie'
alias signet-cli='docker exec bitcoind-signet bitcoin-cli --signet -rpcpassword=bitcoin -rpcuser=bitcoin'
alias sightning-cli='docker exec lightningd-signet lightning-cli --signet --lightning-dir /var/lib/lightningd'
orlovsky@pandora:/usr/local/src/docker/docker-compose/signet$ lightning-cli getinfo
{
"id": "0341ec8fb266ebcacde1a2b68bfa59fd22fcce36cc04f3e6685234f0d09e6f5b73",
"alias": "ANGRYGLEE",
"color": "0341ec",
"num_peers": 0,
"num_pending_channels": 0,
"num_active_channels": 0,
"num_inactive_channels": 0,
"address": [],
"binding": [
{
"type": "ipv6",
"address": "::",
"port": 9735
},
{
"type": "ipv4",
"address": "0.0.0.0",
"port": 9735
}
],
"version": "v0.9.1",
"blockheight": 649653,
"network": "bitcoin",
"msatoshi_fees_collected": 0,
"fees_collected_msat": "0msat",
"lightning-dir": "/var/lib/lightningd/bitcoin"
}
orlovsky@pandora:/usr/local/src/docker/docker-compose/signet$ sightning-cli getinfo
{
"id": "03787bddbba4bbae8133a164fa6db5de0f267e9bffe96695bc1e1c47a7b8e3d4ff",
"alias": "ORANGESEAGULL",
"color": "03787b",
"num_peers": 1,
"num_pending_channels": 0,
"num_active_channels": 1,
"num_inactive_channels": 0,
"address": [],
"binding": [
{
"type": "ipv6",
"address": "::",
"port": 9735
},
{
"type": "ipv4",
"address": "0.0.0.0",
"port": 9735
}
],
"version": "v0.9.1-modded",
"blockheight": 4529,
"network": "signet",
"msatoshi_fees_collected": 0,
"fees_collected_msat": "0msat",
"lightning-dir": "/var/lib/lightningd/signet"
}
orlovsky@pandora:/usr/local/src/docker/docker-compose/signet$ sightning-cli listpeers
{
"peers": [
{
"id": "03b52d411e1f301e379df62d9730f93da77b5165b92d54e7a6498b71e1caf240ee",
"connected": true,
"netaddr": [
"[::ffff:84.227.80.57]:62296"
],
"features": "02aaa2",
"channels": [
{
"state": "CHANNELD_NORMAL",
"scratch_txid": "3dba4def82c9faa58a51306db1dd139e2af13c26cd984d8ce8b9a90da6744ee8",
"owner": "channeld",
"short_channel_id": "3939x1x0",
"direction": 0,
"channel_id": "fd2e4a4f2369fa342deb069810f1ee2b88d859d3f382a55738fa8453b5b11c4f",
"funding_txid": "4f1cb1b55384fa3857a582f3d359d8882beef1109806eb2d34fa69234f4a2efd",
"close_to_addr": "tb1qkyt3rwngtt2gy9exmytv0udczq4uzu2kmhdrmm",
"close_to": "0014b11711ba685ad4821726d916c7f1b8102bc17156",
"private": false,
"features": [
"option_static_remotekey"
],
"funding_allocation_msat": {
"03787bddbba4bbae8133a164fa6db5de0f267e9bffe96695bc1e1c47a7b8e3d4ff": 0,
"03b52d411e1f301e379df62d9730f93da77b5165b92d54e7a6498b71e1caf240ee": 1000000000
},
"funding_msat": {
"03787bddbba4bbae8133a164fa6db5de0f267e9bffe96695bc1e1c47a7b8e3d4ff": "0msat",
"03b52d411e1f301e379df62d9730f93da77b5165b92d54e7a6498b71e1caf240ee": "1000000000msat"
},
"msatoshi_to_us": 0,
"to_us_msat": "0msat",
"msatoshi_to_us_min": 0,
"min_to_us_msat": "0msat",
"msatoshi_to_us_max": 0,
"max_to_us_msat": "0msat",
"msatoshi_total": 1000000000,
"total_msat": "1000000000msat",
"dust_limit_satoshis": 546,
"dust_limit_msat": "546000msat",
"max_htlc_value_in_flight_msat": 18446744073709551615,
"max_total_htlc_in_msat": "18446744073709551615msat",
"their_channel_reserve_satoshis": 10000,
"their_reserve_msat": "10000000msat",
"our_channel_reserve_satoshis": 10000,
"our_reserve_msat": "10000000msat",
"spendable_msatoshi": 0,
"spendable_msat": "0msat",
"receivable_msatoshi": 989460000,
"receivable_msat": "989460000msat",
"htlc_minimum_msat": 0,
"minimum_htlc_in_msat": "0msat",
"their_to_self_delay": 6,
"our_to_self_delay": 6,
"max_accepted_htlcs": 483,
"status": [
"CHANNELD_NORMAL:Reconnected, and reestablished.",
"CHANNELD_NORMAL:Funding transaction locked. Channel announced."
],
"in_payments_offered": 0,
"in_msatoshi_offered": 0,
"in_offered_msat": "0msat",
"in_payments_fulfilled": 0,
"in_msatoshi_fulfilled": 0,
"in_fulfilled_msat": "0msat",
"out_payments_offered": 0,
"out_msatoshi_offered": 0,
"out_offered_msat": "0msat",
"out_payments_fulfilled": 0,
"out_msatoshi_fulfilled": 0,
"out_fulfilled_msat": "0msat",
"htlcs": []
}
]
}
]
}
@zoedberg What I propose is to minimize changes in this commit such that we need no changes to mainnet/signet or Docker container republication, then agree onto design principles in #19 and do the rest of changes as a part of #20
Here is my setup: using the latest master from GitHub and running compose files:
Sorry for insisting, but I believe you're not running what you think. I'm pretty sure it can't work correctly with the code in master
.
A git fetch
is not enough to make sure that you're running the latest code. A more thorough test would include rebuilding and restarting the whole stack, so please go to /usr/local/src/docker/docker-compose/mainnet
and then run:
docker-compose build
docker-compose down
docker-compose up
Sorry Zoe, I read through the docs and in most cases here you were right. I did my own take on docker refactoring with this PR and I will update your testnet work to match the new builds: https://github.com/LNP-BP/docker/pull/21/files
Don't worry, I'm happy that we now agree :) I'll soon add info/suggestions to #19 so we can reach the desired design
closes #14