Skip to content

Commit af5af5d

Browse files
authored
Merge branch 'main' into issue_115
2 parents 2b29a4b + b9b8b82 commit af5af5d

File tree

10 files changed

+191
-25
lines changed

10 files changed

+191
-25
lines changed

.github/workflows/containers.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737

3838
steps:
3939
- name: Checkout
40-
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
40+
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4
4141
- name: Extract version from tag
4242
id: extract_version
4343
run: |

.github/workflows/conventional_commits.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
runs-on: ubuntu-latest
1010
steps:
1111
- name: Checkout
12-
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
12+
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4
1313
with:
1414
fetch-depth: 0
1515
ref: ${{ github.event.pull_request.head.sha }}

.github/workflows/license_headers_check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
name: License headers check
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
14+
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4
1515
- name: Install addlicense
1616
run: |
1717
wget https://github.com/google/addlicense/releases/download/v1.1.1/addlicense_1.1.1_Linux_x86_64.tar.gz

.github/workflows/tests.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
container:
1414
image: rust:1.80-bookworm
1515
steps:
16-
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
16+
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4
1717
- run: |
1818
rustup component add rustfmt
1919
cargo fmt --all -- --check
@@ -38,7 +38,7 @@ jobs:
3838
env:
3939
DATABASE_URL: postgres://postgres@postgres:5432
4040
steps:
41-
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
41+
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4
4242
- name: Cache dependencies
4343
uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 #v2.7.3
4444
if: ${{ !startsWith(github.head_ref, 'renovate/') }}
@@ -48,7 +48,7 @@ jobs:
4848
echo "SCCACHE_GHA_ENABLED=true" >> $GITHUB_ENV
4949
if: ${{ !startsWith(github.head_ref, 'renovate/') }}
5050
- name: Run sccache-cache
51-
uses: mozilla-actions/sccache-action@89e9040de88b577a072e3760aaf59f585da083af #v0.0.5
51+
uses: mozilla-actions/sccache-action@9e326ebed976843c9932b3aa0e021c6f50310eb4 # v0.0.6
5252
if: ${{ !startsWith(github.head_ref, 'renovate/') }}
5353
- name: Install sqlx
5454
run: cargo install sqlx-cli --no-default-features --features postgres
@@ -66,7 +66,7 @@ jobs:
6666
DATABASE_URL: postgres://postgres@postgres:5432
6767
SQLX_OFFLINE: true
6868
steps:
69-
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
69+
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4
7070
- name: Cache dependencies
7171
uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 #v2.7.3
7272
if: ${{ !startsWith(github.head_ref, 'renovate/') }}
@@ -76,7 +76,7 @@ jobs:
7676
echo "SCCACHE_GHA_ENABLED=true" >> $GITHUB_ENV
7777
if: ${{ !startsWith(github.head_ref, 'renovate/') }}
7878
- name: Run sccache-cache
79-
uses: mozilla-actions/sccache-action@89e9040de88b577a072e3760aaf59f585da083af #v0.0.5
79+
uses: mozilla-actions/sccache-action@9e326ebed976843c9932b3aa0e021c6f50310eb4 # v0.0.6
8080
if: ${{ !startsWith(github.head_ref, 'renovate/') }}
8181
- run: |
8282
rustup component add clippy
@@ -107,7 +107,7 @@ jobs:
107107
env:
108108
DATABASE_URL: postgres://postgres@postgres:5432
109109
steps:
110-
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
110+
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4
111111
- name: Cache dependencies
112112
uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 #v2.7.3
113113
if: ${{ !startsWith(github.head_ref, 'renovate/') }}
@@ -117,7 +117,7 @@ jobs:
117117
echo "SCCACHE_GHA_ENABLED=true" >> $GITHUB_ENV
118118
if: ${{ !startsWith(github.head_ref, 'renovate/') }}
119119
- name: Run sccache-cache
120-
uses: mozilla-actions/sccache-action@89e9040de88b577a072e3760aaf59f585da083af #v0.0.5
120+
uses: mozilla-actions/sccache-action@9e326ebed976843c9932b3aa0e021c6f50310eb4 # v0.0.6
121121
if: ${{ !startsWith(github.head_ref, 'renovate/') }}
122122
- name: Install cargo-llvm-cov
123123
uses: taiki-e/install-action@cargo-llvm-cov
@@ -128,7 +128,7 @@ jobs:
128128
- name: Run tests and generate coverage report
129129
run: cargo llvm-cov test --all-features --workspace --lcov --output-path lcov.info
130130
- name: Upload coverage to Coveralls
131-
uses: coverallsapp/github-action@643bc377ffa44ace6394b2b5d0d3950076de9f63 # v2.3.0
131+
uses: coverallsapp/github-action@1134c89e4bf10443bf8f0ec69640b667cfd91041 # v2.3.1
132132
with:
133133
file: ./lcov.info
134134

