Quick Onboarding Guide
1. Preparing the Application Stakes
Application stakes provides Gateway Operators access to the POKT Network for sending traffic.
2. Create Encryption Password
Create an encryption password for your app stake keys. This password will be used to encrypt/decrypt your app-stake private keys stored in a Postgres database. It can be any combination of plaintext, symbols, letters, etc.
3. Configure Global Configuration Variables
Fill out the .env
variables for the gateway server. This can be done by injecting environment variables directly or using a .env
file.
Env Variables Description
Variable Name | Description | Example Value |
---|---|---|
| Used for dispatching sessions |
|
| Gateway server port |
|
| Max response time for a POKT node to respond |
|
| Max response time for an altruist backup to respond |
|
| Log verbosity |
|
| Duration for sessions to stay in cache |
|
| User-generated encryption key |
|
| PostgreSQL Database connection URL |
|
Here is an .env.sample that you can use a reference
4. Run Migration Script
Run the migration script to seed your PostgreSQL database.
5. Insert App Stake Private Keys
Copy and paste the following SQL query to insert app stake private keys into the database:
Note: Replace {private_key} and {encryption_key} in the SQL query with your actual private key and encryption key.
6. Compile and Run Gateway Server
Copy and paste the following code to compile and run the gateway server. Hit the endpoint http://localhost/relay/{chain_id} with a JSON-RPC payload.
If using testnet, send a request to chain 0007
, http://localhost/relay/0007. This testnet chain id represents Ethereum Node Operators and Nodies is currently supporting the chain id for reliable testing.
Alternatively, you can leverage our published docker images
7. Setup Chain Configuration and Altruist
Upon startup of the gateway server, nodes within a session take time to be marked as healthy (~10 seconds), therefore the requests will be routed to the altruist (failover) node. It is suggested each chain that you support has a configured altruist. You can learn more about supplying altruist configurations through this Altruist Chain Configuration guide.
Remember to keep sensitive information secure and follow best practices for handling private keys and passwords.
Last updated