Skip to content

Commit

Permalink
Add initial files
Browse files Browse the repository at this point in the history
this copies over data from the alteha chain to edit from here
  • Loading branch information
jkilpatr committed Nov 16, 2021
1 parent c007c18 commit 442270d
Show file tree
Hide file tree
Showing 23 changed files with 1,069 additions and 2 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
# gravity-docs
A repository for managing the Genesis file and documentation of Gravity bridge chain.
![Gravity Bridge](./assets/GravityBridgeLogo-Stacked-FullColor.svg)
1 change: 1 addition & 0 deletions assets/GravityBridgeLogo-Horizontal-Black.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/GravityBridgeLogo-Horizontal-FullColor.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/GravityBridgeLogo-Horizontal-White.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/GravityBridgeLogo-Stacked-Black.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/GravityBridgeLogo-Stacked-FullColor.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/GravityBridgeLogo-Stacked-White.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 29 additions & 0 deletions configs/geth-full-config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
[Eth]
NetworkId = 5
SyncMode = "fast"
EthDiscoveryURLs = ["enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@all.goerli.ethdisco.net"]
SnapDiscoveryURLs = []
NoPruning = false
NoPrefetch = false
TxLookupLimit = 2350000
LightServ = 400
LightPeers = 1000
UltraLightFraction = 75
DatabaseCache = 128
DatabaseFreezer = ""
TrieCleanCache = 154
TrieCleanCacheJournal = "triecache"
TrieCleanCacheRejournal = 3600000000000
TrieDirtyCache = 256
TrieTimeout = 3600000000000
SnapshotCache = 102
Preimages = false
EnablePreimageRecording = false
EWASMInterpreter = ""
EVMInterpreter = ""
RPCGasCap = 25000000
RPCTxFeeCap = 1e+00


[Node.P2P]
MaxPeers = 5000
38 changes: 38 additions & 0 deletions configs/geth-light-config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Note: this config doesn't contain the genesis block.

[Eth]
NetworkId = 5
SyncMode = "light"
EthDiscoveryURLs = ["enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@les.goerli.ethdisco.net"]
SnapDiscoveryURLs = []
NoPruning = false
NoPrefetch = false
TxLookupLimit = 2350000
LightPeers = 100
UltraLightFraction = 75
DatabaseCache = 8
DatabaseFreezer = ""
TrieCleanCache = 2
TrieCleanCacheJournal = "triecache"
TrieCleanCacheRejournal = 3600000000000
TrieDirtyCache = 4
TrieTimeout = 3600000000000
SnapshotCache = 1
Preimages = false
EnablePreimageRecording = false
EWASMInterpreter = ""
EVMInterpreter = ""
RPCGasCap = 25000000
RPCTxFeeCap = 1e+00


