Skip to content

Commit

Permalink
1
Browse files Browse the repository at this point in the history
  • Loading branch information
takeshi-val committed Jul 12, 2023
1 parent a5999c5 commit e6b5eb5
Show file tree
Hide file tree
Showing 29 changed files with 690 additions and 34 deletions.
6 changes: 2 additions & 4 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ description: >-

<img src="https://github.com/takeshi-val/Logo/raw/main/quicksilver.png" alt="" data-size="line"> [Quicksilver](mainnet/quicksilver/)

<img src="https://github.com/takeshi-val/Logo/raw/main/composable.png" alt="" data-size="line"> [Composable](mainnet/composable/)

## TESTNET

<img src="https://github.com/takeshi-val/Logo/raw/main/althea.png" alt="" data-size="line"> [Althea](testnet/althea/)
Expand All @@ -48,8 +50,4 @@ description: >-

<img src="https://github.com/takeshi-val/Logo/raw/main/quicksilver.png" alt="" data-size="line"> [Quicksilver](testnet/quicksilver/)

{% content-ref url="testnet/althea/" %}
[althea](testnet/althea/)
{% endcontent-ref %}

<img src="https://github.com/takeshi-val/Logo/raw/main/ojo.png" alt="" data-size="line"> [Ojo](testnet/ojo/)
5 changes: 5 additions & 0 deletions docs/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@
* [Snapshot](mainnet/quicksilver/snapshot/README.md)
* [State sync](mainnet/quicksilver/state-sync/README.md)
* [Useful commands](mainnet/quicksilver/useful-commands/README.md)
* [Composable](mainnet/composable/README.md)
* [Installation](mainnet/composable/installation/README.md)
* [Upgrade](mainnet/composable/upgrade/README.md)
* [State sync](mainnet/composable/state-sync/README.md)
* [Useful commands](mainnet/composable/useful-commands/README.md)

## TESTNET

Expand Down
44 changes: 44 additions & 0 deletions docs/mainnet/composable/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Services

<figure><img src="https://github.com/takeshi-val/Logo/raw/main/composable.png" alt=""><figcaption></figcaption></figure>

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

**Chain ID**: centauri-1 | **Latest Version Tag**: v2.3.5 | **Wasm**: OFF

[Website](https://www.composable.finance) | [Discord](https://discord.gg/composable) | [Twitter](https://twitter.com/ComposableFin)


## Chain explorer
[https://explorer.takeshi.team/composable](https://explorer.takeshi.team/composable)

## Public endpoints

* api: [https://composable.api.takeshi.team](https://composable.api.takeshi.team)
* rpc: [https://composable.rpc.takeshi.team](https://composable.rpc.takeshi.team)
* grpc: composable.grpc.takeshi.team:15990

## Peering

**state-sync**

```text
d9bfa29e0cf9c4ce0cc9c26d98e5d97228f93b0b@composable.rpc.takeshi.team:15956
```

**seed-node**

```text
400f3d9e30b69e78a7fb891f60d76fa3c73f0ecc@composable.rpc.takeshi.team:15959
```

**addrbook**
```bash
curl -Ls https://snapshots.takeshi.team/composable/addrbook.json > $HOME/.banksy/config/addrbook.json
```

**live-peers** (30)
```bash
peers="[email protected]:16156,[email protected]:22256,[email protected]:23656,[email protected]:1400,[email protected]:26656,[email protected]:2630,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:22256,[email protected]:22256,[email protected]:22256,[email protected]:22256,[email protected]:2000,[email protected]:3000,[email protected]:22256,[email protected]:22256,[email protected]:26676,[email protected]:26656,[email protected]:3000,[email protected]:53656,[email protected]:26656,[email protected]:2635,[email protected]:26976,[email protected]:3100,[email protected]:26656,[email protected]:26339,[email protected]:15956,[email protected]:26656,[email protected]:20656"
sed -i -e "s|^persistent_peers *=.*|persistent_peers = \"$peers\"|" $HOME/.banksy/config/config.toml
```
138 changes: 138 additions & 0 deletions docs/mainnet/composable/installation/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
---
description: Setting up your validator node has never been so easy. Get your validator running in minutes by following step by step instructions.
---

# Installation

<figure><img src="https://github.com/takeshi-val/Logo/raw/main/composable.png" alt=""><figcaption></figcaption></figure>

**Chain ID**: centauri-1 | **Latest Version Tag**: v2.3.5 | **Custom Port**: 159

### Setup validator name

{% hint style='info' %}
Replace **YOUR_MONIKER_GOES_HERE** with your validator name
{% endhint %}

```bash
MONIKER="YOUR_MONIKER_GOES_HERE"
```

### Install dependencies

#### Update system and install build tools

```bash
sudo apt -q update
sudo apt -qy install curl git jq lz4 build-essential
sudo apt -qy upgrade
```

#### Install Go

```bash
sudo rm -rf /usr/local/go
curl -Ls https://go.dev/dl/go1.20.5.linux-amd64.tar.gz | sudo tar -xzf - -C /usr/local
eval $(echo 'export PATH=$PATH:/usr/local/go/bin' | sudo tee /etc/profile.d/golang.sh)
eval $(echo 'export PATH=$PATH:$HOME/go/bin' | tee -a $HOME/.profile)
```

### Download and build binaries

```bash
# Clone project repository
cd $HOME
rm -rf composable-centauri
git clone https://github.com/notional-labs/composable-centauri.git
cd composable-centauri
git checkout v2.3.5

# Build binaries
make build

# Prepare binaries for Cosmovisor
mkdir -p $HOME/.banksy/cosmovisor/genesis/bin
mv bin/banksyd $HOME/.banksy/cosmovisor/genesis/bin/
rm -rf build

# Create application symlinks
sudo ln -s $HOME/.banksy/cosmovisor/genesis $HOME/.banksy/cosmovisor/current -f
sudo ln -s $HOME/.banksy/cosmovisor/current/bin/banksyd /usr/local/bin/banksyd -f
```

### Install Cosmovisor and create a service

```bash
# Download and install Cosmovisor
go install cosmossdk.io/tools/cosmovisor/cmd/[email protected]

# Create service
sudo tee /etc/systemd/system/banksyd.service > /dev/null << EOF
[Unit]
Description=composable node service
After=network-online.target
[Service]
User=$USER
ExecStart=$(which cosmovisor) run start
Restart=on-failure
RestartSec=10
LimitNOFILE=65535
Environment="DAEMON_HOME=$HOME/.banksy"
Environment="DAEMON_NAME=banksyd"
Environment="UNSAFE_SKIP_BACKUP=true"
Environment="PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:$HOME/.banksy/cosmovisor/current/bin"
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable banksyd
```

### Initialize the node

```bash
# Set node configuration
banksyd config chain-id centauri-1
banksyd config keyring-backend file
banksyd config node tcp://localhost:15957

# Initialize the node
banksyd init $MONIKER --chain-id centauri-1

# Download genesis and addrbook
curl -Ls https://snapshots.takeshi.team/composable/genesis.json > $HOME/.banksy/config/genesis.json
curl -Ls https://snapshots.takeshi.team/composable/addrbook.json > $HOME/.banksy/config/addrbook.json

# Add seeds
sed -i -e "s|^seeds *=.*|seeds = \"400f3d9e30b69e78a7fb891f60d76fa3c73f0ecc@composable.rpc.takeshi.team:15959\"|" $HOME/.banksy/config/config.toml

# Set minimum gas price
sed -i -e "s|^minimum-gas-prices *=.*|minimum-gas-prices = \"0ppica\"|" $HOME/.banksy/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/.banksy/config/app.toml

# Set custom ports
sed -i -e "s%^proxy_app = \"tcp://127.0.0.1:26658\"%proxy_app = \"tcp://127.0.0.1:15958\"%; s%^laddr = \"tcp://127.0.0.1:26657\"%laddr = \"tcp://127.0.0.1:15957\"%; s%^pprof_laddr = \"localhost:6060\"%pprof_laddr = \"localhost:15960\"%; s%^laddr = \"tcp://0.0.0.0:26656\"%laddr = \"tcp://0.0.0.0:15956\"%; s%^prometheus_listen_addr = \":26660\"%prometheus_listen_addr = \":15966\"%" $HOME/.banksy/config/config.toml
sed -i -e "s%^address = \"tcp://0.0.0.0:1317\"%address = \"tcp://0.0.0.0:15917\"%; s%^address = \":8080\"%address = \":15980\"%; s%^address = \"0.0.0.0:9090\"%address = \"0.0.0.0:15990\"%; s%^address = \"0.0.0.0:9091\"%address = \"0.0.0.0:15991\"%; s%:8545%:15945%; s%:8546%:15946%; s%:6065%:15965%" $HOME/.banksy/config/app.toml
```

### Download latest chain snapshot

```bash
curl -L https://snapshots.takeshi.team/composable/snapshot_latest.tar.lz4 | tar -Ilz4 -xf - -C $HOME/.banksy
[[ -f $HOME/.banksy/data/upgrade-info.json ]] && cp $HOME/.banksy/data/upgrade-info.json $HOME/.banksy/cosmovisor/genesis/upgrade-info.json
```

### Start service and check the logs

```bash
sudo systemctl start banksyd && sudo journalctl -u banksyd -f --no-hostname -o cat
```
44 changes: 44 additions & 0 deletions docs/mainnet/composable/snapshot/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
description: Catch the latest block faster by using our daily snapshots.
---

# Snapshot

<figure><img src="https://github.com/takeshi-val/Logo/raw/main/composable.png" alt=""><figcaption></figcaption></figure>

{% hint style='info' %}
Snapshots allows a new node to join the network by recovering application state from a backup file.
Snapshot contains compressed copy of chain data directory. To keep backup files as small as plausible,
snapshot server is periodically beeing state-synced.
{% endhint %}

Snapshots are taken automatically every 6 hours starting at **10:15 UTC**

**pruning**: 100/0/19 | **indexer**: null | **version tag**: v2.3.5

| BLOCK | AGE | DOWNLOAD |
| ----------------- | --------------- | --------------------------------------------------------------------------------------------------- |
| 140848 | 22 minutes | [snapshot (0.2 GB)](https://snapshots.takeshi.team/composable/snapshot\_latest.tar.lz4) |

## Instructions

### Stop the service and reset the data

```bash
sudo systemctl stop banksyd
cp $HOME/.banksy/data/priv_validator_state.json $HOME/.banksy/priv_validator_state.json.backup
rm -rf $HOME/.banksy/data
```

### Download latest snapshot

```bash
curl -L https://snapshots.takeshi.team/composable/snapshot_latest.tar.lz4 | tar -Ilz4 -xf - -C $HOME/.banksy
mv $HOME/.banksy/priv_validator_state.json.backup $HOME/.banksy/data/priv_validator_state.json
```

### Restart the service and check the log

```bash
sudo systemctl start banksyd && sudo journalctl -u banksyd -f --no-hostname -o cat
```
52 changes: 52 additions & 0 deletions docs/mainnet/composable/state-sync/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
---
description: With our state sync services you will be able to catch up latest chain block in matter of minutes
---

# State sync

<figure><img src="https://github.com/takeshi-val/Logo/raw/main/composable.png" alt=""><figcaption></figcaption></figure>

{% hint style='info' %}
State Sync allows a new node to join the network by fetching a snapshot of the application state
at a recent height instead of fetching and replaying all historical blocks. Since the
application state is generally much smaller than the blocks, and restoring it is much
faster than replaying blocks, this can reduce the time to sync with the network from days to minutes.
{% endhint %}

## Instructions

### Stop the service and reset the data

```bash
sudo systemctl stop banksyd
cp $HOME/.banksy/data/priv_validator_state.json $HOME/.banksy/priv_validator_state.json.backup
banksyd tendermint unsafe-reset-all --keep-addr-book --home $HOME/.banksy
```

### Get and configure the state sync information

```bash
STATE_SYNC_RPC=https://composable.rpc.takeshi.team:443
STATE_SYNC_PEER=d9bfa29e0cf9c4ce0cc9c26d98e5d97228f93b0b@composable.rpc.takeshi.team:15956
LATEST_HEIGHT=$(curl -s $STATE_SYNC_RPC/block | jq -r .result.block.header.height)
SYNC_BLOCK_HEIGHT=$(($LATEST_HEIGHT - 1000))
SYNC_BLOCK_HASH=$(curl -s "$STATE_SYNC_RPC/block?height=$SYNC_BLOCK_HEIGHT" | jq -r .result.block_id.hash)

sed -i \
-e "s|^enable *=.*|enable = true|" \
-e "s|^rpc_servers *=.*|rpc_servers = \"$STATE_SYNC_RPC,$STATE_SYNC_RPC\"|" \
-e "s|^trust_height *=.*|trust_height = $SYNC_BLOCK_HEIGHT|" \
-e "s|^trust_hash *=.*|trust_hash = \"$SYNC_BLOCK_HASH\"|" \
-e "s|^persistent_peers *=.*|persistent_peers = \"$STATE_SYNC_PEER\"|" \
$HOME/.banksy/config/config.toml

mv $HOME/.banksy/priv_validator_state.json.backup $HOME/.banksy/data/priv_validator_state.json
```



### Restart the service and check the log

```bash
sudo systemctl start banksyd && sudo journalctl -u banksyd -f --no-hostname -o cat
```
18 changes: 18 additions & 0 deletions docs/mainnet/composable/upgrade/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
description: Prepare for and the upcomming chain upgrade using Cosmovisor.
---

# Upgrade

<figure><img src="https://github.com/takeshi-val/Logo/raw/main/composable.png" alt=""><figcaption></figcaption></figure>

**Chain ID**: centauri-1 | **Latest Version Tag**: v2.3.5 | **Custom Port**: 159

{% hint style='info' %}
Since we are using Cosmovisor, it makes it very easy to prepare for upcomming upgrade.
You just have to build new binaries and move it into cosmovisor upgrades directory.
{% endhint %}

{% hint style='warning' %}
Currently there are no upgrades available for centauri-1!
{% endhint %}
Loading

0 comments on commit e6b5eb5

Please sign in to comment.