Addresses
什麼是全球註冊商?
reddit 上的某個人在他的錢包裡發現了一個 235 ETH 的地址。他對自己如何獲得如此多的 ETH 感到困惑。評論員告訴他,它是全球註冊商對象。
這是他的命令行輸出的一個有趣片段:
namereg: { address: "0xc6d9d2cd449a754c494264e1809c50e34d64562b", AuctionEnded: function(), Changed: function(), NewBid: function(), PrimaryChanged: function(), Registrar: function(), addr: function(), allEvents: function(), content: function(), disown: function(), name: function(), owner: function(), reserve: function(), setAddress: function(), setContent: function(), setSubRegistrar: function(), subRegistrar: function(), transfer: function() }
是什麼
namereg
?什麼是全球註冊商?
全球註冊商似乎已經被硬編碼到 geth 中。
beefee@Kumquat:~$ geth console I0330 00:29:31.337735 8794 database.go:71] Alloted 16MB cache to /home/beefee/.ethereum/chaindata ... at block: 1235423 (Tue, 29 Mar 2016 10:10:53 AEDT) modules: admin:1.0 db:1.0 debug:1.0 eth:1.0 miner:1.0 net:1.0 personal:1.0 shh:1.0 txpool:1.0 web3:1.0 > registrar { address: "0x33990122638b9132ca29c723bdf037f1a891a70c", Changed: function(), PrimaryChanged: function(), Registrar: function(), addr: function(), allEvents: function(), content: function(), disown: function(), name: function(), owner: function(), register: function(), reserve: function(), setAddress: function(), setContent: function(), setSubRegistrar: function(), subRegistrar: function(), transfer: function() } > registrar.addr("BeefPool.net") "0xbeef281b81d38096cd8b1d8f69f77be100000000" > registrar.owner("BeefPool.net") "0xbeef281b81d383336aca8b2b067a526227638087"
答案 5chdn 似乎給出了無效的全球註冊商。
// Using the default hard-coded registrar > registrar.addr("ethpool") "0x4bb96091ee9d802ed039c4d1a5f6216f90f81b01" // Invalid Global Registrar from 5chdn > registrar = GlobalRegistrar.at('0xc6d9d2cd449a754c494264e1809c50e34d64562b'); { address: "0xc6d9d2cd449a754c494264e1809c50e34d64562b", Changed: function(), PrimaryChanged: function(), Registrar: function(), addr: function(), allEvents: function(), content: function(), disown: function(), name: function(), owner: function(), register: function(), reserve: function(), setAddress: function(), setContent: function(), setSubRegistrar: function(), subRegistrar: function(), transfer: function() } > registrar.addr("ethpool") "0x"
此外,來自https://github.com/ethereum/go-ethereum/blob/master/common/registrar/registrar.go#L56-L63:
GlobalRegistrarAddr = "0x33990122638b9132ca29c723bdf037f1a891a70c" // frontier HashRegAddr = "0x23bf622b5a65f6060d855fca401133ded3520620" // frontier UrlHintAddr = "0x73ed5ef6c010727dfd2671dbb70faac19ec18626" // frontier
他們來了:
https://live.ether.camp/account/33990122638b9132ca29c723bdf037f1a891a70c https://live.ether.camp/account/23bf622b5a65f6060d855fca401133ded3520620 https://live.ether.camp/account/73ed5ef6c010727dfd2671dbb70faac19ec18626