ObolNetwork / ObolNetwork/charon

Refactor ssz.go hashDefinitionVxyz

Open
#3,319 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement protocol refactor
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 Definition object.

🧪 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.