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

chore(e2e): removing btcd #9

Merged
merged 36 commits into from
Aug 13, 2024
Merged

chore(e2e): removing btcd #9

merged 36 commits into from
Aug 13, 2024

Conversation

Lazar955
Copy link
Member

This PR removes btcd for running e2e tests and uses bitcoind. Reference issue

@Lazar955 Lazar955 requested a review from KonradStaniec August 12, 2024 09:37
Copy link
Collaborator

@KonradStaniec KonradStaniec left a comment

Choose a reason for hiding this comment

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

few small comments, but in general looks good

Few additional things:

e2etest/unbondingwatcher_e2e_test.go Outdated Show resolved Hide resolved
e2etest/test_manager_btcstaking.go Outdated Show resolved Hide resolved
e2etest/test_manager.go Show resolved Hide resolved
// Config setting necessary to connect btcwallet daemon
defaultConfig.BTC.BtcBackend = "btcd"
defaultConfig.BTC.BtcBackend = types.Bitcoind
defaultConfig.BTC.WalletEndpoint = "127.0.0.1:18554"
Copy link
Collaborator

Choose a reason for hiding this comment

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

One follow up task we can have is to remove any references to btcd backend, for example:

  • .WalletEndpoint config option makes sense only in case of btcd/btcdwallet combo, in case of bitcoind there will be always one endpoint for bitcoind note/wallet
  • .BTC.BtcBackend options now makes little sense as we intend to support one backed ie bitcoind

Copy link
Member Author

Choose a reason for hiding this comment

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

Makes sense to be a separate PR, as the config is used in other places also

e2etest/test_manager.go Outdated Show resolved Hide resolved
e2etest/test_manager.go Outdated Show resolved Hide resolved

bsTracker := bst.NewBTCSTakingTracker(
tm.BTCClient,
backend,
tm.BabylonClient,
&bstCfg,
&commonCfg,
logger,
metrics,
rootLogger,
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe we don't need logs for tests

Suggested change
rootLogger,
zap.NewNop(),

// mine a block that includes slashing tx
tm.MineBlockWithTxs(t, tm.RetrieveTransactionFromMempool(t, []*chainhash.Hash{unbondingSlashingMsgTxHash}))
require.Eventually(t, func() bool {
Copy link
Contributor

Choose a reason for hiding this comment

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

Would be nice to wrap up these eventually check into a function inside the test manager, but is only a suggestion

Copy link
Contributor

@RafilxTenfen RafilxTenfen left a comment

Choose a reason for hiding this comment

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

a couple of suggestions, but LGTM 🚀

Copy link
Collaborator

@KonradStaniec KonradStaniec left a comment

Choose a reason for hiding this comment

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

LGTM!

@Lazar955 Lazar955 merged commit 09510cc into dev Aug 13, 2024
8 checks passed
@Lazar955 Lazar955 deleted the lazar/e2e-bitcoind branch August 13, 2024 08:54
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.

4 participants