@@ -157,7 +157,7 @@ jobs:
157157
env:
158158
DATABASE_URL: postgres://postgres@postgres:5432
159159
steps:
160-
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
160+
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4
161161
- name: Cache dependencies
162162
uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 #v2.7.3
163163
if: ${{ !startsWith(github.head_ref, 'renovate/') }}
@@ -167,7 +167,7 @@ jobs:
167167
echo "SCCACHE_GHA_ENABLED=true" >> $GITHUB_ENV
168168
if: ${{ !startsWith(github.head_ref, 'renovate/') }}
169169
- name: Run sccache-cache
170-
uses: mozilla-actions/sccache-action@89e9040de88b577a072e3760aaf59f585da083af #v0.0.5
170+
uses: mozilla-actions/sccache-action@9e326ebed976843c9932b3aa0e021c6f50310eb4 # v0.0.6
171171
if: ${{ !startsWith(github.head_ref, 'renovate/') }}
172172
- name: Install sqlx
173173
run: cargo install sqlx-cli --no-default-features --features postgres

Cargo.lock

Lines changed: 33 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,12 @@ sqlx = { version = "0.8.2", features = [
3737
], default-features = false }
3838
tracing = { version = "0.1.40", default-features = false }
3939
bigdecimal = "0.4.3"
40-
build-info = "0.0.38"
40+
build-info = "0.0.39"
4141
tap_core = { git = "https://github.com/semiotic-ai/timeline-aggregation-protocol", rev = "ff856d9", default-features = false }
4242
tracing-subscriber = { version = "0.3", features = [
4343
"json",
4444
"env-filter",
45+
"ansi",
4546
], default-features = false }
4647
thegraph-core = { git = "https://github.com/edgeandnode/toolshed", rev = "85ee00b", features = [
4748
"subgraph-client",

docs/migration-config/README.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Migration guide
2+
3+
In case you want to quickly migrate from the old stack into the new stack, you can use the following two configurations to help you to migrate without changing too much fields.
4+
5+
You just need to drop the config, use it in the `--config` args and add some additional environment variables.
6+
7+
Please take a deeper look in the config, but 90% of the time you'll be safe just using it. If you find any issues using this config, feel free to open an issue.
8+
9+
## Missing configuration fields
10+
11+
The new stack requires you adding an escrow subgraph, similar to the current network subgraph field.
12+
13+
You can edit the config yourself and add the following fields:
14+
15+
```
16+
[subgraphs.escrow]
17+
query_url = "<escrow subgraph query url>"
18+
deployment_id = "<escrow deployment id>"
19+
```
20+
21+
You can also add these environment variables in your new setup:
22+
23+
```
24+
INDEXER_SUBGRAPHS__ESCROW__QUERY_URL=<escrow subgraph query url>
25+
INDEXER_SUBGRAPHS__ESCROW__DEPLOYMENT_ID=<escrow deployment id>
26+
```
27+
28+
We recommend you migrating overtime to be fully in the configuration and don't need to provide multiple environment variables that can stay in plaintext, this will make your work easier.
29+
30+
## Booleans inside config
31+
32+
The configuration doesn't accept booleans as strings, so in case you had `INDEXER_SERVICE_SERVE_NETWORK_SUBGRAPH` environment variable, please update to `INDEXER_SERVICE__SERVE_NETWORK_SUBGRAPH` and use `true/false` as values (or you could update directly in the configuration).
33+
34+
Please update the config accordingly. Also, check it out the explanation for each field in [config/minimal-config-example.toml](config/minimal-config-example.toml) and also [config/maximal-config-example.toml](config/maximal-config-example.toml)
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
[indexer]
2+
indexer_address = "${INDEXER_SERVICE_INDEXER_ADDRESS}"
3+
operator_mnemonic = "${INDEXER_SERVICE_MNEMONIC}"
4+
5+
[database]
6+
host = "${INDEXER_SERVICE_POSTGRES_HOST}"
7+
user = "${INDEXER_SERVICE_POSTGRES_USERNAME}"
8+
password = "${INDEXER_SERVICE_POSTGRES_PASSWORD}"
9+
database = "${INDEXER_SERVICE_POSTGRES_DATABASE}"
10+
11+
[graph_node]
12+
# URL to your graph-node's query endpoint
13+
query_url = "${INDEXER_SERVICE_GRAPH_NODE_QUERY_ENDPOINT}"
14+
# URL to your graph-node's status endpoint
15+
status_url = "${INDEXER_SERVICE_GRAPH_NODE_STATUS_ENDPOINT}"
16+
17+
[subgraphs.network]
18+
# Query URL for the Graph Network subgraph.
19+
query_url = "${INDEXER_SERVICE_NETWORK_SUBGRAPH_ENDPOINT}"
20+
deployment_id = "${INDEXER_SERVICE_NETWORK_SUBGRAPH_DEPLOYMENT}"
21+
22+
# [subgraphs.escrow]
23+
# INDEXER_SUBGRAPHS__ESCROW__QUERY_URL
24+
# query_url = ""
25+
# INDEXER_SUBGRAPHS__ESCROW__DEPLOYMENT_ID
26+
# deployment_id = ""
27+
28+
[blockchain]
29+
chain_id = 42161
30+
# Contract address of TAP's receipt aggregate voucher (RAV) verifier.
31+
receipts_verifier_address = "0x33f9E93266ce0E108fc85DdE2f71dab555A0F05a"
32+
33+
##############################################
34+
# Specific configurations to indexer-service #
35+
##############################################
36+
[service]
37+
# Host and port to serve the indexer-service query endpoint. This one should have a
38+
# public ingress.
39+
host_and_port = "0.0.0.0:${INDEXER_SERVICE_PORT}"
40+
# Serve the network subgraph on `common.server.host_and_port`/network
41+
# INDEXER_SERVICE__SERVE_NETWORK_SUBGRAPH
42+
# serve_network_subgraph = false
43+
# Serve the escrow subgraph on `common.server.host_and_port`/escrow
44+
# INDEXER_SERVICE__SERVE_ESCROW_SUBGRAPH
45+
# serve_escrow_subgraph = false
46+
47+
free_query_auth_token = "${INDEXER_SERVICE_FREE_QUERY_AUTH_TOKEN}"
48+
49+
########################################
50+
# Specific configurations to tap-agent #
51+
########################################
52+
[tap.sender_aggregator_endpoints]
53+
# Key-Value of all senders and their aggregator endpoints
54+
0xDDE4cfFd3D9052A9cb618fC05a1Cd02be1f2F467 = "https://tap-aggregator.network.thegraph.com"
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
[indexer]
2+
indexer_address = "${INDEXER_SERVICE_INDEXER_ADDRESS}"
3+
operator_mnemonic = "${INDEXER_SERVICE_MNEMONIC}"
4+
5+
[database]
6+
host = "${INDEXER_SERVICE_POSTGRES_HOST}"
7+
user = "${INDEXER_SERVICE_POSTGRES_USERNAME}"
8+
password = "${INDEXER_SERVICE_POSTGRES_PASSWORD}"
9+
database = "${INDEXER_SERVICE_POSTGRES_DATABASE}"
10+
11+
[graph_node]
12+
# URL to your graph-node's query endpoint
13+
query_url = "${INDEXER_SERVICE_GRAPH_NODE_QUERY_ENDPOINT}"
14+
# URL to your graph-node's status endpoint
15+
status_url = "${INDEXER_SERVICE_GRAPH_NODE_STATUS_ENDPOINT}"
16+
17+
[subgraphs.network]
18+
# Query URL for the Graph Network subgraph.
19+
query_url = "${INDEXER_SERVICE_NETWORK_SUBGRAPH_ENDPOINT}"
20+
deployment_id = "${INDEXER_SERVICE_NETWORK_SUBGRAPH_DEPLOYMENT}"
21+
22+
# [subgraphs.escrow]
23+
# INDEXER_SUBGRAPHS__ESCROW__QUERY_URL
24+
# query_url = ""
25+
# INDEXER_SUBGRAPHS__ESCROW__DEPLOYMENT_ID
26+
# deployment_id = ""
27+
28+
[blockchain]
29+
chain_id = 421614
30+
# Contract address of TAP's receipt aggregate voucher (RAV) verifier.
31+
receipts_verifier_address = "0xfC24cE7a4428A6B89B52645243662A02BA734ECF"
32+
33+
##############################################
34+
# Specific configurations to indexer-service #
35+
##############################################
36+
[service]
37+
# Host and port to serve the indexer-service query endpoint. This one should have a
38+
# public ingress.
39+
host_and_port = "0.0.0.0:${INDEXER_SERVICE_PORT}"
40+
# Serve the network subgraph on `common.server.host_and_port`/network
41+
# INDEXER_SERVICE__SERVE_NETWORK_SUBGRAPH
42+
# serve_network_subgraph = false
43+
# Serve the escrow subgraph on `common.server.host_and_port`/escrow
44+
# INDEXER_SERVICE__SERVE_ESCROW_SUBGRAPH
45+
# serve_escrow_subgraph = false
46+
47+
free_query_auth_token = "${INDEXER_SERVICE_FREE_QUERY_AUTH_TOKEN}"
48+
49+
########################################
50+
# Specific configurations to tap-agent #
51+
########################################
52+
[tap.sender_aggregator_endpoints]
53+
# Key-Value of all senders and their aggregator endpoints
54+
0xC3dDf37906724732FfD748057FEBe23379b0710D = "https://tap-aggregator.testnet.thegraph.com"

service/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,4 @@ graphql = { git = "https://github.com/edgeandnode/toolshed", tag = "graphql-v0.3
3333
hex-literal = "0.4.1"
3434

3535
[build-dependencies]
36-
build-info-build = { version = "0.0.38", default-features = false }
36+
build-info-build = { version = "0.0.39", default-features = false }

0 commit comments

Comments
 (0)