BitgesellOfficial / BitgesellOfficial/bitgesell
tests: functional tests for P2P peer eviction logic
- Dominant language
- C++
- Stars
- 29
- Forks
- 75
- PR merge metrics
- No merged PRs in 30d
Description
### 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](https://github.com/bitcoin/bitcoin/pull/16756)](https://github.com/bitcoin/bitcoin/pull/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](https://github.com/bitcoin/bitcoin/blob/master/CONTRIBUTING.md) before opening your pull request.
Contributor guide
Research direction
Start by comparing Bitcoin Core's test_inbound_evict.py with Bitgesell's functional test framework and determine what scaffolding is missing. Port the test so it exercises inbound eviction when the peer limit is exceeded, including protection for peers relaying recent blocks or transactions and peers with low ping. Done means the functional test runs successfully in Bitgesell's test framework.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, python
- Domain
- networking, testing-qa
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100