blockd is the mediated storage service for EriX
  • Rust 99.3%
  • Linker Script 0.7%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Erik Inkinen d54a1a6943
All checks were successful
CI / markdown (push) Successful in 6s
CI / test (push) Successful in 28s
Merge branch 'feature/dynlink'
2026-07-23 15:10:44 +03:00
.github Use branch-aware cargo overrides in CI 2026-06-23 18:31:32 +03:00
src Remove temporary blockd reply probes 2026-06-04 08:21:01 +03:00
.editorconfig Initial commit 2026-04-22 04:02:06 +02:00
.gitignore Initial commit 2026-04-22 04:02:06 +02:00
.markdownlint-cli2.yaml Tighten CI markdown policy 2026-05-22 15:09:51 +03:00
ARCHITECTURE.md blockd: avoid pre-receive provider waits 2026-05-29 12:39:29 +03:00
Cargo.toml Remove blockd cross-repo path dependencies 2026-04-22 15:18:54 +03:00
CODE_OF_CONDUCT.md Tighten CI markdown policy 2026-05-22 15:09:51 +03:00
CONTRIBUTING.md Tighten CI markdown policy 2026-05-22 15:09:51 +03:00
LICENSE Initial commit 2026-04-22 04:02:06 +02:00
linker.ld Stabilize block runtime transport 2026-04-22 12:24:27 +03:00
README.md blockd: avoid pre-receive provider waits 2026-05-29 12:39:29 +03:00
ROADMAP.md blockd: avoid pre-receive provider waits 2026-05-29 12:39:29 +03:00
rustfmt.toml Initial commit 2026-04-22 04:02:06 +02:00
SECURITY.md Tighten CI markdown policy 2026-05-22 15:09:51 +03:00

EriX Block Device Daemon (blockd)

blockd is the mediated storage service for the storage stack. It consumes raw block providers from deviced, validates GPT media through lib-partition, and publishes a logical block namespace through lib-block.

EriX is a clean-room, capability-based microkernel operating system written entirely in Rust.

Technical requirements are tracked in the EriX requirements, conventions, and project documentation.

See:

  • docs for design documents, specifications, and development plans.
  • Related architecture repositories for kernel, services, libraries, drivers, and integration tooling.

Purpose of This Repository

This repository implements the EriX block-storage mediation service. Its purpose in EriX is to turn raw block-provider access into a bounded logical block namespace for storage consumers.

Functionally, it validates GPT metadata, publishes whole-disk and partition devices, and translates bounded logical I/O to the active block provider. The repository keeps the implementation, interface contracts, tests, and documentation for that behavior in one reviewable ownership boundary.

The maintained responsibilities are:

  • validate startup authority and bind only to the assigned block-provider endpoint
  • defer provider resolution and GPT namespace publication into the request path instead of blocking the startup frame or starving client calls
  • discover GPT media and publish bounded whole-disk and partition devices
  • translate logical block requests into provider-relative reads and writes
  • reserve enough private runtime stack for the dynamic Phase 4 GPT namespace scan and synchronous provider RPC path
  • keep storage publication deterministic and fail closed on malformed media

Clean-Room Policy

EriX follows a strict clean-room philosophy:

  • No external source code may be copied.
  • No external Rust crates are allowed.
  • No code generation tools that embed third-party code.
  • All code must be authored within the project.

Violations will result in rejection of the contribution.

License

All EriX repositories are licensed under the ISC License.

Development Model

EriX development is modular, deterministic, reproducible, authority-explicit, security-first, and self-hosting oriented.

This repository follows the project roadmap and the validation rules documented in its own roadmap.

Validation

  • cargo fmt --all -- --check
  • strict clippy with warnings as errors
  • standalone crate CI through ../integration/scripts/setup-component-ci-overrides.sh so internal git dependencies resolve from the matching branch head without cross-repo path deps
  • local unit tests for transport framing and GPT publication logic
  • full VM integration through integration storage scenarios
  • Cargo.toml keeps lib-block / lib-partition on branch = "main"; local branch-head validation relies on the generated integration CARGO_HOME overrides instead of cross-repo path dependencies

Dynamic Boot Artifact Evidence

Phase 5.4.37 documents blockd as a dynamic boot artifact. The image build packages the block service daemon as an ELF64 x86_64 ET_DYN executable with .erix_dynlink metadata in the signed dynlink-store and mirrors it under /lib/erix/dynlink with its required shared objects.

Startup remains rootd through procd staged dynamic creation before dynlinkd; authority remains explicit deviced/provider and block HAL peers. Dynamic packaging and filesystem mirror records are evidence and launch inputs only; they do not grant filesystem, loader, object-store, service-discovery, provider-bypass, block-device, or dynlinkd authority. blockd receives only the documented startup endpoints, peers, and capabilities for its role.

Governance Principles

blockd governance is scoped to mediated block-device publication and partition-relative I/O.

The scoped governance rules are:

  • It may publish only devices derived from the startup-supplied block provider and validated partition metadata.
  • It must reject malformed GPT state instead of exposing ambiguous storage authority.
  • It keeps partition translation deterministic and bounded by the discovered device geometry.
  • It treats writes as explicit block authority delegated by deviced, never as ambient disk access.
  • Its widened runtime stack reserve is private execution storage only; it does not grant device, filesystem, or loader authority.

Authority Boundaries

  • blockd receives its service endpoint, the dedicated deviced registration/resolve endpoints, and the transferred provider endpoint.
  • It does not receive broad kernel-control, filesystem-provider, or driver-management authority.
  • deviced registration and provider resolution use bounded IPC timeouts that are shorter than normal provider I/O, so missing-driver appliance boots fail closed without retaining an unbounded block namespace call.
  • Additional block providers require explicit deviced mediation and validation before publication.

Contact

Development occurs in EriX organization and discussions happen in issues and design documents.

No decisions are considered valid without documented rationale.

Maintainers can be reached via email: admin@erikinkinen.fi.