Skip to content

tests: functional tests for P2P peer eviction logic #147

@naftalimurgor

Description

@naftalimurgor

Motivation

Summary

  • Bitgesell inherits P2P inbound eviction logic from Bitcoin Core (introduced around 2020).
  • Currently, there is no functional test coverage for this feature in the Bitgesell codebase.
  • Bitcoin Core added a dedicated test in PR [#16756](test: Connection eviction logic tests bitcoin/bitcoin#16756) to simulate and verify eviction behavior.
  • The test ensures:
    • Peers relaying recent blocks or transactions are protected.
    • Peers with low ping are less likely to be evicted.
    • Eviction activates correctly when inbound limit is exceeded.
  • Porting this test to Bitgesell would:
    • Improve test coverage for P2P networking.
    • Help identify future regressions in eviction logic.
    • Contribute toward testing-related bounty opportunities.

Proposed Action:

  • Adapt Bitcoin Core's functional test (test_inbound_evict.py) for Bitgesell.
  • Ensure it runs within Bitgesell’s test framework or create necessary scaffolding if absent.

Possible solution

No response

Useful Skills

  • Compiling Bitcoin Core from source
  • Running the C++ unit tests and the Python functional tests
  • ...

Guidance for new contributors

Want to work on this issue?

For guidance on contributing, please read CONTRIBUTING.md before opening your pull request.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions