-
Notifications
You must be signed in to change notification settings - Fork 872
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
[Feature request] Wait a while for Bitcoin Core to start instead of crashing immediately #4355
Comments
Workaround we use in our fork: btcpayserver@2ef9f6f |
I have had a similar issue. You might want to look into bitcoin/bitcoin#21007 as for fixing this from the Bitcoin Core side. |
I do not think this is related, I am not running bitcoind as a deamon. The error is that connection to bitcoind is refused when clightning try to connect to it. In my case, bitcoind stays in the foreground in its container, and docker is the one starting services depending on it (clightning) I think docker is using some shaky heuristic to know when it is the right time to launch a dependant services. |
It's related in the sense that it makes for an easy way to know when something dependent on bitcoind can be started. The I don't know anything about docker though. |
We do wait for Lines 817 to 871 in 483579f
From your error in #4352 (comment) it looks like bitcoind has not even be started yet, and i'm not sure it's reasonable to wait with no clue that a bitcoind is actually going to start behind us at some point? |
@darosior it would be nice to at least wait for 5-10 sec. (actually even 1 would be enough) That's what our clightning fork is doing btcpayserver@2ef9f6f As I said, the problem is that even if we configure c-lightning to depends on bitcoind at docker level, the fact that in bitcoin 0.21.0 I need to call bitcoin-create make docker start c-lightning start too early. There is ways to work around that (like my commit above), or by having some boilerplate code in the docker entrypoint, but then waiting for the warmup become useless, as it is done in the bash script anyway. |
@laanwj sadly, docker does not care about when bitcoind returns before starting the dependant services. And actually, bitcoind must run in foreground if hosted in container, so I can't even use |
One option might be to expose the
My main concern is that it might mask some of the errors indefinitely, @laanwj do you think that such a proposal would be welcome in |
I'm not aware of any prior discussion of this. But sounds good to me. |
@cdecker I tried to add
Just try for 20 sec. You can detect whether rpc is loading or if it fails to connect. If rpc loading -> wait indefinitely. If fails to connect -> fails after 20sec or so. |
Are you sure about that? I just tried with Furthermore if I then start a |
Well, I got curious myself what'd happen, so here's a gist that does a minimal recreation: https://gist.github.com/cdecker/4bdcf21192855022a02bd895d06fd18f It starts So my proposal would be to file a PR adding the max wait time to |
@cdecker I am not sure. I tried to use rpcwait, locally and as you pointed out, it was hanging. However, before trying my current solution, I tried inserting rpcwait directly in the Maybe it is because the bitcoin-cli we are using in the docker is rather old (0.18). Though I checked it had support for rpcwait. |
The docker-compose we use is here: https://github.com/btcpayserver/BTCPayServer.Lightning/blob/master/tests/docker-compose.yml
You can easily test what happen by:
the Note that sometimes it works, so you need another round of down/up. |
…o limit time spent waiting b9e76f1 rpc: Add test for -rpcwaittimeout (Christian Decker) f76cb10 rpc: Prefix rpcwaittimeout error with details on its nature (Christian Decker) c490e17 doc: Add release notes for the `-rpcwaittimeout` cli parameter (Christian Decker) a7fcc8e rpc: Add a `-rpcwaittimeout` parameter to limit time spent waiting (Christian Decker) Pull request description: Adds a new numeric `-rpcwaittimeout` that can be used to limit the time we spend waiting on the RPC server to appear. This is used by downstream projects to provide a bit of slack when `bitcoind`s RPC interface is not available right away. This makes the `-rpcwait` argument more useful, since we can now limit how long we'll ultimately wait, before potentially giving up and reporting an error to the caller. It was discussed in the context of the BTCPayServer wanting to have c-lightning wait for the RPC interface to become available but still have the option of giving up eventually ([4355]). I checked with laanwj whether this is already possible ([comment]), and whether this would be a welcome change. Initially I intended to repurpose the (optional) argument to `-rpcwait`, however I decided against it since it would potentially break existing configurations, using things like `rpcwait=1`, or `rpcwait=true` (the former would have an unintended short timeout, when old behavior was to wait indefinitely). ~Due to its simplicity I didn't implement a test for it yet, but if that's desired I can provide one.~ Test was added during reviews. [4355]: ElementsProject/lightning#4355 [comment]: ElementsProject/lightning#4355 (comment) ACKs for top commit: laanwj: Code review ACK b9e76f1 promag: ACK b9e76f1. Tree-SHA512: 3cd6728038ec7ca7c35c2e7ccb213bfbe963f99a49bb48bbc1e511c4dd23d9957c04f9af1f8ec57120e47b26eaf580b46817b099d5fc5083c98da7aa92db8638
…time spent waiting b9e76f1 rpc: Add test for -rpcwaittimeout (Christian Decker) f76cb10 rpc: Prefix rpcwaittimeout error with details on its nature (Christian Decker) c490e17 doc: Add release notes for the `-rpcwaittimeout` cli parameter (Christian Decker) a7fcc8e rpc: Add a `-rpcwaittimeout` parameter to limit time spent waiting (Christian Decker) Pull request description: Adds a new numeric `-rpcwaittimeout` that can be used to limit the time we spend waiting on the RPC server to appear. This is used by downstream projects to provide a bit of slack when `bitcoind`s RPC interface is not available right away. This makes the `-rpcwait` argument more useful, since we can now limit how long we'll ultimately wait, before potentially giving up and reporting an error to the caller. It was discussed in the context of the BTCPayServer wanting to have c-lightning wait for the RPC interface to become available but still have the option of giving up eventually ([4355]). I checked with laanwj whether this is already possible ([comment]), and whether this would be a welcome change. Initially I intended to repurpose the (optional) argument to `-rpcwait`, however I decided against it since it would potentially break existing configurations, using things like `rpcwait=1`, or `rpcwait=true` (the former would have an unintended short timeout, when old behavior was to wait indefinitely). ~Due to its simplicity I didn't implement a test for it yet, but if that's desired I can provide one.~ Test was added during reviews. [4355]: ElementsProject/lightning#4355 [comment]: ElementsProject/lightning#4355 (comment) ACKs for top commit: laanwj: Code review ACK b9e76f1 promag: ACK b9e76f1. Tree-SHA512: 3cd6728038ec7ca7c35c2e7ccb213bfbe963f99a49bb48bbc1e511c4dd23d9957c04f9af1f8ec57120e47b26eaf580b46817b099d5fc5083c98da7aa92db8638
…time spent waiting b9e76f1 rpc: Add test for -rpcwaittimeout (Christian Decker) f76cb10 rpc: Prefix rpcwaittimeout error with details on its nature (Christian Decker) c490e17 doc: Add release notes for the `-rpcwaittimeout` cli parameter (Christian Decker) a7fcc8e rpc: Add a `-rpcwaittimeout` parameter to limit time spent waiting (Christian Decker) Pull request description: Adds a new numeric `-rpcwaittimeout` that can be used to limit the time we spend waiting on the RPC server to appear. This is used by downstream projects to provide a bit of slack when `bitcoind`s RPC interface is not available right away. This makes the `-rpcwait` argument more useful, since we can now limit how long we'll ultimately wait, before potentially giving up and reporting an error to the caller. It was discussed in the context of the BTCPayServer wanting to have c-lightning wait for the RPC interface to become available but still have the option of giving up eventually ([4355]). I checked with laanwj whether this is already possible ([comment]), and whether this would be a welcome change. Initially I intended to repurpose the (optional) argument to `-rpcwait`, however I decided against it since it would potentially break existing configurations, using things like `rpcwait=1`, or `rpcwait=true` (the former would have an unintended short timeout, when old behavior was to wait indefinitely). ~Due to its simplicity I didn't implement a test for it yet, but if that's desired I can provide one.~ Test was added during reviews. [4355]: ElementsProject/lightning#4355 [comment]: ElementsProject/lightning#4355 (comment) ACKs for top commit: laanwj: Code review ACK b9e76f1 promag: ACK b9e76f1. Tree-SHA512: 3cd6728038ec7ca7c35c2e7ccb213bfbe963f99a49bb48bbc1e511c4dd23d9957c04f9af1f8ec57120e47b26eaf580b46817b099d5fc5083c98da7aa92db8638
…time spent waiting b9e76f1 rpc: Add test for -rpcwaittimeout (Christian Decker) f76cb10 rpc: Prefix rpcwaittimeout error with details on its nature (Christian Decker) c490e17 doc: Add release notes for the `-rpcwaittimeout` cli parameter (Christian Decker) a7fcc8e rpc: Add a `-rpcwaittimeout` parameter to limit time spent waiting (Christian Decker) Pull request description: Adds a new numeric `-rpcwaittimeout` that can be used to limit the time we spend waiting on the RPC server to appear. This is used by downstream projects to provide a bit of slack when `bitcoind`s RPC interface is not available right away. This makes the `-rpcwait` argument more useful, since we can now limit how long we'll ultimately wait, before potentially giving up and reporting an error to the caller. It was discussed in the context of the BTCPayServer wanting to have c-lightning wait for the RPC interface to become available but still have the option of giving up eventually ([4355]). I checked with laanwj whether this is already possible ([comment]), and whether this would be a welcome change. Initially I intended to repurpose the (optional) argument to `-rpcwait`, however I decided against it since it would potentially break existing configurations, using things like `rpcwait=1`, or `rpcwait=true` (the former would have an unintended short timeout, when old behavior was to wait indefinitely). ~Due to its simplicity I didn't implement a test for it yet, but if that's desired I can provide one.~ Test was added during reviews. [4355]: ElementsProject/lightning#4355 [comment]: ElementsProject/lightning#4355 (comment) ACKs for top commit: laanwj: Code review ACK b9e76f1 promag: ACK b9e76f1. Tree-SHA512: 3cd6728038ec7ca7c35c2e7ccb213bfbe963f99a49bb48bbc1e511c4dd23d9957c04f9af1f8ec57120e47b26eaf580b46817b099d5fc5083c98da7aa92db8638
…time spent waiting b9e76f1 rpc: Add test for -rpcwaittimeout (Christian Decker) f76cb10 rpc: Prefix rpcwaittimeout error with details on its nature (Christian Decker) c490e17 doc: Add release notes for the `-rpcwaittimeout` cli parameter (Christian Decker) a7fcc8e rpc: Add a `-rpcwaittimeout` parameter to limit time spent waiting (Christian Decker) Pull request description: Adds a new numeric `-rpcwaittimeout` that can be used to limit the time we spend waiting on the RPC server to appear. This is used by downstream projects to provide a bit of slack when `bitcoind`s RPC interface is not available right away. This makes the `-rpcwait` argument more useful, since we can now limit how long we'll ultimately wait, before potentially giving up and reporting an error to the caller. It was discussed in the context of the BTCPayServer wanting to have c-lightning wait for the RPC interface to become available but still have the option of giving up eventually ([4355]). I checked with laanwj whether this is already possible ([comment]), and whether this would be a welcome change. Initially I intended to repurpose the (optional) argument to `-rpcwait`, however I decided against it since it would potentially break existing configurations, using things like `rpcwait=1`, or `rpcwait=true` (the former would have an unintended short timeout, when old behavior was to wait indefinitely). ~Due to its simplicity I didn't implement a test for it yet, but if that's desired I can provide one.~ Test was added during reviews. [4355]: ElementsProject/lightning#4355 [comment]: ElementsProject/lightning#4355 (comment) ACKs for top commit: laanwj: Code review ACK b9e76f1 promag: ACK b9e76f1. Tree-SHA512: 3cd6728038ec7ca7c35c2e7ccb213bfbe963f99a49bb48bbc1e511c4dd23d9957c04f9af1f8ec57120e47b26eaf580b46817b099d5fc5083c98da7aa92db8638
…time spent waiting b9e76f1 rpc: Add test for -rpcwaittimeout (Christian Decker) f76cb10 rpc: Prefix rpcwaittimeout error with details on its nature (Christian Decker) c490e17 doc: Add release notes for the `-rpcwaittimeout` cli parameter (Christian Decker) a7fcc8e rpc: Add a `-rpcwaittimeout` parameter to limit time spent waiting (Christian Decker) Pull request description: Adds a new numeric `-rpcwaittimeout` that can be used to limit the time we spend waiting on the RPC server to appear. This is used by downstream projects to provide a bit of slack when `bitcoind`s RPC interface is not available right away. This makes the `-rpcwait` argument more useful, since we can now limit how long we'll ultimately wait, before potentially giving up and reporting an error to the caller. It was discussed in the context of the BTCPayServer wanting to have c-lightning wait for the RPC interface to become available but still have the option of giving up eventually ([4355]). I checked with laanwj whether this is already possible ([comment]), and whether this would be a welcome change. Initially I intended to repurpose the (optional) argument to `-rpcwait`, however I decided against it since it would potentially break existing configurations, using things like `rpcwait=1`, or `rpcwait=true` (the former would have an unintended short timeout, when old behavior was to wait indefinitely). ~Due to its simplicity I didn't implement a test for it yet, but if that's desired I can provide one.~ Test was added during reviews. [4355]: ElementsProject/lightning#4355 [comment]: ElementsProject/lightning#4355 (comment) ACKs for top commit: laanwj: Code review ACK b9e76f1 promag: ACK b9e76f1. Tree-SHA512: 3cd6728038ec7ca7c35c2e7ccb213bfbe963f99a49bb48bbc1e511c4dd23d9957c04f9af1f8ec57120e47b26eaf580b46817b099d5fc5083c98da7aa92db8638
…time spent waiting b9e76f1 rpc: Add test for -rpcwaittimeout (Christian Decker) f76cb10 rpc: Prefix rpcwaittimeout error with details on its nature (Christian Decker) c490e17 doc: Add release notes for the `-rpcwaittimeout` cli parameter (Christian Decker) a7fcc8e rpc: Add a `-rpcwaittimeout` parameter to limit time spent waiting (Christian Decker) Pull request description: Adds a new numeric `-rpcwaittimeout` that can be used to limit the time we spend waiting on the RPC server to appear. This is used by downstream projects to provide a bit of slack when `bitcoind`s RPC interface is not available right away. This makes the `-rpcwait` argument more useful, since we can now limit how long we'll ultimately wait, before potentially giving up and reporting an error to the caller. It was discussed in the context of the BTCPayServer wanting to have c-lightning wait for the RPC interface to become available but still have the option of giving up eventually ([4355]). I checked with laanwj whether this is already possible ([comment]), and whether this would be a welcome change. Initially I intended to repurpose the (optional) argument to `-rpcwait`, however I decided against it since it would potentially break existing configurations, using things like `rpcwait=1`, or `rpcwait=true` (the former would have an unintended short timeout, when old behavior was to wait indefinitely). ~Due to its simplicity I didn't implement a test for it yet, but if that's desired I can provide one.~ Test was added during reviews. [4355]: ElementsProject/lightning#4355 [comment]: ElementsProject/lightning#4355 (comment) ACKs for top commit: laanwj: Code review ACK b9e76f1 promag: ACK b9e76f1. Tree-SHA512: 3cd6728038ec7ca7c35c2e7ccb213bfbe963f99a49bb48bbc1e511c4dd23d9957c04f9af1f8ec57120e47b26eaf580b46817b099d5fc5083c98da7aa92db8638
…time spent waiting b9e76f1 rpc: Add test for -rpcwaittimeout (Christian Decker) f76cb10 rpc: Prefix rpcwaittimeout error with details on its nature (Christian Decker) c490e17 doc: Add release notes for the `-rpcwaittimeout` cli parameter (Christian Decker) a7fcc8e rpc: Add a `-rpcwaittimeout` parameter to limit time spent waiting (Christian Decker) Pull request description: Adds a new numeric `-rpcwaittimeout` that can be used to limit the time we spend waiting on the RPC server to appear. This is used by downstream projects to provide a bit of slack when `bitcoind`s RPC interface is not available right away. This makes the `-rpcwait` argument more useful, since we can now limit how long we'll ultimately wait, before potentially giving up and reporting an error to the caller. It was discussed in the context of the BTCPayServer wanting to have c-lightning wait for the RPC interface to become available but still have the option of giving up eventually ([4355]). I checked with laanwj whether this is already possible ([comment]), and whether this would be a welcome change. Initially I intended to repurpose the (optional) argument to `-rpcwait`, however I decided against it since it would potentially break existing configurations, using things like `rpcwait=1`, or `rpcwait=true` (the former would have an unintended short timeout, when old behavior was to wait indefinitely). ~Due to its simplicity I didn't implement a test for it yet, but if that's desired I can provide one.~ Test was added during reviews. [4355]: ElementsProject/lightning#4355 [comment]: ElementsProject/lightning#4355 (comment) ACKs for top commit: laanwj: Code review ACK b9e76f1 promag: ACK b9e76f1. Tree-SHA512: 3cd6728038ec7ca7c35c2e7ccb213bfbe963f99a49bb48bbc1e511c4dd23d9957c04f9af1f8ec57120e47b26eaf580b46817b099d5fc5083c98da7aa92db8638
…time spent waiting b9e76f1 rpc: Add test for -rpcwaittimeout (Christian Decker) f76cb10 rpc: Prefix rpcwaittimeout error with details on its nature (Christian Decker) c490e17 doc: Add release notes for the `-rpcwaittimeout` cli parameter (Christian Decker) a7fcc8e rpc: Add a `-rpcwaittimeout` parameter to limit time spent waiting (Christian Decker) Pull request description: Adds a new numeric `-rpcwaittimeout` that can be used to limit the time we spend waiting on the RPC server to appear. This is used by downstream projects to provide a bit of slack when `bitcoind`s RPC interface is not available right away. This makes the `-rpcwait` argument more useful, since we can now limit how long we'll ultimately wait, before potentially giving up and reporting an error to the caller. It was discussed in the context of the BTCPayServer wanting to have c-lightning wait for the RPC interface to become available but still have the option of giving up eventually ([4355]). I checked with laanwj whether this is already possible ([comment]), and whether this would be a welcome change. Initially I intended to repurpose the (optional) argument to `-rpcwait`, however I decided against it since it would potentially break existing configurations, using things like `rpcwait=1`, or `rpcwait=true` (the former would have an unintended short timeout, when old behavior was to wait indefinitely). ~Due to its simplicity I didn't implement a test for it yet, but if that's desired I can provide one.~ Test was added during reviews. [4355]: ElementsProject/lightning#4355 [comment]: ElementsProject/lightning#4355 (comment) ACKs for top commit: laanwj: Code review ACK b9e76f1 promag: ACK b9e76f1. Tree-SHA512: 3cd6728038ec7ca7c35c2e7ccb213bfbe963f99a49bb48bbc1e511c4dd23d9957c04f9af1f8ec57120e47b26eaf580b46817b099d5fc5083c98da7aa92db8638
…time spent waiting b9e76f1 rpc: Add test for -rpcwaittimeout (Christian Decker) f76cb10 rpc: Prefix rpcwaittimeout error with details on its nature (Christian Decker) c490e17 doc: Add release notes for the `-rpcwaittimeout` cli parameter (Christian Decker) a7fcc8e rpc: Add a `-rpcwaittimeout` parameter to limit time spent waiting (Christian Decker) Pull request description: Adds a new numeric `-rpcwaittimeout` that can be used to limit the time we spend waiting on the RPC server to appear. This is used by downstream projects to provide a bit of slack when `bitcoind`s RPC interface is not available right away. This makes the `-rpcwait` argument more useful, since we can now limit how long we'll ultimately wait, before potentially giving up and reporting an error to the caller. It was discussed in the context of the BTCPayServer wanting to have c-lightning wait for the RPC interface to become available but still have the option of giving up eventually ([4355]). I checked with laanwj whether this is already possible ([comment]), and whether this would be a welcome change. Initially I intended to repurpose the (optional) argument to `-rpcwait`, however I decided against it since it would potentially break existing configurations, using things like `rpcwait=1`, or `rpcwait=true` (the former would have an unintended short timeout, when old behavior was to wait indefinitely). ~Due to its simplicity I didn't implement a test for it yet, but if that's desired I can provide one.~ Test was added during reviews. [4355]: ElementsProject/lightning#4355 [comment]: ElementsProject/lightning#4355 (comment) ACKs for top commit: laanwj: Code review ACK b9e76f1 promag: ACK b9e76f1. Tree-SHA512: 3cd6728038ec7ca7c35c2e7ccb213bfbe963f99a49bb48bbc1e511c4dd23d9957c04f9af1f8ec57120e47b26eaf580b46817b099d5fc5083c98da7aa92db8638
…time spent waiting b9e76f1 rpc: Add test for -rpcwaittimeout (Christian Decker) f76cb10 rpc: Prefix rpcwaittimeout error with details on its nature (Christian Decker) c490e17 doc: Add release notes for the `-rpcwaittimeout` cli parameter (Christian Decker) a7fcc8e rpc: Add a `-rpcwaittimeout` parameter to limit time spent waiting (Christian Decker) Pull request description: Adds a new numeric `-rpcwaittimeout` that can be used to limit the time we spend waiting on the RPC server to appear. This is used by downstream projects to provide a bit of slack when `bitcoind`s RPC interface is not available right away. This makes the `-rpcwait` argument more useful, since we can now limit how long we'll ultimately wait, before potentially giving up and reporting an error to the caller. It was discussed in the context of the BTCPayServer wanting to have c-lightning wait for the RPC interface to become available but still have the option of giving up eventually ([4355]). I checked with laanwj whether this is already possible ([comment]), and whether this would be a welcome change. Initially I intended to repurpose the (optional) argument to `-rpcwait`, however I decided against it since it would potentially break existing configurations, using things like `rpcwait=1`, or `rpcwait=true` (the former would have an unintended short timeout, when old behavior was to wait indefinitely). ~Due to its simplicity I didn't implement a test for it yet, but if that's desired I can provide one.~ Test was added during reviews. [4355]: ElementsProject/lightning#4355 [comment]: ElementsProject/lightning#4355 (comment) ACKs for top commit: laanwj: Code review ACK b9e76f1 promag: ACK b9e76f1. Tree-SHA512: 3cd6728038ec7ca7c35c2e7ccb213bfbe963f99a49bb48bbc1e511c4dd23d9957c04f9af1f8ec57120e47b26eaf580b46817b099d5fc5083c98da7aa92db8638
…time spent waiting b9e76f1 rpc: Add test for -rpcwaittimeout (Christian Decker) f76cb10 rpc: Prefix rpcwaittimeout error with details on its nature (Christian Decker) c490e17 doc: Add release notes for the `-rpcwaittimeout` cli parameter (Christian Decker) a7fcc8e rpc: Add a `-rpcwaittimeout` parameter to limit time spent waiting (Christian Decker) Pull request description: Adds a new numeric `-rpcwaittimeout` that can be used to limit the time we spend waiting on the RPC server to appear. This is used by downstream projects to provide a bit of slack when `bitcoind`s RPC interface is not available right away. This makes the `-rpcwait` argument more useful, since we can now limit how long we'll ultimately wait, before potentially giving up and reporting an error to the caller. It was discussed in the context of the BTCPayServer wanting to have c-lightning wait for the RPC interface to become available but still have the option of giving up eventually ([4355]). I checked with laanwj whether this is already possible ([comment]), and whether this would be a welcome change. Initially I intended to repurpose the (optional) argument to `-rpcwait`, however I decided against it since it would potentially break existing configurations, using things like `rpcwait=1`, or `rpcwait=true` (the former would have an unintended short timeout, when old behavior was to wait indefinitely). ~Due to its simplicity I didn't implement a test for it yet, but if that's desired I can provide one.~ Test was added during reviews. [4355]: ElementsProject/lightning#4355 [comment]: ElementsProject/lightning#4355 (comment) ACKs for top commit: laanwj: Code review ACK b9e76f1 promag: ACK b9e76f1. Tree-SHA512: 3cd6728038ec7ca7c35c2e7ccb213bfbe963f99a49bb48bbc1e511c4dd23d9957c04f9af1f8ec57120e47b26eaf580b46817b099d5fc5083c98da7aa92db8638
…time spent waiting b9e76f1 rpc: Add test for -rpcwaittimeout (Christian Decker) f76cb10 rpc: Prefix rpcwaittimeout error with details on its nature (Christian Decker) c490e17 doc: Add release notes for the `-rpcwaittimeout` cli parameter (Christian Decker) a7fcc8e rpc: Add a `-rpcwaittimeout` parameter to limit time spent waiting (Christian Decker) Pull request description: Adds a new numeric `-rpcwaittimeout` that can be used to limit the time we spend waiting on the RPC server to appear. This is used by downstream projects to provide a bit of slack when `bitcoind`s RPC interface is not available right away. This makes the `-rpcwait` argument more useful, since we can now limit how long we'll ultimately wait, before potentially giving up and reporting an error to the caller. It was discussed in the context of the BTCPayServer wanting to have c-lightning wait for the RPC interface to become available but still have the option of giving up eventually ([4355]). I checked with laanwj whether this is already possible ([comment]), and whether this would be a welcome change. Initially I intended to repurpose the (optional) argument to `-rpcwait`, however I decided against it since it would potentially break existing configurations, using things like `rpcwait=1`, or `rpcwait=true` (the former would have an unintended short timeout, when old behavior was to wait indefinitely). ~Due to its simplicity I didn't implement a test for it yet, but if that's desired I can provide one.~ Test was added during reviews. [4355]: ElementsProject/lightning#4355 [comment]: ElementsProject/lightning#4355 (comment) ACKs for top commit: laanwj: Code review ACK b9e76f1 promag: ACK b9e76f1. Tree-SHA512: 3cd6728038ec7ca7c35c2e7ccb213bfbe963f99a49bb48bbc1e511c4dd23d9957c04f9af1f8ec57120e47b26eaf580b46817b099d5fc5083c98da7aa92db8638
…time spent waiting b9e76f1 rpc: Add test for -rpcwaittimeout (Christian Decker) f76cb10 rpc: Prefix rpcwaittimeout error with details on its nature (Christian Decker) c490e17 doc: Add release notes for the `-rpcwaittimeout` cli parameter (Christian Decker) a7fcc8e rpc: Add a `-rpcwaittimeout` parameter to limit time spent waiting (Christian Decker) Pull request description: Adds a new numeric `-rpcwaittimeout` that can be used to limit the time we spend waiting on the RPC server to appear. This is used by downstream projects to provide a bit of slack when `bitcoind`s RPC interface is not available right away. This makes the `-rpcwait` argument more useful, since we can now limit how long we'll ultimately wait, before potentially giving up and reporting an error to the caller. It was discussed in the context of the BTCPayServer wanting to have c-lightning wait for the RPC interface to become available but still have the option of giving up eventually ([4355]). I checked with laanwj whether this is already possible ([comment]), and whether this would be a welcome change. Initially I intended to repurpose the (optional) argument to `-rpcwait`, however I decided against it since it would potentially break existing configurations, using things like `rpcwait=1`, or `rpcwait=true` (the former would have an unintended short timeout, when old behavior was to wait indefinitely). ~Due to its simplicity I didn't implement a test for it yet, but if that's desired I can provide one.~ Test was added during reviews. [4355]: ElementsProject/lightning#4355 [comment]: ElementsProject/lightning#4355 (comment) ACKs for top commit: laanwj: Code review ACK b9e76f1 promag: ACK b9e76f1. Tree-SHA512: 3cd6728038ec7ca7c35c2e7ccb213bfbe963f99a49bb48bbc1e511c4dd23d9957c04f9af1f8ec57120e47b26eaf580b46817b099d5fc5083c98da7aa92db8638
…time spent waiting b9e76f1 rpc: Add test for -rpcwaittimeout (Christian Decker) f76cb10 rpc: Prefix rpcwaittimeout error with details on its nature (Christian Decker) c490e17 doc: Add release notes for the `-rpcwaittimeout` cli parameter (Christian Decker) a7fcc8e rpc: Add a `-rpcwaittimeout` parameter to limit time spent waiting (Christian Decker) Pull request description: Adds a new numeric `-rpcwaittimeout` that can be used to limit the time we spend waiting on the RPC server to appear. This is used by downstream projects to provide a bit of slack when `bitcoind`s RPC interface is not available right away. This makes the `-rpcwait` argument more useful, since we can now limit how long we'll ultimately wait, before potentially giving up and reporting an error to the caller. It was discussed in the context of the BTCPayServer wanting to have c-lightning wait for the RPC interface to become available but still have the option of giving up eventually ([4355]). I checked with laanwj whether this is already possible ([comment]), and whether this would be a welcome change. Initially I intended to repurpose the (optional) argument to `-rpcwait`, however I decided against it since it would potentially break existing configurations, using things like `rpcwait=1`, or `rpcwait=true` (the former would have an unintended short timeout, when old behavior was to wait indefinitely). ~Due to its simplicity I didn't implement a test for it yet, but if that's desired I can provide one.~ Test was added during reviews. [4355]: ElementsProject/lightning#4355 [comment]: ElementsProject/lightning#4355 (comment) ACKs for top commit: laanwj: Code review ACK b9e76f1 promag: ACK b9e76f1. Tree-SHA512: 3cd6728038ec7ca7c35c2e7ccb213bfbe963f99a49bb48bbc1e511c4dd23d9957c04f9af1f8ec57120e47b26eaf580b46817b099d5fc5083c98da7aa92db8638
…time spent waiting b9e76f1 rpc: Add test for -rpcwaittimeout (Christian Decker) f76cb10 rpc: Prefix rpcwaittimeout error with details on its nature (Christian Decker) c490e17 doc: Add release notes for the `-rpcwaittimeout` cli parameter (Christian Decker) a7fcc8e rpc: Add a `-rpcwaittimeout` parameter to limit time spent waiting (Christian Decker) Pull request description: Adds a new numeric `-rpcwaittimeout` that can be used to limit the time we spend waiting on the RPC server to appear. This is used by downstream projects to provide a bit of slack when `bitcoind`s RPC interface is not available right away. This makes the `-rpcwait` argument more useful, since we can now limit how long we'll ultimately wait, before potentially giving up and reporting an error to the caller. It was discussed in the context of the BTCPayServer wanting to have c-lightning wait for the RPC interface to become available but still have the option of giving up eventually ([4355]). I checked with laanwj whether this is already possible ([comment]), and whether this would be a welcome change. Initially I intended to repurpose the (optional) argument to `-rpcwait`, however I decided against it since it would potentially break existing configurations, using things like `rpcwait=1`, or `rpcwait=true` (the former would have an unintended short timeout, when old behavior was to wait indefinitely). ~Due to its simplicity I didn't implement a test for it yet, but if that's desired I can provide one.~ Test was added during reviews. [4355]: ElementsProject/lightning#4355 [comment]: ElementsProject/lightning#4355 (comment) ACKs for top commit: laanwj: Code review ACK b9e76f1 promag: ACK b9e76f1. Tree-SHA512: 3cd6728038ec7ca7c35c2e7ccb213bfbe963f99a49bb48bbc1e511c4dd23d9957c04f9af1f8ec57120e47b26eaf580b46817b099d5fc5083c98da7aa92db8638
…time spent waiting b9e76f1 rpc: Add test for -rpcwaittimeout (Christian Decker) f76cb10 rpc: Prefix rpcwaittimeout error with details on its nature (Christian Decker) c490e17 doc: Add release notes for the `-rpcwaittimeout` cli parameter (Christian Decker) a7fcc8e rpc: Add a `-rpcwaittimeout` parameter to limit time spent waiting (Christian Decker) Pull request description: Adds a new numeric `-rpcwaittimeout` that can be used to limit the time we spend waiting on the RPC server to appear. This is used by downstream projects to provide a bit of slack when `bitcoind`s RPC interface is not available right away. This makes the `-rpcwait` argument more useful, since we can now limit how long we'll ultimately wait, before potentially giving up and reporting an error to the caller. It was discussed in the context of the BTCPayServer wanting to have c-lightning wait for the RPC interface to become available but still have the option of giving up eventually ([4355]). I checked with laanwj whether this is already possible ([comment]), and whether this would be a welcome change. Initially I intended to repurpose the (optional) argument to `-rpcwait`, however I decided against it since it would potentially break existing configurations, using things like `rpcwait=1`, or `rpcwait=true` (the former would have an unintended short timeout, when old behavior was to wait indefinitely). ~Due to its simplicity I didn't implement a test for it yet, but if that's desired I can provide one.~ Test was added during reviews. [4355]: ElementsProject/lightning#4355 [comment]: ElementsProject/lightning#4355 (comment) ACKs for top commit: laanwj: Code review ACK b9e76f1 promag: ACK b9e76f1. Tree-SHA512: 3cd6728038ec7ca7c35c2e7ccb213bfbe963f99a49bb48bbc1e511c4dd23d9957c04f9af1f8ec57120e47b26eaf580b46817b099d5fc5083c98da7aa92db8638
…time spent waiting b9e76f1 rpc: Add test for -rpcwaittimeout (Christian Decker) f76cb10 rpc: Prefix rpcwaittimeout error with details on its nature (Christian Decker) c490e17 doc: Add release notes for the `-rpcwaittimeout` cli parameter (Christian Decker) a7fcc8e rpc: Add a `-rpcwaittimeout` parameter to limit time spent waiting (Christian Decker) Pull request description: Adds a new numeric `-rpcwaittimeout` that can be used to limit the time we spend waiting on the RPC server to appear. This is used by downstream projects to provide a bit of slack when `bitcoind`s RPC interface is not available right away. This makes the `-rpcwait` argument more useful, since we can now limit how long we'll ultimately wait, before potentially giving up and reporting an error to the caller. It was discussed in the context of the BTCPayServer wanting to have c-lightning wait for the RPC interface to become available but still have the option of giving up eventually ([4355]). I checked with laanwj whether this is already possible ([comment]), and whether this would be a welcome change. Initially I intended to repurpose the (optional) argument to `-rpcwait`, however I decided against it since it would potentially break existing configurations, using things like `rpcwait=1`, or `rpcwait=true` (the former would have an unintended short timeout, when old behavior was to wait indefinitely). ~Due to its simplicity I didn't implement a test for it yet, but if that's desired I can provide one.~ Test was added during reviews. [4355]: ElementsProject/lightning#4355 [comment]: ElementsProject/lightning#4355 (comment) ACKs for top commit: laanwj: Code review ACK b9e76f1 promag: ACK b9e76f1. Tree-SHA512: 3cd6728038ec7ca7c35c2e7ccb213bfbe963f99a49bb48bbc1e511c4dd23d9957c04f9af1f8ec57120e47b26eaf580b46817b099d5fc5083c98da7aa92db8638
…time spent waiting b9e76f1 rpc: Add test for -rpcwaittimeout (Christian Decker) f76cb10 rpc: Prefix rpcwaittimeout error with details on its nature (Christian Decker) c490e17 doc: Add release notes for the `-rpcwaittimeout` cli parameter (Christian Decker) a7fcc8e rpc: Add a `-rpcwaittimeout` parameter to limit time spent waiting (Christian Decker) Pull request description: Adds a new numeric `-rpcwaittimeout` that can be used to limit the time we spend waiting on the RPC server to appear. This is used by downstream projects to provide a bit of slack when `bitcoind`s RPC interface is not available right away. This makes the `-rpcwait` argument more useful, since we can now limit how long we'll ultimately wait, before potentially giving up and reporting an error to the caller. It was discussed in the context of the BTCPayServer wanting to have c-lightning wait for the RPC interface to become available but still have the option of giving up eventually ([4355]). I checked with laanwj whether this is already possible ([comment]), and whether this would be a welcome change. Initially I intended to repurpose the (optional) argument to `-rpcwait`, however I decided against it since it would potentially break existing configurations, using things like `rpcwait=1`, or `rpcwait=true` (the former would have an unintended short timeout, when old behavior was to wait indefinitely). ~Due to its simplicity I didn't implement a test for it yet, but if that's desired I can provide one.~ Test was added during reviews. [4355]: ElementsProject/lightning#4355 [comment]: ElementsProject/lightning#4355 (comment) ACKs for top commit: laanwj: Code review ACK b9e76f1 promag: ACK b9e76f1. Tree-SHA512: 3cd6728038ec7ca7c35c2e7ccb213bfbe963f99a49bb48bbc1e511c4dd23d9957c04f9af1f8ec57120e47b26eaf580b46817b099d5fc5083c98da7aa92db8638
…time spent waiting b9e76f1 rpc: Add test for -rpcwaittimeout (Christian Decker) f76cb10 rpc: Prefix rpcwaittimeout error with details on its nature (Christian Decker) c490e17 doc: Add release notes for the `-rpcwaittimeout` cli parameter (Christian Decker) a7fcc8e rpc: Add a `-rpcwaittimeout` parameter to limit time spent waiting (Christian Decker) Pull request description: Adds a new numeric `-rpcwaittimeout` that can be used to limit the time we spend waiting on the RPC server to appear. This is used by downstream projects to provide a bit of slack when `bitcoind`s RPC interface is not available right away. This makes the `-rpcwait` argument more useful, since we can now limit how long we'll ultimately wait, before potentially giving up and reporting an error to the caller. It was discussed in the context of the BTCPayServer wanting to have c-lightning wait for the RPC interface to become available but still have the option of giving up eventually ([4355]). I checked with laanwj whether this is already possible ([comment]), and whether this would be a welcome change. Initially I intended to repurpose the (optional) argument to `-rpcwait`, however I decided against it since it would potentially break existing configurations, using things like `rpcwait=1`, or `rpcwait=true` (the former would have an unintended short timeout, when old behavior was to wait indefinitely). ~Due to its simplicity I didn't implement a test for it yet, but if that's desired I can provide one.~ Test was added during reviews. [4355]: ElementsProject/lightning#4355 [comment]: ElementsProject/lightning#4355 (comment) ACKs for top commit: laanwj: Code review ACK b9e76f1 promag: ACK b9e76f1. Tree-SHA512: 3cd6728038ec7ca7c35c2e7ccb213bfbe963f99a49bb48bbc1e511c4dd23d9957c04f9af1f8ec57120e47b26eaf580b46817b099d5fc5083c98da7aa92db8638 Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
…time spent waiting b9e76f1 rpc: Add test for -rpcwaittimeout (Christian Decker) f76cb10 rpc: Prefix rpcwaittimeout error with details on its nature (Christian Decker) c490e17 doc: Add release notes for the `-rpcwaittimeout` cli parameter (Christian Decker) a7fcc8e rpc: Add a `-rpcwaittimeout` parameter to limit time spent waiting (Christian Decker) Pull request description: Adds a new numeric `-rpcwaittimeout` that can be used to limit the time we spend waiting on the RPC server to appear. This is used by downstream projects to provide a bit of slack when `bitcoind`s RPC interface is not available right away. This makes the `-rpcwait` argument more useful, since we can now limit how long we'll ultimately wait, before potentially giving up and reporting an error to the caller. It was discussed in the context of the BTCPayServer wanting to have c-lightning wait for the RPC interface to become available but still have the option of giving up eventually ([4355]). I checked with laanwj whether this is already possible ([comment]), and whether this would be a welcome change. Initially I intended to repurpose the (optional) argument to `-rpcwait`, however I decided against it since it would potentially break existing configurations, using things like `rpcwait=1`, or `rpcwait=true` (the former would have an unintended short timeout, when old behavior was to wait indefinitely). ~Due to its simplicity I didn't implement a test for it yet, but if that's desired I can provide one.~ Test was added during reviews. [4355]: ElementsProject/lightning#4355 [comment]: ElementsProject/lightning#4355 (comment) ACKs for top commit: laanwj: Code review ACK b9e76f1 promag: ACK b9e76f1. Tree-SHA512: 3cd6728038ec7ca7c35c2e7ccb213bfbe963f99a49bb48bbc1e511c4dd23d9957c04f9af1f8ec57120e47b26eaf580b46817b099d5fc5083c98da7aa92db8638 Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
At startup, c-lightning should wait a bit for Bitcoin core to start and not crash (#4352)
The text was updated successfully, but these errors were encountered: