-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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 initial data request handling #6947
Fix initial data request handling #6947
Conversation
Set loge level for org.berndpruenster.netlayer.tor.Tor to WARN (we get repeated logs about HS announced to network from netlayer - would be better to change in netlayer). Make data request/response logs more visible with line breaks
Make logmore visible.
…2p network state as initialized
Only start requesting blocks after wallet is synced. Update connection state when doing repeated block requests. Improve logs.
Thanks for opening this pull request! |
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.
ACK
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.
ACK
Tested for 1.5 days (mainnet) :
- new data directory, lite DAO node
- new data directory, full DAO node
- existing data directory
- checked the case where new blocks are mined during initial blocks download
- verify self calculated DAO hashes after sync
- seed node
- seed node, new data directory.
There is one issue where the trade statistics do not appear updated in the GUI until after restart -> that is an existing issue not something introduced by this PR change. I mention it here because it is likely to be noticed by others when testing this.
@jmacxx Great thanks for the extensive testing!!! |
NB: I think this PR needs to be thoroughly soak-tested for several weeks before considering safe to merge. I've started that soak testing and encourage others to do so as well. |
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.
utACK
Awesome work, congrats on your first merged pull request! |
Previously, the onGetBlocksRequest method created an ArrayList and two LinkedList before creating the GetBlocksResponse. The first two lists were never used. PR bisq-network#6947 introduced the second LinkedList creation. With this change, the GetBlocksRequestHandler only creates a single LinkedList.
This should fix the issues with dao hash conflicts when starting a node which was missing many blocks.
Now we wait until the updated data requests do not report that data is still missing (truncated flag). Only after that (when at least one seed responded with a non-truncated response) we consider the network initialized and trigger client code.
In the dao block requests there are some fixes as well which should make the block deliver more stable.
This work is based on @jmacxx draft PR #6946.