kaspanet / rusty-kaspa

Kaspa full-node and related libraries in the Rust programming language. This is a stable version at the initial rollout phases.
ISC License
359 stars 109 forks source link

Add the time correctness check before starting a node #81

Open Aleoami opened 1 year ago

Aleoami commented 1 year ago

In order to make nodes have as precise a time as possible and to increase the number of honest nodes reporting a correct time in their blocks, either:

Maybe for this purpose implement a time server into the Kaspa DNS servers functionality, to a) decrease the internet time servers load and 2) to increase the chance of having the source of correct time in the case of time servers being firewalled out.

Probably (for a case when there are multiple nodes behind a firewall for redundancy, most of which are only aware of each other, and only 1 of them have the full internet access) also implement a time server functionality into the nodes p2p protocol as a fallback and last resort option.

D-Stacks commented 1 year ago

I think this is centralization, and can probably be exploited by dns nodes (altering of timestamps) to stop participation. I think dns should just be a one-time entry to collect ips for future node start-ups, to query these.

Perhaps a simple warning, to indicate a possible bad clock, might be okay.

KaffinPX commented 1 year ago

Thinking same w jwj