Skip to content

Commit

Permalink
update graph node modern
Browse files Browse the repository at this point in the history
  • Loading branch information
themacexpert committed Aug 2, 2024
1 parent c77cbc9 commit 323c245
Show file tree
Hide file tree
Showing 7 changed files with 58 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<div id="termynal" data-termynal>
<span data-ty="input"><span class="file-path"></span>docker-compose up</span>
<span data-ty>Starting docker_postgres_1 ... done</span>
<span data-ty>Starting docker_ipfs_1 ... done</span>
<span data-ty>Recreating docker_graph-node_1 ... done</span>
<span data-ty>Attaching to docker_ipfs_1, docker_postgres_1, docker_graph-node_1</span>
<span data-ty>ipfs_1 | Changing user to ipfs</span>
<span data-ty>ipfs_1 | IPFS version 0.4.23</span>
<span data-ty>ipfs_1 | Initializing IPFS node at /data/ipfs</span>
<span data-ty>postgres_1 | The files belonging to this database system will be owned by user "postgres"</span>
<span data-ty>postgres_1 | This user must also own the server process.</span>
<span data-ty>postgres_1 | The database cluster will be initialized with locale "en_US.utf8"</span>
<span data-ty>postgres_1 | The default database encoding has accordingly been set to "UTF8"</span>
<span data-ty>postgres_1 | The default text search configuration will be set to "english"</span>
<span data-ty>postgres_1 | Data page checksums are disabled.</span>
<span data-ty>postgres_1 | Fixing permissions on existing directory /var/lib/postgresql/data ... ok</span>
<span data-ty>postgres_1 | Creating subdirectories ... ok</span>
<span data-ty>postgres_1 | Selecting dynamic shared memory implementation ... posix</span>
<span data-ty>postgres_1 | Selecting default max_connections ... 100</span>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<div id="termynal" data-termynal>
<span data-ty>graph-node_1 | Aug 1 11:04:56.017 INFO Starting JSON-RPC admin server at: http://localhost</span>
<span data-ty>Aug 1 11:04:56.022 INFO Started all subgraphs, component: SubgraphRegistrar</span>
<span data-ty>graph-node_1 | Aug 1 11:04:56.024 INFO Starting GraphQL HTTP server at: http://localhost:8000, component: GraphQLServer</span>
<span data-ty>Aug 1 11:04:56.024 INFO Starting index node server at: http://localhost:8030, component: IndexNodeServer</span>
<span data-ty>Aug 1 11:04:56.028 INFO Starting metrics server at: http://localhost:8040, component: MetricsServer</span>
<span data-ty>graph-node_1 | Aug 1 11:04:56.029 INFO Starting GraphQL WebSocket server at: ws://localhost:8001, component: SubscriptionServer</span>
<span data-ty>graph-node_1 | Aug 1 11:04:56.151 INFO Downloading latest blocks from Ethereum. This may take a few minutes..., provider: mbase-rpc-0, component: BlockIngestor</span>
<span data-ty>graph-node_1 | Aug 1 11:05:03.083 INFO Syncing 1 blocks from Ethereum., code: BlockIngestionStatus, blocks_needed: 1, blocks_behind: 1, latest_block_head: 132365, current_block_head: 132364, provider: mbase-rpc-0, component: BlockIngestor</span>
<span data-ty>graph-node_1 | Aug 1 11:05:11.715 INFO Syncing 1 blocks from Ethereum., code: BlockIngestionStatus, blocks_needed: 1, blocks_behind: 1, latest_block_head: 132366, current_block_head: 132365, provider: mbase-rpc-0, component: BlockIngestor</span>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<div id="termynal" data-termynal>
<span data-ty>Pull complete: d073cd070242</span>
<span data-ty>Pull complete: 03790957a916</span>
<span data-ty>Pull complete: b3776ac15dab</span>
<span data-ty>Pull complete: 7144fd00aec4</span>
<span data-ty>Pull complete: 54f6491bd120</span>
<span data-ty>Pull complete: 247ab23c6036</span>
<span data-ty>Pull complete: 57800498c536</span>
<span data-ty>Pull complete: beb15a4d14f4</span>
<span data-ty>Pull complete: cfc751ecbc6e</span>
<span data-ty>Pull complete: bbf042afd4a4</span>
<span data-ty>Pull complete: 453056a20de6</span>
<span data-ty>Pull complete: d5b1a75378ef</span>
<span data-ty>Pull complete: 78412074775</span>
<span data-ty>Digest: sha256:61d5d8ef6c42035f05326b6455c201a809354084c842669048dd35602</span>
<span data-ty>Status: Downloaded newer image for postgres: latest</span>
<span data-ty>Creating docker_postgres_1 ... done</span>
<span data-ty>Creating docker_ipfs_1 ... done</span>
<span data-ty>Recreating docker_graph-node_1 ... done</span>
<span data-ty>Starting graph-node ... done</span>
<span data-ty>Host IP: 172.18.0.1</span>
<span data-ty>Stopping docker_graph-node_1 ... done</span>
<span data-ty="input"><span class="file-path">
</div>
Binary file not shown.
Binary file not shown.
Binary file not shown.
6 changes: 3 additions & 3 deletions node-operators/indexer-nodes/thegraph-node.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Next, execute the `setup.sh` file. This will pull all the necessary Docker image

The tail end from the logs of the previous command should look something similar to:

![Graph Node setup](/images/node-operators/indexer-nodes/the-graph/the-graph-node-1.webp)
--8<-- 'code/node-operators/indexer-nodes/graph-node/terminal/setup.md'

Once everything is set up, you need to modify the "Ethereum environment" inside the `docker-compose.yml` file, so that it points to the endpoint of the node you are running this Graph Node against. Note that the `setup.sh` file detects the `Host IP` and writes its value, so you'll need to modify it accordingly.

Expand Down Expand Up @@ -124,11 +124,11 @@ Lastly, to run the Graph Node, just run the following command:
docker-compose up
```

![Graph Node compose up](/images/node-operators/indexer-nodes/the-graph/the-graph-node-2.webp)
--8<-- 'code/node-operators/indexer-nodes/graph-node/terminal/docker-compose-up.md'

After a while, you should see logs related to the Graph Node syncing with the latest available block in the network:

![Graph Node logs](/images/node-operators/indexer-nodes/the-graph/the-graph-node-3.webp)
--8<-- 'code/node-operators/indexer-nodes/graph-node/terminal/output.md'

And that is it! You have a Graph Node running against the Moonbase Alpha TestNet. Feel free to adapt this example for Moonbeam and Moonriver as well.

Expand Down

0 comments on commit 323c245

Please sign in to comment.