Story: upgrade guide
Upgrade History
The following table presents a list of the odyssey-0
testnet upgrades history.
Each version is identified by a specific id, tag, block height, and usually software upgrade proposal. For Story' testnet odyssey-0
it is announcements in Medium/Discord
Consensus client - story
Execution client - story-geth
ID | Tag | Client | Starting Block | Release | Proposal / Announcement |
---|---|---|---|---|---|
`` | v0.12.0 |
Consensus | 0 | Release | N.A. (Genesis) |
`` | v0.10.0 |
Execution | 0 | Release | N.A. (Genesis) |
v0.12.1 |
v0.12.1 |
Consensus | 322000 | Release | Discord |
`` | v0.10.1 |
Execution | 662000 | Release | Announcement |
v0.13.0 |
v0.13.0 |
Consensus | 858000 | Release | Announcement |
Upgrade binaries
story v0.12.0 (Consensus)
{
"binaries": {
"darwin/arm64": "https://github.com/piplabs/story/releases/download/v0.12.0/story-darwin-arm64",
"darwin/amd64": "https://github.com/piplabs/story/releases/download/v0.12.0/story-darwin-amd64",
"linux/arm64": "https://github.com/piplabs/story/releases/download/v0.12.0/story-linux-arm64",
"linux/amd64": "https://github.com/piplabs/story/releases/download/v0.12.0/story-linux-amd64",
}}
geth v0.10.0 (Execution)
{
"binaries": {
"darwin/arm64": "https://github.com/piplabs/story-geth/releases/download/v0.10.0/geth-darwin-arm64",
"darwin/amd64": "https://github.com/piplabs/story-geth/releases/download/v0.10.0/geth-darwin-amd64",
"linux/arm64": "https://github.com/piplabs/story-geth/releases/download/v0.10.0/geth-linux-arm64",
"linux/amd64": "https://github.com/piplabs/story-geth/releases/download/v0.10.0/geth-linux-amd64",
}}
story v0.12.1 (Consensus)
{
"binaries": {
"darwin/arm64": "https://github.com/piplabs/story/releases/download/v0.12.1/story-darwin-arm64",
"darwin/amd64": "https://github.com/piplabs/story/releases/download/v0.12.1/story-darwin-amd64",
"linux/arm64": "https://github.com/piplabs/story/releases/download/v0.12.1/story-linux-arm64",
"linux/amd64": "https://github.com/piplabs/story/releases/download/v0.12.1/story-linux-amd64",
}}
story v0.13.0 (Consensus)
{
"binaries": {
"darwin/arm64": "https://github.com/piplabs/story/releases/download/v0.13.0/story-darwin-arm64",
"darwin/amd64": "https://github.com/piplabs/story/releases/download/v0.13.0/story-darwin-amd64",
"linux/arm64": "https://github.com/piplabs/story/releases/download/v0.13.0/story-linux-arm64",
"linux/amd64": "https://github.com/piplabs/story/releases/download/v0.13.0/story-linux-amd64",
}}
geth v0.10.1 (Execution)
{
"binaries": {
"darwin/arm64": "https://github.com/piplabs/story-geth/releases/download/v0.10.1/geth-darwin-arm64",
"darwin/amd64": "https://github.com/piplabs/story-geth/releases/download/v0.10.1/geth-darwin-amd64",
"linux/arm64": "https://github.com/piplabs/story-geth/releases/download/v0.10.1/geth-linux-arm64",
"linux/amd64": "https://github.com/piplabs/story-geth/releases/download/v0.10.1/geth-linux-amd64",
}}
Upgrade preparations
####install dependencies, if needed
sudo apt install curl git wget htop tmux build-essential jq make lz4 gcc unzip -y
Option 1. Download prebuilt binaries
Geth client (Execution)
Choose the right binary to download (see upgrade announcements), depends on your system and architecture. For example, for Linux/Amd64 and latest version it will be:
url_for_download="https://github.com/piplabs/story-geth/releases/download/v0.10.1/geth-linux-amd64";
name=$(echo ${url_for_download} | rev | cut -d/ -f1 | rev);
echo ${name}
>geth-linux-amd64
Create directory for download bin:
mkdir -vp ${HOME}/prebuilt_bin/
Download and unzip binaries:
wget -O "${HOME}/prebuilt_bin/${name}" ${url_for_download};
cd ${HOME}/prebuilt_bin;
mv ${name} geth;
chmod +x geth;
#check version
./geth version
#output
>Version: 0.10.1-stable
>Git Commit: b60a3ba8d47e60a6c78ca0570f7dac66e8976d93
>Git Commit Date: 20241119
>Architecture: amd64
>Go Version: go1.22.0
>Operating System: linux
Story client (Consensus)
Choose the right binary to download (see upgrade announcements), depends on your system and architecture. For example, for Linux/Amd64 and latest version it will be:
url_for_download="https://github.com/piplabs/story/releases/download/v0.13.0/story-linux-amd64";
name=$(echo ${url_for_download} | rev | cut -d/ -f1 | rev);
echo ${name}
>story-linux-amd64
Create directory for download bin:
mkdir -vp ${HOME}/prebuilt_bin/
Download and unzip binaries:
wget -O "${HOME}/prebuilt_bin/${name}" ${url_for_download}
cd ${HOME}/prebuilt_bin;
mv ${name} story;
chmod +x story
#check version
./story version
#output
>Version v0.13.0-stable
>Git Commit daaa395
>Git Timestamp 2024-11-19T03:59:16Z
Option 2. Build binarys from the source code
Here you can find how to build Story node with pebbledb. Below we will describe goleveldb upgrade process.
Story client (Consensus)
Fetch new data from the Story' Repo:
git clone https://github.com/piplabs/story.git;
cd $HOME/story;
git pull;
git fetch;
git reset --hard;
Ceckout new version and confirm the branch:
vers="v0.13.0";
git checkout ${vers};
git log -1 --pretty=oneline ;
>daaa3952306b916c07133666bf4c2ea374abe995 (HEAD, tag: v0.13.0, origin/release/0.13, origin/main, origin/HEAD) chore(release): finalize story 0.13.0 stable release (#367)
Build binary and check version & commit
go build -o ./build/story ./client;
cd $HOME/story/build;
./story version;
#output
>Version v0.13.0-stable
>Git Commit daaa395
>Git Timestamp 2024-11-19T03:59:16Z
Geth client (Execution)
Fetch new data from the Story' Repo:
git clone https://github.com/piplabs/story-geth.git;
cd $HOME/story-geth;
git pull;
git fetch;
git reset --hard;
Ceckout new version and confirm the branch:
vers="v0.10.1"
git checkout ${vers}
git log -1 --pretty=oneline ;
>b60a3ba8d47e60a6c78ca0570f7dac66e8976d93 (HEAD, tag: v0.10.1, origin/release/0.10, origin/main, origin/HEAD) chore(release): finalize story-geth 0.10.1 stable release (#59)
Build binary and check version & commit
make geth
cd $HOME/story-geth/build/bin/
./geth version
#output
>Version: 0.10.1-stable
>Git Commit: b60a3ba8d47e60a6c78ca0570f7dac66e8976d93
>Architecture: amd64
>Go Version: go1.22.3
Story (consesus client). During the upgrade.
- Stop the Story/cosmovisor service file.
sudo systemctl stop storyd.service && systemctl status storyd.service
- Save current binary (just in case):
bin_path=$(which story) && echo ${bin_path}
# example of the output
>~/go/bin/story
#save old binary (just in case)
mv ${bin_path} ${bin_path}_before_upgrade
- Replace old binary with the new one:
Option 1.
cd ${HOME}/prebuilt_bin/;
mv story ${bin_path};
cd;
Option 2.
mv $HOME/story/build/story ${bin_path}
and confirm the new version:
story version
#output
>Version v0.13.0-stable
>Git Commit daaa395
- Restart the service file:
sudo systemctl restart storyd.service && journalctl -u storyd -f -o cat
- During the consensus phase backup your current
priv_validator_state.json
(just in case)
cp "$HOME/.story/story/data/priv_validator_state.json" $HOME
- Checkout your prevote:
data_folder=story/story
PORT=<YOUR_STORY_NODE_RPC_PORT>
# find out the current round:
round=$(jq '.round | tonumber ' $HOME/.${data_folder}/data/priv_validator_state.json) && echo "current round you have voted for: ${round}"
curl -s localhost:${PORT}/consensus_state -s | jq '' | grep $(curl -s localhost:${PORT}/status | jq -r .result.validator_info.address[:12])
If you see your prevote, then you are ok! Well Done! 👍👏🏻🚀
Geth (Execution client). Before the scheduled upgrade height.
- Stop the Geth service file.
sudo systemctl stop story_gethd.service && systemctl status story_gethd.service
- Save current binary (just in case):
bin_path=$(which geth) && echo ${bin_path};
# example of the output
>~/go/bin/geth
cur_vers=($(geth version | grep "Version"));
cur_vers=${cur_vers[1]} && echo ${cur_vers};
#save old binary (just in case)
mv ${bin_path} ${bin_path}_before_upgrade
- Replace old binary with the new one:
Option 1.
cd ${HOME}/prebuilt_bin/;
mv geth ${bin_path};
cd;
Option 2.
mv $HOME/story-geth/build/bin/geth ${bin_path}
and confirm the new version:
geth version;
#output
>Version: 0.10.1-stable
>Git Commit: b60a3ba8d47e60a6c78ca0570f7dac66e8976d93
- Restart the service file:
sudo systemctl restart story_gethd.service && journalctl -u story_gethd -f -o cat