Skip to content

Add tests with validator set changes at forks #4439

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

leolara
Copy link
Member

@leolara leolara commented Jul 12, 2025

This branch introduces a new testing framework for fork transitions that focuses on scenarios where validators change state during the fork transition. The main goals are:

  1. Template Test Infrastructure: Introduces a new template-based testing system
    (template_test.py) that allows for automated generation of tests across all fork
    transitions, making it easier to ensure consistent testing coverage. It also can be useful when many slightly different tests should be implemented.
  2. Validator State Change Coverage: Specifically tests edge cases where validators
    exit, activate, or have their balances modified during the fork transition,
    ensuring the fork logic correctly handles these concurrent state changes.

The template test infrastructure is less than 180 lines of code, and 1300+ lines of code are unit tests for this infrastructure.

@leolara leolara changed the base branch from master to dev July 12, 2025 08:46
@leolara leolara force-pushed the leolara/standard_fork_tests_validator_changes_at_fork branch from 3367493 to 91c1f8a Compare July 12, 2025 09:55
@leolara
Copy link
Member Author

leolara commented Jul 12, 2025

@potuz is this what you were refering here: #4414

https://discord.com/channels/595666850260713488/598292067260825641/1388206313116270764

Any more ideas of changes that we should do at every fork?

@leolara leolara requested a review from parithosh July 12, 2025 10:03
@leolara leolara marked this pull request as ready for review July 12, 2025 10:04
@leolara leolara removed the request for review from parithosh July 12, 2025 10:09
@jtraglia jtraglia added the testing CI, actions, tests label Jul 15, 2025
@leolara leolara requested a review from jtraglia July 21, 2025 13:13
@jtraglia jtraglia changed the base branch from dev to master July 21, 2025 13:14
Copy link
Member

@jtraglia jtraglia left a comment

Choose a reason for hiding this comment

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

The tests & templating look really good @leolara.

I'm just unsure of the templating tests. I would prefer we delete those.

Copy link
Member

Choose a reason for hiding this comment

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

Hmm yeah I don't know about this file. I get that these were probably useful when developing the test templating, but this isn't something I want to maintain in the future. I wouldn't have time to properly review this either. Tests for the test framework feels a bit unnecessary to me as well. Let's delete this file.

@jtraglia jtraglia changed the title Standard fork tests where validator(s) change at the fork Add tests with validator set changes at forks Jul 21, 2025
@leolara
Copy link
Member Author

leolara commented Jul 25, 2025

@jtraglia Regarding the unit tests of the templating system, STEEL adds unit tests for test infrastructure. Perhaps I have added too many tests, as perhaps AI makes it to easy. So what other people in STEEL suggested is to reduce the number of tests, to a few basic ones and a few corner cases.

@jtraglia
Copy link
Member

@jtraglia Regarding the unit tests of the templating system, STEEL adds unit tests for test infrastructure. Perhaps I have added too many tests, as perhaps AI makes it to easy. So what other people in STEEL suggested is to reduce the number of tests, to a few basic ones and a few corner cases.

Sorry, I still want to delete the file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
testing CI, actions, tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants