Commit Graph

29972 Commits

Author SHA1 Message Date
Andrew Chow
43225f0a2a guix: Remove extra \r from all.SHA256SUMS line ending
guix-attest mistakenly added an extra \r to the line endings in
all.SHA256SUMS, causing guix-verify to erroneously fail.

Co-Authored-By: Carl Dong <contact@carldong.me>
2021-07-28 12:59:47 -04:00
Andrew Chow
d080c27066 guix, doc: Add a note that codesigners need to rebuild after tagging
One of the issues observed during the 22.0rc1 release process was that a
codesigner's attestation mismatched non-codesigner attestations because
the guix-codesign step was performed prior to tagging the version in
bitcoin-detached-sigs.
2021-07-28 12:59:47 -04:00
Andrew Chow
4a466388a0 guix: Allow changing the base manifest in guix-verify
When verifying guix attestations, it is useful to set a particular
signer's manifest as the base to compare against.
2021-07-22 18:48:25 -04:00
Andrew Chow
33455c7696 guix: Make all.SHA256SUMS rather than codesigned.SHA256SUMS 2021-07-22 17:57:35 -04:00
W. J. van der Laan
5d83e7d714
Merge bitcoin/bitcoin#21090: Default to NODE_WITNESS in nLocalServices
a806647d26 [validation] Always include merkle root in coinbase commitment (Dhruv Mehta)
189128c220 [validation] Set witness script flag with p2sh for blocks (Dhruv Mehta)
ac82b99db7 [p2p] remove redundant NODE_WITNESS checks (Dhruv Mehta)
6f8b198b82 [p2p] remove unused segwitheight=-1 option (Dhruv Mehta)
eba5b1cd64 [test] remove or move tests using `-segwitheight=-1` (Dhruv Mehta)

Pull request description:

  Builds on #21009 and makes progress on remaining items in #17862

  Removing `RewindBlockIndex()` in #21009 allows the following:

  - removal of tests using `segwitheight=-1` in `p2p_segwit.py`.
  - move `test_upgrade_after_activation()` out of `p2p_segwit.py` reducing runtime
  - in turn, that allows us to drop support for `-segwitheight=-1`, which is only supported for that test.
  - that allows us to always set `NODE_WITNESS` in our local services. The only reason we don't do that is to support `-segwitheight=-1`.
  - that in turn allows us to drop all of the `GetLocalServices() & NODE_WITNESS` checks inside `net_processing.cpp`, since our local services would always include `NODE_WITNESS`

ACKs for top commit:
  mzumsande:
    Code-Review ACK a806647d26
  laanwj:
    Code review ACK a806647d26, nice cleanup
  jnewbery:
    utACK a806647d26
  theStack:
    ACK a806647d26

Tree-SHA512: 73e1a69d1d7eca1f5c38558ec6672decd0b60b16c2ef6134df6f6af71bb159e6eea160f9bb5ab0eb6723c6632d29509811e29469d0d87abbe9b69a2890fbc73e
2021-07-22 17:36:38 +02:00
MarcoFalke
bfa52cbddf
Merge bitcoin/bitcoin#22493: fuzz: Extend addrman fuzz test with deserialize
aaaa9c6019 fuzz: Extend addrman fuzz test with deserialize (MarcoFalke)

Pull request description:

  Requested on IRC:

  ```
  [18:01] <vasild> => I think there is a good chance fuzzing addrman unserialize will find more bugs
  [18:04] <sipa> definitely

ACKs for top commit:
  jonatack:
    ACK aaaa9c6019 per `git diff fa74025 aaaa9c6`
  vasild:
    ACK aaaa9c6019

Tree-SHA512: f57d0aecf22a933e48d3181d7398218949588dd0de31218d1d28c825649e55fd60b0de6fbc92d2497cf5639a4adc2061c9bf8216546a2be916feac4f03f16e8f
2021-07-22 16:55:43 +02:00
W. J. van der Laan
3f083a5bbd
Merge bitcoin/bitcoin#22481: mempool: apply rule of 5 to epochguard.h, fix compiler warnings
7b3a20b260 mempool: apply rule of 5 to epochguard.h, fix compiler warnings (Jon Atack)

Pull request description:

  Apply the rule of five to `src/util/epochguard.h::{Epoch, Marker}` for safety, which also nicely fixes the `-Wdeprecated-copy` compiler warnings with Clang 13.

  References:

  - https://en.cppreference.com/w/cpp/language/rule_of_three
  - https://www.stroustrup.com/C++11FAQ.html#default
  - https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rc-five

  <details><summary>Compiler warnings fixed</summary><p>

  ```bash
  In file included from policy/rbf.cpp:5:
  In file included from ./policy/rbf.h:8:
  In file included from ./txmempool.h:24:
  ./util/epochguard.h:53:17: warning: definition of implicit copy constructor for 'Marker' is deprecated because it has a user-declared copy assignment operator [-Wdeprecated-copy]
          Marker& operator=(const Marker&) = delete;
                  ^
  ./txmempool.h:81:7: note: in implicit copy constructor for 'Epoch::Marker' first required here
  class CTxMemPoolEntry
        ^
  policy/rbf.cpp:29:29: note: in implicit copy constructor for 'CTxMemPoolEntry' first required here
      CTxMemPoolEntry entry = *pool.mapTx.find(tx.GetHash());
  ```

  ```bash
  In file included from txmempool.cpp:6:
  In file included from ./txmempool.h:24:
  ./util/epochguard.h:53:17: warning: definition of implicit copy constructor for 'Marker' is deprecated because it has a user-declared copy assignment operator [-Wdeprecated-copy]
          Marker& operator=(const Marker&) = delete;
                  ^
  ./txmempool.h:81:7: note: in implicit copy constructor for 'Epoch::Marker' first required here
  class CTxMemPoolEntry
        ^
  /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ext/new_allocator.h:150:23: note: in implicit copy constructor for 'CTxMemPoolEntry' first required here
          { ::new((void *)__p) _Up(std::forward<_Args>(__args)...); }
                               ^
  /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/alloc_traits.h:512:8: note: in instantiation of function template specialization '__gnu_cxx::new_allocator<boost::multi_index::detail::hashed_index_node<boost::multi_index::detail::hashed_index_node<boost::multi_index::detail::ordered_index_node<boost::multi_index::detail::null_augment_policy, boost::multi_index::detail::ordered_index_node<boost::multi_index::detail::null_augment_policy, boost::multi_index::detail::ordered_index_node<boost::multi_index::detail::null_augment_policy, boost::multi_index::detail::index_node_base<CTxMemPoolEntry, std::allocator<CTxMemPoolEntry>>>>>>>>::construct<CTxMemPoolEntry, const CTxMemPoolEntry &>' requested here
            __a.construct(__p, std::forward<_Args>(__args)...);
                ^
  /usr/include/boost/multi_index_container.hpp:655:24: note: in instantiation of function template specialization 'std::allocator_traits<std::allocator<boost::multi_index::detail::hashed_index_node<boost::multi_index::detail::hashed_index_node<boost::multi_index::detail::ordered_index_node<boost::multi_index::detail::null_augment_policy, boost::multi_index::detail::ordered_index_node<boost::multi_index::detail::null_augment_policy, boost::multi_index::detail::ordered_index_node<boost::multi_index::detail::null_augment_policy, boost::multi_index::detail::index_node_base<CTxMemPoolEntry, std::allocator<CTxMemPoolEntry>>>>>>>>>::construct<CTxMemPoolEntry, const CTxMemPoolEntry &>' requested here
      node_alloc_traits::construct(
                         ^
  /usr/include/boost/multi_index/detail/index_base.hpp:108:15: note: in instantiation of member function 'boost::multi_index::multi_index_container<CTxMemPoolEntry, boost::multi_index::indexed_by<boost::multi_index::hashed_unique<mempoolentry_txid, SaltedTxidHasher>, boost::multi_index::hashed_unique<boost::multi_index::tag<index_by_wtxid>, mempoolentry_wtxid, SaltedTxidHasher>, boost::multi_index::ordered_non_unique<boost::multi_index::tag<descendant_score>, boost::multi_index::identity<CTxMemPoolEntry>, CompareTxMemPoolEntryByDescendantScore>, boost::multi_index::ordered_non_unique<boost::multi_index::tag<entry_time>, boost::multi_index::identity<CTxMemPoolEntry>, CompareTxMemPoolEntryByEntryTime>, boost::multi_index::ordered_non_unique<boost::multi_index::tag<ancestor_score>, boost::multi_index::identity<CTxMemPoolEntry>, CompareTxMemPoolEntryByAncestorFee>>>::construct_value' requested here
        final().construct_value(x,v);
                ^
  /usr/include/boost/multi_index/detail/ord_index_impl.hpp:770:33: note: (skipping 5 contexts in backtrace; use -ftemplate-backtrace-limit=0 to see all)
      final_node_type* res=super::insert_(v,x,variant);
                                  ^
  /usr/include/boost/multi_index_container.hpp:693:33: note: in instantiation of function template specialization 'boost::multi_index::detail::hashed_index<mempoolentry_txid, SaltedTxidHasher, std::equal_to<uint256>, boost::multi_index::detail::nth_layer<1, CTxMemPoolEntry, boost::multi_index::indexed_by<boost::multi_index::hashed_unique<mempoolentry_txid, SaltedTxidHasher>, boost::multi_index::hashed_unique<boost::multi_index::tag<index_by_wtxid>, mempoolentry_wtxid, SaltedTxidHasher>, boost::multi_index::ordered_non_unique<boost::multi_index::tag<descendant_score>, boost::multi_index::identity<CTxMemPoolEntry>, CompareTxMemPoolEntryByDescendantScore>, boost::multi_index::ordered_non_unique<boost::multi_index::tag<entry_time>, boost::multi_index::identity<CTxMemPoolEntry>, CompareTxMemPoolEntryByEntryTime>, boost::multi_index::ordered_non_unique<boost::multi_index::tag<ancestor_score>, boost::multi_index::identity<CTxMemPoolEntry>, CompareTxMemPoolEntryByAncestorFee>>, std::allocator<CTxMemPoolEntry>>, boost::mpl::vector0<>, boost::multi_index::detail::hashed_unique_tag>::insert_<boost::multi_index::detail::lvalue_tag>' requested here
      final_node_type* res=super::insert_(v,x,variant);
                                  ^
  /usr/include/boost/multi_index_container.hpp:705:12: note: in instantiation of function template specialization 'boost::multi_index::multi_index_container<CTxMemPoolEntry, boost::multi_index::indexed_by<boost::multi_index::hashed_unique<mempoolentry_txid, SaltedTxidHasher>, boost::multi_index::hashed_unique<boost::multi_index::tag<index_by_wtxid>, mempoolentry_wtxid, SaltedTxidHasher>, boost::multi_index::ordered_non_unique<boost::multi_index::tag<descendant_score>, boost::multi_index::identity<CTxMemPoolEntry>, CompareTxMemPoolEntryByDescendantScore>, boost::multi_index::ordered_non_unique<boost::multi_index::tag<entry_time>, boost::multi_index::identity<CTxMemPoolEntry>, CompareTxMemPoolEntryByEntryTime>, boost::multi_index::ordered_non_unique<boost::multi_index::tag<ancestor_score>, boost::multi_index::identity<CTxMemPoolEntry>, CompareTxMemPoolEntryByAncestorFee>>>::insert_<boost::multi_index::detail::lvalue_tag>' requested here
      return insert_(v,detail::lvalue_tag());
             ^
  /usr/include/boost/multi_index/detail/index_base.hpp:213:21: note: in instantiation of member function 'boost::multi_index::multi_index_container<CTxMemPoolEntry, boost::multi_index::indexed_by<boost::multi_index::hashed_unique<mempoolentry_txid, SaltedTxidHasher>, boost::multi_index::hashed_unique<boost::multi_index::tag<index_by_wtxid>, mempoolentry_wtxid, SaltedTxidHasher>, boost::multi_index::ordered_non_unique<boost::multi_index::tag<descendant_score>, boost::multi_index::identity<CTxMemPoolEntry>, CompareTxMemPoolEntryByDescendantScore>, boost::multi_index::ordered_non_unique<boost::multi_index::tag<entry_time>, boost::multi_index::identity<CTxMemPoolEntry>, CompareTxMemPoolEntryByEntryTime>, boost::multi_index::ordered_non_unique<boost::multi_index::tag<ancestor_score>, boost::multi_index::identity<CTxMemPoolEntry>, CompareTxMemPoolEntryByAncestorFee>>>::insert_' requested here
      {return final().insert_(x);}
                      ^
  /usr/include/boost/multi_index/hashed_index.hpp:284:46: note: in instantiation of member function 'boost::multi_index::detail::index_base<CTxMemPoolEntry, boost::multi_index::indexed_by<boost::multi_index::hashed_unique<mempoolentry_txid, SaltedTxidHasher>, boost::multi_index::hashed_unique<boost::multi_index::tag<index_by_wtxid>, mempoolentry_wtxid, SaltedTxidHasher>, boost::multi_index::ordered_non_unique<boost::multi_index::tag<descendant_score>, boost::multi_index::identity<CTxMemPoolEntry>, CompareTxMemPoolEntryByDescendantScore>, boost::multi_index::ordered_non_unique<boost::multi_index::tag<entry_time>, boost::multi_index::identity<CTxMemPoolEntry>, CompareTxMemPoolEntryByEntryTime>, boost::multi_index::ordered_non_unique<boost::multi_index::tag<ancestor_score>, boost::multi_index::identity<CTxMemPoolEntry>, CompareTxMemPoolEntryByAncestorFee>>, std::allocator<CTxMemPoolEntry>>::final_insert_' requested here
      std::pair<final_node_type*,bool> p=this->final_insert_(x);
                                               ^
  txmempool.cpp:363:53: note: in instantiation of member function 'boost::multi_index::detail::hashed_index<mempoolentry_txid, SaltedTxidHasher, std::equal_to<uint256>, boost::multi_index::detail::nth_layer<1, CTxMemPoolEntry, boost::multi_index::indexed_by<boost::multi_index::hashed_unique<mempoolentry_txid, SaltedTxidHasher>, boost::multi_index::hashed_unique<boost::multi_index::tag<index_by_wtxid>, mempoolentry_wtxid, SaltedTxidHasher>, boost::multi_index::ordered_non_unique<boost::multi_index::tag<descendant_score>, boost::multi_index::identity<CTxMemPoolEntry>, CompareTxMemPoolEntryByDescendantScore>, boost::multi_index::ordered_non_unique<boost::multi_index::tag<entry_time>, boost::multi_index::identity<CTxMemPoolEntry>, CompareTxMemPoolEntryByEntryTime>, boost::multi_index::ordered_non_unique<boost::multi_index::tag<ancestor_score>, boost::multi_index::identity<CTxMemPoolEntry>, CompareTxMemPoolEntryByAncestorFee>>, std::allocator<CTxMemPoolEntry>>, boost::mpl::vector0<>, boost::multi_index::detail::hashed_unique_tag>::insert' requested here
      indexed_transaction_set::iterator newit = mapTx.insert(entry).first;
  ```

  ```bash
  In file included from test/fuzz/policy_estimator.cpp:9:
  In file included from ./test/fuzz/util.h:27:
  In file included from ./txmempool.h:24:
  ./util/epochguard.h:53:17: warning: definition of implicit copy constructor for 'Marker' is deprecated because it has a user-declared copy assignment operator [-Wdeprecated-copy]
          Marker& operator=(const Marker&) = delete;
                  ^
  ./txmempool.h:81:7: note: in implicit copy constructor for 'Epoch::Marker' first required here
  class CTxMemPoolEntry
        ^
  /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/ext/new_allocator.h:150:23: note: in implicit move constructor for 'CTxMemPoolEntry' first required here
          { ::new((void *)__p) _Up(std::forward<_Args>(__args)...); }
                               ^
  /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/alloc_traits.h:512:8: note: in instantiation of function template specialization '__gnu_cxx::new_allocator<CTxMemPoolEntry>::construct<CTxMemPoolEntry, CTxMemPoolEntry>' requested here
            __a.construct(__p, std::forward<_Args>(__args)...);
                ^
  /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/vector.tcc:115:21: note: in instantiation of function template specialization 'std::allocator_traits<std::allocator<CTxMemPoolEntry>>::construct<CTxMemPoolEntry, CTxMemPoolEntry>' requested here
              _Alloc_traits::construct(this->_M_impl, this->_M_impl._M_finish,
                             ^
  /usr/bin/../lib/gcc/x86_64-linux-gnu/10/../../../../include/c++/10/bits/stl_vector.h:1204:9: note: in instantiation of function template specialization 'std::vector<CTxMemPoolEntry>::emplace_back<CTxMemPoolEntry>' requested here
        { emplace_back(std::move(__x)); }
          ^
  test/fuzz/policy_estimator.cpp:49:37: note: in instantiation of member function 'std::vector<CTxMemPoolEntry>::push_back' requested here
                      mempool_entries.push_back(ConsumeTxMemPoolEntry(fuzzed_data_provider, tx));
  ```
  </p></details>

ACKs for top commit:
  laanwj:
    Code review ACK 7b3a20b260
  vasild:
    ACK 7b3a20b260

Tree-SHA512: 0406dfcec180152d4f9ed07cbc2f406ad739b41f9c9cb38f8c75159c15d9d8a9a5c7526765966e40d695d265c178f6a80152e7edf82da344a65e55938dddb63d
2021-07-22 14:57:21 +02:00
W. J. van der Laan
36aee0f353
Merge bitcoin-core/gui#381: refactor: Make BitcoinCore class reusable
8169fc4e73 qt, refactor: Fix code styling of moved InitExecutor class (Hennadii Stepanov)
c82165a557 qt, refactor: Move InitExecutor class into its own module (Hennadii Stepanov)
dbcf56b6c6 scripted-diff: Rename BitcoinCore class to InitExecutor (Hennadii Stepanov)
19a1d00831 qt: Add BitcoinCore::m_thread member (Hennadii Stepanov)

Pull request description:

  This PR makes the `BitcoinCore` class reusable, i.e., it can be used by the widget-based GUI or by the [QML-based](https://github.com/bitcoin-core/gui-qml/tree/main/src/qml) one, and it makes the divergence between these two repos minimal.

  The small benefit to the current branch is more structured code.

  Actually, this PR is ported from https://github.com/bitcoin-core/gui-qml/pull/10.
  The example of the re-using of the `BitcoinCore` class is https://github.com/bitcoin-core/gui-qml/pull/11.

ACKs for top commit:
  laanwj:
    ACK 8169fc4e73
  ryanofsky:
    Code review ACK 8169fc4e73. Only change is switching from `m_executor` from pointer to optional type (thanks for update!)

Tree-SHA512: a0552c32d26d9acf42921eb12bcdf68f02d52f7183c688c43257b1a58679f64e45f193ee2d316850c7f0f516561e17abe989fe545bfa05e158ad3f4c66d19bca
2021-07-22 10:02:10 +02:00
MarcoFalke
ba15ab4990
Merge bitcoin/bitcoin#22218: multiprocess: Add ipc::Context and ipc::capnp::Context structs
3e33d170cc Add ipc::Context and ipc::capnp::Context structs (Russell Yanofsky)

Pull request description:

  These are currently empty structs but they will be used to pass some function and object pointers from bitcoin application code to IPC hooks that run, for example, when a remote object is created or destroyed, or a new process is created.

  ---

  This PR is part of the [process separation project](https://github.com/bitcoin/bitcoin/projects/10). The commit was first part of larger PR #10102.

ACKs for top commit:
  ariard:
    Code Review ACK 3e33d170

Tree-SHA512: fd949fae5f1a973d39cb97f2745821ab2f62b98e166e53bc2801f97dcde988e18faaaaa0ffc2a82c170938b3a18078b6162fa35460e6e7c635e681b3c9e5b0a6
2021-07-22 08:26:30 +02:00
MarcoFalke
a3791da0e8
Merge bitcoin/bitcoin#22428: [Refactor] Rename scriptPubKey -> exec_script
007910388b [Refactor] Rename scriptPubKey -> exec_script (sanket1729)

Pull request description:

  Rename scriptPubKey to witness_script in ExecuteWitnessScript() function to correctly reflect which script is being executed.

  For example in segwitv0, this scriptPubKey refers to the script of the form `OP_0 <script_hash>`, but witness_script refers to the script that actually hashes to the `script_hash`.

  If there is a reason why it's named this way, I would love to know

ACKs for top commit:
  MarcoFalke:
    review ACK 007910388b 🖖
  theStack:
    ACK 007910388b
  lsilva01:
    Code Review 007910388b ACK

Tree-SHA512: 768e10e656b60b1293beb560fb7adbc2c1495e6db1f54f0c2c63109692ae0c579c856b194b33f72afd0d332159a9796c0e2bd99b79ea5c4b1803469a81301fd6
2021-07-21 15:05:14 +02:00
MarcoFalke
cac38cdd02
Merge bitcoin/bitcoin#21832: cli: Improve -getinfo return format
a37e29d32f cli: Implement human readable -getinfo. (Klement Tan)

Pull request description:

  # Overview
  **Description** This PR changes the return format of `-getinfo`

  **Rationale**
  - make `-getinfo` more user-friendly
  - uses less vertical screen space.

  Fixes: Issue 17314(Not linking issue to prevent it from closing)
  > Alternative, more human-friendly, format besides JSON? Colors, progress bars

  ### Return Format
  ```bash
  // Data from getblockchaininfo
  Chain: [getblockchaininfo.chain]
  Blocks: [getblockchaininfo.blocks]
  Headers: [getblockchaininfo.headers]
  Verification progress: [getblockchaininfo.verificationprogress]
  Difficulty: [getblockchaininfo.difficulty]

  # Data from getnetworkinfo
  Network: in [getnetworkinfo.connections_in], out [getnetworkinfo.connections_out], total [getnetworkinfo.connections]
  Version: [getnetworkinfo.version]
  Time offset (s): [getnetworkinfo.timeoffset]
  Proxy: [getnetworkinfo.proxy] // "N/A" if no proxy
  Min tx relay fee rate (BTC/kvB): [getnetworkinfo.relayfee]

  # Data from getwalletinfo. Will only be present when a single wallet is loaded
  Wallet: [getnetworkinfo.walletname] // "" if walletname is empty(default wallet)
  Keypool size: [getnetworkinfo.keypoolsize]
  Unlocked until: [getnetworkinfo.unlocked_until]
  Transaction fee rate (-paytxfee) (BTC/kvB): [getnetworkinfo.paytxfee]

  # Data from getbalances. Will only be present when a single wallet is loaded
  Balance: [getbalances.mine.trusted]

  # Data from listwallets then getbalances for each wallet. Will only be present for multiple wallets loaded
  Balances
  [getbalances.mine.trusted] [listwallets[i]] // Right justify on balance

  Warnings: [getnetworkinfo.warnings]
  ```
  #### Coloring
  The following lines would be colored to better show the differences between the various `-getinfo` components. However, this will not apply for `WIN32`(ANSI code not supported) and users that connect the `stdout` to a non-terminal process.
  - `Chain: ...`:  BLUE(`\x1B[34m`)
  - `Network: ...`: GREEN(`\x1B[32m`)
  - `Wallet: ...`: MAGENTA(`\x1B[35m`)
  - `Balance: ...` CYAN(`\x1B[36m`)
  - `Balances: ...` CYAN(`\x1B[36m`)
  - `Warnings: ...` Yellow(`\x1B[33m`)

  ### Screenshots

  *No wallet loaded:*
  ![image](https://user-images.githubusercontent.com/49265907/121794631-94b62080-cc3c-11eb-8627-d0d1c25f0878.png)

  *Single wallet loaded*
  ![image](https://user-images.githubusercontent.com/49265907/121794619-6df7ea00-cc3c-11eb-8420-d0c18236b188.png)

  *Multi wallet loaded*
  ![image](https://user-images.githubusercontent.com/49265907/121794626-810aba00-cc3c-11eb-8cd7-c15ede1918ac.png)

  # Reviewing Notes

  ## Testing Scenarios

  **1. No wallet loaded**
  - When there no wallets are loaded(Unload wallet with `./src/bitcoin-cli unloadwallet "YOUR_WALLETNAME"`
  -  Test with `./src/bitcoin-cli -getinfo`.
  - Should only display `chain` and `network` segment

  **2. Single wallet loaded**
  - When only a single wallet loaded or `-rpcwallet` is set(Load wallet with `./src/bitcoin-cli loadwallet "YOUR_WALLETNAME"`)
  - Test with `./src/bitcoin-cli -rpcwallet="YOUR_WALLETNAME" -getinfo`(Load wallet with `./src/bitcoin-cli loadwallet "YOUR_WALLETNAME"`)
  - Should only display `chain`, `network`, `wallet` and `balance` segment

  **3. Multiple wallet loaded**
  - When there are multiple wallets loaded(Load wallet with `./src/bitcoin-cli loadwallet "YOUR_WALLETNAME"`)
  - Test with `./src/bitcoin-cli -getinfo`
  - Should only display `chain`, `network` and `balances` segment

  ## Implementation

  **Current Flow**
  1. `GetinfoRequestHandler` is instantiated
  2. `ConnectAndCallRPC` is called with `GetinfoRequestHandler`. It returns `UniValue::VOBJ result`
  3. If `-rpcwallet` wallet is not set, `GetWalletBalances` is called with a pointer to `result` as a parameter. It adds the balances for all the wallets to `result`

  **New Flow**
  1. `GetinfoRequestHandler` is instantiated
  2. `ConnectAndCallRPC` is called with `GetinfoRequestHandler`. It returns `UniValue::VOBJ result`
  3. If `-rpcwallet` wallet is not set, `GetWalletBalances` is called with a pointer to `result` as a parameter. It adds the balances for all the wallets to `result`
  4. **New** `ParseGetInfoResult` is called with `result` as parameter. It converts results type from `UniValue::VOBJ` to `UniValue::VSTR` according to the format stated above.

ACKs for top commit:
  theStack:
    re-ACK a37e29d32f

Tree-SHA512: 5e90606a397abfc4e5921f6db70a0a4888cbebba9da9b70cfe72d593caf669fd090de3e58eecf1cb5c20d5f448ad278999165d32d01667037d09bd352d23ac5d
2021-07-21 14:15:18 +02:00
Klement Tan
a37e29d32f
cli: Implement human readable -getinfo. 2021-07-21 19:27:04 +08:00
W. J. van der Laan
1c046bb7ac
Merge bitcoin/bitcoin#22288: Resolve Tor control plane address
cdd51e8ee1 torcontrol: Resolve Tor control plane address (Adrian-Stefan Mares)

Pull request description:

  Closes https://github.com/bitcoin/bitcoin/issues/22236

  This PR forces the Tor control plane address to be resolved before a connection attempt is made, similar to how the `-proxy` / `-onion` address is resolved.

  The use case for this change is that the control plane may not have a stable address - in a containerized environment perhaps.

ACKs for top commit:
  jonatack:
    ACK cdd51e8ee1 tested various configurations on signet with this branch versus master
  laanwj:
    LGTM ACK cdd51e8ee1
  theStack:
    ACK cdd51e8ee1 🪐
  prayank23:
    ACK cdd51e8ee1

Tree-SHA512: 5335cfcb89089a2acd6d02b88c2022dec60bb74388a99187c901c1c35d32896814d5f81df55c053953276c51fcec263c6ddadd068316f8e428b841bd599fc21e
2021-07-21 12:40:36 +02:00
MarcoFalke
10eb000409
Merge bitcoin/bitcoin#22515: doc: clean out release notes post branch-off
2ce7f95d4a doc: clean out release notes post branch-off (fanquake)

Pull request description:

  Should probably be done, given we've already had a PR add a release note for 23.0 (#22407).

ACKs for top commit:
  MarcoFalke:
    ACK 2ce7f95d4a

Tree-SHA512: 1c524b55daecb8c69e110759b82a5caf31080ea7abbae39ecfefe0107786199623499c9950dedd8e72594a55b072eda93801ee787e896a3f242cde73d8a984f6
2021-07-21 11:26:24 +02:00
fanquake
2ce7f95d4a
doc: clean out release notes post branch-off 2021-07-21 17:19:48 +08:00
MarcoFalke
40fed336b2
Merge bitcoin/bitcoin#22510: test: add test for RPC error 'Transaction already in block chain'
2ebf2fe0e4 test: check for RPC error 'Transaction already in block chain' (-27) (Sebastian Falbesoner)

Pull request description:

  This PR adds missing test coverage for the RPC error "Transaction already in block chain" (error code `RPC_VERIFY_ALREADY_IN_CHAIN` = `RPC_TRANSACTION_ALREADY_IN_CHAIN` = -27), which is thrown in the function `BroadcastTransaction` (src/node/transaction.cpp).

ACKs for top commit:
  kristapsk:
    ACK 2ebf2fe0e4 (ran linter, looked at changes and ran modified test and checked code in `src/node/transaction.cpp`)
  darosior:
    ACK 2ebf2fe0e4

Tree-SHA512: 8bfbd3ff3da0cb3b8745f69b8ca2377f85fa99f0270750840b60e6ae43b5645c5c59b236993e8b2ad0444ec4171484e4f1ee23fa7e81b79d4222bcb623666fa5
2021-07-21 11:10:58 +02:00
MarcoFalke
a273e3c58a
Merge bitcoin/bitcoin#21934: RPC/blockchain: getblockchaininfo: Include versionbits signalling details during LOCKED_IN
2b19f3443e RPC/blockchain: getblockchaininfo: Include versionbits signalling details during LOCKED_IN (Luke Dashjr)

Pull request description:

  While the signal has no effect during `LOCKED_IN`, the bit is still defined and recommended for measuring uptake. Makes sense to expose statistics too.

ACKs for top commit:
  prayank23:
    ACK 2b19f3443e
  Sjors:
    tACK 2b19f34
  theStack:
    Tested ACK 2b19f3443e
  MarcoFalke:
    review-only ACK 2b19f3443e

Tree-SHA512: a9bb5adb21992586119cbb5f87e5348eabcab11d5a3bf769b00b69e466589a669846e503f8384fa8927fd77da0c2d64a54f13a7a55a62980046d70f8255ddf47
2021-07-21 09:50:21 +02:00
MarcoFalke
458d6ac23b
Merge bitcoin/bitcoin#22407: rpc: Return block time in getblockchaininfo
20edf4bcf6 rpc: Return block time in getblockchaininfo (João Barbosa)

Pull request description:

  Return tip time in `getblockchaininfo`, for some use cases this can save a call to `getblock`.

ACKs for top commit:
  naumenkogs:
    ACK 20edf4bcf6
  theStack:
    re-ACK 20edf4bcf6
  0xB10C:
    ACK 20edf4bcf6
  kristapsk:
    ACK 20edf4bcf6
  Zero-1729:
    re-ACK 20edf4bcf6

Tree-SHA512: 29a920cfff1ef53e0af601c3f93f8f9171f3be47fc84b0fa293cb865b824976e8c1510b17b27d17daf0b8e658dd77d9dc388373395f0919fc4a23cd5019642d5
2021-07-21 09:47:35 +02:00
fanquake
7fc9a45f47
Merge bitcoin/bitcoin#22469: build: Add support for Android NDK r22+
acaac6e86a ci: Bump Android NDK to r22 which supports std::filesystem (Hennadii Stepanov)
cac7890386 build: Add support for Android NDK r22+ (Hennadii Stepanov)

Pull request description:

  This is required to support [`std::filesystem`](https://github.com/android/ndk/wiki/Changelog-r22#changes) on Android (see #20744).

  Fixes #22074.

ACKs for top commit:
  icota:
    re-tACK acaac6e86a

Tree-SHA512: ecbec374ee590c4cb30012210f1422d469e7e8b68989f9eb53d36b5feee150d31e6bd10e1fc4a2056fbf4f8f8513e435b446e5feaf21a3a4d09dfc561fb22e73
2021-07-21 15:36:03 +08:00
fanquake
0fffd6c4fb
Merge bitcoin/bitcoin#22505: addrman: Remove unused test_before_evict argument from Good()
f036dfbb69 [addrman] Remove unused test_before_evict argument from Good() (John Newbery)

Pull request description:

  This has never been used in the public interface method since it was
  introduced in #9037.

ACKs for top commit:
  lsilva01:
    Tested ACK f036dfbb69 on Ubuntu 20.04.
  theStack:
    Code-review ACK f036dfbb69

Tree-SHA512: 98145d9596b4ae1f354cfa561be1a54c6b8057c920e0ac3d4c1d42c9326b2dad2d44320f4171bb701d97088b216760cca8017b84c8b5dcd2b1dc8f158f28066d
2021-07-21 12:32:44 +08:00
Sebastian Falbesoner
2ebf2fe0e4 test: check for RPC error 'Transaction already in block chain' (-27) 2021-07-20 22:50:14 +02:00
W. J. van der Laan
bb09ec6f10
Merge bitcoin/bitcoin#22507: doc: Adjust commit message template for the guix.sigs repo
fafade9c79 doc: Adjust commit message template for the guix.sigs repo (MarcoFalke)

Pull request description:

  Seems to be the most common template used, so adjust this here, too.

ACKs for top commit:
  laanwj:
    ACK fafade9c79
  hebasto:
    re-ACK fafade9c79

Tree-SHA512: 20477d14ecfad94f3b28b94786a4c0d98df539360d0c1deefa94766064a7d0700c849e54d6b251f922e135fcfa964ada0c724090f7f92b459ea39f7c3ca8c65d
2021-07-20 20:34:22 +02:00
MarcoFalke
fafade9c79
doc: Adjust commit message template for the guix.sigs repo 2021-07-20 17:49:44 +02:00
MarcoFalke
951850bebf
Merge bitcoin/bitcoin#22371: Move pblocktree global to BlockManager
faa54e3757 Move pblocktree global to BlockManager (MarcoFalke)
fa27f03b49 Move LoadBlockIndexDB to BlockManager (MarcoFalke)

Pull request description:

  The block tree db is used within BlockManager to write and read the block index, so make the db global a member variable of BlockManager.

ACKs for top commit:
  jamesob:
    ACK faa54e3757 ([`jamesob/ackr/22371.1.MarcoFalke.move_pblocktree_global_t`](https://github.com/jamesob/bitcoin/tree/ackr/22371.1.MarcoFalke.move_pblocktree_global_t))
  theStack:
    re-ACK faa54e3757 🥧
  ryanofsky:
    Code review ACK faa54e3757. I was thinking this looked like a change Carl would like, so no surprised he [Mega-acked](https://github.com/bitcoin/bitcoin/pull/22371#pullrequestreview-696450475)

Tree-SHA512: 1b7badbf503d53f5d4dbd9ed8f2e5c1ebfe48102665197048cc9e37bc87b5cec5f2277f3aae9f73a1095bfe879b19d288286ca3daa28031f5f1b64b1184439a9
2021-07-20 17:37:29 +02:00
John Newbery
f036dfbb69 [addrman] Remove unused test_before_evict argument from Good()
This has never been used in the public interface method since it was
introduced in #9037.
2021-07-20 16:17:51 +01:00
MarcoFalke
9faa4b68db
Merge bitcoin/bitcoin#22232: refactor: Pass interpreter flags as uint32_t instead of signed int
fa621ededd refactor: Pass script verify flags as uint32_t (MarcoFalke)

Pull request description:

  The flags are cast to unsigned in the interpreter anyway, so avoid the confusion (and fuzz crashes) by just passing them as unsigned from the beginning.

  Also, the flags are often inverted bit-wise with the `~` operator, which also works on signed integers, but might cause confusion as the sign bit is flipped.

  Fixes #22233

ACKs for top commit:
  theStack:
    Concept and code review ACK fa621ededd
  kristapsk:
    ACK fa621ededd
  jonatack:
    ACK fa621ededd

Tree-SHA512: ea0720f32f823fa7f075309978672aa39773c6019d12b6c1c9d611fc1983a76115b7fe2a28d50814673bb6415c311ccc05b99d6e871575fb6900faf75ed17769
2021-07-20 15:36:23 +02:00
W. J. van der Laan
3d8c714d8e
build: Bump master version to 22.99.0
Tree-SHA512: fcd9ab71dba1fc814980c144a76288c313f42a0123a6a2f44a4adc13b83b74f9fb4f029c5cd646d3c1a2bb28899e95e9fbf55cfd98b665a653624291dc9baf49
2021-07-20 15:27:12 +02:00
fanquake
42af9596ce
Merge bitcoin/bitcoin#22499: Update assumed chain params
eeddd1c8fa Update assumed chain params (Sriram)

Pull request description:

  Update the relevant variables in `src/chainparams.cpp` for `mainnet`, `testnet`, and `signet` as given [here](https://github.com/bitcoin/bitcoin/blob/master/doc/release-process.md#before-branch-off).

  To review this PR, check out [this guide](https://github.com/fanquake/core-review/blob/master/update-assumevalid.md).

  Note: added a 10% overhead to the base value of `mainnet` in `m_assumed_blockchain_size`

ACKs for top commit:
  MarcoFalke:
    ACK eeddd1c8fa, checked against my node 🌮
  bfolkens:
    ACK eeddd1c - checked against `mainnet`
  achow101:
    Code Review ACK eeddd1c8fa
  0xB10C:
    ACK mainnet, testnet, and signet eeddd1c8fa
  jamesob:
    ACK eeddd1c8fa ([`jamesob/ackr/22499.1.sriramdvt.update_assumed_chain_par`](https://github.com/jamesob/bitcoin/tree/ackr/22499.1.sriramdvt.update_assumed_chain_par))
  darosior:
    ACK eeddd1c8fa mainnet and testnet

Tree-SHA512: 0ab19d2acc6a854c6aa38fba199d61c68cec40f005d1d54341ea32b59aae9b7d1aabfd21d7c0bc79f54be99d3e71d1d727196cab88f370259fd2c6e002d3e43c
2021-07-20 21:09:58 +08:00
MarcoFalke
539023ab41
Merge bitcoin/bitcoin#22492: wallet: Reorder locks in dumpwallet to avoid lock order assertion
9b85a5e2f7 tests: Test for dumpwallet lock order issue (Andrew Chow)
25d99e6511 Reorder dumpwallet so that cs_main functions go first (Andrew Chow)

Pull request description:

  When a wallet is loaded which has an unconfirmed transaction in the mempool, it will end up establishing the lock order of cs_wallet -> cs_main -> cs_KeyStore. If `dumpwallet` is used on this wallet, then a lock order of cs_wallet -> cs_KeyStore -> cs_main will be used, which causes a lock order assertion. This PR fixes this by reordering `dumpwallet` and `GetKeyBirthTimes` (only used by `dumpwallet`). Specifically, in both functions, the function calls which lock cs_main are done prior to locking cs_KeyStore. This avoids the lock order issue.

  Additionally, I have added a test case to `wallet_dump.py`. Of course testing this requires `--enable-debug`.

  Fixes #22489

ACKs for top commit:
  MarcoFalke:
    review ACK 9b85a5e2f7 🎰
  ryanofsky:
    Code review ACK 9b85a5e2f7. Nice to reduce lock scope, and good test!
  prayank23:
    tACK 9b85a5e2f7
  lsilva01:
    Tested ACK 9b85a5e2f7 under the same conditions reported in issue #22489 and the `dumpwallet` command completed successfully.

Tree-SHA512: d370a8f415ad64ee6a538ff419155837bcdbb167e3831b06572562289239028c6b46d80b23d227286afe875d9351f3377574ed831549ea426fb926af0e19c755
2021-07-20 15:04:07 +02:00
fanquake
8ed8164e6f
Merge bitcoin/bitcoin#22261: [p2p/mempool] Two small fixes to node broadcast logic
5a77abd4e6 [style] Clean up BroadcastTransaction() (John Newbery)
7282d4c036 [test] Allow rebroadcast for same-txid-different-wtxid transactions (glozow)
cd48372b67 [mempool] Allow rebroadcast for same-txid-different-wtxid transactions (John Newbery)
847b6ed48d [test] Test transactions are not re-added to unbroadcast set (Duncan Dean)
2837a9f1ea [mempool] Only add a transaction to the unbroadcast set when it's added to the mempool (John Newbery)

Pull request description:

  1. Only add a transaction to the unbroadcast set when it's added to the mempool

      Currently, if BroadcastTransaction() is called to rebroadcast a
      transaction (e.g. by ResendWalletTransactions()), then we add the
      transaction to the unbroadcast set. That transaction has already been
      broadcast in the past, so peers are unlikely to request it again,
      meaning RemoveUnbroadcastTx() won't be called and it won't be removed
      from m_unbroadcast_txids.

      Net processing will therefore continue to attempt rebroadcast for the
      transaction every 10-15 minutes. This will most likely continue until
      the node connects to a new peer which hasn't yet seen the transaction
      (or perhaps indefinitely).

      Fix by only adding the transaction to the broadcast set when it's added to the mempool.

  2. Allow rebroadcast for same-txid-different-wtxid transactions

      There is some slightly unexpected behaviour when:

      - there is already transaction in the mempool (the "mempool tx")
      - BroadcastTransaction() is called for a transaction with the same txid
        as the mempool transaction but a different witness (the "new tx")

      Prior to this commit, if BroadcastTransaction() is called with
      relay=true, then it'll call RelayTransaction() using the txid/wtxid of
      the new tx, not the txid/wtxid of the mempool tx. For wtxid relay peers,
      in SendMessages(), the wtxid of the new tx will be taken from
      setInventoryTxToSend, but will then be filtered out from the vector of
      wtxids to announce, since m_mempool.info() won't find the transaction
      (the mempool contains the mempool tx, which has a different wtxid from
      the new tx).

      Fix this by calling RelayTransaction() with the wtxid of the mempool
      transaction in this case.

  The third commit is a comment/whitespace only change to tidy up the BroadcastTransaction() function.

ACKs for top commit:
  duncandean:
    reACK 5a77abd
  naumenkogs:
    ACK 5a77abd4e6
  theStack:
    re-ACK 5a77abd4e6
  lsilva01:
    re-ACK 5a77abd4e6

Tree-SHA512: d1a46d32a9f975220e5b432ff6633fac9be01ea41925b4958395b8d641680500dc44476b12d18852e5b674d2d87e4d0160b4483e45d3d149176bdff9f4dc8516
2021-07-20 20:57:58 +08:00
fanquake
e4487fd5bb
Merge bitcoin/bitcoin#22096: p2p: AddrFetch - don't disconnect on self-announcements
5730a43703 test: Add functional test for AddrFetch connections (Martin Zumsande)
c34ad3309f net, rpc: Enable AddrFetch connections for functional testing (Martin Zumsande)
533500d907 p2p: Add timeout for AddrFetch peers (Martin Zumsande)
b6c5d1e450 p2p: AddrFetch - don't disconnect on self-announcements (Martin Zumsande)

Pull request description:

  AddrFetch connections (old name: oneshots) are intended to be short-lived connections on which we ask a peer for addresses via `getaddr` and disconnect after receiving them.

  This is done by disconnecting after receiving the first `addr`. However, it is no longer working as intended, because nowadays, the first `addr` a typical bitcoin core node sends is its self-announcement.
  So we'll disconnect before the peer gets a chance to answer our `getaddr`.

  I checked that this affects both `-seednode` peers specified manually, and DNS seeds when AddrFetch is used as a fallback if DNS doesn't work for us.

  The current behavior of getting peers via AddrFetch when starting with an empty addrman would be to connect to the peer, receive its self-announcement and add it to addrman, disconnect, reconnect to the same peer again as a full outbound (no other addresses in addrman) and then receive more `addr`. This is silly and not in line with AddrFetch peer being intended to be short-lived peers. 

  Fix this by only disconnecting after receiving an `addr` message of size > 1.

  [Edit] As per review discussion, this PR now also adds a timeout after which we disconnect if we haven't received any suitable `addr`, and a functional test.

ACKs for top commit:
  amitiuttarwar:
    reACK 5730a43703
  naumenkogs:
    ACK 5730a43703
  jnewbery:
    ACK 5730a43703

Tree-SHA512: 8a81234f37e827705138eb254223f7f3b3bf44a06cb02126fc7990b0d231b9bd8f07d38d185cc30d55bf35548a6fdc286b69602498d875b937e7c58332158bf9
2021-07-20 20:27:21 +08:00
Jon Atack
7b3a20b260
mempool: apply rule of 5 to epochguard.h, fix compiler warnings 2021-07-20 13:58:14 +02:00
fanquake
5c8820b399
Merge bitcoin/bitcoin#22436: build: use aarch64 Clang if cross-compiling for darwin on aarch64
54c7754f31 build: use aarch64 Clang if cross-compiling for darwin on aarch64 (fanquake)

Pull request description:

  If we're cross-compiling for darwin on aarch64 hardware, we need to
  use a Clang that will run on that hardware.

  Only tested in a Linux Docker container (aarch64-unknown-linux-gnu),
  running on an Apple M1 mac-mini (aarch64-apple-darwin20.5.0).

ACKs for top commit:
  hebasto:
    ACK 54c7754f31, I agree it can be merged (fix in #22448 is orthogonal to this one).

Tree-SHA512: 66c530097a5dc072a0a00dc22eb3d4a7d923dfa8ab8160f7c3e395cbe58da324f367548d673c0510606f5225d5d37bb5607a76b1703b8b03ac7d2cceeccbd542
2021-07-20 18:23:35 +08:00
João Barbosa
20edf4bcf6 rpc: Return block time in getblockchaininfo 2021-07-20 10:43:26 +01:00
fanquake
201c5e4aec
Merge bitcoin/bitcoin#22465: guix: Pin kernel-header version, time-machine to upstream 1.3.0 commit
e6a94d4446 guix: Bump to version-1.3.0 from upstream (Carl Dong)
90fd13b954 guix: Pin kernel header version (Carl Dong)

Pull request description:

  ```
  - Use 4.19 for riscv64 (earliest LTS release w/ riscv64 support)
  - Use 4.9 for all others (second-oldest LTS release, released in
    combination with glibc glibc 2.24 in Debian stretch)
  ```

  ```
  The chosen commit is the HEAD of Guix's version-1.3.0 branch as of July
  15th, 2021.

  Also fix visual indenting.
  ```

  -----

  This + the documentation PR should make our Guix system ready for release!

ACKs for top commit:
  MarcoFalke:
    review ACK e6a94d4446 to change to vanilla guix. Did not review the kernel change.
  laanwj:
    ACK e6a94d4446
  fanquake:
    ACK e6a94d4446

Tree-SHA512: a175e4ddb3ee786a39f5e800ce336932ad2f6797a3a28400a6f723875d0f19833fd36cedc41b3580e4604110517211bd9f557be36adf7265fd8e591c434ae032
2021-07-20 12:23:56 +08:00
fanquake
4fdd0ff9ee
Merge bitcoin/bitcoin#22199: macdeploy: minor fixups and simplifications
0a5723beea macdeploy: cleanup .temp.dmg if present (fanquake)
ecffe8689d macdeploy: remove qt4 related code (fanquake)
639f064253 macdeploy: select the plugins we need, rather than excluding those we don't (fanquake)
3d26b6b9e9 macdeploy: fix framework printing when passing -verbose (fanquake)
dca6c90329 macdeploy: remove unused plistlib import (fanquake)

Pull request description:

  This includes [one followup](https://github.com/bitcoin/bitcoin/pull/20422#discussion_r534207899) and [one bug fix](3d26b6b9e9) from #20422, as well as some simplifications to the `macdeployqtplus` code.

ACKs for top commit:
  hebasto:
    ACK 0a5723beea, tested on macOS Big Sur 11.4 (20F71, x86_64) + Homebrew's Qt 5.15.2.

Tree-SHA512: cfad9505eacd32fe3a9d06eb13b2de0b6d2cad7b17778e90b503501cbf922e53d4e7f7f74952d1aed58410bdae9b0bb3248098583ef5b85689cb27d4dc06c029
2021-07-20 11:39:47 +08:00
fanquake
e7441a6a45
Merge bitcoin/bitcoin#21711: guix: Add full installation and usage documentation
fac4814106 doc/release-process: Add torrent creation details (Carl Dong)
5d24cc3d82 guix/INSTALL: Guix installs init scripts in libdir (Carl Dong)
5da2ee49d5 guix/INSTALL: Add coreutils/inotify-dir-recreate troubleshooting (Carl Dong)
318c60700b guix: Adapt release-process.md to new Guix process (Carl Dong)
fcab35b229 guix-attest: Produce and sign normalized documents (Carl Dong)
c2541fd0ca guix: Overhaul README (Carl Dong)
46ce6ce378 tree-wide: Rename gitian-keys to builder-keys (Carl Dong)
fc4f8449f3 guix: Update various check_tools lists (Carl Dong)
263220a85c guix: Check for a sane services database (Carl Dong)

Pull request description:

  Based on: #21462

  Keeping the README in one file so that it's easy to search through. Will add more jumping links later so navigation is easier.

  Current TODOs:
  - [x] Shell installer option: prompt user to re-login for `/etc/profile.d` entry to be picked up
  - [x] Binary tarball option: prompt user to create `/etc/profile.d` entry and re-login
  - [x] Fanquake docker option: complete section
  - [x] Arch Linux AUR option: prompt to start `guix-daemon-latest` unit after finishing "optional setup" section
  - [x] Building from source option: Insert dependency tree diagram that I made
  - [x] Building from source option: redo sectioning, kind of a mess right now
  - [x] Optional setup: make clear which parts are only needed if building from source
  - [x] Workaround 1 for GnuTLS: perhaps mention how to remove Guix build farm's key
  - [x] Overall (after everything): Make the links work.

  Note to self: wherever possible, tell user how to check that something is true rather than branching by installation option.

ACKs for top commit:
  fanquake:
    ACK fac4814106 - going to go ahead and merge this now. It's a lot of documentation, and could probably be nit-picked / improved further, however, that can continue over the next few weeks. I'm sure more (backportable) improvements / clarifications will be made while we progress through RCs towards a new release.

Tree-SHA512: dc46c0ecdfc67c7c7743ca26e4a603eb3f54adbf81be2f4c1f4c20577ebb84b5250b9c9ec89c0e9860337ab1c7cff94d7963c603287267deecfe1cd987fa070a
2021-07-20 11:09:39 +08:00
fanquake
d542603c5a
Merge bitcoin/bitcoin#22502: scripted-diff: Revert "fuzz: Add Temporary debug assert for oss-fuzz issue"
facd56750c scripted-diff: Revert "fuzz: Add Temporary debug assert for oss-fuzz issue" (MarcoFalke)

Pull request description:

  No longer needed, as it wouldn't help to debug this issue. See https://github.com/bitcoin/bitcoin/pull/22472#issuecomment-882692900

ACKs for top commit:
  fanquake:
    ACK facd56750c

Tree-SHA512: 13352b3529c43d6e65ab127134b32158d3072dc2fbbb326fea9adfeada5a8610d0477ea75748b8b68e7abb3b9869a989df3a3169e92bdd458053d64bae6ed379
2021-07-20 10:46:56 +08:00
fanquake
624a193330
Merge bitcoin/bitcoin#22497: scripted-diff: remove ResetI2PPorts() (revert e0a2b390c1)
d4b67c8ebc scripted-diff: remove ResetI2PPorts() (revert e0a2b390c1) (Vasil Dimov)

Pull request description:

  `CAddrMan::ResetI2PPorts()` was temporary. Remove it:
  * it has partially achieved its goal: probably ran on about half of the
    I2P nodes
  * it is hackish, deemed risky and two bugs where found in it:
    https://github.com/bitcoin/bitcoin/issues/22467
    https://github.com/bitcoin/bitcoin/issues/22470

  -BEGIN VERIFY SCRIPT-
  git show e0a2b390c1 |git apply -R
  -END VERIFY SCRIPT-

  Fixes https://github.com/bitcoin/bitcoin/issues/22467
  Fixes https://github.com/bitcoin/bitcoin/issues/22470

ACKs for top commit:
  laanwj:
    ACK d4b67c8ebc
  MarcoFalke:
    review ACK d4b67c8ebc 😲
  jonatack:
    ACK d4b67c8ebc per IRC discussions https://www.erisian.com.au/bitcoin-core-dev/log-2021-07-16.html#l-212 and https://www.erisian.com.au/bitcoin-core-dev/log-2021-07-19.html#l-210

Tree-SHA512: 60d8f0ea0f66a8fcedfcb9c8944a419b974b15509b54ddfeec58db49ae9418e6916df712bba3fbd6b29497d85f7951fb9aa2e48eb9c59f88d09435685bd00b4c
2021-07-20 09:02:34 +08:00
Carl Dong
fac4814106 doc/release-process: Add torrent creation details
Source: https://github.com/bitcoin/bitcoin/pull/21711#discussion_r668754244
2021-07-19 18:24:36 -04:00
Carl Dong
5d24cc3d82 guix/INSTALL: Guix installs init scripts in libdir 2021-07-19 18:24:36 -04:00
Carl Dong
5da2ee49d5 guix/INSTALL: Add coreutils/inotify-dir-recreate troubleshooting 2021-07-19 18:24:36 -04:00
Carl Dong
318c60700b guix: Adapt release-process.md to new Guix process
Also, clean up release-process.md
2021-07-19 18:24:36 -04:00
Carl Dong
fcab35b229 guix-attest: Produce and sign normalized documents
That way we can easily combine the document and detached signature to
produce cleartext signature files for upload during the release process.

See subsequent commits which modify doc/release-process.md for more
details.
2021-07-19 18:24:36 -04:00
Carl Dong
c2541fd0ca guix: Overhaul README
- Added detailed Guix bootstrap/installation instructions
2021-07-19 18:24:36 -04:00
MarcoFalke
facd56750c
scripted-diff: Revert "fuzz: Add Temporary debug assert for oss-fuzz issue"
-BEGIN VERIFY SCRIPT-
git show faf1af58f8 | git apply --reverse
-END VERIFY SCRIPT-
2021-07-19 19:12:54 +02:00
Andrew Chow
9b85a5e2f7 tests: Test for dumpwallet lock order issue
Adds a test for the condition which can trigger a lock order assertion.
Specifically, there must be an unconfirmed transaction in the mempool
which belongs to the wallet being loaded. This will establish the order
of cs_wallet -> cs_main -> cs_KeyStore. Then dumpwallet is called on
that wallet. Previously, this would have used a lock order of cs_wallet
-> cs_KeyStore -> cs_main, but this should be fixed now. The test
ensures that.
2021-07-19 12:25:11 -04:00
Andrew Chow
25d99e6511 Reorder dumpwallet so that cs_main functions go first
DEBUG_LOCKORDER expects cs_wallet, cs_main, and cs_KeyStore to be
acquired in that order. However dumpwallet would take these in the order
cs_wallet, cs_KeyStore, cs_main. So when configured with
`--enable-debug`, it is possible to hit the lock order assertion when
using dumpwallet.

To fix this, cs_wallet and cs_KeyStore are no longer locked at the same
time. Instead cs_wallet will be locked first. Then the functions which
lock cs_main will be run. Lastly cs_KeyStore will be locked afterwards.
This avoids the lock order issue.

Furthermore, since GetKeyBirthTimes (only used by dumpwallet) also uses
a function that locks cs_main, and itself also locks cs_KeyStore, the
same reordering is done here.
2021-07-19 12:25:11 -04:00
MarcoFalke
aaaa9c6019
fuzz: Extend addrman fuzz test with deserialize 2021-07-19 18:18:24 +02:00
Sriram
eeddd1c8fa Update assumed chain params
Note: 10% overhead to the base value of `mainnet` in `m_assumed_blockchain_size`
2021-07-19 19:34:30 +05:30