diff --git a/README.md b/README.md index e69de29..18cfe57 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,27 @@ +# OpenComputeFramework + +OpenComputeFramework is a distributed service registry and P2P network built with Go. It utilizes libp2p and IPFS technologies to provide a decentralized infrastructure for computing services. + +## Features + +- **P2P Networking**: Leverages libp2p for robust peer-to-peer communication. +- **Distributed Service Registry**: Allows nodes to register and discover services. +- **CRDT-based State Management**: Uses Conflict-free Replicated Data Types for eventual consistency. +- **Solana Integration**: Optional integration with Solana for token-gated access (verification). + +## Documentation + +Full documentation is available in the `docs/` directory. You can also view it by running the documentation server (if configured) or browsing the markdown files directly. + +- [Installation](docs/docs/installation.md) +- [Configuration](docs/docs/configuration.md) +- [Usage](docs/docs/usage.md) +- [API Reference](docs/docs/api.md) + +## quick start + +```bash +cd src +make build +./build/ocfcore start +``` diff --git a/docs/docs/api.md b/docs/docs/api.md new file mode 100644 index 0000000..d763c2a --- /dev/null +++ b/docs/docs/api.md @@ -0,0 +1,100 @@ +# API Reference + +The OpenComputeFramework provides a RESTful API for interacting with the node. The API is available at `http://localhost:8092` by default. + +## Health + +### Check server health + +`GET /v1/health` + +Returns a simple health status check. + +**Response:** + +```json +{ + "status": "ok" +} +``` + +## DNT (Distributed Node Table) + +### Get node table + +`GET /v1/dnt/table` + +Retrieve the current distributed node table. + +### List connected peers + +`GET /v1/dnt/peers` + +Get a list of all currently connected peers. + +### List peers with status + +`GET /v1/dnt/peers_status` + +Get a list of all peers with their connection status. + +### List bootstraps + +`GET /v1/dnt/bootstraps` + +Get a list of all connected bootstrap nodes. + +### Get resource statistics + +`GET /v1/dnt/stats` + +Retrieve resource usage and connection statistics. + +### Update local node + +`POST /v1/dnt/_node` + +Update the local node's information in the node table. + +### Delete local node + +`DELETE /v1/dnt/_node` + +Remove the local node from the node table. + +## P2P Proxy + +### Forward request to peer + +`METHOD /v1/p2p/{peerId}/{path}` + +Forward an HTTP request to a specific peer in the P2P network. + +* `peerId`: The ID of the target peer. +* `path`: The path to forward the request to. + +Supported methods: `GET`, `POST`, `PATCH`. + +## Service Proxy + +### Forward request to global service + +`METHOD /v1/service/{service}/{path}` + +Forward an HTTP request to a globally registered service. The system will route the request to a node offering this service. + +* `service`: The name of the service to forward to. +* `path`: The path to forward the request to. + +Supported methods: `GET`, `POST`, `PATCH`. + +### Forward request to service (Local/Direct) + +`METHOD /v1/_service/{service}/{path}` + +Forward an HTTP request to a registered service (potentially with different routing rules or intended for local consumption/debugging). + +* `service`: The name of the service to forward to. +* `path`: The path to forward the request to. + +Supported methods: `GET`, `POST`, `PATCH`. diff --git a/docs/docs/backend/api.md b/docs/docs/backend/api.md deleted file mode 100644 index e7af996..0000000 --- a/docs/docs/backend/api.md +++ /dev/null @@ -1,55 +0,0 @@ -# API Reference - -The OCF backend exposes a RESTful API for interacting with the node. - -## Base URL - -Default: `http://localhost:8092/v1` - -## Endpoints - -### Service Discovery - -#### `GET /dnt/table` -Retrieve the current Distributed Hash Table (DHT) routing table or service registry. - -**Response:** -```json -{ - "peers": [ - { - "id": "QmPeerID...", - "addrs": ["/ip4/127.0.0.1/tcp/4001"] - } - ] -} -``` - -### Compute Services - -#### `POST /service/llm/v1/chat/completions` -Send a chat completion request to a connected LLM provider. Compatible with OpenAI API format. - -**Request Body:** -```json -{ - "model": "gpt-fake-1", - "messages": [ - { "role": "user", "content": "Hello!" } - ] -} -``` - -### System - -#### `GET /system/status` -Get the current status of the node. - -**Response:** -```json -{ - "status": "online", - "version": "0.1.0", - "peers": 12 -} -``` diff --git a/docs/docs/backend/architecture.md b/docs/docs/backend/architecture.md deleted file mode 100644 index 323f65e..0000000 --- a/docs/docs/backend/architecture.md +++ /dev/null @@ -1,37 +0,0 @@ -# Backend Architecture - -The OCF backend is designed as a modular, layered system. - -## Core Components - -### 1. Networking Layer (`libp2p`) -The foundation of the node is the LibP2P host. It manages: -- **Transport**: Handling connections via TCP, WebSocket, or QUIC. -- **Security**: Encrypting communications using Noise or TLS. -- **Multiplexing**: Running multiple streams over a single connection (Yamux/Mplex). -- **Peer Discovery**: Finding other nodes via mDNS (local) or DHT (global). - -### 2. Protocol Layer (`src/internal/protocol`) -This layer defines the application-specific protocols used by OCF nodes to communicate. -- **Service Advertisement**: Nodes broadcast their available compute resources. -- **Job Negotiation**: Protocols for requesting and accepting compute jobs. -- **Status Updates**: Real-time updates on job progress. - -### 3. Service Layer (`src/internal/server`) -The service layer exposes the node's functionality to the outside world. -- **HTTP Gateway**: A Gin-based REST API listening on port 8092 (default). -- **P2P HTTP**: Allows tunneling HTTP requests over LibP2P streams, enabling access to services behind NATs. - -### 4. Data Layer -- **Datastore**: Uses `go-datastore` interfaces to abstract storage backends. -- **CRDTs**: Conflict-Free Replicated Data Types are used for shared state that requires eventual consistency, such as the service registry. - -## Data Flow - -1. **Initialization**: The node starts, generates/loads identity keys, and initializes the LibP2P host. -2. **Discovery**: The node connects to bootstrap peers and joins the DHT. -3. **Advertisement**: The node publishes its capabilities to the network. -4. **Request Handling**: - - **Direct**: A client sends an HTTP request to the gateway. - - **P2P**: A peer sends a request over a LibP2P stream. -5. **Execution**: The request is routed to the appropriate internal handler or forwarded to another peer. diff --git a/docs/docs/backend/configuration.md b/docs/docs/backend/configuration.md deleted file mode 100644 index a92a066..0000000 --- a/docs/docs/backend/configuration.md +++ /dev/null @@ -1,37 +0,0 @@ -# Configuration - -The OCF backend can be configured via command-line flags, environment variables, or a configuration file. - -## CLI Flags - -- `--config`: Path to config file (default: `$HOME/.ocf/config.yaml`) -- `--mode`: Operation mode (`standalone`, `local`, `networked`) -- `--port`: HTTP API port (default: `8092`) -- `--p2p-port`: LibP2P listening port (default: `4001`) - -## Environment Variables - -Prefix all variables with `OCF_`. - -- `OCF_AUTH_URL`: URL for the authentication server. -- `OCF_AUTH_CLIENT_ID`: Client ID for OAuth. -- `OCF_LOG_LEVEL`: Logging level (`debug`, `info`, `warn`, `error`). - -## Configuration File (`config.yaml`) - -```yaml -node: - mode: "networked" - identity_file: "~/.ocf/identity.key" - -network: - listen_addrs: - - "/ip4/0.0.0.0/tcp/4001" - - "/ip4/0.0.0.0/udp/4001/quic" - bootstrap_peers: - - "/dns4/bootstrap.ocf.network/tcp/4001/p2p/Qm..." - -api: - port: 8092 - cors_allowed_origins: ["*"] -``` diff --git a/docs/docs/backend/index.md b/docs/docs/backend/index.md deleted file mode 100644 index 13529fb..0000000 --- a/docs/docs/backend/index.md +++ /dev/null @@ -1,32 +0,0 @@ -# Backend Overview - -The Open Compute Framework (OCF) backend is a robust, decentralized computing node implemented in Go. It leverages the LibP2P networking stack to facilitate peer-to-peer communication, service discovery, and distributed resource management. - -## Key Features - -- **Decentralized Networking**: Built on `libp2p`, supporting TCP, WebSocket, and QUIC transports. -- **Service Discovery**: Uses DHT and PubSub for dynamic peer and service discovery. -- **Distributed Storage**: Integrates with IPFS components for resilient data storage. -- **API Gateway**: Provides a RESTful HTTP interface for external interaction. -- **Multi-Modal Operation**: Can run in standalone, local, or networked modes. - -## Architecture - -The backend is modularized into several key components: - -- **`src/entry/cmd`**: Entry points for the CLI application. -- **`src/internal/protocol`**: Core P2P protocol implementation. -- **`src/internal/server`**: HTTP gateway and P2P server logic. -- **`src/internal/wallet`**: Cryptographic wallet management. - -## Getting Started - -To run the backend, you can use the provided Makefile: - -```bash -cd src -make build -make run -``` - -Refer to the [Architecture](architecture.md) and [API Reference](api.md) for more details. diff --git a/docs/docs/blockchain/contracts.md b/docs/docs/blockchain/contracts.md deleted file mode 100644 index fe68237..0000000 --- a/docs/docs/blockchain/contracts.md +++ /dev/null @@ -1,27 +0,0 @@ -# Smart Contracts - -The OCF smart contracts are implemented using the Anchor framework on Solana. - -## Program Structure - -The `tokens/programs` directory contains the Rust source code for the on-chain logic. - -### Instructions - -Common instructions supported by the program: - -- `initialize`: Sets up the global state of the protocol. -- `register_provider`: Registers a new compute provider with a stake. -- `create_job`: A consumer initiates a compute job and locks funds. -- `complete_job`: A provider signals job completion. -- `dispute_job`: A consumer or validator raises a dispute regarding the result. - -## Accounts - -- **GlobalState**: Stores protocol-wide parameters. -- **ProviderAccount**: Stores provider details, stake balance, and reputation. -- **JobAccount**: Stores the state of a specific compute job. - -## Integration - -The frontend and backend interact with these contracts via the Solana JSON RPC API, typically using client libraries like `@solana/web3.js` or the Anchor client. diff --git a/docs/docs/blockchain/index.md b/docs/docs/blockchain/index.md deleted file mode 100644 index 0039625..0000000 --- a/docs/docs/blockchain/index.md +++ /dev/null @@ -1,26 +0,0 @@ -# Blockchain Overview - -The OCF blockchain layer handles the economic incentives and identity management for the network. It is built on the **Solana** blockchain using the **Anchor** framework. - -## Key Concepts - -- **Tokenomics**: A native token is used to pay for compute resources and reward providers. -- **Staking**: Providers must stake tokens to advertise their services, ensuring commitment and quality of service. -- **Payment Channels**: Micro-payments are facilitated through on-chain channels to minimize transaction costs and latency. -- **Identity**: On-chain identities are linked to off-chain P2P nodes via cryptographic signatures. - -## Smart Contracts - -The smart contracts (programs) are written in Rust and reside in the `tokens/` directory. - -- **Program ID**: `xTRCFBHAfjepfKNStvWQ7xmHwFS7aJ85oufa1BoXedL` - -## Development - -To work with the blockchain components, you need the Solana CLI and Anchor installed. - -```bash -cd tokens -npm run lint -yarn run ts-mocha -``` diff --git a/docs/docs/blockchain/tokenomics.md b/docs/docs/blockchain/tokenomics.md deleted file mode 100644 index 4fa20cf..0000000 --- a/docs/docs/blockchain/tokenomics.md +++ /dev/null @@ -1,25 +0,0 @@ -# Tokenomics - -The OCF token model is designed to align incentives between compute providers, consumers, and the network protocol. - -## Roles - -- **Providers**: Entities that offer compute resources (CPU, GPU, Storage). They earn tokens by fulfilling jobs. -- **Consumers**: Users or applications that require compute resources. They pay tokens to access services. -- **Validators**: Nodes that verify the correctness of compute results (if applicable). - -## Mechanisms - -### Staking -Providers are required to stake a minimum amount of OCF tokens to register their service. -- **Purpose**: Sybil resistance and quality assurance. -- **Slashing**: If a provider acts maliciously or fails to deliver, a portion of their stake may be slashed. - -### Payments -Payments are settled on-chain but may utilize state channels for high-frequency transactions. -1. **Escrow**: Consumer locks tokens in a contract before job execution. -2. **Execution**: Provider performs the task. -3. **Settlement**: Upon verification, tokens are released to the provider. - -### Governance -Token holders may participate in the governance of the protocol, voting on parameter updates (e.g., minimum stake, fees) and upgrades. diff --git a/docs/docs/configuration.md b/docs/docs/configuration.md new file mode 100644 index 0000000..8c741ea --- /dev/null +++ b/docs/docs/configuration.md @@ -0,0 +1,65 @@ +# Configuration + +OpenComputeFramework uses `viper` for configuration management. It looks for a configuration file at `$HOME/.config/ocf/cfg.yaml` by default. You can also specify a config file using the `--config` flag. + +## Configuration File (`cfg.yaml`) + +Here is an example configuration file with default values: + +```yaml +# Path to the data directory (default: "") +path: "" + +# Main HTTP server port (default: "8092") +port: "8092" + +# Node name (default: "relay") +name: "relay" + +# Seed for generating node identity (default: "0") +seed: "0" + +# TCP port for libp2p (default: "43905") +tcp_port: "43905" + +# UDP port for libp2p (default: "59820") +udp_port: "59820" + +# P2P configuration +p2p: + port: "8093" + +# Vacuum configuration +vacuum: + interval: 10 + +# Queue configuration +queue: + port: "8094" + +# Account configuration +account: + wallet: "" + +# Solana integration configuration +solana: + rpc: "https://api.mainnet-beta.solana.com" + mint: "EsmcTrdLkFqV3mv4CjLF3AmCx132ixfFSYYRWD78cDzR" + skip_verification: false +``` + +## Environment Variables + +Configuration options can also be overridden using environment variables. The mapping is typically uppercase with `_` separators, but check the code for specific bindings if needed. + +## CLI Flags + +Many configuration options can be passed as CLI flags when starting the application. See the [Usage](usage.md) section for more details. + +## CRDT Configuration + +The following CRDT-related settings can be configured (defaults shown): + +* `crdt.tombstone_retention`: `24h` +* `crdt.tombstone_compaction_interval`: `1h` +* `crdt.tombstone_compaction_batch`: `512` diff --git a/docs/docs/development/contributing.md b/docs/docs/development/contributing.md deleted file mode 100644 index bbeab26..0000000 --- a/docs/docs/development/contributing.md +++ /dev/null @@ -1,34 +0,0 @@ -# Contributing - -We welcome contributions to the Open Compute Framework! - -## Workflow - -1. **Fork the repository**. -2. **Create a feature branch**: `git checkout -b feature/my-new-feature`. -3. **Commit your changes**: `git commit -am 'Add some feature'`. -4. **Push to the branch**: `git push origin feature/my-new-feature`. -5. **Submit a Pull Request**. - -## Code Style - -### Go -- Follow standard Go conventions. -- Use `golangci-lint` to check your code: - ```bash - make lint - ``` - -### Rust -- Use `cargo fmt` to format your code. -- Use `cargo clippy` for linting. - -### TypeScript/JavaScript -- Use `eslint` and `prettier`. - -## Testing - -Please ensure all tests pass before submitting a PR. - -- **Backend**: `make test` -- **Blockchain**: `yarn run ts-mocha` diff --git a/docs/docs/development/setup.md b/docs/docs/development/setup.md deleted file mode 100644 index d485034..0000000 --- a/docs/docs/development/setup.md +++ /dev/null @@ -1,52 +0,0 @@ -# Setup & Installation - -This guide covers how to set up your development environment for OCF. - -## Prerequisites - -- **Go**: v1.23.0 or later -- **Node.js**: v18 or later -- **Rust**: Latest stable -- **Docker**: For running containerized services - -## Backend Setup - -1. **Clone the repository**: - ```bash - git clone https://github.com/researchcomputer/OpenComputeFramework.git - cd OpenComputeFramework - ``` - -2. **Build the backend**: - ```bash - cd src - make build - ``` - -3. **Run the node**: - ```bash - make run - ``` - -## Blockchain Setup - -1. **Install Anchor**: Follow the [Anchor installation guide](https://www.anchor-lang.com/docs/installation). - -2. **Install dependencies**: - ```bash - cd tokens - yarn install - ``` - -3. **Run tests**: - ```bash - yarn run ts-mocha - ``` - -## Local Demo - -To spin up a full local environment: - -```bash -docker compose -f local-demo/docker-compose.yml up -``` diff --git a/docs/docs/index.md b/docs/docs/index.md index 3b76a8a..c46a6e7 100644 --- a/docs/docs/index.md +++ b/docs/docs/index.md @@ -1,166 +1,23 @@ ---- -icon: lucide/rocket ---- +# Introduction -# Get started +OpenComputeFramework (OCF) is a distributed service registry and peer-to-peer (P2P) network designed to facilitate decentralized computing. It enables nodes to discover each other, share state using CRDTs (Conflict-free Replicated Data Types), and proxy requests to registered services. -For full documentation visit [zensical.org](https://zensical.org/docs/). +## Key Concepts -## Commands +* **Node**: An instance of the OCF software running on a machine. +* **Peer**: Another node in the network. +* **Service**: A computing service (e.g., an HTTP API) offered by a node. +* **DNT (Distributed Node Table)**: A shared state containing information about all known nodes and their services. -* [`zensical new`][new] - Create a new project -* [`zensical serve`][serve] - Start local web server -* [`zensical build`][build] - Build your site +## Architecture - [new]: https://zensical.org/docs/usage/new/ - [serve]: https://zensical.org/docs/usage/preview/ - [build]: https://zensical.org/docs/usage/build/ +OCF is built on top of [libp2p](https://libp2p.io/) and uses [IPFS](https://ipfs.tech/) technologies for data storage and retrieval. It supports different modes of operation, allowing for flexible deployment topologies. -## Examples +## Getting Started -### Admonitions +To get started with OpenComputeFramework, check out the following guides: -> Go to [documentation](https://zensical.org/docs/authoring/admonitions/) - -!!! note - - This is a **note** admonition. Use it to provide helpful information. - -!!! warning - - This is a **warning** admonition. Be careful! - -### Details - -> Go to [documentation](https://zensical.org/docs/authoring/admonitions/#collapsible-blocks) - -??? info "Click to expand for more info" - - This content is hidden until you click to expand it. - Great for FAQs or long explanations. - -## Code Blocks - -> Go to [documentation](https://zensical.org/docs/authoring/code-blocks/) - -``` python hl_lines="2" title="Code blocks" -def greet(name): - print(f"Hello, {name}!") # (1)! - -greet("Python") -``` - -1. > Go to [documentation](https://zensical.org/docs/authoring/code-blocks/#code-annotations) - - Code annotations allow to attach notes to lines of code. - -Code can also be highlighted inline: `#!python print("Hello, Python!")`. - -## Content tabs - -> Go to [documentation](https://zensical.org/docs/authoring/content-tabs/) - -=== "Python" - - ``` python - print("Hello from Python!") - ``` - -=== "Rust" - - ``` rs - println!("Hello from Rust!"); - ``` - -## Diagrams - -> Go to [documentation](https://zensical.org/docs/authoring/diagrams/) - -``` mermaid -graph LR - A[Start] --> B{Error?}; - B -->|Yes| C[Hmm...]; - C --> D[Debug]; - D --> B; - B ---->|No| E[Yay!]; -``` - -## Footnotes - -> Go to [documentation](https://zensical.org/docs/authoring/footnotes/) - -Here's a sentence with a footnote.[^1] - -Hover it, to see a tooltip. - -[^1]: This is the footnote. - - -## Formatting - -> Go to [documentation](https://zensical.org/docs/authoring/formatting/) - -- ==This was marked (highlight)== -- ^^This was inserted (underline)^^ -- ~~This was deleted (strikethrough)~~ -- H~2~O -- A^T^A -- ++ctrl+alt+del++ - -## Icons, Emojis - -> Go to [documentation](https://zensical.org/docs/authoring/icons-emojis/) - -* :sparkles: `:sparkles:` -* :rocket: `:rocket:` -* :tada: `:tada:` -* :memo: `:memo:` -* :eyes: `:eyes:` - -## Maths - -> Go to [documentation](https://zensical.org/docs/authoring/math/) - -$$ -\cos x=\sum_{k=0}^{\infty}\frac{(-1)^k}{(2k)!}x^{2k} -$$ - -!!! warning "Needs configuration" - Note that MathJax is included via a `script` tag on this page and is not - configured in the generated default configuration to avoid including it - in a pages that do not need it. See the documentation for details on how - to configure it on all your pages if they are more Maths-heavy than these - simple starter pages. - - - - -## Task Lists - -> Go to [documentation](https://zensical.org/docs/authoring/lists/#using-task-lists) - -* [x] Install Zensical -* [x] Configure `zensical.toml` -* [x] Write amazing documentation -* [ ] Deploy anywhere - -## Tooltips - -> Go to [documentation](https://zensical.org/docs/authoring/tooltips/) - -[Hover me][example] - - [example]: https://example.com "I'm a tooltip!" +* [Installation](installation.md): How to build and install the software. +* [Configuration](configuration.md): How to configure your node. +* [Usage](usage.md): How to run the CLI and start the server. +* [API Reference](api.md): Documentation for the HTTP API. diff --git a/docs/docs/installation.md b/docs/docs/installation.md new file mode 100644 index 0000000..21be348 --- /dev/null +++ b/docs/docs/installation.md @@ -0,0 +1,54 @@ +# Installation + +## Prerequisites + +* **Go**: Version 1.23 or higher. +* **Make**: For running build commands. +* **Git**: For version control. + +## Building from Source + +1. Clone the repository: + + ```bash + git clone https://github.com/your-org/opencomputeframework.git + cd opencomputeframework/src + ``` + +2. Build the binary using `make`: + + ```bash + make build + ``` + + This will create the `ocfcore` binary in the `build/` directory. + +3. (Optional) Install dependencies if needed: + + ```bash + make build-deps + ``` + +## Cross-Compilation + +To build for ARM64 architecture: + +```bash +make arm +``` + +## Debug Build + +To build with debugging capabilities: + +```bash +make build-debug +``` + +## Verify Installation + +After building, you can verify the installation by checking the version: + +```bash +./build/ocfcore version +``` diff --git a/docs/docs/markdown.md b/docs/docs/markdown.md deleted file mode 100644 index 7ea6d1e..0000000 --- a/docs/docs/markdown.md +++ /dev/null @@ -1,98 +0,0 @@ ---- -icon: simple/markdown ---- - -# Markdown in 5min - -## Headers -``` -# H1 Header -## H2 Header -### H3 Header -#### H4 Header -##### H5 Header -###### H6 Header -``` - -## Text formatting -``` -**bold text** -*italic text* -***bold and italic*** -~~strikethrough~~ -`inline code` -``` - -## Links and images -``` -[Link text](https://example.com) -[Link with title](https://example.com "Hover title") -![Alt text](image.jpg) -![Image with title](image.jpg "Image title") -``` - -## Lists -``` -Unordered: -- Item 1 -- Item 2 - - Nested item - -Ordered: -1. First item -2. Second item -3. Third item -``` - -## Blockquotes -``` -> This is a blockquote -> Multiple lines ->> Nested quote -``` - -## Code blocks -```` -```javascript -function hello() { - console.log("Hello, world!"); -} -``` -```` - -## Tables -``` -| Header 1 | Header 2 | Header 3 | -|----------|----------|----------| -| Row 1 | Data | Data | -| Row 2 | Data | Data | -``` - -## Horizontal rule -``` ---- -or -*** -or -___ -``` - -## Task lists -``` -- [x] Completed task -- [ ] Incomplete task -- [ ] Another task -``` - -## Escaping characters -``` -Use backslash to escape: \* \_ \# \` -``` - -## Line breaks -``` -End a line with two spaces -to create a line break. - -Or use a blank line for a new paragraph. -``` \ No newline at end of file diff --git a/docs/docs/usage.md b/docs/docs/usage.md new file mode 100644 index 0000000..1f35bf4 --- /dev/null +++ b/docs/docs/usage.md @@ -0,0 +1,81 @@ +# Usage + +## CLI Commands + +The `ocfcore` CLI provides several commands to interact with the system. + +### Global Flags + +* `--config string`: config file (default is `$HOME/.config/ocf/cfg.yaml`) + +### `init` + +Initialize the node configuration. + +```bash +ocfcore init +``` + +### `start` + +Start the OCF node and listen for incoming connections. + +```bash +ocfcore start [flags] +``` + +#### Flags + +* `--wallet.account string`: Wallet account. +* `--account.wallet string`: Path to wallet key file. +* `--bootstrap.addr string`: Bootstrap address (default "http://152.67.71.5:8092/v1/dnt/bootstraps"). +* `--bootstrap.source stringSlice`: Bootstrap source (HTTP URL, dnsaddr://host, or multiaddr). Repeatable. +* `--bootstrap.static stringSlice`: Static bootstrap multiaddr (repeatable). +* `--seed string`: Seed for identity generation (default "0"). +* `--mode string`: Mode (standalone, local, full) (default "node"). +* `--tcpport string`: TCP Port (default "43905"). +* `--udpport string`: UDP Port (default "59820"). +* `--subprocess string`: Subprocess to start. +* `--public-addr string`: Public address if you have one (enables being a bootstrap node). +* `--service.name string`: Service name to register. +* `--service.port string`: Service port. +* `--solana.rpc string`: Solana RPC endpoint. +* `--solana.mint string`: SPL token mint to verify ownership. +* `--solana.skip_verification`: Skip Solana token ownership verification (use for testing only). +* `--cleanslate`: Clean slate, removing the database before starting (default `true`). + +### `version` + +Print the version number of ocfcore. + +```bash +ocfcore version +``` + +### `update` + +Update the application (if supported). + +```bash +ocfcore update +``` + +## Running a Node + +To start a standard node: + +```bash +./ocfcore start +``` + +To start a node with a specific seed (identity): + +```bash +./ocfcore start --seed myseed +``` + +To register a local service: + +```bash +./ocfcore start --service.name myservice --service.port 8080 +```