4

I'm using this code to send transactions in test network(Morden):

var transactionObject = {
    to: '**addresses are below**',  
    gasPrice: 22000000000,
    gas: 42000,
    value: 1
}
var callback = function(error, result) {
    if (!error) {
        console.log(result);
    }
    else {
        console.log(error);
    }
}
web3.eth.sendTransaction(transactionObject, callback)
  • Address: 0x0000000000000000000000000000000000000001
  • Gas used: 24000
  • Txhash: 0x18e5810b87b2fc22f1e2493643d13c94510938a6c4f4b857fad8072e374ac63c
  • Additional: Consumed more than usual gas. This is not a contract address.

  • Address: 0x0000000000000000000000000000000000000002
  • Gas used: 21060
  • Txhash: 0xde9cc279c1a5e03915f202ddf3f1893d2f8ea9cd4c1baadf214ee4aaedb81390
  • Additional: Consumed more than usual gas. This is not a contract address.

  • Address: 0x0000000000000000000000000000000000000003
  • Gas used: 21600
  • Txhash: 0x6669cf3f54f727ca1485e104b691760e985e57cc2dc511218d124f3edf9f158a
  • Additional: etherscan.io shows that this address received only one transaction(my transaction with value 1 wei), but the the balance of this address is 8 wei. How is that possible?

  • Address: 0x4fdd50D0FFd2D430b0181a9c2882FEbc87b79F40
  • Gas used: 21000
  • Txhash: 0x8aee5c80edbc5fe8bbfef13a0693d6a4752a44443131597d960e95673b2e19cf
  • Additional: Transaction to a normal looking address consumed a normal amount of gas.

Why do transactions to certain addresses(not contract addresses) consume more gas? I have a hunch that these addresses are used for something special. If so, where can I get the list of this special addresses?

eth
  • 85,679
  • 53
  • 285
  • 406
manidos
  • 4,298
  • 3
  • 31
  • 55

1 Answers1

7

The Yellow Paper states:

These are four so-called ‘precompiled’ contracts, meant as a preliminary piece of architecture that may later become native extensions. The four contracts in addresses 1, 2, 3 and 4 execute the elliptic curve public key recovery function, the SHA2 256-bit hash scheme, the RIPEMD 160-bit hash scheme and the identity function respectively.

See What's a precompiled contract and how are they different from native opcodes?

Thus, sending a transaction to addresses 1-4 is executing code and costs more gas.

eth
  • 85,679
  • 53
  • 285
  • 406