SPB Git

Repository Public BSD-3-Clause

0007-package-container.md 1.3 KB

# ADR 0007 — .orixmap: a signed container of standard components

Date: 2026-11-25 · Status: accepted

Context. A region is several files (tiles, search index, routing graph, later terrain) that must be downloaded, verified and installed as one unit (§5).

Options. ZIP (path names inside the archive are an attack surface; signature would be an add-on), a tar, or a minimal purpose-built container.

Decision. A 64-byte little-endian header, a JSON manifest, an Ed25519 signature over the manifest bytes, then the components at 4096-byte aligned offsets. The manifest lists each component's offset, length and SHA-256, so the signature covers the whole file. Components are standard formats used as they are after extraction (PMTiles v3, SQLite, .orixgraph). Installed file names come from a fixed table keyed by component id: the package cannot choose a path. The preamble size is known from the first 64 bytes, so a client can fetch and verify the manifest alone by Range.

Measured (Mac M5 Max). Container overhead 4 185 bytes for the Montréal package (221.6 MB); verification 0.08 s, installation 0.13 s, peak memory under 14 MB whatever the package size.

Consequences. Packages are not byte-reproducible (randomized signatures): a published artefact is never overwritten; new data means a new data version.

Files main
Menu

Theme