Skip to content

Commit d0fc6ce

Browse files
committed
fork deployment documentation and simplification
1 parent 5459ad8 commit d0fc6ce

File tree

3 files changed

+40
-19
lines changed

3 files changed

+40
-19
lines changed

README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
### [Design Decisions Notion Document](https://www.notion.so/originprotocol/Subsquid-Design-Decisions-04ef82ae0d6848d1b14de893e9929ce4#d8e8d367069c4a619809e926f72db074)
44

5+
#### See [docs/](./docs/) for specific tasks.
6+
57
## Release Checklist
68

79
Ensure we don't miss anything on a release by following this checklist.
@@ -18,7 +20,7 @@ Ensure we don't miss anything on a release by following this checklist.
1820
- [ ] Hibernate previous version(s)
1921
- [ ] Delete old versions (keep recently hibernated version as a backup)
2022

21-
If a version has issues in deployment, fix it in the branch and later *cherry-pick* those fixes back to `main`.
23+
If a version has issues in deployment, fix it in the branch and later _cherry-pick_ those fixes back to `main`.
2224

2325
## Env Options
2426

docs/fork-deployments.md

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Fork Deployments
2+
3+
Subsquid deployment status: https://app.subsquid.io/squids
4+
5+
## Guide
6+
7+
1. Get the public RPC URL for your fork.
8+
2. Modify [squid.yaml](../squid.yaml) by modifying variables in the `Fork Setup Stage 1` section.
9+
3. Deploy the squid.
10+
4. Wait for processing to complete.
11+
5. Modify [squid.yaml](../squid.yaml) by modifying variables in the `Fork Setup Stage 2` section.
12+
6. Deploy the squid.
13+
7. Wait for processing to complete.
14+
15+
At this point the squid will be running using the fork.
16+
17+
## FYI
18+
19+
### Fork Time Travelling
20+
21+
- Time travel in Tenderly will interrupt squid processing. It causes gaps to appear in the block height. To fix this you'd have to do some custom deployments navigating around the gaps.
22+
23+
```yaml
24+
# Use this env variable to skip blocks
25+
- BLOCK_FROM: 123456789 # block number after the time travel
26+
```

squid.yaml

+11-18
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,17 @@ version: 999
44
description: 'Origin Protocol 🦑'
55
build:
66
deploy:
7+
env:
8+
TS_NODE_BASEURL: './lib'
9+
### Fork Setup Stage 1
10+
# ARCHIVE_ONLY: 'true'
11+
# BLOCK_TO: 20870360
12+
### Fork Setup Stage 2
13+
# DISABLE_ARCHIVE: 'true'
14+
# RPC_ENV: RPC_ENDPOINT
15+
# RPC_ENDPOINT: https://virtual.mainnet.rpc.tenderly.co/4fc58260-a74c-4d0f-bdca-77e1bbb1e86c
16+
### Time Travel Fix
17+
# BLOCK_FROM: 20870360
718
addons:
819
postgres:
920
rpc:
@@ -16,35 +27,17 @@ deploy:
1627
processor:
1728
- name: mainnet-processor
1829
cmd: ['sqd', 'process:mainnet:prod']
19-
env:
20-
TS_NODE_BASEURL: './lib'
2130
- name: arbitrum-processor
2231
cmd: ['sqd', 'process:arbitrum:prod']
23-
env:
24-
RPC_ARBITRUM_ENV: RPC_ARBITRUM_ONE_HTTP
25-
TS_NODE_BASEURL: './lib'
2632
- name: base-processor
2733
cmd: ['sqd', 'process:base:prod']
28-
env:
29-
RPC_BASE_ENV: RPC_BASE_HTTP
30-
TS_NODE_BASEURL: './lib'
3134
- name: oeth-processor
3235
cmd: ['sqd', 'process:oeth:prod']
33-
env:
34-
TS_NODE_BASEURL: './lib'
3536
- name: ogv-processor
3637
cmd: ['sqd', 'process:ogv:prod']
37-
env:
38-
RPC_ENV: RPC_ENDPOINT
39-
TS_NODE_BASEURL: './lib'
4038
- name: ousd-processor
4139
cmd: ['sqd', 'process:ousd:prod']
42-
env:
43-
RPC_ENV: RPC_ENDPOINT
44-
TS_NODE_BASEURL: './lib'
4540
api:
46-
env:
47-
TS_NODE_BASEURL: './lib'
4841
cmd:
4942
- npx
5043
- squid-graphql-server

0 commit comments

Comments
 (0)