We may already have a test case for this, but we should verify and write one if we don't.
This issue is coming from a bug on mekong where three clients incorrectly handled the following scenario:
Two deposits to the same validator in an epoch (the mekong setting had a deposit in one block and then another two blocks later to the same validator). The first deposit was fresh (aka the validator was not on-chain beforehand), and the second would be considered a "top-up".
During epoch processing, we had two separate issues:
- The two deposits were treated as one (e.g. for two deposits of 32 ETH, the resulting state only had one validator of 32 ETH, instead of 64 ETH).
- The same validator was added to the state's registry twice, one for each deposit (rather than one validator with the balance summing the amount in each deposit).
We may already have a test case for this, but we should verify and write one if we don't.
This issue is coming from a bug on
mekongwhere three clients incorrectly handled the following scenario:Two deposits to the same validator in an epoch (the
mekongsetting had a deposit in one block and then another two blocks later to the same validator). The first deposit was fresh (aka the validator was not on-chain beforehand), and the second would be considered a "top-up".During epoch processing, we had two separate issues: