Documentation
¶
Overview ¶
Package malt exposes the application-neutral MALT core facade.
The facade is intentionally small. Application layouts translate their domain operations into typed map/list queries and semantic mutations, while runtime state placement, ArcTable namespaces, HTTP transport, and payload CAS access remain outside the caller-visible contract.
Index ¶
- Constants
- Variables
- func IsQueryNotFound(err error) bool
- func VerifyRead(ctx context.Context, req ReadRequest, result ReadResult, ...) error
- type Engine
- type EngineOptions
- type ListReader
- type MapReader
- type MeasuredListReader
- type Mutation
- type MutationApplier
- type ProofVerifier
- type Query
- type QueryKind
- type ReadRequest
- type ReadResult
- type Reader
- type SegmentPath
- type WriteResult
Constants ¶
const PathSeparator = "/"
PathSeparator is the canonical textual separator for MALT segment paths. Transports may carry segments without using this textual projection.
Variables ¶
var ( // ErrInvalidQuery is returned when a typed query is incomplete or malformed. ErrInvalidQuery = errors.New("invalid MALT query") // ErrQueryNotFound is returned when a query has no authenticated target. ErrQueryNotFound = errors.New("MALT query target not found") // ErrVerifierRejected is returned when proof verification returns false. ErrVerifierRejected = errors.New("MALT verifier rejected read result") // with the capability required by an operation. ErrCapabilityUnavailable = errors.New("MALT engine capability is unavailable") )
Functions ¶
func IsQueryNotFound ¶
IsQueryNotFound reports whether err represents an unauthenticated or absent query target.
func VerifyRead ¶
func VerifyRead(ctx context.Context, req ReadRequest, result ReadResult, verifier ProofVerifier) error
VerifyRead validates the complete verifier-facing read contract.
Types ¶
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
Engine composes typed MALT read, mutation, and verification operations. The engine is untrusted execution state; callers accept results only after VerifyRead succeeds against their trusted root.
func NewEngine ¶
func NewEngine(opts EngineOptions) (*Engine, error)
NewEngine creates a reusable MALT execution facade.
func (*Engine) Apply ¶
Apply applies a semantic mutation through the configured execution plane. Runtime scope is supplied by Engine and is not part of the canonical request.
func (*Engine) Read ¶
func (e *Engine) Read(ctx context.Context, req ReadRequest) (ReadResult, error)
Read proves one typed arc query under a caller-supplied root.
func (*Engine) VerifyRead ¶
func (e *Engine) VerifyRead(ctx context.Context, req ReadRequest, result ReadResult) error
VerifyRead binds the caller's trusted root, typed query, returned target, and ProofList before delegating cryptographic checks to a portable verifier.
type EngineOptions ¶
type EngineOptions struct {
Scope string
Maps MapReader
Lists ListReader
Writer MutationApplier
Verifier ProofVerifier
}
EngineOptions supplies execution-plane implementations while keeping their storage scope outside canonical queries and mutations.
type ListReader ¶
type ListReader interface {
Prove(context.Context, string, cid.Cid, uint64) (list.Query, structure.Proof, error)
}
ListReader is the minimum execution-plane capability needed to authenticate one stable list position.
type MapReader ¶
type MapReader interface {
Prove(context.Context, string, cid.Cid, arcset.Path) (mapping.Binding, structure.Proof, error)
}
MapReader is the minimum execution-plane capability needed to authenticate one keyed relation. Stateful map implementations satisfy it without exposing their commit or mutation methods through Engine. Implementations must wrap mapping.ErrPathNotFound when the requested binding is absent.
type MeasuredListReader ¶
type MeasuredListReader interface {
ListReader
ProveRange(context.Context, string, cid.Cid, uint64, *uint64) (list.RangeResult, structure.Proof, error)
}
MeasuredListReader extends ListReader with authenticated byte ranges.
type Mutation ¶
type Mutation = writer.SemanticMutation
Mutation is the current v0alpha1 semantic mutation contract. Runtime state placement is deliberately absent; Engine supplies its configured scope.
type MutationApplier ¶
type MutationApplier interface {
Apply(context.Context, string, writer.SemanticMutation) (writer.WriteReceipt, error)
}
MutationApplier is the minimum execution-plane write capability consumed by Engine. The engine supplies placement scope separately from the mutation.
type ProofVerifier ¶
type ProofVerifier interface {
VerifyProofList(context.Context, prooflist.ProofList) (bool, error)
}
ProofVerifier is the portable verifier surface consumed by the core facade. Implementations must not require ArcTable, CAS, server, or daemon state.
type Query ¶
Query is a single typed arc query. Multi-step application traversal is composed by layouts from these primitive map/list operations.
func ListIndexQuery ¶
ListIndexQuery creates a stable-indexed list query.
func ListRangeQuery ¶
ListRangeQuery creates a measured-list range query over [start, end). A nil end means the authenticated total size.
func MapKeyQuery ¶
MapKeyQuery creates an exact keyed-map query.
type ReadRequest ¶
ReadRequest binds a typed query to a caller-supplied trusted root.
type ReadResult ¶
ReadResult is the verifier-facing result of one typed query. Target is the authenticated relation target. Segments is populated only for measured-list ranges and remains ordered as authenticated by ProofList.
type Reader ¶
type Reader interface {
Read(context.Context, ReadRequest) (ReadResult, error)
}
Reader is the application-neutral root-relative read port.
type SegmentPath ¶ added in v0.0.4
type SegmentPath struct {
// contains filtered or unexported fields
}
SegmentPath is an immutable application-neutral sequence of MALT path segments. Applications and transports decide how their own path syntax maps to segments; MALT owns the canonical segment-to-arc projection.
func NewSegmentPath ¶ added in v0.0.4
func NewSegmentPath(segments []string) (SegmentPath, error)
NewSegmentPath validates and clones a segment sequence. Segments are non-empty UTF-8 strings and must not contain the canonical separator.
func ParseSegmentPath ¶ added in v0.0.4
func ParseSegmentPath(raw string) (SegmentPath, error)
ParseSegmentPath parses the canonical textual projection used by the reference slash-path adapters. The empty string denotes the root path.
func (SegmentPath) Consume ¶ added in v0.0.4
func (p SegmentPath) Consume(prefix SegmentPath) (SegmentPath, bool)
Consume removes a segment-aligned prefix.
func (SegmentPath) Empty ¶ added in v0.0.4
func (p SegmentPath) Empty() bool
Empty reports whether the path denotes the caller-supplied root.
func (SegmentPath) HasPrefix ¶ added in v0.0.4
func (p SegmentPath) HasPrefix(prefix SegmentPath) bool
HasPrefix reports whether prefix is a segment-aligned prefix of p.
func (SegmentPath) Segments ¶ added in v0.0.4
func (p SegmentPath) Segments() []string
Segments returns a cloned segment slice.
func (SegmentPath) String ¶ added in v0.0.4
func (p SegmentPath) String() string
String returns the canonical textual projection.
type WriteResult ¶
type WriteResult = writer.WriteReceipt
WriteResult is the current v0alpha1 result-root receipt.
Directories
¶
| Path | Synopsis |
|---|---|
|
api
|
|
|
http
Locked path stat/content HTTP semantics.
|
Locked path stat/content HTTP semantics. |
|
Package artifact defines the transport-neutral, versioned MALT artifacts shared by resolvers, provers, verifiers, gateways, daemons, and SDKs.
|
Package artifact defines the transport-neutral, versioned MALT artifacts shared by resolvers, provers, verifiers, gateways, daemons, and SDKs. |
|
auth
|
|
|
arcset
Package arcset defines interfaces for arc set views.
|
Package arcset defines interfaces for arc set views. |
|
commitment
Package commitment defines cryptographic commitment interfaces.
|
Package commitment defines cryptographic commitment interfaces. |
|
commitment/ipa
Package ipa provides an IPA (Inner Product Argument) commitment backend.
|
Package ipa provides an IPA (Inner Product Argument) commitment backend. |
|
commitment/kzg
Package kzg provides a KZG polynomial commitment backend.
|
Package kzg provides a KZG polynomial commitment backend. |
|
proof/evidence
Package evidence defines the Evidence interface and its implementations.
|
Package evidence defines the Evidence interface and its implementations. |
|
proof/prooflist
Package prooflist defines the verifier-facing read proof transcript shape.
|
Package prooflist defines the verifier-facing read proof transcript shape. |
|
semantic
Package structure defines the public structural semantics layer for MALT.
|
Package structure defines the public structural semantics layer for MALT. |
|
semantic/list
Package list defines the public stable-indexed list semantic for MALT.
|
Package list defines the public stable-indexed list semantic for MALT. |
|
semantic/mapping
Package mapping defines the public keyed-map semantic for MALT.
|
Package mapping defines the public keyed-map semantic for MALT. |
|
verifier
Package verifier contains verifier-critical helpers for auth proof artifacts.
|
Package verifier contains verifier-critical helpers for auth proof artifacts. |
|
cmd
|
|
|
cas
command
Command cas starts a standalone mock CAS HTTP server.
|
Command cas starts a standalone mock CAS HTTP server. |
|
eval/command
Package command assembles the unified MALT evaluation CLI.
|
Package command assembles the unified MALT evaluation CLI. |
|
eval/helper/adapters/hamt
Package hamt configures the IPLD UnixFS HAMT baseline adapter.
|
Package hamt configures the IPLD UnixFS HAMT baseline adapter. |
|
eval/helper/adapters/maltflat
Package maltflat replays Git mutations into a flat MALT path-to-blob map.
|
Package maltflat replays Git mutations into a flat MALT path-to-blob map. |
|
eval/helper/adapters/merkledag
Package merkledag replays Git snapshots into IPLD UnixFS Merkle DAGs.
|
Package merkledag replays Git snapshots into IPLD UnixFS Merkle DAGs. |
|
eval/helper/evalcas
Package evalcas provides eval-specific CAS instances with precise, jitter-free latency.
|
Package evalcas provides eval-specific CAS instances with precise, jitter-free latency. |
|
eval/helper/evalmetrics
Package evalmetrics provides daemon evaluation metrics commands.
|
Package evalmetrics provides daemon evaluation metrics commands. |
|
eval/helper/evalread
Package evalread provides the read-latency evaluation command.
|
Package evalread provides the read-latency evaluation command. |
|
eval/helper/evalrun
Package evalrun provides evaluation plan runner commands.
|
Package evalrun provides evaluation plan runner commands. |
|
eval/helper/evalschema
Package evalschema exposes evaluator JSON schemas through the CLI.
|
Package evalschema exposes evaluator JSON schemas through the CLI. |
|
eval/helper/evalsuites
Package evalsuites assembles the suite registry used by malt-eval run.
|
Package evalsuites assembles the suite registry used by malt-eval run. |
|
eval/helper/evalsummary
Package evalsummary provides the evaluation summary command.
|
Package evalsummary provides the evaluation summary command. |
|
eval/helper/evalwrite
Package evalwrite provides the Git trace write-amplification evaluation command.
|
Package evalwrite provides the Git trace write-amplification evaluation command. |
|
eval/helper/git
Package git extracts deterministic commit-mutation traces from Git repos.
|
Package git extracts deterministic commit-mutation traces from Git repos. |
|
eval/helper/replay
Package replay defines write-amplification replay contracts and JSONL output.
|
Package replay defines write-amplification replay contracts and JSONL output. |
|
eval/helper/store
Package store provides per-system evaluation storage and write accounting.
|
Package store provides per-system evaluation storage and write accounting. |
|
eval/internal/baseline/indexedmap
Package indexedmap implements the canonical-path ordered baseline map semantic for eval comparison.
|
Package indexedmap implements the canonical-path ordered baseline map semantic for eval comparison. |
|
eval/internal/compat/hamt
Package hamt implements the Step interface for HAMT (Hash Array Mapped Trie).
|
Package hamt implements the Step interface for HAMT (Hash Array Mapped Trie). |
|
eval/internal/compat/implicit
Package implicit implements the Step interface for Merkle-DAG traversal.
|
Package implicit implements the Step interface for Merkle-DAG traversal. |
|
eval/internal/compat/implicit/codec
Package codec defines the IPLD codec interface for parsing blocks and extracting links.
|
Package codec defines the IPLD codec interface for parsing blocks and extracting links. |
|
eval/internal/compat/implicit/dagcbor
Package dagcbor implements the dag-cbor IPLD codec.
|
Package dagcbor implements the dag-cbor IPLD codec. |
|
eval/internal/compat/implicit/dagjson
Package dagjson implements the dag-json IPLD codec.
|
Package dagjson implements the dag-json IPLD codec. |
|
eval/internal/compat/implicit/dagpb
Package dagpb implements the dag-pb (Protocol Buffers) IPLD codec.
|
Package dagpb implements the dag-pb (Protocol Buffers) IPLD codec. |
|
eval/internal/eval/readbench
Package readbench provides read benchmark runners for MALT and IPLD UnixFS baselines.
|
Package readbench provides read benchmark runners for MALT and IPLD UnixFS baselines. |
|
eval/internal/eval/suites/casmodel
Package casmodel measures the local CAS mock under fixed latency models.
|
Package casmodel measures the local CAS mock under fixed latency models. |
|
eval/internal/eval/suites/configjson
Package configjson decodes evaluation suite config JSON consistently.
|
Package configjson decodes evaluation suite config JSON consistently. |
|
eval/internal/eval/suites/flatindexcardinality
Package flatindexcardinality runs flat full-path index benchmarks across MALT flat authenticated arcs and IPFS/Boxo HAMT keyed by complete logical paths.
|
Package flatindexcardinality runs flat full-path index benchmarks across MALT flat authenticated arcs and IPFS/Boxo HAMT keyed by complete logical paths. |
|
eval/internal/eval/suites/proofoverhead
Package proofoverhead measures local commit/prove/verify costs for semantic structures.
|
Package proofoverhead measures local commit/prove/verify costs for semantic structures. |
|
eval/internal/eval/suites/readdepthsweep
Package readdepthsweep measures resolve latency across different directory depths.
|
Package readdepthsweep measures resolve latency across different directory depths. |
|
eval/internal/eval/suites/readlatencysweep
Package readlatencysweep measures resolve latency across different CAS latency values.
|
Package readlatencysweep measures resolve latency across different CAS latency values. |
|
eval/internal/eval/suites/readmatrix
Package readmatrix runs fair resolve-path benchmarks across flat MALT, UnixFS Merkle DAG, UnixFS HAMT directories, and flat full-path HAMT using one shared logical source dataset.
|
Package readmatrix runs fair resolve-path benchmarks across flat MALT, UnixFS Merkle DAG, UnixFS HAMT directories, and flat full-path HAMT using one shared logical source dataset. |
|
eval/internal/eval/suites/readquery
Package readquery adapts the read benchmark runner to the evaluation framework.
|
Package readquery adapts the read benchmark runner to the evaluation framework. |
|
eval/internal/eval/suites/storageoverhead
Package storageoverhead measures persisted and logical storage overhead.
|
Package storageoverhead measures persisted and logical storage overhead. |
|
eval/internal/eval/suites/writetrace
Package writetrace runs Git write-trace replay as an eval framework suite.
|
Package writetrace runs Git write-trace replay as an eval framework suite. |
|
eval/internal/eval/summary
Package summary converts framework raw result envelopes into figure CSVs.
|
Package summary converts framework raw result envelopes into figure CSVs. |
|
eval/malt-eval
command
Package main provides the unified MALT evaluation CLI.
|
Package main provides the unified MALT evaluation CLI. |
|
eval/schemas
Package schemas embeds the evaluator JSON schemas for installed binaries.
|
Package schemas embeds the evaluator JSON schemas for installed binaries. |
|
internal/merkledagimport
Package merkledagimport imports local UnixFS data into an IPFS-style Merkle DAG.
|
Package merkledagimport imports local UnixFS data into an IPFS-style Merkle DAG. |
|
malt
command
Package main provides the primary MALT CLI.
|
Package main provides the primary MALT CLI. |
|
Package config provides configuration loading and persistence for MALT.
|
Package config provides configuration loading and persistence for MALT. |
|
Package daemon hosts the shared local daemon bootstrap used by CLI entrypoints.
|
Package daemon hosts the shared local daemon bootstrap used by CLI entrypoints. |
|
querypath
Package querypath implements locked path canonicalization for stat and content APIs.
|
Package querypath implements locked path canonicalization for stat and content APIs. |
|
resolver
Package resolver implements the MALT explicit-arc resolution loop with prefix consumption.
|
Package resolver implements the MALT explicit-arc resolution loop with prefix consumption. |
|
resolver/step
Package step defines the Step interface for single-step resolution.
|
Package step defines the Step interface for single-step resolution. |
|
resolver/step/explicit
Package explicit implements the Step interface for MALT explicit arcs.
|
Package explicit implements the Step interface for MALT explicit arcs. |
|
verifier
Package verifier preserves the graph-runtime verifier constructor while delegating proof checks to the portable authentication kernel.
|
Package verifier preserves the graph-runtime verifier constructor while delegating proof checks to the portable authentication kernel. |
|
writer
Package writer implements graph semantic mutations.
|
Package writer implements graph semantic mutations. |
|
layout
|
|
|
unixfs
Package unixfs implements a MALT-native UnixFS-style layout directly on top of the map and list structural semantics.
|
Package unixfs implements a MALT-native UnixFS-style layout directly on top of the map and list structural semantics. |
|
unixfs/internal/format
Package format defines UnixFS layout-specific format constants.
|
Package format defines UnixFS layout-specific format constants. |
|
unixfs/internal/manifest
Package manifest implements the locked directory manifest JSON used by the UnixFS application layout.
|
Package manifest implements the locked directory manifest JSON used by the UnixFS application layout. |
|
Package logger provides a structured logging interface for MALT.
|
Package logger provides a structured logging interface for MALT. |
|
runtime
|
|
|
arctable
Package arctable defines the Explicit Arc Table interface and implementations.
|
Package arctable defines the Explicit Arc Table interface and implementations. |
|
arctable/bloom
Package bloom provides Bloom Filter implementations for ArcTable.
|
Package bloom provides Bloom Filter implementations for ArcTable. |
|
arctable/overwrite
Package overwrite provides an ArcTable implementation with overwrite semantics.
|
Package overwrite provides an ArcTable implementation with overwrite semantics. |
|
arctable/versioned
Package versioned provides a versioned ArcTable implementation using a KVStore.
|
Package versioned provides a versioned ArcTable implementation using a KVStore. |
|
graph
Package runtimegraph provides concrete graph lifecycle management for MALT.
|
Package runtimegraph provides concrete graph lifecycle management for MALT. |
|
node
Package node provides the application-level API for MALT.
|
Package node provides the application-level API for MALT. |
|
semantic/list/tree
Package tree implements the stable-indexed list semantic using a tree-shaped fixed-slot layout.
|
Package tree implements the stable-indexed list semantic using a tree-shaped fixed-slot layout. |
|
semantic/mapping/radix
Package radix implements a digest-keyed radix-map semantic above the primitive index commitment backends.
|
Package radix implements a digest-keyed radix-map semantic above the primitive index commitment backends. |
|
sdk
|
|
|
client
Package client provides a thin HTTP client for the local MALT daemon.
|
Package client provides a thin HTTP client for the local MALT daemon. |
|
Package server provides the MALT daemon HTTP API.
|
Package server provides the MALT daemon HTTP API. |
|
storage
|
|
|
cas
Package cas provides Content Addressable Storage clients.
|
Package cas provides Content Addressable Storage clients. |
|
cas/ipfs
Package ipfs provides a CAS client that communicates with a local IPFS daemon via its API, supporting both read and write operations.
|
Package ipfs provides a CAS client that communicates with a local IPFS daemon via its API, supporting both read and write operations. |
|
cas/mock
Package mock provides a mock CAS implementation for testing.
|
Package mock provides a mock CAS implementation for testing. |
|
kv
Package kvstore defines a key-value store interface for MALT.
|
Package kvstore defines a key-value store interface for MALT. |
|
kv/badger
Package badger provides a BadgerDB implementation of kvstore.KVStore.
|
Package badger provides a BadgerDB implementation of kvstore.KVStore. |
|
kv/fs
Package fs provides a filesystem-based implementation of kvstore.KVStore.
|
Package fs provides a filesystem-based implementation of kvstore.KVStore. |
|
kv/memory
Package memory provides an in-memory implementation of kvstore.KVStore.
|
Package memory provides an in-memory implementation of kvstore.KVStore. |
|
kv/prefix
Package prefix provides a KVStore view that transparently prefixes keys.
|
Package prefix provides a KVStore view that transparently prefixes keys. |
|
wire
|
|
|
maltcid
Package maltcid defines MALT-specific multicodec constants and CID utilities.
|
Package maltcid defines MALT-specific multicodec constants and CID utilities. |