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

rollup id with every api or a new config api to pass rollup id #10

Open
gupadhyaya opened this issue Sep 27, 2024 · 1 comment
Open
Labels
enhancement New feature or request

Comments

@gupadhyaya
Copy link
Member

Currently only SubmitRollupTx api is passed with rollup id and other apis such as GetNextBatch and VerifyBatch are not passed with rollup id. The implementation of the sequencing api is expected to maintain a state (rollup id) to serve the subsequent api calls GetNextBatch and VerifyBatch. There are two alternative designs:

  1. rollup id is passed with every sequencing api (similar to how namespace is passed with every go-da api)
  2. introduce a new config api to pass rollup id
@gupadhyaya
Copy link
Member Author

Given the typical use cases for a sequencer, passing the RollupId in every API call is generally the better choice for flexibility, simplicity, and statelessness. It makes the API more versatile and easier to use in various scenarios, including those where multiple rollups are involved. It also adheres to the principle of explicitness, where the caller has full control over the context in which each operation occurs.

However, if the sequencer is specifically designed to work with only one rollup and the RollupId is unlikely to change, managing it within the implementation’s state can reduce boilerplate and make the API easier to use. In such cases, you might provide a method to set or change the RollupId if needed, while keeping the interface simpler.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: No status
Development

No branches or pull requests

2 participants