Bytecode verified via sibling
This contract shares identical runtime bytecode with HashReg (0x23bf622b...) which has been verified through compiler archaeology.
go-ethereum's built-in hash registrar, mapping a key to a content hash
Historical Significance
go-ethereum shipped with registrar contracts so that a client could resolve a name or find the document describing a piece of code without asking a server. Binding a key to a content hash on chain, and letting a separate registry say where that content lives, is the split that content addressing still uses; what has changed is that the storage layer became IPFS rather than a URL someone had to keep alive.
Context
Deployed on 10 August 2015, in the first fortnight of the Frontier chain, by the account that also deployed the global registrar.
Key Facts
Description
One of the three registrar contracts go-ethereum shipped for the Frontier release. setowner claims the contract for the first account that calls it, after which only that account may call register to bind a numeric key to a content hash. It is the storage half of the natspec lookup: a contract's code hash points at the hash of its documentation, and URLhint then turns that hash into a URL. The source is HashRegSrc in go-ethereum's common/registrar/contracts.go, and the deployed creation code is byte for byte the HashRegCode constant that sits beside it in the same file. Etherscan cannot verify it: the bytecode was produced by the PoC-8 era cpp-ethereum compiler, which reports itself as version 0.8.2 and predates every compiler Etherscan offers. It reproduces exactly from that compiler with the optimiser on, provided the two state variables are declared above the two functions.
Source Verified
Bytecode hardcoded verbatim in go-ethereum v1.0.0 common/registrar/contracts.go (HashRegCode). Source from HashRegSrc in same file. Authored by Gav Wood, Ethereum Foundation. Exact 152-byte runtime match confirmed.
Heuristic Analysis
The following characteristics were detected through bytecode analysis and may not be accurate.
Frontier Era
The initial release of Ethereum. A bare-bones implementation for technical users.
Bytecode Overview
Verified Source Available
Source verified through compiler archaeology and exact bytecode matching.
View Verification ProofShow source code (Solidity)
// SPDX-License-Identifier: UNLICENSED
// Reconstructed source of HashReg (0x23bf622b5a65f6060d855fca401133ded3520620)
// Originally authored by Gav Wood, Ethereum Foundation.
// Source preserved verbatim from go-ethereum v1.0.0 common/registrar/contracts.go (HashRegSrc)
// Compiler: unknown early Solidity (pre-release, Frontier era, ~Aug 7 2015)
// The bytecode was hardcoded directly in go-ethereum — no separate compilation needed.
contract HashReg {
function setowner() {
if (owner == 0) {
owner = msg.sender;
}
}
function register(uint256 _key, uint256 _content) {
if (msg.sender == owner) {
content[_key] = _content;
}
}
address owner;
mapping (uint256 => uint256) content;
}External Links
Related contracts
globalregistrar
Same deployerA second deployment of the Ethereum GlobalRegistrar — the early name registry that predated ENS — made on August 10, 2015.
0x2272d8...18f1a9August 10, 2015Contract 0x87ad8f...46d9bc
Same deployergo-ethereum's built-in URL hinter, turning a content hash into a download location
0x87ad8f...46d9bcAugust 10, 2015Ballot
Same deployerDelegated voting with a proposal count fixed at deployment
0x3cf26c...b6a8e1August 18, 2015Ballot
Same deployerDelegated voting with a proposal count fixed at deployment
0x56ce77...b44745August 18, 2015Greeter
Same eraA HelloWorld greeter deployed at block 51,909 on 8 August 2015, one of a run of contracts from the same account that week.
0x412fda...7267edAugust 8, 2015Greeter
Same eraA Greeter with the message 'Ethereum will change the world smarter' - deployed Aug 8, 2015 by a developer connected to the Tokyo Smart Contract meetup.
0xda0c1c...7a68ebAugust 8, 2015