Skip to content

feat(dot/network): introduce translation shim type for Network and Syncing interfaces (#4798)#4847

Open
Aliexe-code wants to merge 2 commits intoChainSafe:developmentfrom
Aliexe-code:feat/translation-shim-4798
Open

feat(dot/network): introduce translation shim type for Network and Syncing interfaces (#4798)#4847
Aliexe-code wants to merge 2 commits intoChainSafe:developmentfrom
Aliexe-code:feat/translation-shim-4798

Conversation

@Aliexe-code
Copy link

Changes

  • Introduce translation shim type in dot/network/shim package
  • Implement gossip.Network interface with 19 methods (TranslationShim type)
  • Implement gossip.Syncing[common.Hash, uint] interface with 4 methods (syncShim type)
  • Place in separate package to avoid circular dependencies between internal/client/network and dot/network
  • All methods panic as this is a foundational implementation
  • Add comprehensive test suite with 25 test cases

Tests
go test ./dot/network/shim/... -v

Issues
#4798

…ncing interfaces

Add foundation implementation of translation shim that implements both
gossip.Network and gossip.Syncing interfaces. This shim serves as a bridge
between the new interface definitions and the existing Gossamer network
implementation.

The shim is placed in a separate package (dot/network/shim) to avoid circular
dependencies between internal/client/network and dot/network packages.

Both TranslationShim and syncShim types are provided:
- TranslationShim implements gossip.Network with 19 methods
- syncShim implements gossip.Syncing[common.Hash, uint] with 4 methods
- All methods currently panic as this is a foundational implementation
- Future PRs will replace panic implementations with actual translations

This implementation addresses issue ChainSafe#4798 and provides the foundation for
subsequent network layer refactoring work.

Acceptance criteria met:
- Implements Network interface
- Implements Syncing interface
- All methods panic as required for foundation implementation
- 100% test coverage with 26 test cases
- Passes all linting checks
@CLAassistant
Copy link

CLAassistant commented Feb 14, 2026

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants