UdjinM6
fbf0dcb086
Various small cleanups ( #2761 )
...
* Fix remaining `print`s in tests
* use AssertLockHeld(cs) instead of relying on comments
* actually use `clsig` in `EnforceBestChainLock()`
* fix log output in `EnforceBestChainLock()`
* drop comments
2019-03-11 16:32:26 +03:00
Alexander Block
588eb30b86
Fix deadlock in CSigSharesManager::SendMessages ( #2757 )
...
* Fix deadlock in CSigSharesManager::SendMessages
Locking "cs" at this location caused a (potential) deadlock due to changed
order of cs and cs_vNodes locking. This changes the method to not require
the session object anymore which removes the need for locking.
* Pass size of LLMQ instead of llmqType into CSigSharesInv::Init
This allows use of sizes which are not supported in chainparams.
2019-03-11 16:31:51 +03:00
-k
7b24f9b8b3
Drop --c++11 brew flag in build-osx.md ( #2755 )
...
* fix brew flag typo
* drop c++11
2019-03-11 11:16:28 +03:00
UdjinM6
9f40afce86
Merge pull request #2727 from PastaPastaPasta/backports-0.15-pr7
...
Backports 0.15 pr7
2019-03-11 11:15:51 +03:00
Pasta
609114a803
Code review: re-add string cast in mininode.py
2019-03-08 17:05:10 -06:00
pasta
85ffc1d647
drop swap_outputs_in_rawtx
and DecimalEncoder
in smartfees.py
2019-03-08 14:28:00 -06:00
Alexander Block
bc593c84b7
Revert "Fix use of missing self.log in blockchain.py"
...
This reverts commit b06a6a2e74
.
2019-03-08 14:22:49 -06:00
Alexander Block
0e91ebcf42
Use logging framework in Dash specific tests
2019-03-08 14:22:40 -06:00
PastaPastaPasta
dd1245c2a9
Update dnsseed-policy.md ( #2751 )
...
* Remove irrelevant link in dnsseed-policy
* Link to dash-seeder in dnsseed-policy
instead of bitcoin-seeder
2019-03-08 21:21:20 +03:00
Alexander Block
64ae91268a
Merge pull request #2735 from codablock/pr_llmq_instantsend
...
Implement LLMQ based InstantSend
2019-03-08 11:32:44 +01:00
Alexander Block
06fc655595
Actually remove from finalInstantSendLocks in CInstantSendManager::RemoveFinalISLock
2019-03-07 21:15:09 +01:00
Alexander Block
041a1c26d0
Move safe TX checks into TestForBlock and TestPackageTransactions
...
Otherwise we'll miss checks for ancestors.
2019-03-07 21:15:09 +01:00
Alexander Block
4d3365ddb2
Completely disable InstantSend while filling mempool in autoix-mempool.py
...
Otherwise we overload Travis and tests start to randomly fail.
2019-03-07 21:15:09 +01:00
Alexander Block
fae33e03ae
Let ProcessPendingReconstructedRecoveredSigs return void instead of bool
...
Return value is unused and the method actually never returned something.
2019-03-07 21:15:09 +01:00
Alexander Block
f8f867a6bb
Sync blocks after generating in mine_quorum()
2019-03-07 21:15:09 +01:00
Alexander Block
3e60d2d2db
Adjust LLMQ based InstantSend tests for new spork20
2019-03-07 21:15:09 +01:00
UdjinM6
41a71fe443
update autoix-mempool.py to test both "old" and "new" InstantSend (and fix CheckCanLock to respect mempool limits)
2019-03-07 21:15:09 +01:00
UdjinM6
843b6d7a95
update p2p-autoinstantsend.py to test both "old" and "new" InstantSend
2019-03-07 21:15:09 +01:00
UdjinM6
a8da11ac5d
update p2p-instantsend.py to test both "old" and "new" InstantSend
2019-03-07 21:15:09 +01:00
UdjinM6
55152cb313
Move IS block filtering into ConnectBlock
2019-03-07 21:15:09 +01:00
Alexander Block
2299ee2836
Rename IXLOCK to ISLOCK and InstantX to InstantSend
2019-03-07 21:15:09 +01:00
Alexander Block
f5dcb00acf
Introduce spork SPORK_20_INSTANTSEND_LLMQ_BASED to switch between new/old system
2019-03-07 21:15:09 +01:00
Alexander Block
280690792a
Combine loops in CChainLocksHandler::NewPoWValidBlock
2019-03-07 21:15:09 +01:00
Alexander Block
9e9081110b
Add override keywork to CDSNotificationInterface::NotifyChainLock
2019-03-07 21:15:09 +01:00
Alexander Block
e2f99f4ae1
Set llmqForInstantSend for mainnet and testnet
2019-03-07 21:15:09 +01:00
Alexander Block
5b8344e8f8
Use scheduleFromNow instead of schedule+boost::chrono
2019-03-07 21:15:09 +01:00
Alexander Block
f44f09ca04
Fix crash in BlockAssembler::addPackageTxs
2019-03-07 21:15:09 +01:00
Alexander Block
baf8b81c4a
Fix no-wallet build
2019-03-07 21:15:09 +01:00
Alexander Block
2a7a5c6338
Only sign ChainLocks when all included TXs are "safe"
...
Safe means that the TX is either ixlocked or known since at least 10
minutes.
Also change miner code to only include safe TXs in block templates.
2019-03-07 21:15:09 +01:00
Alexander Block
96291e7a0f
Cheaper/Faster bailout from TrySignChainTip when already signed before
2019-03-07 21:15:09 +01:00
Alexander Block
0a5e8eb862
Move ChainLock signing into TrySignChainTip and call it periodically
...
Later commits will introduce checks for "safe TXs" which might abort the
signing on first try, but succeed a few seconds later, so we periodically
retry to sign the tip.
2019-03-07 21:15:09 +01:00
Alexander Block
bd7edc8ae9
Track txids of new blocks and first-seen time of TXs in CChainLocksHandler
2019-03-07 21:15:09 +01:00
Alexander Block
7945192ff6
Enforce IX locks from the new system
2019-03-07 21:15:09 +01:00
Alexander Block
dc97835ec6
Disable explicit lock requests when the new IX system is active
2019-03-07 21:15:09 +01:00
Alexander Block
68cfdc9325
Also call ProcessTx from sendrawtransaction and RelayWalletTransaction
2019-03-07 21:15:09 +01:00
Alexander Block
1d2d370cd0
Whenever we check for locked TXs, also check for the new system having a lock
2019-03-07 21:15:09 +01:00
Alexander Block
3a6cc2cc17
Show "verified via LLMQ based InstantSend" in GUI TX status
2019-03-07 21:14:31 +01:00
Alexander Block
34a8b2997a
Disable old IX code when the new system is active
2019-03-07 21:14:31 +01:00
Alexander Block
5ff4db0a05
Downgrade TXLOCKREQUEST to TX when new IX system is active
...
The new system does not require explicit lock requests, so we downgrade
TXLOCKREQUEST to TX and start propagating it instead of the original.
2019-03-07 21:14:31 +01:00
Alexander Block
1959f3e4a5
Handle incoming TXs by calling CInstantXManager::ProcessTx
...
This also includes handling of TXs that were previously orphanced
2019-03-07 21:14:31 +01:00
Alexander Block
83dbcc483f
Implement CInstantSendManager and related P2P messages
2019-03-07 21:14:31 +01:00
Alexander Block
5bbc122749
Implement PushReconstructedRecoveredSig in CSigningManager
...
We can reconstruct recovered sigs from other P2P messages to avoid
re-validation of those. We will do this later in InstantSend code.
2019-03-07 21:14:31 +01:00
Alexander Block
2bbac8ff77
Introduce NotifyChainLock signal and invoke it when CLSIGs get processed
2019-03-07 21:14:31 +01:00
UdjinM6
e47af29d41
Fix "chainlock" in WalletTxToJSON ( #2748 )
...
* Fix "chainlock" in WalletTxToJSON
* Add `AssertLockHeld(cs_main); // for mapBlockIndex`
* move assert higher
2019-03-07 16:29:37 +03:00
Alexander Block
e21d8d6b95
Fix error message for invalid voting addresses ( #2747 )
2019-03-07 16:29:24 +03:00
Alexander Block
80891ee6f7
Make -masternodeblsprivkey mandatory when -masternode is given ( #2745 )
2019-03-06 22:45:53 +03:00
Alexander Block
521d4ae08f
Implement 2-stage commit for CEvoDB to avoid inconsistencies after crashes ( #2744 )
...
* Let Commit() return void
The boolean return value will loose its meaning in the next commit
* Implement 2-stage commits for CDBTransaction and CScopedDBTransaction
CDBTransaction is changed to allow CDBBatch, CDBWrapper and other
CDBTransactions as parent instead of just CDBWrapper. This in turn allows
to implement multi-staged commits in CEvoDB.
We now have the "current transaction" which is started and ended (commit
or rollback) for each call to Connect-/DisconnectBlock. When the current
transaction is committed, it moves its contents into the "root transaction"
instead of directly writing to CDBWrapper.
CommitRootTransaction() then handles the final commitment to CDBWrapper. It
is called at the same time when the chainstate is flushed to disk, which
guarantees consistency between chainstate and CEvoDB.
* Allow to efficiently move values into parent transactions to avoid copies
When CDBTransaction<CDBTransaction<...>>::Commit() is called, we can avoid
copying values from this transaction to the parent transaction and instead
pass values by rvalue and let the contents be moved.
* Revert "Force FlushStateToDisk on ConnectTip/DisconnectTip while not in IBD (#2560 )"
This reverts commit 6dfceaba5a
.
2019-03-06 22:45:39 +03:00
UdjinM6
e63cdadc97
Add a button/context menu items to show QR codes for addresses ( #2741 )
...
* Add a button/context menu item to show qr codes for addresses in address book
* Add a context menu item to show qr code for addresses in transaction list
2019-03-06 22:45:22 +03:00
UdjinM6
b6177740c2
Add collateraladdress into masternode/protx list rpc output ( #2740 )
2019-03-06 08:01:03 +01:00
UdjinM6
b5466e20a9
Add "chainlock" field to more rpcs ( #2743 )
2019-03-06 08:00:47 +01:00