Commit graph

6 commits

Author SHA1 Message Date
97a9434106 genesis Ed25519 verification — working against live mainnet + preprod
- verify package: ComputeProtocolMessageHash mirrors Rust's BTreeMap-ordered
  SHA256 over key||value concatenation (enum declaration order, not alpha)
- DecodeGenesisVerifyKey unpacks Mithril's 'hex of ASCII [b0,b1,...,b31]'
  wrapping convention; also accepts plain 64-char hex
- Genesis() verifies the Ed25519 signature over the ASCII BYTES of the
  signed_message HEX string (critical subtlety from upstream)
- networks: real genesis vkeys for mainnet + preprod + preview from
  mithril-infra/configuration/*/genesis.vkey
- cmd: 'verify genesis' walks head→genesis chain, verifies the terminal cert;
  'verify head' and 'verify <hash>' also wired; JSON output supported
- exit codes honored: 3 network, 4 integrity, 5 bad sig

verified:
  mainnet  genesis cert 25acfcfe…  epoch 539  Ed25519 ✓
  preprod  genesis cert 69bc3bdf…  epoch 196  Ed25519 ✓

next: STM BLS12-381 aggregate verification (the big one)
2026-04-23 15:33:41 -07:00
326d75d91a json output + stable exit codes (M2M / LLM contract)
- -json on info, list, show, cert (+ -chain): emit structured JSON ready
  for jq / agent consumption
- exit codes are now stable + documented: 0/1/2/3/4/5/130 with distinct
  meanings for network vs integrity vs signature failures
- help text enumerates the contract
- readme: machine-usage section explains both

MCP stdio server (for Claude Code / Cursor etc.) planned, not wired yet
2026-04-23 15:25:09 -07:00
4ea5635bf6 readme: reflect actual status + document verification sprint plan
- status table: what's working vs what's next
- sprint plan for genesis Ed25519 (wiring) and STM BLS (the real work)
- concrete pointers: upstream mithril-common for signed_message derivation,
  blst Go bindings for BLS12-381
2026-04-23 15:21:21 -07:00
f897e80c95 certificate chain walker + progress bar fix
- aggregator.CertChain: walks previous_hash from head until genesis_signature
- cmd: 'cert' subcommand, -chain flag for full walk, 'head' shortcut resolves
  latest snapshot's certificate_hash
- ProgressFn now signals both bytes-read and total-from-Content-Length so
  percent is computed against the actual transfer size, not the uncompressed
  target
- verified against preprod: 90-cert chain head→genesis, Ed25519 genesis cert
  shape (64-byte sig over 32-byte signed_message, protocol_message carries
  next_aggregate_verification_key for BLS), STM-signed non-genesis certs

pipeline is now verification-sprint ready
2026-04-23 15:20:32 -07:00
e557d85d5a download + extract pipeline
- artifact.Download: resumable HTTP with optional SHA256 check + progress cb
- artifact.ExtractZstdTar: streamed zstd+tar with tar-slip defense
- aggregator client matches real API shape (digests/immutables/ancillary blocks
  with URIHolder polymorphism for templated immutable URIs)
- cmd: show + download subcommands wired up
- end-to-end verified against preprod: digests archive pulls cleanly, yields
  16836-entry SHA manifest ready for verification sprint

deps: github.com/klauspost/compress (pure-go zstd)
2026-04-23 15:16:48 -07:00
f87b7fc3c4 initial scaffold
- module layout: cmd/mithril-go, internal/{aggregator,artifact,verify,networks}
- aggregator REST client, list command working against mainnet
- download/extract/verify stubbed
- no deps yet, pure stdlib
2026-04-23 15:12:39 -07:00