Story: upgrade guide
Upgrade History
The following table presents a list of the story-1
Mainnet upgrades history.
Each version is identified by a specific id, tag, block height, and usually software upgrade proposal. For Story' Mainnet story-1
it is announcements in Medium/Discord
Consensus client - story
Execution client - story-geth
ID | Tag | Client | Starting Block | Release | Proposal / Announcement |
---|---|---|---|---|---|
`` | v1.0.0 |
Consensus | 0 | Release | N.A. (Genesis) |
`` | v1.0.1 |
Execution | 0 | Release | N.A. (Genesis) |
v1.1.0 |
v1.1.0 |
Consensus | 809988 | Release | Discord |
v1.1.1 |
v1.1.1 |
Consensus | 900000 | Release | Discord |
v1.1.3 |
v1.1.3 |
Consensus | 3300000 | Release | Discord |
v1.2.0 |
v1.2.0 |
Consensus | 4477880 | Release | Discord |
v1.1.0 |
v1.1.0 |
Execution | 4477880 | Release | Discord |
Upgrade binaries
story v1.0.0 (Consensus)
{
"binaries": {
"darwin/amd64": "https://github.com/piplabs/story/releases/download/v1.0.0/story-darwin-amd64",
"darwin/arm64": "https://github.com/piplabs/story/releases/download/v1.0.0/story-darwin-arm64",
"linux/amd64": "https://github.com/piplabs/story/releases/download/v1.0.0/story-linux-amd64",
"linux/arm64": "https://github.com/piplabs/story/releases/download/v1.0.0/story-linux-arm64",
}}
geth v1.0.1 (Execution)
{
"binaries": {
"darwin/amd64": "https://github.com/piplabs/story-geth/releases/download/v1.0.1/geth-darwin-amd64",
"darwin/arm64": "https://github.com/piplabs/story-geth/releases/download/v1.0.1/geth-darwin-arm64",
"linux/amd64": "https://github.com/piplabs/story-geth/releases/download/v1.0.1/geth-linux-amd64",
"linux/arm64": "https://github.com/piplabs/story-geth/releases/download/v1.0.1/geth-linux-arm64",
}}
story v1.1.0 (Consensus)
{
"binaries": {
"darwin/amd64": "https://github.com/piplabs/story/releases/download/v1.1.0/story-darwin-amd64",
"darwin/arm64": "https://github.com/piplabs/story/releases/download/v1.1.0/story-darwin-arm64",
"linux/amd64": "https://github.com/piplabs/story/releases/download/v1.1.0/story-linux-amd64",
"linux/arm64": "https://github.com/piplabs/story/releases/download/v1.1.0/story-linux-arm64",
}}
story v1.1.1 (Consensus)
{
"binaries": {
"darwin/amd64": "https://github.com/piplabs/story/releases/download/v1.1.1/story-darwin-amd64",
"darwin/arm64": "https://github.com/piplabs/story/releases/download/v1.1.1/story-darwin-arm64",
"linux/amd64": "https://github.com/piplabs/story/releases/download/v1.1.1/story-linux-amd64",
"linux/arm64": "https://github.com/piplabs/story/releases/download/v1.1.1/story-linux-arm64",
}}
story v1.1.3 (Consensus)
{
"binaries": {
"darwin/amd64": "https://github.com/piplabs/story/releases/download/v1.1.3/story-darwin-amd64",
"darwin/arm64": "https://github.com/piplabs/story/releases/download/v1.1.3/story-darwin-arm64",
"linux/amd64": "https://github.com/piplabs/story/releases/download/v1.1.3/story-linux-amd64",
"linux/arm64": "https://github.com/piplabs/story/releases/download/v1.1.3/story-linux-arm64",
}}
story v1.2.0 (Consensus)
{
"binaries": {
"darwin/amd64": "https://github.com/piplabs/story/releases/download/v1.2.0/story-darwin-amd64",
"darwin/arm64": "https://github.com/piplabs/story/releases/download/v1.2.0/story-darwin-arm64",
"linux/amd64": "https://github.com/piplabs/story/releases/download/v1.2.0/story-linux-amd64",
"linux/arm64": "https://github.com/piplabs/story/releases/download/v1.2.0/story-linux-arm64",
}}
geth v1.1.0 (Execution)
{
"binaries": {
"darwin/amd64": "https://github.com/piplabs/story-geth/releases/download/v1.1.0/geth-darwin-amd64",
"darwin/arm64": "https://github.com/piplabs/story-geth/releases/download/v1.1.0/geth-darwin-arm64",
"linux/amd64": "https://github.com/piplabs/story-geth/releases/download/v1.1.0/geth-linux-amd64",
"linux/arm64": "https://github.com/piplabs/story-geth/releases/download/v1.1.0/geth-linux-arm64",
}}
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/v1.1.0/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 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: 1.1.0-stable
>Git Commit: fe0d2f85bdc6d8bf39cdfcdb1579c3e10f9a3654
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/v1.2.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 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 v1.2.0-stable
>Git Commit aeb1c48
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="v1.2.0";
git checkout ${vers};
git log -1 --pretty=oneline ;
>aeb1c48958b45cc126307d89ab4bd497d15a2f16 (HEAD, tag: v1.2.0, origin/release/1.2, origin/main, origin/HEAD, main) chore(release): finalize story 1.2.0 stable release (#530)
Build binary and check version & commit
go build -o ./build/story ./client;
cd $HOME/story/build;
./story version;
#output
>Version v1.2.0-stable
>Git Commit aeb1c48
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="v1.1.0";
git checkout ${vers};
git log -1 --pretty=oneline ;
>fe0d2f85bdc6d8bf39cdfcdb1579c3e10f9a3654 (HEAD, tag: v1.1.0, origin/release/1.1) chore(release): finalize story-geth 1.1.0 stable release (#126)
Build binary and check version & commit
make geth
or
go run build/ci.go install ./cmd/geth
cd $HOME/story-geth/build/bin/
./geth version
#output
>Version: 1.1.0-stable
>Git Commit: fe0d2f85bdc6d8bf39cdfcdb1579c3e10f9a3654
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 v1.2.0-stable
>Git Commit aeb1c48
- 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: 1.1.0-stable
>Git Commit: fe0d2f85bdc6d8bf39cdfcdb1579c3e10f9a3654
- Restart the service file:
sudo systemctl restart story_gethd.service && journalctl -u story_gethd -f -o cat