Cartesi Machine Generic I/O (previously "Dehashing Device: a tool to enable access to base layer state, external sequencers, DA, and more")

I would like to make a distinction between two designs that get often called “dehashing device”, but actually differ in complexity. Note that the two proposals involve the same thing at the machine level: a new device that turns hashes into their originating data. But the difference appears on how this device is used in practice.

Input device - With this change, the device will be used to change the input box, allowing for several improvements on which data can be fed to the Cartesi Machine. Instead of having a dedicated Input Box, the DApp can chose all its sources of inputs and each of these would need to implement the so-called turnstile requirements in order to be disputed in arbitrations. Features that are unlocked by the Input Device are: alternative DA’s, Sequencer, one dapp reading inputs from another dapp. But notably, it is not possible to retrieve arbitrary data from the base layer.

Full Dehashing Device - In this solution, the device is used to expand the latest ethereum block in order to obtain the contents of the block as well as of past blocks. Like Optimism does in Bedrock. This has the advantage of unlocking all the features we want: alternative DA’s, Sequencer, shared inputs and base layer retrieval. However, this comes at the cost of more complexity. We would need to create two services: one at the node level that feeds a database with inverse hashes and another inside the Cartesi Nachine that uses the device to expand Ethereum blocks and read events/storage from them. It is very likely that these two processes could be re-used from Optimism’s minigeth, which is known to have these capabilities.

Anyway, it would be good to have some clarity on which direction is being considered and further discuss the pros and cons of each.

1 Like