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

Live update applications from network explorer #447

Draft
wants to merge 46 commits into
base: main
Choose a base branch
from

Conversation

raykyri
Copy link
Member

@raykyri raykyri commented Mar 14, 2025

  • Refactored packages/cli/commands/run.ts, moving most of the app initialization code into an AppInstance class.
  • Commented out disabled canvas run options: --metrics, --replay, --memory.
  • Added canvas run --admin option, which allows a user with API access to POST a new snapshot and contract to live-update the running application. Updated the network explorer with basic UI:
image
  • TODO:
    • Enforce that --admin can only be used with --init and an application directory.
    • Overwrite the app stored in the application directory when an app is live updated while archiving past applications.
    • Enforce that --admin takes either an Ethereum key or anyone.
    • Request a SIWE signature from the user to update the application unless the admin is anyone.
    • Don't show the manage contract UI on the frontend if --admin isn't provided.
    • Check the update flow after committing a live-update to the backend.

How has this been tested?

  • CI tests pass
  • Tested with example-chat (including login, all signers, and exchanging messages)
  • Tested with @canvas-js/test-network: (optional)

Does this contain any breaking changes to external interfaces?

  • Contract interfaces
  • Core interface
  • CLI
  • Data storage formats, including IndexedDB, SQLite, or filesystem storage (will this break existing apps?)

@raykyri raykyri requested a review from joeltg March 14, 2025 00:14
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.

2 participants