Skip to content

core: add --track-block-recvd-times option to nervad#43

Merged
sn1f3rt merged 2 commits into
nerva-project:masterfrom
benevanoff:track-block-recvd-times
Mar 20, 2026
Merged

core: add --track-block-recvd-times option to nervad#43
sn1f3rt merged 2 commits into
nerva-project:masterfrom
benevanoff:track-block-recvd-times

Conversation

@benevanoff
Copy link
Copy Markdown
Contributor

One of the questions I am looking to answer while I complete #40 is "how long does it take for a block to propagate across the network?"

This PR adds a new flag, --track-block-recvd-times to the nerva daemon. When the flag is enabled, each time that a block notification is received, we will log the block height, block hash, local timestamp, and notification origin peer IP to a new file.

The new file is a headless CSV of the format block_height,block_hash,peer_ip:peer_port,local_timestamp_block_received

The new file will be stored to $DATA_DIR/blocks_recvd_data.csv

Example:

4139057,<e18bbb18441a3bab1256871db02cc673676750f09a2abe1c70d869e493086afe>,94.155.221.131:17565,1773799090
4139057,<e18bbb18441a3bab1256871db02cc673676750f09a2abe1c70d869e493086afe>,193.77.232.76:17565,1773799090
4139057,<e18bbb18441a3bab1256871db02cc673676750f09a2abe1c70d869e493086afe>,84.229.71.126:17565,1773799090
4139057,<e18bbb18441a3bab1256871db02cc673676750f09a2abe1c70d869e493086afe>,1.158.18.218:17565,1773799091
4139058,<3689d929d156a14d38a99893b7b23c5005d2f36f7d19df5964cd2bfe1e2d94ca>,212.116.78.107:17565,1773799132
4139058,<3689d929d156a14d38a99893b7b23c5005d2f36f7d19df5964cd2bfe1e2d94ca>,94.155.221.131:17565,1773799132
4139058,<3689d929d156a14d38a99893b7b23c5005d2f36f7d19df5964cd2bfe1e2d94ca>,1.158.18.218:17565,1773799132
4139058,<3689d929d156a14d38a99893b7b23c5005d2f36f7d19df5964cd2bfe1e2d94ca>,193.77.232.76:17565,1773799132
4139058,<3689d929d156a14d38a99893b7b23c5005d2f36f7d19df5964cd2bfe1e2d94ca>,84.229.71.126:17565,1773799132
3868655,<8315b4e3b6b3ece94856cc1783ea30c008458f41e969629d001b1483438f4b5f>,62.204.132.5:17565,1773799207
4139059,<9ff5977c1bdb2f9fb14e06c7cd2b5c4304b5385596cd0d52aee4ff3be5152cfd>,212.116.78.107:17565,1773799216
4139059,<9ff5977c1bdb2f9fb14e06c7cd2b5c4304b5385596cd0d52aee4ff3be5152cfd>,94.155.221.131:17565,1773799216
4139059,<9ff5977c1bdb2f9fb14e06c7cd2b5c4304b5385596cd0d52aee4ff3be5152cfd>,84.39.180.67:17565,1773799216
4139059,<9ff5977c1bdb2f9fb14e06c7cd2b5c4304b5385596cd0d52aee4ff3be5152cfd>,193.77.232.76:17565,1773799216
4139059,<9ff5977c1bdb2f9fb14e06c7cd2b5c4304b5385596cd0d52aee4ff3be5152cfd>,184.164.3.189:17565,1773799216
4139059,<9ff5977c1bdb2f9fb14e06c7cd2b5c4304b5385596cd0d52aee4ff3be5152cfd>,84.229.71.126:17565,1773799216

Comment thread src/cryptonote_protocol/cryptonote_protocol_handler.inl
Copy link
Copy Markdown
Member

@sn1f3rt sn1f3rt left a comment

Choose a reason for hiding this comment

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

Bug is fixed, LGTM.

@sn1f3rt
Copy link
Copy Markdown
Member

sn1f3rt commented Mar 19, 2026

@benevanoff Please rebase on master so we can run CI on this.

@benevanoff benevanoff force-pushed the track-block-recvd-times branch from 1cd1748 to a5d2e69 Compare March 19, 2026 14:29
@benevanoff
Copy link
Copy Markdown
Contributor Author

@sn1f3rt Sure, Ive pulled 1091aa4f5b7a15acfaae3edafc13182fcd528707 and f4980618d5f0eba9b5cad934e3b3ecf116ffea4d into my branch.

@sn1f3rt
Copy link
Copy Markdown
Member

sn1f3rt commented Mar 19, 2026

Approved CI run

@sn1f3rt sn1f3rt merged commit 22a10ce into nerva-project:master Mar 20, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants