3

I have been running a geth node, mostly to see event logs fired by my contracts. I ran the node with syncmode=fast and finally the node is synced. I can successfully read the logs.

Now, I read here the option --gcmode=archive described as:

Trie pruning is enabled on all --syncmode variations (including --syncmode=full). If you are running an archive node where you would like to retain all historical data, you should disable pruning via --gcmode=archive.

What does the historical data mean here? Is it more than the normal logs that are created by events fired during transactions? What does it include and when should I use --gcmode=archive?

6

Archive mode means that all states of values in smart contracts as well as all balances of an account are stored.

e.g. if the value of a string in a contract changes from XYZ in block 6000000 to ABC in 6000001, you can recall that string's state from block 6000000 with web3.eth.call, providing the blocknumber (as hex value with 0x prefix) as one of the function parameters of this web3 function. This is only possible in archive sync, other syncmodes which prune the past states will have only the latest value available, to be called with the above mentioned function providing "latest" as the blocknumber parameter.

As far as I know, Parity even offers a sync mode where only a defined amount of past states are logged, limiting the size of the synced chain data.

  • 1
    So basically it's 'historical data' i.e. the past states of the EVM right? – DaveIdito Aug 30 '18 at 0:10
  • Yes, it's "everything that has ever been" so to say. – Nikita Fuchs Aug 30 '18 at 9:32

Your Answer

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

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