Commit Graph

16021 Commits

Author SHA1 Message Date
Alexander Block
44a3b9c90f Don't use pindex->GetBlockHash() in ProcessCommitment
The block hash is not necessarily set at this point, for example when
coming from TestBlockValidity().
2019-04-04 12:27:35 +02:00
Alexander Block
f9dbe3ed50 Track in which block a quorum commitment was mined
And return it in GetMinedCommitment and the "quorum info" RPC
2019-04-04 12:27:35 +02:00
Alexander Block
ba459663be Add deletedQuorums and newQuorums to CSimplifiedMNListEntry 2019-04-04 12:27:35 +02:00
Alexander Block
8f7929bed8 Implement and enforce quorum commitment merkle roots in coinbases
This bumps CCbTx::CURRENT_VERSION to 2 and enforces the new version after
DIP8 BIP9 activation.
2019-04-04 12:27:35 +02:00
Alexander Block
07620746a5 Implement GetMined(AndActive)CommitmentsUntilBlock and use it in ScanQuorums
This fixes a bug in ScanQuorums which made it return quorums which were not
mined at the time of pindexStart. This was due to quorumHashes being based
on older blocks (the phase=0 block) which are ancestors of pindexStart even
if the commitment was actually mined in a later block.

GetMinedAndActiveCommitmentsUntilBlock is also going to be used for quorum
commitment merkle roots in CCbTx.

This also removes GetFirstMinedQuorumHash as it's not needed anymore.
2019-04-04 12:27:35 +02:00
Alexander Block
d5250a333a Track at which height a quorum commitment was mined
Also add upgrade code to allow smooth upgrades from v13 to v14.
2019-04-04 12:27:35 +02:00
Alexander Block
806948f90e Store the full commitment in CQuorum
Instead of just individual fields of it.
2019-04-04 12:27:35 +02:00
Alexander Block
b67f6a0dc6 Implement CDBTransactionIterator
This iterator allows merged iteration of the key/values from the parent and
the not-yet-committed key/values from the transaction. This also works for
nested transactions (as used in CEvoDB).

It's interface mimics CDBIterator.
2019-04-04 12:27:35 +02:00
Alexander Block
6d1599bc68 Change CDBTransaction to compare keys by their serialized form
...instead of comparing by using the keys < operator.
There are 2 reasons for this:
1. This better mimics the behavior of CDBWrapper. Otherwise there is
   a chance of discrepancy when it comes to key equality.
2. Next commit will introduce CDBTransactionIterator, which relies on
   CDBTransaction and CDBWrapper being compatible in the way keys are
   compared.
