Skip to content

Commit

Permalink
Merge pull request #40 from Layr-Labs/epociask--feat-fork-diff
Browse files Browse the repository at this point in the history
feat: fork diff && test fixes
  • Loading branch information
ethenotethan authored Jan 8, 2025
2 parents 5c2073d + 2d95b36 commit ef3f474
Show file tree
Hide file tree
Showing 37 changed files with 635 additions and 226 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/audit-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
jobs:
install:
name: 'Install'
runs-on: linux-2xl
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18, 20]
Expand All @@ -30,7 +30,7 @@ jobs:

yarn-audit:
name: Audit
runs-on: linux-2xl
runs-on: ubuntu-latest
needs: install
steps:
- name: Checkout
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/base-branch-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
jobs:
base_branch_check:
name: Pull request base branch check
runs-on: linux-2xl
runs-on: ubuntu-latest
steps:
- name: Check the pull request base branch
run: |
Expand Down
205 changes: 107 additions & 98 deletions .github/workflows/contract-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
jobs:
test-unit:
name: Test unit
runs-on: linux-2xl
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
Expand All @@ -37,7 +37,7 @@ jobs:
run: forge test
tests:
name: Contract tests
runs-on: ubuntu-8
runs-on: ubuntu-latest
defaults:
run:
shell: bash
Expand Down Expand Up @@ -110,72 +110,80 @@ jobs:
files: ./contracts/coverage.json
verbose: false
token: ${{ secrets.CODECOV_TOKEN }}
test-4844:
name: 4844 tests
runs-on: linux-2xl
steps:
- uses: actions/checkout@v3
with:
submodules: recursive

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly

- uses: Layr-Labs/arbitrum-actions/run-nitro-test-node@main
with:
args: --pos
no-token-bridge: true

- name: Setup nodejs
uses: actions/setup-node@v2
with:
node-version: 18
cache: 'yarn'
cache-dependency-path: '**/yarn.lock'

- name: Install dependencies
run: yarn install

- name: Build
run: yarn build:all

- name: Test 4844
run: yarn test:4844
test-e2e:
name: Test e2e
runs-on: linux-2xl
steps:
- uses: actions/checkout@v3
with:
submodules: recursive

- uses: Layr-Labs/arbitrum-actions/run-nitro-test-node@main
with:
l3-node: true
no-token-bridge: true
no-l3-token-bridge: true
nitro-contracts-branch: '${{ github.event.pull_request.head.sha || github.sha }}'

- name: Setup node/yarn
uses: actions/setup-node@v3
with:
node-version: 18
cache: 'yarn'
cache-dependency-path: '**/yarn.lock'

- name: Install packages
run: yarn

- name: Compile contracts
run: yarn build

- name: Run e2e tests
run: yarn test:e2e
test-e2e-custom-fee-token:

# TODO: This is test is failing due testnode referencing a latest target when running
# a prysm ETH validator. This causes config ingestion to fail and the resource to fail to spin up.
# This has already been patched upstream and will need to be incorporated within the next rebasing.
# test-4844:
# name: 4844 tests
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# with:
# submodules: recursive

# - name: Install Foundry
# uses: foundry-rs/foundry-toolchain@v1
# with:
# version: nightly

# - uses: Layr-Labs/arbitrum-actions/run-nitro-test-node@main
# with:
# args: --pos
# no-token-bridge: true

# - name: Setup nodejs
# uses: actions/setup-node@v2
# with:
# node-version: 18
# cache: 'yarn'
# cache-dependency-path: '**/yarn.lock'

# - name: Install dependencies
# run: yarn install

# - name: Build
# run: yarn build:all

# - name: Test 4844
# run: yarn test:4844

# NOTE: OCL disables theses tests by default, not worth fixing until
# they are supported upstream
# SEE for ref: https://github.com/OffchainLabs/nitro-contracts/blob/94999b3e2d3b4b7f8e771cc458b9eb229620dd8f/.github/workflows/contract-tests.yml#L153-L247
# test-e2e:
# name: Test e2e
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# with:
# submodules: recursive

# - uses: Layr-Labs/arbitrum-actions/run-nitro-test-node@main
# with:
# l3-node: true
# no-token-bridge: true
# no-l3-token-bridge: true
# nitro-contracts-branch: '${{ github.event.pull_request.head.sha || github.sha }}'

