Skip to content

feat: machine passport ledger and viewer (issue #2309)#1768

Open
createkr wants to merge 1 commit intoScottcjn:mainfrom
createkr:feat/issue2309-machine-passport-ledger
Open

feat: machine passport ledger and viewer (issue #2309)#1768
createkr wants to merge 1 commit intoScottcjn:mainfrom
createkr:feat/issue2309-machine-passport-ledger

Conversation

@createkr
Copy link
Contributor

Summary

Implements machine passport ledger capabilities with API + viewer support so each relic machine can carry a persistent biography and attestation-linked history.

Deliverables

  • Machine passport data model + migration
  • Passport API endpoints and update flow
  • Passport viewer support for web surface
  • Dedicated tests and implementation docs

Validation

  • python3 -m pytest -q --noconftest node/tests/test_machine_passport.py
  • Result: 24 passed

Closes #2309

— Give Every Relic a Biography

Core Implementation (70 RTC):
- Machine passport data structure with hardware fingerprint, name, architecture, provenance
- Repair history tracking with parts, technician, cost in RTC
- Attestation history with epochs, RTC earned, entropy scores
- Benchmark signatures (cache timing, SIMD, thermal, performance)
- Lineage notes for ownership transfers and acquisition stories
- RESTful API with full CRUD endpoints
- Web viewer with CRT/vintage computer aesthetic at /passport/<id>
- CLI tool for passport management
- Database schema with 5 tables and indexes
- Migration script for existing nodes

Bonus Features (20 RTC):
- PDF generation with vintage computer styling
- QR code generation linking to on-chain passport

Files:
- node/machine_passport.py (974 lines) — Core data model and ledger
- node/machine_passport_api.py (623 lines) — REST API endpoints
- node/machine_passport_viewer.py (680 lines) — Web viewer with CRT aesthetic
- node/migrate_machine_passport.py (194 lines) — Migration script
- node/tests/test_machine_passport.py (657 lines) — 24 comprehensive tests
- bounties/issue-2309/README.md (555 lines) — Complete documentation
- bounties/issue-2309/IMPLEMENTATION_SUMMARY.md (367 lines) — Implementation summary

Total: 4,050 lines of code + documentation

Validation:
- 24/24 tests passing
- All acceptance criteria met
- Ready for production deployment

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
@github-actions github-actions bot added documentation Improvements or additions to documentation BCOS-L1 Beacon Certified Open Source tier BCOS-L1 (required for non-doc PRs) node Node server related tests Test suite changes labels Mar 22, 2026
@github-actions github-actions bot added the size/XL PR: 500+ lines label Mar 22, 2026
@createkr
Copy link
Contributor Author

RTC payout wallet: RTC1d48d848a5aa5ecf2c5f01aa5fb64837daaf2f35

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) documentation Improvements or additions to documentation node Node server related size/XL PR: 500+ lines tests Test suite changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant