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

WIP Bitcoind replace lnd-onchain #438

Closed
wants to merge 27 commits into from

Conversation

jotapea
Copy link
Contributor

@jotapea jotapea commented Aug 10, 2021

New branch, but still a work in progress, for the original #317.

}) // TODO conf_target
const feerate = result.feerate
// 1 BTC/kB = 100000 satoshis/byte
fee = 100000 * feerate // TODO not sure about this: is fee by size, not a total fee
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Confirmed that it is different from lightning's getChainFeeEstimate, which does return a total fee.

@jotapea
Copy link
Contributor Author

jotapea commented Aug 10, 2021

This is still in full WIP mode, so it contains multiple open questions as comments (which will be cleaned up after addressed). The main blocker at the moment is related to the lifecycle of the zeromq socket. I haven't found a way to be able to run multiple tests with it, at the moment it only works in a single test at a time...

throw new LoggedError(error)
}
// TODO pubkey should be known already
const { pubkey } = await this.bitcoindWalletClient.getAddressInfo({ address })
Copy link
Collaborator

Choose a reason for hiding this comment

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

I am not sure if we need this pubkey, the previous pubkey is the pubkey of lnd node that is needed to get chain data in the cron and trigger.

bitcoindSubscribers module includes logging messages test functions receiveRawBlockSubscriber and receiveRawTxSubscriber
TODO: not using SpecterWalletConstructorArgs as I am not sure the best way to add BitcoindClient type
- getBalancesDetail and getBalance bitcoind index utility functions receive BitcoindClient as parameter
- replaced with OnChainMixin instance variable TODO?
- estimateSmartFee added to BitcoindClient
- listTransactions added to BitcoindWalletClient
- getTransaction moved to BitcoindWalletClient
- getNewAddress now accepts optional address_type param
- sendToAddress now accepts optional fee_rate param
- OnChainMixin methods now use bitcoind client calls instead of lnd
-- getSatsAndAddressPerTx method broken up
-- some TODO comments should be confirmed, is a WIP
- getOnChainTransactions function no longer required
- some types and comments fixed
Is the equivalent to lnd-onchain's onchainTransactionEventHandler
At the moment is only working for a single instance, which is not compatible with the current test's idempotence requirement
- "create hot wallet" test added
- TODO "funds lnd1 node" updated (confirm use of bankowner)
Should be done with a mock ideally
These wallet actions add complexity to the integration tests, so will be addressed later
 without the removal of tests
which is commented out for tests to pass if this is the only bitcoind zmq/subscriber instance...
@jotapea jotapea force-pushed the bitcoind-replace-lndonchain branch from 82618e1 to cdabe8d Compare August 11, 2021 01:14
only one test at a time works
@nicolasburtey
Copy link
Member

@jotapea you should have the PR as "draft" when they are work in progress

@jotapea jotapea marked this pull request as draft August 11, 2021 18:53
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.

3 participants