0

Question is self explanatory. How can I check if a block has a transaction to or from an address only by using the block header?

Question is prompted by this comment - How to explore all transactions for a given account?

I'm currently iterating through every transaction and it's taking way too long. Need to speed up the process.

  • "There is no direct rpc method to obtain all transactions related to the account." Doesn't that answer the question? The issue is a transaction is not tied to an account, the account is an accounting of every transaction leading up to that point. If you want to trace back and see every transaction you would need a prebuilt database or to iterate through every transaction in the blockchain. – Fortune Jul 7 '18 at 2:45
  • The block header contains some information, difficulty, extraData, gasLimit, gasUsed, hash, logsBloom, miner, mixHash, nonce, number, parentHash, receiptsRoot, sha3Uncles, size, stateRoot, timestamp, totalDifficulty, transactions, transactionsRoot, and uncles. None of these values contain references to the actual senders or receivers of ethereum. They are just general information to glance over, including each transactions sender and receiver would take a lot of information. If you want to query your balance your client can trace the state trie to see your balance. – Fortune Jul 7 '18 at 2:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.