# installation

## Installation

The complete infrastructure for cross-chain smart contracts, applications, and modular functionality.

**Chain ID**: sgenet-1 | **Latest Version Tag**: v1.1.1 | **Wasm**: OFF

### Chain explorer

<https://ping.pub/sge>

### Public endpoints

* rpc: [https://rpc-sge.offellnode.top](https://rpc-sge.offellnode.top/)
* api: [https://api-sge.offellnode.top](https://rpc-sge.offellnode.top/)
* grpc: [https://grpc-sge.offellnode.top](https://rpc-sge.offellnode.top/)

### Peering

**seed-node**

```
6a727128f427d166d90a1185c7965b178235aaee@rpc.sge.nodestake.top:666,e752327338c0141b946ec54f85d51f450c4ad643@46.250.237.163:26656
```

## Installation

**Chain ID**: sgenet-1 | **Latest Version Tag**: v1.1.1 |

## Install dependencies

**Update system and install build tools**

```bash
sudo apt -q update
sudo apt -qy install curl git jq lz4 build-essential tmux libgmp3-dev flex bison
sudo apt -qy upgrade
```

**Install Go**

```bash
rm -rf $HOME/go
sudo rm -rf /usr/local/go
cd $HOME
curl https://dl.google.com/go/go1.19.5.linux-amd64.tar.gz | sudo tar -C/usr/local -zxvf -
cat <<'EOF' >>$HOME/.profile
export GOROOT=/usr/local/go
export GOPATH=$HOME/go
export GO111MODULE=on
export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin
EOF
source $HOME/.profile
go version
```

**Download and build binaries**

<pre class="language-bash"><code class="lang-bash"># Clone project repository
<strong>cd $HOME
</strong>rm -rf sge
git clone https://github.com/sge-network/sge
cd sge
git checkout v1.1.1
make install
sged version
</code></pre>

**Initialize Node & Genesis**

```bash
sged init NodeName --chain-id=sgenet-1
```

**Download Genesis**

```bash
curl -Ls wget https://offellnode.s3.ap-southeast-1.amazonaws.com/sge/genesis.json > $HOME/.stchaind/config/genesis.json 
```

#### Create a service

```bash
sudo tee /etc/systemd/system/sged.service > /dev/null <<EOF
[Unit]
Description=sged Daemon
After=network-online.target
[Service]
User=$USER
ExecStart=$(which sged) start
Restart=always
RestartSec=3
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable sged
```

#### Initialize the node

```bash
# Set node configuration
sged config chain-id sgenet-1
sged config keyring-backend file

# Add seeds
sed -i -e "s|^seeds *=.*|seeds = \"6a727128f427d166d90a1185c7965b178235aaee@rpc.sge.nodestake.top:666,e752327338c0141b946ec54f85d51f450c4ad643@46.250.237.163:26656\"|" $HOME/.sge/config/config.toml

# Set minimfum gas price
sed -i -e "s|^minimum-gas-prices *=.*|minimum-gas-prices = \"1000000000wei\"|" $HOME/.sge/config/app.toml

# Set pruning
sed -i \
  -e 's|^pruning *=.*|pruning = "custom"|' \
  -e 's|^pruning-keep-recent *=.*|pruning-keep-recent = "100"|' \
  -e 's|^pruning-keep-every *=.*|pruning-keep-every = "0"|' \
  -e 's|^pruning-interval *=.*|pruning-interval = "19"|' \
  $HOME/.sge/config/app.toml
```

#### Start service and check the logs

```bash
sudo systemctl start sged && sudo journalctl -u sged -f --no-hostname -o cat
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://guides.offellnode.top/nodes-mainnet/sge/installation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
