Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DO NOT MERGE - post L2] Deprecate isReserveLow on L2 #11290

Open
wants to merge 75 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
1adfa6c
Sync `release/core-contracts/12` with master (#11033)
soloseng Jun 12, 2024
26ddf3c
L2 Staking and Voting (#11034)
soloseng Jun 18, 2024
0f7753e
COP, KES, USDT Oracle config (#10984)
rcroessmann Jun 18, 2024
1d553de
Soloseng/update-celo-L2-distribution-logic (#11045)
soloseng Jun 21, 2024
9f875b9
Celo token totalSupply() update (#11081)
pahor167 Jun 21, 2024
79abd48
Update npm package versioning script to be compatible with other pack…
soloseng Jun 24, 2024
c9174f9
Soloseng/bytecode-tooling-fix (#11092)
soloseng Jun 26, 2024
519ee36
Create a ProxyFactory (#11095)
martinvol Jun 27, 2024
cb652dd
Martinvol/fix interfaces migrations (#11084)
martinvol Jun 28, 2024
149c92b
Update README with Foundry version (#11097)
m-chrzan Jun 28, 2024
e7710e2
Add Support for CeloToken Name in Registry (#11080)
soloseng Jul 1, 2024
3a0a771
Soloseng/revert-celo-total-supply-changes (#11093)
soloseng Jul 2, 2024
7dfd467
refactor: reads supported Foundry version from an environment variabl…
arthurgousset Jul 3, 2024
539463c
Soloseng/publishing-version-fix (#11105)
soloseng Jul 3, 2024
5c401a3
feat(foundry): publish L2 state in `@celo/devchain-anvil` (#11107)
arthurgousset Jul 12, 2024
a775d99
chore: update CeloDistributionSchedule initial balance (#11140)
arthurgousset Jul 15, 2024
98164b1
L2 Governance Hotfix (#11014)
soloseng Jul 16, 2024
562fcf0
Added Check to CeloDistributionSchedule `activate` function (#11109)
soloseng Jul 18, 2024
d464ce5
test: `forge test` should be all green and exclude tests that require…
arthurgousset Jul 19, 2024
97e3f3c
refactor: use constants across `test-sol/` and `migrations_sol/` (#11…
arthurgousset Jul 19, 2024
e6dcb57
test: migrate `FeeHandlerSeller.t.sol` to foundry (#11155)
arthurgousset Jul 23, 2024
0cc2505
test: migrate `UniswapFeeHandlerSeller.t.sol` to foundry (#11171)
arthurgousset Jul 26, 2024
12e89e7
refactor: remove unused code comment in `Proxy.sol` (#11174)
arthurgousset Aug 5, 2024
533ccd1
refactor: uses `L2Migration.s.sol` and simplifies migration script (#…
arthurgousset Aug 9, 2024
264b957
Anvil migrations: use stable symbols (#11193)
shazarre Aug 21, 2024
c5eff1c
L2 devchain fix (#11200)
pahor167 Sep 12, 2024
736fbc2
[DO NOT MERGE] Epoch manager WIP (#11189)
martinvol Sep 25, 2024
aa7b9bb
Fix anvil devchain generation (#11226)
shazarre Sep 25, 2024
38723bc
Get epoch info of specified epoch (#11231)
soloseng Oct 7, 2024
4d8de72
EpochManager FinishNextEpochProcessing unit tests (#11233)
pahor167 Oct 7, 2024
083aa85
Bring back some functions removed since CR11 (#11239)
m-chrzan Oct 7, 2024
089d63e
Epoch Manager "finishNextEpochProcessing" gas test (#11240)
pahor167 Oct 11, 2024
0d94a1d
Don't update SortedLinkedList pointers when not necessary (#11241)
m-chrzan Oct 11, 2024
ceb103c
Truffle works with anvil (#11230)
martinvol Oct 13, 2024
ce91ccc
Score manager gas optimization (#11246)
pahor167 Oct 13, 2024
adb93e8
Add score manager setter role (#11244)
martinvol Oct 14, 2024
ed2c008
Fix buyback and add fee split (#11234)
martinvol Oct 14, 2024
253098f
Make Governance slasher able to remove validator and decrease slash m…
martinvol Oct 14, 2024
7566b18
Adds backwards compatibility in `UsingPrecompile` contract. (#11236)
soloseng Oct 15, 2024
0ae4b8c
Finish epoch processing split (#11243)
pahor167 Oct 15, 2024
591b114
Prevent CELO Transfer to Unreleased Treasury (#11222)
soloseng Oct 15, 2024
131c499
Deprecate unnecessary public variables in L2 (#11247)
m-chrzan Oct 15, 2024
3e81caf
Removal of build warnings (#11253)
pahor167 Oct 16, 2024
048fc11
Fix Election NatSpecs (#11255)
m-chrzan Oct 16, 2024
65442ca
Add Governance NatSpecs (#11254)
m-chrzan Oct 16, 2024
b2329a3
Soloseng/Natspec_and_cleanup (#11248)
soloseng Oct 16, 2024
cb73506
ScoreManager allow to set 0 (#11258)
pahor167 Oct 16, 2024
d56f10f
Fix LockedGold comments (#11256)
m-chrzan Oct 16, 2024
d9a8384
GoldToken cleanup (#11251)
m-chrzan Oct 16, 2024
451def4
Add NatSpecs to Initializable (#11252)
m-chrzan Oct 16, 2024
79cccad
Fix Proposals NatSpecs (#11257)
m-chrzan Oct 16, 2024
ad543ec
ProxyFactory and ProxyFactory08 cleanup (#11249)
m-chrzan Oct 16, 2024
a5a33dc
Add NatSpecs to Create2 library (#11250)
m-chrzan Oct 16, 2024
89591e1
Add oracle setter to FeeHandler (#11242)
martinvol Oct 17, 2024
c6994a6
Removed duplicated L2 election test code (#11259)
soloseng Oct 28, 2024
80952d6
general L2 test framework (#11262)
soloseng Oct 30, 2024
03d20ee
FeeHandler fix (#11261)
martinvol Oct 31, 2024
44c70c9
Soloseng/streamline-L2-validator-test (#11263)
soloseng Nov 13, 2024
3145e52
Soloseng/L2-Accounts-test (#11268)
soloseng Nov 14, 2024
f0a36ec
Soloseng/Governance-L2-test (#11267)
soloseng Nov 15, 2024
3d2e630
Soloseng/L2-Proposal-test (#11274)
soloseng Nov 19, 2024
0b5fa19
Soloseng/L2-releaseGold-test (#11273)
soloseng Nov 19, 2024
e9258e6
Soloseng/L2-lockedGold-test (#11272)
soloseng Nov 19, 2024
9f0c393
Soloseng/L2-registry-test (#11275)
soloseng Nov 19, 2024
1c68abf
Soloseng/L2-goldToken-test (#11271)
soloseng Nov 19, 2024
c71a412
Soloseng/epoch-rewards-L2-test (#11270)
soloseng Nov 20, 2024
adc0960
Soloseng/rename-utils-contract (#11276)
soloseng Nov 20, 2024
7b68b98
Soloseng/L2-feehandlerseller-test (#11278)
soloseng Nov 21, 2024
4903cfa
Soloseng/L2-feeHandler-test (#11279)
soloseng Nov 22, 2024
3c58a09
Core contracts 12/governance slasher to abi (#11281)
aaronmgdr Nov 26, 2024
4591aa1
Soloseng/L2-governanceSlasher-test (#11280)
soloseng Dec 3, 2024
6fde928
update delegation when slashing (#11287)
pahor167 Dec 4, 2024
336a600
Soloseng/ToB-audit-Insufficient-event-generation (#11285)
soloseng Dec 4, 2024
682235e
Fix migration script interface (#11289)
martinvol Dec 5, 2024
1ec7eae
Deprecate isReserveLow on L2
m-chrzan Dec 6, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .env.alfajores
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ CELOSTATS_BANNED_ADDRESSES=""
CELOSTATS_RESERVED_ADDRESSES=""

ORACLE_DOCKER_IMAGE_REPOSITORY="us-west1-docker.pkg.dev/celo-testnet-production/celo-oracle/celo-oracle"
ORACLE_DOCKER_IMAGE_TAG="1.0.12"
ORACLE_DOCKER_IMAGE_TAG="459947a"

AZURE_ORACLE_CENTRALUS_AZURE_SUBSCRIPTION_ID=7a6f5f20-bd43-4267-8c35-a734efca140c
AZURE_ORACLE_CENTRALUS_AZURE_TENANT_ID=7cb7628a-e37c-4afb-8332-2029e418980e
Expand All @@ -40,6 +40,9 @@ AZURE_ORACLE_CENTRALUS_EUROCEUR_ORACLE_ADDRESSES_FROM_MNEMONIC_COUNT=4
AZURE_ORACLE_CENTRALUS_CELOXOF_ORACLE_ADDRESSES_FROM_MNEMONIC_COUNT=4
AZURE_ORACLE_CENTRALUS_EURXOF_ORACLE_ADDRESSES_FROM_MNEMONIC_COUNT=4
AZURE_ORACLE_CENTRALUS_EUROCXOF_ORACLE_ADDRESSES_FROM_MNEMONIC_COUNT=4
AZURE_ORACLE_CENTRALUS_KESUSD_ORACLE_ADDRESSES_FROM_MNEMONIC_COUNT=4
AZURE_ORACLE_CENTRALUS_CELOKES_ORACLE_ADDRESSES_FROM_MNEMONIC_COUNT=4
AZURE_ORACLE_CENTRALUS_USDTUSD_ORACLE_ADDRESSES_FROM_MNEMONIC_COUNT=4
AZURE_ORACLE_CENTRALUS_FULL_NODES_COUNT=2
AZURE_ORACLE_CENTRALUS_FULL_NODES_DISK_SIZE=30
AZURE_ORACLE_CENTRALUS_FULL_NODES_ROLLING_UPDATE_PARTITION=0
Expand Down
8 changes: 7 additions & 1 deletion .env.baklava
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ CELOCLI_STANDALONE_IMAGE_REPOSITORY="gcr.io/celo-testnet/celocli-standalone"
CELOCLI_STANDALONE_IMAGE_TAG="0.0.30-beta2"

ORACLE_DOCKER_IMAGE_REPOSITORY="us-west1-docker.pkg.dev/celo-testnet-production/celo-oracle/celo-oracle"
ORACLE_DOCKER_IMAGE_TAG="1.0.12"
ORACLE_DOCKER_IMAGE_TAG="459947a"

# ---- Full Node Chain Restore ----

Expand Down Expand Up @@ -68,6 +68,9 @@ AZURE_ORACLE_WESTUS2_EUROCEUR_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0x6866e306b32acae7
AZURE_ORACLE_WESTUS2_CELOXOF_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0x96eda2cad69c8cd1daeb80da86d24825f45f46b7:baklava-celoxof-oracle2,0x4e9d441fd1c77222395a1853d851fea8a0e3aed8:baklava-celoxof-oracle3
AZURE_ORACLE_WESTUS2_EURXOF_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0x7fe5f297dd812ca21e7bf1cbf145a0b59227b35f:baklava-eurxof-oracle2,0x2addc69c2ce3a9d93a8291419319bf7f0a2c6c82:baklava-eurxof-oracle3
AZURE_ORACLE_WESTUS2_EUROCXOF_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0x729e058e97c099c79af674bbe2f687171432dd17:baklava-eurocxof-oracle2,0xd226aa9ee80ee282339c1ae69f3f811dbe5d895a:baklava-eurocxof-oracle4
AZURE_ORACLE_WESTUS2_CELOKES_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0x84f0d0c9385de3509cdf6eb2fb168e35b0dbad92:baklava-celokes-oracle2,0x2db4d3bf7e744b422812b63b036c401828be7778:baklava-celokes-oracle3
AZURE_ORACLE_WESTUS2_KESUSD_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0x94cd5463902630dd22db8ac41242002e6a7a6844:baklava-kesusd-oracle2,0xd3e70b118b674c4db7fde6946b16070bf9ec5ce3:baklava-kesusd-oracle3
AZURE_ORACLE_WESTUS2_USDTUSD_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0x9829cf05869f1b9770f4ce9d5653909f1f9e4c5e:baklava-usdtusd-oracle2,0xdfbcbae6de4fb7b72dbad402b975e374441395ea:baklava-usdtusd-oracle3
AZURE_ORACLE_WESTUS2_FULL_NODES_COUNT=2
AZURE_ORACLE_WESTUS2_FULL_NODES_ROLLING_UPDATE_PARTITION=0
AZURE_ORACLE_WESTUS2_FULL_NODES_DISK_SIZE=30
Expand All @@ -94,6 +97,9 @@ AZURE_ORACLE_CENTRALUS_EUROCEUR_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0x9a0613e8a1ff6c
AZURE_ORACLE_CENTRALUS_CELOXOF_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0xd056a29e86161a34692c34f4c95933b59de077dc:baklava-celoxof-oracle0,0x5ad07f89176298ae3a0f3d20d0b4a756307d46e7:baklava-celoxof-oracle1
AZURE_ORACLE_CENTRALUS_EURXOF_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0xa4a46db00840e6525ffe79aee5990abaebb7479d:baklava-eurxof-oracle0,0x6e537c9462ed968ff08eab430c5f8c11eab7df1a:baklava-eurxof-oracle1
AZURE_ORACLE_CENTRALUS_EUROCXOF_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0x1a637c38671512866317475d19df5f55b0802276:baklava-eurocxof-oracle0,0x8589f0bb307581b96877f9e1a5ce3fcb05127fd0:baklava-eurocxof-oracle1
AZURE_ORACLE_CENTRALUS_CELOKES_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0x0468aabc726f2f8d6bc612af99bf994026654a34:baklava-celokes-oracle0,0x8fc0c18b0fc7c11d4af89f0be046ed17dd1fe0f4:baklava-celokes-oracle1
AZURE_ORACLE_CENTRALUS_KESUSD_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0xf44345ff4ae8a3e18ae3e7d9c6b3de62736fb01c:baklava-kesusd-oracle0,0xb9410ac25ae1424190f6b4e45dcabd4d32168e5f:baklava-kesusd-oracle1
AZURE_ORACLE_CENTRALUS_USDTUSD_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0x2b4b450daecaf5a011497762380cdf1938791f85:baklava-usdtusd-oracle0,0x179282dcbf4c506332b0376cf5bcebd6ca9ec2f3:baklava-usdtusd-oracle1
AZURE_ORACLE_CENTRALUS_FULL_NODES_COUNT=2
AZURE_ORACLE_CENTRALUS_FULL_NODES_ROLLING_UPDATE_PARTITION=0
AZURE_ORACLE_CENTRALUS_FULL_NODES_DISK_SIZE=30
Expand Down
6 changes: 5 additions & 1 deletion .env.rc1
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ CELOCLI_STANDALONE_IMAGE_TAG="0.0.42"
MOCK_ORACLE_CRON_SCHEDULE="*/5 * * * *"

ORACLE_DOCKER_IMAGE_REPOSITORY="us-west1-docker.pkg.dev/celo-testnet-production/celo-oracle/celo-oracle"
ORACLE_DOCKER_IMAGE_TAG="1.0.12"
ORACLE_DOCKER_IMAGE_TAG="4c63b13"

ORACLE_UNUSED_ORACLE_ADDRESSES=0xB93Fe7906ea4221b3fbe23412D18Ab1B07FE2F71,0x8d25D74E43789079Ef3C6B965c3D22b63A1233aC,0xCD88Cc79342a7cFE78E91FAa173eC87704bDcA9a,0x5091110175318A2A8aF88309D1648c1D84d31B29,0xBBd6e54Af7A5722f42461C6313F37Bd50729F195,0xE23a4c6615669526Ab58E9c37088bee4eD2b2dEE

Expand Down Expand Up @@ -80,6 +80,8 @@ AZURE_ORACLE_WESTUS_EUROCEUR_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0x6e7c84f8377856901
AZURE_ORACLE_WESTUS_CELOXOF_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0xce696d465dde582095fce8b67e1a31ceb45ad922:mainnet-celoxof-wus0,0xbc211b8dfecdd5784f9c419ce64f7de1377bae88:mainnet-celoxof-wus1,0xc659ab5c049b726c2945a8a44b783ce6afbd2ceb:mainnet-celoxof-wus2,0x9094bf2b2eb028c6fcc56e7d46ea28bb6e03c9a5:mainnet-celoxof-wus3,0xb947c54be882314623ee3d74684d0d785dd50335:mainnet-celoxof-wus4
AZURE_ORACLE_WESTUS_EURXOF_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0x6a033b7217fbae843a3ffc9783ef9f87dd3a1c04:mainnet-eurxof-wus0,0x8a164c0523bbd7ec70172807723cca9a948858bb:mainnet-eurxof-wus1,0xd0066f198ed7f8dc3684ff3ac77511ef58a9aed3:mainnet-eurxof-wus2,0x441061f8b1f8ee2722d3608bfa0b5c4c14dee813:mainnet-eurxof-wus3,0x87089ec6adbf3c994ae7c47d3aa7d4fc104d0422:mainnet-eurxof-wus4
AZURE_ORACLE_WESTUS_EUROCXOF_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0xc5a86597d514b423579684cdf9f49b6df37e3689:mainnet-eurocxof-wus0,0x8e1423ca0bcb15093f52d1d07675e0aa04e3da75:mainnet-eurocxof-wus1,0xa47e6a8a7db5ee22b5293704a4f0f5f8fdaab06f:mainnet-eurocxof-wus2,0x77d148efdd40202d0eec787073a70c7f6bc9c485:mainnet-eurocxof-wus3,0xfef8748fd3f039fb8cfa77c7744b171f4396659c:mainnet-eurocxof-wus4
AZURE_ORACLE_WESTUS_CELOKES_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0x7b50b90144ce27557ed352d499a13f458aef74d0:mainnet-celokes-wus0,0x0eb570af5ab2a9eea97bb413d7dcc12edbf87172:mainnet-celokes-wus1
AZURE_ORACLE_WESTUS_KESUSD_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0xf72c29b7047166c6576378d976c44c58fa767bb9:mainnet-kesusd-wus0,0x5bcc4f89b1176f5e68269d232d2c5b274ad1d81e:mainnet-kesusd-wus1
AZURE_ORACLE_WESTUS_FULL_NODES_COUNT=5
AZURE_ORACLE_WESTUS_FULL_NODES_ROLLING_UPDATE_PARTITION=0
AZURE_ORACLE_WESTUS_FULL_NODES_DISK_SIZE=100
Expand All @@ -106,6 +108,8 @@ AZURE_ORACLE_WESTEUROPE_EUROCEUR_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0xa633c79ac2c68
AZURE_ORACLE_WESTEUROPE_CELOXOF_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0x4d89a0c95de82ae78c42fad4f8d3f87c4495fd37:mainnet-celoxof-weu0,0xa97dbefac6026f93cc5714c4c150b7466e9502ef:mainnet-celoxof-weu1,0x676931c73c8d6b09b0c192baf821e3fd2d693750:mainnet-celoxof-weu2,0xfb8f294c8cd98cf059672c1a6153f85555f10a90:mainnet-celoxof-weu3,0xb7614f7174a07028a5ff5e1adc68a031b646857f:mainnet-celoxof-weu4
AZURE_ORACLE_WESTEUROPE_EURXOF_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0xd2c4f59724df51026f857a7e188b322e35256e24:mainnet-eurxof-weu0,0xe47c9867dbb37110834aaaf65b8d760c49c22081:mainnet-eurxof-weu1,0x9cb4896447a8f2611f5fb6f5fc853ffa16a1d864:mainnet-eurxof-weu2,0x0f9786b083c8c22e2e839286230098048a20a0ec:mainnet-eurxof-weu3,0xe01890c7760445908128f0e64e1170866566e1f6:mainnet-eurxof-weu4
AZURE_ORACLE_WESTEUROPE_EUROCXOF_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0xdda1d71f3d5a6090bc04b77a18925fab7054d9c3:mainnet-eurocxof-weu0,0xee1d05f81e90b8ece440de6141282404e83830ce:mainnet-eurocxof-weu1,0xff6e35c6119742fd1eb3db780d976c4e55585108:mainnet-eurocxof-weu2,0x59eac333453279e71a3a98b4b72bdfa99ca51ad3:mainnet-eurocxof-weu3,0x378b95092bed2acb0d3ae6ab9c045eef1c250872:mainnet-eurocxof-weu4
AZURE_ORACLE_WESTEUROPE_CELOKES_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0xcfba5ea29501d26fc3e6e0851bb13375ea0401ef:mainnet-celokes-weu0,0xe0a634c4aac4494930ba50f59b751a5ddabe4679:mainnet-celokes-weu1,0xe000bce6c6f87ac39f3c4f4b5daa38dd32433217:mainnet-celokes-weu2
AZURE_ORACLE_WESTEUROPE_KESUSD_ORACLE_ADDRESS_AZURE_KEY_VAULTS=0xeab3df01269abd314465148e0c075d49fbd4b59b:mainnet-kesusd-weu0,0x28cd8a609560fb1ff1011387e4c40deabef029c0:mainnet-kesusd-weu1,0xf6d2d7ec798ae1b80046594345805298e0ac1624:mainnet-kesusd-weu2
AZURE_ORACLE_WESTEUROPE_FULL_NODES_COUNT=5
AZURE_ORACLE_WESTEUROPE_FULL_NODES_ROLLING_UPDATE_PARTITION=0
AZURE_ORACLE_WESTEUROPE_FULL_NODES_DISK_SIZE=100
Expand Down
13 changes: 11 additions & 2 deletions .github/workflows/celo-monorepo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,19 @@ on:
push:
branches:
- master
- 'release/**'
- 'feat/l2-epoch-system'
- 'martinvol/**'
- 'pahor167/**'
- 'soloseng/**'
pull_request:
branches:
- master
- 'release/**'
- 'feat/l2-epoch-system'
- 'martinvol/**'
- 'pahor167/**'
- 'soloseng/**'

concurrency:
group: celo-monorepo-${{ github.ref }}
Expand All @@ -23,7 +32,7 @@ defaults:

env:
# Increment these to force cache rebuilding
NODE_MODULE_CACHE_VERSION: 7
NODE_MODULE_CACHE_VERSION: 8
NODE_OPTIONS: '--max-old-space-size=4096'
TERM: dumb
GRADLE_OPTS: '-Dorg.gradle.daemon=false -Dorg.gradle.parallel=false -Dorg.gradle.configureondemand=true -Dorg.gradle.jvmargs="-Xmx4096m -XX:+HeapDumpOnOutOfMemoryError"'
Expand Down Expand Up @@ -194,7 +203,7 @@ jobs:
timeout-minutes: 60
needs: [install-dependencies, lint-checks]
if: |
github.base_ref == 'master' || contains(github.base_ref, 'staging') || contains(github.base_ref, 'production') ||
github.base_ref == 'master' || contains(github.base_ref, 'release') || contains(github.base_ref, 'staging') || contains(github.base_ref, 'production') ||
contains(needs.install-dependencies.outputs.all_modified_files, 'packages/protocol') ||
contains(needs.install-dependencies.outputs.all_modified_files, 'packages/typescript') ||
contains(needs.install-dependencies.outputs.all_modified_files, ',package.json') ||
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/containers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
- 'packages/celotool/**'
branches:
- master
- 'release/**'
pull_request:
paths:
- 'dockerfiles/**'
Expand Down
129 changes: 95 additions & 34 deletions .github/workflows/protocol-devchain-anvil.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,34 @@ on:
push:
branches:
- master
- 'release/**'
tags:
- core-contracts.v*
pull_request:
branches: [release/core-contracts/*, master]
paths:
- 'packages/protocol/**'
workflow_dispatch:
inputs:
npm_tag:
description: 'NPM TAG e.g. alpha, pre-merge (default: canary) '
required: true
type: string

env:
# Increment these to force cache rebuilding
FOUNDRY_CACHE_KEY: 1
# Supported Foundry version defined at celo-org (GitHub organisation) level, for consistency across workflows.
SUPPORTED_FOUNDRY_VERSION: ${{ vars.SUPPORTED_FOUNDRY_VERSION }}

jobs:
build:
defaults:
run:
working-directory: packages/protocol
name: Generate anvil
runs-on: ["self-hosted", "org", "npm-publish"]
permissions:
runs-on: ['self-hosted', 'org', 'npm-publish']
permissions:
contents: read
pull-requests: read
id-token: write
Expand All @@ -32,13 +47,13 @@ jobs:
fi
- name: Foundry cache
id: foundry-cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ./cache
key: ${{ runner.os }}-foundry-cache-${{ env.FOUNDRY_CACHE_KEY }}
- name: Foundry out
id: foundry-out
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ./out
key: ${{ runner.os }}-foundry-out-${{ env.FOUNDRY_CACHE_KEY }}
Expand All @@ -52,14 +67,14 @@ jobs:
uses: actions/github-script@v7
with:
script: |
const result = (
await github.rest.repos.listPullRequestsAssociatedWithCommit({
commit_sha: context.sha,
owner: context.repo.owner,
repo: context.repo.repo,
})
).data[0];
core.setOutput("number", result ? result.number : "");
const result = (
await github.rest.repos.listPullRequestsAssociatedWithCommit({
commit_sha: context.sha,
owner: context.repo.owner,
repo: context.repo.repo,
})
).data[0];
core.setOutput("number", result ? result.number : "");

- name: Set PR Number
id: set_pr_number
Expand All @@ -77,7 +92,7 @@ jobs:
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: "nightly-f625d0fa7c51e65b4bf1e8f7931cd1c6e2e285e9"
version: 'nightly-fa0e0c2ca3ae75895dd19173a02faf88509c0608'

- name: Install forge dependencies
run: forge install
Expand All @@ -86,20 +101,76 @@ jobs:
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"

- name: Generate migrations
run: ./migrations_sol/run_integration_tests_in_anvil.sh
- name: Akeyless Get Secrets
id: get_auth_token
uses: docker://us-west1-docker.pkg.dev/devopsre/akeyless-public/akeyless-action:latest
with:
api-url: https://api.gateway.akeyless.celo-networks-dev.org
access-id: p-kf9vjzruht6l
static-secrets: '{"/static-secrets/NPM/npm-publish-token":"NPM_TOKEN"}'

- uses: actions/setup-node@v4
with:
node-version: '18.x'
registry-url: 'https://registry.npmjs.org'

- name: 'Setup yarn'
shell: bash
run: |
npm install --global yarn
source ~/.bashrc

- name: 'Install packages'
shell: bash
run: yarn

# Starting L1 from scratch instead of JSON state to circumvent this Anvil bug https://github.com/foundry-rs/foundry/issues/7502
# Install `lsof` dependency, because it's not readily available on CI, but is required by
# `create_and_migrate_anvil_l2_devchain.sh`, because it uses `stop_anvil.sh` to kill
# existing anvil servers.
- name: Generate L1 migrations and run migration tests against L1 devchain
if: success() || failure()
run: |
sudo apt-get update
sudo apt-get install -y lsof

source ./scripts/foundry/constants.sh

echo "Starting L1 from scratch to circumvent Anvil bug"
source ./scripts/foundry/create_and_migrate_anvil_devchain.sh

FOUNDRY_PROFILE=devchain forge test -vvv \
--match-path "test-sol/devchain/migration/*" \
--fork-url $ANVIL_RPC_URL

./scripts/foundry/stop_anvil.sh

- name: Generate L2 migration
if: success() || failure()
run: ./scripts/foundry/create_and_migrate_anvil_l2_devchain.sh

- name: Sanitize ref name
id: sanitize-ref-name
run: |
sanitized_ref_name=$(echo "${{ github.ref_name }}" | tr -cd '[:alnum:]-_')
echo "sanitized_ref_name=${sanitized_ref_name}" >> $GITHUB_ENV

- name: Set package.json version based on GitHub ref
run: |
VERSION=${{ env.PR_NUMBER }}
echo "Setting version to 0.0.$VERSION"
jq ".version = \"0.0.$VERSION\"" .tmp/package.json > .tmp/temp.json && mv .tmp/temp.json .tmp/package.json
- name:
Determine release type and version (or dry run)
# This is what sets the RELEASE_TYPE and RELEASE_VERSION env variables
run: yarn --silent determine-release-version >> "$GITHUB_ENV"
working-directory: packages/protocol
env:
GITHUB_TAG: ${{ github.ref_name }}
NPM_PACKAGE: '@celo/devchain-anvil'
NPM_TAG: ${{ inputs.npm_tag }}

- name: Prepare package for publishing
run: yarn prepare_devchain_anvil_publishing
working-directory: packages/protocol
env:
RELEASE_TYPE: ${{ env.RELEASE_TYPE }}
RELEASE_VERSION: ${{ env.RELEASE_VERSION }}

- name: Upload devchain as artifact
uses: actions/upload-artifact@v4
Expand All @@ -110,23 +181,13 @@ jobs:
# https://docs.github.com/en/actions/learn-github-actions/usage-limits-billing-and-administration#artifact-and-log-retention-policy
retention-days: 90

- name: Akeyless Get Secrets
id: get_auth_token
uses: docker://us-west1-docker.pkg.dev/devopsre/akeyless-public/akeyless-action:latest
with:
api-url: https://api.gateway.akeyless.celo-networks-dev.org
access-id: p-kf9vjzruht6l
static-secrets: '{"/static-secrets/NPM/npm-publish-token":"NPM_TOKEN"}'

- uses: actions/setup-node@v4
with:
node-version: '18.x'
registry-url: 'https://registry.npmjs.org'

- name: Publish @celo/devchain-anvil
run: |
cat package.json
npm publish --access public
npm publish $RELEASE_TYPE $DRY_RUN --access public
working-directory: packages/protocol/.tmp
env:
RELEASE_TYPE: --tag ${{ env.RELEASE_TYPE != '' && env.RELEASE_TYPE || 'canary' }}
RELEASE_VERSION: ${{ env.RELEASE_VERSION }}
NODE_AUTH_TOKEN: ${{ env.NPM_TOKEN }}
DRY_RUN: ${{ env.RELEASE_VERSION == '' && '--dry-run' || '' }}
Loading
Loading