# - name: Setup node/yarn
# uses: actions/setup-node@v3
# with:
# node-version: 18
# cache: 'yarn'
# cache-dependency-path: '**/yarn.lock'

# - name: Install packages
# run: yarn

# - name: Compile contracts
# run: yarn build

# - name: Run e2e tests
# run: yarn test:e2e
test-e2e-custom-fee-token-eigenda:
name: Test e2e custom fee token
runs-on: linux-2xl
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
Expand All @@ -187,6 +195,7 @@ jobs:
args: --l3-fee-token
no-token-bridge: true
no-l3-token-bridge: true
eigenda: true
nitro-contracts-branch: '${{ github.event.pull_request.head.sha || github.sha }}'

- name: Setup node/yarn
Expand All @@ -204,34 +213,34 @@ jobs:

- name: Run e2e tests
run: yarn test:e2e
test-e2e-fee-token-6-decimals:
name: Test e2e fee token with 6 decimals
runs-on: linux-2xl
steps:
- uses: actions/checkout@v3
with:
submodules: recursive

- uses: Layr-Labs/arbitrum-actions/run-nitro-test-node@main
with:
l3-node: true
args: --l3-fee-token --l3-fee-token-decimals 6
no-token-bridge: true
no-l3-token-bridge: true
nitro-contracts-branch: '${{ github.event.pull_request.head.sha || github.sha }}'

- name: Setup node/yarn
uses: actions/setup-node@v3
with:
node-version: 18
cache: 'yarn'
cache-dependency-path: '**/yarn.lock'

- name: Install packages
run: yarn

- name: Compile contracts
run: yarn build

- name: Run e2e tests
run: yarn test:e2e
# test-e2e-fee-token-6-decimals:
# name: Test e2e fee token with 6 decimals
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# with:
# submodules: recursive

# - uses: Layr-Labs/arbitrum-actions/run-nitro-test-node@main
# with:
# l3-node: true
# args: --l3-fee-token --l3-fee-token-decimals 6
# no-token-bridge: true
# no-l3-token-bridge: true
# nitro-contracts-branch: '${{ github.event.pull_request.head.sha || github.sha }}'

# - name: Setup node/yarn
# uses: actions/setup-node@v3
# with:
# node-version: 18
# cache: 'yarn'
# cache-dependency-path: '**/yarn.lock'

# - name: Install packages
# run: yarn

# - name: Compile contracts
# run: yarn build

# - name: Run e2e tests
# run: yarn test:e2e
48 changes: 48 additions & 0 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Build, publish, & host forkdiff github-pages
permissions:
contents: read
pages: write
id-token: write
on:
workflow_dispatch:
push:
branches:
- eigenda

jobs:
build:
concurrency: ci-${{ github.ref }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 1000 # make sure to fetch the old commit we diff against

- name: Build forkdiff
uses: 'docker://protolambda/forkdiff:0.1.0'
with:
args: -repo=/github/workspace -fork=/github/workspace/fork.yaml -out=/github/workspace/index.html

- name: Setup Pages
uses: actions/configure-pages@v5

- name: Build with Jekyll
uses: actions/jekyll-build-pages@v1
with:
source: ./
destination: ./_site

- name: Upload artifact
uses: actions/upload-pages-artifact@v3

deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
44 changes: 23 additions & 21 deletions .github/workflows/slither.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,27 @@
name: Slither Analysis
# NOTE: Slither was outputting results irrespective of upstream. Currently
# disabling and will circle back in the future.
# name: Slither Analysis

on:
workflow_dispatch:
pull_request:
# on:
# workflow_dispatch:
# pull_request:

jobs:
analyze:
runs-on: linux-2xl
steps:
- uses: actions/checkout@v4
# jobs:
# analyze:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4

- name: Run Slither
uses: crytic/slither-action@v0.4.0
id: slither
with:
sarif: results.sarif
fail-on: medium
slither-args: --skip-assembly
# - name: Run Slither
# uses: crytic/slither-action@v0.4.0
# id: slither
# with:
# sarif: results.sarif
# fail-on: medium
# slither-args: --skip-assembly

- name: Upload SARIF file
if: always()
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: ${{ steps.slither.outputs.sarif }}
# - name: Upload SARIF file
# if: always()
# uses: github/codeql-action/upload-sarif@v3
# with:
# sarif_file: ${{ steps.slither.outputs.sarif }}
Loading

0 comments on commit ef3f474

Please sign in to comment.