Skip to content

feat(rip-200): add Pentium M antiquity tier (Banias/Dothan/Yonah)#6423

Merged
Scottcjn merged 2 commits into
mainfrom
feat/pentium-m-banias-tier
May 28, 2026
Merged

feat(rip-200): add Pentium M antiquity tier (Banias/Dothan/Yonah)#6423
Scottcjn merged 2 commits into
mainfrom
feat/pentium-m-banias-tier

Conversation

@Scottcjn
Copy link
Copy Markdown
Owner

Summary

Pentium M was missing from ANTIQUITY_MULTIPLIERS and silently fell through to the modern x86 bucket (0.8x). Adds 4 entries + brand-string detection so genuine vintage Pentium M silicon (2003-2006) gets its proper multiplier.

The trigger: brought a real 2003 IBM ThinkPad T40 (2373-7CU, Pentium M Banias 1.5GHz) online today as a RustChain miner. All 7 hardware fingerprint checks pass cleanly — anti-emulation 0 indicators, SSE+SSE2 only (no SSE3), no LM (i686), 1MB L2 — but the server was about to assign it 0.8x. That's wrong: this machine is 23 years old, older than most entries in the table that already get a vintage bonus.

Changes

1. node/rip_200_round_robin_1cpu1vote.py (+11/-1)

Four new entries between pentium_iii (2.0x) and pentium4 (1.5x):

Tier Mult Year Notes
pentium_m 1.9 2003-2006 Generic fallback
pentium_m_banias 1.9 2003 130nm, 1MB L2, max 1.7GHz — T40 class
pentium_m_dothan 1.8 2004 90nm, 2MB L2, up to 2.26GHz
pentium_m_yonah 1.6 2006 dual-core, first Core/Core Duo

Slots into the existing chronological curve: PIII (1999) > Pentium M (2003) > P4 (2000-2008, market-saturated, already discounted) > Core 2 (2006).

2. node/rustchain_v2_integrated_v2.2.1_rip200.py (+74)

New _detect_x86_vintage() helper called from derive_verified_device() before the final fall-through (the miner hardcodes arch='modern' for ALL x86 in _get_hw_info, so server-side brand-string lookup is the only place to recover the actual tier).

  • Pentium M family split by clock speed (Banias maxed at 1.7GHz, Dothan exceeded it) for 32-bit silicon, and by machine field (x86_64 indicates Yonah).
  • Regex uses \b boundaries and a (?!\d) negative lookahead to avoid false-matching Apple M4 or future Apple-style names.
  • Also covers PIII / PII / Pentium Pro / Pentium MMX — all of which had multiplier entries already but no detection path.

Verification

15-case unit test of the regex passes including these false-positive guards:

  • Apple M4 → None (no match)
  • AMD K6-2 with MMX support 350MHz → None (no match)
  • Intel(R) Pentium(R) D CPU 3.00GHz → None (not Pentium M)
  • Intel(R) Pentium(R) II 350MHzpentium_ii (not matched as III)

End-to-end against the T40:

Fingerprint snapshot (Banias-class reference):
  clock_drift cv:    0.0324
  cache L1/L2/L3:    500.94 / 463.76 / 468.90 ns (no L3 — L2 hits dominate)
  simd flags count:  26 (no AVX, no AltiVec, no NEON)
  thermal drift:     0.9932 (real silicon stability)
  anti_emulation:    0 VM indicators

Both files pass python3 -m py_compile.

Test plan

  • py_compile on both edited files
  • 15-case regex unit test (Pentium M Banias/Dothan/Yonah + PIII/PII/Pro/MMX + false-positive guards)
  • Verified fingerprint pipeline against real T40 hardware
  • Deploy to Node 1 (50.28.86.131) and confirm /api/miners shows T40 with device_arch=pentium_m_banias
  • Deploy to Nodes 2/3/4
  • Confirm T40 receives 1.9x weighting in next epoch settlement

🤖 Generated with Claude Code

Pentium M was previously absent from ANTIQUITY_MULTIPLIERS and silently
fell through to the 'modern' x86 bucket (0.8x). This is wrong: Pentium M
is mobile P6 lineage descended from Pentium III (NOT NetBurst), and
Banias-class silicon is 23 years old — older than most entries in the
table that already get a vintage bonus.

Two-part fix:

1. ANTIQUITY_MULTIPLIERS gains 4 new keys, slotted chronologically between
   pentium_iii (2.0x) and pentium4 (1.5x):
     - pentium_m         1.9  (generic fallback)
     - pentium_m_banias  1.9  (2003, 130nm, 1MB L2, max 1.7GHz)
     - pentium_m_dothan  1.8  (2004, 90nm, 2MB L2, up to 2.26GHz)
     - pentium_m_yonah   1.6  (2006, dual-core, first Core/Core Duo)

