Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Support importing v2 snapshot even when global_property_object::proposed_schedule is not empty #7715

Closed
arhag opened this issue Aug 1, 2019 · 1 comment
Assignees
Labels

Comments

@arhag
Copy link
Contributor

arhag commented Aug 1, 2019

PR #7404 introduced the WTMSIG_BLOCK_SIGNATURES protocol feature and in doing so required changes to the global_property_object. The intention of the changes in that PR were to still successfully import old serialized global_property_objects in v2 snapshots and upconvert as necessary to store as the new global_property_object in the state database. However, the code path to handle the legacy version in v2 snapshots does not actually exist. The reason it is still possible to import v2 most of the time (and indeed possible in the tests that explicitly test this) is due to the fact that the serialization of global_property_object in the new and old versions are the same if proposed_schedule.producers is the empty vector.

Code to explicitly add support for importing in the old global_property_object from v2 snapshots needs to be added to controller_impl::read_from_snapshot which will upconvert legacy:: producer_schedule_type to producer_authority_schedule (similar to how it is done already for the block_state). Furthermore, a test should be added (or existing one modified) to verify that import of a v2 snapshot is successful if the proposed_schedule.producers is not empty.

@arhag
Copy link
Contributor Author

arhag commented Sep 24, 2019

Resolved by #7717.

@arhag arhag closed this as completed Sep 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants