Skip to content

Commit 82d28a1

Browse files
committed
feat!: multiproof script container codecs for 2.0.0
Remove multiproof 0xd01330 and wacc-script-with-pop 0xd01331. Add multiproof-prover 0xd04000, multiproof-evidence 0xd04001, and multiproof-verifier 0xd04002. Bump the crate version to 2.0.0 and add round-trip tests for the three new codecs.
1 parent 095dc64 commit 82d28a1

5 files changed

Lines changed: 53 additions & 5 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,22 @@ All notable changes to this project are documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
66
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [2.0.0] - 2026-10-15
9+
10+
### Removed
11+
12+
- BREAKING. The `multiproof` codec (`0xd01330`, multiformat). The statement container retired. The self-describing evidence now lives in `multiproof-evidence` (`0xd04001`).
13+
- BREAKING. The `wacc-script-with-pop` codec (`0xd01331`, multiformat). The script container split into `multiproof-prover` (`0xd04000`) and `multiproof-verifier` (`0xd04002`).
14+
15+
### Added
16+
17+
- Three codec entries for the multiproof script containers: `multiproof-prover` (`0xd04000`, multiformat), `multiproof-evidence` (`0xd04001`, multiformat), and `multiproof-verifier` (`0xd04002`, multiformat). The prover and verifier containers carry one wasm component script each. The evidence container carries the ordered attribute table, the proof-specific data, the kind identifier, and the position attributes.
18+
- The `Codec` enum now has 886 variants (up from 885).
19+
20+
### Notes
21+
22+
- This is a major version bump. Removal of previously allocated codec values is a breaking change. Values that carry the removed codes no longer decode to a valid codec.
23+
824
## [1.6.0] - 2026-10-08
925

1026
### Changed
@@ -202,6 +218,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
202218
- Moved `CodecInfo` and `EncodingInfo` to the `multi-util` crate.
203219
- Cleaned up imports and exports.
204220

221+
[2.0.0]: https://github.com/cryptidtech/multi-codec/compare/v1.6.0...v2.0.0
205222
[1.6.0]: https://github.com/cryptidtech/multi-codec/compare/v1.5.0...v1.6.0
206223
[1.1.0]: https://github.com/cryptidtech/multi-codec/compare/v1.0.5...v1.1.0
207224
[1.0.5]: https://github.com/cryptidtech/multi-codec/compare/v1.0.4...v1.0.5

‎Cargo.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "multi-codec"
3-
version = "1.6.0"
3+
version = "2.0.0"
44
edition = "2024"
55
rust-version = "1.99"
66
authors = ["Benjamin Kampmann <ben@gnunicorn.org>", "Dave Grantham <dwg@linuxprogrammer.org>"]

‎src/table_gen.rs‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -867,8 +867,6 @@ build_codec_enum! {
867867
0xd0132e => (XmssSha220256Msig, "xmss-sha2-20-256-msig"),
868868
0xd0132f => (Ed448Msig, "ed448-msig"),
869869
0xd01332 => (XeddsaMsig, "xeddsa-msig"),
870-
0xd01330 => (Multiproof, "multiproof"),
871-
0xd01331 => (WaccScriptWithPop, "wacc-script-with-pop"),
872870
0xd01400 => (BsMessage, "bs-message"),
873871
0xd02000 => (Scion, "scion"),
874872
0xd03000 => (Ed25519ThreshPrivShare, "ed25519-thresh-priv-share"),
@@ -884,4 +882,7 @@ build_codec_enum! {
884882
0xd0300a => (Ed448ThreshPrivShare, "ed448-thresh-priv-share"),
885883
0xd0300b => (Ed448ThreshPubShare, "ed448-thresh-pub-share"),
886884
0xd0300c => (KeySplitShare, "key-split-share"),
885+
0xd04000 => (MultiproofProver, "multiproof-prover"),
886+
0xd04001 => (MultiproofEvidence, "multiproof-evidence"),
887+
0xd04002 => (MultiproofVerifier, "multiproof-verifier"),
887888
}

‎table.csv‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -867,8 +867,6 @@ xmss-sha2-16-256-msig, multisig, 0xd0132d, draft, XMSS
867867
xmss-sha2-20-256-msig, multisig, 0xd0132e, draft, XMSS-SHA2_20_256 signature as Multisig; RFC 8391
868868
ed448-msig, multisig, 0xd0132f, draft, Ed448 (EdDSA) signature as Multisig; RFC 8032
869869
xeddsa-msig, multisig, 0xd01332, draft, XEdDSA signature over an X25519 key
870-
multiproof, multiformat, 0xd01330, draft, Multiproof proof-of-possession object
871-
wacc-script-with-pop, multiformat, 0xd01331, draft, WACC script with proof-of-possession envelope
872870
bs-message, multiformat, 0xd01400, draft, BetterSign signed+encrypted message multiformat
873871
scion, multiaddr, 0xd02000, draft, SCION Internet architecture
874872
ed25519-thresh-priv-share, key, 0xd03000, draft, Ed25519 FROST DKG threshold private key share
@@ -884,3 +882,6 @@ bls12-381-thresh-pub-share, key, 0xd03009, draft, BLS1
884882
ed448-thresh-priv-share, key, 0xd0300a, draft, Ed448 FROST DKG threshold private key share
885883
ed448-thresh-pub-share, key, 0xd0300b, draft, Ed448 FROST DKG threshold public key share
886884
key-split-share, key, 0xd0300c, draft, Generic verifiable private key split share (Feldman VSS or gf256)
885+
multiproof-prover, multiformat, 0xd04000, draft, Multiproof prover (unlock) script container
886+
multiproof-evidence, multiformat, 0xd04001, draft, Multiproof self-describing evidence container
887+
multiproof-verifier, multiformat, 0xd04002, draft, Multiproof verifier (lock) script container

‎tests/integration_tests.rs‎

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,35 @@ fn test_full_encode_decode_cycle() {
4242
assert_eq!(decoded.as_str(), original.as_str());
4343
}
4444

45+
/// Round-trip the multiproof prover, evidence, and verifier codecs through
46+
/// name, code, and byte conversions
47+
#[test]
48+
fn test_multiproof_script_codecs_roundtrip() {
49+
let cases = [
50+
(Codec::MultiproofProver, "multiproof-prover", 0xd04000),
51+
(Codec::MultiproofEvidence, "multiproof-evidence", 0xd04001),
52+
(Codec::MultiproofVerifier, "multiproof-verifier", 0xd04002),
53+
];
54+
55+
for (codec, name, code) in cases {
56+
assert_eq!(codec.code(), code);
57+
assert_eq!(codec.as_str(), name);
58+
59+
// Name lookup finds the codec
60+
assert_eq!(Codec::try_from(name).unwrap(), codec);
61+
62+
// Code lookup finds the codec
63+
assert_eq!(Codec::try_from(code).unwrap(), codec);
64+
65+
// Byte encoding decodes back with no trailing data
66+
let bytes: Vec<u8> = codec.into();
67+
let (decoded, remaining) = Codec::try_decode_from(&bytes).unwrap();
68+
assert_eq!(decoded.code(), code);
69+
assert_eq!(decoded.as_str(), name);
70+
assert_eq!(remaining.len(), 0);
71+
}
72+
}
73+
4574
/// Test conversion chain: name -> codec -> code -> codec -> name
4675
#[test]
4776
fn test_conversion_chain() {

0 commit comments

Comments
 (0)