You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 3, 2023. It is now read-only.
When a new Node registers to the Network, there is a chance that Nodes already registered to the Network will reject the next Block. The blocks are usually rejected with validity code 11:
After some testing, this is my current theory as to what is going on:
When a Node registers, it might delay processing of incoming traffic. This could result in an incoming block being processed, after the TransactionQueue.worker() has already called Consensus.pickValidators(). Because of that, Networking.validators has already a new set of validators, and the delayed Block might get checked against these validators, and consequently fail.
This could be prevented, by having another object store the previous validators, or delay the call Consensus.pickValidators(). The first option seems safer to me.
I created a quick dirty fix, so we can test my theory. It is not perfect, the checks could later be implemented in Blockchain.validateBlock() itself, but this should be good enough for testing.
During testing for #16, I found out that, if a Node registers between the voting on a Block and sharing of an accepted Block, the newly registered Node will reject said Block, and later cause a desync in the Blockchain. #16 may fix the desync, because the newly registered Node will eventually be rejected by the Network, thus recovering.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
bugSomething isn't workingtest-networkIssue appears in the test-network branch
When a new Node registers to the Network, there is a chance that Nodes already registered to the Network will reject the next Block. The blocks are usually rejected with validity code 11:
Cypher/src/blockchain.js
Lines 397 to 398 in a48b1f4
This means that the number of validators listed in the Block does not match the expected number of validators. I currently dont know what causes this.
The text was updated successfully, but these errors were encountered: