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

Refactor node creation in tests #1648

Open
tzdybal opened this issue Apr 26, 2024 · 0 comments
Open

Refactor node creation in tests #1648

tzdybal opened this issue Apr 26, 2024 · 0 comments
Assignees
Labels
T:code-hygiene General cleanup and restructuring of code to provide clarity, flexibility, and modularity. T:testing Related to testing

Comments

@tzdybal
Copy link
Member

tzdybal commented Apr 26, 2024

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: #1641 (comment) and #1641 (comment).

@tzdybal tzdybal added T:testing Related to testing T:code-hygiene General cleanup and restructuring of code to provide clarity, flexibility, and modularity. labels Apr 26, 2024
@tzdybal tzdybal self-assigned this Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T:code-hygiene General cleanup and restructuring of code to provide clarity, flexibility, and modularity. T:testing Related to testing
Projects
Status: No status
Development

No branches or pull requests

1 participant