Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Node ID persistence #3816

Merged
merged 3 commits into from
May 12, 2022
Merged

Conversation

dsiganos
Copy link
Contributor

After this change, node IDs will persist on the disk file system and
reused. The node ID will not be changing after every restart.
This will help to more reliably track PRs.

The node can be forced to generate a new ID by deleting the file:
node_id_private.key

Note that this change does not prevent the man in the middle attack.

However, it makes it possible to detect telemetry spoofing. Sites like
nanolooker and nanoticker can maintain associations between node ID and PR
and only accept a telemetry packet, if the telemetry message is signed
by the known Node ID.

@dsiganos dsiganos added the functionality quality improvements This item indicates the need for or supplies a better way to implement existing functionality label May 12, 2022
@dsiganos dsiganos force-pushed the persistent_node_id branch 2 times, most recently from 2d49744 to 8ab5bd0 Compare May 12, 2022 02:53
After this change, node IDs will persist on the disk file system and
reused. The node ID will not be changing after every restart.
This will help to more reliably track PRs.

The node can be forced to generate a new ID by deleting the file:
node_id_private.key

Note that this change does not prevent the man in the middle attack.

However, it makes it possible to detect telemetry spoofing. Sites like
nanolooker and nanoticker can maintain associations between node ID and PR
and only accept a telemetry packet, if the telemetry message is signed
by the known Node ID.
{
// no node_id found, generate new one
logger.always_log (boost::str (boost::format ("%1% does not exist, creating a new node_id") % node_private_key_path.string ()));
nano::keypair kp = nano::keypair ();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be just nano::keypair kp;

clemahieu
clemahieu previously approved these changes May 12, 2022
@dsiganos dsiganos merged commit 53154c0 into nanocurrency:develop May 12, 2022
@dsiganos dsiganos deleted the persistent_node_id branch May 12, 2022 21:01
clemahieu pushed a commit to clemahieu/nano-node that referenced this pull request May 19, 2022
* Node ID persistence

After this change, node IDs will persist on the disk file system and
reused. The node ID will not be changing after every restart.
This will help to more reliably track PRs.

The node can be forced to generate a new ID by deleting the file:
node_id_private.key

Note that this change does not prevent the man in the middle attack.

However, it makes it possible to detect telemetry spoofing. Sites like
nanolooker and nanoticker can maintain associations between node ID and PR
and only accept a telemetry packet, if the telemetry message is signed
by the known Node ID.

Co-authored-by: clemahieu <clemahieu@gmail.com>
# Conflicts:
#	nano/core_test/node.cpp
@zhyatt zhyatt added this to the V23.1 milestone May 19, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
functionality quality improvements This item indicates the need for or supplies a better way to implement existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants