From 5d7953f2e3d7101593d336a84a7fe1eae1c316cb Mon Sep 17 00:00:00 2001 From: ohcee Date: Sat, 15 Aug 2026 08:09:22 -0700 Subject: [PATCH 1/3] Do not honor the proof-of-full-node flag when widening the coinstake creation limit Every Veil PoS block's coinstake mints its block reward as zerocoin outputs, and CheckTxInputs returns that entire reward as the coinstake's txfee, which ConnectBlock folds into nFees. The creation-limit check then did nCreationLimit += nFees for any block whose fProofOfFullNode flag was set, so the reject nCreated <= nCreationLimit became R <= base + R, satisfied for any reward R up to MoneyRange. fProofOfFullNode is a serialized, non-hash-committed block field that no honest block ever sets (the staker computes hashPoFN but leaves the flag false), so any staker could set the flag, compute the public hashPoFN, and mint arbitrary VEIL from a single stake. Widen the creation limit only past the scheduled supply-creation stop height, and never by the coinstake's own reward. Honest blocks never set the flag and, with supply intact, no historical block ever over-created, so this rejects nothing that validated before. --- src/validation.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/validation.cpp b/src/validation.cpp index cefb85431..fd47ae9fd 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -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; From 8f20a2b96259a11f141ba9dfa028b838cdf1bbe6 Mon Sep 17 00:00:00 2001 From: Sean Phillips <46495592+seanPhill@users.noreply.github.com> Date: Thu, 27 Aug 2026 14:53:14 -0500 Subject: [PATCH 2/3] Updated copyright year on Veil git updated files Used contrib/devtools/copyright_header.py to update each file containing a copyright header for "The Veil Core developers" if git (not file) change time stamp is a later year than the claimed copyright year. --- contrib/devtools/copyright_header.py | 2 +- src/chain.cpp | 2 +- src/chainparams.cpp | 2 +- src/consensus/tx_verify.cpp | 2 +- src/core_write.cpp | 2 +- src/init.cpp | 2 +- src/interfaces/wallet.h | 2 +- src/miner.h | 2 +- src/primitives/transaction.h | 2 +- src/qt/bitcoingui.cpp | 2 +- src/qt/bitcoingui.h | 2 +- src/qt/guiutil.cpp | 2 +- src/qt/sendcoinsdialog.cpp | 2 +- src/qt/splashscreenveil.cpp | 2 +- src/qt/transactionrecord.cpp | 2 +- src/qt/veil.cpp | 2 +- src/qt/veil/addressesmenu.cpp | 2 +- src/qt/veil/addressesmenu.h | 2 +- src/qt/veil/addresseswidget.cpp | 2 +- src/qt/veil/addresseswidget.h | 2 +- src/qt/veil/balance.cpp | 2 +- src/qt/veil/balance.h | 2 +- src/qt/veil/miningwidget.cpp | 2 +- src/qt/veil/miningwidget.h | 2 +- src/qt/veil/qtutils.cpp | 2 +- src/qt/veil/receivewidget.cpp | 2 +- src/qt/veil/receivewidget.h | 2 +- src/qt/veil/settings/settingsfaq.cpp | 2 +- src/qt/veil/settings/settingswidget.cpp | 2 +- src/qt/veil/tutorialmnemonicrevealed.cpp | 2 +- src/qt/veil/tutorialwidget.cpp | 2 +- src/qt/veil/tutorialwidget.h | 2 +- src/qt/veil/veilstatusbar.cpp | 2 +- src/qt/veil/veilstatusbar.h | 2 +- src/rpc/blockchain.cpp | 2 +- src/rpc/mining.cpp | 2 +- src/rpc/rawtransaction.cpp | 2 +- src/txdb.cpp | 2 +- src/validation.cpp | 2 +- src/validation.h | 2 +- src/veil/mnemonic/mnemonicwalletinit.cpp | 2 +- src/veil/ringct/anonwallet.cpp | 2 +- src/veil/ringct/rpcanonwallet.cpp | 2 +- src/veil/zerocoin/spendreceipt.cpp | 2 +- src/veil/zerocoin/zchain.h | 2 +- src/veil/zerocoin/ztracker.cpp | 2 +- src/veil/zerocoin/ztracker.h | 2 +- src/wallet/rpcdump.cpp | 2 +- src/wallet/rpcwallet.cpp | 2 +- src/wallet/rpczerocoin.cpp | 2 +- src/wallet/wallet.cpp | 2 +- src/wallet/wallet.h | 2 +- 52 files changed, 52 insertions(+), 52 deletions(-) diff --git a/contrib/devtools/copyright_header.py b/contrib/devtools/copyright_header.py index 19a57675f..32352cab6 100755 --- a/contrib/devtools/copyright_header.py +++ b/contrib/devtools/copyright_header.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # Copyright (c) 2016-2019 The Bitcoin Core developers -# Copyright (c) 2019 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/chain.cpp b/src/chain.cpp index 074580ccc..b7a3f1348 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 40bd32a91..c987c15aa 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 e89854f12..e2a96aed0 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 06cd2105b..a03e14e50 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 bed4ad274..7e571a80d 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 99afec331..9cc39d528 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 bfce27b50..97d502dfc 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 c4aaaf28b..62d958bfb 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 91bd2aa5d..9ebcab2c1 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 92a37b8c3..ed188e42d 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 4c5194962..27af959a1 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 67a0aa4d9..d1438998c 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 7e6a7ef93..c5793cb61 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 357b666a5..ef7e9a558 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 a8af3450c..32cd688df 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/addressesmenu.cpp b/src/qt/veil/addressesmenu.cpp index a27849b93..18d5d659e 100644 --- a/src/qt/veil/addressesmenu.cpp +++ b/src/qt/veil/addressesmenu.cpp @@ -1,4 +1,4 @@ -// 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/qt/veil/addressesmenu.h b/src/qt/veil/addressesmenu.h index a0629c88c..22dcd6d75 100644 --- a/src/qt/veil/addressesmenu.h +++ b/src/qt/veil/addressesmenu.h @@ -1,4 +1,4 @@ -// 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/qt/veil/addresseswidget.cpp b/src/qt/veil/addresseswidget.cpp index 559507a26..6d2c6982a 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/addresseswidget.h b/src/qt/veil/addresseswidget.h index 79b0a7fea..88bfeb318 100644 --- a/src/qt/veil/addresseswidget.h +++ b/src/qt/veil/addresseswidget.h @@ -1,4 +1,4 @@ -// 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/qt/veil/balance.cpp b/src/qt/veil/balance.cpp index 891e38f6a..2afbd0c17 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/balance.h b/src/qt/veil/balance.h index ec8174994..727c3cb44 100644 --- a/src/qt/veil/balance.h +++ b/src/qt/veil/balance.h @@ -1,4 +1,4 @@ -// 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/qt/veil/miningwidget.cpp b/src/qt/veil/miningwidget.cpp index 12dca1a07..f3a4cb3b2 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 d8f8ad831..23631cc95 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 88d7251f3..829c25471 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 125b807f2..5d28d3f39 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/receivewidget.h b/src/qt/veil/receivewidget.h index f7cd9de33..c47b433b4 100644 --- a/src/qt/veil/receivewidget.h +++ b/src/qt/veil/receivewidget.h @@ -1,4 +1,4 @@ -// 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/qt/veil/settings/settingsfaq.cpp b/src/qt/veil/settings/settingsfaq.cpp index 399499240..b3b84ad1b 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-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/settingswidget.cpp b/src/qt/veil/settings/settingswidget.cpp index fd8ba94c3..36fc72c63 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 fefc95ed7..f171d9846 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 2219ef0e2..fcdca545a 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 eb0cf491c..9256feda1 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 8fcf256d1..1ee1a750e 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 4c228f9ee..1862b59a4 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 f39dd915d..edf6ddc7d 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 dd85d0b99..9e9b1a865 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 860771d31..7018fdfe3 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 592876556..eeed3ef6b 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 fd47ae9fd..c670c63ba 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. diff --git a/src/validation.h b/src/validation.h index ee1e33418..bd16053b8 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 1fe4e3199..66ecf5d99 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 6b52c0e8f..5cd7a1d12 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 ae3f9d5ba..e9512160b 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/spendreceipt.cpp b/src/veil/zerocoin/spendreceipt.cpp index 5b7f3b0f6..acdc548f8 100644 --- a/src/veil/zerocoin/spendreceipt.cpp +++ b/src/veil/zerocoin/spendreceipt.cpp @@ -1,5 +1,5 @@ // Copyright (c) 2017-2019 The PIVX 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/veil/zerocoin/zchain.h b/src/veil/zerocoin/zchain.h index 9ceb38ac2..d4eafb1d3 100644 --- a/src/veil/zerocoin/zchain.h +++ b/src/veil/zerocoin/zchain.h @@ -1,5 +1,5 @@ // Copyright (c) 2017-2019 The PIVX developers -// Copyright (c) 2019-2020 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/veil/zerocoin/ztracker.cpp b/src/veil/zerocoin/ztracker.cpp index efc6b4940..3f08b8bb0 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 59fe6bee2..078af4fb5 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 7737297d3..b921d2f9d 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 8c8ce5d8e..f18d497b7 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 ecd7eae81..cf103f4cc 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 fd338e796..277fbe875 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 291c43d52..d3d14cc76 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. From 7a85b8475e6f769ad25dab6925e98e8513e8be8b Mon Sep 17 00:00:00 2001 From: Sean Phillips <46495592+seanPhill@users.noreply.github.com> Date: Thu, 27 Aug 2026 22:01:06 -0500 Subject: [PATCH 3/3] Updated copyright years and corrected some from the previous commit - Corrected copyright_headers.py script somewhat, corrected some mistakes it made, added some commentary on the script, and added a script to sort git blame chronologically to accurately ensure the correct copyright year. - Corrected the main copyright year for the master branch having corrected it previously. only on a release branch. --- configure.ac | 2 +- contrib/devtools/README.md | 16 ++++++++++++- contrib/devtools/copyright_header.py | 35 ++++++++++++++++------------ contrib/devtools/git-blame-chrono.sh | 25 ++++++++++++++++++++ src/qt/veil/addressesmenu.cpp | 2 +- src/qt/veil/addressesmenu.h | 2 +- src/qt/veil/addresseswidget.h | 2 +- src/qt/veil/balance.h | 2 +- src/qt/veil/receivewidget.h | 2 +- src/qt/veil/settings/settingsfaq.cpp | 2 +- src/veil/zerocoin/spendreceipt.cpp | 2 +- src/veil/zerocoin/zchain.h | 2 +- 12 files changed, 69 insertions(+), 25 deletions(-) create mode 100755 contrib/devtools/git-blame-chrono.sh diff --git a/configure.ac b/configure.ac index e38761a47..784fbaf38 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 a0b622534..ff696f52f 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 32352cab6..23b6d4aaf 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-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. +# 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 000000000..8ba511e81 --- /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/qt/veil/addressesmenu.cpp b/src/qt/veil/addressesmenu.cpp index 18d5d659e..a27849b93 100644 --- a/src/qt/veil/addressesmenu.cpp +++ b/src/qt/veil/addressesmenu.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2019-2022 The Veil developers +// Copyright (c) 2019-2021 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/addressesmenu.h b/src/qt/veil/addressesmenu.h index 22dcd6d75..a0629c88c 100644 --- a/src/qt/veil/addressesmenu.h +++ b/src/qt/veil/addressesmenu.h @@ -1,4 +1,4 @@ -// Copyright (c) 2019-2022 The Veil developers +// Copyright (c) 2019-2021 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.h b/src/qt/veil/addresseswidget.h index 88bfeb318..79b0a7fea 100644 --- a/src/qt/veil/addresseswidget.h +++ b/src/qt/veil/addresseswidget.h @@ -1,4 +1,4 @@ -// Copyright (c) 2019-2022 The Veil developers +// Copyright (c) 2019-2021 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.h b/src/qt/veil/balance.h index 727c3cb44..ec8174994 100644 --- a/src/qt/veil/balance.h +++ b/src/qt/veil/balance.h @@ -1,4 +1,4 @@ -// Copyright (c) 2019-2022 The Veil developers +// Copyright (c) 2019-2021 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.h b/src/qt/veil/receivewidget.h index c47b433b4..f7cd9de33 100644 --- a/src/qt/veil/receivewidget.h +++ b/src/qt/veil/receivewidget.h @@ -1,4 +1,4 @@ -// Copyright (c) 2019-2022 The Veil developers +// Copyright (c) 2019-2021 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 b3b84ad1b..fd64d2901 100644 --- a/src/qt/veil/settings/settingsfaq.cpp +++ b/src/qt/veil/settings/settingsfaq.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2019-2026 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/veil/zerocoin/spendreceipt.cpp b/src/veil/zerocoin/spendreceipt.cpp index acdc548f8..5b7f3b0f6 100644 --- a/src/veil/zerocoin/spendreceipt.cpp +++ b/src/veil/zerocoin/spendreceipt.cpp @@ -1,5 +1,5 @@ // Copyright (c) 2017-2019 The PIVX developers -// Copyright (c) 2019-2022 The Veil developers +// Copyright (c) 2019-2021 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/zchain.h b/src/veil/zerocoin/zchain.h index d4eafb1d3..9ceb38ac2 100644 --- a/src/veil/zerocoin/zchain.h +++ b/src/veil/zerocoin/zchain.h @@ -1,5 +1,5 @@ // Copyright (c) 2017-2019 The PIVX developers -// Copyright (c) 2019-2022 The Veil developers +// Copyright (c) 2019-2020 The Veil developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php.