Add trusted config to LCD server and index all events #1645
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In order to use the LCD server at its full potential, I did a few fixes.
Trusted node
Configure it with a trusted node. If not we need to implement a
Verifier
but this package will be deprecated. Also, we are running a local node that runs in the same process so it is totally fine to trust it.Benefits: We can now use the
/blocks/{{height}}
endpoint with no crashes ;)Indexer
Index all the transactions in tendermint. By default, the tendermint tx indexer is indexing only the hashes of the transactions, with the
indexAllTags
it will index all the transactions based on their events eg:message.hash=xxx
,message.module=service
... We need to carefully think about the events now #1624Benefits: We can now use the
/txs
with any type of event eg:/txs?message.module=runner&message.hash=3TPDv7qtJFWPJUqczJdndFas4rTPzvjPzM4Mzm4R9T13