Skip to content

Commit b8506b1

Browse files
authored
v2.50 Sargas to Mainnet OVM (Synthetixio#1559)
1 parent 105a4b5 commit b8506b1

File tree

91 files changed

+16138
-5537
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+16138
-5537
lines changed

.circleci/config.template.yml

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# DO NOT EDIT MANUALLY!
2+
# autogenerated by `.circleci/pack.js` from contents of `jobs` .yml files
13
version: 2.1
24
commands:
35
{{> commands}}

.circleci/config.yml

+59-23
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,39 @@
1+
# DO NOT EDIT MANUALLY!
2+
# autogenerated by `.circleci/pack.js` from contents of `jobs` .yml files
13
version: 2.1
24
commands:
35
cmd-wait-for-port:
46
parameters:
57
port:
68
type: integer
79
steps:
8-
- run: sleep 5
910
- run:
1011
shell: /bin/sh
1112
command: |
12-
wget --retry-connrefused --waitretry=1 --read-timeout=120 --timeout=120 -t 100 http://localhost:<<parameters.port>>
13+
wget --retry-connrefused --waitretry=1 --read-timeout=120 --timeout=120 -t 300 http://localhost:<<parameters.port>>
1314
:
1415
jobs:
16+
job-audit:
17+
working_directory: ~/repo
18+
docker:
19+
- image: synthetixio/docker-sec-tools:14.17-ubuntu
20+
auth:
21+
username: $DOCKERHUB_USERNAME
22+
password: $DOCKERHUB_TOKEN
23+
steps:
24+
- checkout
25+
- run:
26+
name: Audit dependencies
27+
command: |
28+
npm audit --audit-level=critical || true # Temporarily allow critical audits to pass
29+
- run:
30+
name: Lint lockfile
31+
command: |
32+
lockfile-lint -p package-lock.json --type npm --allowed-hosts npm github.com --allowed-schemes "https:" "git+ssh:"
1533
job-compile:
1634
working_directory: ~/repo
1735
docker:
18-
- image: synthetixio/docker-node:14.16-focal
36+
- image: synthetixio/docker-node:14.17-ubuntu
1937
auth:
2038
username: $DOCKERHUB_USERNAME
2139
password: $DOCKERHUB_TOKEN
@@ -29,7 +47,7 @@ jobs:
2947
job-fork-tests:
3048
working_directory: ~/repo
3149
docker:
32-
- image: synthetixio/docker-node:14.16-focal
50+
- image: synthetixio/docker-node:14.17-ubuntu
3351
auth:
3452
username: $DOCKERHUB_USERNAME
3553
password: $DOCKERHUB_TOKEN
@@ -54,7 +72,7 @@ jobs:
5472
job-integration-tests:
5573
working_directory: ~/repo
5674
machine:
57-
image: ubuntu-2004:202104-01
75+
image: ubuntu-2004:202107-02
5876
docker_layer_caching: true
5977
resource_class: large
6078
steps:
@@ -63,15 +81,15 @@ jobs:
6381
at: .
6482
- restore_cache:
6583
keys:
66-
- v6-optimism-build-
84+
- v6-optimism-build-{{ checksum "package-lock.json" }}
6785
- run:
6886
name: Build docker containers if necessary
6987
command: |
7088
if [ ! -d ./optimism ]; then
7189
npx hardhat ops --fresh --build --build-ops
7290
fi;
7391
- save_cache:
74-
key: v6-optimism-build-
92+
key: v6-optimism-build-{{ checksum "package-lock.json" }}
7593
paths:
7694
- ./optimism
7795
- run:
@@ -99,7 +117,7 @@ jobs:
99117
job-lint:
100118
working_directory: ~/repo
101119
docker:
102-
- image: synthetixio/docker-node:14.16-focal
120+
- image: synthetixio/docker-node:14.17-ubuntu
103121
auth:
104122
username: $DOCKERHUB_USERNAME
105123
password: $DOCKERHUB_TOKEN
@@ -111,7 +129,7 @@ jobs:
111129
job-pack-browser:
112130
working_directory: ~/repo
113131
docker:
114-
- image: synthetixio/docker-node:14.16-focal
132+
- image: synthetixio/docker-node:14.17-ubuntu
115133
auth:
116134
username: $DOCKERHUB_USERNAME
117135
password: $DOCKERHUB_TOKEN
@@ -125,28 +143,37 @@ jobs:
125143
job-prepare:
126144
working_directory: ~/repo
127145
docker:
128-
- image: synthetixio/docker-node:14.16-focal
146+
- image: synthetixio/docker-node:14.17-ubuntu
129147
auth:
130148
username: $DOCKERHUB_USERNAME
131149
password: $DOCKERHUB_TOKEN
132150
steps:
133151
- checkout
152+
- attach_workspace:
153+
at: .
134154
- restore_cache:
135155
keys:
136156
- v4-dependencies-{{ checksum "package-lock.json" }}
137-
- run: npm install
157+
- run:
158+
name: Set custom npm cache directory
159+
command: npm config set cache .npm-cache --global
160+
- run:
161+
name: Install dependencies
162+
command: npm install --prefer-offline --no-audit
138163
- save_cache:
139164
key: v4-dependencies-{{ checksum "package-lock.json" }}
140165
paths:
141166
- node_modules
167+
- .npm-cache
142168
- persist_to_workspace:
143169
root: .
144170
paths:
145171
- node_modules
172+
- .npm-cache
146173
job-simulate-release:
147174
working_directory: ~/repo
148175
docker:
149-
- image: synthetixio/docker-node:14.16-focal
176+
- image: synthetixio/docker-node:14.17-ubuntu
150177
auth:
151178
username: $DOCKERHUB_USERNAME
152179
password: $DOCKERHUB_TOKEN
@@ -169,7 +196,7 @@ jobs:
169196
job-static-analysis:
170197
working_directory: ~/repo
171198
docker:
172-
- image: synthetixio/docker-node:14.16-focal
199+
- image: synthetixio/docker-node:14.17-ubuntu
173200
auth:
174201
username: $DOCKERHUB_USERNAME
175202
password: $DOCKERHUB_TOKEN
@@ -181,12 +208,15 @@ jobs:
181208
name: Show Slither output
182209
command: |
183210
set +e
184-
slither .
211+
slither . --disable-color 2>&1 | tee slitherReport.txt
185212
exit 0
213+
- store_artifacts:
214+
path: slitherReport.txt
215+
destination: slitherReport.txt
186216
job-test-deploy-script:
187217
working_directory: ~/repo
188218
docker:
189-
- image: synthetixio/docker-node:14.16-focal
219+
- image: synthetixio/docker-node:14.17-ubuntu
190220
auth:
191221
username: $DOCKERHUB_USERNAME
192222
password: $DOCKERHUB_TOKEN
@@ -212,7 +242,7 @@ jobs:
212242
job-unit-tests-coverage-report:
213243
working_directory: ~/repo
214244
docker:
215-
- image: synthetixio/docker-node:14.16-focal
245+
- image: synthetixio/docker-sec-tools:14.17-ubuntu
216246
auth:
217247
username: $DOCKERHUB_USERNAME
218248
password: $DOCKERHUB_TOKEN
@@ -224,11 +254,11 @@ jobs:
224254
name: Upload coverage
225255
command: |
226256
cp -R /tmp/coverage/coverage-*.json .
227-
bash <(curl -s https://codecov.io/bash)
257+
codecov -t $CODECOV_TOKEN
228258
job-unit-tests-coverage:
229259
working_directory: ~/repo
230260
docker:
231-
- image: synthetixio/docker-node:14.16-focal
261+
- image: synthetixio/docker-node:14.17-ubuntu
232262
auth:
233263
username: $DOCKERHUB_USERNAME
234264
password: $DOCKERHUB_TOKEN
@@ -258,7 +288,7 @@ jobs:
258288
job-unit-tests-gas-report:
259289
working_directory: ~/repo
260290
docker:
261-
- image: synthetixio/docker-node:14.16-focal
291+
- image: synthetixio/docker-node:14.17-ubuntu
262292
auth:
263293
username: $DOCKERHUB_USERNAME
264294
password: $DOCKERHUB_TOKEN
@@ -270,13 +300,16 @@ jobs:
270300
name: Upload gas reports
271301
command: |
272302
npx hardhat test:merge-gas-reports gasReporterOutput-*.json
303+
if [ "${CIRCLE_BRANCH}" != "master" ]; then
304+
git branch -f master origin/master
305+
fi
273306
npx codechecks codechecks.unit.yml
274307
- store_artifacts:
275308
path: gasReporterOutput.json
276309
job-unit-tests:
277310
working_directory: ~/repo
278311
docker:
279-
- image: synthetixio/docker-node:14.16-focal
312+
- image: synthetixio/docker-node:14.17-ubuntu
280313
auth:
281314
username: $DOCKERHUB_USERNAME
282315
password: $DOCKERHUB_TOKEN
@@ -308,7 +341,7 @@ jobs:
308341
job-validate-deployments:
309342
working_directory: ~/repo
310343
docker:
311-
- image: synthetixio/docker-node:14.16-focal
344+
- image: synthetixio/docker-node:14.17-ubuntu
312345
auth:
313346
username: $DOCKERHUB_USERNAME
314347
password: $DOCKERHUB_TOKEN
@@ -327,7 +360,7 @@ jobs:
327360
job-validate-etherscan:
328361
working_directory: ~/repo
329362
docker:
330-
- image: synthetixio/docker-node:14.16-focal
363+
- image: synthetixio/docker-node:14.17-ubuntu
331364
auth:
332365
username: $DOCKERHUB_USERNAME
333366
password: $DOCKERHUB_TOKEN
@@ -342,7 +375,10 @@ jobs:
342375
workflows:
343376
workflow-all:
344377
jobs:
345-
- job-prepare
378+
- job-audit
379+
- job-prepare:
380+
requires:
381+
- job-audit
346382
- job-lint:
347383
requires:
348384
- job-prepare

.circleci/src/commands/cmd-wait-for-port.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@ parameters:
33
port:
44
type: integer
55
steps:
6-
- run: sleep 5
76
- run:
87
shell: /bin/sh
98
command: |
10-
wget --retry-connrefused --waitretry=1 --read-timeout=120 --timeout=120 -t 100 http://localhost:<<parameters.port>>
9+
wget --retry-connrefused --waitretry=1 --read-timeout=120 --timeout=120 -t 300 http://localhost:<<parameters.port>>
1110
:

.circleci/src/jobs/job-audit.yml

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Bootstraps dependencies
2+
{{> job-header-sec-tools.yml}}
3+
steps:
4+
- checkout
5+
- run:
6+
name: Audit dependencies
7+
command: |
8+
npm audit --audit-level=critical || true # Temporarily allow critical audits to pass
9+
- run:
10+
name: Lint lockfile
11+
command: |
12+
lockfile-lint -p package-lock.json --type npm --allowed-hosts npm github.com --allowed-schemes "https:" "git+ssh:"

.circleci/src/jobs/job-compile.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Compiles all contracts and fails with oversized contracts
2-
{{> job-header.yml}}
2+
{{> job-header-node.yml}}
33
steps:
44
- checkout
55
- attach_workspace:

.circleci/src/jobs/job-fork-tests.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Starts a fork of mainnet, deploys the latest release, and runs L1 integration tests
2-
{{> job-header.yml}}
2+
{{> job-header-node.yml}}
33
steps:
44
- checkout
55
- attach_workspace:

.circleci/src/jobs/job-integration-tests.yml

+2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Starts optimism-integration L1 and L2 local chains and runs Optimism integration tests against them
22
# TODO: The Optimism ops tool is currently unstable, thue the commented out code below.
33
{{> job-header-machine.yml}}
4+
# set custom delimiter to avoid checksum parsing
5+
{{=<% %>=}}
46
resource_class: large
57
steps:
68
- checkout

.circleci/src/jobs/job-lint.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Runs all linters
2-
{{> job-header.yml}}
2+
{{> job-header-node.yml}}
33
steps:
44
- checkout
55
- attach_workspace:

.circleci/src/jobs/job-pack-browser.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Packs js code for browser usage
2-
{{> job-header.yml}}
2+
{{> job-header-node.yml}}
33
steps:
44
- checkout
55
- attach_workspace:

.circleci/src/jobs/job-prepare.yml

+11-2
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,27 @@
11
# Bootstraps dependencies
2-
{{> job-header.yml}}
2+
{{> job-header-node.yml}}
33
# set custom delimiter to avoid checksum parsing
44
{{=<% %>=}}
55
steps:
66
- checkout
7+
- attach_workspace:
8+
at: .
79
- restore_cache:
810
keys:
911
- v4-dependencies-{{ checksum "package-lock.json" }}
10-
- run: npm install
12+
- run:
13+
name: Set custom npm cache directory
14+
command: npm config set cache .npm-cache --global
15+
- run:
16+
name: Install dependencies
17+
command: npm install --prefer-offline --no-audit
1118
- save_cache:
1219
key: v4-dependencies-{{ checksum "package-lock.json" }}
1320
paths:
1421
- node_modules
22+
- .npm-cache
1523
- persist_to_workspace:
1624
root: .
1725
paths:
1826
- node_modules
27+
- .npm-cache

.circleci/src/jobs/job-simulate-release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Starts a fork of mainnet, deploys the latest release, and runs L1 integration tests
2-
{{> job-header.yml}}
2+
{{> job-header-node.yml}}
33
steps:
44
- checkout
55
- attach_workspace:
+6-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Runs all static analysis checks
2-
{{> job-header.yml}}
2+
{{> job-header-node.yml}}
33
steps:
44
- checkout
55
- attach_workspace:
@@ -9,5 +9,9 @@ steps:
99
# ignore slither error codes
1010
command: |
1111
set +e
12-
slither .
12+
slither . --disable-color 2>&1 | tee slitherReport.txt
1313
exit 0
14+
- store_artifacts:
15+
path: slitherReport.txt
16+
destination: slitherReport.txt
17+

.circleci/src/jobs/job-test-deploy-script.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Validates that the deploy command is working as expected
2-
{{> job-header.yml}}
2+
{{> job-header-node.yml}}
33
resource_class: large
44
steps:
55
- checkout
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Measures unit and spec test coverage
2-
{{> job-header.yml}}
2+
{{> job-header-sec-tools.yml}}
33
steps:
44
- checkout
55
- attach_workspace:
@@ -8,4 +8,4 @@ steps:
88
name: Upload coverage
99
command: |
1010
cp -R /tmp/coverage/coverage-*.json .
11-
bash <(curl -s https://codecov.io/bash)
11+
codecov -t $CODECOV_TOKEN

.circleci/src/jobs/job-unit-tests-coverage.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Measures unit and spec test coverage
2-
{{> job-header.yml}}
2+
{{> job-header-node.yml}}
33
resource_class: large
44
parallelism: 8
55
steps:

0 commit comments

Comments
 (0)