Skip to content

fix: harden vintage x86 reward validation (bounty #16271) - #8331

Open
rafaio1 wants to merge 1 commit into
Scottcjn:mainfrom
rafaio1:fix/vintage-x86-hardening-complete
Open

fix: harden vintage x86 reward validation (bounty #16271)#8331
rafaio1 wants to merge 1 commit into
Scottcjn:mainfrom
rafaio1:fix/vintage-x86-hardening-complete

Conversation

@rafaio1

@rafaio1 rafaio1 commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Summary

Hardens the vintage x86 reward enrollment path against spoofed arch claims and incomplete brand coverage, as specified in bounty #16271.

Changes

  • _classify_validated_x86_brand(): Expanded anchored regex patterns to cover missing 386/486 variants that were incorrectly rejected after PR fix: harden x86 vintage-arch reward validation (anti-spoof) [fj4WqyCCw3C5ShR1RfB7MoBPTpkRrBFYP1uT35g3MvT] #8087:

    • 386: i386sx, i386dx, am386sx, am386dx
    • 486: i486sx, i486dx, i486dx2, i486dx4, am486dx, am486dx2, am486dx4, ti486sx, ti486dx, ti486dx2, ti486dx4, cyrix cx486s, cyrix cx486dx, cyrix cx486dx2, cyrix cx486dx4, am5x86-wt, am5x86-dx4
  • _derive_enroll_weight_device(): Split the early guard so non-x86 families pass through unchanged but non-vintage claimed arches now clamp to default instead of returning the unmodified device dict. Added a final tail guard ensuring observed_arch is in _X86_VINTAGE_REWARD_ARCHES before returning a tier.

  • Tests: Added 12 adversarial regression tests covering spoofed modern CPUs claiming vintage, honest vintage variant acceptance, brand boundary conditions (Pentium ≠ Pentium Pro), arbitrary arch string injection via oracle, and Pentium M speed edge cases (1700 MHz boundary, missing speed).

All 55 tests pass.

Scope

x86-only. ARM/console allowlist work is tracked separately in #8106.

Closes #16271.

- Expand _classify_validated_x86_brand regex to cover missing 386/486 variants
  (i386sx/dx, am386sx/dx, i486sx/dx/dx2/dx4, am486dx/dx2/dx4, ti486sx/dx/dx2/dx4,
  cyrix cx486s/dx/dx2/dx4, am5x86-wt/dx4)
- Add allowlist guard in _derive_enroll_weight_device: non-vintage claimed arch
  now clamps to default instead of passing through unchanged
- Final tail guard ensures observed_arch is in _X86_VINTAGE_REWARD_ARCHES
- Add 12 adversarial regression tests covering spoofed modern CPUs, honest
  vintage variants, brand boundary conditions, arbitrary arch injection,
  and Pentium M speed edge cases

All 55 tests pass. References Scottcjn#8106 for complementary
ARM/console work.
@rafaio1
rafaio1 requested a review from Scottcjn as a code owner September 3, 2026 06:35
@github-actions github-actions Bot added BCOS-L1 Beacon Certified Open Source tier BCOS-L1 (required for non-doc PRs) BCOS-L2 Beacon Certified Open Source tier BCOS-L2 (required for non-doc PRs) node Node server related tests Test suite changes size/M PR: 51-200 lines labels Sep 3, 2026
@rafaio1

rafaio1 commented Sep 3, 2026

Copy link
Copy Markdown
Contributor Author

This PR addresses bounty #16271 (Harden x86 vintage-arch reward validation). All CI checks passing. Claim active until 2026-09-10. Wallet: RTC1e9bf7a2a60aac9bcbc5a0df0c65e9501e932861. Ready for review.

@rafaio1

rafaio1 commented Sep 3, 2026

Copy link
Copy Markdown
Contributor Author

Friendly ping for review. This PR addresses the vintage x86 anti-spoof validation hardening for bounty #16271. Claim is active until 2026-09-10. All checks passing. Ready for maintainer feedback.

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) BCOS-L2 Beacon Certified Open Source tier BCOS-L2 (required for non-doc PRs) node Node server related size/M PR: 51-200 lines tests Test suite changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant