Skip to content

Conversation

@maflcko
Copy link
Member

@maflcko maflcko commented Oct 3, 2017

This mostly backports various commits that fix(ed) bugs and issues.

However, it also includes two patches for qt that only fix minor issues,
as well as some doc patches.

kallewoof and others added 15 commits October 3, 2017 18:15
Uninitialized data potentially used in `rpc/blockchain.cpp`:

```
static UniValue BIP9SoftForkDesc(const Consensus::Params& consensusParams, Consensus::DeploymentPos id)
{
    ...
    const ThresholdState thresholdState = VersionBitsTipState(consensusParams, id);
    ...
    if (THRESHOLD_STARTED == thresholdState)
    {
        UniValue statsUV(UniValue::VOBJ);
        BIP9Stats statsStruct = VersionBitsTipStatistics(consensusParams, id);
        statsUV.push_back(Pair("period", statsStruct.period));
        statsUV.push_back(Pair("threshold", statsStruct.threshold));
        statsUV.push_back(Pair("elapsed", statsStruct.elapsed));
        statsUV.push_back(Pair("count", statsStruct.count));
        statsUV.push_back(Pair("possible", statsStruct.possible));
        rv.push_back(Pair("statistics", statsUV));
    }
    ...
    return rv;
}
```

Github-Pull: bitcoin#10957
Rebased-From: 3eb53b8
Use POSIX rename atomicity at the `bitcoind` side to create a working
cookie atomically:

- Write `.cookie.tmp`, close file
- Rename `.cookie.tmp` to `.cookie`

This avoids clients reading invalid/partial cookies as in bitcoin#11129.

Github-Pull: bitcoin#11131
Rebased-From: 82dd719
CWallet::MarkConflicted may acquire the cs_main lock after
CWalletDB::LoadWallet acquires the cs_wallet lock during wallet initialization.
(CWalletDB::LoadWallet calls ReadKeyValue which calls CWallet::LoadToWallet
which calls CWallet::MarkConflicted). This is the opposite order that cs_main
and cs_wallet locks are acquired in the rest of the code, and so leads to
POTENTIAL DEADLOCK DETECTED errors if bitcoin is built with -DDEBUG_LOCKORDER.

This commit changes CWallet::LoadWallet (which calls CWalletDB::LoadWallet) to
acquire both locks in the standard order. It also fixes some tests that were
acquiring wallet and main locks out of order and failed with the new locking in
CWallet::LoadWallet.

Error was reported by Luke Dashjr <[email protected]> in
https://botbot.me/freenode/bitcoin-core-dev/msg/90244330/

Github-Pull: bitcoin#11126
Rebased-From: de9a1db
(cherry picked from commit c41224d)

Github-Pull: bitcoin#11247
Rebased-From: a1ea1cf
The first argument of estimatesmartfee was renamed from nblocks to
conf_target in 06bcdb8. Update the
client-side table as well.

Github-Pull: bitcoin#11267
Rebased-From: 24697c4
Removes the extraneous custom fee radio group and its single radio
button. The radio button is replaced with a label that has the
radio button's text.

Github-Pull: bitcoin#11334
Rebased-From: e53fa4a
In an abundance of caution this restores "Bitcoin Developers" to the COPYING file in
case there were contributors before that point in time that would object to the
current label.  It's harmless and more pedantically correct.

[Change extracted from the Bitcoin-abc repository, commit message by gmaxwell]

Signed-off-by: Gregory Maxwell <[email protected]>

Github-Pull: bitcoin#11318
Rebased-From: d552ed6
@maflcko maflcko changed the title 0.15.1: Backport fixes 0.15.1: Backports Oct 3, 2017
showHide(true);
userClosed = true;
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry there was a bad commit-split in #11237 which meant the EOF newline got deleted and readded in the next commit, might want to squash them or just fix this

@fanquake fanquake added this to the 0.15.1 milestone Oct 3, 2017
sdaftuar and others added 5 commits October 4, 2017 11:47
Replace witness-stripped wallet transactions with full transactions;
this can happen when upgrading from a pre-segwit wallet to a segwit-
aware wallet.

Github-Pull: bitcoin#11225
Rebased-From: d01a968
Writes the GUI settings to `guisettings.bak` in the data directory
before wiping them. This can be used to retroactively troubleshoot
issues (e.g. bitcoin#11262) where `-resetguisettings` solves the problem.

Github-Pull: bitcoin#11338
Rebased-From: 723aa1b
This should fix all the non-dependancy issues for termux builds.
See Github issue bitcoin#11388.

Github-Pull: bitcoin#11440
Rebased-From: 96c2ce9
Prevent arbitrary files from being overwritten. There have been reports
that users have overwritten wallet files this way. It may also avoid
other security issues.

Fixes bitcoin#9934. Adds mention to release notes and adds a test.

Github-Pull: bitcoin#9937
Rebased-From: 0cd9273
donaloconnor and others added 4 commits October 5, 2017 18:56
…ATH% paths that cause issues with the make system

Github-Pull: bitcoin#11437
Rebased-From: 4f890ba
Make the SOCKS code more consistent, and document the constants used.

Github-Pull: bitcoin#11397
Rebased-From: 22f816e
Fixes bitcoin#11462. Updated documentation for importprivkey function to use the correct name for the first argument.
Also updates a call to importprivkey to use named args in functional test.

Github-Pull: bitcoin#11465
Rebased-From: aa57590
@maflcko maflcko force-pushed the Mf1710-0151Backports branch from c78fecc to 405e069 Compare October 9, 2017 20:33
@laanwj
Copy link
Member

laanwj commented Oct 11, 2017

utACK on commit list, did not re-review all the patches.

@laanwj laanwj modified the milestones: 0.15.1, 0.15.0.2 Oct 12, 2017
@fanquake
Copy link
Member

utACK 405e069

@laanwj laanwj merged commit 20cdc2b into bitcoin:0.15 Oct 18, 2017
laanwj added a commit that referenced this pull request Oct 18, 2017
20cdc2b Fix importmulti bug when importing an already imported key (Pedro Branco)
405e069 Update importprivkey named args documentation (Dusty Williams)
c94527a [Docs] Update Windows build instructions for using WSL and Ubuntu 17.04 (fanquake)
27e861a net: Improve and document SOCKS code (Wladimir J. van der Laan)
dea3b87 Add new step to clean $PATH var by removing /mnt specific Window's %PATH% paths that cause issues with the make system (Donal OConnor)
a43be5b rpc: Prevent `dumpwallet` from overwriting files (Wladimir J. van der Laan)
b6c0209 Fix validationinterface build on super old boost/clang (Matt Corallo)
6a62c74 qt: Backup former GUI settings on `-resetguisettings` (Wladimir J. van der Laan)
0fe2a9a when clearing addrman clear mapInfo and mapAddr (Gregory Sanders)
6b4d9f2 wallet: update stored witness in AddToWallet (Suhas Daftuar)
62d18cd doc: Prepare release notes for 0.15.1 (MarcoFalke)
8b61aee Put back inadvertently removed copyright notices (Paul Berg)
75997c3 Disallow uncompressed pubkeys in bitcoin-tx [multisig] output adds (Matt Corallo)
8d13b42 Replace save|restoreWindowGeometry with Qt functions (MeshCollider)
6642558 [Qt] Add delay before filtering transactions Fixes 3141 (Lucas Betschart)
19d63e8 Remove custom fee radio group (Andrew Chow)
b1a6c94 rpc: make estimatesmartfee argument naming consistent with documentation (Wladimir J. van der Laan)
921542e rpc: update cli for estimatefee argument rename (Wladimir J. van der Laan)
2e31b1d Fix division by zero in time remaining (MeshCollider)
47c02a8 qt: Use IsMine to validate custom change address (Chris Moore)
7310f1f [Qt] Fix display of package name on 'open config file' tooltip (Daniel Edgecumbe)
2cb720a Acquire cs_main lock before cs_wallet during wallet initialization (Russell Yanofsky)
b278a43 rpc: Write authcookie atomically (Wladimir J. van der Laan)
50bd3f6 Avoid returning a BIP9Stats object with uninitialized values (practicalswift)
9e8aae3 [wallet] Close DB on error. (Karl-Johan Alm)

Pull request description:

  This mostly backports various commits that fix(ed) bugs and issues.

  However, it also includes two patches for qt that only fix minor issues,
  as well as some doc patches.

Tree-SHA512: 5165e309faf6b4395fdf2f6662ccc0d58306971f3769e675504f17b2055efe29b2919f22d0dbf78c4c2dc7fd5c9d08a2c53345615e4a1df73914526687c9d571
@maflcko maflcko deleted the Mf1710-0151Backports branch November 10, 2017 18:23
UdjinM6 added a commit to dashpay/dash that referenced this pull request Sep 27, 2019
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.