-
Notifications
You must be signed in to change notification settings - Fork 1.2k
chore: update minimum chain work, tx stats, checkpoints, seeds and SECURITY.md for v23 #6920
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
✅ No Merge Conflicts DetectedThis PR currently has no conflicts with other open PRs. |
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 updates critical chain validation parameters for the upcoming Dash Core v23 release. It refreshes mainnet and testnet checkpoints (adding blocks 2361500 and1352300 respectively), updates minimum chain work thresholds, regenerates seed node lists from the current masternode set using protx list valid, and increases the assumed blockchain size from 50GB to 54GB for mainnet (testnet increases from 8GB to 10GB). The seed list changes remove 17 inactive onion nodes on mainnet and reduce testnet seeds from 3 to 1 IPv4 address. The SECURITY.md file now marks v23.x as the supported version. This is standard pre-release maintenance that ensures new nodes can bootstrap efficiently and validate against current network state.
PR Description Notes:
- Block hash for mainnet checkpoint contains typo:
0x0x0000...(double0xprefix) in description, though correctly implemented in code - Mainnet seeds description references block 2361500, but testnet seeds reference block 1352370 (not 1352300, which is the checkpoint block)
Important Files Changed
| Filename | Score | Overview |
|---|---|---|
| src/chainparams.cpp | 3/5 | Updated checkpoints, minimum chain work, defaultAssumeValid hashes, assumed sizes, and chainTxData for mainnet/testnet; testnet nMinimumChainWork value appears unchanged despite comment update |
| src/chainparamsseeds.h | 4/5 | Auto-generated seed node lists updated with ~17 fewer IPv6 mainnet seeds and testnet reduced to single seed (down from 3) |
| contrib/seeds/nodes_main.txt | 5/5 | Mainnet seed list updated with 17 onion addresses removed, 2 added, and 8 fewer IPv4 addresses based on block 2361500 masternode snapshot |
| contrib/seeds/nodes_test.txt | 4/5 | Testnet seeds drastically reduced from 3 nodes to 1 node (62.60.244.174:19999), creating potential peer discovery reliability concern |
| contrib/seeds/onion_seeds.txt | 4/5 | Removed 17 inactive Tor onion seed nodes, keeping 29 active ones; missing trailing newline violates POSIX text file format |
| SECURITY.md | 5/5 | Updated supported version from 22.x to 23.x in security policy documentation |
Confidence score: 3/5
- This PR requires review due to potential issues in chain parameter updates and testnet seed reduction that could affect network bootstrap reliability
- Score reflects three concerns: (1) testnet nMinimumChainWork value at line421 of src/chainparams.cpp appears unchanged (0x00000000000000000000000000000000000000000000000003472e1b8bd6a3b7) despite the comment referencing new block 1352300, suggesting the value may need recalculation, (2) testnet seed reduction from 3 nodes to 1node creates a single point of failure for testnet peer discovery, and (3) missing trailing newline in contrib/seeds/onion_seeds.txt may cause issues with diff tools and POSIX compliance
- Pay close attention to src/chainparams.cpp lines 420-421 to verify whether the testnet nMinimumChainWork value was intentionally kept unchanged or requires update, and contrib/seeds/nodes_test.txt to assess whether single-seed testnet configuration is acceptable for v23 release
Sequence Diagram
sequenceDiagram
participant Developer
participant BuildSystem
participant SeedGenerator
participant ChainParams
participant Node
participant Network
Developer->>SeedGenerator: Run generate-seeds.py with protx list
Note over SeedGenerator: Using block 2361500 (mainnet)<br/>block 1352300 (testnet)
SeedGenerator->>SeedGenerator: Parse node addresses
SeedGenerator->>ChainParams: Generate chainparamsseeds.h
Developer->>ChainParams: Update src/chainparams.cpp
Note over ChainParams: Set nMinimumChainWork<br/>defaultAssumeValid<br/>checkpoints<br/>chainTxData
Developer->>BuildSystem: Compile Dash Core v23
BuildSystem->>BuildSystem: Embed seed nodes and parameters
Note over Node: Node Startup
Node->>ChainParams: Load chain parameters
ChainParams-->>Node: Return consensus rules,<br/>checkpoints, seed nodes
Node->>Network: Connect to seed nodes
Network-->>Node: Peer connections established
Node->>Network: Request blockchain data
Network-->>Node: Blocks received
Node->>Node: Validate block 2361500<br/>against checkpoint
Note over Node: Use nMinimumChainWork and<br/>defaultAssumeValid for sync
Additional Comments (1)
-
contrib/seeds/nodes_main.txt, line 217 (link)style: Trailing empty line should be removed for consistency with other seed files.
Context used:
- Context from
dashboard- CLAUDE.md (source)
6 files reviewed, 3 comments
|
Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. WalkthroughThis pull request updates configuration and seed data. SECURITY.md bumps the supported release range from 22.x to 23.x. Seed lists are refreshed: contrib/seeds/nodes_main.txt replaces and expands many IP:port and .onion entries; contrib/seeds/nodes_test.txt removes three entries and adds thirteen new testnet seeds; contrib/seeds/onion_seeds.txt removes multiple onion entries (no net additions). The compiled fixed-seed array in src/chainparamsseeds.h is substantially rewritten. src/chainparams.cpp updates consensus.nMinimumChainWork and consensus.defaultAssumeValid hashes, increments m_assumed_blockchain_size, adds an assumeutxo/chainTxData snapshot for mainnet at block 2361500, and adds/updates testnet chainTxData for block 1295700. Sequence Diagram(s)Not applicable — changes are configuration and data updates only and do not modify control flow or runtime interactions. Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 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 (6)
💤 Files with no reviewable changes (1)
🚧 Files skipped from review as they are similar to previous changes (2)
🧰 Additional context used📓 Path-based instructions (2)src/**/*.{cpp,h,cc,cxx,hpp}📄 CodeRabbit inference engine (CLAUDE.md)
Files:
contrib/**📄 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). (10)
🔇 Additional comments (10)
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 |
9c77420 to
f538fd0
Compare
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.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (5)
SECURITY.md(1 hunks)contrib/seeds/nodes_main.txt(1 hunks)contrib/seeds/nodes_test.txt(1 hunks)contrib/seeds/onion_seeds.txt(0 hunks)src/chainparamsseeds.h(1 hunks)
💤 Files with no reviewable changes (1)
- contrib/seeds/onion_seeds.txt
🚧 Files skipped from review as they are similar to previous changes (1)
- contrib/seeds/nodes_test.txt
🧰 Additional context used
📓 Path-based instructions (2)
contrib/**
📄 CodeRabbit inference engine (CLAUDE.md)
Unless specifically prompted, avoid making changes to the contrib directory (contributed scripts)
Files:
contrib/seeds/nodes_main.txt
src/**/*.{cpp,h,cc,cxx,hpp}
📄 CodeRabbit inference engine (CLAUDE.md)
src/**/*.{cpp,h,cc,cxx,hpp}: Dash Core C++ codebase must be written in C++20 and require at least Clang 16 or GCC 11.1
Dash uses unordered_lru_cache for efficient caching with LRU eviction
Files:
src/chainparamsseeds.h
⏰ 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). (5)
- GitHub Check: Lint / Run linters
- GitHub Check: x86_64-w64-mingw32 / Build depends
- GitHub Check: x86_64-pc-linux-gnu_nowallet / Build depends
- GitHub Check: x86_64-pc-linux-gnu / Build depends
- GitHub Check: arm-linux-gnueabihf / Build depends
🔇 Additional comments (4)
SECURITY.md (1)
7-8: LGTM — policy bumped to 23.x.Matches the v23 cycle; no further changes needed here.
contrib/seeds/nodes_main.txt (1)
1-216: Seed list validation passes—no issues found.The verification confirms:
- All 216 entries are well-formed (29 onion addresses, 187 IPv4 addresses)
- All onion addresses match v3 format (56-char base32 with :9999)
- All IPs use port 9999 and exclude reserved/bogon ranges
- No duplicates
The optional suggestion to sort IP entries for stable ordering remains a best practice but is not required.
src/chainparamsseeds.h (2)
39-226: Chainparamsseeds.h passes integrity checks; review testnet seed count.Verification confirms no duplicates, bogon IPs, or port mismatches across both arrays. Mainnet holds 187 seeds at port 9999; testnet holds 1 seed at port 19999. Testnet's single seed falls below the recommended minimum of 3 for network resilience. Confirm this is intentional or consider adding redundancy.
9-226: BIP155 encoding verified; file is correctly auto-generated.Regeneration of src/chainparamsseeds.h using
python3 contrib/seeds/generate-seeds.py contrib/seeds/produces identical output with no differences. The file is properly maintained by the generator script and contains no hand edits. BIP155 tuple structure and port encoding (big-endian) are correct.
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 f538fd0
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.
Actionable comments posted: 0
🧹 Nitpick comments (1)
contrib/seeds/nodes_test.txt (1)
1-11: Testnet seeds refresh looks good; consider ASN/provider diversity next pass.All entries are unique and use port 19999. Non-blocking suggestion: many IPs are in AWS; consider adding 2–3 seeds from different ASNs/providers for resilience.
As per coding guidelines.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
SECURITY.md(1 hunks)contrib/seeds/nodes_test.txt(1 hunks)src/chainparamsseeds.h(1 hunks)
✅ Files skipped from review due to trivial changes (1)
- SECURITY.md
🧰 Additional context used
📓 Path-based instructions (2)
src/**/*.{cpp,h,cc,cxx,hpp}
📄 CodeRabbit inference engine (CLAUDE.md)
src/**/*.{cpp,h,cc,cxx,hpp}: Dash Core C++ codebase must be written in C++20 and require at least Clang 16 or GCC 11.1
Dash uses unordered_lru_cache for efficient caching with LRU eviction
Files:
src/chainparamsseeds.h
contrib/**
📄 CodeRabbit inference engine (CLAUDE.md)
Unless specifically prompted, avoid making changes to the contrib directory (contributed scripts)
Files:
contrib/seeds/nodes_test.txt
⏰ 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)
- GitHub Check: Build container / Build container
🔇 Additional comments (2)
src/chainparamsseeds.h (2)
9-226: Mainnet fixed seeds refresh — sanity check passes.BIP155 tuples look correct (Tor v3 entries with 0x04/0x20 payloads; IPv4 entries with port 0x27,0x0f = 9999). No blocking issues from this diff.
228-240: Testnet fixed seeds expanded and verified (11 IPv4 seeds on port 19999).Verification passed: all 11 test seeds match across src/chainparamsseeds.h and contrib/seeds/nodes_test.txt, all use port 19999, no duplicate IPs, and redundancy requirement (>= 3) is met.
To maintain lockstep between the seed array and nodes_test.txt in future updates, run:
python3 - <<'PY' import re, sys, pathlib seeds_h_path = pathlib.Path("src/chainparamsseeds.h") nodes_test_path = pathlib.Path("contrib/seeds/nodes_test.txt") h = seeds_h_path.read_text() m = re.search(r'static const uint8_t\s+chainparams_seed_test\[\]\s*=\s*\{(.*?)\};', h, re.S) if not m: print("ERROR: chainparams_seed_test block not found"); sys.exit(2) block = m.group(1) pat = re.compile(r'0x01\s*,\s*0x04\s*,\s*0x([0-9a-fA-F]{2})\s*,\s*0x([0-9a-fA-F]{2})\s*,\s*0x([0-9a-fA-F]{2})\s*,\s*0x([0-9a-fA-F]{2})\s*,\s*0x([0-9a-fA-F]{2})\s*,\s*0x([0-9a-fA-F]{2})') ips, ports = [], [] for mm in pat.finditer(block): a,b,c,d,p1,p2 = [int(mm.group(i), 16) for i in range(1,7)] ips.append(f"{a}.{b}.{c}.{d}") ports.append((p1<<8) | p2) pairs_h = [f"{ip}:{port}" for ip,port in zip(ips, ports)] pairs_file = [line.strip() for line in nodes_test_path.read_text().splitlines() if line.strip() and not line.startswith('#')] ok = True s_h, s_f = set(pairs_h), set(pairs_file) if s_h != s_f: ok = False print("DIFF between seeds.h test array and nodes_test.txt") print(" only in seeds.h:", sorted(s_h - s_f)) print(" only in nodes_test.txt:", sorted(s_f - s_h)) else: print(f"OK: {len(s_h)} test seeds match exactly across files.") bad_ports = [p for p in ports if p != 19999] if bad_ports: ok = False print("ERROR: Found test seed entries with port != 19999:", sorted(set(bad_ports))) else: print("OK: All test seeds use port 19999.") from collections import Counter dups = [ip for ip,c in Counter(ips).items() if c > 1] if dups: ok = False print("ERROR: Duplicate IPs in test seeds:", sorted(dups)) else: print("OK: No duplicate test seed IPs.") if len(s_h) < 3: ok = False print("ERROR: Fewer than 3 test seeds; add more for resiliency.") sys.exit(0 if ok else 1) PY
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 a34f034
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 a34f034
| @@ -1,44 +1,27 @@ | |||
| xmbwpdsrsn2gdamvofesyy5zrgqcswsoorrh25jx7qy4w2gftttga7ad.onion:9999 | |||
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.
why there only removed some onion seeds but not a single one is added?
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 0a1407b
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.
LGTM 0a1407b
Additional Information
The blocks used as checkpoints are
0x0x0000000000000009ba1e8f47851d036bb618a4f6565eb3c32d1f647d450ff195, Insight)0x00000107d42829a38e31c1a38c660d621e1ca376a880df1520e85e38af175d3a, Insight)m_assumed_{blockchain,chain_state}_sizecalculationsMainnet synced till block 2361620, Dash Core v22.1.3 (release)
As
m_assumed_chain_state_sizeis still <1GB, we don't update itTestnet synced till block 1352330, Dash Core f650f65 (pre-release)
Mainnet seeds generated using
protx list valid 1 2361500, testnet seeds generated usingprotx list valid 1 1353660, commenting out deduplication (source) and raising theMAX_SEEDS_PER_ASNto 10 (source)Breaking Changes
None expected.
Checklist