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

[spec test]: process_epoch testing #4025

Open
mkalinin opened this issue Nov 27, 2024 · 0 comments
Open

[spec test]: process_epoch testing #4025

mkalinin opened this issue Nov 27, 2024 · 0 comments

Comments

@mkalinin
Copy link
Contributor

Problem

Client implementations use caches to optimise epoch processing, the cache management can be broken when new functions are introduced into the process_epoch flow or clients code undergo a refactor. It potentially leads to bugs that are difficult to reveal. One of such examples is #4021.

Existing spec tests cover each epoch processing function in an isolation, this approach misses a class of bugs which can appear when modifications to the beacon state made by one epoch processing function are used by a function down the line. For example, a new validator created during pending deposit processing may not be added to the client’s cache and not handled by effective balance updates as a result.

Potential solution

Create spec tests that covers such scenarios using approach similar to #4024. For instance, if validator’s balance is sufficiently increased/decreased then check that the effective_balance of that validator is updated during the same run of process_epoch.

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

No branches or pull requests

1 participant