Skip to content
Open
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
6 changes: 3 additions & 3 deletions .env
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
# Smelt Service Images
#
# Override these to use different registries, images, or tags.
# Example: PIRI_IMAGE=ghcr.io/storacha/piri:v1.2.3
# Example: PIRI_IMAGE=ghcr.io/fil-forge/piri:v1.2.3
#
# These variables are automatically loaded by Docker Compose when running
# from the project root directory.


# Storacha services
# Forge services
#PIRI_IMAGE=
#DELEGATOR_IMAGE=
#INDEXER_IMAGE=
#IPNI_IMAGE=
#SIGNER_IMAGE=
#UPLOAD_IMAGE=

# Storacha Client
# Forge Client
#GUPPY_IMAGE=

# Infrastructure
Expand Down
24 changes: 12 additions & 12 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
# Smelt - Local Development Environment for Storacha
# Smelt - Local Development Environment for Forge

This document provides context for AI-assisted development with Claude Code. It describes the project structure, key concepts, and common operations needed to work effectively with this codebase.

## Project Overview

Smelt orchestrates a complete Storacha network on a single machine using Docker Compose. The environment includes 10+ services: blockchain, storage nodes, indexing, upload coordination, and a CLI client. Its purpose is straightforward: let developers test changes locally without deploying to production or coordinating with others.
Smelt orchestrates a complete Forge network on a single machine using Docker Compose. The environment includes 10+ services: blockchain, storage nodes, indexing, upload coordination, and a CLI client. Its purpose is straightforward: let developers test changes locally without deploying to production or coordinating with others.

The name comes from metallurgy (extracting metal from ore), not ichthyology (a small fish). The metaphor is apt; the reality is Docker containers.

## Key Concepts

Understanding these concepts will save considerable debugging time.

### Storacha
### Forge

A decentralized storage network where data is stored across multiple providers with cryptographic verification. Content is addressed by CID (Content Identifier), and storage providers prove they actually hold the data they claim to hold.

Expand Down Expand Up @@ -157,7 +157,7 @@ dlv connect localhost:2345
# or VS Code "Connect to server" / GoLand "Go Remote"
```

**IDE source mapping for sprue**: remote path `/go/src/sprue` maps to your local sprue checkout (e.g. `~/workspace/src/github.com/storacha/sprue`).
**IDE source mapping for sprue**: remote path `/go/src/sprue` maps to your local sprue checkout (e.g. `~/workspace/src/github.com/fil-forge/sprue`).

To test a locally-built dev image instead of the published `:main-dev`:

Expand Down Expand Up @@ -368,7 +368,7 @@ Each system in `systems/<name>/` is self-contained and can theoretically run sta

### Network Topology

All services connect to a shared `storacha-network` Docker network. Service names are DNS-resolvable within the network (e.g., `http://piri:3000` from upload service).
All services connect to a shared `forge-network` Docker network. Service names are DNS-resolvable within the network (e.g., `http://piri:3000` from upload service).

### Key Generation

Expand Down Expand Up @@ -421,20 +421,20 @@ The capability string must match exactly. `space/blob/add` is not `blob/add`. Ch

| Repository | Description |
|------------|-------------|
| `storacha/piri` | Storage node implementation |
| `storacha/guppy` | CLI client |
| `storacha/indexing-service` | Indexer service |
| `storacha/delegator` | Delegation service |
| `storacha/go-ucanto` | UCAN implementation in Go |
| `storacha/specs` | Protocol specifications |
| `fil-forge/piri` | Storage node implementation |
| `fil-forge/guppy` | CLI client |
| `fil-forge/indexing-service` | Indexer service |
| `fil-forge/delegator` | Delegation service |
| `fil-forge/go-ucanto` | UCAN implementation in Go |
| `fil-forge/specs` | Protocol specifications |

## Configurable Service Images

Service images are configurable via environment variables, with defaults in `.env`. Useful for switching registries, testing a PR build, or overriding a specific component:

