Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BTC staking integration deployment after migration #3

Merged
merged 9 commits into from
Aug 15, 2024

Conversation

SebastianElvis
Copy link
Member

@SebastianElvis SebastianElvis commented Aug 7, 2024

Resolves #2

This PR fixes the BTC staking integration deployment after migrating to the babylonlabs org.

To try out, do make start-deployment-btc-staking-integration-bitcoind-demo

@bap2pecs
Copy link
Collaborator

bap2pecs commented Aug 9, 2024

thanks for fixing it! can we split btc-staking-integration-bitcoind to two folders: 1) deploy babylon chain with staking enabled (e.g. babylon nodes, bitcoin local network, vigilante, btc staker); 2) integrate bcd consumer?

and 2) will run make -C or sth similar to start the systems in 1)

this will be helpful so we don't need to copy the same setup of 1) to our deployment script


btw, we see the vigilante services keep restarting

CONTAINER ID   IMAGE                               COMMAND                  CREATED          STATUS                          PORTS                                                                                                                        NAMES
4549616d9297   babylonlabs-io/vigilante            "vigilante bstracker…"   42 seconds ago   Restarting (2) 13 seconds ago                                                                                                                                vigilante-bstracker
7c7955d70332   babylonlabs-io/vigilante            "vigilante monitor -…"   42 seconds ago   Restarting (2) 13 seconds ago                                                                                                                                vigilante-monitor
df8ecc369c10   babylonlabs-io/vigilante            "vigilante submitter…"   42 seconds ago   Up 41 seconds                                                                                                                                                vigilante-submitter
1b0b1837b409   babylonlabs-io/vigilante            "vigilante reporter …"   42 seconds ago   Restarting (2) 13 seconds ago                                                                                                                                vigilante-reporter
482f1eb3b49a   babylonlabs-io/babylond             "babylond --home /ba…"   42 seconds ago   Up 41 seconds

docker logs show:

$ docker logs 4549616d9297
service injective.evm.v1beta1.Msg does not have cosmos.msg.v1.service proto annotation
panic: failed to open BTC client: zmq is only supported by bitcoind, but got bitcoind v24.0.0-v25.0.0

goroutine 1 [running]:
github.com/babylonlabs-io/vigilante/cmd/vigilante/cmd.GetBTCStakingTracker.func1(0x4000d1cf00?, {0x3ef5200?, 0x4?, 0x3ef5164?})
	/go/src/github.com/babylonlabs-io/vigilante/cmd/vigilante/cmd/btcstaking_tracker.go:71 +0x6a8
github.com/spf13/cobra.(*Command).execute(0x4000a06900, {0x40013503e0, 0x2, 0x2})
	/go/pkg/mod/github.com/spf13/[email protected]/command.go:987 +0x828
github.com/spf13/cobra.(*Command).ExecuteC(0x40014c7800)
	/go/pkg/mod/github.com/spf13/[email protected]/command.go:1115 +0x344
github.com/spf13/cobra.(*Command).Execute(0x400009c728?)
	/go/pkg/mod/github.com/spf13/[email protected]/command.go:1039 +0x1c
main.main()
	/go/src/github.com/babylonlabs-io/vigilante/cmd/vigilante/main.go:17 +0x24
service injective.evm.v1beta1.Msg does not have cosmos.msg.v1.service proto annotation
panic: failed to open BTC client: zmq is only supported by bitcoind, but got bitcoind v24.0.0-v25.0.0

@SebastianElvis
Copy link
Member Author

Re splitting, I'd say we can simply copy the current setup and replace the bcd with OP stuff? the engineering effort seems comparable. But I agree that if we add more integrations then a template with only Babylon is helpful. We can do this in a follow up.

Re vigilante, there is a bug and can you please try this branch? babylonlabs-io/vigilante#2

@bap2pecs
Copy link
Collaborator

cc @lesterli

@lesterli
Copy link
Collaborator

lesterli commented Aug 13, 2024

@SebastianElvis we checked out this branch and tried the deployment again, the vigilante services (vigilante-bstracker, vigilante-monitor, vigilante-reporter) still have the restart issue and they have the same error.
panic: failed to open BTC client: zmq is only supported by bitcoind, but got bitcoind v24.0.0-v25.0.0

docker compose ps

