Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/graphprotocol/subgraph-oracle
The Subgraph Oracle
https://github.com/graphprotocol/subgraph-oracle
Last synced: about 2 months ago
JSON representation
The Subgraph Oracle
- Host: GitHub
- URL: https://github.com/graphprotocol/subgraph-oracle
- Owner: graphprotocol
- License: apache-2.0
- Created: 2023-03-21T02:23:43.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-08-14T13:19:33.000Z (4 months ago)
- Last Synced: 2024-08-14T14:43:56.609Z (4 months ago)
- Language: Rust
- Homepage:
- Size: 3.17 MB
- Stars: 1
- Watchers: 18
- Forks: 9
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE-APACHE
Awesome Lists containing this project
README
## Subgraph Oracle
The Subgraph Oracle verifies the availability of the subgraph files and does other validity checks, if a subgraph is found to be invalid it will be denied rewards in the rewards manager contract. Usage:```
USAGE:
availability-oracle [FLAGS] [OPTIONS] --ipfs --signing-key --subgraph --urlFLAGS:
--dry-run log the results but not send a transaction to the rewards manager
-h, --help Prints help information
-V, --version Prints version informationOPTIONS:
--epoch-block-oracle-subgraph
Graphql endpoint to the epoch block oracle subgraph used for fetching supported networks [env: EPOCH_BLOCK_ORACLE_SUBGRAPH=]--grace-period
Grace period, in seconds from subgraph creation, for which subgraphs will not be checked [env: ORACLE_GRACE_PERIOD=] [default: 0]
--ipfs
IPFS endpoint with access to the subgraph files [env: ORACLE_IPFS=]--ipfs-concurrency
Maximum concurrent calls to IPFS [env: ORACLE_IPFS_CONCURRENCY=] [default: 100]--ipfs-timeout
IPFS timeout after which a file will be considered unavailable [env: ORACLE_IPFS_TIMEOUT_SECS=] [default: 30]--metrics-port
[env: ORACLE_METRICS_PORT=] [default: 8090]--min-signal
Minimum signal for a subgraph to be checked [env: ORACLE_MIN_SIGNAL=] [default: 100]--oracle-index
Assigned index for the oracle, to be used when voting on SubgraphAvailabilityManager [env: ORACLE_INDEX=]--period
How often the oracle should check the subgraphs. With the default value of 0, the oracle will run once and terminate [env: ORACLE_PERIOD_SECS=] [default: 0]
--rewards-manager-contract
The address of the rewards manager contract [env: REWARDS_MANAGER_CONTRACT=]--signing-key
The secret key of the oracle for signing transactions [env: ORACLE_SIGNING_KEY=]--subgraph
Graphql endpoint to the network subgraph [env: ORACLE_SUBGRAPH=]--subgraph-availability-manager-contract
The address of the subgraph availability manager contract [env: SUBGRAPH_AVAILABILITY_MANAGER_CONTRACT=]--supported-data-source-kinds ...
a comma separated list of the supported data source kinds [env: SUPPORTED_DATA_SOURCE_KINDS=] [default: ethereum,ethereum/contract,file/ipfs,substreams,file/arweave]--url
RPC url for the network [env: RPC_URL=]```
## Examples
### Example command to testing with a dry run:
```
cargo run -p availability-oracle -- \
--ipfs https://api.thegraph.com/ipfs \
--subgraph \
--min-signal 10000 \
--url \
--dry-run
```### Example command to run `SubgraphAvailabilityManager` configuration:
```
\
cargo run -p availability-oracle -- \
--ipfs https://api.thegraph.com/ipfs \
--subgraph \
--min-signal 10000 \
--url \
--subgraph-availability-manager-contract
--oracle-index \
--signing-key
```### Example command to run `RewardsManager` configuration:
```
\
cargo run -p availability-oracle -- \
--ipfs https://api.thegraph.com/ipfs \
--subgraph \
--min-signal 10000 \
--url \
--rewards-manager-contract
--signing-key
```