status
stringclasses
1 value
repo_name
stringlengths
9
24
repo_url
stringlengths
28
43
issue_id
int64
1
104k
updated_files
stringlengths
8
1.76k
title
stringlengths
4
369
body
stringlengths
0
254k
issue_url
stringlengths
37
56
pull_url
stringlengths
37
54
before_fix_sha
stringlengths
40
40
after_fix_sha
stringlengths
40
40
report_datetime
timestamp[ns, tz=UTC]
language
stringclasses
5 values
commit_datetime
timestamp[us, tz=UTC]
closed
bitcoin/bitcoin
https://github.com/bitcoin/bitcoin
19,051
["src/wallet/walletdb.cpp", "test/functional/feature_backwards_compatibility.py"]
Can no longer open wallet.dat without warnings
After commit ccd85b57af60d7034db372b9501d059fbc5941e4 I can no longer open my wallet without warnings. ![Screenshot from 2020-05-22 10-45-35](https://user-images.githubusercontent.com/6399679/82679920-9704a180-9c19-11ea-8f55-4c935ced8fe2.png) ``` Warning: Error reading /home/marco/.bitcoin/regtest/wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.
https://github.com/bitcoin/bitcoin/issues/19051
https://github.com/bitcoin/bitcoin/pull/19054
f3d776b59380ad31e8b3a2948364c7690eebe05d
d4f9ae00252ba44909a61db0f606be6fddf904c1
2020-05-22T14:47:53Z
c++
2020-06-19T20:14:47Z
closed
bitcoin/bitcoin
https://github.com/bitcoin/bitcoin
19,049
["src/sync.cpp", "src/sync.h", "src/test/reverselock_tests.cpp", "src/test/sync_tests.cpp", "src/wallet/test/wallet_tests.cpp", "src/wallet/wallet.cpp", "test/sanitizer_suppressions/tsan"]
test: Potential deadlock in wallet_tests/CreateWalletFromFile
Building master (df303ceb650521dc7b1ba91e0eea383c387a5860) on Linux Mint 19.3 (x86_64, bionic codebase): ``` $ ./configure --with-sanitizers=thread && make clean && make $ TSAN_OPTIONS="suppressions=test/sanitizer_suppressions/tsan" ./src/test/test_bitcoin --run_test=wallet_tests/CreateWalletFromFile Running 1 test case... WARNING: too long mutex cycle found WARNING: too long mutex cycle found WARNING: too long mutex cycle found WARNING: too long mutex cycle found WARNING: too long mutex cycle found ================== WARNING: ThreadSanitizer: lock-order-inversion (potential deadlock) (pid=31793) Cycle in lock order graph: M134059 (0x7b6400004cc8) => M133094 (0x56527c390c60) => M134059 Mutex M133094 acquired here while holding mutex M134059 in main thread: #0 pthread_mutex_lock <null> (libtsan.so.0+0x3fadb) #1 __gthread_mutex_lock /usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:748 (test_bitcoin+0xd17c11) #2 __gthread_recursive_mutex_lock /usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:810 (test_bitcoin+0xd17c11) #3 std::recursive_mutex::lock() /usr/include/c++/7/mutex:107 (test_bitcoin+0xd17c11) #4 std::unique_lock<std::recursive_mutex>::lock() /usr/include/c++/7/bits/std_mutex.h:267 (test_bitcoin+0xd17c11) #5 UniqueLock<AnnotatedMixin<std::recursive_mutex>, std::unique_lock<std::recursive_mutex> >::Enter(char const*, char const*, int) sync.h:131 (test_bitcoin+0xd17c11) #6 UniqueLock<AnnotatedMixin<std::recursive_mutex>, std::unique_lock<std::recursive_mutex> >::UniqueLock(AnnotatedMixin<std::recursive_mutex>&, char const*, char const*, int, bool) sync.h:152 (test_bitcoin+0xd17c11) #7 CWallet::CreateWalletFromFile(interfaces::Chain&, WalletLocation const&, bilingual_str&, std::vector<bilingual_str, std::allocator<bilingual_str> >&, unsigned long) wallet/wallet.cpp:4004 (test_bitcoin+0xd397de) #8 TestLoadWallet wallet/test/wallet_tests.cpp:37 (test_bitcoin+0x703587) #9 wallet_tests::CreateWalletFromFile::test_method() wallet/test/wallet_tests.cpp:782 (test_bitcoin+0x72013e) #10 CreateWalletFromFile_invoker wallet/test/wallet_tests.cpp:700 (test_bitcoin+0x721452) #11 boost::detail::function::void_function_invoker0<void (*)(), void>::invoke(boost::detail::function::function_buffer&) /usr/include/boost/function/function_template.hpp:118 (test_bitcoin+0xe05fb) #12 boost::detail::function::function_obj_invoker0<boost::detail::forward, int>::invoke(boost::detail::function::function_buffer&) <null> (libboost_unit_test_framework.so.1.65.1+0x4b2cd) #13 __libc_start_main <null> (libc.so.6+0x21b96) Hint: use TSAN_OPTIONS=second_deadlock_stack=1 to get more informative warning message Mutex M134059 acquired here while holding mutex M133094 in main thread: #0 pthread_mutex_lock <null> (libtsan.so.0+0x3fadb) #1 __gthread_mutex_lock /usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:748 (test_bitcoin+0x71e053) #2 __gthread_recursive_mutex_lock /usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:810 (test_bitcoin+0x71e053) #3 std::recursive_mutex::lock() /usr/include/c++/7/mutex:107 (test_bitcoin+0x71e053) #4 AnnotatedMixin<std::recursive_mutex>::lock() sync.h:90 (test_bitcoin+0x71e053) #5 operator() wallet/test/wallet_tests.cpp:780 (test_bitcoin+0x71e053) #6 _M_invoke /usr/include/c++/7/bits/std_function.h:316 (test_bitcoin+0x71e677) #7 std::function<void (std::unique_ptr<interfaces::Wallet, std::default_delete<interfaces::Wallet> >)>::operator()(std::unique_ptr<interfaces::Wallet, std::default_delete<interfaces::Wallet> >) const /usr/include/c++/7/bits/std_function.h:706 (test_bitcoin+0xd39850) #8 CWallet::CreateWalletFromFile(interfaces::Chain&, WalletLocation const&, bilingual_str&, std::vector<bilingual_str, std::allocator<bilingual_str> >&, unsigned long) wallet/wallet.cpp:4006 (test_bitcoin+0xd39850) #9 TestLoadWallet wallet/test/wallet_tests.cpp:37 (test_bitcoin+0x703587) #10 wallet_tests::CreateWalletFromFile::test_method() wallet/test/wallet_tests.cpp:782 (test_bitcoin+0x72013e) #11 CreateWalletFromFile_invoker wallet/test/wallet_tests.cpp:700 (test_bitcoin+0x721452) #12 boost::detail::function::void_function_invoker0<void (*)(), void>::invoke(boost::detail::function::function_buffer&) /usr/include/boost/function/function_template.hpp:118 (test_bitcoin+0xe05fb) #13 boost::detail::function::function_obj_invoker0<boost::detail::forward, int>::invoke(boost::detail::function::function_buffer&) <null> (libboost_unit_test_framework.so.1.65.1+0x4b2cd) #14 __libc_start_main <null> (libc.so.6+0x21b96) SUMMARY: ThreadSanitizer: lock-order-inversion (potential deadlock) (/usr/lib/x86_64-linux-gnu/libtsan.so.0+0x3fadb) in __interceptor_pthread_mutex_lock ================== WARNING: too long mutex cycle found WARNING: too long mutex cycle found WARNING: too long mutex cycle found WARNING: too long mutex cycle found WARNING: too long mutex cycle found WARNING: too long mutex cycle found WARNING: too long mutex cycle found WARNING: too long mutex cycle found WARNING: too long mutex cycle found WARNING: too long mutex cycle found *** No errors detected ThreadSanitizer: reported 1 warnings ``` --- The ThreadSanitizer does not report this issue on CI as the binaries are built with the `--disable-wallet` option: https://github.com/bitcoin/bitcoin/blob/df303ceb650521dc7b1ba91e0eea383c387a5860/ci/test/00_setup_env_native_tsan.sh#L14 UPDATE: This issue is caused by #16426 that has been merged on 2020-05-01.
https://github.com/bitcoin/bitcoin/issues/19049
https://github.com/bitcoin/bitcoin/pull/19982
da957cd62ecc7fde5fa1dfcd134a73b388c2d438
736eb4d8083862a6c3dd79e65afca6217cf7939d
2020-05-22T10:29:17Z
c++
2020-12-11T01:44:56Z
closed
bitcoin/bitcoin
https://github.com/bitcoin/bitcoin
19,037
["test/functional/mempool_compatibility.py", "test/functional/test_runner.py"]
Write compatibility tests for mempool.dat
The format of mempool.dat has been changed in https://github.com/bitcoin/bitcoin/pull/18038 It would be nice to have an automated functional test which checks that the mempool.dat created by an earlier version can still be read by a newer version. This is a compatibility test similar to `./test/functional/wallet_upgradewallet.py`, which can serve as a template or skeleton for the new test. I suggest that the test does at least the following: * Have two nodes (old version and current master) * Have the old node create some transactions which end up in the mempool * Start the new node with the mempool.dat of the old node and check that the mempool is properly deserialized * Have the new node create some mempool transactions that end up in the unbroadcast set, stop the new node * move the mempool.dat to the old node again and check that the mempool.dat can be deserialized properly (obviously without the unbroadcast set) #### Useful skills: Basic understanding of the Bitcoin Core mempool, and the functional test framwork. #### Want to work on this issue? The purpose of the `good first issue` label is to highlight which issues are suitable for a new contributor without a deep understanding of the codebase. You do not need to request permission to start working on this. You are encouraged to comment on the issue if you are planning to work on it. This will help other contributors monitor which issues are actively being addressed and is also an effective way to request assistance if and when you need it. For guidance on contributing, please read [CONTRIBUTING.md](https://github.com/bitcoin/bitcoin/blob/master/CONTRIBUTING.md) before opening your pull request.
https://github.com/bitcoin/bitcoin/issues/19037
https://github.com/bitcoin/bitcoin/pull/19153
46bdd4b537cbf9a25ce170eb6831c2b092eacbc8
0afbeb73ccb7523794e1e4a3422607c4423d1048
2020-05-21T12:28:08Z
c++
2020-06-16T11:25:14Z
closed
bitcoin/bitcoin
https://github.com/bitcoin/bitcoin
19,017
["configure.ac", "src/init.cpp", "src/util/translation.h", "test/functional/feature_config_args.py"]
Fix -Wunreachable-code-loop-increment warning
In #19015 it's been suggested that we add some new compiler warnings to our build. Some of these, such as `-Wunreachable-code-loop-increment`, generate warnings. We'll likely want to fix these up if we're going to turn these warnings on. ```bash init.cpp:969:5: warning: loop will run at most once (loop increment never executed) [-Wunreachable-code-loop-increment] for (const auto& arg : gArgs.GetUnsuitableSectionOnlyArgs()) { ^~~ 1 warning generated. ``` https://github.com/bitcoin/bitcoin/blob/aa8d76806c74a51ec66e5004394fe9ea8ff0fac4/src/init.cpp#L968-L972 If you want to build master, with `-Wunreachable-code-loop-increment`, you can use something like this: ```bash ./autogen.sh ./configure CXXFLAGS="-Wunreachable-code-loop-increment" make check ```
https://github.com/bitcoin/bitcoin/issues/19017
https://github.com/bitcoin/bitcoin/pull/19131
584170a3888e1c55be00bdf2c8224ad342d24656
b46fb5cb1058daaf0075b17f329163b8397caeec
2020-05-19T14:33:10Z
c++
2020-06-04T14:27:53Z
closed
bitcoin/bitcoin
https://github.com/bitcoin/bitcoin
18,967
["configure.ac"]
build: [0.22] Enable -Wdeprecated-copy warnings
For 0.22 we should look into enabling the warning again, which has been disabled in #18738
https://github.com/bitcoin/bitcoin/issues/18967
https://github.com/bitcoin/bitcoin/pull/22258
6bc1eca01b2f88e081e71b783b3d45287700f8a5
65c4a36e57c569071812292d6999fc1796f26d4d
2020-05-13T13:26:57Z
c++
2021-06-17T03:44:18Z
closed
bitcoin/bitcoin
https://github.com/bitcoin/bitcoin
18,966
["configure.ac"]
build: improve build OS configure output
We include the target and build OS as part of our `Options used to compile and link:` which is printed after running `./configure` i.e: Building for macOS on macOS ```bash target os = darwin build os = darwin ``` Building for Windows on Linux ```bash target os = windows build os = ``` Building for Linux on Linux ```bash target os = linux build os = ``` Notice `build os` is currently only ever set when building for darwin (host or cross-compile). This is because it's the only target for which we actually set the `$BUILD_OS` variable for in configure (It's used to set `BUILD_DARWIN` which is then used in our makefiles). We could improve this so that a build and target os are always printed for all build combinations. Feel free to ping me if you have any Qs.
https://github.com/bitcoin/bitcoin/issues/18966
https://github.com/bitcoin/bitcoin/pull/19152
a1c0e5fce13911252a135bdce4ffc09c24d23791
b42bc33d2d4d32c11f8ad0aa812bb9b4d3ae3a5f
2020-05-13T06:53:00Z
c++
2020-06-04T02:44:34Z
closed
bitcoin/bitcoin
https://github.com/bitcoin/bitcoin
18,954
["src/wallet/rpc/backup.cpp", "src/wallet/test/wallet_tests.cpp", "src/wallet/wallet.cpp", "test/functional/wallet_balance.py", "test/functional/wallet_import_rescan.py", "test/functional/wallet_importdescriptors.py"]
import* wallet RPCs don't "rescan" the mempool
Steps to reproduce: * Send coins to an `$address`, dump `$privkey` of the `$address` * Create new wallet * `importaddress $address` --> Watchonly balance is not updated * `importprivkey $privkey` --> Balance is not updated Needs a restart to get fixed. See also #11477
https://github.com/bitcoin/bitcoin/issues/18954
https://github.com/bitcoin/bitcoin/pull/25351
f002f8a0e76bd5abd60ef6809b1ff2b4c2d56071
4aaa3b52006efa1049c238f638b6d87668125cbb
2020-05-11T23:12:43Z
c++
2022-07-18T18:26:21Z
closed
bitcoin/bitcoin
https://github.com/bitcoin/bitcoin
18,943
["src/wallet/rpcwallet.cpp"]
What is the minimum supported version of boost for 0.21.0?
The wallet code uses `Optional::emplace()`, which was only added in boost 1.56, see https://github.com/boostorg/optional/commit/2e583aaf30964afd66c1284aa71d0d8b42fa440d So for 0.21.0 there are two options: * Work around `emplace` and keep the minimum boost version below 1.56 * Require boost 1.56 ``` wallet/rpcwallet.cpp: In function ‘UniValue listsinceblock(const JSONRPCRequest&)’: wallet/rpcwallet.cpp:1560:16: error: ‘Optional<int>’ has no member named ‘emplace’ height.emplace(); ^ wallet/rpcwallet.cpp:1561:19: error: ‘Optional<int>’ has no member named ‘emplace’ altheight.emplace(); ^
https://github.com/bitcoin/bitcoin/issues/18943
https://github.com/bitcoin/bitcoin/pull/18946
b9c504cbc4ba45a32abb86b67a277b75a17f13a4
4dd2e5255a7f78901dacc5a6d33dbc201e17df96
2020-05-11T11:30:30Z
c++
2020-05-14T17:26:17Z
closed
bitcoin/bitcoin
https://github.com/bitcoin/bitcoin
18,872
["test/functional/feature_loadblock.py", "test/functional/feature_reindex.py", "test/functional/mempool_persist.py", "test/functional/test_framework/test_node.py", "test/functional/wallet_abandonconflict.py", "test/functional/wallet_basic.py"]
wallet_basic fails intermittently with "Block sync timed out after 60s"
I've been seeing this error for at least two years. https://travis-ci.org/github/bitcoin/bitcoin/jobs/681537063#L6754
https://github.com/bitcoin/bitcoin/issues/18872
https://github.com/bitcoin/bitcoin/pull/18873
c6b15ec0ee4679a22abefb0d8d528f026acd8b67
7bcc42b4035b878719d13201286e322989b415c5
2020-05-04T23:48:13Z
c++
2020-05-06T13:30:31Z
closed
bitcoin/bitcoin
https://github.com/bitcoin/bitcoin
18,868
[".travis.yml", "ci/test/00_setup_env_s390x_host.sh"]
s390x build fails on travis with "out of disk space"
https://travis-ci.org/github/bitcoin/bitcoin/jobs/682858666#L336 I think it should be removed again
https://github.com/bitcoin/bitcoin/issues/18868
https://github.com/bitcoin/bitcoin/pull/18905
56611b0e240529d88ad5fa41e8da1bb1c2a570ed
f54753293fe7355e4280944d766f22054b560ba1
2020-05-04T15:08:04Z
c++
2020-05-07T14:26:59Z
closed
bitcoin/bitcoin
https://github.com/bitcoin/bitcoin
18,858
["src/bench/ccoins_caching.cpp", "src/coins.cpp", "src/coins.h", "src/primitives/transaction.h", "src/test/transaction_tests.cpp"]
Signed integer overflow in CCoinsViewCache::GetValueIn(…)
`CCoinsViewCache::GetValueIn(…)` performs money summation like this: ```c++ CAmount CCoinsViewCache::GetValueIn(const CTransaction& tx) const { if (tx.IsCoinBase()) return 0; CAmount nResult = 0; for (unsigned int i = 0; i < tx.vin.size(); i++) nResult += AccessCoin(tx.vin[i].prevout).out.nValue; return nResult; } ``` Note that no check is done to make sure that the resulting `nResult` is such that it stays within the money bounds (`MoneyRange(nResult)`), or that the summation does not trigger a signed integer overflow. Proof of concept output: ``` coins.cpp:243:17: runtime error: signed integer overflow: 9223200000000000000 + 2100000000000000 cannot be represented in type 'long' GetValueIn = -9221444073709551616 ``` Proof of concept code: ```c++ CMutableTransaction mutable_transaction; mutable_transaction.vin.resize(4393); Coin coin; coin.out.nValue = MAX_MONEY; assert(MoneyRange(coin.out.nValue)); CCoinsCacheEntry coins_cache_entry; coins_cache_entry.coin = coin; coins_cache_entry.flags = CCoinsCacheEntry::DIRTY; CCoinsView backend_coins_view; CCoinsViewCache coins_view_cache{&backend_coins_view}; CCoinsMap coins_map; coins_map.emplace(COutPoint{}, std::move(coins_cache_entry)); coins_view_cache.BatchWrite(coins_map, {}); const CAmount total_value_in = coins_view_cache.GetValueIn(CTransaction{mutable_transaction}); std::cout << "GetValueIn = " << total_value_in << std::endl; ``` As far as I can tell `CCoinsViewCache::GetValueIn` is unused outside of tests: ```sh $ git grep GetValueIn ":(exclude)src/test/" ":(exclude)src/bench/" src/coins.cpp:CAmount CCoinsViewCache::GetValueIn(const CTransaction& tx) const src/coins.h: CAmount GetValueIn(const CTransaction& tx) const; src/primitives/transaction.h: // GetValueIn() is a method on CCoinsViewCache, because ``` I suggest we drop the unused `CCoinsViewCache::GetValueIn(…)`. Any objections? :)
https://github.com/bitcoin/bitcoin/issues/18858
https://github.com/bitcoin/bitcoin/pull/18859
afa577c323dcaedf641897fab43af2540e230bcb
74a1152f25814c92e53641da4255282c7df26fa8
2020-05-03T17:43:04Z
c++
2020-05-04T11:48:23Z
closed
bitcoin/bitcoin
https://github.com/bitcoin/bitcoin
18,856
["src/httpserver.cpp"]
rpc: InterruptHTTPServer race / workQueue use-after-free
Debian. Valgrind 3.15.0. master @ 68ef9523d1bcd00afbccee2a6585c9f82ddcdb31. ```bash 143/158 - feature_uacomment.py failed, Duration: 90 s stdout: 2020-05-03T01:05:14.172000Z TestFramework (INFO): Initializing test directory /tmp/test_runner_₿_🏃_20200503_005846/feature_uacomment_22 2020-05-03T01:05:20.091000Z TestFramework (INFO): test multiple -uacomment 2020-05-03T01:05:26.771000Z TestFramework (INFO): test -uacomment max length 2020-05-03T01:06:02.909000Z TestFramework (INFO): test -uacomment unsafe characters 2020-05-03T01:06:44.399000Z TestFramework (ERROR): Assertion failed Traceback (most recent call last): File "/bitcoin/test/functional/test_framework/test_node.py", line 450, in assert_start_raises_init_error self.wait_for_rpc_connection() File "/bitcoin/test/functional/test_framework/test_node.py", line 218, in wait_for_rpc_connection raise FailedToStartError(self._node_msg( test_framework.test_node.FailedToStartError: [node 0] bitcoind exited with status 1 during initialization During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/bitcoin/test/functional/test_framework/test_framework.py", line 113, in main self.run_test() File "/bitcoin/test/functional/feature_uacomment.py", line 36, in run_test self.nodes[0].assert_start_raises_init_error(["-uacomment=" + unsafe_char], expected, match=ErrorMatch.FULL_REGEX) File "/bitcoin/test/functional/test_framework/test_node.py", line 467, in assert_start_raises_init_error self._raise_assertion_error( File "/bitcoin/test/functional/test_framework/test_node.py", line 160, in _raise_assertion_error raise AssertionError(self._node_msg(msg)) AssertionError: [node 0] Expected message "Error: User Agent comment \(:\) contains unsafe characters." does not fully match stderr: "Error: User Agent comment (:) contains unsafe characters. ==21155== Thread 8 b-http: ==21155== Invalid read of size 4 ==21155== at 0x48AA7E8: pthread_mutex_lock (pthread_mutex_lock.c:81) ==21155== by 0x3D6F9D: __gthread_mutex_lock (gthr-default.h:749) ==21155== by 0x3D6F9D: lock (std_mutex.h:100) ==21155== by 0x3D6F9D: lock (unique_lock.h:141) ==21155== by 0x3D6F9D: Enter (sync.h:131) ==21155== by 0x3D6F9D: UniqueLock (sync.h:152) ==21155== by 0x3D6F9D: Enqueue (httpserver.cpp:92) ==21155== by 0x3D6F9D: http_request_cb(evhttp_request*, void*) (httpserver.cpp:267) ==21155== by 0x4917E6B: ??? (in /usr/lib/x86_64-linux-gnu/libevent-2.1.so.7.0.0) ==21155== by 0x4915B9F: ??? (in /usr/lib/x86_64-linux-gnu/libevent-2.1.so.7.0.0) ==21155== by 0x4916462: ??? (in /usr/lib/x86_64-linux-gnu/libevent-2.1.so.7.0.0) ==21155== by 0x48F0543: bufferevent_run_readcb_ (in /usr/lib/x86_64-linux-gnu/libevent-2.1.so.7.0.0) ==21155== by 0x48F4E9B: ??? (in /usr/lib/x86_64-linux-gnu/libevent-2.1.so.7.0.0) ==21155== by 0x48FAB0E: ??? (in /usr/lib/x86_64-linux-gnu/libevent-2.1.so.7.0.0) ==21155== by 0x48FB24E: event_base_loop (in /usr/lib/x86_64-linux-gnu/libevent-2.1.so.7.0.0) ==21155== by 0x3D26C5: ThreadHTTP(event_base*) (httpserver.cpp:290) ==21155== by 0x4AA1BDF: ??? (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.28) ==21155== by 0x48A7F26: start_thread (pthread_create.c:479) ==21155== Address 0x556e348 is 8 bytes inside a block of size 184 free'd ==21155== at 0x4837EAB: operator delete(void*) (vg_replace_malloc.c:586) ==21155== by 0x3D79A2: StopHTTPServer() (httpserver.cpp:458) ==21155== by 0x1CF606: Shutdown(NodeContext&) (init.cpp:191) ==21155== by 0x1B8F2F: AppInit(int, char**) (bitcoind.cpp:162) ==21155== by 0x1B373F: main (bitcoind.cpp:178) ==21155== Block was alloc'd at ==21155== at 0x4836DEF: operator new(unsigned long) (vg_replace_malloc.c:344) ==21155== by 0x3D513E: InitHTTPServer() (httpserver.cpp:402) ==21155== by 0x1D1B4C: AppInitServers (init.cpp:783) ==21155== by 0x1D1B4C: AppInitMain(NodeContext&) (init.cpp:1340) ==21155== by 0x1B8F17: AppInit(int, char**) (bitcoind.cpp:148) ==21155== by 0x1B373F: main (bitcoind.cpp:178) ==21155== { <insert_a_suppression_name_here> Memcheck:Addr4 fun:pthread_mutex_lock fun:__gthread_mutex_lock fun:lock fun:lock fun:Enter fun:UniqueLock fun:Enqueue fun:_ZL15http_request_cbP14evhttp_requestPv obj:/usr/lib/x86_64-linux-gnu/libevent-2.1.so.7.0.0 obj:/usr/lib/x86_64-linux-gnu/libevent-2.1.so.7.0.0 obj:/usr/lib/x86_64-linux-gnu/libevent-2.1.so.7.0.0 fun:bufferevent_run_readcb_ obj:/usr/lib/x86_64-linux-gnu/libevent-2.1.so.7.0.0 obj:/usr/lib/x86_64-linux-gnu/libevent-2.1.so.7.0.0 fun:event_base_loop fun:_ZL10ThreadHTTPP10event_base obj:/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.28 fun:start_thread } ==21155== ==21155== Exit program on first error (--exit-on-first-error=yes)" 2020-05-03T01:06:44.450000Z TestFramework (INFO): Stopping nodes 2020-05-03T01:06:44.450000Z TestFramework (WARNING): Not cleaning up dir /tmp/test_runner_₿_🏃_20200503_005846/feature_uacomment_22 2020-05-03T01:06:44.450000Z TestFramework (ERROR): Test failed. Test logging available at /tmp/test_runner_₿_🏃_20200503_005846/feature_uacomment_22/test_framework.log 2020-05-03T01:06:44.451000Z TestFramework (ERROR): Hint: Call /bitcoin/test/functional/combine_logs.py '/tmp/test_runner_₿_🏃_20200503_005846/feature_uacomment_22' to consolidate all logs ```
https://github.com/bitcoin/bitcoin/issues/18856
https://github.com/bitcoin/bitcoin/pull/19033
f6a25bea826e559967a35cf4c7d18c7f44429d3c
6a67366fdc3e1d383fe7cbfa209d7e85f0d96638
2020-05-03T03:47:09Z
c++
2021-06-21T09:15:42Z
closed
bitcoin/bitcoin
https://github.com/bitcoin/bitcoin
18,834
["ci/test/00_setup_env_native_valgrind.sh", "test/functional/test_framework/mininode.py", "test/functional/test_framework/test_framework.py", "test/functional/test_framework/test_node.py", "test/functional/test_framework/util.py"]
Intermittent failure in mempool_expiry "Unable to connect to bitcoind after 60s"
https://travis-ci.org/github/bitcoin/bitcoin/jobs/681265537#L3761
https://github.com/bitcoin/bitcoin/issues/18834
https://github.com/bitcoin/bitcoin/pull/18617
68ef9523d1bcd00afbccee2a6585c9f82ddcdb31
ddc0a600b38ac6cef044085cdee46649fc437562
2020-04-30T17:20:47Z
c++
2020-05-03T12:58:56Z
closed
bitcoin/bitcoin
https://github.com/bitcoin/bitcoin
18,832
["test/functional/test_framework/util.py"]
intermittent failure in mempool_unbroadcast "Mempool sync timed out after 30s"
https://travis-ci.org/github/bitcoin/bitcoin/jobs/681480517#L3128
https://github.com/bitcoin/bitcoin/issues/18832
https://github.com/bitcoin/bitcoin/pull/18866
b55866969e248cbd912a1c298e3ba375685575dc
376294cde6b1588cb17055d8fde567eaf5848c3c
2020-04-30T17:11:22Z
c++
2020-05-08T23:31:17Z
closed
bitcoin/bitcoin
https://github.com/bitcoin/bitcoin
18,831
["src/interfaces/chain.h", "src/node/interfaces.cpp", "src/wallet/wallet.cpp"]
Intermittent failure in feature_backwards_compatibility "Transaction not eligible for abandonment"
https://travis-ci.org/github/bitcoin/bitcoin/jobs/679885530#L8791
https://github.com/bitcoin/bitcoin/issues/18831
https://github.com/bitcoin/bitcoin/pull/18842
a8b0892b743bf5b0bd7192f801fbc6144320052b
6c156e49cb7a8ee76780b3dae6e0a53899ffc5e9
2020-04-30T15:58:21Z
c++
2021-03-09T06:54:18Z
closed
bitcoin/bitcoin
https://github.com/bitcoin/bitcoin
18,824
["src/logging.cpp", "src/sync.cpp"]
Possible UB in DeleteLock() function
Since #15233 has been merged, the `lockdata` becomes a static local variable with a well-defined initialization order: https://github.com/bitcoin/bitcoin/blob/36c0abd8f61ba859d53b1e59014720282c97c143/src/sync.cpp#L93-L96 Its destructor `~LockData()` [is called at program exit](https://en.cppreference.com/w/cpp/utility/program/exit). At the same time, "if a function-local ... static object was destroyed and then that function is called from the destructor..., the _behavior is undefined_." It seems possible that at program exit the `lockdata` object is destroyed before a global `RecursiveMutex` destructor calls `DeleteLock()`, which in turn calls `GetLockData()` with UB.
https://github.com/bitcoin/bitcoin/issues/18824
https://github.com/bitcoin/bitcoin/pull/18881
13397dc78fd6a6a57bdc91db66c51788603267bb
fe1357a03af108c41baa6bd31903f2cfb0d75ef5
2020-04-30T07:28:15Z
c++
2020-05-26T12:14:57Z
closed
bitcoin/bitcoin
https://github.com/bitcoin/bitcoin
18,811
["src/rpc/server.cpp", "src/wallet/rpcwallet.cpp", "src/wallet/wallet.h"]
wallet_descriptor intermittent error "Please enter the wallet passphrase with walletpassphrase first. (-13)"
https://travis-ci.org/github/MarcoFalke/btc_nightly/jobs/680655419#L412
https://github.com/bitcoin/bitcoin/issues/18811
https://github.com/bitcoin/bitcoin/pull/18814
246e878e784584dd0d323a612007dfdafddeba42
a33901cb6d82e2f75aab67f80a8852b7e6e9817a
2020-04-29T01:33:11Z
c++
2020-05-13T09:36:06Z
closed
bitcoin/bitcoin
https://github.com/bitcoin/bitcoin
18,803
["src/rpc/mining.cpp", "src/rpc/rawtransaction.cpp", "src/wallet/rpcdump.cpp", "src/wallet/rpcwallet.cpp"]
intermittent test failure "non-mandatory-script-verify-flag (Signature must be zero for failed CHECK(MULTI)SIG operation) (-26)"
https://travis-ci.org/github/bitcoin/bitcoin/jobs/680452476#L6107
https://github.com/bitcoin/bitcoin/issues/18803
https://github.com/bitcoin/bitcoin/pull/19836
9ad7cd2887abf5f91495337a2458560de10b4f69
cbb5f3a2d584f487278e0da1db23d3fcb42e4dc6
2020-04-28T13:00:53Z
c++
2020-10-16T04:05:26Z
closed
bitcoin/bitcoin
https://github.com/bitcoin/bitcoin
18,802
["test/functional/p2p_leak.py", "test/functional/p2p_segwit.py"]
p2p_leak intermittent issue
https://travis-ci.org/github/bitcoin/bitcoin/jobs/680187056#L3437
https://github.com/bitcoin/bitcoin/issues/18802
https://github.com/bitcoin/bitcoin/pull/18839
ddc0a600b38ac6cef044085cdee46649fc437562
cce034b02800ef380738b662ad7690bd87081a66
2020-04-28T12:58:17Z
c++
2020-05-03T14:30:47Z
closed
bitcoin/bitcoin
https://github.com/bitcoin/bitcoin
18,801
["test/functional/p2p_leak.py", "test/functional/p2p_segwit.py"]
p2p_segwit intermittent issue "Block sync timed out after 60s"
https://travis-ci.org/github/bitcoin/bitcoin/jobs/680150646#L6971
https://github.com/bitcoin/bitcoin/issues/18801
https://github.com/bitcoin/bitcoin/pull/18839
ddc0a600b38ac6cef044085cdee46649fc437562
cce034b02800ef380738b662ad7690bd87081a66
2020-04-28T12:57:05Z
c++
2020-05-03T14:30:47Z
closed
bitcoin/bitcoin
https://github.com/bitcoin/bitcoin
18,800
["test/functional/wallet_importdescriptors.py"]
wallet_importdescriptors intermittent failure "Insufficient funds (-6)"
https://travis-ci.org/github/bitcoin/bitcoin/jobs/680263440#L6130
https://github.com/bitcoin/bitcoin/issues/18800
https://github.com/bitcoin/bitcoin/pull/18805
6a60bfc76c39493d35c10fef9b2851eb256bfaa5
ba348dbc518b8e082a5dc3a225432fdacf859a13
2020-04-28T12:31:51Z
c++
2020-04-28T17:14:26Z
closed
bitcoin/bitcoin
https://github.com/bitcoin/bitcoin
18,794
["ci/test/00_setup_env_mac_host.sh"]
test: macOS functional tests still failing intermittently
The functional tests were re-enabled on macOS in #18778. However it looks like they are still suffering from intermittent failures. i.e: https://travis-ci.org/github/bitcoin/bitcoin/jobs/680353191#L3136. The `OSError: [Errno 41] Protocol wrong type for socket` error in feature_assumevalid looks like the same one that was reported in #17240 when the tests were first disabled.
https://github.com/bitcoin/bitcoin/issues/18794
https://github.com/bitcoin/bitcoin/pull/18799
9fb95ae8e3e4f10888a98fc99d704d97e2eb371f
ad04130742dccbe3dd35e2a4da123b2686a24966
2020-04-28T05:43:42Z
c++
2020-04-28T12:25:51Z
closed
bitcoin/bitcoin
https://github.com/bitcoin/bitcoin
18,768
["ci/test/00_setup_env.sh", "ci/test/04_install.sh", "ci/test/06_script_a.sh", "ci/test/06_script_b.sh"]
ci: RUN_UNIT_TESTS_SEQUENTIAL is broken on Windows
If the `RUN_UNIT_TESTS_SEQUENTIAL` variable is set to `true` the following message is printed in the Travis log: ``` bash: /home/travis/build/hebasto/bitcoin/build/bitcoin-*/src/test/test_bitcoin: No such file or directory ``` and no tests actually are executed. Related: #18562
https://github.com/bitcoin/bitcoin/issues/18768
https://github.com/bitcoin/bitcoin/pull/18735
6e3fc7492a7d5e58c0ada22617388b6487410f82
a483ffd6890e23a770ea5ce9dacd802ca19d1d7c
2020-04-25T17:38:22Z
c++
2020-04-28T15:50:21Z
closed
bitcoin/bitcoin
https://github.com/bitcoin/bitcoin
18,767
["ci/test/05_before_script.sh", "test/functional/test_framework/util.py", "test/functional/test_runner.py", "test/functional/wallet_upgradewallet.py"]
test: Write tests for upgradewallet RPC
Now that #15761 has been merged, it would be nice to have tests for it. They can be written by copying the file `./test/functional/feature_backwards_compatibility.py` and modifying it to create a wallet with an older version, then check that it can be upgraded with a new version. #### Useful skills: Experience with the Bitcoin Core wallet and functional test suite. #### Want to work on this issue? The purpose of the `good first issue` label is to highlight which issues are suitable for a new contributor without a deep understanding of the codebase. You do not need to request permission to start working on this. You are encouraged to comment on the issue if you are planning to work on it. This will help other contributors monitor which issues are actively being addressed and is also an effective way to request assistance if and when you need it. For guidance on contributing, please read [CONTRIBUTING.md](https://github.com/bitcoin/bitcoin/blob/master/CONTRIBUTING.md) before opening your pull request.
https://github.com/bitcoin/bitcoin/issues/18767
https://github.com/bitcoin/bitcoin/pull/18774
af2ec6b03745cf408f169cfbd74e3380a69975e0
e302830faed00c259a517d87ce032dcd8c47528f
2020-04-25T17:23:52Z
c++
2020-04-29T15:09:05Z
closed
bitcoin/bitcoin
https://github.com/bitcoin/bitcoin
18,749
["src/test/fuzz/process_message.cpp"]
fuzz: libstdc++ vs libc++ iostream exception messages differ
The exceptions thrown by the `libstdc++` and `libc++` standard libraries seems to differ for iostream errors. libstdc++ will output `iostream error` while libc++ will output `unspecified iostream_category error`. This means that the expected serialization messages i.e: https://github.com/bitcoin/bitcoin/blob/64139803f1225dab26197a20314109d37fa87d5f/src/test/fuzz/process_message.cpp#L47-L50 don't always work. For example on macOS: ```bash ./autogen.sh CC=/usr/local/opt/llvm/bin/clang-10 CXX=/usr/local/opt/llvm/bin/clang-10 ./configure --enable-fuzz --with-sanitizers=address,fuzzer,undefined make -j8 src/test/fuzz/process_message ../qa-assets/fuzz_seed_corpus/process_message ... fuzz fuzz fuzz INFO: Seed: 3527492440 INFO: Loaded 1 modules (866992 inline 8-bit counters): 866992 [0x1092eab28, 0x1093be5d8), INFO: Loaded 1 PC tables (866992 PCs): 866992 [0x1093be5d8,0x10a0f90d8), INFO: 2888 files found in ../qa-assets/fuzz_seed_corpus/process_message INFO: -max_len is not provided; libFuzzer will not generate inputs larger than 1016709 bytes INFO: seed corpus: files: 2888 min: 1b max: 1016709b total: 21650652b rss: 129Mb Unexpected exception when processing message type "tx": Unknown transaction optional data: unspecified iostream_category error Assertion failed: (false), function test_one_input, file test/fuzz/process_message.cpp, line 109. ``` The same difference can be observed on a Debian system, compiling with Clang and linking against either library. i.e: ```cpp #include <iostream> #include <fstream> int main() { std::ifstream file; file.exceptions(file.failbit); try { file.open("Not there!"); } catch (const std::ios_base::failure &e) { std::cerr << e.what() << " " << e.code() << "\n."; } } ``` ```bash clang version 9.0.1-12 Target: x86_64-pc-linux-gnu clang++ stream.cpp -o stream ./stream basic_ios::clear: iostream error iostream:1 # compile with libc++ clang++ stream.cpp -stdlib=libc++ -o stream root@a1c752a65885:/# ./stream ios_base::clear: unspecified iostream_category error iostream:1 ``` cc @practicalswift
https://github.com/bitcoin/bitcoin/issues/18749
https://github.com/bitcoin/bitcoin/pull/18757
7812889849eb936afadc7267b51ad3768b2adf94
8c0f86f284408f316e27702510733289a6a139e7
2020-04-23T11:21:18Z
c++
2020-04-24T18:38:23Z
closed
bitcoin/bitcoin
https://github.com/bitcoin/bitcoin
18,737
["test/functional/feature_loadblock.py", "test/functional/feature_reindex.py", "test/functional/mempool_persist.py", "test/functional/test_framework/test_node.py", "test/functional/wallet_abandonconflict.py", "test/functional/wallet_basic.py"]
feature_fee_estimation is failing intermittently
There are numerous intermittent failues, such as * mempool sync failures * Fee estimation logic errors such as `AssertionError: Estimated fee (0.000565) larger than last fee (0.000478) for lower number of confirms` * ...
https://github.com/bitcoin/bitcoin/issues/18737
https://github.com/bitcoin/bitcoin/pull/18873
c6b15ec0ee4679a22abefb0d8d528f026acd8b67
7bcc42b4035b878719d13201286e322989b415c5
2020-04-22T14:26:38Z
c++
2020-05-06T13:30:31Z
closed
bitcoin/bitcoin
https://github.com/bitcoin/bitcoin
18,711
["test/functional/p2p_filter.py", "test/functional/test_framework/messages.py"]
Regression introduced today with p2p_filter.py?
in #18544 it seems: ``` TestFramework (INFO): Check that sending "filteradd" if no filter is set is treated as misbehavior (+100) TestFramework (ERROR): Assertion failed Traceback (most recent call last): File "/home/travis/build/jonatack/bitcoin/build/bitcoin-s390x-linux-gnu/test/functional/test_framework/test_framework.py", line 112, in main self.run_test() File "/home/travis/build/jonatack/bitcoin/build/bitcoin-s390x-linux-gnu/test/functional/p2p_filter.py", line 120, in run_test assert_equal(self.nodes[0].getpeerinfo()[0]['banscore'], 0) File "/home/travis/build/jonatack/bitcoin/build/bitcoin-s390x-linux-gnu/test/functional/test_framework/util.py", line 46, in assert_equal raise AssertionError("not(%s)" % " == ".join(str(arg) for arg in (thing1, thing2) + args)) AssertionError: not(100 == 0) ```
https://github.com/bitcoin/bitcoin/issues/18711
https://github.com/bitcoin/bitcoin/pull/18672
c4c3f110eb93243fc8f740070240f50b0008f206
4ad6144ed028f61ca6fa9d381cfe6516172a5ee1
2020-04-20T16:58:20Z
c++
2020-04-21T11:26:18Z
closed
bitcoin/bitcoin
https://github.com/bitcoin/bitcoin
18,684
["test/functional/interface_bitcoin_cli.py", "test/functional/test_framework/test_node.py"]
interface_bitcoin_cli.py fails intermittently
https://travis-ci.org/github/bitcoin/bitcoin/jobs/676156661#L6349 ``` test 2020-04-17T14:09:31.865000Z TestFramework (ERROR): Called Process failed with 'error: Could not locate RPC credentials. No authentication cookie could be found, and RPC password is not set. See -rpcpassword and -stdinrpcpass. Configuration file: (/home/travis/build/bitcoin/bitcoin/ci/scratch/test_runner/test_runner_₿_🏃_20200417_132645/interface_bitcoin_cli_109/node0/bitcoin.conf) ``` cc @jonatack
https://github.com/bitcoin/bitcoin/issues/18684
https://github.com/bitcoin/bitcoin/pull/18691
f8102d90889a786a568d62ee4eef13049f8cea00
dc5da7fe7b0c51dac269d6c630d9b54581b07900
2020-04-17T14:28:41Z
c++
2020-04-20T10:13:59Z
closed
bitcoin/bitcoin
https://github.com/bitcoin/bitcoin
18,666
["ci/test/06_script_a.sh"]
Investiage why Bitcoin Core is using terabytes of travis cache space
We are using the travis cache to speed up builds. However, the caches are quite large. They are in the order of 11 GBs for each branch and each pull request, which puts the total usage we put on travis in the order of Terabytes. They don't charge us for cache space, but I believe it still slows down our builds. ![Screenshot_2020-04-16 bitcoin bitcoin - Travis CI](https://user-images.githubusercontent.com/6399679/79462822-05749500-7fc6-11ea-8be2-71999e50a528.png) Our ccache size is limited to 100 Mb. https://github.com/bitcoin/bitcoin/blob/e16718a8b3db8bf9c9715f28f4dc6080bf609776/ci/test/00_setup_env.sh#L43 However, some build don't pick up this setting. https://travis-ci.org/github/bitcoin/bitcoin/jobs/675498487#L3995 #### Useful skills: Basic understanding of the Bitcoin Core ci system, travis, ccache and our build system. #### Want to work on this issue? The purpose of the `good first issue` label is to highlight which issues are suitable for a new contributor without a deep understanding of the codebase. You do not need to request permission to start working on this. You are encouraged to comment on the issue if you are planning to work on it. This will help other contributors monitor which issues are actively being addressed and is also an effective way to request assistance if and when you need it. For guidance on contributing, please read [CONTRIBUTING.md](https://github.com/bitcoin/bitcoin/blob/master/CONTRIBUTING.md) before opening your pull request.
https://github.com/bitcoin/bitcoin/issues/18666
https://github.com/bitcoin/bitcoin/pull/18667
d8dfcea5d956126fe0e2b1f36db74c8ef805e7ab
447f8676b2e9d11fb4003f8d815284a255f44c77
2020-04-16T13:42:15Z
c++
2020-04-16T20:12:30Z
closed
bitcoin/bitcoin
https://github.com/bitcoin/bitcoin
18,658
["README.md"]
Why is build_msvc separate from the doc folder?
**Is your feature request related to a problem? Please describe.** <!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] --> As a new contributor, I was confused thinking that the build_msvc folder was the only source of build setup instructions. **Describe the solution you'd like** <!-- A clear and concise description of what you want to happen. --> I think that moving the build_msvc README.md and related file set to the doc folder would make the setup process much clearer with all the options in one place. **Describe alternatives you've considered** <!-- A clear and concise description of any alternative solutions or features you've considered. --> Instead of moving build_msvc, retitling the doc folder to make it visually explicit that it contains build instructions would also be effective. **Additional context** <!-- Add any other context or screenshots about the feature request here. -->
https://github.com/bitcoin/bitcoin/issues/18658
https://github.com/bitcoin/bitcoin/pull/18663
ad04130742dccbe3dd35e2a4da123b2686a24966
6e3fc7492a7d5e58c0ada22617388b6487410f82
2020-04-15T20:00:29Z
c++
2020-04-28T12:51:57Z
closed
bitcoin/bitcoin
https://github.com/bitcoin/bitcoin
18,622
["src/fs.cpp"]
Multiple bitcoind instances can point to the same -walletdir on Windows
<!-- Describe the issue --> I was building Bitcoin Core on my Windows machine, on WSL/Ubuntu. I tried to run the tests and ran into a problem. The test in `test/functional/wallet_multiwallet.py` failed. Follows the output of the test: ``` mtrycz@LAPTOP-00AACAV2:~/git/bitcoin/test/functional$ ./test_runner.py wallet_multiwallet.py Temporary test directory at /tmp/test_runner_₿_🏃_20200413_152720 Remaining jobs: [wallet_multiwallet.py] 1/1 - wallet_multiwallet.py failed, Duration: 9 s stdout: 2020-04-13T13:27:20.407000Z TestFramework (INFO): Initializing test directory /tmp/test_runner_₿_🏃_20200413_152720/wallet_multiwallet_0 2020-04-13T13:27:24.947000Z TestFramework (INFO): Do not allow -zapwallettxes with multiwallet 2020-04-13T13:27:25.745000Z TestFramework (INFO): Do not allow -salvagewallet with multiwallet 2020-04-13T13:27:26.278000Z TestFramework (INFO): Do not allow -upgradewallet with multiwallet 2020-04-13T13:27:29.060000Z TestFramework (ERROR): Assertion failed Traceback (most recent call last): File "/home/mtrycz/git/bitcoin/test/functional/test_framework/test_framework.py", line 112, in main self.run_test() File "/home/mtrycz/git/bitcoin/test/functional/wallet_multiwallet.py", line 152, in run_test self.nodes[1].assert_start_raises_init_error(['-walletdir=' + competing_wallet_dir], exp_stderr, match=ErrorMatch.PARTIAL_REGEX) File "/home/mtrycz/git/bitcoin/test/functional/test_framework/test_node.py", line 460, in assert_start_raises_init_error self._raise_assertion_error(assert_msg) File "/home/mtrycz/git/bitcoin/test/functional/test_framework/test_node.py", line 157, in _raise_assertion_error raise AssertionError(self._node_msg(msg)) AssertionError: [node 1] bitcoind should have exited with expected error Error: Error initializing wallet database environment \"\S+competing_walletdir\"! 2020-04-13T13:27:29.113000Z TestFramework (INFO): Stopping nodes 2020-04-13T13:27:29.215000Z TestFramework (WARNING): Not cleaning up dir /tmp/test_runner_₿_🏃_20200413_152720/wallet_multiwallet_0 2020-04-13T13:27:29.215000Z TestFramework (ERROR): Test failed. Test logging available at /tmp/test_runner_₿_🏃_20200413_152720/wallet_multiwallet_0/test_framework.log 2020-04-13T13:27:29.215000Z TestFramework (ERROR): Hint: Call /home/mtrycz/git/bitcoin/test/functional/combine_logs.py '/tmp/test_runner_₿_🏃_20200413_152720/wallet_multiwallet_0' to consolidate all logs stderr: TEST | STATUS | DURATION wallet_multiwallet.py | ✖ Failed | 9 s ALL | ✖ Failed | 9 s (accumulated) Runtime: 9 s ``` I traced the cause to a node being able to open a wallet that is already open by another node. To the best of my understanding mutliple bitcoind instances shouldn't be able to point to the same datadirs or walletdirs. On Windows it is possible to have multiple bitcoind instances to point to the same walletdir, leading to possible data corruption. To the best of my understanding this is not possible on Linux (can't confirm atm). <!--- What was the actual behavior (provide screenshots if the issue is GUI-related)? --> Manual test plan: 1. Download the latest Windows release binaries (version v.0.19.1) 1. Create two directories, for example `C:\node0` and `C:\node1`; create a `bitcoin.conf` file in `C:\node1` with a single line `rpcport=8333` (otherwise the second node will fail for an unrelated reason) 1. Open a command prompt and run `bitcoind.exe -datadir=C:\node0 -walletdir=D:\bchwallettest` 2. Open a second prompt and run `bitcoind.exe -datadir=C:\node1 -walletdir=D:\bchwallettest` 3. Expect the second node to fail at startup I've run this test myself and can confirm that the second node erroneously starts. The bug was reproduced on Windows 10 Pro, both in cmd and in WSL shell, with the latest release v.0.19.1.
https://github.com/bitcoin/bitcoin/issues/18622
https://github.com/bitcoin/bitcoin/pull/18700
082a417abcce6a2d6e0a52ccad5cca9657cec64b
ea3e9e0b84c57df4110ca9e5ccced65c5bbe4611
2020-04-13T13:28:11Z
c++
2020-05-28T15:55:20Z
closed
bitcoin/bitcoin
https://github.com/bitcoin/bitcoin
18,590
["src/wallet/rpcdump.cpp", "src/wallet/rpcwallet.cpp", "src/wallet/rpcwallet.h"]
rpc: raw pointers should be replaced with shared_ptr
While working on this PR https://github.com/bitcoin/bitcoin/pull/18570 I ran into a bit confusing situation where in one function a **CWallet reference** was expected while two others dealt with **CWallet pointers**. My initial reaction was: `let's harmonize them by making them references`. However, not being part of the PR itself I did't change anything and completed the PR first. Now, after having analyzed the `rpcwallet.cpp` code I came to the conclusion that: * converting them all into references is not the solution as they're originally **shared_ptr**s * but also: there is no (visible) reason why every RPC function should begin like this: ```cpp std::shared_ptr<CWallet> const pwallet = GetWalletForJSONRPCRequest(request); const CWallet* const pwallet = wallet.get(); ``` This clearly defeats the purpose of shared pointers for no obvious reason. *Maybe I am missing something?* In my (unpublished) [code changes](https://github.com/brakmic/bitcoin/commit/0b3ee615491edf6f542631bf6ae6f72eac406550) all raw pointers got replaced with **shared_ptr**s but kept their original names (that is, *pwallet*). In the end, they're pointers too, so the most of the original code remained untouched. However, some of the helper functions couldn't be changed because external code is accessing them and I didn't want to make this task "virulent". So I introduced new ("Ref") variants that expect **shared_ptr** parameters, namely: ```cpp void EnsureWalletRefIsUnlocked(const std::shared_ptr<CWallet>); bool EnsureWalletRefIsAvailable(const std::shared_ptr<CWallet>, bool avoidException); ``` I have tested the code, with python and boost-tests, and could not find any errors. But before opening a PR I would like to open a discussion about this. Is there any reason to keep on working with raw pointers when every function call actually begins with *shared_ptr*s? Regards,
https://github.com/bitcoin/bitcoin/issues/18590
https://github.com/bitcoin/bitcoin/pull/21331
ceb6df391f281aa038ed8da6f19cad39d0d7d92e
eea6196c3d8056e51e1780a44ac7f599331247e5
2020-04-11T00:43:22Z
c++
2021-03-10T07:24:53Z
closed
bitcoin/bitcoin
https://github.com/bitcoin/bitcoin
18,567
["doc/release-notes-26094.md", "src/wallet/rpc/coins.cpp", "src/wallet/rpc/transactions.cpp", "src/wallet/rpc/util.cpp", "src/wallet/rpc/util.h", "src/wallet/rpc/wallet.cpp", "test/functional/wallet_balance.py", "test/functional/wallet_basic.py", "test/functional/wallet_orphanedreward.py"]
Return block hash with wallet calls
Some wallet calls (like getbalances) need to lock the chainstate to make sure they are caught up on the latest block (which may have been reported to the users in getblockchaininfo or similar). Those calls could benefit if the block hash they were valid on was included in the response. For example, immature balance can only change when the chainstate changes. (Assuming no keys are imported) It seems those calls can include the block hash they are caught up with for free in the response. They could simply include `m_last_block_processed` in the response. I haven't checked back with other developers to see if they like this approach, but to start simple only a single call could be updated for now. E.g. `getbalances`. #### Useful skills: Basic understanding of threads, the Bitcoin Core wallet and the Bitcoin Core RPC interface. #### Want to work on this issue? The purpose of the `good first issue` label is to highlight which issues are suitable for a new contributor without a deep understanding of the codebase. You do not need to request permission to start working on this. You are encouraged to comment on the issue if you are planning to work on it. This will help other contributors monitor which issues are actively being addressed and is also an effective way to request assistance if and when you need it. For guidance on contributing, please read [CONTRIBUTING.md](https://github.com/bitcoin/bitcoin/blob/master/CONTRIBUTING.md) before opening your pull request.
https://github.com/bitcoin/bitcoin/issues/18567
https://github.com/bitcoin/bitcoin/pull/26094
7b45d171f549595a831489827c28e8493f36c00c
da9f62f912294de07a595df0b4898aba4be6b69c
2020-04-08T18:33:19Z
c++
2023-05-02T15:50:45Z
closed
bitcoin/bitcoin
https://github.com/bitcoin/bitcoin
18,548
[".cirrus.yml"]
Tests fail intermittently on Windows (appveyor) "OSError: [WinError 10048] Only one usage of each socket address (protocol/network address/port) is normally permitted"
Example: * https://ci.appveyor.com/project/DrahtBot/bitcoin/builds/31988561#L4009
https://github.com/bitcoin/bitcoin/issues/18548
https://github.com/bitcoin/bitcoin/pull/23089
442e32e1179a49db54521244e1672bd208d0ef94
747f91c0a385df19bced69deca4d9da6d6e756b8
2020-04-06T20:33:06Z
c++
2021-09-25T07:27:34Z
closed
bitcoin/bitcoin
https://github.com/bitcoin/bitcoin
18,547
["contrib/gitian-descriptors/gitian-linux.yml", "contrib/gitian-descriptors/gitian-osx.yml", "contrib/gitian-descriptors/gitian-win.yml", "contrib/gitian-descriptors/make_git_archive", "share/genbuild.sh", "test/lint/lint-shell.sh"]
Followup for #18331 "build: Use git archive as source tarball"
After the merge of #18331, there are now two ways to create source tarballs. 1. `make dist` 2. `git archive` It would seem that both methods are being used in our Gitian descriptor. First, we run `make dist` to create a bootstrapped tarball: https://github.com/bitcoin/bitcoin/blob/c5966a87d1fdd7a98f2baee5b2deddd541fdfb5a/contrib/gitian-descriptors/gitian-linux.yml#L143-L148 Which is used by each host to build the binary tarballs in the for loop: https://github.com/bitcoin/bitcoin/blob/c5966a87d1fdd7a98f2baee5b2deddd541fdfb5a/contrib/gitian-descriptors/gitian-linux.yml#L154-L191 Then, we use `git archive` to create the final source tarball: https://github.com/bitcoin/bitcoin/blob/c5966a87d1fdd7a98f2baee5b2deddd541fdfb5a/contrib/gitian-descriptors/gitian-linux.yml#L194 It seems to me that perhaps it'd be good to reinstate the behaviour whereby our binary tarballs are built from the source tarball, just for robustness's sake. A simple fix might be: 1. switch the earlier `make dist` to `git archive` 2. `./autogen.sh` for each host 3. Remove the last call to `git archive` Perhaps this can even allow us to specify the `no-dist` automake option and clean up `dist` related targets in `Makefile.am`.
https://github.com/bitcoin/bitcoin/issues/18547
https://github.com/bitcoin/bitcoin/pull/18556
ac21090f209cb1b8ea6cd5074d5e9c6b82ce2a7f
65fb3dfc8dc1f847b756e5ce8eac4fe45305ff0e
2020-04-06T20:31:09Z
c++
2020-04-28T08:44:17Z
closed
bitcoin/bitcoin
https://github.com/bitcoin/bitcoin
18,527
["src/Makefile.am", "src/Makefile.test.include", "src/Makefile.test_fuzz.include"]
Create test_fuzz library from ./src/test/fuzz/fuzz.cpp
We have one wrapper file around the fuzzing engine (`src/test/fuzz/fuzz.cpp`), so that fuzz tests can be written independent of the engine. This file is compiled for each fuzz target (harness), so with currently more than 114 fuzz targets this is quite an overhead. All the wrapper does is provide the `main` function for the fuzz target. I am not sure, but I believe the main function can also be provided by a library. Moving this file to a library would also compile it only once, thus speeding up compilation of the fuzz tests. This issue can probably be solved similar to #17542 #### Useful skills: * Background in the autotools build system #### Want to work on this issue? The purpose of the `good first issue` label is to highlight which issues are suitable for a new contributor without a deep understanding of the codebase. You do not need to request permission to start working on this. You are encouraged to comment on the issue if you are planning to work on it. This will help other contributors monitor which issues are actively being addressed and is also an effective way to request assistance if and when you need it. For guidance on contributing, please read [CONTRIBUTING.md](https://github.com/bitcoin/bitcoin/blob/master/CONTRIBUTING.md) before opening your pull request.
https://github.com/bitcoin/bitcoin/issues/18527
https://github.com/bitcoin/bitcoin/pull/18528
483007749426a1f51ea591eaac383f19fdde9efb
96a30b98c925b4ca63993759ddf7b4dd1fa58ec1
2020-04-04T21:53:53Z
c++
2020-04-05T02:33:56Z
closed
bitcoin/bitcoin
https://github.com/bitcoin/bitcoin
18,511
["test/functional/wallet_bumpfee.py"]
wallet_bumpfee fails with AssertionError in test_dust_to_fee
Example: * https://travis-ci.org/github/bitcoin/bitcoin/jobs/670311100#L8042 ``` test 2020-04-02T21:26:28.988000Z TestFramework (ERROR): Assertion failed Traceback (most recent call last): File "/home/travis/build/bitcoin/bitcoin/build/bitcoin-x86_64-pc-linux-gnu/test/functional/test_framework/test_framework.py", line 112, in main self.run_test() File "/home/travis/build/bitcoin/bitcoin/build/bitcoin-x86_64-pc-linux-gnu/test/functional/wallet_bumpfee.py", line 84, in run_test test_dust_to_fee(self, rbf_node, dest_address) File "/home/travis/build/bitcoin/bitcoin/build/bitcoin-x86_64-pc-linux-gnu/test/functional/wallet_bumpfee.py", line 257, in test_dust_to_fee assert_equal(fulltx["vsize"], 141) File "/home/travis/build/bitcoin/bitcoin/build/bitcoin-x86_64-pc-linux-gnu/test/functional/test_framework/util.py", line 46, in assert_equal raise AssertionError("not(%s)" % " == ".join(str(arg) for arg in (thing1, thing2) + args)) AssertionError: not(140 == 141)
https://github.com/bitcoin/bitcoin/issues/18511
https://github.com/bitcoin/bitcoin/pull/18516
fdeb445a34a97357c87416d80350f9b0b4f222ca
425a7f900ed824caa5d4a93991542c70171539fe
2020-04-03T01:30:03Z
c++
2020-04-06T15:38:09Z
closed
bitcoin/bitcoin
https://github.com/bitcoin/bitcoin
18,483
["src/net.h", "src/net_processing.cpp", "test/functional/p2p_filter.py"]
BIP37: 'getdata' request for filtered blocks is answered with 'merkleblock's even if no filter is set
According to [BIP37](https://github.com/bitcoin/bips/blob/master/bip-0037.mediawiki#Extensions_to_existing_messages), `getdata` commands with a request for filtered blocks via type `MSG_FILTERED_BLOCK` in the `inv` submessage are only responded to if a filter is set: > The getdata command is extended to allow a new type in the inv submessage. The type field can now be MSG_FILTERED_BLOCK (== 3) rather than MSG_BLOCK. **If no filter has been set on the connection, a request for filtered blocks is ignored.** If a filter has been set, a merkleblock message is returned for the requested block hash. **Expected behavior** When no BIP37 filter is set and a we request a filtered block, there should be no response from the node. **Actual behavior** When no BIP37 filter is set and a we request a filtered block, we get a `merkleblock` message in reply. **To reproduce** The behaviour can reproduced by adding the following lines to the functional test `p2p_filter.py` (introduced recently with PR https://github.com/bitcoin/bitcoin/pull/18334, commit https://github.com/bitcoin/bitcoin/pull/18334/commits/fa156999695ddaeb016d8320bee62f8d96679d55), that has already a callback implemented which requests filtered blocks as reply to `inv` messages: ``` # add this lines after filtered P2P connection is added to the node, but before filter is set filter_node.merkleblock_received = False self.nodes[0].generatetoaddress(1, self.node[0].getnewaddress())[0] filter_node.sync_with_ping() assert not filter_node.merkleblock_received ``` The assertion fails, meaning that a merkleblock was indeed received. **Possible solution** Looking at the code in `net_processing.cpp`/`net.h`, it is quite obvious why this happens: the condition to answer to a filtered block request is just whether the (unique) pointer `pfrom->m_tx_relay->pfilter` is set, and this condition is always true. Initially the pointer is set in the constructor of the `struct TxRelay`, pointing to a default-constructed instance of `CBloomFilter`: https://github.com/bitcoin/bitcoin/blob/d52ba21dfff99173abb927bc964ce7ceb711d789/src/net.h#L812 And after receiving a `filterclear` message it is also reset to an empty instance again: https://github.com/bitcoin/bitcoin/blob/d52ba21dfff99173abb927bc964ce7ceb711d789/src/net_processing.cpp#L3201 In the following code, the boolean variable `sendMerkleBlock` will thus _always_ be set to true: https://github.com/bitcoin/bitcoin/blob/d52ba21dfff99173abb927bc964ce7ceb711d789/src/net_processing.cpp#L1500-L1508 A simple solution would be to just set `pfilter` to `nullptr` initially and after receiving a `filterclear` message. The question is if its worth the change, as the described behaviour is IMHO not harmful at all (it just doesn't fit the description in the BIP37 document, which could be adapted?) and connection bloom filters are deprecated anway and [not recommended to be used due to privacy concerns](https://en.bitcoin.it/wiki/BIP37_privacy_problems). It is noteworthy though that possibly other parts in `net_processing.cpp` assume the test on `pfilter` means "a bloom filter has been set", and the fact that this always evaluates to `true` could possibly lead to some unintended behaviour. For example, in the following code part, where a `NodeEvictionCandidate` is created, its member `fBloomFilter` will always be set to true: https://github.com/bitcoin/bitcoin/blob/d52ba21dfff99173abb927bc964ce7ceb711d789/src/net.cpp#L864-L875
https://github.com/bitcoin/bitcoin/issues/18483
https://github.com/bitcoin/bitcoin/pull/18544
dc5da7fe7b0c51dac269d6c630d9b54581b07900
da4cbb7927497ca3261c1504c3b85dd3f5800673
2020-03-31T15:03:42Z
c++
2020-04-20T10:59:53Z
closed
bitcoin/bitcoin
https://github.com/bitcoin/bitcoin
18,482
["src/wallet/rpcwallet.cpp"]
RPC stuck on walletpassphrase call
Sometimes RPC API stops responding after calling walletpassphrase Unfortunately I can not exactly reproduce this bug. I have tried 20 threads with about 100 requests on each with sequential calling walletpassphrase -> listtransactions -> walletpassphrase -> getransactions, but with no luck. Observe it four-five times a day and only restart of node could help. It happens not only for bitcoin wallet on mainnet and testnet, but also for litecoin and bitcoin abc wallets, also for mainnet and testnet I could provide additional data such as logs, etc. **System information** Bitcoin Core version v0.19.1 Litecoin Core Daemon version v0.17.1 Bitcoin ABC Daemon version v0.19.9.0-2f1adeefb OS: Debian 10, Xen guest, SSD debug.log with last call. after that RPC won't response anymore. ``` 2020-03-31T10:17:47Z received: inv (37 bytes) peer=11 2020-03-31T10:17:47Z got inv: tx bc6099be609e8a81e11b1ba53badd401a3361fe70c8a90dd92cc743ab972b32c new peer=11 2020-03-31T10:17:47Z Requesting witness-tx bc6099be609e8a81e11b1ba53badd401a3361fe70c8a90dd92cc743ab972b32c peer=11 2020-03-31T10:17:47Z sending getdata (37 bytes) peer=11 2020-03-31T10:17:48Z received: tx (247 bytes) peer=11 2020-03-31T10:17:48Z AcceptToMemoryPool: peer=11: accepted bc6099be609e8a81e11b1ba53badd401a3361fe70c8a90dd92cc743ab972b32c (poolsz 10 txn, 13 kB) 2020-03-31T10:17:48Z sending inv (37 bytes) peer=5 2020-03-31T10:17:48Z received: inv (37 bytes) peer=6 2020-03-31T10:17:48Z got inv: tx bc6099be609e8a81e11b1ba53badd401a3361fe70c8a90dd92cc743ab972b32c have peer=6 2020-03-31T10:17:48Z sending inv (37 bytes) peer=14 2020-03-31T10:17:48Z sending inv (37 bytes) peer=13 2020-03-31T10:17:49Z received: inv (37 bytes) peer=15 2020-03-31T10:17:49Z got inv: tx bc6099be609e8a81e11b1ba53badd401a3361fe70c8a90dd92cc743ab972b32c have peer=15 2020-03-31T10:17:50Z received: inv (37 bytes) peer=21 2020-03-31T10:17:50Z got inv: tx bc6099be609e8a81e11b1ba53badd401a3361fe70c8a90dd92cc743ab972b32c have peer=21 2020-03-31T10:17:50Z received: inv (37 bytes) peer=2 2020-03-31T10:17:50Z got inv: tx bc6099be609e8a81e11b1ba53badd401a3361fe70c8a90dd92cc743ab972b32c have peer=2 2020-03-31T10:17:50Z libevent: epoll_dispatch: epoll_wait reports 1 2020-03-31T10:17:50Z libevent: event_active: 0x561e681d9d08 (fd 9), res 2, callback 0x7fe4fc82e1b0 2020-03-31T10:17:50Z libevent: event_process_active: event: 0x561e681d9d08, EV_READ call 0x7fe4fc82e1b0 2020-03-31T10:17:50Z libevent: evhttp_get_request_connection: new request from 10.10.1.10:22443 on 52 2020-03-31T10:17:50Z libevent: Attempting connection to 10.1.1.10:22443 2020-03-31T10:17:50Z libevent: event_add: event: 0x7fe4e0000b60 (fd -1), EV_READ call 0x7fe4fc81ff40 2020-03-31T10:17:50Z libevent: event_del: 0x7fe4e0000be0 (fd -1), callback 0x7fe4fc81fb40 2020-03-31T10:17:50Z libevent: event_del: 0x7fe4e0000b60 (fd -1), callback 0x7fe4fc81ff40 2020-03-31T10:17:50Z libevent: event_del: 0x7fe4e0000be0 (fd -1), callback 0x7fe4fc81fb40 2020-03-31T10:17:50Z libevent: event_add: event: 0x7fe4e0000b60 (fd 52), EV_READ call 0x7fe4fc81ff40 2020-03-31T10:17:50Z libevent: Epoll ADD(1) on fd 52 okay. Old events were 0; read change was 1 (add); write change was 0 (none); close change was 0 (none) 2020-03-31T10:17:50Z libevent: event_add: event: 0x7fe4e0000b60 (fd 52), EV_READ EV_TIMEOUT call 0x7fe4fc81ff40 2020-03-31T10:17:50Z libevent: event_add: event 0x7fe4e0000b60, timeout in 30 seconds 0 useconds, call 0x7fe4fc81ff40 2020-03-31T10:17:50Z libevent: event_del: 0x7fe4e0000be0 (fd 52), callback 0x7fe4fc81fb40 2020-03-31T10:17:50Z libevent: event_add: event: 0x7fe4e0000b60 (fd 52), EV_READ EV_TIMEOUT call 0x7fe4fc81ff40 2020-03-31T10:17:50Z libevent: event_add: event 0x7fe4e0000b60, timeout in 30 seconds 0 useconds, call 0x7fe4fc81ff40 2020-03-31T10:17:50Z libevent: timeout_next: event: 0x7fe4bc001f90, in 0 seconds, 4053 useconds 2020-03-31T10:17:50Z libevent: epoll_dispatch: epoll_wait reports 1 2020-03-31T10:17:50Z libevent: event_active: 0x7fe4e0000b60 (fd 52), res 2, callback 0x7fe4fc81ff40 2020-03-31T10:17:50Z libevent: event_process_active: event: 0x7fe4e0000b60, EV_READ call 0x7fe4fc81ff40 2020-03-31T10:17:50Z libevent: event_add: event: 0x7fe4e0000b60 (fd 52), EV_READ EV_TIMEOUT call 0x7fe4fc81ff40 2020-03-31T10:17:50Z libevent: event_add: event 0x7fe4e0000b60, timeout in 8206112 seconds 564133 useconds, call 0x7fe4fc81ff40 2020-03-31T10:17:50Z libevent: evhttp_add_header: key: Host val: 10.1.1.5:50000 2020-03-31T10:17:50Z libevent: evhttp_add_header: key: Authorization val: Basic c210L.....dFZnMGE3YVk3MnRGcU9qTzhRVT0= 2020-03-31T10:17:50Z libevent: evhttp_add_header: key: Accept val: */* 2020-03-31T10:17:50Z libevent: evhttp_add_header: key: Content-type val: application/json 2020-03-31T10:17:50Z libevent: evhttp_add_header: key: Content-Length val: 111 2020-03-31T10:17:50Z libevent: evhttp_read_header: checking for post data on 52 2020-03-31T10:17:50Z libevent: evhttp_get_body_length: bytes to read: 111 (in buffer 111) 2020-03-31T10:17:50Z libevent: event_del: 0x7fe4e0000b60 (fd 52), callback 0x7fe4fc81ff40 2020-03-31T10:17:50Z libevent: Epoll DEL(1) on fd 52 okay. Old events were 2; read change was 2 (del); write change was 0 (none); close change was 0 (none) 2020-03-31T10:17:50Z libevent: event_del: 0x7fe4e0000b60 (fd 52), callback 0x7fe4fc81ff40 2020-03-31T10:17:50Z Received a POST request for /wallet/test from 10.1.1.10:22443 2020-03-31T10:17:50Z libevent: timeout_next: event: 0x7fe4bc001f90, in 0 seconds, 4053 useconds 2020-03-31T10:17:50Z ThreadRPCServer method=walletpassphrase user=test 2020-03-31T10:17:50Z libevent: epoll_dispatch: epoll_wait reports 0 2020-03-31T10:17:50Z libevent: timeout_next: event: 0x7fe4bc001f90, in 0 seconds, 4053 useconds 2020-03-31T10:17:50Z libevent: epoll_dispatch: epoll_wait reports 0 2020-03-31T10:17:50Z libevent: event_del: 0x7fe4bc001f90 (fd -1), callback 0x561e66258dd0 2020-03-31T10:17:50Z libevent: timeout_process: event: 0x7fe4bc001f90, call 0x561e66258dd0 2020-03-31T10:17:50Z libevent: event_active: 0x7fe4bc001f90 (fd -1), res 1, callback 0x561e66258dd0 2020-03-31T10:17:50Z libevent: event_del: 0x7fe4bc001f90 (fd -1), callback 0x561e66258dd0 2020-03-31T10:17:50Z libevent: event_process_active: event: 0x7fe4bc001f90, call 0x561e66258dd0 2020-03-31T10:17:50Z libevent: event_del: 0x7fe4bc001f90 (fd -1), callback 0x561e66258dd0 2020-03-31T10:17:58Z received: ping (8 bytes) peer=109 2020-03-31T10:17:58Z sending pong (8 bytes) peer=109 2020-03-31T10:19:13Z Making feeler connection to [2607:fea8:8460:2b4a::4]:18333 2020-03-31T10:19:13Z trying connection [2607:fea8:8460:2b4a::4]:18333 lastseen=842.8hrs 2020-03-31T10:19:18Z connection to [2607:fea8:8460:2b4a::4]:18333 timeout 2020-03-31T10:20:03Z socket closed 2020-03-31T10:20:03Z disconnecting peer=110 2020-03-31T10:21:10Z Making feeler connection to 54.162.24.231:18333 2020-03-31T10:21:10Z trying connection 54.162.24.231:18333 lastseen=556.7hrs 2020-03-31T10:21:15Z connection to 54.162.24.231:18333 timeout 2020-03-31T10:21:16Z Making feeler connection to 70.24.60.7:18333 2020-03-31T10:21:16Z trying connection 70.24.60.7:18333 lastseen=634.4hrs 2020-03-31T10:21:21Z connection to 70.24.60.7:18333 timeout 2020-03-31T10:21:35Z socket closed 2020-03-31T10:21:35Z disconnecting peer=111 ```
https://github.com/bitcoin/bitcoin/issues/18482
https://github.com/bitcoin/bitcoin/pull/18487
54d5ba3d9cb45d8417ecca0f09c68d865d0c423c
75021e80ee4439dddadbe8c586cee04b85ac110c
2020-03-31T10:53:59Z
c++
2020-04-06T18:29:35Z
closed
bitcoin/bitcoin
https://github.com/bitcoin/bitcoin
18,465
["build_msvc/libbitcoin_util/libbitcoin_util.vcxproj.in", "configure.ac", "src/Makefile.am", "src/bitcoin-cli.cpp", "src/bitcoin-wallet.cpp", "src/bitcoind.cpp", "src/qt/main.cpp", "src/test/util/setup_common.cpp", "src/util/url.h", "src/wallet/rpcwallet.cpp"]
bitcoin-tx (and probably others) fails to build without libevent
libevent seems to have invaded `libbitcoin_common` via `url.cpp` `url.cpp` is used only from `test/fuzz/string.cpp` and `wallet/rpcwallet.cpp` libevent should only be required for bitcoind, bitcoin-cli and (due only to the hack of passing wallet names) bitcoin-qt
https://github.com/bitcoin/bitcoin/issues/18465
https://github.com/bitcoin/bitcoin/pull/18504
6ab96ec5469ceea8544fb07e31118c295dbe57ca
4eb1eeb02c57774b2de3e2d5fe3dab4f3da97ee0
2020-03-29T15:19:39Z
c++
2020-04-10T16:52:37Z
closed
bitcoin/bitcoin
https://github.com/bitcoin/bitcoin
18,457
["src/init.cpp", "src/net.cpp", "src/net.h", "src/net_processing.h", "src/test/denialofservice_tests.cpp"]
net: Missing lock on cs_vNodes on shutdown
This is a well known (long standing) issue. Documented in the code base in commit eea02be70ee37b845f2719b3c08e5baf4b6f51f6. Countless intermittent sanitizer warnings can be attributed to it.
https://github.com/bitcoin/bitcoin/issues/18457
https://github.com/bitcoin/bitcoin/pull/18458
75021e80ee4439dddadbe8c586cee04b85ac110c
c31bcaf203b5154117eee1cb2496dca2b7c3853d
2020-03-28T13:39:15Z
c++
2020-04-06T19:06:09Z
closed
bitcoin/bitcoin
https://github.com/bitcoin/bitcoin
18,411
["src/script/script_error.cpp"]
SCRIPT_ERR_SIG_PUSHONLY error string is wrong
https://github.com/bitcoin/bitcoin/blob/57a8fa9c3b4452ef7a9d9ed4b957b3888f542fb0/src/script/script_error.cpp#L60-L61 It should be `Non-push operators are not allowed in signatures` or `Only push operators allowed in signatures`.
https://github.com/bitcoin/bitcoin/issues/18411
https://github.com/bitcoin/bitcoin/pull/18412
23991ee53af21c2fdc28f6e8e002dc1455c71098
94d3063c93b2e3f2081b0b10385ac71ce29eb06e
2020-03-23T15:23:12Z
c++
2020-03-26T16:34:27Z
closed
bitcoin/bitcoin
https://github.com/bitcoin/bitcoin
18,389
["src/test/fuzz/multiplication_overflow.cpp"]
fuzzing: compilation error ‘__builtin_mul_overflow’ does not have pointer to integer type
I'm using Debian, compiling current master (5bf45fe2a9642f8ae8f8a12bcbf8f8b4770421ad) after configure with `./configure --disable-shared --enable-tests --enable-fuzz CC=${AFLPATH}/afl-clang CXX=${AFLPATH}/afl-clang++`. Getting this error: ```[+] Instrumented 442 locations (64-bit, hardened mode, ratio 100%). CXX test/fuzz/test_fuzz_key-fuzz.o afl-cc 2.52b by <[email protected]> test/fuzz/integer.cpp:152:27: error: default initialization of an object of const type 'const SigningProvider' without a user-provided default constructor const SigningProvider store; ^ {} 1 error generated. Makefile:14931: recipe for target 'test/fuzz/test_fuzz_integer-integer.o' failed ``` If I configure for gcc, I get this error: ``` test/fuzz/multiplication_overflow.cpp: In instantiation of ‘void {anonymous}::TestMultiplicationOverflow(FuzzedDataProvider&) [with T = bool]’: test/fuzz/multiplication_overflow.cpp:41:58: required from here test/fuzz/multiplication_overflow.cpp:21:75: error: argument 3 in call to function ‘__builtin_mul_overflow’ does not have pointer to integer type const bool is_multiplication_overflow_builtin = __builtin_mul_overflow(i, j, &result_builtin); ^ Makefile:15155: recipe for target 'test/fuzz/test_fuzz_multiplication_overflow-multiplication_overflow.o' failed ``` Funny enough, it works on my macbook locally :) cc @practicalswift
https://github.com/bitcoin/bitcoin/issues/18389
https://github.com/bitcoin/bitcoin/pull/18393
d478a737dbdd9c6e60718cdef3352dbe6c86aa10
97b0687501cee77a9170f9e288755a5d268e9bd4
2020-03-20T00:29:17Z
c++
2020-03-23T11:39:47Z
closed
bitcoin/bitcoin
https://github.com/bitcoin/bitcoin
18,373
["configure.ac", "src/Makefile.bench.include"]
build: building for just bench fails to link due to libevent symbols
Configuring to build only `bench` i.e: `./configure --with-gui=no --with-libs=no --with-utils=no --with-daemon=no --disable-tests` currently fails to link with: ```bash CXXLD bench/bench_bitcoin Undefined symbols for architecture x86_64: "_evhttp_uridecode", referenced from: urlDecode(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in libbitcoin_util.a(libbitcoin_util_a-url.o) "_event_enable_debug_logging", referenced from: UpdateHTTPServerLogging(bool) in libbitcoin_server.a(libbitcoin_server_a-httpserver.o) ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation) ``` #### Want to work on this issue? The purpose of the `good first issue` label is to highlight which issues are suitable for a new contributor without a deep understanding of the codebase. You do not need to request permission to start working on this. You are encouraged to comment on the issue if you are planning to work on it. This will help other contributors monitor which issues are actively being addressed and is also an effective way to request assistance if and when you need it. For guidance on contributing, please read [CONTRIBUTING.md](https://github.com/bitcoin/bitcoin/blob/master/CONTRIBUTING.md) before opening your pull request.
https://github.com/bitcoin/bitcoin/issues/18373
https://github.com/bitcoin/bitcoin/pull/18397
2e97d8001705214b6b915b61a2c9c34832b85323
d8ce27ff9f806efaf95cb4aeb11b9d5a3f106e88
2020-03-18T03:46:49Z
c++
2020-03-26T08:22:24Z
closed
bitcoin/bitcoin
https://github.com/bitcoin/bitcoin
18,372
["src/net_processing.cpp"]
sanitizer: heap-use-after-free in checkinputs_test
Seeing what looks like the same issue in two Travis builds ([valgrind](https://travis-ci.org/github/bitcoin/bitcoin/jobs/663676102) and the [thread-sanitizer](https://travis-ci.org/github/bitcoin/bitcoin/jobs/663676100)) on latest master. The failure is in the txvalidationcache `checkinputs_test`: ```bash WARNING: ThreadSanitizer: heap-use-after-free (pid=27099) Read of size 8 at 0x7d58000c54c8 by thread T4 (mutexes: write M132349): #0 (anonymous namespace)::TipMayBeStale(Consensus::Params const&) /home/travis/build/bitcoin/bitcoin/build/bitcoin-x86_64-pc-linux-gnu/src/net_processing.cpp:584 (test_bitcoin+0x000000a18c85) #1 PeerLogicValidation::CheckForStaleTipAndEvictPeers(Consensus::Params const&) /home/travis/build/bitcoin/bitcoin/build/bitcoin-x86_64-pc-linux-gnu/src/net_processing.cpp:3505 (test_bitcoin+0x000000a18c85) #2 operator() /home/travis/build/bitcoin/bitcoin/build/bitcoin-x86_64-pc-linux-gnu/src/net_processing.cpp:1130 (test_bitcoin+0x000000a292c0) #3 std::_Function_handler<void (), PeerLogicValidation::PeerLogicValidation(CConnman*, BanMan*, CScheduler&, CTxMemPool&)::$_0>::_M_invoke(std::_Any_data const&) /usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/c++/5.4.0/functional:1871 (test_bitcoin+0x000000a292c0) #4 std::function<void ()>::operator()() const /usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/c++/5.4.0/functional:2267 (test_bitcoin+0x000000cccf9c) #5 Repeat(CScheduler&, std::function<void ()>, std::chrono::duration<long, std::ratio<1l, 1000l> >) /home/travis/build/bitcoin/bitcoin/build/bitcoin-x86_64-pc-linux-gnu/src/scheduler.cpp:119 (test_bitcoin+0x000000cccf9c) #6 operator() /home/travis/build/bitcoin/bitcoin/build/bitcoin-x86_64-pc-linux-gnu/src/scheduler.cpp:125 (test_bitcoin+0x000000cccd12) #7 std::_Function_handler<void (), CScheduler::scheduleEvery(std::function<void ()>, std::chrono::duration<long, std::ratio<1l, 1000l> >)::$_0>::_M_invoke(std::_Any_data const&) /usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/c++/5.4.0/functional:1871 (test_bitcoin+0x000000cccd12) #8 std::function<void ()>::operator()() const /usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/c++/5.4.0/functional:2267 (test_bitcoin+0x000000ccb633) #9 CScheduler::serviceQueue() /home/travis/build/bitcoin/bitcoin/build/bitcoin-x86_64-pc-linux-gnu/src/scheduler.cpp:63 (test_bitcoin+0x000000ccb633) #10 operator() /home/travis/build/bitcoin/bitcoin/build/bitcoin-x86_64-pc-linux-gnu/src/test/util/setup_common.cpp:110 (test_bitcoin+0x000000946202) #11 boost::detail::thread_data<TestingSetup::TestingSetup(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)::$_0>::run() /usr/include/boost/thread/detail/thread.hpp:116 (test_bitcoin+0x000000946202) #12 boost::this_thread::interruption_point() <null> (libboost_thread.so.1.58.0+0x0000000115d4) Previous write of size 8 at 0x7d58000c54c8 by main thread: [failed to restore the stack] Mutex M132349 (0x0000013ec5a0) created at: #0 pthread_mutex_lock <null> (test_bitcoin+0x000000499e00) #1 __gthread_mutex_lock(pthread_mutex_t*) /usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/x86_64-linux-gnu/c++/5.4.0/bits/gthr-default.h:748 (test_bitcoin+0x000000c04f23) #2 __gthread_recursive_mutex_lock(pthread_mutex_t*) /usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/x86_64-linux-gnu/c++/5.4.0/bits/gthr-default.h:810 (test_bitcoin+0x000000c04f23) #3 std::recursive_mutex::lock() /usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/c++/5.4.0/mutex:176 (test_bitcoin+0x000000c04f23) #4 std::unique_lock<std::recursive_mutex>::lock() /usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/c++/5.4.0/mutex:485 (test_bitcoin+0x000000c04f23) #5 UniqueLock<AnnotatedMixin<std::recursive_mutex>, std::unique_lock<std::recursive_mutex> >::Enter(char const*, char const*, int) /home/travis/build/bitcoin/bitcoin/build/bitcoin-x86_64-pc-linux-gnu/src/./sync.h:131 (test_bitcoin+0x000000c04f23) #6 UniqueLock /home/travis/build/bitcoin/bitcoin/build/bitcoin-x86_64-pc-linux-gnu/src/./sync.h:152 (test_bitcoin+0x000000c04f23) #7 CChainState::LoadGenesisBlock(CChainParams const&) /home/travis/build/bitcoin/bitcoin/build/bitcoin-x86_64-pc-linux-gnu/src/validation.cpp:4614 (test_bitcoin+0x000000c04f23) #8 LoadGenesisBlock(CChainParams const&) /home/travis/build/bitcoin/bitcoin/build/bitcoin-x86_64-pc-linux-gnu/src/validation.cpp:4639 (test_bitcoin+0x000000c0527b) #9 TestingSetup /home/travis/build/bitcoin/bitcoin/build/bitcoin-x86_64-pc-linux-gnu/src/test/util/setup_common.cpp:120 (test_bitcoin+0x000000942bb7) #10 RegTestingSetup /home/travis/build/bitcoin/bitcoin/build/bitcoin-x86_64-pc-linux-gnu/src/./test/util/setup_common.h:96 (test_bitcoin+0x000000943992) #11 TestChain100Setup /home/travis/build/bitcoin/bitcoin/build/bitcoin-x86_64-pc-linux-gnu/src/test/util/setup_common.cpp:160 (test_bitcoin+0x000000943992) #12 tx_mempool_block_doublespend /home/travis/build/bitcoin/bitcoin/build/bitcoin-x86_64-pc-linux-gnu/src/test/txvalidationcache_tests.cpp:20 (test_bitcoin+0x000000888441) #13 txvalidationcache_tests::tx_mempool_block_doublespend_invoker() /home/travis/build/bitcoin/bitcoin/build/bitcoin-x86_64-pc-linux-gnu/src/test/txvalidationcache_tests.cpp:20 (test_bitcoin+0x000000888441) #14 boost::unit_test::ut_detail::unused boost::unit_test::ut_detail::invoker<boost::unit_test::ut_detail::unused>::invoke<void (*)()>(void (*&)()) /usr/include/boost/test/utils/callback.hpp:56 (test_bitcoin+0x0000005349d9) #15 boost::unit_test::ut_detail::callback0_impl_t<boost::unit_test::ut_detail::unused, void (*)()>::invoke() /usr/include/boost/test/utils/callback.hpp:89 (test_bitcoin+0x0000005349d9) #16 boost::unit_test::test_case_filter::test_case_filter(boost::unit_test::basic_cstring<char const>) <null> (libboost_unit_test_framework.so.1.58.0+0x00000006acb0) #17 __libc_start_main <null> (libc.so.6+0x00000002082f) Thread T4 (tid=27120, running) created by main thread at: #0 pthread_create <null> (test_bitcoin+0x000000482cc6) #1 boost::thread::start_thread_noexcept() <null> (libboost_thread.so.1.58.0+0x0000000102e8) #2 thread<(lambda at test/util/setup_common.cpp:110:31) &> /usr/include/boost/thread/detail/thread.hpp:266 (test_bitcoin+0x000000942987) #3 boost::thread* boost::thread_group::create_thread<TestingSetup::TestingSetup(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)::$_0>(TestingSetup::TestingSetup(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)::$_0) /usr/include/boost/thread/detail/thread_group.hpp:78 (test_bitcoin+0x000000942987) #4 TestingSetup /home/travis/build/bitcoin/bitcoin/build/bitcoin-x86_64-pc-linux-gnu/src/test/util/setup_common.cpp:110 (test_bitcoin+0x000000942987) #5 RegTestingSetup /home/travis/build/bitcoin/bitcoin/build/bitcoin-x86_64-pc-linux-gnu/src/./test/util/setup_common.h:96 (test_bitcoin+0x000000943992) #6 TestChain100Setup /home/travis/build/bitcoin/bitcoin/build/bitcoin-x86_64-pc-linux-gnu/src/test/util/setup_common.cpp:160 (test_bitcoin+0x000000943992) #7 checkinputs_test /home/travis/build/bitcoin/bitcoin/build/bitcoin-x86_64-pc-linux-gnu/src/test/txvalidationcache_tests.cpp:148 (test_bitcoin+0x00000088bd71) #8 txvalidationcache_tests::checkinputs_test_invoker() /home/travis/build/bitcoin/bitcoin/build/bitcoin-x86_64-pc-linux-gnu/src/test/txvalidationcache_tests.cpp:148 (test_bitcoin+0x00000088bd71) #9 boost::unit_test::ut_detail::unused boost::unit_test::ut_detail::invoker<boost::unit_test::ut_detail::unused>::invoke<void (*)()>(void (*&)()) /usr/include/boost/test/utils/callback.hpp:56 (test_bitcoin+0x0000005349d9) #10 boost::unit_test::ut_detail::callback0_impl_t<boost::unit_test::ut_detail::unused, void (*)()>::invoke() /usr/include/boost/test/utils/callback.hpp:89 (test_bitcoin+0x0000005349d9) #11 boost::unit_test::test_case_filter::test_case_filter(boost::unit_test::basic_cstring<char const>) <null> (libboost_unit_test_framework.so.1.58.0+0x00000006acb0) #12 __libc_start_main <null> (libc.so.6+0x00000002082f) SUMMARY: ThreadSanitizer: heap-use-after-free /home/travis/build/bitcoin/bitcoin/build/bitcoin-x86_64-pc-linux-gnu/src/net_processing.cpp:584 in (anonymous namespace)::TipMayBeStale(Consensus::Params const&) ================== ThreadSanitizer: reported 1 warnings ``` ``` ==25319== Thread 2: ==25319== Invalid read of size 8 ==25319== at 0x703624: PeerLogicValidation::CheckForStaleTipAndEvictPeers(Consensus::Params const&) (net_processing.cpp:0) ==25319== by 0x710FEC: operator() (net_processing.cpp:1130) ==25319== by 0x710FEC: std::_Function_handler<void (), PeerLogicValidation::PeerLogicValidation(CConnman*, BanMan*, CScheduler&, CTxMemPool&)::$_0>::_M_invoke(std::_Any_data const&) (std_function.h:316) ==25319== by 0x954664: operator() (std_function.h:706) ==25319== by 0x954664: Repeat(CScheduler&, std::function<void ()>, std::chrono::duration<long, std::ratio<1l, 1000l> >) (scheduler.cpp:119) ==25319== by 0x954472: operator() (scheduler.cpp:125) ==25319== by 0x954472: std::_Function_handler<void (), CScheduler::scheduleEvery(std::function<void ()>, std::chrono::duration<long, std::ratio<1l, 1000l> >)::$_0>::_M_invoke(std::_Any_data const&) (std_function.h:316) ==25319== by 0x95358D: operator() (std_function.h:706) ==25319== by 0x95358D: CScheduler::serviceQueue() (scheduler.cpp:63) ==25319== by 0x651FAD: operator() (setup_common.cpp:110) ==25319== by 0x651FAD: boost::detail::thread_data<TestingSetup::TestingSetup(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)::$_0>::run() (thread.hpp:116) ==25319== by 0x526CBCC: ??? (in /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.65.1) ==25319== by 0x54876DA: start_thread (pthread_create.c:463) ==25319== by 0x709388E: clone (clone.S:95) ==25319== Address 0xc578c48 is 0 bytes after a block of size 24 free'd ==25319== at 0x4C3123B: operator delete(void*) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==25319== by 0x4920EF: deallocate (new_allocator.h:125) ==25319== by 0x4920EF: deallocate (alloc_traits.h:462) ==25319== by 0x4920EF: _M_deallocate (stl_vector.h:180) ==25319== by 0x4920EF: void std::vector<std::vector<unsigned char, std::allocator<unsigned char> >, std::allocator<std::vector<unsigned char, std::allocator<unsigned char> > > >::_M_realloc_insert<std::vector<unsigned char, std::allocator<unsigned char> > const&>(__gnu_cxx::__normal_iterator<std::vector<unsigned char, std::allocator<unsigned char> >*, std::vector<std::vector<unsigned char, std::allocator<unsigned char> >, std::allocator<std::vector<unsigned char, std::allocator<unsigned char> > > > >, std::vector<unsigned char, std::allocator<unsigned char> > const&) (vector.tcc:448) ==25319== by 0xB16F38: push_back (stl_vector.h:948) ==25319== by 0xB16F38: EvalScript(std::vector<std::vector<unsigned char, std::allocator<unsigned char> >, std::allocator<std::vector<unsigned char, std::allocator<unsigned char> > > >&, CScript const&, unsigned int, BaseSignatureChecker const&, SigVersion, ScriptError_t*) (interpreter.cpp:411) ==25319== by 0xB1BA37: VerifyScript(CScript const&, CScript const&, CScriptWitness const*, unsigned int, BaseSignatureChecker const&, ScriptError_t*) (interpreter.cpp:1553) ==25319== by 0x897862: operator() (validation.cpp:1450) ==25319== by 0x897862: CheckInputScripts(CTransaction const&, TxValidationState&, CCoinsViewCache const&, unsigned int, bool, bool, PrecomputedTransactionData&, std::vector<CScriptCheck, std::allocator<CScriptCheck> >*) (validation.cpp:1531) ==25319== by 0x53A701: txvalidationcache_tests::ValidateCheckInputsForAllFlags(CTransaction const&, unsigned int, bool) (txvalidationcache_tests.cpp:126) ==25319== by 0x5371A7: txvalidationcache_tests::checkinputs_test::test_method() (txvalidationcache_tests.cpp:353) ==25319== by 0x530F3E: txvalidationcache_tests::checkinputs_test_invoker() (txvalidationcache_tests.cpp:148) ==25319== by 0x1CCB3F: boost::detail::function::void_function_invoker0<void (*)(), void>::invoke(boost::detail::function::function_buffer&) (function_template.hpp:118) ==25319== by 0x56EA2CD: boost::detail::function::function_obj_invoker0<boost::detail::forward, int>::invoke(boost::detail::function::function_buffer&) (in /usr/lib/x86_64-linux-gnu/libboost_unit_test_framework.so.1.65.1) ==25319== by 0x56E977C: boost::execution_monitor::catch_signals(boost::function<int ()> const&) (in /usr/lib/x86_64-linux-gnu/libboost_unit_test_framework.so.1.65.1) ==25319== by 0x56E9860: boost::execution_monitor::execute(boost::function<int ()> const&) (in /usr/lib/x86_64-linux-gnu/libboost_unit_test_framework.so.1.65.1) ==25319== Block was alloc'd at ==25319== at 0x4C3017F: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==25319== by 0x491F3C: allocate (new_allocator.h:111) ==25319== by 0x491F3C: allocate (alloc_traits.h:436) ==25319== by 0x491F3C: _M_allocate (stl_vector.h:172) ==25319== by 0x491F3C: void std::vector<std::vector<unsigned char, std::allocator<unsigned char> >, std::allocator<std::vector<unsigned char, std::allocator<unsigned char> > > >::_M_realloc_insert<std::vector<unsigned char, std::allocator<unsigned char> > const&>(__gnu_cxx::__normal_iterator<std::vector<unsigned char, std::allocator<unsigned char> >*, std::vector<std::vector<unsigned char, std::allocator<unsigned char> >, std::allocator<std::vector<unsigned char, std::allocator<unsigned char> > > > >, std::vector<unsigned char, std::allocator<unsigned char> > const&) (vector.tcc:406) ==25319== by 0xB16F38: push_back (stl_vector.h:948) ==25319== by 0xB16F38: EvalScript(std::vector<std::vector<unsigned char, std::allocator<unsigned char> >, std::allocator<std::vector<unsigned char, std::allocator<unsigned char> > > >&, CScript const&, unsigned int, BaseSignatureChecker const&, SigVersion, ScriptError_t*) (interpreter.cpp:411) ==25319== by 0xB1BA37: VerifyScript(CScript const&, CScript const&, CScriptWitness const*, unsigned int, BaseSignatureChecker const&, ScriptError_t*) (interpreter.cpp:1553) ==25319== by 0x897862: operator() (validation.cpp:1450) ==25319== by 0x897862: CheckInputScripts(CTransaction const&, TxValidationState&, CCoinsViewCache const&, unsigned int, bool, bool, PrecomputedTransactionData&, std::vector<CScriptCheck, std::allocator<CScriptCheck> >*) (validation.cpp:1531) ==25319== by 0x53A701: txvalidationcache_tests::ValidateCheckInputsForAllFlags(CTransaction const&, unsigned int, bool) (txvalidationcache_tests.cpp:126) ==25319== by 0x5371A7: txvalidationcache_tests::checkinputs_test::test_method() (txvalidationcache_tests.cpp:353) ==25319== by 0x530F3E: txvalidationcache_tests::checkinputs_test_invoker() (txvalidationcache_tests.cpp:148) ==25319== by 0x1CCB3F: boost::detail::function::void_function_invoker0<void (*)(), void>::invoke(boost::detail::function::function_buffer&) (function_template.hpp:118) ==25319== by 0x56EA2CD: boost::detail::function::function_obj_invoker0<boost::detail::forward, int>::invoke(boost::detail::function::function_buffer&) (in /usr/lib/x86_64-linux-gnu/libboost_unit_test_framework.so.1.65.1) ==25319== by 0x56E977C: boost::execution_monitor::catch_signals(boost::function<int ()> const&) (in /usr/lib/x86_64-linux-gnu/libboost_unit_test_framework.so.1.65.1) ==25319== by 0x56E9860: boost::execution_monitor::execute(boost::function<int ()> const&) (in /usr/lib/x86_64-linux-gnu/libboost_unit_test_framework.so.1.65.1) ==25319== { <insert_a_suppression_name_here> Memcheck:Addr8 fun:_ZN19PeerLogicValidation29CheckForStaleTipAndEvictPeersERKN9Consensus6ParamsE fun:operator() fun:_ZNSt17_Function_handlerIFvvEZN19PeerLogicValidationC1EP8CConnmanP6BanManR10CSchedulerR10CTxMemPoolE3$_0E9_M_invokeERKSt9_Any_data fun:operator() fun:_ZL6RepeatR10CSchedulerSt8functionIFvvEENSt6chrono8durationIlSt5ratioILl1ELl1000EEEE fun:operator() fun:_ZNSt17_Function_handlerIFvvEZN10CScheduler13scheduleEveryESt8functionIS0_ENSt6chrono8durationIlSt5ratioILl1ELl1000EEEEE3$_0E9_M_invokeERKSt9_Any_data fun:operator() fun:_ZN10CScheduler12serviceQueueEv fun:operator() fun:_ZN5boost6detail11thread_dataIZN12TestingSetupC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE3$_0E3runEv obj:/usr/lib/x86_64-linux-gnu/libboost_thread.so.1.65.1 fun:start_thread fun:clone } ```
https://github.com/bitcoin/bitcoin/issues/18372
https://github.com/bitcoin/bitcoin/pull/18376
5c9d408b2dd8c7a5b40b3e6051bb095eaad62604
a421e0a22f1230abd69b4661a019bed39b72205f
2020-03-18T03:24:59Z
c++
2020-03-18T20:40:47Z
closed
bitcoin/bitcoin
https://github.com/bitcoin/bitcoin
18,266
["ci/test/00_setup_env_native_valgrind.sh", "test/functional/test_framework/mininode.py", "test/functional/test_framework/test_framework.py", "test/functional/test_framework/test_node.py", "test/functional/test_framework/util.py"]
test: add option to functional test_runner to adjust test timeouts
It was [suggested](https://github.com/bitcoin/bitcoin/pull/18249#issuecomment-593944985) that we could have an additional argument for the [functional test_runner](https://github.com/bitcoin/bitcoin/blob/master/test/functional/test_runner.py) that modifies the timeouts by some factor. This would save having to randomly bump timeouts in the tests themselves, as users that require longer timeouts can opt in by `-factor=1.5` etc. Follow up to #18249. #### Want to work on this issue? The purpose of the `good first issue` label is to highlight which issues are suitable for a new contributor without a deep understanding of the codebase. You do not need to request permission to start working on this. You are encouraged to comment on the issue if you are planning to work on it. This will help other contributors monitor which issues are actively being addressed and is also an effective way to request assistance if and when you need it. For guidance on contributing, please read [CONTRIBUTING.md](https://github.com/bitcoin/bitcoin/blob/master/CONTRIBUTING.md) before opening your pull request.
https://github.com/bitcoin/bitcoin/issues/18266
https://github.com/bitcoin/bitcoin/pull/18617
68ef9523d1bcd00afbccee2a6585c9f82ddcdb31
ddc0a600b38ac6cef044085cdee46649fc437562
2020-03-05T07:07:25Z
c++
2020-05-03T12:58:56Z
closed
bitcoin/bitcoin
https://github.com/bitcoin/bitcoin
18,258
["src/rpc/mining.cpp", "src/rpc/misc.cpp", "src/rpc/rawtransaction.cpp", "src/wallet/rpcwallet.cpp"]
rpcdoc: Remove redundant type from description
The RPC docs are now enforced to specify the json type of the args and results at compile time. However, some help texts contain the type twice. (E.g. https://github.com/bitcoin/bitcoin/pull/17809#discussion_r386295217 ). The duplicate type in the description should be removed. Duplicates can be found with this command: ```sh git grep --extended-regexp 'RPC.*(ARR|OBJ).*json (array|object)' src/rpc/ src/wallet/rpc* ``` #### Useful skills: Basic understanding of how to compile and run Bitcoin Core. #### Want to work on this issue? The purpose of the `good first issue` label is to highlight which issues are suitable for a new contributor without a deep understanding of the codebase. You do not need to request permission to start working on this. You are encouraged to comment on the issue if you are planning to work on it. This will help other contributors monitor which issues are actively being addressed and is also an effective way to request assistance if and when you need it. For guidance on contributing, please read [CONTRIBUTING.md](https://github.com/bitcoin/bitcoin/blob/master/CONTRIBUTING.md) before opening your pull request.
https://github.com/bitcoin/bitcoin/issues/18258
https://github.com/bitcoin/bitcoin/pull/18268
249114b1a6a4a10f8cfa61cafd01c391991a750f
58c72880ff70807cf622cdebf1d6273f4041bd2e
2020-03-04T14:33:44Z
c++
2020-03-11T17:28:57Z
closed
bitcoin/bitcoin
https://github.com/bitcoin/bitcoin
18,257
["src/wallet/coinselection.cpp", "src/wallet/test/coinselector_tests.cpp"]
Suggested BNB Search Optimization
I wanted to open an issue to understand why `bnb_search` as [implemented](https://github.com/bitcoin/bitcoin/pull/10637) @achow101 does not terminate once an optimal search is found. This behavior is evident I believe when inspecting the [test](https://github.com/bitcoin/bitcoin/blob/master/src/wallet/test/coinselector_tests.cpp#L178) which sets the target to `5` and uses the utxo pool `4,3,2,1`. since combinations of `4` are evaluated first, the `bnb_search` finds an optimal solution of `4,1`. However, instead of terminating when the `best_waste = 0` (no better solution can be found), the search continues and instead finds another solution `2,3` which also has a `best_waste = 0`. Why not terminate once an optimal solution is found instead of continuing to search?
https://github.com/bitcoin/bitcoin/issues/18257
https://github.com/bitcoin/bitcoin/pull/18262
969ee8549496108730d2c824d69d0782a43c3d7f
0856c1570679b31c0aa3eedcf2a13171364f0c15
2020-03-04T07:58:21Z
c++
2020-04-17T10:32:13Z
closed
bitcoin/bitcoin
https://github.com/bitcoin/bitcoin
18,132
["ci/test/05_before_script.sh", "contrib/devtools/previous_release.py", "contrib/devtools/previous_release.sh", "test/functional/feature_backwards_compatibility.py", "test/functional/mempool_compatibility.py", "test/functional/wallet_upgradewallet.py"]
contrib/devtools/previous_release.sh should be rewritten to python
Most of our test scripts are written in python. We don't have enough reviewers for bash scripts and they tend to be clumsy anyway. Especially when it comes to argument parsing. Thus, contrib/devtools/previous_release.sh should be rewritten in python #### Useful skills: Experience with Bash and Python #### Want to work on this issue? The purpose of the `good first issue` label is to highlight which issues are suitable for a new contributor without a deep understanding of the codebase. You do not need to request permission to start working on this. You are encouraged to comment on the issue if you are planning to work on it. This will help other contributors monitor which issues are actively being addressed and is also an effective way to request assistance if and when you need it. For guidance on contributing, please read [CONTRIBUTING.md](https://github.com/bitcoin/bitcoin/blob/master/CONTRIBUTING.md) before opening your pull request.
https://github.com/bitcoin/bitcoin/issues/18132
https://github.com/bitcoin/bitcoin/pull/19205
b763ae02a6601053156b3402c4409cc7c722b95d
ea595d39f7e782f53cd9403260c6c1d759d4a61a
2020-02-12T20:15:33Z
c++
2020-07-21T08:11:39Z
closed
bitcoin/bitcoin
https://github.com/bitcoin/bitcoin
18,111
["src/test/bswap_tests.cpp", "src/test/transaction_tests.cpp", "src/test/validation_flush_tests.cpp"]
Unit test validation_flush_tests fails on with recent libstdc++?
`validation_flush_tests/getcoinscachesizestate` fails on RISCV-64 on master: ``` Running 394 test cases... test/validation_flush_tests.cpp(99): error: in "validation_flush_tests/getcoinscachesizestate": check chainstate.GetCoinsCacheSizeState(tx_pool, MAX_COINS_CACHE_BYTES, 0) == CoinsCacheSizeState::OK has failed [1 != 0] *** 1 failure is detected in the test module "Bitcoin Core Test Suite" ``` Haven't investigated why, yet. Apart from the architecture it could also be some dependency version causing the problem (this is a fedora rawhide install with very new versions of everything including gcc and boost). Edit: see below, this is likely due to a newer `libstdc++`
https://github.com/bitcoin/bitcoin/issues/18111
https://github.com/bitcoin/bitcoin/pull/18181
36e507227ed6b7006227eabb13475177359cbc04
ab9de435880c9d77e4137b65050591ef2d14f809
2020-02-10T20:50:03Z
c++
2020-02-22T15:18:46Z
closed
bitcoin/bitcoin
https://github.com/bitcoin/bitcoin
18,090
["src/qt/walletframe.cpp"]
gui: Crash if shutdown during processNewTransaction
i.e call `generatetoaddress` and shutdown `bitcoin-qt`: ```bash * thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x45) frame #0: 0x0000000100268cae bitcoin-qt`WalletView::processNewTransaction(this=0x00000001280ce250, parent=0x00007ffeefbfcf78, start=3, (null)=3) at walletview.cpp:136:61 133 void WalletView::processNewTransaction(const QModelIndex& parent, int start, int /*end*/) 134 { 135 // Prevent balloon-spam when initial block download is in progress -> 136 if (!walletModel || !clientModel || clientModel->node().isInitialBlockDownload()) 137 return; 138 139 TransactionTableModel *ttm = walletModel->getTransactionTableModel(); Target 0: (bitcoin-qt) stopped. ``` ```bash * thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x45) * frame #0: 0x0000000100268c7d bitcoin-qt`WalletView::processNewTransaction(this=0x000000010df82250, parent=0x00007ffeefbfcf78, start=19, (null)=19) at walletview.cpp:139:50 frame #1: 0x000000010026c134 bitcoin-qt`QtPrivate::FunctorCall<QtPrivate::IndexesList<0, 1, 2>, QtPrivate::List<QModelIndex const&, int, int>, void, void (WalletView::*)(QModelIndex const&, int, int)>::call(f=f0 8b 26 00 01 00 00 00 00 00 00 00 00 00 00 00, o=0x000000010df82250, arg=0x00007ffeefbfcfb0)(QModelIndex const&, int, int), WalletView*, void**) at qobjectdefs_impl.h:152:13 frame #2: 0x000000010026c006 bitcoin-qt`void QtPrivate::FunctionPointer<void (WalletView::*)(QModelIndex const&, int, int)>::call<QtPrivate::List<QModelIndex const&, int, int>, void>(f=f0 8b 26 00 01 00 00 00 00 00 00 00 00 00 00 00, o=0x000000010df82250, arg=0x00007ffeefbfcfb0)(QModelIndex const&, int, int), WalletView*, void**) at qobjectdefs_impl.h:185:13 frame #3: 0x000000010026bec4 bitcoin-qt`QtPrivate::QSlotObject<void (WalletView::*)(QModelIndex const&, int, int), QtPrivate::List<QModelIndex const&, int, int>, void>::impl(which=1, this_=0x0000000127e5f2a0, r=0x000000010df82250, a=0x00007ffeefbfcfb0, ret=0x0000000000000000) at qobjectdefs_impl.h:414:17 frame #4: 0x0000000104e326e2 QtCore`___lldb_unnamed_symbol2576$$QtCore + 1138 frame #5: 0x0000000104db29c0 QtCore`QAbstractItemModel::endInsertRows() + 272 frame #6: 0x00000001001e375f bitcoin-qt`TransactionTablePriv::updateWallet(this=0x000000012af59850, wallet=0x000000012af15d50, hash=0x00007ffeefbfd498, status=0, showTransaction=true) at transactiontablemodel.cpp:147:29 frame #7: 0x00000001001e2a7b bitcoin-qt`TransactionTableModel::updateTransaction(this=0x000000012af59710, hash=0x000000010560c830, status=0, showTransaction=true) at transactiontablemodel.cpp:251:11 frame #8: 0x000000010027dcdd bitcoin-qt`TransactionTableModel::qt_static_metacall(_o=0x000000012af59710, _c=InvokeMetaMethod, _id=0, _a=0x00000001056202b0) at moc_transactiontablemodel.cpp:91:21 frame #9: 0x0000000104e2addd QtCore`QObject::event(QEvent*) + 957 frame #10: 0x0000000104082bcd QtWidgets`QApplicationPrivate::notify_helper(QObject*, QEvent*) + 269 frame #11: 0x0000000104084005 QtWidgets`QApplication::notify(QObject*, QEvent*) + 581 frame #12: 0x0000000104e00994 QtCore`QCoreApplication::notifyInternal2(QObject*, QEvent*) + 212 frame #13: 0x0000000104e01a43 QtCore`QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) + 691 ```
https://github.com/bitcoin/bitcoin/issues/18090
https://github.com/bitcoin/bitcoin/pull/18091
23fab1a3dfe6f308880197dbe2bd7ce70866f13c
2af3e16ca917acd85c2d4f709f6d486519d6af0d
2020-02-07T06:02:49Z
c++
2020-02-07T17:40:38Z
closed
bitcoin/bitcoin
https://github.com/bitcoin/bitcoin
18,080
["src/qt/splashscreen.cpp"]
gui: deprecated QCharRef usage in splashscreen
Noticed today while building [master](8a56f79d491271120abc3843c46e9dda44edd308). ```bash GUI: Using QCharRef with an index pointing outside the valid range of a QString. The corresponding behavior is deprecated, and will be changed in a future version of Qt. ``` From a quick look the issue is somewhere in [splashscreen.cpp](https://github.com/bitcoin/bitcoin/blob/master/src/qt/splashscreen.cpp). You should see the warning if you quit while the splashscreen is still displayed. Likely requires a recent version of Qt (I'm using 5.14.1). #### Want to work on this issue? The purpose of the `good first issue` label is to highlight which issues are suitable for a new contributor without a deep understanding of the codebase. You do not need to request permission to start working on this. You are encouraged to comment on the issue if you are planning to work on it. This will help other contributors monitor which issues are actively being addressed and is also an effective way to request assistance if and when you need it. For guidance on contributing, please read [CONTRIBUTING.md](https://github.com/bitcoin/bitcoin/blob/master/CONTRIBUTING.md) before opening your pull request.
https://github.com/bitcoin/bitcoin/issues/18080
https://github.com/bitcoin/bitcoin/pull/18101
23fab1a3dfe6f308880197dbe2bd7ce70866f13c
ac57859e53167f4ff3da467b616b0902c93701a9
2020-02-06T03:53:34Z
c++
2020-02-09T16:59:14Z
closed
bitcoin/bitcoin
https://github.com/bitcoin/bitcoin
18,068
["test/functional/feature_config_args.py", "test/functional/rpc_dumptxoutset.py"]
Followups from #16681
#16681 was merged, and there are a couple usage of `'regtest'` leftover in the functional tests. For guidance on contributing, please read [CONTRIBUTING.md](https://github.com/bitcoin/bitcoin/blob/master/CONTRIBUTING.md) before opening your pull request.
https://github.com/bitcoin/bitcoin/issues/18068
https://github.com/bitcoin/bitcoin/pull/18069
8625446b4d86880be9e218f3cd136de1e382101d
eca56f89293b74f11ca631ff2a0793e970e65841
2020-02-05T00:07:25Z
c++
2020-02-05T03:28:40Z
closed
bitcoin/bitcoin
https://github.com/bitcoin/bitcoin
18,046
["src/primitives/transaction.cpp"]
Some fuzzing crashes when running under ASan and/or UBSan
When running the fuzzers in `master` with ASan and UBSan enabled the crashes below will eventually be encountered. Ideally one should be able to run all fuzzers in `master` continuously with all sanitisers enabled without ever hitting any issues. Note that the presence of an issue in the list below does not necessarily imply a bug in the code under test: it could simply mean that the harness is fuzzing code that is not intended to be robust against random input. Thus avoiding these issues will require either: - a.) making the fuzzing harness avoid triggering code that is not meant to be robust to random input, or - b.) making the code under test more robust. Some of these will be easy to fix and could thus be good candidates for a "good first issue" :) | Fuzzer | Issue | Fix PR | | ------------- | ------------- | --- | | `blockundo_deserialize` | `undo.h:30:24: runtime error: signed integer overflow: 1972491776 * 2 cannot be represented in type 'int'` | – | | `coins_deserialize` | `coins.h:62:33: runtime error: signed integer overflow: 1969937248 * 2 cannot be represented in type 'int'` | – | | `parse_iso8601` | `util/time.cpp:101:67: runtime error: signed integer overflow: 2147482930 + 1900 cannot be represented in type 'int'` | Fixed by #18162 | | `parse_script` | `script/script.h:332:35: runtime error: negation of -9223372036854775808 cannot be represented in type 'int64_t' (aka 'long'); cast to an unsigned type to negate this value to itself` | Fixed by #18416 | | `psbt` | `prevector.h:453:19: runtime error: reference binding to misaligned address 0x7f5c1d552022 for type 'prevector<28, unsigned char, unsigned int, int>::size_type' (aka 'unsigned int'), which requires 4 byte alignment` | Fixed by #17708 | | `script` | `prevector.h:453:19: runtime error: reference binding to misaligned address 0x7f182c5a5a22 for type 'prevector<28, unsigned char, unsigned int, int>::size_type' (aka 'unsigned int'), which requires 4 byte alignment` | Fixed by #17708 | | `transaction` | `primitives/transaction.cpp:87:19: runtime error: signed integer overflow: 1095216725760 + 9223372032559808512 cannot be represented in type 'long'` | Fixed by #18383 | | `txundo_deserialize` | `undo.h:30:24: runtime error: signed integer overflow: 1960862720 * 2 cannot be represented in type 'int'` | – | To reproduce: ``` $ make distclean $ ./autogen.sh $ CC=clang CXX=clang++ ./configure --enable-fuzz \ --with-sanitizers=address,fuzzer,undefined $ make $ export UBSAN_OPTIONS="print_stacktrace=1:halt_on_error=1:report_error_type=1" $ xxd -p -r <<< "d10000b401018dd88dd7001b0a06" > crash-blockundo_deserialize $ src/test/fuzz/blockundo_deserialize crash-blockundo_deserialize undo.h:30:24: runtime error: signed integer overflow: 1972491776 * 2 cannot be represented in type 'int' #0 0x555b1634e7db in void TxInUndoSerializer::Serialize<CDataStream>(CDataStream&) const src/./undo.h:30:24 #1 0x555b1634da3a in void Serialize<CDataStream, TxInUndoSerializer>(CDataStream&, TxInUndoSerializer const&) src/./serialize.h:667:7 #2 0x555b1634da3a in void CTxUndo::Serialize<CDataStream>(CDataStream&) const src/./undo.h:81:13 #3 0x555b16348fc1 in void Serialize<CDataStream, CTxUndo>(CDataStream&, CTxUndo const&) src/./serialize.h:667:7 #4 0x555b16348fc1 in void Serialize_impl<CDataStream, CTxUndo, std::allocator<CTxUndo>, CTxUndo>(CDataStream&, std::vector<CTxUndo, std::allocator<CTxUndo> > const&, CTxUndo const&) src/./serialize.h:798:9 #5 0x555b16348b40 in void Serialize<CDataStream, CTxUndo, std::allocator<CTxUndo> >(CDataStream&, std::vector<CTxUndo, std::allocator<CTxUndo> > const&) src/./serialize.h:804:5 #6 0x555b16348b40 in void SerializeMany<CDataStream, std::vector<CTxUndo, std::allocator<CTxUndo> > >(CDataStream&, std::vector<CTxUndo, std::allocator<CTxUndo> > const&) src/./serialize.h:1029:5 #7 0x555b16348b40 in void SerReadWriteMany<CDataStream, std::vector<CTxUndo, std::allocator<CTxUndo> > >(CDataStream&, CSerActionSerialize, std::vector<CTxUndo, std::allocator<CTxUndo> > const&) src/./serialize.h:1048:5 #8 0x555b16348896 in void CBlockUndo::SerializationOp<CDataStream, CSerActionSerialize>(CDataStream&, CSerActionSerialize) src/./undo.h:110:9 #9 0x555b16348896 in void CBlockUndo::Serialize<CDataStream>(CDataStream&) const src/./undo.h:106:5 #10 0x555b16348896 in void Serialize<CDataStream, CBlockUndo>(CDataStream&, CBlockUndo const&) src/./serialize.h:667:7 #11 0x555b1634851f in CDataStream& CDataStream::operator<<<CBlockUndo>(CBlockUndo const&) src/./streams.h:452:9 #12 0x555b163377c5 in CDataStream (anonymous namespace)::Serialize<CBlockUndo>(CBlockUndo const&) src/test/fuzz/deserialize.cpp:49:8 #13 0x555b163334e0 in void (anonymous namespace)::DeserializeFromFuzzingInput<CBlockUndo>(std::vector<unsigned char, std::allocator<unsigned char> > const&, CBlockUndo&) src/test/fuzz/deserialize.cpp:77:5 #14 0x555b1633314b in test_one_input(std::vector<unsigned char, std::allocator<unsigned char> > const&) src/test/fuzz/deserialize.cpp:178:9 $ xxd -p -r <<< "f60a20008dd5d5ec400006" > crash-coins_deserialize $ src/test/fuzz/coins_deserialize crash-coins_deserialize coins.h:62:33: runtime error: signed integer overflow: 1969937248 * 2 cannot be represented in type 'int' #0 0x557d369a4be5 in void Coin::Serialize<CDataStream>(CDataStream&) const src/./coins.h:62:33 #1 0x557d369a45fb in void Serialize<CDataStream, Coin>(CDataStream&, Coin const&) src/./serialize.h:667:7 #2 0x557d369a45fb in CDataStream& CDataStream::operator<<<Coin>(Coin const&) src/./streams.h:452:9 #3 0x557d3699d325 in CDataStream (anonymous namespace)::Serialize<Coin>(Coin const&) src/test/fuzz/deserialize.cpp:49:8 #4 0x557d36998a60 in void (anonymous namespace)::DeserializeFromFuzzingInput<Coin>(std::vector<unsigned char, std::allocator<unsigned char> > const&, Coin&) src/test/fuzz/deserialize.cpp:77:5 #5 0x557d369986bd in test_one_input(std::vector<unsigned char, std::allocator<unsigned char> > const&) src/test/fuzz/deserialize.cpp:181:9 $ xxd -p -r <<< "7200393636e2f031" > crash-parse_iso8601 $ src/test/fuzz/parse_iso8601 crash-parse_iso8601 util/time.cpp:101:67: runtime error: signed integer overflow: 2147482930 + 1900 cannot be represented in type 'int' #0 0x562ccf9bd323 in FormatISO8601DateTime[abi:cxx11](long) src/util/time.cpp:101:67 #1 0x562ccf9ba5fb in test_one_input(std::vector<unsigned char, std::allocator<unsigned char> > const&) src/test/fuzz/parse_iso8601.cpp:21:42 $ xxd -p -r <<< "2d360932445550092d36093609092d393939393939393939393939393939393939360955" > crash-parse_script $ src/test/fuzz/parse_script crash-parse_script script/script.h:332:35: runtime error: negation of -9223372036854775808 cannot be represented in type 'int64_t' (aka 'long'); cast to an unsigned type to negate this value to itself #0 0x55e134173738 in CScriptNum::serialize(long const&) src/./script/script.h:332:35 #1 0x55e134172f40 in CScript::push_int64(long) src/./script/script.h:405:22 #2 0x55e13416984f in CScript::operator<<(long) src/./script/script.h:445:45 #3 0x55e13416984f in ParseScript(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) src/core_read.cpp:62:20 #4 0x55e134167b0b in test_one_input(std::vector<unsigned char, std::allocator<unsigned char> > const&) src/test/fuzz/parse_script.cpp:13:15 $ xxd -p -r <<< "70736274ff010085830303230309006d0000003c000000006f1a30ff0002b37700726b65721a1a0000000000000000000000000000000000000000000000280040009e2900000000000000000000000000000000000000040000000000000070736274ff01002e00000000000303030303030300000000e51a360000010303000000000000000000000000000000000101090000000000000000000000" > crash-psbt $ src/test/fuzz/psbt crash-psbt prevector.h:453:19: runtime error: reference binding to misaligned address 0x7f5c1d552022 for type 'prevector<28, unsigned char, unsigned int, int>::size_type' (aka 'unsigned int'), which requires 4 byte alignment 0x7f5c1d552022: note: pointer points here 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ #0 0x555e737c657e in prevector<28u, unsigned char, unsigned int, int>::swap(prevector<28u, unsigned char, unsigned int, int>&) src/./prevector.h:453:9 #1 0x555e737c61be in prevector<28u, unsigned char, unsigned int, int>::operator=(prevector<28u, unsigned char, unsigned int, int>&&) src/./prevector.h:273:9 #2 0x555e737c61be in CScript::operator=(CScript&&) src/./script/script.h:390:7 #3 0x555e7383a4e6 in ProduceSignature(SigningProvider const&, BaseSignatureCreator const&, CScript const&, SignatureData&) src/script/sign.cpp:245:23 #4 0x555e737e91a8 in SignPSBTInput(SigningProvider const&, PartiallySignedTransaction&, int, int, SignatureData*, bool) src/psbt.cpp:285:24 #5 0x555e73780ff5 in AnalyzePSBT(PartiallySignedTransaction) src/node/psbt.cpp:64:29 #6 0x555e73745694 in test_one_input(std::vector<unsigned char, std::allocator<unsigned char> > const&) src/test/fuzz/psbt.cpp:35:35 $ touch crash-script $ src/test/fuzz/script crash-script prevector.h:453:19: runtime error: reference binding to misaligned address 0x7f182c5a5a22 for type 'prevector<28, unsigned char, unsigned int, int>::size_type' (aka 'unsigned int'), which requires 4 byte alignment 0x7f182c5a5a22: note: pointer points here 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ^ #0 0x55867c4d0c5e in prevector<28u, unsigned char, unsigned int, int>::swap(prevector<28u, unsigned char, unsigned int, int>&) src/./prevector.h:453:9 #1 0x55867c4c989e in prevector<28u, unsigned char, unsigned int, int>::operator=(prevector<28u, unsigned char, unsigned int, int>&&) src/./prevector.h:273:9 #2 0x55867c4c989e in CScript::operator=(CScript&&) src/./script/script.h:390:7 #3 0x55867c5564c6 in ProduceSignature(SigningProvider const&, BaseSignatureCreator const&, CScript const&, SignatureData&) src/script/sign.cpp:245:23 #4 0x55867c5604f9 in IsSolvable(SigningProvider const&, CScript const&) src/script/sign.cpp:444:9 #5 0x55867c4b6647 in test_one_input(std::vector<unsigned char, std::allocator<unsigned char> > const&) src/test/fuzz/script.cpp:48:11 $ xxd -p -r <<< "fb67656c70000000000200ff0000ff0000000000000000ffffff7f0000000000" > crash-transaction $ src/test/fuzz/transaction crash-transaction primitives/transaction.cpp:87:19: runtime error: signed integer overflow: 1095216725760 + 9223372032559808512 cannot be represented in type 'long' #0 0x5574b725f6c1 in CTransaction::GetValueOut() const src/primitives/transaction.cpp:87:19 #1 0x5574b611e5bb in test_one_input(std::vector<unsigned char, std::allocator<unsigned char> > const&) src/test/fuzz/transaction.cpp:71:18 $ xxd -p -r <<< "d1000000018dcd828f01000006" > crash-txundo_deserialize $ src/test/fuzz/txundo_deserialize crash-txundo_deserialize undo.h:30:24: runtime error: signed integer overflow: 1960862720 * 2 cannot be represented in type 'int' #0 0x55e6eb9ae8bb in void TxInUndoSerializer::Serialize<CDataStream>(CDataStream&) const src/./undo.h:30:24 #1 0x55e6eb9a99ba in void Serialize<CDataStream, TxInUndoSerializer>(CDataStream&, TxInUndoSerializer const&) src/./serialize.h:667:7 #2 0x55e6eb9a99ba in void CTxUndo::Serialize<CDataStream>(CDataStream&) const src/./undo.h:81:13 #3 0x55e6eb9a93eb in void Serialize<CDataStream, CTxUndo>(CDataStream&, CTxUndo const&) src/./serialize.h:667:7 #4 0x55e6eb9a93eb in CDataStream& CDataStream::operator<<<CTxUndo>(CTxUndo const&) src/./streams.h:452:9 #5 0x55e6eb99c3d5 in CDataStream (anonymous namespace)::Serialize<CTxUndo>(CTxUndo const&) src/test/fuzz/deserialize.cpp:49:8 #6 0x55e6eb9987f0 in void (anonymous namespace)::DeserializeFromFuzzingInput<CTxUndo>(std::vector<unsigned char, std::allocator<unsigned char> > const&, CTxUndo&) src/test/fuzz/deserialize.cpp:77:5 #7 0x55e6eb99845b in test_one_input(std::vector<unsigned char, std::allocator<unsigned char> > const&) src/test/fuzz/deserialize.cpp:175:9 ```
https://github.com/bitcoin/bitcoin/issues/18046
https://github.com/bitcoin/bitcoin/pull/18383
0d71395848bbc2941862e7a0644f47212ec02e87
dce6f3b29b4197b8eea91f5919d56eb222ea8959
2020-01-31T21:56:37Z
c++
2020-04-02T22:50:29Z
closed
bitcoin/bitcoin
https://github.com/bitcoin/bitcoin
18,020
["build_msvc/test_bitcoin/test_bitcoin.vcxproj"]
appveyor ci fails because asmap.raw.h is missing
Not sure how to fix this, so leaving a bug report C:\projects\bitcoin\src\test\addrman_tests.cpp(9,10): fatal error C1083: Cannot open include file: 'test/data/asmap.raw.h': No such file or directory [C:\projects\bitcoin\build_msvc\test_bitcoin\test_bitcoin.vcxproj]
https://github.com/bitcoin/bitcoin/issues/18020
https://github.com/bitcoin/bitcoin/pull/18022
c1607b5df4877e5f799d861784cb91dba3ea5887
fa1a46e7f4631a001bc28d415f27aae5ee324ccc
2020-01-29T19:16:47Z
c++
2020-01-29T21:57:41Z
closed
bitcoin/bitcoin
https://github.com/bitcoin/bitcoin
18,016
[".travis.yml", "ci/test/00_setup_env_s390x_host.sh"]
travis: s390x ci build fails on travis because disk is too small
Reported upstream a couple of months ago: https://travis-ci.community/t/no-space-left-on-device-for-system-z/5954
https://github.com/bitcoin/bitcoin/issues/18016
https://github.com/bitcoin/bitcoin/pull/18905
56611b0e240529d88ad5fa41e8da1bb1c2a570ed
f54753293fe7355e4280944d766f22054b560ba1
2020-01-29T00:40:38Z
c++
2020-05-07T14:26:59Z
closed
bitcoin/bitcoin
https://github.com/bitcoin/bitcoin
18,015
["src/test/transaction_tests.cpp"]
Gitian-built unit tests fail on windows
Current master: ``` test_bitcoin.exe Running 389 test cases... test/script_p2sh_tests.cpp(200): error: in "script_p2sh_tests/set": txTo[1].IsStandard test/script_p2sh_tests.cpp(200): error: in "script_p2sh_tests/set": txTo[2].IsStandard test/script_p2sh_tests.cpp(200): error: in "script_p2sh_tests/set": txTo[3].IsStandard ``` https://github.com/bitcoin/bitcoin/blame/master/src/test/script_p2sh_tests.cpp#L200
https://github.com/bitcoin/bitcoin/issues/18015
https://github.com/bitcoin/bitcoin/pull/18018
638239de7502eed57f3b800d9b488de85f00d391
1b96a3cd1ebe725896f59614903184289fe62cf8
2020-01-28T20:05:57Z
c++
2020-01-30T00:41:24Z
closed
bitcoin/bitcoin
https://github.com/bitcoin/bitcoin
17,987
["src/Makefile.test.include", "src/test/main.cpp", "test/sanitizer_suppressions/tsan"]
Unit test validation_block_tests intermittently writes garbage to stdout
Current master, Ubuntu: Repeatedly running `validation_block_tests/processnewblock_signals_ordering`, a test that creates multiple threads to test the validation interface, sporadically writes weird messages to stdout (with the test passing). Running `for i in {1..30}; do ./src/test/test_bitcoin --run_test=validation_block_tests/processnewblock_signals_ordering; done` usually gives me multiple occurrences of this. It sometimes writes code fragments such as "pindexNew->GetBlockHash()", "m_expected_tip", "==", in other runs single log entries. Can someone reproduce this? Obviously this is just a small nuisance in itself, still reporting this in case the root cause might be interesting.
https://github.com/bitcoin/bitcoin/issues/17987
https://github.com/bitcoin/bitcoin/pull/18472
d52ba21dfff99173abb927bc964ce7ceb711d789
72ef366564394bad798484ba935c96b68579043f
2020-01-22T23:55:28Z
c++
2020-03-31T19:39:15Z
closed
bitcoin/bitcoin
https://github.com/bitcoin/bitcoin
17,986
["src/Makefile.test.include", "src/test/fuzz/signature_checker.cpp"]
fuzz script execution with dummy signature checker
``` [13:37] <sipa> i haven't followed up on the fuzzing work that's been done to the codebase... but i wonder has anyone considered using a dummy signature checker, and fuzzing script execution with it? [13:50] <wumpus> not sure either, would be best to ask practicalswift [14:02] <phantomcircuit> sipa, i dont think anybody has done that [14:02] <sipa> maybe i'll spend some time looking into how fuzzing works :) <snip> [14:31] <phantomcircuit> sipa, is it easy to replace the signature checker for a script instance? [14:31] <phantomcircuit> iirc i looked into it but realized i'd need to much with the internals of the scripting stuff more than i wanted to [14:31] <sipa> phantomcircuit: the script interpreter literally takes in an object that abstracts that out [14:32] <sipa> you can pass one in that always returns true [14:32] <sipa> no code changes to the script interpreter itself needed <snip> [14:37] <phantomcircuit> sipa, neat, then it should be pretty easy to do [14:39] <sipa> see the BaseSignatureChecker passed to EvalScript/VerifyScript ```
https://github.com/bitcoin/bitcoin/issues/17986
https://github.com/bitcoin/bitcoin/pull/18155
dbb067da389d457e73c6ecbf6389baa3ab082b46
e83a1de4c03f305f4a89febc648168003a6e7987
2020-01-22T21:58:43Z
c++
2020-03-18T19:48:27Z
closed
bitcoin/bitcoin
https://github.com/bitcoin/bitcoin
17,976
["src/test/cuckoocache_tests.cpp"]
Appveyor ci fails again
Happens on all recent builds. Seemingly unrelated to any code changes. Last pass: https://ci.appveyor.com/project/DrahtBot/bitcoin/builds/30240770 First fail: https://ci.appveyor.com/project/DrahtBot/bitcoin/builds/30241275 First fail on master: https://ci.appveyor.com/project/DrahtBot/bitcoin/builds/30241926 The first fail happened on the 0.19 branch. Is the appveyor cache shared across branches? Otherwise it could be a msvc update or another dependency that broke it. If so, I wish we figure out a way to freeze the dependencies and compileres in some way. ``` C:\projects\bitcoin\src\test\cuckoocache_tests.cpp(330,10): error C2976: 'std::deque': too few template arguments [C:\projects\bitcoin\build_msvc\test_bitcoin\test_bitcoin.vcxproj] C:\projects\bitcoin\src\test\cuckoocache_tests.cpp(330,1): error C2079: 'last_few' uses undefined class 'std::deque' [C:\projects\bitcoin\build_msvc\test_bitcoin\test_bitcoin.vcxproj] C:\projects\bitcoin\src\test\cuckoocache_tests.cpp(341,1): error C2672: 'begin': no matching overloaded function found [C:\projects\bitcoin\build_msvc\test_bitcoin\test_bitcoin.vcxproj] C:\projects\bitcoin\src\test\cuckoocache_tests.cpp(341,1): error C2893: Failed to specialize function template 'unknown-type std::begin(_Container &)' [C:\projects\bitcoin\build_msvc\test_bitcoin\test_bitcoin.vcxproj] C:\projects\bitcoin\src\test\cuckoocache_tests.cpp(341,1): error C2784: 'const _Elem *std::begin(std::initializer_list<_Elem>) noexcept': could not deduce template argument for 'std::initializer_list<_Elem>' from 'int' [C:\projects\bitcoin\build_msvc\test_bitcoin\test_bitcoin.vcxproj] C:\projects\bitcoin\src\test\cuckoocache_tests.cpp(341,1): error C2672: 'end': no matching overloaded function found [C:\projects\bitcoin\build_msvc\test_bitcoin\test_bitcoin.vcxproj] C:\projects\bitcoin\src\test\cuckoocache_tests.cpp(341,1): error C2893: Failed to specialize function template 'unknown-type std::end(_Container &)' [C:\projects\bitcoin\build_msvc\test_bitcoin\test_bitcoin.vcxproj] C:\projects\bitcoin\src\test\cuckoocache_tests.cpp(341,1): error C2784: 'const _Elem *std::end(std::initializer_list<_Elem>) noexcept': could not deduce template argument for 'std::initializer_list<_Elem>' from 'int' [C:\projects\bitcoin\build_msvc\test_bitcoin\test_bitcoin.vcxproj] C:\projects\bitcoin\src\test\cuckoocache_tests.cpp(341,1): error C3536: '<begin>$L0': cannot be used before it is initialized [C:\projects\bitcoin\build_msvc\test_bitcoin\test_bitcoin.vcxproj] C:\projects\bitcoin\src\test\cuckoocache_tests.cpp(341,1): error C3536: '<end>$L0': cannot be used before it is initialized [C:\projects\bitcoin\build_msvc\test_bitcoin\test_bitcoin.vcxproj] C:\projects\bitcoin\src\test\cuckoocache_tests.cpp(341,1): error C2100: illegal indirection [C:\projects\bitcoin\build_msvc\test_bitcoin\test_bitcoin.vcxproj]
https://github.com/bitcoin/bitcoin/issues/17976
https://github.com/bitcoin/bitcoin/pull/17980
631df3ee87ec93e1fc748715671cdb5cff7308e6
a5a2654bbc43b5c208418872e5d4c0acbadda5de
2020-01-21T17:20:45Z
c++
2020-01-22T08:13:53Z
closed
bitcoin/bitcoin
https://github.com/bitcoin/bitcoin
17,967
["src/qt/modaloverlay.cpp", "src/qt/modaloverlay.h"]
qt: Shadow ribbon at the bottom of QFrame
A semi-opaque ribbon is observed in the main window: ![DeepinScreenshot_bitcoin-qt_20200119212040](https://user-images.githubusercontent.com/32963518/72686984-752bce80-3b02-11ea-8e54-a4d0e6448c1f.png) ![DeepinScreenshot_bitcoin-qt_20200119212253](https://user-images.githubusercontent.com/32963518/72686986-7a891900-3b02-11ea-87b8-cb2a7ff5b791.png) Tab switching does not remove it. Window moving does not remove it. It vanishes after window resizing. **To reproduce** Run with `-regtest`, generate some blocks (200 in my case), then quit. Remove `rev00000.dat` file to trigger an error. Run with `-regtest` and in the dialog "Do you want to rebuild the block database now?" click "OK". **System information** Linux Mint 19.3 + Cinnamon 4.4.8 Both versions affected: - 0.19.0.1 (gitian) - master + system Qt 5.9.7
https://github.com/bitcoin/bitcoin/issues/17967
https://github.com/bitcoin/bitcoin/pull/17968
0d5c18204b73ccb0d7c07f90c52de31edc25e28e
beb3844c45c57cdc0ae715c8fe22e1c310d82662
2020-01-19T19:39:09Z
c++
2020-05-29T08:30:36Z
closed
bitcoin/bitcoin
https://github.com/bitcoin/bitcoin
17,927
["src/qt/bitcoingui.cpp"]
gui: HD icon is displayed when no wallet is loaded
Compile master, and run with `src/qt/bitcoin-qt -regtest -nowallet`. As expected, no icon is displayed. Load and unload a wallet. The `HD` icon remains. On startup: ![on_startup](https://user-images.githubusercontent.com/863730/72410834-711b4c00-37a4-11ea-9a10-bfcf3db7ce68.png) After a wallet load and unload: ![after_load_unload](https://user-images.githubusercontent.com/863730/72410838-737da600-37a4-11ea-8854-dd13301c0135.png)
https://github.com/bitcoin/bitcoin/issues/17927
https://github.com/bitcoin/bitcoin/pull/17935
ac61ec9da6793f00b29ba11f784b9b1c3ae662e9
486f51099ff4e68b67c5bb7ea428c56f3ea1bd55
2020-01-15T06:37:28Z
c++
2020-01-15T22:13:16Z
closed
bitcoin/bitcoin
https://github.com/bitcoin/bitcoin
17,914
["doc/fuzzing.md"]
docs/fuzzing.md: mention that afl-clang(++) may be needed for MacOS builds
When fuzzing on my macOS Mojave laptop, I was unable to instrument the binaries with the command mentioned in the docs: ` ./configure --disable-ccache --disable-shared --enable-tests --enable-fuzz CC=${AFLPATH}/afl-gcc CXX=${AFLPATH}/afl-gcc++ ` This resulted in the following failure: ``` [-] On Apple systems, 'gcc' is usually just a wrapper for clang. Please use the 'afl-clang' utility instead of 'afl-gcc'. If you really have GCC installed, set AFL_CC or AFL_CXX to specify the correct path to that compiler. [-] PROGRAM ABORT : AFL_CC or AFL_CXX required on MacOS X Location : edit_params(), afl-gcc.c:159 ``` When I replaced afl-gcc with afl-clang and afl-g++ with afl-clang++, the binaries were properly instrumented. I made an issue instead of a PR as I wasn't sure whether others had run into this problem or if this was specific to my machine. If this is reproducible on other Macs, then this should be documented in `fuzzing.md`.
https://github.com/bitcoin/bitcoin/issues/17914
https://github.com/bitcoin/bitcoin/pull/17942
e7f84503571c171a7e6728cd2d77dd4103bd7a6f
b6c3e84e87055be311347d7b636d68a6a828f563
2020-01-13T01:21:06Z
c++
2020-01-28T23:46:21Z
closed
bitcoin/bitcoin
https://github.com/bitcoin/bitcoin
17,911
["src/qt/walletview.h"]
segfault from importmulti
Importing a 1-of-2 multisig p2sh address into 0.19.0.1 testnet, the following script dies with a segfault: ``` #!/bin/bash echo running createwallet ./bitcoin-0.19.0.1/bin/bitcoin-cli -testnet createwallet "whynokeys" #sleep 4 echo running importprivkey 1 ./bitcoin-0.19.0.1/bin/bitcoin-cli -testnet -rpcwallet=whynokeys importprivkey "cQkx6d2rpRJgrsAUT6sfctTbxSPD1CaTQ5Q6XMQojjZXK1ntjCvo" "addr1" false #sleep 4 echo running importprivkey 2 ./bitcoin-0.19.0.1/bin/bitcoin-cli -testnet -rpcwallet=whynokeys importprivkey "cPaQ8eEdhYbtSLX6t86eoWePqZcKB7ibAqH8zhqnA936k8ML8F1H" "addr2" false #sleep 4 echo running importmulti ./bitcoin-0.19.0.1/bin/bitcoin-cli -testnet -rpcwallet=whynokeys importmulti \ '[ { "scriptPubKey": { "address": "2NBeG2myyAwSUCv1L21kTHAA3SdMELxdspi" }, "timestamp":1578787441, "redeemscript":"512103b7e7e3dacb0ad6f1e2bee28a7a5e8842152a8232f36be55bba66243aee77b95c21039dd05437b699bf98ea32ed3217d0aeb5a5a5fd76a343bebeec6e56968aa9bf0d52ae" }]' #sleep 4 echo running listunspent ./bitcoin-0.19.0.1/bin/bitcoin-cli -testnet -rpcwallet=whynokeys listunspent echo all done ``` Results: ``` user@host:~$ ./badimport.sh running createwallet { "name": "whynokeys", "warning": "" } running importprivkey 1 running importprivkey 2 running importmulti error: Could not connect to the server 127.0.0.1:18332 (error code 1 - "EOF reached") Make sure the bitcoind server is running and that you are connecting to the correct RPC port. running listunspent error: Could not connect to the server 127.0.0.1:18332 Make sure the bitcoind server is running and that you are connecting to the correct RPC port. all done [1]+ Segmentation fault ./bitcoin-0.19.0.1/bin/bitcoin-qt -server ``` Though sometimes the importmulti completes and the segfault doesn't occur until the listunspent. If you uncomment all the `sleep 4` lines, this works every time without segfault, however the importmulti gives a bogus warning: ``` running createwallet { "name": "whynokeys", "warning": "" } running importprivkey 1 running importprivkey 2 running importmulti [ { "success": true, "warnings": [ "Some private keys are missing, outputs will be considered watchonly. If this is intentional, specify the watchonly flag." ] } ] running listunspent [ { "txid": "d322f58c03fab2526d9cd32baa3ab5e1719a6841a59b92494aa58d2fd2447be1", "vout": 1, "address": "2NBeG2myyAwSUCv1L21kTHAA3SdMELxdspi", "label": "", "redeemScript": "512103b7e7e3dacb0ad6f1e2bee28a7a5e8842152a8232f36be55bba66243aee77b95c21039dd05437b699bf98ea32ed3217d0aeb5a5a5fd76a343bebeec6e56968aa9bf0d52ae", "scriptPubKey": "a914c9cd895fba08d0cfb13510fd8a4c6be8ad70bd6c87", "amount": 0.02100000, "confirmations": 80, "spendable": true, "solvable": true, "desc": "sh(multi(1,[c9d3ec21]03b7e7e3dacb0ad6f1e2bee28a7a5e8842152a8232f36be55bba66243aee77b95c,[5e88ca09]039dd05437b699bf98ea32ed3217d0aeb5a5a5fd76a343bebeec6e56968aa9bf0d))#z2pgdmn0", "safe": true } ] all done ``` I doublechecked that the two privkeys imported do match the pubkeys in the redeem script. Also notice that listunspent claims they are spendable and solvable, as expected. Therefore the warning about missing private keys is bogus. **Expected behavior** * No segfault * No warning from importmulti **Actual behavior** * Segfault * (after adding delays to script) bogus warning from importmulti **To reproduce** See above script. Segfault is not 100% reliable but probably 90%. The bogus warning is 100% reproducible. **System information** Running Bitcoin Core 0.19.0.1 on Whonix 14. First noticed on my own build of 0.19.0.1, also reproduced on official download of bitcoin-0.19.0.1-x86_64-linux-gnu.tar.gz. Debug log from (successful, non-segfaulting) importmulti: ``` 2020-01-12T04:24:07Z Using BerkeleyDB version Berkeley DB 4.8.30: (April 9, 2010) 2020-01-12T04:24:07Z Using wallet /home/user/.bitcoin/testnet3/whynokeys 2020-01-12T04:24:07Z BerkeleyEnvironment::Open: LogDir=/home/user/.bitcoin/testnet3/whynokeys/database ErrorFile= /home/user/.bitcoin/testnet3/whynokeys/db.log 2020-01-12T04:24:07Z init message: Loading wallet... 2020-01-12T04:24:07Z BerkeleyEnvironment::Open: LogDir=/home/user/.bitcoin/testnet3/whynokeys/database ErrorFile=/home/user/.bitcoin/testnet3/whynokeys/db.log 2020-01-12T04:24:07Z [whynokeys] Wallet File Version = 10500 2020-01-12T04:24:07Z [whynokeys] Keys: 0 plaintext, 0 encrypted, 0 w/ metadata, 0 total. Unknown wallet records: 0 2020-01-12T04:24:07Z [whynokeys] Performing wallet upgrade to 169900 2020-01-12T04:24:08Z [whynokeys] keypool added 2000 keys (1000 internal), size=2000 (1000 internal) 2020-01-12T04:24:08Z [whynokeys] Wallet completed loading in 1476ms 2020-01-12T04:24:08Z [whynokeys] setKeyPool.size() = 2000 2020-01-12T04:24:08Z [whynokeys] mapWallet.size() = 0 2020-01-12T04:24:08Z [whynokeys] mapAddressBook.size() = 0 2020-01-12T04:24:08Z New outbound peer connected: version: 70015, blocks=1659728, peer=7 (full-relay) 2020-01-12T04:24:09Z New outbound peer connected: version: 70015, blocks=1659728, peer=8 (full-relay) 2020-01-12T04:24:09Z P2P peers available. Skipped DNS seeding. 2020-01-12T04:24:09Z dnsseed thread exit 2020-01-12T04:24:12Z [whynokeys] Already have script 0014c9d3ec21d7a7667dd8317255d9b604ca0a3b73d5, skipping 2020-01-12T04:24:16Z [whynokeys] Already have script 00145e88ca0914a704056bc79b25a958d2d543900ef2, skipping 2020-01-12T04:24:20Z [whynokeys] RescanFromTime: Rescanning last 140 blocks 2020-01-12T04:24:20Z [whynokeys] Rescan started from block 00000000000007d256a92bfb67e59ecda20fc5728ce36f7404a2bc7c34853378... 2020-01-12T04:24:20Z [whynokeys] AddToWallet d322f58c03fab2526d9cd32baa3ab5e1719a6841a59b92494aa58d2fd2447be1 new 2020-01-12T04:24:20Z [whynokeys] Rescan completed in 32ms ```
https://github.com/bitcoin/bitcoin/issues/17911
https://github.com/bitcoin/bitcoin/pull/18062
651e34388832149402fea0d26f3dc13bbe197f5a
acf8abc7f3cf7efa418a46f9f69f23f1a5035582
2020-01-12T04:36:36Z
c++
2020-02-03T20:05:04Z
closed
bitcoin/bitcoin
https://github.com/bitcoin/bitcoin
17,890
["src/validation.cpp"]
Non-latest rev files are sometimes re-opened but never re-flushed
The code currently assumes that once a block file is 'left', it and its corresponding rev file can be flushed, and won't be written to any further. https://github.com/bitcoin/bitcoin/blob/e8e79958a7b2a0bf1b02adcce9f4d811eac37dfc/src/validation.cpp#L1742-L1743 (Flushing here additionally means to get rid of pre-allocated unused space.) This is the case for the bl(oc)k files, but it turns out to not be the case for the rev files. During an IBD up to ~200k blocks, the following excerpt (one of several) was encountered (grepping out irrelevancy): ``` [...] 2020-01-07T14:19:09Z Pre-allocating up to position 0x7000000 in blk00013.dat 2020-01-07T14:19:13Z Pre-allocating up to position 0x8000000 in blk00013.dat 2020-01-07T14:19:14Z Pre-allocating up to position 0xf00000 in rev00013.dat 2020-01-07T14:19:16Z Leaving block file 13: CBlockFileInfo(blocks=1099, size=134068483, heights=183531...185655, time=2012-06-08...2012-06-22) 2020-01-07T14:19:16Z Pre-allocating up to position 0x1000000 in blk00014.dat 2020-01-07T14:19:17Z Pre-allocating up to position 0x100000 in rev00014.dat 2020-01-07T14:19:20Z Pre-allocating up to position 0x1000000 in rev00013.dat 2020-01-07T14:19:20Z Pre-allocating up to position 0x2000000 in blk00014.dat 2020-01-07T14:19:24Z Pre-allocating up to position 0x1100000 in rev00013.dat 2020-01-07T14:19:26Z Pre-allocating up to position 0x3000000 in blk00014.dat 2020-01-07T14:19:27Z Pre-allocating up to position 0x1200000 in rev00013.dat 2020-01-07T14:19:30Z Pre-allocating up to position 0x200000 in rev00014.dat 2020-01-07T14:19:33Z Pre-allocating up to position 0x300000 in rev00014.dat 2020-01-07T14:19:35Z Pre-allocating up to position 0x400000 in rev00014.dat 2020-01-07T14:19:37Z Pre-allocating up to position 0x500000 in rev00014.dat 2020-01-07T14:19:39Z Pre-allocating up to position 0x600000 in rev00014.dat 2020-01-07T14:19:42Z Pre-allocating up to position 0x700000 in rev00014.dat 2020-01-07T14:19:43Z Pre-allocating up to position 0x4000000 in blk00014.dat 2020-01-07T14:19:45Z Pre-allocating up to position 0x800000 in rev00014.dat 2020-01-07T14:19:49Z Pre-allocating up to position 0x900000 in rev00014.dat [...] ``` But the only time we flush (and truncate the files to their correct size) is when we leave a block, and we already left block 13 here, so the rev files above end up with pre-allocated space that is never used. This is related to #17827. This seems to repeat itself for every file that ended up larger than expected in https://github.com/bitcoin/bitcoin/pull/17887#issuecomment-571591432. (Note: #17887 is not a fix for this issue. #17887 makes the impact much smaller by fixing a separate blow-up bug, but it does not address re-flushing re-opened rev files.)
https://github.com/bitcoin/bitcoin/issues/17890
https://github.com/bitcoin/bitcoin/pull/17994
b46fb5cb1058daaf0075b17f329163b8397caeec
011fe009f9eeeb71ab958ab53df716438871d26e
2020-01-07T15:41:46Z
c++
2020-06-04T14:39:06Z
closed
bitcoin/bitcoin
https://github.com/bitcoin/bitcoin
17,867
["src/wallet/rpc/backup.cpp", "test/functional/wallet_importmulti.py"]
importmulti does not allow watchonly imports while wallet is locked
This differs from behaviour of `importaddress` where it works. ``` $ bitcoin-cli importaddress "<address>" "<label>" false ``` vs ``` $ bitcoin-cli importmulti '[{ "scriptPubKey": { "address": "<address>" }, "timestamp":0, "label": "<label>", "watchonly": true }]' '{ "rescan": false }' error code: -13 error message: Error: Please enter the wallet passphrase with walletpassphrase first. ```
https://github.com/bitcoin/bitcoin/issues/17867
https://github.com/bitcoin/bitcoin/pull/26116
5b6f0f31fa6ce85db3fb7f9823b1bbb06161ae32
fc4017552c980ec9e95de677ea8166702351b79d
2020-01-04T07:57:01Z
c++
2022-09-20T16:00:02Z
closed
bitcoin/bitcoin
https://github.com/bitcoin/bitcoin
17,862
["src/init.cpp", "src/validation.cpp", "src/validation.h", "test/functional/p2p_segwit.py"]
Remove RewindBlockIndex logic
`RewindBlockIndex` was made to allow nodes upgrading to new consensus rules post-segwit fork to download new consensus data (i.e witnesses) without having to go through a whole IBD. It has been pointed than now really few pre-segwit nodes care to upgrade and that this logic may be irrelevant. See https://github.com/bitcoin/bitcoin/pull/17737#discussion_r358514335 in review of #17737 for more context pointers.
https://github.com/bitcoin/bitcoin/issues/17862
https://github.com/bitcoin/bitcoin/pull/21009
f8f55522c4697b77b1f739a2ed0c483396d62154
19a56d1519fb493c3e1bd5cad55360b6b80fa52b
2020-01-03T22:53:08Z
c++
2021-04-27T08:14:52Z
closed
bitcoin/bitcoin
https://github.com/bitcoin/bitcoin
17,848
["ci/test/04_install.sh"]
travis: macos runs on python2.7
Bitcoin Core requires python 3.5 at least. However, due to travis upsteam changes in the image, the installation of python3 no longer succeeds with brew. See e.g. https://travis-ci.org/bitcoin/bitcoin/jobs/631373413#L252 This should be fixed somehow. Relevant copy of the log: ``` ==> Upgrading python3 ==> Downloading https://homebrew.bintray.com/bottles/python-3.7.6_1.mojave.bottl ==> Downloading from https://akamai.bintray.com/64/643d627c2b4fc03a3286c397d2992 ######################################################################## 100.0% ==> Pouring python-3.7.6_1.mojave.bottle.tar.gz Error: The `brew link` step did not complete successfully The formula built, but is not symlinked into /usr/local Could not symlink Frameworks/Python.framework/Headers Target /usr/local/Frameworks/Python.framework/Headers is a symlink belonging to python@2. You can unlink it: brew unlink python@2 To force the link and overwrite all conflicting files: brew link --overwrite python To list all files that would be deleted: brew link --overwrite --dry-run python Possible conflicting files are: /usr/local/Frameworks/Python.framework/Headers -> /usr/local/Cellar/python@2/2.7.17/Frameworks/Python.framework/Headers /usr/local/Frameworks/Python.framework/Python -> /usr/local/Cellar/python@2/2.7.17/Frameworks/Python.framework/Python /usr/local/Frameworks/Python.framework/Resources -> /usr/local/Cellar/python@2/2.7.17/Frameworks/Python.framework/Resources /usr/local/Frameworks/Python.framework/Versions/Current -> /usr/local/Cellar/python@2/2.7.17/Frameworks/Python.framework/Versions/Current ==> /usr/local/Cellar/python/3.7.6_1/bin/python3 -s setup.py --no-user-cfg insta ==> /usr/local/Cellar/python/3.7.6_1/bin/python3 -s setup.py --no-user-cfg insta ==> /usr/local/Cellar/python/3.7.6_1/bin/python3 -s setup.py --no-user-cfg insta ==> Caveats Python has been installed as /usr/local/bin/python3 Unversioned symlinks `python`, `python-config`, `pip` etc. pointing to `python3`, `python3-config`, `pip3` etc., respectively, have been installed into /usr/local/opt/python/libexec/bin If you need Homebrew's Python 2.7 run brew install python@2 You can install Python packages with pip3 install <package> They will install into the site-package directory /usr/local/lib/python3.7/site-packages See: https://docs.brew.sh/Homebrew-and-Python ==> Summary 🍺 /usr/local/Cellar/python/3.7.6_1: 3,977 files, 60.8MB Removing: /usr/local/Cellar/python/3.7.5... (4,049 files, 61.9MB) Removing: /Users/travis/Library/Caches/Homebrew/python--3.7.5.mojave.bottle.tar.gz... (14.8MB)
https://github.com/bitcoin/bitcoin/issues/17848
https://github.com/bitcoin/bitcoin/pull/17849
0655c7a94cc9bf54d43eceed805e83f1b59e2409
87744b16b02cb9e4f6e97509facf6cc781e60b98
2020-01-02T14:33:50Z
c++
2020-01-02T16:08:10Z
closed
bitcoin/bitcoin
https://github.com/bitcoin/bitcoin
17,834
["doc/developer-notes.md"]
Document how to run bitcoin unittests + functional tests with sanitizers
A small guide from ground up on how to run sanitizers(asan/ubsan/msan) on core would be awesome :) @practicalswift ;)
https://github.com/bitcoin/bitcoin/issues/17834
https://github.com/bitcoin/bitcoin/pull/27154
6758bd7de75d65d08f9f588378b92a56cc79a49e
be2e748f378fc9ed40593a723dd18f2528705956
2019-12-30T10:49:34Z
c++
2023-02-24T13:58:04Z
closed
bitcoin/bitcoin
https://github.com/bitcoin/bitcoin
17,827
["src/util/system.cpp"]
Blocks directory on macOS uses more disk space than expected
It seems the Initial Block Download (IBD) on macOS Catalina uses a lot more disk space than expected, and will result in an unsuccesful download even when 480 GB of free disk space is available at the beginning. **Expected behavior** That the Initial Block Download finishes after using _about_ 284 GB of disk space, as indicated by the Welcome window. ![ibd-480-GB-available-at-least-284-GB-required](https://user-images.githubusercontent.com/20860124/71561974-754a2880-2a86-11ea-9887-9b0d19106498.png) **Actual behavior** When the download reaches 52% completion, over 284 GB of disk space has already been consumed. If the download is left to run, the machine will run out of disk space and Bitcoin Core will stop/quit before completing the download. Looking a bit into the Bitcoin directory and what could be causing it, the files prefixed _rev_ in the _blocks_ folder are a lot larger than they are when compared to a previous blockchain downloaded on Linux. Comparing the rev*.dat files with a previous successful IBD on Linux (below mounted with ext4fuse), the rev files use at most 23M, and the total is 32G: ``` blocks # pwd /Users/erik/linux-ext4/bitcoin/.bitcoin/blocks blocks # du -ch rev*.dat | sort -n 6.0M rev01866.dat 12M rev00311.dat 12M rev00328.dat 13M rev00314.dat 14M rev00295.dat 14M rev00309.dat ... 21M rev01206.dat 21M rev01291.dat 23M rev01036.dat 32G total ``` On Mac, the rev files will be significantly larger than 23M. You can see that the files can get as large as 184M, and in this case where 22.8% of the blockchain had been downloaded, we were already using 48G for just the rev files, 107G for the whole data directory. ``` $ tail -n 1 /Users/erik/Library/Application\ Support/Bitcoin/debug.log 2019-12-29T07:30:29Z UpdateTip: new best=0000000000000000025930ce69bc9fcfae882de7231457f09534da493e114c52 height=399555 version=0x00000004 log2_work=84.162383 tx=111703322 date='2016-02-22T08:57:07Z' progress=0.228149 cache=466.9MiB(3406855txo) $ du -ch /Users/erik/Library/Application\ Support/Bitcoin/blocks/rev*.dat | sort -n 16M /Users/erik/Library/Application Support/Bitcoin/blocks/rev00003.dat 17M /Users/erik/Library/Application Support/Bitcoin/blocks/rev00056.dat 18M /Users/erik/Library/Application Support/Bitcoin/blocks/rev00006.dat 20M /Users/erik/Library/Application Support/Bitcoin/blocks/rev00000.dat 21M /Users/erik/Library/Application Support/Bitcoin/blocks/rev00450.dat 24M /Users/erik/Library/Application Support/Bitcoin/blocks/rev00078.dat 27M /Users/erik/Library/Application Support/Bitcoin/blocks/rev00002.dat ... 171M /Users/erik/Library/Application Support/Bitcoin/blocks/rev00232.dat 172M /Users/erik/Library/Application Support/Bitcoin/blocks/rev00266.dat 172M /Users/erik/Library/Application Support/Bitcoin/blocks/rev00334.dat 174M /Users/erik/Library/Application Support/Bitcoin/blocks/rev00256.dat 175M /Users/erik/Library/Application Support/Bitcoin/blocks/rev00143.dat 175M /Users/erik/Library/Application Support/Bitcoin/blocks/rev00275.dat 177M /Users/erik/Library/Application Support/Bitcoin/blocks/rev00132.dat 177M /Users/erik/Library/Application Support/Bitcoin/blocks/rev00204.dat 178M /Users/erik/Library/Application Support/Bitcoin/blocks/rev00337.dat 184M /Users/erik/Library/Application Support/Bitcoin/blocks/rev00208.dat 48G total $ du -ch /Users/erik/Library/Application\ Support/Bitcoin 91M /Users/erik/Library/Application Support/Bitcoin/blocks/index 105G /Users/erik/Library/Application Support/Bitcoin/blocks 1.8G /Users/erik/Library/Application Support/Bitcoin/chainstate 2.0M /Users/erik/Library/Application Support/Bitcoin/wallets 107G /Users/erik/Library/Application Support/Bitcoin 107G total ``` Here you can see the Linux-Mac diff side by side: ![linux-vs-mac](https://user-images.githubusercontent.com/20860124/71562589-f2779c80-2a8a-11ea-9097-6163e36ecf47.png) **To reproduce** - Download and install Bitcoin Core 0.19.0.1 on a Mac with a fresh install of macOS Catalina 10.15.2 - Start Bitcoin Core and select the default data directory and leave the prune checkbox unchecked (see picture at the start of the report) - After downloading ~55% of the blockchain, check the disk space use of the ~/Library/Application Support/Bitcoin folder, it should now already exceed 284 GB - If you had 480 GB of free space when starting the download, you should not be able to finish the download before running out of disk space **Possible workaround** Based on https://bitcoin.stackexchange.com/questions/11104/what-is-the-database-for/11108#11108 it seems the rev*.dat files can be removed to free up disk space. By deleting the earlier ones created I was able to free up enough space continue and complete the IBD on the Mac mini. However, doing so may lead to side effects that I am unaware of. **System information** bitcoin-0.19.0.1-osx.dmg downloaded from https://bitcoin.org/en/download Machine 1: - Mac mini (Late 2012) - 2,5 GHz Dual-Core Intel Core i5 - 16 GB 1600 MHz DDR3 - macOS Catalina 10.15.2 (fresh install on a 500 GB SSD) Machine 2: - MacBook Pro (15-inch, 2018) - 2,6 GHz 6-Core Intel Core i7 - 32 GB 2400 MHz DDR4 - macOS Catalina 10.15.2 (upgraded from Mojave)
https://github.com/bitcoin/bitcoin/issues/17827
https://github.com/bitcoin/bitcoin/pull/17887
816464198c34a373229e865d76f4bc0ca8f127dc
75163f4729c10c40d2843da28a8c79ab89193f6a
2019-12-29T20:37:47Z
c++
2020-01-14T23:56:39Z
closed
bitcoin/bitcoin
https://github.com/bitcoin/bitcoin
17,788
[".github/workflows/ci.yml"]
ci: GitHub Actions update to Visual Studio 16.4.0
On [2019-12-09](https://github.blog/changelog/2019-12-19-github-actions-updates-to-the-virtual-environments/) GitHub Actions virtual environments has been upgraded to Visual Studio 16.4.0. This causes errors: ``` 6>LINK : fatal error C1047: The object or library file 'C:\vcpkg\installed\x64-windows-static\lib\libzmq-mt-s-4_3_3.lib' was created with an older compiler than other objects; rebuild old objects and libraries [D:\a\bitcoin\bitcoin\build_msvc\bitcoind\bitcoind.vcxproj] 6>LINK : fatal error LNK1257: code generation failed [D:\a\bitcoin\bitcoin\build_msvc\bitcoind\bitcoind.vcxproj] ``` Updating Qt binaries (#17736) and removing `zeromq` package from `build_msvc/vcpkg-packages.txt` did not help.
https://github.com/bitcoin/bitcoin/issues/17788
https://github.com/bitcoin/bitcoin/pull/17793
b6fa752bc7c68ef5b2f839b6101c86241d3af85c
0b5a366bd70119b34b112825d69804057141535f
2019-12-22T16:13:30Z
c++
2019-12-23T18:05:18Z
closed
bitcoin/bitcoin
https://github.com/bitcoin/bitcoin
17,742
["src/univalue/Makefile.am", "src/univalue/lib/univalue_read.cpp", "src/univalue/test/fail45.json", "src/univalue/test/pass4.json", "src/univalue/test/unitester.cpp"]
UniValue upgrade needed to avoid UniValue CVE-2019-18936 (segfault via high object depth JSON)
While auditing the Bitcoin Core RPC code I found an issue in UniValue. `UniValue::read()` in UniValue 1.0.3 and 1.0.4 allows a segfault via high object depth JSON. Live demo: ``` $ src/bitcoind -regtest -rpcuser=u -rpcpassword=p > /dev/null & [1] 8625 $ curl -u u:p --request POST \ --data $(python -c 'print(50000 * "[");') http://127.0.0.1:18443 curl: (52) Empty reply from server [1]+ Segmentation fault (core dumped) src/bitcoind -regtest -rpcuser=u -rpcpassword=p > /dev/null ``` I reported the issue to `security@` and UniValue author @jgarzik back in early November 2019. The issue was fixed in commit https://github.com/jgarzik/univalue/commit/fe2227d4ace9d4d5b30710684c9d3b1012e3c0fc (https://github.com/jgarzik/univalue/pull/64). The issue in UniValue has been assigned CVE-2019-18936. We need to bump our UniValue version to address this issue :) CVE details submitted to MITRE by @jgarzik: * Suggested description: `UniValue::read()` in UniValue 1.0.3 and 1.0.4 allows a segfault via malformed JSON. * Additional Information: UniValue is a JSON I/O library commonly used in cryptocurrency applications. * VulnerabilityType Other: Denial of Service * Vendor of Product: univalue * Affected Product Code Base: univalue - 1.0.4, univalue - 1.0.3 * Affected Component: `UniValue::read()` method * Attack Type: Context-dependent * Impact Denial of Service: true * Attack Vectors: Supply malformed JSON into UniValue's JSON parser. * Reference: https://github.com/jgarzik/univalue * Has vendor confirmed or acknowledged the vulnerability?: true * Discoverer: practicalswift * Reference: https://github.com/jgarzik/univalue/compare/v1.0.4...v1.0.5, https://github.com/jgarzik/univalue/pull/58
https://github.com/bitcoin/bitcoin/issues/17742
https://github.com/bitcoin/bitcoin/pull/18099
75fb37ce68289eb7e00e2ccdd2ef7f9271332545
fad9ea8fdb0a7269a3fcc472fd948669d74f7aa7
2019-12-13T10:33:46Z
c++
2020-02-09T15:44:29Z
closed
bitcoin/bitcoin
https://github.com/bitcoin/bitcoin
17,718
["src/base58.cpp", "src/test/base58_tests.cpp", "src/util/strencodings.cpp", "src/util/string.h"]
DecodeBase58(const std::string& str, …) is a bit too liberal when decoding?
When fuzzing the base58 functions I noticed that `DecodeBase58(const std::string& str, …)` is perhaps a bit too liberal in what input it accepts when decoding. I naïvely assumed that `DecodeBase58(const std::string& str, …)` would return `false` when passing it a `str` which contains at least one character that is not any of the base58 characters (all alphanumeric characters except for "0", "I", "O", and "l") or the whitespace characters. That is not the case: * `str` contains `good` → `DecodeBase58(const std::string& str, …) == true` (as expected) * `str` contains `bad0IOl` → `DecodeBase58(const std::string& str, …) == false` (as expected) * `str` contains `good\x00bad0IOl` → `DecodeBase58(const std::string& str, …) == true`(!) The reason is that `DecodeBase58(const std::string& str, …)` calls `DecodeBase58(const char* psz, …)` which will only consider the string up to the first `\x00`.
https://github.com/bitcoin/bitcoin/issues/17718
https://github.com/bitcoin/bitcoin/pull/17721
ff7a9992263f5a19f73097c86068b6150d213c23
d945c6f5e6f61b6e289ac7da6834c18f1b677b0f
2019-12-10T23:21:42Z
c++
2019-12-12T11:01:56Z
closed
bitcoin/bitcoin
https://github.com/bitcoin/bitcoin
17,716
["test/functional/wallet_bumpfee.py"]
intermittent functional test failure in wallet_bumpfee
ERROR: type should be string, got "https://travis-ci.org/bitcoin/bitcoin/jobs/623304089#L8090\r\n\r\n```\r\n test 2019-12-10T18:32:57.082000Z TestFramework (ERROR): Assertion failed \r\n Traceback (most recent call last):\r\n File \"/home/travis/build/bitcoin/bitcoin/build/bitcoin-s390x-unknown-linux-gnu/test/functional/test_framework/test_framework.py\", line 112, in main\r\n self.run_test()\r\n File \"/home/travis/build/bitcoin/bitcoin/build/bitcoin-s390x-unknown-linux-gnu/test/functional/wallet_bumpfee.py\", line 90, in run_test\r\n test_small_output_with_feerate_succeeds(rbf_node, dest_address)\r\n File \"/home/travis/build/bitcoin/bitcoin/build/bitcoin-s390x-unknown-linux-gnu/test/functional/wallet_bumpfee.py\", line 224, in test_small_output_with_feerate_succeeds\r\n assert_equal(len(input_list), 1)\r\n File \"/home/travis/build/bitcoin/bitcoin/build/bitcoin-s390x-unknown-linux-gnu/test/functional/test_framework/util.py\", line 46, in assert_equal\r\n raise AssertionError(\"not(%s)\" % \" == \".join(str(arg) for arg in (thing1, thing2) + args))\r\n AssertionError: not(16 == 1)"
https://github.com/bitcoin/bitcoin/issues/17716
https://github.com/bitcoin/bitcoin/pull/18311
cf4cb28efcf80c018a7f070c671f43cd172dbd86
b5c7665e3083f5daaf2b9f247a59a008f2d689a4
2019-12-10T21:40:57Z
c++
2020-03-10T18:15:39Z
closed
bitcoin/bitcoin
https://github.com/bitcoin/bitcoin
17,683
["src/qt/optionsdialog.cpp"]
Don't display "Third party transaction URLs" setting when built with no wallet
The part of the GUI that this setting is relevant for does not exist in a `--disable-wallet` build. ![wallet_prefs](https://user-images.githubusercontent.com/863730/70331435-72547300-180d-11ea-842d-82f8529ae982.png)
https://github.com/bitcoin/bitcoin/issues/17683
https://github.com/bitcoin/bitcoin/pull/17694
cb11324a63ef10475bfc4d8e45148d5ae6f3e71e
48a5c92f9ef6634375a3f52812cf3d511c37699d
2019-12-06T15:16:05Z
c++
2019-12-09T09:57:39Z
closed
bitcoin/bitcoin
https://github.com/bitcoin/bitcoin
17,679
["src/blockfilter.cpp", "src/blockfilter.h", "src/init.cpp"]
"Fatal LevelDB error" when specifying -blockfilterindex=basic twice
My `bitcoin.conf`: ``` $ cat ~/.bitcoin/bitcoin.conf [regtest] blockfilterindex=basic ``` And if I launch `bitcoind` specifying `..=basic` *again*, like this: ``` $ ./bitcoind -chain=regtest -blockfilterindex=basic ``` I get this error (full log below): ``` EXCEPTION: 15dbwrapper_error Fatal LevelDB error: IO error: lock /home/vincas/.bitcoin/regtest/indexes/blockfilter/basic/db/LOCK: already held by process bitcoin in AppInit() ``` Does not reproduce if I use `-blockfilterindex=1` twice. **Expected behavior** Should not fatal-away due to redundant command line arguments. **Actual behavior** `bitcoind` exits with Fatal LevelDB error. **To reproduce** * Debian Sid * `../configure --with-incompatible-bdb --with-gui=no` (`incompatile` to use Debian's bdb) * Have `bitcoin.conf` as noted before. * Run `./bitcoind -chain=regtest -blockfilterindex=basic` **System information** Bitcoin Core v0.19.0.1 and from current master Debian Sid amd64. Same with `bitcoind` and `bitcoin-qt` Full output: ``` 2019-12-05T18:56:30Z Feeding 34499 bytes of environment data into RNG 2019-12-05T18:56:30Z Bitcoin Core version v0.19.99.0-6fff333c9 (release build) 2019-12-05T18:56:30Z Validating signatures for all blocks. 2019-12-05T18:56:30Z Setting nMinimumChainWork=0000000000000000000000000000000000000000000000000000000000000000 2019-12-05T18:56:30Z Using the 'sse4(1way),sse41(4way),avx2(8way)' SHA256 implementation 2019-12-05T18:56:30Z Using RdRand as an additional entropy source 2019-12-05T18:56:30Z Default data directory /home/vincas/.bitcoin 2019-12-05T18:56:30Z Using data directory /home/vincas/.bitcoin/regtest 2019-12-05T18:56:30Z Config file: /home/vincas/.bitcoin/bitcoin.conf 2019-12-05T18:56:30Z Using at most 125 automatic connections (1024 file descriptors available) 2019-12-05T18:56:30Z Using 16 MiB out of 32/2 requested for signature cache, able to store 524288 elements 2019-12-05T18:56:30Z Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements 2019-12-05T18:56:30Z Script verification uses 7 additional threads 2019-12-05T18:56:30Z scheduler thread start 2019-12-05T18:56:30Z HTTP: creating work queue of depth 16 2019-12-05T18:56:30Z No rpcpassword set - using random cookie authentication. 2019-12-05T18:56:30Z Generated RPC authentication cookie /home/vincas/.bitcoin/regtest/.cookie 2019-12-05T18:56:30Z HTTP: starting 4 worker threads 2019-12-05T18:56:30Z Using wallet directory /home/vincas/.bitcoin/regtest/wallets 2019-12-05T18:56:30Z init message: Verifying wallet(s)... 2019-12-05T18:56:30Z Using BerkeleyDB version Berkeley DB 5.3.28: (September 9, 2013) 2019-12-05T18:56:30Z Using wallet /home/vincas/.bitcoin/regtest/wallets 2019-12-05T18:56:30Z BerkeleyEnvironment::Open: LogDir=/home/vincas/.bitcoin/regtest/wallets/database ErrorFile=/home/vincas/.bitcoin/regtest/wallets/db.log 2019-12-05T18:56:30Z init message: Loading banlist... 2019-12-05T18:56:30Z ERROR: DeserializeFileDB: Failed to open file /home/vincas/.bitcoin/regtest/banlist.dat 2019-12-05T18:56:30Z Invalid or missing banlist.dat; recreating 2019-12-05T18:56:30Z Cache configuration: 2019-12-05T18:56:30Z * Using 2.0 MiB for block index database 2019-12-05T18:56:30Z * Using 28.0 MiB for basic block filter index database 2019-12-05T18:56:30Z * Using 28.0 MiB for basic block filter index database 2019-12-05T18:56:30Z * Using 8.0 MiB for chain state database 2019-12-05T18:56:30Z * Using 384.0 MiB for in-memory UTXO set (plus up to 286.1 MiB of unused mempool space) 2019-12-05T18:56:30Z init message: Loading block index... 2019-12-05T18:56:30Z Opening LevelDB in /home/vincas/.bitcoin/regtest/blocks/index 2019-12-05T18:56:30Z Opened LevelDB successfully 2019-12-05T18:56:30Z Using obfuscation key for /home/vincas/.bitcoin/regtest/blocks/index: 0000000000000000 2019-12-05T18:56:30Z LoadBlockIndexDB: last block file = 0 2019-12-05T18:56:30Z LoadBlockIndexDB: last block file info: CBlockFileInfo(blocks=0, size=0, heights=0...0, time=1970-01-01...1970-01-01) 2019-12-05T18:56:30Z Checking all blk files are present... 2019-12-05T18:56:30Z Initializing databases... 2019-12-05T18:56:30Z Pre-allocating up to position 0x1000000 in blk00000.dat 2019-12-05T18:56:30Z Opening LevelDB in /home/vincas/.bitcoin/regtest/chainstate 2019-12-05T18:56:30Z Opened LevelDB successfully 2019-12-05T18:56:30Z Wrote new obfuscate key for /home/vincas/.bitcoin/regtest/chainstate: 531e5e9ac4b7503b 2019-12-05T18:56:30Z Using obfuscation key for /home/vincas/.bitcoin/regtest/chainstate: 531e5e9ac4b7503b 2019-12-05T18:56:30Z init message: Rewinding blocks... 2019-12-05T18:56:30Z block index 45ms 2019-12-05T18:56:30Z Opening LevelDB in /home/vincas/.bitcoin/regtest/indexes/blockfilter/basic/db 2019-12-05T18:56:30Z Opened LevelDB successfully 2019-12-05T18:56:30Z Using obfuscation key for /home/vincas/.bitcoin/regtest/indexes/blockfilter/basic/db: 0000000000000000 2019-12-05T18:56:30Z Opening LevelDB in /home/vincas/.bitcoin/regtest/indexes/blockfilter/basic/db 2019-12-05T18:56:30Z basic block filter index thread start 2019-12-05T18:56:30Z basic block filter index is enabled 2019-12-05T18:56:30Z basic block filter index thread exit 2019-12-05T18:56:30Z Fatal LevelDB error: IO error: lock /home/vincas/.bitcoin/regtest/indexes/blockfilter/basic/db/LOCK: already held by process 2019-12-05T18:56:30Z You can use -debug=leveldb to get more complete diagnostic messages 2019-12-05T18:56:30Z ************************ EXCEPTION: 15dbwrapper_error Fatal LevelDB error: IO error: lock /home/vincas/.bitcoin/regtest/indexes/blockfilter/basic/db/LOCK: already held by process bitcoin in AppInit() ************************ EXCEPTION: 15dbwrapper_error Fatal LevelDB error: IO error: lock /home/vincas/.bitcoin/regtest/indexes/blockfilter/basic/db/LOCK: already held by process bitcoin in AppInit() 2019-12-05T18:56:30Z Shutdown: In progress... 2019-12-05T18:56:30Z scheduler thread interrupt 2019-12-05T18:56:30Z Shutdown: done ```
https://github.com/bitcoin/bitcoin/issues/17679
https://github.com/bitcoin/bitcoin/pull/17687
cb11324a63ef10475bfc4d8e45148d5ae6f3e71e
034561f9cd4180ea1c165cb02df6c84444a8d692
2019-12-05T18:59:05Z
c++
2019-12-06T20:47:55Z
closed
bitcoin/bitcoin
https://github.com/bitcoin/bitcoin
17,642
["src/wallet/feebumper.cpp", "test/functional/wallet_bumpfee.py"]
wallet: Uninitialized read in bumpfee(…)
Uninitialized read in `bumpfee(…)`. The problem can be verified by running `test/functional/wallet_bumpfee.py --valgrind` (see PR #17633 for `--valgrind`). Live demo: ``` $ test/functional/wallet_bumpfee.py --valgrind --tracerpc 2019-11-30T20:58:24.457000Z TestFramework (INFO): Initializing test directory /tmp/bitcoin_func_test_x66swmkm … -152-> bumpfee ["b8f5472384ca8f1b69c64f058db13d545e3d0b82aec4e777a77087830159ef11", {"fee_rate": 0.0015}] 2019-11-30T21:00:18.358000Z TestFramework (ERROR): Unexpected exception caught during testing … ConnectionRefusedError: [Errno 111] Connection refused $ cat /tmp/bitcoin_func_test_x66swmkm/node1/stderr/* ==17181== Thread 15 b-httpworker.0: ==17181== Conditional jump or move depends on uninitialised value(s) ==17181== at 0x8F00BC: ValueFromAmount(long const&) (core_write.cpp:21) ==17181== by 0x76FA48: bumpfee(JSONRPCRequest const&) (rpcwallet.cpp:3482) ==17181== by 0x375CE2: CRPCCommand::CRPCCommand(char const*, char const*, UniValue (*)(JSONRPCRequest const&), std::initializer_list<char const*>)::{lambda(JSONRPCRequest const&, UniValue&, bool)#1}::operator()(JSONRPCRequest const&, UniValue&, bool) const (server.h:104) ==17181== by 0x375AE0: std::_Function_handler<bool (JSONRPCRequest const&, UniValue&, bool), CRPCCommand::CRPCCommand(char const*, char const*, UniValue (*)(JSONRPCRequest const&), std::initializer_list<char const*>)::{lambda(JSONRPCRequest const&, UniValue&, bool)#1}>::_M_invoke(std::_Any_data const&, JSONRPCRequest const&, UniValue&, bool&&) (std_function.h:282) ==17181== by 0x16E0E0: std::function<bool (JSONRPCRequest const&, UniValue&, bool)>::operator()(JSONRPCRequest const&, UniValue&, bool) const (std_function.h:687) ==17181== by 0x165D3E: interfaces::(anonymous namespace)::RpcHandlerImpl::RpcHandlerImpl(CRPCCommand const&)::{lambda(JSONRPCRequest const&, UniValue&, bool)#1}::operator()(JSONRPCRequest const&, UniValue&, bool) const (chain.cpp:202) ==17181== by 0x165B00: std::_Function_handler<bool (JSONRPCRequest const&, UniValue&, bool), interfaces::(anonymous namespace)::RpcHandlerImpl::RpcHandlerImpl(CRPCCommand const&)::{lambda(JSONRPCRequest const&, UniValue&, bool)#1}>::_M_invoke(std::_Any_data const&, JSONRPCRequest const&, UniValue&, bool&&) (std_function.h:282) ==17181== by 0x16E0E0: std::function<bool (JSONRPCRequest const&, UniValue&, bool)>::operator()(JSONRPCRequest const&, UniValue&, bool) const (std_function.h:687) ==17181== by 0x41FF47: ExecuteCommand(CRPCCommand const&, JSONRPCRequest const&, UniValue&, bool) (server.cpp:449) ==17181== by 0x41FBC2: CRPCTable::execute(JSONRPCRequest const&) const (server.cpp:432) ==17181== by 0x67771B: HTTPReq_JSONRPC(HTTPRequest*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (httprpc.cpp:190) ==17181== by 0x336249: std::_Function_handler<bool (HTTPRequest*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&), bool (*)(HTTPRequest*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)>::_M_invoke(std::_Any_data const&, HTTPRequest*&&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (std_function.h:282) … ``` The following diff avoids the uninitialized read but is not a correct fix: ```diff diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index d906f6ddf072..d09d08f05480 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -3437,7 +3437,7 @@ static UniValue bumpfee(const JSONRPCRequest& request) std::vector<std::string> errors; - CAmount old_fee; + CAmount old_fee = -1; CAmount new_fee; CMutableTransaction mtx; feebumper::Result res; @@ -3479,7 +3479,9 @@ static UniValue bumpfee(const JSONRPCRequest& request) } UniValue result(UniValue::VOBJ); result.pushKV("txid", txid.GetHex()); - result.pushKV("origfee", ValueFromAmount(old_fee)); + if (MoneyRange(old_fee)) { + result.pushKV("origfee", ValueFromAmount(old_fee)); + } result.pushKV("fee", ValueFromAmount(new_fee)); UniValue result_errors(UniValue::VARR); for (const std::string& error : errors) { ```
https://github.com/bitcoin/bitcoin/issues/17642
https://github.com/bitcoin/bitcoin/pull/17643
2ecb7e1556cd970b6dccb5f101a718602487df4b
02afb0c550dc8529918460c845d1da3adf236eed
2019-12-01T10:07:31Z
c++
2019-12-02T01:54:16Z
closed
bitcoin/bitcoin
https://github.com/bitcoin/bitcoin
17,628
[".travis.yml", "ci/test/00_setup_env_native_centos.sh", "ci/test/00_setup_env_native_trusty.sh", "ci/test/04_install.sh"]
Criteria to drop Trusty Travis
@emilengler attempted removing the Trusty Travis build in #16930, but this was considered premature. Currently this Travis machine is broken (#17626), hopefully temporarily. It seems useful to have a list of criteria ready for when it can safely be dropped: As @MarcoFalke pointed out: > This is still used to ensure we can build with the minimum required qt and boost versions Minimum versions are defined here: https://github.com/bitcoin/bitcoin/blob/master/doc/dependencies.md Our minimum QT version is 5.5.1. Trusty ships with 5.2.1, Xenial ships with 5.5.1. So we don't need Trusty for QT. Our minimum Boost version is 1.47.0. Trusty ships with 1.54 and Xenial ships with 1.58, so neither covers the oldest version. Discussion about the mimimum required boost version is in #8875. We shouldn't drop Trusty until we bump the minimum version to 1.58. I did not look at other dependencies.
https://github.com/bitcoin/bitcoin/issues/17628
https://github.com/bitcoin/bitcoin/pull/17635
7f3ae224685efaeb6fe714de90e8871d12e55f34
711e0449cf4a0f15cabe0d64094e3add24ad44b0
2019-11-28T10:54:39Z
c++
2019-12-06T19:54:37Z
closed
bitcoin/bitcoin
https://github.com/bitcoin/bitcoin
17,618
["src/qt/rpcconsole.cpp"]
GUI: testmempoolaccept in console cuts the end of the txhex
How to reproduce: Build a transaction with ~190 inputs, get the hex and issue `testmempoolaccept [\"{txhex}\"]` in the GUI console. It'll give back a `TX decode failed (code -22)` with a stripped txhex where the end is cut down.
https://github.com/bitcoin/bitcoin/issues/17618
https://github.com/bitcoin/bitcoin/pull/18993
9a3c7afe290fd918ed41739721142944c17682a6
22ccc27046a83c05df08dcc4ccfecbad96563115
2019-11-27T06:54:41Z
c++
2020-07-09T14:28:23Z
closed
bitcoin/bitcoin
https://github.com/bitcoin/bitcoin
17,603
["src/wallet/wallet.cpp", "src/wallet/wallet.h", "test/functional/wallet_avoidreuse.py"]
partial spend avoidance makes partial spends and getbalances doesn't notice
In v0.19.0.1, I'm running regtest, creating a wallet with `avoid_reuse=true`, generating 31 blocks in that wallet, then generating 100 more blocks to a throwaway address to have the rewards mature. Then I send 1 BTC to a throwaway address, expecting to see all 31 block rewards spent at once, but the resulting transaction only has 1 input. The other 30 rewards show as `"reused":true` when I `listunspent`, but when I run `getbalances` I see them showing us as `trusted`, not as `used` like I would expect. Here's a log: $ junk=mmmmmmmmmmmmmmmmmmmmmmmmmmmmq4S8nX $ alias bcr-'bitcoin-cli -regtest' $ alias bcrt='bcr -rpcwallet=test' $ bcr -named createwallet wallet_name=test avoid_reuse=true { "name": "test", "warning": "" } $ addr=$(bcrt getnewaddress) $ bcr generatetoaddress 31 $addr | wc -l # generate 31 rewards 33 $ bcr generatetoaddress 100 $junk | wc -l # let them mature 102 $ bcrt getbalances { "mine": { "trusted": 1550.00000000, "untrusted_pending": 0.00000000, "immature": 0.00000000, "used": 0.00000000 } } $ txid=$(bcrt sendtoaddress $junk 1) # list the #confs for each input of the spend tx - note only one utxo was spent $ bcrt getrawtransaction $txid 1 | jq -r '.vin[] | .txid' | while read txid; do bcrt gettransaction $txid | jq -r .confirmations; done 107 # list the #confs for the unspent rewards - note the 107 conf utxo is missing $ echo $(bcrt listunspent | jq -cM '.[] | .confirmations' | sort) 101 102 103 104 105 106 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 $ bcrt getbalances # but the 30 unspent rewards are still "trusted" not "used" { "mine": { "trusted": 1548.99996640, "untrusted_pending": 0.00000000, "immature": 0.00000000, "used": 0.00000000 } } # although they show as "reused" in listunspent: $ bcrt listunspent 0 | jq -cM '.[] | {reused,amount,confirmations,spendable,address}' | sort | head -n 10 {"reused":false,"amount":48.9999664,"confirmations":0,"spendable":true,"address":"2NAnHxL7tve4xnom7Y3f5747qzyFDEpP1Li"} {"reused":true,"amount":50,"confirmations":101,"spendable":true,"address":"2Mww9FTTSMjc9HGsrc6swRVVzkNaus6SEMw"} {"reused":true,"amount":50,"confirmations":102,"spendable":true,"address":"2Mww9FTTSMjc9HGsrc6swRVVzkNaus6SEMw"} {"reused":true,"amount":50,"confirmations":103,"spendable":true,"address":"2Mww9FTTSMjc9HGsrc6swRVVzkNaus6SEMw"} {"reused":true,"amount":50,"confirmations":104,"spendable":true,"address":"2Mww9FTTSMjc9HGsrc6swRVVzkNaus6SEMw"} {"reused":true,"amount":50,"confirmations":105,"spendable":true,"address":"2Mww9FTTSMjc9HGsrc6swRVVzkNaus6SEMw"} {"reused":true,"amount":50,"confirmations":106,"spendable":true,"address":"2Mww9FTTSMjc9HGsrc6swRVVzkNaus6SEMw"} {"reused":true,"amount":50,"confirmations":108,"spendable":true,"address":"2Mww9FTTSMjc9HGsrc6swRVVzkNaus6SEMw"} {"reused":true,"amount":50,"confirmations":109,"spendable":true,"address":"2Mww9FTTSMjc9HGsrc6swRVVzkNaus6SEMw"} {"reused":true,"amount":50,"confirmations":110,"spendable":true,"address":"2Mww9FTTSMjc9HGsrc6swRVVzkNaus6SEMw"} $
https://github.com/bitcoin/bitcoin/issues/17603
https://github.com/bitcoin/bitcoin/pull/17843
6196e930018181301b5972842ae384ea4288ff34
6fc554f591d8ea1681b8bb25aa12da8d4f023f66
2019-11-25T22:32:01Z
c++
2020-01-13T12:40:06Z
closed
bitcoin/bitcoin
https://github.com/bitcoin/bitcoin
17,525
["contrib/devtools/symbol-check.py", "contrib/gitian-descriptors/gitian-linux.yml", "doc/release-notes.md"]
build: Linux gitian builds fail on master
``` GEN qt/locale/bitcoin_zh_TW.qm GEN qt/qrc_bitcoin_locale.cpp CXX qt/qt_libbitcoinqt_a-qrc_bitcoin_locale.o AR qt/libbitcoinqt.a CXXLD qt/bitcoin-qt make[2]: Leaving directory '/home/ubuntu/build/bitcoin/distsrc-i686-pc-linux-gnu/src' make[1]: Leaving directory '/home/ubuntu/build/bitcoin/distsrc-i686-pc-linux-gnu/src' Making all in doc/man make[1]: Entering directory '/home/ubuntu/build/bitcoin/distsrc-i686-pc-linux-gnu/doc/man' make[1]: Nothing to be done for 'all'. make[1]: Leaving directory '/home/ubuntu/build/bitcoin/distsrc-i686-pc-linux-gnu/doc/man' make[1]: Entering directory '/home/ubuntu/build/bitcoin/distsrc-i686-pc-linux-gnu' make[1]: Nothing to be done for 'all-am'. make[1]: Leaving directory '/home/ubuntu/build/bitcoin/distsrc-i686-pc-linux-gnu' + make -j1 -C src check-security make: Entering directory '/home/ubuntu/build/bitcoin/distsrc-i686-pc-linux-gnu/src' Checking binary security... make: Leaving directory '/home/ubuntu/build/bitcoin/distsrc-i686-pc-linux-gnu/src' + make -j1 -C src check-symbols make: Entering directory '/home/ubuntu/build/bitcoin/distsrc-i686-pc-linux-gnu/src' Checking glibc back compat... bitcoin-cli: symbol getauxval from unsupported version GLIBC_2.16 bitcoin-tx: symbol getauxval from unsupported version GLIBC_2.16 bitcoin-wallet: symbol getauxval from unsupported version GLIBC_2.16 test/test_bitcoin: symbol getauxval from unsupported version GLIBC_2.16 qt/bitcoin-qt: symbol getauxval from unsupported version GLIBC_2.16 Makefile:15062: recipe for target 'check-symbols' failed make: *** [check-symbols] Error 1 make: Leaving directory '/home/ubuntu/build/bitcoin/distsrc-i686-pc-linux-gnu/src'
https://github.com/bitcoin/bitcoin/issues/17525
https://github.com/bitcoin/bitcoin/pull/17569
f6e42256fe8900ed90f9644906b77f97e1600952
eafd2593674b6890418a50eadf69425071b824e4
2019-11-19T22:12:19Z
c++
2019-11-24T12:40:11Z
closed
bitcoin/bitcoin
https://github.com/bitcoin/bitcoin
17,523
["src/randomenv.cpp"]
bitcoind broken on latest master
<!-- This issue tracker is only for technical issues related to Bitcoin Core. General bitcoin questions and/or support requests are best directed to the Bitcoin StackExchange at https://bitcoin.stackexchange.com. For reporting security issues, please read instructions at https://bitcoincore.org/en/contact/. If the node is "stuck" during sync or giving "block checksum mismatch" errors, please ensure your hardware is stable by running memtest and observe CPU temperature with a load-test tool such as linpack before creating an issue! --> <!-- Describe the issue --> Bitcoind takes up 100% cpu, log file not written to. Even bitcoind --help isn't working. **Expected behavior** Run normally <!--- What behavior did you expect? --> **Actual behavior** 100% cpu usage, no output <!--- What was the actual behavior (provide screenshots if the issue is GUI-related)? --> **To reproduce** Compile current master and try to run bitcoind <!--- How reliably can you reproduce the issue, what are the steps to do so? --> **System information** <!-- What version of Bitcoin Core are you using, where did you get it (website, self-compiled, etc)? --> latest master <!-- What type of machine are you observing the error on (OS/CPU and disk type)? --> Debian Buster VM with 28 Xeon Platinum cores, 64GB RAM, SSD storage <!-- GUI-related issue? What is your operating system and its version? If Linux, what is your desktop environment and graphical shell? --> <!-- Any extra information that might be useful in the debugging process. --> <!--- This is normally the contents of a `debug.log` or `config.log` file. Raw text or a link to a pastebin type site are preferred. --> Compiled from v0.19.0.1 tag and it's working.
https://github.com/bitcoin/bitcoin/issues/17523
https://github.com/bitcoin/bitcoin/pull/17527
ba2c5fe1477cec80d7e02f824daba21a1021758e
f93fc61c65d605eae2d3e2c98bdd30ae587fcdab
2019-11-19T20:14:07Z
c++
2019-11-20T18:54:08Z
closed
bitcoin/bitcoin
https://github.com/bitcoin/bitcoin
17,504
["contrib/gitian-descriptors/gitian-linux.yml", "contrib/guix/README.md", "contrib/guix/guix-build.sh", "depends/README.md", "doc/release-process.md"]
Should we still ship 32-bit x86 Linux binaries?
I don't think there's any hurry to do this, just opening an issue as #17503 made me wonder. In general, running bitcoind in 64 bit is unarguably better. 64-bit registers result in better validation performance and it allows leveldb to use mmap without worrying about virtual memory usage. Back in the day, the rationale for removing 32-bit x86 builds for Windows but not Linux was that some cheapo VPS still used x86-32 bit. Is this still the case in the year of (almost) 2020? Is anyone running x86-32 VMs for other purposes than testing software on that architecture? Even with that, how much testing are these binaries getting? (to be clear, I'm not arguing to *remove support for 32-bit*, just to stop building and providing binaries for it. I also think ARM is a different matter.)
https://github.com/bitcoin/bitcoin/issues/17504
https://github.com/bitcoin/bitcoin/pull/18104
fa55a2554c2661b8f2a759044d5ac85c9979d9ca
fae9084ac5b10f94bdee54853d307838c4254e9c
2019-11-18T11:07:46Z
c++
2020-02-09T21:22:53Z
closed
bitcoin/bitcoin
https://github.com/bitcoin/bitcoin
17,501
["src/base58.cpp", "src/base58.h", "src/bench/base58.cpp", "src/key_io.cpp", "src/test/base58_tests.cpp"]
Base58 decoding is done without checking that the input size is reasonable
Base58 decoding is currently done without checking that the input size is reasonable. This can lead to excessive decoding run time if an attacker can control the base58 input being decoded. `DecodeBase58/DecodeBase58Check(…)` run time sampled with varying input sizes: * 1 000 bytes: 1 ms * 10 000 bytes: 97 ms * 100 000 bytes: 8 865 ms (9 seconds) * 1 000 000 bytes: 857 440 ms (14 minutes) * 10 000 000 bytes: too long :) `DecodeBase58/DecodeBase58Check(…)` is reachable via the RPC interface using the following code paths: ``` addmultisigaddress(JSONRPCRequest const&) → AddrToPubKey(CKeyStore*, std::string const&) → DecodeDestination(std::string const&) → (anonymous namespace)::DecodeDestination(std::string const&, CChainParams const&) → DecodeBase58Check(std::string const&, std::vector<unsigned char>&) createpsbt(JSONRPCRequest const&) → ConstructTransaction(UniValue const&, UniValue const&, UniValue const&, UniValue const&) → DecodeDestination(std::string const&) → (anonymous namespace)::DecodeDestination(std::string const&, CChainParams const&) → DecodeBase58Check(std::string const&, std::vector<unsigned char>&) createrawtransaction(JSONRPCRequest const&) → ConstructTransaction(UniValue const&, UniValue const&, UniValue const&, UniValue const&) → DecodeDestination(std::string const&) → (anonymous namespace)::DecodeDestination(std::string const&, CChainParams const&) → DecodeBase58Check(std::string const&, std::vector<unsigned char>&) createwallet(JSONRPCRequest const&) → CWallet::CreateWalletFromFile(interfaces::Chain&, WalletLocation const&, unsigned long) → CWallet::LoadWallet(bool&) → WalletBatch::LoadWallet(CWallet*) → ReadKeyValue(CWallet*, CDataStream&, CDataStream&, CWalletScanState&, std::string&, std::string&) → DecodeDestination(std::string const&) → (anonymous namespace)::DecodeDestination(std::string const&, CChainParams const&) → DecodeBase58Check(std::string const&, std::vector<unsigned char>&) deriveaddresses(JSONRPCRequest const&) → Parse(std::string const&, FlatSigningProvider&, bool) → (anonymous namespace)::ParseScript(Span<char const>&, (anonymous namespace)::ParseScriptContext, FlatSigningProvider&) → (anonymous namespace)::ParsePubkey(Span<char const> const&, bool, FlatSigningProvider&) → (anonymous namespace)::ParsePubkeyInner(Span<char const> const&, bool, FlatSigningProvider&) → DecodeExtKey(std::string const&) → DecodeBase58Check(std::string const&, std::vector<unsigned char>&) deriveaddresses(JSONRPCRequest const&) → Parse(std::string const&, FlatSigningProvider&, bool) → (anonymous namespace)::ParseScript(Span<char const>&, (anonymous namespace)::ParseScriptContext, FlatSigningProvider&) → (anonymous namespace)::ParsePubkey(Span<char const> const&, bool, FlatSigningProvider&) → (anonymous namespace)::ParsePubkeyInner(Span<char const> const&, bool, FlatSigningProvider&) → DecodeExtPubKey(std::string const&) → DecodeBase58Check(std::string const&, std::vector<unsigned char>&) deriveaddresses(JSONRPCRequest const&) → Parse(std::string const&, FlatSigningProvider&, bool) → (anonymous namespace)::ParseScript(Span<char const>&, (anonymous namespace)::ParseScriptContext, FlatSigningProvider&) → (anonymous namespace)::ParsePubkey(Span<char const> const&, bool, FlatSigningProvider&) → (anonymous namespace)::ParsePubkeyInner(Span<char const> const&, bool, FlatSigningProvider&) → DecodeSecret(std::string const&) → DecodeBase58Check(std::string const&, std::vector<unsigned char>&) deriveaddresses(JSONRPCRequest const&) → Parse(std::string const&, FlatSigningProvider&, bool) → (anonymous namespace)::ParseScript(Span<char const>&, (anonymous namespace)::ParseScriptContext, FlatSigningProvider&) → DecodeDestination(std::string const&) → (anonymous namespace)::DecodeDestination(std::string const&, CChainParams const&) → DecodeBase58Check(std::string const&, std::vector<unsigned char>&) dumpprivkey(JSONRPCRequest const&) → DecodeDestination(std::string const&) → (anonymous namespace)::DecodeDestination(std::string const&, CChainParams const&) → DecodeBase58Check(std::string const&, std::vector<unsigned char>&) fundrawtransaction(JSONRPCRequest const&) → FundTransaction(CWallet*, CMutableTransaction&, long&, int&, UniValue) → DecodeDestination(std::string const&) → (anonymous namespace)::DecodeDestination(std::string const&, CChainParams const&) → DecodeBase58Check(std::string const&, std::vector<unsigned char>&) generatetoaddress(JSONRPCRequest const&) → DecodeDestination(std::string const&) → (anonymous namespace)::DecodeDestination(std::string const&, CChainParams const&) → DecodeBase58Check(std::string const&, std::vector<unsigned char>&) getaddressinfo(JSONRPCRequest const&) → DecodeDestination(std::string const&) → (anonymous namespace)::DecodeDestination(std::string const&, CChainParams const&) → DecodeBase58Check(std::string const&, std::vector<unsigned char>&) getdescriptorinfo(JSONRPCRequest const&) → Parse(std::string const&, FlatSigningProvider&, bool) → (anonymous namespace)::ParseScript(Span<char const>&, (anonymous namespace)::ParseScriptContext, FlatSigningProvider&) → (anonymous namespace)::ParsePubkey(Span<char const> const&, bool, FlatSigningProvider&) → (anonymous namespace)::ParsePubkeyInner(Span<char const> const&, bool, FlatSigningProvider&) → DecodeExtKey(std::string const&) → DecodeBase58Check(std::string const&, std::vector<unsigned char>&) getdescriptorinfo(JSONRPCRequest const&) → Parse(std::string const&, FlatSigningProvider&, bool) → (anonymous namespace)::ParseScript(Span<char const>&, (anonymous namespace)::ParseScriptContext, FlatSigningProvider&) → (anonymous namespace)::ParsePubkey(Span<char const> const&, bool, FlatSigningProvider&) → (anonymous namespace)::ParsePubkeyInner(Span<char const> const&, bool, FlatSigningProvider&) → DecodeExtPubKey(std::string const&) → DecodeBase58Check(std::string const&, std::vector<unsigned char>&) getdescriptorinfo(JSONRPCRequest const&) → Parse(std::string const&, FlatSigningProvider&, bool) → (anonymous namespace)::ParseScript(Span<char const>&, (anonymous namespace)::ParseScriptContext, FlatSigningProvider&) → (anonymous namespace)::ParsePubkey(Span<char const> const&, bool, FlatSigningProvider&) → (anonymous namespace)::ParsePubkeyInner(Span<char const> const&, bool, FlatSigningProvider&) → DecodeSecret(std::string const&) → DecodeBase58Check(std::string const&, std::vector<unsigned char>&) getdescriptorinfo(JSONRPCRequest const&) → Parse(std::string const&, FlatSigningProvider&, bool) → (anonymous namespace)::ParseScript(Span<char const>&, (anonymous namespace)::ParseScriptContext, FlatSigningProvider&) → DecodeDestination(std::string const&) → (anonymous namespace)::DecodeDestination(std::string const&, CChainParams const&) → DecodeBase58Check(std::string const&, std::vector<unsigned char>&) getreceivedbyaddress(JSONRPCRequest const&) → DecodeDestination(std::string const&) → (anonymous namespace)::DecodeDestination(std::string const&, CChainParams const&) → DecodeBase58Check(std::string const&, std::vector<unsigned char>&) importaddress(JSONRPCRequest const&) → DecodeDestination(std::string const&) → (anonymous namespace)::DecodeDestination(std::string const&, CChainParams const&) → DecodeBase58Check(std::string const&, std::vector<unsigned char>&) importmulti(JSONRPCRequest const&) → DecodeSecret(std::string const&) → DecodeBase58Check(std::string const&, std::vector<unsigned char>&) importmulti(JSONRPCRequest const&) → Parse(std::string const&, FlatSigningProvider&, bool) → (anonymous namespace)::ParseScript(Span<char const>&, (anonymous namespace)::ParseScriptContext, FlatSigningProvider&) → (anonymous namespace)::ParsePubkey(Span<char const> const&, bool, FlatSigningProvider&) → (anonymous namespace)::ParsePubkeyInner(Span<char const> const&, bool, FlatSigningProvider&) → DecodeExtKey(std::string const&) → DecodeBase58Check(std::string const&, std::vector<unsigned char>&) importmulti(JSONRPCRequest const&) → Parse(std::string const&, FlatSigningProvider&, bool) → (anonymous namespace)::ParseScript(Span<char const>&, (anonymous namespace)::ParseScriptContext, FlatSigningProvider&) → (anonymous namespace)::ParsePubkey(Span<char const> const&, bool, FlatSigningProvider&) → (anonymous namespace)::ParsePubkeyInner(Span<char const> const&, bool, FlatSigningProvider&) → DecodeExtPubKey(std::string const&) → DecodeBase58Check(std::string const&, std::vector<unsigned char>&) importmulti(JSONRPCRequest const&) → Parse(std::string const&, FlatSigningProvider&, bool) → (anonymous namespace)::ParseScript(Span<char const>&, (anonymous namespace)::ParseScriptContext, FlatSigningProvider&) → (anonymous namespace)::ParsePubkey(Span<char const> const&, bool, FlatSigningProvider&) → (anonymous namespace)::ParsePubkeyInner(Span<char const> const&, bool, FlatSigningProvider&) → DecodeSecret(std::string const&) → DecodeBase58Check(std::string const&, std::vector<unsigned char>&) importmulti(JSONRPCRequest const&) → Parse(std::string const&, FlatSigningProvider&, bool) → (anonymous namespace)::ParseScript(Span<char const>&, (anonymous namespace)::ParseScriptContext, FlatSigningProvider&) → DecodeDestination(std::string const&) → (anonymous namespace)::DecodeDestination(std::string const&, CChainParams const&) → DecodeBase58Check(std::string const&, std::vector<unsigned char>&) importmulti(JSONRPCRequest const&) → ProcessImportLegacy(ImportData&, std::map<CKeyID, CPubKey, std::less<CKeyID>, std::allocator<std::pair<CKeyID const, CPubKey> > >&, std::map<CKeyID, CKey, std::less<CKeyID>, std::allocator<std::pair<CKeyID const, CKey> > >&, std::set<CScript, std::less<CScript>, std::allocator<CScript> >&, bool&, UniValue const&, std::vector<CKeyID>&) → DecodeDestination(std::string const&) → (anonymous namespace)::DecodeDestination(std::string const&, CChainParams const&) → DecodeBase58Check(std::string const&, std::vector<unsigned char>&) importmulti(JSONRPCRequest const&) → ProcessImportLegacy(ImportData&, std::map<CKeyID, CPubKey, std::less<CKeyID>, std::allocator<std::pair<CKeyID const, CPubKey> > >&, std::map<CKeyID, CKey, std::less<CKeyID>, std::allocator<std::pair<CKeyID const, CKey> > >&, std::set<CScript, std::less<CScript>, std::allocator<CScript> >&, bool&, UniValue const&, std::vector<CKeyID>&) → DecodeSecret(std::string const&) → DecodeBase58Check(std::string const&, std::vector<unsigned char>&) importprivkey(JSONRPCRequest const&) → DecodeSecret(std::string const&) → DecodeBase58Check(std::string const&, std::vector<unsigned char>&) importwallet(JSONRPCRequest const&) → DecodeSecret(std::string const&) → DecodeBase58Check(std::string const&, std::vector<unsigned char>&) listreceivedbyaddress(JSONRPCRequest const&) → ListReceived(interfaces::Chain::Lock&, CWallet*, UniValue const&, bool) → DecodeDestination(std::string const&) → (anonymous namespace)::DecodeDestination(std::string const&, CChainParams const&) → DecodeBase58Check(std::string const&, std::vector<unsigned char>&) listreceivedbylabel(JSONRPCRequest const&) → ListReceived(interfaces::Chain::Lock&, CWallet*, UniValue const&, bool) → DecodeDestination(std::string const&) → (anonymous namespace)::DecodeDestination(std::string const&, CChainParams const&) → DecodeBase58Check(std::string const&, std::vector<unsigned char>&) listunspent(JSONRPCRequest const&) → DecodeDestination(std::string const&) → (anonymous namespace)::DecodeDestination(std::string const&, CChainParams const&) → DecodeBase58Check(std::string const&, std::vector<unsigned char>&) loadwallet(JSONRPCRequest const&) → LoadWallet(interfaces::Chain&, WalletLocation const&, std::string&, std::string&) → CWallet::CreateWalletFromFile(interfaces::Chain&, WalletLocation const&, unsigned long) → CWallet::LoadWallet(bool&) → WalletBatch::LoadWallet(CWallet*) → ReadKeyValue(CWallet*, CDataStream&, CDataStream&, CWalletScanState&, std::string&, std::string&) → DecodeDestination(std::string const&) → (anonymous namespace)::DecodeDestination(std::string const&, CChainParams const&) → DecodeBase58Check(std::string const&, std::vector<unsigned char>&) scantxoutset(JSONRPCRequest const&) → Parse(std::string const&, FlatSigningProvider&, bool) → (anonymous namespace)::ParseScript(Span<char const>&, (anonymous namespace)::ParseScriptContext, FlatSigningProvider&) → (anonymous namespace)::ParsePubkey(Span<char const> const&, bool, FlatSigningProvider&) → (anonymous namespace)::ParsePubkeyInner(Span<char const> const&, bool, FlatSigningProvider&) → DecodeExtKey(std::string const&) → DecodeBase58Check(std::string const&, std::vector<unsigned char>&) scantxoutset(JSONRPCRequest const&) → Parse(std::string const&, FlatSigningProvider&, bool) → (anonymous namespace)::ParseScript(Span<char const>&, (anonymous namespace)::ParseScriptContext, FlatSigningProvider&) → (anonymous namespace)::ParsePubkey(Span<char const> const&, bool, FlatSigningProvider&) → (anonymous namespace)::ParsePubkeyInner(Span<char const> const&, bool, FlatSigningProvider&) → DecodeExtPubKey(std::string const&) → DecodeBase58Check(std::string const&, std::vector<unsigned char>&) scantxoutset(JSONRPCRequest const&) → Parse(std::string const&, FlatSigningProvider&, bool) → (anonymous namespace)::ParseScript(Span<char const>&, (anonymous namespace)::ParseScriptContext, FlatSigningProvider&) → (anonymous namespace)::ParsePubkey(Span<char const> const&, bool, FlatSigningProvider&) → (anonymous namespace)::ParsePubkeyInner(Span<char const> const&, bool, FlatSigningProvider&) → DecodeSecret(std::string const&) → DecodeBase58Check(std::string const&, std::vector<unsigned char>&) scantxoutset(JSONRPCRequest const&) → Parse(std::string const&, FlatSigningProvider&, bool) → (anonymous namespace)::ParseScript(Span<char const>&, (anonymous namespace)::ParseScriptContext, FlatSigningProvider&) → DecodeDestination(std::string const&) → (anonymous namespace)::DecodeDestination(std::string const&, CChainParams const&) → DecodeBase58Check(std::string const&, std::vector<unsigned char>&) sendmany(JSONRPCRequest const&) → DecodeDestination(std::string const&) → (anonymous namespace)::DecodeDestination(std::string const&, CChainParams const&) → DecodeBase58Check(std::string const&, std::vector<unsigned char>&) sendtoaddress(JSONRPCRequest const&) → DecodeDestination(std::string const&) → (anonymous namespace)::DecodeDestination(std::string const&, CChainParams const&) → DecodeBase58Check(std::string const&, std::vector<unsigned char>&) sethdseed(JSONRPCRequest const&) → DecodeSecret(std::string const&) → DecodeBase58Check(std::string const&, std::vector<unsigned char>&) setlabel(JSONRPCRequest const&) → DecodeDestination(std::string const&) → (anonymous namespace)::DecodeDestination(std::string const&, CChainParams const&) → DecodeBase58Check(std::string const&, std::vector<unsigned char>&) signmessage(JSONRPCRequest const&) → DecodeDestination(std::string const&) → (anonymous namespace)::DecodeDestination(std::string const&, CChainParams const&) → DecodeBase58Check(std::string const&, std::vector<unsigned char>&) signmessagewithprivkey(JSONRPCRequest const&) → DecodeSecret(std::string const&) → DecodeBase58Check(std::string const&, std::vector<unsigned char>&) signrawtransactionwithkey(JSONRPCRequest const&) → DecodeSecret(std::string const&) → DecodeBase58Check(std::string const&, std::vector<unsigned char>&) validateaddress(JSONRPCRequest const&) → DecodeDestination(std::string const&) → (anonymous namespace)::DecodeDestination(std::string const&, CChainParams const&) → DecodeBase58Check(std::string const&, std::vector<unsigned char>&) verifymessage(JSONRPCRequest const&) → DecodeDestination(std::string const&) → (anonymous namespace)::DecodeDestination(std::string const&, CChainParams const&) → DecodeBase58Check(std::string const&, std::vector<unsigned char>&) walletcreatefundedpsbt(JSONRPCRequest const&) → ConstructTransaction(UniValue const&, UniValue const&, UniValue const&, UniValue const&) → DecodeDestination(std::string const&) → (anonymous namespace)::DecodeDestination(std::string const&, CChainParams const&) → DecodeBase58Check(std::string const&, std::vector<unsigned char>&) walletcreatefundedpsbt(JSONRPCRequest const&) → FundTransaction(CWallet*, CMutableTransaction&, long&, int&, UniValue) → DecodeDestination(std::string const&) → (anonymous namespace)::DecodeDestination(std::string const&, CChainParams const&) → DecodeBase58Check(std::string const&, std::vector<unsigned char>&) ``` Other code paths involving base58-decoding: ``` IsValidDestinationString(std::string const&, CChainParams const&) → (anonymous namespace)::DecodeDestination(std::string const&, CChainParams const&) → DecodeBase58Check(std::string const&, std::vector<unsigned char>&) LoadWallet(interfaces::Chain&, std::string const&, std::string&, std::string&) → LoadWallet(interfaces::Chain&, WalletLocation const&, std::string&, std::string&) → CWallet::CreateWalletFromFile(interfaces::Chain&, WalletLocation const&, unsigned long) → CWallet::LoadWallet(bool&) → WalletBatch::LoadWallet(CWallet*) → ReadKeyValue(CWallet*, CDataStream&, CDataStream&, CWalletScanState&, std::string&, std::string&) → DecodeDestination(std::string const&) → (anonymous namespace)::DecodeDestination(std::string const&, CChainParams const&) → DecodeBase58Check(std::string const&, std::vector<unsigned char>&) LoadWallets(interfaces::Chain&, std::vector<std::string, std::allocator<std::string > > const&) → CWallet::CreateWalletFromFile(interfaces::Chain&, WalletLocation const&, unsigned long) → CWallet::LoadWallet(bool&) → WalletBatch::LoadWallet(CWallet*) → ReadKeyValue(CWallet*, CDataStream&, CDataStream&, CWalletScanState&, std::string&, std::string&) → DecodeDestination(std::string const&) → (anonymous namespace)::DecodeDestination(std::string const&, CChainParams const&) → DecodeBase58Check(std::string const&, std::vector<unsigned char>&) WalletBatch::RecoverKeysOnlyFilter(void*, CDataStream, CDataStream) → ReadKeyValue(CWallet*, CDataStream&, CDataStream&, CWalletScanState&, std::string&, std::string&) → DecodeDestination(std::string const&) → (anonymous namespace)::DecodeDestination(std::string const&, CChainParams const&) → DecodeBase58Check(std::string const&, std::vector<unsigned char>&) ```
https://github.com/bitcoin/bitcoin/issues/17501
https://github.com/bitcoin/bitcoin/pull/17511
2bcf1fc444d5c4b8efa879e54e7b6134b7e6b986
5909bcd3bf3c3502355e89fd0b76bb8e93d8a95b
2019-11-17T21:46:32Z
c++
2019-12-06T00:31:09Z
closed
bitcoin/bitcoin
https://github.com/bitcoin/bitcoin
17,495
["src/interfaces/node.cpp", "src/rpc/server.cpp"]
gui: hang after calling any waitfor* cmds from RPC console
After calling any of the `waitfor*` commands in the GUI RPC console, trying to shutdown / `bitcoin-cli stop` will hang `bitcoin-qt`.
https://github.com/bitcoin/bitcoin/issues/17495
https://github.com/bitcoin/bitcoin/pull/18452
f2e2c5ebcccf8d656b850c28452e6e652934f36b
e4bfd51acc111c27f8a808756f88738b02388c38
2019-11-16T17:07:42Z
c++
2020-05-29T13:49:46Z
closed
bitcoin/bitcoin
https://github.com/bitcoin/bitcoin
17,460
[".travis.yml", "ci/test/00_setup_env_native_valgrind.sh", "ci/test/04_install.sh", "ci/test/06_script_b.sh", "ci/test/wrap-valgrind.sh", "contrib/valgrind.supp"]
Run tests in memory sanitizer
We run the tests in the thread (and other sanitizers), see `git grep sanitizer ./ci`, but not in the memory sanitizer. This seems like it could be improved. See e.g. #17449
https://github.com/bitcoin/bitcoin/issues/17460
https://github.com/bitcoin/bitcoin/pull/17725
3d6752779f0504e6435fe682f0c06c60b5c4c33b
facb416ad5ba47b01ee52c273a5c5e3709f06f07
2019-11-13T00:58:48Z
c++
2019-12-11T00:37:37Z
closed
bitcoin/bitcoin
https://github.com/bitcoin/bitcoin
17,414
["configure.ac", "src/Makefile.am", "src/crypto/sha256.cpp", "src/crypto/sha256_arm_shani.cpp", "src/crypto/sha256_x86_shani.cpp"]
Accelerated SHA256 with ARM64 crypto extensions?
Quite a lot of ARM64 SoC have cryptography extensions, in Linux look for `sha2` feature in `/proc/cpuinfo` or `getauxval(AT_HWCAP) & HWCAP_SHA2` . Apparently some impressive speed-ups can be achieved, I've heard of 4× to 8× on some SoCs. Here is some public domain code by Jeffrey Walton that demonstrates how to use it, using intrinsics (which are the best way to do this kind of thing on ARM): https://github.com/noloader/SHA-Intrinsics/blob/master/sha256-arm.c (I'm creating this issue mostly as reminder to myself but if someone wants to pick it up, fine :smile: )
https://github.com/bitcoin/bitcoin/issues/17414
https://github.com/bitcoin/bitcoin/pull/24115
3ce40e64d4ae9419658555fd1fb250b93f52684a
c23bf06492dddacfc0eece3d4dd12cce81496dd0
2019-11-08T09:51:37Z
c++
2022-02-14T20:12:39Z
closed
bitcoin/bitcoin
https://github.com/bitcoin/bitcoin
17,379
["src/util/system.cpp"]
Segfault running master on NetBSD
While testing 17270 I noticed that master (bdda137878904e9401a84e308ac74c93c2ef87c1) does not run on NetBSD. I assume this started after #17085 changed the fallback locale from `C` to `C.UTF-8`. There doesn't seem to be a `C.UTF-8` locale on NetBSD. ```bash src/bitcoind terminate called after throwing an instance of 'std::runtime_error' what(): locale::facet::_S_create_c_locale name not valid Abort trap (core dumped) ``` `LC_ALL=C src/bitcoind` works, `LC_ALL=en_US.UTF-8 src/bitcoind` does not. ```bash locale LANG="" LC_CTYPE="en_US.UTF-8" LC_COLLATE="C" LC_TIME="C" LC_NUMERIC="C" LC_MONETARY="C" LC_MESSAGES="C" LC_ALL="" ```
https://github.com/bitcoin/bitcoin/issues/17379
https://github.com/bitcoin/bitcoin/pull/22390
da67b75c5cd747acd7fd662b0af20e67fd9670be
8805e0666318f52bc9c29a104fb257268964667a
2019-11-05T15:01:37Z
c++
2021-09-09T05:51:02Z
closed
bitcoin/bitcoin
https://github.com/bitcoin/bitcoin
17,372
["ci/README.md", "ci/test/00_setup_env.sh", "ci/test/04_install.sh", "ci/test/05_before_script.sh", "ci/test/06_script_a.sh", "ci/test/06_script_b.sh"]
Improve Running CI Locally
One issue that can come up when running CI locally is that docker links directly to the current working directory. This has two unsavory side effects: 1) When docker writes the files, it writes them as root, preventing local building 2) It blows away your current build
https://github.com/bitcoin/bitcoin/issues/17372
https://github.com/bitcoin/bitcoin/pull/17423
fa493ef08830efe493150d07411af85518959804
fa7523d3aa75b0266015af59901c2397b52265b5
2019-11-04T23:14:10Z
c++
2019-11-11T03:30:13Z
closed
bitcoin/bitcoin
https://github.com/bitcoin/bitcoin
17,344
["configure.ac"]
RFC: Enabling some commonly enabled compiler diagnostics
I've compiled a list of commonly enabled compiler diagnostics that we are currently choosing not to enable. This is the list: | Compiler diagnostic | no# of emitted unique GCC warnings in `master` | no# of emitted unique Clang warnings in `master` | | ------------- | ------------- | ------------- | | `-Wconditional-uninitialized`: Warn if a variable may be uninitialized when used | Not supported | 2 | | `-Wdouble-promotion`: Warn if `float` is implicit promoted to `double` | 1 | 8 | | `-Wduplicated-branches`: Warn if `if`/`else` branches have duplicated code | 0 | Not supported | | `-Wduplicated-cond`: Warn if `if`/`else` chain has duplicated conditions | 0 | Not supported | | `-Wfloat-equal`: Warn if floating-point values are used in equality comparisons | 29 | 18 | | `-Wlogical-op`: Warn about logical operations being used where bitwise were probably wanted | 0 | Not supported | | `-Wnon-virtual-dtor`: Warn the user if a class with virtual functions has a non-virtual destructor. This helps catch hard to track down memory errors. | 22 | 10 | | `-Wnull-dereference`: Warn if a potential `nullptr` dereference is detected | 48 | Not supported | | `-Woverloaded-virtual`: Warn if you overload (not `override`) a virtual function | 0 | 0 | | `-Wsuggest-override`: Warn about overriding virtual functions that are not marked with the `override` keyword | 303 (of which 192 are in `src/leveldb/` | Not supported | | `-Wunreachable-code-loop-increment`: Warn if a loop will run only once (loop increment never executed) | Not supported | 1 | | `-Wunused-member-function`: Warn on unused member function | Not supported | 2 | | `-Wunused-template`: Warn on unused template | Not supported | 1 | There is a large overlap between this list and [Jason Turner's list of recommended compiler diagnostics in the Collaborative Collection of C++ Best Practices (`cppbestpractices`) project](https://github.com/lefticus/cppbestpractices/blob/master/02-Use_the_Tools_Available.md#gcc--clang). There is also an overlap with the recommendations given in the [C++ Core Guidelines](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines) (with editors Bjarne Stroustrup and Herb Sutter). I'm now seeking feedback regarding these diagnostics: which of these would make sense to enable in the Bitcoin Core project? :)
https://github.com/bitcoin/bitcoin/issues/17344
https://github.com/bitcoin/bitcoin/pull/19015
f2d1b9881f68e8196e5842ea92ad80a8b0f2e6ed
772cb03a281638079051a4e5068559a4d9b1fda8
2019-11-01T15:58:47Z
c++
2020-08-18T05:00:13Z
closed
bitcoin/bitcoin
https://github.com/bitcoin/bitcoin
17,317
[".github/ISSUE_TEMPLATE/good_first_issue.md"]
meta: Good first issue boilerplate
Good first issues seem to attract new contributors, but often the contributors lack the motivation to think about the changes and put effort into their contribution. Also, the most common reply to a good first issue is "Can I work on this?". So I suggest that every good first issue has a "Requirement", e.g. * "Strong background in C++11 std::thread" * "Experienced Qt5 GUI developer and async GUI design" * "Basic understanding of Bitcoin mining and the Bitcoin Core rpc interface" And finally a section like this: ### Want to work on this issue? Go ahead, there is no need to ask for permission. Anyone is free to contribute, and you are welcome to ask for help. ... (Maybe a link to contributing.md)
https://github.com/bitcoin/bitcoin/issues/17317
https://github.com/bitcoin/bitcoin/pull/17339
b54666c849bad258d92d6d1e45a051d36055681e
7b78b8d3a64503d582af8298241a20ebf582a0c5
2019-10-30T13:50:22Z
c++
2019-11-05T17:15:14Z
closed
bitcoin/bitcoin
https://github.com/bitcoin/bitcoin
17,296
["doc/release-notes-17437.md", "src/wallet/rpcwallet.cpp", "test/functional/wallet_listsinceblock.py", "test/functional/wallet_listtransactions.py"]
Missing block height in listsinceblock and gettransaction
When using `listsinceblock` to fetch transactions since the last record observed, there is a relevant detail missed that I would like to record in the ledger: `blockheight`. It is unreasonable for my wallet interface to do an RPC lookup for every new blockhash just to get the height number. There could be hundreds of transactions or even thousands and they could all be processed with a simple call to `listsinceblock` if it wasn't for the lack of `blockheight`. Currently it looks like: > "blockhash": "0000000000000000000549800794b27ab10d5e16ac6ad16a7c4a13dae756f80d", > "blockindex": 1120, > "blocktime": 1572073467, I would like it to look like: > "blockhash": "0000000000000000000549800794b27ab10d5e16ac6ad16a7c4a13dae756f80d", > "blockindex": 1120, > "blocktime": 1572073467, > "blockheight": 601091, I have the same request regarding the output of `gettransaction` also. Thanks in advance.
https://github.com/bitcoin/bitcoin/issues/17296
https://github.com/bitcoin/bitcoin/pull/17437
89e93135aedf984f7a98771f047e2beb6cdbdb8e
a5e77959c8ff6a8bffa1621d7ea29ee8603c5a14
2019-10-29T09:11:27Z
c++
2019-11-11T22:32:44Z
closed
bitcoin/bitcoin
https://github.com/bitcoin/bitcoin
17,294
["doc/reduce-memory.md", "doc/reduce-traffic.md", "src/init.cpp"]
code for blocksonly disagrees with documentation
The docs for `blocksonly` say that "Transactions from the wallet or RPC are not affected" but the code says: if (gArgs.GetBoolArg("-blocksonly", DEFAULT_BLOCKSONLY) && gArgs.SoftSetBoolArg("-walletbroadcast", false)) { LogPrintf("%s: parameter interaction: -blocksonly=1 -> setting -walletbroadcast=0\n", __func__); } Here's the relevant documentation: -blocksonly Whether to reject transactions from network peers. Transactions from the wallet or RPC are not affected. (default: 0) -walletbroadcast Make the wallet broadcast transactions (default: 1) Doesn't that imply that `blocksonly` *does* affect transactions from the wallet?
https://github.com/bitcoin/bitcoin/issues/17294
https://github.com/bitcoin/bitcoin/pull/18391
27a82d347eddfe1cde0005f8a2174274ab6efe9f
6cfb3dbbdbf575b4f3ab1fced3410d67c00d01de
2019-10-29T00:53:42Z
c++
2020-03-29T12:15:55Z
closed
bitcoin/bitcoin
https://github.com/bitcoin/bitcoin
17,287
[".gitignore", "build_msvc/.gitignore"]
Git ignore policy in build_msvc directory
``` $ git clone https://github.com/bitcoin/bitcoin.git $ cd bitcoin $ git ls-files --ignored --exclude-standard build_msvc/bitcoin-cli/bitcoin-cli.vcxproj build_msvc/bitcoin-qt/bitcoin-qt.vcxproj build_msvc/bitcoin-tx/bitcoin-tx.vcxproj build_msvc/bitcoin-wallet/bitcoin-wallet.vcxproj build_msvc/bitcoind/bitcoind.vcxproj build_msvc/common.init.vcxproj build_msvc/common.qt.init.vcxproj build_msvc/common.vcxproj build_msvc/libbitcoin_qt/libbitcoin_qt.vcxproj build_msvc/libbitcoinconsensus/libbitcoinconsensus.vcxproj build_msvc/libleveldb/libleveldb.vcxproj build_msvc/libsecp256k1/libsecp256k1.vcxproj build_msvc/libunivalue/libunivalue.vcxproj build_msvc/test_bitcoin-qt/test_bitcoin-qt.vcxproj build_msvc/test_bitcoin/test_bitcoin.vcxproj build_msvc/testconsensus/testconsensus.vcxproj contrib/init/org.bitcoin.bitcoind.plist contrib/macdeploy/fancy.plist src/qt/Makefile src/qt/test/Makefile src/test/Makefile src/univalue/gen/gen.cpp test/functional/data/wallets/high_minversion/db.log test/functional/data/wallets/high_minversion/wallet.dat ``` Is it correct to ignore mentioned above `*.vcxproj` files?
https://github.com/bitcoin/bitcoin/issues/17287
https://github.com/bitcoin/bitcoin/pull/18108
79c811ca2b922e19c4e6289bfd57481e587cd024
dcb7af053da8f4ce479db7e776802cea26e84434
2019-10-28T19:10:44Z
c++
2020-02-10T16:47:26Z
closed
bitcoin/bitcoin
https://github.com/bitcoin/bitcoin
17,269
["src/qt/modaloverlay.cpp", "src/qt/modaloverlay.h"]
Qt: If you reindex a black bar shows up on the bottom of the window when the sync overlay is hidden
I was testing from commit be50469217bd775c4305938634c32e5932f47841 and noticed that the "out of sync" overlay went away correctly after mining blocks, but then after restarting with --reindex this black bar shows up after the overlay is hidden. I've only tested this in regtest mode. I'm not sure that the issue is related to the overlay but it seems to show up right when the overlay is hidden. ![Screenshot_20191026_171200](https://user-images.githubusercontent.com/8107318/67627655-16153100-f815-11e9-967a-d5ea0a254965.png) On another system: Before reindex ![Screenshot_20191026_174635](https://user-images.githubusercontent.com/8107318/67627854-3515c200-f819-11e9-87b2-c6f8172480fd.png) After reindex ![Screenshot_20191026_174657](https://user-images.githubusercontent.com/8107318/67627855-38a94900-f819-11e9-87c1-c5296c1a2636.png)
https://github.com/bitcoin/bitcoin/issues/17269
https://github.com/bitcoin/bitcoin/pull/17968
0d5c18204b73ccb0d7c07f90c52de31edc25e28e
beb3844c45c57cdc0ae715c8fe22e1c310d82662
2019-10-27T00:52:26Z
c++
2020-05-29T08:30:36Z
closed
bitcoin/bitcoin
https://github.com/bitcoin/bitcoin
17,224
["src/Makefile.test.include"]
Unit test logs should be written to build path, not source path
When doing out-of-tree builds it's not expected that the build (or tests) clutter the source path. All build output should be written to the build path (the current directory when `configure` is run) and subdirectories of that. (*theoretically* it should even be possible to have the source on a read-only mount, but that's not really important imo, the point is to not clutter the git repository with build output) However, after running `make check` there will be a while slew of *.log files in the source directory: ```bash bitcoin$ ./autogen.sh bitcoin$ make build bitcoin$ cd build bitcoin/build$ ../configure ... bitcoin/build$ make check bitcoin/build$ cd .. bitcoin$ ls src/test/*.log src/test/addrman_tests.cpp.log src/test/compress_tests.cpp.log src/test/netbase_tests.cpp.log src/test/sigopcount_tests.cpp.log src/test/allocator_tests.cpp.log src/test/crypto_tests.cpp.log src/test/net_tests.cpp.log src/test/skiplist_tests.cpp.log src/test/amount_tests.cpp.log src/test/cuckoocache_tests.cpp.log src/test/pmt_tests.cpp.log src/test/streams_tests.cpp.log src/test/arith_uint256_tests.cpp.log src/test/dbwrapper_tests.cpp.log src/test/policyestimator_tests.cpp.log src/test/sync_tests.cpp.log ... ``` Either these files should be written to a temporary path (like the other test output), or to the build directory.
https://github.com/bitcoin/bitcoin/issues/17224
https://github.com/bitcoin/bitcoin/pull/24715
87dc1dc55ffaffd782a16c7b50e188433912a617
d2b4355c58687bd7b95ce5b6a62af70bfca66ccf
2019-10-23T09:07:00Z
c++
2022-03-31T06:27:15Z
closed
bitcoin/bitcoin
https://github.com/bitcoin/bitcoin
17,217
["src/wallet/ismine.h"]
doc: Add developer documentation to isminetype
Stuff like `ISMINE_USED` is not self-explanatory and completely undocumented: https://dev.visucore.com/bitcoin/doxygen/ismine_8h.html#a050f9a1a807967a24bcbeebfc5952533
https://github.com/bitcoin/bitcoin/issues/17217
https://github.com/bitcoin/bitcoin/pull/17350
4b15ffe9913e5f1e4d7a7922ddd7ef83e5b091d3
16ae3368f2a20cffa312b6ee9b724c1e302ca5fb
2019-10-22T15:13:57Z
c++
2021-01-26T00:24:35Z
closed
bitcoin/bitcoin
https://github.com/bitcoin/bitcoin
17,185
["src/zmq/zmqpublishnotifier.cpp", "test/functional/interface_zmq.py"]
invalid zmq argument syntax on windows causes abort
Version: 0.18.1 (64-bit) on Windows 10.0.18362.418 Using the following config, bitcoind crashes. This is not #15808 because the assignments are within the regtest section (see the comment on that issue). Seems like it is #7496 reappearing. ``` [regtest] rpcuser=user rpcpassword=pass rpcport=8332 server=1 zmqpubrawblock=127.0.0.1:40000 zmqpubrawtx=127.0.0.1:40000 ``` ``` PS C:\Program Files\Bitcoin\daemon> .\bitcoind -regtest -txindex 2019-10-18T07:05:41Z Bitcoin Core version v0.18.1 (release build) 2019-10-18T07:05:41Z Validating signatures for all blocks. 2019-10-18T07:05:41Z Setting nMinimumChainWork=0000000000000000000000000000000000000000000000000000000000000000 2019-10-18T07:05:41Z Using the 'sse4(1way),sse41(4way),avx2(8way)' SHA256 implementation 2019-10-18T07:05:41Z Using RdSeed as additional entropy source 2019-10-18T07:05:41Z Using RdRand as an additional entropy source 2019-10-18T07:05:41Z Default data directory C:\Users\janus\AppData\Roaming\Bitcoin 2019-10-18T07:05:41Z Using data directory C:\Users\janus\AppData\Roaming\Bitcoin\regtest 2019-10-18T07:05:41Z Config file: C:\Users\janus\AppData\Roaming\Bitcoin\bitcoin.conf 2019-10-18T07:05:41Z Using at most 125 automatic connections (2048 file descriptors available) 2019-10-18T07:05:41Z Using 16 MiB out of 32/2 requested for signature cache, able to store 524288 elements 2019-10-18T07:05:41Z Using 16 MiB out of 32/2 requested for script execution cache, able to store 524288 elements 2019-10-18T07:05:41Z Using 4 threads for script verification 2019-10-18T07:05:41Z scheduler thread start 2019-10-18T07:05:41Z libevent: getaddrinfo: nodename nor servname provided, or not known 2019-10-18T07:05:41Z Binding RPC on address ::1 port 8332 failed. 2019-10-18T07:05:41Z HTTP: creating work queue of depth 16 2019-10-18T07:05:41Z Config options rpcuser and rpcpassword will soon be deprecated. Locally-run instances may remove rpcuser to use cookie-based auth, or may be replaced with rpcauth. Please see share/rpcauth for rpcauth auth generation. 2019-10-18T07:05:41Z HTTP: starting 4 worker threads 2019-10-18T07:05:41Z Using wallet directory C:\Users\janus\AppData\Roaming\Bitcoin\regtest\wallets 2019-10-18T07:05:41Z init message: Verifying wallet(s)... 2019-10-18T07:05:41Z Using BerkeleyDB version Berkeley DB 4.8.30: (April 9, 2010) 2019-10-18T07:05:41Z Using wallet C:\Users\janus\AppData\Roaming\Bitcoin\regtest\wallets 2019-10-18T07:05:41Z BerkeleyEnvironment::Open: LogDir=C:\Users\janus\AppData\Roaming\Bitcoin\regtest\wallets\database ErrorFile=C:\Users\janus\AppData\Roaming\Bitcoin\regtest\wallets\db.log 2019-10-18T07:05:42Z init message: Loading banlist... 2019-10-18T07:05:42Z ERROR: DeserializeFileDB: Failed to open file C:\Users\janus\AppData\Roaming\Bitcoin\regtest\banlist.dat 2019-10-18T07:05:42Z Invalid or missing banlist.dat; recreating Assertion failed! Program: C:\Program Files\Bitcoin\daemon\bitcoind.exe File: zmq/zmqpublishnotifier.cpp, Line 115 Expression: psocket PS C:\Program Files\Bitcoin\daemon> ```
https://github.com/bitcoin/bitcoin/issues/17185
https://github.com/bitcoin/bitcoin/pull/17445
80fdb6fad132166b10fbeb8615e3c5c591209e0b
3e730bf90aaf53c41ff3a778f6aac15d163d1c0c
2019-10-18T07:13:01Z
c++
2019-11-11T22:22:32Z
closed
bitcoin/bitcoin
https://github.com/bitcoin/bitcoin
17,181
["src/Makefile.am", "src/rpc/blockchain.cpp", "src/rpc/misc.cpp", "src/rpc/util.h", "src/util/check.h", "test/functional/rpc_misc.py"]
rpc: Logic errors and asserts in rpc code
Currently, we use `assert` in RPC code to document logic and code assumptions. However, it seems a bit extreme to abort all of Bitcoin Core on an assert failure in one of the RPC threads. I suggest to replace all checks with a macro `THROW_LOGIC_ERROR_IF_ASSERT_FAILS(condition)` that does what it says. That logic error will then be returned to the rpc caller and will include instructions to report the error to our issue tracker. Any objections or naming suggestions for that macro?
https://github.com/bitcoin/bitcoin/issues/17181
https://github.com/bitcoin/bitcoin/pull/17192
0ff7cd7d0c074448db636bcc73e7879b7e4b21ec
faeb6665362e35f573ad715ade0ef2db62d71839
2019-10-17T20:38:50Z
c++
2019-10-18T21:19:36Z
closed
bitcoin/bitcoin
https://github.com/bitcoin/bitcoin
17,179
["src/util/system.cpp"]
macos: shutdown on first run due to -psn_ parameter
When downloading and running Bitcoin core for the first time, after clicking through the "Are you sure you want to open. it?" screen, there's a possibility that macOS will pass an argument like `-psn_0_SOME_ID` to the application, which results in a shutdown as it's an invalid argument: ![v0 19 0rc1 args shutdown](https://user-images.githubusercontent.com/863730/67034964-b026fc00-f0e6-11e9-8462-70d0fcf613e6.png) This only happens on the first run, subsequent opens will work fine, but we should filter these out, otherwise it's a poor and confusing first experience.
https://github.com/bitcoin/bitcoin/issues/17179
https://github.com/bitcoin/bitcoin/pull/17184
4daadce36cfe9baa63c4d7d70de027add03a00df
b5f0be38790ecc87a1e537edeca5923f608bc68c
2019-10-17T18:07:55Z
c++
2019-10-18T06:12:15Z