ObolNetwork / ObolNetwork/charon
Refactor ssz.go hashDefinitionVxyz
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 222
- Forks
- 138
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 35
Description
🎯 Problem to be solved
To reduce code duplication and to simplify introducing new cluster definition versions, the hashing functions need to be entirely refactored using modern Golang practices.
🛠️ Proposed solution
- Check the existing code duplication among
hashDefinitionVxyz()functions. - Design and refactor a better pattern that would simplify future new fields of cluster
Definitionobject.
🧪 Tests
The existing test coverage is already great, so rely on the existing unit tests. Also, add more in case of drastic implementation changes.
- Tested by new automated unit/integration/smoke tests
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in ssz.go by comparing the existing hashDefinitionVxyz() functions and reviewing the current unit-test coverage. Refactor the hashing pattern to reduce duplication and make new Definition fields or cluster versions easier to add, while keeping the existing tests passing and adding coverage for any substantially changed behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- distributed-systems
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100