Skip to content

Commit

Permalink
storage: Tweak docs and cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
patniemeyer committed May 29, 2024
1 parent d221a97 commit 6789bff
Show file tree
Hide file tree
Showing 21 changed files with 21 additions and 17 deletions.
10 changes: 5 additions & 5 deletions storage/README-in.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ and join the discussion on the [Orchid Subreddit](https://www.reddit.com/r/orchi
This repository contains work in progress on the file encoding CLI and server framework.


![monitor](docs/screen.png "Screens")
![monitor](docs/images/screen.png "Screens")


## Overview
Expand All @@ -22,16 +22,16 @@ In this demo implementation files are imported to a local repository directory s

KZG Polynomial Commitments are generated for each shard. These commitments can later be used by either an interactive verifier or an on-chain contract without access to the original data to verify data availability.

![Local Repository](docs/repo.svg "Local Repository")
![Local Repository](docs/images/repo.svg "Local Repository")

Shards are distributed to one or more providers as desired. Individual providers may host full complements of shards or they may be split for maximum distribution.

![Providers](docs/providers.svg "Providers")
![Providers](docs/images/providers.svg "Providers")

Periodic challenges are issued to providers, either interactively or via a source of on-chain randomness, requiring proof of specific data components. Providers collect payments by proving data availability. These payments can be optimized to require zero on-chain transactions when the client is available online but can still function via a non-interactive contract mechanism in the absence of the client.

<div style="text-align: center;">
<img src="docs/proofs.svg" alt="Proofs" title="Proofs" width="320" />
<img src="docs/images/proofs.svg" alt="Proofs" title="Proofs" width="320" />
</div>


Expand Down Expand Up @@ -94,6 +94,6 @@ INSERT_USAGE
```

## CLI Documentation
See [The CLI Documentation](cli_docs.md) for detailed CLI usage.
See [The CLI Documentation](docs/cli_docs.md) for detailed CLI usage.


10 changes: 5 additions & 5 deletions storage/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ and join the discussion on the [Orchid Subreddit](https://www.reddit.com/r/orchi
This repository contains work in progress on the file encoding CLI and server framework.


![monitor](docs/screen.png "Screens")
![monitor](docs/images/screen.png "Screens")


## Overview
Expand All @@ -22,16 +22,16 @@ In this demo implementation files are imported to a local repository directory s

KZG Polynomial Commitments are generated for each shard. These commitments can later be used by either an interactive verifier or an on-chain contract without access to the original data to verify data availability.

![Local Repository](docs/repo.svg "Local Repository")
![Local Repository](docs/images/repo.svg "Local Repository")

Shards are distributed to one or more providers as desired. Individual providers may host full complements of shards or they may be split for maximum distribution.

![Providers](docs/providers.svg "Providers")
![Providers](docs/images/providers.svg "Providers")

Periodic challenges are issued to providers, either interactively or via a source of on-chain randomness, requiring proof of specific data components. Providers collect payments by proving data availability. These payments can be optimized to require zero on-chain transactions when the client is available online but can still function via a non-interactive contract mechanism in the absence of the client.

<div style="text-align: center;">
<img src="docs/proofs.svg" alt="Proofs" title="Proofs" width="320" />
<img src="docs/images/proofs.svg" alt="Proofs" title="Proofs" width="320" />
</div>


Expand Down Expand Up @@ -145,6 +145,6 @@ examples/test-cluster.sh stop
```

## CLI Documentation
See [The CLI Documentation](cli_docs.md) for detailed CLI usage.
See [The CLI Documentation](docs/cli_docs.md) for detailed CLI usage.


2 changes: 1 addition & 1 deletion storage/monitor.sh → storage/bin/monitor.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash
source "$(dirname "$0")/env.sh"
source "$(dirname "$0")/../env.sh"
python "$STRHOME/monitor/monitor_cli.py" "$@"
2 changes: 1 addition & 1 deletion storage/providers.sh → storage/bin/providers.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash
source "$(dirname "$0")/env.sh"
source "$(dirname "$0")/../env.sh"
python "$STRHOME/server/providers_cli.py" "$@"
2 changes: 1 addition & 1 deletion storage/server.sh → storage/bin/server.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
source "$(dirname "$0")/env.sh"
source "$(dirname "$0")/../env.sh"

# if "--repository" is not specified, use the default repository
if [[ "$*" != *"--repository"* ]]; then
Expand Down
2 changes: 1 addition & 1 deletion storage/storage.sh → storage/bin/storage.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash
source "$(dirname "$0")/env.sh"
source "$(dirname "$0")/../env.sh"
python "$STRHOME/storage/storage_cli.py" "$@"
4 changes: 4 additions & 0 deletions storage/build_readme.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,14 @@ source "$(dirname "$0")/env.sh"

if [ -f "README.md" ];
then
# Back up the generated README.md in case it was edited by mistake.
back="/tmp/README.md.$$"
echo "backing up README.md to $back"
cp README.md "$back"
fi

echo "Building README.md"

# examples
tmp=/tmp/readme.$$
sed -n '/# START_EXAMPLES/,/# END_EXAMPLES/p' examples/examples.sh | sed '/# START_EXAMPLES/d; /# END_EXAMPLES/d' > $tmp
Expand All @@ -20,3 +23,4 @@ mv out.md README.md

rm $tmp

echo "Don't forget to rebuild the CLI docs on changes."
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
2 changes: 1 addition & 1 deletion storage/env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
export STRHOME=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
source $STRHOME/venv/bin/activate
export PYTHONPATH="$STRHOME"
export PATH=$PATH:"$STRHOME"
export PATH=$PATH:"$STRHOME":"${STRHOME}/bin"
4 changes: 2 additions & 2 deletions storage/vhs-demo/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ then
fi

export PS1="> "
time vhs < storchid1.tape
time vhs < storchid2.tape
time vhs < orchid_storage1.tape
time vhs < orchid_storage2.tape
File renamed without changes.
File renamed without changes.

0 comments on commit 6789bff

Please sign in to comment.