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

[0.17 MERGE] merge up to Core 8aa9badf5ea3ea98980f50d924e88e46c4d5ee38 #501

Merged
merged 63 commits into from
Jan 24, 2019

Conversation

instagibbs
Copy link
Collaborator

@instagibbs instagibbs commented Jan 23, 2019

Half the "diff" here is from changes that 0.17 branch already had backported, and the rest are diffs of features we added touching small code changes.

only 1323 commits to go

practicalswift and others added 30 commits July 7, 2018 10:08
Clicking on the proxy icon will open settings showing the network tab
Create enum Tab in OptionsModel
Use new connect syntax
Use lambda for private slots
This commit removes the `CBloomFilter::CBloomFilter(const unsigned int, const double, const unsigned int)` constructor, which became obsolete with 086ee67.
To avoid:

$ make check
{…omissis…}
Running test/util/bitcoin-util-test.py...
/usr/local/bin/python3.7 ../test/util/bitcoin-util-test.py
../test/util/bitcoin-util-test.py:31: DeprecationWarning: This method will be removed in future versions.  Use 'parser.read_file()' instead.
config.readfp(open(os.path.join(os.path.dirname(__file__), "../config.ini"), encoding="utf8"))

$ python3 --version
Python 3.7.0
49e5662 fix deprecation in bitcoin-util-test.py (Isidoro Ghezzi)

Pull request description:

  To avoid:

  $ make check
  {…omissis…}
  Running test/util/bitcoin-util-test.py...
  /usr/local/bin/python3.7 ../test/util/bitcoin-util-test.py
  ../test/util/bitcoin-util-test.py:31: DeprecationWarning: This method will be removed in future versions.  Use 'parser.read_file()' instead.
  config.readfp(open(os.path.join(os.path.dirname(__file__), "../config.ini"), encoding="utf8"))

  $ python3 --version
  Python 3.7.0

Tree-SHA512: eafed629b64ae32b0b84520bb9b430204cba38d426dab1b3946a92c758c7d599aacc2798ab6e126808a6c7515ff20eb4ecc635b3e424f4c8903105438f817297
… redundant redeclarations.

d56b73f Remove redundant extern (practicalswift)
f04bb13 Enable -Wredundant-decls (gcc) if available (practicalswift)
a9e90e5 Remove redundant redeclaration of rescanblockchain(...) in same scope (practicalswift)

Pull request description:

  Remove redundant redeclaration of `rescanblockchain` and enable `-Wredundant-decls` (gcc) where available to avoid accidental redundant redeclarations.

  ```
   CXX      wallet/libbitcoin_wallet_a-rpcwallet.o
  wallet/rpcwallet.cpp:4764:17: warning: redundant redeclaration of ‘UniValue rescanblockchain(const JSONRPCRequest&)’ in same scope [-Wredundant-decls]
   extern UniValue rescanblockchain(const JSONRPCRequest& request);
                   ^~~~~~~~~~~~~~~~
  wallet/rpcwallet.cpp:3929:10: note: previous declaration of ‘UniValue rescanblockchain(const JSONRPCRequest&)’
   UniValue rescanblockchain(const JSONRPCRequest& request)
            ^~~~~~~~~~~~~~~~
  ```

Tree-SHA512: b9af95fa53f494c3f6702e485956b66b042d2ff7578b4a53bf28e91aa844cdcf5d7ac3e2e710948eed566007324e81317304b8eabf2d4ea284cd6acd77f8ffcd
ef7beae Visual Studio build configuration for Bitcoin Core (Aaron Clauson)

Pull request description:

  This PR allows Bitcoin Core to be relatively easily built with Visual Studio 2017. It's anticipated that it could be useful for devs familiar with Visual Studio and Microsoft's tooling. In particular the ability to use the VS debugger is a big benefit.

  ~~Caveats:~~
  - ~~There are some minor code changes required on Bitcoin Core in order for msvc to be able to successfully compile. I'll submit them in a separate PR, The code changes are available in #11528 #11558 and #11562~~.
  - ~~The vcpkg for SECP256K1 has not yet been accepted by Microsoft. The files are available from this [PR](microsoft/vcpkg#2005) and should be copied into a vcpkg/ports/secp256k1 directory prior to vcpkg install steps.~~

  **Update:** For anyone wishing to test out the Visual Studio build with the various open pull requests the steps are:

  - Clone and build [Vcpkg](https://github.com/Microsoft/vcpkg) (Microsoft's new open source C/C++ package manager)
      - git clone https://github.com/Microsoft/vcpkg
      - .\bootstrap-vcpkg.bat
  - Set up Visual Studio to automatically reference vcpkg installs: .\vcpkg integrate install
  - Install the required packages (replace x86 with x64 as required):
      - vcpkg install boost:x86-windows-static
      - vcpkg install libevent:x86-windows-static
      - vcpkg install openssl:x86-windows-static
      - vcpkg install zeromq:x86-windows-static
      - vcpkg install berkeleydb:x86-windows-static
      - vcpkg install secp256k1:x86-windows-static
      - vcpkg install leveldb:x86-windows-static
  - git clone https://github.com/bitcoin/bitcoin.git
  - git checkout -b testbuild
  - git pull origin pull/11526/head # Visual Studio build configuration for Bitcoin Core
  - ~~git pull origin pull/11558/head # Minimal code changes to allow msvc compilation~~
  - ~~git pull origin pull/11562/head # bench: use std::chrono rather than gettimeofday~~
  - ~~Copy and unzip attached bitcoin-config.h to src/config, edit as required [bitcoin-config.zip](https://github.com/bitcoin/bitcoin/files/1429484/bitcoin-config.zip)~~
  - ~~git pull origin pull/13031/head # gmtime fix for msvc~~
  - Build the Visual Studio solution which, if successful, will result in all but the Qt dependent libraries/programs being built. If the build fails please add a comment.

Tree-SHA512: 5cd17273d33a09c35d8534c9f49123dec60ec05383669c67674b2cac88ada177bf94d7731c2a827759444f18d4b67085b91b02458124d0c32ab3a8f72ba5dac9
6ad0328 Don't assert(foo()) where foo has side effects (practicalswift)

Pull request description:

  Don't `assert(foo())` where `foo` has side effects.

  From `assert(3)`:

  > If the macro `NDEBUG` is defined at the moment `<assert.h>` was last included, the macro `assert()` generates no code, and hence does nothing at all.

  Bitcoin currently cannot be compiled without assertions, but we shouldn't rely on that.

Tree-SHA512: 28cff0c6d1c2fb612ca58c9c94142ed01c5cfd0a2fecb8e59cdb6c270374b215d952ed3491d921d84dc1b439fa49da4f0e75e080f6adcbc6b0e08be14e54c170
fa5ce27 ui: Compile boost:signals2 only once (MarcoFalke)

Pull request description:

  ui is one of the modules that poison other modules with `boost/signals2` headers. This moves the include to the cpp file and uses a forward declaration in the header.

  Locally this speeds up the incremental build (building everything that uses the ui module) with gcc by ~5% for me. Gcc uses ~5% less memory.

  Would be nice if someone could verify the numbers roughly.

  I presume the improvements will be more pronounced if the other models would stop exposing the boost header as well.

Tree-SHA512: 078360eba330ddbca4268bd8552927eae242a239e18dfded25ec20be72650a68cd83af7ac160690249b943d33ae35d15df1313f1f60a0c28b9526853aa7d1e40
0-input transactions can be ambiguously deserialized as being witness
transactions. Since the unsigned transaction is never serialized as
a witness transaction as it has no witnesses, we should always
deserialize it as a non-witness transaction and set the serialization
flags as such.

Also always serialize the unsigned transaction as a non-witness transaction.
… as witness

Strip out the witnesses when serializing the non-witness utxo. However
witness serializations are allowed, so make sure we always deserialize
as witness.
tostring() is deprecated as of python 3.7 and results in stderr output
causing tests to fail
8845c8a tests: Replace usage of tostring() with tobytes() (Carl Dong)

Pull request description:

  tostring() is deprecated as of python 3.7 and results in stderr output
  causing tests to fail

Tree-SHA512: 8c5bbd6c6127490922add98543ee7719d19e11200e081784adef2f026ddf90d7735da7d0fb41fa4307d0d3450a27e126752c2b01cbd79b0c8a695855aed080ac
16bcc1b Remove unused dummy_tx variable from FillPSBT (Carl Dong)

Pull request description:

Tree-SHA512: e7652126bca2e87d445d4190aa0b4192d9575bc0c280d063302ca420be51e7a04fcbc24e0e7f5ec1f18938f0a596901e1285e9afc9b33ca3da78177938791163
fanquake and others added 19 commits August 15, 2018 21:05
4b3b85c refactor: use fs:: over boost::filesystem:: (fanquake)

Pull request description:

  Noticed while investigating #13973.

Tree-SHA512: 20a764d2ff460883fa0fd543c0a51031a9a202b40cfda9943f9995d3108c0a8296a3982b63bbd069167f73a1855003304a83df466763032ce7339b08b3a97d4b
b2f23c4 [RPC] Remove getinfo deprecation warning (John Newbery)

Pull request description:

  `getinfo` was removed in V0.16. A removal warning message was left in place to tell users that the method had been removed. We can remove that entirely in V0.18.

Tree-SHA512: bf93fbcf57a9be480438dcbdcab2dfd69ce277218b10628776975b093b3ffd2caa1751e0fb4cb0245443c81465693e2b8750e96d3e38632a78bae5ffa04f9212
fa091b0 qa: Add tests for submitheader (MarcoFalke)
36b1b63 rpc: Expose ProcessNewBlockHeaders (MarcoFalke)

Pull request description:

  This exposes `ProcessNewBlockHeaders` as an rpc called `submitheader`. This can be used to check for invalid block headers and submission of valid block headers via the rpc.

Tree-SHA512: a61e850470f15465f88e450609116df0a98d5d9afadf36b2033d820933d8b6a4012f9f2b3246319c08a0e511bef517f5d808cd0f44ffca91d10895a938004f0b
…blocksdir.py log message

241f8b5 Fix typo in feature_blocksdir.py log message (Alexander Leishman)

Pull request description:

  Typo I came across while writing some new tests.

Tree-SHA512: cc494553125a1e84f9238a14761e3fb76623e98d951811dd3bfb13595a03a1888d73859487a2cbb76c7ae85897bc64016a220a92c2636b35ea6356a5b5340d66
c4aecd1 Add risc-v 64-bit to gitian (Chun Kuan Lee)
96dda8b [depends] Add riscv qt depends support for cross compiling bitcoin-qt (Chun Kuan Lee)

Pull request description:

  Based on ~#13660~ #13710 ,  add gitian tarball for RISC-V

Tree-SHA512: 8db73545a2ea7fe03fa156598479335ea3c79aa3fb9c5cc44b8563094b1deb7c94d29c1dab47fac129dbfa2e3e774301b526474beeeb59c9b0087d3ea087dbd6
ea16c2d appveyor: fetch the latest port data (Chun Kuan Lee)

Pull request description:

  Discussion in bitcoin/bitcoin#13964 (comment) , fetch the latest port data before installing it.

Tree-SHA512: a3b95aeb3b298130ff0617a8dec5c97c0882cf7a3b72ce792e63d8f2c2ac4a297dfa0d3357878c2198a9fea62d0f24df56598293dde88963dd043e121be4dc3a
Qt's configure grabs the path to xkb's data root during configure, but the
build changes in 5.8 apparently broke the handling for cross builds. As a
result, the string embedded in the binary depends on whether or not some files
are present in the builder's filesystem.

The "-xkb-config-root" configure setting is intended to allow manual overriding
but it is also broken. See: https://bugreports.qt.io/browse/QTBUG-60005

This has since been fixed upstream, so just hard-code the path for now. We can
drop this patch when we bump to a fixed Qt.

Also, fix the "-qt-xkbcommon-x11" config param which was renamed. This does not
appear to affect build results, presumably because auto-detection is working,
but it does not hurt to be explicit.
de0b4fb depends: fix qt determinism (Cory Fields)

Pull request description:

  Thanks to @MarcoFalke for pointing out the problem and the solution as well. I'm unsure if this takes care of all of the determinism issues with 0.17rc1, but it should fix at least one.

  Qt's configure grabs the path to xkb's data root during configure, but the build changes in 5.8 apparently broke the handling for cross builds. As a result, the string embedded in the binary depends on whether or not some files are present in the builder's filesystem.

  The "-xkb-config-root" configure setting is intended to allow manual overriding but it is also broken. See: https://bugreports.qt.io/browse/QTBUG-60005

  This has since been fixed upstream, so just hard-code the path for now. We can drop this patch when we bump to a fixed Qt.

  Also, fix the "-qt-xkbcommon-x11" config param which was renamed. This does not appear to affect build results, presumably because auto-detection is working, but it does not hurt to be explicit.

  Edit: The hard-coded string matches the value from 0.16 builds, so nothing should be changing.

Tree-SHA512: 1d51f9aa050bf38e1f13f4a88f623628e026503891a8a063040dc5e938ba8d60e5fb8c7c2927d15c36f4773bbbb52950b0879fd4a43f3c7c08833f45939989ad
6d5fcad [gui] Make proxy icon from statusbar clickable (Cristian Mircea Messel)

Pull request description:

  Clicking on the proxy icon will open settings showing the network tab

  bitcoin/bitcoin#11491 (comment)

Tree-SHA512: c3549749296918818694a371326d1a3b1075478918aaee940b5c7119a7e2cb991dcfda78f20d44d6d001157b9b82951f0d5157b17f4f0d1a0a242795efade036
…e bump

d795c61 [qt] TransactionView: highlight replacement tx after fee bump (Sjors Provoost)

Pull request description:

  Consistent with #12421 which highlights the transaction after send.

  <img width="747" alt="1" src="https://user-images.githubusercontent.com/10217/38036280-a7358ea4-32a6-11e8-8f92-417e9e1e3e8b.png">

  <img width="685" alt="2" src="https://user-images.githubusercontent.com/10217/38036289-aac87040-32a6-11e8-9f94-81745ff6c592.png">

  ~I'm not too proud of the `QTimer::singleShot(10` bit; any suggestions on how to properly wait for the transactions table to become aware of the new transaction?~

  Although I could have called `focusTransaction()` directly from `TransactionView::bumpFee()` I'm using the same signal as the send screen. This should make it easier to move fee bump / transaction replacement functionality around later.

Tree-SHA512: 242055b7c3d32c7b2cf871f5ceda2581221902fd53fa29e0b092713fc16d3191adbe8cbb28417d522dda9febec8cc05e07afe3489cd7caaecd33460c1dde6fbc
faaac5c RPCTypeCheck bip32derivs arg in walletcreatefunded (Gregory Sanders)
1f0c428 QA: add basic walletcreatefunded optional arg test (Gregory Sanders)
1f18d7b walletcreatefundedpsbt: remove duplicate replaceable arg (Gregory Sanders)
2252ec5 Allow ConstructTransaction to not throw error with 0-input txn (Gregory Sanders)

Pull request description:

  1) Previously an empty input argument transaction that is marked for replaceability fails to pass the `SignalsOptInRBF` check right before funding it. Explicitly check for that condition before throwing an error.

  2) The rpc call had two separate `replaceable` arguments, each of which being used in mutually exclusive places. I preserved the `options` version to retain compatability with `fundtransaction`.

Tree-SHA512: 26eb0c9e2d38ea51d11f741d61100223253271a084adadeb7e78c6d4e9004636f089e4273c5bf64a41bd7e9ff795317acf30531cb36aeb0d8db9304b3c8270c3
@stevenroose
Copy link
Member

What's special about 8aa9bad? Just a random checkpoint?

Also, what should be the strategy for verifying you're not sneaking in changes by amending one of the commits? I mean the actual diff gets quite big.

@instagibbs
Copy link
Collaborator Author

instagibbs commented Jan 24, 2019

Random point, heh.

@stevenroose locally running git show on the merge commit will show the "diff" beyond the mechanical merge of the commits listed here.

@stevenroose
Copy link
Member

ACK 60b7ef5

@instagibbs
Copy link
Collaborator Author

re-merged with elements-0.17 to fix conflict with PAK PR.

@stevenroose
Copy link
Member

re-ACK d670da8

@stevenroose stevenroose merged commit d670da8 into ElementsProject:elements-0.17 Jan 24, 2019
stevenroose added a commit that referenced this pull request Jan 24, 2019
d670da8 fixup non-breaking merge error (Gregory Sanders)
60b7ef5 MERGE-FIX: mining_basic.py: Remove magic constants, make sure serialized header deserializes (Gregory Sanders)
faaac5c RPCTypeCheck bip32derivs arg in walletcreatefunded (Gregory Sanders)
1f0c428 QA: add basic walletcreatefunded optional arg test (Gregory Sanders)
1f18d7b walletcreatefundedpsbt: remove duplicate replaceable arg (Gregory Sanders)
2252ec5 Allow ConstructTransaction to not throw error with 0-input txn (Gregory Sanders)
d795c61 [qt] TransactionView: highlight replacement tx after fee bump (Sjors Provoost)
6d5fcad [gui] Make proxy icon from statusbar clickable (Cristian Mircea Messel)
de0b4fb depends: fix qt determinism (Cory Fields)
ea16c2d appveyor: fetch the latest port data (Chun Kuan Lee)
c4aecd1 Add risc-v 64-bit to gitian (Chun Kuan Lee)
96dda8b [depends] Add riscv qt depends support for cross compiling bitcoin-qt (Chun Kuan Lee)
241f8b5 Fix typo in feature_blocksdir.py log message (Alexander Leishman)
fa091b0 qa: Add tests for submitheader (MarcoFalke)
36b1b63 rpc: Expose ProcessNewBlockHeaders (MarcoFalke)
b2f23c4 [RPC] Remove getinfo deprecation warning (John Newbery)
4b3b85c refactor: use fs:: over boost::filesystem:: (fanquake)
8bd98a3 [trivial] Fix typo in CDiskBlockPos struct's ToString (Jon Layton)
1f6ff04 Use wildcard path in test_bitcoin.vcxproj (Chun Kuan Lee)
90cc69c ci: Add appveyor.yml to build on MSVC (Chun Kuan Lee)
4d0c792 Make macro compatible with MSVC (Chun Kuan Lee)
5df6f08 More tests of signer checks (Andrew Chow)
7c8bffd Test that a non-witness script as witness utxo is not signed (Andrew Chow)
8254e99 Additional sanity checks in SignPSBTInput (Pieter Wuille)
c05712c Only wipe wrong UTXO type data if overwritten by wallet (Pieter Wuille)
bd19cc7 Serialize non-witness utxo as a non-witness tx but always deserialize as witness (Andrew Chow)
43811e6 Fix PSBT deserialization of 0-input transactions (Andrew Chow)
a9cf5c9 Import CInv from correct module (Chun Kuan Lee)
265bd50 Removes unsed `CBloomFilter` constructor. (251)
16bcc1b Remove unused dummy_tx variable from FillPSBT (Carl Dong)
8845c8a tests: Replace usage of tostring() with tobytes() (Carl Dong)
fa5ce27 ui: Compile boost:signals2 only once (MarcoFalke)
6ad0328 Don't assert(foo()) where foo has side effects (practicalswift)
ef7beae Visual Studio build configuration for Bitcoin Core (Aaron Clauson)
d56b73f Remove redundant extern (practicalswift)
f04bb13 Enable -Wredundant-decls (gcc) if available (practicalswift)
a9e90e5 Remove redundant redeclaration of rescanblockchain(...) in same scope (practicalswift)
49e5662 fix deprecation in bitcoin-util-test.py (Isidoro Ghezzi)

Pull request description:

  Half the "diff" here is from changes that 0.17 branch already had backported, and the rest are diffs of features we added touching small code changes.

  only 1323 commits to go

Tree-SHA512: 65c4d72d2edd949aed7cd0ff749f6ead81faff43f6600a296c309fed85633f6fe4624db111598b39a7757c95878455b7eff843989b081b5049fb2765810eb1fb
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.