perf: use sqlite/msgindex.db as epoch=>tipsetkey
index to speed up eth_getBlockByNumber
queries
#10922
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.
Related Issues
Builds on-top of #10632
#10663
vulcanize/filecoin-indexing#20
Proposed Changes
in sqlite/msgindex.db we have a table which maps message_cids to epochs and tipset cids for the tipset in which these messages appear. We could also leverage this table as an index for looking up the tipset corresponding to a specific epoch when proceeding down the
eth_getBlockByNumber
search path described in vulcanize/filecoin-indexing#20 (comment) (assuming my understanding there is correct).Additional Info
Opening this as a draft hoping to spur some discussion/feedback, I am not entirely confident in my line of thinking for this. Additionally, if the reasoning is sound, I would appreciate maintainer's opinion on how to best access this index from the
ChainStore
/ChainIndex
(i.e. https://github.com/filecoin-project/lotus/pull/10922/files#diff-6032ffd931dc723fcaa5d9b7926dae0b7fa6bea74763d8e0a0693d2b45992976R164).Checklist
Before you mark the PR ready for review, please make sure that:
<PR type>: <area>: <change being made>
fix: mempool: Introduce a cache for valid signatures
PR type
: fix, feat, build, chore, ci, docs, perf, refactor, revert, style, testarea
, e.g. api, chain, state, market, mempool, multisig, networking, paych, proving, sealing, wallet, deps