Skip to content

Handle all error cases of downloading and storing persistent states with parts #1028

@SmaGMan

Description

@SmaGMan

Scope

  • Update cold boot logic in cold_boot.rs to persist the metadata file in temporary storage immediately after downloading the main state part, and ensure it is removed when temporary persistent state files are cleaned up.
  • If a temporary persistent state file already exists, compare its size with the size from the FoundState response; if it differs, delete the temporary file and re-download.
  • Before downloading the persistent state file, check for an existing state in DB:
    • If the state exists but its split depth does not match FoundState, return an error.
    • If the state exists and its split depth matches FoundState, reuse parts info from the shard state handle.
  • Download only parts that are not yet stored; check the presence of each part before requesting it.
  • Add context to every error propagation so logs clearly identify where the failure occurred.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-coreCore moduleP-highHigh priorityS-featureSeverity: feature. This is adding a new feature.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions