-
Notifications
You must be signed in to change notification settings - Fork 975
Feat/refactor-bcli #8820
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
dovgopoly
wants to merge
10
commits into
ElementsProject:master
Choose a base branch
from
dovgopoly:feat/refactor-bcli
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.
+390
−705
Open
Feat/refactor-bcli #8820
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
598b984
bcli: add synchronous `run_bitcoin_cli` for future refactor
dovgopoly 5138815
bcli: convert `getchaininfo` to synchronous execution
dovgopoly 5b48c8a
bcli: convert `getutxout` to synchronous execution
dovgopoly 5c65ab6
bcli: convert `sendrawtransaction` to synchronous execution
dovgopoly fa77e4b
bcli: convert `estimatefees` to synchronous execution
dovgopoly eb449e5
bcli: convert `getrawblockbyheight` to synchronous execution
dovgopoly 57d5946
lightningd: add error checking for bcli plugin responses
dovgopoly 8c0d9e5
pytest: fix bcli tests after sync refactor
dovgopoly ef431c4
bcli: remove unused async code after sync refactor
dovgopoly dddf995
bcli: return "not found" on any `getblockhash` exit status
dovgopoly 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
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.
What was the motivation behind this function. This seems like it kills bitcoind if an error response or a timeout happens from bitcoind. It's not uncommon for bitcoind (the actual bitcoin core daemon) to go out for lunch and have a timeout.
@rustyrussell checked his node and these were top 5 bitcoind timeouts in msec:
21812
22053
22406
23600
30535
60324
Separate from this, commands like estimatefees and getblockhash can fail when they are syncing. In our meeting, Rusty also suggested that it would be good to change that function from a check_bitcoin_error to something like check/get_bitcoin_result? That way you can do a lot of common result handling inside that function and as a result of that tidy up some of the code.
If we're doing this we should probably be a bit more discerning with our retry behaviour:
sendrawtransaction - This one is probably okay without a retry because we have rebroadcasting mechanisms already in lightningd.
getchaininfo - Lightningd retry loops rely on getchaininfo succeeding I think, so I wonder if this needs more internal retries or if it's okay for this to just die on one missed rpc call?
getrawblockbyheight - we have a retry on this one
estimatefees - This does fail during sync but if it returns the estimatefees_null_response() that's probably okay since it's not an error?
getutxoout - I think this one is fine as well because we only crash on a broken json.