Skip to content

Commit 0f9e622

Browse files
committed
Rename mtc_worker and mtc_api to bootstrap_mtc_worker and bootstrap_mtc_api, closes #196
Renames both crates and all associated types to distinguish the bootstrap MTC implementation (used for the bootstrap MTC experiment) from the forthcoming 'real' MTC implementation (#197). We'll move shared functionality into a common crate later. Crate renames: - crates/mtc_worker/ → crates/bootstrap_mtc_worker/ - crates/mtc_api/ → crates/bootstrap_mtc_api/ Type and symbol renames in integration_tests: - MtcClient → BootstrapMtcClient - MtcChain → BootstrapMtcChain - make_mtc_chain → make_bootstrap_mtc_chain - mtc_log_name → bootstrap_mtc_log_name - MTC_LOG_NAME → BOOTSTRAP_MTC_LOG_NAME - AddEntryResponse → BootstrapMtcAddEntryResponse - GetCertificateResponse → BootstrapMtcGetCertificateResponse - MtcMetadataResponse → BootstrapMtcMetadataResponse - tests/mtc_api.rs → tests/bootstrap_mtc_api.rs Also adds and updates READMEs: - bootstrap_mtc_api/README.md: new; describes the crate as frozen on the bootstrap protocol (~davidben-09), with a note that the IETF draft renamed 'signatureless' to 'landmark-relative' - bootstrap_mtc_worker/README.md: rewritten; clarifies this is the older bootstrap experiment, not the current IETF draft; uses 'signatureless' terminology; adds integration test instructions - ct_worker/README.md: updates cross-reference to bootstrap_mtc_worker Fixes terminology throughout: - 'MTCA' → 'MTC CA' - 'Merkle Tree CA' / 'Merkle Tree Certificate CA' → 'Merkle Tree Certificates CA' Replaces 'crates/*' workspace members glob with an explicit list to prevent stray crate directories from being inadvertently picked up.
1 parent b127c0c commit 0f9e622

39 files changed

Lines changed: 253 additions & 207 deletions

.github/workflows/integration.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ jobs:
5858
BASE_URL: http://localhost:8787
5959
LOG_NAME: dev2026h1a
6060

61-
integration-mtc:
62-
name: MTC Worker Integration Tests
61+
integration-bootstrap-mtc:
62+
name: Bootstrap MTC Worker Integration Tests
6363
runs-on: ubuntu-latest
6464

6565
steps:
@@ -76,16 +76,16 @@ jobs:
7676
- name: Install worker-build
7777
run: cargo install worker-build@0.7.5 --locked
7878

79-
- name: Build mtc_worker (dev environment, with dev-bootstrap-roots)
80-
working-directory: crates/mtc_worker
79+
- name: Build bootstrap_mtc_worker (dev environment, with dev-bootstrap-roots)
80+
working-directory: crates/bootstrap_mtc_worker
8181
# wrangler.jsonc dev build already includes --features dev-bootstrap-roots
8282
run: DEPLOY_ENV=dev worker-build --release --features dev-bootstrap-roots
8383

8484
# .dev.vars contains the per-log signing and cosigning keys used by
8585
# wrangler dev. These are dev-only keys (not production secrets) and are
8686
# committed to the repository.
8787
- name: Start wrangler dev
88-
working-directory: crates/mtc_worker
88+
working-directory: crates/bootstrap_mtc_worker
8989
run: npx wrangler@4.80.0 -e=dev dev --port 8787 --persist-to .wrangler/state &
9090

9191
- name: Wait for wrangler dev to be ready
@@ -101,8 +101,8 @@ jobs:
101101
echo "wrangler dev failed to start in time"
102102
exit 1
103103
104-
- name: Run MTC integration tests
105-
run: cargo test -p integration_tests --test mtc_api --verbose
104+
- name: Run Bootstrap MTC integration tests
105+
run: cargo test -p integration_tests --test bootstrap_mtc_api --verbose
106106
env:
107107
BASE_URL: http://localhost:8787
108-
MTC_LOG_NAME: dev2
108+
BOOTSTRAP_MTC_LOG_NAME: dev2

AGENTS.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Azul is a Rust workspace implementing tiled Certificate Transparency logs and Me
88

99
```
1010
crates/ct_worker/ - Static CT API Worker (deployable); wrangler.jsonc here
11-
crates/mtc_worker/ - Merkle Tree CA Worker (deployable); wrangler.jsonc here
11+
crates/bootstrap_mtc_worker/ - Bootstrap MTC CA Worker (deployable); wrangler.jsonc here
1212
crates/generic_log_worker/ - Shared Durable Object logic (Sequencer, Batcher, Cleaner)
1313
crates/tlog_tiles/ - C2SP tlog-tiles spec impl (published to crates.io)
1414
crates/static_ct_api/ - C2SP static-ct-api spec impl (published to crates.io)
@@ -27,7 +27,7 @@ cargo bench # run benchmarks (criterion in signed_note)
2727
cargo fuzz run fuzz_parse_tile_path
2828
cargo fuzz run fuzz_parse_checkpoint
2929

30-
# Worker local dev (run from crates/ct_worker/ or crates/mtc_worker/)
30+
# Worker local dev (run from crates/ct_worker/ or crates/bootstrap_mtc_worker/)
3131
npx wrangler -e=dev dev
3232
./reset-dev.sh # clear local wrangler state between runs
3333

@@ -40,12 +40,12 @@ cargo test -p integration_tests --test static_ct_api
4040
# Override defaults:
4141
BASE_URL=http://localhost:8787 LOG_NAME=dev2026h1a cargo test -p integration_tests --test static_ct_api
4242

43-
# MTC worker tests — from crates/mtc_worker/:
43+
# Bootstrap MTC worker tests — from crates/bootstrap_mtc_worker/:
4444
npx wrangler -e=dev dev &
4545
# From workspace root:
46-
cargo test -p integration_tests --test mtc_api
46+
cargo test -p integration_tests --test bootstrap_mtc_api
4747
# Override defaults:
48-
BASE_URL=http://localhost:8787 MTC_LOG_NAME=dev2 cargo test -p integration_tests --test mtc_api
48+
BASE_URL=http://localhost:8787 BOOTSTRAP_MTC_LOG_NAME=dev2 cargo test -p integration_tests --test bootstrap_mtc_api
4949

5050
# Worker deploy
5151
npx wrangler -e=${ENV} deploy
@@ -56,7 +56,7 @@ npx wrangler -e=${ENV} tail
5656

5757
- Worker crates use `crate-type = ["cdylib"]`; library crates use `rlib`
5858
- Worker build is handled by `worker-build`, not `cargo build` directly — wrangler.jsonc invokes it automatically
59-
- Config types live in separate sub-crates: `crates/ct_worker/config/`, `crates/mtc_worker/config/`
59+
- Config types live in separate sub-crates: `crates/ct_worker/config/`, `crates/bootstrap_mtc_worker/config/`
6060
- `DEPLOY_ENV=<env>` env var must be set when invoking `worker-build` manually; wrangler.jsonc sets it per environment
6161
- `der` crate is patched to a private fork in `Cargo.toml` `[patch.crates-io]` — do not remove or alter this
6262

Cargo.lock

Lines changed: 61 additions & 61 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,31 @@
55
# This is needed to avoid pulling in tokio features in wasm targets, due to new features in version 0.0.18 of the `worker` crate
66
# See: https://doc.rust-lang.org/edition-guide/rust-2021/default-cargo-resolver.html#details
77
resolver = "2"
8-
members = ["crates/*", "fuzz"]
8+
members = [
9+
"crates/bootstrap_mtc_api",
10+
"crates/bootstrap_mtc_worker",
11+
"crates/ct_worker",
12+
"crates/generic_log_worker",
13+
"crates/integration_tests",
14+
"crates/length_prefixed",
15+
"crates/sct_validator",
16+
"crates/signed_note",
17+
"crates/signed_note_wasm",
18+
"crates/static_ct_api",
19+
"crates/tlog_tiles",
20+
"crates/tlog_tiles_wasm",
21+
"crates/x509_util",
22+
"fuzz",
23+
]
924
# Exclude integration_tests from the default test run — it requires a live
1025
# wrangler dev instance and will hang if run without one.
1126
# Run explicitly with: cargo test -p integration_tests --test static_ct_api
1227
default-members = [
1328
"crates/ct_worker",
1429
"crates/generic_log_worker",
1530
"crates/length_prefixed",
16-
"crates/mtc_api",
17-
"crates/mtc_worker",
31+
"crates/bootstrap_mtc_api",
32+
"crates/bootstrap_mtc_worker",
1833
"crates/sct_validator",
1934
"crates/signed_note",
2035
"crates/signed_note_wasm",
@@ -70,7 +85,7 @@ jsonschema = "0.30"
7085
length_prefixed = { path = "crates/length_prefixed" }
7186
libfuzzer-sys = "0.4"
7287
log = { version = "0.4" }
73-
mtc_api = { version = "0.2.0", path = "crates/mtc_api" }
88+
bootstrap_mtc_api = { version = "0.2.0", path = "crates/bootstrap_mtc_api" }
7489
p256 = { version = "0.13", features = ["ecdsa"] }
7590
parking_lot = "0.12"
7691
prometheus = "0.14"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[package]
2-
name = "mtc_api"
2+
name = "bootstrap_mtc_api"
33
version.workspace = true
44
authors.workspace = true
55
edition.workspace = true

crates/bootstrap_mtc_api/README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# bootstrap_mtc_api
2+
3+
Core types and logic for the [Bootstrap MTC CA](../bootstrap_mtc_worker/README.md).
4+
5+
This crate implements the bootstrap-specific protocol layer on top of the shared
6+
[`tlog_tiles`](../tlog_tiles/) infrastructure:
7+
8+
- **X.509 bootstrap chain validation** — validates a submitted certificate chain
9+
against a root pool, enforces EKU (`serverAuth`), filters extensions, and
10+
converts the leaf to a `TBSCertificateLogEntry`.
11+
- **`MerkleTreeCertEntry` encoding/decoding** — the binary log entry format
12+
(approximately draft-davidben-tls-merkle-tree-certs-09).
13+
- **`serialize_signatureless_cert`** — constructs the signatureless MTC
14+
certificate from a sequenced log entry, an inclusion proof, and the subscriber's
15+
SPKI. (The IETF draft renamed these to "landmark-relative" certificates.)
16+
- **Landmark sequence** — tracks the active landmark subtrees and their Merkle
17+
roots for inclusion proof generation.
18+
- **Cosigner** — Ed25519-based subtree cosigning over the `mtc-subtree/v1` note
19+
format.
20+
21+
This crate is intentionally frozen at the bootstrap protocol version and will not
22+
be updated to track the IETF draft.
23+
24+
## License
25+
26+
The project is licensed under the [BSD-3-Clause License](./LICENSE).
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -679,10 +679,10 @@ pub fn validate_correspondence(
679679
/// chain must start with a leaf certificate and end with a certificate that
680680
/// is a trusted root or is signed by a trusted root.
681681
/// * `roots` - A certificate pool containing the trusted roots.
682-
/// * `issuer` - The issuer name of the Merkle Tree CA, to replace the issuer in
682+
/// * `issuer` - The issuer name of the MTC CA, to replace the issuer in
683683
/// the bootstrap certificate.
684684
/// * `validity` - A bound on the maximum validity period for the returned
685-
/// Merkle Tree log entry, based on the Merkle Tree CA's parameters. This
685+
/// Merkle Tree log entry, based on the MTC CA's parameters. This
686686
/// bound is further adjusted to ensure that it is covered by the bootstrap
687687
/// chain.
688688
///
File renamed without changes.

0 commit comments

Comments
 (0)