From f1674f25d5aba0686aa143a948bf691eacb15ee5 Mon Sep 17 00:00:00 2001 From: hopeyen Date: Mon, 17 Jun 2024 07:50:00 -0500 Subject: [PATCH] docs: replace hosted service endpoints with decentralized network requiring api-key from users --- docs/graphcast/radios/graphcast-cli.md | 4 ++-- .../subgraph-radio/advanced-configuration.md | 16 +++++++-------- docs/graphcast/radios/subgraph-radio/intro.md | 8 ++++---- docs/graphcast/sdk/radio-dev.md | 2 -- docs/graphcast/sdk/registry.md | 20 +++++++++---------- docs/launchpad/quick-start.md | 13 ++++++++---- 6 files changed, 32 insertions(+), 31 deletions(-) diff --git a/docs/graphcast/radios/graphcast-cli.md b/docs/graphcast/radios/graphcast-cli.md index 94822c08..81631e14 100644 --- a/docs/graphcast/radios/graphcast-cli.md +++ b/docs/graphcast/radios/graphcast-cli.md @@ -17,8 +17,8 @@ The Graphcast CLI is configured using config variables. You will need to prepare | `PRIVATE_KEY` | Private key to the Graphcast ID wallet (precendence over mnemonics).
Example: `PRIVATE_KEY=YOUR_PRIVATE_KEY` | | `MNEMONIC` | Mnemonic to the Graphcast ID wallet (first address of the wallet is used; Only one of private key or mnemonic is needed).
Example: `MNEMONIC=YOUR_MNEMONIC` | | `GRAPH_ACCOUNT` | Graph account corresponding to Graphcast operator.
Example: `GRAPH_ACCOUNT=YOUR_GRAPH_ACCOUNT` | -| `REGISTRY_SUBGRAPH` | Subgraph endpoint to the Graphcast Registry.
Default: `https://api.thegraph.com/subgraphs/name/hopeyen/graphcast-registry-goerli` | -| `NETWORK_SUBGRAPH` | Subgraph endpoint to The Graph network subgraph.
Default: `https://api.thegraph.com/subgraphs/name/graphprotocol/graph-network-goerli` | +| `REGISTRY_SUBGRAPH` | Subgraph endpoint to the Graphcast Registry.
Default: `https://gateway-arbitrum.network.thegraph.com/api/{api-key}/subgraphs/id/9bnkkKmSqX3FpoxnBVNFcQfmdSJt2Zc8PrsY1ek64jPr` | +| `NETWORK_SUBGRAPH` | Subgraph endpoint to The Graph network subgraph.
Default: `https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/3xQHhMudr1oh69ut36G2mbzpYmYxwqCeU6wwqyCDCnqV` | | `GRAPHCAST_NETWORK` | Supported Graphcast networks: mainnet, testnet.
Default: `testnet` | | `LOG_LEVEL` | Logging configuration to set as RUST_LOG.
Default: `info` | | `LOG_FORMAT` | Support logging formats: pretty, json, full, compact.
Default: `pretty` | diff --git a/docs/graphcast/radios/subgraph-radio/advanced-configuration.md b/docs/graphcast/radios/subgraph-radio/advanced-configuration.md index 22d2f970..ec2e447a 100644 --- a/docs/graphcast/radios/subgraph-radio/advanced-configuration.md +++ b/docs/graphcast/radios/subgraph-radio/advanced-configuration.md @@ -113,8 +113,8 @@ Example .env file: ```bash PRIVATE_KEY="a2b3c1d4e5f6890e7f6g5h4i3j2k1l0m" GRAPH_NODE_STATUS_ENDPOINT="http://127.0.0.42:8030/graphql" -REGISTRY_SUBGRAPH="https://api.thegraph.com/subgraphs/name/randomuser/graphcast-registry-mainnet" -NETWORK_SUBGRAPH="https://api.thegraph.com/subgraphs/name/graphprotocol/graph-mainnet" +REGISTRY_SUBGRAPH="https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/5tHgjCNF4XxAzp9ja8dU3j9JrqU7zctXj6DnxWpwAzc6" +NETWORK_SUBGRAPH="https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/DZz4kDTdmzWLWsV373w2bSmoar3umKKH9y82SUKr5qmp" GRAPHCAST_NETWORK=mainnet INDEXER_ADDRESS="0xa1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6" ``` @@ -127,8 +127,8 @@ Pass the configuration options directly as command-line arguments. docker run ghcr.io/graphops/subgraph-radio \ --private-key "a2b3c1d4e5f6890e7f6g5h4i3j2k1l0m" \ --graph-node-status-endpoint "http://127.0.0.42:8030/graphql" \ - --registry-subgraph "https://api.thegraph.com/subgraphs/name/randomuser/graphcast-registry-mainnet" \ - --network-subgraph "https://api.thegraph.com/subgraphs/name/graphprotocol/graph-mainnet" \ + --registry-subgraph "https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/5tHgjCNF4XxAzp9ja8dU3j9JrqU7zctXj6DnxWpwAzc6" \ + --network-subgraph "https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/DZz4kDTdmzWLWsV373w2bSmoar3umKKH9y82SUKr5qmp" \ --graphcast-network mainnet \ --indexer-address "0xa1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6" ``` @@ -141,8 +141,8 @@ Example TOML configuration file (`config.toml`): [graph_stack] graph_node_status_endpoint = 'http://127.0.0.42:8030/graphql' indexer_address = '0xa1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6' -registry_subgraph = 'https://api.thegraph.com/subgraphs/name/randomuser/graphcast-registry-mainnet' -network_subgraph = 'https://api.thegraph.com/subgraphs/name/graphprotocol/graph-mainnet' +registry_subgraph = 'https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/5tHgjCNF4XxAzp9ja8dU3j9JrqU7zctXj6DnxWpwAzc6' +network_subgraph = 'https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/DZz4kDTdmzWLWsV373w2bSmoar3umKKH9y82SUKr5qmp' private_key = 'a2b3c1d4e5f6890e7f6g5h4i3j2k1l0m' ``` @@ -154,8 +154,8 @@ Example YAML configuration file (`config.yaml`): graph_stack: graph_node_status_endpoint: "http://127.0.0.42:8030/graphql" indexer_address: "0xa1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6" - registry_subgraph: "https://api.thegraph.com/subgraphs/name/randomuser/graphcast-registry-mainnet" - network_subgraph: "https://api.thegraph.com/subgraphs/name/graphprotocol/graph-mainnet" + registry_subgraph: "https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/5tHgjCNF4XxAzp9ja8dU3j9JrqU7zctXj6DnxWpwAzc6" + network_subgraph: "https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/DZz4kDTdmzWLWsV373w2bSmoar3umKKH9y82SUKr5qmp" private_key: "a2b3c1d4e5f6890e7f6g5h4i3j2k1l0m" ``` diff --git a/docs/graphcast/radios/subgraph-radio/intro.md b/docs/graphcast/radios/subgraph-radio/intro.md index d44eaf89..37940227 100644 --- a/docs/graphcast/radios/subgraph-radio/intro.md +++ b/docs/graphcast/radios/subgraph-radio/intro.md @@ -37,8 +37,8 @@ docker pull ghcr.io/graphops/subgraph-radio:latest ```bash docker run \ -e GRAPHCAST_NETWORK="mainnet" \ - -e REGISTRY_SUBGRAPH="https://api.thegraph.com/subgraphs/name/hopeyen/graphcast-registry-mainnet" \ - -e NETWORK_SUBGRAPH="https://api.thegraph.com/subgraphs/name/graphprotocol/graph-network-mainnet" \ + -e REGISTRY_SUBGRAPH="https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/5tHgjCNF4XxAzp9ja8dU3j9JrqU7zctXj6DnxWpwAzc6" \ + -e NETWORK_SUBGRAPH="https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/DZz4kDTdmzWLWsV373w2bSmoar3umKKH9y82SUKr5qmp" \ -e PRIVATE_KEY="PRIVATE_KEY" \ -e GRAPH_NODE_STATUS_ENDPOINT="http://graph-node:8030/graphql" \ -e RUST_LOG="warn,hyper=warn,graphcast_sdk=info,subgraph_radio=info" \ @@ -59,8 +59,8 @@ services: restart: unless-stopped environment: GRAPHCAST_NETWORK: "mainnet" - REGISTRY_SUBGRAPH: "https://api.thegraph.com/subgraphs/name/hopeyen/graphcast-registry-mainnet" - NETWORK_SUBGRAPH: "https://api.thegraph.com/subgraphs/name/graphprotocol/graph-network-mainnet" + REGISTRY_SUBGRAPH: "https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/5tHgjCNF4XxAzp9ja8dU3j9JrqU7zctXj6DnxWpwAzc6" + NETWORK_SUBGRAPH: "https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/DZz4kDTdmzWLWsV373w2bSmoar3umKKH9y82SUKr5qmp" PRIVATE_KEY: "PRIVATE_KEY" GRAPH_NODE_STATUS_ENDPOINT: "http://graph-node:8030/graphql" RUST_LOG: "warn,hyper=warn,graphcast_sdk=info,subgraph_radio=info" diff --git a/docs/graphcast/sdk/radio-dev.md b/docs/graphcast/sdk/radio-dev.md index 4e8222ae..7a10c30e 100644 --- a/docs/graphcast/sdk/radio-dev.md +++ b/docs/graphcast/sdk/radio-dev.md @@ -227,7 +227,6 @@ pub struct Config { value_name = "SUBGRAPH", env = "REGISTRY_SUBGRAPH", help = "Subgraph endpoint to the Graphcast Registry", - default_value = "https://api.thegraph.com/subgraphs/name/hopeyen/graphcast-registry-goerli" )] pub registry_subgraph: String, #[clap( @@ -242,7 +241,6 @@ pub struct Config { value_name = "SUBGRAPH", env = "NETWORK_SUBGRAPH", help = "Subgraph endpoint to The Graph network subgraph", - default_value = "https://gateway.testnet.thegraph.com/network" )] pub network_subgraph: String, #[clap( diff --git a/docs/graphcast/sdk/registry.md b/docs/graphcast/sdk/registry.md index 92bedd88..3cdce4c6 100644 --- a/docs/graphcast/sdk/registry.md +++ b/docs/graphcast/sdk/registry.md @@ -42,12 +42,11 @@ You can register multiple Operators for your Indexer in parallel. If you would p #### Registry endpoints -| Network | Registry Contract | Subgraph API | -| ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| Ethereum-mainnet | [0x89f97698d6006f25570cd2e31737d3d22aedcbcf](https://etherscan.io/address/0x89f97698d6006f25570cd2e31737d3d22aedcbcf#writeProxyContract) | [https://api.thegraph.com/subgraphs/name/hopeyen/graphcast-registry-mainnet](https://api.thegraph.com/subgraphs/name/hopeyen/graphcast-registry-mainnet) | -| Ethereum-goerli | [0x26ebbA649FAa7b56FDB8DE9Ea17aF3504B76BFA0](https://goerli.etherscan.io/address/0x26ebbA649FAa7b56FDB8DE9Ea17aF3504B76BFA0#writeProxyContract) | [https://api.thegraph.com/subgraphs/name/hopeyen/graphcast-registry-goerli](https://api.thegraph.com/subgraphs/name/hopeyen/graphcast-registry-goerli) | -| Arbitrum-one | [0xfae79e8cb8fbac2408e5baf89262bd92b6ca464a](https://arbiscan.io/address/0xfae79e8cb8fbac2408e5baf89262bd92b6ca464a#writeProxyContract) | [https://api.thegraph.com/subgraphs/name/hopeyen/graphcast-registry-arb-one](https://api.thegraph.com/subgraphs/name/hopeyen/graphcast-registry-arb-one) | -| Arbitrum-goerli | [0x50c2d70a41ecefe4cc54a331457ea204ecf97292](https://goerli.arbiscan.io/address/0x50c2d70a41ecefe4cc54a331457ea204ecf97292#writeProxyContract) | [https://api.thegraph.com/subgraphs/name/hopeyen/graphcast-registry-arbitrum-go](https://api.thegraph.com/subgraphs/name/hopeyen/graphcast-registry-arbitrum-go) | +| Network | Registry Contract | +| ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | +| Arbitrum-one | [0xfae79e8cb8fbac2408e5baf89262bd92b6ca464a](https://arbiscan.io/address/0xfae79e8cb8fbac2408e5baf89262bd92b6ca464a#writeProxyContract) | +| Arbitrum-sepolia | [0x17c3a072E5b1B2c260C29D289ee2E7372b8f7C69](https://sepolia.arbiscan.io/address/0x17c3a072E5b1B2c260C29D289ee2E7372b8f7C69#writeProxyContract) | +| Ethereum-mainnet | [0x89f97698d6006f25570cd2e31737d3d22aedcbcf](https://etherscan.io/address/0x89f97698d6006f25570cd2e31737d3d22aedcbcf#writeProxyContract) | :::info Each Graphcast ID can be associated with a single Indexer. To revoke a Graphcast ID for your Indexer, call `setGraphcastIDFor(indexer_address, graphcast_id)` with a Graphcast ID of `0x0` using a registered Indexer Operator Account. @@ -57,11 +56,10 @@ Each Graphcast ID can be associated with a single Indexer. To revoke a Graphcast Here we list out the APIs the team supports actively. For network subgraph endpoint, We recommend you to expose your indexer-service's endpoint at `/network` queries with authentication. You can also index and serve registry subgraph but they are not currently deployed on the decentralized network. -Here are the endpoints available on the hosted service. +Here are the endpoints available on the decentralized network, please replace `[api-key]` with a valid api key for service. | Protocol Network | Graphcast Network | Registry Subgraph Endpoint | Network Subgraph Endpoint | | ---------------- | ----------------- | -------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | -| Ethereum Mainnet | `mainnet` | `https://api.thegraph.com/subgraphs/name/hopeyen/graphcast-registry-mainnet` | `https://api.thegraph.com/subgraphs/name/graphprotocol/graph-network-mainnet` | -| Goerli | `testnet` | `https://api.thegraph.com/subgraphs/name/hopeyen/graphcast-registry-goerli` | `https://api.thegraph.com/subgraphs/name/graphprotocol/graph-network-goerli` | -| Arbitrum-One | `mainnet` | `https://api.thegraph.com/subgraphs/name/hopeyen/graphcast-registry-arb-one` | `https://api.thegraph.com/subgraphs/name/graphprotocol/graph-network-arbitrum` | -| Arbitrum-Goerli | `testnet` | `https://api.thegraph.com/subgraphs/name/hopeyen/graphcast-registry-arbitrum-go` | `https://api.thegraph.com/subgraphs/name/graphprotocol/graph-network-arbitrum-goerli` | +| Arbitrum-One | `mainnet` | `https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/5tHgjCNF4XxAzp9ja8dU3j9JrqU7zctXj6DnxWpwAzc6` | `https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/DZz4kDTdmzWLWsV373w2bSmoar3umKKH9y82SUKr5qmp` | +| Arbitrum-Sepolia | `testnet` | `https://gateway-arbitrum.network.thegraph.com/api/{api-key}/subgraphs/id/9bnkkKmSqX3FpoxnBVNFcQfmdSJt2Zc8PrsY1ek64jPr` | `https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/3xQHhMudr1oh69ut36G2mbzpYmYxwqCeU6wwqyCDCnqV` | +| Ethereum Mainnet | `mainnet` | `https://gateway-arbitrum.network.thegraph.com/api/[api-key]/subgraphs/id/rcKzonu5NGbKcxCDZoQWmcckRKJw8rnmMNJDV8UeDzJ` | `https://gateway-arbitrum.network.thegraph.com/api/{api-key}/subgraphs/id/GgwLf9BTFBJi6Z5iYHssMAGEE4w5dR3Jox2dMLrBxnCT` | diff --git a/docs/launchpad/quick-start.md b/docs/launchpad/quick-start.md index f0d138a6..ff513e8d 100644 --- a/docs/launchpad/quick-start.md +++ b/docs/launchpad/quick-start.md @@ -537,17 +537,20 @@ releases: config: ethereum: "http://proxyd-proxyd.arbitrum-sepolia:8545" ethereum-network: "arbitrum-sepolia" - network-subgraph-endpoint: "https://api.thegraph.com/subgraphs/name/graphprotocol/graph-network-arbitrum-sepolia" + network-subgraph-endpoint: "https://gateway-arbitrum.network.thegraph.com/api/{{ .Values.secretEnv.api_key }}/subgraphs/id/3xQHhMudr1oh69ut36G2mbzpYmYxwqCeU6wwqyCDCnqV" graph-node-query-endpoint: "http://graph-node-query:8000" graph-node-status-endpoint: "http://graph-node-block-ingestor:8030/graphql" postgres-host: "" ## change me postgres-database: "" ## change me + secretEnv: + api_key: + indexerAgent: config: collect-receipts-endpoint: "https://gateway-testnet-arbitrum.network.thegraph.com/collect-receipts" network-subgraph-deployment: "QmT8UDGK7zKd2u2NQZwhLYHdA4KM55QsivkE3ouCuX6fEj" # find at https://github.com/graphprotocol/indexer/blob/main/docs/networks.md - epoch-subgraph-endpoint: "https://api.thegraph.com/subgraphs/name/graphprotocol/arbitrum-sepolia-ebo" # find at https://github.com/graphprotocol/indexer/blob/main/docs/networks.md + epoch-subgraph-endpoint: "https://gateway-arbitrum.network.thegraph.com/api/{{ .Values.secretEnv.api_key }}/subgraphs/id/BhnsdeZihU4SuokxZMLF4FQBVJ3jgtZf6v51gHvz3bSS" # find at https://github.com/graphprotocol/indexer/blob/main/docs/networks.md epoch-subgraph-deployment: "QmTpu2mVquoMpr4SWSM77nGkU3tcUS1Bhk1sVHpjDrAUAx" graph-node-admin-endpoint: "http://graph-node-block-ingestor:8020" public-indexer-url: "" ## change me @@ -563,6 +566,7 @@ releases: INDEXER_AGENT_POSTGRES_PASSWORD: secretName: key: password + api_key: indexerService: @@ -599,12 +603,13 @@ releases: GRAPH_NODE_STATUS_ENDPOINT: http://graph-node-block-ingestor:8030/graphql INDEXER_MANAGEMENT_SERVER_ENDPOINT: http://graph-network-indexer-agent:8000 GRAPHCAST_NETWORK: "testnet" - REGISTRY_SUBGRAPH: https://api.thegraph.com/subgraphs/name/hopeyen/graphcast-registry-arb-se - NETWORK_SUBGRAPH: https://api.thegraph.com/subgraphs/name/graphprotocol/graph-network-arbitrum-sepolia + REGISTRY_SUBGRAPH: "https://gateway-arbitrum.network.thegraph.com/api/{{ .Values.secretEnv.api_key }}/subgraphs/id/5tHgjCNF4XxAzp9ja8dU3j9JrqU7zctXj6DnxWpwAzc6" + NETWORK_SUBGRAPH: "https://gateway-arbitrum.network.thegraph.com/api/{{ .Values.secretEnv.api_key }}/subgraphs/id/3xQHhMudr1oh69ut36G2mbzpYmYxwqCeU6wwqyCDCnqV" secretEnv: MNEMONIC: secretName: key: mnemonic + api_key: - name: graph-toolbox namespace: arbitrum-sepolia