Skip to content

proto: split running into create, load and start, pulling modules by digest - #41

Merged
karalabe merged 2 commits into
dark-bio:mainfrom
karalabe:exec-pull
Oct 27, 2026
Merged

karalabe merged 2 commits into
dark-bio:mainfrom
karalabe:exec-pull

Conversation

@karalabe

Copy link
Copy Markdown
Member

This replaces the push upload of an app's module with a pull by digest, and splits running a task into three requests of the host. exec_create names the main module by its SHA-256 digest and returns the task id at once. exec_load answers once the Ark has fetched and checked every module of the task. The Ark asks the host for those modules through its own exec_module_size and exec_module_read requests. exec_start opens the owner's approval and answers once the owner approves.

The three requests take the tags of exec_upload_start, exec_upload_chunk and exec_sched, which are gone, and the module requests take 0x509 and 0x50a. Each message's comment states its contract, such as the 5s expiry between steps, the 30s per module request and the absence of an overall loading deadline. The design follows the apps spec in dark-bio/specs, where an app can use other apps pinned by digest.

The library already routes any request of the Ark as it routes relay_outbound, so no handwritten code changes, and the existing tests cover that routing. The firmware, ark and Ark Hub still speak the old messages and move over in changes of their own, Ark Hub with regenerated TypeScript bindings. The error codes of the new requests belong to the firmware, and the crate stays at 0.17.1 until its release.

karalabe and others added 2 commits October 27, 2026 14:25
…digest

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Astra <noreply@openai.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@karalabe
karalabe merged commit a8adbab into dark-bio:main Oct 27, 2026
12 checks passed
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