hiero-ledger / hiero-ledger/hiero-consensus-node

Improve the API for configuring roster properties of a node

Open
#21,709 0 comments 0 reactions 0 assignees View on GitHub
Otter
Dominant language
Java
Stars
406
Forks
226
Avg merge
3d 4h
Merged PRs (30d)
210

Description

The test writer should be able to specify all properties of a node's roster entry in a fluent style, like this:

```
network.addNode()
.id(1)
.weight(1)
.keyAndCert(...)
.gossipIP(...)
.gossipPort(...);
```
Such an API will eliminate the need for the `OtterSpecs(randomNodeIds = true/false)` attribute.

These fields should also come with the ability to set a generator:

- Node ID (consecutive IDs, or non-consecutive randomized (default))
- Weight (default generator or custom generator)
- Keys and Certs (random keys and certs (default?), or deterministic by node id)

Contributor guide

Open the contributing guide

Research direction

Start by locating the test-network entry point for network.addNode() and the OtterSpecs randomNodeIds setting, then trace how roster properties and their generators are currently configured. Done means a fluent API covers node IDs, weights, keys and certificates, gossip IPs and ports, including the listed generator choices, without requiring the OtterSpecs attribute.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
distributed-systems, testing
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.