No matter what random address I use, web3.eth.getTransactionCount always prints 1048576



Let say, I change a simple character in the address (the last character from 7 to 8)



Shouldn't it display 0? Interestingly, the number 1048576 is 0x100000 in hexadecimal.

Perhaps I'm doing something very stupidly wrong... but I can't get behind it.

1 Answer 1


It looks like you are on a testnet, which implements an initial nonce of 2^20 = 0x100000 = 1048576

More details here: https://github.com/ethereum/wiki/wiki/Morden#details

Initial Account Nonce (IAN) is 2^20 (instead of 0 in all previous networks).

By setting an initial nonce higher than it could possibly reach on the main Ethereum network, they prevent testnet transactions from being valid on the live network (preventing replay attacks).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.