-
Clone and enter this repo
git clone https://github.com/Wire-Network/hyperion-docker-new && cd hyperion-docker-new. -
Configure Environment Variables
cp .env.template .env nano .env
Edit the .env file to provide appropriate values for your setup. You must change KIBANA_ENCRYPTION_KEY to a UUID. Grab one from here.
-
Install dependencies:
sudo ./prepare.sh
-
Update Configuration files:
a.
hyperion > config > connections.json: updatewiresettings in thechainsobject. Here you will configure a connection to a Wire API node where the state history plugin (SHIP) is enabled and accessable via websocket. You can either run this wire nodeop container alongisde this hyperion stack, or simply reference an external API node with available state history plugin (default port 8080 via ws://).name- set this to your chains namechain_id- Chain ID string of the wire chain you are configuring. Retrieve with/v1/chain/get_info > chain_idhttp- Standard Chain API Url (typically port 8888)ship- State History Plugin websocket endpoint (typically port 8080 via ws://)
b.
hyperion > config > chains > wire.config.jsonThis file affects swagger docs and other hyperion configs, most likely there isn't anything to be tweaked or change there except:
api > custom_core_tokento whatever your network's core token symbol is. Default is SYSapi > server_name: for the swagger code samples, instead of using : format which attaches HTTPS in the beggining and breaks the code sampleapi > server_addr: set to 0.0.0.0 - the value for the server that hosts the Hyperion indexer, which also provides the API. Since both are on the same machine, it is localhost.indexer > rewriteto true if you want it to reindex on each start up which is useful for development networks.- As you get deeper into hyperion configurations, you can explore tweaking the indexer configs and beyond.
At this point, if you have a healthy node with available state history plugin and do not wish to use this docker stack's nodeop container as your chain ingestor, you can skip to step 4. Otherwise, continue with c and d to configure Wire chain-api peering node container.
c.
nodeop > wire > config > config.inip2p-peer-address- set least 1 RPC peering address for your network
d.
nodeop > wire > config > genesis.json- Replace this with your chain's genesis.json retrieved from your genesis node
-
Create new local docker network called
hyperion:sudo ./init.sh
-
Start each container group in sequential order: (nodeop > infra > hyperion)
a. Optional - if you are using this stack's wire nodeop container for ingesting:
- Start up our
nodeopprocess by running:
`sudo ./start_nodeop.sh`- Check the logs to make sure that
nodeopis syncing with your network: rundocker logs -f wire-nodepress ctrl + C to get out of following the logs. - This is essentially just a wire chain-api node peering with your network and serving chain data via websocket to your hyperion indexer container.
Wait for your nodeop container to sync fully with your network before continuing.
b. Setup infrastructure containers (elasticsearch, kibana, redis, etc)
sudo ./start_infra.sh
- Then run
docker logs -f infra-es01-1to watch the logs.
Wait for shard status to change from [RED] to [GREEN] before continuing.
c. Start up Hyperion Indexer & API containers
sudo ./start_hyperion.sh
- You can run
docker logs -f hyperion-indexer-1you should see logs of it beginning to index the chain.
- Start up our
If everything was setup correctly when inspecting logs of hyperion-api-1 container you should see:
@timestamp [TAILING] Tailing last 10 lines for [wire-api] process (change the value with --lines option)
@timestamp /root/.pm2/logs/wire-api-out.log last 10 lines:
@timestamp /root/.pm2/logs/wire-api-error.log last 10 lines:
@timestamp: [26 - 00_master] --------- Hyperion API 3.3.10 ---------
@timestamp: [26 - 00_master] Chain API URL: <chain-api-url> | Push API URL: "undefined"
@timestamp: Importing stream module...
@timestamp: [26 - 00_master] [SocketManager] chain_id: d06acae4e2ae21346cd7cffb820cd06eb1ad2b9f37303b3c2a4d93c2841cb31a
@timestamp: [26 - 00_master] Socket.IO via uWS started on port 1234
@timestamp: [26 - 00_master] Websocket manager loaded!
@timestamp: [26 - 00_master] starting relay - http://127.0.0.1:7001
@timestamp: [26 - 00_master] Last commit hash on this branch is: 9f0b276a12f6c29c695fc5750b4fb4fabd71bf01
@timestamp: [26 - 00_master] Chain API validated!
@timestamp: [26 - 00_master] Elasticsearch: 8.7.1 | Lucene: 9.5.0
@timestamp: [26 - 00_master] Elasticsearch validated!
@timestamp: [26 - 00_master] Registering plugins...
@timestamp: [26 - 00_master] wire Hyperion API ready and listening on http://0.0.0.0:7000
Your Hyperion History API should now be available at http://:7000/v2/health. Also, check out the Swaggar OpenAPI spec docs at this url: http://:7000/v2/docs
Healthy example for Wire Testnet: https://testnet-hyperion.wire.foundation/v2/health / https://testnet-hyperion.wire.foundation/v2/docs
- verify that you've updated
genesis.jsoninnodeop/wire/config - ensure you have modified
chain_idinhyperion/config/chains/wire.config.json-curl <CHAIN_API_RPC>/v1/chain/get_info | jq .chain_id - you have cleared the contents of
nodeop/databefore startingwire-nodecontainer
Error messages:
error 2024-12-03T19:03:04.763 net-1 net_plugin.cpp:2355 operator() ] connection failed to 0.0.0.0:0 Connection refused
error 2024-12-03T19:03:04.763 net-4 net_plugin.cpp:2355 operator() ] connection failed to 0.0.0.0:0 Solution: Verify you have at least one valid p2p-peer-address declared in nodeop/wire/config/config.ini