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

DA V2 contract diff #344

Draft
wants to merge 54 commits into
base: da-mainnet-deploy
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
fb313de
chore: less restrictive pragma (#216)
stevennevins Apr 5, 2024
74efe8e
Merge branch 'dev' of https://github.com/Layr-Labs/eigenlayer-middlew…
ChaoticWalrus Apr 8, 2024
5204b23
Add mainnet table to docs (#224)
0x0aa0 Apr 10, 2024
c29cf07
feat: automated ejector (#146)
0x0aa0 Apr 11, 2024
f224cf9
chore: bump forge-std and remove ds-test dependency (#227)
stevennevins Apr 13, 2024
6454c05
feat: allowlist mapping (#226)
0x0aa0 Apr 15, 2024
0328639
feat: return ops ejected (#228)
0x0aa0 Apr 16, 2024
59ebd32
Use uint32 for number of ejected operators (#232)
jianoaix Apr 17, 2024
e18c19e
feat: service manager payments (#242)
8sunyuan Apr 23, 2024
2b65511
fix: spacing (#244)
8sunyuan Apr 24, 2024
deebd4b
chore: rename audit report for clarity and consistency with core (#245)
wadealexc Apr 25, 2024
1feb6ae
feat: batch operator id conversions (#248)
0x0aa0 Apr 29, 2024
1703d25
fix: vm assume too many rejections (#247)
stevennevins Apr 29, 2024
74c86d2
feat: reregistration delay (#246)
0x0aa0 Apr 30, 2024
9968b1d
feat: ecdsa service manager (#234)
stevennevins May 1, 2024
8ed82a4
fix: add init function for staleStakesForbidden in BLSSignatureChecke…
stevennevins May 6, 2024
4ad5c85
feat: update core contracts submodule (#254)
8sunyuan May 7, 2024
c5b419a
fix: multiple rangepayments with same token (#257)
8sunyuan May 8, 2024
a23de11
test: fix flaky fuzz tests hitting the default operator who is alread…
stevennevins May 14, 2024
0351419
chore: update license (#259)
ChaoticWalrus May 21, 2024
afbcba8
feat: ecdsa key rotation (#252)
stevennevins May 23, 2024
1142437
fix: storage gap (#261)
stevennevins May 24, 2024
a7b1851
feat: `paymentInitiator` role in `ServiceManagerBase` (#260)
diyahir May 28, 2024
51e36f1
chore: refactor with RewardsCoordinator (#262)
8sunyuan May 30, 2024
c75eb8e
chore: rewards release submodule (#264)
8sunyuan Jun 5, 2024
b45dced
fix: deprecated struct field for earning receiver (#265)
stevennevins Jun 6, 2024
da5cf42
perf: refactor to modifers to use internal functions (#272)
stevennevins Jun 14, 2024
9f92f72
perf: refactor index registry to use internal functions for modifier …
stevennevins Jun 14, 2024
b1f706b
perf: refactor apk modifiers to use internal functions (#268)
stevennevins Jun 14, 2024
89cbd3c
perf: refactor modifiers to use internal functions for stake registry…
stevennevins Jun 14, 2024
dc5385e
fix: storage layout (#275)
0x0aa0 Jun 20, 2024
b816138
feat: reward initiator for ECDSAServiceManagerBase (#274)
Gajesh2007 Jun 22, 2024
d643f3b
fix: comment typos in IServiceManagerUI (#278)
samlaf Jun 25, 2024
c00aad7
fix: correct index get operator restakable strategies (#280)
stevennevins Jul 1, 2024
3b96caf
chore: update dev to eigenlayer contracts dev (#282)
shrimalmadhur Jul 10, 2024
17b1f44
fix: overflow (#290)
0x0aa0 Jul 26, 2024
a9c1aa7
feat: mainnet rewards release tag (#297)
8sunyuan Aug 13, 2024
74438b7
build: update core submodule to new release (#298)
8sunyuan Aug 15, 2024
cb2b334
add overrides (#302)
gpsanant Aug 20, 2024
b42aa0b
onchain socket (#307)
0x0aa0 Oct 11, 2024
3603856
chore: bump dependency with core to v0.4.3-mainnet-rewards-programmat…
stevennevins Oct 28, 2024
67ae0ef
feat: ejection policy change (#313)
0x0aa0 Nov 13, 2024
1dff320
feat: Rewards v2 (#315)
0xrajath Nov 15, 2024
0045229
ejector fix (#322)
0x0aa0 Nov 20, 2024
a80bfe9
fix: ejector owner (#326)
0x0aa0 Dec 4, 2024
80f0f84
test: socket registry (#327)
0x0aa0 Dec 5, 2024
91400d9
docs: fix typos and add note that large array may cause revert (#323)
nadir-akhtar Dec 5, 2024
027226b
fix: Rewards v2 audit fixes (#346)
0xrajath Jan 3, 2025
92a320f
docs: rewards v2 audit report (#356)
0xrajath Jan 13, 2025
2475ab8
feat: rm socket migration (#359)
0x0aa0 Jan 21, 2025
11b0061
feat: slashing release (#311)
stevennevins Jan 28, 2025
946a52b
refactor: ci (#382)
0xClandestine Feb 5, 2025
9785099
Update submodule lib/eigenlayer-contracts to rewardsv2.1 (#386)
Sidu28 Feb 6, 2025
4ee1c6f
chore: pull request template (#401)
stevennevins Feb 14, 2025
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
11 changes: 11 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
**Motivation:**

*Explain here the context, and why you're making that change. What is the problem you're trying to solve.*

**Modifications:**

*Describe the modifications you've done.*

**Result:**

*After your change, what will change.*
252 changes: 252 additions & 0 deletions .github/workflows/foundry.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,252 @@
name: Foundry

on:
workflow_dispatch:
push:
branches:
- master
- mainnet
- testnet-goerli
- dev
pull_request:

env:
FOUNDRY_PROFILE: ci
RPC_MAINNET: ${{ secrets.RPC_MAINNET }}
RPC_HOLESKY: ${{ secrets.RPC_HOLESKY }}
CHAIN_ID: ${{ secrets.CHAIN_ID }}

jobs:
# -----------------------------------------------------------------------
# Forge Test
# -----------------------------------------------------------------------

test:
name: Test
runs-on: ubuntu-latest
strategy:
fail-fast: true
steps:
# Check out repository with all submodules for complete codebase access.
- uses: actions/checkout@v4
with:
submodules: recursive

# Install the Foundry toolchain.
- name: "Install Foundry"
uses: foundry-rs/foundry-toolchain@v1
with:
version: stable

# Run Forge's formatting checker to ensure consistent code style.
- name: "Forge Fmt"
run: |
forge fmt --check
id: fmt

# Build the project and display contract sizes.
- name: "Forge Build"
run: |
forge --version
forge build --sizes
id: build

# Run local tests (unit and integration).
- name: "Forge Test (Local)"
run: forge test -vvv

# Run integration tests using a mainnet fork.
- name: "Forge Test Integration (Fork)"
run: FOUNDRY_PROFILE=forktest forge test --match-contract Integration -vvv

# -----------------------------------------------------------------------
# Forge Test (Intense)
# -----------------------------------------------------------------------

continuous-fuzzing:
name: Test (Intense)
runs-on: ubuntu-latest
strategy:
fail-fast: true
steps:
# Check out repository with all submodules for complete codebase access.
- uses: actions/checkout@v4
with:
submodules: recursive

# Install the Foundry toolchain.
- name: "Install Foundry"
uses: foundry-rs/foundry-toolchain@v1
with:
version: stable

# Build the project and display contract sizes.
- name: "Forge Build"
run: |
forge --version
forge build --sizes
id: build

# Run Forge Test (Intense)
- name: Forge Test (Intense)
run: |
echo -e "\033[1;33mWarning: This workflow may take several hours to complete.\033[0m"
echo -e "\033[1;33mThis intense fuzzing workflow is optional but helps catch edge cases through extended testing.\033[0m"
FOUNDRY_PROFILE=intense forge test -vvv

# -----------------------------------------------------------------------
# Forge Coverage
# -----------------------------------------------------------------------

run-coverage:
name: Coverage
runs-on: ubuntu-latest
# Only run coverage checks on dev, testnet-holesky, and mainnet branches, or PRs targeting these branches
if: |
github.ref == 'refs/heads/dev' ||
github.ref == 'refs/heads/testnet-holesky' ||
github.ref == 'refs/heads/mainnet' ||
github.base_ref == 'dev' ||
github.base_ref == 'testnet-holesky' ||
github.base_ref == 'mainnet'
strategy:
fail-fast: true
steps:
# Check out repository with all submodules for complete codebase access.
- uses: actions/checkout@v4
with:
submodules: recursive

# Install the Foundry toolchain.
- name: "Install Foundry"
uses: foundry-rs/foundry-toolchain@v1
with:
version: stable

# Install LCOV for coverage report generation.
- name: Install LCOV
run: |
sudo apt-get install lcov
id: lcov

# Build the project and display contract sizes.
- name: "Forge Build"
run: |
forge --version
forge build --sizes
id: build

# Run Forge coverage with LCOV report format, excluding test and script files
- name: Forge Coverage
run: |
FOUNDRY_DENY_WARNINGS=false FOUNDRY_PROFILE=ci forge coverage --report lcov --report summary --no-match-coverage "script|test"
genhtml -q -o report ./lcov.info

# Upload coverage report as artifact before potential failure
- name: Upload Coverage Report
uses: actions/upload-artifact@v4
with:
name: code-coverage-report
path: report/*

# Check coverage threshold after uploading report
- name: Check Coverage Threshold
run: |
LINES_PCT=$(lcov --summary lcov.info | grep "lines" | cut -d ':' -f 2 | cut -d '%' -f 1 | tr -d '[:space:]')
FUNCTIONS_PCT=$(lcov --summary lcov.info | grep "functions" | cut -d ':' -f 2 | cut -d '%' -f 1 | tr -d '[:space:]')
FAILED=0

if (( $(echo "$LINES_PCT < 90" | bc -l) )); then
echo -e "\033[1;31m❌ Lines coverage ($LINES_PCT%) is below minimum threshold of 90%\033[0m"
FAILED=1
else
echo -e "\033[1;32m✅ Lines coverage ($LINES_PCT%) meets minimum threshold of 90%\033[0m"
fi

if (( $(echo "$FUNCTIONS_PCT < 90" | bc -l) )); then
echo -e "\033[1;31m❌ Functions coverage ($FUNCTIONS_PCT%) is below minimum threshold of 90%\033[0m"
FAILED=1
else
echo -e "\033[1;32m✅ Functions coverage ($FUNCTIONS_PCT%) meets minimum threshold of 90%\033[0m"
fi

if [ $FAILED -eq 1 ]; then
exit 1
fi

# -----------------------------------------------------------------------
# Forge Size Diff
# -----------------------------------------------------------------------

compare-contract-sizes:
name: Size Diff
runs-on: ubuntu-latest
steps:
# Check out repository with all submodules for complete codebase access.
- uses: actions/checkout@v4
with:
submodules: recursive

# Install the Foundry toolchain.
- name: "Install Foundry"
uses: foundry-rs/foundry-toolchain@v1
with:
version: stable

- name: Build contracts on PR branch
run: |
forge build --json --sizes | jq '.' > pr_sizes.json

- name: Checkout target branch
run: |
git fetch origin ${{ github.base_ref }}
git checkout ${{ github.base_ref }}

- name: Build contracts on target branch
run: |
forge build --json --sizes | jq '.' > target_sizes.json

- name: Compare contract sizes using Bash
run: |
# Extract contract names
contracts=$(jq -r 'keys[]' pr_sizes.json)

# Track if there are any differences
has_differences=0

echo -e "\n📊 \033[1;34mContract Size Comparison Report\033[0m 📊\n"

# Iterate through contracts and compare sizes
for contract in $contracts; do
pr_runtime=$(jq -r --arg contract "$contract" '.[$contract].runtime_size // 0' pr_sizes.json)
pr_init=$(jq -r --arg contract "$contract" '.[$contract].init_size // 0' pr_sizes.json)

target_runtime=$(jq -r --arg contract "$contract" '.[$contract].runtime_size // 0' target_sizes.json)
target_init=$(jq -r --arg contract "$contract" '.[$contract].init_size // 0' target_sizes.json)

runtime_diff=$((pr_runtime - target_runtime))
init_diff=$((pr_init - target_init))

if [ "$runtime_diff" -ne 0 ] || [ "$init_diff" -ne 0 ]; then
echo -e "\033[1;36m📝 $contract:\033[0m"
if [ "$runtime_diff" -ne 0 ]; then
if [ "$runtime_diff" -gt 0 ]; then
echo -e " Runtime: \033[1;31m+$runtime_diff bytes\033[0m 📈"
else
echo -e " Runtime: \033[1;32m$runtime_diff bytes\033[0m 📉"
fi
fi
if [ "$init_diff" -ne 0 ]; then
if [ "$init_diff" -gt 0 ]; then
echo -e " Init: \033[1;31m+$init_diff bytes\033[0m 📈"
else
echo -e " Init: \033[1;32m$init_diff bytes\033[0m 📉"
fi
fi
has_differences=1
fi
done

if [ "$has_differences" -eq 0 ]; then
echo -e "\033[1;32m✨ No contract size changes detected ✨\033[0m"
fi
50 changes: 0 additions & 50 deletions .github/workflows/tests.yml

This file was deleted.

3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
path = lib/eigenlayer-contracts
url = https://github.com/Layr-labs/eigenlayer-contracts
branch = dev
[submodule "lib/ds-test"]
path = lib/ds-test
url = https://github.com/dapphub/ds-test
[submodule "lib/openzeppelin-contracts"]
path = lib/openzeppelin-contracts
url = https://github.com/Openzeppelin/openzeppelin-contracts
Expand Down
32 changes: 29 additions & 3 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,35 @@ Licensor: Layr Labs, Inc.
Licensed Work: EigenLayer Middleware Contracts
The Licensed Work is (c) 2023 Layr Labs, Inc.

Additional Use Grant: None.

Change Date: 2025-10-16 (October 16th, 2025)
Additional Use Grant:

You may additionally use any of the software included in the following repositories
[here](https://docs.google.com/spreadsheets/d/1PlJRow5C0GMqXZlIxRm5CEnkhH-gMV1wIdq1pCfbZco/edit?usp=sharing)
(“Additional Use Grant Software”) for production commercial uses, but only if such
uses are (i) built on or using the EigenLayer Protocol or EigenDA, and (ii) not
Competing Uses.

“Competing Use” means any use of the Additional Use Grant Software in any product,
protocol, application or service that is made available to third parties and that
(i) substitutes for use of EigenLayer Protocol or EigenDA, (ii) offers the same or
substantially similar functionality as the EigenLayer Protocol or EigenDA or
(iii) is built on or using a protocol with substantially similar functionality as
the EigenLayer Protocol.

EigenLayer Protocol means the restaking protocol as further described in the
documentation [here](https://docs.eigenlayer.xyz/), as updated from time to time.

EigenDA means the data availability protocol built on top of the EigenLayer
Protocol as further described in the documentation
[here](https://docs.eigenlayer.xyz/eigenda/overview), as updated from time to time.

Change Dates:

- All commits at or prior to commit a23de118e7d16081d350c7f83c24261d1421b0ba
(i.e. committed to this repository on or before May 19, 2024, the date of) have a
change date of 2025-10-16 (October 16th, 2025)
- All commits after a23de118e7d16081d350c7f83c24261d1421b0ba (i.e. committed to this
repository after May 19, 2024) have a change date of 2027-05-01 (May 1st, 2027)

Change License: MIT

Expand Down
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
storage-report:
bash ".github/bin/storage-report.sh" "docs/storage-report/"
Loading
Loading