Skip to content

Conversation

@marioevz
Copy link
Member

🗒️ Description

Creates actions and workflows to automate devnet branch creation:

Action .github/actions/rebase-eip-branch/action.yaml

Rebases a given eips/<fork>/eip-<eip-number> branch to the appropriate forks/<fork> base branch.

Workflow .github/workflows/eip-rebase.yaml

Used to dispatch action .github/actions/rebase-eip-branch/action.yaml.

The workflow aborts on any rebase conflict.

Args:

  • fork: The name of the fork the EIP is based on.
  • eip_number: The number of the EIP.

Action .github/actions/merge-eip-branches/action.yaml

Merges multiple EIP branches based on the same fork.

Workflow .github/workflows/create-devnet-branch.yaml

Creates a Devnet branch, devnets/<devnet name>, from different EIP branches based on the same fork by dispatching .github/actions/merge-eip-branches/action.yaml.

The workflow aborts on any merge conflict.

Args:

  • fork: The name of the fork the EIPs are based on.
  • devnet_name: Name of the devnet, e.g. amsterdam/1, bal/2, eip1234/1, etc. Resulting branch will be devnets/<devnet name>.
  • eip_numbers: Comma-separated list of all EIP numbers to include. All branches eip/<fork>/eip-<eip_number> must exist and ideally be rebased on the latest forks/<fork>.

Workflow .github/workflows/bal-devnet-2.yaml

Shortcut for .github/workflows/create-devnet-branch.yaml with fork=amsterdam, devnet_name=bal/2 and eip_numbers=8024,7843,7708,7778.

Args: None

🔗 Related Issues or PRs

N/A.

✅ Checklist

  • All: Ran fast tox checks to avoid unnecessary CI fails, see also Code Standards and Enabling Pre-commit Checks:
    uvx tox -e static
  • All: PR title adheres to the repo standard - it will be used as the squash commit message and should start type(scope):.
  • All: Considered updating the online docs in the ./docs/ directory.
  • All: Set appropriate labels for the changes (only maintainers can apply labels).
  • Tests: Ran mkdocs serve locally and verified the auto-generated docs for new tests in the Test Case Reference are correctly formatted.
  • Tests: For PRs implementing a missed test case, update the post-mortem document to add an entry the list.
  • Ported Tests: All converted JSON/YML tests from ethereum/tests or tests/static have been assigned @ported_from marker.

Cute Animal Picture

Put a link to a cute animal picture inside the parenthesis-->

@marioevz
Copy link
Member Author

Tested this locally using act and mocking the origin to a local bare repo:

mkdir -p /tmp/act-origin.git
git init --bare /tmp/act-origin.git

git remote set-url origin /tmp/act-origin.git

git push origin main
git push origin forks/amsterdam
git push origin eips/amsterdam/eip-7778
git push origin eips/amsterdam/eip-7708
...

And then running act with the following command:

sudo /home/marioevz/.local/bin/act workflow_dispatch -W .github/workflows/create-devnet-branch.yaml --input fork=amsterdam --input devnet_name=test/1 --input eip_numbers=7778,7708 -s GITHUB_TOKEN=<github_token> --container-options "-v /tmp:/tmp"

@codecov
Copy link

codecov bot commented Jan 21, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.07%. Comparing base (c14e9c9) to head (fbcbfd9).
⚠️ Report is 1 commits behind head on forks/amsterdam.

Additional details and impacted files
@@               Coverage Diff                @@
##           forks/amsterdam    #2053   +/-   ##
================================================
  Coverage            86.07%   86.07%           
================================================
  Files                  599      599           
  Lines                39527    39527           
  Branches              3780     3780           
================================================
  Hits                 34021    34021           
  Misses                4872     4872           
  Partials               634      634           
Flag Coverage Δ
unittests 86.07% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

@spencer-tb spencer-tb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding this! Some comments and thoughts, I think we can make this a one-shot workflow. Let me know what you think!

Combine Workflows

I think we should merge bal-devnet-2.yaml and create-devnet-branch.yaml into one file where the inputs have defaults:

inputs:                                                                                                  
  fork:                                                                                                  
    description: 'Fork name (e.g., amsterdam)'                                                           
    required: true                                                                                       
    type: string                                                                                         
    default: 'amsterdam'                                                                                 
  ...                                                                                     
  eip_numbers:                                                                                           
    description: 'Comma-separated list of EIP numbers'                                                   
    required: true                                                                                       
    type: string                                                                                         
    default: '8024,7843,7708,7778' 

Where the merge-eip-branches action is included at the end! Then we rename this workflow to update-devnet-branch.yaml.

Ideally these defaults come from a config file that other workflows use (my artifact workflows), so that we only have to change one file in the future, but thats a future addition in my opinion and for another PR. Nonetheless, we'll be able to add these inputs in the github ui or command line. For example:

 gh workflow run update-devnet-branch.yaml \                                                             
    -f fork=amsterdam \                                                                                    
    -f devnet_name=bal/2 \                                                                                 
    -f eip_numbers=8024,7843,7708,7778

Extra Addtions

For the merge-eip-branches action:

  • We could check if forks/amsterdam is an ancestor on the latest commit for each EIP using git merge-base --is-ancestor forks/amsterdam eips/amsterdam/eip-xxxx, and fail fast otherwise.
  • Afterwards we should also do a merge check for all EIP pairs to see which ones will have conflicts. The CI could output all the EIPs that have conflicts upon manual trigger, to fail fast - if so we will have to resolve manually. If no conflicts then continue!

Consideration

To be honest I am wondering if this can be a one shot workflow: update-devnet-branch.yaml, where we don't even need eip-rebase.yaml that has the following flow:

  • Fetch all branches
  • Validate all EIP inputs (i.e numeric)
  • Perform ancestor check, are we rebased already?
  • Auto-rebase all EIPs not already rebased. Fail fast if conflicts (have to be resolved manually).
  • Push rebased EIPs: git push --force-with-lease
  • EIP merge conflict check, by testing merge conflict pairs. Fail fast if conflicts that have to be performed manually.
  • Create/update the devnet branch by force pushing to latests forks/.
  • Merge all EIPs to devnet branch.
  • Push devnet branch.

The only issue I can see here is if we have to manually resolve the EIP merge conflicts. If we merge eip-7843 into eip-7708 to resolve conflicts, then eip-7708 is no longer a clean isolated branch - it contains another EIP's code.

To keep EIP branches clean, we could create merged branches like eips/amsterdam/eip-7708+7843 that contain the resolved conflicts, while keeping the original eip-7708 and eip-7843 branches untouched. The workflow would accept these merged branches in the input (e.g., eip_numbers: 8024,7708+7843,7778) and detect them by the + in the name. Assuming we get a a merge conflict with 7708 + 7843, and 7843 + 7778, then we'd get this at a fail fast step. Once resolving manually these would all sit within eip-7708+7843+7778, and our cli command would be:

gh workflow run update-devnet-branch.yaml \                                                              
  -f fork=amsterdam \                                                                                    
  -f devnet_name=amsterdam/2 \                                                                                 
  -f eip_numbers=8024,7708+7843+7778  

@spencer-tb
Copy link
Contributor

Approved here as only cosmetic changes suggested in code reviews!

@marioevz marioevz merged commit 7b9fc7d into ethereum:forks/amsterdam Jan 21, 2026
15 checks passed
@marioevz marioevz deleted the eip-ci-workflows branch January 21, 2026 20:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants