https://github.com/oraichain/oraichain-fork
https://github.com/oraichain/oraichain-fork
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/oraichain/oraichain-fork
- Owner: oraichain
- License: apache-2.0
- Created: 2022-12-14T02:19:03.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-02-17T19:00:40.000Z (over 2 years ago)
- Last Synced: 2025-01-11T01:47:44.044Z (5 months ago)
- Language: JavaScript
- Size: 45.9 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Oraichain fork
## Steps:
1. run a local node with new genesis
2. let it run for a few blocks
3. export its genesis
4. collect slashing, staking & validators fields in the exported genesis and use jq to replace them in the wanted genesis
5. move priv_validator_key & node_key of the local node to the wanted location that we want to run. If using the the same local node, need to: oraid tendermint unsafe-reset-all first to clear all previous blocks, then replace the genesis file.
6. oraid start --x-crisis-skip-assert-invariants## Steps to run the scripts to start forking:
1. Setup a new node
```bash
# download new exported genesis url through the env var
EXPORTED_GENESIS_URL= ./setup-genesis.sh
```2. Export the genesis state of the node
```bash
RPC_PORT= GRPC_PORT= P2P_PORT= REST_PORT= ./export-genesis.sh
```3. Process genesis state to inject the custom wallet into the network
```bash
node index.js
```4. Clear all network data and start over to apply the new genesis state
```
oraid tendermint unsafe-reset-all && oraid start --x-crisis-skip-assert-invariants --p2p.laddr tcp://0.0.0.0:46656 --grpc.address 0.0.0.0:8090 --rpc.laddr tcp://0.0.0.0:46657
```To clear the fork network and start over, type:
```bash
./clear.sh
```Export genesis state command: ```oraid export 2>&1 | tee forked-genesis.json```