logos-co / nomos-node

Nomos blockchain node
49 stars 18 forks source link

Simulation: support specifying node to network region in configuration. #235

Open al8n opened 1 year ago

al8n commented 1 year ago

Currently, we have supported config network regions and timeouts in the configuration file, but the problem is that we do not support specifying a node to which region, and now is totally random. So it is hard to see if the timeout behaviors is correct or not.

danielSanchezQ commented 1 year ago

They should be assigned based in some specific distribution. I think everything is calculated here: https://github.com/logos-co/nomos-node/blob/224a3a53f5c164cd5dec147f49177bc8f65a634a/simulations/src/network/regions.rs#L123

al8n commented 1 year ago

They should be assigned based in some specific distribution. I think everything is calculated here: https://github.com/logos-co/nomos-node/blob/224a3a53f5c164cd5dec147f49177bc8f65a634a/simulations/src/network/regions.rs#L123

Yeah, but in the logs we cannot know such node belongs to which region. Then, I think we can assign the region information to the node, and then we can easily see a node belongs to which region from logs and analyze.

danielSanchezQ commented 1 year ago

They should be assigned based in some specific distribution. I think everything is calculated here: https://github.com/logos-co/nomos-node/blob/224a3a53f5c164cd5dec147f49177bc8f65a634a/simulations/src/network/regions.rs#L123

Yeah, but in the logs we cannot know such node belongs to which region. Then, I think we can assign the region information to the node, and then we can easily see a node belongs to which region from logs and analyze.

Yeah. The way to go here IMO would be to log or dump the final distribution (regions map). No need to go too fancy here.