Skip to content

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

@0xJohnnyGault

Description

@0xJohnnyGault

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    Status

    Backlog 🧊

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions