Skip to content

Node ID persistence#3816

Merged
dsiganos merged 3 commits intonanocurrency:developfrom
dsiganos:persistent_node_id
May 12, 2022
Merged

Node ID persistence#3816
dsiganos merged 3 commits intonanocurrency:developfrom
dsiganos:persistent_node_id

Conversation

@dsiganos
Copy link
Copy Markdown
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 requested review from clemahieu, theohax and thsfs May 12, 2022 01:12
@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.
@dsiganos dsiganos force-pushed the persistent_node_id branch from 8ab5bd0 to ab2a3f8 Compare May 12, 2022 03:16
{
// 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
Copy Markdown
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 added 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in 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