Skip to content

PR strategy: SeedKeeper + HIL to upstream specter-diy #9

@Amperstrand

Description

@Amperstrand

Overview

Plan for submitting SeedKeeper support and HIL testing to upstream cryptoadvance/specter-diy.

PRs (in order)

PR 1: SeedKeeper keystore (#2)

Branch: feat/seedkeeper (from upstream/master)
Scope: Smartcard-based keystore, no submodule changes
Depends on: Nothing
Status: Needs security fixes (see #4), logging decision

PR 2: HIL testing framework (#3)

Branch: feat/seedkeeper-hil (from PR 1 branch)
Scope: Hardware-in-the-loop test automation
Depends on: PR 1
Status: Internal flash path broken, only works with SeedKeeper card

NOT submitted (low priority)

Bitcoin Core v30 compat (#5)

Alternative: install older Bitcoin Core. Can submit if upstream asks.

Shared-File Challenge

src/specter.py and src/main.py have changes for both SeedKeeper and HIL. Split approach:

specter.py:

  • SeedKeeper PR: select_keystore() rewrite, init_apps() fix, log_exception()
  • HIL PR: HIL listener, heartbeat disable, hil_test_mode import

main.py:

  • SeedKeeper PR: SeedKeeper import + keystores list
  • HIL PR: os.dupterm(None, 0) guard, network = "regtest" override

Pre-Submission Checklist (SeedKeeper PR)

  • Remove entropy hex logging from seedkeeper_applet.py:428
  • Remove exported secret hex logging from seedkeeper_applet.py:339
  • Add MITM risk warning to satochip_securechannel.py docstring
  • Decide on debug_trace.py (include, strip, or gate behind __debug__)
  • Verify MemoryCard still works on simulator after memorycard.py changes
  • Run all tests (native 5/5, micropython 30/31, integration 16/16)

Branch Workflow

upstream/master
    ├── feat/seedkeeper          ← PR 1
    │       └── feat/seedkeeper-hil  ← PR 2
    └── seedkeeper-debug         ← working branch (satochip-dev)

Submodule Policy

Our PRs do NOT touch any submodule. The USART T=1 reconfig (#1) is a separate issue for diybitcoinhardware/f469-disco.

Metadata

Metadata

Assignees

No one assigned

    Labels

    hilHardware-in-the-loop testingpriority: highMust fix or address before mergeseedkeeperSeedKeeper keystore supportupstream-prCandidate for upstream PR

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions