Skip to content

Don't freak out when bitcoind says it's rewinding blocks... #286

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

Closed
rustyrussell opened this issue Sep 22, 2017 · 1 comment
Closed

Don't freak out when bitcoind says it's rewinding blocks... #286

rustyrussell opened this issue Sep 22, 2017 · 1 comment
Assignees
Labels
Milestone

Comments

@rustyrussell
Copy link
Contributor

From #284 crash.log:

+136792.168286138 lightningd(9465):BROKEN: bitcoin-cli getchaintips exited 28: 'error code: -28
error message:
Rewinding blocks...

This is unfortunate, but we should give it a few tries I think?

@rustyrussell rustyrussell self-assigned this Sep 22, 2017
@rustyrussell rustyrussell added this to the v0.6 milestone Sep 22, 2017
@cdecker
Copy link
Member

cdecker commented Sep 22, 2017

There's two different issues here I think:

  1. bitcoind failing to respond upon startup
  2. bitcoind becoming unreachable potentially restarting and becoming reachable again

In the former case we can probably just poll for readiness on startup. It's unlikely that something urgent has to be done, so waiting for bitcoind to finish its startup before continuing ours seems reasonable (we couldn't do anything anyway). The second case is dangerous, we can't just wait for it to come back, it might not come back at all, and we might be in the middle of an urgent situation. We currently just die whenever we lose contact to bitcoind, but I'd like to ween off of the full node dependency slowly, which is why I'm implementing the bitcoin protocol and am planning to keep a connection pool to public nodes. That'd allow us to monitor for blocks and transactions, and it allows us to broadcast transactions even without a bitcoind running locally.

So if this is an attempt to fix the startup problem, I'm all for it. If it is more about fixing outages while running, I'd say we allow some downtime, but if bitcoind doesn't come back in time we should be looking for alternatives to settle and shut down.

rustyrussell added a commit to rustyrussell/lightning that referenced this issue Sep 28, 2017
Seems to go out to lunch on reorgs:

   +136792.168286138 lightningd(9465):BROKEN: bitcoin-cli getchaintips exited 28: 'error code: -28
   error message:
   Rewinding blocks...

Closes: ElementsProject#286
Signed-off-by: Rusty Russell <[email protected]>
rustyrussell added a commit to rustyrussell/lightning that referenced this issue Sep 29, 2017
Seems to go out to lunch on reorgs:

   +136792.168286138 lightningd(9465):BROKEN: bitcoin-cli getchaintips exited 28: 'error code: -28
   error message:
   Rewinding blocks...

Closes: ElementsProject#286
Signed-off-by: Rusty Russell <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants