mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-10-06 11:48:24 +00:00
Stage 0 of the Marmot resync: get a live reference back, so the later stages are written against real bytes instead of a careful reading of the spec. The vector generator pinned stock crates.io openmls 0.8. MDK builds against erskingardner/openmls with the `extensions-draft` feature, and the whole current Marmot profile is expressed in terms of what that feature adds — app_data_dictionary (0x0006), app_components (0x0001), safe_aad (0x0002), app_data_update (0x0008). Vectors from the published crate cannot reach any of it. Pinned to MDK's exact rev instead. Adds `marmot-profile-gen`, which builds a group the way cgka-engine does: required capabilities of extension 0x0006 plus proposal 0x0008; GroupContext dictionary carrying the required-component list, group profile, admin policy, Nostr routing and lifecycle; per-leaf dictionaries carrying the supported list, an empty safe_aad list and the 104-byte account-identity-proof v2 component; last resort as the empty-data 0x0004 component in the KeyPackage dictionary, not an extension type; PublicMessage handshakes. It emits the Add commit, the Welcome, and exporter KATs for both group-event and the conformance commitment. The identity-proof encoder is hand-rolled from the spec rather than lifted from MDK, and asserts itself against the fixture published in account-identity-proof-v2.md before emitting anything — so if the generator runs at all, the kind-450 canonical serialization, its id, the BIP-340 signature and the component layout are known to match. The interop harness cloned marmot-protocol/whitenoise-rs, which was archived on 2026-08-05 pinned to mdk-core 0.8.0: it was testing us against a frozen MIP-era client, which is part of how the drift went unnoticed. Repointed at marmot-protocol/mdk, building -p wn-cli. Both source patches are dropped — mock-keyring is replaced by MDK's native --secret-store file, and skip-unprocessable-retry targeted a path MDK does not have. The daemon socket is now pinned via wnd --socket rather than guessed from a derived default. The harness changes are read off MDK's DaemonArgs and wn-cli manifest, not off a passing run; building MDK's workspace needs its pinned toolchain and a local relay. A human run of marmot-interop-headless.sh is the acceptance test. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016kCuA6tc4JQzHPCDd39GHq
42 lines
1.8 KiB
TOML
42 lines
1.8 KiB
TOML
[package]
|
|
name = "mdk-vector-gen"
|
|
version = "0.1.0"
|
|
edition = "2021"
|
|
|
|
[dependencies]
|
|
# Pinned to the exact OpenMLS fork + rev MDK builds against, with the
|
|
# `extensions-draft` feature that carries draft-ietf-mls-extensions
|
|
# `app_data_dictionary` / `app_components` / `app_data_update`. Marmot's current
|
|
# profile is defined in those terms, so vectors generated from stock crates.io
|
|
# openmls cannot exercise it. Keep this rev in lockstep with mdk's root
|
|
# Cargo.toml -- a drift here silently generates vectors for the wrong wire shape.
|
|
openmls = { git = "https://github.com/erskingardner/openmls.git", rev = "59e7d3b27a7e95237879dd5478de1fd90eff7ada", features = ["test-utils", "extensions-draft"] }
|
|
openmls_rust_crypto = { git = "https://github.com/erskingardner/openmls.git", rev = "59e7d3b27a7e95237879dd5478de1fd90eff7ada" }
|
|
openmls_basic_credential = { git = "https://github.com/erskingardner/openmls.git", rev = "59e7d3b27a7e95237879dd5478de1fd90eff7ada", features = ["test-utils"] }
|
|
openmls_memory_storage = { git = "https://github.com/erskingardner/openmls.git", rev = "59e7d3b27a7e95237879dd5478de1fd90eff7ada", features = ["persistence", "extensions-draft"] }
|
|
openmls_traits = { git = "https://github.com/erskingardner/openmls.git", rev = "59e7d3b27a7e95237879dd5478de1fd90eff7ada", features = ["extensions-draft"] }
|
|
tls_codec = "0.5"
|
|
hex = "0.4"
|
|
serde_json = "1"
|
|
serde = { version = "1", features = ["derive"] }
|
|
base64 = "0.22"
|
|
env_logger = "0.11"
|
|
secp256k1 = { version = "0.31", features = ["std", "global-context"] }
|
|
sha2 = "0.10"
|
|
|
|
[[bin]]
|
|
name = "mdk-vector-gen"
|
|
path = "src/main.rs"
|
|
|
|
[[bin]]
|
|
name = "marmot-profile-gen"
|
|
path = "src/marmot_profile_gen.rs"
|
|
|
|
[[bin]]
|
|
name = "emit-joiner-kp"
|
|
path = "src/emit_joiner_kp.rs"
|
|
|
|
[[bin]]
|
|
name = "verify-amethyst"
|
|
path = "src/verify_amethyst.rs"
|