How long are events held/searchable?

sillytunasillytuna Member Posts: 38 ✭✭
I'm trying to find out more about how far back it's possible to request event logs from nodes. I've seen reference to blockhashes only being available from contracts for the last 256 blocks, but I can't find information on what nodes may elect to return from filters or older block requests.

As a practical example, let's say I logged certain activity from a contract 6 months ago and want to prove today that this activity was logged (as a basic notary service). A naive filter could request the information from a node, but how many nodes would send you back a possibly large amount of data from 6 months ago, or even 6 years ago?

If you run your own full (archive) node, is it a configurable option? If you don't, is it possible to locate a node which offers a full archive? Do people think this will become a pay for service in itself?

This could be come more relevant when state tree pruning is factored in: https://blog.ethereum.org/2015/06/26/state-tree-pruning/

Comments

  • mtbitcoinmtbitcoin Member Posts: 40
    is there an expiry on how long a node keeps the events logs? If yes, is possible to set a command line option to force nodes to keep logs for a longer period of time?
  • chrisethchriseth Member Posts: 170 ✭✭✭
    If you run a full node (the default way currently), events will be available forever. It might be that checkpointing is added in the future which could lead to older blocks (including their events) being deleted on non-archive nodes.

    The 256 block limit only applies to contracts: They can only access the 256 latest block hashes, but they have no way to retrieve logs/events anyway.
Sign In or Register to comment.