NAME                         IMAGE                               COMMAND                  SERVICE                      CREATED         STATUS                          PORTS
babylondnode0                babylonlabs-io/babylond             "babylond --home /ba…"   babylondnode0                4 minutes ago   Up 4 minutes                    0.0.0.0:1317->1317/tcp, 0.0.0.0:2345->2345/tcp, 0.0.0.0:9090->9090/tcp, 0.0.0.0:26656-26657->26656-26657/tcp
babylondnode1                babylonlabs-io/babylond             "babylond --home /ba…"   babylondnode1                4 minutes ago   Up 4 minutes                    0.0.0.0:1318->1317/tcp, 0.0.0.0:2346->2345/tcp, 0.0.0.0:9091->9090/tcp, 0.0.0.0:26666->26656/tcp, 0.0.0.0:26667->26657/tcp
bitcoindsim                  babylonlabs-io/bitcoindsim:latest   "/bitcoindsim/wrappe…"   bitcoindsim                  4 minutes ago   Up 4 minutes                    0.0.0.0:18443->18443/tcp, 0.0.0.0:29000-29002->29000-29002/tcp
btc-staker                   babylonlabs-io/btc-staker           "/bin/stakerd"           btc-staker                   4 minutes ago   Up 4 minutes                    0.0.0.0:15912->15812/tcp
consumer-eotsmanager         babylonlabs-io/finality-provider    "eotsd start"            consumer-eotsmanager         2 minutes ago   Up 2 minutes                    
consumer-finality-provider   babylonlabs-io/finality-provider    "fpd start"              consumer-finality-provider   2 minutes ago   Up 2 minutes                    
eotsmanager                  babylonlabs-io/finality-provider    "eotsd start"            eotsmanager                  4 minutes ago   Up 4 minutes                    0.0.0.0:15825->15813/tcp
finality-provider            babylonlabs-io/finality-provider    "fpd start"              finality-provider            4 minutes ago   Up 4 minutes                    0.0.0.0:15822->15812/tcp
vigilante-bstracker          babylonlabs-io/vigilante            "vigilante bstracker…"   vigilante-bstracker          4 minutes ago   Restarting (2) 49 seconds ago   
vigilante-monitor            babylonlabs-io/vigilante            "vigilante monitor -…"   vigilante-monitor            4 minutes ago   Restarting (2) 50 seconds ago   
vigilante-reporter           babylonlabs-io/vigilante            "vigilante reporter …"   vigilante-reporter           4 minutes ago   Restarting (2) 50 seconds ago   
vigilante-submitter          babylonlabs-io/vigilante            "vigilante submitter…"   vigilante-submitter          4 minutes ago   Up 4 minutes

docker logs vigilante-bstracker

goroutine 1 [running]:
github.com/babylonlabs-io/vigilante/cmd/vigilante/cmd.GetBTCStakingTracker.func1(0xc001382b00?, {0x4336581?, 0x4?, 0x43364e5?})
        /go/src/github.com/babylonlabs-io/vigilante/cmd/vigilante/cmd/btcstaking_tracker.go:71 +0x88e
github.com/spf13/cobra.(*Command).execute(0xc001386f00, {0xc0000b07c0, 0x2, 0x2})
        /go/pkg/mod/github.com/spf13/[email protected]/command.go:987 +0xaa3
github.com/spf13/cobra.(*Command).ExecuteC(0xc001386300)
        /go/pkg/mod/github.com/spf13/[email protected]/command.go:1115 +0x3ff
github.com/spf13/cobra.(*Command).Execute(0x0?)
        /go/pkg/mod/github.com/spf13/[email protected]/command.go:1039 +0x13
main.main()
        /go/src/github.com/babylonlabs-io/vigilante/cmd/vigilante/main.go:17 +0x1d
service injective.evm.v1beta1.Msg does not have cosmos.msg.v1.service proto annotation
panic: failed to open BTC client: zmq is only supported by bitcoind, but got bitcoind v24.0.0-v25.0.0

Also, I got the bitcoind version ("subversion":"/Satoshi:24.2.0/") with the rpc getnetworkinfo