```bash
# Override one image
PIRI_IMAGE=ghcr.io/storacha/piri:v1.2.3 make up
PIRI_IMAGE=ghcr.io/fil-forge/piri:v1.2.3 make up

# Override several at once
PIRI_IMAGE=myregistry/piri:test GUPPY_IMAGE=myregistry/guppy:test make up
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ YES ?= 0

# Default target - show help
help:
@echo "Storacha Compose - Local Development Environment"
@echo "Forge Compose - Local Development Environment"
@echo ""
@echo "Quick Start:"
@echo " make up Start the network (initializes if needed)"
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Smelt ⚗️

_The Smelter_: A complete Storacha network running on your laptop. Upload your first file in under five minutes.
_The Smelter_: A complete Forge network running on your laptop. Upload your first file in under five minutes.

Smelt is a Docker Compose environment that runs every service in the Storacha distributed storage network locally. It exists so you can test changes, debug integrations, and develop features without deploying anything to production—or waiting for anyone else.
Smelt is a Docker Compose environment that runs every service in the Forge distributed storage network locally. It exists so you can test changes, debug integrations, and develop features without deploying anything to production—or waiting for anyone else.

## Quick Start

Expand All @@ -16,7 +16,7 @@ Smelt is a Docker Compose environment that runs every service in the Storacha di
### Start the Network

```bash
git clone https://github.com/storacha/smelt.git
git clone https://github.com/fil-forge/smelt.git
cd smelt
make up
```
Expand Down Expand Up @@ -46,12 +46,12 @@ guppy login your@email.com
export SPACE=$(guppy space generate)

# Add a source then upload the space
echo "Hello Storacha" > /tmp/hello.txt
echo "Hello Forge" > /tmp/hello.txt
guppy upload source add "$SPACE" /tmp/hello.txt
guppy upload "$SPACE"
```

You now have content stored on your local Storacha network, complete with blockchain proofs and content indexing.
You now have content stored on your local Forge network, complete with blockchain proofs and content indexing.

## What's Running

Expand Down
2 changes: 1 addition & 1 deletion cmd/smelt/cmd/generate.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package cmd

import (
"fmt"

"github.com/spf13/cobra"
"github.com/storacha/smelt/pkg/generate"
"github.com/fil-forge/smelt/pkg/generate"
)

var generateCmd = &cobra.Command{
Expand Down
2 changes: 1 addition & 1 deletion cmd/smelt/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import "github.com/spf13/cobra"

var rootCmd = &cobra.Command{
Use: "smelt",
Short: "Storacha local development environment manager",
Short: "Forge local development environment manager",
}

func Execute() error {
Expand Down
2 changes: 1 addition & 1 deletion cmd/smelt/cmd/snapshot.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
package cmd

import (
Expand All @@ -7,7 +7,7 @@
"time"

"github.com/spf13/cobra"
"github.com/storacha/smelt/pkg/snapshot"
"github.com/fil-forge/smelt/pkg/snapshot"
)

var snapshotCmd = &cobra.Command{
Expand Down
2 changes: 1 addition & 1 deletion cmd/smelt/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"os"

"github.com/storacha/smelt/cmd/smelt/cmd"
"github.com/fil-forge/smelt/cmd/smelt/cmd"
)

func main() {
Expand Down
6 changes: 3 additions & 3 deletions compose.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Storacha Compose - Local Development Environment
# Forge Compose - Local Development Environment
#
# This is the root compose file that includes all system components.
# Run with: docker compose up -d
#
# Individual systems can be run standalone from their directories.
# Example: cd systems/blockchain && docker compose up -d
#
# Note: The storacha-network must be created before starting.
# Note: The forge-network must be created before starting.
# Run `make init` or `./scripts/init.sh` first.

# Pin project name so docker volume names (e.g. `smelt_piri-0-data`) are
Expand All @@ -26,7 +26,7 @@ include:
- path: systems/guppy/compose.yml

networks:
storacha-network:
forge-network:
# `make up` uses the shared external network (created by
# `make init`) so that `cd systems/X && docker compose up` can
# drop into the same network for standalone per-system runs.
Expand Down
10 changes: 5 additions & 5 deletions docs/ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Start Here

Storacha is a decentralized storage network where data is stored across multiple providers with cryptographic verification. Unlike traditional cloud storage, content is addressed by its cryptographic hash (CID), and storage providers must prove they actually hold the data they claim to hold.
Forge is a decentralized storage network where data is stored across multiple providers with cryptographic verification. Unlike traditional cloud storage, content is addressed by its cryptographic hash (CID), and storage providers must prove they actually hold the data they claim to hold.

**Why so many services?** Each service has a specific responsibility. The storage node (Piri) stores blobs. The indexer tracks where content lives. The delegator manages authorization. The signing service handles blockchain transactions. This separation of concerns allows each component to be developed, tested, and scaled independently.

Expand Down Expand Up @@ -87,7 +87,7 @@ When any piri node declares `db: postgres` or `blob: s3` in `smelt.yml`, the gen

**Role**: Local Filecoin-compatible EVM blockchain for PDP (Provable Data Possession) contracts.

**Image**: `ghcr.io/storacha/filecoin-localdev:<tag>` (default pinned in `.env`).
**Image**: `ghcr.io/fil-forge/filecoin-localdev:<tag>` (default pinned in `.env`).

**What it does**:
- Runs Anvil (Foundry's local Ethereum node) with 3-second block times
Expand Down Expand Up @@ -158,7 +158,7 @@ were working with.

### 4. Indexer Service - Container port 80 (host 15050)

**Role**: Storacha's caching layer for content claims - sits between clients and IPNI.
**Role**: Forge's caching layer for content claims - sits between clients and IPNI.

**Build context**: `../indexing-service`

Expand Down Expand Up @@ -245,7 +245,7 @@ pkg/indexerclient/client.go → UCAN client for Indexer communication (assert/in

### 6. Piri - Container port 3000, host 15100+N

**Role**: Storage node(s) implementing the Storacha storage protocol with PDP proofs. Smelt runs one or more piri nodes based on `smelt.yml`; each is a separate service (`piri-0`, `piri-1`, ..., up to `piri-8`) with its own key, wallet, data volume, and on-chain provider registration. Host port is `15100 + N` where N is the node index.
**Role**: Storage node(s) implementing the Forge storage protocol with PDP proofs. Smelt runs one or more piri nodes based on `smelt.yml`; each is a separate service (`piri-0`, `piri-1`, ..., up to `piri-8`) with its own key, wallet, data volume, and on-chain provider registration. Host port is `15100 + N` where N is the node index.

**Build context**: `../piri`

Expand Down Expand Up @@ -315,7 +315,7 @@ Both services are only emitted into `generated/compose/piri.yml` when at least o

### 7. Guppy - CLI Client

**Role**: Command-line client for uploading and retrieving content from Storacha.
**Role**: Command-line client for uploading and retrieving content from Forge.

**Build context**: `../guppy`

Expand Down
14 changes: 7 additions & 7 deletions docs/EXTENDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ services:
condition: service_healthy
restart: unless-stopped
networks:
- storacha-network
- forge-network

volumes:
my-service-data:
Expand Down Expand Up @@ -95,7 +95,7 @@ Order matters only insofar as it affects readability. Docker Compose resolves de

### Network Connectivity

All services connect to `storacha-network`, an external Docker network created during `make init`. This provides:
All services connect to `forge-network`, an external Docker network created during `make init`. This provides:

- **DNS resolution**: Service names are resolvable as hostnames. From any container, `http://piri:3000` reaches piri.
- **Isolation**: Only services on this network can communicate. Your host machine accesses services through published ports.
Expand Down Expand Up @@ -224,7 +224,7 @@ services:
- ./toxiproxy.json:/config/toxiproxy.json:ro
command: ["-config", "/config/toxiproxy.json"]
networks:
- storacha-network
- forge-network
```

**toxiproxy.json**:
Expand Down Expand Up @@ -404,7 +404,7 @@ If you're developing a service (piri, guppy, indexer) and want to test local cha

```bash
# In piri repository
docker build -t forreststoracha/piri:dev .
docker build -t piri:dev .

# Or use docker compose build if piri's compose.yml has a build context
```
Expand All @@ -430,10 +430,10 @@ cd systems/common && docker compose up -d
cd systems/indexing && docker compose up -d
```

Note that most systems declare `external: true` for `storacha-network`, so you must create it first:
Note that most systems declare `external: true` for `forge-network`, so you must create it first:

```bash
docker network create storacha-network
docker network create forge-network
```

Or run `make init` once to handle all setup.
Expand Down Expand Up @@ -587,7 +587,7 @@ docker compose exec guppy curl -v http://piri-0:3000/
docker compose exec guppy nslookup piri-0

# List containers on the network
docker network inspect storacha-network --format '{{range .Containers}}{{.Name}} {{end}}'
docker network inspect forge-network --format '{{range .Containers}}{{.Name}} {{end}}'
```

### Resetting Individual Services
Expand Down
12 changes: 6 additions & 6 deletions docs/GETTING_STARTED.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Getting Started with Smelt

This guide walks you through setting up Smelt—a complete Storacha network running on your laptop—from first clone to first upload. It explains what happens at each step, because developers who understand their tools make fewer trips to Stack Overflow.
This guide walks you through setting up Smelt—a complete Forge network running on your laptop—from first clone to first upload. It explains what happens at each step, because developers who understand their tools make fewer trips to Stack Overflow.

---

Expand Down Expand Up @@ -93,7 +93,7 @@ Windows (including WSL2) is not a supported development host.
Clone the repository and enter the directory:

```bash
git clone https://github.com/storacha/smelt.git
git clone https://github.com/fil-forge/smelt.git
cd smelt
```

Expand Down Expand Up @@ -204,10 +204,10 @@ This proof enables egress tracking functionality through the delegator.

#### Step 6: Create Docker Network

Finally, the script creates the `storacha-network` Docker network:
Finally, the script creates the `forge-network` Docker network:

```bash
docker network create storacha-network
docker network create forge-network
```

All services attach to this network, enabling them to reach each other by container name (e.g., `http://piri:3000` from within the upload service).
Expand Down Expand Up @@ -367,7 +367,7 @@ more files or directories as *sources* of a space, then `guppy upload

```bash
# Create some test data (min 1 KiB; use randdir for something realistic)
echo "Hello Storacha" > /tmp/hello.txt
echo "Hello Forge" > /tmp/hello.txt

# Register the file as a source of the space
guppy upload source add "$SPACE" /tmp/hello.txt
Expand Down Expand Up @@ -435,7 +435,7 @@ Replace `bafybei...` with the actual CID from your upload.

```bash
cat /tmp/retrieved.txt
# Should output: Hello Storacha
# Should output: Hello Forge
```

---
Expand Down
2 changes: 1 addition & 1 deletion docs/MULTI_PIRI.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Smelt supports running N piri storage nodes from a single declarative manifest.

## Objective

The Storacha network is designed around multiple storage providers. Testing with a single piri node leaves important behaviors unverified — how the upload service routes to multiple providers, how indexing works when content is spread across nodes, and how the system behaves under provider heterogeneity (different storage backends, different versions).
The Forge network is designed around multiple storage providers. Testing with a single piri node leaves important behaviors unverified — how the upload service routes to multiple providers, how indexing works when content is spread across nodes, and how the system behaves under provider heterogeneity (different storage backends, different versions).

Multi-piri support lets developers:

Expand Down
6 changes: 3 additions & 3 deletions docs/SNAPSHOTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ into the Go module via `//go:embed`, so consumers that import smelt as
a dependency can reach them without knowing any filesystem paths:

```go
import "github.com/storacha/smelt/pkg/stack"
import "github.com/fil-forge/smelt/pkg/stack"

func TestFromExternalRepo(t *testing.T) {
s := stack.MustNewStack(t,
Expand Down Expand Up @@ -257,7 +257,7 @@ func TestMain(m *testing.M) {

`CleanupLeaked` removes every container and volume whose name starts
with `smeltery-` (the compose project prefix used by `NewStack`). It
doesn't touch the shared `storacha-network` or anything outside that
doesn't touch the shared `forge-network` or anything outside that
namespace. Safe to run on a machine where unrelated docker projects
live; not safe when two pkg/stack-using test suites run concurrently
(the sweeper from one will nuke the other's live stacks).
Expand Down Expand Up @@ -355,7 +355,7 @@ compose config and reports two kinds of drift independently:

```
WARNING: images differ from snapshot:
piri-0: tag ghcr.io/storacha/piri:main → ghcr.io/storacha/piri:test-build
piri-0: tag ghcr.io/fil-forge/piri:main → ghcr.io/fil-forge/piri:test-build
blockchain: digest drift at filecoin-localdev:local (sha256:83bfc639… → sha256:a1b2c3d4…)
```

Expand Down
Loading
Loading