Skip to content
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

Add multiaddrs key for websocket dns peer info #1

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Conversation

D4nte
Copy link
Owner

@D4nte D4nte commented Oct 15, 2021

No description provided.

@D4nte D4nte changed the title Confirm compatibility with Waku 2 ENR Add multiaddr key for websocket dns peer info Oct 15, 2021
@D4nte
Copy link
Owner Author

D4nte commented Oct 15, 2021

I explored the possibility of encoding several multiaddresses in the multiaddrs field, for example to have a dns4 and a dns6 entry, by encoding "/dns4/node-01.do-ams3.wakuv2.test.statusim.net/tcp/443/wss/p2p/16Uiu2HAmPLe7Mzm8TsYUubgCAW1aJoeFScxrLj8ppHFivPo97bUZ" twice in the field, in addition to the ip, udp and secp256k1 value.

This resulted in RLP encoded size of 325 which is over the 300 limit specified by EIP-788.

Removing the peer id from the encoded multiaddr does allow the encoding of 2, even 3 (not 4) multiaddresses while remaining under 300 bytes post RLP encoding.

@D4nte D4nte marked this pull request as ready for review October 16, 2021 11:04
@D4nte D4nte closed this Oct 16, 2021
@D4nte D4nte reopened this Oct 16, 2021
@D4nte D4nte changed the title Add multiaddr key for websocket dns peer info Add multiaddrs key for websocket dns peer info Oct 16, 2021
This can be used to store peer information that cannot be encoded with
the pre-defined ENR keys such as websocket details, fqdn, etc.

Multiaddresses present in the `multiaddrs` field must not contain a peer
 id. The `secp256k1` field should be used for the peer id by storing the
 public key.
D4nte added a commit to waku-org/js-waku that referenced this pull request Oct 26, 2021
Imported from D4nte/discv5#1
Replaced bcrypto backend with secp256k1.
D4nte added a commit to waku-org/js-waku that referenced this pull request Oct 26, 2021
Imported from D4nte/discv5#1
Replaced bcrypto backend with secp256k1.
D4nte added a commit to waku-org/js-waku that referenced this pull request Oct 26, 2021
Imported from D4nte/discv5#1
Replaced bcrypto backend with secp256k1.
D4nte added a commit to waku-org/js-waku that referenced this pull request Dec 6, 2021
Imported from D4nte/discv5#1
Replaced bcrypto backend with secp256k1.
@github-staff github-staff deleted a comment from BenediktMiller Mar 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant