Skip to content
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

Fix Node Startup Issue #1683

Merged
merged 3 commits into from
Jul 29, 2020

Conversation

benthecarman
Copy link
Collaborator

Caused by #1651, that fixed the comparison issue, but we needed keep dropping the leading zeros for to properly map to a BigInt.

Did a couple other small fixes like a typo, and put getBestBlockHeader all inside a Future so any errors thrown should propagate up

@benthecarman benthecarman added bug database database related work for our various projects app server labels Jul 19, 2020
@benthecarman benthecarman added this to the v0.4.0 milestone Jul 19, 2020
logger.warn(
s"We have multiple competing blockchains: ${(chain +: rest).map(_.tip.hashBE.hex).mkString(", ")}")
chain.tip
Future {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to add an invariant on ChainHandler to say

require(blockchains.nonEmpty)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can't actually do that, it causes most of our chain tests to fail.

@Christewart
Copy link
Contributor

This didn't seem to work for me.

The server does not bind:

./bitcoin-s-cli getblockcount
Connection refused (Connection refused)

I also don't have any logs related to chain-verification after this one:

2020-07-20T16:39:12 DEBUG [chain-verification] Querying for best block hash

@Christewart
Copy link
Contributor

This still seems not to work for me on 592e1af

Here are the logs when trying to sync my testnet node. If you look closely you see the last thing that is logged that is relevant to this PR is

2020-07-21T22:22:19 DEBUG [chain-verification] Querying for best block hash

So it appears be dying in the chain logic again?

0-07-21T22:22:19 DEBUG [P2P] Unaligned bytes after this: 0
2020-07-21T22:22:19 DEBUG [P2P] Received message=version from peer=Peer(neutrino.testnet3.suredbits.com/34.210.154.40:18333) state=Initializing
2020-07-21T22:22:19 DEBUG [P2P] Sending msg=verack to peer=neutrino.testnet3.suredbits.com/34.210.154.40:18333
2020-07-21T22:22:19 DEBUG [P2P] Received message=verack from peer=Peer(neutrino.testnet3.suredbits.com/34.210.154.40:18333) state=Initializing
2020-07-21T22:22:19 INFO [P2P] Our peer=Peer(neutrino.testnet3.suredbits.com/34.210.154.40:18333) has been initialized
2020-07-21T22:22:19 INFO [P2P] Our node has been full started. It took=4511ms
2020-07-21T22:22:19 DEBUG [chain-verification] Querying for best block hash
2020-07-21T22:22:19 DEBUG [P2P] Received message=sendheaders from peer=Peer(neutrino.testnet3.suredbits.com/34.210.154.40:18333) state=Normal
2020-07-21T22:22:19 DEBUG [P2P] Sending msg=sendheaders to peer=neutrino.testnet3.suredbits.com/34.210.154.40:18333
2020-07-21T22:22:19 DEBUG [P2P] Rec

@Christewart Christewart merged commit 728a4a8 into bitcoin-s:master Jul 29, 2020
@benthecarman benthecarman deleted the fix-node-startup-issues branch July 29, 2020 14:38
Christewart pushed a commit that referenced this pull request May 1, 2021
* Fix Node Startup Issue

* Small fixes

* Add option to force chain work recalc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
app server bug database database related work for our various projects
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants