mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-04-08 20:28:04 +02:00
scripts+bw-compatibility-test: run and update Dave with sqlite
This commit is contained in:
parent
be2bab90ce
commit
a427a872a0
scripts/bw-compatibility-test
@ -3,6 +3,7 @@ services:
|
||||
build:
|
||||
context: ../../
|
||||
dockerfile: dev.Dockerfile
|
||||
image: lnd-dev:backward-compat-test-build
|
||||
container_name: bob-pr
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
@ -40,4 +41,47 @@ services:
|
||||
--protocol.option-scid-alias
|
||||
--protocol.zero-conf
|
||||
--protocol.simple-taproot-chans
|
||||
--trickledelay=50
|
||||
--trickledelay=50
|
||||
|
||||
dave-pr:
|
||||
image: lnd-dev:backward-compat-test-build
|
||||
container_name: dave-pr
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- 10014:10009
|
||||
- 9744:9735
|
||||
- 8094:8080
|
||||
networks:
|
||||
regtest:
|
||||
aliases:
|
||||
- dave
|
||||
volumes:
|
||||
- "dave:/root/.lnd"
|
||||
depends_on:
|
||||
- bitcoind
|
||||
command: >
|
||||
lnd
|
||||
--logdir=/root/.lnd
|
||||
--alias=dave
|
||||
--rpclisten=0.0.0.0:10009
|
||||
--restlisten=0.0.0.0:8080
|
||||
--color=#cccccc
|
||||
--noseedbackup
|
||||
--bitcoin.active
|
||||
--bitcoin.regtest
|
||||
--bitcoin.node=bitcoind
|
||||
--bitcoind.rpchost=bitcoind
|
||||
--bitcoind.rpcuser=lightning
|
||||
--bitcoind.rpcpass=lightning
|
||||
--bitcoind.zmqpubrawblock=tcp://bitcoind:28332
|
||||
--bitcoind.zmqpubrawtx=tcp://bitcoind:28333
|
||||
--debuglevel=debug
|
||||
--externalip=dave
|
||||
--tlsextradomain=dave
|
||||
--accept-keysend
|
||||
--protocol.option-scid-alias
|
||||
--protocol.zero-conf
|
||||
--protocol.simple-taproot-chans
|
||||
--trickledelay=50
|
||||
--db.backend=sqlite
|
||||
--db.use-native-sql
|
||||
|
@ -185,6 +185,8 @@ services:
|
||||
- "--tlsextradomain=dave"
|
||||
- "--accept-keysend"
|
||||
- "--trickledelay=50"
|
||||
- "--db.backend=sqlite"
|
||||
- "--db.use-native-sql"
|
||||
|
||||
networks:
|
||||
regtest:
|
||||
|
@ -5,28 +5,35 @@ DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
|
||||
source "$DIR/.env"
|
||||
|
||||
# Global variable to keep track of which Bob container to use.
|
||||
# Once Bob is upgraded to the PR version, this variable must
|
||||
# be updated to 'bob-pr'.
|
||||
# Global variables to keep track of which Bob and Dave container
|
||||
# to use. Once Bob and Dave is upgraded to the PR version, this
|
||||
# variable must be updated to 'bob-pr' and 'dave-pr` respectively.
|
||||
BOB=bob
|
||||
DAVE=dave
|
||||
|
||||
# upgrade_bob shuts down the stable Bob container, upgrades the
|
||||
# compose variables to use the PR version of Bob, rebuilds the
|
||||
# Bob container, and starts the PR version of Bob.
|
||||
function upgrade_bob() {
|
||||
# Shutdown Bob.
|
||||
compose_stop bob
|
||||
# upgrade_node shuts down the stable container for a node (currently
|
||||
# Bob or Dave), upgrades the compose variables, rebuilds the PR version,
|
||||
# and starts it.
|
||||
function upgrade_node() {
|
||||
local node="$1"
|
||||
local pr="${node}-pr"
|
||||
local var_name="$(echo "$node" | tr '[:lower:]' '[:upper:]')"
|
||||
|
||||
# Upgrade the compose variables so that the Bob configuration
|
||||
# Shutdown the stable node.
|
||||
compose_stop "$node"
|
||||
|
||||
# Upgrade the compose variables so that the node configuration
|
||||
# is swapped out for the PR version.
|
||||
compose_upgrade
|
||||
export BOB=bob-pr
|
||||
|
||||
# Force the rebuild of the Bob container.
|
||||
compose_rebuild bob-pr
|
||||
# Export the PR version of the node.
|
||||
export "$var_name"="$pr"
|
||||
|
||||
# This should now start with the new version of Bob.
|
||||
compose_start bob-pr
|
||||
# Force the rebuild of the PR version of the container.
|
||||
compose_rebuild "$pr"
|
||||
|
||||
# This should now start the PR version of the node.
|
||||
compose_start "$pr"
|
||||
}
|
||||
|
||||
# wait_for_nodes waits for all the nodes in the argument list to
|
||||
@ -333,5 +340,10 @@ function charlie() {
|
||||
}
|
||||
|
||||
function dave() {
|
||||
docker exec -i dave lncli --network regtest "$@"
|
||||
docker exec -i "$DAVE" lncli --network regtest "$@"
|
||||
}
|
||||
|
||||
function dave-pr() {
|
||||
docker exec -i dave-pr lncli --network regtest "$@"
|
||||
}
|
||||
|
||||
|
@ -36,7 +36,7 @@ send_payment alice dave
|
||||
|
||||
# Upgrade the compose variables so that the Bob configuration
|
||||
# is swapped out for the PR version.
|
||||
upgrade_bob
|
||||
upgrade_node bob
|
||||
|
||||
# Wait for Bob to start.
|
||||
wait_for_node bob
|
||||
@ -50,4 +50,19 @@ send_payment bob dave
|
||||
send_payment dave bob
|
||||
send_payment alice dave
|
||||
|
||||
# Upgrade the compose variables so that the Dave configuration
|
||||
# is swapped out for the PR version.
|
||||
upgrade_node dave
|
||||
|
||||
wait_for_node dave
|
||||
wait_for_active_chans dave 1
|
||||
|
||||
# Show that Dave is now running the current branch.
|
||||
do_for print_version dave
|
||||
|
||||
# Repeat the basic tests (after potential migraton).
|
||||
send_payment bob dave
|
||||
send_payment dave bob
|
||||
send_payment alice dave
|
||||
|
||||
echo "🛡️⚔️🫡 Backwards compatibility test passed! 🫡⚔️🛡️"
|
||||
|
Loading…
x
Reference in New Issue
Block a user