bead_sync protocol by ABD-AZE · Pull Request #214 · braidpool/braidpool · GitHub
Skip to content

bead_sync protocol#214

Merged
mcelrath merged 1 commit into
devfrom
req_res
Jun 20, 2025
Merged

bead_sync protocol#214
mcelrath merged 1 commit into
devfrom
req_res

Conversation

@ABD-AZE

@ABD-AZE ABD-AZE commented Jun 18, 2025

Copy link
Copy Markdown

Request response functionality for the purpose of IBD(inital beed download) along with that additionally for P2P queries .

@ABD-AZE ABD-AZE requested review from a team, Copilot and mcelrath June 18, 2025 19:43

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull Request Overview

This PR implements the bead_sync protocol to support bead retrieval and synchronization between nodes. Key changes include:

  • Exposing additional types in test_utils for broader usage.
  • Adding bead_sync event handling in the main event loop.
  • Integrating a new request‐response protocol for bead, tips, and genesis data in both the behaviour and bead modules.

Reviewed Changes

Copilot reviewed 8 out of 9 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
node/src/utils/test_utils.rs Changed internal imports to public re-exports for broader usage.
node/src/main.rs Added bead_sync protocol event handling in the main loop.
node/src/lib.rs Exposed the new behaviour module.
node/src/behaviour/{mod.rs,tests.rs} Added API functions for bead_sync request/response handling.
node/src/bead/{mod.rs,tests.rs} Implemented bead request/response serialization and codec logic; added tests.
node/Cargo.toml Updated dependencies and enabled request-response support for libp2p.
Comments suppressed due to low confidence (1)

node/src/bead/tests.rs:181

  • P2P_Address and ServiceFlags are used without being imported. Add the necessary import statements (e.g., 'use bitcoin::p2p::address::Address as P2P_Address;' and 'use bitcoin::p2p::ServiceFlags;') to avoid compilation errors.
    let _address = P2P_Address::new(&test_sock_add.clone(), ServiceFlags::NONE);

Comment thread node/src/main.rs Outdated
Comment thread node/src/bead/mod.rs
Comment thread node/src/behaviour/tests.rs Outdated

@Sansh2356 Sansh2356 left a comment

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.

LGTM .

@mcelrath mcelrath left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This looks very good, merging.

We need to prioritize performing a functional test with actual bead data as soon as we are able.

@mcelrath mcelrath merged commit 6b29eb2 into dev Jun 20, 2025
11 checks passed
@mcelrath mcelrath deleted the req_res branch June 20, 2025 14:19
@Sansh2356 Sansh2356 mentioned this pull request Jun 22, 2025
37 tasks
mcelrath pushed a commit to mcelrath/braidpool that referenced this pull request Nov 18, 2025
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.

4 participants