Skip to content

Commit 456add2

Browse files
Merge #6582: backport: trivial 2025 02 12
c34e7ab Merge bitcoin#30534: guix: move bison from global scope, to Linux (merge-script) da11d29 Merge bitcoin#30282: Revert "contrib: macdeploy: monkey-patch gen-sdk to be deterministic" (merge-script) 20bcee8 Merge bitcoin#30281: Update leveldb subtree to latest upstream (merge-script) a74b1e2 Merge bitcoin#30253: refactor: performance-for-range-copy in psbt.h (merge-script) 2ea479f Merge bitcoin#29650: depends: drop 1 Qt determinism patch (fanquake) 6506f52 Merge bitcoin#28833: wallet: refactor: remove unused `SignatureData` instances in spkm's `FillPSBT` methods (Ava Chow) 6235590 Merge bitcoin#29213: doc, test: test and explain service flag handling (Ava Chow) 34bbe69 Merge bitcoin#28965: guix: remove input labels (fanquake) 490b390 Merge bitcoin#28859: guix: update signapple (drop macho & altgraph) (fanquake) a12ad80 Merge bitcoin#28325: test: wallet_backup.py, fix intermittent failure in "restore using dumped wallet" (fanquake) 15f8b74 Merge bitcoin#27779: guix: remove cURL from build env (fanquake) 1289d32 Merge bitcoin#27801: wallet: Add tracing for sqlite statements (fanquake) ba3aff7 Merge bitcoin-core/gui#729: test: Add missed header (Hennadii Stepanov) 536a265 Merge bitcoin#27209: ci: Remove unused EXPECTED_TESTS_DURATION_IN_SECONDS env var (glozow) f2caccd Merge bitcoin#27174: ci: bump lint task to bookworm for git v2.38 (fanquake) 0be2932 Merge bitcoin#27009: validation: Skip VerifyDB checks of level >=3 if dbcache is too small (fanquake) Pull request description: ## Issue being fixed or feature implemented Batch of trivial back ports ## What was done? ## How Has This Been Tested? Built locally; haven't reviewed commits yet. ## Breaking Changes ## Checklist: _Go over all the following points, and put an `x` in all the boxes that apply._ - [ ] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have added or updated relevant unit/integration/functional/e2e tests - [ ] I have made corresponding changes to the documentation - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_ ACKs for top commit: UdjinM6: utACK c34e7ab kwvg: utACK c34e7ab Tree-SHA512: e20270e48273ad5fd5926e75b025fe69a70e698a82f0a11a1fa646c44a7affbd7a5f33eebcd7faa606e7adc2a888df141c660339d7240e6ed64f8525558215de
2 parents e500191 + c34e7ab commit 456add2

File tree

17 files changed

+117
-149
lines changed

17 files changed

+117
-149
lines changed

.cirrus.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ compute_credits_template: &CREDITS_TEMPLATE
4747

4848

4949
task:
50-
name: 'lint [jammy]'
50+
name: 'lint [bookworm]'
5151
<< : *BASE_TEMPLATE
5252
container:
53-
image: ubuntu:jammy
53+
image: debian:bookworm
5454
cpu: 1
5555
memory: 1G
5656
# For faster CI feedback, immediately schedule the linters

ci/test/00_setup_env.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ export RUN_SECURITY_TESTS=${RUN_SECURITY_TESTS:-false}
4545
# might be slow or a reindex might be waiting on disk IO.
4646
export TEST_RUNNER_TIMEOUT_FACTOR=${TEST_RUNNER_TIMEOUT_FACTOR:-4}
4747
export RUN_FUZZ_TESTS=${RUN_FUZZ_TESTS:-false}
48-
export EXPECTED_TESTS_DURATION_IN_SECONDS=${EXPECTED_TESTS_DURATION_IN_SECONDS:-1000}
4948

5049
export CONTAINER_NAME=${CONTAINER_NAME:-ci_unnamed}
5150
export DOCKER_NAME_TAG=${DOCKER_NAME_TAG:-ubuntu:20.04}

contrib/guix/manifest.scm

Lines changed: 23 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
(gnu packages commencement)
88
(gnu packages compression)
99
(gnu packages cross-base)
10-
(gnu packages curl)
1110
(gnu packages file)
1211
(gnu packages gawk)
1312
(gnu packages gcc)
@@ -20,7 +19,6 @@
2019
((gnu packages python) #:select (python-minimal))
2120
((gnu packages python-build) #:select (python-tomli))
2221
((gnu packages python-crypto) #:select (python-asn1crypto))
23-
((gnu packages python-xyz) #:select (python-altgraph))
2422
((gnu packages tls) #:select (openssl))
2523
((gnu packages version-control) #:select (git-minimal))
2624
(guix build-system cmake)
@@ -83,11 +81,11 @@ FILE-NAME found in ./patches relative to the current file."
8381
(build-system trivial-build-system)
8482
(arguments '(#:builder (begin (mkdir %output) #t)))
8583
(propagated-inputs
86-
`(("binutils" ,xbinutils)
87-
("libc" ,xlibc)
88-
("libc:static" ,xlibc "static")
89-
("gcc" ,xgcc)
90-
("gcc-lib" ,xgcc "lib")))
84+
(list xbinutils
85+
xlibc
86+
xgcc
87+
`(,xlibc "static")
88+
`(,xgcc "lib")))
9189
(synopsis (string-append "Complete GCC tool chain for " target))
9290
(description (string-append "This package provides a complete GCC tool
9391
chain for " target " development."))
@@ -150,10 +148,10 @@ desirable for building Dash Core release binaries."
150148
(build-system trivial-build-system)
151149
(arguments '(#:builder (begin (mkdir %output) #t)))
152150
(propagated-inputs
153-
`(("binutils" ,xbinutils)
154-
("libc" ,pthreads-xlibc)
155-
("gcc" ,pthreads-xgcc)
156-
("gcc-lib" ,pthreads-xgcc "lib")))
151+
(list xbinutils
152+
pthreads-xlibc
153+
pthreads-xgcc
154+
`(,pthreads-xgcc "lib")))
157155
(synopsis (string-append "Complete GCC tool chain for " target))
158156
(description (string-append "This package provides a complete GCC tool
159157
chain for " target " development."))
@@ -218,11 +216,7 @@ and abstract ELF, PE and MachO formats.")
218216
(base32
219217
"1j47vwq4caxfv0xw68kw5yh00qcpbd56d7rq6c483ma3y7s96yyz"))))
220218
(build-system cmake-build-system)
221-
(inputs
222-
`(("openssl", openssl)))
223-
(arguments
224-
'(#:configure-flags
225-
(list "-DCMAKE_DISABLE_FIND_PACKAGE_CURL=TRUE")))
219+
(inputs (list openssl))
226220
(home-page "https://github.com/mtrojnar/osslsigncode")
227221
(synopsis "Authenticode signing and timestamping tool")
228222
(description "osslsigncode is a small tool that implements part of the
@@ -279,8 +273,7 @@ thus should be able to compile on most platforms where these exist.")
279273
(files '("etc/ssl/certs/ca-certificates.crt")))))
280274

281275
(propagated-inputs
282-
`(("python-asn1crypto" ,python-asn1crypto)
283-
("openssl" ,openssl)))
276+
(list python-asn1crypto openssl))
284277
(arguments
285278
`(#:phases
286279
(modify-phases %standard-phases
@@ -318,7 +311,7 @@ thus should be able to compile on most platforms where these exist.")
318311
(package (inherit python-oscrypto)
319312
(name "python-oscryptotests")
320313
(propagated-inputs
321-
`(("python-oscrypto" ,python-oscrypto)))
314+
(list python-oscrypto))
322315
(arguments
323316
`(#:tests? #f
324317
#:phases
@@ -345,9 +338,9 @@ thus should be able to compile on most platforms where these exist.")
345338
"1qw2k7xis53179lpqdqyylbcmp76lj7sagp883wmxg5i7chhc96k"))))
346339
(build-system python-build-system)
347340
(propagated-inputs
348-
`(("python-asn1crypto" ,python-asn1crypto)
349-
("python-oscrypto" ,python-oscrypto)
350-
("python-oscryptotests", python-oscryptotests))) ;; certvalidator tests import oscryptotests
341+
(list python-asn1crypto
342+
python-oscrypto
343+
python-oscryptotests)) ;; certvalidator tests import oscryptotests
351344
(arguments
352345
`(#:phases
353346
(modify-phases %standard-phases
@@ -395,56 +388,8 @@ certificates or paths. Supports various options, including: validation at a
395388
specific moment in time, whitelisting and revocation checks.")
396389
(license license:expat))))
397390

398-
(define-public python-macholib
399-
(package
400-
(name "python-macholib")
401-
(version "1.14")
402-
(source
403-
(origin
404-
(method git-fetch)
405-
(uri (git-reference
406-
(url "https://github.com/ronaldoussoren/macholib")
407-
(commit (string-append "v" version))))
408-
(file-name (git-file-name name version))
409-
(sha256
410-
(base32
411-
"0aislnnfsza9wl4f0vp45ivzlc0pzhp9d4r08700slrypn5flg42"))))
412-
(build-system python-build-system)
413-
(propagated-inputs
414-
`(("python-altgraph" ,python-altgraph)))
415-
(arguments
416-
'(#:phases
417-
(modify-phases %standard-phases
418-
(add-after 'unpack 'disable-broken-tests
419-
(lambda _
420-
;; This test is broken as there is no keyboard interrupt.
421-
(substitute* "macholib_tests/test_command_line.py"
422-
(("^(.*)class TestCmdLine" line indent)
423-
(string-append indent
424-
"@unittest.skip(\"Disabled by Guix\")\n"
425-
line)))
426-
(substitute* "macholib_tests/test_dyld.py"
427-
(("^(.*)def test_\\S+_find" line indent)
428-
(string-append indent
429-
"@unittest.skip(\"Disabled by Guix\")\n"
430-
line))
431-
(("^(.*)def testBasic" line indent)
432-
(string-append indent
433-
"@unittest.skip(\"Disabled by Guix\")\n"
434-
line))
435-
)
436-
#t)))))
437-
(home-page "https://github.com/ronaldoussoren/macholib")
438-
(synopsis "Python library for analyzing and editing Mach-O headers")
439-
(description "macholib is a Macho-O header analyzer and editor. It's
440-
typically used as a dependency analysis tool, and also to rewrite dylib
441-
references in Mach-O headers to be @executable_path relative. Though this tool
442-
targets a platform specific file format, it is pure python code that is platform
443-
and endian independent.")
444-
(license license:expat)))
445-
446391
(define-public python-signapple
447-
(let ((commit "7a96b4171a360abf0f0f56e499f8f9ed2116280d"))
392+
(let ((commit "62155712e7417aba07565c9780a80e452823ae6a"))
448393
(package
449394
(name "python-signapple")
450395
(version (git-version "0.1" "1" commit))
@@ -457,14 +402,13 @@ and endian independent.")
457402
(file-name (git-file-name name commit))
458403
(sha256
459404
(base32
460-
"0aa4k180jnpal15yhncnm3g3z9gzmi7qb25q5l0kaj444a1p2pm4"))))
405+
"1nm6rm4h4m7kbq729si4cm8rzild62mk4ni8xr5zja7l33fhv3gb"))))
461406
(build-system python-build-system)
462407
(propagated-inputs
463-
`(("python-asn1crypto" ,python-asn1crypto)
464-
("python-oscrypto" ,python-oscrypto)
465-
("python-certvalidator" ,python-certvalidator)
466-
("python-elfesteem" ,python-elfesteem)
467-
("python-macholib" ,python-macholib)))
408+
(list python-asn1crypto
409+
python-oscrypto
410+
python-certvalidator
411+
python-elfesteem))
468412
;; There are no tests, but attempting to run python setup.py test leads to
469413
;; problems, just disable the test
470414
(arguments '(#:tests? #f))
@@ -584,7 +528,6 @@ inspecting signatures in Mach-O binaries.")
584528
autoconf-2.71
585529
automake
586530
pkg-config
587-
bison
588531
;; Scripting
589532
python-minimal ;; (3.10)
590533
;; Git
@@ -599,7 +542,8 @@ inspecting signatures in Mach-O binaries.")
599542
nss-certs
600543
osslsigncode))
601544
((string-contains target "-linux-")
602-
(list (list gcc-toolchain-12 "static")
545+
(list bison
546+
(list gcc-toolchain-12 "static")
603547
(make-bitcoin-cross-toolchain target)))
604548
((string-contains target "darwin")
605549
(list clang-toolchain-18

contrib/macdeploy/gen-sdk

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,6 @@ import gzip
88
import os
99
import contextlib
1010

11-
# monkey-patch Python 3.8 and older to fix wrong TAR header handling
12-
# see https://github.com/bitcoin/bitcoin/pull/24534
13-
# and https://github.com/python/cpython/pull/18080 for more info
14-
if sys.version_info < (3, 9):
15-
_old_create_header = tarfile.TarInfo._create_header
16-
def _create_header(info, format, encoding, errors):
17-
buf = _old_create_header(info, format, encoding, errors)
18-
# replace devmajor/devminor with binary zeroes
19-
buf = buf[:329] + bytes(16) + buf[345:]
20-
# recompute checksum
21-
chksum = tarfile.calc_chksums(buf)[0]
22-
buf = buf[:-364] + bytes("%06o\0" % chksum, "ascii") + buf[-357:]
23-
return buf
24-
tarfile.TarInfo._create_header = staticmethod(_create_header)
25-
2611
@contextlib.contextmanager
2712
def cd(path):
2813
"""Context manager that restores PWD even if an exception was raised."""

depends/packages/qt.mk

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ $(package)_patches += no_warnings_for_symbols.patch
1919
$(package)_patches += rcc_hardcode_timestamp.patch
2020
$(package)_patches += duplicate_lcqpafonts.patch
2121
$(package)_patches += guix_cross_lib_path.patch
22-
$(package)_patches += fast_fixed_dtoa_no_optimize.patch
2322
$(package)_patches += fix-macos-linker.patch
2423
$(package)_patches += memory_resource.patch
2524
$(package)_patches += clang_18_libpng.patch
@@ -255,7 +254,6 @@ define $(package)_preprocess_cmds
255254
patch -p1 -i $($(package)_patch_dir)/rcc_hardcode_timestamp.patch && \
256255
patch -p1 -i $($(package)_patch_dir)/duplicate_lcqpafonts.patch && \
257256
patch -p1 -i $($(package)_patch_dir)/utc_from_string_no_optimize.patch && \
258-
patch -p1 -i $($(package)_patch_dir)/fast_fixed_dtoa_no_optimize.patch && \
259257
patch -p1 -i $($(package)_patch_dir)/guix_cross_lib_path.patch && \
260258
patch -p1 -i $($(package)_patch_dir)/windows_lto.patch && \
261259
patch -p1 -i $($(package)_patch_dir)/zlib-timebits64.patch && \

depends/patches/qt/fast_fixed_dtoa_no_optimize.patch

Lines changed: 0 additions & 20 deletions
This file was deleted.

src/addrman.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,13 +121,16 @@ class AddrMan
121121

122122
/**
123123
* Attempt to add one or more addresses to addrman's new table.
124+
* If an address already exists in addrman, the existing entry may be updated
125+
* (e.g. adding additional service flags). If the existing entry is in the new table,
126+
* it may be added to more buckets, improving the probability of selection.
124127
*
125128
* @param[in] vAddr Address records to attempt to add.
126129
* @param[in] source The address of the node that sent us these addr records.
127130
* @param[in] time_penalty A "time penalty" to apply to the address record's nTime. If a peer
128131
* sends us an address record with nTime=n, then we'll add it to our
129132
* addrman with nTime=(n - time_penalty).
130-
* @return true if at least one address is successfully added. */
133+
* @return true if at least one address is successfully added, or added to an additional bucket. Unaffected by updates. */
131134
bool Add(const std::vector<CAddress>& vAddr, const CNetAddr& source, std::chrono::seconds time_penalty = 0s);
132135

133136
/**

src/leveldb/include/leveldb/status.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,8 @@ class LEVELDB_EXPORT Status {
103103
inline Status::Status(const Status& rhs) {
104104
state_ = (rhs.state_ == nullptr) ? nullptr : CopyState(rhs.state_);
105105
}
106+
107+
// NOLINTBEGIN(bugprone-unhandled-self-assignment)
106108
inline Status& Status::operator=(const Status& rhs) {
107109
// The following condition catches both aliasing (when this == &rhs),
108110
// and the common case where both rhs and *this are ok.
@@ -112,6 +114,8 @@ inline Status& Status::operator=(const Status& rhs) {
112114
}
113115
return *this;
114116
}
117+
// NOLINTEND(bugprone-unhandled-self-assignment)
118+
115119
inline Status& Status::operator=(Status&& rhs) noexcept {
116120
std::swap(state_, rhs.state_);
117121
return *this;

src/net_processing.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3546,6 +3546,9 @@ void PeerManagerImpl::ProcessMessage(
35463546
vRecv >> addrMe;
35473547
if (!pfrom.IsInboundConn())
35483548
{
3549+
// Overwrites potentially existing services. In contrast to this,
3550+
// unvalidated services received via gossip relay in ADDR/ADDRV2
3551+
// messages are only ever added but cannot replace existing ones.
35493552
m_addrman.SetServices(pfrom.addr, nServices);
35503553
}
35513554
if (pfrom.ExpectServicesFromConn() && !HasAllDesirableServiceFlags(nServices))

src/psbt.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ struct PSBTInput
192192

193193
if (final_script_sig.empty()) {
194194
// Write any partial signatures
195-
for (auto sig_pair : partial_sigs) {
195+
for (const auto& sig_pair : partial_sigs) {
196196
SerializeToVector(s, CompactSizeWriter(PSBT_IN_PARTIAL_SIG), Span{sig_pair.second.first});
197197
s << sig_pair.second.second;
198198
}

0 commit comments

Comments
 (0)