-
Notifications
You must be signed in to change notification settings - Fork 37.7k
0.15: Backports #11592
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
0.15: Backports #11592
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK 6666d9524148931d261aed1be6700562876e8116
utACK, though wouldn't we in the long run be better off backporting the function name change to the 0.15 branch wholesale? |
Given we want to use the 0.15 branch for segwit-wallet, that seems like a wise decision to me. |
…t cases Github-Pull: bitcoin#10853 Rebased-From: 5864e9c
…xception Github-Pull: bitcoin#10853 Rebased-From: 677d893
-BEGIN VERIFY SCRIPT- sed -i 's/assert_raises_jsonrpc/assert_raises_rpc_error/g' test/functional/*py test/functional/test_framework/*py -END VERIFY SCRIPT- Github-Pull: bitcoin#10853 Rebased-From: 47ba8cf
6666d95
to
d94fc33
Compare
Right, #11376 (0.15.1) needs it as well. |
Seems fine, but if you wanted a more minimal change you could just add: assert_raises_rpc_error = assert_raises_jsonrpc to the bottom of util.py to add an alias for the new function. |
691c733
to
1aa6f88
Compare
Previous behaviour was to destroy the wallet (to zero-length) Github-Pull: bitcoin#11376 Rebased-From: 5d465e3
Now using a std::unique_ptr, the Db instance is correctly released when CDB initialization fails. The internal CDB state and mapFileUseCount are only mutated when the CDB initialization succeeds. Github-Pull: bitcoin#11492 Rebased-From: 7104de8
Make sure wallet databases have unique fileids. If they don't, throw an error. BDB caches do not work properly when more than one open database has the same fileid, because values written to one database may show up in reads to other databases. Bitcoin will never create different databases with the same fileid, but users can create them by manually copying database files. BDB caching bug was reported by Chris Moore <dooglus@gmail.com> bitcoin#11429 Fixes bitcoin#11429 Github-Pull: bitcoin#11476 Rebased-From: 478a89c
This should fix issues with the multiwallet test and symlinks when the tmpdir is a relative path. Rather than fixing os.symlink to work with paths relative to a directory descriptor, which does not work on Windows, normalize the path instead. Github-Pull: bitcoin#11472 Rebased-From: fa9de37
Github-Pull: bitcoin#11472 Rebased-From: fafa003
269e6dd
to
5ab0dd8
Compare
Github-Pull: bitcoin#10357 Rebased-From: 0311836
Nodes don't consider themselves out of "initial block download" until their active chain has more work than nMinimumChainWork. While in initial block download, nodes won't relay blocks to their peers, so test that this parameter functions as intended by verifying that block relay only succeeds past a given node once its nMinimumChainWork has been exceeded. Github-Pull: bitcoin#10357 Rebased-From: eac64bb
A peer could try to waste our resources by sending us unrequested blocks with low work, eg to fill up our disk. Since e265200 we no longer request blocks until we know we're on a chain with more than nMinimumChainWork (our anti-DoS threshold), but we would still process unrequested blocks that had more work than our tip. This commit fixes that behavior. Github-Pull: bitcoin#11458 Rebased-From: ce8cd7a
Github-Pull: bitcoin#11458 Rebased-From: 08fd822
238b4a2
to
55b7abf
Compare
8c8e512
to
55b7abf
Compare
* This removes block-size-limiting code in favor of GBT clients doing the limiting themselves (if at all). * -blockmaxsize is deprecated and only used to calculate an implied blockmaxweight, addressing confusion from multiple users. * getmininginfo's currentblocksize return value was returning garbage values, and has been removed, also removing a GetSerializeSize call in some block generation inner loops and potentially addressing some performance edge cases. Github-Pull: bitcoin#11100 Rebased-From: ba206d2
No sensible user will ever keep the default settings here, so not having sensible defaults only serves to screw users who are paying less attention, which makes for terrible defaults. Github-Pull: bitcoin#11100 Rebased-From: 3dc263c
Github-Pull: bitcoin#11100 Rebased-From: 6f703e9
Github-Pull: bitcoin#11560 Rebased-From: 2d4327d
Github-Pull: bitcoin#11560 Rebased-From: db32a65
If our tip hasn't updated in a while, that may be because our peers are not relaying blocks to us that we would consider valid. Allow connection to an additional outbound peer in that circumstance. Also, periodically check to see if we are exceeding our target number of outbound peers, and disconnect the one which has least recently announced a new block to us (choosing the newest such peer in the case of tie). Github-Pull: bitcoin#11560 Rebased-From: ac7b37c
Github-Pull: bitcoin#11560 Rebased-From: 83df257
Github-Pull: bitcoin#11560 Rebased-From: 6262915
A rare race condition may trigger while awaiting the body of a message, see upsteam commit 5ff8eb26371c4dc56f384b2de35bea2d87814779 for details. This may fix some reported rpc hangs/crashes. Github-Pull: bitcoin#11593 Rebased-From: 6b58360
The bug was introduced in 2.1.6-beta, versions before that don't need the workaround. Github-Pull: bitcoin#11593 Rebased-From: 97932cd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK 8195cb0
Did not thoroughly vet each change, but backported changes myself and verified conflict resolution.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK 8195cb0. I verified that the cherry-pick commits were tagged with the right PR numbers and were previously merged to master, and I confirmed that all the merge conflict resolutions and diffs after cherry-picking looked good.
Used a little bash script to help with this
BRANCH=remotes/origin/0.15
BACKPORT=11592
git reset --hard
git checkout $BRANCH
for commit in $(git rev-list --reverse --topo-order $BRANCH..remotes/origin/pull/$BACKPORT/head); do
pr=$(git log -n1 --pretty=format:%B "$commit" | sed -n 's/Github-Pull: #//p')
orig=$(git log -n1 --pretty=format:%B "$commit" | sed -n 's/Rebased-From: //p')
echo "- Commit $commit orig $orig pr $pr"
if [ -z "$pr" ]; then
# Commit is not from a pr, just cherry pick and add REVIEWME tag
git cherry-pick "$commit" || exit 1
GIT_EDITOR="sed -i '1 s/.*/REVIEWME\n\n&/'" git commit --amend
continue
fi
if ! git -c rerere.enabled=false cherry-pick $orig > /dev/null; then
EDITOR=true git commit -a
fi
if ! git diff --quiet "HEAD..$commit"; then
git read-tree "$commit"
git commit -m "REVIEWME from $commit orig $orig pr $pr"
while ! git reset --hard; do sleep 1; done
fi
if ! grep -q "$orig" <(git rev-list $BRANCH..remotes/origin/pull/$pr/head); then
echo "Error: Commit $orig not found in pr $pr" >&2
exit 1
fi
if [ "$(git merge-base $orig origin/master)" != $orig ]; then
echo "Error: Commit $orig from pr $pr not found in master" >&2
exit 1
fi
done
git log --grep REVIEWME -p $BRANCH..HEAD
utACK 8195cb0, assuming Travis is happy with it. |
NACK #11100. Removing functionality has no place being snuck into a backport, and benefits nobody. It is only ever a reason for NOT upgrading. |
I manually verified the backports here; conflict resolution looks correct to me as well. ACK 8195cb0 |
utACK 8195cb0 |
utACK 8195cb0, looked over the list of backported PRs, and verified using @ryanofsky's script. |
8195cb0 rpc: further constrain the libevent workaround (Cory Fields) 34153a7 rpc: work-around an upstream libevent bug (Cory Fields) fc308a6 Add unit test for stale tip checking (Suhas Daftuar) 2ed0647 Add CConnmanTest to mutate g_connman in tests (João Barbosa) a607a95 Connect to an extra outbound peer if our tip is stale (Suhas Daftuar) 459f2db Track tip update time and last new block announcement from each peer (Suhas Daftuar) 49bf090 net: Allow connecting to extra outbound peers (Suhas Daftuar) bb83fe1 Add release notes describing blockmaxweight deprecation (Matt Corallo) 4c82cea Use a sensible default for blockmaxweight (Matt Corallo) 7871a7d Deprecate confusing blockmaxsize, fix getmininginfo output (Matt Corallo) 6baa317 Fix minchainwork test for 0.15 backport (Suhas Daftuar) 55b7abf Make p2p-acceptablock not an extended test (Matt Corallo) 5bec774 [qa] test that invalid blocks on an invalid chain get a disconnect (Matt Corallo) 92d6105 Reject headers building on invalid chains by tracking invalidity (Matt Corallo) 51001d6 Accept unrequested blocks with work equal to our tip (Matt Corallo) c6e4d0c Stop always storing blocks from whitelisted peers (Matt Corallo) e976c36 Rewrite p2p-acceptblock in preparation for slight behavior changes (Matt Corallo) ec8dedf net: Add missing lock in ProcessHeadersMessage(...) (practicalswift) 59b210d Disconnect outbound peers relaying invalid headers (Suhas Daftuar) fc966bb moveonly: factor out headers processing into separate function (Suhas Daftuar) e327224 Add unit test for outbound peer eviction (Suhas Daftuar) 9961abf Permit disconnection of outbound peers on bad/slow chains (Suhas Daftuar) bf191a7 Disconnecting from bad outbound peers in IBD (Suhas Daftuar) d570aa4 Fix uninitialized g_connman crash in Shutdown() (MeshCollider) 0a5477c net: stop both net/net_processing before destroying them (Cory Fields) b4136f2 net: drop unused connman param (Cory Fields) dc897e5 net: use an interface class rather than signals for message processing (Cory Fields) 8aee55a net: pass CConnman via pointer rather than reference (Cory Fields) 6f27965 Rename fAddnode to a more-descriptive "manual_connection" (Matt Corallo) ffb6ea4 Add comment explaining forced processing of compact blocks (Suhas Daftuar) 2df65ee qa: add test for minchainwork use in acceptblock (Suhas Daftuar) 3acec38 Don't process unrequested, low-work blocks (Suhas Daftuar) 0e9d04b [qa] Test nMinimumChainWork (Suhas Daftuar) da4908c Allow setting nMinimumChainWork on command line (Suhas Daftuar) 4108879 qa: Remove never used return value of sync_with_ping (MarcoFalke) f3457d0 qa: Make tmpdir option an absolute path (MarcoFalke) 9c8006d Avoid opening copied wallet databases simultaneously (Russell Yanofsky) de7053f [wallet] Fix leak in CDB constructor (João Barbosa) fd79ed6 Ensure backupwallet fails when attempting to backup to source file (Tomas van der Wansem) d94fc33 scripted-diff: rename assert_raises_jsonrpc to assert_raises_rpc error (John Newbery) 623de0a [tests] do not allow assert_raises_message to be called with JSONRPCException (John Newbery) 5b728c8 [tests] remove direct testing on JSONRPCException from individual test cases (John Newbery) Pull request description: Tree-SHA512: 9fdb5c47844a899271023d8d445f7fc728e3ad71916490cd9783464684967594b07cda05dd644b722bfcea9fade74d06cfc501e1a68abf118d6d03fbbf7d7707
Backport same PRs as done in bitcoin#11592
No description provided.