From eb4e529ac42ddee0ed6d3a7363ebf8ff1f97ac75 Mon Sep 17 00:00:00 2001 From: Idalith Bustos Date: Tue, 3 Jun 2025 14:36:33 -0700 Subject: [PATCH 1/4] removing section --- website/src/pages/en/indexing/overview.mdx | 36 ---------------------- 1 file changed, 36 deletions(-) diff --git a/website/src/pages/en/indexing/overview.mdx b/website/src/pages/en/indexing/overview.mdx index 8a35d638be7c..dcd86518cfe2 100644 --- a/website/src/pages/en/indexing/overview.mdx +++ b/website/src/pages/en/indexing/overview.mdx @@ -708,42 +708,6 @@ Note that supported action types for allocation management have different input Cost models provide dynamic pricing for queries based on market and query attributes. The Indexer Service shares a cost model with the gateways for each Subgraph for which they intend to respond to queries. The gateways, in turn, use the cost model to make Indexer selection decisions per query and to negotiate payment with chosen Indexers. -#### Agora - -The Agora language provides a flexible format for declaring cost models for queries. An Agora price model is a sequence of statements that execute in order for each top-level query in a GraphQL query. For each top-level query, the first statement which matches it determines the price for that query. - -A statement is comprised of a predicate, which is used for matching GraphQL queries, and a cost expression which when evaluated outputs a cost in decimal GRT. Values in the named argument position of a query may be captured in the predicate and used in the expression. Globals may also be set and substituted in for placeholders in an expression. - -Example cost model: - -``` -# This statement captures the skip value, -# uses a boolean expression in the predicate to match specific queries that use `skip` -# and a cost expression to calculate the cost based on the `skip` value and the SYSTEM_LOAD global -query { pairs(skip: $skip) { id } } when $skip > 2000 => 0.0001 * $skip * $SYSTEM_LOAD; - -# This default will match any GraphQL expression. -# It uses a Global substituted into the expression to calculate cost -default => 0.1 * $SYSTEM_LOAD; -``` - -Example query costing using the above model: - -| Query | Price | -| ---------------------------------------------------------------------------- | ------- | -| { pairs(skip: 5000) { id } } | 0.5 GRT | -| { tokens { symbol } } | 0.1 GRT | -| { pairs(skip: 5000) { id } tokens { symbol } } | 0.6 GRT | - -#### Applying the cost model - -Cost models are applied via the Indexer CLI, which passes them to the Indexer Management API of the Indexer agent for storing in the database. The Indexer Service will then pick them up and serve the cost models to gateways whenever they ask for them. - -```sh -indexer cost set variables '{ "SYSTEM_LOAD": 1.4 }' -indexer cost set model my_model.agora -``` - ## Interacting with the network ### Stake in the protocol From 4ab4ee7bd0e6fd689d85d4455d53f5a622ad93f5 Mon Sep 17 00:00:00 2001 From: Idalith Bustos Date: Tue, 3 Jun 2025 15:18:57 -0700 Subject: [PATCH 2/4] amending language --- website/src/pages/en/indexing/tooling/graph-node.mdx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/website/src/pages/en/indexing/tooling/graph-node.mdx b/website/src/pages/en/indexing/tooling/graph-node.mdx index 7ecc74a019a5..bbbca22ff638 100644 --- a/website/src/pages/en/indexing/tooling/graph-node.mdx +++ b/website/src/pages/en/indexing/tooling/graph-node.mdx @@ -85,7 +85,11 @@ When it is running Graph Node exposes the following ports: | 8030 | Subgraph indexing status API | /graphql | --index-node-port | - | | 8040 | Prometheus metrics | /metrics | --metrics-port | - | -> **Important**: Be careful about exposing ports publicly - **administration ports** should be kept locked down. This includes the the Graph Node JSON-RPC endpoint. +> **WARNING: Never expose Graph Node's administrative ports to the public**. +> +> - Exposing Graph Node's internal ports can lead to a full system compromise. +> - These ports must remain **private**: JSON-RPC Admin endpoint, Indexing Status API, and PostgreSQL. +> - Only expose 8000 (GraphQL HTTP) and 8001 (GraphQL WebSocket) if needed. Lock everything else down with firewalls or private networks. ## Advanced Graph Node configuration From de992a4d613eb387a0777d26e114e69bf451da74 Mon Sep 17 00:00:00 2001 From: Idalith <126833353+idalithb@users.noreply.github.com> Date: Thu, 5 Jun 2025 14:43:56 -0700 Subject: [PATCH 3/4] Update website/src/pages/en/indexing/tooling/graph-node.mdx --- website/src/pages/en/indexing/tooling/graph-node.mdx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/website/src/pages/en/indexing/tooling/graph-node.mdx b/website/src/pages/en/indexing/tooling/graph-node.mdx index bbbca22ff638..fe2cb61f9ac2 100644 --- a/website/src/pages/en/indexing/tooling/graph-node.mdx +++ b/website/src/pages/en/indexing/tooling/graph-node.mdx @@ -89,7 +89,8 @@ When it is running Graph Node exposes the following ports: > > - Exposing Graph Node's internal ports can lead to a full system compromise. > - These ports must remain **private**: JSON-RPC Admin endpoint, Indexing Status API, and PostgreSQL. -> - Only expose 8000 (GraphQL HTTP) and 8001 (GraphQL WebSocket) if needed. Lock everything else down with firewalls or private networks. +> - Do not expose 8000 (GraphQL HTTP) and 8001 (GraphQL WebSocket) directly to the internet. Even though these are used for GraphQL queries, they should ideally be proxied though `indexer-agent` and served behind a production-grade proxy. +> - Lock everything else down with firewalls or private networks. ## Advanced Graph Node configuration From ed6d2af9f0ae96a4b561a712a4278fd20f91e567 Mon Sep 17 00:00:00 2001 From: Idalith Bustos Date: Thu, 5 Jun 2025 14:51:00 -0700 Subject: [PATCH 4/4] format fix --- website/src/pages/en/indexing/tooling/graph-node.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/src/pages/en/indexing/tooling/graph-node.mdx b/website/src/pages/en/indexing/tooling/graph-node.mdx index fe2cb61f9ac2..1cabbefa3f28 100644 --- a/website/src/pages/en/indexing/tooling/graph-node.mdx +++ b/website/src/pages/en/indexing/tooling/graph-node.mdx @@ -89,7 +89,7 @@ When it is running Graph Node exposes the following ports: > > - Exposing Graph Node's internal ports can lead to a full system compromise. > - These ports must remain **private**: JSON-RPC Admin endpoint, Indexing Status API, and PostgreSQL. -> - Do not expose 8000 (GraphQL HTTP) and 8001 (GraphQL WebSocket) directly to the internet. Even though these are used for GraphQL queries, they should ideally be proxied though `indexer-agent` and served behind a production-grade proxy. +> - Do not expose 8000 (GraphQL HTTP) and 8001 (GraphQL WebSocket) directly to the internet. Even though these are used for GraphQL queries, they should ideally be proxied though `indexer-agent` and served behind a production-grade proxy. > - Lock everything else down with firewalls or private networks. ## Advanced Graph Node configuration