Skip to content

Input reader for the Cartesi Rollups Node that fetches data from an Espresso Network

License

Notifications You must be signed in to change notification settings

cartesi/rollups-espresso-reader

Repository files navigation

Cartesi Rollups Espresso Reader

Input reader implementation for the Cartesi Rollups Node that follows an Espresso Network to fetch input data.

Introduction

Espresso Systems provides a decentralized sequencer and data availability system, which can be very useful to scale layer-2 rollup solutions. Cartesi provides an app-specific rollups solution which could particularly benefit from both.

The Cartesi Rollups Node is the component responsible for fetching inputs for Cartesi applications and processing them. The Node supports a configuration to turn off its input reading functionality, allowing an alternative input reader implementation to be used instead.

In this context, this repository contains an input reader implementation that pulls data from an Espresso Network while retaining the ability to fetch inputs from the Cartesi Rollups InputBox contract on the base layer (as they usually do). As such, applications can take advantage of Espresso's higher throughput and lower fees and latency, while still being able to interact with the base layer (e.g., to manage L1 assets).

Architecture

Check the architecture page for more details about how the integration of Espresso with Cartesi Rollups works.

App Development

Check the development page for details about how to develop Cartesi applications using Espresso.

Building and Running

To build:

go build

To run, first you need to run the appropriate version of the Cartesi Rollups Node from its repository:

cd <path-to-cartesi-rollups-node>
make run-postgres && make migrate
./cartesi-rollups-node

Then, run the Espresso Reader to read inputs from Espresso and write them to the Node's database (make sure to have configured the Node with an appropriate application, such as the echo-dapp):

eval $(make env)
make migrate
./rollups-espresso-reader

Alternatively, to run automated integration tests:

go test github.com/cartesi/rollups-espresso-reader/internal/espressoreader -v

About

Input reader for the Cartesi Rollups Node that fetches data from an Espresso Network

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •