-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Add support for esplora backend #10538
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
Open
niteshbalusu11
wants to merge
56
commits into
lightningnetwork:master
Choose a base branch
from
niteshbalusu11:esplora-support
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
56 commits
Select commit
Hold shift + click to select a range
db46512
Add initial config for electrum support
niteshbalusu11 3bc3b3e
Add go-electrum dependency to go.mod and go.sum
niteshbalusu11 92ad343
Add Electrum sub-logger to logging system
niteshbalusu11 5bba70b
Add Electrum client implementation
niteshbalusu11 ac35ee9
Add Electrum client method implementations
niteshbalusu11 272d7a9
Add Electrum scripthash utilities
niteshbalusu11 d9d2750
Add Electrum notify package logger
niteshbalusu11 5432b24
Re-export go-electrum types for easier package usage
niteshbalusu11 68fda5d
Add Electrum backend support to chain notifier
niteshbalusu11 5c4393b
Add Electrum implementation of FilteredChainView
niteshbalusu11 0a4e914
Add Electrum fee estimator implementation
niteshbalusu11 5b68099
Add Electrum backend support to chain registry
niteshbalusu11 b769fff
Add Electrum chain client support to ChainControl
niteshbalusu11 c548ac9
Add GetUtxo method to Electrum chain client
niteshbalusu11 e8eef1e
Add detailed logging for Electrum chain client operations
niteshbalusu11 c24d339
Improve Electrum chain client block handling logic
niteshbalusu11 242e6df
Implement Electrum REST API support for enhanced functionality
niteshbalusu11 36bf904
Improve handling of Taproot outputs in Electrum notifier
niteshbalusu11 8f62621
Add e2e testing bash script.
niteshbalusu11 73cb0cf
Change testing ports
niteshbalusu11 d08deb6
Parallelize pending confirmation and spend checks in Electrum notifier
niteshbalusu11 6f53a1e
Add bash script for testing force close and sweeper
niteshbalusu11 79ee5a0
Code clean up
niteshbalusu11 d6d5bd5
Add Esplora blockchain backend support
niteshbalusu11 ded19c4
Add Esplora notifier driver implementation
niteshbalusu11 9fbe53a
Add logging support for Esplora notifications subsystem
niteshbalusu11 4e1f899
Add Esplora chain notifier implementation
niteshbalusu11 ad256c6
Add Esplora chain client implementation
niteshbalusu11 969a0ae
Add Esplora client implementation for Bitcoin API interactions
niteshbalusu11 8841c20
Add Esplora fee estimator package
niteshbalusu11 38794db
Add Esplora chain view and related Esplora utilities
niteshbalusu11 b87d792
Add Tests for Esplora Package
niteshbalusu11 c0da5d8
Delete all electrum related code
niteshbalusu11 b8326d7
Remove Electrum Backend Support
niteshbalusu11 4e11cb9
Restore the gitignore file
niteshbalusu11 994dc7a
Add Esplora configuration options to sample LND config
niteshbalusu11 14970c0
Mock backend to return bitcoind
niteshbalusu11 fcca54c
Add some end to end testing scripts for esplora
niteshbalusu11 f9dccec
fix: FilterBlocks to handle wallet rescans
niteshbalusu11 d64409a
Add test script for wallet rescan with Esplora backend
niteshbalusu11 d4ec2f7
Add Static Channel Backup (SCB) Restore Test Script for LND
niteshbalusu11 77486ac
Refactor Esplora Fee Estimator for Improved Fee Selection
niteshbalusu11 a3e63ef
Add progress logging and performance improvements to FilterBlocks
niteshbalusu11 2450abc
Improve transaction filtering with input and output tracking
niteshbalusu11 061b364
Optimize Esplora block scanning performance
niteshbalusu11 228c70d
Refactor address and outpoint filtering logic
niteshbalusu11 b0250b3
Add Gap Limit Scanning for Wallet Recovery
niteshbalusu11 5d846a2
Improve transaction scanning and ordering for UTXO tracking
niteshbalusu11 0ed6d76
Remove integration testing bash scripts
niteshbalusu11 d2710da
Remove unused go-electrum dependency
niteshbalusu11 6075348
Code comments cleanup and add missing config in same-lnd.conf
niteshbalusu11 40f65d6
Restore unnecessary changes in sample-lnd.conf
niteshbalusu11 5925216
Fix silent tx error failure
niteshbalusu11 42cebe0
Update fallback fee rate to match bitcoind backend's default
niteshbalusu11 b6b2e15
Simplify slice sorting using slices package
niteshbalusu11 dbcbe5a
Improve Esplora block transaction filtering efficiency
niteshbalusu11 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| package esploranotify | ||
|
|
||
| import ( | ||
| "fmt" | ||
|
|
||
| "github.com/btcsuite/btcd/chaincfg" | ||
| "github.com/lightningnetwork/lnd/blockcache" | ||
| "github.com/lightningnetwork/lnd/chainntnfs" | ||
| "github.com/lightningnetwork/lnd/esplora" | ||
| ) | ||
|
|
||
| // createNewNotifier creates a new instance of the EsploraNotifier from a | ||
| // config. | ||
| func createNewNotifier(args ...interface{}) (chainntnfs.ChainNotifier, error) { | ||
| if len(args) != 5 { | ||
| return nil, fmt.Errorf("incorrect number of arguments to "+ | ||
| "createNewNotifier, expected 5, got %d", len(args)) | ||
| } | ||
|
|
||
| client, ok := args[0].(*esplora.Client) | ||
| if !ok { | ||
| return nil, fmt.Errorf("first argument must be an " + | ||
| "*esplora.Client") | ||
| } | ||
|
|
||
| chainParams, ok := args[1].(*chaincfg.Params) | ||
| if !ok { | ||
| return nil, fmt.Errorf("second argument must be a " + | ||
| "*chaincfg.Params") | ||
| } | ||
|
|
||
| spendHintCache, ok := args[2].(chainntnfs.SpendHintCache) | ||
| if !ok { | ||
| return nil, fmt.Errorf("third argument must be a " + | ||
| "chainntnfs.SpendHintCache") | ||
| } | ||
|
|
||
| confirmHintCache, ok := args[3].(chainntnfs.ConfirmHintCache) | ||
| if !ok { | ||
| return nil, fmt.Errorf("fourth argument must be a " + | ||
| "chainntnfs.ConfirmHintCache") | ||
| } | ||
|
|
||
| blockCache, ok := args[4].(*blockcache.BlockCache) | ||
| if !ok { | ||
| return nil, fmt.Errorf("fifth argument must be a " + | ||
| "*blockcache.BlockCache") | ||
| } | ||
|
|
||
| return New(client, chainParams, spendHintCache, confirmHintCache, | ||
| blockCache), nil | ||
| } | ||
|
|
||
| // init registers a driver for the EsploraNotifier. | ||
| func init() { | ||
| chainntnfs.RegisterNotifier(&chainntnfs.NotifierDriver{ | ||
| NotifierType: notifierType, | ||
| New: createNewNotifier, | ||
| }) | ||
| } | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
According to the repository's style guide, function comments should start with the function's name. This comment should be updated to
// CreateNewNotifier....References