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
@@ -6,17 +6,17 @@ This plan outlines how to test the complete Timeline Aggregation Protocol (TAP)
6
6
7
7
## Components Involved
8
8
9
-
- Gateway - Sends receipts with queries
9
+
- Gateway - Sends signed receipts with queries to the indexer-service
10
10
- Indexer Service - Processes queries and collects receipts
11
-
- TAP Agent - Manages receipts and requests RAVs
11
+
- TAP Agent - Manages receipts and requests RAVs to the aggregator
12
12
- Gateway Receipt Aggregator(tap-aggregator) - Aggregates receipts into RAVs
13
-
- Indexer Agent - Handles redemption of RAVs(Not used directly in this test)
13
+
- Indexer Agent - Handles redemption of RAVs(Not use directly for testing checks)
14
14
15
15
## Prerequisites
16
16
17
17
- All containers are running (indexer-service, tap-agent, database, graph-node, tap-aggregator, indexer-agent, gateway, graph-node and database)
18
18
- Contracts deployed (graph-contracts and tap contracts)
19
-
- Gateway funded with GRT and aware of indexer address(use fund_escrow.sh script)
19
+
- Gateway funded with GRT and has our indexer address pre-registered thanks to an option in its configuration file. address(use fund_escrow.sh script)
20
20
- An active allocation exists (or a mock allocation is used)
21
21
22
22
## Understanding RAV Trigger Mechanism
@@ -45,7 +45,7 @@ if !state.backoff_info.in_backoff() && total_fee_outside_buffer >= state.config.
45
45
46
46
The `timestamp_buffer_secs` configuration is critically important to RAV generation:
47
47
48
-
- Only receipts that are older than `now + timestamp_buffer_secs` are counted towards the `total_fee_outside_buffer`
48
+
- Only receipts that are older than `timestamp_buffer_secs` are counted towards the `total_fee_outside_buffer`
49
49
- This means if `timestamp_buffer_secs = 1000`, receipts must be at least 1000 seconds (16.7 minutes) old before they'll contribute to triggering a RAV
50
50
- If you wait less than `timestamp_buffer_secs` between sending receipts and checking for RAVs, the test will fail even if you've sent enough value
51
51
@@ -83,93 +83,23 @@ Common issues caused by `timestamp_buffer_secs`:
83
83
### Step 2: Send Multiple Queries with Signed Receipts
84
84
85
85
1. Send enough queries to exceed the trigger value threshold
86
-
2. With max_receipt_value_grt of 0.001 GRT and a trigger_value of 0.002 GRT, this would mean sending at least 3 receipts
86
+
2. With **max_receipt_value_grt** of 0.001 GRT and a **trigger_value** of 0.002 GRT, this would mean sending at least 3 receipts
87
87
3. Each query should include a properly signed TAP receipt
88
88
4. Verify each query returns a successful response
89
89
90
90
**IMPORTANT**: Wait longer than `timestamp_buffer_secs` after sending receipts before checking for RAV generation. For example, if `timestamp_buffer_secs = 60`, wait at least 65 seconds.
91
91
92
-
```rust
93
-
// Example code to send multiple queries with receipts
0 commit comments