Skip to content

Commit

Permalink
chore: a few improvements (#41)
Browse files Browse the repository at this point in the history
  • Loading branch information
lesterli authored Nov 12, 2024
1 parent 396b792 commit 45c4a16
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 9 deletions.
5 changes: 3 additions & 2 deletions .env.babylon-integration.example
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

### Bitcoin Configuration
BITCOIN_NETWORK=signet
BITCOIN_NODE_IP=11.22.33.44 # devnet-only
BITCOIN_RPC_HOST=11.22.33.44:38332 # gRPC
BITCOIN_RPC_USER=snapchain
BITCOIN_RPC_PASS=rpcpass
Expand Down Expand Up @@ -49,7 +50,7 @@ CONTRACT_LABEL=op-finality-gadget
CONSUMER_EOTS_MANAGER_ADDRESS=11.22.33.44:15813 # gRPC
CONSUMER_FINALITY_PROVIDER_KEY=consumer-finality-provider
# amount to fund the consumer-finality-provider account
CONSUMER_FP_FUND_AMOUNT_UBBN=100000000 # 100 BBN
CONSUMER_FP_FUND_AMOUNT_UBBN=3000000000 # 3000 BBN
L2_RPC_URL=http://11.22.33.44:8545
L2_BLOCK_TIME=2
FINALITY_GADGET_ADDRESS=bbn14hj2tavq8fpesdwxxcu44rty3hh90vhujrvcmstl4zr3txmfvw9sw76fy2
Expand All @@ -63,4 +64,4 @@ STAKING_TIME=10000 # ~70 days
STAKING_AMOUNT=10000 # 0.0001 BTC

# Finality Explorer Configuration
NEXT_PUBLIC_FINALITY_GADGET_API_URL=http://11.22.33.44:8545
NEXT_PUBLIC_FINALITY_GADGET_API_URL=http://11.22.33.44:18080
8 changes: 4 additions & 4 deletions docker/docker-compose-babylon-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ services:
# This is a one-off container just for setting the Babylon keys
set-babylon-keys:
container_name: set-babylon-keys
image: snapchain/babylon-deployment-utils:a2c8f0e
image: snapchain/babylon-deployment-utils:3c5e38e
env_file:
- "${PWD}/.env.babylon-integration"
volumes:
Expand All @@ -15,7 +15,7 @@ services:
# This is a one-off container just for registering the consumer chain
register-consumer-chain:
container_name: register-consumer-chain
image: snapchain/babylon-deployment-utils:a2c8f0e
image: snapchain/babylon-deployment-utils:3c5e38e
env_file:
- "${PWD}/.env.babylon-integration"
volumes:
Expand All @@ -28,7 +28,7 @@ services:
# This is a one-off container just for deploying cw contract
deploy-cw-contract:
container_name: deploy-cw-contract
image: snapchain/babylon-deployment-utils:a2c8f0e
image: snapchain/babylon-deployment-utils:3c5e38e
env_file:
- "${PWD}/.env.babylon-integration"
volumes:
Expand All @@ -42,7 +42,7 @@ services:
# This is a one-off container just for setting the finality contract enabled value
toggle-cw-killswitch:
container_name: toggle-cw-killswitch
image: snapchain/babylon-deployment-utils:a2c8f0e
image: snapchain/babylon-deployment-utils:3c5e38e
env_file:
- "${PWD}/.env.babylon-integration"
volumes:
Expand Down
2 changes: 1 addition & 1 deletion docker/docker-compose-bitcoin.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
services:
bitcoind:
image: snapchain/bitcoind:d3854d9
image: snapchain/bitcoind:1ce21c1
container_name: bitcoind
env_file:
- "${PWD}/.env.bitcoin"
Expand Down
5 changes: 3 additions & 2 deletions scripts/babylon-integration/register-op-consumer-fp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ echo
sleep 5

echo "Registering OP consumer finality provider..."
docker exec consumer-finality-provider /bin/sh \
-c "/bin/fpd register-finality-provider $OP_FP_EOTS_PK_HEX"
OP_FP_REGISTRATION_TX_OUTPUT=$(docker exec consumer-finality-provider /bin/sh \
-c "/bin/fpd register-finality-provider $OP_FP_EOTS_PK_HEX")
echo "$OP_FP_REGISTRATION_TX_OUTPUT"
echo
3 changes: 3 additions & 0 deletions scripts/babylon-integration/utils/register-consumer-chain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,13 @@ if echo "$CONSUMER_IDS" | grep -q "^${CONSUMER_ID}$"; then
fi

# register the consumer chain
# TODO: for now, we can use the consumer chain name as the consumer description,
# remove it after issue #255 (https://github.com/babylonlabs-io/babylon/issues/255) is fixed
echo "Registering consumer chain $CONSUMER_ID..."
CONSUMER_REGISTRATION_TX_HASH=$(babylond tx btcstkconsumer register-consumer \
"$CONSUMER_ID" \
"$CONSUMER_CHAIN_NAME" \
"$CONSUMER_CHAIN_NAME" \
--chain-id $BABYLON_CHAIN_ID \
--node $BABYLON_RPC_URL \
--from $BABYLON_PREFUNDED_KEY \
Expand Down

0 comments on commit 45c4a16

Please sign in to comment.