Skip to content

Commit

Permalink
Merge pull request #14 from zenodeapp/genesis-v0.5.0
Browse files Browse the repository at this point in the history
Genesis v0.5.0
  • Loading branch information
alpha-omega-labs authored Feb 3, 2024
2 parents e96abf5 + 5448fd7 commit 10e47d9
Show file tree
Hide file tree
Showing 60 changed files with 2,218 additions and 789,451 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,7 @@ dependency-graph.png
# Node.js
tests/**/node_modules/*
tests-solidity/**/node_modules/*

# Utils
utils/tools/quick-shift.sh
utils/tools/shift-wizard.sh
Binary file removed L1.png
Binary file not shown.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ build_tags_comma_sep := $(subst $(whitespace),$(comma),$(build_tags))

# process linker flags

ldflags = -X github.com/cosmos/cosmos-sdk/version.Name=evmos \
ldflags = -X github.com/cosmos/cosmos-sdk/version.Name=genesis \
-X github.com/cosmos/cosmos-sdk/version.AppName=$(EVMOS_BINARY) \
-X github.com/cosmos/cosmos-sdk/version.Version=$(VERSION) \
-X github.com/cosmos/cosmos-sdk/version.Commit=$(COMMIT) \
Expand Down
112 changes: 93 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,114 @@
# GenesisL1 blockchain
<h1 align="center">
GenesisL1 Mainnet (Evmos fork)
</h1>

<p align="center">
<img src="https://github.com/zenodeapp/genesisL1/assets/108588903/be368fa2-a154-48a6-b04b-8eb452b02033" alt="GenesisL1" width="150" height="150"/>
<ins>Release <b>v0.5.0</b> ~ Evmos <b>v0.3.0</b></ins>
</p>

<p align="center">
Cosmos SDK v0.44.5-patch
<img src="https://raw.githubusercontent.com/alpha-omega-labs/genesis-parameters/main/assets/l1-logo.png" alt="GenesisL1" width="150" height="150"/>
</p>

<p align="center">
<i>Source code fork of evmos and ethermint.</i>
Chain ID <b>genesis_29-2</b>
</p>

<p align="center">
A source code fork of <b>Evmos</b> and <b>Ethermint</b>
</p>

<p align="center">
Cosmos SDK <b>v0.44.5-patch</b>
</p>

---

> [!IMPORTANT]
> **From Evmos to Cronos**
>
> This repository is an Evmos-fork and was used before we upgraded to a Cronos-fork. For those who want to run a full-node it's required to start out in this repository and sync up till height `7350000`.
## Node requirements

- 300GB+ good hard drive disk
- 8GB+ RAM (if necessary it will use at max 150GB from hard drive as swap, see below)
- 8GB+ RAM
- 4 CPU Threads
- Good Internet Connection

## **Script**
## Instructions

> [!WARNING]
> Only follow these steps if you wish to set up a full node, else you could immediately go to the [`genesis-crypto`](https://github.com/alpha-omega-labs/genesis-crypto) repository.
> [!NOTE]
> More details for every script mentioned in this README can be found in the folders where they are respectively stored: [/setup](/setup) or [/utils](/utils).
### 1. Cloning the repository

```
git clone https://github.com/alpha-omega-labs/genesis-ethermint.git
```

### 2. Checkout the right tag/branch

```
git checkout v0.5.0
```

### 3. Node setup

> [!IMPORTANT]
> If you already run a full-node on the Evmos fork and have to upgrade to the latest version **of this fork** (where we started using `.genesis` instead of `.genesisd`), **skip this step and use the [setup/upgrade.sh](/setup/upgrade.sh) script instead.**
There are two scripts¹ one could use to initialize a node:

- [**node-setup-wizard.sh**](setup/node-setup-wizard.sh)

Use this script if you prefer to setup a node without having to do any manual preparation. It's a more interactive experience with visual feedback and takes care of things like: _backing up previous setups_, _creating keys_ and _starting the node_.

A one-liner to initialize a node _and_ generate a key _(optional)_ would be:
```
sh node-setup-wizard.sh --moniker your_moniker_name --key your_key_alias
```
> **WARNING:** running this won't backup the **database** in an existing _.genesis/data_ folder!
>
> If you don't want this to get wiped, add the `--preserve-db` flag!
>
> More flags can be set; see the [README](setup/README.md) in the [\/setup](setup/)-folder for more information on this.
- **[quick-node-setup.sh](setup/quick-node-setup.sh)**

This is a less bulky script, **does not create any backups (!) or keys** and contains only the necessary commands for initializing a full node. Its readability is higher, thus users who are used to manually setting up a node could use this script as a guide.

A one-liner to initialize a node would be:
```
sh quick-node-setup.sh your_moniker_name
```

> **NOTE:** this won't auto-start the node, which can be done using `systemctl start genesisd`.
>
> **WARNING:** no keys will be imported or created, which can be done directly using the CLI _or_ see [utils/key/create.sh](/utils/key/create.sh) or [utils/key/import.sh](/utils/key/import.sh).
---

¹ As this repository is only required for full node syncing, we've only included scripts for **initializing a node and starting the sync process** till height `7350000`. Scripts for e.g. _creating a validator_ will only be available in the [`genesis-crypto`](https://github.com/alpha-omega-labs/genesis-crypto) repository.

### 4. Daemon check

If you can't access the `genesisd` command at this point, then you may need to execute:

```
. ~/.bashrc
```
> Or the equivalent: `source ~/.bashrc`
### Overview
### 5. Node syncing

`reupdate.sh` is available in the root folder of the repository. Running `sh reupdate.sh` will start reupdate to v0.44.5 of SDK as it was before chain halt.
It will backup your current .genesisd folder, delete it and restore from older backup done during sdk v0.44.5 to 0.46.15 update. You can also change genesisd_backup_* on line 72 https://github.com/alpha-omega-labs/genesisd/blob/7a7b6ba2288d88fc024564f8afa4593f0b2b6f7e/reupdate.sh#L72C13-L72C30 to .evmosd._backup if you have it from older backups.
### Usage
`sh reupdate.sh`
The node will sync till height `7350000` and automatically crash, which is expected. Once you've gotten this far, continue with the instructions in the [`genesis-crypto`](https://github.com/alpha-omega-labs/genesis-crypto) repository.
> Monitor your node's status using `journalctl -fu genesisd -ocat`.
### scheduled-start.sh
<li>GenesisL1 restart is sheduled on Nov 30, 2023 00:0 0AM; you can start it manually or run automatic script</li>
<li>Make sure your node was <strong>REUPDATED</strong> and is on block height <strong>6751391</strong> </li>
<li>Make sure you have ONLY following peers listed as permanent peers and make sure your addressbook is empty please: </li>
<pre>[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:61356,[email protected]:26656,[email protected]:26656</pre>
<li>Automatic start schedule script that you can <strong>run any time before Nov 30, 2023</strong>; oneliner:</li>
<pre>wget https://raw.githubusercontent.com/alpha-omega-labs/genesisd/reupdate/scheduled-start.sh && sudo sh scheduled-start.sh</pre>
### 6. Explore utilities (optional)

NOTE: On Nov 30 API nodes will be also REUPDATED and might not response requests during that day, please join TG or Discord for any questions and instructions, thank you!
> [!TIP]
> The [/utils](/utils)-folder contains useful utilities one could use to manage their node (e.g. for fetching latest seeds and peers, fetching the genesis state, quickly shifting your config's ports etc.). To learn more about these, see the [README](utils/README.md) in the folder.
2 changes: 1 addition & 1 deletion app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ func init() {
panic(err)
}

DefaultNodeHome = filepath.Join(userHomeDir, ".genesisd")
DefaultNodeHome = filepath.Join(userHomeDir, ".genesis")
}


Expand Down
2 changes: 1 addition & 1 deletion config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ faucet:
build:
binary: "genesisd"
init:
home: "$HOME/.genesisd"
home: "$HOME/.genesis"
app:
evm-rpc:
address: "0.0.0.0:8545" # change the JSON-RPC address and port
Expand Down
Loading

0 comments on commit 10e47d9

Please sign in to comment.