Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update upstream v4.1.1 #88

Open
wants to merge 2,257 commits into
base: update-upstream-v4.1.1
Choose a base branch
from

Conversation

wqking
Copy link
Collaborator

@wqking wqking commented Dec 26, 2020

No description provided.

random-zebra and others added 30 commits August 18, 2020 09:23
# Conflicts:
#	src/qt/vitae/privacywidget.cpp
#	src/qt/vitae/send.cpp
askpassphrasedialog is used instead
# Conflicts:
#	src/Makefile.qt.include
#	src/qt/CMakeLists.txt
#	src/qt/vitae/forms/walletpassworddialog.ui
#	src/qt/vitae/walletpassworddialog.cpp
#	src/qt/vitae/walletpassworddialog.h
Connect the signal emitted by WalletModel::requestUnlock to the TopBar,
in order to present the unlock-wallet dialog, before creating the
UnlockContext.
The wallet will then restore its previous state (Unlocked or
UnlockedForStaking) upon destruction of the UnlockContext object.
# Conflicts:
#	src/qt/vitae/topbar.cpp
PWidget::verifyWalletUnlocked replaced with the UnlockContext.

Add flows:
- Create New Receive Address
- Create New Payment Request
- Create Masternode Controller
- Create Cold Staking Address
- Send Cold Stake Delegation
- Add multisend recipient
# Conflicts:
#	src/qt/vitae/masternodeswidget.cpp
…llets

28d051f65f6429244bf4f5236671b57bf83c5acb [QA] Add Travis job to run functional tests with --legacywallet (random-zebra)
9b9407094b10ccab53f2594fe8af9f005793df82 [Tests] Skip unrelated tests when --legacywallet (random-zebra)

Pull request description:

  Follows the discussion in #1410 .
  Defines a list of tests to be skipped by the `test_runner` when running with the `--legacywallet` flag (not directly related to the wallet / key management).
  Also adds a specific Travis job, to run the functional test suite on pre-HD wallets.

  Note: currently based on top of
  - [x] #1411

  to make legacy tests pass.

ACKs for top commit:
  Fuzzbawls:
    ACK 28d051f65f6429244bf4f5236671b57bf83c5acb

Tree-SHA512: 4a8c896a3b8232221b8f86480d4b3e730297e1efb103cd61ac26fd104d6d90577a2fdab2a9002932c4d61d5a7404f7ef588e92958cdfb28249b018f58e74dd2a
aa661444c23497fa8053fc8d6ae1fbfe9814a4a4 [Tests] Remove non-determinism which is breaking net_tests (random-zebra)

Pull request description:

  from bitcoin#8070

  > If addrmanUncorrupted does not have the same nKey every time it will map addrs to different bucket positions and occasionally cause a collision between two addrs, breaking the test.

ACKs for top commit:
  Fuzzbawls:
    ACK aa661444c23497fa8053fc8d6ae1fbfe9814a4a4
  furszy:
    utACK aa66144 and merging

Tree-SHA512: 759b9214ec6c51d440559483bf3fc712407a9b9a14afca1f26f4383c468639054b5673a9d815775fad90a66308f1ac309ef7730808fcea0bdd5e48a95df654c3
5d492c033640f5dd03068a13493f98b046e24eda [CMake] Fix missing file error (Fuzzbawls)

Pull request description:

  #1443 removed the `denomgenerationdialog` files, but the `.cpp` file
  reference wasn't also removed from the GUI's `CMakeLists.txt` file.

ACKs for top commit:
  random-zebra:
    utACK 5d492c033640f5dd03068a13493f98b046e24eda
  furszy:
    utACK 5d492c0

Tree-SHA512: 4b705819352c0493099bfb55710483dad1aa7bc91725f24d43b07585dbdb06828bf2619b51e9482130de7ca2fd2be5b469a03d053e93e7fc2010b0c1a66bd3dc

# Conflicts:
#	src/qt/CMakeLists.txt
c54fd9dfded28f2b4ff86914422fb592bd86f320 [Qt] Switch to newer connect syntax (Fuzzbawls)

Pull request description:

  Switch all Qt connections to the newer functor-based syntax.

  Marked [WIP] for now until larger PRs can be merged.

  Mostly ported from bitcoin/bitcoin#13529

  Requires the following PR to be merged first in order to adhere to standards:
  - [x] #1351

ACKs for top commit:
  furszy:
    ACK c54fd9d
  random-zebra:
    ACK c54fd9dfded28f2b4ff86914422fb592bd86f320 and merging...

Tree-SHA512: d5222264566a8920ab97e8c586f134156d9d0514d014b430bdd47a34b0620ab94a1c6d341b6a57322f1131a8fad91a5e1af907f3bd7112d0ab5e04c4cc9f5ae5

# Conflicts:
#	.travis/lint_06_script.sh
#	src/qt/optionsdialog.cpp
#	src/qt/rpcconsole.cpp
#	src/qt/vitae.cpp
#	src/qt/vitae/navmenuwidget.cpp
#	src/qt/vitae/privacywidget.cpp
#	src/qt/vitae/send.cpp
53cfbee2ab38ba61091d63d631156e7684028861 [GUI] Automatic wallet backup after upgrade to HD (random-zebra)

Pull request description:

  Based on
  - [x] #1387

  Offer the option to directly backup the wallet after upgrade-to-HD (and successive re-lock) is completed.

  The message on the initial dialog is changed (from "Note that you will need to MAKE A NEW BACKUP.."):

  ![backup1](https://user-images.githubusercontent.com/18186894/77027832-8d4f8b00-6997-11ea-88b5-d48ec64dc318.png)

  If the user clicks "OK", and the wallet is locked, the unlock dialog is directly shown (as per #1387)

  ![backup2](https://user-images.githubusercontent.com/18186894/77027846-94769900-6997-11ea-8638-b59a11836fb3.png)

  After the upgrade, the client directly presents this dialog:

  ![backup3](https://user-images.githubusercontent.com/18186894/77028494-38ad0f80-6999-11ea-9fe4-1d1f06cf8c7c.png)

  If the user clicks "OK", then the open-file dialog is presented, so the user can select the filename for the backup file and click "Save" completing the flow.
  If the user clicks "CANCEL" (or dismisses the open-file dialog later), a snackbar  popup warns the user, telling to remember to backup asap.

ACKs for top commit:
  furszy:
    Tested ACK 53cfbee.
  Fuzzbawls:
    ACK 53cfbee2ab38ba61091d63d631156e7684028861

Tree-SHA512: 80fbcdb4d9805d75db98a0f394840f734314e6d249539997f1948cd7775ac2a81239b762386b7770c6ca4b8a2c38acdf1d5ae7ee7f07591bfdfc7dd4ee39cfc2
02acbc13ecee568b266001f6ed1636e4c4146917 [GUI][Trivial] Fix capsLabel color (make it text-warning) (random-zebra)

Pull request description:

  Ref: PIVX-Project/PIVX#1428 (comment)

  Caps-lock warning is black.
  Assign text-warning css to make it clearly visible (and instantly recognizable as warning) in both themes.

ACKs for top commit:
  Fuzzbawls:
    re-ACK 02acbc13ecee568b266001f6ed1636e4c4146917
  furszy:
    ACK 02acbc1

Tree-SHA512: f49a8e49e772c1da7ae60804a2a6109294d6a7889f47a0e094f523704bcac0df4dccfa248ba5db7f7b4f6786079376ed48facfc6cd72c386be007a7b6ae3bf74
…lableCoins

f2d31e5176c790086c990d5a73463d1c3f0d875e [Bug] Fix min depth requirement for stake inputs in AvailableCoins (random-zebra)

Pull request description:

  If `nDepth` is equal to `nStakeMinDepth - 1` then the coin is not skipped in `AvailableCoins` and gets included in the list of stakeable utxos.
  This utxo won't be able to stake though, as it will fail `ContextCheck` in `Stake()` (logging an error), thus it shouldn't have been included in the first place.

ACKs for top commit:
  furszy:
    ACK f2d31e5 .
  Fuzzbawls:
    ACK f2d31e5176c790086c990d5a73463d1c3f0d875e

Tree-SHA512: 1b75a555e9ad4d2526fdc49e9059baaed1c383b6abc121f9cd85c48f44f82b21e13e8ee66f6d535c078f226360f93fd12ebf1889124acb74c0e7fcc17464dad7
…plete

aa5dc7b2c6728d97aad36ad9125ed6a619bb8310 [Consensus] Strict check amounts in CCSFO for mnsync incomplete (random-zebra)
d6a106006a4ab00debe9bb34912c778ec21c20f8 [Consensus] CheckColdStakeFreeOutput when mnsync not complete (random-zebra)

Pull request description:

  Follow up to #1331 for the same bug.

  **Problem:** if the finalized budgets and the masternode list are not synchronized, the output returned from `IsBudgetPaymentBlock` is unreliable.

  For the moment we fix it by checking that the sum of the stake input value and block reward is at least equal to the sum of the values of non-free outputs.

  A better approach, for the future, would be probably to outright prevent any call to `CheckBlock` when `IsInitialBlockDownload` is false but mnSync is not fully completed yet.

Top commit has no ACKs.

Tree-SHA512: cd2e765b865172a55bd8b05d132d356078b1956da6449c819ebdcedd1291d412fdf4249ac5e0d1e7db808c9c3543451df085791ed743e7441618368a07fad6c6

# Conflicts:
#	src/main.cpp
b8f3277377b8ea7e421b23afb70b41b12542383b [Trivial] Cleaning not used pCheckpointCache. (furszy)

Pull request description:

  Auto-descriptive PR.

ACKs for top commit:
  random-zebra:
    utACK b8f3277377b8ea7e421b23afb70b41b12542383b

Tree-SHA512: 7c3e86b0d513b8e57c7396a384b7d78ac88c15647df768c88bd21e949ca6863440a4d259678fe1c09df570adb8c597a12d2e7fa5dc235e0056ae58561c6840c6
7d9adb8a272efbf36295917e964cb32565ceba1c [Bug] Fix g_best_block_initialization in ABC (random-zebra)

Pull request description:

  `g_best_block` holds a cached best block hash.
  This is updated during `ActivateBestChain` (in `UpdateTip`).

  **Problem**: at startup, the object is not initialized until a new block arrives (`ActivateBestChainStep` is not called) thus `g_best_block != chainActive.Tip()->GetBlockHash()` so, if the client stakes before receiving a new block, that stake gets orphaned.
  In case of segregated devnet with just one staker, it is impossible to move the chain at all.

ACKs for top commit:
  furszy:
    utACK 7d9adb8
  Fuzzbawls:
    ACK 7d9adb8a272efbf36295917e964cb32565ceba1c

Tree-SHA512: 9f46862c2e99ded240d589a765cede130248f8fbcb36dddccda4a35ac320bcb9e887b1e44de9c73e6cbbf9f193763b0cfd7bd00b14931c52e63f80f16e744a18
…rough proxy

fdca17c3251da125afda75e7673080df1810c9fc Consolidate scattered max peer connection values into single declaration. (furszy)
bd4c7137c7f8925120e6c5e789f6fb8af724528d netbase: Do not print an error on connection timeouts through proxy If a timeout happens while reading the proxy response, this effectively means we timed out while connecting to the remote node. This is very common for Tor, so do not print an error message. (furszy)
f936a2f5e23ef88378102d3aa214ee07b14beb2e netbase: Make InterruptibleRecv return an error code instead of bool. (furszy)

Pull request description:

  If a timeout happens while reading the proxy response, this effectively means we timed out while connecting to the remote node. This is very common for Tor, so do not print an error message to the log in that case.

  Avoids a flood of
  ```
  ERROR: Error reading proxy response
  ```

  while running through Tor, causing users to blame the proxy.

  Coming from upstream [9726](bitcoin/bitcoin#9726)

ACKs for top commit:
  Fuzzbawls:
    utACK fdca17c3251da125afda75e7673080df1810c9fc
  random-zebra:
    utACK fdca17c3251da125afda75e7673080df1810c9fc

Tree-SHA512: 6007c544710a0b103712f134c962368bd4704bbea4e1b93ccc55dd5ce65db063089facf3cdd335b132920256a9fe3fe59ed8e81add57f8ba85e9a7589c086961
[Squash] Definitive height for testnet: 1519000
# Conflicts:
#	src/chainparams.cpp
Meant to be used in the first output of the coinstake (unspendable
marker), to publish the signature of the used modifier.
The hash of this signature will be used as modifier for the next block.
coinstake txes are now marked with the first output that can either be
empty (as before) or with an OP_STAKEMODIFIER script
Previous modifier signature is published in the first coinstake output
and it's verified at the end of CheckProofOfStake
The name is now confusing as it could return true also for V3 modifiers.
Just use the height explicitely, which makes the code more readable.
random-zebra and others added 30 commits November 26, 2020 10:07
backports bitcoin@04b877361be8a457b4d4f7fd2277d73f00e2e61c
Github-Pull: #1578
Rebased-From: 677015aead4f206012ddb69cd722af39ca477a94
Github-Pull: #1580
Rebased-From: df9fc17f57d98077c468294b9f347fe614f90b78
Github-Pull: #1581
Rebased-From: b8a613a28ed4db32ae8b06cff0017a91419c1527
Github-Pull: #1576
Rebased-From: d063a7fc52c5710285b21ab94790994cea575f2b

# Conflicts:
#	src/qt/vitae/sendcustomfeedialog.cpp
#	src/qt/vitae/sendcustomfeedialog.h
Github-Pull: #1576
Rebased-From: 03be61e938a51a9de511e927816c8763f4d5db9f
Since the fee can be set to a value equal to minTxFee
Github-Pull: #1576
Rebased-From: b8fad43081bab7ccd77ab4740f53ce5d4566fbfe
pre-4.1 release update of the copyright headers

Github-Pull: #1583
Rebased-From: 81084704b5d9dddb2417d861ab2a2e4d5d3a8919

# Conflicts:
#	src/activemasternode.cpp
#	src/activemasternode.h
#	src/addrman.cpp
#	src/addrman.h
#	src/amount.h
#	src/base58.h
#	src/bip38.cpp
#	src/blocksignature.cpp
#	src/chain.cpp
#	src/chainparams.cpp
#	src/chainparams.h
#	src/chainparamsbase.cpp
#	src/chainparamsbase.h
#	src/checkpoints.h
#	src/coins.cpp
#	src/coins.h
#	src/core_write.cpp
#	src/crypter.cpp
#	src/crypter.h
#	src/denomination_functions.cpp
#	src/denomination_functions.h
#	src/httprpc.cpp
#	src/httpserver.cpp
#	src/init.h
#	src/invalid.cpp
#	src/key.cpp
#	src/keystore.h
#	src/libzerocoin/Accumulator.cpp
#	src/libzerocoin/Accumulator.h
#	src/libzerocoin/Coin.cpp
#	src/libzerocoin/CoinSpend.cpp
#	src/libzerocoin/CoinSpend.h
#	src/libzerocoin/Commitment.h
#	src/libzerocoin/bignum_gmp.cpp
#	src/masternode-payments.cpp
#	src/masternode-payments.h
#	src/masternode-sync.cpp
#	src/masternode-sync.h
#	src/masternode.cpp
#	src/masternode.h
#	src/masternodeman.cpp
#	src/masternodeman.h
#	src/merkleblock.cpp
#	src/net.cpp
#	src/net.h
#	src/netbase.cpp
#	src/pow.cpp
#	src/primitives/block.h
#	src/primitives/transaction.cpp
#	src/primitives/transaction.h
#	src/protocol.cpp
#	src/protocol.h
#	src/qt/addresstablemodel.h
#	src/qt/askpassphrasedialog.cpp
#	src/qt/bantablemodel.cpp
#	src/qt/bitcoinunits.cpp
#	src/qt/clientmodel.cpp
#	src/qt/clientmodel.h
#	src/qt/guiutil.cpp
#	src/qt/guiutil.h
#	src/qt/optionsdialog.cpp
#	src/qt/optionsmodel.cpp
#	src/qt/optionsmodel.h
#	src/qt/paymentserver.cpp
#	src/qt/peertablemodel.cpp
#	src/qt/recentrequeststablemodel.cpp
#	src/qt/rpcconsole.cpp
#	src/qt/rpcconsole.h
#	src/qt/transactiondesc.cpp
#	src/qt/utilitydialog.cpp
#	src/qt/vitae.cpp
#	src/qt/winshutdownmonitor.cpp
#	src/random.cpp
#	src/rpcblockchain.cpp
#	src/rpcmasternode.cpp
#	src/rpcmining.cpp
#	src/script/interpreter.cpp
#	src/script/script.cpp
#	src/script/script.h
#	src/script/standard.cpp
#	src/script/standard.h
#	src/spork.cpp
#	src/spork.h
#	src/stakeinput.cpp
#	src/stakeinput.h
#	src/swifttx.cpp
#	src/sync.cpp
#	src/sync.h
#	src/test/Checkpoints_tests.cpp
#	src/test/accounting_tests.cpp
#	src/test/base58_tests.cpp
#	src/test/main_tests.cpp
#	src/test/netbase_tests.cpp
#	src/test/pmt_tests.cpp
#	src/test/script_tests.cpp
#	src/test/sighash_tests.cpp
#	src/test/sigopcount_tests.cpp
#	src/test/test_vitae.cpp
#	src/test/util_tests.cpp
#	src/test/zerocoin_denomination_tests.cpp
#	src/test/zerocoin_transactions_tests.cpp
#	src/timedata.cpp
#	src/torcontrol.cpp
#	src/txdb.cpp
#	src/txdb.h
#	src/txmempool.cpp
#	src/txmempool.h
#	src/ui_interface.h
#	src/uint512.h
#	src/util.h
#	src/version.h
#	src/vitae-tx.cpp
#	src/zvit/deterministicmint.cpp
#	src/zvit/zerocoin.h
#	src/zvit/zvitwallet.cpp
#	src/zvit/zvitwallet.h
#	src/zvitchain.cpp
This action connection was incorrectly commented out when switching to
the new QT5 `connect` syntax. Fix it now by using a simple lambda.

Github-Pull: #1594
Rebased-From: 32867b2cb578d1bef487f708a1770c0324891ac0
Github-Pull: #1591
Rebased-From: 940f3f3b5b095a1cb0c3fbe8a078700ebfe0d00a

# Conflicts:
#	src/chainparams.cpp
Prioritize the action described by the button:
- if "Select All", then verify that all entries are checked, otherwise
check them
- if "Unselect All", then verify that all entries are unchecked,
otherwise uncheck them.
Github-Pull: #1595
Rebased-From: 34422fc2f2cc162ae31405c89d3125fcd61e91ed
Github-Pull: #1599
Rebased-From: 1ee739821b5994af706964674b8d503509f67e32
Github-Pull: #1599
Rebased-From: b1d423b8e2eef05df6517eb0707230ced15892a3
Github-Pull: #1599
Rebased-From: 150c8f4de017c1927abfbaa8f6071e111fc5e3d1
Fixes a bug that prevented the editing of Cold Staking address labels in
the address book due to the passing of an empty purpose, which
`CWallet::ParseIntoAddress()` needs in order to determine if an address
is a cold staking type address.

Github-Pull: #1588
Rebased-From: 805e436da034e557c09f95c06677b265497b2b3f
The current sending flow clears and/or overwrites the user-supplied
address label multiple times, including when doing final address
validation after clicking the send button. This results in the entered
label never being used.

This stops the default clear and the overzealous replacing/setting of
the label text.

Github-Pull: #1589
Rebased-From: 80aba61a74e128c10d4ec30faecac2541dac300c
# Conflicts:
#	configure.ac
# Conflicts:
#	doc/man/pivx-cli.1
#	doc/man/pivx-qt.1
#	doc/man/pivx-tx.1
#	doc/man/pivxd.1
(cherry picked from commit 4fc96547d338fb58977bf1604268ff673088f128)

# Conflicts:
#	src/masternode.cpp
#	src/masternode.h
(cherry picked from commit a18c9cb2482a3361cfeb8fcaad54fa41cbe1e1d9)

# Conflicts:
#	src/main.cpp
#	src/version.h
Which could lead to MNs running in the main chain accepting pings from nodes in forks.

(cherry picked from commit bb63cd5ca2f23087bdac9de6b1b376aec0fb97d9)

# Conflicts:
#	src/masternode.cpp
# Conflicts:
#	configure.ac
# Conflicts:
#	doc/release-notes.md
# Conflicts:
#	configure.ac
#	src/chainparams.cpp
#	src/main.cpp
#	src/rpcserver.cpp
#	src/rpcserver.h
#	src/rpcwallet.cpp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants