• Do they have a lifespan?
  • Can they be deleted?
  • Have there been any cases of errors with logging or logs not being written?

I'd like to know if I can rely on logs and build application logic on top of them.

Example use case: Querying transfer logs of a specific token contract to build a list of accounts that hold a token balance.

  • I'm running geth 1.7 with Proof of Authority, and my application depends of logs to show historical results. In order to have some type of optimization I'm storing data in the logs and use the topic indexes for fast retrieval. But recently I realized that the data stored in the log disappear after an average of 1 day. I'm using getPastLog to search in an specific block with this options: { fromBlock: '0x1ad462e', toBlock: '0x1ad462e', address: '0x1741136609df9F300c7fB4bD134730bBf8A00EBe', topics: [ null, '0x000000000000000000000000000000000000000000000000000000008' ] } but this returns the log
    – byOnti
    Apr 10, 2018 at 14:53

1 Answer 1


We've used logs in a production-level application for more than a year and have never had issues.

They have no particular lifespan as they're a natural part of the transaction metadata. Not sure what you mean by "deleted", as per definition no one party may arbitrarily change network data (unless you mean removed from some kind of transaction database, but as mentioned the logs are an immutable part of the blockchain and could be re-retrieved if the txn hash is known).

  • The only think that should be aware is a possible chain reorganization.
    – Ismael
    Jun 7, 2017 at 17:32
  • @Ismael thanks, where can I read more about chain reorganization?
    – matthew
    Jun 27, 2017 at 12:56
  • @mattvick In this question the have a few links about chain reorg ethereum.stackexchange.com/questions/1187/…
    – Ismael
    Jun 27, 2017 at 16:13

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.