Skip to content

Add 'rebroadcasted' flag to confirm_ack message#4621

Merged
pwojcikdev merged 6 commits intonanocurrency:developfrom
pwojcikdev:confirm-message-extensions
May 17, 2024
Merged

Add 'rebroadcasted' flag to confirm_ack message#4621
pwojcikdev merged 6 commits intonanocurrency:developfrom
pwojcikdev:confirm-message-extensions

Conversation

@pwojcikdev
Copy link
Copy Markdown
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
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.

3 participants