Skip to content

vu1n/eth-temporal

Repository files navigation

Ethereum Temporal Project

This project will spin up a Temporal cluster. Results are initially stored in a Postgres instance.

❯ make
up         Spin up Temporal cluster
up-b       Spin up and force build Temporal cluster
down       Destroy the Temporal cluster
stop       Stop the Temporal cluster
ps         Check the status of Temporal services
shell      Start a shell with the Temporal CLI
db-init    Initialize the database
api        Start up API server
worker     Start the worker
bworker    Start the backfill worker
fetch      Fetch latest after worker has started
test       Run tests

Quickstart

  1. Spin up Temporal cluster: $ make up

  2. Populate database with blocks from 14000000 to 14005000: $ make db-init

  3. Make a GET request:

  • curl http://localhost:8081/blockNumber/14000010
  • curl http://localhost:8081/traceBlock/14000010

Temporal cluster

The project uses a (slightly) modified docker-compose from Temporal

To spin up the Temporal cluster

$ make up

To destroy the cluster

$ make down

To stop the cluster

$ make stop

Start fetching blocks

The included go program will spawn worker processes to fetch new blocks, starting from the LATEST block and incrementing from there.

$ make fetch

Backfilling

Add the backfill tasks:

$ go run ./backfiller/ -start 200 -end 210 -size 3

API

Make an HTTP GET request to:

http://localhost:8081/blockNumber/{blockNumber}[0-9]+

http://localhost:8081/traceBlock/{blockNumber}[0-9]+

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published