curl -u rpcuser -d '{"id":"test", "method": "getnetworkinfo", "params": [] }' -H 'content-type: text/plain;' http://localhost:18443/  
Enter host password for user 'rpcuser':
{"result":{"version":240200,"subversion":"/Satoshi:24.2.0/","protocolversion":70016,"localservices":"0000000000000409","localservicesnames":["NETWORK","WITNESS","NETWORK_LIMITED"],"localrelay":true,"timeoffset":0,"networkactive":true,"connections":0,"connections_in":0,"connections_out":0,"networks":[{"name":"ipv4","limited":false,"reachable":true,"proxy":"","proxy_randomize_credentials":false},{"name":"ipv6","limited":false,"reachable":true,"proxy":"","proxy_randomize_credentials":false},{"name":"onion","limited":true,"reachable":false,"proxy":"","proxy_randomize_credentials":false},{"name":"i2p","limited":true,"reachable":false,"proxy":"","proxy_randomize_credentials":false},{"name":"cjdns","limited":true,"reachable":false,"proxy":"","proxy_randomize_credentials":false}],"relayfee":0.00001000,"incrementalfee":0.00001000,"localaddresses":[],"warnings":""},"error":null,"id":"test"}

@lesterli
Copy link
Collaborator

The error is here, for the version ("/Satoshi:24.2.0/"), it is weird as to why it throws the error.
But I think this check is unnecessary as my comment said.

@SebastianElvis SebastianElvis requested a review from gusin13 August 14, 2024 04:52
@SebastianElvis SebastianElvis marked this pull request as ready for review August 14, 2024 04:52
@SebastianElvis SebastianElvis changed the title deployment after migration BTC staking integration deployment after migration Aug 14, 2024
@lesterli
Copy link
Collaborator

The issue with restarting vigilante services has been resolved in the latest commit (e42be2f) on the vigilante dev branch.
docker compose ps

NAME                         IMAGE                               COMMAND                  SERVICE                      CREATED          STATUS          PORTS
babylondnode0                babylonlabs-io/babylond             "babylond --home /ba…"   babylondnode0                19 minutes ago   Up 19 minutes   0.0.0.0:1317->1317/tcp, 0.0.0.0:2345->2345/tcp, 0.0.0.0:9090->9090/tcp, 0.0.0.0:26656-26657->26656-26657/tcp
babylondnode1                babylonlabs-io/babylond             "babylond --home /ba…"   babylondnode1                19 minutes ago   Up 19 minutes   0.0.0.0:1318->1317/tcp, 0.0.0.0:2346->2345/tcp, 0.0.0.0:9091->9090/tcp, 0.0.0.0:26666->26656/tcp, 0.0.0.0:26667->26657/tcp
bitcoindsim                  babylonlabs-io/bitcoindsim:latest   "/bitcoindsim/wrappe…"   bitcoindsim                  19 minutes ago   Up 19 minutes   0.0.0.0:18443->18443/tcp, 0.0.0.0:29000-29002->29000-29002/tcp
btc-staker                   babylonlabs-io/btc-staker           "/bin/stakerd"           btc-staker                   19 minutes ago   Up 18 minutes   0.0.0.0:15912->15812/tcp
consumer-eotsmanager         babylonlabs-io/finality-provider    "eotsd start"            consumer-eotsmanager         16 minutes ago   Up 16 minutes   
consumer-finality-provider   babylonlabs-io/finality-provider    "fpd start"              consumer-finality-provider   16 minutes ago   Up 9 minutes    
eotsmanager                  babylonlabs-io/finality-provider    "eotsd start"            eotsmanager                  19 minutes ago   Up 18 minutes   0.0.0.0:15825->15813/tcp
finality-provider            babylonlabs-io/finality-provider    "fpd start"              finality-provider            19 minutes ago   Up 18 minutes   0.0.0.0:15822->15812/tcp
vigilante-bstracker          babylonlabs-io/vigilante            "vigilante bstracker…"   vigilante-bstracker          19 minutes ago   Up 18 minutes   
vigilante-monitor            babylonlabs-io/vigilante            "vigilante monitor -…"   vigilante-monitor            19 minutes ago   Up 17 minutes   
vigilante-reporter           babylonlabs-io/vigilante            "vigilante reporter …"   vigilante-reporter           19 minutes ago   Up 17 minutes   
vigilante-submitter          babylonlabs-io/vigilante            "vigilante submitter…"   vigilante-submitter          19 minutes ago   Up 18 minutes  

Copy link
Collaborator

@gusin13 gusin13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice work! lgtm 👍

@SebastianElvis SebastianElvis merged commit f4138e8 into main Aug 15, 2024
@SebastianElvis SebastianElvis deleted the lab-migration branch August 15, 2024 00:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

euphrates-0.5.0 setup
4 participants