-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
blockcache: add blockcache pkg and pass it to all backends #5156
Conversation
fyi @wpaulino |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work! I've been running this along with the pruned node branch for a few days and it's been working well.
Thanks for the review @wpaulino 😊 Updated 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome optimization, looking really good @ellemouton!
Thanks @carlaKC 🚀 Updated 👍 |
c39e59b
to
e636b83
Compare
e6db16a
to
c149bb3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! 🥇
cc @Roasbeef |
Needs a rebase! |
Will be afk till Tuesday evening. Will rebase then 💪 |
Cool beans, rebased 👍 |
This commit adds a new blockcache package along with the GetBlock method to be used along with the blockcache.
This commit adds block cache size to the main lnd config along with the chainreg config.
This commit makes the blockcache available to BtcWallet so that any GetBlock call made to BtcWallet is wrapped by the blockcache GetBlock call.
This commit adds the block cache to the BitcoindFilteredChainView struct and wraps its GetBlock function so that block cache is used.
This commit makes the block cache available to BtcdFilteredChainView and wraps its GetBlock method so that the block cache is used.
This commit adds a blockcache pointer to BitcoindNotifier and wraps its GetBlock method so that the block cache is used.
This commit adds gives BtcdNotifier access to the block cache and wraps its GetBlock method so that it uses the block cache.
This commit initializes the nwutrino backend with the lnd blockcache so that the two can share a block cache instead of each having its own.
This commit ensures that for the neutrino implementation of lnwallet.BlockChainIO, the neutrino GetBlock method is called directly (since it already uses the blockcache). It also ensures that the block cache mutex for the given hash is locked before the call to GetBlock.
This commit adds the block cache to the CfFilteredChainView struct and wraps its GetBlock function so that block cache mutex map is used when the call to neutrino's GetBlock function is called.
This commit adds gives BtcdNotifier access to the block cache and wraps its GetBlock method so that the block cache's mutex map for the specific hash is used.
This PR adds a blockcache package. An lnd-wide blockcache is instantiated and passed to which ever chain backend is being used.
Addresses step 1 of #5075