Skip to content

Support for drive composition #39

Description

@miltonjonat

As described in the Cartesi documentation, there is a limit of 8 drives in a Cartesi Machine, which in practice limits the number of 3rd-party bundles a user can use when creating his machine.

It is however possible to offer a solution for people to compose bundles, so as to "squash" their contents into a single drive. The idea would be to simply copy the contents of a number of assets into a single drive. Furthermore, if this composition is executed by a Cartesi Machine itself, then it will be deterministic and thus guaranteed to result in the same exact final content. As such, a Carti machine configuration could contain the specification of a drive composition, and then any user could use that configuration to build the same final machine (i.e., with the same template hash)

Composing drives using a Cartesi Machine would obviously only work in environments where the machine-emulator is installed. At first, the Cartesi team is only targeting official support for packaging it for Ubuntu 20.04.

The idea would thus be the following:

  1. Create command carti compose to execute the composition

    • Example: carti compose flash --name my-util bundle1 bundle2 bundle3 would produce a local bundle my-util with the contents of the given list of bundles
  2. Muliple calls to carti machine add ... <label> with the same label to specify composition for a Carti machine config

    • Carti would check that the composing bundles do not conflict: they should be of the same "type" (e.g., flash) and an error should be thrown if attempting to compose with a non-bundle drive
    • carti machine install would install base bundles, compose them and produce the final Lua config (it would throw an error if it needs to compose bundles and the machine-emulator is not available)

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions