Commit Graph

15177 Commits

Author SHA1 Message Date
Alexander Block
b5947f2997 Implement BuildSimplifiedDiff in CDeterministicMNList
And use it instead of BuildDiff in DIP4
2018-11-15 10:42:39 +01:00
Alexander Block
6edad37457 Use ForEachMN and GetMN in BuildDiff instead of directly accessing mnMap 2018-11-15 10:41:14 +01:00
Alexander Block
f4ec3db067
Merge pull request #2442 from UdjinM6/spectx
Various fixes for special txes
2018-11-15 05:18:44 +01:00
Alexander Block
684f9ae0bf
Merge pull request #2445 from codablock/pr_dip3_removerestriction
Remove restriction of payeeAddress being the same as collateralAddress
2018-11-15 05:17:43 +01:00
Alexander Block
d130f25ac3 Fix check for number of params to protx_update_service (#2443) 2018-11-14 18:57:17 +01:00
Alexander Block
f5864254cf Do not use keyIDCollateralAddress anymore when spork15 is active 2018-11-14 18:44:39 +01:00
Alexander Block
5ccf556f3a GetMasternodeInfo with payee argument should do nothing when DIP3 is active
Also change ComputeBlockVersion to directly use mnList.GetMNPayee()
2018-11-14 18:44:39 +01:00
Alexander Block
927e8bd796 Also forbid reusing collateral key for owner/voting keys
We previously only checked for the payee key.
2018-11-14 18:44:39 +01:00
Alexander Block
826e7d063a Move internal collateral check to the else branch of the external collateral check 2018-11-14 18:44:39 +01:00
Alexander Block
dc404e7550 Allow P2SH for payout scripts 2018-11-14 18:44:39 +01:00
Alexander Block
9adf8ad738 Remove restriction that forced use of same addresses for payout and collateral 2018-11-14 18:44:39 +01:00
Alexander Block
7c1f110893
Revert #2441 and retry fixing (#2444)
* Revert "Restart MNs in DIP3 tests even if collateral has not moved (#2441)"

This reverts commit 153afb9062.

* Reuse old legacy MN key when upgrading to protx
2018-11-14 18:40:31 +01:00
UdjinM6
6761fa49f1 More checks for tx type 2018-11-14 16:59:10 +03:00
UdjinM6
b843696638 Be more specific about tx version in conditions
We don't want to set rules for version 4+ txes atm.
2018-11-14 16:58:05 +03:00
UdjinM6
c975a986b2 no cs_main in specialtxes 2018-11-14 16:58:03 +03:00
UdjinM6
8bd5b231bf Log mempool payload errors instead of crashing via assert 2018-11-14 16:57:41 +03:00
UdjinM6
658b7afd18 Make error messages re payload a bit more specific 2018-11-14 16:57:41 +03:00
Alexander Block
153afb9062 Restart MNs in DIP3 tests even if collateral has not moved (#2441)
These need to be restarted even in this case as keys are cycled when
upgrade_mn_protx is called. This resulted in invalid IX votes but was not
noticed because only 2 MNs were affected (still 8 of 10 votes succesful)
2018-11-13 15:24:30 +03:00
Alexander Block
4ad2f647c2 Use proTxHash instead of outpoint when calculating masternode scores (#2440)
* Track confirmedHash of masternodes

* Also include confirmedHash in DIP4

* Implement CalculateQuorum and CalculateScores in CDeterministicMNList

* Use new ProRegTx based scoring function in GetMasternodeScores

* Update test vectors for simplifiedmns_merkleroots tests
2018-11-13 15:24:14 +03:00
UdjinM6
adf9c87e2e
Fix protx/bls rpc help (#2438) 2018-11-13 15:23:52 +03:00
UdjinM6
579c83e881
Add coinbase_payload to getblocktemplate help (#2437) 2018-11-13 15:23:31 +03:00
Alexander Block
3685c85e7f Show BIP9 progress in getblockchaininfo (#2435)
* Implement VersionBitsCountBlocksInWindow

This gives the count of blocks that voted for the given BIP9 deployment

* Add additional information to BIP9 softforks returned by getblockchaininfo

* make sure progress doesn't exceed 1
2018-11-12 18:08:58 +03:00
UdjinM6
46462d6829
Add a column for IS lock status on Transactions tab (#2433)
* Drop colorizing for IS

* Add IS column

* Add IS filter
2018-11-12 18:08:31 +03:00
Alexander Block
5fc4072ca0
Parallel ASN resolve and allow passing of input file names to makeseeds.py (#2432)
* Resolve ASNs in parallel

* Allow passing of filename to makeseeds.py
2018-11-10 17:00:24 +01:00
Alexander Block
c27e62935f
Allow reusing of external collaterals in DIP3 (#2427)
* Allow to reuse collaterals and addresses in ProRegTx

This also requires to move out the duplication check from CheckService to
the 2 individual ProTx check methods.

* Implement replacement logic for reused collaterals

* Add tests for new replacement logic
2018-11-10 10:54:16 +01:00
Alexander Block
76a38f6ceb
Update defaultAssumeValid, nMinimumChainWork and checkpoints (#2428)
* Update defaultAssumeValid and nMinimumChainWork for mainnet

* Update defaultAssumeValid and nMinimumChainWork for testnet

* Add checkpoint for mainnet

* Add checkpoint for testnet
2018-11-10 10:54:01 +01:00
UdjinM6
5ecd91b054 Fix ps collateral/denom creation tx category confusion (#2430)
* fix ps collateral/denom creation tx confusion

* clarify the logic of detecting PrivateSendMakeCollaterals/PrivateSendCreateDenominations category
2018-11-10 10:53:29 +01:00
Alexander Block
0e9ad207ae
Update hardcoded seeds (#2429)
* Update seeds for mainnet

* Update seeds for testnet
2018-11-10 06:29:14 +01:00
PastaPastaPasta
42ee369b17 [Formatting] masternodelist.* clang+manual format (#2426)
* format

* clang suggested changes to be reverted

* Revert "clang suggested changes to be reverted"

This reverts commit 2c1e7744be.
2018-11-09 09:48:51 +03:00
UdjinM6
da3e3db4dd
Fix sub-command help for masternode, gobject and protx rpcs (#2425)
Fixes #2424
2018-11-09 09:48:26 +03:00
thephez
adad3fcfe3 RPC: protx help corrections (#2422)
* RPC - Correct protx register_prepare help example

Use collateral hash and index instead of address

* RPC - Change protx register help ECDSA address to BLS operator key

* RPC - protx register_prepare help correction

Should direct to protx register help, not protx register_fund

* RPC - protx help typo
2018-11-08 20:03:50 +03:00
UdjinM6
262454791c
Add 5th denom, drop deprecated logic and bump min PS version (#2318)
* Bump PS
- add 5th denom (0.001)
- always allow OP_RETURN in PS collaterals
- collateral amount is always 1/10 of the smallest denom
- bump MIN_PRIVATESEND_PEER_PROTO_VERSION to 70211

* drop backward compatibility in dsa/dsq serialization

* Use GetSmallestDenomination() in GetCollateralAmount()

* bump MIN_PRIVATESEND_PEER_PROTO_VERSION to 70212
2018-11-07 10:39:25 +03:00
UdjinM6
e961c71343
Translations 201811 (#2249)
* update en source

* remove pt_BR

it's no longer present on Transifex

* Update existing translations

NOTE: there are some mismatches in zh_CN

dash_zh_CN.ts: Mismatch between 'Start &all' and '启动全部(%A)'
dash_zh_CN.ts: Mismatch between 'Open the %1 debug log file from the current data directory. This can take a few seconds for large log files.' and '打开当前目录中的调试日志文件。日志文件大的话可能要等上几秒钟。'
dash_zh_CN.ts: Mismatch between 'Too many %f denominations, removing.' and '太多面额化资金,正在移除。'
dash_zh_CN.ts: Mismatch between 'Initialization sanity check failed. %s is shutting down.' and '初始化完整性检查失败。% 即将关闭。'

* Add ar, ko, th

NOTE: there are 2 mismatches in ar

dash_ar.ts: Mismatch between '(of %1 GB needed)' and '(على 1% جيغابايت محتاجة)'
dash_ar.ts: Mismatch between 'Output debugging information (default: %u, supplying <category> is optional)' and 'معلومات تصحيح الخرج  <category>ا(ختياري)'

* update bg, it, ja, ko, nl, pl, th

* fix ru

* add tr

* fix
2018-11-07 10:39:06 +03:00
PastaPastaPasta
f0df5bffa6 Clang evo folder and activemasternode.* (#2418)
* clang + manual formatting

* clang activemasternode.*

* bump copyright

* weirdness correction
2018-11-06 11:54:23 +03:00
PastaPastaPasta
98bdf35f9d bump PS copyright (#2417) 2018-11-05 12:29:33 +03:00
PastaPastaPasta
e9bb822c10 Clang format PrivateSend files (#2373) 2018-11-05 12:29:07 +03:00
UdjinM6
1d56dffdaf
Unify help display logic for various "complex" rpc commands (#2415)
* Unify help display logic for various "complex" rpc commands

* add [[ noreturn ]] attribute and drop dummy returns
2018-11-05 12:28:38 +03:00
UdjinM6
bea590958b
Fix auto-IS tests (#2414)
* no `-debug` by default (it's too heavy)

* drop useless `sync_masternodes` calls and add a couple where they could be actually usefull

* change autoix-mempool.py test logic:
1. use separate nodes to send test txes
2. sync nodes while filling the mempool
2018-11-05 12:28:04 +03:00
Alexander Block
9da9d575aa Allow collaterals for non-DIP3 MNs which were created after DIP3/BIP9 activation (#2412)
* Remove reference to now removed "protocolVersion"

* Allow to use non-DIP3 collaterals after DIP3 activation

This removes a rule which only made sense when we assumed all collaterals
would remain in DIP3 ProRegTx transactions after DIP3 activation.

As we allow to refer external collaterals now, this rule should vanish as
well.

* Sleep in case block time is ahead of real time

See comment. This was not a problem before as we had enough time passed
between the last block that caused this and the start-alias call.
Now we added another start-alias call which is directly after we generated
many blocks.
2018-11-04 14:55:50 +03:00
strophy
f03629d6d9 Explicitly specify which branch of Wine to install (#2411)
Specifying only `wine` results in this message under Ubuntu Bionic:

Package wine is a virtual package provided by:
  wine-stable 3.0-1ubuntu1
  wine-development 3.6-1
You should explicitly select one to install.

Compilation
2018-11-04 14:55:32 +03:00
UdjinM6
23f169c44a
Drop custom PS logic for guessing fees etc. from SelectCoins (#2371)
* drop most of custom PS logic from SelectCoins and inject it into regular flow (i.e. SelectCoinsMinConf)

* different priority for different denoms

* move CompareByPriority higher

* update comment

Co-Authored-By: UdjinM6 <udjinm6@gmail.com>
2018-11-04 14:55:16 +03:00
thephez
02442673d2 Trivial: Correct protx diff RPC help (#2410) 2018-11-02 11:18:05 +03:00
Alexander Block
5e829a3b1b Update Chia bls-signature to latest version (#2409)
Brings in:
1. https://github.com/Chia-Network/bls-signatures/pull/41
2. https://github.com/Chia-Network/bls-signatures/pull/46
3. A few commits from https://github.com/codablock/bls-signatures are now
   merged into upstream.

This removes the need for manual initialization of the BLS library. This is
now done internally and in a thread-safe way.

Also switch to using tags instead of raw commit hashes. Makes testing
easier and also removes the risk of Github deleting commits due to
cleanup jobs.
2018-11-02 00:59:11 +03:00
UdjinM6
51addf9a03
Fix p2p-instantsend.py test (#2408) 2018-11-02 00:58:57 +03:00
thephez
1f56600c4b Trivial: Protx operator reward clarification (#2407)
Add decimal places to clarify:
1. Non-integers are valid (e.g. 3.25)
2. Granularity - anything beyond x.xx is rounded (e.g. 3.259 -> 3.26)

This is due to DIP3 allowing values 0-10000 for operator reward (1/10000
= 0.01%)
2018-11-02 00:58:36 +03:00
UdjinM6
7e8f07bb92
A couple of fixes for shutdown sequence (#2406)
* Do not run scheduled DoMaintenance if shutdown was requested

* Don't dump cache files if the load sequence was interrupted

* Stop privatesend and release keys before wallet flush

* fix typo
2018-11-02 00:58:17 +03:00
UdjinM6
9c455caea9
A couple of fixes for init steps (#2405)
* fLiteMode should be set via GetBoolArg before first usage

Also move related stuff to be closer to each other

* Cleanup Dash-specific init steps

* Move deterministicMNManager creation slightly higher for consistensy
2018-11-02 00:58:01 +03:00
thephez
7011fec1b4 RPC: Add help details for the bls RPC (#2403)
* RPC: Add help details for the bls RPC

* RPC: Refactor to match gobject RPC behavior

* RPC: Use command instead of strCommand for consistency within file

* RPC: BLS help cleanup

* RCP: Remove leading underscore on bls_help
2018-11-02 00:57:43 +03:00
Alexander Block
30a2b283a8 Sign ProRegTx collaterals with a string message instead of payload hash, split protx register into prepare/submit (#2395) 2018-11-02 00:57:10 +03:00
Alexander Block
6560ac64b3
Properly escape $ in Jenkinsfile.gitian (#2404) 2018-11-01 07:41:16 +01:00