3

What I know is,

  • history_plugin : plugins that enable store sort of historical data like action traces, transaction traces.

  • history_api_plugin : plugins that enable to use /history/* APIs.

So, state_history_plugin was introduced at v1.5.0, and this can be configured at config.ini like

  • plugin = eosio::state_history_plugin
  • trace-history = false
  • ... ETC ...

Also, I found this (https://github.com/acoutts/EOS-state-history-API) while reading this post (https://medium.com/@eos42/scalable-full-history-nodes-b4eccf113d57). But I think this repo is just for mongo db plugin.

So, my question is...

  1. What is difference between history and state history? and how can query state_history_plugin data?
  2. Is there any state_history_api_plugin for RPC? (like /v1/state_history/get_actions)
4

I asked my friend Andrew Coutts this question on your behalf, and he said:

So the state history plugin is just a piece of the equation.

  • The history plugin exposes the RPC API that we're all familiar with.
  • The state history plugin saves state data to a new flat file format that’s designed to be read from external components and is faster to rebuild than replaying the chain with the history plugin.
  • State history plugin exposes a websocket interface for something to connect to and read the block / state data from the additional new state history files stored in the data directory.
  • There are 2 examples of state history websocket clients on the eosio GitHub:

More advantages to the new flat file and websocket approach:

  • Multiple fillers can connect to nodeos and read simultaneously from different locations in the flat file.
  • When you need to rebuild your application state nodeos doesn’t need to be replayed as you’re reading from external files now.
| improve this answer | |

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.