muxator
commented at 9:46 AM on May 22, 2023:
none
This PR updates the base bitcoin version from v23.0 to v23.1 (original release notes here).
After this changes, bitcoind --version gives:
Itcoin Core version v23.1.0-itcoin-1
This is an intermediate release towards v23.2, which will solve a compatibility problem with gcc 13.
consensus: MAX_MONEY change made amount_tests fail271c36b6f9
Merge pull request #28 from bancaditalia/update-itcoin-to-v0.21.2
Update itcoin to v0.21.2
723b139f65
contrib/signet: Fix typos
Thanks to muxator, JeremyRubin, and gruve-p for spotting.
--HG--
branch : bitcoin-pr-20923
bf73f74e18
contrib/signet/miner: --grind-cmd is required for calibrate
Thanks to muxator for spotting.
--HG--
branch : bitcoin-pr-20923
aa5b2e25d4
contrib/signet/miner: Automatic timestamp for first block
When mining the first block of a new signet chain, pick a timestamp for
the first block so that after mining 100 blocks the timestamp will be
back to the current time -- this prevents an unnecessary delay before
any miner rewards have matured enough to be spent. This takes into
account that the delta between blocks may be shorter than 10 minutes due
to attempting to increase the difficulty to match --nbits, but does not
take into account the time spent actually generating the 100 blocks.
--HG--
branch : bitcoin-pr-20923
infra: fix signet config scripts to use custom boost libraries1672c21e9e
infra: README.md include instructions to build and configure a network443e4f8999
consensus: signet solution independent blockchain
add a new block merkle root function that excludes the signet solution from the calculation
Includes whole block header, with pow fields nBits and nNonce, in the signature verification.
consensus: signet solution independent blockchain
link libbitcoinconsensus with boost library. Libconsensus is the only bitcoin library which does not depend on boost. With itcoin this is not true anymore, because signet is included in bitcoinconsensus and it requires boost optional. The dependency may be removed in the future.
a35ce8819e
test: add configuration file with global constants, e.g. paths
Co-authored-by: Giuseppe Galano <giuseppe.galano2@bancaditalia.it>
c5c33caaf0
contrib/signet: change file structure to include miner python library19882eff6d
contrib/signet: update miner to create signet solution independent blocks
Co-authored-by: Marco Favorito <marco.favorito@bancaditalia.it>
guix: use same commit for codesigning time-machine
The time machines should be updated in lockstep.
Github-Pull: #24484
Rebased-From: 29862bdd402112a98d5da08cb9909bd427b955ad
0dcbd2ee93
Merge bitcoin/bitcoin#24485: [23.x] guix: use same commit for codesigning time-machine
0dcbd2ee9334e9f722796cd5255928ac8fdc4da6 guix: use same commit for codesigning time-machine (fanquake)
Pull request description:
The time machines should be updated in lockstep. Backports #24484.
Github-Pull: #24484
Rebased-From: 29862bdd402112a98d5da08cb9909bd427b955ad
ACKs for top commit:
hebasto:
ACK 0dcbd2ee9334e9f722796cd5255928ac8fdc4da6
Tree-SHA512: 831f2d1a0bd92bc6acbe20b0c2e2557f9cc8056034c6975ec6be2cae2eafe584d618b83519623caa81adc434121174e4c56a2df3cc8912352146ac610901bd0f
cbdfb46b55
test: Add tests for GetArg methods / settings.json type coercion
Just add tests. No changes to application behavior. Tests will be
updated in the next commit changing & improving current behavior.
Include a Qt test for GUI startup crash reported by Rspigler in
https://github.com/bitcoin/bitcoin/issues/24457 caused by GetArg
behavior that happens if settings.json contains an integer value for any
of the configuration options which GUI settings can currently clash with
(-dbcache, -par, -spendzeroconfchange, -signer, -upnp, -natpmp, -listen,
-server, -proxy, -proxy, -onion, -onion, -lang, and -prune).
Github-Pull: bitcoin/bitcoin#24498
Rebased-From: 84b0973e35dae63cd1b60199b481e24d54e58c97
4607f700d0
qt: Avoid crash on startup if int specified in settings.json
Fix GUI startup crash reported by Rspigler in
https://github.com/bitcoin/bitcoin/issues/24457 that happens if
settings.json contains an integer value for any of the configuration
options which GUI settings can currently clash with (-dbcache, -par,
-spendzeroconfchange, -signer, -upnp, -natpmp, -listen, -server, -proxy,
-proxy, -onion, -onion, -lang, and -prune).
Fix is a one-line change in ArgsManager::GetArg.
Github-Pull: bitcoin/bitcoin#24498
Rebased-From: 5b1aae12ca4a99c6b09349981a4902717a6a5d3e
Merge bitcoin/bitcoin#24511: [23.x] qt: Avoid crash on startup if int specified in settings.json
7e1b968f61a1309dfd0fc4f7cd5a2d964bfc4f30 qt: Avoid crash on startup if int specified in settings.json (Ryan Ofsky)
4607f700d07cd813db4e8ef516b68a759674e1db test: Add tests for GetArg methods / settings.json type coercion (Ryan Ofsky)
Pull request description:
Backport of #24498
ACKs for top commit:
jonatack:
ACK 7e1b968f61a1309dfd0fc4f7cd5a2d964bfc4f30
Tree-SHA512: efe6ec4361858e50fd524db64141ad3622ecef321b99567da9650575558a9a9bdec0fc43113967cae2f23a1375132eed2d6ebf64d4aa91ac1c5f2f591a26ba74
430808ab13
Merge bitcoin/bitcoin#24514: [23.x] Second round signapple backports (M1)
1fd91da45438a803e5dc968bb976fb0fc79f4a72 build, mac: Include arch in codesignature tarball (Andrew Chow)
eba46583eda59df1dde72b331f45e340818fa34c guix: use latest signapple (Andrew Chow)
Pull request description:
This backports additional signapple and macOS codesigning changes from #24506 for 23.x (skipping #24503, which is an interim signapple update, and the certvalidator change, which is not strictly necessary), and should complete the changes required to perform M1 codesigning for the 23.x release.
ACKs for top commit:
hebasto:
ACK 1fd91da45438a803e5dc968bb976fb0fc79f4a72, I have reviewed the code and it looks OK, I agree it can be merged.
Tree-SHA512: 55b7e0680058203744dc491da060ef56a880270a01c10e475b7a171457902410806895dbe7332a323ce47c2a776337fa29eb811d2511fce84ede13aeacbe2a02
init, doc: improve -onlynet help and tor/i2p documentation
and harmonize them as follows
- s/outgoing/automatic outbound/
- s/Incoming/Inbound and manual/ (are not affected by this option.)
- s/only through network/only to network/
- s/this option. This option/this option. It/
- s/network types/networks/
and also pick up a few nits in doc/p2p-bad-ports.md
Github-Pull: bitcoin#24468
Rebased-From: a1db99a
2a6fcf9c13
rpc: rename getdeploymentinfo status-next to status_next
Github-Pull: bitcoin#24528
Rebased-From: 5d7c69b
ef6a37b7c4
test: set segwit height back to 0 on regtest
This was changed in #22818 from 0 to 1. Since it changes
BLOCK_OPT_WIT of the genesis block, older versions of bitcoin
core would not read regtest directories created with newer versions
without a reindex.
Github-Pull: bitcoin#24527
Rebased-From: 5ce3057
guix: Drop "-signed" suffix for signed macOS .dmg files
This change makes naming of the signed artifacts consistent across
different OSes, including Windows.
Github-Pull: #24549
Rebased-From: 4b4b04a66d8f088f6aa9ec6398db49d40481910f
2e7cde8f68
guix: Use "win64" for Windows artifacts consistently
This commit does not change behavior.
Review hint:
git show --color-moved --color-moved-ws=allow-indentation-change
Github-Pull: bitcoin-core/gui#555
Rebased-From: 026b5b4523317fdefc69cf5cec55f76f18ad0c0a
fc421d4c8c
refactor: helper function signWithExternalSigner()
Does not change behavior.
Review hint:
git show --color-moved --color-moved-ws=allow-indentation-change
Github-Pull: bitcoin-core/gui#555
Rebased-From: 4b5a6cd14967b8ec3cb525e4cb18628de6c15091
940694664d
gui: restore Send for external signer
Before this change the send confirmation dialog would keep the Send option disabled. The Create Unsigned choice would actually send. This is potentially confusing.
With this change the Create Unsigned button will not attempt to sign and always produce a PSBT. The Send button will attempt to sign, and only return a PSBT if more signatures are needed.
When using an external signer, the Create Unsigned option only appears when PSBT controls are enabled in the wallet settings.
This commit maintains the pre-existing behavior of filling the PSBT (without signing) even when not using an external signer.
Closes #551
Co-authored-by: Jon Atack <jon@atack.com>
Github-Pull: bitcoin-core/gui#555
Rebased-From: 2efdfb88aab6496dcf2b98e0de30635bc6bade85
642f2726de
doc, guix: Include arm64-apple-darwin into codesigned archs
61c021605f8733891cb8d92509c84ac814d3712a doc, guix: Include arm64-apple-darwin into codesigned archs (Hennadii Stepanov)
f541a252f676dcdab15654e8b2b83b2dbcee46b3 doc: Drop a note about Intel-based Macs (Hennadii Stepanov)
dd2c7f71fd0f759d0d724ff182b508fc2db59131 guix: Use "win64" for Windows artifacts consistently (Hennadii Stepanov)
2e7cde8f6851be73477766bac00c4c922d79370f guix: Drop "-signed" suffix for signed macOS .dmg files (Hennadii Stepanov)
7f6420c833fe63e51ec094c1484969d29aac415b guix: Use $HOST instead of generic osx{64} for macOS artifacts (Hennadii Stepanov)
de528793b6912dd657c7197b1a01c2da708f0a1f Update signapple for platform identifier fix (Andrew Chow)
Pull request description:
Backports:
* #24549
* #24573
* #24588
* #24597
ACKs for top commit:
laanwj:
Code review ACK 61c021605f8733891cb8d92509c84ac814d3712a
Tree-SHA512: 023bfe6f1a31cec66f0255fb8e9c186f44a50a900a9f22c65b2da672b413fec7570f0f11626317344b6f91e74610006ffe0e35243af510de1eb8a3ceb8e8d37f
55a60b9718
options: flip listenonion to false if not listening
If the user has unchecked "Allow incoming connections" in
`Settings->Options...->Network` then `fListen=false` is saved in
`~/.config/Bitcoin/Bitcoin-Qt.conf`. This flips `-listen` to `false`
during startup, but leaves `-listenonion` to `true`.
This flipping of `-listen` is done in `OptionsModel::Init()` after
`InitParameterInteraction()` has been executed which would have flipped
`-listenonion`, should it have seen `-listen` being `false`
(this is a difference between `bitcoind` and `bitcoin-qt`).
Fixes: https://github.com/bitcoin-core/gui/issues/567
Github-Pull: bitcoin-core/gui#568
Rebased-From: 7f90dc26c8938f348938929b6d8bf1ea6f149209
70f2c579b9
Merge bitcoin/bitcoin#24596: [23.x] GUI backports
70f2c579b9de41f987e170f15c0ce767d9ad7931 options: flip listenonion to false if not listening (Vasil Dimov)
642f2726deaa1dad21912d4319fac0deb6dbb564 gui: restore Send for external signer (Sjors Provoost)
940694664de2a10b9d6d81ddff9be05495e6a3da refactor: helper function signWithExternalSigner() (Sjors Provoost)
fc421d4c8c8cdd94a5377a8004209506a089357b move-only: helper function to present PSBT (Sjors Provoost)
Pull request description:
Backports from the GUI repo:
- bitcoin-core/gui#555
- bitcoin-core/gui#568
ACKs for top commit:
Sjors:
utACK 70f2c579b9de41f987e170f15c0ce767d9ad7931
gruve-p:
ACK https://github.com/bitcoin/bitcoin/pull/24596/commits/70f2c579b9de41f987e170f15c0ce767d9ad7931
Tree-SHA512: 883c442f8b789a9d11c949179e4382843cbb979a89a625bef3f481c7070421681d9db2af0e5b2449abca362c8ba05cf61db5893aeb6a9237b02088c2fb71e93e
7d03cf632d
Clarify in -maxtimeadjustment that only outbound peers influence time data
Github-Pull: bitcoin#24609
Rebased-From: 1bba72d
5d24f612d1
doc: create initial doc/cjdns.md for cjdns how-to documentation
Adapted in part from the CJDNS description in #23077 by Vasil Dimov
and from CJDNS documentation and feedback by Caleb James DeLisle.
Co-authored-by: Vasil Dimov <vd@FreeBSD.org>
Github-Pull: bitcoin#24555
Rebased-From: ed15848
4690e8af13
doc: update tor.md with cjdns and getnodeaddresses, fix tor grep,
and improve local addresses section
Github-Pull: bitcoin#24555
Rebased-From: 3bf6f0c
4148396229
doc: update i2p.md with cjdns, improve local addresses section
Github-Pull: bitcoin#24555
Rebased-From: f44efc3
7a553d4e65
doc, init: add links to doc/cjdns.md
Github-Pull: bitcoin#24663
Rebased-From: daae288
65b966743c
ci: Temporarily use clang-13 to work around clang-14 TSan bug
Github-Pull: bitcoin#24572
Rebased-From: fa43933
b05a59b69f
rpc: Exclude descriptor when address is excluded
Github-Pull: bitcoin#24636
Rebased-From: faf37c2
235b042594
contrib: fix signet miner (sighash mismatch)
PSBT signing was changed to use SIGHASH_DEFAULT by default in #22514.
The signet miner script sets the sighash type of the created PSBT to
SIGHASH_ALL, hence this leads to a sighash mismatch when the
`walletprocesspsbt` RPC is called. Fix this by explicitly passing the
correct sighash type.
Note that the same change was needed in one of our functional tests,
see commit d3992669df826899a3de78a77a366dab46028026.
Reported by gruve-p.
Github-Pull: bitcoin#24553
Rebased-From: 12cc020
eaa04194b9
util: add linkat to syscall sandbox (AllowFileSystem)
Github-Pull: bitcoin#24659
Rebased-From: 9809db3
85f85c7e5f
build: Fix Boost.Process detection on macOS arm64
Could be tested as follows:
```
% brew install boost@1.76
% ./autogen.sh
% ./configure --with-boost='/opt/homebrew/opt/boost@1.76'
```
Github-Pull: bitcoin#24521
Rebased-From: 1d4157a
26c2f23f36
build: Fix Boost.Process test for Boost 1.78
Github-Pull: bitcoin#24523
Rebased-From: 532c64a
ded10fe3ea
util: Add inotify_rm_watch to syscall sandbox (AllowFileSystem)
Github-Pull: bitcoin#24690
Rebased-From: f05a4cd
174af33d5d
Merge bitcoin/bitcoin#24512: 23.x backports
174af33d5d78cfe341b688f5393d9acc8c4aaf6b util: Add inotify_rm_watch to syscall sandbox (AllowFileSystem) (Hennadii Stepanov)
ded10fe3eae2ad8058d0cc8f1cee1ad1d34bb507 build: Fix Boost.Process test for Boost 1.78 (Hennadii Stepanov)
26c2f23f36228e334d17c43a0cb61f76cc545c3d build: Fix Boost.Process detection on macOS arm64 (Hennadii Stepanov)
85f85c7e5fce1ac1682bf62808d37f3da23614f7 util: add linkat to syscall sandbox (AllowFileSystem) (fanquake)
eaa04194b979635a3d8590a8409084159d1e6576 contrib: fix signet miner (sighash mismatch) (Sebastian Falbesoner)
235b04259414fd708c31bbe0cab28ba09bcd25f1 rpc: Exclude descriptor when address is excluded (MarcoFalke)
b05a59b69fd51dd6a7ebc79dc0d11dc2af47a006 ci: Temporarily use clang-13 to work around clang-14 TSan bug (MarcoFalke)
65b966743c62914df7fd9b7f028f1f5bb3683eda doc, init: add links to doc/cjdns.md (Jon Atack)
7a553d4e657d52e2d15b53a4b54b4ca5ecde2f04 doc: update i2p.md with cjdns, improve local addresses section (Jon Atack)
4148396229db008419f895161b6c7310a44d563b doc: update tor.md with cjdns and getnodeaddresses, fix tor grep, (Jon Atack)
4690e8af1300daba276c7b426030d4c69d27d73b doc: create initial doc/cjdns.md for cjdns how-to documentation (Jon Atack)
5d24f612d1f7f5f1258216e3b7c569399c657abb Clarify in -maxtimeadjustment that only outbound peers influence time data (Jon Atack)
b1646f1bb573031ca587081276d9fe7c4873b8c9 test: set segwit height back to 0 on regtest (Martin Zumsande)
ef6a37b7c4b942f2db95809a299700e410b94460 rpc: rename getdeploymentinfo status-next to status_next (Jon Atack)
2a6fcf9c136f7a0c6ba12010ff1769acd07804cf init, doc: improve -onlynet help and tor/i2p documentation (Jon Atack)
Pull request description:
Backport the following to 23.x:
- #24468
- #24528
- #24527
- #24609
- #24555
- #24663
- #24572
- #24636
- #24553
- #24659
- #24521
- #24523
- #24690
- #24710
Possibly also:
- #24579
- #24691
ACKs for top commit:
laanwj:
List-of-commits ACK 174af33d5d78cfe341b688f5393d9acc8c4aaf6b, I think we should merge this and move forward with rc3..
hebasto:
ACK 174af33d5d78cfe341b688f5393d9acc8c4aaf6b
Tree-SHA512: 5a493e1652b780b527767d6ca9e67012abd2fa5573496e85e0d8aa4bed3eb332bfcd72610b8dfb954ff274d42450623233c96c479de2085b9c8344ba5abf1935
wallet, refactor: Add wallet::NotifyWalletLoaded() function
This change is a prerequisite for the following bugfix.
Github-Pull: bitcoin/bitcoin#24711
Rebased-From: aeee419c6aae085cacd75343c1ce23486b2b8916
4f3ba8517a
wallet: Postpone NotifyWalletLoaded() for encrypted wallets
Too early NotifyWalletLoaded() call in CWallet::Create() results the
notification goes before DescriptorScriptPubKeyMans were created and
added to an encrypted wallet.
Co-authored-by: Andrew Chow <achow101-github@achow101.com>
Github-Pull: bitcoin/bitcoin#24711
Rebased-From: 0c12f0116ca802f55f5ab43e6c4842ac403b9889
1448c99380
Merge bitcoin/bitcoin#24725: 23.0: rc4 backport
1448c99380bbb83f2cf0410470e75049d0e0c627 wallet: Postpone NotifyWalletLoaded() for encrypted wallets (Hennadii Stepanov)
4f3ba8517a7e8c8f823617149d12e72cb32c8d0d wallet, refactor: Add wallet::NotifyWalletLoaded() function (Hennadii Stepanov)
Pull request description:
ACKs for top commit:
Sjors:
ACK 1448c99380bbb83f2cf0410470e75049d0e0c627
hebasto:
ACK 1448c99380bbb83f2cf0410470e75049d0e0c627
jarolrod:
ACK https://github.com/bitcoin/bitcoin/commit/1448c99380bbb83f2cf0410470e75049d0e0c627
Tree-SHA512: 84d908ff40f0048394f74499a9640904eb244bae975648221a883ab6ef6c5d5d7c178c17e5e420b565000c6d9cea26769fa9dd7c53ae10e32fa15748940ea796
e089c68aa1
guix: fix vmov alignment issues with gcc 10.3.0 & mingw-w64
This introduces a patch to our GCC (10.3.0) mingw-w64 compiler, in Guix, to make
it avoid using aligned vmov instructions. This works around a longstanding issue
in GCC, https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54412, which was recently
discovered to be causing issues, see #24726.
Note that distros like Debian are also patching around this issue, and that is
where this patch comes from. This would also explain why we haven't run into this
problem earlier, in development builds. See:
https://salsa.debian.org/mingw-w64-team/gcc-mingw-w64/-/blob/master/debian/patches/vmov-alignment.patch.
Fixes #24726.
Alternative to #24727.
See also:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=939559
Github-Pull: #24736
Rebased-From: d6fae988eff78e28756d9b6219ec0239c420f51b
This commit backports a patch to the GCC 10.3.0 we build for Windows
cross-compilation in Guix. The commit has been backported to the GCC
releases/gcc-10 branch, but hasn't yet made it into a release.
The patch corrects a regression from an earlier GCC commit, see:
https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=357c4350680bf29f0c7a115424e3da11c53b5582
and
https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=074226d5aa86cd3de517014acfe34c7f69a2ccc7,
related to the way newer versions of mingw-w64 implement setjmp/longjmp.
Ultimately this was causing a crash for us when Windows users were
viewing the network traffic tab inside the GUI. After some period, long
enough that a buffer would need reallocating, a call into FreeTypes
gray_record_cell() would result in a call to ft_longjmp (longjmp), which
would then trigger a crash.
Fixes: https://github.com/bitcoin-core/gui/issues/582.
See also:
https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=e8d1ca7d2c344a411779892616c423e157f4aea8.
https://bugreports.qt.io/browse/QTBUG-93476.
Github-Pull: #24842
Rebased-From: 457148a803cee02897b7428fa7b3eb93eed71e4c
a75b8ec836
Merge bitcoin/bitcoin#24843: [23.x] rc5 backports
a75b8ec836a5a5c08aebaf2efd99d5c34d033292 guix: fix GCC 10.3.0 + mingw-w64 setjmp/longjmp issues (fanquake)
Pull request description:
Currently backports:
* https://github.com/bitcoin/bitcoin/pull/24842
ACKs for top commit:
gruve-p:
ACK https://github.com/bitcoin/bitcoin/pull/24843/commits/a75b8ec836a5a5c08aebaf2efd99d5c34d033292
hebasto:
ACK a75b8ec836a5a5c08aebaf2efd99d5c34d033292
jonatack:
Code review and commit meta-data ACK a75b8ec836a5a5c08aebaf2efd99d5c34d033292
jarolrod:
ACK a75b8ec836a5a5c08aebaf2efd99d5c34d033292
Tree-SHA512: 1071b675647ed990ffda9c84391538b6c2e741b423a64e534754322250ca7f95cbc948e005cb976bf070099038f86997bfa1946c543a109e2086d2aaeaacb189
signet test framework: decouple num_nodes from num_signers505be93e77
infra: trap error in subshell in create-keypair.sh
Before this change, if a bitcoin-cli command failed during the execution of this
script, the error was not trapped, because bash is iffy when assigning the
result of a command substitution to a local variable.
The horrid solution is to separate declaration and assignment of the variables.
See: https://unix.stackexchange.com/questions/23026/how-can-i-get-bash-to-exit-on-backtick-failure-in-a-similar-way-to-pipefail#146900
f314d57cec
infra: invoke createwallet command in "-named" style
This change has no impact in bitcoin v0.21, but is necessary because, when
migrating to v23, we will need to pass the additional parameter
"descriptors=false" to keep backwards compatibility.
7303bd5651
infra: force the use of legacy wallets (hold off descriptors for now)
This branch is still based on bitcoin v0.21.2, which by default creates legacy
(non descriptors) wallets. Bitcoin v23 will change this default to descriptors,
but we do not want to deal with descriptors yet.
In order to have our code base compatible with both bitcoin versions, let's
force the use of legacy wallets. This will allow us to control explicitly the
moment we are going to enable descriptors after the migration to v23.0 will be
complete.
4a2a70c728
test_framework: load "signet/miner" without having to rename it to miner.py
Like the rest of itcoin, our miner builds on the upstream contrib/signet/miner,
slightly modifying it.
That program is not written as a python module and cannot be loaded as such.
Since the itcoin test framework needed to call its functionalities, a previous
PR renamed it "miner" -> "miner.py".
In this way we lost the possibility of automatically importing the miner changes
from upstream, because the itcoin-specific code is now in a different file.
This PR messes with the internals of Python's importlib, defining two custom
functions:
- import_module_by_abspath(), a generic function which takes the absolute path
to a python source code file and loads it as a module;
- import_miner(), which uses the above function to look for the miner in the
itcoin-specific paths, differentiating between the case of running in dev mode
from a code checkout or in production mode from an installation under
/someprefix/bin.
In the long run, this will ease to upgrade to newer bitcoin-core versions,
because the miner will directly hold the itcoin-specific modifications in-place.
The commit also changes the itcoin-specific tests, that now make use of the new
import strategy.
This commit also reverts 19882eff6d70.
fea536d7ca
miner: remove trailing whitespaces
No functional changes.
b32d395f26
miner: fix error in type hint for return type of do_generate_next_block()
mypy complains:
miner:358: error: Invalid type comment or annotation
miner:358: note: Suggestion: use tuple[...] instead of tuple(...)
This was introduced in 5670963970ba.
5281a4ffdd
miner: use a dedicated logger for the miner, without changing its source code
bitcoin's contrib/signet/miner does not use a dedicated logger, and instead
directly calls logging.{debug,info,warning,error}. By default, the logging
module writes to stderr. This is OK as long as the miner is called via command
line.
However, in itcoin the miner is also loaded as a module by the functional test
framework. In that case we cannot afford to write to stderr, because the test
framework considers a failure any output to stderr.
This change configures a proper logger for the miner module, but monkey-patches
the "logging" name, assigning it to the logger. The changes we have done
throughout the miner are then reverted.
In this way we can keep the source code as close as possible to upstream,
without breaking the tests.
If a proper logging was upstreamed in bitcoin, this patch could be reverted.
This partially reverts changes done in 5670963970ba.
1bf302bf5e
infra: remove useless comment from configure-itcoin-core-dev.sh98c6bb62e2
infra: suppress external warnings when building8111b012eb
miner: do not use defaults when calling walletprocesspsbt
This is in preparation for the migration to v23. In particular, taproot changed
the default sighash type to SIGHASH_DEFAULT and old miner code didnt work
because previous default was SIGHASH_ALL.
5a3f8c58b2
infra: alphabetically sort each group of options when calling configure
This will make it easier to spot differences between configure-itcoin-core.sh
and configure-itcoin-core-dev.sh.
No functional changes.
e85b3bb4ad
infra: enable -Werror again in configure-itcoin-core-dev.sh
When we started to use a non-system boost, it started to generate a lot of
warnings. This forced us to get rid of -Werror in configure-itcoin-core-dev.sh,
otherwise the build would fail.
In 8111b012eb17 we started using --enable-suppress-external-warnings. Now
warnings are only caused by our code base, and so we might want to use -Werror
again.
9a11a38899
test: test_framework_signet should use requires_wallet=True33f8082406
miner: fixes #30 that caused miner to crash when using cli with big parameters
The bug is fixed using stdin instead of command line parameters to invoke walletprocesspsbt and submitblock.
The bitcoin_cli function is modified to be invoked with input=stdinput as kwargs.
The subprocess_bitcoin_cli function is removed and the already existing TestNodeCLI.send_cli is used
In the main, arguments are parsed and adapted to the TestNodeCLI interface
c8f044b1a2
infra: disable gui in configuration5f1079780f
infra: add a comment about DEBUG_LOCKORDER compiler flag0c3c8d84f2
vscode: use DEBUG_LOCKORDER compiler flag during development9c930ac4b4
test: rename feature_signet_old_test to its original name0fd4f00edf
test: rename itcoin specific testsb7b50eb470
test: rename test framework itcoin905e87f55b
test: rename BaseSignetTest to BaseItcoinTestcaf2e65915
rpc: Capture potentially large UniValue by ref for rpcdoccheck
infra: typos in configure-itcoin-core.sh, configure-itcoin-core-dev.sh
Removed two typos that were lingering there since the beginning of times.
9dbce7c649
infra: replace "--with-gui=no" with "--without-gui" for uniformity
This should have been part of 5f1079780ff4, but was missed during review.
855229f0ed
Merge bitcoin/bitcoin#25241: [23.x] rpc: Capture potentially large UniValue by ref for rpcdoccheck
7fcac96597218691724002c2b8ecb3dbcf60bf06 rpc: Capture potentially large UniValue by ref for rpcdoccheck (Martin Zumsande)
Pull request description:
ACKs for top commit:
fanquake:
ACK 7fcac96597218691724002c2b8ecb3dbcf60bf06
Tree-SHA512: 7b60d35c84a47ff2b16aed06b4ea82ff3f60cc24409e2927b9ed618f8f939252903417ef93b711171e22b15daf5d857964687fde25ec554153337c996e5e27fa
c3936cc53d
infra: written rename_threadsafety.py
The tool automates the application of the prefix "TS_ITCOIN_" to the thread
safety symbols defined in src/threadsafety.h
For ease of reference the tool is committed in the "itcoin" branch, however it
is meant to be used from a vanilla bitcoin checkout.
Requirements:
- python >=3.8
- gcc/g++ 11
787b3b2055
infra: make rename_threadsafety.py compatible with GCC 10
Before this change, the code was very strict and tayloerd around GCC's 11
output.
GCC 10 generates messages in a different format, with less information, and
thus we must be more lenient.
This change makes the code compatible with bot GCC 10 and GCC 11, and I have
verified that, when applied to itcoin v0.21.2, yields exactly the same results
when using gcc 10 and gcc 11.
Written a minimal test case that shows the compatibility with gcc-10 messages.
TODO:
- revert this commit, and replace the hackish approach used in this patch with
a better structured code, or at least with a feture flag
fbbe80cab2
itcoin: add TS_ITCOIN_ prefix in src/threadsafety.h
After this change, the codebase will not compile. The other files will be
changed accordingly using infra/rename_threadsafety.py from itcoin branch.
This change is in preparation to the migration of itcoin from v0.21.2 to v23.
95d9fa4089
itcoin: added TS_ITCOIN_ prefix across the itcoin v23.0 codebase
The execution of `infra/rename_threadsafety.py run` succeeded in 14 compile
cycles. The compiler used was gcc 10.
LOG:
SUCCESS: a total of 589 replacements in 64 files over 14 compile cycles were made. Elapsed time: 162.68192479000027s
f6a356d29f
miner, validation: use curly braces in conditional statements in ITCOIN_SPECIFIC sections
No functional changes.
3ab9c6ce86
miner, validation: add ITCOIN_SPECIFIC START / ITCOIN_SPECIFIC END where needed
This will make it easier to group ITCOIN_SPECIFIC changes
No functional changes.
83912df16f
miner: swap the comment containing the original code above our new version
No functional changes.
e173db76b7
miner: uniformly enclose the ITCOIN_SPECIFIC code blocks
No functional changes.
91fc58b910
miner: change the default log level DEBUG -> INFO (upstream uses INFO, too)
This is a behavioural change, albeit minimal. The DEBUG level can still be set
passing "--debug" when invoking the miner.
5d66e17bb1
refactor: revert 1fb9797ced30 (on threadsafety). Replace it with the outcome of the automatic procedure
- get rid of the "TS_ITCOIN_" prefix everywhere in *.{cpp|c|h} files
Command used:
$ cd src
$ find . -type f \( -name "*.cpp" -o -name "*.h" -o -name "*.c" \) -print0 | xargs -I {} -0 sed --in-place 's/TS_ITCOIN_//g' {}
- get rid of the "TS_ITCOIN_" prefix in doc/developer-notes.md (probably it was
changed during a bulk search & replace);
- restore the modified threadsafety.h leaving out the textual modifications to
the comments;
- use infra/rename_threadsafety.py to automatically rename the symbols.
Before committing this, the procedure was done twice: the first time using
gcc-10 and the second one using gcc-11. In both cases the results were the
same, byte-by-byte.
The last log line of the automatic renaming reads:
SUCCESS: a total of 460 replacements in 47 files over 12 compile cycles were made. Elapsed time: 147.1s
As said, the final effect is a partial revert of what has been done in 1fb9797.
The differences are due to the fact that the automatic procedure did not rename
anything in comments, and code sections through which the compiler did not pass
were left unmodified.
- An advantage is that the replacement is mechanical and repeatable;
- A slight disadvantage is that the contents of the rename depends on the
configuration options.
8e96796237
consensus: strip trailing whitespaces
First introduced in a35ce8819e25.
No functional changes.
The external input test with specifying input weight would make a
pessimistic estimate of the input weight. However this would result in a
test failure as it is sometimes too pessimistic when an ECDSA signature
ends up being smaller than usual. To correct this, we can calculate the
input weight more accurately.
Github-Pull: #24454
Rebased-From: 8a04a386f75d099f4b9864b0cdf7f26442b5801f
5fd25eb9cb
tests: Use descriptor that requires both legacy and segwit
infra: define -DDEBUG_LOCKORDER in configure-itcoin-core.sh, too
Without this change the build is broken due to missing TS_ITCOIN_* symbols, both
in docker and on bare metal.
EXAMPLE:
./sync.h:80:104: error: expected initializer before 'EXCLUSIVE_LOCKS_REQUIRED'
80 | inline void AssertLockHeldInternal(const char* pszName, const char* pszFile, int nLine, MutexType* cs) EXCLUSIVE_LOCKS_REQUIRED(cs) {}
| ^~~~~~~~~~~~~~~~~~~~~~~~
This should have been part of 8e967962378e.
fc3c3a01fa
infra: explicitly call "--enable-tests" in configure-itcoin-core-dev.sh
Let's be explicit about what is enabled and what is not. Among other things,
this option introduces a hidden runtime dependency on hexdump that will be
addressed in the next commit about building in Docker.
This should have been part of a6b71d7e483d.
No functional changes.
e0e9d66355
build: update configure-itcoin-core-dev
Add two arguments:
- USR_DIR: the directory for libraries (in particular boost); defaults to ../../itcoin-pbft/local
- INSTALL_DIR: the target directory; defaults to ../target
1d729368f6
p2p: always set nTime for self-advertisements
If we self-advertised to an inbound peer with the address they gave us,
nTime was left default-initialized, so that our peer wouldn't relay it
any further along.
Github-Pull: #25314
Rebased-From: 99b9e5f3a9fa29bbc1e45fc958470fbcc207ef23
4ebf6e35dc
infra: define -DDEBUG_LOCKORDER in configure-itcoin-core.sh, for symmetry with v23
This mimics what has been done in fc3c3a01fa33. It has no effect in v0.21.x,
but in this way we can keep the two branches close to one another.
ed376759b5
infra: fix typo in compute-git-hash.sh
"did you recently committed" -> "did you recently commit"
5306d90a82
Merge 0.21.x in itcoina7ca1035c8
infra: allow to build itcoin-core with system boost if itcoin-pbft/usrlocal is missing
In principle, we want to build itcoin-core and itcoin-pbft against the same
boost library, hence the requirement of using the "--with-boost" parameter
introduced in c8b3744ddefd.
However, when building itcoin-core in a container, there is no miner involved,
and thus no need to share the Boost library. We can speed up the build time
resorting to the OS-provided Boost. This is what we've done in Docker until
now.
Bitcoin's configure script is already lax: if it does not find anything in the
directory pointed by "--with-boost" it will look around in the system. We can
simply let the `realpath` call construct a non existing directory and ask it not
to fail.
This, among other things, restores the original behaviour of
configure-itcoin-core-dev.sh before 6f61cc575631, and maybe it should have been
part of it.
cdcb02c71d
infra: use canonicalize-missing in configure-itcoin-dev.sh
In branch 0.21.x-itcoin (this one) the build only works if a custom compiled
boost is found in ../itcoin-pbft/usrlocal. For example, this is never true in
docker (which is always broken now).
This change mimics what has been done in cdcb02c71d17 (branch itcoin, 23.x),
where the configuration scripts are able to fall back to the system boost if no
libraries are found at the path indicated by --with-boost.
This change has no effect in 0.21.x-itcoin, because the configure script are not
as lenient.
However, this keeps the two branches closer in terms of diffs, so we take it.
e010f927a7
miner: support optional command line parmeters -conf and -rpcconnect
This change is necessary because dc9b5174e646 overlooked that the docker scripts
(initialize-itcoin-docker.sh and continue-mining-docker.sh) pass the command
line options "-conf" and "-rpcconnect" to the miner.
That commit reworked the option handling, delegating it to the TestNodeCLI
class from the bitcoin functional test framework. However, that class only
supports passing the "-datadir", thus breaking our aforementioned docker
infrastructure scripts.
The miner can now be called with the additional command line parameters "-conf"
and "-rpcconnect". The TestNodeCLI class has been modified to optionally accept
and use these parameters, so that the compatibility with the original bitcoin
code is kept.
1385056495
docker: replace configure-itcoin-core.sh with configure-itcoin-core-dev.sh
configure-itcoin-core-dev.sh contains "--enable-tests" that introduces a runtime
dependency on the "hexdump" command, which thus needs to be installed in the
build container via "apt install bsdmainutils".
ca66c9944a
Merge 0.21.x-itcoin in itcoin (23.x)c3e06bfa1d
infra: improve documentation of create-keypair.sh
- explicitly write that create-keypair.sh computes the info necessary for a
1-of-1 signet, and not just a keypair;
- document the output format of create-keypair.sh with an example
No functional changes.
93021c6317
infra: rename variable KEYPAIR -> INIT_DATA
The aim of create-keypair.sh is computing the data needed for initializing a
1-of-1 signet. This includes a keypair but it's not limited to it: for example
there the signet challenge (blockscript), too.
This will change even more when (in v23) we are going to migrate to descriptors
wallet + taproot.
No functional changes.
dd408c8275
docker: pre-format Dockerfile in preparation for the next commit
branching: merge 0.21.x-itcoin into itcoin (v23)8161c7ab41
infra: migrate to descriptor wallet and taproot signet5ec3d38e8a
Merge bitcoin/bitcoin#25316: 23.x backports
4ebf6e35dcac936342525ec7b4b77a82c71693e7 p2p: always set nTime for self-advertisements (Martin Zumsande)
039ef215bc1268cefb645472d411993e5582486b tests: Use descriptor that requires both legacy and segwit (Andrew Chow)
5fd25eb9cb52d09a4bf8b37b9d442e25bb22074e tests: Calculate input weight more accurately (Andrew Chow)
bd6d3ac8b7edf257f76ceb819f5d657313161585 windeploy: Renewed windows code signing certificate (Andrew Chow)
32fa522a80c87231dc6194b982f64440c801b7d4 test: ensure createmultisig and addmultisigaddress are not returning any warning for expected cases (brunoerg)
7658055c4e97b998639b67fd6dca386c1cdc748a rpc: fix inappropriate warning for address type p2sh-segwit in createmultisig and addmultisigaddress (brunoerg)
Pull request description:
Backports:
- https://github.com/bitcoin/bitcoin/pull/24454
- https://github.com/bitcoin/bitcoin/pull/25201
- https://github.com/bitcoin/bitcoin/pull/25220
- https://github.com/bitcoin/bitcoin/pull/25314
ACKs for top commit:
LarryRuane:
re-utACK 4ebf6e35dcac936342525ec7b4b77a82c71693e7
achow101:
ACK 4ebf6e35dcac936342525ec7b4b77a82c71693e7
Tree-SHA512: add3999d0330b3442f3894fce38ad9b5adc75da7d681c949e1d052bac5520c2c6fb06eba98bfbeb4aa9a560170451d24bf00d08dddd4a3d080030ecb8ad61882
a33ec8a693
infra: allow using any (gcc) compiler instead of hardcoding "g++-10/gcc-10"
From now on the compiler will be controlled by the usual autotools conventions,
e.g., the environment variables CXX and CC. Alternatively, a user could update
his default compiler via update-alternatives.
When we started itcoin g++-9 was widespread, and we chose to force the use of
gcc 10 instead. Now that the latest gcc version is 12, it is time we stop
enforcing a specific GCC version, since C++17 support should be the real
requirement.
Please note that, as of today, itcoin only compiles under gcc 10 and gcc 11 (not
gcc 12), because of limitations in the bitcoin version we are based on. This
limitation will go away as we import more recent bitcoin versions.
We still continue targeting only GCC. This limitation is not enforced, but clang
is currently not tested. Compiler support will be expanded later.
The scripts handle a bug in secp256k1's "configure": just setting CC is not
enough to successfully complete the comfiguration phase. CC_FOR_BUILD is needed
too.
12bb054c2c
VSCODE: update cpp_properties includePath to use the cmake usrlocal folder6f2181b2de
infra: change the default usrlocal dir to the one in cmake build dir7cc5aa081f
branching: merge 0.21.x-itcoin into itcoin (v23)b6054a1cac
guix: patch NSIS to remove .reloc sections from install stubs
With the release of binutils/ld 2.36, ld swapped to much improved
default settings when producing windows binaries with mingw-w64. One of
these changes was to stop stripping the .reloc section from binaries,
which is required for working ASLR.
.reloc section stripping is something we've accounted for previously,
see #18702. The related upstream discussion is in this thread:
https://sourceware.org/bugzilla/show_bug.cgi?id=19011.
When we switched to using a newer Guix time-machine in #23778, we begun
using binutils 2.37 to produce releases. Since then, our windows
installer (produced with makensis) has not functioned correctly when run on
a Windows system with the "Force randomization for images (Mandatory ASLR)"
option enabled. Note that all of our other release binaries, which all
contain .reloc sections, function fine under the same option, so it
cannot be just the presence of a .reloc section that is the issue.
For now, restore makensis to it's pre-binutils-2.36 behaviour, which
fixes the produced installer. The underlying issue can be further
investigated in future.
Github-Pull: #25788
Rebased-From: 7a0b129c41d9fefdbc20d6d04983dd87bb8379e7
fc77b2a41d
Merge bitcoin/bitcoin#25799: [23.x] guix: patch NSIS to remove .reloc sections from install stubs
fc77b2a41dd97561d76c89c74e6850c6a1085ce5 guix: patch NSIS to remove .reloc sections from install stubs (fanquake)
Pull request description:
Backport of #25788 to the 23.x branch.
Guix Build (x86_64):
```bash
5533c15a0084dfc174b68620a638f5499677be20eafdb1261457f7759298abdc guix-build-fc77b2a41dd9/output/dist-archive/bitcoin-fc77b2a41dd9.tar.gz
b67742b17aa813350051635f1e0a9b27921deb22c40d89c8d108fd809619826c guix-build-fc77b2a41dd9/output/x86_64-w64-mingw32/SHA256SUMS.part
34e06ab6fbcce2508095d6899daf9c38b962df1a042d0bedee49169f394d47a5 guix-build-fc77b2a41dd9/output/x86_64-w64-mingw32/bitcoin-fc77b2a41dd9-win64-debug.zip
63e1e7c1aa62577a21606c789bdaf983352c5285eec5722608cf7a3240a25d6a guix-build-fc77b2a41dd9/output/x86_64-w64-mingw32/bitcoin-fc77b2a41dd9-win64-setup-unsigned.exe
0ae26c5bc2f2aa86c451d3cfa3fbdbd73edab6136fd8d6510cd1c47a833973b7 guix-build-fc77b2a41dd9/output/x86_64-w64-mingw32/bitcoin-fc77b2a41dd9-win64-unsigned.tar.gz
ddb1feb2541d1a4922a62997224e965a3e79c7233c75106eb8c7ad76eff6cf89 guix-build-fc77b2a41dd9/output/x86_64-w64-mingw32/bitcoin-fc77b2a41dd9-win64.zip
```
Guix Build (arm64):
```bash
5533c15a0084dfc174b68620a638f5499677be20eafdb1261457f7759298abdc guix-build-fc77b2a41dd9/output/dist-archive/bitcoin-fc77b2a41dd9.tar.gz
3c5cb927e397d14f39bed24480b6800d946854c376d35cfb7a9dd635d45a5d6b guix-build-fc77b2a41dd9/output/x86_64-w64-mingw32/SHA256SUMS.part
b520c2e9f4c29fe711225c737b4c16e2ae933d5954cfb15cec554e1e0b57b061 guix-build-fc77b2a41dd9/output/x86_64-w64-mingw32/bitcoin-fc77b2a41dd9-win64-debug.zip
63e1e7c1aa62577a21606c789bdaf983352c5285eec5722608cf7a3240a25d6a guix-build-fc77b2a41dd9/output/x86_64-w64-mingw32/bitcoin-fc77b2a41dd9-win64-setup-unsigned.exe
0ae26c5bc2f2aa86c451d3cfa3fbdbd73edab6136fd8d6510cd1c47a833973b7 guix-build-fc77b2a41dd9/output/x86_64-w64-mingw32/bitcoin-fc77b2a41dd9-win64-unsigned.tar.gz
1447a28a582c0e5f2dd03ce22ecf078c6398142b3a2be2de2347a5f095f14d5b guix-build-fc77b2a41dd9/output/x86_64-w64-mingw32/bitcoin-fc77b2a41dd9-win64.zip
```
ACKs for top commit:
achow101:
ACK fc77b2a41dd97561d76c89c74e6850c6a1085ce5
hebasto:
ACK fc77b2a41dd97561d76c89c74e6850c6a1085ce5, `bitcoin-fc77b2a41dd9-win64-setup-unsigned.exe` tested on on Windows 11 Pro 21H2 with the "_Force randomization for images (Mandatory ASLR)_" option being set to "_On by default_".
jarolrod:
ACK fc77b2a41dd97561d76c89c74e6850c6a1085ce5
Tree-SHA512: 11000a2236532753a025bfa4ed4dadbbf3432d39b35edcbdd6d09a1b69621331cc43c8fef1bf0ad80909335588535eb741e43ce1f516101c415175e378815579
313ea18e5e
build, qt: bump Qt5 version to 5.15.3
Qt 5.15.3 release is a patch release made on the top of Qt 5.15.2. As a patch
release, Qt 5.15.3 does not add any new functionality but provides bug fixes
and other improvements.
https://code.qt.io/cgit/qt/qtreleasenotes.git/about/qt/5.15.3/release-note.md
* dropped patches:
- patches/qt/dont_use_avx_android_x86_64.patch
- patches/qt/fix_bigsur_style.patch
* adjusted patches:
- patches/qt/fix_android_jni_static.patch
- patches/qt/fix_limits_header.patch
- patches/qt/use_android_ndk23.patch
Co-authored-by: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com>
Github-Pull: bitcoin/bitcoin#24668
Rebased-From: ef20add4c98674183720d9631ac780f9a248b487
da9578da80
Disallow encryption of watchonly wallets
Watchonly wallets do not have any private keys to encrypt. It does not
make sense to encrypt such wallets, so disable the option to encrypt
them.
This avoids an assertion that can be hit when encrypting watchonly descriptor
wallets.
Github-Pull: bitcoin-core/gui#631
Rebased-From: 4c495413e138ec1dd6874e41b44e689f0c15e0e3
This RPC method exposes the function "TestBlockValidity" implemented in
the source file src/validation.cpp.
Usage:
testblockvalidity "hexdata" ( "dummy" )
Test the validity of the block with respect to the current blockchain
tip.
Arguments:
1. hexdata (string, required) the hex-encoded block data to check for validity
2. dummy (string, optional, default=ignored) dummy value, for compatibility with BIP22. This value is ignored.
Result (If the block is valid for submit):
null (json null)
Result (Otherwise):
"str" (string) According to BIP22
Examples:
> bitcoin-cli testblockvalidity "mydata"
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "testblockvalidity", "params": ["mydata"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/
9f61824ff6
docker: use jq from the docker image, stop requiring jq on the host
Before this change, initialize-itcoin-docker.sh and continue-mining-docker.sh
required a system-level jq in order to parse the initialization data.
Since the itcoin-core image already contains a copy of jq for its own purposes,
we can rely on it and stop imposing an additional requirement on the docker
host.
59f1eb96a9
docker: add checkPrerequisites() call in run-docker-bitcoind.sh
This change is introduced for symmetry with initialize-itcoin-docker.sh and
continue-mining-docker.sh
421629fb5f
docker: support for publishing multiple ZMQ topics on the same TCP port
Bitcoin ZMQ topics do not need to be published on distinct TCP ports. Thus, it
is perfectly legal - e.g. - to give the same values to ZMQ_PUBHASHTX_PORT and
ZMQ_PUBRAWBLOCK_PORT.
However, if docker receives on its command line multiple "--publish" options
with the same content is not able to deduplicate repetitions and fails to start.
With this change we preventively remove duplicates from the set of ZMQ_XXX_PORT
variables, introducing support for multiplexing multiple ZMQ topics on the same
TCP port.
The change is backwards compatible.
ef5614c263
Revert "build: Use Homebrew's sqlite package if it is available"
This reverts ee7b84e63cbeadd5e680d69ff0548275581e9241 from #20527.
This change was made without any rationale, maybe other than a brew
installed version might be newer, and that's "better". However when
building from source on macOS, it just results in drastically worse
perofrmance, and results in issues / confusions like #25724.
Resolves the "build from source" portion of #25724. Building from
depends is still not ideal, however I have some other changes that might
help improve things in that case.
The difference in performance can be observed using the example from
https://github.com/bitcoin/bitcoin/issues/25724#issuecomment-1213554922,
but minified to only 10 descriptors. i.e:
```bash
time src/bitcoin-cli createwallet speedy true
time src/bitcoin-cli importdescriptors '[
{"desc":"raw(00145846369f3d6ba366d6f5a903fb5cf4dca3763c0e)#k9wh6v62","timestamp":"now"},
{"desc":"raw(001420800aabf13f3a4c4ce3ce4c66cecf1d17f21a6e)#6m0hlfh4","timestamp":"now"},
{"desc":"raw(0014c6bf9715e06d73ebf9b3b02d5cc48d24d8bbabc1)#wyavh36r","timestamp":"now"},
{"desc":"raw(00141ba7807b3f46af113beaea5c698428ce7138cd8a)#jctdsups","timestamp":"now"},
{"desc":"raw(00140c1bd27f10fff01b36ddf3c1febaa1acff19b080)#9s6nc3pk","timestamp":"now"},
{"desc":"raw(00141226e31987e4bc2e63c0ee12908f675e40464b20)#9pp7qm39","timestamp":"now"},
{"desc":"raw(0014f73f149f7503960a5e849c6ee7a8a8c336f631cb)#qtkxv9fc","timestamp":"now"},
{"desc":"raw(0014c8ccb4d81ffc769fc5fdd8d7eed69b0e0cae5749)#hn39qayv","timestamp":"now"},
{"desc":"raw(001498565aead2d67a22a6021d55210f2a917fc22169)#6ar3vwsx","timestamp":"now"},
{"desc":"raw(001403013248ac0cd9eabe176cad162cda2a19f771e1)#4m47mukd","timestamp":"now"}
]'
```
Running master, when building from souce and using brew installed
sqlite, this takes ~3.4s. With this PR, the same operation takes ~0.3s.
Github-Pull: #25985
Rebased-From: d216d714aae36e6f1c95f82aef81a0be74dee2f3
419bdc534f
docker: use host network
When we first developed the automation scripts targeting a Ubuntu 20.04 host,
the chain initialization worked without problems.
With newer OSes and Docker versions (for example, on Ubuntu 22.04 or Fedora 36),
the bitcoin-cli container was no longer able to connect to bitcoind.
This has been going for a long time now, and impacted, for example, the
development of #57 and #50.
This commit migrates the docker scripts to using host network, and forces
communication on the IPv4 loopback. It is not a completely transparent change,
but the failure modes of the resulting system are probably more easy to
interpret.
Please note that, instead of "localhost", its corresponding IPv4 address
"127.0.0.1" is used. In some systems "localhost" could resolve to its IPv6
version, and the setup scripts would stop working.
The --publish arguments are no longer relevant in host network mode. Nonetheless
they are kept for documentation purposes, should we find a good way to migrate
to a bridge network.
35a4c6d1fd
docker: update base image ubuntu 20.04 -> 22.04
Ubuntu 22.04 is sufficiently mature now. Above all, it has a more recent boost
version (1.74), which will be useful for future developments.
Please not that, in its Docker build process, itcoin-core uses the boost system
packages, since they are enough for our purposes.
itcoin-pbft's Docker build process - instead - builds boost from sources for
both its internal bitcoind and the main application.
This is not a concern for itcoin-core image, that only needs to be functional
and as small as possible.
9b88312f2f
doc: remove brew install sqlite from macOS docs7698366132
Merge bitcoin/bitcoin#26333: [23.x] Revert "build: Use Homebrew's sqlite package if it is available"
769836613291e2b35f8ded9b594e33dcd1b1c70d doc: remove brew install sqlite from macOS docs (fanquake)
419bdc534f885de4574e054cfcac6869f7a4e185 Revert "build: Use Homebrew's sqlite package if it is available" (fanquake)
Pull request description:
Backport of https://github.com/bitcoin/bitcoin/pull/25985 to the 23.x branch.
ACKs for top commit:
hebasto:
ACK 769836613291e2b35f8ded9b594e33dcd1b1c70d, I have reviewed the code and it looks OK, I agree it can be merged.
stickies-v:
re-ACK https://github.com/bitcoin/bitcoin/commit/769836613291e2b35f8ded9b594e33dcd1b1c70d
Tree-SHA512: 539f218b2895188111876b6a2035082ac642c89ef2e5055031bdc4563f690055012fcede396a5c87cf66e80ced796d62dd8d4394676fa6d22e01a581b29bb10b
c2d46d7434
Merge bitcoin/bitcoin#26033: [23.x] Prevent data race for `pathHandlers`
38d4601fe826069ee43b341e9d467beb7d14b5f0 Prevent data race for `pathHandlers` (Hennadii Stepanov)
Pull request description:
Backport of https://github.com/bitcoin/bitcoin/pull/25983 to the 23.x branch.
ACKs for top commit:
dergoegge:
ACK 38d4601fe826069ee43b341e9d467beb7d14b5f0
Tree-SHA512: b235d6d2cb374baf1b54c09f4cd2feca7b6c1588d081532e987fd5def8ed0dee4b8255112b130a77aca633ec6a63cfd81f215b2e7a403c213eb6048a54774d26
40b69fb06e
Adjust `.tx/config` for new Transifex CLI
The old Transifex Command-Line Tool is considered deprecated (as of
January 2022) and will sunset on Nov 30, 2022.
See: https://github.com/transifex/cli/blob/devel/README.md#migrating-from-older-versions-of-the-client
An accompanying PR: https://github.com/bitcoin-core/bitcoin-maintainer-tools/pull/142
Github-Pull: #26321
Rebased-From: d6adbb7ee1de661ad89879609eecd11129322405
bbea830a96
rpc: fix crash in deriveaddresses when derivation index is 2147483647
2147483647 is the maximum positive value of a signed int32, and - currently -
the maximum value that the deriveaddresses bitcoin RPC call accepts as
derivation index due to its input validation routines.
Before this change, when the derivation index (and thus range_end) reached
std::numeric_limits<int_32_t>::max(), the "i" variable in the for cycle (which
is declared as int, and as such 32 bits in size on most platforms) would be
incremented at the end of the first iteration and then warp back to
-2147483648. This caused SIGABRT in bitcoind and a core dump.
This change assigns "i" an explicit size of 64 bits on every platform,
sidestepping the problem.
Fixes #26274.
Github-Pull: #26275
Rebased-From: addf9d6502db12cebcc5976df3111cac1a369b82
d9f1c89e49
rpc: add non-regression test about deriveaddresses crash when index is 2147483647
This test would cause a crash in bitcoind (see #26274) if the fix given in the
previous commit was not applied.
Github-Pull: #26275
Rebased-From: 9153ff3e274953ea0d92d53ddab4c72deeace1b1
f8ed34d1a9
Merge bitcoin/bitcoin#26411: [23.1] Backports
f8ed34d1a9faf373b96842c26a408b039bcdfc51 rpc: add non-regression test about deriveaddresses crash when index is 2147483647 (muxator)
d9f1c89e4967da4681f8c595b46cb1475e3d4897 rpc: fix crash in deriveaddresses when derivation index is 2147483647 (muxator)
bbea830a966a4a6045c7420743395d5253203f00 Adjust `.tx/config` for new Transifex CLI (Hennadii Stepanov)
Pull request description:
Backports:
* https://github.com/bitcoin/bitcoin/pull/26275
* https://github.com/bitcoin/bitcoin/pull/26321
Will leave open to collect remaining backports before a 23.1.
ACKs for top commit:
MarcoFalke:
cherry-pick ACK f8ed34d1a9faf373b96842c26a408b039bcdfc51 🚝
Tree-SHA512: 2a96f66b0d81457a7017b0f4b041a7742008374d00a22d828502bfe170bfebb413e4e63382b10b9e2e250cb9e1be1a41030b8b6c5be42ffb23964808b12ee343
zmq: only for itcoinblock, send new block notifications even if we are in InitialBlockDownload
The behaviour of the other topics is not affected: their notifications will be
only if InitialBlockDownload is false.
19ff7d7bc0
infra: configure startup scripts to enable itcoinblock topic publishing
The topic is published on the same port where rawblock is currently being
published.
The modification is implemented in all the scripts (local and docker).
ac526f8268
vscode: remove vscode specific files and add them to gitignore
doc: update version number in bips.md to v23.1888480bd88
Merge bitcoin/bitcoin#26453: [23.x] Bump version to 23.1rc1
888480bd8819c78663baa6ded92a0d46f68fe7ee doc: update version number in bips.md to v23.1 (fanquake)
f89a2ea3b71b008b52165f1d260dead949d4548c doc: Update manual pages for 23.1rc1 (fanquake)
a43e380a1f3b119fb22186502de89b494ff8c29b build: Bump version to 23.1rc1 (fanquake)
5a57b656d3fa6a0004ebc208bf70e2fe2eba1aa2 doc: mention BIP86 in doc/bips.md (Sebastian Falbesoner)
Pull request description:
Bump the version to 23.1rc1.
Generate the man pages.
Update the version number in bips.md.
Also backports https://github.com/bitcoin/bitcoin/pull/26443.
ACKs for top commit:
MarcoFalke:
Concept ACK 888480bd8819c78663baa6ded92a0d46f68fe7ee
Tree-SHA512: e2c937fe7b18423e1450889f61f2f8bd0b50fb525ab839978fe0a58707176416412c69983f973e5fc9b512356c5bc873d9458470b55c87067ff6789ba347beec
22ffb150ac31ce3125eb0d2fcd87f5d3086d8682 qt: 23.1rc1 translations update (Hennadii Stepanov)
Pull request description:
This PR pulls the recent translations from the [Transifex.com](https://www.transifex.com/bitcoin/bitcoin) using the [`bitcoin-maintainer-tools/update-translations.py`](https://github.com/bitcoin-core/bitcoin-maintainer-tools/blob/main/update-translations.py) tool.
According to our [Release Process docs](https://github.com/bitcoin/bitcoin/blob/master/doc/release-process.md#before-every-release-candidate), it is supposed to be merged before `v23.1rc1` tagging.
Will keep this PR updated regularly until merging.
The `bitcoin_id.ts` translation is damaged, therefore its changes were rejected manually.
Top commit has no ACKs.
Tree-SHA512: dccda61e06b1b2fc6ee8eb91271bc6dc7a404e053def7ec002b68cafdaa89410f5c12cb9a8009b3a95bb787457408df6814f69d622d0f37c0c6f7defacbc86f2
32fafa4f81
guix: use --build={arch}-guix-linux-gnu in cross toolchain
Technically we are always cross-compiling, so make that explicit.
Fixes: #22458.
Github-Pull: #25861
Rebased-From: 56e79fe683d36c1944e52326fae3bcc4cb7deec7
0f4583e5c1
frost: include Jesse Posner FROST-BIP340 python implementation
The included version is https://github.com/jesseposner/FROST-BIP340/blob/0853583e43f8b8666bddcfe8ef3d54f156254fd7/frost.py
49dd53d015
frost: negate the public key when y-coord is odd42f866c8ea
frost: return sum(shares) modulo curve order instead of just sum(shares)3e485354a9
frost: make challenge_hash computation compliant to BIP3408b39a5704a
frost: add the possibility to tweak the public keyaf2dc4fee4
test: BaseFrostTest class extending BaseItcoinTest to setup Frost params and sign transaction using Frost protocold101eb61e4
signet: add SCRIPT_VERIFY_TAPROOT to BLOCK_SCRIPT_VERIFY_FLAGSce19c7a127
test: create a signet challenge based on a frost public key and mine a block using Frost protocol to produce a Schnorr signaturef9353e5648
test: create a signet challenge based on a frost tweaked public key and mine a block using Frost protocol to produce a Schnorr signature425408f35d
rpc: add 'check_signet_solution' parameter to testblockvalidity
This new argument to `testblockvalidity` RPC method allows skipping the test of
the signet solution of the Signet block. This feature implied changes in the
API functions `TestBlockValidity` and `CheckBlock`
fc85aea039
signet: disable pow
With this change, signet is assigned the same difficulty levels of regtest
(i.e., the minimum possible).
5fbd2910f0
Merge bitcoin/bitcoin#26474: [23.x] guix: use `--build={arch}-guix-linux-gnu` in cross toolchain
0f4583e5c114e13c3c937f1832ab0c39751cf38c guix: use --build={arch}-guix-linux-gnu in cross toolchain (fanquake)
Pull request description:
This backports https://github.com/bitcoin/bitcoin/pull/25861 to the 23.x branch, which fixes Guix building for `aarch64-linux-gnu` on aarch64 hardware. Fixing Guix building for this `HOST`, for the current release branch, seems like a worthwhile change, especially given more Guix builders are using aarch64 hardware. I thought I'd already backported this; noticed while building [sigs for 23.1rc1](https://github.com/bitcoin-core/guix.sigs/pull/380), which I started doing on aarch64.
Guix Build (aarch64, no `x86_64-apple-darwin` or `arm64-apple-darwin`):
```bash
9fd4601412738e9135e2732cfc8af911c54af8a1349c2af568b4748dd1907c3d guix-build-0f4583e5c114/output/aarch64-linux-gnu/SHA256SUMS.part
36df2797cd7845ccb4f416b52f9dbd4cc7dd0242782c3143206d0c15239e8b02 guix-build-0f4583e5c114/output/aarch64-linux-gnu/bitcoin-0f4583e5c114-aarch64-linux-gnu-debug.tar.gz
6aa022173b23827ec2690823178b9d2d06108e159a9074e1a54a7d1a74b6c5db guix-build-0f4583e5c114/output/aarch64-linux-gnu/bitcoin-0f4583e5c114-aarch64-linux-gnu.tar.gz
1e98b6b5e2b58387106eb8f46367c4a42d03d6a881307ed115e7b6bfa1b2785a guix-build-0f4583e5c114/output/arm-linux-gnueabihf/SHA256SUMS.part
b9ecbfbec1ee941acb7f19fb2ba02bfa24ef5feb0e072a9a8c39263f2cdfb172 guix-build-0f4583e5c114/output/arm-linux-gnueabihf/bitcoin-0f4583e5c114-arm-linux-gnueabihf-debug.tar.gz
2834aa08f19c03e88e22009e3f860b470fe5942c42ae08041b8e79e28673154b guix-build-0f4583e5c114/output/arm-linux-gnueabihf/bitcoin-0f4583e5c114-arm-linux-gnueabihf.tar.gz
9c787047070b1fe8c2beead22093dc73481e7c921993d95fb0e4ce8739f8e515 guix-build-0f4583e5c114/output/dist-archive/bitcoin-0f4583e5c114.tar.gz
1a82b19a5d07bccdead69b5d9fe9559e01a263b458ea48ff0a701ee9adf55a3c guix-build-0f4583e5c114/output/powerpc64-linux-gnu/SHA256SUMS.part
3482de0ff01839aa98ca61b3c8a18de4773dd70e2b306f094b210a6c83839289 guix-build-0f4583e5c114/output/powerpc64-linux-gnu/bitcoin-0f4583e5c114-powerpc64-linux-gnu-debug.tar.gz
5bb8b7ab8740d6c4a49e8fe700f0305bcc7318eaffc0e3c967492f218774f371 guix-build-0f4583e5c114/output/powerpc64-linux-gnu/bitcoin-0f4583e5c114-powerpc64-linux-gnu.tar.gz
5442e495049b386b8ec5bc50c06feb401fb263e25f0807aa58e7e8c091c42be7 guix-build-0f4583e5c114/output/powerpc64le-linux-gnu/SHA256SUMS.part
d685b1449379a3a1be139f243917d9987169cbc9901c7658a12044d27ce2762d guix-build-0f4583e5c114/output/powerpc64le-linux-gnu/bitcoin-0f4583e5c114-powerpc64le-linux-gnu-debug.tar.gz
14edbaf4c93346460ecff72ca22285c433c7dea5f9ccaccb4b49730f95d2d264 guix-build-0f4583e5c114/output/powerpc64le-linux-gnu/bitcoin-0f4583e5c114-powerpc64le-linux-gnu.tar.gz
dec22e0f59513c3697de3c6906deb355010af36836285ab306de1ea8e4b88ff3 guix-build-0f4583e5c114/output/riscv64-linux-gnu/SHA256SUMS.part
d70b6b6d1a2950292e820898af8a79d850b415829bbb94db97b742f3ab7cc7d3 guix-build-0f4583e5c114/output/riscv64-linux-gnu/bitcoin-0f4583e5c114-riscv64-linux-gnu-debug.tar.gz
b5fd33257a81efacc61946b544e5af1582c9729fa57641ff3625d34f0e785cfd guix-build-0f4583e5c114/output/riscv64-linux-gnu/bitcoin-0f4583e5c114-riscv64-linux-gnu.tar.gz
30b6668d9e84503d2e2113a87051d3c5baeae8ad6b3fa3df7509d447c8d5f341 guix-build-0f4583e5c114/output/x86_64-linux-gnu/SHA256SUMS.part
33a6c5072328281872678fc0d709629f934fac05bdfb2e41cccf2ddd5724925b guix-build-0f4583e5c114/output/x86_64-linux-gnu/bitcoin-0f4583e5c114-x86_64-linux-gnu-debug.tar.gz
c1c2ec074a88c6f0202ab067bd126c217573d028b3b1eb538db100eb0e316b53 guix-build-0f4583e5c114/output/x86_64-linux-gnu/bitcoin-0f4583e5c114-x86_64-linux-gnu.tar.gz
2689a7cce5d1fc6decbb5dfd1361db21adc1c485ee4c644cdebf403b1d533be6 guix-build-0f4583e5c114/output/x86_64-w64-mingw32/SHA256SUMS.part
9d6259432febdc1be728db0088a0464fa844dc4ad20e7b752be6de312588a695 guix-build-0f4583e5c114/output/x86_64-w64-mingw32/bitcoin-0f4583e5c114-win64-debug.zip
e3e7cd45b6ed6e8a589efe2436e151120af0c1146772ce295c06300289e0b758 guix-build-0f4583e5c114/output/x86_64-w64-mingw32/bitcoin-0f4583e5c114-win64-setup-unsigned.exe
1da1569b0140ad917b938ce8b087d3d8990331df3042d62a36d1366d9e5f0f42 guix-build-0f4583e5c114/output/x86_64-w64-mingw32/bitcoin-0f4583e5c114-win64-unsigned.tar.gz
cbd74726e5704f6007e2344422197a25b9872a3a5f525a1a0b5774c833fc7e78 guix-build-0f4583e5c114/output/x86_64-w64-mingw32/bitcoin-0f4583e5c114-win64.zip
```
ACKs for top commit:
hebasto:
ACK 0f4583e5c114e13c3c937f1832ab0c39751cf38c, tested on `arm64`:
jarolrod:
ACK 0f4583e5c114e13c3c937f1832ab0c39751cf38c
Tree-SHA512: 2ddb1ebaa75c26cc0bd8abd81e565a7ffa99bd9af08ad329f1141c35c784fb7cb4ccf0777096410929cb3e0bc72acaf3dbe0684bbe57b6d6a7070bff1fa51a0e
3e0cf5e82b
miner: restore the possibility of manually setting block times when mining
The block time can be controlled passing the optional int argument blocktime to
do_generate_next_block().
If the block time is before signet genesis block's date (2020-09-01), it is
adjusted to 2020-09-01 12:00:01.
The test cases verify that the block time is controllable, showing that it is
possible to keep a chain in initial block download and take it out.
This change does not affect the miner's command line, which is still unable to
honor "--set-block-time" parameter.
193fe04216
miner: honor set_block_time cmdline argument
Before this change (and the previous one), the miner was unable to honor the
"--set-block-time" parameter.
Updated the documentation of initialize-itcoin-local.sh: the functionality for
controlling how many minutes in the past the first block was to be mined was
already there, but was undocumented, and it did not work because of the bug
that this commit fixed.
f511c1b9d6
infra: support the TIME_SHIFT parameter in initialize-itcoin-docker.sh, tood7ece88368
Fixes bitcoin#26490 by preventing notifications
MacOS 13 sends a window focus change notification after the main
window has been destroyed but before the QTApplication has been
destroyed. This results in the menu bar receiving a notification
despite it no longer existing. The solution is to pass the main
window as context when subscribing to the notifications. Qt
automatically unsubscribes to notifications if the sender OR
context is destroyed.
Github-Pull: bitcoin-core/gui#680
Rebased-From: 8a5014cd8a05b3ab86ae34a47653a82ce11bdf17
e54a4deff8
test: rename itcoin_rpc_testblockvalidity.py to itcoin_rpc_testblockvalidity_1.py
38d90bc3e38bdf40b61d42b5db7b48c7fa0ef17b qt: 23.1rc2 translations update (Hennadii Stepanov)
Pull request description:
This PR pulls the recent translations from the [Transifex.com](https://www.transifex.com/bitcoin/bitcoin) using the [`bitcoin-maintainer-tools/update-translations.py`](https://github.com/bitcoin-core/bitcoin-maintainer-tools/blob/main/update-translations.py) tool.
According to our [Release Process docs](https://github.com/bitcoin/bitcoin/blob/master/doc/release-process.md#before-every-release-candidate), it is supposed to be merged before `v23.1rc2` tagging.
Will keep this PR updated regularly until merging.
The `bitcoin_id.ts` translation is damaged, therefore its changes were rejected manually.
ACKs for top commit:
jarolrod:
ACK 38d90bc3e38bdf40b61d42b5db7b48c7fa0ef17b
Tree-SHA512: 41e120342f3670345c88b23c761cd2e520cefe3128bf6417ffcdf9d5341ade77e65f4e4e78d99992543dc6b3caa438bac96a8c8eec0435b3020d4fde1fe8461e
c5058e95f4
Merge bitcoin/bitcoin#26543: [23.x] Bump version to 23.1rc2 & add release notes
87c2ff80e45113b056b3d0af83cf78e3ce95a693 doc: add release notes for 23.1rc2 (fanquake)
5b2c99e24cd7b653c9b9931509d3901ad17badc1 doc: Update manual pages for 23.1rc2 (fanquake)
a02ae0745b01b33158d916d3d71107da77026bcb build: Bump version to 23.1rc2 (fanquake)
a1fcd565fff85f5652bf86504b416a615a2cb6d5 doc: add 23.0 relase notes (fanquake)
Pull request description:
Bump the version to 23.1rc2.
Regenerate the man pages.
Add historical 23.0 release notes.
Add WIP 23.1 release notes.
Changes since rc1:
* https://github.com/bitcoin/bitcoin/pull/26474
* https://github.com/bitcoin/bitcoin/pull/26522
ACKs for top commit:
hebasto:
ACK 87c2ff80e45113b056b3d0af83cf78e3ce95a693, I have reviewed the code and it looks OK, I agree it can be merged.
jarolrod:
ACK 87c2ff80e45113b056b3d0af83cf78e3ce95a693
Tree-SHA512: f185c33bfe2bf26f9df48f8d1e95ab784fef055bc7465282e2418960d348bd8b35f8fc57808b47250f8536a9def3be2d1dbe8ae309f052a81220925c425108f1
ea9aa3f02f
build: bump version to 23.1 final93713654ef
doc: update manual pages for 23.158478261de
doc: update release notes for 23.18a16391c91
Merge bitcoin/bitcoin#26659: [23.x] bump version to v23.1
8a16391c91acd1ab7c49370b7b5fd979375c94c7 doc: update release notes for 23.1 (fanquake)
58478261de77035f90b758e4f03a6d2fdc0fa516 doc: update manual pages for 23.1 (fanquake)
93713654ef65b3353394b0efd653beba1826a0f8 build: bump version to 23.1 final (fanquake)
Pull request description:
Bump version to v23.1.
Regenerate manpages.
Finalize release notes.
ACKs for top commit:
hebasto:
ACK 8a16391c91acd1ab7c49370b7b5fd979375c94c7, I have reviewed the changes and they look OK.
Tree-SHA512: d9100f5507f6e8d7b5a1192c981dbc6d97283def895e9181f738321fe9521c398e73686ddc48e27d1c863da19d75339069771f980d38af479eaf56ac3fc0881b
ffef91a5c1
test framework: reformat comments
No functional changes.
b54d675deb
test framework: remove unuseful return statement
No functional changes.
92d5d81ec7
test framework: move down a block in preparation for the next two commits
No functional changes.
348869dd19
tests: save list of (privkey, pubkey) to test case object9330d798a9
testblockvalidity: replace an assert with a check, fixes #7503269df269
infra: publish lightning-related topics on a single TCP port
Zmq topics can be multiplexed on a single TCP port. Moreover, it makes sense to
group together the ones needed by Lightning (hashtx, rawblock) on port 29009
and keep them separated from the future itcoinblock topic (needed instead for
mining new blocks): the two sets of topics would probably need to be subjected
to different firewall policies.
Commit ef5614c26331 ("docker: support for publishing multiple ZMQ topics on the
same TCP port") allows us to do this in every supported run mode.
These changes break itcoin-infrastructure (whose latest commit is ab7e56185302
"plasma: for each node, configure & start a corresponding Thunderhub instance"
from 2021-04-07), which is now in need of maintenance.
87cac95f90
test: moved utility function utc_timestamp() in test_framework_itcoin
This should actually belong in a dedicated itcoin utils modules.
No functional changes.
40ebee358f
tests: add recv_multipart_flags optional parameter to ZMQSubscriber constructor
This will allow to reuse code when implementing tests for the itcoinblock topic
that we are going to introduce. In particular, we will be able to use
zmq.NOBLOCK to speed up tests that are not supposed to receive any
notifications.
No functional changes.
8ac520a1d9
zmq: new topic itcoinblock that publishes block hash, height and time
The new topic is documented, but the itcoin-core's initialization scripts still
do not use it.
e6fab738ea
rpc: fix CRPCConvertParam table in client.cpp. Fixes failure of p2p_blockfilters.py
This change should have been part of commit fc85aea0398e ("rpc: add
'check_signet_solution' parameter to testblockvalidity").
Before this change:
$ cd test/functional
$ ./test_runner.py rpc_help.py
Temporary test directory at /tmp/test_runner_₿_🏃_20230126_110139
Running Unit Tests for Test Framework Modules
..........
----------------------------------------------------------------------
Ran 10 tests in 0.648s
OK
Remaining jobs: [rpc_help.py]
1/1 - rpc_help.py failed, Duration: 2 s
stdout:
2023-01-26T10:01:40.180000Z TestFramework (INFO): Initializing test directory /tmp/test_runner_₿_🏃_20230126_110139/rpc_help_0
2023-01-26T10:01:41.939000Z TestFramework (ERROR): Assertion failed
Traceback (most recent call last):
File "<base>/test/functional/test_framework/test_framework.py", line 132, in main
self.run_test()
File "<base>/test/functional/rpc_help.py", line 51, in run_test
self.test_client_conversion_table()
File "<base>/test/functional/rpc_help.py", line 69, in test_client_conversion_table
raise AssertionError("RPC client conversion table ({}) and RPC server named arguments mismatch!\n{}".format(
AssertionError: RPC client conversion table (<base>/src/rpc/client.cpp) and RPC server named arguments mismatch!
{('testblockvalidity', 1, 'check_signet_solution')}
[...]
d703fb0111
infra/README: use cmake build directory as library path and update test
squash
aaff74d5df
refactor: revert adding TS_ITCOIN_ prefixes in src/threadsafety.h
The addition on the TS_ITCOIN_ prefix to the macros in threadsafety.h was due to
a name clash in the initial version of our miner. Our miner links bitcoin as a
library, but v1 of the miner also made use of gRPC (and, transitively, Abseil).
Abseil already defined some of the macros in threadsafety.h, and thus the miner did not compile.
Since the current version of the miner no longer makes use of gRPC, we can get
rid of the modification, and also delete infra/rename_threadsafety.py.
The revert was performed as follows:
$ cd src
$ find . -type f \( -name "*.cpp" -o -name "*.h" -o -name "*.c" \) -print0 | xargs -I {} -0 sed --in-place 's/TS_ITCOIN_//g' {}
$ hg remove <base>/infra/rename_threadsafety.py
After the automatic procedure, these are the commits that were inspected to
verify that the revert was correct:
fc3c3a01fa33 infra: define -DDEBUG_LOCKORDER in configure-itcoin-core.sh, too
d55d5d4fa114 REFACTOR (HUGE): rename threadsafety macros by adding TS_ITCOIN_ prefix
8e967962378e refactor: revert 1fb9797ced30 (on threadsafety). Replace it with the outcome of the automatic procedure
787b3b2055cd infra: written rename_threadsafety.py
1fb9797ced30 refactor: rename threadsafety macros by adding TS_ITCOIN_ prefix
d337e622b9
test: use sync_all in place of time.sleep to sync test nodes
Closes #32.
5a1d6cb239
test: highlight an issue with spending the coinbase transaction in a blockchain having two different valid solutions to the same block508b043ee8
consensus: allow miners to immediately spend the coins they mine
This commit changes COINBASE_MATURITY from 100 to 0, and consequently adapts
the test suite. The changes that were made in the test suite are marked with
ITCOIN_SPECIFIC and report the original value that was present upstream, in
order to facilitate following bitcoin's future developments.
6d425df04b
miner: adding missing ITCOIN_SPECIFIC comments in contrib/signet/miner
consensus: re-implement a block solution independent blockchain
The first implemention of a block solution independent blockchain, available at
9fb26b3771ea, was excluding the block solution from the block merkle root, but
not from the coinbase transaction hash. This caused an issue in spending the
coinbase transaction in case miners had blocks with different solutions. The
issue was highlighted in 508b043ee806.
This commit fixes the problem, by directly excluding the block solution from
the coinbase transaction hash calculation, and consequently from the block
merkle root.
4e84fe6674
infra: silence the output of importdescriptors in the initialization scripts
Without this change, executing initialize-itcoin-{docker,local}.sh would print
unuseful internal messages. This change is a slight amendment to 5ec3d38e8a7d.
BEFORE:
Import private descriptors into itcoin_signer
[
{
"success": true
},
{
"success": true
}
]
Private descriptors imported into itcoin_signer
AFTER:
Import private descriptors into itcoin_signer
Private descriptors imported into itcoin_signer
6ca282b42a
infra: change the default TIME_SHIFT from 120 to 10 minutes
With this change, a default run of initialize-itcoin-local.sh,
continue-mining.local.sh will generate only 10 blocks at startup. The previous
behaviour (120 minutes) is now no longer useful, because since 6d425df04b27
coinbases are always mature.
703a29adac
infra: use "/usr/bin/env bash" as shebang for the configuration scripts21cb5633f6
branding: remove capital "C" from itcoin ("itCoin" -> "itcoin")
Search performed via:
rg --hidden "ItCoin|itCoin"
and manually filtered.
2264b97e00
version: add an itcoin specific version field (CLIENT_VERSION_ITCOIN_BUILD)
- a field specific to itcoin (CLIENT_VERSION_ITCOIN_BUILD) is added in
configure.ac;
- the starting copyright year for Itcoin core is set to 2019. The meaning of
COPYRIGHT_YEAR as the last applicable year is kept unchanged;
- added "Bank of Italy" as additional copyright holder;
- Bitcoin core already had a mechanism to preserve the original copyright credit
to che bitcoin developers. The changes in clientversion.cpp are meant to
preserve the starting copyright year for bitcoin (2009);
- the project URIs are replaced with the itcoin ones. Those URIs will contain
evident links to the upstream project.
The output of bitcoind --version is now of this form:
Itcoin Core version v23.0.0-itcoin-1
Copyright (C) 2019-2022 Bank of Italy
Copyright (C) 2009-2022 The Bitcoin Core developers
Please contribute if you find Itcoin Core useful. Visit
<https://bancaditalia.github.io/itcoin/> for further information about the
software.
The source code is available from <https://github.com/bancaditalia/itcoin-core>.
This is experimental software.
Distributed under the MIT software license, see the accompanying file
COPYING or <https://opensource.org/licenses/MIT>
a6d27e63c8
doc: reorganize doc/itcoin-demo.md6ad58807d4
doc: add itcoin preamble in README.md
The preamble explains this project's rationale and links to its documentation.
The rest of bitcoin core's README is kept unchanged.
fb0b0904b9
docs: remove personal names from the comments, let's focus on the code instead48c37cc80c
mining: added missing ITCOIN_SPECIFIC comments
The diff between our version and upstream aims to be standardized: every change
coming from us should be marked ITCOIN_SPECIFIC and include a reference to the
previous code contents, in order to ease keeping up with upstream.
This change tags some snippets that were missed out previously.
cc19eaf67f
signet: added missing ITCOIN_SPECIFIC comments
The diff between our version and upstream aims to be standardized: every change
coming from us should be marked ITCOIN_SPECIFIC and include a reference to the
previous code contents, in order to ease keeping up with upstream.
This change tags some snippets that were missed out previously.
The diff between our version and upstream aims to be standardized: every change
coming from us should be marked ITCOIN_SPECIFIC and include a reference to the
previous code contents, in order to ease keeping up with upstream.
This change tags some snippets that were missed out previously.
b11fad231f
signet: roll back ComputeModifiedMerkleRoot() to upstream version
In 4e84fe667431 we moved to a simpler way of computing the MerkleRoot. Thus, we
no longer need to expose ComputeModifiedMerkleRoot() externally, and there is no
need to the additional "mutated" parameter.
This change reverts every modifications we have done to
ComputeModifiedMerkleRoot(), which is now the same as in bitcoin.
61ef88905e
doc: add missing newline continuation on itcoin-demo.md example
This should have been part of 6ad58807d4a9.
df7f99089b
doc: for brevity, add "sudo" in front of "apt install"f5e725be7a
build: moved ITCOIN_SPECIFIC comments closer to where they are used
Usual work towards standardizing our modifications to the bitcoin codebase.
No functional changes.
1663095d92
build: remove BOOST_CPPFLAGS from libbitcoinconsensus_la_CPPFLAGS
This trick was needed back when itcoin was based on bitcoin v0.21. In v23 the
code base migrated to c++17 and std::optional. In this way we have one less diff
compared with upstream.
86c42df6ac
signet: explicitly enumerate the fields included in the block signature
Let's explicitly add the fields we want to perform the signature on instead of
creating a CBlockHeader from scratch and serializing it.
After this change, the diff for src/signet.cpp becomes shorter and more
explicit:
$ hg diff --from v23.0 --to . src/signet.cpp
diff --git a/src/signet.cpp b/src/signet.cpp
--- a/src/signet.cpp
+++ b/src/signet.cpp
[...]
@@ -114,6 +114,8 @@ std::optional<SignetTxs> SignetTxs::Crea
writer << block.hashPrevBlock;
writer << signet_merkle;
writer << block.nTime;
+ writer << block.nBits; // ITCOIN_SPECIFIC: include pow fields (nBits, nNonce) in block signature
+ writer << block.nNonce; // ITCOIN_SPECIFIC: include pow fields (nBits, nNonce) in block signature
tx_to_spend.vin[0].scriptSig << block_data;
tx_spending.vin[0].prevout = COutPoint(tx_to_spend.GetHash(), 0);
No functional changes.
f38e76a75d
build: disable "-werror" while we stay on bitcoin v23.x
Bitcoin v23.0 generates warnings with gcc 12, and does not copile at all on gcc
13. While the second problem will be solved updating to bitcoin v23.2, the
problem of triggering many warnings will not go away while we stay on v23.
This change relaxes the compilation flags in order to tolerate warnings, with
the aim of restoring it as soon as we move to a more recent major version.
Without this change it would not be possible, for example, to compile
itcoin-core on Fedora 37 (gcc 12).
8e5a378ece
Merge bitcoin v23.1 in itcoind84ee04568
DrahtBot
commented at 9:46 AM on May 22, 2023:
member
<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
<!--021abf342d371248e50ceaed478a90ca-->
Reviews
See the guideline for information on the review process.
A summary of reviews will appear here.
fanquake closed this on May 22, 2023
fanquake locked this on May 22, 2023
fanquake renamed this: update to bitcoin v23.1 . on May 22, 2023
This is a metadata mirror of the GitHub repository
bitcoin/bitcoin.
This site is not affiliated with GitHub.
Content is generated from a GitHub metadata backup.
generated: 2026-04-17 09:13 UTC
This site is hosted by @0xB10C More mirrored repositories can be found on mirror.b10c.me