Shibarium v1.1.0

Heimdall and Bor upgrades and hardforks

We have released a new version of Bor and Heimdall - v1.1.0-bone , v1.0.2-bone respectively with the following hardforks: Delhi, Sanghai and Indore for Bor and Aalborg for Heimdall. We have added a new CLI in Bor and have also changed the way Bor is deployed to follow DevOps best practices and make it easier to manage the processes. This upgrade is backward incompatible.

These are the expected dates and block numbers when and where those updates will take place:

Shibarium Bor HF -- May 2nd @12PM IST @@4504576

Shibarium Heimdall HF — May 3rd @10AM IST @@3941864

You can find the detailed changes on the Github repo of the protocol:

Index

Deployment changes

Please read the major changes in Bor from the deployment perspective below before upgrading your node.

Changes in Bor

  1. Provide a new approach to install Bor binary with a shell script: GitHub - shibaone/install 79.

  2. Recommend default Bor home is changed from ~/.bor to /var/lib/bor.

  3. bor/start.sh is retired. We recommend moving flags from start.sh to /var/lib/bor/config.toml, which will be the single config file for all Bor configurations. Example config TOML files can be found in GitHub shibaone/launch: Shibarium network mainnet v1 launch.

  4. A new user named bor will be created during package installation if it doesn’t exist. This user will be running the Bor service.

  5. Move bor.service file from /etc/systemd/system to /lib/systemd/system

  6. CLI flag changes.

  7. Bor profiles can be used with new hosts only, please note existing installations will not be able to take advantage of the profiles.

  8. Bor packaging installation is now simplified to sudo dpkg -i bor-$version-$arch.deb

  9. Bor profile installation for new hosts is accomplished by running sudo dpkg -i bor-$network-$nodetype-config_$version-$arch.deb

Changes in Heimdall

  1. Provide a new approach to install Heimdall binary with a shell script: GitHub - shibaone/install.

  2. Remove bridge binary and add it as a subcommand in heimdalld.

  3. Remove heimdalld-rest-server.service and heimdalld-bridge.service, and move heimdalld.service file from /etc/systemd/system to /lib/systemd/system.

  4. Change default Heimdall home from ~/.heimdalld to /var/lib/heimdall.

  5. A new user named heimdall will be created during package installation if it doesn’t exist. This user will be running the Heimdall service.

  6. Heimdall packaging installation is now simplified to sudo dpkg -i heimdalld-$version-$arch.deb

  7. Heimdall profile installation for new hosts is accomplished by running sudo dpkg -i heimdalld-$network-$nodetype-config_$version-$arch.deb

Hardfork changes

Bor hardforks

Indore Hardfork

This hardfork revolves around 2 proposals: an increase in the calculation of state sync confirmations and a delay of 128 seconds on state sync confirmation. It addresses a state sync bug arising from network partitions with reorg lengths exceeding the sprint length. This bug affects the calculation of state sync events, potentially leading to errors in node synchronization. The proposed modifications aim to calculate state sync parameters dynamically, ensuring consistency across the network and mitigating synchronization errors.

Shanghai hardforks

Shangai hardfork encompasses Ethereum’s Shangai upgrade to the Shibarium network, a proposal to introduce more visibility of state-sync transactions and changes to the burn system.

Shanghai block

This hardfork activates some new Ethereum features serving to improve the network functionalities.

It enables some specific EIPs such, as EIP-3651 (Warm COINBASE), EIP-3855 (PUSH0 instruction), EIP-3860 (Limit and meter initcode), and EIP-6049 (Deprecate SELFDESTRUCT).

Warm COINBASE Address

This proposal suggests warming the COINBASE address at the start of transaction execution to align its access cost with its significance.

Current access list frameworks initialize COINBASE as cold, leading to overpriced access. Warming it would promote ETH as the primary means of transaction payment.

Introduction of PUSH0 Instruction

As many instructions require zero values, and the current method incurs additional gas costs and code size, this proposal introduces the PUSH0 instruction to efficiently push zero onto the stack, reducing code size and optimizing contract deployment.

MAX_INITCODE_SIZE Limit and Meter Initcode

To ensure fair charging for initcode execution and simplify EVM engines, this proposal introduces a maximum size limit for initcode and charges gas for every 32-byte chunk to represent jumpdest-analysis cost.

Deprecation of SELFDESTRUCT Opcode

This EIP deprecates the use of the SELFDESTRUCT opcode, warning against its continued use due to ongoing discussions about potential changes to its functionality.

The documentation for SELFDESTRUCT is updated to advise against its usage, indicating a potential breaking change in the future.

State Receiver Genesis Contract Enhancement

This proposal aims to enhance the observability of state-sync transactions on the Shibarium network by adding event emission to the state-receiver genesis contract. The event, named StateCommitted, provides information on the success of stateID execution.

Presently, failure of stateID execution due to recipient contract issues isn't logged, potentially hindering developers' progress. This proposal seeks to address this by improving the visibility of state-sync transaction outcomes.

Heimdall Hardfork

Aalborg Hardfork

Current probabilistic finality can lead to chain reorganizations, negatively impacting user experience. This hardfork introduces milestones to achieve deterministic finality on the Shibarium network, enhancing transaction confirmation reliability.

Milestones are proposed based on a consensus mechanism involving Tendermint and Bor, ensuring finality and preventing reorganizations.

Upgrade instructions

Steps to Migrate to the new version:

Stop all the services

sudo service bor stop
sudo service heimdalld stop
sudo service heimdalld-bridge stop
sudo service heimdalld-rest-server stop

Create a backup for service and binary

cd ~
mkdir backup

# Use the path of your bor.service file
sudo mv /etc/systemd/system/bor.service ./backup
sudo mv /etc/systemd/system/heimdalld.service ./backup
sudo mv /etc/systemd/system/heimdalld-rest-server.service ./backup
sudo mv /etc/systemd/system/heimdalld-bridge.service ./backup

sudo mv "$(command -v go)" "$(command -v bor)" "$(command -v heimdalld)" "$(command -v heimdallcli)" ./backup

Upgrade Go version

wget https://raw.githubusercontent.com/shibaone/node-ansible/master/go-install.sh && bash go-install.sh

source /home/ubuntu/.bashrc

go version

expected result = go version go1.20.7 linux/amd64

Install Heimdall and Bor with a version tag, network name ( puppynet,shibarium) and node type (sentry, validator, or archive).

# Replace the network and node type

curl -L https://raw.githubusercontent.com/shibaone/install/bone/heimdall.sh | bash -s -- v1.0.2-bone <network> <node_type>

curl -L https://raw.githubusercontent.com/shibaone/install/bone/bor.sh | bash -s -- v1.1.0-bone <network> <node_type>

Check Heimdall & Bor Version

#check heimdall version 
/usr/bin/heimdalld version
#Output - v1.0.2-bone

# Check bor version
/usr/bin/bor version
# Output - v1.1.0--bone

Set the old Heimdall / Bor home directory path, and export it. This will be used, whenever needed, moving forward.

# Note: in this case, the old heimdall directory is `/data/heimdalld`.
# Modify it according to your setup.

export OLD_HEIMDALL_HOME=/data/heimdalld
sudo chown -R heimdall $OLD_HEIMDALL_HOME
sudo rm -rf /var/lib/heimdall
sudo ln -nfs $OLD_HEIMDALL_HOME /var/lib/heimdall
sudo chown -R heimdall /var/lib/heimdall


# Note: in this case, the old bor directory is `/data/bor`.
# Modify it according to your setup.

export OLD_BOR_HOME=/data/bor
sudo chown -R bor $OLD_BOR_HOME
sudo ln -nfs $OLD_BOR_HOME/data /var/lib/bor/data
sudo ln -nfs $OLD_BOR_HOME/keystore /var/lib/bor/keystore # only for validator node
sudo ln -nfs $OLD_BOR_HOME/password.txt /var/lib/bor/password.txt # only for validator node
sudo ln -nfs $OLD_BOR_HOME/address.txt /var/lib/bor/address.txt # only for validator node
sudo chown -R bor /var/lib/bor

Check and edit the heimdalld.service & bor.service file to make any changes if required. You can skip this step if the Heimdall / Bor package is installed with the correct network and node type arguments in step 2. Check and edit the heimdalld.service file to make any changes if required (like adding a bridge flag --bridge --all for validators)

sudo vi /lib/systemd/system/heimdalld.service

sudo vi /lib/systemd/system/bor.service

Example of heimdall.service file:

#Example heimdalld.service file for reference
[Unit]
  Description=heimdalld
  StartLimitIntervalSec=500
  StartLimitBurst=5
