Skip to content

Commit

Permalink
Merge branch 'main' of github-tnv1.com:nucleic-network/nucleic into r…
Browse files Browse the repository at this point in the history
…ollup
  • Loading branch information
tnv1 committed May 19, 2024
2 parents 1ac8b9f + a7bc70e commit d81ad96
Show file tree
Hide file tree
Showing 7 changed files with 111 additions and 98 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
go-version: "1.22"
- uses: actions/checkout@v4
- name: golangci-lint
uses: golangci/golangci-lint-action@v5
uses: golangci/golangci-lint-action@v6
with:
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
version: latest
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ require (
)

require (
cosmossdk.io/api v0.7.4
cosmossdk.io/api v0.7.5
cosmossdk.io/client/v2 v2.0.0-beta.1
cosmossdk.io/core v0.12.0
cosmossdk.io/errors v1.0.1
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -603,8 +603,8 @@ cloud.google.com/go/workflows v1.7.0/go.mod h1:JhSrZuVZWuiDfKEFxU0/F1PQjmpnpcoIS
cloud.google.com/go/workflows v1.8.0/go.mod h1:ysGhmEajwZxGn1OhGOGKsTXc5PyxOc0vfKf5Af+to4M=
cloud.google.com/go/workflows v1.9.0/go.mod h1:ZGkj1aFIOd9c8Gerkjjq7OW7I5+l6cSvT3ujaO/WwSA=
cloud.google.com/go/workflows v1.10.0/go.mod h1:fZ8LmRmZQWacon9UCX1r/g/DfAXx5VcPALq2CxzdePw=
cosmossdk.io/api v0.7.4 h1:sPo8wKwCty1lht8kgL3J7YL1voJywP3YWuA5JKkBz30=
cosmossdk.io/api v0.7.4/go.mod h1:IcxpYS5fMemZGqyYtErK7OqvdM0C8kdW3dq8Q/XIG38=
cosmossdk.io/api v0.7.5 h1:eMPTReoNmGUm8DeiQL9DyM8sYDjEhWzL1+nLbI9DqtQ=
cosmossdk.io/api v0.7.5/go.mod h1:IcxpYS5fMemZGqyYtErK7OqvdM0C8kdW3dq8Q/XIG38=
cosmossdk.io/client/v2 v2.0.0-beta.1 h1:XkHh1lhrLYIT9zKl7cIOXUXg2hdhtjTPBUfqERNA1/Q=
cosmossdk.io/client/v2 v2.0.0-beta.1/go.mod h1:JEUSu9moNZQ4kU3ir1DKD5eU4bllmAexrGWjmb9k8qU=
cosmossdk.io/collections v0.4.0 h1:PFmwj2W8szgpD5nOd8GWH6AbYNi1f2J6akWXJ7P5t9s=
Expand Down
58 changes: 32 additions & 26 deletions testnets/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Eve Network Testnet
# Eve Testnet

This testnet will start with the node version `0.0.2`.
This testnet will start with the node version `v0.0.3`.

## Minimum hardware requirements

Expand All @@ -15,55 +15,61 @@ This testnet will start with the node version `0.0.2`.
```bash
git clone https://github.com/eve-network/eve.git
cd eve
git checkout v0.0.2
git checkout v0.0.3
make install
```

### Check Node version

```bash
# Get node version (should be v0.0.2)
# Get node version (should be v0.0.3)
eved version

# Get node long version (should be 25e1602d5a29e4ab49addda7e4178b50894999df)
# Get node long version (should be 1f0f1f82a8225b23341bbabd2a034ce7415d7e3d)
eved version --long | grep commit
```

### Initialize Chain

```bash
rm -rf ~/.eved
eved init develop --chain-id=evenetwork-1
eved init MONIKER --chain-id=evenetwork-1
```

### Replace pre-genesis
### Download pre-genesis

```bash
# Download the file
curl -s https://raw.githubusercontent.com/eve-network/eve/main/testnets/genesis.json > ~/.eved/config/genesis.json

# Calculate the SHA256 checksum
calculated_checksum=$(shasum -a 256 ~/.eved/config/genesis.json | awk '{ print $1 }')

# Compare with the expected checksum
expected_checksum="244d5a3999dd0851eb338b032a57fbea24a89b4016a7907a9d20c2045c689857"
if [ "$calculated_checksum" = "$expected_checksum" ]; then
echo "---> Checksum is CORRECT."
else
echo "---> Checksum is INCORRECT."
fi
curl -s https://raw.githubusercontent.com/eve-network/eve/main/testnets/pre_genesis.json > ~/.eved/config/genesis.json
```

## Run node
## Create gentx

### Setup seeds
Create wallet

```bash
export PERSISTENT_SEEDS="[email protected]:26656"
eved keys add KEY_NAME
```

### Run node with persistent peers
Fund yourself `1000000000ueve`

```bash
eved start --p2p.persistent_peers=$PERSISTENT_SEEDS
eved genesis add-genesis-account $(eved keys show KEY_NAME -a) 1000000000ueve
```

Use half (`1000000ueve`) for self-delegation

```bash
eved genesis gentx KEY_NAME 1000000ueve --chain-id=evenetwork-1
```

If all goes well, you will see a message similar to the following:

```bash
Genesis transaction written to "/home/user/.eved/config/gentx/gentx-******.json"
```

### Submit genesis transaction

- Fork this repo
- Copy the generated gentx json file to `testnets/gentx/`
- Commit and push to your repo
- Create a PR on this repo
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"body":{"messages":[{"@type":"/cosmos.staking.v1beta1.MsgCreateValidator","description":{"moniker":"moniker","identity":"","website":"","security_contact":"","details":""},"commission":{"rate":"0.010000000000000000","max_rate":"0.020000000000000000","max_change_rate":"0.010000000000000000"},"min_self_delegation":"1","delegator_address":"","validator_address":"evevaloper1rxhgy8s6v2k92327wxcnstt90hutg74erfy6p4","pubkey":{"@type":"/cosmos.crypto.ed25519.PubKey","key":"twugC8UxR/HYxd2uKPENQyyfABs7rPCK9pdkAjZh7IU="},"value":{"denom":"ueve","amount":"1000000"}}],"memo":"[email protected]:26656","timeout_height":"0","extension_options":[],"non_critical_extension_options":[]},"auth_info":{"signer_infos":[{"public_key":{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"AroJ/ByRvIuHxjZ4U7DAiWhJjfiDb9hnEZqkebC/843f"},"mode_info":{"single":{"mode":"SIGN_MODE_DIRECT"}},"sequence":"0"}],"fee":{"amount":[],"gas_limit":"200000","payer":"","granter":""},"tip":null},"signatures":["KJ7609TWtk9OeBTH4UxgfcSQyn7Yp9GAgJ0OQvV6KfxB2CFy6G+Z0xeTA58eY0pxuxNw/F/BDPGfVwq4QTqlEA=="]}
73 changes: 5 additions & 68 deletions testnets/genesis.json → testnets/pre_genesis.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"app_name": "eved",
"app_version": "0.0.2-2-g034fc8b",
"genesis_time": "2024-04-29T09:42:14.116411Z",
"app_version": "0.0.2-9-g1f0f1f8",
"genesis_time": "2024-05-14T05:27:23.546692Z",
"chain_id": "evenetwork-1",
"initial_height": 1,
"app_hash": null,
Expand Down Expand Up @@ -34,7 +34,7 @@
"accounts": [
{
"@type": "/cosmos.auth.v1beta1.BaseAccount",
"address": "eve1j0vxxht5perz4nddms6qwu46ng8g0zfwtce75s",
"address": "eve1rxhgy8s6v2k92327wxcnstt90hutg74ezpcwqj",
"pub_key": null,
"account_number": "0",
"sequence": "0"
Expand All @@ -51,7 +51,7 @@
},
"balances": [
{
"address": "eve1j0vxxht5perz4nddms6qwu46ng8g0zfwtce75s",
"address": "eve1rxhgy8s6v2k92327wxcnstt90hutg74ezpcwqj",
"coins": [
{
"denom": "ueve",
Expand Down Expand Up @@ -148,70 +148,7 @@
"forward_relayers": []
},
"genutil": {
"gen_txs": [
{
"body": {
"messages": [
{
"@type": "/cosmos.staking.v1beta1.MsgCreateValidator",
"description": {
"moniker": "moniker",
"identity": "",
"website": "",
"security_contact": "",
"details": ""
},
"commission": {
"rate": "0.010000000000000000",
"max_rate": "0.020000000000000000",
"max_change_rate": "0.010000000000000000"
},
"min_self_delegation": "1",
"delegator_address": "",
"validator_address": "evevaloper1j0vxxht5perz4nddms6qwu46ng8g0zfw2s924h",
"pubkey": {
"@type": "/cosmos.crypto.ed25519.PubKey",
"key": "zZTMTnuKCXJ6UhInxn7891LPCid0yxLrQDIbDUV9GCc="
},
"value": {
"denom": "ueve",
"amount": "1000000"
}
}
],
"memo": "[email protected]:26656",
"timeout_height": "0",
"extension_options": [],
"non_critical_extension_options": []
},
"auth_info": {
"signer_infos": [
{
"public_key": {
"@type": "/cosmos.crypto.secp256k1.PubKey",
"key": "AsrulhlQ3ucCmambEhP+RlseBcQTT6SxCgls/Yn8GYqs"
},
"mode_info": {
"single": {
"mode": "SIGN_MODE_DIRECT"
}
},
"sequence": "0"
}
],
"fee": {
"amount": [],
"gas_limit": "200000",
"payer": "",
"granter": ""
},
"tip": null
},
"signatures": [
"tvh3p92WjnBUFv2r2pWZFgv/r/j7+jvGcRcaCnoNcUF38esVjr8nflK2W2mDb0FMVZ4ON3oxYy6pViSMi9w9+w=="
]
}
]
"gen_txs": []
},
"gov": {
"starting_proposal_id": "1",
Expand Down
69 changes: 69 additions & 0 deletions testnets/statesync.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# Eve Network Testnet

This testnet will start with the node version `0.0.2`.

## Minimum hardware requirements

- 8-16GB RAM
- 100GB of disk space
- 2 cores

## Genesis Instruction

### Install node

```bash
git clone https://github.com/eve-network/eve.git
cd eve
git checkout v0.0.2
make install
```

### Check Node version

```bash
# Get node version (should be v0.0.2)
eved version

# Get node long version (should be 25e1602d5a29e4ab49addda7e4178b50894999df)
eved version --long | grep commit
```

### Initialize Chain

```bash
rm -rf ~/.eved
eved init develop --chain-id=evenetwork-1
```

### Replace pre-genesis

```bash
# Download the file
curl -s https://raw.githubusercontent.com/eve-network/eve/main/testnets/genesis.json > ~/.eved/config/genesis.json

# Calculate the SHA256 checksum
calculated_checksum=$(shasum -a 256 ~/.eved/config/genesis.json | awk '{ print $1 }')

# Compare with the expected checksum
expected_checksum="244d5a3999dd0851eb338b032a57fbea24a89b4016a7907a9d20c2045c689857"
if [ "$calculated_checksum" = "$expected_checksum" ]; then
echo "---> Checksum is CORRECT."
else
echo "---> Checksum is INCORRECT."
fi
```

## Run node

### Setup seeds

```bash
export PERSISTENT_SEEDS=""
```

### Run node with persistent peers

```bash
eved start --p2p.persistent_peers=$PERSISTENT_SEEDS
```

0 comments on commit d81ad96

Please sign in to comment.