Skip to content
This repository was archived by the owner on Dec 4, 2025. It is now read-only.

Commit c22ee37

Browse files
committed
chore: minor changes
1 parent 396e64a commit c22ee37

File tree

3 files changed

+170
-66
lines changed

3 files changed

+170
-66
lines changed

docs/develop/cheat-sheet/index.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,3 +128,7 @@ For Ledger support, transactions should be created and signed with the TypeScrip
128128
### Via `injectived`
129129

130130
Transactions can also be generated, signed, and broadcasted through the `injectived` CLI. See [Using `injectived`](../tools/injectived/02_using.md) for an overview of the process, or the full [commands](../tools/injectived/commands#tx) for documentation on possible transactions types.
131+
132+
## Add Token Metadata
133+
134+
To add your token's metadata to the suite of Injective products available (hub, bridge, etc.), see the instructions [here](https://docs.ts.injective.network/readme/assets/injective-list).
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
sidebar_position: 9
3+
title: Whitelisting Addresses for Wasm Uploads
4+
---
5+
6+
# Whitelisting Addresses for Wasm Uploads
7+
8+
# Overview
9+
10+
Contract upload on Injective requires governance approval. This structure has been put in place for multiple reasons:
11+
12+
1. Historically, the community has discovered vulnerabilities in CosmWasm whereby certain contracts could cause a chain halt. Thus, requiring approval will be inherently more secure until the language matures and stabilizes over time.
13+
2. Governance prevents un-audited and bogus contracts from being deployed into the network ensuring that hacks and scams will occur at a lesser degree.
14+
3. This results in a more curated experience for ecosystem users since the blockchain does not fill up with unwanted transactions and contracts.
15+
16+
This governance process is time-consuming for validators and the community. Injective builders additionally face a 4-day wait to roll out features, affecting developer experience and user growth.
17+
18+
As of the [Altaris chain upgrade](../../../nodes/Validators/mainnet/canonical-chain-upgrade/canonical-1.13.0.md), it is now possible to request whitelisting your address for contract uploads.
19+
20+
# Submission Guidelines
21+
22+
In order to be considered for a whitelist approval, it is strongly recommended to include all the following information in the governance proposal. Validators are recommended to contact the Foundation in Discord to verify the information submitted for each proposal before voting.
23+
24+
1. Are the identities of the team members known to the community?
25+
2. Has the team completed KYC/KYB with the Injective Foundation?
26+
3. How long has the protocol been live on Injective mainnet?
27+
4. Has the team developed applications in other ecosystems? (provide the details)
28+
29+
# Voting Guidelines
30+
31+
Users that meet these criteria will have a greater chance at receiving whitelist permissions:
32+
33+
1. The project has completed Injective Foundation KYC/KYB and the team members' identities are known to the community.
34+
- Exception: Anonymous developers with proven credibility and successful apps in other ecosystems.
35+
2. The project has been live on mainnet for at least 1 month and has achieved significant TVL/usage.
36+
37+
# Operational Guidelines
38+
39+
It is strongly recommended to use a multisig or Ledger wallet for the whitelisted uploads.

docs/nodes/validators/mainnet/peggo.md

Lines changed: 127 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,141 @@
22
sidebar_position: 17
33
---
44

5-
# Configure Peggo
5+
# Configure Peggo (Injective Mainnet)
66

7-
## Mainnet
7+
If you're on this page then you've probably become a Validator on Injective. Congratulations!
8+
Configuring `peggo` is the final step of your setup.
89

10+
Example of `.env` for peggo:
11+
```bash
12+
PEGGO_ENV="local" # environment name for metrics (dev/test/staging/prod/local)
13+
PEGGO_LOG_LEVEL="debug" # log level depth
14+
15+
PEGGO_COSMOS_CHAIN_ID="injective-1" # chain ID of the Injective network
16+
PEGGO_COSMOS_GRPC="tcp://localhost:9090" # gRPC of your injectived process
17+
PEGGO_TENDERMINT_RPC="http://localhost:26657" # Tendermint RPC of your injectived process
18+
19+
# Note: omitting PEGGO_COSMOS_GRPC and PEGGO_TENDERMINT_RPC enables stand-alone peggo mode. In this mode,
20+
# peggo is connected to load balanced endpoints provided by the Injective network. This decouples peggo's connection from your injectived process.
21+
22+
# Injective config
23+
PEGGO_COSMOS_FEE_DENOM="inj" # token used to pay fees on Injective
24+
PEGGO_COSMOS_GAS_PRICES="160000000inj" # default --gas-prices flag value for sending messages to Injective
25+
PEGGO_COSMOS_KEYRING="file" # keyring backends ("os", "file", "kwallet", "memory", "pass", "test")
26+
PEGGO_COSMOS_KEYRING_DIR= # path to your keyring dir
27+
PEGGO_COSMOS_KEYRING_APP="peggo" # arbitrary name for your keyring app
28+
PEGGO_COSMOS_FROM= # account address of your Validator (or your Delegated Orchestrator)
29+
PEGGO_COSMOS_FROM_PASSPHRASE= # keyring passphrase
30+
PEGGO_COSMOS_PK= # private key of your Validator (or your Delegated Orchestrator)
31+
PEGGO_COSMOS_USE_LEDGER=false
32+
33+
# Ethereum config
34+
PEGGO_ETH_KEYSTORE_DIR= # path to your Ethereum keystore
35+
PEGGO_ETH_FROM= # your Ethereum address (must be Delegated Ethereum address if you're a Validator)
36+
PEGGO_ETH_PASSPHRASE= # passphrase of your Ethereum keystore
37+
PEGGO_ETH_PK= # private key of your Ethereum address
38+
PEGGO_ETH_GAS_PRICE_ADJUSTMENT=1.3 # suggested Ethereum gas price will be adjusted by this factor (Relayer)
39+
PEGGO_ETH_MAX_GAS_PRICE="500gwei" # max gas price allowed for sending Eth transactions (Relayer)
40+
PEGGO_ETH_CHAIN_ID=1 # chain ID of Ethereum network
41+
PEGGO_ETH_RPC="http://localhost:8545" # RPC of your Ethereum node
42+
PEGGO_ETH_ALCHEMY_WS="" # optional websocket endpoint for listening pending transactions on Peggy.sol
43+
PEGGO_ETH_USE_LEDGER=false
44+
45+
# Price feed provider for token assets (Batch Creator)
46+
PEGGO_COINGECKO_API="https://api.coingecko.com/api/v3"
47+
48+
# Relayer config
49+
PEGGO_RELAY_VALSETS=true # set to `true` to relay Validator Sets
50+
PEGGO_RELAY_VALSET_OFFSET_DUR="5m" # duration which needs to expire before a Valset is eligible for relaying
51+
PEGGO_RELAY_BATCHES=true # set to `true` to relay Token Batches
52+
PEGGO_RELAY_BATCH_OFFSET_DUR="5m" # duration which needs to expire before a Token Batch is eligible for relaying
53+
PEGGO_RELAY_PENDING_TX_WAIT_DURATION="20m" # time to wait until a pending tx is processed
54+
55+
# Batch Creator config
56+
PEGGO_MIN_BATCH_FEE_USD=23.2 # minimum amount of fee a Token Batch must satisfy to be created
57+
58+
# Metrics config
59+
PEGGO_STATSD_PREFIX="peggo."
60+
PEGGO_STATSD_ADDR="localhost:8125"
61+
PEGGO_STATSD_STUCK_DUR="5m"
62+
PEGGO_STATSD_MOCKING=false
63+
PEGGO_STATSD_DISABLED=true
64+
```
965

10-
### Step 1: Configure your Peggo relayer
66+
IMPORTANT NOTE: if you're running your own `injectived` (Injective node) and `geth` (Ethereum node) processes, ensure that they are in sync with the latest state.
67+
Outdated nodes can skew the business logic of `peggo` to display "false alarm" logs sometimes.
68+
69+
## Step 1: Configuring .env
1170

1271
```bash
72+
# official Injective mainnet .env config
1373
mkdir ~/.peggo
1474
cp mainnet-config/10001/peggo-config.env ~/.peggo/.env
1575
cd ~/.peggo
1676
```
1777

78+
### Ethereum config
79+
1880
First, update the `PEGGO_ETH_RPC` in the `.env` file with a valid Ethereum EVM RPC Endpoint.
1981

20-
To set up your own Ethereum full node, follow the instructions [here](https://ethereum.org/en/developers/docs/nodes-and-clients/run-a-node/). It's possible to use an external Ethereum RPC provider such as Alchemy or Infura, but keep in mind that the Peggo bridge relayer uses a heavy use of `eth_getLogs` calls which may increase your cost burden, depending on your provider.
82+
To set up your own Ethereum full node, follow the instructions [here](https://ethereum.org/en/developers/docs/nodes-and-clients/run-a-node/). It's possible to use an external Ethereum RPC provider such as Alchemy or Infura, but keep in mind that the Peggo bridge relayer makes a heavy use of `eth_getLogs` calls which may increase your cost burden, depending on your provider.
83+
84+
#### Managing Ethereum keys for `peggo`
85+
86+
Peggo supports two options to provide signing key credentials - using the Geth keystore (recommended) or by providing a plaintext Ethereum private key.
87+
88+
**Option 1. Geth Keystore**
89+
90+
You can find instructions for securely creating a new Ethereum account using a keystore in the Geth Documentation [here](https://geth.ethereum.org/docs/interface/managing-your-accounts).
91+
92+
For convience, an example is provided below.
93+
94+
```bash
95+
geth account new --datadir=/home/ec2-user/.peggo/data/
96+
97+
INFO [03-23|18:18:36.407] Maximum peer count ETH=50 LES=0 total=50
98+
Your new account is locked with a password. Please give a password. Do not forget this password.
99+
Password:
100+
Repeat password:
101+
102+
Your new key was generated
103+
104+
Public address of the key: 0x9782dc957DaE6aDc394294954B27e2118D05176C
105+
Path of the secret key file: /home/ec2-user/.peggo/data/keystore/UTC--2021-03-23T15-18-44.284118000Z--9782dc957dae6adc394294954b27e2118d05176c
106+
107+
- You can share your public address with anyone. Others need it to interact with you.
108+
- You must NEVER share the secret key with anyone! The key controls access to your funds!
109+
- You must BACKUP your key file! Without the key, it's impossible to access account funds!
110+
- You must REMEMBER your password! Without the password, it's impossible to decrypt the key!
111+
```
112+
113+
Make sure you heed the warnings that geth provides, particularly in backing up your key file so that you don't lose your keys by mistake. We also recommend not using any quote or backtick characters in your passphrase for peggo compatibility purposes.
114+
115+
You should now set the following env variables:
116+
117+
```bash
118+
# example values, replace with your own
119+
PEGGO_ETH_KEYSTORE_DIR=/home/ec2-user/.peggo/data/keystore
120+
PEGGO_ETH_FROM=0x9782dc957DaE6aDc394294954B27e2118D05176C
121+
PEGGO_ETH_PASSPHRASE=12345678
122+
```
123+
124+
Then ensure that your Ethereum address has enough ETH.
125+
126+
**Option 2. Ethereum Private Key (Unsafe)**
127+
128+
Simply update the `PEGGO_ETH_PK` with a new Ethereum Private Key from a new account.
129+
130+
Then ensure that your Ethereum address has enough ETH.
21131

22-
Peggo also requires access to your validator's delegated Injective account and Ethereum key credentials to sign transactions for the corresponding networks.
132+
### Injective config
23133

24134
#### Creating your delegated Cosmos Key for sending Injective transactions
25135

26-
Your peggo relayer can either
136+
Your peggo orchestrator can either:
27137
- Use an explicitly delegated account key specific for sending validator specific Peggy transactions (i.e. `ValsetConfirm`, `BatchConfirm`, and `SendToCosmos` transactions)
28138
or
29-
- Simply use your validator's account key.
139+
- Simply use your validator's account key ("your Validator is your Orchestrator")
30140

31141
For isolation purposes, we recommend creating a delegated Cosmos key to send Injective transactions instead of using your validator account key.
32142

@@ -35,7 +145,7 @@ To create a new key, run
35145
injectived keys add $ORCHESTRATOR_KEY_NAME
36146
```
37147

38-
Then ensure that your orchestrator inj address has INJ balance.
148+
Then ensure that your orchestrator inj address has INJ balance in it, so peggo orchestrator can send messages to Injective.
39149

40150
To obtain your orchestrators's inj address, run
41151
```bash
@@ -91,62 +201,11 @@ injectived keys unsafe-export-eth-key $VALIDATOR_KEY_NAME
91201

92202
Again, this method is less secure and is not recommended.
93203

94-
#### Managing Ethereum keys for `peggo`
95-
96-
Peggo supports two options to provide signing key credentials - using the Geth keystore (recommended) or by providing a plaintext Ethereum private key.
97-
98-
**Option 1. Geth Keystore**
99-
100-
Simply create a new private key store and update the following env variables:
101-
* `PEGGO_ETH_KEYSTORE_DIR`
102-
* `PEGGO_ETH_FROM`
103-
* `PEGGO_ETH_PASSPHRASE`
104-
105-
You can find instructions for securely creating a new Ethereum account using a keystore in the Geth Documentation [here](https://geth.ethereum.org/docs/interface/managing-your-accounts).
106-
107-
For convience, an example is provided below.
108-
109-
```bash
110-
geth account new --datadir=/home/ec2-user/.peggo/data/
111-
112-
INFO [03-23|18:18:36.407] Maximum peer count ETH=50 LES=0 total=50
113-
Your new account is locked with a password. Please give a password. Do not forget this password.
114-
Password:
115-
Repeat password:
116-
117-
Your new key was generated
118-
119-
Public address of the key: 0x9782dc957DaE6aDc394294954B27e2118D05176C
120-
Path of the secret key file: /home/ec2-user/.peggo/data/keystore/UTC--2021-03-23T15-18-44.284118000Z--9782dc957dae6adc394294954b27e2118d05176c
121-
122-
- You can share your public address with anyone. Others need it to interact with you.
123-
- You must NEVER share the secret key with anyone! The key controls access to your funds!
124-
- You must BACKUP your key file! Without the key, it's impossible to access account funds!
125-
- You must REMEMBER your password! Without the password, it's impossible to decrypt the key!
126-
```
127-
128-
Make sure you heed the warnings that geth provides, particularly in backing up your key file so that you don't lose your keys by mistake. We also recommend not using any quote or backtick characters in your passphrase for peggo compatibility purposes.
129-
130-
You should now set the following env variables:
131-
132-
```bash
133-
# example values, replace with your own
134-
PEGGO_ETH_KEYSTORE_DIR=/home/ec2-user/.peggo/data/keystore
135-
PEGGO_ETH_FROM=0x9782dc957DaE6aDc394294954B27e2118D05176C
136-
PEGGO_ETH_PASSPHRASE=12345678
137-
```
138-
139-
Then ensure that your Ethereum address has enough ETH.
140-
141-
**Option 2. Ethereum Private Key (Unsafe)**
142-
143-
Simply update the `PEGGO_ETH_PK` with a new Ethereum Private Key from a new account.
144-
145-
Then ensure that your Ethereum address has ETH.
146-
### Step 2: Register Your Orchestrator and Ethereum Address
204+
## Step 2: Register Your Orchestrator and Ethereum Address
147205

148206
You can register orchestrator and ethereum address only once. It **CANNOT** be updated later.
149207
So Check twice before running below command.
208+
150209
```bash
151210
injectived tx peggy set-orchestrator-address $VALIDATOR_INJ_ADDRESS $ORCHESTRATOR_INJ_ADDRESS $ETHEREUM_ADDRESS --from $VALIDATOR_KEY_NAME --chain-id=injective-1 --keyring-backend=file --yes --node=tcp://localhost:26657 --gas-prices=500000000inj
152211
@@ -159,10 +218,12 @@ Example:
159218
injectived tx peggy set-orchestrator-address inj10m247khat0esnl0x66vu9mhlanfftnvww67j9n inj1x7kvxlz2epqx3hpq6v8j8w859t29pgca4z92l2 0xf79D16a79130a07e77eE36e8067AeA783aBdA3b6 --from validator-key-name --chain-id=injective-1 --keyring-backend=file --yes --node=tcp://localhost:26657 --gas-prices=500000000inj
160219
```
161220

162-
163221
You can verify successful registration by checking for your Validator's mapped Ethereum address on https://lcd.injective.network/peggy/v1/valset/current.
164222
165-
### Step 3: Start the Relayer
223+
NOTE: Once you've registered your Orchestrator with the `set-orchestrator-address` message, you **CANNOT** register again. Once this step is complete, your `Validator` is bound to the provided Ethereum address (as well the Delegated address you may have provided).
224+
In other words, your peggo must always run with the addresses you provided for registration.
225+
226+
## Step 3: Start the Relayer
166227

167228
```bash
168229
cd ~/.peggo
@@ -171,7 +232,7 @@ peggo orchestrator
171232

172233
This starts the Peggo bridge (relayer / orchestrator).
173234

174-
### Step 4: Create a Peggo systemd service
235+
## Step 4: Create a Peggo systemd service
175236

176237
Add `peggo.service` file with below content under `/etc/systemd/system/peggo.service`
177238

@@ -191,7 +252,7 @@ Add `peggo.service` file with below content under `/etc/systemd/system/peggo.ser
191252
WantedBy=multi-user.target
192253
```
193254

194-
Then run the following commands to configure Environment variables, start and stop the peggo relayer.
255+
Then use the following commands to configure Environment variables, start and stop the peggo relayer.
195256

196257
```bash
197258
sudo systemctl start peggo
@@ -206,7 +267,7 @@ sudo systemctl enable peggo
206267
journalctl -f -u peggo
207268
```
208269

209-
### Step 5: (Optional) Protect Cosmos Keyring from unauthorized access
270+
## Step 5: (Optional) Protect Cosmos Keyring from unauthorized access
210271

211272
:::important
212273
This is an advanced DevOps topic, consult with your sysadmin.

0 commit comments

Comments
 (0)