Open gupadhyaya opened 1 month ago
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.
Currently only
SubmitRollupTx
api is passed with rollup id and other apis such asGetNextBatch
andVerifyBatch
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 callsGetNextBatch
andVerifyBatch
. 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