Skip to content

Conversation

@asmit27rai
Copy link
Contributor

Multibase Integration

Integration of py-multibase into py-libp2p.


Phase-wise Plan

Phase 1: Add Multibase Support (Completed)

  • Add py-multibase as a dependency.
  • Extend Peer ID class with multibase encode/decode methods (backward compatible).
  • Add multibase-aware utility functions for DHT keys.
  • Update pubsub message ID encoding to use multibase.
  • Preserve legacy base58/base64 support for compatibility.
  • Add and update tests for multibase, compatibility, and error handling.

Phase 2: Internal Migration (Upcoming)

  • Migrate internal code to use multibase by default.
  • Update peer ID parsing, DHT, and pubsub internals.
  • Update examples and documentation.

Phase 3: External API & Config (Upcoming)

  • Consider making multibase the default for external APIs.
  • Provide configuration for encoding preferences.

Testing

  • All new and existing tests pass for Phase 1, including backward compatibility and error handling for both multibase and legacy base58.

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.

1 participant