Merged
Conversation
Prior commits relate to supporting a limited size network. It looks like there is an edge case where it is possible for a hash to be in the mapIndex, without a pindex. If a block with such a hash is tried to be Accepted, the AcceptBlockHeader returns true but with a null pindex, and AcceptBlock fails. The code says that this indicates that the hash was added from a blockheader without a block, but I didn’t see that happening. In any case, it happens a lot on a 2 node network. So much so that if one node is just mining, before too long the other node will not accept the block and once that happens, no subsequent block would work as the prior block is missing. Of course, with more nodes, these blocks will be around a lot more and likely it won’t be such an issue, but not so sure that it doesn’t require restarting the node to get it back on track again. These prior commits implement a KOMODO_LIMITED_NETWORKSIZE logic where if it sees that a block has come in which is in the mapIndex but has no pindex, it automatically addtoblockindex. There is one edge case still left where both the current block being processed and its previous block are in this limbo state. Since the pindex is not mapped to the block, it is problematic to retrieve the CBlock for the pprev and without the valid pprev the pindex will have a null pprev and no nHeight set. It is possible that all the other code will properly deal with such a case and automatically fix it, but rather than rely on that, in such a case the automatic addtoblockindex is not done. A node in such a state would need to exit and restart or somehow fill in the data from other nodes. From what I can tell, the above is the main reason why the PoS/PoW networks were having problems staying in sync. Since even with one mining node, it was just a matter of time before the other node got stuck, with more than one mining node we end up with independent forks that won’t reconcile until the node is restarted.
Fix polarity of compare
himu007
pushed a commit
that referenced
this pull request
Dec 16, 2018
ca333
pushed a commit
that referenced
this pull request
Feb 24, 2019
jl777
pushed a commit
to radix42/komodo
that referenced
this pull request
Apr 17, 2019
- More constrained vins/vouts - Fixed CC marker value - Added validation of ChannelsOpen in all tx - Switched to LOGSTREAM for logging
jl777
added a commit
to radix42/komodo
that referenced
this pull request
Apr 17, 2019
Updated ChannelsCC validation (GLEECBTC#20)
ca333
pushed a commit
that referenced
this pull request
Nov 18, 2021
Support for CLTV txns in wallet, NSPV fixes and improvement
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.