rollmint
rollmint copied to clipboard
Refactor node creation in tests
There are multiple functions to create node instances. Lot of the code is duplicated. We should create single helper (function on struct) for creating nodes.
Configuration / possible inputs:
- context
- ABCI App
- is aggregator
- is full/light
- chain ID
- genesis / consensus params / ABCI params (
VoteExtensionsEnableHeight
in particular) - persistence (
DBPath
in particular) - DA implementation (to enable mocking)
- or DA address & namespace for "default" config
- block manager config
For each possible input there should be a reasonable default value.
Possible outputs:
- Node (duh)
- App (may be needed if it was not provided)
- Keys (p2p key, signing key)
Originally mentioned in: https://github.com/rollkit/rollkit/pull/1641#discussion_r1579991628 and https://github.com/rollkit/rollkit/pull/1641#discussion_r1580038953.
Later mentioned in: https://github.com/rollkit/rollkit/pull/1690#discussion_r1636414334
Related: https://github.com/rollkit/rollkit/issues/1703