graphops / graphcast-registry Goto Github PK
View Code? Open in Web Editor NEWGraphcast Registry allows registering a Graphcast ID to join Graphcast
Home Page: https://github.com/graphops/graphcast-registry
License: Apache License 2.0
Graphcast Registry allows registering a Graphcast ID to join Graphcast
Home Page: https://github.com/graphops/graphcast-registry
License: Apache License 2.0
Graphcast registry connects The Graph network with Graphcast pubsub network by defining the mapping between graphcast id and indexer operator addresses. The caller that sets graphcast id must be an indexer operator registered on The Graph network subgraph. Since there are new network subgraphs on Arbitrum-One and Arbitrum-Goerli, we should deploy new registries to support indexers on Arbitrum.
Two major approaches are
We consider the trade-off between the engineering effort to make the multi-layer functionality for a temporary state versus requiring current users to migrate to a separate network, and prefers to choose the later option for the quicker, cleaner, and easier path.
Arbitrum-goerli
: Create addresses (deployer account, indexer and operator, graphcast id, gnosis safe), deploy contracts and subgraph, test transactions to verify functionalities, run example radios on Graphcast networkVery often an indexer address is a token lock wallet, which means they will not be able to call setGraphcastID. We should update to allow the message sender to represent the indexer address.
Between indexer operator and wallet beneficiaries, the operator address makes more sense as it has lower OpSec, more replaceable, and conventionally act on behalf of the indexer - an indexer can optionally create a dedicated operator for registering graphcastID.
Spam protection: Add a check on sender's address for calling setGossipOpeartor
such that only an address that is a valid GraphAccount (or specifically an indexer account) can set a gossip operator, revert otherwise.
Due to the preferred restriction of 1:1 relationship between indexer and Graphcast agent, there exist a vulnerability for indexers who submits a transaction to set their Graphcast agent, in which a malicious actor can frontrun transactions to disabled someone from setting the desired agent address.
Alice wants to set her operator to 0x1234.
She calls setGossipOperator(0x1234)
.
Malicious Bob sees this in the mempool and sends another setGossipOperator(0x1234)
with higher gas price.
After Bob's tx succeeds, Alice's will fail because operatorRegistered[0x1234]
is already set.
address
field for Graphcast operator, instead require a message signed by the operator private key. Message object should contain both operator address and the message sender address. The contract verify the msg.sender and message signatureA declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.