-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Write Rollups HTTP Server in Go #106
Comments
@diegonehab @vfusco @mpolitzer, what do you think? |
Sounds good to me. I do have a couple of questions on the details. Given that:
Now to the questions:
|
I see benefits in using the same implementation for the EVM codec. That said, it might be simpler to just use go-ethereum, so we don't need to link to this library when running in dev mode (outside of the Cartesi machine).
We have a few options.
Option 1 would be straightforward, but I think it will lead to lack of code ownership. The maintainer of the code would be one unit, but the maintainer of the repository would be another unit. I don't like much option 2 because these two components will be tightly coupled and should live in the same place. In option 3, the RISC-V binary would be cross compiled and distributed as a Github artifact. We need to think how you would provide the
I also think so.
I have to research that, but I believe so. |
This repo contains an example of linking static and dynamic C libraries with Go. |
We should consider adding HTTP methods that send/receive binary data instead of JSON. For instance, we should have a |
We won't maintain the HTTP server in the rollups-node monorepo. |
📚 Context
The Rollups HTTP server is a Rust program in the machine-emulator-tools repository. This server runs inside the Cartesi Machine allowing the DApp backend to interact with the machine Rollups driver. The server uses the low-level
ioctl
call to interact with the Kernel driver directly.With the output unification, this server needs to be rewritten to use a new C API that abstracts the
ioctl
and the encoding of the Rollups outputs. This new lib is under development by the Machine Unit.I propose that the Node Unit rewrites this Rollups HTTP Server using this new C API in Go. The implementation of the server should be divided into two parts. The first part should be a library that sets up the HTTP endpoints and delegates the internal behavior to a Rollups Controller interface. The second part should be a binary that uses the endpoints library and implements a controller that calls the C API.
Later, the same Rollups HTTP endpoint library will be used by the DevExecutor in the new node architecture.
The text was updated successfully, but these errors were encountered: