Skip to content

Conversation

@catbref
Copy link
Collaborator

@catbref catbref commented Apr 18, 2018

No description provided.

catbref added 2 commits April 16, 2018 22:21
During synchronization, receiving peer rolls back to last common block
and then requests block from sending peer.

However if sending peer is on a fork then block heights will differ
causing confusion.

Now we reject synchronization from peers with conflicting block heights,
letting network consensus decide the valid fork.

Also, don't send bulk block signatures if we're synchronzing ourselves
as there's a small chance we might try to send a block we're
just about to roll back.
Revived previously disabled peer blacklisting. Peers are blacklisted if something causes an exception during synchronization. Blacklisting expires after 1 day.
Peers can be manually blacklisted via API using POST /peers/blacklist {IPaddress}
All peers can be de-blacklisted using the existing DELETE /peers API call

During synchronization, fixed peer's block height checking by using forked-DB's block height, not main DB's block height. Also sleep 5 seconds between chunks of 500 blocks to reduce network load.

Fixed peer buildtime messages. Timestamp was constructed incorrectly in Controller to start with, and parsed incorrectly in VersionMessage.

In networking, don't even try to connect to our own IP address or accept connections from our own IP address.
See Network.isHostLocalAddress()

Reduced logging output at INFO level by bumping some log entries down to DEBUG or even TRACE.

Some more code tidying.
@catbref catbref merged commit 4449b2a into Qoracoin:master Apr 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant