Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

P2P: Add additional info to handshake message #977

Closed
heifner opened this issue Oct 26, 2024 · 4 comments
Closed

P2P: Add additional info to handshake message #977

heifner opened this issue Oct 26, 2024 · 4 comments
Assignees
Labels
more-info More information requested from issue reporter

Comments

@heifner
Copy link
Member

heifner commented Oct 26, 2024

The os field of handshake currently contains one of osx, linux, win32, other.

Repurpose this field to include additional information about the peer.
|vt={time_point in seconds} - last vote received time
|ts={trx_in_progress_size kilo-bytes} - can be zero if no speculative trx currently queued for execution
|tt={time_point in seconds} - last trx received time

@enf-ci-bot enf-ci-bot moved this to Todo in Team Backlog Oct 26, 2024
@bhazzard bhazzard added more-info More information requested from issue reporter and removed triage labels Nov 7, 2024
@bhazzard
Copy link

bhazzard commented Nov 7, 2024

@heifner Can you consider how we would want to do this if breaking changes are on the table anyway as a v2.0.0 item or as a network protocol change in v1.1.0?

@heifner
Copy link
Member Author

heifner commented Dec 9, 2024

Current net_plugin protocol version: proto_savanna = 9.
Add new protocol version: proto_handshake_v2 = 10

handshake_message_v2 sent instead of handshake_message when handshake_message::network_version is >= proto_handshake_v2.

struct handshake_message_v2 : handshake_message {
   block_num_type head_num = 0;
   block_id_type head_id;
   block_timestamp_type head_block_time;
   block_timestamp_type fork_head_block_time;
   fc::time_point last_vote_received;
   fc::time_point last_trx_received;
   fc::time_point last_blk_received;
   size_t trx_in_progress_size_bytes = 0;
   bool block_log = true;
   block_num_type start_block = 0;
   block_num_type end_block = 0;
};
  • On first handshake_message received when network_verison > proto_handshake_v2 send back a handshake_message_v2.
  • Do not attempt sync from peer when block_log == false or needed block is < start_block.
  • Add handshake_message_v2 info to connection status response.
  • If configured as a block producer or finalizer, generate error log message if all peers do not have a last_vote_received and Savanna is active.

@heifner heifner added the triage label Dec 9, 2024
@heifner heifner removed their assignment Dec 9, 2024
@bhazzard
Copy link

@heifner can you add information on how each of these fields would be useful?

@bhazzard bhazzard removed the triage label Dec 12, 2024
@heifner heifner self-assigned this Dec 18, 2024
@heifner
Copy link
Member Author

heifner commented Dec 19, 2024

Replaced by #1083

@heifner heifner closed this as completed Dec 19, 2024
@github-project-automation github-project-automation bot moved this from Todo to Done in Team Backlog Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
more-info More information requested from issue reporter
Projects
Status: Done
Development

No branches or pull requests

3 participants