Skip to content

Conversation

@bamontejano
Copy link

This PR implements Milestone 1 of Issue #30, which covers the vanity wallet generation and agent-hardware binding logic.

The solution uses Bash and OpenSSL 3.0 to deterministically link the Agent ID (doctorbot) and its Hardware Fingerprint (HFP) to a unique Ed25519 keypair and a vanity RTC address (e.g., RTC-doctorbot-a91fe7).

Details and generated artifacts are available in the new agents/doctorbot/ directory.

Ready for review and payment of 50 RTC (Milestone 1).

Copy link
Contributor

@mgrigajtis mgrigajtis left a comment

Choose a reason for hiding this comment

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

High-level: good direction, but this PR isn’t yet safe/reproducible as written. A few blocking issues and several fixes that will improve determinism + security.

MAJOR ISSUES (likely blockers)

  1. agents/doctorbot/register.sh hard-codes author-specific paths:

    • HFP=$(cat /home/bamontejano/.../hardware_dna.txt)
    • WORK_DIR="/home/bamontejano/..."
      This won’t run for anyone else. Suggest: accept args (e.g., --hfp-file, --work-dir) or derive the HFP from a standard location.
  2. The script claims deterministic binding but isn’t deterministic:

    • You compute SEED = sha256(agent+hfp) but then generate a fresh Ed25519 keypair (openssl genpkey) without using the seed.
      Either remove the “deterministic” framing, or implement seeded key derivation with a tool that supports it.
  3. node/agent_registration.py imports nacl.signing.VerifyKey but verify_agent_proof is a stub that returns True for any non-empty signature.

    • At minimum: remove the unused import, or wire real Ed25519 verification (and add dependency + tests).
    • As written, this creates a false sense of security: any non-empty signature passes.
  4. Naming/API mismatch: you added /api/register_agent, but the broader ecosystem messaging uses POST /api/register in other places. If /api/register_agent is intentional, please document it and keep naming consistent.

SECURITY / ROBUSTNESS NOTES

  • agent_name.isalnum() forbids underscores/hyphens (fine if desired), but doesn’t normalize case. Consider lowercasing for address derivation to avoid duplicates.
  • Address derivation uses only the first 6 hex chars (~24 bits). That’s collision-prone. Prefer a longer suffix.
  • serial can be null/None -> compute_serial_hash likely breaks; validate required fields early.

REQUEST
If possible, split into two PRs:

  • PR A: portable CLI script + docs
  • PR B: server endpoint + DB table + real proof verification

Happy to re-review once the hardcoded paths and determinism/proof pieces are addressed.

@Scottcjn
Copy link
Owner

Closing for now: partial milestone with stubs/hardcoded local paths is not merge-ready.

Please keep participating. To be payout-eligible on resubmission:

  1. Map directly to an active bounty issue and claim in that thread
  2. Submit focused, non-duplicate changes
  3. Include working proof (logs/screenshots/test notes)
  4. Keep PR merge-ready (clean diff, no encoding regressions, no placeholder code)

Good active options right now: #99 (challenge), #100 (discovery), #102 (capability), #103 (social), #124 (profile micro-bounty).

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants