-
Notifications
You must be signed in to change notification settings - Fork 1.2k
fix: repair makeseeds.py, getblockchaininfo[softforks] help text, drop extra generates from test, resolve macOS GID issue
#6929
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
bitcoin#22550 adds assertions to validate CSV/CLTV activation and replaces the `generate()` calls with a helper `generate_to_height()` but bitcoin#22818 activates all forks from block 1 by default, so the `generate_to_height()` calls have been dropped. This leaves us with the `generate()` calls being swapped for assertions.
macOS uses GID 20 for staff but Linux uses it for dialout, so the build will fail because GID 20 is already used.
|
@coderabbitai review |
✅ No Merge Conflicts DetectedThis PR currently has no conflicts with other open PRs. |
✅ Actions performedReview triggered.
|
WalkthroughThis pull request modifies several components across infrastructure, data processing, RPC interfaces, and tests. The Dockerfile startup sequence is updated to conditionally apply group modifications only if the target group does not exist. The makeseeds.py script changes its address extraction logic to target a specific Sequence Diagram(s)sequenceDiagram
participant Client as RPC Client
participant RPC as getblockchaininfo()
participant Schema as Softforks Schema
Client->>RPC: Request blockchain info
RPC->>Schema: Build softforks response
rect rgb(240, 248, 255)
Note over Schema: Old: Static per-deployment keys
Schema->>Schema: Fixed keys for each deployment
end
rect rgb(173, 216, 230)
Note over Schema: New: Dynamic object structure
Schema->>Schema: Generic "xxxx" placeholder key
Schema->>Schema: Per-softfork: type + bip9/details
Schema->>Schema: Add height and active fields
end
RPC->>Client: Return updated softforks structure
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~30 minutes
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (4)
🧰 Additional context used📓 Path-based instructions (3)test/functional/**/*.py📄 CodeRabbit inference engine (CLAUDE.md)
Files:
contrib/**📄 CodeRabbit inference engine (CLAUDE.md)
Files:
src/**/*.{cpp,h,cc,cxx,hpp}📄 CodeRabbit inference engine (CLAUDE.md)
Files:
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
🔇 Additional comments (4)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Greptile Overview
Greptile Summary
This PR addresses four independent fixes that resolve issues from previous backports and cross-platform compatibility problems. The changes repair the makeseeds.py script to work with the new ExtAddr structure where addresses are keyed by purpose codes like core_p2p, fix help text documentation for getblockchaininfo RPC's softforks field to accurately reflect the dynamic object structure, streamline the wallet_signrawtransactionwithwallet.py functional test by removing unnecessary block generation now that softforks activate at height 1, and resolve a Docker build failure for macOS users where GID 20 conflicts between macOS's staff group and Linux's dialout group. These are all cleanup and correction changes that don't alter core functionality.
Important Files Changed
| Filename | Score | Overview |
|---|---|---|
| contrib/seeds/makeseeds.py | 5/5 | Fixed masternode address access to use new core_p2p purpose code structure |
| src/rpc/blockchain.cpp | 5/5 | Corrected help text for softforks field to match actual dynamic object output |
| test/functional/wallet_signrawtransactionwithwallet.py | 5/5 | Removed obsolete block generation, added softfork activation assertions, reduced locktime to 100 |
| contrib/containers/ci/ci-slim.Dockerfile | 5/5 | Added conditional check to skip group modification when GID exists for macOS compatibility |
Confidence score: 5/5
- This PR is safe to merge with minimal risk as all changes are well-documented fixes to known issues with clear explanations
- Score reflects straightforward corrections with no complex logic changes, clear backport context, and targeted fixes for documented problems
- No files require special attention; all changes are simple, well-explained, and address specific documented issues with appropriate justification
Context used:
- Context from
dashboard- CLAUDE.md (source)
4 files reviewed, no comments
PastaPastaPasta
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK 39e847c
knst
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK 39e847c
UdjinM6
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK 39e847c
…ftforks]` help text, drop extra `generate`s from test, resolve macOS GID issue 39e847c fix: do not create group if GID is already taken (Kittywhiskers Van Gogh) 36db83a fix: annotate `getblockchaininfo[softforks]` as `OBJ_DYN` (Kittywhiskers Van Gogh) e4ace44 fix: repair IP extraction in `makeseeds.py`, read from `core_p2p` arr (Kittywhiskers Van Gogh) 9ef8c53 test: drop extra `generate`s from `wallet_signrawtransactionwithwallet` (Kittywhiskers Van Gogh) Pull request description: ## Additional Information * The help text for `getblockchaininfo['softforks']` was introduced in [bitcoin#16060](bitcoin#16060) (backported in [dash#5255](dashpay#5255)) _but_ the `RPCResult` help text was introduced in [bitcoin#17809](bitcoin#17809), backported _before_ [bitcoin#16060](bitcoin#16060). This resulted in the help text for `softforks` deviating from upstream without the output to match (which is aligned with upstream). This has since been resolved as the output structure hasn't changed, only the help text. * [bitcoin#22818](bitcoin#22818) (backported in [dash#6214](dashpay#6214)) activated many softforks at height 1, which rendered the block generation calls in `wallet_signrawtransactionwithwallet.py` ([source](https://github.com/dashpay/dash/blob/3e6e8f57c45fb24107816a10854ed8f349c4aa20/test/functional/wallet_signrawtransactionwithwallet.py#L132-L133)) no longer necessary, additionally [bitcoin#22550](bitcoin#22550) (backported in [dash#6189](dashpay#6189)) added assertions to validate CSV/CLTV activation that were not included in the backport. This has since been resolved, replacing the `generate` calls with assertions. * The locktime height was dropped from `1000` to `100` (matching with upstream, [source](https://github.com/bitcoin/bitcoin/blob/24.x/test/functional/wallet_signrawtransactionwithwallet.py#L219)) as we are no longer generating enough blocks to reach that height anymore. * `makeseeds.py` is currently mangled because [dash#6666](dashpay#6666) updated the script to look for the `core_p2p` purpose even though purpose code support was spun-off into [dash#6674](dashpay#6674). This meant, in between [dash#6666](dashpay#6666) and [dash#6674](dashpay#6674 merger, `makeseeds.py` was broken. This necessitated a fix that was introduced as e714c06 ([dash#6858](dashpay#6858)) but meant that after [dash#6674](dashpay#6674), `makeseeds.py` is broken again. This has been resolved as part of this PR. * macOS users who want to utilise the `develop` container ([source](https://github.com/dashpay/dash/blob/b82450aa7dce2307b13e6fe282f7c4f84b48cbbf/contrib/containers/develop/Dockerfile)) need to set the `USER_ID` and `GROUP_ID` `args` to avoid permissions issues. This creates a slight problem as the GID for `staff` is 20 on macOS but Linux uses GID 20 for `dialout`, so creating a group with GID 20 will _fail_. As we only care about the GID, it is safe to skip the group creation step and assign the user to the group anyways as we do it by GID and _not_ name (the user will be presented as a member of the `dialout` group). This should resolve issues for macOS users trying to build the `develop` container. ## Breaking Changes None expected. ## Checklist - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas **(note: N/A)** - [x] I have added or updated relevant unit/integration/functional/e2e tests - [x] I have made corresponding changes to the documentation **(note: N/A)** - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_ ACKs for top commit: PastaPastaPasta: utACK 39e847c knst: utACK 39e847c UdjinM6: utACK 39e847c Tree-SHA512: 0ecb8bb930d54d4b9024a6e94a2fe3b49c7334666e5f67d38920ac58f54332fb8b4f62bd883bd949969d60b6b5183c7a20a3593f24c2e6bbbb0de143b3de8fe1
6fd7059 chore: mark v23 as release (pasta) ae08f53 docs: integrate 6946 release notes into final (pasta) 74a222d Merge #6946: feat: show seed on wallet creation (pasta) 877343a Merge #6943: fix: don't treat arrays/objects as string literals for composite methods (pasta) 00368fb Merge #6940: fix: reuse best clsig to avoid potential race condition (pasta) 8eceb98 Merge #6938: fix: logic error in `CheckDecryptionKey` (pasta) 3f30664 Merge #6929: fix: repair `makeseeds.py`, `getblockchaininfo[softforks]` help text, drop extra `generate`s from test, resolve macOS GID issue (pasta) 7ba4f1c Merge #6928: docs: update man pages for 23.0 (pasta) a6c1d6a Merge #6920: chore: update minimum chain work, tx stats, checkpoints, seeds and SECURITY.md for v23 (pasta) 84df1f0 Merge #6909: chore: Translations 2025-10 (pasta) a6449b1 Merge #6885: fix: improve governance/proposal dialog strings (pasta) Pull request description: ## Issue being fixed or feature implemented See commits ## 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 6fd7059 Tree-SHA512: a0d93a61a4f4978fbe120bea832ce683a8ae7c16c892a381d91ddc4b25344c0f3ad3306a1a30a166a7dfa6e38e4532708587cc23cc372126828b8e22d141dc85
…in#26257, bump to Python 3.10, mypy 0.981, fix Docker group assignment, minor housekeeping (misc. changes: part 2) 82723dc fix: don't forget to assign user to group if group exists (Kittywhiskers Van Gogh) 066d409 chore: remove outdated `boot2docker` comment (Kittywhiskers Van Gogh) 29e98e3 chore: document `USER_ID` and `GROUP_ID` in `docker-compose.yml` (Kittywhiskers Van Gogh) 6ea897a chore: drop unmaintained Guix container (Kittywhiskers Van Gogh) 6a1786c fix: resolve `test: =: unary operator expected` error (Kittywhiskers Van Gogh) d6489f0 fix: make copy of `skip` in `GetStackFrames` to avoid clobbering (Kittywhiskers Van Gogh) 4110ff3 lint: mypy 0.981 (Kittywhiskers Van Gogh) 80a44e9 partial bitcoin#26257: python linter flake8 E275 fixup, update dependencies (Kittywhiskers Van Gogh) 7b80dfb merge bitcoin#28347: replace deprecated pkg_resources with importlib.metadata (Kittywhiskers Van Gogh) 04ac20a partial bitcoin#30527: Bump python minimum supported version to 3.10 (Kittywhiskers Van Gogh) Pull request description: ## Additional Information * Dependency for #6988 * Python 3.9's security support elapsed on 31st Oct '25 ([source](https://endoflife.date/python)), in response to that we are switching over to Python 3.10. * Due to [python/mypy#13627](python/mypy#13627) arising as a result of this bump, we also had to upgrade `mypy` to 0.981. Note that this is a divergence from upstream as they opted to upgrade to `mypy` 1.x (see [bitcoin#28009](bitcoin#28009)) but the changes needed to do so are too disruptive given this PR's larger context. Future backports should feel free to overwrite the mypy version and realign with upstream. * CI identified potential clobbering ([build](https://github.com/kwvg/dash/actions/runs/19434684086/job/55606106842#step:8:1804)) in Windows stacktraces code that started to build after [dash#6966](#6966) (see below). Additionally, C++20 has deprecated certain operators like {in,de}crementation courtesy of [P1152](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1152r3.html), which required additional adaptation. <details> <summary>Build error:</summary> ``` stacktraces.cpp: In function ‘std::vector<long long unsigned int> GetStackFrames(size_t, size_t, const CONTEXT*)’: stacktraces.cpp:167:56: error: variable ‘skip’ might be clobbered by ‘longjmp’ or ‘vfork’ [-Werror=clobbered] 167 | static __attribute__((noinline)) std::vector<uint64_t> GetStackFrames(size_t skip, size_t max_frames, const CONTEXT* pContext = nullptr) | ^~~~~~~~~~~~~~ cc1plus: all warnings being treated as errors ``` </details> * The `AM_CONDITIONAL` for `CRASH_HOOKS_WRAPPED_CXX_ABI` wasn't evaluated due to missing quotations (see below), this has been resolved. <details> <summary>Configure:</summary> ``` checking whether the linker accepts -Wl,-export-dynamic... no checking whether the linker accepts -rdynamic... yes checking whether C++ compiler accepts -gdwarf-4... yes checking whether C++ compiler accepts -fno-standalone-debug... yes checking whether the linker accepts -Wl,-wrap=__cxa_allocate_exception... no ./configure: line 30603: test: =: unary operator expected checking for Linux getrandom syscall... no checking for getentropy via random.h... yes checking for sysctl... yes checking for sysctl KERN_ARND... no checking for fdatasync... no ``` </details> * Currently we offer two containers for Guix builds meant for developers who aren't on Linux, one was introduced by [dash#5285](#5285) (based on [fanquake/core-review](https://github.com/fanquake/core-review)'s container, [source](https://github.com/fanquake/core-review/blob/d8cf188214879ea1b095e2ba34ca5c23dbc3ebd2/guix/imagefile)) and the other introduced by [dash#5449](#5449), the former does not seem to get much use and has been out of sync with its upstream source for a while. As the second container is used by some developers and is updated and maintained to fit Dash's specific needs, the first container has been dropped and documentation has been updated to reflect the same. * As Docker has matured with the WSL2 backend on Windows and the Apple Virtualization framework on macOS, boot2docker has been deprecated (see [boot2docker/boot2docker#1408](boot2docker/boot2docker#1408)) and the comment referencing it has been dropped. * To avoid permissions issues with mounting directories, containers come with `USER_ID` and `GROUP_ID` args ([source](https://github.com/dashpay/dash/blob/23de96916a8b8f97a2c408bb76da1d2149d7227c/contrib/containers/ci/ci-slim.Dockerfile#L123-L131)) that need to be specified at build time if the mount needs different permissions (as is often the case on macOS). To make that option more explicitly clear, it has been specified in `docker-compose.yml` with default values filled in. * [dash#6929](#6929) introduced a fix to prevent unexpected container build failure due to conflicting groups (most commonly GID 20 that on macOS is `staff` but on Linux is `dialout`) but the fix did _not_ assign the default user to that group, that has been resolved here. ## Breaking Changes None expected. ## Checklist - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas - [x] I have added or updated relevant unit/integration/functional/e2e tests - [x] 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 82723dc ~with one nit~ Tree-SHA512: 0e906d1a7fea9edc52a40a6a6971fa6b2599674e97e99c65a220f99cc44be78f4290be8fb9af7782cac416bcdd2338b7f17a5c50b5fdcf727b1cf84fe44c8686
fe1cff3 chore: bump release to 23.0.2 (pasta) a8f15c1 Merge #7032: fix: drop gsl usage from RebuildListFromBlock function wrapper (pasta) 736bb26 chore: bump manpages for 23.0.1 (pasta) d5c7d25 chore: bump nMinimumChainWork and defaultAssumeValid (pasta) 4f8aa71 chore: bump version to 23.0.1 (pasta) 0865b7c docs: add release notes for 23.0.1 (pasta) 2048b42 Merge #6986: test: new commandline argument -tinyblk to use blk size just 64kb instead 16Mb (pasta) 1a9b20c Merge #7013: fix: update BuildTestVectors call to adjust batch size based on output flag (pasta) 36e4679 Merge #7009: fix: include QDebug directly (pasta) 69d0c9c Merge #6999: feat: verify and repair evodb diffs automatically at node startup (pasta) ca16437 Merge #6996: perf: reduce cs_main lock scope in evodb verify/repair operations (pasta) 207526e Merge #6977: fix: bls benchmarks crash when ran independently (pasta) 226aaf4 Merge #6969: feat: add evodb verify and repair RPC commands (pasta) 92abe9b Merge #6964: perf: remove duplicated check of same key in the instant send database (pasta) 5a1ec4c Merge #6961: fix: correct BLS scheme setting in `MigrateLegacyDiffs()` when `nVersion` is present (pasta) bf653d3 Merge #6949: depends: Qt 5.15.18 (pasta) faf58cd merge bitcoin#30774: Qt 5.15.16 (Kittywhiskers Van Gogh) 6a995f5 Merge #6944: fix: HD chain encryption check ordering issue (pasta) 6fd7059 chore: mark v23 as release (pasta) ae08f53 docs: integrate 6946 release notes into final (pasta) 74a222d Merge #6946: feat: show seed on wallet creation (pasta) 877343a Merge #6943: fix: don't treat arrays/objects as string literals for composite methods (pasta) 00368fb Merge #6940: fix: reuse best clsig to avoid potential race condition (pasta) 8eceb98 Merge #6938: fix: logic error in `CheckDecryptionKey` (pasta) 3f30664 Merge #6929: fix: repair `makeseeds.py`, `getblockchaininfo[softforks]` help text, drop extra `generate`s from test, resolve macOS GID issue (pasta) 7ba4f1c Merge #6928: docs: update man pages for 23.0 (pasta) a6c1d6a Merge #6920: chore: update minimum chain work, tx stats, checkpoints, seeds and SECURITY.md for v23 (pasta) 84df1f0 Merge #6909: chore: Translations 2025-10 (pasta) a6449b1 Merge #6885: fix: improve governance/proposal dialog strings (pasta) ebf3a64 docs: typos (pasta) 4ad5533 docs: typos (pasta) f407453 doc: Replace Bitcoin Core PR references with Dash Core backport PRs (pasta) 78d0725 docs: add note on proto bump and platformban p2p (pasta) e0519c3 docs: fix whitespace errors (pasta) bc8db22 docs: minor improvements to release notes (pasta) c338511 docs: reorganize rpc updates to organize extended address changes (thephez) 700c46e style: make heading style consistent (thephez) bd636bd docs: add contributors (pasta) 6d29bc3 docs: revert changes deferred to v24 (pasta) 615f5ff docs: make the downgrade warning more confident (pasta) 567771a Apply suggestions from code review (PastaPastaPasta) 2b3211a docs: add link to 22.1.3 release notes (pasta) 548a38a docs: remove individual release notes files (pasta) e770c25 docs: add v23.0.0 release notes and archive v22.1.3 (pasta) Pull request description: ## Issue being fixed or feature implemented Includes changes from 23.0.0 release too because we never merged it back. ## What was done? ## How Has This Been Tested? ## Breaking Changes ## Checklist: - [ ] 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 - [ ] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_ ACKs for top commit: PastaPastaPasta: utACK 491db4a kwvg: utACK 491db4a Tree-SHA512: 61895cd1f9d01ac7be1d407afe1ddd24b98e8242cb03229ecd586a4d2d1c43dbc62c98da52a8c715b3a5943fb40e99b23251e691f778779af9d6da94392122a3
Additional Information
The help text for
getblockchaininfo['softforks']was introduced in bitcoin#16060 (backported in dash#5255) but theRPCResulthelp text was introduced in bitcoin#17809, backported before bitcoin#16060. This resulted in the help text forsoftforksdeviating from upstream without the output to match (which is aligned with upstream).This has since been resolved as the output structure hasn't changed, only the help text.
bitcoin#22818 (backported in dash#6214) activated many softforks at height 1, which rendered the block generation calls in
wallet_signrawtransactionwithwallet.py(source) no longer necessary, additionally bitcoin#22550 (backported in dash#6189) added assertions to validate CSV/CLTV activation that were not included in the backport.This has since been resolved, replacing the
generatecalls with assertions.1000to100(matching with upstream, source) as we are no longer generating enough blocks to reach that height anymore.makeseeds.pyis currently mangled because dash#6666 updated the script to look for thecore_p2ppurpose even though purpose code support was spun-off into dash#6674. This meant, in between dash#6666 and dash#6674's merger,makeseeds.pywas broken.This necessitated a fix that was introduced as e714c06 (dash#6858) but meant that after dash#6674,
makeseeds.pyis broken again. This has been resolved as part of this PR.macOS users who want to utilise the
developcontainer (source) need to set theUSER_IDandGROUP_IDargsto avoid permissions issues. This creates a slight problem as the GID forstaffis 20 on macOS but Linux uses GID 20 fordialout, so creating a group with GID 20 will fail.As we only care about the GID, it is safe to skip the group creation step and assign the user to the group anyways as we do it by GID and not name (the user will be presented as a member of the
dialoutgroup). This should resolve issues for macOS users trying to build thedevelopcontainer.Breaking Changes
None expected.
Checklist