Skip to content

Commit 970bd4f

Browse files
liamzebedeeeternauta1337justin j. mosesi-stamleomassazza
authored
Merge develop into futures-implementation (#1326)
* Introducing new integration tests in CI (#1287) * Introducing integration tests in CI * Improved integration tests in CI and removed redundant prod tests * Bugfix on integration test task * More verbose on deployer error * Refactoring of Exchanger.sol to reduce size on OVM (#1291) * Minor fix for integration tests (#1295) * Clean state on dual integration tests plus slightly better exchange tests * Minor fix to integration tests * Disable some exchanging integration tests for now * Extra prod tests (#1299) * Add issuance prod tests * Add erc20 behavior * Tweaks on incoming integration tests * Minor fix to integrationt ests Co-authored-by: Alejandro Santander <Palebluedot@gmail.com> * Audit feedback and spring cleaning (#1300) * Port more integration tests (#1288) * Basic integration tests for L2 deposits * Basic integration tests for L2 deposits * Polish deposit integration tests * Progress porting withdrawal integration tests * Working withdrawals in new integration tests * Using watcher tool more * Unify action and actionTo in integration tests * Progress porting integration tests * Remove comment * Implemented exchanges in new integration tests * Bugfix in integrationt est task * Basic forking in integration tests * Include fork tests in CI * Minor fixes for prod tests * port migrateEscrow test to integration dual * Fix CI * Fix CI Co-authored-by: Leonardo Massazza <lmassazza+github@gmail.com> Co-authored-by: Yannis <i.stamelakos@gmail.com> * Better way to get SNX in integration tests (#1303) * Better way to get SNX * 2192 * Introduces forking via integration tests (#1307) * Introduces forking with integration tests * Compile and deploy on fork tests * Fix old ovm prod tests * Replace web3 with ethers in deployment (#1271) * add wrapper object to hold web3 and ethers * Replace web3-utils with ethers * - replace web3.utils with ethers counterpart - create account with ethers instead of web3 * corrections to failed tests * propagate Deploy changes fix (test:publish green) * document the provider addition to Deployer * document the provider addition to Deployer * fix require * fix require * Clean install * Update to develop Co-authored-by: Alejandro Santander <Palebluedot@gmail.com> * Updates optimism dependencies (#1308) * Updated optimism deps * Update usage of dep in code * Add hardhat-ethers dep required by smock * Add await in unit test * Removed @gas-skip (#1309) * Updated optimism deps * Update usage of dep in code * Add hardhat-ethers dep required by smock * Removed @gas-skip * Add await in unit test * Disables prod tests from CI (#1311) * Reordering the deploy script for sanity (#1304) * Add integration tests for settle and claim (#1310) * Support settlements in exchanging behavior * Testing claims in integration tests * Address PR feedback, increase timeouts, improve test for forking * Bigger tolerance for debt comparison * Approve bridge tokens during bootstrap * Add SynthsUSD integration (L1 and L2) tests (#1312) * Add support to SynthsUSD in L1 and L2 integration tests * Add support to SynthsUSD in L1 and L2 integration tests * style fixes Co-authored-by: Alejandro Santander <Palebluedot@gmail.com> * Port migrateEscrow and depositAndMigrateEscrow tests (#1306) * ported. Some tests still failing * wip * migrateEscrow test ported * accept multiples hashes in watchers * Reduce migrateEscrow dual test to dual scope * ported depositAndMigrateEscrow test * update test wording Co-authored-by: Alejandro Santander <Palebluedot@gmail.com> * Migration for bulk staking reward upgrade (#1301) * Deleted everything related to prod tests (#1315) * Adds ether wrapper integration tests (#1319) * Basic integration tests for ether wrapper * Fix timeout in integration tests * Abstract eth wrapper behavior in integration tests * Support ether wrapper integration tests in mainnet forks * Pin ops to a particular commit that is known to work in CI * Processed Leo's feeedback on PR * Enables separate folder compilation for integration tests (#1322) * Enables separate folder compilation for integration tests * Clean install * add futures contracts to local-ovm config.json * fix: only deploy futures on OVM * deploy EmptyFuturesMarketManger on L1 Since we modify a couple L1 contracts, such as the DebtCache, to incorporate futures debt, we need to deploy a FuturesMarketManager on L1. This uses our empty contract pattern we have in other places, eg EmptyEtherCollateral. * Check that events are properly emitted when snapshotting excluded debt. * Remove unnecessary mock in Synth test. * add simulated rates for futures market assets * remove check for invalid rates, as it isn't valid for L2 This check calls Issuer.availableCurrencyKeys, which will miss some assets that are required to have exchange rates but aren't technically enabled for issuing yet on L2. * add missing upgrade to SystemSettings * Revert "remove check for invalid rates, as it isn't valid for L2" This reverts commit c382f2c. * fix check for invalid rates on L2 * fix: remove redundant SIP's Co-authored-by: Alejandro Santander <Palebluedot@gmail.com> Co-authored-by: justin j. moses <justin@synthetix.io> Co-authored-by: Yannis <i.stamelakos@gmail.com> Co-authored-by: Leonardo Massazza <lmassazza+github@gmail.com> Co-authored-by: Anton Jurisevic <zyzek@users.noreply.github.com>
1 parent 64da116 commit 970bd4f

File tree

144 files changed

+24717
-46596
lines changed

Some content is hidden

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

144 files changed

+24717
-46596
lines changed

.circleci/config.yml

Lines changed: 53 additions & 127 deletions
Original file line numberDiff line numberDiff line change
@@ -26,19 +26,7 @@ jobs:
2626
- run: npx hardhat compile --optimizer --fail-oversize
2727
- run: rm -rf build # force a clean build
2828
- run: npx hardhat compile --use-ovm --optimizer --fail-oversize
29-
job-lint:
30-
working_directory: ~/repo
31-
docker:
32-
- image: synthetixio/docker-node:14.16-focal
33-
auth:
34-
username: $DOCKERHUB_USERNAME
35-
password: $DOCKERHUB_TOKEN
36-
steps:
37-
- checkout
38-
- attach_workspace:
39-
at: .
40-
- run: npm run lint
41-
job-pack-browser:
29+
job-fork-tests:
4230
working_directory: ~/repo
4331
docker:
4432
- image: synthetixio/docker-node:14.16-focal
@@ -49,94 +37,13 @@ jobs:
4937
- checkout
5038
- attach_workspace:
5139
at: .
52-
- run: npm run pack
53-
- store_artifacts:
54-
path: browser.js
55-
job-prepare:
56-
working_directory: ~/repo
57-
docker:
58-
- image: synthetixio/docker-node:14.16-focal
59-
auth:
60-
username: $DOCKERHUB_USERNAME
61-
password: $DOCKERHUB_TOKEN
62-
steps:
63-
- checkout
64-
- restore_cache:
65-
keys:
66-
- v4-dependencies-{{ checksum "package-lock.json" }}
67-
- run: npm install
68-
- save_cache:
69-
key: v4-dependencies-{{ checksum "package-lock.json" }}
70-
paths:
71-
- node_modules
72-
- persist_to_workspace:
73-
root: .
74-
paths:
75-
- node_modules
76-
job-prod-diff-tests-local-ovm:
77-
working_directory: ~/repo
78-
docker:
79-
- image: synthetixio/docker-node:14.16-focal
80-
auth:
81-
username: $DOCKERHUB_USERNAME
82-
password: $DOCKERHUB_TOKEN
83-
steps:
84-
- checkout
85-
- attach_workspace:
86-
at: .
87-
- run: node publish build --test-helpers
88-
- run: npx hardhat compile --force
8940
- run:
90-
command: npx hardhat node
41+
command: npm run fork
9142
background: true
9243
- cmd-wait-for-port:
9344
port: 8545
94-
- run: node publish deploy --network local --fresh-deploy --yes --use-ovm --ignore-safety-checks --ignore-custom-parameters --deployment-path ./publish/deployed/local-ovm
95-
- run: npm run test:prod -- --no-compile --use-ovm --patch-fresh-deployment --deployment-path ./publish/deployed/local-ovm
96-
job-prod-diff-tests-local:
97-
working_directory: ~/repo
98-
docker:
99-
- image: synthetixio/docker-node:14.16-focal
100-
auth:
101-
username: $DOCKERHUB_USERNAME
102-
password: $DOCKERHUB_TOKEN
103-
steps:
104-
- checkout
105-
- attach_workspace:
106-
at: .
107-
- run: node publish build --test-helpers
108-
- run:
109-
command: npx hardhat node
110-
background: true
111-
- cmd-wait-for-port:
112-
port: 8545
113-
- run: node publish deploy --network local --fresh-deploy --yes
114-
- run: npm run test:prod -- --patch-fresh-deployment
115-
job-prod-diff-tests:
116-
working_directory: ~/repo
117-
docker:
118-
- image: synthetixio/docker-node:14.16-focal
119-
auth:
120-
username: $DOCKERHUB_USERNAME
121-
password: $DOCKERHUB_TOKEN
122-
resource_class: large
123-
steps:
124-
- checkout
125-
- attach_workspace:
126-
at: .
127-
- run: node publish build
128-
- run:
129-
command: npx hardhat node --target-network mainnet
130-
background: true
131-
- cmd-wait-for-port:
132-
port: 8545
133-
- run: node publish prepare-deploy --network mainnet
134-
- run: node publish deploy --ignore-safety-checks --add-new-synths --use-fork --yes --network mainnet
135-
- run: npm run test:prod:gas -- --target-network mainnet --patch-fresh-deployment
136-
- run: npx codechecks codechecks.prod.yml
137-
- store_artifacts:
138-
path: test-gas-used-prod.log
139-
job-prod-tests-ovm:
45+
- run: npx hardhat test:integration:l1 --compile --deploy --fork
46+
job-integration-tests:
14047
working_directory: ~/repo
14148
machine:
14249
image: ubuntu-2004:202010-01
@@ -152,8 +59,9 @@ jobs:
15259
git clone git@github.com:ethereum-optimism/optimism.git
15360
cd optimism
15461
git fetch
155-
git checkout develop
156-
git pull origin develop
62+
git checkout master
63+
git pull origin master
64+
git checkout 86708bb5758cd2b647b3ca2be698beb5aa3af81f
15765
yarn
15866
yarn build
15967
cd ops
@@ -171,14 +79,18 @@ jobs:
17179
- cmd-wait-for-port:
17280
port: 9545
17381
- run:
174-
name: Deploy OVM Synthetix instances
82+
name: Run isolated layer 1 integration tests
83+
command: |
84+
npx hardhat test:integration:l1 --compile --deploy --provider-port 9545
85+
- run:
86+
name: Run isolated layer 2 integration tests
17587
command: |
176-
node publish deploy-ovm-pair
88+
npx hardhat test:integration:l2 --compile --deploy
17789
- run:
178-
name: Run OVM production tests
90+
name: Run dual layer 1 and layer 2 integration tests
17991
command: |
180-
npm run test:prod:ovm
181-
job-prod-tests:
92+
npx hardhat test:integration:dual --deploy-evm --deploy-ovm --connect
93+
job-lint:
18294
working_directory: ~/repo
18395
docker:
18496
- image: synthetixio/docker-node:14.16-focal
@@ -189,15 +101,42 @@ jobs:
189101
- checkout
190102
- attach_workspace:
191103
at: .
192-
- run:
193-
command: npx hardhat node --target-network mainnet
194-
background: true
195-
- cmd-wait-for-port:
196-
port: 8545
197-
- run: npm run test:prod:gas -- --target-network mainnet
198-
- run: npx codechecks codechecks.prod.yml
104+
- run: npm run lint
105+
job-pack-browser:
106+
working_directory: ~/repo
107+
docker:
108+
- image: synthetixio/docker-node:14.16-focal
109+
auth:
110+
username: $DOCKERHUB_USERNAME
111+
password: $DOCKERHUB_TOKEN
112+
steps:
113+
- checkout
114+
- attach_workspace:
115+
at: .
116+
- run: npm run pack
199117
- store_artifacts:
200-
path: test-gas-used-prod.log
118+
path: browser.js
119+
job-prepare:
120+
working_directory: ~/repo
121+
docker:
122+
- image: synthetixio/docker-node:14.16-focal
123+
auth:
124+
username: $DOCKERHUB_USERNAME
125+
password: $DOCKERHUB_TOKEN
126+
steps:
127+
- checkout
128+
- restore_cache:
129+
keys:
130+
- v4-dependencies-{{ checksum "package-lock.json" }}
131+
- run: npm install
132+
- save_cache:
133+
key: v4-dependencies-{{ checksum "package-lock.json" }}
134+
paths:
135+
- node_modules
136+
- persist_to_workspace:
137+
root: .
138+
paths:
139+
- node_modules
201140
job-static-analysis:
202141
working_directory: ~/repo
203142
docker:
@@ -384,23 +323,10 @@ workflows:
384323
- job-test-deploy-script:
385324
requires:
386325
- job-prepare
387-
- job-prod-tests:
388-
requires:
389-
- job-prepare
390-
- job-prod-tests-ovm:
391-
name: job-prod-tests-ovm
392-
requires:
393-
- job-prepare
394-
- job-prod-diff-tests-local:
395-
name: job-prod-diff-tests-local
396-
requires:
397-
- job-prepare
398-
- job-prod-diff-tests-local-ovm:
399-
name: job-prod-diff-tests-local-ovm
326+
- job-fork-tests:
400327
requires:
401328
- job-prepare
402-
- job-prod-diff-tests:
403-
name: job-prod-diff-tests-mainnet
329+
- job-integration-tests:
404330
requires:
405331
- job-prepare
406332
- job-pack-browser:

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Starts a fork of mainnet, deploys the latest release, and runs L1 integration tests
2+
{{> job-header.yml}}
3+
steps:
4+
- checkout
5+
- attach_workspace:
6+
at: .
7+
- run:
8+
command: npm run fork
9+
background: true
10+
- cmd-wait-for-port:
11+
port: 8545
12+
- run: npx hardhat test:integration:l1 --compile --deploy --fork

.circleci/src/jobs/job-prod-tests-ovm.yml renamed to .circleci/src/jobs/job-integration-tests.yml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@ steps:
1111
git clone git@github.com:ethereum-optimism/optimism.git
1212
cd optimism
1313
git fetch
14-
git checkout develop
15-
git pull origin develop
14+
git checkout master
15+
git pull origin master
16+
git checkout 86708bb5758cd2b647b3ca2be698beb5aa3af81f
1617
yarn
1718
yarn build
1819
cd ops
@@ -30,10 +31,14 @@ steps:
3031
- cmd-wait-for-port:
3132
port: 9545
3233
- run:
33-
name: Deploy OVM Synthetix instances
34+
name: Run isolated layer 1 integration tests
3435
command: |
35-
node publish deploy-ovm-pair
36+
npx hardhat test:integration:l1 --compile --deploy --provider-port 9545
3637
- run:
37-
name: Run OVM production tests
38+
name: Run isolated layer 2 integration tests
3839
command: |
39-
npm run test:prod:ovm
40+
npx hardhat test:integration:l2 --compile --deploy
41+
- run:
42+
name: Run dual layer 1 and layer 2 integration tests
43+
command: |
44+
npx hardhat test:integration:dual --deploy-evm --deploy-ovm --connect

.circleci/src/jobs/job-prod-diff-tests-local-ovm.yml

Lines changed: 0 additions & 21 deletions
This file was deleted.

.circleci/src/jobs/job-prod-diff-tests-local.yml

Lines changed: 0 additions & 18 deletions
This file was deleted.

.circleci/src/jobs/job-prod-diff-tests.yml

Lines changed: 0 additions & 24 deletions
This file was deleted.

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

Lines changed: 0 additions & 15 deletions
This file was deleted.

.circleci/src/workflows/workflow-all.yml

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -25,21 +25,15 @@ jobs:
2525
{{> require-prepare.yml}}
2626

2727
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
28-
# Prod tests
28+
# Fork tests
2929
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
30-
- job-prod-tests:
30+
- job-fork-tests:
3131
{{> require-prepare.yml}}
32-
- job-prod-tests-ovm:
33-
name: job-prod-tests-ovm
34-
{{> require-prepare.yml}}
35-
- job-prod-diff-tests-local:
36-
name: job-prod-diff-tests-local
37-
{{> require-prepare.yml}}
38-
- job-prod-diff-tests-local-ovm:
39-
name: job-prod-diff-tests-local-ovm
40-
{{> require-prepare.yml}}
41-
- job-prod-diff-tests:
42-
name: job-prod-diff-tests-mainnet
32+
33+
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
34+
# Integration tests
35+
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
36+
- job-integration-tests:
4337
{{> require-prepare.yml}}
4438

4539
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

0 commit comments

Comments
 (0)