37 releases

0.7.4 Nov 20, 2024
0.7.1 Mar 25, 2024
0.6.1 Feb 5, 2024
0.5.2 Nov 2, 2023
0.1.0-alpha1 Jan 16, 2023

#2 in #waku

Download history 16/week @ 2024-09-20 21/week @ 2024-09-27 3/week @ 2024-10-04 99/week @ 2024-11-15 36/week @ 2024-11-22 2/week @ 2024-11-29 24/week @ 2024-12-06

161 downloads per month
Used in 5 crates

Apache-2.0

125KB
3K SLoC

Graphcast SDK

Docs crates.io

Introduction

Graphcast is a decentralized, distributed peer-to-peer (P2P) communication tool that allows Indexers across the network to exchange information in real-time. Today, network participants coordinate with one another using the protocol by submitting on-chain transactions that update the shared global state in The Graph Network. These transactions cost gas, which makes some types of signaling or coordination between participants too expensive. In other words, sending signals to other network participants has a high cost that is determined by the cost of transacting on the Ethereum blockchain. Graphcast solves this problem.

To see the full idea behind Graphcast, you can check out the GRC for it.

Upgrading

Updates to the SDK will be merged into the main branch once their respective PR has been approved.

Testing

We recommend using nextest as your test runner. Once you have it installed you can run the the suite using the following command:

cargo nextest run

Alternatively, to run graphcast-sdk tests using docker to avoid local dependency issues:

./scripts/docker-run-tests.sh

How does the Graphcast SDK work?

The SDK is essentially a base layer that Radio developers can use to build their applications without needing to worry about starting everything from scratch. The components that are included in the SDK are:

  • Connecting to the Graphcast network, e.g., a cluster of Waku nodes. It also provides an interface to subscribe to receive messages on specific topics and to broadcast messages onto the network.
  • Interactions with an Ethereum node.

There is also a POI cross-checker Radio in the examples/ folder that leverages the base layer and defines the specific logic around constructing and sending messages, as well as receiving and handling them.

Graphcast Network Configurations

A Graphcast radio can interact with many parts of The Graph network modularly; below are the network configurations actively supported by our team. You are free to define and use your own Graphcast Network and Graphcast Registry.

Graphcast Network Supporting Network Graph Network Graphcast Registry
Mainnet Mainnet https://api.thegraph.com/subgraphs/name/graphprotocol/graph-network-mainnet https://api.thegraph.com/subgraphs/name/hopeyen/graphcast-registry-mainnet
Testnet Goerli https://api.thegraph.com/subgraphs/name/graphprotocol/graph-network-goerli https://api.thegraph.com/subgraphs/name/hopeyen/graphcast-registry-goerli
Testnet Arbitrum Goerli https://api.thegraph.com/subgraphs/name/graphprotocol/graph-network-arbitrum-goerli https://api.thegraph.com/subgraphs/name/hopeyen/graphcast-registry-arbitrum-go

Contributing

We welcome and appreciate your contributions! Please see the Contributor Guide, Code Of Conduct and Security Notes for this repository.

Dependencies

~81MB
~1.5M SLoC