From 8911f338106b97cee5a0844ed7e6e6d5db514902 Mon Sep 17 00:00:00 2001 From: lesterli Date: Fri, 18 Oct 2024 15:52:31 +0800 Subject: [PATCH 1/4] feat: add a ci workflow to publish the bitcoinsim image --- .github/workflows/publish.yml | 16 ++++++++++++++++ contrib/images/bitcoindsim/wrapper.sh | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 00000000..77648aa7 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,16 @@ +name: docker_publish + +on: + push: + paths: + - 'contrib/images/bitcoindsim/**' + +jobs: + docker_pipeline: + needs: [] + uses: babylonlabs-io/.github/.github/workflows/reusable_docker_pipeline.yml@v0.7.0 + secrets: inherit + with: + publish: true + dockerfile: ./contrib/images/bitcoindsim/Dockerfile + repoName: bitcoindsim \ No newline at end of file diff --git a/contrib/images/bitcoindsim/wrapper.sh b/contrib/images/bitcoindsim/wrapper.sh index 75836921..65ad7a1a 100755 --- a/contrib/images/bitcoindsim/wrapper.sh +++ b/contrib/images/bitcoindsim/wrapper.sh @@ -23,7 +23,7 @@ if [[ ! -d "$BITCOIN_DATA" ]]; then fi echo "Generating bitcoin.conf file at $BITCOIN_CONF" if [[ "$BITCOIN_NETWORK" == "testnet" ]]; then - NETWORK_LABEL="test" + NETWORK_LABEL="test" # Testnet3 else NETWORK_LABEL="$BITCOIN_NETWORK" fi From 60064028146f6704f499a655720e3c91f9038486 Mon Sep 17 00:00:00 2001 From: lesterli Date: Fri, 18 Oct 2024 15:53:11 +0800 Subject: [PATCH 2/4] fix: typo --- deployments/finality-gadget-integration-op-l2/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deployments/finality-gadget-integration-op-l2/Makefile b/deployments/finality-gadget-integration-op-l2/Makefile index 8f68a4e0..e8a2de51 100644 --- a/deployments/finality-gadget-integration-op-l2/Makefile +++ b/deployments/finality-gadget-integration-op-l2/Makefile @@ -187,7 +187,7 @@ start-babylon: else \ echo "Unsupported bitcoin network: $(BITCOIN_NETWORK)"; \ fi -.PHONY: start +.PHONY: start-babylon stop-babylon: @$(DOCKER) compose -f artifacts/docker-compose.yml down -v @@ -204,7 +204,7 @@ stop-babylon: else \ echo "Unsupported bitcoin network: $(BITCOIN_NETWORK)"; \ fi -.PHONY: stop +.PHONY: stop-babylon # Run independent steps # TODO: remove these after testing From 46e6e39a89d24db1703eac93fad10346f1e6b306 Mon Sep 17 00:00:00 2001 From: lesterli Date: Fri, 18 Oct 2024 16:09:00 +0800 Subject: [PATCH 3/4] fix: wrapper.sh not found --- .github/workflows/publish.yml | 1 + contrib/images/bitcoindsim/wrapper.sh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 77648aa7..9ebedc35 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -13,4 +13,5 @@ jobs: with: publish: true dockerfile: ./contrib/images/bitcoindsim/Dockerfile + dockerContext: ./contrib/images/bitcoindsim repoName: bitcoindsim \ No newline at end of file diff --git a/contrib/images/bitcoindsim/wrapper.sh b/contrib/images/bitcoindsim/wrapper.sh index 65ad7a1a..6855cfa2 100755 --- a/contrib/images/bitcoindsim/wrapper.sh +++ b/contrib/images/bitcoindsim/wrapper.sh @@ -23,7 +23,7 @@ if [[ ! -d "$BITCOIN_DATA" ]]; then fi echo "Generating bitcoin.conf file at $BITCOIN_CONF" if [[ "$BITCOIN_NETWORK" == "testnet" ]]; then - NETWORK_LABEL="test" # Testnet3 + NETWORK_LABEL="test" # [test] not [testnet] for testnet3 else NETWORK_LABEL="$BITCOIN_NETWORK" fi From 94e37d076d6244606b8b6ed239db3a69635b6d48 Mon Sep 17 00:00:00 2001 From: lesterli Date: Sat, 19 Oct 2024 09:45:41 +0800 Subject: [PATCH 4/4] chore: remove testnet --- contrib/images/bitcoindsim/wrapper.sh | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/contrib/images/bitcoindsim/wrapper.sh b/contrib/images/bitcoindsim/wrapper.sh index 6855cfa2..0f0a9058 100755 --- a/contrib/images/bitcoindsim/wrapper.sh +++ b/contrib/images/bitcoindsim/wrapper.sh @@ -12,7 +12,7 @@ if [[ -z "$BITCOIN_RPC_PORT" ]]; then BITCOIN_RPC_PORT="18443" fi -if [[ "$BITCOIN_NETWORK" != "regtest" && "$BITCOIN_NETWORK" != "signet" && "$BITCOIN_NETWORK" != "testnet" ]]; then +if [[ "$BITCOIN_NETWORK" != "regtest" && "$BITCOIN_NETWORK" != "signet" ]]; then echo "Unsupported network: $BITCOIN_NETWORK" exit 1 fi @@ -22,11 +22,7 @@ if [[ ! -d "$BITCOIN_DATA" ]]; then mkdir -p "$BITCOIN_DATA" fi echo "Generating bitcoin.conf file at $BITCOIN_CONF" -if [[ "$BITCOIN_NETWORK" == "testnet" ]]; then - NETWORK_LABEL="test" # [test] not [testnet] for testnet3 -else - NETWORK_LABEL="$BITCOIN_NETWORK" -fi +NETWORK_LABEL="$BITCOIN_NETWORK" cat < "$BITCOIN_CONF" # Enable ${BITCOIN_NETWORK} mode. ${BITCOIN_NETWORK}=1 @@ -110,7 +106,7 @@ if [[ "$BITCOIN_NETWORK" == "regtest" ]]; then fi sleep "${GENERATE_INTERVAL_SECS}" done -elif [[ "$BITCOIN_NETWORK" == "signet" || "$BITCOIN_NETWORK" == "testnet" ]]; then +elif [[ "$BITCOIN_NETWORK" == "signet" ]]; then # Check if the wallet database already exists. if [[ -d "$BITCOIN_DATA"/${BITCOIN_NETWORK}/wallets/"$BTCSTAKER_WALLET_NAME" ]]; then echo "Wallet already exists, loading it: $BITCOIN_DATA/${BITCOIN_NETWORK}/wallets/$BTCSTAKER_WALLET_NAME"