diff --git a/configure.ac b/configure.ac index e38761a47f..784fbaf384 100644 --- a/configure.ac +++ b/configure.ac @@ -5,7 +5,7 @@ define(_CLIENT_VERSION_MINOR, 4) define(_CLIENT_VERSION_REVISION, 3) define(_CLIENT_VERSION_BUILD, 99) define(_CLIENT_VERSION_IS_RELEASE, false) -define(_COPYRIGHT_YEAR, 2022) +define(_COPYRIGHT_YEAR, 2026) define(_COPYRIGHT_HOLDERS,[The %s developers]) define(_COPYRIGHT_HOLDERS_SUBSTITUTION,[[Veil Core]]) AC_INIT([Veil Core],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION._CLIENT_VERSION_BUILD],[https://github.com/Veil-Project/veil/issues],[veil],[https://veil-project.com/]) diff --git a/contrib/devtools/README.md b/contrib/devtools/README.md index a0b6225345..ff696f52f7 100644 --- a/contrib/devtools/README.md +++ b/contrib/devtools/README.md @@ -18,7 +18,10 @@ copyright\_header.py ==================== Provides utilities for managing copyright headers of `The Bitcoin Core -developers` in repository source files. It has three subcommands: +developers` in repository source files. +This script has been modified and used to update copyright headers for the Veil developers, but is not trustworthy in its current state to be correct, especially if external updates or other third party commits are merged. + +It has three subcommands: ``` $ ./copyright_header.py report [verbose] @@ -73,6 +76,17 @@ year rather than two hyphenated years. If the file already has a copyright for `The Bitcoin Core developers`, the script will exit. +git-blame-chrono.sh +=================== + +A small script to sort `git blame` chronologically enabling accurate copyright year updating. +It must be run from the root of this or any github repository. + +Example: +```bash +contrib/devtools/git-blame-chrono.sh src/wallet/wallet.cpp +``` + gen-manpages.sh =============== diff --git a/contrib/devtools/copyright_header.py b/contrib/devtools/copyright_header.py index 19a57675f9..23b6d4aaf4 100755 --- a/contrib/devtools/copyright_header.py +++ b/contrib/devtools/copyright_header.py @@ -1,9 +1,14 @@ #!/usr/bin/env python3 # Copyright (c) 2016-2019 The Bitcoin Core developers -# Copyright (c) 2019 The Veil developers +# Copyright (c) 2019-2026 The Veil developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. +# While this updated a lot of files' copyright dates, be careful. +# In a spot check with sorted git blame output I had to set the years backward on several files. +# As an alternative I am adding a git blame sorting script to these devtools. +# If this is used in the future, especially when rebasing to later Bitcoin code it may be necessary to identify newer Bitcoin Core developers for the expected developers list. Indeed, that list may be supposed to be replaced with Veil developers, and it may not filter out new external commits, therebby causing the Veil developers' copyright date to be incorrectly incremented. + import re import fnmatch import sys @@ -68,11 +73,11 @@ def get_filenames_to_examine(): ################################################################################ -COPYRIGHT_WITH_C = 'Copyright \(c\)' +COPYRIGHT_WITH_C = 'Copyright \\(c\)' COPYRIGHT_WITHOUT_C = 'Copyright' ANY_COPYRIGHT_STYLE = '(%s|%s)' % (COPYRIGHT_WITH_C, COPYRIGHT_WITHOUT_C) -YEAR = "20[0-9][0-9]" +YEAR = "2[0-2][0-9][0-9]" YEAR_RANGE = '(%s)(-%s)?' % (YEAR, YEAR) YEAR_LIST = '(%s)(, %s)+' % (YEAR, YEAR) ANY_YEAR_STYLE = '(%s|%s)' % (YEAR_RANGE, YEAR_LIST) @@ -91,20 +96,20 @@ def compile_copyright_regex(copyright_style, year_style, name): "Bitcoin Core Developers\n", "the Bitcoin Core developers\n", "The Bitcoin developers\n", - "The LevelDB Authors\. All rights reserved\.\n", - "BitPay Inc\.\n", - "BitPay, Inc\.\n", - "University of Illinois at Urbana-Champaign\.\n", + "The LevelDB Authors\. All rights reserved\\.\n", + "BitPay Inc\\.\n", + "BitPay, Inc\\.\n", + "University of Illinois at Urbana-Champaign\\.\n", "MarcoFalke\n", "Pieter Wuille\n", - "Pieter Wuille +\*\n", - "Pieter Wuille, Gregory Maxwell +\*\n", - "Pieter Wuille, Andrew Poelstra +\*\n", - "Andrew Poelstra +\*\n", + "Pieter Wuille +\\*\n", + "Pieter Wuille, Gregory Maxwell +\\*\n", + "Pieter Wuille, Andrew Poelstra +\\*\n", + "Andrew Poelstra +\\*\n", "Wladimir J. van der Laan\n", "Jeff Garzik\n", - "Diederik Huys, Pieter Wuille +\*\n", - "Thomas Daede, Cory Fields +\*\n", + "Diederik Huys, Pieter Wuille +\\*\n", + "Thomas Daede, Cory Fields +\\*\n", "Jan-Klaas Kollhof\n", "Sam Rushing\n", "ArtForz -- public domain half-a-node\n", @@ -342,7 +347,7 @@ def write_file_lines(filename, file_lines): ################################################################################ COPYRIGHT = 'Copyright \(c\)' -YEAR = "20[0-9][0-9]" +YEAR = "2[0-2][0-9][0-9]" # Change Y2100 bug to a Y2300 bug YEAR_RANGE = '(%s)(-%s)?' % (YEAR, YEAR) HOLDER = 'The Veil developers' UPDATEABLE_LINE_COMPILED = re.compile(' '.join([COPYRIGHT, YEAR_RANGE, HOLDER])) @@ -471,7 +476,7 @@ def get_cpp_header_lines_to_insert(start_year, end_year): return reversed(get_header_lines(CPP_HEADER, start_year, end_year)) PYTHON_HEADER = ''' -# Copyright (c) %s The Veil Core developers +# Copyright (c) %s The Veil developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. ''' diff --git a/contrib/devtools/git-blame-chrono.sh b/contrib/devtools/git-blame-chrono.sh new file mode 100755 index 0000000000..8ba511e810 --- /dev/null +++ b/contrib/devtools/git-blame-chrono.sh @@ -0,0 +1,25 @@ +#!/usr/bin/env bash +# Usage: git-blame-chrono + +if [ -z "$1" ]; then + echo "Usage: $0 " + exit 1 +fi + +git blame --line-porcelain --date=iso-strict "$1" | awk ' + /^author-time / { ts = $2 } + /^author / { author = substr($0, 8) } + /^\t/ { + # Portable way to convert Unix timestamp + if (system("date -r " ts " >/dev/null 2>&1") == 0) { + # macOS / BSD + cmd = "date -r " ts " \"+%Y-%m-%d %H:%M\"" + } else { + # GNU / Linux + cmd = "date -d @" ts " \"+%Y-%m-%d %H:%M\"" + } + cmd | getline date + close(cmd) + printf "%s %-22s %s\n", date, author, substr($0, 2) + } +' | sort | less +G diff --git a/src/chain.cpp b/src/chain.cpp index 074580ccc8..b7a3f1348a 100644 --- a/src/chain.cpp +++ b/src/chain.cpp @@ -1,6 +1,6 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2019 The Bitcoin Core developers -// Copyright (c) 2019-2021 The Veil developers +// Copyright (c) 2019-2022 The Veil developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/chainparams.cpp b/src/chainparams.cpp index 40bd32a91a..c987c15aa1 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -1,6 +1,6 @@ // Copyright (c) 2010 Satoshi Nakamoto // Copyright (c) 2009-2019 The Bitcoin Core developers -// Copyright (c) 2018-2022 The Veil developers +// Copyright (c) 2018-2026 The Veil developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/consensus/tx_verify.cpp b/src/consensus/tx_verify.cpp index e89854f129..e2a96aed0b 100644 --- a/src/consensus/tx_verify.cpp +++ b/src/consensus/tx_verify.cpp @@ -1,6 +1,6 @@ // Copyright (c) 2017-2019 The Bitcoin Core developers // Copyright (c) 2015-2019 The PIVX developers -// Copyright (c) 2019-2022 The Veil developers +// Copyright (c) 2019-2026 The Veil developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/core_write.cpp b/src/core_write.cpp index 06cd2105ba..a03e14e501 100644 --- a/src/core_write.cpp +++ b/src/core_write.cpp @@ -1,5 +1,5 @@ // Copyright (c) 2009-2019 The Bitcoin Core developers -// Copyright (c) 2018-2022 The Veil developers +// Copyright (c) 2018-2026 The Veil developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/init.cpp b/src/init.cpp index bed4ad274e..7e571a80d9 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -1,7 +1,7 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2019 The Bitcoin Core developers // Copyright (c) 2015-2019 The PIVX developers -// Copyright (c) 2018-2022 The Veil developers +// Copyright (c) 2018-2026 The Veil developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/interfaces/wallet.h b/src/interfaces/wallet.h index 99afec3311..9cc39d5283 100644 --- a/src/interfaces/wallet.h +++ b/src/interfaces/wallet.h @@ -1,6 +1,6 @@ // Copyright (c) 2018-2019 The Bitcoin Core developers // Copyright (c) 2018-2019 The Particl developers -// Copyright (c) 2018-2019 The Veil developers +// Copyright (c) 2018-2026 The Veil developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/miner.h b/src/miner.h index bfce27b50f..97d502dfcb 100644 --- a/src/miner.h +++ b/src/miner.h @@ -1,6 +1,6 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2019 The Bitcoin Core developers -// Copyright (c) 2019-2022 The Veil developers +// Copyright (c) 2019-2026 The Veil developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/primitives/transaction.h b/src/primitives/transaction.h index c4aaaf28b5..62d958bfb5 100644 --- a/src/primitives/transaction.h +++ b/src/primitives/transaction.h @@ -1,6 +1,6 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2019 The Bitcoin Core developers -// Copyright (c) 2018-2019 The Veil developers +// Copyright (c) 2018-2022 The Veil developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp index 91bd2aa5d8..9ebcab2c13 100644 --- a/src/qt/bitcoingui.cpp +++ b/src/qt/bitcoingui.cpp @@ -1,5 +1,5 @@ // Copyright (c) 2011-2019 The Bitcoin Core developers -// Copyright (c) 2019-2022 The Veil developers +// Copyright (c) 2019-2026 The Veil developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/qt/bitcoingui.h b/src/qt/bitcoingui.h index 92a37b8c38..ed188e42de 100644 --- a/src/qt/bitcoingui.h +++ b/src/qt/bitcoingui.h @@ -1,5 +1,5 @@ // Copyright (c) 2011-2019 The Bitcoin Core developers -// Copyright (c) 2019-2021 The Veil developers +// Copyright (c) 2019-2023 The Veil developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp index 4c51949623..27af959a13 100644 --- a/src/qt/guiutil.cpp +++ b/src/qt/guiutil.cpp @@ -1,5 +1,5 @@ // Copyright (c) 2011-2019 The Bitcoin Core developers -// Copyright (c) 2019-2022 The Veil developers +// Copyright (c) 2019-2026 The Veil developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/qt/sendcoinsdialog.cpp b/src/qt/sendcoinsdialog.cpp index 67a0aa4d9e..d1438998c1 100644 --- a/src/qt/sendcoinsdialog.cpp +++ b/src/qt/sendcoinsdialog.cpp @@ -1,5 +1,5 @@ // Copyright (c) 2011-2019 The Bitcoin Core developers -// Copyright (c) 2019-2020 The Veil developers +// Copyright (c) 2019-2026 The Veil developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/qt/splashscreenveil.cpp b/src/qt/splashscreenveil.cpp index 7e6a7ef932..c5793cb613 100644 --- a/src/qt/splashscreenveil.cpp +++ b/src/qt/splashscreenveil.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2019-2022 The Veil developers +// Copyright (c) 2019-2026 The Veil developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/qt/transactionrecord.cpp b/src/qt/transactionrecord.cpp index 357b666a5e..ef7e9a5586 100644 --- a/src/qt/transactionrecord.cpp +++ b/src/qt/transactionrecord.cpp @@ -1,6 +1,6 @@ // Copyright (c) 2011-2019 The Bitcoin Core developers // Copyright (c) 2011-2019 The Particl developers -// Copyright (c) 2018-2021 Veil developers +// Copyright (c) 2018-2026 Veil developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/qt/veil.cpp b/src/qt/veil.cpp index a8af3450c2..32cd688dfb 100644 --- a/src/qt/veil.cpp +++ b/src/qt/veil.cpp @@ -1,5 +1,5 @@ // Copyright (c) 2011-2019 The Bitcoin Core developers -// Copyright (c) 2019-2022 The Veil developers +// Copyright (c) 2019-2026 The Veil developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/qt/veil/addresseswidget.cpp b/src/qt/veil/addresseswidget.cpp index 559507a26b..6d2c6982aa 100644 --- a/src/qt/veil/addresseswidget.cpp +++ b/src/qt/veil/addresseswidget.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2019-2021 The Veil developers +// Copyright (c) 2019-2026 The Veil developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/qt/veil/balance.cpp b/src/qt/veil/balance.cpp index 891e38f6a3..2afbd0c171 100644 --- a/src/qt/veil/balance.cpp +++ b/src/qt/veil/balance.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2019-2021 The Veil developers +// Copyright (c) 2019-2026 The Veil developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/qt/veil/miningwidget.cpp b/src/qt/veil/miningwidget.cpp index 12dca1a07a..f3a4cb3b27 100644 --- a/src/qt/veil/miningwidget.cpp +++ b/src/qt/veil/miningwidget.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Veil developers +// Copyright (c) 2021-2026 The Veil developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/qt/veil/miningwidget.h b/src/qt/veil/miningwidget.h index d8f8ad8317..23631cc952 100644 --- a/src/qt/veil/miningwidget.h +++ b/src/qt/veil/miningwidget.h @@ -1,4 +1,4 @@ -// Copyright (c) 2021 The Veil developers +// Copyright (c) 2021-2026 The Veil developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/qt/veil/qtutils.cpp b/src/qt/veil/qtutils.cpp index 88d7251f33..829c254719 100644 --- a/src/qt/veil/qtutils.cpp +++ b/src/qt/veil/qtutils.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2019 The Veil developers +// Copyright (c) 2019-2026 The Veil developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/qt/veil/receivewidget.cpp b/src/qt/veil/receivewidget.cpp index 125b807f27..5d28d3f39b 100644 --- a/src/qt/veil/receivewidget.cpp +++ b/src/qt/veil/receivewidget.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2019-2021 The Veil developers +// Copyright (c) 2019-2026 The Veil developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/qt/veil/settings/settingsfaq.cpp b/src/qt/veil/settings/settingsfaq.cpp index 3994992408..fd64d29010 100644 --- a/src/qt/veil/settings/settingsfaq.cpp +++ b/src/qt/veil/settings/settingsfaq.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2019 The Veil developers +// Copyright (c) 2019-2019 The Veil developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/qt/veil/settings/settingswidget.cpp b/src/qt/veil/settings/settingswidget.cpp index fd8ba94c3f..36fc72c63e 100644 --- a/src/qt/veil/settings/settingswidget.cpp +++ b/src/qt/veil/settings/settingswidget.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2019-2021 The Veil developers +// Copyright (c) 2019-2026 The Veil developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/qt/veil/tutorialmnemonicrevealed.cpp b/src/qt/veil/tutorialmnemonicrevealed.cpp index fefc95ed72..f171d98466 100644 --- a/src/qt/veil/tutorialmnemonicrevealed.cpp +++ b/src/qt/veil/tutorialmnemonicrevealed.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2019 The Veil developers +// Copyright (c) 2019-2026 The Veil developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/qt/veil/tutorialwidget.cpp b/src/qt/veil/tutorialwidget.cpp index 2219ef0e2c..fcdca545a2 100644 --- a/src/qt/veil/tutorialwidget.cpp +++ b/src/qt/veil/tutorialwidget.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2019 The Veil developers +// Copyright (c) 2019-2026 The Veil developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/qt/veil/tutorialwidget.h b/src/qt/veil/tutorialwidget.h index eb0cf491c6..9256feda15 100644 --- a/src/qt/veil/tutorialwidget.h +++ b/src/qt/veil/tutorialwidget.h @@ -1,4 +1,4 @@ -// Copyright (c) 2019 The Veil developers +// Copyright (c) 2019-2026 The Veil developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/qt/veil/veilstatusbar.cpp b/src/qt/veil/veilstatusbar.cpp index 8fcf256d1f..1ee1a750e5 100644 --- a/src/qt/veil/veilstatusbar.cpp +++ b/src/qt/veil/veilstatusbar.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2019-2021 The Veil developers +// Copyright (c) 2019-2026 The Veil developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/qt/veil/veilstatusbar.h b/src/qt/veil/veilstatusbar.h index 4c228f9ee7..1862b59a4c 100644 --- a/src/qt/veil/veilstatusbar.h +++ b/src/qt/veil/veilstatusbar.h @@ -1,4 +1,4 @@ -// Copyright (c) 2019-2020 The Veil developers +// Copyright (c) 2019-2026 The Veil developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/rpc/blockchain.cpp b/src/rpc/blockchain.cpp index f39dd915d7..edf6ddc7d2 100644 --- a/src/rpc/blockchain.cpp +++ b/src/rpc/blockchain.cpp @@ -1,7 +1,7 @@ // Copyright (c) 2010 Satoshi Nakamoto // Copyright (c) 2009-2018 The Bitcoin Core developers // Copyright (c) 2015-2018 The PIVX developers -// Copyright (c) 2019-2022 The Veil developers +// Copyright (c) 2019-2026 The Veil developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/rpc/mining.cpp b/src/rpc/mining.cpp index dd85d0b993..9e9b1a865b 100644 --- a/src/rpc/mining.cpp +++ b/src/rpc/mining.cpp @@ -1,6 +1,6 @@ // Copyright (c) 2010 Satoshi Nakamoto // Copyright (c) 2009-2019 The Bitcoin Core developers -// Copyright (c) 2018-2022 The Veil developers +// Copyright (c) 2018-2026 The Veil developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/rpc/rawtransaction.cpp b/src/rpc/rawtransaction.cpp index 860771d315..7018fdfe3f 100644 --- a/src/rpc/rawtransaction.cpp +++ b/src/rpc/rawtransaction.cpp @@ -1,6 +1,6 @@ // Copyright (c) 2010 Satoshi Nakamoto // Copyright (c) 2009-2019 The Bitcoin Core developers -// Copyright (c) 2018-2022 The Veil developers +// Copyright (c) 2018-2026 The Veil developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/txdb.cpp b/src/txdb.cpp index 5928765567..eeed3ef6bf 100644 --- a/src/txdb.cpp +++ b/src/txdb.cpp @@ -1,6 +1,6 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2019 The Bitcoin Core developers -// Copyright (c) 2019-2022 The Veil developers +// Copyright (c) 2019-2026 The Veil developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/validation.cpp b/src/validation.cpp index cefb85431d..c670c63ba0 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -1,7 +1,7 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2019 The Bitcoin Core developers // Copyright (c) 2015-2019 The PIVX developers -// Copyright (c) 2019-2022 The Veil developers +// Copyright (c) 2019-2026 The Veil developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. @@ -2453,6 +2453,7 @@ bool CChainState::ConnectBlock(const CBlock& block, CValidationState& state, CBl std::vector prevheights; CAmount nFees = 0; + CAmount nStakeReward = 0; // coinstake pseudo-fee (the minted reward); tracked so it can never widen the creation limit int nInputs = 0; int64_t nSigOpsCost = 0; @@ -2615,6 +2616,11 @@ bool CChainState::ConnectBlock(const CBlock& block, CValidationState& state, CBl if (!Consensus::CheckTxInputs(tx, state, view, pindex->nHeight, txfee, nTxValueIn, nTxValueOut)) return error("%s: Consensus::CheckTxInputs: %s, %s", __func__, tx.GetHash().ToString(), FormatStateMessage(state)); nFees += txfee; + // For a coinstake, CheckTxInputs returns the entire minted stake reward in txfee. Remember it + // so it is excluded from any fee-based widening of the creation limit below (else a staker could + // mint an unbounded reward and have it authorise its own creation). + if (tx.IsCoinStake()) + nStakeReward = txfee; if (!MoneyRange(nFees)) { return state.DoS(100, error("%s: accumulated fee in the block out of range.", __func__), REJECT_INVALID, "bad-txns-accumulated-fee-outofrange"); @@ -2855,8 +2861,12 @@ bool CChainState::ConnectBlock(const CBlock& block, CValidationState& state, CBl // Full nodes are rewarded with the transaction fees in the block CAmount nCreationLimit = networkReward + nBlockReward + nFounderPayment + nBudgetPayment + nFoundationPayment; - if (block.fProofOfFullNode || pindex->nHeight >= Params().HeightSupplyCreationStop()) - nCreationLimit += nFees; + // NOTE: block.fProofOfFullNode is a serialized, non-hash-committed block field that no honest block + // ever sets (the staker computes hashPoFN but leaves the flag false). Honoring it here let any staker + // set the flag, fold their coinstake reward (carried in nFees) into their own creation limit, and mint + // unbounded VEIL. Widen the limit only at the scheduled supply tail, and never by the coinstake reward. + if (pindex->nHeight >= Params().HeightSupplyCreationStop()) + nCreationLimit += nFees - nStakeReward; // Check that the block's miner did not create more coins than allowed CAmount nCreated = nBlockValueOut - nBlockValueIn; diff --git a/src/validation.h b/src/validation.h index ee1e334183..bd16053b88 100644 --- a/src/validation.h +++ b/src/validation.h @@ -1,6 +1,6 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2019 The Bitcoin Core developers -// Copyright (c) 2019-2022 The Veil developers +// Copyright (c) 2019-2025 The Veil developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/veil/mnemonic/mnemonicwalletinit.cpp b/src/veil/mnemonic/mnemonicwalletinit.cpp index 1fe4e3199e..66ecf5d99f 100644 --- a/src/veil/mnemonic/mnemonicwalletinit.cpp +++ b/src/veil/mnemonic/mnemonicwalletinit.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2019-2022 The Veil developers +// Copyright (c) 2019-2026 The Veil developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/veil/ringct/anonwallet.cpp b/src/veil/ringct/anonwallet.cpp index 6b52c0e8f0..5cd7a1d126 100644 --- a/src/veil/ringct/anonwallet.cpp +++ b/src/veil/ringct/anonwallet.cpp @@ -1,5 +1,5 @@ // Copyright (c) 2017-2019 The Particl Core developers -// Copyright (c) 2018-2022 The Veil developers +// Copyright (c) 2018-2026 The Veil developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/veil/ringct/rpcanonwallet.cpp b/src/veil/ringct/rpcanonwallet.cpp index ae3f9d5ba0..e9512160bb 100644 --- a/src/veil/ringct/rpcanonwallet.cpp +++ b/src/veil/ringct/rpcanonwallet.cpp @@ -1,5 +1,5 @@ // Copyright (c) 2017-2019 The Particl Core developers -// Copyright (c) 2019-2022 The Veil developers +// Copyright (c) 2019-2026 The Veil developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/veil/zerocoin/ztracker.cpp b/src/veil/zerocoin/ztracker.cpp index efc6b49401..3f08b8bb04 100644 --- a/src/veil/zerocoin/ztracker.cpp +++ b/src/veil/zerocoin/ztracker.cpp @@ -1,5 +1,5 @@ // Copyright (c) 2017-2018 The PIVX developers -// Copyright (c) 2019-2022 The Veil developers +// Copyright (c) 2019-2026 The Veil developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/veil/zerocoin/ztracker.h b/src/veil/zerocoin/ztracker.h index 59fe6bee26..078af4fb5e 100644 --- a/src/veil/zerocoin/ztracker.h +++ b/src/veil/zerocoin/ztracker.h @@ -1,5 +1,5 @@ // Copyright (c) 2017-2019 The PIVX developers -// Copyright (c) 2019-2020 The Veil developers +// Copyright (c) 2019-2026 The Veil developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef VEIL_ZTRACKER_H diff --git a/src/wallet/rpcdump.cpp b/src/wallet/rpcdump.cpp index 7737297d33..b921d2f9d6 100644 --- a/src/wallet/rpcdump.cpp +++ b/src/wallet/rpcdump.cpp @@ -1,5 +1,5 @@ // Copyright (c) 2009-2019 The Bitcoin Core developers -// Copyright (c) 2019-2022 The Veil developers +// Copyright (c) 2019-2026 The Veil developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index 8c8ce5d8e0..f18d497b7e 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -1,6 +1,6 @@ // Copyright (c) 2010 Satoshi Nakamoto // Copyright (c) 2009-2019 The Bitcoin Core developers -// Copyright (c) 2018-2022 The Veil developers +// Copyright (c) 2018-2026 The Veil developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/wallet/rpczerocoin.cpp b/src/wallet/rpczerocoin.cpp index ecd7eae81b..cf103f4cc1 100644 --- a/src/wallet/rpczerocoin.cpp +++ b/src/wallet/rpczerocoin.cpp @@ -1,5 +1,5 @@ // Copyright (c) 2015-2019 The PIVX developers -// Copyright (c) 2019-2022 The Veil developers +// Copyright (c) 2019-2026 The Veil developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index fd338e7969..277fbe875c 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -1,6 +1,6 @@ // Copyright (c) 2009-2018 The Bitcoin Core developers -// Copyright (c) 2018-2022 The Veil developers +// Copyright (c) 2018-2026 The Veil developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h index 291c43d523..d3d14cc763 100644 --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -1,6 +1,6 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2019 The Bitcoin Core developers -// Copyright (c) 2018-2022 The Veil developers +// Copyright (c) 2018-2026 The Veil developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php.