Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions chain/BASE_SETTLEMENT_ANCHOR.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Base Settlement Anchor Placeholder

Status: prototype model, not a Base contract

The local devnet includes `AnchorBatchToBasePlaceholder` to model how a future FlowMemory appchain would summarize local state for Base. It does not deploy to Base, bridge assets, or make finality/security claims.

## Placeholder Fields

The local anchor model stores:

- `anchorId`
- `appchainChainId`
- `blockRangeStart`
- `blockRangeEnd`
- `stateRoot`
- `workReceiptRoot`
- `verifierReportRoot`
- `rootfieldStateRoot`
- `artifactCommitmentRoot`
- `previousAnchorId`
- `finalityStatus`

The `anchorId` is deterministically derived from those fields using canonical JSON and Keccak-256.

## Future Base Anchor Intent

A future Base anchor contract would store compact roots/report digests only:

- No raw AI memory.
- No embeddings.
- No model outputs.
- No media.
- No large evidence bundles.
- No secrets.
- No bridge assets by default.

## Required Before Real Base Anchoring

- Accepted work receipt schema.
- Accepted verifier report schema.
- Accepted artifact commitment schema.
- Multi-chain indexer reconciliation.
- Bridge/security review.
- Data availability review.
- Governance and upgrade policy.
- Testnet-only no-value prototype.

## No Claims

This placeholder is not a bridge, not a rollup proof, not a fraud proof, not a validity proof, and not a production settlement layer.
69 changes: 69 additions & 0 deletions chain/BRIDGE_SECURITY_RESEARCH.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# Bridge, DA, And Security Review Requirements

Status: research gate, no bridge implementation

The local FlowMemory devnet has no live bridge and no live Base settlement. `AnchorBatchToBasePlaceholder` only models compact anchor payloads for future review.

## Bridge Assumptions To Resolve Later

Before any appchain can carry value, FlowMemory must define:

- Deposit message format.
- Withdrawal message format.
- Message nonce and replay protection.
- Source chain and destination chain binding.
- Rootfield and receipt context binding.
- Withdrawal finality policy.
- Emergency pause authority and limits.
- Upgrade path and delay.
- Failed message recovery path.

## Data Availability Requirements

Before production appchain work, reviewers must be able to answer:

- Where is appchain transaction data posted?
- Can a new node reconstruct appchain state from public data?
- How long is data retained?
- What happens if data is missing?
- How does the indexer mark unavailable data?
- How does the verifier avoid claiming `verified` when data is unavailable?

Missing DA should make appchain work unresolved or invalid, not silently trusted.

## Fraud, Validity, And Proof Boundary

The local devnet does not implement:

- Fraud proofs.
- Validity proofs.
- ZK proofs.
- Permissionless fault challenges.
- Rollup withdrawal finality.

If a future prototype uses OP Stack-derived or Base Appchain infrastructure, FlowMemory must document the exact inherited proof assumptions instead of making generic rollup claims.

## Independent Review Gate

Before value moves:

- Bridge design review.
- DA review.
- Anchor schema review.
- Replay-protection review.
- Key custody review.
- Emergency pause review.
- Monitoring and incident response drill.

## No-Go Conditions

Any of these blocks value-bearing appchain work:

- Unclear withdrawal finality.
- Unclear DA source or retention.
- No replay protection.
- No emergency pause policy.
- No independent bridge/security review.
- Anchor roots cannot be reconciled by indexers.
- Verifier reports can be marked verified without available evidence.
- Appchain value requires moving raw memory, artifacts, or evidence on-chain.
59 changes: 59 additions & 0 deletions chain/HARDWARE_NODE_REQUIREMENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Local Node And Hardware Observer Requirements

Status: prototype requirements

The local FlowMemory devnet can run on ordinary developer hardware. Hardware sidecars are optional observers, not validators, sequencers, or data availability providers.

## Local Developer Node

Minimum practical profile:

- CPU: any modern laptop/desktop CPU.
- Memory: 1 GB available for the Rust CLI and JSON state files.
- Storage: tens of MB for local state and handoff fixtures.
- Network: none required for local demo after dependencies are fetched.
- Secrets: none.

## Optional Hardware Observer Role

An optional FlowRouter or sidecar node may eventually:

- Cache compact state roots.
- Cache block hashes.
- Cache Base anchor placeholders.
- Relay small status messages.
- Provide local diagnostics.

It must not be treated as:

- A validator.
- A sequencer.
- A data availability provider.
- A bridge operator.
- A source of raw artifact data.

## Low-Bandwidth Boundary

Meshtastic and LoRa can carry compact status only:

- Current local block height.
- Current state root.
- Latest anchor id.
- Health or liveness flags.

They must not carry:

- Raw memory.
- Artifacts.
- Model output.
- Media.
- Full blocks.
- Data availability payloads.

## Future Production Questions

- How does a hardware observer prove freshness?
- How does it detect stale state?
- How does it authenticate compact status?
- What happens when local cached state conflicts with an online indexer?
- What is the operator response path?
47 changes: 47 additions & 0 deletions chain/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# FlowMemory Local Chain Prototype

Status: no-value local prototype

This directory documents the local FlowMemory execution environment built by `crates/flowmemory-devnet`.

The prototype models:

- Rootfields.
- Latest roots.
- Artifact commitments.
- Work receipts.
- Verifier reports.
- Imported FlowPulse observations.
- Imported verifier reports.
- Deterministic blocks.
- Deterministic state roots and block hashes.
- Base settlement anchor placeholders.

It does not implement production consensus, validator economics, tokenomics, mainnet deployment, bridge security, or full trustlessness.

## Runnable CLI

```powershell
cargo run --manifest-path crates/flowmemory-devnet/Cargo.toml -- demo
```

Useful commands:

```powershell
cargo run --manifest-path crates/flowmemory-devnet/Cargo.toml -- init
cargo run --manifest-path crates/flowmemory-devnet/Cargo.toml -- reset-local
cargo run --manifest-path crates/flowmemory-devnet/Cargo.toml -- submit-fixture --fixture fixtures/handoff/sample-txs.json
cargo run --manifest-path crates/flowmemory-devnet/Cargo.toml -- run-block
cargo run --manifest-path crates/flowmemory-devnet/Cargo.toml -- inspect-state --summary
cargo run --manifest-path crates/flowmemory-devnet/Cargo.toml -- export-fixtures --out-dir fixtures/handoff/generated
```

## Docs

- [BASE_SETTLEMENT_ANCHOR.md](BASE_SETTLEMENT_ANCHOR.md): future Base anchor model.
- [BRIDGE_SECURITY_RESEARCH.md](BRIDGE_SECURITY_RESEARCH.md): bridge, DA, proof, and review gates.
- [HARDWARE_NODE_REQUIREMENTS.md](HARDWARE_NODE_REQUIREMENTS.md): local node and hardware observer requirements.

## Acceptance Coverage

This local prototype advances GitHub issues #18, #35, #36, #37, #41, #49, #50, and #51 by providing an executable no-value model and concrete fixture handoff path.
Loading
Loading