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:
-
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
-
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)
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:
Create command
carti composeto execute the compositioncarti compose flash --name my-util bundle1 bundle2 bundle3would produce a local bundlemy-utilwith the contents of the given list of bundlesMuliple calls to
carti machine add ... <label>with the same label to specify composition for a Carti machine configflash) and an error should be thrown if attempting to compose with a non-bundle drivecarti machine installwould 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)