Skip to main content
This page tells you what you need to get from cloning the repository to running a worker on your machine. BlockX is a Go workspace; python/ holds runtime and audit modules, and pyhost/ holds the Executor host that embeds CPython. See Architecture overview for the overall architecture and Repository layout and code layering for the directory layering.

Prerequisites

Every external service has a stand-in for local development, so you don’t need to set up etcd, BlockDB, Meta, or a chain node first:

Quick start

Follow the Quickstart to prepare dependencies, build the Worker and Executor host, and submit a local task. Startup commands are maintained there. When changing the EVM runtime bridge, start with:
Before connecting real chain data, identify the chain and block context. See Testing for the full test layers.

Makefile targets

Environment variables and config files

The worker’s load order lives in internal/worker/app/app.go: DefaultWorkerFullConfig() → the profile’s TuneDefaults → the JSON file pointed to by WORKER_CONFIG (LoadWorkerFullConfigFrom) → environment variable overrides. JSON field names match the json tags of WorkerFullConfig; see docs/deploy.md §9.3 in the blockx repository for an example. The coordinator reads only environment variables and has no config file (LoadCoordinatorRuntimeConfigFromEnv in internal/coordinator/app/config.go). The variables you’ll run into most often in local development: For the full table (dozens of entries covering AIMD, gRPC keepalive, the Iceberg cache, and more), see docs/deploy.md §9 in the blockx repository; deploy/env/worker.env.example is a sample env file for EC2 deployment that contains many keys read only by the host scripts, so it isn’t suitable for running locally as-is.

Code generation

Regenerate the Go bindings after changing .proto files:
The Makefile adds $(go env GOBIN) (or $(go env GOPATH)/bin) to PATH, so installing the plugins in the default location is enough. Proto source locations: api/grpc/*/ and internal/sdk/{blockdb,meta,localtestservice}/proto/. Commit the generated output together with the change.

Common issues

Install the dependencies pinned in python/pyproject.toml and confirm that the Executor host builds. Shared process-test setup lives in internal/testutil/pyhost.go.
This is a symptom of CGO_ENABLED=0. worker and bundle_worker must have CGO enabled, and the machine needs a C compiler. A slow first link is normal.
Read the error string: for icebergNamespace must not be empty, add ICEBERG_NAMESPACE; for plugin BlockTableWriteHandler requires blockdb.batchWriteAddr (only cmd/bundle_worker), add BLOCKDB_BATCH_WRITE_ADDR; for usage-related errors, add BLOCKX_USAGE_DISABLED=true.
Check that ETCD_ENDPOINTS points to the same etcd and that WORKER_ADDR is an address the Coordinator can reach; with container network isolation it must be set explicitly (docs/deploy.md §7). For single-machine local debugging, you can bypass the Coordinator with ETCD_ENDPOINTS=none.
Check that EXECUTOR_HOST_BIN points to the built host and PYTHONPATH includes runtime modules and virtual-environment dependencies. See the Quickstart.
These are private modules. Configure git credentials (for example git config --global url."git@github.com:".insteadOf "https://github.com/") and set GOPRIVATE=github.com/Chaintable/*. The Python-side blockx-py and friends are also private git dependencies and need credentials too.
  • Testing: commands, durations, and prerequisites for each test layer.
  • Contributing: commit and PR conventions.
  • Repository layout and code layering: what goes in cmd/, internal/, api/, and python/.
  • Deployment overview: image build and the EC2 runtime shape.
  • docs/deploy.md in the blockx repository: full environment variable table, Docker startup examples, and common issues.
  • AGENTS.md in the blockx repository: the authoritative checklist for build, test, and collaboration conventions.