forked from bitcoin/bitcoin
-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Btc master 29/08/2022 #64
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…variables b9f06bf build: Do not export `PKG_CONFIG_{PATH|LIBDIR}` variables (Hennadii Stepanov) Pull request description: This is an alternative to bitcoin#25660 with no [drawbacks](bitcoin#25660 (comment)). Guix builds on `x86_64`: ``` 8ac4c1164512d8aa1c4c3e379b5e12d7e91f196dc32decea422ab1edcb51461f guix-build-b9f06bf05b67/output/aarch64-linux-gnu/SHA256SUMS.part 0e91431387030b7d2a6aba9368fab7fcf15931477b17c06350101bcb32a49217 guix-build-b9f06bf05b67/output/aarch64-linux-gnu/bitcoin-b9f06bf05b67-aarch64-linux-gnu-debug.tar.gz d36ef4c9230d73d73760bf1533535aa8fd325584b11adb9101cff2097f548b88 guix-build-b9f06bf05b67/output/aarch64-linux-gnu/bitcoin-b9f06bf05b67-aarch64-linux-gnu.tar.gz 280d3c31e755b0e8e58cdcf184435fa6b7b69cf3446651ebfe76f9a632827094 guix-build-b9f06bf05b67/output/arm-linux-gnueabihf/SHA256SUMS.part c6e7869ca390a8693c0d569ec89ffdcb128692e0e7cae89332adc0bd0663d0f3 guix-build-b9f06bf05b67/output/arm-linux-gnueabihf/bitcoin-b9f06bf05b67-arm-linux-gnueabihf-debug.tar.gz 2b0046e12d675c64a157265e16d014bd476be1c6f487f239cbdb151543790eb9 guix-build-b9f06bf05b67/output/arm-linux-gnueabihf/bitcoin-b9f06bf05b67-arm-linux-gnueabihf.tar.gz 92abf22c6c7e6a72d3018a836a2d3e16d2051af14a0c6add749eca268ddad470 guix-build-b9f06bf05b67/output/arm64-apple-darwin/SHA256SUMS.part 4cb47c5b5a302f0156ff0e998d0cb8103418f5e0f85b8d47d395771187cd8fda guix-build-b9f06bf05b67/output/arm64-apple-darwin/bitcoin-b9f06bf05b67-arm64-apple-darwin-unsigned.dmg 660dab4a573b60a034f06f95a48563e9ea7d96632818140e578cd3ae972eb640 guix-build-b9f06bf05b67/output/arm64-apple-darwin/bitcoin-b9f06bf05b67-arm64-apple-darwin-unsigned.tar.gz 39ac1ecdce5a848aaca91f9f9dcc2a4436c1d257b27608191af45d4d29054990 guix-build-b9f06bf05b67/output/arm64-apple-darwin/bitcoin-b9f06bf05b67-arm64-apple-darwin.tar.gz 5afa45e1c9c2e31d97148e868415f6bbaf51def45aeaa32bb13b8a092284139e guix-build-b9f06bf05b67/output/dist-archive/bitcoin-b9f06bf05b67.tar.gz 2aff14d389202d87266b93e1c17aa0ebbd9cde787349127f1a891dfddc41b675 guix-build-b9f06bf05b67/output/powerpc64-linux-gnu/SHA256SUMS.part 650c555c9d3d5b2ae18353d621b51cbdfbe5f2ebce31e7add47887adfd9b0283 guix-build-b9f06bf05b67/output/powerpc64-linux-gnu/bitcoin-b9f06bf05b67-powerpc64-linux-gnu-debug.tar.gz 38b33f13f2ac03ea2d864a02d5088b34441567bb6af04df9dc0c3aa4a9068cb2 guix-build-b9f06bf05b67/output/powerpc64-linux-gnu/bitcoin-b9f06bf05b67-powerpc64-linux-gnu.tar.gz 3b435cd35afe0990a6badb3d4f2a5e120c89644b566581db882241e82d5b94ca guix-build-b9f06bf05b67/output/powerpc64le-linux-gnu/SHA256SUMS.part 3a3259a8c489e522a1763e4178f4d8b6b49cff927d5ebe9918c853f4d04547b7 guix-build-b9f06bf05b67/output/powerpc64le-linux-gnu/bitcoin-b9f06bf05b67-powerpc64le-linux-gnu-debug.tar.gz 006df723180d8260112e26089062f2a1ca4742099bf2d9455acd6be1b5395939 guix-build-b9f06bf05b67/output/powerpc64le-linux-gnu/bitcoin-b9f06bf05b67-powerpc64le-linux-gnu.tar.gz d13f9c8e9396c46496e06cf6bfbaffae3980e6305024a1e447f73346e66e48a5 guix-build-b9f06bf05b67/output/riscv64-linux-gnu/SHA256SUMS.part 9b18dfafd51a6d249ed74d884c4a8d1b2cf320133cea8008742bc93583cff19e guix-build-b9f06bf05b67/output/riscv64-linux-gnu/bitcoin-b9f06bf05b67-riscv64-linux-gnu-debug.tar.gz 76d29d553f06c7098c67e8fc95f83c45619860988668567f37946efd63668cef guix-build-b9f06bf05b67/output/riscv64-linux-gnu/bitcoin-b9f06bf05b67-riscv64-linux-gnu.tar.gz 6661426b6180c8bb908b05f1ea4e8fe81acc02a443784e0ca042feebb1c8770c guix-build-b9f06bf05b67/output/x86_64-apple-darwin/SHA256SUMS.part 8310942fddcbf991d3162f94b9e0f2f9f413f10089b6ac31d5c3a73039c3e987 guix-build-b9f06bf05b67/output/x86_64-apple-darwin/bitcoin-b9f06bf05b67-x86_64-apple-darwin-unsigned.dmg cdcbb08d7596a3f9a0b3816b113e7e4afd435fa82ae20d2d6750e30ccb13d820 guix-build-b9f06bf05b67/output/x86_64-apple-darwin/bitcoin-b9f06bf05b67-x86_64-apple-darwin-unsigned.tar.gz ac02894454dcee5c822304ab83165e500a882f7b5dd4d5f3645ac526652eb707 guix-build-b9f06bf05b67/output/x86_64-apple-darwin/bitcoin-b9f06bf05b67-x86_64-apple-darwin.tar.gz fa55686ae7c977ee9ec0213cad8f4021e81153a6de60a5b9f74fb840f173fdfa guix-build-b9f06bf05b67/output/x86_64-linux-gnu/SHA256SUMS.part cf40ec54ea736876a0fa5060ecad41d9215762b6d9b89fb2716cf073729097b9 guix-build-b9f06bf05b67/output/x86_64-linux-gnu/bitcoin-b9f06bf05b67-x86_64-linux-gnu-debug.tar.gz 4479fe5dc29925d7b51ed20faa44a87b68aa40b1fef979f1061240325892373f guix-build-b9f06bf05b67/output/x86_64-linux-gnu/bitcoin-b9f06bf05b67-x86_64-linux-gnu.tar.gz bef988880e6dbb7be90c4b2b56d5d9a68b91dceb64b2fa38e4d67e8c8cc5a78a guix-build-b9f06bf05b67/output/x86_64-w64-mingw32/SHA256SUMS.part 0040f79968d8ebb507358ee86797880a019f9730b92576af125b778bcf5ee233 guix-build-b9f06bf05b67/output/x86_64-w64-mingw32/bitcoin-b9f06bf05b67-win64-debug.zip ac63bf2dbf78361133043db7fa24be51c25fc5ddbbe19ea4a1c78e0843054757 guix-build-b9f06bf05b67/output/x86_64-w64-mingw32/bitcoin-b9f06bf05b67-win64-setup-unsigned.exe 0d9e317a95a613eb2e9216c4c9f5b0046ff52e3b11af80b8de9ac89209f33ab7 guix-build-b9f06bf05b67/output/x86_64-w64-mingw32/bitcoin-b9f06bf05b67-win64-unsigned.tar.gz 1a47e56d06207f3c86310c6eaec66f2c7693ca810de27ab2f97e67086239d396 guix-build-b9f06bf05b67/output/x86_64-w64-mingw32/bitcoin-b9f06bf05b67-win64.zip ``` ACKs for top commit: real-or-random: utACK b9f06bf Tree-SHA512: b7dc4aa6edd4d3291034b5a00dcf205d56e4a1133058cdc32faafb95eb050377937fa9336820b5ad0fe8550431fcd5f1ed3c7f3da27486bd022a36140c5499ba
Also pass in a (for now unused) reference to the params. Both changes are needed for the next commit.
Apart from tests, it is only used in one place, so there is no need for an alias.
Each alias is only used in one place.
It is part of the node library. Also, it won't be moved to the kernel lib, as it will be pruned of ArgsManager. -BEGIN VERIFY SCRIPT- # Move module git mv src/mempool_args.cpp src/node/ git mv src/mempool_args.h src/node/ # Replacements sed -i 's:mempool_args\.h:node/mempool_args.h:g' $(git grep -l mempool_args) sed -i 's:mempool_args\.cpp:node/mempool_args.cpp:g' $(git grep -l mempool_args) sed -i 's:MEMPOOL_ARGS_H:NODE_MEMPOOL_ARGS_H:g' $(git grep -l MEMPOOL_ARGS_H) -END VERIFY SCRIPT-
…tate during chain sync 9e04cfa test: add coverage for wallet inconsistent state during sync (furszy) 77de5c6 wallet: guard and alert about a wallet invalid state during chain sync (furszy) Pull request description: Follow-up work to my comment in bitcoin#25239. Guarding and alerting the user about a wallet invalid state during chain synchronization. #### Explanation if the `AddToWallet` tx write fails, the method returns a wtx `nullptr` without removing the recently added transaction from the wallet's map. Which makes that `AddToWalletIfInvolvingMe` return false (even when the tx is on the wallet's map already), --> which makes `SyncTransaction` skip the `MarkInputsDirty` call --> which leads to a wallet invalid state where the inputs of this new transaction are not marked dirty, while the transaction that spends them still exist on the in-memory wallet tx map. Plus, as we only store the arriving transaction inside `AddToWalletIfInvolvingMe` when we synchronize/scan block/s from the chain and nowhere else, it makes sense to treat the transaction db write error as a runtime error to notify the user about the problem. Otherwise, the user will lose all the not stored transactions after a wallet shutdown (without be able to recover them automatically on the next startup because the chain sync would be above the block where the txs arrived). Note: On purpose, the first commit adds test coverage for it. Showing how the wallet can end up in an invalid state. The second commit corrects it with the proposed solution. ACKs for top commit: achow101: re-ACK 9e04cfa jonatack: ACK 9e04cfa Tree-SHA512: 81f765eca40547d7764833d8ccfae686b67c7728c84271bc00dc51272de643dafc270014079dcc9727b47577ba67b340aeb5f981588b54e69a06abea6958aa96
ddddd69 sort after scripted-diff (MacroFake) fac812c scripted-diff: Move mempool_args to src/node (MacroFake) 6666438 Remove ::g_max_datacarrier_bytes global (MacroFake) fad0b4f Pass datacarrier setting into IsStandard (MacroFake) fa2a6b8 Combine datacarrier globals into one (MacroFake) fa477d3 Remove ::GetVirtualTransactionSize() alias (MacroFake) fa2f6c1 Remove ::fIsBareMultisigStd global (MacroFake) fadc14e Remove ::dustRelayFee (MacroFake) fa8a7f0 Remove ::IsStandardTx(tx, reason) alias (MacroFake) fa7a911 test: Remove unused cs_main (MacroFake) fa9cba7 Remove ::incrementalRelayFee and ::minRelayTxFee globals (MacroFake) fa14860 Remove ::fRequireStandard global (MacroFake) fa468bd Return optional error from ApplyArgsManOptions (MacroFake) Pull request description: This change is good because: * It moves module-specific init-logic out of the bloated init.cpp * It removes a global from validation.cpp and places it into the data structure that needs it (mempool) ACKs for top commit: glozow: re ACK ddddd69 ryanofsky: Code review ACK ddddd69 ariard: Light Code Review ACK ddddd69 Tree-SHA512: 9de2ce601cfcaa4dfd7d1c92270568895ce8702ccdffb59829fbe9618eab0fd88d738afef33ed66988c66861115e0340e881056bfb71e2aed4af2440bd37eb1e
…_limits.py tests f2f6068 test: MiniWallet: add `send_self_transfer_chain` to create chain of txns (Andreas Kouloumos) 1d6b438 test: use MiniWallet to simplify mempool_package_limits.py tests (Andreas Kouloumos) Pull request description: While `wallet.py` includes the MiniWallet class and some helper methods, it also includes some methods that have been moved there without having any direct relation with the MiniWallet class. Specifically `make_chain`, `create_child_with_parents` and `create_raw_chain` methods that were extracted from `rpc_packages.py` at f8253d6 in order to be used on both `mempool_package_limits.py` and `rpc_packages.py`. Since that change, due to the introduction of additional methods in MiniWallet, the functionality of those methods can now be replicated with the existing MiniWallet methods and simultaneously simplify those tests by using the MiniWallet. This PR's goals are - to simplify the `mempool_package_limits.py` functional tests with usage of the MiniWallet. - to make progress towards the removal of the `make_chain`, `create_child_with_parents` and `create_raw_chain` methods of `wallet.py`. For the purpose of the aforementioned goals, a helper method `MiniWallet.send_self_transfer_chain` is introduced and method `bulk_transaction` has been integrated in `create_self_transfer*` methods using an optional `target_weight` option. ACKs for top commit: MarcoFalke: ACK f2f6068 👜 Tree-SHA512: 3ddfa0046168cbf7904ec6b1ca233b3fdd4f30db6aefae108b6d7fb69f34ef6fb2cf4fa7cef9473ce1434a0cc8149d236441a685352fef35359a2b7ba0d951eb
Also, replace broad -acceptnonstdtxn=1 with -datacarriersize=100000
fad5bc4 test: Add missing static to IsStandardTx helper (MacroFake) Pull request description: Requested in bitcoin#25648 (comment) Also remove line break from the other two helpers. ACKs for top commit: glozow: utACK fad5bc4 aureleoules: ACK fad5bc4. theStack: ACK fad5bc4 Tree-SHA512: 771411e1fb5939a58491ecf719e1929ab0150b0faae2078ac72bd13117f1d4dcffdeed5027bfae53e4336af25a4f1db47d564abc06a5a2c9ec006a9f67bae104
Rename `BResult` class to `util::Result` and update the class interface to be more compatible with `std::optional` and with a full-featured result class implemented in bitcoin#25665. Motivation for this change is to update existing `BResult` usages now so they don't have to change later when more features are added in bitcoin#25665. This change makes the following improvements originally implemented in bitcoin#25665: - More explicit API. Drops potentially misleading `BResult` constructor that treats any bilingual string argument as an error. Adds `util::Error` constructor so it is never ambiguous when a result is being assigned an error or non-error value. - Better type compatibility. Supports `util::Result<bilingual_str>` return values to hold translated messages which are not errors. - More standard and consistent API. `util::Result` supports most of the same operators and methods as `std::optional`. `BResult` had a less familiar interface with `HasRes`/`GetObj`/`ReleaseObj` methods. The Result/Res/Obj naming was also not internally consistent. - Better code organization. Puts `src/util/` code in the `util::` namespace so naming reflects code organization and it is obvious where the class is coming from. Drops "B" from name because it is undocumented what it stands for (bilingual?) - Has unit tests.
Our RBF policy is different from the rules specified in BIP125 (refer to doc/policy/mempool-replacements.md instead), and will continue to diverge with package RBF. Keep references to BIP125 sequence number, since that is still useful and correct. -BEGIN VERIFY SCRIPT- ren() { sed -i "s:\<$1\>:$2:g" $(git grep -l "\<$1\>" ./src ./test); } ren m_allow_bip125_replacement m_allow_replacement ren allow_bip125_replacement allow_replacement ren MAX_BIP125_REPLACEMENT_CANDIDATES MAX_REPLACEMENT_CANDIDATES -END VERIFY SCRIPT-
Checks enabled: 'performance-for-range-copy' and 'performance-unnecessary-copy-initialization'
In src/test/fuzz/script_sigcache.cpp, we should really be setting up a full working BasicTestingSetup. The initialize_ function is only run once anyway. In src/test/txvalidationcache_tests.cpp, the Dersig100Setup inherits from BasicTestingSetup, which should have already set up a global script execution cache without the need to explicitly call InitScriptExecutionCache.
Returning the approximate total size eliminates the need for InitS*Cache() to do nElems*sizeof(uint256). The cuckoocache has a better idea of this information.
1. -maxsigcachesize is a DEBUG_ONLY option 2. Almost 7 years has passed since its semantics change in 830e3f3 from "number of entries" to "number of mebibytes" 3. A std::new_handler was added to the codebase after the original PR which introduced this limit, which will terminate immediately instead of causing trouble by being caught somewhere unexpected.
This fixes an potential overflow which existed prior to this patchset. If CuckooCache::cache<Element, Hash>::setup_bytes is called with a `size_t bytes` which, when divided by sizeof(Element), does not fit into an uint32_t, the implicit conversion to uint32_t in the call to setup will result in an overflow. At least on x86_64, this overflow is possible: static_assert(std::numeric_limits<size_t>::max() / 32 <= std::numeric_limits<uint32_t>::max()); static_assert(std::numeric_limits<size_t>::max() / 4 <= std::numeric_limits<uint32_t>::max()); This commit detects such cases and signals to callers that the `size_t bytes` input is too large.
Also: - Make DEFAULT_MAX_SIG_CACHE_SIZE into constexpr DEFAULT_MAX_SIG_CACHE_BYTES to utilize the compile-time integer arithmetic overflow checking available to constexpr. - Fix comment (MiB instead of MB) for DEFAULT_MAX_SIG_CACHE_BYTES. - Pass in max_size_bytes parameter to InitS*Cache(), modify log line to no longer allude to maxsigcachesize being split evenly between the two validation caches. - Fix possible integer truncation and add a comment. [META] I've kept the integer types as int64_t in order to not introduce unintended behaviour changes, in the next commit we will make them size_t.
...also move the 0-clamping logic to ApplyArgsManOptions, where it belongs.
9b6f5fa net: update hardcoded mainnet seeds for 24.x (Jon Atack) 7fd9028 contrib: make-seeds updates for 24.x (Jon Atack) 6075a0b net: update manual hardcoded mainnet seeds for 24.x (Jon Atack) Pull request description: Update the hardcoded P2P network seeds for 24.x after updating the manual seeds and the generation script as necessary. Previous update was bitcoin#24417. Can be tested by following the steps in `contrib/seeds/README.md`. Tool output: ``` $ python3 makeseeds.py -a asmap-filled.dat < seeds_main.txt > nodes_main.txt Loading asmap database "asmap-filled.dat"…Done. Loading and parsing DNS seeds…Done. IPv4 IPv6 Onion Pass 472019 73788 0 Initial 472019 73788 0 Skip entries with invalid address 472019 73788 0 After removing duplicates 7766 2310 0 Enforce minimal number of blocks 6534 1835 0 Require service bit 1 2808 801 0 Require minimum uptime 2748 781 0 Require a known and recent user agent 2727 775 0 Filter out hosts with multiple bitcoin ports 512 267 0 Look up ASNs and limit results per ASN and per net ``` ACKs for top commit: laanwj: LGTM ACK 9b6f5fa Emzy: ACK 9b6f5fa brunoerg: ACK 9b6f5fa Tree-SHA512: eef994bbd60524cfd9e4b5b836ddbe615cd2a77466394cdbb70a0ebc30c7822d8605473424f6d4a1ba37313c59373cf10717977a5c07e6f839e5ff86464c8c55
…ain/) There is no RPC call named `rescanwallet`, i.e. fix this by renaming to the actual RPC called `rescanblockchain`. -BEGIN VERIFY SCRIPT- sed -i s/rescanwallet/rescanblockchain/ $(git grep -l rescanwallet) -END VERIFY SCRIPT-
The ccache 4.6.2 is broken.
…options struct 7bc33a8 refactor: Move ChainstateManager options into m_options struct (Ryan Ofsky) Pull request description: Move `ChainstateManager` options into `m_options` struct to simplify class initialization, organize class members, and to name external option variables differently than internal state variables. This change was originally in bitcoin#25862, but it was suggested to split off in bitcoin#25862 (comment) so it could be merged earlier and reduce conflicts with other PRs. ACKs for top commit: naumenkogs: ACK 7bc33a8 Tree-SHA512: 1c3c77be7db60222732221c087fd01cb802b84ac93333fccb38c8d16645f5f950c3362981021e7a3ae054f19fa7dd9e1cd15daaa101b61ca8853e42a1fd21474
Required to fit timeout when all build caches are invalidated.
cda6265 ci: Increase `windows_container` resources (Hennadii Stepanov) 905f614 ci: Force `ccache` package version for MSVC build (Hennadii Stepanov) Pull request description: The recent update of the `ccache` [package](https://community.chocolatey.org/packages/ccache) from 4.6.1 to [4.6.2](https://ccache.dev/releasenotes.html#_ccache_4_6_2) broke our MSVC CI build. This PR forces the working version 4.6.1. Top commit has no ACKs. Tree-SHA512: 8b06f768ad83f2c1eb51d60a20aa2bd3f2f11109523e2bb947baea5739345df39550aa029e16a36727acb4ebc5dc878e70cc998e49b5bd9808fef8b17f3f3c42
ResendWalletTransactions() only executes every 12-36h (24h average). Triggering it every second is excessive, once per minute should be plenty.
…escriptor RPCs 6242314 doc: add `{import,list}descriptors` to list of descriptor RPCs (Sebastian Falbesoner) Pull request description: This PR adds the missing RPCs `importlistdescriptors` ([since v0.21](https://github.com/bitcoin/bitcoin/blob/1420547ec30a24fc82ba3ae5ac18374e8e5af5e5/doc/release-notes/release-notes-0.21.0.md?plain=1#L405)) and `listdescriptors` ([since v22](https://github.com/bitcoin/bitcoin/blob/1420547ec30a24fc82ba3ae5ac18374e8e5af5e5/doc/release-notes/release-notes-22.0.md?plain=1#L175)) to the list of RPCs supporting descriptors in descriptors.md. Also changes the description of `importmulti` slightly to point out that it only works for legacy wallets. ACKs for top commit: S3RK: ACK 6242314 achow101: ACK 6242314 aureleoules: ACK 6242314. brunoerg: ACK 6242314 Tree-SHA512: e8905c800b0c9a760e3380efebe2fb015c321a891dd4bf283039486d9d3b382b2c76901fcc8413acf435ed9832f76d9828efd70ba5ce62d4be65e87672bbd0a2
…nwallet/rescanblockchain/) e90a445 scripted-diff: rpc: fix rescan RPC name (s/rescanwallet/rescanblockchain/) (Sebastian Falbesoner) Pull request description: There is no RPC call named `rescanwallet`, i.e. fix this by renaming to the actual RPC called `rescanblockchain`. ACKs for top commit: achow101: ACK e90a445 aureleoules: ACK e90a445. promag: ACK e90a445 Tree-SHA512: abf1d1c18de32d87c29e4ff2b782dfb0e4a46dc2c2cc51ab616d12674a0f4a5d22214e00955663ae897cbb88f4f6ced913850f28ea3f5c1b3a54577a25fbf399
207abc1 doc: Add my key to SECURITY.md (Andrew Chow) Pull request description: I was recently added to the security list, and I think it would make sense to have more people who are on the list to be publicly listed as security contacts, so adding myself to the doc. ACKs for top commit: glozow: ACK 207abc1, matches the entry in trusted-keys. Tree-SHA512: 33f91d8ea618d7dfdeb372695aff3092f2f2e3df8503eafff18fc3756b3da566a27d6f83fdaf01a749c3d71c7a17a8ae43af2495721b969442924ff773930290
…bound connections 59aa54f i2p: log "SAM session" instead of "session" (Vasil Dimov) d7ec30b doc: add release notes about the I2P transient addresses (Vasil Dimov) 47c0d02 doc: document I2P transient addresses usage in doc/i2p.md (Vasil Dimov) 3914e47 test: add a test that -i2pacceptincoming=0 creates a transient session (Vasil Dimov) ae1e97c net: use transient I2P session for outbound if -i2pacceptincoming=0 (Vasil Dimov) a1580a0 net: store an optional I2P session in CNode (Vasil Dimov) 2b781ad i2p: add support for creating transient sessions (Vasil Dimov) Pull request description: Add support for generating a transient, one-time I2P address for ourselves when making I2P outbound connection and discard it once the connection is closed. Background --- In I2P connections, the host that receives the connection knows the I2P address of the connection initiator. This is unlike the Tor network where the recipient does not know who is connecting to them, not even the initiator's Tor address. Persistent vs transient I2P addresses --- Even if an I2P node is not accepting incoming connections, they are known to other nodes by their outgoing I2P address. This creates an opportunity to white-list given nodes or treat them differently based on their I2P address. However, this also creates an opportunity to fingerprint or analyze a given node because it always uses the same I2P address when it connects to other nodes. If this is undesirable, then a node operator can use the newly introduced `-i2ptransientout` to generate a transient (disposable), one-time I2P address for each new outgoing connection. That address is never going to be reused again, not even if reconnecting to the same peer later. ACKs for top commit: mzumsande: ACK 59aa54f (verified via range-diff that just a typo / `unique_ptr` initialisation were fixed) achow101: re-ACK 59aa54f jonatack: utACK 59aa54f reviewed range diff, rebased to master, debug build + relevant tests + review at each commit Tree-SHA512: 2be9b9dd7502b2d44a75e095aaece61700766bff9af0a2846c29ca4e152b0a92bdfa30f61e8e32b6edb1225f74f1a78d19b7bf069f00b8f8173e69705414a93e
…fferent minversion 835bd27 Wallet::SetMinVersion - Log the new minversion (Ali Sherief) Pull request description: This change prints a single additional line in the debug.log when bitcoin-cli loads a wallet using `loadwallet` (*not* `createwallet`). When Bitcoin Core creates a wallet, it's `minversion` is set to `FEATURE_BASE`, which is 10500. However, once the wallet is unloaded using `unloadwallet` or through program termination, and subsequently loaded again, `loadwallet` updates the `minversion` in the wallet.dat file to `FEATURE_LATEST`, currently 169900. The current logging format prints the very old wallet version during `createwallet`, and then the actual version in calls to `loadwallet`. This has confused at least one person ([reference](https://bitcointalk.org/index.php?topic=5410650.0) - I was the one who asked there if there were plans to change that behavior, and was subsequently redirected here by achow), so it will be very helpful to users to explicitly specify in the logs what the walletdb is doing. ACKs for top commit: achow101: ACK 835bd27 Tree-SHA512: 967c8c617e06a84915ddb147378ec3c8b0343e45f43145ec78df9cbc0201867f49c8e11cd068c403eb5ec06e07d38c3c0d3864dad8edc5efbb134a3fb30be41f
5ef8c2c test: fix typo for MaybeResendWalletTxs (stickies-v) fbba4a1 wallet: trigger MaybeResendWalletTxs() every minute (stickies-v) Pull request description: ResendWalletTransactions() only executes every [12-36h (24h average)](https://github.com/bitcoin/bitcoin/blob/1420547ec30a24fc82ba3ae5ac18374e8e5af5e5/src/wallet/wallet.cpp#L1947). Triggering it every second is excessive, once per minute should be plenty. The goal of this PR is to reduce the amount of (unnecessary) schedule executions by ~60x without meaningfully altering transaction rebroadcast logic/assumptions which would require more significant review. ACKs for top commit: achow101: ACK 5ef8c2c 1440000bytes: ACK bitcoin@5ef8c2c Tree-SHA512: 4a077e3579b289c11c347eaa0d3601ef2dbb9fee66ab918d56b4a0c2e08222560a0e6be295297a74831836e001a997ecc143adb0c132faaba96a669dac1cd9e6
* Added the new classes Scalar and G1Point * Added scalar.{h,cpp} and g1point.{h,cpp} to make file * Implemented more of the operators * Implemented more functions * Added new << >> logic for bitwise ops * implemented Scalar::{Rand,GetString,Hash} * Updated the arith scalar logic * Added more G1Point arith logic, math... * Added hashMapTo * Removed Scalar::hashAndMap * Updates that I forgot to push * Updated G1Point::Rand() * Update the mulVec func in G1Point to throw and exception if gVec and sVec size don't match * Removed the test code that was accidentally added * Implemented mulVec * Removed some unused header calls * Added return statement for G1Point::Double * add g1point/scalar and their tests * ignore .vscode * add endianness parameter to G1Point::MapToG1. add g1point_hash_and_map test * add mulvec_mcl test * add mulvec tests * add scalars and g1points classes * add MapToG1(string&) * extracted common parts of Scalars and G1Points to Elements. add slicing functions to Elements * wip * wip * drop G1point::operator^ * drop the 2nd type artument from Elements * add skeleton elements tests * add elements tests * support non-zero rand generatation * wip * add Elements::FirstNPowers * add .gitignore to exclude dynamically generated files on macos. add Elements::RandomVector * wip * add Scalar::Pow and Scalar::GetBits * add range proof test (not tested) * add type parameter where required * calculate t1, t2 properly * fix typo * add Elements::RepeatN test * add comment * add integration_tests and move such tests there * introduce std::is_same in elements.h * add gg^z == gg^(ones * z) * wip * add working h^mu gg^l test * add Scalars::FirstNInvPow * add multiply inv power seq for G1Points * wip * wip * drop FirstNInvPow. add working 65_g_part_ts_only test * wip * add working range proof test * wip * make the range proof procedure a function * integrate inner product argument to range proof * wip * wip * wip * wip * drop unused variable * separate elements implementation to cpp * clean up code * wip * wip * ignore .vscode add endianness parameter to G1Point::MapToG1. add g1point_hash_and_map test add mulvec_mcl test add mulvec tests add scalars and g1points classes add MapToG1(string&) extracted common parts of Scalars and G1Points to Elements. add slicing functions to Elements wip wip drop G1point::operator^ drop the 2nd type artument from Elements add skeleton elements tests add elements tests support non-zero rand generatation wip add Elements::FirstNPowers add .gitignore to exclude dynamically generated files on macos. add Elements::RandomVector wip add Scalar::Pow and Scalar::GetBits add range proof test (not tested) add type parameter where required calculate t1, t2 properly fix typo add Elements::RepeatN test add comment add integration_tests and move such tests there introduce std::is_same in elements.h add gg^z == gg^(ones * z) wip add working h^mu gg^l test add Scalars::FirstNInvPow add multiply inv power seq for G1Points wip wip drop FirstNInvPow. add working 65_g_part_ts_only test wip add working range proof test wip make the range proof procedure a function integrate inner product argument to range proof wip drop unused variable wip wip wip separate elements implementation to cpp clean up code wip wip * squashed commits * fix typo * migrate indirect MulVec to Elements * fix build issues in clang * fix spelling errors * add newly introduced boost depdendency to lint-includes.py * remove local depdendent functions * wip * remove trailing spaces * Added BLS and MCL libs/includes to kernel build * Updated copy constructor and assignment operators * Added clean steps to clean-local for mcl and bls libs * FORCE mcl and bls libs to build using main project CC and CXX values * replace test_integration_invert_zero by additional test case of Scalars::FirstNPow * use fixture test suite to provide name for bls/arith tests * throw exception when Scalar(0) is inverted * include bls/arith headers in setup_common.h * add g1point and mcl_initializer dependency to test_util source * fix test_util.include * add blsct/arith/scalar depedency to libtest_util * Disabled LLVM use in MCL compilation, this disabled ASM * Added NM to android host configs for depends builds * Added ABI=32 for i386 builds of GMP in depends * fix undefined sanitizer error Co-authored-by: mxaddict <[email protected]>
Conflicts: REVIEWERS SECURITY.md build_msvc/README.md ci/test/06_script_b.sh configure.ac doc/build-netbsd.md src/Makefile.bench.include src/qt/locale/bitcoin_en.xlf src/test/net_tests.cpp test/functional/interface_usdt_net.py test/functional/interface_usdt_utxocache.py test/functional/interface_usdt_validation.py test/functional/rpc_signmessagewithprivkey.py test/functional/test_framework/messages.py
aguycalled
approved these changes
Sep 5, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
@aguycalled this PR is based on master rebased to remove the last squash commit, if the squash commit it removed, this PR will have no conflicts