Minimalist integration Cartesi Rollups & Espresso Sequencer

Hello @gets !

So, to use sequencing + DA with our current architecture requires more changes to how things are done right now. At the moment, Cartesi applications do not use any external sequencers: client inputs are always sent directly to L1. So the sequencing itself happens there: each application has an input box, and each app-specific Cartesi Node reads inputs from there.

With this scenario, I think that using the Espresso sequencer (which is what we want!) will require us to do some extra work, such as the following:

  1. Instead of the standard procedure of submitting data to L1 (e.g. via Metamask), clients will need to sign data themselves and send that to Espresso
  2. The Cartesi Node (or application code) would need to perform some extra work to parse the signed data and extract metadata such as msg_sender (this is currently given “for free” when reading from an Ethereum-compatible blockchain)
  3. The Cartesi Node would need to be changed to read data both from Espresso and from the L1 InputBox. If I’m not mistaken, for each Ethereum block it should read first the Espresso inputs related to the commitment on HotShot, and then any L1 inputs it may have in its input box. I believe L1 inputs are necessary so that things like asset deposits are still possible.

Given the above, I wanted to start experimenting with simply having clients send data to Espresso, and then add the appropriate Espresso block hash as an input to the application. The Cartesi Node then reads the inputs normally, as they already do today. The only difference is that, for inputs that correspond to Espresso block hashes, the application code uses a special procedure to request a “dehashing” of that info, retrieving the corresponding block data. If done right, this process will still allow on-chain dispute resolution for the application. More details can be found here: rollups-espresso/README.md at main · miltonjonat/rollups-espresso · GitHub

But rest assured: this is not what we want! We will strive for the changes above to make it all happen :slight_smile:

1 Like