Skip to content

[BOUNTY #16257] Test corpus + fuzz harness for node x86/device arch classification#8023

Open
CHY9213 wants to merge 1 commit into
Scottcjn:mainfrom
CHY9213:feat/classification-test-suite
Open

[BOUNTY #16257] Test corpus + fuzz harness for node x86/device arch classification#8023
CHY9213 wants to merge 1 commit into
Scottcjn:mainfrom
CHY9213:feat/classification-test-suite

Conversation

@CHY9213

@CHY9213 CHY9213 commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR adds a comprehensive test corpus and fuzz harness for the node's x86/device architecture classification path, as specified in bounty #16257.

Deliverables

Real-world corpus tests (47 samples total)

Corpus File Samples Coverage
vintage_x86_samples.json 9 i486, Pentium, AMD K6, PII/PIII, Pentium 4, Athlon XP/64, Phenom II
modern_x86_samples.json 10 Sandy Bridge through Raptor Lake, Xeon servers, Ryzen/EPYC, FX
arm_sbc_samples.json 4 RPi4/5, Orange Pi 5, Jetson Nano
powerpc_samples.json 4 G3/G4/G5, AmigaOne
vm_qemu_samples.json 6 QEMU/KVM, VMware, VirtualBox, WSL2, Docker
adversarial_samples.json 14 Spoof payloads (see below)

Adversarial cases (14 samples)

Fuzzing (hypothesis property-based)

  • Random string inputs never crash detect_cpu_architecture()
  • Random string + loyalty values never crash calculate_antiquity_multiplier()
  • No multiplier > 1.0 without vintage evidence (spoof guard)
  • Dict-shaped inputs to arch_cross_validation.validate_arch_consistency() are safe
  • Short/truncated ASCII strings handled
  • Seeded fuzz from corpus brands

CI compatibility

  • Added hypothesis>=6.0.0 to requirements.txt
  • Tests run under pytest tests/ via existing CI
  • Fuzz uses bounded example budget (max_examples=200)

Acceptance criteria

Closes Scottcjn/rustchain-bounties#16257

@CHY9213
CHY9213 requested a review from Scottcjn as a code owner July 20, 2026 08:25
@github-actions github-actions Bot added size/XL PR: 500+ lines documentation Improvements or additions to documentation 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) security Security-related change consensus Consensus/RIP-200 related miner Miner client related wallet Wallet/transfer related node Node server related api API endpoint related tests Test suite changes ci labels Jul 20, 2026
@Scottcjn

Copy link
Copy Markdown
Owner

Thank you for this — it's genuine work and I want to be straight with you about what happened. Bounty #16257 is decided by the first mergeable PR rule. Yours was submitted first, but it's currently in a CONFLICTING state (merge conflict with main), so it wasn't mergeable when the bounty was settled — and guoqiangliu's #8027 was clean and merged. So #16257 went to them.

That's not a knock on your code. If you rebase this onto current main and it's clean, ping me — I keep an eye out for solid contributors, and there's a steady stream of open bounties where being first-and-clean wins. Genuinely hope you stick around. — Sophia, Elyan Labs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api API endpoint related 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) ci consensus Consensus/RIP-200 related documentation Improvements or additions to documentation miner Miner client related node Node server related security Security-related change size/XL PR: 500+ lines tests Test suite changes wallet Wallet/transfer related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BOUNTY: 25 RTC] Test corpus + fuzz harness for node x86/device arch classification (armor around derive_verified_device — NOT the core fix)

2 participants