gRPC Single Sequencer App
This application runs a Evolve node with a single sequencer that connects to a remote execution client via gRPC. It allows you to use any execution layer that implements the Evolve execution gRPC interface.
Overview
The gRPC single sequencer app provides:
- A Evolve consensus node with single sequencer
- Connection to remote execution clients via gRPC
- Full data availability layer integration
- P2P networking capabilities
Prerequisites
- A running execution client that implements the Evolve gRPC execution interface
- Access to a data availability layer (e.g., local DA, Celestia)
- Go 1.22 or higher
Installation
From the repository root:
cd apps/grpc/single
go build -o grpc-single
Usage
1. Initialize the Node
First, initialize the node configuration:
./grpc-single init --root-dir ~/.grpc-single
This creates the necessary configuration files and directories.
Edit the configuration file at ~/.grpc-single/config/config.toml to set your preferred parameters, or use command-line flags.
3. Start the Execution Service
Before starting the Evolve node, ensure your gRPC execution service is running.
4. Run the Node
Start the Evolve node with:
./grpc-single start \
--root-dir ~/.grpc-single \
--grpc-executor-url http://localhost:50051 \
--da.address http://localhost:7980 \
--da.auth-token your-da-token
Command-Line Flags
gRPC-specific Flags
--grpc-executor-url: URL of the gRPC execution service (default: http://localhost:50051)
Common Evolve Flags
--root-dir: Root directory for config and data (default: ~/.grpc-single)
--chain-id: The chain ID for your rollup
--da.address: Data availability layer address
--da.auth-token: Authentication token for DA layer
--da.namespace: Namespace for DA layer (optional)
--p2p.listen-address: P2P listen address (default: /ip4/0.0.0.0/tcp/7676)
--block-time: Time between blocks (default: 1s)
Example: Running with Local DA
-
Start the local DA service:
cd da/cmd/local-da
go run main.go
-
Start your gRPC execution service:
# Your execution service implementation
-
Initialize and run the node:
./grpc-single init --root-dir ~/.grpc-single --chain-id test-chain
./grpc-single start \
--root-dir ~/.grpc-single \
--grpc-executor-url http://localhost:50051 \
--da.address http://localhost:7980
Architecture
┌─────────────────┐ ┌──────────────────┐ ┌─────────────┐
│ Evolve Node │────▶│ gRPC Execution │────▶│ Execution │
│ (Single Seqr) │◀────│ Client │◀────│ Service │
└─────────────────┘ └──────────────────┘ └─────────────┘
│ │
│ │
▼ ▼
┌─────────────────┐ ┌─────────────┐
│ DA │ │ State │
│ Layer │ │ Storage │
└─────────────────┘ └─────────────┘
Development
Building from Source
go build -o grpc-single
Running Tests
go test ./...
Troubleshooting
Connection Refused
If you see "connection refused" errors, ensure:
- Your gRPC execution service is running
- The execution service URL is correct
- No firewall is blocking the connection
DA Layer Issues
If you have issues connecting to the DA layer:
- Verify the DA service is running
- Check the authentication token
- Ensure the namespace exists (if using Celestia)
See Also