Skip to content

Open Source Golden Axe #47

@ryansmith3136

Description

@ryansmith3136

Golden Axe is Open Source

Golden Axe (the successor to shovel) is the service that powers Index Supply's hosted API and it is now open source.

I'll explain why you should care.

Lazy Tables

The typical pattern for indexing Ethereum is to define your events and backfill the data. You don't have to backfill with Golden Axe. Instead, you provide your event signature(s) and then you can query that even as if it were a table in Postgres. This is made possible by a Postgres extension that can decode the encoded log data directly in Postgres.

The only tables in Golden Axe are: blocks, transactions, and logs.

No More Backfills

Because of lazy tables, you don't need to do backfills.

No More Backends

Because you can send SQL via HTTP to the API you can build your UIs to connect directly to Golden Axe.

Low Cost

It's a single rust binary that connects to a single Postgres server that can run on a single server! I use ZFS + EBS on the hosted service and it costs about $3,000 per month to host many chains (44TB currently) and thousands of clients.

Performance & Reliability

The Golden Axe instance that powers Index Supply runs on a single m7a.16xlarge with a 20TB EBS gp3 with 16000 IOPS and 1GBps throughput behind an ALB that terminates the TLS connection.

Here are the metrics for the past year of service

Image Image Image Image

The Tradeoffs

With Postgres you get the ability to have instant access to newly created blockchain data. Typically when a new block is created, it is only a few milliseconds before that data is reflected in Golden Axe's SQL API.

The Postgres database (by default) has BTREE indexes on log topics, address, and block number. This makes OLTP style queries very fast.

However, OLAP queries that scan millions of rows will be slow. I've run experiments using ClickHouse for these kinds of queries and while they are significantly faster, you lose the ability to quickly find specific events.

Learn More

You can play around with Golden Axe using the hosted version. There are query examples to get you started:

https://www.indexsupply.net/

You can checkout the API docs here:

https://www.indexsupply.net/docs

There is a TypeScript sdk here:

https://github.com/indexsupply/indexsupply.js

And a ludicrous mode TypeScript sdk here:

https://github.com/wevm/idxs

Thank you

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions