ethereum / ethereum/async-service
Type hints do not prevent external access to internal manager
- Dominant language
- Python
- Stars
- 10
- Forks
- 11
- PR merge metrics
- No merged PRs in 30d
Description
### What is wrong
The type hints on `Service` were supposed to disallow external service consumers to call `service.manager` and hence prevent access to task scheduling functionality.
Instead external parties should be forced to gain access via `service.get_manager()` which does not expose task scheduling functionality.
Further described here:
https://github.com/ethereum/async-service/blob/850a927f4bfe0f12806f9dcc76cc24f0b8ee3a36/async_service/base.py#L36-L45
It doesn't seem to be working as demonstrated here: https://github.com/ethereum/trinity/pull/1792/files#r442016399
###
Haven't looked into it yet.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with async_service/base.py lines 36-45 and compare the typing behavior described in the linked Trinity pull request. Trace how Service exposes manager and how external consumers are type-checked. Done means external consumers cannot use service.manager for task scheduling, while service.get_manager() remains the supported access path.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100