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

Namehash for empty domain does not equal 0x0 #19696

Closed
mortelli opened this issue Jun 11, 2019 · 5 comments
Closed

Namehash for empty domain does not equal 0x0 #19696

mortelli opened this issue Jun 11, 2019 · 5 comments

Comments

@mortelli
Copy link

Hello,

I've decided to open a question issue here since I have got no reply from the go-ethereum gitter or discord.

It is my understanding that the namehash for the empty string domain should result in the 0x00000000000000000000000000000000 hash.

However, when calling the ens.EnsNode function (ethereum/go-ethereum/contracts/ens/ens.go:103) with "" as input, the output is a different hash.

Is this a bug, or expected behavior? If the latter is the case, why?

System information

Geth
Version: 1.9.0-unstable
Architecture: amd64
Protocol Versions: [63 62]
Network Id: 1
Go Version: go1.11.2
Operating System: linux

Expected behaviour

fmt.Printf("%v", ens.EnsNode(""))[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]

Actual behaviour

fmt.Printf("%v", ens.EnsNode(""))[136 212 132 58 243 2 194 9 50 134 137 140 211 76 186 122 71 28 60 220 228 199 133 20 252 151 28 60 106 83 137 30]

@holiman
Copy link
Contributor

holiman commented Jun 18, 2019

It is my understanding that the namehash for the empty string domain should result in the 0x00000000000000000000000000000000 hash.

I don't know how that could be. @Arachnid does that seem correct to you?

@holiman
Copy link
Contributor

holiman commented Jun 18, 2019

Also, the ens.go was removed by #15808 -- not sure if that was intentional or by mistake. @fjl ?

@holiman
Copy link
Contributor

holiman commented Jun 18, 2019

Sorry, it was dropped by #19661

@holiman
Copy link
Contributor

holiman commented Jun 18, 2019

The swarm-team was maintaining this, it's now been moved out from go-ethereum. Please file a ticket with https://github.com/ethersphere/swarm instead

@holiman holiman closed this as completed Jun 18, 2019
@mortelli
Copy link
Author

Thank you @holiman, I will do that.

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

No branches or pull requests

2 participants