Skip to content

Commit 4062beb

Browse files
committed
chore : pull upstream and resolve
2 parents 4fa0d9b + 1f3b6a1 commit 4062beb

File tree

27 files changed

+460
-415
lines changed

27 files changed

+460
-415
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
pull_request:
55
branches: ["main"]
66
types: [opened, synchronize, reopened, ready_for_review]
7+
workflow_dispatch:
78

89
env:
910
CARGO_TERM_COLOR: always

Cargo.lock

Lines changed: 0 additions & 23 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[workspace]
22
resolver = "2"
3-
members = [ "api", "client", "cli", "network", "program", "example" ]
3+
members = [ "api", "client", "cli", "network", "program"]
44

55
[workspace.package]
66
version = "0.2.1"

README.md

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,42 @@ tapedrive write -m "hello, world"
3535
tapedrive read <id>
3636
```
3737

38-
## Install Latest
38+
## Easy Install (version 1)
3939

4040
We have an easy installer if you prefer not to build from source (**recommended**):
4141

4242
```bash
4343
curl -fsSL https://raw.githubusercontent.com/spool-labs/deploy/refs/heads/main/scripts/install.sh | bash
4444
```
4545

46+
## Run Latest (from source)
47+
48+
If you'd like to try out the latest version, you'll need to build from source. This will require that you have [Rust](https://www.rust-lang.org/tools/install) and [Solana](https://solana.com/docs/intro/installation) tooling installed.
49+
50+
From there, build the tapedrive binary by navigating to `./cli` directory and running the following.
51+
52+
```
53+
cargo install --path .
54+
```
55+
56+
If all goes well, you should now have a `tapedrive` binary.
57+
58+
The latest version may be ahead of the currently deployed solana program, so it is recommended that you run a local validator. This is just one command from the root directory of this repository.
59+
60+
```
61+
make local
62+
```
63+
64+
Keep that running and then run the following tapedrive commands.
65+
66+
```
67+
tapedrive init
68+
tapedrive airdrop 10
69+
```
70+
71+
At this point you're setup.
72+
73+
4674
## How It Works
4775

4876
Whether you're writing a message, a file, or something else, tapedrive compresses the data first, then splits it into chunks that are writen to a tape on the blockchain. Each tape stores the name, number of chunks, byte size, data hash, and the tail of the tape.

api/src/instruction/program.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,11 @@ pub fn build_initialize_ix(
4242
let (tape_pda, _tape_bump) = tape_find_pda(signer, &name);
4343
let (writer_pda, _writer_bump) = writer_find_pda(tape_pda);
4444

45+
assert_eq!(archive_pda, ARCHIVE_ADDRESS);
46+
assert_eq!(epoch_pda, EPOCH_ADDRESS);
47+
assert_eq!(block_pda, BLOCK_ADDRESS);
48+
assert_eq!(mint_pda, MINT_ADDRESS);
49+
assert_eq!(treasury_pda, TREASURY_ADDRESS);
4550
assert_eq!(treasury_ata, TREASURY_ATA);
4651

4752
Instruction {

api/src/instruction/spool.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
use steel::*;
22
use crate::{
3-
consts::*, pda::spool_find_pda,
3+
consts::*,
4+
pda::*
45
};
56

67
#[repr(u8)]
@@ -85,6 +86,7 @@ pub fn build_destroy_ix(
8586
program_id: crate::ID,
8687
accounts: vec![
8788
AccountMeta::new(signer, true),
89+
AccountMeta::new(miner_address, false),
8890
AccountMeta::new(spool_address, false),
8991
AccountMeta::new_readonly(solana_program::system_program::ID, false),
9092
],

api/src/utils.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
use steel::*;
23
use crate::consts::*;
34
use crate::error::*;
@@ -119,6 +120,7 @@ pub fn compute_next_challenge(
119120
current_challenge: &[u8; 32],
120121
slot_hashes_info: &AccountInfo,
121122
) -> [u8; 32] {
123+
122124
let slothash = &slot_hashes_info.data.borrow()
123125
[0..core::mem::size_of::<SlotHash>()];
124126

example/Cargo.toml

Lines changed: 0 additions & 38 deletions
This file was deleted.

example/src/lib.rs

Lines changed: 0 additions & 38 deletions
This file was deleted.

example/tests/elfs/metadata.so

-775 KB
Binary file not shown.

0 commit comments

Comments
 (0)