2019-04-04 12:27:35 +02:00
Alexander Block
5482083eba Support passing CDataStream as key into CDBWrapper/CDBBatch/CDBIterator
This allow to pre-serialize keys in advance and pass the serialized form
into these classes.
2019-04-04 12:27:35 +02:00
Alexander Block
92c1cdcb81
Merge pull request #2832 from codablock/pr_dip4_tests
Implement DIP4 integration tests
2019-04-04 12:26:38 +02:00
UdjinM6
c23dfaf573
Update qa/rpc-tests/dip4-coinbasemerkleroots.py
Co-Authored-By: codablock <ablock84@gmail.com>
2019-04-04 11:46:52 +02:00
Alexander Block
9f2e5d0852 Use FromHex to deserialize block header 2019-04-04 10:42:13 +02:00
Alexander Block
999848432a Implement dip4-coinbasemerkleroots.py integration tests 2019-04-04 10:39:15 +02:00
Alexander Block
ade5760a92 Allow registering MNs without actually starting them
This can be done by calling prepare_masternode() when inside run_test.
Also implement remove_masternode() which spends the collateral.
2019-04-04 10:39:15 +02:00
Alexander Block
ef6b6a1e64 Implement support for GETMNLISTD and MNLISTDIFF P2P message in mininode.py 2019-04-04 10:39:15 +02:00
Alexander Block
585b9c2818 Make CBlock.get_merkle_root static
We'll later need this method to calculate merkle roots outside of CBlock.
I'd like to avoid moving this code outside of CBlock as it might later
conflict with Bitcoin backports.
2019-04-04 10:39:15 +02:00
Alexander Block
1e0bdbc9b7 Implement CPartialMerkleTree and CMerkleBlock in mininode.py
Needed for upcoming MNLISTDIFF message support.
2019-04-04 10:39:15 +02:00
Alexander Block
297c266e91
Merge pull request #2831 from codablock/pr_v13_release
[0.13.x] Bump version to 0.13.3.0 and add release notes
2019-04-04 10:33:03 +02:00
UdjinM6
7022e83432
Update doc/release-notes.md
Co-Authored-By: codablock <ablock84@gmail.com>
2019-04-04 09:32:24 +02:00
Alexander Block
317ca5003b Add release notes for 0.13.3.0 2019-04-04 09:23:12 +02:00
Alexander Block
25038ff36e Bump version to 0.13.3.0 2019-04-04 09:02:09 +02:00
Alexander Block
53b2162e28
Harden spork15 value to 1047200 when on mainnet (#2830)
This is a hackish version of https://github.com/dashpay/dash/pull/2824,
meant for 0.13.x only. The reason for this hackish version is that the
code has diverged quite a bit and its not worth the effort to backport
the hardening code.

Even though 0.13.x included a lot of fixes for sporks handling and syncing,
I still feel more safe with hardening the spork15 block height. If
something goes wrong with spork syncing (e.g. its slower then the first
DIP2/3 block arrives), the whole sync process will fail otherwise.
2019-04-04 09:01:28 +02:00
Alexander Block
3db4e3111d
Merge pull request #2828 from codablock/pr_v13_backports
[0.13.x] Backports from develop
2019-04-04 08:35:21 +02:00
Alexander Block
d8778f5554 Implement CService in mininode.py 2019-04-04 08:24:38 +02:00
Alexander Block
02480402be Implement deser_dyn_bitset and ser_dyn_bitset in mininode.py 2019-04-04 08:24:33 +02:00
Alexander Block
575cafc011 Do not skip pushing of vMatch and vHashes in CMerkleBlock (#2826)
Even if its a TX type which we don't want in merkle blocks. Wrongfully
omitting the pushes causes invalid partial merkle trees, which in turn
causes SPV nodes to ban us.
2019-04-04 08:21:52 +02:00
Alexander Block
b0850fad06
Do not skip pushing of vMatch and vHashes in CMerkleBlock (#2826)
Even if its a TX type which we don't want in merkle blocks. Wrongfully
omitting the pushes causes invalid partial merkle trees, which in turn
causes SPV nodes to ban us.
2019-04-04 08:11:04 +02:00
UdjinM6
8c58799d8d There can be no two votes which differ by the outcome only (#2819) 2019-04-04 07:28:12 +02:00
UdjinM6
66c2f39531 Fix vote ratecheck (#2813) 2019-04-04 07:27:11 +02:00
gladcow
b52d0ad194 Fix revoke reason check for ProUpRevTx (#2787) 2019-04-04 07:26:53 +02:00
UdjinM6
35914e0842 Skip mempool.dat when wallet is starting in "zap" mode (#2782) 2019-04-04 07:26:30 +02:00
UdjinM6
46d875100b Disable in-wallet miner for win/macos Travis/Gitian builds (#2778)
* Add new configure option to disable in-wallet miner

* Use new option to disable in-wallet miner for win/macos Travis/Gitian builds
2019-04-04 07:26:12 +02:00
Alexander Block
122566768e
Specify DIP3 enforcement block height/hash for mainnet params (#2824) 2019-04-04 06:39:38 +02:00
Nathan Marley
58589fb50a Trivial: Fix a couple typos (#2818)
* sp: s/signReqeust/signRequest/g

* sp: s/documenation/documentation/
2019-04-04 06:39:28 +02:00
UdjinM6
992922c495 Specify DIP3 enforcement block height/hash for mainnet params 2019-04-03 12:15:41 +03:00
Alexander Block
a370bbfe3d Update immer library to current master (0a718d2d76bab6ebdcf43de943bd6c7d2dbfe2f9) (#2821)
* Update immer library to current master (0a718d2d76bab6ebdcf43de943bd6c7d2dbfe2f9)

* Temporary fix for alignof(std::max_align_t) on MinGW 32bit builds

See https://github.com/arximboldi/immer/issues/78
2019-04-01 14:10:49 +03:00
UdjinM6
9f04855ae0
Fix blsWorker (#2820)
Use a pointer instead of a static variable, start/stop together with other llmq modules.
2019-04-01 14:10:39 +03:00
UdjinM6
377dd3b822
There can be no two votes which differ by the outcome only (#2819) 2019-04-01 14:10:28 +03:00
UdjinM6
a87909ec35
Keep the most recent gobject votes only (#2815)
* Keep the most recent gobject vote only

We don't need to store full vote data for old votes - we never relay them to other nodes anyway.
Still keep old hashes to avoid re-requesting data etc.

* add comment

* Drop getvotes rpc

* Compare vote signals, do not compare hashes

Also add comments
2019-04-01 14:10:01 +03:00
Alexander Block
010752d4eb Set fAllowMultiplePorts to true for testnet (#2817)
On testnet it's quite usual to have multiple MNs on the same IP. Now that
we have LLMQs and DKGs which require deterministic intra quorum connections,
we must allow them to connect to each other even if the IPs are shared very
often.
2019-03-30 17:55:34 +03:00
Nathan Marley
74d999e568 Remove watchdogs from existence (#2816) 2019-03-30 17:55:20 +03:00
thephez
bfc288afb4 Update getblock rpc help text (#2814) 2019-03-30 17:55:04 +03:00
UdjinM6
aeba4afce9
Fix vote ratecheck (#2813) 2019-03-30 17:54:39 +03:00
UdjinM6
ad7defba92
Drop all kind of invalid votes from all types of gobjects (#2812)
* Drop all kind of invalid votes from all types of gobjects

Currently we only do so for proposal "funding" votes which looks incomplete.

* Apply review suggestions
2019-03-30 17:54:22 +03:00
thephez
e75760fa7c Update "listtransactions" and "listsinceblock" RPC help (#2811)
- Move "confirmations" to match actual RPC output order
2019-03-30 14:30:30 +01:00
UdjinM6
8987a6c3e0
Update "debug" rpc help text (#2810)
* Update "debug" rpc help text

* add missing "qt" category

* add a note about non-matching categories
2019-03-28 12:15:54 +03:00
UdjinM6
4b4234f390
Refactor: fix layer violation for LLMQ based IS in UI (#2808)
Ignoring the same issue for legacy IS because it's going to be removed later.
2019-03-27 11:42:27 +03:00
UdjinM6
614cb6c2e6
Fix getgovernanceinfo rpc help text (#2809) 2019-03-27 10:34:40 +03:00
UdjinM6
39ba45f3c7
Show chainlocked txes as fully confirmed (#2807) 2019-03-27 10:34:22 +03:00