[Service]
  Restart=on-failure
  RestartSec=5s
  WorkingDirectory=/usr/bin
  ExecStart=/usr/bin/heimdalld start --home /var/lib/heimdall \
    --chain=shibarium \
    --rest-server
  Type=simple
  LimitNOFILE=65536
  User=heimdall
[Install]
  WantedBy=multi-user.target

Example of bor.service file:

[Unit]
  Description=bor
  StartLimitIntervalSec=500
  StartLimitBurst=5

[Service]
  Restart=on-failure
  RestartSec=5s
  ExecStart=/usr/bin/bor server -config "/var/lib/bor/config.toml"
  Type=simple
  KillSignal=SIGINT
  User=bor
  TimeoutStopSec=120

[Install]
  WantedBy=multi-user.target

Update the configuration/flags in config.toml,

#Update bor config.toml
sudo vi /var/lib/bor/config.toml

#### Manual Entry
### On all instance un-comment and add static-node in P2p.discovery section

sudo sed -i 's|# static-nodes = \[\]|static-nodes = \["enode://1711a371c7ae1c1f029d0c3eb58d7e875901ee9990dafe6969f86027cca7fa462455be641560a1e25dd09138cf57163c7c19d784247874f60b2a206b61a03e2b@44.204.200.100:30303", "enode://1efa5518ab2515b6fbbe1dc99b8bede1bf8fa373e2753e0819369e711ba0f56f00d71b17ca85ba3a56c4909cc7b1cf65ca2f53bfc483542a93bc67318dfdfa45@18.136.201.99:30303", "enode://d97215a5e3cff60e3f001aa2c91bed2d28101e7513681abe1254a667c4232ccd9143985f3225a3f86c8247cf3c91a355ec2a2cfea500ea203014e625a2aee2a7@3.99.233.157:30303", "enode://eecf40b37c1d813f6598f878cff41a03016d0087d7800cd30b4ccd41494bd34ef03a7ab38772adc00eaaec924dd3ac43c9282392c116e4212f0794acc169608e@18.185.177.78:30303", "enode://03d5616779bc4109bcfa8cea10423411f1c2872f26b49863cfadc4fde88f0bdf7a56ef31d1ec9699b3a54342013d257184cd9b9480cf632a32b458cd7b6e2a6a@63.32.53.219:30303", "enode://1a77650d2a202bd1ffe9bd8b147468f68f2988e63106dd317503a74ebf779ad068b8ce5027136152100ec11694d2980bc1419c5a137c8c92e51368c1f0c655ec@15.164.177.189:30303", "enode://455c8e9776cf35592b528cb046d56400ff361b1ca9ce833205e4dc41e45bdf7fbc5e50dfd147037f7357a7115169a461dae2474f50697771871febb00ee2974f@52.12.214.141:30303"\]|g' /var/lib/bor/config.toml

#On Validators un-comment and update following fields
keystore = "/var/lib/bor/keystore"
password = "/var/lib/bor/password.txt"
unlock = ["validator_signer_address"]
etherbase = "validator_signer_address"

### update owner
sudo chown bor /var/lib/bor/config.toml

For better monitoring of the overall network and conditions of the node, we have hosted ethstats dashboard . We would advise all the nodes to use the public endpoint for sending data (if you’re not sending it to some other internal endpoint). The endpoint can be configured in the config file itself and is of the format: <node_identifier>:shibarium@shibarium-eth-stats.shibariumscan.io:3000

ex- ethstats = "explorer-archive-rpc:shibarium@shibarium-eth-stats.shibariumscan.io:3000”

We would encourage you to use a non-existing and understandable identifier. This dashboard would also help us in alerting in case the nodes are not working properly (e.g. if they’re constantly out of sync).

Open the file /var/lib/bor/config.toml in your favorite text editor and edit the value for ethstats:

ethstats = "<node_identifier>:shibarium@shibarium-eth-stats.shibariumscan.io:3000"

Also to monitor Heimdall, We have set up the telemetry service. Instruction is available here:

Mainnet Heimdall monitoring Telemetry Service.

Ensure that all the values have been populated correctly in the Bor config file /var/lib/bor/config.toml.

Restart system processes:

sudo systemctl daemon-reload
sudo systemctl start heimdalld.service
# Monitor heimdall service
journalctl -u heimdalld.service -f 

sudo systemctl start bor
# Monitor bor service
journalctl -u bor.service -f 

Last updated