I cannot find any implementation of a consumer for the state_history_plugin.
The official Nodeos webpage suggests the fill-postgresql repo. But, I cannot compile it -- even after building the specific cmake that the author decided to use, and fixing all the git submodule references it still refuses to compile.
Another interesting repo is this JS implementation of a consumer: https://github.com/tmuskal/jsclient-eosio-state-history-plugin
But the problem with it is that it has the ABI from the node hardcoded, and I think it has an outdated version, so nothing happens.
I wrote a simple Python websocket function that returns the only ABI from my node:
import websockets import asyncio async def consumer(): async with websockets.connect('ws://localhost:8080') as websocket: msg = await websocket.recv() print(msg) loop = asyncio.get_event_loop() loop.run_until_complete(consumer())
But to get updates of blocks or actions I need to send a message to the node via the same scheme, i.e.,
What is this message? Also, how to deserialize the data from the Node?