Skip to content

spec(port): trios merkle.rs to specs/port/trios/crates/trios-rainbow-bridge/src/merkle.t27 - #12917

Merged
gHashTag merged 2 commits into
Trinity-S-AI-DNA:masterfrom
dmitrii-f-t27:port/trios-merkle-12573
Nov 3, 2026
Merged

gHashTag merged 2 commits into
Trinity-S-AI-DNA:masterfrom
dmitrii-f-t27:port/trios-merkle-12573

Conversation

@dmitrii-f-t27

Copy link
Copy Markdown
Contributor

Closes #12573

What

Ports crates/trios-rainbow-bridge/src/merkle.rs (gHashTag/trios at 78671ba79482, 103 lines) to specs/port/trios/crates/trios-rainbow-bridge/src/merkle.t27, roadmap stage 6 (goal #4548).

Seven functions under the names the issue lists: MerkleChain_new, MerkleChain_root, MerkleChain_root_hex, MerkleChain_len, MerkleChain_is_empty, MerkleChain_append, hex_encode.

Ported decision, not plumbing

  • MerkleChain_append takes the resulting digest instead of &RainbowEvent: serialising the event and hashing root || bytes with blake3 is the caller's side of the boundary.
  • hex_encode writes into a fixed 64-byte buffer instead of allocating a String: .t27 in this corpus has no allocator, and the chain root is the only caller (line 34).
  • Both deviations are named in the file header.

Acceptance criteria (run from the repository root)

# command result
1 test -f specs/port/trios/crates/trios-rainbow-bridge/src/merkle.t27 present
2 grep of the seven function names 7
3 t27c gen ... | grep -c 'not yet implemented' / | wc -l 0 / 158
4 t27c spec-status ... IMPLEMENTED
5 grep of test blocks 9
6 t27c test-report ... | grep -c BLOCKED 0

t27c test-report: 9 tests, 9 pass, 0 FAIL, 0 vacuous (34+3+3+1+2+64+6+4+5 runtime asserts).

Seal

t27c seal --save produced .trinity/seals/src_port::trios::crates::trios_rainbow_bridge::src::merkle.json:

  • spec_path = specs/port/trios/crates/trios-rainbow-bridge/src/merkle.t27
  • spec_hash = sha256:ab3c433363935a7b20e5b59f6ef1cd7be3925f6ce8b1095f985a6ec3db084b88 (recomputed and matched)
  • tests = {passed: 9, total: 9, failed: 0, vacuous: 0}

Boundary

The spec plus its generated seal. No other spec, no scratch file, no edit to the original.

Not verified

t27c gen-rust output for this spec was not compiled against the trios crate; the generated Rust is not wired into crates/trios-rainbow-bridge by this PR.

@dmitrii-f-t27

Copy link
Copy Markdown
Contributor Author

Red non-required checks: neither is this PR

Required checks are green: validate, check-linked-issue, parse-ratchet, own-language.

Self-check of the diff: two added files (the spec and its seal), nothing else; git status --short on the branch shows exactly those two.

This was referenced Oct 31, 2026
This was referenced Nov 2, 2026
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.

Port gHashTag/trios:crates/trios-rainbow-bridge/src/merkle.rs (Rust, 7 functions) to specs/port/trios/crates/trios-rainbow-bridge/src/merkle.t27

2 participants