Skip to content

Commit c91dd8b

Browse files
committed
feat: rescope poi-radio
1 parent a98fbff commit c91dd8b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+905
-867
lines changed

.github/workflows/docker.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99

1010
env:
1111
REGISTRY: ghcr.io
12-
BASE_NAME: graphops/poi-radio
12+
BASE_NAME: graphops/subgraph-radio
1313

1414
jobs:
1515
build-linux:

.github/workflows/gen-binaries.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ jobs:
3333
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
3434
with:
3535
upload_url: ${{ github.event.release.upload_url }}
36-
asset_path: ./target/release/poi-radio
37-
asset_name: poi-radio-${{ github.event.release.tag_name }}-ubuntu
36+
asset_path: ./target/release/subgraph-radio
37+
asset_name: subgraph-radio-${{ github.event.release.tag_name }}-ubuntu
3838
asset_content_type: binary/octet-stream
3939
build-macos:
4040
runs-on: macos-latest
@@ -56,6 +56,6 @@ jobs:
5656
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
5757
with:
5858
upload_url: ${{ github.event.release.upload_url }}
59-
asset_path: ./target/release/poi-radio
60-
asset_name: poi-radio-${{ github.event.release.tag_name }}-macos
59+
asset_path: ./target/release/subgraph-radio
60+
asset_name: subgraph-radio-${{ github.event.release.tag_name }}-macos
6161
asset_content_type: binary/octet-stream

Cargo.lock

Lines changed: 53 additions & 53 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[workspace]
22

3-
members = ["poi-radio", "test-sender", "test-utils", "test-runner", "one-shot"]
3+
members = ["subgraph-radio", "test-sender", "test-utils", "test-runner", "one-shot"]
44
resolver = "2"
55

66
[profile.dev]

Dockerfile

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,26 +14,26 @@ RUN apt-get update \
1414

1515
RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates
1616

17-
COPY . /poi-radio
18-
WORKDIR /poi-radio
17+
COPY . /subgraph-radio
18+
WORKDIR /subgraph-radio
1919

2020
RUN sh install-golang.sh
2121
ENV PATH=$PATH:/usr/local/go/bin
2222

23-
RUN cargo build --release -p poi-radio
23+
RUN cargo build --release -p subgraph-radio
2424

2525
FROM alpine:3.17.3 as alpine
2626
RUN set -x \
2727
&& apk update \
2828
&& apk add --no-cache upx dumb-init
29-
COPY --from=build-image /poi-radio/target/release/poi-radio /poi-radio/target/release/poi-radio
30-
RUN upx --overlay=strip --best /poi-radio/target/release/poi-radio
29+
COPY --from=build-image /subgraph-radio/target/release/subgraph-radio /subgraph-radio/target/release/subgraph-radio
30+
RUN upx --overlay=strip --best /subgraph-radio/target/release/subgraph-radio
3131

3232
FROM gcr.io/distroless/cc AS runtime
3333
COPY --from=build-image /usr/share/zoneinfo /usr/share/zoneinfo
3434
COPY --from=build-image /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
3535
COPY --from=build-image /etc/passwd /etc/passwd
3636
COPY --from=build-image /etc/group /etc/group
3737
COPY --from=alpine /usr/bin/dumb-init /usr/bin/dumb-init
38-
COPY --from=alpine "/poi-radio/target/release/poi-radio" "/usr/local/bin/poi-radio"
39-
ENTRYPOINT [ "/usr/bin/dumb-init", "--", "/usr/local/bin/poi-radio" ]
38+
COPY --from=alpine "/subgraph-radio/target/release/subgraph-radio" "/usr/local/bin/subgraph-radio"
39+
ENTRYPOINT [ "/usr/bin/dumb-init", "--", "/usr/local/bin/subgraph-radio" ]

README.md

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,23 @@
1-
# POI Radio
1+
# Subgraph Radio
22

3-
[![Docs](https://img.shields.io/badge/docs-latest-brightgreen.svg)](https://docs.graphops.xyz/graphcast/radios/poi-radio)
4-
[![crates.io](https://img.shields.io/crates/v/poi-radio.svg)](https://crates.io/crates/poi-radio)
3+
[![Docs](https://img.shields.io/badge/docs-latest-brightgreen.svg)](https://docs.graphops.xyz/graphcast/radios/subgraph-radio)
4+
[![crates.io](https://img.shields.io/crates/v/subgraph-radio.svg)](https://crates.io/crates/subgraph-radio)
55

66
## Introduction
77

8+
This is a Graphcast Radio focused on sending gossips about particular subgraphs on a P2P network. The available message types are Public Proof of Indexing (PoI) messages from an indexer, or a version upgrade annoucement message from a subgraph owner.
9+
10+
Reaching Public PoI consensus and ensuring data availability during subgraph upgrades is critical to the indexing service. Both messages should find value from indexers, subgraph owners, and ultimately data consumers.
11+
12+
[Documentation](https://docs.graphops.xyz/graphcast/radios/subgraph-radio) | [Packages](https://github.com/graphops/subgraph-radio/pkgs/container/subgraph-radio) | [Chat](https://discord.com/channels/438038660412342282/1087503343410225152)
13+
14+
### Public PoI message
15+
816
The key requirement for an Indexer to earn indexing rewards is to submit a valid Proof of Indexing (POI) promptly. The importance of valid POIs causes many Indexers to alert each other on subgraph health in community discussions. To alleviate the Indexer workload, this Radio utilized Graphcast SDK to exchange and aggregate POI along with a list of Indexer on-chain identities that can be used to trace reputations. With the pubsub pattern, the Indexer can get notified as soon as other indexers (with majority of stake) publish a POI different from the local POI.
917

10-
[Documentation](https://docs.graphops.xyz/graphcast/radios/poi-radio) | [Packages](https://github.com/graphops/poi-radio/pkgs/container/poi-radio) | [Chat](https://discord.com/channels/438038660412342282/1087503343410225152)
18+
### Version Upgrade message
19+
20+
When developers publish a new version (subgraph deployment) to their subgraph, data service instability may occur while their API queries the pre-existing version. Indexers may require some time to sync a subgraph to the chainhead after they have stopped syncing the previous deployment. To decrease the upgrade friction, developers can send a message before publishing the subgraph, including the old deployment hash, new deployment hash, matching subgraph id, the time they would like to publish the version. Indexers who is running the subgraph radio with notification methods configured should get notified; later on this radio can optionally automate the deployment process on graph node, but it is still at the subgraph developers' discretion to await for the indexers to sync upto chainhead, in which point they can publish the staged version without disrupting API usage.
1121

1222
## 🧪 Testing
1323

contributing.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

2-
# Contributing to the POI-Crosschecker Radio
2+
# Contributing to the Subgraph Radio
33

4-
Welcome to Graphcast POI crosschecker Radio! Thanks a ton for your interest in contributing.
4+
Welcome to Graphcast Subgraph Radio! Thanks a ton for your interest in contributing.
55

66
If you run into any problems feel free to create an issue. PRs are much appreciated for simple things. If it's something more complex we'd appreciate having a quick chat in GitHub Issues or the Graph Discord server.
77

one-shot/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ edition = "2021"
55
authors = ["GraphOps (axiomatic-aardvark, hopeyen)"]
66
description = "One-shot messaging using Graphcast SDK (can be separated to a different repo)"
77
license = "Apache-2.0"
8-
repository = "https://github.com/graphops/poi-radio"
8+
repository = "https://github.com/graphops/subgraph-radio"
99
keywords = ["graphprotocol", "data-integrity", "Indexer", "waku", "p2p"]
1010
categories = ["network-programming", "web-programming::http-client"]
1111

1212
[dependencies]
1313
graphcast-sdk = "0.4.0"
14-
poi-radio = { path = "../poi-radio" }
14+
subgraph-radio = { path = "../subgraph-radio" }
1515
prost = "0.11"
1616
once_cell = "1.17"
1717
chrono = "0.4"

one-shot/src/config.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ pub struct Config {
270270
long,
271271
value_name = "RADIO_NAME",
272272
env = "RADIO_NAME",
273-
default_value = "poi-radio"
273+
default_value = "subgraph-radio"
274274
)]
275275
pub radio_name: String,
276276
#[clap(long, value_name = "FILTER_PROTOCOL", env = "ENABLE_FILTER_PROTOCOL")]

one-shot/src/operator/operation.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use tracing::{error, info};
44
use graphcast_sdk::networks::NetworkName;
55

66
use crate::operator::RadioOperator;
7-
use poi_radio::{messages::upgrade::VersionUpgradeMessage, OperationError};
7+
use subgraph_radio::{messages::upgrade::VersionUpgradeMessage, OperationError};
88

99
impl RadioOperator {
1010
pub async fn gossip_one_shot(&self) -> Result<String, OperationError> {

0 commit comments

Comments
 (0)