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
4 changes: 1 addition & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: CI
on:
pull_request:
branches: ["main"]
types: [opened, synchronize, reopened, ready_for_review]
workflow_dispatch:

env:
Expand Down Expand Up @@ -54,9 +55,6 @@ jobs:
- name: Build Tape Solana SBF program
run: cargo build-sbf --manifest-path=program/Cargo.toml --verbose

- name: Build Example Solana SBF program
run: cargo build-sbf --manifest-path=example/Cargo.toml --verbose

- name: Run tests
run: cargo test --verbose

Expand Down
48 changes: 15 additions & 33 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[workspace]
resolver = "2"
members = [ "api", "client", "cli", "network", "program", "example" ]
members = [ "api", "client", "cli", "network", "program"]

[workspace.package]
version = "0.2.1"
Expand Down Expand Up @@ -36,6 +36,7 @@ solana-sdk = "=2.1"
solana-transaction-status = "=2.1"
solana-account-decoder = "=2.1"
solana-transaction-status-client-types = "=2.1"
solana-sha256-hasher = "=2.1"

steel = { version="4.0.0", features = ["spl"] }
litesvm = "0.5.0"
Expand Down
31 changes: 27 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# TAPEDRIVE

[![crates.io](https://img.shields.io/crates/v/tapedrive-cli.svg?style=flat)](https://crates.io/crates/tapedrive-cli)

**Decentralized object storage** on Solana. It works by compressing your data into tiny on-chain proofs. A network of miners then solve challenges in parallel to secure your data. It's entirely on Solana, so there's no need for side-chains or consensus overhead.
Expand Down Expand Up @@ -29,6 +30,7 @@ tapedrive write -r https://example.com/path/to/a/remote/file
```

#### Read

```
tapedrive read <id>
```
Expand Down Expand Up @@ -67,11 +69,11 @@ Whether you're writing a message, a file, or something else, tapedrive compresse

When you want to retrieve your data, tapedrive reads the tape sequentially from the tape network or blockchain to reassemble the original data.

----------------------
---

## Tape://Net

Beyond reading and writing, users can participate in the tape network. There are 3 primary functions, all can run on the same machine.
Beyond reading and writing, users can participate in the tape network. There are 3 primary functions, all can run on the same machine.

<img width="958" alt="image" src="https://github.com/user-attachments/assets/edd81c05-9a23-4d04-9433-602053ed12d5" />

Expand All @@ -82,7 +84,6 @@ At minimum, each node must run the [archive](#archiving), but from there you can
> [!Important]
> We have an easy install script for running a **full node**, learn more [here](https://github.com/tapedrive-io/deploy).


## Archiving

If you'd like to either run a public gateway or a miner, you'll need an archiver. You can run one with the following command.
Expand Down Expand Up @@ -115,13 +116,14 @@ The web service allows users to fetch data using a JSON RPC protocol similar to

The following methods currently exist.


### getHealth

Retrieves the last persisted block height and drift.

**Parameters**: None (empty object `{}`)

**Returns**:

```text
{
"last_processed_slot": <number>,
Expand All @@ -130,13 +132,15 @@ Retrieves the last persisted block height and drift.
```

**Example**:

```bash
curl -X POST http://127.0.0.1:3000/api \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":5,"method":"getHealth","params":{}}'
```

**Response**:

```text
{
"jsonrpc": "2.0",
Expand All @@ -149,9 +153,11 @@ curl -X POST http://127.0.0.1:3000/api \
```

### getTapeAddress

Retrieves the Solana pubkey (tape address) for a given tape number.

**Parameters**:

```text
{
"tape_number": <number>
Expand All @@ -161,13 +167,15 @@ Retrieves the Solana pubkey (tape address) for a given tape number.
**Returns**: Base-58-encoded Solana pubkey as a string.

**Example**:

```bash
curl -X POST http://127.0.0.1:3000/api \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"getTapeAddress","params":{"tape_number":42}}'
```

**Response**:

```text
{
"jsonrpc": "2.0",
Expand All @@ -177,9 +185,11 @@ curl -X POST http://127.0.0.1:3000/api \
```

### getTapeNumber

Retrieves the numeric tape ID for a given Solana pubkey (tape address).

**Parameters**:

```text
{
"tape_address": <string>
Expand All @@ -189,13 +199,15 @@ Retrieves the numeric tape ID for a given Solana pubkey (tape address).
**Returns**: Tape number as a number.

**Example**:

```bash
curl -X POST http://127.0.0.1:3000/api \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":2,"method":"getTapeNumber","params":{"tape_address":"5P6XDRskXsUxyNUk3kA6oU61kWkLxgMX7W5mTvZ3hYRS"}}'
```

**Response**:

```text
{
"jsonrpc": "2.0",
Expand All @@ -205,9 +217,11 @@ curl -X POST http://127.0.0.1:3000/api \
```

### getSegment

Fetches a single segment’s data by tape address and segment number.

**Parameters**:

```text
{
"tape_address": <string>,
Expand All @@ -218,13 +232,15 @@ Fetches a single segment’s data by tape address and segment number.
**Returns**: Base64-encoded string of the segment’s raw bytes.

**Example**:

```bash
curl -X POST http://127.0.0.1:3000/api \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":3,"method":"getSegment","params":{"tape_address":"5P6XDRskXsUxyNUk3kA6oU61kWkLxgMX7W5mTvZ3hYRS","segment_number":3}}'
```

**Response**:

```text
{
"jsonrpc": "2.0",
Expand All @@ -234,16 +250,19 @@ curl -X POST http://127.0.0.1:3000/api \
```

### getTape

Retrieves all segments and their data for a given tape address.

**Parameters**:

```text
{
"tape_address": <string>
}
```

**Returns**: Array of objects, each containing:

```text
[
{
Expand All @@ -254,13 +273,15 @@ Retrieves all segments and their data for a given tape address.
```

**Example**:

```bash
curl -X POST http://127.0.0.1:3000/api \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":4,"method":"getTape","params":{"tape_address":"5P6XDRskXsUxyNUk3kA6oU61kWkLxgMX7W5mTvZ3hYRS"}}'
```

**Response**:

```text
{
"jsonrpc": "2.0",
Expand All @@ -279,7 +300,9 @@ curl -X POST http://127.0.0.1:3000/api \
```

## Contributing

Fork, PR, or suggest:

- Faster writes/reads (turbo mode).
- Encryption.

Expand Down
1 change: 1 addition & 0 deletions api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,4 @@ spl-associated-token-account.workspace = true
brine-tree.workspace = true
array-const-fn-init.workspace = true
const-crypto.workspace = true
solana-sha256-hasher.workspace = true
Loading