This removes the burden on the message handler thread when many sig batches
arrive. The expensive part of deserialization is now performed in the sig
shares worker thread.
This also removes the need for the specialized deserialization of the sig
shares which tried to avoid the malleability check, as CBLSLazySignature does
not perform malleability checks at all.
In some cases it takes too much time to perform full deserialization of
BLS signatures in the message handler thread. Better to just read the
buffer and do the actual deserialization when the signature is needed for
the first time (which is can be in another thread).
This adds the reading side of a pipe to the read-set when calling select().
Writing to the writing side of the pipe then causes select() to wake up
immediately. Otherwise it would wait for the timeout of 50ms, even if there
is data that could possibly be sent.
This is useful when many messages need are pushed with optimistic send being
disabled. After all messages have been pushed, WakeSelect() can then wakeup
the select() thread and force a re-check for pending data to send.
This is currently only implemented for POSIX compliant systems as we assume
that heavy-load daemons (like masternodes) are usually run on Linux.
Profiling has shown that optimistic send causes measurable slowdowns when
many messages are pushed, even if the sockets are non-blocking. Better to
allow disabling of optimistic sending in such cases and let the network
thread do the actual socket calls.
* Fix incorrect usage of begin() when genesis block is requested in "protx diff"
.begin() on mapBlockIndex does NOT return the genesis block, but just the
block with lowest hash.
The fix is to use chainActive[0] to get the genesis block.
* Update src/evo/simplifiedmns.cpp
Co-Authored-By: codablock <ablock84@gmail.com>
* Do not process blocks in CDeterministicMNManager before dip3 activation
This should save us some cpu/disk on initial sync/reindex
* Write initial snapshot on dip3 activation
* Drop registry deletion of the old key
* Drop no longer used CGovernanceObjectVoteFile::RemoveOldVotes()
* Drop temporary disconnect code and bump min protos to 70213
* drop comment
* fix
* Do not access wallet directly from masternodelist ui, use wallet model instead
* Don't access deterministicMNManager from UI directly, use client model instead
* Send just a general signal to UI elements when mn list has changed and let them handle it in their specific ways
* Drop mn list update timers and use signals instead
* some cleanup
* Move initial UI update to init.cpp
* Refactor getMasternodeList()
* Rename setMasternodeCount to updateMasternodeCount
* Drop legacy code in comments
* Drop NotifyMasternodeListChanged from uiInterface and use NotifyBlockTip instead
8e209340c85fc2493d7d1d7affe7e316bb613cbd build: Add CLIENT_VERSION_BUILD to CFBundleGetInfoString (fanquake)
Pull request description:
As mentioned in #14697, if you download the `0.17.0.1` dmg, and inspect the `.app` bundle, the version in the GetInfo string reads `0.17.0`, which is confusing given you're expecting `0.17.0.1`:
<img width="391" alt="0 17 0 1" src="https://user-images.githubusercontent.com/863730/48300032-fbb54b00-e510-11e8-9bcd-77e1fffffc63.png">
This PR adds `CLIENT_VERSION_BUILD` to the string, so that the full version number is displayed, i.e:
<img width="327" alt="this pr" src="https://user-images.githubusercontent.com/863730/48300015-7893f500-e510-11e8-98b9-80424719a082.png">
Tree-SHA512: f553253d03283639cc4dda00c8004b5c63ae2b489762e5e8c666166e71b14e672792c1df678f87484d51d153b5781c5ec1b145774096600f504833024ae8baea
* Implement secure verification in bls_batchverifier
* Rename CBLSInsecureBatchVerifier to CBLSBatchVerifier
* Add unit tests for simple BLS verifcation and CBLSBatchVerifier
No need to send gobject inv for a single gobject, the other node already knows it, so send votes only.
Also, no need to send "fake" stats like "0 votes" when syncing gobjects and "1 object" when syncing votes.
Rename functions accordingly.
* Store quorumHash of first mined commitment in evoDb
This allows to skip scanning for quorums below this block.
* Speed up CQuorumManager::ScanQuorums
This does 2 things:
1. Only call HasQuorum for blocks that are potentially a quorumBlockHash
These are only blocks which are at index 0 of each DKG interval
2. Stop scanning for quorums when we get below the first block that
contained a commitment. If no commitment was ever mined, we bail out
immediately.
* Return result instead of {}
* Remove HasQuorum() call as GetQuorum already does this
* Remove unnecessary "if (!qc.IsNull()))"
It's already checked at the top of the loop
* When necessary, remove DB_FIRST_MINED_COMMITMENT from evoDb in UndoBlock
db07f91 Assert that what might look like a possible division by zero is actually unreachable (practicalswift)
Tree-SHA512: f1652eb37196a5b72f356503a1fbb44fb98aa8a94954ad1765f86d81ebf41a2337d4eb58c4f19937fda3752f5d2d642756e44afdbd438015b87ac20801246bff
* Check aggPubKey for IsValid() instead of aggSig
aggSig is not reliable here as it might already be initialized by the
previous message.
* Significantly reduce sleep time for each DKG phase
Turns out the DKG is much faster then expected, and waiting multiple
minutes for each phase in a devnet is not much fun.
* Correctly use SIGN_HEIGHT_OFFSET when checking for out of bound height
* Introduce startBlockHeight to make things more explicit
* Allow sub-batch verification in CBLSInsecureBatchVerifier
* Implement batch verification of CDKGDebugStatus messages
* Use uint8_t for statusBitset in CDKGDebugMemberStatus and CDKGDebugSessionStatus
No need to waste one byte per member and per LLMQ type.
* Reserve 4k of buffer for CSerializedNetMsg buffer
Profiling has shown that a lot of time is spent in resizing the data
vector when large messages are involved.
* Remove nHeight from CDKGDebugStatus
This field changes every block and causes all masternodes to propagate
its status for every block, even if nothing DKG related has changed.
* Leave out session statuses when we're not a member of that session
Otherwise MNs which are not members of DKG sessions will spam the network
* Remove receivedFinalCommitment from CDKGDebugSessionStatus
This is not bound to a session and thus is prone to spam the network when
final commitments are propagated in the finalization phase.
* Add "minableCommitments" to "quorum dkgstatus"
* Hold cs_main while calling GetMinableCommitment
* Abort processing of pending debug messages when spork18 gets disabled
* Don't ask for debug messages when we've already seen them
"statuses" only contains the current messages but none of the old messages,
so nodes kept re-requesting old messages.
fa7da3f [contrib] gh-merge: Move second sha512 check to before signing (MarcoFalke)
Tree-SHA512: b3d96f928a013f6fdc416035b8ef5cd7c750ab0922156e1fd712cd27ec75847497109f43a96559b945ba11ad43b5644ed9c1de695590ff608658628fb57b1571
ad1ae7a Check and enable -Wshadow by default. (Pavel Janík)
9de90bb Do not shadow variables (gcc set) (Pavel Janík)
Tree-SHA512: 9517feb423dc8ddd63896016b25324673bfbe0bffa97f22996f59d7a3fcbdc2ebf2e43ac02bc067546f54e293e9b2f2514be145f867321e9031f895c063d9fb8