dao-xyz / peerbit

P2P database framework with encryption, sharding and search
https://peerbit.org
Apache License 2.0
194 stars 15 forks source link

`getDefaultMinRoleAge`: Make it adaptive the amount of data that exist #263

Open marcus-pousette opened 10 months ago

marcus-pousette commented 10 months ago

If a new peers join in a network with large amount of nodes and data, it would be preferable that this node is not seen as mature until a greater time has passed, than if two nodes are alone in a network with little or no data.

Currently the min role age is (only) set to be adaptive, in propoportional with the logarithm of amount of participating nodes

marcus-pousette commented 10 months ago

Somehow it makes sense that peers sends us a "ok" before when can assume we are mature ourselves. By connecting to 1000 peers and not receiving any communication will not help use determining anything