a0daea459cf4812fbdda9a7ead131a73f5856c09 [build] depends macOS: point --sysroot to SDK (Sjors Provoost)
Pull request description:
Fixes errors like `fatal error: 'unistd.h' file not found` when building depends on macOS.
Replaces #14352 (which doesn't work on Catalina).
ACKs for top commit:
jonasschnelli:
utACK a0daea459cf4812fbdda9a7ead131a73f5856c09
Tree-SHA512: 995b1e1e84e635b32d1d4038bc63730c94a7c318b7240f6d62825977e5c97fe52c5aa5a0f39070beb0df8271dd294b36d6b5cf7f09ad07494fb15d5bd4d77f68
* Fix cache usage in SelectCoinsGroupedByAddresses
* Reset cache flags in SelectCoinsGroupedByAddresses when a block is (dis)connected
* MakeCollateralAmounts should call SelectCoinsGroupedByAddresses with a limited number of inputs
* Always check for expired queues on masternodes
* Check if a queue is too old or too far into the future
Instead of only checking that it's to old
* Check that no masternode can spam us with dsqs regardless of dsq readiness
* Ignore recent rejects filter for locked txes
If we had a conflicting tx in the mempool before the locked tx arrived and the locked one arrived before the corresponding islock (i.e. we don't really know it's the one that should be included yet), the locked one is going to be rejected due to a mempool conflict. The old tx is going to be removed from the mempool by an incoming islock a bit later, however, we won't be able to re-request the locked tx until the tip changes because of the recentRejects filter. This patch fixes it.
* Add some explanation
Turned out that this causes SelectCoinsMinConf to (unnecessary) lean towards selecting mempool txes which can cause "too long mempool chain" error even when there are more funds to spend.
* Remove check for mempool size in CInstantSendManager::CheckCanLock
This should not have been here at all and is already removed in develop.
Recent InstantSend failures on mainnet were partly related to this check.
* Skip autois tests for new IS system
* Split ProcessPendingInstantSendLocks into two methods
* Split SelectQuorumForSigning into SelectQuorumForSigning and GetActiveQuorumSet
* Implement retrying of IS lock verification when the LLMQ active set rotates
* Remove unused overload of RemoveInstantSendLock
* Move deletion of recovered sigs into own method
* Remove recovered sigs for fully confirmed IS locks
* Also remove rs_t entries when removing recovered sigs from the outside
CleanupOldRecoveredSigs already does this as the last step, but when
RemoveRecoveredSig is called from the outside (e.g. from InstantSend),
these keys are not removed. This PR fixes this by storing the write time
into rs_r and later uses it to remove the rs_t entry.
Old entries will be incompatible with this (1 byte written in the past,
4 bytes written now). This checked by comparing the data size with
sizeof(uint32_t).
* Add TODO
* Implement GetInstantSendLockCount in CInstantSendManager
* Add islockCountChanged signal to client model
* Show number of InstantSend locks in debug console
* Implement CompactFull() in CDBWrapper
This allows to compact the whole DB in one go.
* Implement more compact version of CDeterministicMNListDiff
This introduces CDeterministicMNStateDiff which requires to only store
fields on-disk which actually changed.
* Avoid writing mnUniquePropertyMap to disk when storing snapshots
This map can be rebuilt by simply using AddMN for each deserialized MN.
* Implement Serialize/Unserialize in CScript
This allows us to directly use READWRITE() on scripts and removes the need
for the ugly cast to CScriptBase. This commit also changes all Dash specific
uses of CScript to not use the cast.
* Keep track of registeration counts and introduce internalID for masternodes
The "internalId" is simply the number of MNs registered so far when the
new MN is added. It is deterministic and stays the same forever.
* Use internalId as keys in MN list diffs
This reduces the used size on-disk.
* Two simple speedups in MN list diff handling
1. Avoid full compare if dmn or state pointers match in BuildDiff
2. Use std::move when adding diff to listDiff in GetListForBlock
* Implement upgrade code for old CDeterministicMNListDiff format to new format
* Track tipIndex instead of tipHeight/tipBlockHash
* Store and pass around CBlockIndex* instead of block hash and height
This allows us to switch CDeterministicMNManager::GetListForBlock to work
with CBlockIndex.
* Refactor CDeterministicMNManager::GetListForBlock to require CBlockIndex*
Instead of requiring a block hash. This allows us to remove blockHash and
prevBlockHash from CDeterministicMNListDiff without the use of cs_main
locks in GetListForBlock.
* Remove prevBlockHash, blockHash and nHeight from CDeterministicMNListDiff
* Remove access to determinisitcMNManager in CMasternodeMetaMan::ToString()
The deterministic MN manager is not fully initialized yet at the time this
is called, which results in an empty list being returned everytime.
* Better logic to determine if an upgrade is needed
Reuse the "best block" logic to figure out if an upgrade is needed. Also
use it to ensure that older nodes are unable to start after the upgrade
was performed.
* Return null block hash if it was requested with getmnlistdiff
* bump CGovernanceManager::SERIALIZATION_VERSION_STRING
* Check SERIALIZATION_VERSION_STRING before deserializing anything else
* Invoke Clear() before deserializing just to be sure
* Merge #12783: macOS: disable AppNap during sync
1e0f3c44992fb82e6bf36c2ef9277b0759c17c4c macOS: disable AppNap during sync (Alexey Ivanov)
Pull request description:
Code based on pull/5804. Tested only on macOS 10.13.3 and should support 10.9+.
What macOS versions bitcoin core currently supports?
Tree-SHA512: 85809b8d8d8a05169437b4268988da0b7372c29c6da3223ebdc106dc16dcb6d3caa5c52ace3591467005b50a63fd8b2ab1cb071cb4f450032932df25d5063315
* Refactor
* Drop `#include <memory>` from `src/qt/bitcoingui.h`
Was included by mistake.
* Specialize Serialize(CSizeComputer&) for BLS objects
Speeds up size computation for BLS objects.
* Track memory usage in CDBTransaction and CEvoDB
* Take memory used by CEvoDB/CDBTransaction into account when flushing
* Implement specialized SerReadWrite for immer maps
This allows to use READWRITE and fixes compilation errors with CSizeComputer
* Log EvoDB memory usage independently
Co-Authored-By: UdjinM6 <UdjinM6@users.noreply.github.com>
* Retry downloading of depends sources 3 times
* Manually invoke apt-get update and install instead of using addon
This allows us to use travis_retry on these operations.
* Add exception for depends/Makefile in .gitignore
* Remove --retry from curl call
This avoids future confusion as we don't rely on curl anymore to properly
retry downloads. curls does only retry on transient errors, while Travis
might cause all kinds of errors which circumvent the retry logic of curl.
No need to load 25 quorums when we're scanning for the larger quorums which
only have 4 active quorums. This avoids loading thousands of masternode
lists unnecessarily.
* Remove skipped denom from the list on tx commit
Regardless of the tx type (PS or not).
* Update src/privatesend/privatesend-client.cpp
Co-Authored-By: Alexander Block <ablock84@gmail.com>
* Generalize CBLSLazyWrapper so that it can be used of pubkeys and secret keys
* Implement == and != operators for CBLSLazyWrapper
* Implement cached hash for CBLSLazyWrapper
* Use CBLSLazyPublicKey for CDeterministicMNState::pubKeyOperator
* Speed up GetProjectedMNPayees by sorting the MN list by last paid
Instead of updating a temporary list for each projected height and calling
GetMNPayee() on it.
* Cache intermediate lists in GetListForBlock
This avoids re-loading and applying diffs again and again.
* Only update masternode list UI max once every 3 seconds
This avoids updating the UI on every block, which turned out to be very
expensive.
* Fix compilation
* Drop time restrictions for mn list update in ClientModel
They are fully handled by MasternodeList now.
NotifyMasternodeListChanged is called before the tip is updated which means we can't rely on GetListAtChainTip() and have to pass the list into CClientUIInterface