You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Learn about The Graph’s new payment system, **GraphTally**[(previously Timeline Aggregation Protocol)](https://docs.rs/tap_core/latest/tap_core/index.html). This system provides fast, efficient microtransactions with minimized trust.
5
+
Learn about The Graph's new payment system, **GraphTally**[(previously Timeline Aggregation Protocol)](https://docs.rs/tap_core/latest/tap_core/index.html). This system provides fast, efficient microtransactions with minimized trust.
6
6
7
7
## Overview
8
8
@@ -11,34 +11,30 @@ GraphTally is a drop-in replacement to the Scalar payment system currently in pl
11
11
- Efficiently handles micropayments.
12
12
- Adds a layer of consolidations to onchain transactions and costs.
13
13
- Allows Indexers control of receipts and payments, guaranteeing payment for queries.
14
-
-It enables decentralized, trustless gateways and improves `indexer-service` performance for multiple senders.
14
+
-Enables decentralized, trustless gateways and improves indexerservice performance for multiple senders.
15
15
16
-
### Specifics
16
+
### How It Works
17
17
18
-
GraphTally allows a sender to make multiple payments to a receiver, **Receipts**, which aggregates these payments into a single payment, a **Receipt Aggregate Voucher**, also known as a **RAV**. This aggregated payment can then be verified on the blockchain, reducing the number of transactions and simplifying the payment process.
18
+
GraphTally allows a sender to make multiple payments to a receiver through **Receipts**, which are then aggregated into a single payment called a **Receipt Aggregate Voucher (RAV)**. This aggregated payment can be verified on the blockchain, reducing the number of transactions and simplifying the payment process.
19
19
20
-
For each query, the gateway will send you a `signed receipt` that is stored on your database. Then, these queries will be aggregated by a `tap-agent`through a request. Afterwards, you’ll receive a RAV. You can update a RAV by sending it with newer receipts and this will generate a new RAV with an increased value.
20
+
For each query, the gateway sends a signed receipt that is stored in your database. The `indexer-tap-agent`aggregates these receipts into RAVs through periodic requests. You can update a RAV by sending it with newer receipts, which generates a new RAV with an increased value.
21
21
22
22
### RAV Details
23
23
24
-
- It’s money that is waiting to be sent to the blockchain.
25
-
26
-
- It will continue to send requests to aggregate and ensure that the total value of non-aggregated receipts does not exceed the `amount willing to lose`.
27
-
24
+
- RAVs represent money waiting to be sent to the blockchain.
25
+
- The system continuously aggregates receipts to ensure that the total value of non-aggregated receipts does not exceed the configured `max_amount_willing_to_lose_grt`.
28
26
- Each RAV can be redeemed once in the contracts, which is why they are sent after the allocation is closed.
29
27
30
-
### Redeeming RAV
31
-
32
-
As long as you run `tap-agent` and `indexer-agent`, everything will be executed automatically. The following provides a detailed breakdown of the process:
28
+
### Redeeming RAVs
33
29
34
-
1. An Indexer closes allocation.
30
+
The redemption process is fully automated when running both `indexer-tap-agent` and `indexer-agent`:
35
31
36
-
2.`<recently-closed-allocation-buffer> period, tap-agent` takes all pending receipts for that specific allocation and requests an aggregation into a RAV, marking it as `last`.
37
-
38
-
3.`indexer-agent` takes all the last RAVS and sends redeem requests to the blockchain, which will update the value of `redeem_at`.
39
-
40
-
4. During the `<finality-time>` period, `indexer-agent` monitors if the blockchain has any reorganizations that revert the transaction.
41
-
- If it was reverted, the RAV is resent to the blockchain. If it was not reverted, it gets marked as `final`.
32
+
1. An Indexer closes an allocation.
33
+
2. After the `recently-closed-allocation-buffer` period, `indexer-tap-agent` takes all pending receipts for that allocation and requests aggregation into a final RAV, marking it as `last`.
34
+
3.`indexer-agent` takes all the last RAVs and sends redeem requests to the blockchain, updating the `redeem_at` value.
35
+
4. During the `finality-time` period, `indexer-agent` monitors for blockchain reorganizations:
36
+
- If the transaction was reverted, the RAV is resent to the blockchain.
37
+
- If not reverted, it gets marked as `final`.
42
38
43
39
## Blockchain Addresses
44
40
@@ -58,132 +54,259 @@ As long as you run `tap-agent` and `indexer-agent`, everything will be executed
In addition to the typical requirements to run an indexer, you’ll need a `tap-escrow-subgraph` endpoint to query updates. You can use The Graph Network to query or host yourself on your `graph-node`.
59
+
In addition to typical indexer requirements, you'll need a `tap-escrow-subgraph` endpoint to query escrow information. You can use The Graph Network to query or self-host on your `graph-node`:
64
60
65
61
-[Graph TAP Arbitrum Sepolia Subgraph (for The Graph testnet)](https://thegraph.com/explorer/subgraphs/7ubx365MiqBH5iUz6XWXWT8PTof5BVAyEzdb8m17RvbD)
66
62
-[Graph TAP Arbitrum One Subgraph (for The Graph mainnet)](https://thegraph.com/explorer/subgraphs/4sukbNVTzGELnhdnpyPqsf1QqtzNHEYKKmJkgaT8z6M1)
67
63
68
-
> Note: `indexer-agent` does not currently handle the indexing of this Subgraph like it does for the network Subgraph deployment. As a result, you have to index it manually.
64
+
> Note: `indexer-agent` does not currently handle the indexing of this Subgraph like it does for the Network Subgraph deployment. You must index it manually.
69
65
70
66
## Migration Guide
71
67
72
-
### Software versions
68
+
### Software Requirements
73
69
74
-
The required software version can be found [here](https://github.com/graphprotocol/indexer/blob/main/docs/networks/arbitrum-one.md#latest-releases).
70
+
#### Required Versions
75
71
76
-
### Steps
72
+
-**indexer-agent**: [Latest version supporting TAP](https://github.com/graphprotocol/indexer/releases)
- Follow the [same process](https://github.com/graphprotocol/indexer/pkgs/container/indexer-agent#graph-protocol-indexer-components).
80
-
- Give the new argument `--tap-subgraph-endpoint` to activate the new GraphTally codepaths and enable redeeming of RAVs.
76
+
#### Docker Images
81
77
82
-
2.**Indexer Service**
83
-
- Fully replace your current configuration with the [new Indexer Service rs](https://github.com/graphprotocol/indexer-rs). It's recommend that you use the [container image](https://github.com/orgs/graphprotocol/packages?repo_name=indexer-rs).
84
-
- Like the older version, you can scale Indexer Service horizontally easily. It is still stateless.
- Run _one_ single instance of [TAP Agent](https://github.com/graphprotocol/indexer-rs) at all times. It's recommend that you use the [container image](https://github.com/orgs/graphprotocol/packages?repo_name=indexer-rs).
Configuration is a TOML file shared between `indexer-service` and `tap-agent`, supplied with the argument `--config /path/to/config.toml`.
88
+
#### 1. Update Indexer Agent
92
89
93
-
Check out the full [configuration](https://github.com/graphprotocol/indexer-rs/blob/main/config/maximal-config-example.toml) and the [default values](https://github.com/graphprotocol/indexer-rs/blob/main/config/default_values.toml)
90
+
- Continue using your existing `indexer-agent`
91
+
- Add the `--tap-subgraph-endpoint` argument to enable TAP functionality and RAV redemption
- Fully replace your TypeScript indexer-service with `indexer-service-rs`
97
+
- The new service is stateless and can be scaled horizontally
98
+
- Use the same database as your existing setup
99
+
100
+
#### 3. Deploy TAP Agent
101
+
102
+
- Run exactly **one instance** of `indexer-tap-agent`
103
+
- This component manages receipt aggregation and RAV creation
104
+
- It must have access to the same database as other indexer components
105
+
106
+
#### 4. Configuration
107
+
108
+
Both `indexer-service-rs` and `indexer-tap-agent` share a TOML configuration file. Create a configuration file and pass it with `--config /path/to/config.toml`.
109
+
110
+
##### Minimal Configuration Example
111
+
112
+
```toml
113
+
# Essential configuration for indexer-rs components
114
+
# All values below must be updated to match your setup
You can override any configuration value using environment variables:
168
165
169
-
- Values for `tap.sender_aggregator_endpoints` can be found in the [gateway section](/indexing/tap/#gateway).
170
-
- Values for `blockchain.receipts_verifier_address` must be used accordingly to the [Blockchain addresses section](/indexing/tap/#contracts) using the appropriate chain id.
- '7301:7300' # Metrics port (different host port)
268
+
volumes:
269
+
- ./config.toml:/config.toml
270
+
command: ['--config', '/config.toml']
271
+
environment:
272
+
- RUST_LOG=indexer_tap_agent=info
273
+
restart: unless-stopped
274
+
```
275
+
276
+
### Kubernetes
277
+
278
+
ForKubernetesdeployments, seethe [GraphLaunchpadcharts](https://github.com/graphops/launchpad-charts/tree/main/charts/graph-network-indexer) which include:
Currently, there is a WIP version of `indexer-rs` and `tap-agent` that can be found [here](https://github.com/graphops/launchpad-charts/tree/main/charts/graph-network-indexer)
0 commit comments