Skip to content

Instantly share code, notes, and snippets.

@wbbradley
Last active February 17, 2026 20:31
Show Gist options
  • Select an option

  • Save wbbradley/c8e09b7d8e5bff07c8f04405c8b45f4e to your computer and use it in GitHub Desktop.

Select an option

Save wbbradley/c8e09b7d8e5bff07c8f04405c8b45f4e to your computer and use it in GitHub Desktop.
Guide to getting started

Getting started

URLs

Here are an assortment of Walrus, or Walrus-dev related URLs to explore. Some are

Getting the repo

I use ~/src as the place I store all the repositories I've cloned.

mkdir -p "$HOME"/src
cd "$HOME"/src
git clone git@github.com:MystenLabs/walrus.git

Make sure you have the right sui binary installed

Install the script (install-sui) into your PATH (See this page to find the script.) I recommend using ~/.local/bin, and making sure that that's in your PATH.

Run install-sui.

How to run local testbed

In a terminal window (or tmux pane):

RUST_LOG="on,error" sui start --with-faucet --force-regenesis

In another:

cd "$HOME"/src/walrus
./scripts/local-testbed.sh -Afn localnet

If all goes well, you'll see logs scrolling by in the second pane (walrus storage node logs).

In another pane, attempt to store some data.

cd "$HOME"/src/walrus
cargo build --release
./target/release/walrus --config working_dir/client_config.yaml store "$some_text_filename" --epochs 20

If all goes well, you'll see a blob ID in the output.

./target/release/walrus --config working_dir/client_config.yaml read <blob_id>

Hopefully you see the contents of $some_text_filename now.

#!/bin/bash
die() {
echo "$0: $*" >&2
exit 1
}
cd "$HOME"/src/walrus || die "failed to change directory to $HOME/src/walrus"
if [[ "$1" =~ v1.* ]]; then
version="$1"
shift
else
version="$(
git grep sui-sdk.=..*MystenLabs/sui \
| grep -o ' tag = ".*"' \
| awk -F\" '{ print $2 }'
)"
fi
printf "Walrus is currently pointing at Sui \001\033[48;3;80;38;5;128m\002%s\001\033[0m\002\n" "$version"
echo "Existing sui installation is $(sui --version 2>/dev/null || echo "not found")"
if [[ "$(uname)" = "Darwin" ]]; then
filename="sui-$version-macos-$(uname -m).tgz"
url="https://github.com/MystenLabs/sui/releases/download/$version/$filename"
else
filename="sui-$version-ubuntu-x86_64.tgz"
url="https://github.com/MystenLabs/sui/releases/download/$version/$filename"
fi
echo "Looking for $url [version=$version]..."
# Make a temp dir
tempdir="$(mktemp -d)"
trap 'rm -rf '"$tempdir" EXIT
cd "$tempdir" || die "failed to change directory to tempdir $tempdir"
echo "Downloading $filename from $url..."
curl -LO "$url" || die "failed to download '$url'"
echo "Extracting $filename..."
tar -xzf "$filename" || die "failed to extract '$filename'"
rm "$filename"
echo "Moving binaries to $HOME/.local/bin..."
find . -type f -print -exec mv {} "$HOME"/.local/bin/ \;
echo "Running sui --version..."
"$HOME"/.local/bin/sui --version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment