Skip to content

Update protobufs #818

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Aug 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ PYI = $(PB:.proto=_pb2.pyi)
## Set default to `protobufs`, otherwise `format` is called when typing only `make`
all: protobufs

.PHONY: protobufs clean-proto

protobufs: $(PY)

%_pb2.py: %.proto
Expand All @@ -77,6 +79,11 @@ protobufs: $(PY)
clean-proto:
rm -f $(PY) $(PYI)

# Force protobuf regeneration by making them always out of date
$(PY): FORCE

FORCE:

# docs commands

docs: check-docs
Expand Down
4 changes: 2 additions & 2 deletions libp2p/crypto/pb/crypto_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions libp2p/crypto/pb/crypto_pb2.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ class _KeyTypeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTy
Secp256k1: _KeyType.ValueType # 2
ECDSA: _KeyType.ValueType # 3
ECC_P256: _KeyType.ValueType # 4
X25519: _KeyType.ValueType # 5

class KeyType(_KeyType, metaclass=_KeyTypeEnumTypeWrapper): ...

Expand All @@ -36,6 +37,7 @@ Ed25519: KeyType.ValueType # 1
Secp256k1: KeyType.ValueType # 2
ECDSA: KeyType.ValueType # 3
ECC_P256: KeyType.ValueType # 4
X25519: KeyType.ValueType # 5
global___KeyType = KeyType

@typing.final
Expand Down
13 changes: 6 additions & 7 deletions libp2p/identity/identify/pb/identify_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

69 changes: 47 additions & 22 deletions libp2p/identity/identify/pb/identify_pb2.pyi
Original file line number Diff line number Diff line change
@@ -1,24 +1,49 @@
from google.protobuf.internal import containers as _containers
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from typing import ClassVar as _ClassVar, Iterable as _Iterable, Optional as _Optional
"""
@generated by mypy-protobuf. Do not edit manually!
isort:skip_file
"""

DESCRIPTOR: _descriptor.FileDescriptor
import builtins
import collections.abc
import google.protobuf.descriptor
import google.protobuf.internal.containers
import google.protobuf.message
import typing

class Identify(_message.Message):
__slots__ = ("protocol_version", "agent_version", "public_key", "listen_addrs", "observed_addr", "protocols", "signedPeerRecord")
PROTOCOL_VERSION_FIELD_NUMBER: _ClassVar[int]
AGENT_VERSION_FIELD_NUMBER: _ClassVar[int]
PUBLIC_KEY_FIELD_NUMBER: _ClassVar[int]
LISTEN_ADDRS_FIELD_NUMBER: _ClassVar[int]
OBSERVED_ADDR_FIELD_NUMBER: _ClassVar[int]
PROTOCOLS_FIELD_NUMBER: _ClassVar[int]
SIGNEDPEERRECORD_FIELD_NUMBER: _ClassVar[int]
protocol_version: str
agent_version: str
public_key: bytes
listen_addrs: _containers.RepeatedScalarFieldContainer[bytes]
observed_addr: bytes
protocols: _containers.RepeatedScalarFieldContainer[str]
signedPeerRecord: bytes
def __init__(self, protocol_version: _Optional[str] = ..., agent_version: _Optional[str] = ..., public_key: _Optional[bytes] = ..., listen_addrs: _Optional[_Iterable[bytes]] = ..., observed_addr: _Optional[bytes] = ..., protocols: _Optional[_Iterable[str]] = ..., signedPeerRecord: _Optional[bytes] = ...) -> None: ...
DESCRIPTOR: google.protobuf.descriptor.FileDescriptor

@typing.final
class Identify(google.protobuf.message.Message):
DESCRIPTOR: google.protobuf.descriptor.Descriptor

PROTOCOL_VERSION_FIELD_NUMBER: builtins.int
AGENT_VERSION_FIELD_NUMBER: builtins.int
PUBLIC_KEY_FIELD_NUMBER: builtins.int
LISTEN_ADDRS_FIELD_NUMBER: builtins.int
OBSERVED_ADDR_FIELD_NUMBER: builtins.int
PROTOCOLS_FIELD_NUMBER: builtins.int
SIGNEDPEERRECORD_FIELD_NUMBER: builtins.int
protocol_version: builtins.str
agent_version: builtins.str
public_key: builtins.bytes
observed_addr: builtins.bytes
signedPeerRecord: builtins.bytes
@property
def listen_addrs(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.bytes]: ...
@property
def protocols(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: ...
def __init__(
self,
*,
protocol_version: builtins.str | None = ...,
agent_version: builtins.str | None = ...,
public_key: builtins.bytes | None = ...,
listen_addrs: collections.abc.Iterable[builtins.bytes] | None = ...,
observed_addr: builtins.bytes | None = ...,
protocols: collections.abc.Iterable[builtins.str] | None = ...,
signedPeerRecord: builtins.bytes | None = ...,
) -> None: ...
def HasField(self, field_name: typing.Literal["agent_version", b"agent_version", "observed_addr", b"observed_addr", "protocol_version", b"protocol_version", "public_key", b"public_key", "signedPeerRecord", b"signedPeerRecord"]) -> builtins.bool: ...
def ClearField(self, field_name: typing.Literal["agent_version", b"agent_version", "listen_addrs", b"listen_addrs", "observed_addr", b"observed_addr", "protocol_version", b"protocol_version", "protocols", b"protocols", "public_key", b"public_key", "signedPeerRecord", b"signedPeerRecord"]) -> None: ...

global___Identify = Identify
28 changes: 14 additions & 14 deletions libp2p/kad_dht/pb/kademlia_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

62 changes: 31 additions & 31 deletions libp2p/pubsub/pb/rpc_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading