Skip to content
This repository has been archived by the owner on Jul 20, 2023. It is now read-only.

[FRQ] Optionally pass in dependencies #74

Closed
chriswessels opened this issue Mar 21, 2023 · 3 comments
Closed

[FRQ] Optionally pass in dependencies #74

chriswessels opened this issue Mar 21, 2023 · 3 comments
Labels
enhancement New or enhanced functionality

Comments

@chriswessels
Copy link
Member

Problem statement
It is useful to be able to know which dependencies are attached to a given POI attestation. This would help us root cause divergence issues.

Expectation proposal
Imagine an Indexer could pass any number of supported dependencies as configuration. If this were a flag, it could take the form:

--dep <type>:<id>=<uri>

poi-radio --dep postgresql:primary=postgresql://host:5432 --dep chain:mainnet=http://geth:8545

For each provided flag, handler logic could be defined for the type that allows POI Radio to extract the version. For example, for the chain type, the POI radio could call web3_clientVersion at the provided uri to get the client version. A SQL statement could similarly be executed to get PostgreSQL version.

The resulting dependency information could be attached to POI messages.

Alternative considerations
None, but please comment with ideas.

@chriswessels chriswessels added the enhancement New or enhanced functionality label Mar 21, 2023
@hopeyen
Copy link
Collaborator

hopeyen commented Mar 21, 2023

Do you think it would make sense for all Graphcast message? or specific to POI radio? Could this be only optionally passed in or something required upon radio start-up?

@chriswessels
Copy link
Member Author

chriswessels commented Mar 22, 2023

Do you think it would make sense for all Graphcast message?

I don't think so. Dependencies are specifically relevant to POI attestations because they are data determinism inputs. So specific to POI Radio + POI messages.

Could this be only optionally passed in or something required upon radio start-up?

I had imagined that this would be entirely optional. If required, it'd significantly increase UX friction, and there are also many different configurations of Indexer and therefore dependencies (e.g. 1 chain vs 20 chains). So my proposal would be that the POI Radio supports a variety of dependency "types", like EIP155 chains, and the Indexer can pass in as many as they want. The POI Radio can then query the chain for both the client version information, and chain ID, and match these with the deployment's network.

@hopeyen hopeyen added this to the 0.2.0 milestone Apr 17, 2023
@AbelTedros AbelTedros changed the title [Feat.Req] Optionally pass in dependencies [FRQ] Optionally pass in dependencies May 3, 2023
@hopeyen hopeyen modified the milestones: 0.2.0, Stability improvements May 9, 2023
@pete-eiger pete-eiger removed this from the 0.3.0 milestone May 22, 2023
@hopeyen
Copy link
Collaborator

hopeyen commented Jul 18, 2023

Moved to graphops/subgraph-radio#9

@hopeyen hopeyen closed this as completed Jul 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New or enhanced functionality
Projects
None yet
Development

No branches or pull requests

3 participants