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

Retain ValidationPeriod in the ValidationManager until the validation is complete. #701

Open
0xJohnnyGault opened this issue Jan 12, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@0xJohnnyGault
Copy link

Currently, the _pendingRegisterValidationMessages mapping stores ValidationID to ValidationPeriod, and is then deleted in completeValidatorRegistration().

The problem arises when you want to end the validation. You need to call _completeEndValidation() with a signed Warp message from the P-Chain, which must contain a justification, which is the bytes of the ValidationPeriod.

Unless you kept those bytes around somewhere off-chain, use an indexer, or loop through every block (!) https://github.com/ava-labs/avalanche-cli/blob/5c0c29f660ceb19b3f332b2f148f82f65e4fd542/pkg/validatormanager/registration.go#L540 you don't have those bytes available.

It seems like keeping them around in the contract and not deleting until _completeEndValidation() would make things a lot easier.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Backlog 🗄️
Development

No branches or pull requests

1 participant