Commit graph

34016 commits

Author SHA1 Message Date
John Newbery
1b978a7e8c [netgroupman] Move GetMappedAS() and GetGroup() logic to NetGroupManager
Reviewer hint: use:

`git diff --color-moved=dimmed-zebra --color-moved-ws=ignore-all-space`
2022-04-20 14:35:52 +01:00
John Newbery
ddb4101e63 [net] Only use public CNetAddr functions and data in GetMappedAS() and GetGroup()
Also change parameter/variable names. This makes the next commit mostly
move-only.
2022-04-20 14:35:52 +01:00
John Newbery
6b2268162e [netgroupman] Add GetMappedAS() and GetGroup()
These currently call through to the CNetAddr methods. The logic will be moved in a future commit.
2022-04-20 14:35:52 +01:00
John Newbery
19431560e3 [net] Move asmap into NetGroupManager 2022-04-20 14:29:29 +01:00
Pavol Rusnak
abcb8769bf
doc: add more info to dependencies.md 2022-04-20 15:21:50 +02:00
fanquake
9b0a13a289
tidy: Add include-what-you-use 2022-04-20 14:14:52 +01:00
fanquake
74cd038e30
refactor: fix includes in src/init 2022-04-20 13:51:33 +01:00
fanquake
c79ad935f0
refactor: fix includes in src/compat
Add missing includes.

Swap C headers for their C++ counterparts.

Remove pointless / unmaintainable include comments. This is even more the case
when we are actually using IWYU, as if anyone wants to see the comments they can
just get IWYU to generate them.
2022-04-20 13:51:33 +01:00
dergoegge
10b83e2aa3 [net processing] Move block cache state into PeerManagerImpl 2022-04-20 13:33:07 +02:00
dergoegge
a4c55a93ef [net processing] Inline and simplify UpdatePreferredDownload
We inline `UpdatePreferredDownload` because it is only used in one
location during the version handshake. We simplify it by removing the
initial subtraction of `state->fPreferredDownload` from
`nPreferredDownload`. This is ok since the version handshake is only
called once per peer and `state->fPreferredDownload` will always be
false before the newly inlined code is called, making the subtraction a
noop.
2022-04-20 13:33:07 +02:00
dergoegge
490c08f96a [net processing] Move nPreferredDownload into PeerManagerImpl 2022-04-20 13:33:07 +02:00
dergoegge
a292df283a [net processing] Move mapNodeState into PeerManagerImpl 2022-04-20 13:33:07 +02:00
dergoegge
37ecaf3e7a [net processing] Move CNodeState declaration above PeerManagerImpl 2022-04-20 13:33:07 +02:00
fanquake
094d9fda5c
Merge bitcoin/bitcoin#24788: doc: Add gpg key import instructions for Windows
107582039a doc: Add gpg key import instructions for Windows (Dave Scotese)

Pull request description:

  This is a single commit to replace the three commits from #23916

  I propose this change so that Windows users can more easily import signers' keys.

ACKs for top commit:
  sipsorcery:
    tACK 107582039a.

Tree-SHA512: 7d4ec77ce10f751748c49f1453fa8baf0976b15af4f87dc27f4e2715ad73fbd7dc1f07fcf3e660d63a6b9eb895a5e4105774613d39a2328f73b92d9e6cff4ebd
2022-04-20 11:41:19 +01:00
MarcoFalke
dbdc83ae01
Merge bitcoin/bitcoin#24909: refactor: Move and rename pindexBestHeader, fHavePruned
f0a2fb3c5d scripted-diff: Rename pindexBestHeader, fHavePruned (Carl Dong)
a401402125 Clear fHavePruned in BlockManager::Unload() (Carl Dong)
3308ecd3fc move-mostly: Make fHavePruned a BlockMan member (Carl Dong)
c96524113c Clear pindexBestHeader in ChainstateManager::Unload() (Carl Dong)
73eedaaacc style-only: Miscellaneous whitespace changes (Carl Dong)
0d567daf23 move-mostly: Make pindexBestHeader a ChainMan member (Carl Dong)
5d670173a3 validation: Load pindexBestHeader in ChainMan (Carl Dong)

Pull request description:

  Split off from #22564 per Marco's suggestion: https://github.com/bitcoin/bitcoin/pull/22564#issuecomment-1100011503

  This is basically the move-mostly parts of #22564. The overall intent is to move mutable globals manually reset by `::UnloadBlockIndex` into appropriate structs such that they are cleared at the appropriate times. Please read #22564's description for more rationale.

  In summary , this PR moves:
  1. `pindexBestHeader` -> `ChainstateManager::m_best_header`
  2. `fHavePruned` -> `BlockManager::m_have_pruned`

ACKs for top commit:
  ajtowns:
    ACK f0a2fb3c5d -- code review only
  MarcoFalke:
    kirby ACK f0a2fb3c5d 😋

Tree-SHA512: 8d161701af81af1ff42da1b22a6bef2f8626e8642146bc9c3b27f3a7cd24f4d691910a2392b188ae058fec0611a17304dd73f60da695f53832d327f73d2fc963
2022-04-20 12:13:25 +02:00
MarcoFalke
fc99f8c09e
Merge bitcoin/bitcoin#24895: lint: Convert lint-includes.sh to Python
67b41678c8 lint: Convert lint-includes.sh to Python (Dimitri)

Pull request description:

  A port of `test/lint/lint-includes.sh` to a Python-script as part of the request of #24783. Checked for output-consistency.

ACKs for top commit:
  KevinMusgrave:
    Tested ACK 67b41678c8

Tree-SHA512: 05b4b114dc101e571004aee8aea1480e4dda1dc645426100649e9cb81e56e8667f88d6d5646a9860ea1c7abc36754eda2a77ec10156c54b62db00e2c00b8ceae
2022-04-20 09:55:33 +02:00
Eunoia
4a9e36dbaf lint: convert submodule linter test to Python 2022-04-20 05:21:13 +00:00
Carl Dong
f0a2fb3c5d scripted-diff: Rename pindexBestHeader, fHavePruned
...to m_best_header and m_have_pruned

-BEGIN VERIFY SCRIPT-
find_regex="\bpindexBestHeader\b" \
    && git grep -l -E "$find_regex" -- src \
        | xargs sed -i -E "s@$find_regex@m_best_header@g"
find_regex="\bfHavePruned\b" \
    && git grep -l -E "$find_regex" -- src \
        | xargs sed -i -E "s@$find_regex@m_have_pruned@g"
-END VERIFY SCRIPT-
2022-04-19 14:36:18 -04:00
Carl Dong
a401402125 Clear fHavePruned in BlockManager::Unload()
-----

Code Reviewer Notes

Call graph of relevant functions:

UnloadBlockIndex() <-- Moved from
    calls ChainstateManager::Unload()
        which calls BlockManager::Unload() <-- Moved to

So calling UnloadBlockIndex() would still run this moved code. The code
will also now run when ~BlockManager gets called, which makes sense.
2022-04-19 14:34:56 -04:00
Carl Dong
3308ecd3fc move-mostly: Make fHavePruned a BlockMan member
[META] In the next commit, we move the clearing of fHavePruned to
       BlockManager::Unload()
2022-04-19 14:34:56 -04:00
Carl Dong
c96524113c Clear pindexBestHeader in ChainstateManager::Unload()
-----

Code Reviewer Notes

Call graph of relevant functions:

UnloadBlockIndex() <-- Moved from
    calls ChainstateManager::Unload() <-- Moved to

Safe because ChainstateManager::Unload() is called only by
UnloadBlockIndex() and no other callers.
2022-04-19 14:34:56 -04:00
Carl Dong
73eedaaacc style-only: Miscellaneous whitespace changes
...of touched lines and surrounding
2022-04-19 14:34:56 -04:00
Carl Dong
0d567daf23 move-mostly: Make pindexBestHeader a ChainMan member
[META] In the next commit, we move the clearing of pindexBestHeader to
       ChainstateManager::Unload()
2022-04-19 14:34:55 -04:00
Hennadii Stepanov
254f3cc368
Merge bitcoin-core/gui#584: Getting ready to Qt 6 (5/n). Do not assume qDBusRegisterMetaType return type
6cf4dc7f64 qt: Do not assume `qDBusRegisterMetaType` return type (Hennadii Stepanov)

Pull request description:

  `qDBusRegisterMetaType` returns:
  - [`int`](https://doc.qt.io/qt-5/qdbusargument.html#qDBusRegisterMetaType) in Qt 5
  - [`QMetaType`](https://doc.qt.io/qt-6/qdbusargument.html#qDBusRegisterMetaType) in Qt 6

ACKs for top commit:
  laanwj:
    Anyhow code review ACK 6cf4dc7f64
  w0xlt:
    tACK 6cf4dc7f64 on Ubuntu 21.10, Qt 5.15.2.

Tree-SHA512: 17d43e191d31a6f927d19550c52471ed3b9222f492a23cee2e553f2c679cf37125e00637b00ea9f4ee3e37dfcf5278171be9a5e1e2e899592516291c7b5cd942
2022-04-19 19:36:50 +02:00
Hennadii Stepanov
37e49cc1b5
Merge bitcoin-core/gui#580: Getting ready to Qt 6 (3/n). Do not use QKeyEvent copy constructor
3ec6504a2e qt: Do not use `QKeyEvent` copy constructor (Hennadii Stepanov)

Pull request description:

  This PR is preparation for [Qt 6](https://github.com/bitcoin/bitcoin/pull/24798), and it fixes an experimental build with Qt 6.2.4 as copying of `QEvent` has been [disabled](19f9b0d5f5) in Qt 6.0.0.

ACKs for top commit:
  w0xlt:
    tACK 3ec6504a2e on Ubuntu 21.10, Qt 5.15.2
  shaavan:
    reACK 3ec6504a2e

Tree-SHA512: 583a9dad0c621d9f02f77ccaa9f55ee79e12e3c47f418911ef2dfe0de357d772d1928ae3ec19b6f0c0674da858bab9d4542a26cc14b06ed921370dfeabd1c194
2022-04-19 19:32:21 +02:00
Andrew Chow
8103fffe5c
Merge bitcoin/bitcoin#24906: miniscript: the 'd:' wrapper must not be 'u'
7417594187 miniscript: the 'd:' wrapper must not be 'u' (Antoine Poinsot)

Pull request description:

  The type system was incorrectly relying on a standardness rule to be sound.

  This bug was found and reported by Andrew Poelstra [based on a question from Aman Kumar Kashyap](https://github.com/rust-bitcoin/rust-miniscript/discussions/341).

ACKs for top commit:
  sipa:
    ACK 7417594187
  apoelstra:
    utACK 7417594187
  achow101:
    ACK 7417594187

Tree-SHA512: af68c1df1c40e40dd105ef54544c226f560524dd8e35248fa0305dbef966e96ec1fa6ff2fe50fb8f2792ac310761a29c55ea81dd7b6d122a0de0a68b135e5aaa
2022-04-19 13:26:36 -04:00
laanwj
6300b9556e
Merge bitcoin/bitcoin#24357: refactor: make setsockopt() and SetSocketNoDelay() mockable/testable
a2c4a7acd1 net: use Sock::SetSockOpt() instead of standalone SetSocketNoDelay() (Vasil Dimov)
d65b6c3fb9 net: use Sock::SetSockOpt() instead of setsockopt() (Vasil Dimov)
184e56d668 net: add new method Sock::SetSockOpt() that wraps setsockopt() (Vasil Dimov)

Pull request description:

  _This is a piece of #21878, chopped off to ease review._

  Add a `virtual` (thus mockable) method `Sock::SetSockOpt()` that wraps the system `setsockopt()`.

  Convert the standalone `SetSocketNoDelay()` function to a `virtual` (thus mockable) method `Sock::SetNoDelay()`.

  This will help avoid syscalls during testing and to mock them to return whatever is suitable for the tests.

ACKs for top commit:
  laanwj:
    Code review ACK a2c4a7acd1
  jonatack:
    ACK a2c4a7acd1 change since last review is folding `Sock::SetNoDelay()` into the callers

Tree-SHA512: 3e2b016c1e4128317a28c17dc9b30472949e1ac3b071b2697c6d30cbcc830df1ee4392a4e23b2ea1ab4e3fb0f59ef450e2a4f3c1df3d8c803dd081652b6c7387
2022-04-19 16:43:47 +02:00
laanwj
f8b2e9bcfc
Merge bitcoin/bitcoin#24772: refactor: Use [[maybe_unused]] attribute
07ddecb84e refactor: Use [[maybe_unused]] attribute (Hennadii Stepanov)
55e0fc8df9 refactor: Drop unneeded workarounds aimed to silence unused warning (Hennadii Stepanov)

Pull request description:

  This change is required for bitcoin/bitcoin#24773 as it prevents MSVC yelling about "warning C4551: function call missing argument list".

  But it is useful by itself as it makes code more concise and readable.

ACKs for top commit:
  Empact:
    Code review ACK 07ddecb84e
  laanwj:
    Code review ACK 07ddecb84e
  vincenzopalazzo:
    ACK 07ddecb84e
  w0xlt:
    ACK 07ddecb

Tree-SHA512: 01791855a9ba742202d5718203303af989fcb501b7cf2a24ac8d78e87487acca38f77bef264b8e27e41ad1ccf96e426725cf65bfd96ce2ac71c46b3792bed857
2022-04-19 15:59:40 +02:00
fanquake
e0ff55a836
Merge bitcoin/bitcoin#24871: refactor: Simplify GetTime
0000a63689 Simplify GetTime (MarcoFalke)

Pull request description:

  The implementation of `GetTime` is confusing:
  * The value returned by `GetTime` is assumed to be equal to `GetTime<std::chrono::seconds>()`. Both are mockable and the only difference is return type, the value itself is equal. However, the implementation does not support this assumption.
  * On some systems, `time_t` might be a signed 32-bit integer (https://en.cppreference.com/w/c/chrono/time), thus breaking in the year 2038, whereas `GetTime<std::chrono::seconds>` does not. Also, `time_t` might be `-1` "on error", where "error" is unspecified.
  * `GetTime<std::chrono::seconds>` calls `GetTimeMicros`, which calls `GetSystemTime`, which calls `std::chrono::system_clock::now`, which doesn't have the above issues. See https://en.cppreference.com/w/cpp/chrono/system_clock/now
  * `GetTimeMicros` and the internal-only `GetSystemTime` will likely be renamed (to clarify they are the non-mockable non-monotonic system time) or removed in the future to be replaced by appropriate `std::chrono::time_point<Clock>` getters.

  Fix all issues by:
  * making `GetTime()` an alias for `GetTime<std::chrono::seconds>().count()`.
  * inlining the needed parts of `GetSystemTime` directly instead of needlessly increasing the function call stack with functions that are likely to be removed in the future.

ACKs for top commit:
  martinus:
    Code review, untested ACK 0000a63689. By the way strictly speaking `std::chrono::system_clock` is only guaranteed to be based on the unix epoch starting with C++20: https://en.cppreference.com/w/cpp/chrono/system_clock
  theStack:
    Code-review ACK 0000a63689

Tree-SHA512: f751ba740e0da65537be800e9414dd02282d9f04c0b0fb986a36546f257d0b888d8688653cdda5d355ec832c0e09d866922d9161b1ccd33485c1c92c5d1e802f
2022-04-19 13:36:50 +01:00
MarcoFalke
8d3743a365
Merge bitcoin/bitcoin#24896: test: use MiniWallet for p2p_segwit.py
917a89a814 test: use MiniWallet for p2p_segwit.py (Sebastian Falbesoner)

Pull request description:

  This PR enables one more of the non-wallet functional tests (p2p_segwit.py) to be run even with the Bitcoin Code wallet by using the MiniWallet instead, as proposed in https://github.com/bitcoin/bitcoin/issues/20078.

  This change only affects the subtest `test_superfluous_witness`. Note that instead of creating a raw transaction first and then signing it, we go the other direction here: MiniWallet creates a transaction spending a segwit v1 output (i.e. including a witness), then we turn it into a raw transaction by dropping the witness. Therefore, the debug log asserts are swapped.

Top commit has no ACKs.

Tree-SHA512: 163a93a527f60100487f0aff49a9d7baf392ceb4417c54521157b2678685f5728dd751a9747c6cf51666aae78252dd3bc44130e659f7a1262ec1c86e30225622
2022-04-19 14:17:31 +02:00
laanwj
b297b945f7
Merge bitcoin/bitcoin#21279: scripted-diff: Regenerate key_io data deterministically
fa506add25 scripted-diff: Regenerate key_io data deterministically (MarcoFalke)
fafb4796d3 contrib: make gen_key_io_test_vectors deterministic (MarcoFalke)

Pull request description:

ACKs for top commit:
  Sjors:
    ACK fa506add25
  laanwj:
    Tested ACK fa506add25

Tree-SHA512: 02dc56c70c53356ee8d7012b42bec56017d646790f3248fd7437b6be556903ae9511abf3803fa30c7a11c10b4e9d41a736ff927404059bcdf2e0f30b70553014
2022-04-19 13:40:47 +02:00
MarcoFalke
013daed9ac
Merge bitcoin/bitcoin#24919: doc: Fix a link to test/lint/lint-python.py
e245c5ccd5 doc: Fix a link to `test/lint/lint-python.py` (Hennadii Stepanov)

Pull request description:

  This PR is a follow up to bitcoin/bitcoin#24794.

  Closes bitcoin-core/gui#588.

Top commit has no ACKs.

Tree-SHA512: 9305705082c5e8f0c093506b4931a13b50e33e8315f6758ee525bc7f6d840b517af5d1092cee4bcc1bfc553d629b771f1893f27d0f514639c2da295bb604877a
2022-04-19 12:30:55 +02:00
Hennadii Stepanov
e245c5ccd5
doc: Fix a link to test/lint/lint-python.py 2022-04-19 12:19:32 +02:00
MarcoFalke
ff78833d3c
Merge bitcoin/bitcoin#24776: docs: update /rest/chaininfo doc referring to RPC help
1d95b5c783 doc: cleanups to mempool rest endpoints (brunoerg)
b941dec0a9 docs: update `/rest/chaininfo` doc referring to RPC help (brunoerg)

Pull request description:

  Internally, `/rest/chaininfo` gets the infos from `getblockchaininfo` and I just realized the documentation of it in `REST-interface.md` is outdated compared to the `getblockchaininfo` RPC one. This PR removes the documentation of the fields and adds a reference to the RPC help.

ACKs for top commit:
  jonatack:
    ACK 1d95b5c783

Tree-SHA512: 643db202e13e8372105460b0871facb11586dc0ff5e86ec9e105a178bcfeefa3555bb047cd28cfaeb3e747f5a2055e27961813c9e299ba7b2d36151e81049507
2022-04-19 12:11:07 +02:00
MarcoFalke
fa2153b05b
test: Remove unused taproot node from wallet_taproot.py 2022-04-19 11:57:54 +02:00
MarcoFalke
fa1970f075
Make BlockManager::LoadBlockIndex private 2022-04-19 11:32:49 +02:00
John Newbery
17c24d4580 [init] Add netgroupman to node.context
This is constructed before addrman and connman, and destructed afterwards.

netgroupman does not currently do anything, but will have functionality added in future commits.
2022-04-19 10:25:40 +01:00
John Newbery
9b3836710b [build] Add netgroup.cpp|h
These aren't used yet.
2022-04-19 10:25:39 +01:00
MarcoFalke
907659770b
Merge bitcoin/bitcoin#24913: bench: Add a benchmark for wallet loading
464a162817 bench: Add a benchmark for wallet loading (Andrew Chow)

Pull request description:

  I've been working on some improvements to wallet loading performance and it's useful to have a benchmark to check whether these improvements are actually improvements.

ACKs for top commit:
  w0xlt:
    ACK 464a162
  jarolrod:
    Code Review ACK 464a162817

Tree-SHA512: 0a68166ee1c43c88a22688c91c0a1949b7ab81373e3466c8ee85d09c7841fd033dcbcb7fb4a05e9824635f1f9065ab091b5a413e08d51ae58e2ed5fe24ea2e3f
2022-04-19 10:17:26 +02:00
Dimitri
67b41678c8 lint: Convert lint-includes.sh to Python 2022-04-19 02:23:56 +02:00
brunoerg
1d95b5c783 doc: cleanups to mempool rest endpoints 2022-04-18 21:17:11 -03:00
brunoerg
b941dec0a9 docs: update /rest/chaininfo doc referring to RPC help 2022-04-18 21:17:06 -03:00
Andrew Chow
464a162817 bench: Add a benchmark for wallet loading 2022-04-18 17:02:57 -04:00
laanwj
57a73d71a3
Merge bitcoin/bitcoin#24794: lint: Convert Python linter to Python
47b66ac4ac lint: Convert Python linter to Python (Fabian Jahr)

Pull request description:

  The outputs provided by the Python version should be exactly the same as the ones from the shell version.

  There is small improvement here: Previously only the dependency of `flake9` was checked, now all dependencies are checked before running.

  I also tried to mostly follow the [recommendations here](https://github.com/bitcoin/bitcoin/pull/24766#pullrequestreview-932953476) but happy to make more changes if there is still room for improvement.

ACKs for top commit:
  laanwj:
    Tested ACK 47b66ac4ac

Tree-SHA512: 1630188e176c1063b8905669b76682b361a858cde6990ab17e51ad4333bf376eab796050cdb9f2967b84f1f74379d9e860c4258561b1964e1a47183c593e5bb4
2022-04-18 18:51:15 +02:00
w0xlt
a237a065cc scripted-diff: rename cs_totalBytesSent -> m_total_bytes_sent_mutex
-BEGIN VERIFY SCRIPT-
sed -i 's/cs_totalBytesSent/m_total_bytes_sent_mutex/g' -- $(git grep --files-with-matches 'cs_totalBytesSent')
-END VERIFY SCRIPT-
2022-04-18 13:23:26 -03:00
laanwj
5fdf37e14b
Merge bitcoin/bitcoin#24853: lint: Convert lint-git-commit-check.sh to Python
f27fcd9bf4 lint: Convert lint-git-commit-check.sh to Python (Dimitri)

Pull request description:

  A port of `/test/lint/lint-git-commit-check.sh` to a Python-script as part of the request of #24783 . Checked for output-consistency.

ACKs for top commit:
  laanwj:
    re-ACK f27fcd9bf4

Tree-SHA512: afc4a662f4aec1796c023b98a875c1591940ecdfc709eefe2df29d33e51e807c3c2e2b5c410aa3ad1cd3f6f8207f5c15b638637ff9f5659cafa7543bbe8a0bae
2022-04-18 18:04:34 +02:00
laanwj
3059d4dd72
Merge bitcoin/bitcoin#24844: lint: Convert lint-whitespace.sh to Python
a75f6d86d1 lint: Convert lint-whitespace.sh to Python (Dimitri)

Pull request description:

  A port of `/test/lint/lint-whitespace.sh` to a Python-script as part of the request of #24783 . Checked for output-consistency.

ACKs for top commit:
  laanwj:
    Code review and tested ACK a75f6d86d1

Tree-SHA512: 982041b0beb1b3866493ad523950c9a536a8b1ec79b773fe86dbc1166844c13a30b384e92025f845d45d25334f90f3abda5fa23f0f28e7c2cddc5e496f84c445
2022-04-18 17:50:07 +02:00
Andrew Chow
2095f19db9
Merge bitcoin/bitcoin#24859: wallet: Change wallet validation order
6f29409ad1 test: Add a test that creates a wallet with invalid parameters (w0xlt)
0359d9b6a3 Change wallet validation order (w0xlt)

Pull request description:

  In the current code, the database is created before the last validation, which checks that passphrase is set and private keys are disabled.

  Therefore, if this validation fails, it will result in an empty database and the user will not be able to recreate a wallet with the same name and with the correct parameters.

  Behavior on the master branch:
  ```
  $ ./src/bitcoin-cli -regtest -named createwallet wallet_name="invalid_wallet_01" disable_private_keys=true passphrase="passphrase"
  error code: -4
  error message:
  Passphrase provided but private keys are disabled. A passphrase is only used to encrypt private keys, so cannot be used for wallets with private keys disabled.

  $ ./src/bitcoin-cli -regtest -named createwallet wallet_name="invalid_wallet_01"
  error code: -4
  error message:
  Wallet file verification failed. Failed to create database path '/home/w/.bitcoin/regtest/wallets/invalid_wallet'. Database already exists.
  ```

  Behavior on the PR branch:
  ```
  $ ./src/bitcoin-cli -regtest -named createwallet wallet_name="invalid_wallet_02" disable_private_keys=true passphrase="passphrase"
  error code: -4
  error message:
  Passphrase provided but private keys are disabled. A passphrase is only used to encrypt private keys, so cannot be used for wallets with private keys disabled.

  $ ./src/bitcoin-cli -regtest -named createwallet wallet_name="invalid_wallet_02"
  {
    "name": "invalid_wallet_01",
    "warning": ""
  }
  ```

ACKs for top commit:
  achow101:
    ACK 6f29409ad1

Tree-SHA512: d192955fc2285bf27ae5dd4c1b7cfd3d85441a7f3554b189b974aefb319c6b997543991dbb0ca2c8cb980f7058913a77cf0164c02e9b51ceb9c2cb601317c428
2022-04-18 11:29:29 -04:00
Antoine Poinsot
7417594187
miniscript: the 'd:' wrapper must not be 'u'
The value it leaves on the stack depends on the last element on the
stack. However, we can't make sure this element is OP_1 (which would
give us the 'u' property) without the MINIMALIF rule.
MINIMALIF is only policy for P2WSH, therefore giving 'd:' the 'u'
property breaks consensus soundness: it makes it possible (by consensus
but not policy) for instance to satisfy a thresh() without satisfying
at least k of its subs.

This bug was found and reported by Andrew Poelstra.
2022-04-18 16:03:29 +02:00
fanquake
d2e04196b6
Merge bitcoin/bitcoin#24862: contrib: Remove suspicious hosts list from makeseeds
2f629f8089 contrib: Remove suspicious hosts list from makeseeds (laanwj)

Pull request description:

  I have some qualms about maintaining a suspicious hosts list as part as the repository\*. But also, it's stale and irrelevant. I've checked the entire list and none of them is connectable. Only one still appars in `nodes_main.txt` but with low uptime and an old subversion string so it wouldn't be picked in the first place. This change removes the list and the functionality to use it.

  | IP               | 8333 connectable    | in `nodes_main.txt`   |
  |------------------|---------------------|-----------------------|
  | 130.211.129.106  |      no  | no    |
  | 148.251.238.178  |      no  | no    |
  | 176.9.46.6       |      no  | yes: /Satoshi:0.9.2.1/    |
  | 178.63.107.226   |      no  | no    |
  | 54.173.72.127    |      no  | no    |
  | 54.174.10.182    |      no  | no    |
  | 54.183.64.54     |      no  | no    |
  | 54.194.231.211   |      no  | no    |
  | 54.66.214.167    |      no  | no    |
  | 54.66.220.137    |      no  | no    |
  | 54.67.33.14      |      no  | no    |
  | 54.77.251.214    |      no  | no    |
  | 54.94.195.96     |      no  | no    |
  | 54.94.200.247    |      no  | no    |
  | 83.81.130.26     |      no  | no    |
  | 88.198.17.7      |      no  | no    |

  ref: https://github.com/bitcoin/bitcoin/issues/17020#issuecomment-1099973383

  \* besides the commit noise, potential legal issues around accountability and liability that would come with maintaining such a blocklist actively, I don't think we should expose the project to

ACKs for top commit:
  Empact:
    ACK 2f629f8089
  jonatack:
    ACK 2f629f8089
  1440000bytes:
    ACK 2f629f8089

Tree-SHA512: 3159d7df7cf66415a5db6058b62e5696efcf6c46b0ec38090e22ba26d9b375eb1a88f510b71769eb7b4f14e7007d2b64e1709cf6b1300ade3f7277d50efb3ddb
2022-04-18 11:29:01 +01:00