Skip to content

Conversation

Sjors
Copy link
Member

@Sjors Sjors commented Jun 27, 2024

No description provided.

Sjors and others added 13 commits June 27, 2024 16:17
This commit introduces libbitcoin_net. A single header connection_types.h and its implementation are moved there to ensure all scaffolding is in place.
The typedef int64_t NodeId is used in several places which generally have no need for anything else in net.h.

Specifically the introduction of net/util.h prevents a circular dependency in the next commit.
Moving MAX_PROTOCOL_MESSAGE_LENGTH out of net.h is needed to prevent a circular dependency in the upcoming commit that moves Transport to Net.
This commit also adds seperate header and implementation files
for TransportV1 and TransportV2.
This removes the Transport dependency on chainparams.h (libbitcoin_common).
libbitcoin_wallet has no dependency on libbitcoin_net.

Drop the unused include so the next commit can move
protocol.h to libbitcoin_net without adding such a
dependency.
GenerateRandomKey() is used by V2Transport to generate the ephemeral keys used in the handshake.
The ci "test-each-commit" job fetches the PR branch being tested with a depth of (# of commits in PR + 2), and then tries to run tests on commits after the most recent merge commit.

When a PR is opened against a bitcoin core branch, a merge commit is always guaranteed to exist within the fetch depth, because bitcoin core branches always point at merge commits.

However, in fork repositories, pull requests can be opened based on other branches that don't contain recent merge commits, and this will currently cause git rev-list to fail with fatal: bad revision '^^@'.

Work around this problem by not requiring a recent merge commit, and just testing on all fetched commits if a merge commit can't be found.

Co-authored-by: Ryan Ofsky <ryan@ofsky.org>
@DrahtBot
Copy link
Contributor

DrahtBot commented Jun 27, 2024

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Code Coverage

For detailed information about the code coverage, see the test coverage report.

Reviews

See the guideline for information on the review process.
A summary of reviews will appear here.

@Sjors Sjors closed this Jun 27, 2024
@Sjors
Copy link
Member Author

Sjors commented Jun 27, 2024

Sorry, was trying to open this against my own fork.

@bitcoin bitcoin locked and limited conversation to collaborators Jun 27, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants