- It is more safe to separate the BTC_DAO_TESTNET and BTC_DAO_REGTEST
by the network ID as that prevents on the P2P network layer that the
network could interconnect. We would have risked that we receive network
data from the other network as users would use the persisted peers for
connections.
In case of an invalid tx we burn all available BSQ input. We only know
that at parsing time. We renamed the burntFee field to burntBsq to make
it more generic and use it for the burnt fee in case if a normal tx and
as invalidatedBsq in case of an invalid tx.
When using onParseBlockChainComplete and
onParseBlockCompleteAfterBatchProcessing the
onParseBlockCompleteAfterBatchProcessing is called earlier as
onParseBlockChainComplete which caused incorrect state update in the UI.
- We add a filter to the getMeritStake method to avoid an exception at
getWeightedMeritAmount which would set merits to 0 in case the issuance
height blind would be larger than the vote height. I saw that error log
but could not reproduce it afterwards. It basically protects that we do
not add the issuance of the current cycle to the merit used in the
blind vote of that cycle.
- We add 1 block in the getCurrentlyAvailableMerit method to get the
same merit value if the blind vote was included in the next block.
We want to avoid that all nodes publish at the same time all proposals,
so we add a random delay from 100 ms - 5 sec.
A more sophisticated protection would be probably good but that delay
should help to avoid network spikes and is simple enough to not add
risks that the publishing would fail.
Set proposals which have been not included in the blind vote but which
have been later published and are part if the cycles proposals to
rejected.
A malicious voter could manipulate the software to withhold publishing
of his proposal and be the only voter on it. At the last block in the
blind vote phase he could publish the proposal but others cannot vote
anymore as they likely have already voted. In the vote result the
other voters would have treated it like ignored and if the voter had
enough BSQ to pass the quorum he could get accepted his proposal.
With this change we set all proposals which are not part in the blind
vote data but found in the cycle's ballot list as rejected.