Summary
This PR will add and/or track sanity checks which need to be present to reduce probability of user errors as much as possible. These checks are not strictly necessary in terms of security because the EL request system contracts take care of the business logic already. However, system contracts can only check on EVM level which means a transaction was already sent. The result of a incorrect transaction is that the sender pays gas but the result is none. If using the cli tool for multiple validators at once this could lead to substantial burn of ETH due to transaction costs.
This list might grow over time.
UX improvements
- display the executed sanity checks using a spinner framework like
ora (with types @types/ora)
Sanity checks
Sanity checks will be implemented based on the request result simulation done by @pk910: ethpandaops/dora#236 . I'm not sure on all of these yet and whether they can be done before sending an EL request but most of them are feasible.
These results are unclear yet:
Source validator is not old enough
- This is variable on different networks -> Can it be fetched via the beacon API
- But can be hardcoded for mainnet and public testnets
Source validator has pending partial withdrawal
Beside the aforementioned checks some general ones will be implemented as well:
Checks based on simulation results
Consolidation
Switch withdrawal credentials
Partial withdrawal
Exit
Summary
This PR will add and/or track sanity checks which need to be present to reduce probability of user errors as much as possible. These checks are not strictly necessary in terms of security because the EL request system contracts take care of the business logic already. However, system contracts can only check on EVM level which means a transaction was already sent. The result of a incorrect transaction is that the sender pays gas but the result is none. If using the cli tool for multiple validators at once this could lead to substantial burn of ETH due to transaction costs.
This list might grow over time.
UX improvements
ora(with types@types/ora)Sanity checks
Sanity checks will be implemented based on the request result simulation done by @pk910: ethpandaops/dora#236 . I'm not sure on all of these yet and whether they can be done before sending an EL request but most of them are feasible.
These results are unclear yet:
Source validator is not old enoughSource validator has pending partial withdrawalBeside the aforementioned checks some general ones will be implemented as well:
Checks based on simulation results
Consolidation
Switch withdrawal credentials
Partial withdrawal
Exit