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] Epoch manager WIP #11189

Merged
merged 75 commits into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from 62 commits
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
5f7e5d1
first compiling draft
soloseng Aug 15, 2024
4084bac
Compiler fixes + finishNextEpochProcess
pahor167 Aug 16, 2024
f3fed48
allocateValidatorsRewards compilable
pahor167 Aug 16, 2024
0b473c2
First few tests
pahor167 Aug 16, 2024
b012f29
test fix
pahor167 Aug 16, 2024
3a4f87a
uisng registry instead
soloseng Aug 16, 2024
ad8831d
updated registry ID var names
soloseng Aug 16, 2024
5fa905d
typo
soloseng Aug 16, 2024
b3023c2
++ mock contracts in 0.8
soloseng Aug 17, 2024
9681185
++ passing test using mock
soloseng Aug 17, 2024
18ba704
Removal of using precompiles
pahor167 Aug 19, 2024
8d862d1
ScoreManager refactor
pahor167 Aug 19, 2024
70b12a5
Decouple epoch manager initializer from registry
pahor167 Aug 19, 2024
0c74a5e
isReadyToStartEpoch fix
pahor167 Aug 19, 2024
7379aff
startNextEpochProcess fixes
pahor167 Aug 19, 2024
7205bb7
rename score manager to score reader
pahor167 Aug 19, 2024
b89cc74
Rename transfer to release on CeloDistribution schedule
pahor167 Aug 19, 2024
758d097
Celo distribution schedule renamed to CeloUnreleasedTreasure
pahor167 Aug 19, 2024
d7b32fb
conditions to getFirstBlockAtEpoch and getLastBlockAtEpoch
pahor167 Aug 19, 2024
a66e578
ScoreManager update
pahor167 Aug 19, 2024
de3ae19
getFirstBlockOfEpoch in EpochManager initializer
pahor167 Aug 19, 2024
8e86672
extra checks
pahor167 Aug 19, 2024
0fae892
introduce new getValidatorsGroup
pahor167 Aug 19, 2024
0e55b36
systemAlreadyInitialized update
pahor167 Aug 19, 2024
973c21e
Removal of IEpochManagerInterface
pahor167 Aug 19, 2024
315aaee
Made CI run on feature branch
martinvol Aug 19, 2024
efebfb7
Merge branch 'release/core-contracts/12' into feat/epoch-manager
pahor167 Aug 19, 2024
4c9ee98
merge fix
pahor167 Aug 19, 2024
c6fd893
Added target for the CI
martinvol Aug 19, 2024
04af0f7
Merge branch 'feat/epoch-manager' of github.com:celo-org/celo-monorep…
martinvol Aug 19, 2024
29aadbb
Merge branch 'feat/epoch-manager' into feat/l2-epoch-system
martinvol Aug 19, 2024
41fe5e6
Fixed quote celo-monorepo.yml
martinvol Aug 19, 2024
05dcde2
Allow Validator registration in L2 without BLS key (#11181)
m-chrzan Aug 19, 2024
ce59f2e
Fix CI
martinvol Aug 19, 2024
01a3098
Fixed interfaces and imports
martinvol Aug 19, 2024
f7454fc
Build fix
pahor167 Aug 20, 2024
ff4fb8f
lint
pahor167 Aug 20, 2024
55d462a
prettify
pahor167 Aug 20, 2024
a2522a2
prettify 2
pahor167 Aug 20, 2024
dc9ece5
Attempt to fix truffle build and migrations l2 epoch (#11190)
martinvol Aug 20, 2024
85303f9
Added Blocking to LockedGold, Election (#11186)
martinvol Aug 21, 2024
7979ffb
add EpochManager to abis
pahor167 Aug 23, 2024
f7cb22c
Merge branch 'feat/l2-epoch-system' of https://github.com/celo-org/ce…
pahor167 Aug 23, 2024
9403236
force deploy abis
pahor167 Aug 23, 2024
b63e487
build fix
pahor167 Aug 23, 2024
96eb887
Move Validators.sol to 0.8 (#11192)
martinvol Aug 26, 2024
62bfb44
force release of canary abi
pahor167 Aug 26, 2024
7e5e8ea
Merge branch 'feat/l2-epoch-system' of https://github.com/celo-org/ce…
pahor167 Aug 26, 2024
40e692b
force new canary version
pahor167 Aug 26, 2024
a536b5f
npm tag revert
pahor167 Aug 26, 2024
2c49e64
Soloseng/update-l2-getepochnumber-logic (#11195)
soloseng Aug 26, 2024
4e1cf6a
++ TODO and comment
soloseng Aug 26, 2024
2eab03f
add score manager to abis
pahor167 Aug 27, 2024
49a49ed
Merge branch 'feat/l2-epoch-system' of https://github.com/celo-org/ce…
pahor167 Aug 27, 2024
4cbc6d9
Split initEpochManager Function (#11199)
soloseng Sep 11, 2024
080b430
startNextEpochProcess unit & integration test (#11191)
soloseng Sep 17, 2024
5dc389f
E2E EpochManager test + Epoch truffle migrations & Anvil L2 migration…
pahor167 Sep 17, 2024
f4b4564
Soloseng/dynamically-fetch-epochmanagerenabler-address (#11207)
soloseng Sep 17, 2024
59ea380
Implement sending of allocated validator payments (#11197)
m-chrzan Sep 18, 2024
cfe3b30
EpochManager fixes (#11208)
pahor167 Sep 18, 2024
7fe7a29
Reset pending payment to 0 after sending (#11209)
m-chrzan Sep 18, 2024
d2fd5c4
Deleted duplicated import
martinvol Sep 18, 2024
df84c5d
Make captureEpochAndValidators work in constant time (#11210)
martinvol Sep 20, 2024
c85d594
Use more general interface for token transfer (#11216)
m-chrzan Sep 20, 2024
032f543
Epoch manager enabler tests (#11213)
soloseng Sep 20, 2024
91baa1b
Make sendValidatorPayment nonReentrant (#11217)
m-chrzan Sep 23, 2024
acd1f86
Martinvol/return account instead of signer (#11215)
martinvol Sep 23, 2024
a35fdba
EpochManager e2e tests add/remove validators between ecpochs (#11214)
pahor167 Sep 23, 2024
02454f4
Send validator payment on actions that would modify reward distributi…
m-chrzan Sep 23, 2024
cac4a13
Rename `CeloUnreleasedTreasure` to `CeloUnreleasedTreasury` (#11220)
soloseng Sep 23, 2024
580bd9d
renamed file
soloseng Sep 23, 2024
74ca26b
Update score manager behaviour (#11224)
pahor167 Sep 25, 2024
916b71d
PR-feedback (#11223)
soloseng Sep 25, 2024
b82b51d
L1-L2-checks (#11225)
soloseng Sep 25, 2024
4e4b960
Merge branch 'release/core-contracts/12' of github.com:celo-org/celo-…
martinvol Sep 25, 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
10 changes: 9 additions & 1 deletion .github/workflows/celo-monorepo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,18 @@ on:
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 @@ -24,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
2 changes: 1 addition & 1 deletion .github/workflows/protocol-devchain-anvil.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ jobs:
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: ${{ env.SUPPORTED_FOUNDRY_VERSION }}
version: 'nightly-fa0e0c2ca3ae75895dd19173a02faf88509c0608'

- name: Install forge dependencies
run: forge install
Expand Down
16 changes: 11 additions & 5 deletions .github/workflows/protocol_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,23 @@ on:
branches:
- master
- 'release/**'
- 'feat/l2-epoch-system'
- 'martinvol/**'
- 'pahor167/**'
- 'soloseng/**'
pull_request:
branches:
- master
- 'release/**'
- 'feat/l2-epoch-system'
- 'martinvol/**'
- 'pahor167/**'
- 'soloseng/**'

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

jobs:
Expand Down Expand Up @@ -54,7 +62,7 @@ jobs:
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: ${{ env.SUPPORTED_FOUNDRY_VERSION }}
version: 'nightly-fa0e0c2ca3ae75895dd19173a02faf88509c0608' # TODO: revert back to env var

- name: Install forge dependencies
run: forge install
Expand Down Expand Up @@ -132,7 +140,6 @@ jobs:
run: ./scripts/foundry/create_and_migrate_anvil_devchain.sh

- name: Run migration tests against local anvil devchain
if: success() || failure()
run: |
source ./scripts/foundry/constants.sh

Expand All @@ -141,10 +148,9 @@ jobs:
--fork-url $ANVIL_RPC_URL

- name: Run e2e tests against local anvil devchain
if: success() || failure()
run: |
source ./scripts/foundry/constants.sh

FOUNDRY_PROFILE=devchain forge test -vvv \
--match-path "test-sol/devchain/e2e/*" \
--fork-url $ANVIL_RPC_URL
--fork-url $ANVIL_RPC_URL
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,7 @@
path = packages/protocol/lib/celo-foundry
url = https://github.com/celo-org/celo-foundry
branch = celo-foundry-v0.5.13
[submodule "packages/protocol/lib/solidity-bytes-utils-8"]
path = packages/protocol/lib/solidity-bytes-utils-8
url = https://github.com/GNSPS/solidity-bytes-utils
branch = master
16 changes: 14 additions & 2 deletions packages/protocol/contractPackages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,24 @@ export const SOLIDITY_08_PACKAGE = {
proxiesPath: '/', // Proxies are still with 0.5 contracts
// Proxies shouldn't have to be added to a list manually
// https://github.com/celo-org/celo-monorepo/issues/10555
contracts: ['GasPriceMinimum', 'FeeCurrencyDirectory', 'CeloDistributionSchedule'],
contracts: [
'GasPriceMinimum',
'FeeCurrencyDirectory',
'CeloUnreleasedTreasure',
'Validators',
'EpochManager',
'EpochManagerEnabler',
'ScoreManager',
],
proxyContracts: [
'GasPriceMinimumProxy',
'FeeCurrencyDirectoryProxy',
'MentoFeeCurrencyAdapterV1',
'CeloDistributionScheduleProxy',
'CeloUnreleasedTreasureProxy',
'ValidatorsProxy',
'EpochManagerProxy',
'EpochManagerEnablerProxy',
'ScoreManagerProxy',
],
truffleConfig: 'truffle-config0.8.js',
} satisfies ContractPackage
Loading
Loading