Skip to content

Conversation

barraguda
Copy link
Contributor

Problem

Our previous app_store implementations didn't have full auto_update functionality.

Solution

When chain:app_store:sys hears of a new valid package, it checks whether the user has enabled auto_update for it (stored in its state), and forwards an AutoUpdateRequest to the downloads process with metadata and package_id.

Downloads (currently) defaults to downloading from the publisher_id, fetches current_version code_hash from metadata. Spawns a download.

Once finished, is forwarded to main process with the new manifest_hash in the context of a DownloadCompleteRequest. main checks if the hash is the same as the currently installed package, then installs.

Notes

chain:app_store:sys doesn't currently Persist anything (with current log sizes, we can afford to fetch anew every boot), but we can change this.

This also means that auto_update info is not persisted either, which can be a slight curveball right now.

@barraguda barraguda merged commit d03bfa2 into develop Aug 20, 2024
@barraguda barraguda deleted the bp/autoupdate branch August 20, 2024 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant