Skip to content
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

Commands for Cartesi Coprocessor #156

Open
endersonmaia opened this issue Feb 17, 2025 · 2 comments
Open

Commands for Cartesi Coprocessor #156

endersonmaia opened this issue Feb 17, 2025 · 2 comments
Assignees
Labels

Comments

@endersonmaia
Copy link
Contributor

endersonmaia commented Feb 17, 2025

We should provide an unified experience for Cartesi Rollups and Cartesi Coprocessor using the Cartesi CLI.

We can have a rollups command with a set of subcommands, and a coprocessor command with another set of subcommands.

The entire set of commands and subcommands would look like the following:

cartesi doctor
cartesi create
cartesi build
cartesi clean
cartesi hash

cartesi rollups address-book
cartesi rollups create -> cartesi create
cartesi rollups start
cartesi rollups deploy
cartesi rollups stop
cartesi rollups status
cartesi rollups send

cartesi coprocessor address-book
cartesi coprocessor create -> cartesi create
cartesi coprocessor start
cartesi coprocessor deploy
cartesi coprocessor stop
cartesi coprocessor status
cartesi coprocessor send

doctor

Can work the same as it does now.

create

Can have two params:

  • framework: [rollups | coprocessor]
  • language: cpp, python, javascript, etc

It can also be more interactive, asking questions if no params are specified.
The template can also have a cartesi.toml file that has the framework information, which can help with following commands in the dev workflow.

build

Can work the same way with both frameworks if we follow the Dockerfile strategy. But maybe coprocessor has some extra steps.

clean

Can work the same as it does now.

hash

Can work the same as it does now.

rollups address-book

Prints smart contracts addresses that support Cartesi Rollups.

rollups create -> cartesi create

Create a Cartesi Rollups project. Can be an alias for cartesi create --framework rollups.

rollups start

Start a Cartesi Rollups local environment.

rollups deploy

Deploy the application to the Cartesi Rollups node.

rollups stop

Stop the Cartesi Rollups local environment.

rollups status

Check the status of the Cartesi Rollups local environment, including the deployed applications.

rollups send

Sends an input to the Cartesi Rollups application.

coprocessor address-book

Prints smart contracts addresses that support Cartesi Coprocessor.

coprocessor create -> cartesi create

Create a Cartesi Coprocessor project. Can be an alias for cartesi create --framework coprocessor.

coprocessor start

Start a Cartesi Coprocessor local environment.

coprocessor deploy

Deploy the application to the Cartesi Coprocessor node.

coprocessor stop

Stop the Cartesi Coprocessor local environment.

coprocessor status

Check the status of the Cartesi Coprocessor local environment, including the deployed applications.

coprocessor send

Sends a task to the Cartesi Coprocessor.

@endersonmaia endersonmaia marked this as a duplicate of #158 Feb 18, 2025
@endersonmaia endersonmaia changed the title Add support to cartesi coprocessor Add support to cartesi coprocessor and rollups modes Feb 18, 2025
@tuler tuler changed the title Add support to cartesi coprocessor and rollups modes Commands for Cartesi Coprocessor Feb 24, 2025
@endersonmaia endersonmaia self-assigned this Mar 10, 2025
@endersonmaia
Copy link
Contributor Author

@tuler should we support BOTH cartesi [rollups|coprocessor] <subcommand> AND cartesi --framework=[rollups|coprocessor] <command> ? Or should we stick with onde of them?

This also impacts the config file:

cartesi.toml

framework = [rollups|coprocessor]

@tuler
Copy link
Member

tuler commented Mar 11, 2025

I think we can support both, with framework=rollups being the default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants