-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
dnsEncode() throws too early #4543
Comments
DNS labels are restricted to a length of 63 (see RFC-1035. Here is a short article by Microsoft on some of the nuances too. :) |
Just to keep everyone informed, we've had discussions with ENS and have concluded this is a-ok. :)
In the next minor bump, I'll make the following change: // current; 6.10
function dnsEncode(name: string): string;
// next minor; 6.11
function dnsEncode(name: string, maxLength = 63): string; This will ensure the function continues working for others that may be using it using its current defaults, but when used internally by the wildcard resolution logic, it can expand the label width. Can you also work on updating the ENSIP, @adraffy? |
Awesome. Yeah, I can submit that. |
This has been address in v6.11.1. Try it out and let me know if you have any more issues. Thanks! :) |
Ethers Version
6.10
Search Terms
dnsEncode, ccip, ensip-10, wrapper
Describe the Problem
dnsEncode()
throws on>63
but should throw for>255
. This causes longer names to be unreachable via CCIP and can't decode NameWrappernames()
function.Possibly the function needs renamed if this was used for other purposes.
Example:
Suggested implementation:
You can also massively simplify
ensNameSplit()
:Code Snippet
No response
Contract ABI
No response
Errors
invalid DNS encoded entry; length exceeds 63 bytes
Environment
node.js (v12 or newer)
Environment (Other)
No response
The text was updated successfully, but these errors were encountered: