Skip to content

Conversation

@Kokary
Copy link
Contributor

@Kokary Kokary commented Sep 20, 2019

TODO:

  • set nBlockStakeModifierlV2 to correct block height (is set to 99999999 currently).

Full commits can be found here: https://github.com/wagerr/wagerr/commits/cff94672e2c7ced9f31003ea236790ca82324d11

Commits:

commit 48aa151
[PATCH] Fix permissions

commit 4b546c7
Upstream upgrades: stake modifier V2

PIVX Upstream commits:

commit e515b1e9f2309d27efea69beae6569ee92178d88
Author: Pieter Wuille [email protected]
Date: Tue, 25 Nov 2014 16:26:20 +0100

[PATCH] [Node] Do all block index writes in a batch

commit 7c9859f40d7d6c5f1eda99569c818fd456b5353c
Author: Mrs-X [email protected]
Date: Thu, 20 Jun 2019 13:39:32 +0200

[PATCH] [Qt] Add blockhash + datadir to information tab

commit cde9d134672ac87ac941a8ca296f823887267c63
Author: Isidoro Ghezzi [email protected]
Date: Wed, 17 Oct 2018 16:12:42 +0200

[PATCH] show the progress of functional test

commit a57939f00de8a874c099a341713cc6c79b35e5cc
Author: Chun Kuan Lee [email protected]
Date: Tue, 30 Oct 2018 21:06:44 +0800

[PATCH] tests: Print dots by default

commit ae0b4d028d237d0eadbb035668c3c13598195d3b
Author: Steven Roose [email protected]
Date: Fri, 22 Feb 2019 18:06:34 +0000

[PATCH] tests: Print remaining jobs in test_runner.py

commit e4945a25b4d1482caf965a8ce1127d433ea39927
Author: warrows [email protected]
Date: Tue, 9 Jul 2019 09:45:27 +0200

[PATCH] [Travis] Log more info

commit 1fa0bf37438ff9fcaa759e1754b41caa8dce93ee
Author: MarcoFalke [email protected]
Date: Fri, 14 Jun 2019 10:31:07 -0400

[PATCH] travis: Fix caching issues

commit 1aa76d07e5c981295c3495c694803ea63b277ee8
Author: MarcoFalke [email protected]
Date: Fri, 14 Jun 2019 10:49:00 -0400

[PATCH] travis: Use absolute paths for cache dirs

commit 5fbf26caf62c8788682a9e828f4004ce6310f923
Author: warrows [email protected]
Date: Tue, 9 Jul 2019 15:22:59 +0200

[PATCH] [Travis] Give more time to tests

commit cd9a6edfea46572aa16ae841b82976dd320dcaa3
Author: Fuzzbawls [email protected]
Date: Thu, 11 Jul 2019 01:59:47 -0700

[PATCH] [Scripts] Sync github-merge.py with upstream

commit b0aeab0518828f0209b57fcd670e544d0c802e00
Author: Fuzzbawls [email protected]
Date: Sun, 19 Aug 2018 19:04:52 -0700

[PATCH] [Refactor] Use references instead of copies in for loops

commit 3da857b52879c186295057a5f91ec731cd65e3de
Author: warrows [email protected]
Date: Tue, 2 Jul 2019 14:56:27 +0200

[PATCH] [Wallet] Remove (explicitely) unused tx comparator

commit c572c17dcee14d5e7b91c301bc4a29865e5badd2
Author: warrows [email protected]
Date: Sat, 13 Jul 2019 12:23:43 +0200

[PATCH] Remove all "using namespace" statements

commit ef41333993fc7f9a8b1a845766b68f15576bd4c2
Author: warrows [email protected]
Date: Sat, 13 Jul 2019 12:45:19 +0200

[PATCH] [Refactor] Replace tabs with spaces

commit e3be2f3bfd3ca4d0a9f37ef57d48f6307226e311
Author: Warrows [email protected]
Date: Fri, 19 Jul 2019 12:14:26 +0200

[PATCH] [Build] Add info about '--with-unsupported-ssl'

commit 42fe4040acff08450168416ccf35413abdc1747a
Author: Fuzzbawls [email protected]
Date: Wed, 3 Jul 2019 22:45:35 -0700

[PATCH] [Refactor] Move ThreadStakeMinter out of net.cpp

commit 20aab1152afa3a0ef71ffeb05d4dd4eb171ba116
Author: random-zebra [email protected]
Date: Fri, 26 Jul 2019 13:45:09 +0200

[PATCH] [Tests] Do not fail when warnings are written to stderr

commit c9a2cc35d201421b3de20a539f1598372a36efae
Author: Cave Spectre [email protected]
Date: Sat, 13 Jul 2019 18:41:03 -0400

[PATCH] Trivial: typo fixes

commit 639b43dee61c5d918bc5538eb563de376d51ee78
Author: Cave Spectre [email protected]
Date: Sat, 20 Jul 2019 19:45:06 -0400

[PATCH] [Trivial] Spelling - Wither -> Whether

commit 12c44cafdeb49ec0b5fbe5815cb4fa431bc2a934
Author: furszy [email protected]
Date: Thu, 1 Aug 2019 09:15:40 -0300

[PATCH] [Wallet][zWGR] zc public spend parse crash in wallet startup fixed.

commit 983d97a86c6450c85a0411eed5b533e3109c1aea
Author: Cave Spectre [email protected]
Date: Sat, 13 Jul 2019 17:39:58 -0400

[PATCH] [Refactor] Combine parameter checking of budget commands

commit 421956f80325331bd145c83e4e182687dfe13c00
Author: random-zebra [email protected]
Date: Fri, 2 Aug 2019 05:18:20 +0200

[PATCH] [Tests] Add Spork functional test and update RegTest spork key

commit db702dcc200f9c70562039d422de2ec36c3248f9
Author: random-zebra [email protected]
Date: Fri, 2 Aug 2019 12:17:54 +0200

[PATCH] [Tests] Enable Spork messages on RegTest net

commit f7ac53b2d5de29951240718680443b62acfa6db2
Author: Cave Spectre [email protected]
Date: Sat, 27 Jul 2019 13:36:55 -0400

[PATCH] [RPC] Correct issues with budget commands

commit 72611349f10c94de54162ab1a226a81dd9af35fd
Author: Cave Spectre [email protected]
Date: Thu, 1 Aug 2019 21:52:28 -0400

[PATCH] [Review] Convert runtime_error to JSONRPCError

commit b7a9a9cdb20cdee869906fb24e2bc984e8a93802
Author: Cave Spectre [email protected]
Date: Sun, 21 Jul 2019 16:00:25 -0400

[PATCH] [Staking] Modify miner and staking thread for efficency

commit 009bd6346ee9325f2e6c3b3cd808fc6e87febc61
Author: Cave Spectre [email protected]
Date: Sat, 13 Jul 2019 17:39:58 -0400

[PATCH] [RPC] require valid URL scheme on budget commands

commit c7fa318a33f6355eb4ae70461d5141ea0866b91c
Author: JSKitty [email protected]
Date: Fri, 9 Aug 2019 13:12:13 +0100

[PATCH] Remove Bitcoin Core 0.8 block hardlinking

commit c93bf2b61170cccca0f8934349058c40d708072b
Author: Fuzzbawls [email protected]
Date: Thu, 20 Sep 2018 16:33:41 -0700

[PATCH] [Refactor] Remove GetCoinAge

commit 74e7fc7d432c7f6d586d54ff276d6babad0fe505
Author: random-zebra [email protected]
Date: Mon, 12 Aug 2019 02:26:40 +0200

[PATCH] [Miner] Don't create new keys when generating PoS blocks

commit 8f78a760ac080733ecf4ac52d98bebccfc2bf4e0
Author: random-zebra [email protected]
Date: Tue, 13 Aug 2019 21:49:43 +0200

[PATCH] [Consensus] Placeholder block height for modifier V2 enforcement

Copy link
Contributor

@ckti ckti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK Needs a merge, travis passed

@Kokary Kokary force-pushed the update-pos branch 2 times, most recently from e552ff5 to cff9467 Compare September 25, 2019 16:59
Kokary and others added 15 commits November 1, 2019 15:54
example (added the progress index `n/m`)
```
1/107 - wallet_hd.py passed, Duration: 27 s
.........................................................................................
2/107 - mining_getblocktemplate_longpoll.py passed, Duration: 72 s
..................................................................
3/107 - feature_maxuploadtarget.py passed, Duration: 78 s
```

- clear dots line
```
$ test/functional/test_runner.py -t can_trash
Temporary test directory at can_trash/test_runner_₿_🏃_20181018_220600
1/105 - wallet_hd.py passed, Duration: 21 s
2/105 - mining_getblocktemplate_longpoll.py passed, Duration: 71 s
3/105 - feature_maxuploadtarget.py passed, Duration: 68 s
..................
```

- don't print the `dot` progressive if `--quiet`

- done_str
- nothing commit to check again travis tests
This helps finding out which tests fail to finish.
Travis was regularly failing because the full test suite with coverage
takestoo much time.
Bitcoin has some optimisations in there which allows them to give less
time to the test part of the process. We don't so until we do, we have
to reserve more time. We will probably have to restart manually more
travis jobs but that's the only way to have them run to the end.
Pulls in further updates to the script from upstream since #921 was
merged.
turning on `-Wrange-loop-analysis` shows a number of compiler warnings
with c++11 for loops creating copies when references would suffice.

This cleans up those warnings.
We remove the '==' and '!=' operators from CMutableTransaction.
These comparators are never explicitely used in our code.
As it turns out, it was used implicitely and created this situation:
PIVX-Project/PIVX#510
So this change fixes #510.
This goes towards following more closely the coding guidelines.
Warrows and others added 17 commits November 1, 2019 15:54
Compilation with openssl version more recent than 1.0.1 is not advised but still possible. We need t let self compilers know about that.
This moves the implementation function and thread creation to a more
appropriate file (`miner.cpp`).
print stderr with the test result instead
This function is never used, and never will be; Nuke it from orbit.
key creation for coinbase output is a waste for PoS blocks and can be removed
Overview of original commits: https://github.com/PIVX-Project/PIVX/pull/983/commits

PR includes adapted versions of these original commits:

commit bf1651452cef40f72f6edc4a71515c15a24c6264
Author: random-zebra <[email protected]>
Date:   Sun Aug 25 23:59:37 2019 +0200

    [Consensus] New modifier enforcement height changed for mainnet

commit 6b6ef3232ded7280479103fe861585e56c1500d4
Author: Fuzzbawls <[email protected]>
Date:   Sun Aug 25 14:36:57 2019 -0700

    Don't load old stake modifier from disk after changeover height

commit d085ed0a749c058565da9634f7e2b137c9d331b4
Author: random-zebra <[email protected]>
Date:   Sun Aug 25 16:44:35 2019 +0200

    [Consensus] Fix old block version check (including v.6)

commit b1416f51e23d137ab24cfb816fec61db4da49b46
Author: random-zebra <[email protected]>
Date:   Sun Aug 25 12:15:05 2019 +0200

    [Tests] fix blocks/maturity fakestake_accepted

commit c212587680a739dc33309dfe7a90e0cc0fd0329d
Author: random-zebra <[email protected]>
Date:   Sun Aug 25 12:14:26 2019 +0200

    [PoS] fix regtest nBlockStakeModifierlV2 and cbase maturity

commit dddca50c3d0483bec1028d9a649e317a3c802305
Author: Fuzzbawls <[email protected]>
Date:   Fri Aug 23 21:04:25 2019 -0700

    Use better JSON key names in block coinstake output

    Also add help description for new keys

commit 28351113255136779a76f2af72d08ca781f774c2
Author: Fuzzbawls <[email protected]>
Date:   Fri Aug 23 20:03:45 2019 -0700

    Don't shadow global fDebug

    conditional log output in kernel.cpp functions can use the global fDebug variable instead of their own.

commit 85fa96eadd69fe8913b8028cb63b1d327df0a004
Author: furszy <[email protected]>
Date:   Fri Aug 23 23:14:05 2019 -0300

    [Consensus] New modifier enforcement height set.

commit a74f6cf848cdd024e3513669e75b0d7e76492ec3
Author: furszy <[email protected]>
Date:   Sat Aug 17 14:50:28 2019 -0300

    [GUI] sendCoinsdialog, removing zero tx fee checkbox and label.

commit 6a33fffd0fbd74f673afe9673a77d1d0875f4118
Author: furszy <[email protected]>
Date:   Wed Aug 14 15:01:11 2019 -0300

    [Mempool] // As zero fee transactions are not going to be accepted in the near future (4.0) and the code will be fully refactored soon.
              // This is just a quick inline towards that goal, the mempool by default will not accept them. Blocking
              // any subsequent network relay.

    [SQUASH] Permitting free txes only in regtest.

commit 6c69cfef4da94b83eb7aecf383f0d5e837da538d
Author: furszy <[email protected]>
Date:   Thu Aug 22 17:13:14 2019 -0300

    [PoS] * GetKernelStakeModifier, look for the next block in the mapBlockIndex and not in the chainActive and look for it based on the next block hash and not based on height.
        * Contextual zPIV stake, invalid height contextual check, using tip instead of prev height + 1.

commit d3db3e621ca65fa6f0b1916611cbc83388c146a0
Author: random-zebra <[email protected]>
Date:   Wed Aug 21 04:25:25 2019 +0200

    [PoS] Stake(): Add check for staked blocks in the future

commit f8777c649dec25a7d59119e16e331059d0e8483d
Author: random-zebra <[email protected]>
Date:   Wed Aug 21 00:22:55 2019 +0200

    [Refactor] Add future block time drift to chainparams

commit 8c7522bb88042098dc531835add65a7394be7751
Author: furszy <[email protected]>
Date:   Thu Aug 22 12:37:48 2019 -0300

    [PoS] Compute old modifier, invalid integer division removal plus extra logging for the stake modifier height added.

commit beaba470d90875c857736084e7f85cccae9b91d9
Author: furszy <[email protected]>
Date:   Wed Aug 21 16:55:37 2019 -0300

    [RPC] getblock, validate that PoS blocks to return the coin stake data.

commit 81446bba545ec46c58bfc5316ef32e46298af6d0
Author: furszy <[email protected]>
Date:   Wed Aug 21 14:23:49 2019 -0300

    [PoS][RPC] getblock command, adding more information about the coin stake tx.

commit 820e08c1645031a06065ea369c8673d5f9559a07
Author: furszy <[email protected]>
Date:   Wed Aug 21 12:01:45 2019 -0300

    [PoS][RPC][Refactor] GetHashProofOfStake and initStakeInput methods created, better method responsibility division from the CheckStakeKernelHash to be able to get the information for the getblock rpc command and possible future tests.

commit 4d5cc97e76a30b669f9574a2fc080cdff83b588d
Author: furszy <[email protected]>
Date:   Mon Aug 19 15:38:04 2019 -0300

    [Wallet] Staking, unreacheable code removed..

commit 41ccf6b86b48949fc18dae6728359f87073770b1
Author: furszy <[email protected]>
Date:   Mon Aug 19 15:28:21 2019 -0300

    [PoS][Wallet] CreateCoinStake, if the block is from the future then start on a future time.

commit ffb0dd558d8cba9d06ed3dd68eaa371f245780d0
Author: furszy <[email protected]>
Date:   Mon Aug 19 12:16:14 2019 -0300

    [Trivial] logging, removing none required jump lines.

    [Trivial] Cleaning jump lines in not needed logging.

commit 843dc56cd6a119861cff8eb21ee9a969a08480bd
Author: random-zebra <[email protected]>
Date:   Mon Aug 19 16:18:07 2019 +0200

    [PoS] Allign ComputeStakeModifier (v2) to nHeight logic

    [PoS] cleaning not used stakeTargetHit method + fixing bad nHeight in
    the new compute modifier method.

commit 4c2493470ff4afcfba5b49cf53b2a73a28a0c0a2
Author: furszy <[email protected]>
Date:   Mon Aug 19 11:13:34 2019 -0300

    [PoS] read/write block index modifier based on height and not block version.

commit 6297e7745ac3b714e67adaeefd67c635d4675294
Author: random-zebra <[email protected]>
Date:   Sun Aug 18 15:22:01 2019 +0200

    [Core] Introduce Blocks version 6

    [SQUASH] Cleanup proof-of-stake debug log

commit b8c59aed098bb89a7debbd05ab54198879a443ca
Author: furszy <[email protected]>
Date:   Sat Aug 17 00:16:35 2019 -0300

    [PoS] CheckStakeKernelHash, was checking the previous block instead of
    the block under review.

    [PoS] CheckProofOfStake, stop searching a block on disk when it's
    absolutely not needed.
     * Not used variable nTargetTimespan in chainParams removed.

commit 0d31ac2e9bc659181ecd4ac2bb904ff7db984318
Author: furszy <[email protected]>
Date:   Fri Aug 16 23:42:04 2019 -0300

    [Wallet] HasMintableCoins, don't call GetAdjustedTime on every cycle of the loop.

commit d94931f9a30bc6406ba588417663fcb280a565ff
Author: random-zebra <[email protected]>
Date:   Sat Aug 17 03:26:09 2019 +0200

    [Trivial] Add logs to CheckKernelHash

    [SQUASH] Fix nTimeTx bug in Stake()

commit eab9944d064b647a1485dd9a00713696c82023da
Author: furszy <[email protected]>
Date:   Fri Aug 16 19:56:25 2019 -0300

    version bumped

commit 117f815458a828d1e8e7c564c2e5a79a5387d0fa
Author: random-zebra <[email protected]>
Date:   Fri Aug 16 22:25:19 2019 +0200

    [PoS] New logic for stake input maturity

    require it to be nStakeMinDepth deep instead of nStkaMinAge old.

commit d805952ea52b5ebb977b654c6ca108df3fd9e934
Author: random-zebra <[email protected]>
Date:   Fri Aug 16 02:13:41 2019 +0200

    [Wallet] SelectStakeCoins using block time and fix GetBlocksToMaturity

commit 01ed69a471c6fa19761103a1f1917d1930e83526
Author: random-zebra <[email protected]>
Date:   Fri Aug 16 02:03:53 2019 +0200

    [PoS] Remove extra nTime check in Stake()

commit 74d85c2a42f864f734adb2a994c1ab9c2a792a45
Author: furszy <[email protected]>
Date:   Thu Aug 15 17:02:33 2019 -0300

    [Refactor][PoS] Do not calculate the prevBlock medianTimePast on every cycle of the CreateCoinStake loop.

commit a48a7a503afb5210483f7d1b238ea07a1883dfd0
Author: furszy <[email protected]>
Date:   Thu Aug 15 17:00:45 2019 -0300

    [Trivial] Compiler warning, uint_32 compared against int.

commit e9c07d0749d3b99374af956eeae87962ddbdb9e6
Author: furszy <[email protected]>
Date:   Thu Aug 15 12:25:16 2019 -0300

    [Consensus] V2 modifier protocol change, two new fields in chainparams nStakeMinAgeV2Modifier and nMaturityV2Modifier.

commit 3b97fc0cac807cb4e311780daa16da752c440020
Author: furszy <[email protected]>
Date:   Tue Aug 13 20:12:31 2019 -0300

    [PoS] Cleaning GetStakeModifierSelectionInterval() constant method +
    other redundancies.

    [PoS][Refactor] CPivStake, caching data + removing redundant method
    calls.

    [PoS] Fix error in nSelectionIntervalStart integer division

commit 3c1fd7a838c5ed8e271bb2f83eb9e7f19ddf10be
Author: random-zebra <[email protected]>
Date:   Tue Aug 13 23:34:25 2019 +0200

    [PoS] Stake Modifier V2

commit f73a27f0b7ac392718efc83de1741830566ff68d
Author: random-zebra <[email protected]>
Date:   Tue Aug 13 22:04:15 2019 +0200

    [Core] Do not check block if it's not the one needed

    also there's no need to count mints and spends here

commit 1e4c86421d1b0410a7edee284cdb33df672eaea8
Author: random-zebra <[email protected]>
Date:   Tue Aug 13 22:01:21 2019 +0200

    [Cleanup] Clean error messages in CheckBlock

    [Cleanup] Remove unused 'GetWeight()' function

    [Cleanup] Remove unneeded variables

commit 401a986e9f79a869edff74faaea452bded32cf5b
Author: random-zebra <[email protected]>
Date:   Tue Aug 13 21:49:43 2019 +0200

    [Consensus] Placeholder block height for modifier V2 enforcement
@Kokary Kokary merged commit e67b066 into wagerr:master Nov 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.