cartesi / rollups

Cartesi Rollups
30 stars 12 forks source link

Change on-chain directory structure #121

Closed xdaniortega closed 1 year ago

xdaniortega commented 1 year ago

📚 Context

With current and upcoming changes to contracts and project structure, it can be helpful to prepare the repository for future changes and organize it to be as modular as possible.

Current directory structure follows the next path inside rollups/onchain :

This proposed change will prevent finding a new repository that only holds Cartesi contracts under the structure rollups/onchain/rollups and could also be used as an example for other Cartesi repositories.

✔️ Solution

1. Have a separate on-chain repository f.e. cartesi-contracts with all the content inside rollups/onchain/rollups. We could also follow this naming convention for cartesi-node, cartesi-examples, cartesi-nxn-arbitration.

This change will make easier the modification and modularity of the existing project. Cartesi repository naming will be aligned with state-of-the-art projects as 0xPolygonHermez, OpenZeppelin.

FYI @tuler

guidanoli commented 1 year ago

It seems that cli may also be discontinued and merged into another folder

@tuler and I were planning to discontinue Rollups CLI altogether in favor of using cast or any other tool alike that allows you to call Solidity contract functions. However, we haven't decided on the release in which this change will take place.

guidanoli commented 1 year ago

Have a separate on-chain repository f.e. cartesi-contracts with all the content inside rollups/onchain/rollups. We could also follow this naming convention for cartesi-node, cartesi-examples, cartesi-nxn-arbitration.

I think cartesi-node makes sense, but cartesi-contracts is too broad. We have other contracts that are not related to the Cartesi Rollups project, such as the PoS and the token contract. So, I would prefer to rather call this new repository rollups-contracts.

guidanoli commented 1 year ago

FYI @GCdePaula IIRC you envision to move the NxN code to another repository but not in the near future, right?

xdaniortega commented 1 year ago

Have a separate on-chain repository f.e. cartesi-contracts with all the content inside rollups/onchain/rollups. We could also follow this naming convention for cartesi-node, cartesi-examples, cartesi-nxn-arbitration.

I think cartesi-node makes sense, but cartesi-contracts is too broad. We have other contracts that are not related to the Cartesi Rollups project, such as the PoS and the token contract. So, I would prefer to rather call this new repository rollups-contracts.

I agree that it may be too broad. Something different can fit, but it should have cartesi-XXX as name. Just to follow the other projects.

guidanoli commented 1 year ago

but it should have cartesi-XXX as name

I don't see the need to add cartesi- as a prefix to the repository names, given that the organization name cartesi/ is already oftentimes included. If we are trying to cut down on redundancy, we should strive to use more concise names. I would go as far as suggesting naming the repository for the off-chain code as simply node. Of course, the full repository name, which includes the organization name, would be cartesi/node.

tuler commented 1 year ago

We currently have two products, rollups and compute. So probably should be rollups-node

xdaniortega commented 1 year ago

Are we leaving this issue for next releases? @pedroargento @tuler

tuler commented 1 year ago

I guess so. There was a discussion of splitting the rollups repo into offchain and onchain. cc @gligneul

gligneul commented 1 year ago

I already created another repo for the rollups node (https://github.com/cartesi/rollups-node). We plan to migrate our code there for the 1.1 release. The 1.0 release will be done in the rollups repo.

guidanoli commented 1 year ago

Likewise, I think we should create a repo for the on-chain part. Shall we call it rollups-contracts then?

xdaniortega commented 1 year ago

Changes have been introduced, resulting in a split of repositories between cartesi/rollups-node, cartesi/rollups-contracts and cartesi/rollups-examples.

Future improvements of folders structures will be presented as an issue inside each repo.