When a transaction executed there are many events observable but not recorded in any store. For example, when a transfer transaction executed, there is relevant information such as recipient, sender, and amount. And timestamp.
You might want to query a balance sheet for your account.
To do that, If a node built indexes for Sender(Account)->Tx and Recipient(Account)->Tx, it is straightforward to retrieve the data.
AS-IS
libplanet has those similar indexes in IStore. They are not about state transition though.
Block Height(Index) -> Block Hash
Tx Id -> Tx Execution(Succ/Fail)
Block Hash -> Perception Time
TO-BE
Generalize the indexing service including the above indexes. It can be divided into 2 parts
Events emitted from the execution of the transaction(actions)
The first one is handled by libplanet like AS-IS.
But for the second one, libplanet provides a tool for emitting events and lets IAction implementations emit events using the tool. libplanet gather the events and build the index(Event->TxId)
The collected event data isolated from IStore and managed solely. This data can be reproducible by replay blockchain. The full node even for Miner does not need those data for their functionalities. It is only useful for end-users who want to query information for their interest. I expect a volunteer to launch a rich query service with the event-transaction indexing service.
related to #1321
Background
When a transaction executed there are many events observable but not recorded in any store. For example, when a transfer transaction executed, there is relevant information such as recipient, sender, and amount. And timestamp.
You might want to query a balance sheet for your account. To do that, If a node built indexes for Sender(Account)->Tx and Recipient(Account)->Tx, it is straightforward to retrieve the data.
AS-IS
libplanet has those similar indexes in IStore. They are not about state transition though.
TO-BE
Generalize the indexing service including the above indexes. It can be divided into 2 parts
The collected event data isolated from IStore and managed solely. This data can be reproducible by replay blockchain. The full node even for Miner does not need those data for their functionalities. It is only useful for end-users who want to query information for their interest. I expect a volunteer to launch a rich query service with the event-transaction indexing service.