Skip to content

Commit

Permalink
Merge pull request #22 from onomyprotocol/dev
Browse files Browse the repository at this point in the history
merge ONEX dev to main
  • Loading branch information
laloquidity authored Apr 27, 2024
2 parents d6cd8d6 + 690672f commit fa22154
Show file tree
Hide file tree
Showing 6 changed files with 297,062 additions and 24 deletions.
5 changes: 3 additions & 2 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ import (

const (
AppName = "onex"
upgradeName = "v1.0.0"
upgradeName = "v1.0.2-dev"
AccountAddressPrefix = "onomy"
)

Expand Down Expand Up @@ -414,7 +414,8 @@ func New(
AddRoute(distrtypes.RouterKey, distr.NewCommunityPoolSpendProposalHandler(app.DistrKeeper)).
// TODO: remove upgrade handler from gov once admin module or decision for only signaling proposal is made.
AddRoute(upgradetypes.RouterKey, upgrade.NewSoftwareUpgradeProposalHandler(app.UpgradeKeeper)).
AddRoute(ibcclienttypes.RouterKey, ibcclient.NewClientProposalHandler(app.IBCKeeper.ClientKeeper))
AddRoute(ibcclienttypes.RouterKey, ibcclient.NewClientProposalHandler(app.IBCKeeper.ClientKeeper)).
AddRoute(markettypes.RouterKey, market.NewDenomMetadataProposalHandler(app.MarketKeeper))

govKeeper := govkeeper.NewKeeper(
appCodec, keys[govtypes.StoreKey], app.GetSubspace(govtypes.ModuleName), app.AccountKeeper, app.BankKeeper,
Expand Down
43 changes: 34 additions & 9 deletions chain/onex-mainnet-1/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

The `onex-mainnet-1` chain will be launched as a consumer chain in Onomy mainnet.

- Network information: https://github.com/onomyprotocol/validator/tree/main/testnet
- Network information: https://github.com/onomyprotocol/onex/tree/main/chain/onex-mainnet-1
- Chain ID: `onex-mainnet-1`
* Spawn time: `March 4th, 2024` (Will be updated soon)
* Genesis file (without CCV): https://raw.githubusercontent.com/onomyprotocol/validator/main/testnet/onex-mainnet-1/genesis-without-ccv.json
* Spawn time: `April 29th, 2024 17:00 UTC`
* Genesis file (without CCV): https://raw.githubusercontent.com/onomyprotocol/onex/main/chain/onex-mainnet-1/genesis-without-ccv.json
* Genesis with CCV: Available soon
- Current version: `v1.0.3-onex`
* Binary:
Expand Down Expand Up @@ -46,8 +46,7 @@ Here is the detail of the Onomy provider chain:
[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:52756,[email protected]:26656
```


### 4. Setup Onex consumer chain
### 2. Setup Onex consumer chain
The validators also need to set up the `onex-mainnet-1` consumer chain. Here are the commands to install the binary and set up the new chain.
```bash
# detail of setup will appear here
Expand All @@ -56,16 +55,16 @@ wget -O onexd https://github.com/onomyprotocol/onex/releases/download/v1.0.3-one
onexd version # v1.0.3-onex
onexd init <moniker> --chain-id onex-mainnet-1
cd $HOME/.onex/
wget -O config/genesis.json https://raw.githubusercontent.com/onomyprotocol/validator/main/testnet/onex-mainnet-1/genesis-without-ccv.json
wget -O config/genesis.json https://raw.githubusercontent.com/onomyprotocol/onex/main/chain/onex-mainnet-1/genesis-without-ccv.json
```

The validators **MUST NOT** run the node but wait until the new genesis is published on the Onomy repository, which will be detailed in step **[5. Vote the consumer-addition proposal](#5-vote-the-consumer-addition-proposal)**.
The validators **MUST NOT** run the node but wait until the new genesis is published on the Onomy repository, which will be detailed in step **[3. Vote on the consumer-addition proposal](#5-vote-on-the-consumer-addition-proposal)**.

### 5. Vote on the consumer-addition proposal
### 3. Vote on the consumer-addition proposal
The proposal to launch `onex-mainnet-1` as a consumer chain will be submitted on the Onomy provider mainnet and the validators should participate in voting for the proposal. After the proposal is passed, the validators should wait until the `spawn_time` and replace the old genesis file with the new `genesis-with-ccv.json` file from the Onomy repository.

```bash
wget -O /$HOME/.onex/config/genesis.json https://raw.githubusercontent.com/onomyprotocol/validator/main/testnet/onex-mainnet-1/genesis.json
wget -O /$HOME/.onex/config/genesis.json https://raw.githubusercontent.com/onomyprotocol/onex/main/chain/onex-mainnet-1/genesis.json
```

### 6. Wait for genesis and run
Expand All @@ -75,6 +74,32 @@ At the genesis time, validators can start the consumer chain by running
onexd start
```

> Note: if validators choose to run onex and onomy in the same machine, it is highly recommended to setup separate ports to prevent clashing. These ports are: P2P, RPC, REST, gRPC, gRPC-web
The validators can also use service to run and monitor the node. Here is the example of `/etc/systemd/system/onex.service`:
```
[Unit]
Description=Onex node
After=network.target
[Service]
ExecStart=/$HOME/go/bin/onexd start --p2p.persistent_peers="[email protected]:26756,[email protected]:36656"
Restart=always
RestartSec=3
LimitNOFILE=65536
[Install]
WantedBy=multi-user.target
```

After that, run these commands to enable and start the chain:
```bash
systemctl daemon-reload
systemctl enable onex.service
systemctl restart onex.service
```
and run `journalctl -fu onex -n150` to check the log.


## Launch Stages
|Step|When?|What do you need to do?|What is happening?|
Expand Down
Loading

0 comments on commit fa22154

Please sign in to comment.