[Node.P2P]
MaxPeers = 500
NoDiscovery = false
DiscoveryV5 = true
BootstrapNodes = ["enode://011f758e6552d105183b1761c5e2dea0111bc20fd5f6422bc7f91e0fabbec9a6595caf6239b37feb773dddd3f87240d99d859431891e4a642cf2a0a9e6cbb98a@51.141.78.53:30303", "enode://176b9417f511d05b6b2cf3e34b756cf0a7096b3094572a8f6ef4cdcb9d1f9d00683bf0f83347eebdf3b81c3521c2332086d9592802230bf528eaf606a1d9677b@13.93.54.137:30303", "enode://46add44b9f13965f7b9875ac6b85f016f341012d84f975377573800a863526f4da19ae2c620ec73d11591fa9510e992ecc03ad0751f53cc02f7c7ed6d55c7291@94.237.54.114:30313", "enode://b5948a2d3e9d486c4d75bf32713221c2bd6cf86463302339299bd227dc2e276cd5a1c7ca4f43a0e9122fe9af884efed563bd2a1fd28661f3b5f5ad7bf1de5949@18.218.250.66:30303", "enode://a61215641fb8714a373c80edbfa0ea8878243193f57c96eeb44d0bc019ef295abd4e044fd619bfc4c59731a73fb79afe84e9ab6da0c743ceb479cbb6d263fa91@3.11.147.67:30303", "enode://a869b02cec167211fb4815a82941db2e7ed2936fd90e78619c53eb17753fcf0207463e3419c264e2a1dd8786de0df7e68cf99571ab8aeb7c4e51367ef186b1dd@51.15.116.226:30303", "enode://807b37ee4816ecf407e9112224494b74dd5933625f655962d892f2f0f02d7fbbb3e2a94cf87a96609526f30c998fd71e93e2f53015c558ffc8b03eceaf30ee33@51.15.119.157:30303", "enode://a59e33ccd2b3e52d578f1fbd70c6f9babda2650f0760d6ff3b37742fdcdfdb3defba5d56d315b40c46b70198c7621e63ffa3f987389c7118634b0fefbbdfa7fd@51.15.119.157:40303"]
BootstrapNodesV5 = ["enr:-KG4QOtcP9X1FbIMOe17QNMKqDxCpm14jcX5tiOE4_TyMrFqbmhPZHK_ZPG2Gxb1GE2xdtodOfx9-cgvNtxnRyHEmC0ghGV0aDKQ9aX9QgAAAAD__________4JpZIJ2NIJpcIQDE8KdiXNlY3AyNTZrMaEDhpehBDbZjM_L9ek699Y7vhUJ-eAdMyQW_Fil522Y0fODdGNwgiMog3VkcIIjKA", "enr:-KG4QDyytgmE4f7AnvW-ZaUOIi9i79qX4JwjRAiXBZCU65wOfBu-3Nb5I7b_Rmg3KCOcZM_C3y5pg7EBU5XGrcLTduQEhGV0aDKQ9aX9QgAAAAD__________4JpZIJ2NIJpcIQ2_DUbiXNlY3AyNTZrMaEDKnz_-ps3UUOfHWVYaskI5kWYO_vtYMGYCQRAR3gHDouDdGNwgiMog3VkcIIjKA", "enr:-Ku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qVeJ8PPICcWk1vSn_XcSkjOkNiTg6Fmii5j6vUQgvzMc9L1goFnLKgXqBJspJjIsB91LTOleFmyWWrFVATGngBh2F0dG5ldHOIAAAAAAAAAACEZXRoMpC1MD8qAAAAAP__________gmlkgnY0gmlwhAMRHkWJc2VjcDI1NmsxoQKLVXFOhp2uX6jeT0DvvDpPcU8FWMjQdR4wMuORMhpX24N1ZHCCIyg", "enr:-Ku4QG-2_Md3sZIAUebGYT6g0SMskIml77l6yR-M_JXc-UdNHCmHQeOiMLbylPejyJsdAPsTHJyjJB2sYGDLe0dn8uYBh2F0dG5ldHOIAAAAAAAAAACEZXRoMpC1MD8qAAAAAP__________gmlkgnY0gmlwhBLY-NyJc2VjcDI1NmsxoQORcM6e19T1T9gi7jxEZjk_sjVLGFscUNqAY9obgZaxbIN1ZHCCIyg", "enr:-Ku4QPn5eVhcoF1opaFEvg1b6JNFD2rqVkHQ8HApOKK61OIcIXD127bKWgAtbwI7pnxx6cDyk_nI88TrZKQaGMZj0q0Bh2F0dG5ldHOIAAAAAAAAAACEZXRoMpC1MD8qAAAAAP__________gmlkgnY0gmlwhDayLMaJc2VjcDI1NmsxoQK2sBOLGcUb4AwuYzFuAVCaNHA-dy24UuEKkeFNgCVCsIN1ZHCCIyg", "enr:-Ku4QEWzdnVtXc2Q0ZVigfCGggOVB2Vc1ZCPEc6j21NIFLODSJbvNaef1g4PxhPwl_3kax86YPheFUSLXPRs98vvYsoBh2F0dG5ldHOIAAAAAAAAAACEZXRoMpC1MD8qAAAAAP__________gmlkgnY0gmlwhDZBrP2Jc2VjcDI1NmsxoQM6jr8Rb1ktLEsVcKAPa08wCsKUmvoQ8khiOl_SLozf9IN1ZHCCIyg"]
StaticNodes = ["enode://71b8bb569dad23b16822a249582501aef5ed51adf384f424a060aec4151b7b5c4d8a1503c7f3113ef69e24e1944640fc2b422764cf25dbf9db91f34e94bf4571@165.232.147.156:30303","enode://02db2dfd37cdaffe5433f6bf81fca8f7753bdc09482897cd71c65b41067fda45f001be8c4004638f34e18de0371dd5fbdc528e8a159c4ef489123ad232b51996@143.198.109.235:30303", "enode://7c81c17f1ea23af11c0690c2d676580c428e7ea78303bc6d761d0ca80c9c61f4fea6462184e09339742f621e26cf7fddb7bfccfd608ec85bb5bb21dc452b9dfa@104.236.22.8:30303", "enode://155f6e4a9af09c43e41a1ebcd9f4e8c7331c19f2a60acf7650ea3d9fede82314a3ce89b4e6db449ba4f87952cd0eb6ebbefee567d0dce1d25ed984dec2a86678@geth.bakon.dev:30303", "enode://4e142a3571a19eb38d735ffa203d8c6531adf5c809c2d8d395d6029690572f05bd402029ff6ff92fb8d7dc48439a6c3b2ac3b092d46d73ed17a94052a179334a@althea.mahdisworld.net:30303"]
TrustedNodes = []
ListenAddr = ":30303"
EnableMsgEvents = false
31 changes: 31 additions & 0 deletions docs/appendix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Appendix

## Increase your stake

To increase your ualtg stake, if you have extra tokens lying around. The first command will show an output like this, you want to take the key starting with cosmosvaloper1 in the 'address' field.

```
- name: jkilpatr
type: local
address: cosmosvaloper1jpz0ahls2chajf78nkqczdwwuqcu97w6z3plt4
pubkey: cosmosvaloperpub1addwnpepqvl0qgfqewmuqvyaskmr4pwkr5fwzuk8286umwrfnxqkgqceg6ksu359m5q
mnemonic: ""
threshold: 0
pubkeys: []
```

```
althea keys show myvalidatorkeyname --bech val
althea tx staking delegate <the address from the above command> 99000000ualtg --from myvalidatorkeyname --chain-id althea-testnet2v3 --fees 1altg --broadcast-mode block
```

## Unjail your validator

This command will unjail you, completing the process of getting the chain back online!

_replace 'myvalidatorkeyname' with your validator keys name, if you don't remember run `althea keys list`_

```
althea tx slashing unjail --from myvalidatorkeyname --chain-id=althea-testnet2v3
```
99 changes: 99 additions & 0 deletions docs/faucet.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
# Althea testnet faucet

In order to use the faucet and receive testnet tokens you'll first need to setup a wallet

## What do I need?

A Linux server with any modern Linux distribution, 2gb of ram and at least 20gb storage. Requirements are very minimal.

### Download Althea chain software

```
# the althea chain binary itself
wget https://github.com/althea-net/althea-chain/releases/download/v0.2.3/althea-0.2.2-18-g73447b6-linux-amd64
mv althea-0.2.2-18-g73447b6-linux-amd64 althea
chmod +x althea
sudo mv althea /usr/bin/
```

### Init the config files

```
cd $HOME
althea init mymoniker --chain-id althea-testnet2v3
```

### Generate your key

Be sure to back up the phrase you get! You’ll need it in a bit. If you don't back up the phrase here just follow the steps again to generate a new key.

Note 'myvalidatorkeyname' is just the name of your key here, you can pick anything you like, just remember it later.

You'll be prompted to create a password, I suggest you pick something short since you'll be typing it a lot

```
cd $HOME
althea init mymoniker --chain-id althea-testnet2v3
althea keys add myvalidatorkeyname
```

### Copy the genesis file

```
wget https://github.com/althea-net/althea-chain/releases/download/v0.2.3/althea-testnet2v3-genesis.json
cp althea-testnet2v3-genesis.json $HOME/.althea/config/genesis.json
```

### Add seed node

Change the seed field in ~/.althea/config/config.toml to contain the following:

```
seeds = "6a9cd8d87ab9e49d7af91e09026cb3f40dec2f85@testnet2.althea.net:26656"
```

### Start your full node and wait for it to sync

Ask what the current blockheight is in the chat

```
althea start
```

### Request tokens from the faucet

First list all of your keys

```
althea keys list
```

You'll see an output like this

```
- name: jkilpatr
type: local
address: cosmos1youraddresswillgohere
pubkey: cosmospub1yourpublickleywillgohere
mnemonic: ""
threshold: 0
pubkeys: []
```

Copy your address from the 'address' field and paste it into the command below remember to remove the `<>`

```
curl -vv -XPOST http://testnet2.althea.net/get_altg/<your address here without the brackets>
```

Once you execute this command you should see 10 testnet ALTG in your balance within a few blocks

This faucet also provides Gorli ETH like so

```
curl -vv -XPOST http://testnet2.althea.net/get_eth/<your eth address here without the brackets>
```
1 change: 1 addition & 0 deletions docs/launch-chain.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// this doc will cover collecting the gentx submitted in 'setting up your genesis validator' and then launching the chain.
58 changes: 58 additions & 0 deletions docs/preparing-for-upgrade.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Preparing for the Althea testnet1v5 upgrade

This Wednesday (March 17th 2021) the Gorli Ethereum testnet will be performing the Berlin hardfork. This Sunday (March 21st 2021) we will be upgrading to Althea testnet1v5. Big changes in v5 will include.

1. Fixes for sudden slashing
2. Registration for delegate keys in the 'althea' binary (allowing for Ledeger key use)
3. Fix for the invalid signatures orchestrator bug
4. Other improvements to slashing logic
5. Cosmos security fixes

While we are targeting 1pm US Pacific time for this halt and upgrade, but it may vary. For this upgrade we won't be meeting in a chat channel.

## Upgrade your Ethereum Node

Stop your existing geth node using ctrl-C

Then download and start the new one

```
wget https://gethstore.blob.core.windows.net/builds/geth-linux-amd64-1.10.6-576681f2.tar.gz
tar -xvf geth-linux-amd64-1.10.6-576681f2.tar.gz
cd geth-linux-amd64-1.10.6-576681f2
./geth --syncmode "light" --goerli --http --cache 16
```

It may take a minute for Geth to start syncing blocks again. You'll see a message like this every few seconds

```
INFO [03-15|17:19:44.413] Imported new block headers count=1 elapsed="130.872µs" number=4446212 hash="74914e…ebd43f"
```

Once that happens you can move on

## Prepare your Cosmos node to halt

We are targeting block height `455927` to halt

run ctrl-c on the terminal with your Althea blockchain node, then restart using

```
althea start --halt-height=455927
```

You should see blocks being made again after only a few seconds.

## Double check your Orchestrator

Finally make sure that your orchestrator is in good shape by restarting it.

If the Orchestrator makes it as far as printing this message, then you're in good shape

```
[2021-03-15T17:25:47Z INFO orchestrator::main_loop] Oracle resync complete, Oracle now operational
```

## All done

Thank you for participating in the Althea blockchain testnet. I'm looking forward to wrapping up our Gravity fixes and moving onto Althea blockchain specific features within one or two upgrades.
50 changes: 50 additions & 0 deletions docs/setting-up-a-fullnode-manual.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# How to run a Althea testnet full node

A Althea chain full node is just like any other Cosmos chain full node and unlike the validator flow requires no external software

## What do I need?

A Linux server with any modern Linux distribution, 2gb of ram and at least 20gb storage. Requirements are very minimal.

### Download Althea chain software

```
# the althea chain binary itself
wget https://github.com/althea-net/althea-chain/releases/download/v0.2.3/althea-0.2.2-18-g73447b6-linux-amd64
mv althea-0.2.2-18-g73447b6-linux-amd64 althea
chmod +x althea
sudo mv althea /usr/bin/
```

### Init the config files

```
cd $HOME
althea init mymoniker --chain-id althea-testnet2v3
```

### Copy the genesis file

```
wget https://github.com/althea-net/althea-chain/releases/download/v0.2.3/althea-testnet2v3-genesis.json
cp althea-testnet2v3-genesis.json $HOME/.althea/config/genesis.json
```

### Add seed node

Change the seed field in ~/.althea/config/config.toml to contain the following:

```
seeds = "6a9cd8d87ab9e49d7af91e09026cb3f40dec2f85@testnet2.althea.net:26656"
```

### Start your full node and wait for it to sync

Ask what the current blockheight is in the chat

```
althea start
```
63 changes: 63 additions & 0 deletions docs/setting-up-a-fullnode.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# How to run a Althea testnet full node

A Althea chain full node is just like any other Cosmos chain full node and unlike the validator flow requires no external software

## What do I need?

A Linux server with any modern Linux distribution, 4cores, 8gb of ram and at least 20gb of SSD storage.

In theory Althea chain can be run on Windows and Mac. Binaries are provided on the releases page. But instructions are not provided.

I also suggest an open notepad or other document to keep track of the keys you will be generating.

## Bootstrapping steps and commands

Start by logging into your Linux server using ssh. The following commands are intended to be run on that machine

### Install git and ansible

For Ubuntu / Debian

```
sudo apt get update
sudo apt-get install -y ansible git
```

For Centos

```
sudo yum install -y epel-release
sudo yum install -y ansible git
```

### Download the Althea chain repo

```
git clone https://github.com/althea-net/althea-chain
cd althea-chain/deployment-scripts
```

### Run the first time bootstrapping playbook and script

This script will print a lot of instructions, follow them carefully and be sure to copy
down the keys you generate. You will need them later.

```
ansible-playbook validator-prep.yml
bash shell/chain-setup.sh
```

### Now it's finally time to set everything up and start it

```
ansible-playbook deploy-fullnode.yml
```

### Check the status of the Althea chain binary

You should be good to go! You can check the status of the three
major components of Althea chain by running

```
sudo journal -fu althea-chain
```
Loading

0 comments on commit 442270d

Please sign in to comment.