Skip to content

bitcoin rpc query and setup btc test infra #3

@bap2pecs

Description

@bap2pecs

@lesterli cloned issue babylonchain/babylon-finality-gadget#41 on 2024-07-03:

Summary

https://github.com/babylonchain/babylon-da-sdk/pull/39#pullrequestreview-2155202342

Gai: Just wanted to understand the context. Why not use btc client like https://github.com/babylonchain/staking-indexer/blob/51d98f1dbafda2fbbe550599c83331b549d26a6c/btcclient/client.go#L23?

https://github.com/babylonchain/finality-provider/pull/483#discussion_r1667869280

Runchao: besides mocking BTC node, one can also leverage the https://github.com/btcsuite/btcd/tree/master/integration/rpctest package for testing things against an almost real BTC node. But this can be done in the future.

Tasks

  • refactor bitcoin rpc query using this

  • rewrite btc tests to not depend on ankr RPC

  • decide whether we should leverage the rpctest or bitcoind package for testing things against an almost real BTC node. finalise the design with the Babylon team

  • rewrite the tests using the btc test infra

  • add more btcclient tests for some edge cases

  • remove mock btc client and get rid of mock btc client in FP e2e test

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions