Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
351 changes: 4 additions & 347 deletions NETWORKS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
|-----------------|-----------|------------|----------|---------------|
| tacchain_239-1 | `mainnet` | **Active** | `v1.0.1` | Mainnet |
| tacchain_2391-1 | `testnet` | **Active** | `v1.0.2` | Saint Petersburg Testnet |
| tacchain_2390-1 | `testnet` | **Inactive** | `v0.0.7-testnet` | Turin Testnet |

# Mainnet (`tacchain_239-1`)

Expand All @@ -26,7 +25,7 @@
| Peer 2 | 10550a03e4f7fa487c78fbd07e0770e2b0f085c7@64.46.115.78:58960 |
| Peer 3 | 0efae9d157f0ef60ad7d25507d6939799f832e34@173.244.202.99:58960 |
| Peer 4 | 78079166d06e345dbf4a5c932ee3c69a04148e92@107.6.91.38:58960 |
| Snapshots | http://snapshot.tac.ankr.com/tac-{mainnet,spb,turin}-{full,archive}-latest.{tar.lz4,shasum} |
| Snapshots | http://snapshot.tac.ankr.com/tac-{mainnet,spb}-{full,archive}-latest.{tar.lz4,shasum} |
| - full | http://snapshot.tac.ankr.com/tac-mainnet-full-latest.tar.lz4 |
| - archive | http://snapshot.tac.ankr.com/tac-mainnet-archive-latest.tar.lz4 |
### Hardware Requirements
Expand Down Expand Up @@ -287,7 +286,7 @@ pex = false
| Peer 2 | 04a2152eed9f73dc44779387a870ea6480c41fe7@206.217.210.164:45140 |
| Peer 3 | 5aaaf8140262d7416ac53abe4e0bd13b0f582168@23.92.177.41:45110 |
| Peer 4 | ddb3e8b8f4d051e914686302dafc2a73adf9b0d2@23.92.177.41:45120 |
| Snapshots | http://snapshot.tac.ankr.com/tac-{mainnet,spb,turin}-{full,archive}-latest.{tar.lz4,shasum} |
| Snapshots | http://snapshot.tac.ankr.com/tac-{mainnet,spb}-{full,archive}-latest.{tar.lz4,shasum} |
| - full | http://snapshot.tac.ankr.com/tac-spb-full-latest.tar.lz4 |
| - archive | http://snapshot.tac.ankr.com/tac-spb-archive-latest.tar.lz4 |

Expand Down Expand Up @@ -564,350 +563,8 @@ pex = false

#### 4. Restart validator node and start sentry node.

# Turin Testnet (`tacchain_2390-1`)
# FAQ

| Chain ID | `tacchain_2390-1` |
|-----------------------------|-----------------------------------------------------------------------------------------------|
| Tacchaind version | `v0.0.7-testnet` |
| RPC | <https://turin.tendermint.rpc.tac.build> |
| Genesis | <https://turin.tendermint-rest.rpc.tac.build/genesis> |
| gRPC | <https://turin-grpc.rpc.tac.build> |
| REST API | <https://turin.cosmos-api.rpc.tac.build> |
| EVM JSON RPC | <https://turin.rpc.tac.build> |
| Faucet | <https://turin.faucet.tac.build> |
| EVM Explorer | <https://turin.explorer.tac.build> |
| Cosmos Explorer | <https://turin.bd-explorer.tac.build> |
| Timeout commit (block time) | 3s |
| Peer 1 | f8124878e3526a9814c0a5f865820c5ea7eb26f8@72.251.230.233:45130 |
| Peer 2 | 4a03d6622a2ad923d79e81951fe651a17faf0be8@107.6.94.246:45130 |
| Peer 3 | ea5719fe6587b18ed0fee81f960e23c65c0e0ccc@206.217.210.164:45130 |
| Snapshots | http://snapshot.tac.ankr.com/tac-{mainnet,spb,turin}-{full,archive}-latest.{tar.lz4,shasum} |
| - full | http://snapshot.tac.ankr.com/tac-turin-full-latest.tar.lz4 |
| - archive | http://snapshot.tac.ankr.com/tac-turin-archive-latest.tar.lz4 |
| Staking UI | https://staking.spb.tac.build/ |

#### Hardware Requirements

- CPU: 8 cores
- RAM: 16GB (rpc) / 32GB (validator)
- SSD: 500GB NVMe

### Join Tac Turin Testnet Using Official Snapshots

This example guide connects to testnet. You can replace `chain-id`, `persistent_peers`, `timeout_commit`, `genesis url` with the network you want to join. `--home` flag specifies the path to be used. The example will create [.testnet](.testnet) folder.

### Prerequisites

- [Go >= v1.21](https://go.dev/doc/install)
- jq
- curl
- tar
- lz4
- wget

### 1. Install latest `tacchaind` [v0.0.7-testnet](https://github.com/TacBuild/tacchain/tree/v0.0.7-testnet)

``` shell
git checkout v0.0.7-testnet
make install
```

### 2. Initialize network folder

In this example our node moniker will be `testnode`, don't forget to name your own node differently.

``` sh
tacchaind init testnode --chain-id tacchain_2390-1 --home .testnet
```

### 3. Modify your [config.toml](.testnet/config/config.toml)

``` toml
..
timeout_commit = "3s"
..
persistent_peers = "f8124878e3526a9814c0a5f865820c5ea7eb26f8@72.251.230.233:45130,4a03d6622a2ad923d79e81951fe651a17faf0be8@107.6.94.246:45130,ea5719fe6587b18ed0fee81f960e23c65c0e0ccc@206.217.210.164:45130"
..
```

### 4. Fetch genesis

``` sh
curl https://raw.githubusercontent.com/TacBuild/tacchain/refs/heads/main/networks/tacchain_2390-1/genesis.json > .testnet/config/genesis.json
```

### 5. Fetch snapshot

``` sh
cd .testnet
rm -rf data
wget http://snapshot.tac-turin.ankr.com/tac-turin-full-latest.tar.lz4
lz4 -dc < tac-turin-full-latest.tar.lz4 | tar -xvf -
```

### 6. Start node

``` shell
tacchaind start --chain-id tacchain_2390-1 --home .testnet
```

### Join Tac Turin Testnet Using Docker

#### Prerequisites

- [Go >= v1.21](https://go.dev/doc/install)
- jq
- curl
- lz4
- docker
- docker compose

``` shell
export TAC_HOME="~/.tacchain"
export VERSION="v0.0.7-testnet"

git clone https://github.com/TacBuild/tacchain.git && cd tacchain
mkdir -p $TAC_HOME
cp networks/tacchain_2390-1/{docker-compose.yaml,.env.turin} $TAC_HOME/
git checkout ${VERSION}
docker build -t tacchain:${VERSION} .
cd $TAC_HOME
wget http://snapshot.tac.ankr.com/tac-turin-full-latest.tar.lz4
wget http://snapshot.tac.ankr.com/tac-turin-full-latest.shasum
shasum -c tac-turin-full-latest.shasum
lz4 -dc < tac-turin-full-latest.tar.lz4 | tar -xvf -
docker compose --env-file=.env.turin up -d
## Test
curl -L localhost:45138 -H "Content-Type: application/json" -d '{"jsonrpc": "2.0","method": "eth_blockNumber","params": [],"id": 1}'
```

Assuming all is working you can now proceed from "Join as a validator”


## Join Tac Turin Testnet Manually

This example guide connects to testnet. You can replace `chain-id`, `persistent_peers`, `timeout_commit`, `genesis url` with the network you want to join. `--home` flag specifies the path to be used. The example will create [.testnet](.testnet) folder.

### Prerequisites

- [Go >= 1.23.6](https://go.dev/doc/install)
- jq
- curl

### 1. Install `tacchaind` [v0.0.1](https://github.com/TacBuild/tacchain/tree/v0.0.1)

``` shell
git checkout v0.0.1
make install
```

### 2. Initialize network folder

In this example our node moniker will be `testnode`, don't forget to name your own node differently.

``` sh
tacchaind init testnode --chain-id tacchain_2390-1 --home .testnet
```

### 3. Modify your [config.toml](.testnet/config/config.toml)

``` toml
..
timeout_commit = "3s"
..
persistent_peers = "f8124878e3526a9814c0a5f865820c5ea7eb26f8@72.251.230.233:45130,4a03d6622a2ad923d79e81951fe651a17faf0be8@107.6.94.246:45130,ea5719fe6587b18ed0fee81f960e23c65c0e0ccc@206.217.210.164:45130"
..
```

### 4. Fetch genesis

``` sh
curl https://raw.githubusercontent.com/TacBuild/tacchain/refs/heads/main/networks/tacchain_2390-1/genesis.json > .testnet/config/genesis.json
```

### 5. Start node with `--halt-height` flag.

`--halt-height` flag which will automatically stop your node at specified block height - we want to run `v0.0.1` until block height `1727178`, then we will update our binary before we proceed.

``` shell
tacchaind start --chain-id tacchain_2390-1 --home .testnet --halt-height 1727178
```

### 6. Update binary to [v0.0.2](https://github.com/TacBuild/tacchain/tree/v0.0.2)

Once your node has stopped at specified height, we need to update our binary. This is required because it has breaking changes, which would break our state if run before that point. In this case we enabled EIP712 support.

``` shell
git checkout v0.0.2
make install
```

### 7. Start node with `--halt-height` flag.

We will repeat the same procedure and we need to stop our node once again at specified block, then update our binary.

``` shell
tacchaind start --chain-id tacchain_2390-1 --home .testnet --halt-height 2259069
```

### 8. Update binary to [v0.0.4](https://github.com/TacBuild/tacchain/tree/v0.0.4)

In `v0.0.4` we introduced support for `mcopy`, which is another breaking change.

``` shell
git checkout v0.0.4
make install
```

### 9. Start node with `--halt-height` flag.

We will repeat the same procedure and we need to stop our node once again at specified block, then update our binary.

``` shell
tacchaind start --chain-id tacchain_2390-1 --home .testnet --halt-height 3192449
```

### 10. Update binary to [v0.0.5](https://github.com/TacBuild/tacchain/tree/v0.0.5)

In `v0.0.5` we introduced changes to `DefaultPowerReduction` variable and updated validators state, which is another breaking change.

``` shell
git checkout v0.0.5
make install
```

### 11. Start node

This time we are not going to use `--halt-height` flag, instead we'll wait for our node to hit height `3408172`, at which we applied our next upgrade - `v0.0.6-testnet`. At the specified height, you should see a consensus error stating that you need to upgrade your binary version.

``` shell
tacchaind start --chain-id tacchain_2390-1 --home .testnet
```

### 12. Upgrade binary to [v0.0.6-testnet](https://github.com/TacBuild/tacchain/tree/v0.0.6-testnet)

Once you get the error we mentioned above, you can stop your node and proceed with next update. In this version bumped GETH to v1.13.15.

``` shell
git checkout v0.0.6-testnet
make install
```

### 13. Start node

``` shell
tacchaind start --chain-id tacchain_2390-1 --home .testnet
```

## Join as a validator

NOTE: The provided examples use `--keyring-backend test`. This is not recommended for production validator nodes. Please use `os` or `file` for encryption features and more advanced security.

### 1. Make sure you followed [Join Tac Turin Testnet](#join-tac-turin-testnet) guide and you have a fully synced node to the latest block.

### 2. Fund account and import key

1. Use the [faucet](https://faucet.tac-turin.ankr.com/) to get funds.

2. Export your metamask private key

3. Import private key using the following command. Make sure to replace `<PRIVATE_KEY>` with your funded private key.

``` sh
tacchaind --home .testnet keys unsafe-import-eth-key validator <PRIVATE_KEY> --keyring-backend test
```

### 3. Send `MsgCreateValidator` transaction

1. Generate tx json file

In this example our moniker is `testnode` as named when we initialized our node. Don't forget to replace with your node moniker.

``` sh
echo "{\"pubkey\":$(tacchaind --home .testnet tendermint show-validator),\"amount\":\"1000000000utac\",\"moniker\":\"testnode\",\"identity\":null,\"website\":null,\"security\":null,\"details\":null,\"commission-rate\":\"0.1\",\"commission-max-rate\":\"0.2\",\"commission-max-change-rate\":\"0.01\",\"min-self-delegation\":\"1\"}" > validatortx.json
```

2. Broadcast tx

``` sh
tacchaind --home .testnet tx staking create-validator validatortx.json --from validator --keyring-backend test -y
```

### 4. Delegate more tokens (optional)

In this example our moniker is `testnode` as named when we initialized our node. Don't forget to replace with your node moniker.

``` sh
tacchaind --home .testnet tx staking delegate $(tacchaind --home .testnet q staking validators --output json | jq -r '.validators[] | select(.description.moniker == "testnode") | .operator_address') 1000000000utac --keyring-backend test --from validator -y
```

### 5. Participating in governance (optional)

``` sh
# list all proposals on chain
tacchaind q gov proposals

# once you have identified the proposal (need `proposal_id`) you can place your vote. In the following example we vote with 'yes', alternatively you can vote with 'no'
tacchaind tx gov vote <PROPOSAL_ID> yes --from validator
```

## Validator Sentry Node Setup

Validators are responsible for ensuring that the network can sustain denial of service attacks.

One recommended way to mitigate these risks is for validators to carefully structure their network topology in a so-called sentry node architecture.

Validator nodes should only connect to full-nodes they trust because they operate them themselves or are run by other validators they know socially. A validator node will typically run in a data center. Most data centers provide direct links to the networks of major cloud providers. The validator can use those links to connect to sentry nodes in the cloud. This shifts the burden of denial-of-service from the validator's node directly to its sentry nodes, and may require new sentry nodes be spun up or activated to mitigate attacks on existing ones.

Sentry nodes can be quickly spun up or change their IP addresses. Because the links to the sentry nodes are in private IP space, an internet based attack cannot disturb them directly. This will ensure validator block proposals and votes always make it to the rest of the network.

To setup your sentry node architecture you can follow the instructions below:

### 1. Initialize a new config folder for the sentry node on a new machine with tacchaind binary installed

`tacchaind init <sentry_node_moniker> --chain-id tacchaind_2390-1 --default-denom utac`

- NOTE: This will initialize config folder in $HOME/.tacchaind

- NOTE: Make sure you have replaced your genesis file with the one for Tac Turin Testnet. Example script to download it:
`curl https://raw.githubusercontent.com/TacBuild/tacchain/refs/heads/main/networks/tacchain_2390-1/genesis.json > .testnet/config/genesis.json`

### 2. Update `config.toml` for sentry node

`private_peer_ids` field is used to specify peers that will not be gossiped to the outside world, in our case the validator node we want it to represent. Example: `private_peer_ids = "3e16af0cead27979e1fc3dac57d03df3c7a77acc@3.87.179.235:26656"`

``` toml
..
timeout_commit = "3s"
..
persistent_peers = "f8124878e3526a9814c0a5f865820c5ea7eb26f8@72.251.230.233:45130,4a03d6622a2ad923d79e81951fe651a17faf0be8@107.6.94.246:45130,ea5719fe6587b18ed0fee81f960e23c65c0e0ccc@206.217.210.164:45130"
..
private_peer_ids = "<VALIDATOR_PEER_ID>@<VALIDATOR_IP:PORT>
..
```

- NOTE: Make sure you add persistent peers as described in previous steps for validator setup

### 3. Update `config.toml` for validator node

Using the sentry node setup, our validator node will be represented by our sentry node, therefore it no longer has to be connected with other peers. We will replace `persistent_peers` so it points to our sentry node, this way it can no longer be accessed by the outter world. We will also disable `pex` field.

```toml
..
persistent_peers = <SENTRY_NODE_ID>@<SENTRY_NODE_IP:PORT>
..
pex = false
..
```

### 4. Restart validator node and start sentry node.

## FAQ

**1) I need some funds on the `tacchain_2390-1` testnet, how can I get them?**

You can request testnet tokens for the `tacchain_2390-1` testnet from the faucet available at <https://faucet.tac-turin.ankr.com/>. Please note that the faucet currently dispenses up to 10 TAC per day per address.

**2) I have completed the guide to join as a validator, but my node is not in the active validator set?**
**1) I have completed the guide to join as a validator, but my node is not in the active validator set?**

In order to be included in the active validator set, your validator must have atleast 1 voting power, or if the maximum validators limit has been reached your validator must have greater amount of TAC delegated to them than the validator with lowest amount delegated. Read more - https://forum.cosmos.network/t/why-is-my-newly-created-validator-unbonded/1841/2
Loading
Loading