2. derive_verified_device() gains a new _detect_x86_vintage() helper that
   matches CPU brand strings ("Pentium(R) M", "Pentium III", etc.) and
   returns the correct device_arch BEFORE the function's final fall-through
   to the miner's claimed arch (which is hardcoded to 'modern' for x86).

   Banias vs Dothan is distinguished by clock speed parsed from the brand
   string (Banias maxed at 1.7GHz). Yonah is distinguished by the machine
   field reporting 64-bit-capable. The regex uses \b boundaries and a
   negative lookahead to avoid false-matching e.g. "Apple M4" or
   "AMD K6-2 with MMX support". 15 unit-test cases pass.

The helper also covers PIII / PII / Pentium Pro / Pentium MMX, all of
which had multiplier entries already but no detection path.

Verified end-to-end against IBM ThinkPad T40 (2373-7CU) Banias 1.5GHz
on 2026-05-27: all 7 hardware fingerprint checks PASS, anti-emulation
0 indicators, SSE+SSE2 only (no SSE3), no LM, no NX, 1MB L2.

Fingerprint snapshot (Banias-class reference):
  clock_drift cv:    0.0324
  cache L1/L2/L3:    500.94 / 463.76 / 468.90 ns (no L3 — L2 hits dominate)
  simd flags count:  26 (no AVX, no AltiVec, no NEON)
  thermal drift:     0.9932 (real silicon stability)
  anti_emulation:    0 VM indicators

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added BCOS-L1 Beacon Certified Open Source tier BCOS-L1 (required for non-doc PRs) node Node server related size/M PR: 51-200 lines labels May 27, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 27, 2026

✅ BCOS v2 Scan Results

Metric Value
Trust Score 60/100
Certificate ID BCOS-741b8a59
Tier L1 (met)

BCOS Badge

What does this mean?

The BCOS (Beacon Certified Open Source) engine scans for:

  • SPDX license header compliance
  • Known CVE vulnerabilities (OSV database)
  • Static analysis findings (Semgrep)
  • SBOM completeness
  • Dependency freshness
  • Test infrastructure evidence
  • Review attestation tier

Full report | What is BCOS?


BCOS v2 Engine - Free & Open Source (MIT) - Elyan Labs

@Scottcjn
Copy link
Copy Markdown
Owner Author

@createkr — heads up, this PR adds a new Pentium M antiquity tier (Banias / Dothan / Yonah). Before it merges, your Node 4 (38.76.217.189:8099) appears unreachable from here — all probed TCP ports (443, 8099, 8088, 8080, 22) timed out. Could you confirm the host is up + apply the patch when you have a window?

If you'd like a hands-off rollout, the production-safe patch script that was used on Nodes 1, 2, and POWER8 is below. It's idempotent (re-running is a no-op), backs up both files before modifying, and reverts if the post-edit py_compile fails. Same +85 lines that landed in this PR's diff, applied surgically against the older code on production nodes (avoiding the larger main-branch drift):

# 1. Drop https://gist.github.com/... [or scp from a Scott-controlled box] to /tmp/banias_patch.py on your node
# 2. Dry-run first
python3 /tmp/banias_patch.py --dry-run --base /path/to/your/rustchain
# 3. Apply
python3 /tmp/banias_patch.py --base /path/to/your/rustchain
# 4. Restart your node service (whatever service unit you use)
systemctl restart <your-rustchain-service>
# 5. Verify
curl -s http://localhost:8099/health

What the patch does:

  • rip_200_round_robin_1cpu1vote.py: adds 4 entries (pentium_m, pentium_m_banias, pentium_m_dothan, pentium_m_yonah) between pentium_iii and pentium4.
  • rustchain_v2_integrated_v2.2.1_rip200.py: adds _detect_x86_vintage() helper called from derive_verified_device() before the final return, so vintage Pentium silicon stops falling into the 'modern' (0.8x) bucket.

Happy to send the script via DM/Telegram/whatever channel works best for you. Trigger for this work was an actual 2003 IBM ThinkPad T40 coming online as a RustChain miner today — full fingerprint signature in the PR body.

Copy link
Copy Markdown
Contributor

@jaxint jaxint left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work! Thanks for contributing to RustChain! 🦀

There are TWO multiplier tables in the server: ANTIQUITY_MULTIPLIERS
(in rip_200_round_robin_1cpu1vote.py — covered by the earlier commit
in this PR) AND HARDWARE_WEIGHTS (inline in the server file, used by
enroll_epoch at line 3988 for the actual weight lookup that gets sent
back to the miner).

derive_verified_device correctly returned `pentium_m_banias` for the
T40, but enroll_epoch's lookup against HARDWARE_WEIGHTS["x86"] fell
back to "default" (1.0) — the miner saw "Weight: 1.0x" (multiplied
by epoch ratio) instead of the intended 1.9x.

Fix: mirror the same Pentium M tiers in HARDWARE_WEIGHTS["x86"], plus
add the earlier-Pentium entries (`pentium_iii`/`pentium_ii`/`pentium_pro`/
`pentium_mmx`/`pentium_d`) that _detect_x86_vintage already resolves to
but were also missing from this table.

Live verified on Node 1 server log after deploying the original commit:
  [X86_VINTAGE] Pentium M: brand='intel(r) pentium(r) m processor 1500mhz'
    machine= speed=1500MHz -> x86/pentium_m_banias
  [HW_BIND_V2] OK: t40-thinkpad-banias - authorized
But the response payload still said weight=0.8/1.0 because HARDWARE_WEIGHTS
didn't know about pentium_m_banias. This commit closes that loop.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@Scottcjn
Copy link
Copy Markdown
Owner Author

Session 2026-05-27 series — this PR is one of five related fixes from a single session-arc that started with bringing a 2003 IBM ThinkPad T40 (Pentium M Banias) online as a RustChain miner. Each PR is independently reviewable + mergeable, but they're all the same root pattern: server validation was written for the v2 fingerprint format; the v3 miner uses different field names + locations:

  • #6423 — feat: Pentium M Banias antiquity tier (1.9x in both ANTIQUITY_MULTIPLIERS and HARDWARE_WEIGHTS)
  • #6426 — fix: accept canonical-JSON v3 signature alongside legacy 4-field MAC
  • #6428 — fix: hw-binding extract_entropy_profile accepts v3 field names
  • #6429 — fix: _has_powerpc_cache_profile accepts arch from simd_identity (POWER8 fix)
  • #6430 — scripts: backport settle_fix_prefer_epoch_enroll.py for production nodes behind main

Production deployment status: all five fixes deployed surgically to Node 1 (50.28.86.131), Node 2 (50.28.86.153), and POWER8 (rustchain-node.service on 100.75.100.89). Nodes 3 (Ryan, offline 6d) + 4 (createkr, no access) pending. T40 earning at 1.9x top share in epoch 176 confirming end-to-end fix. POWER8 attestation now passing after #6429.

Copy link
Copy Markdown
Contributor

@crystal-tensor crystal-tensor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Code Review: APPROVED

Summary

Adds Pentium M (Banias/Dothan/Yonah) to antiquity multipliers. Real 2003 IBM ThinkPad T40 was getting modern (0.8x) instead of proper pentium_m (1.9x) tier.

Changes Reviewed

  1. node/rip_200_round_robin_1cpu1vote.py (+11/-1):

    • ✅ Adds 4 Pentium M entries: generic (1.9), Banias (1.9), Dothan (1.8), Yonah (1.6)
    • ✅ Correctly positioned between Pentium III (2.0) and Pentium 4 (1.5)
    • ✅ Yonah lower multiplier (dual-core, 2006, closer to Core architecture)
  2. node/rustchain_v2_integrated_v2.2.1_rip200.py (+82/-1):

    • _detect_x86_vintage(): Brand string detection with regex
      • Pentium M: \bpentium(?:\(r\))?\s+m\b(?!\d) — avoids false-matching "Pentium M4"
      • Clock speed parsing: MHz/GHz from brand string
      • Banias (≤1700MHz, 32-bit) / Dothan (>1700MHz, 32-bit) / Yonah (64-bit)
    • ✅ Also adds Pentium III, II, Pro, MMX detection
    • ✅ Adds matching entries to HARDWARE_WEIGHTS in init_db()
    • ✅ Verified against real ThinkPad T40 hardware

Code Quality

  • ✅ Thorough regex patterns with boundary guards
  • ✅ Hardware-verified multipliers (real ThinkPad T40)
  • ✅ Comprehensive docstring with verification details
  • ✅ Consistent with existing antiquity multiplier structure

Result: APPROVED


Reviewed by QClaw AI Agent
Bounty claim: 3-25 RTC per CONTRIBUTING.md

Scottcjn added a commit that referenced this pull request May 28, 2026
…#6428)

extract_entropy_profile() looked for legacy keys ('L1', 'L2', 'ratio',
'cv' in jitter) but the current v3 fingerprint_checks.py emits 'l1_ns',
'l2_ns', 'drift_ratio', and avg/stdev pairs for jitter (no pre-computed
CV). Result: only 1 of 5 entropy fields was non-zero (just clock_cv,
which happens to use the same key in both formats), every miner running
v3 fingerprint_checks fell below MIN_COMPARABLE_FIELDS=3, and bind_hardware_v2
returned `HARDWARE_BINDING_FAILED:entropy_insufficient` on first attestation.

Server log seen on Node 1:
  [HW_BIND_V2] REJECTED: ralph - entropy_insufficient: {
    'required_nonzero_fields': 3, 'provided_nonzero_fields': 0, ...
  }
  [HW_BIND_V2] REJECTED: t40-thinkpad-banias - entropy_insufficient: {
    'required_nonzero_fields': 3, 'provided_nonzero_fields': 1, ...
  }

Fix: extract_entropy_profile now accepts both naming conventions and derives
jitter CV from the avg/stdev pair when no 'cv' key exists. Legacy format
still works (verified by unit test). Real T40 Pentium M fingerprint now
extracts 5/5 fields cleanly.

Surfaced while validating PRs #6423 (Pentium M Banias tier) and
#6426 (canonical-JSON signature). Together these three fixes restore
end-to-end attestation for v3-miner hosts.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@Scottcjn Scottcjn merged commit e8dea44 into main May 28, 2026
10 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

BCOS-L1 Beacon Certified Open Source tier BCOS-L1 (required for non-doc PRs) node Node server related size/M PR: 51-200 lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants