Launching Blockscout Explorer for Superchain on Kubernetes from scratch
Prize Pool
This project involves setting up our own Blockscout explorer for Optimism Superchain.
Recently, we launched a new Superchain for contract testing purpose, and we are now configuring the explorer to interact with chain data.
To ensure reliable operation of the explorer, Kubernetes has been set up to support high availability and enable scaling of explorer instances
The explorer is organized into four main components as follows:
We have launched a new chain based on Superchain. Currently, a single sequencer is producing new blocks and a full node is also running to provide RPC endpoints for chain data indexing.
All blockchain clients are hosted on Google Cloud Platform (GCP) within a private VPC network to ensure security by isolating them from the public network.
To support the Blockscout stack, a Kubernetes cluster has also been set up on GCP. This cluster is created within the same VPC network to securely access the JSON-RPC endpoints.
For storing indexed data, two PostgreSQL instances have been deployed on GCP: • The primary instance handles both read and write operations. • The replica instance provides real-time synchronization for backup purposes and supports scaling by splitting read and write requests between the two instances.
Like the other infrastructures, access to the PostgreSQL instances is restricted to the VPC network for enhancing security.
The Kubernetes configuration for the Blockscout stack has been implemented from the bottom to enable fine-grained control. The configuration files are available at the following paths:
To run the YAML files correctly, a secret named "postgres" is required for database access. However, the configuration for this secret is not included in the GitHub repository for security reasons.