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

Add 'rebroadcasted' flag to confirm_ack message #4621

Merged

Conversation

pwojcikdev
Copy link
Contributor

@pwojcikdev pwojcikdev commented May 14, 2024

This adds a new flag to a confirm_ack message that indicates whether a vote was rebroadcasted by the peer. This is not meant to be tamperproof, rather it's a heuristic to avoid confusing rep crawler component when nodes are rebroadcasting votes. Longer term the goal is to provide a foundation for a (potential) future larger-scale integration with vote storage.

Format of confirm_ack message:

/*
 * Binary Format:
 * [message_header] Common message header
 * [variable] Vote
 * - Serialized/deserialized by the `nano::vote` class.
 *
 * Header extensions:
 * - [0xf000] Count (for V1 protocol)
 * - [0x0f00] Block type
 *   - Not used anymore (V25.1+), but still present and set to `not_a_block = 0x1` for backwards compatibility
 * - [0xf000 (high), 0x00f0 (low)] Count V2 masks (for V2 protocol)
 * - [0x0001] Confirm V2 flag
 * - [0x0002] Reserved for V3+ versioning
 * - [0x0004] Rebroadcasted flag
 */

@qwahzi qwahzi added this to the V27 milestone May 14, 2024
@pwojcikdev pwojcikdev merged commit 7662e45 into nanocurrency:develop May 17, 2024
23 of 26 checks passed
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants