NodeStart
One start of one node in a MultiNodeRaftSim: everything a nodeFactory needs to build the RaftNode for it. The sim makes one at construction for each node, and another on every MultiNodeRaftSim.restart.
The point of the type is random. A restart is a new process, so it needs a new seed, and the sim, not the factory, picks it. A factory that seeds RaftConfig.random from random cannot bring a restarted us.tractat.kuilt.raft.ClientIdentity.Auto node back under its old client id, because it never chooses a seed at all (#3425, #3659):
MultiNodeRaftSim(nodeIds = ids, scope = this, nodeScope = backgroundScope) { start ->
start.scope.raftNode(cluster, start.transport, start.storage, baseConfig.copy(random = start.random))
}Only the sim makes one, so its constructor is internal.
Properties
A fresh Random seeded for this start of this node: the same seed the sim's default factory gives it, a pure function of the sim's baseSeed, the node's index in MultiNodeRaftSim.nodeIds and start. A node built from it draws exactly what a default-factory node would. It is a new instance on every start; anything else a factory draws from it moves the draws the node sees after.
This start's own scope, a child of the sim's node scope. MultiNodeRaftSim.crash cancels it.
The node's durable storage, the same MultiNodeRaftSim.storages entry on every start, so a restart boots from what the last incarnation wrote.
The node's transport on MultiNodeRaftSim.network.