Upgrade 0G Data Availability (DA) Node
Overview
Section titled “Overview”This guide outlines the mandatory update process for the 0G Data Availability (DA) node to version v1.1.2. This update includes critical binary changes and a required update to the DA contract address within your configuration.
Preparation and Backup
Section titled “Preparation and Backup”Before upgrading, stop the current service and secure your existing configuration file. This ensures your BLS keys and environment settings are preserved.
Stop Service and Backup Config
Section titled “Stop Service and Backup Config”Execute the following command to stop the node, backup your config.toml, and clear the previous build directory:
sudo systemctl stop zgda && \cp $HOME/0g-da-node/config.toml $HOME/config.toml.backup && \rm -rf $HOME/0g-da-nodeUpdate and Build Source
Section titled “Update and Build Source”Clone the latest repository and checkout the specific tag for version v1.1.2.
Fetch Latest Code
Section titled “Fetch Latest Code”git clone https://github.com/0glabs/0g-da-node.gitcd $HOME/0g-da-nodegit checkout tags/v1.1.2 -b v1.1.2Compile and Download Parameters
Section titled “Compile and Download Parameters”Rebuild the DA server binary and ensure the cryptographic parameters are present:
cargo build --release./dev_support/download_params.shConfiguration Migration
Section titled “Configuration Migration”This version requires updating the DA contract address. The following steps restore your backup and use sed to perform the address swap automatically.
Restore and Patch Config
Section titled “Restore and Patch Config”mv $HOME/config.toml.backup $HOME/0g-da-node/config.tomlsed -i -e "s|0xDFC8B84e3C98e8b550c7FEF00BCB2d8742d80a69|0x857C0A28A8634614BB2C96039Cf4a20AFF709Aa9|" $HOME/0g-da-node/config.toml| Parameter | Old Value | New Value (v1.1.2) |
|---|---|---|
| DA Contract | 0xDFC8...0a69 | 0x857C...9Aa9 |
Service Restart
Section titled “Service Restart”Apply the changes and restart the DA service infrastructure.
sudo systemctl daemon-reloadsudo systemctl restart zgdaPost-Update Verification
Section titled “Post-Update Verification”Monitor Logs
Section titled “Monitor Logs”Check the service logs to confirm the node has successfully joined the network with the new contract parameters:
sudo journalctl -u zgda.service -f -o catTroubleshooting
Section titled “Troubleshooting”If the node fails to start, verify the following:
- Path Accuracy: Ensure
ExecStartin your systemd file points to the correct$HOME/0g-da-node/target/release/serverpath. - Contract Address: Manually inspect
config.tomlto ensure thelog_contract_addressmatches the new value provided above.