Skip to content

Commit

Permalink
Merge branch 'master' into chains/mainnet
Browse files Browse the repository at this point in the history
  • Loading branch information
olegfomenko committed Oct 10, 2023
2 parents e281dda + 95fadd1 commit 3684665
Show file tree
Hide file tree
Showing 7 changed files with 157 additions and 14 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,15 @@

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

## [Mainnet information](./docs/common/mainnet/001-mainnet.md)

***Chains:***
* [***Mainnet information***](./docs/common/mainnet/001-mainnet.md)

* [***Testnet (Mainnet-beta) information***](./docs/common/testnet/001-testnet.md)

## Introduction

**rarimocore** is a blockchain built using Cosmos SDK and Tendermint and created with [Ignite CLI](https://ignite.com/cli).
**rarimo-core** is a blockchain built using Cosmos SDK and Tendermint and created with [Ignite CLI](https://ignite.com/cli).

Based on Tendermint + Cosmos SDK blockchain core the main goal is to provide validated information about different cross-chain operations.

Expand Down
8 changes: 4 additions & 4 deletions docs/common/bridging/002-identity.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Identity transfers currently implemented in the following way:
- There is an operation type `IDENTITY_DEFAULT_TRANSFER` that should be used to transfer simple state from one chain to another.

- An [evm-identity-oracle-svc](https://gitlab.com/rarimo/polygonid/evm-identity-saver-svc) exists, that is responsible
- An [evm-identity-oracle-svc](https://github.com/rarimo/evm-identity-saver-svc) exists, that is responsible
for delivering information from certain Iden3 state contract into the Rarimo chain.

- After delivering information about state update, oracles (`evm-identity-saver-svc`) vote for information correctness.
Expand Down Expand Up @@ -93,7 +93,7 @@ After fetching of some event, oracle will create the corresponding transaction a
After transaction appears in Rarimo blockchain all chain oracles have to vote for its correctness.
So they will fetch the information about state update from Rarimo chain, verify it and submit their votes (YES/NO answers).
For submitting transactions, savers (oracles) uses the [broadcaster-svc](https://gitlab.com/rarimo/broadcaster-svc).
For submitting transactions, savers (oracles) uses the [broadcaster-svc](https://github.com/rarimo/broadcaster-svc).
It accepts the transaction by GRPC endpoint, signs it with configured private key and submits it to the Rarimo chain.
The following configuration .yaml file should be provided to launch your broadcaster service:
Expand Down Expand Up @@ -130,7 +130,7 @@ version: "3.7"
services:

broadcaster:
image: registry.gitlab.com/rarimo/broadcaster-svc:v1.0.1
image: registry.github.com/rarimo/broadcaster-svc:v1.0.1
restart: unless-stopped
depends_on:
- broadcaster-db
Expand All @@ -152,7 +152,7 @@ services:
- broadcaster-data:/pgdata

evm-identity-saver:
image: registry.gitlab.com/rarimo/polygonid/evm-identity-saver-svc:v1.0.2
image: registry.github.com/rarimo/evm-identity-saver-svc:v1.0.2
restart: unless-stopped
depends_on:
- broadcaster
Expand Down
6 changes: 3 additions & 3 deletions docs/common/contracts/001-contracts.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ Whenever possible, we made sure to maintain similar interface and signatures to

## Bridge & commissions

- Repo: [Solana Bridge Program](https://gitlab.com/rarimo/contracts/solana-bridge-program)
- Repo: [Near Bridge](https://gitlab.com/rarimo/contracts/near-bridge)
- Repo: [EVM Bridge](https://gitlab.com/rarimo/contracts/evm-bridge)
- Repo: [Solana Bridge Program](https://github.com/rarimo/contracts/solana-bridge-program)
- Repo: [Near Bridge](https://github.com/rarimo/contracts/near-bridge)
- Repo: [EVM Bridge](https://github.com/rarimo/contracts/evm-bridge)

Documentation:
* [Bridge architecture](./002-bridge.md)
Expand Down
4 changes: 4 additions & 0 deletions docs/common/mainnet/001-mainnet.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,12 @@

```Core branch:``` ***chains/mainnet***

```Launch commin hash:``` ***4dd670ddef36bc058c5f68057ad1b885f1dcbfbe***

```Explorer:``` [scan.rarimo.com](https://scan.rarimo.com/)

```Denom name:``` ***urmo***

----

## RPC Node
Expand Down
10 changes: 5 additions & 5 deletions docs/common/oracles/001-oracles.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Oracles (Savers)

- Repo: [Saver Lib](https://gitlab.com/rarimo/savers/saver-grpc-lib)
- Repo: [EVM Saver](https://gitlab.com/rarimo/savers/evm-saver-svc)
- Repo: [Solana Saver](https://gitlab.com/rarimo/savers/solana-saver-svc)
- Repo: [Near Saver](https://gitlab.com/rarimo/savers/near-saver-svc)
- Repo: [Saver Lib](https://github.com/rarimo/saver-grpc-lib)
- Repo: [EVM Saver](https://github.com/rarimo/evm-saver-svc)
- Repo: [Solana Saver](https://github.com/rarimo/solana-saver-svc)
- Repo: [Near Saver](https://github.com/rarimo/near-saver-svc)

Managing events' creation requires some special logic for every chain that will observe blockchain state for new events,
parse in accordance with chain rules, etc. Rarimo core can not fetch events data by itself because interaction with
Expand Down Expand Up @@ -63,7 +63,7 @@ Let's describe the flow more accurately:

## Library

In `gitlab.com/rarimo/savers/saver-grpc-lib` we defined the common utils for all oracles.
In `github.com/rarimo/saver-grpc-lib` we defined the common utils for all oracles.
Every oracle should implement `verifiers.TransferOperator` interface for every supported token type
and put that implementations into the `voter.Subscriber` and `voter.Catchupper` using `verifiers.TransferVerifier` wrapper.

Expand Down
29 changes: 29 additions & 0 deletions docs/common/testnet/001-testnet.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Testnet information

* [Validator Guide](./002-validator-guide.md)

----

```Core branch:``` ***chains/mainnet-beta***

```Launch commin hash:``` ***20bcfef13ce6d3eaa77a63fa8f1d141601c27ba5***

```Explorer:``` [scan.mainnet-beta.rarimo.com](https://scan.mainnet-beta.rarimo.com/)

```Denom name:``` ***urmo***

----

## RPC Node

```Tendermint API:``` [core-api.mainnet-beta.rarimo.com](https://core-api.node1.mainnet-beta.rarimo.com/)

```Cosmos API:``` [rpc.node1.mainnet-beta.rarimo.com](https://rpc.node1.mainnet-beta.rarimo.com/)

```Swagger API:``` [rpc-api.node1.mainnet-beta.rarimo.com](https://rpc-api.node1.mainnet-beta.rarimo.com/)

----

## Genesis

```Browse file``` [genesis.json](https://rpc.node1.mainnet-beta.rarimo.com/genesis)
106 changes: 106 additions & 0 deletions docs/common/testnet/002-validator-guide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
# Validators' Guide

This instruction tells how to start one or another system service.
It is assumed that you are already familiar with Cosmos SDK, Linux and are fluent in them.

## Node (rarimo-core)

Chain id: `rarimo_201411-2`

### Build

Clone the repository "<https://github.com/rarimo/rarimo-core.git>" and checkout the `chain/mainnet-beta` branch.

Use the following commit hash to build: `20bcfef13ce6d3eaa77a63fa8f1d141601c27ba5`.

You can use [Dockerfile.vendor](../../../Dockerfile.vendor), Ignite CLI (do not use vendor package in that case)
or just a ```go build ./cmd/rarimo-cored```.

### Setup configs

To, generate validator configs, use:
- `rarimo-core` (or `rarimo-cored`) executable
- RPC from [Testnet page](./001-testnet.md)

Also use the following P2P connection to our RPC node: `[email protected]:26656`.

Init folder structure:
```bash
rarimo-core init $MONIKER_NAME --chain-id=rarimo_201411-2 --home=$RARIMO_HOME
```

Paste custom `genesis.json` and `app.toml` in `$RARIMO_HOME/config/` folder.

Create validator private key:
```bash
rarimo-core keys add <key-name> --keyring-backend test --home=$RARIMO_HOME
```

To run use env variables:
```yaml
- name: DAEMON_NAME
value: "rarimo-core"

- name: DAEMON_HOME
value: $RARIMO_HOME

- name: DAEMON_ALLOW_DOWNLOAD_BINARIES
value: "true"
```
Use the following command to start your node:
```bash
mkdir -p $DAEMON_HOME/cosmovisor/genesis/bin && cp YOU_STORE_CORE_BIN(name rarimo-core) $DAEMON_HOME/cosmovisor/genesis/bin && cosmovisor run start --home=$RARIMO_HOME --rpc.laddr tcp://0.0.0.0:26657
```

To stake the tokens for new validator execute:

```bash
rarimo-core tx staking create-validator --amount 1000000urmo --commission-max-change-rate "0.01" --commission-max-rate "0.2" --commission-rate "0.1" --min-self-delegation "1" --details "Meet new Rarimo validator" --pubkey $(rarimo-core tendermint show-validator --home=$RARIMO_HOME) --moniker $MONIKER_NAME --chain-id rarimo_201411-1 --fees 0urmo --from $LOCAL_VALIDATOR_ADDRESS --home=$RARIMO_HOME --node=$RARIMO_NODE --keyring-backend=test
```

Congratulations, you are the Rarimo Mainnet validator!

----

### Useful commands

Query delegator rewards for all validators:
```shell
rarimo-core query distribution rewards [delegator address rarimo...] --node=https://rpc.mainnet.rarimo.com:443
```

or for certain validator:
```shell
rarimo-core query distribution rewards [delegator address rarimo...] [valdidator address rarimovaloper...] --node=https://rpc.mainnet.rarimo.com:443
```

Query un-withdrawn rewards:
```shell
rarimo-core query distribution validator-outstanding-rewards [valdidator address rarimovaloper...] --node=https://rpc.mainnet.rarimo.com:443
```

Query validator commission:
```shell
rarimo-core query distribution commission rarimovaloper... --node=https://rpc.mainnet.rarimo.com:443
```

Withdraw all validator rewards for a delegator:
```shell
rarimo-core tx distribution withdraw-all-rewards --from=rarimo... --node=https://rpc.mainnet.rarimo.com:443 --home=path-to-home-with-keyring
```

Withdraw certain validator rewards for a delegator (add `--commission` flag to withdraw commissions also):
```shell
rarimo-core tx distribution withdraw-rewards rarimovaloper1... --from rarimo... --commission --node=https://rpc.mainnet.rarimo.com:443 --home=path-to-home-with-keyring
```

Check validator seed:
```bash
rarimo-core tendermint show-node-id --home=$RARIMO_HOME
```

Check key exists in keystore:
```bash
rarimo-core keys show $LOCAL_VALIDATOR_ADDRESS --keyring-backend test --home=$RARIMO_HOME
```

0 comments on commit 3684665

Please sign in to comment.