Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: migration("re-indexing"), backfilling and diasgnostics tooling for the ChainIndexer #12450

Merged
Merged
Show file tree
Hide file tree
Changes from 44 commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
0f4c627
fix conflicts with chain indexer
aarshkshah1992 Sep 16, 2024
1b5fed3
feat: chain indexer todos [skip changelog] (#12462)
akaladarshi Sep 17, 2024
260cde6
Apply suggestions from code review
aarshkshah1992 Sep 17, 2024
127b144
changes to Index Validation API based on Rodds first review
aarshkshah1992 Sep 17, 2024
05b84ec
build chain indexer API
aarshkshah1992 Sep 17, 2024
11712bf
improve error handling
aarshkshah1992 Sep 18, 2024
e7506cc
feat: lotus-shed tooling for chain indexer (#12474)
akaladarshi Sep 18, 2024
efbf51f
backfilling improvements and fixes
aarshkshah1992 Sep 18, 2024
c18998d
finish chain index validation and backfill tooling
aarshkshah1992 Sep 19, 2024
f30585d
Merge branch 'feat/msg-eth-tx-index' into feat/implement-index-valida…
aarshkshah1992 Sep 19, 2024
67f81a9
user documentation for the
aarshkshah1992 Sep 23, 2024
b5d4fd5
Merge branch 'feat/implement-index-validation-api' of github.com:file…
aarshkshah1992 Sep 23, 2024
a84b38e
validate from epoch
aarshkshah1992 Sep 23, 2024
24527bd
Apply suggestions from code review
aarshkshah1992 Sep 24, 2024
ec8da8a
changes to user doc as per review
aarshkshah1992 Sep 24, 2024
651e7b9
Apply suggestions from code review
aarshkshah1992 Sep 25, 2024
149b944
changes to user doc as per review
aarshkshah1992 Sep 25, 2024
ee6a5a1
Apply suggestions from code review
aarshkshah1992 Sep 25, 2024
8825d9a
Merge branch 'feat/implement-index-validation-api' of github.com:file…
aarshkshah1992 Sep 25, 2024
c07ca44
changes as per review
aarshkshah1992 Sep 25, 2024
4c94b28
feat: add event entries count in validation API (#12506)
akaladarshi Sep 25, 2024
8190b4d
use sqllite defaults (#12504)
aarshkshah1992 Sep 25, 2024
4e3aa88
Apply suggestions from code review
aarshkshah1992 Sep 30, 2024
9a13d59
write chain index to a different dir
aarshkshah1992 Sep 30, 2024
bca9ed0
Apply suggestions from code review
aarshkshah1992 Oct 1, 2024
9f84a27
Merge remote-tracking branch 'origin/feat/msg-eth-tx-index' into feat…
aarshkshah1992 Oct 1, 2024
35ccc7d
fix conflicts
aarshkshah1992 Oct 1, 2024
fdf5c6e
Merge remote-tracking branch 'origin/feat/msg-eth-tx-index' into feat…
aarshkshah1992 Oct 2, 2024
0207fa2
UX improvements to backfilling
aarshkshah1992 Oct 2, 2024
3c48644
feat: tests for the chain indexer (#12521)
aarshkshah1992 Oct 4, 2024
5e6ae08
cleanup reverted tipsets to avoid db bloat
aarshkshah1992 Oct 4, 2024
9511c46
fix logging
aarshkshah1992 Oct 4, 2024
2194dcb
test for filter by address
aarshkshah1992 Oct 4, 2024
62f59d3
test gc cascade delete
aarshkshah1992 Oct 7, 2024
688ab72
fix db locked error during backfilling
aarshkshah1992 Oct 7, 2024
9a64de7
fix var name
aarshkshah1992 Oct 7, 2024
1d7af84
increase db locked timeout
aarshkshah1992 Oct 7, 2024
d4606e7
fix db locked issue
aarshkshah1992 Oct 7, 2024
5f541b9
reduce db lock timeout
aarshkshah1992 Oct 7, 2024
c223802
no lock in gc
aarshkshah1992 Oct 8, 2024
fcbb3e5
reconcile does not need lock
aarshkshah1992 Oct 8, 2024
47e421f
improved error handling
aarshkshah1992 Oct 8, 2024
33c1ca1
Update chain-indexing-overview-for-rpc-providers.md
BigLep Oct 8, 2024
926852a
Update chain-indexing-overview-for-rpc-providers.MD
BigLep Oct 8, 2024
23741cf
better metrics for backfilling
aarshkshah1992 Oct 9, 2024
f7bc885
Merge branch 'feat/implement-index-validation-api' of github.com:file…
aarshkshah1992 Oct 9, 2024
5eb4be4
Update chain/index/chain-indexing-overview-for-rpc-providers.MD
BigLep Oct 9, 2024
bc88f8c
Update chain/index/chain-indexing-overview-for-rpc-providers.MD
BigLep Oct 9, 2024
097b90d
Update chain/index/chain-indexing-overview-for-rpc-providers.MD
BigLep Oct 9, 2024
5170f22
Update chain/index/chain-indexing-overview-for-rpc-providers.MD
BigLep Oct 9, 2024
feefed9
Update chain/index/chain-indexing-overview-for-rpc-providers.MD
BigLep Oct 9, 2024
2fb608f
Update chain/index/chain-indexing-overview-for-rpc-providers.MD
BigLep Oct 9, 2024
637e6a2
Update chain/index/chain-indexing-overview-for-rpc-providers.MD
BigLep Oct 9, 2024
7a6233f
Merge remote-tracking branch 'origin/feat/msg-eth-tx-index' into feat…
aarshkshah1992 Oct 11, 2024
6badc36
tests for changes to event addressing
aarshkshah1992 Oct 11, 2024
c0a6471
Apply suggestions from code review
aarshkshah1992 Oct 14, 2024
a017e71
changes as per review -> round 1
aarshkshah1992 Oct 14, 2024
1645f76
Apply suggestions from code review
aarshkshah1992 Oct 14, 2024
00a4ea2
Apply suggestions from code review
aarshkshah1992 Oct 14, 2024
584b5c5
log tipset key cid
aarshkshah1992 Oct 14, 2024
c5329b1
Apply suggestions from code review
aarshkshah1992 Oct 14, 2024
00612c8
Apply suggestions from code review
aarshkshah1992 Oct 14, 2024
185ed0f
fix docs
aarshkshah1992 Oct 14, 2024
4f26511
Apply suggestions from code review
aarshkshah1992 Oct 14, 2024
cafec26
fix tests
aarshkshah1992 Oct 14, 2024
a3d3543
Merge branch 'feat/implement-index-validation-api' of github.com:file…
aarshkshah1992 Oct 14, 2024
8701f55
fix tests
aarshkshah1992 Oct 14, 2024
77a0b60
make jen
aarshkshah1992 Oct 14, 2024
8bdb105
Merge remote-tracking branch 'origin/feat/msg-eth-tx-index' into feat…
aarshkshah1992 Oct 14, 2024
9cd86fa
fix conflicts
aarshkshah1992 Oct 14, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
BigLep marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# Lotus changelog

# UNRELEASED
(`ChainIndexer`) to index Filecoin chain state such as tipsets, messages, events and ETH transactions for accurate and faster RPC responses. The `ChainIndexer` replaces the existing `MsgIndex`, `EthTxIndex` and `EventIndex` implementations in Lotus, which [suffer from a multitude of known problems](https://github.com/filecoin-project/lotus/issues/12293). If you are an RPC provider/node operator, please refer to the [ChainIndexer documentation for RPC providers](TODO: URL) for information on how to enable, configure and use the new Indexer.
BigLep marked this conversation as resolved.
Show resolved Hide resolved
Add `EthGetBlockReceipts` RPC method to retrieve transaction receipts for a specified block. This method allows users to obtain Ethereum format receipts of all transactions included in a given tipset as specified by its Ethereum block equivalent. ([filecoin-project/lotus#12478](https://github.com/filecoin-project/lotus/pull/12478))


## ☢️ Upgrade Warnings ☢️

- Minimum go-version been updated to v1.22.7 ([filecoin-project/lotus#12459](https://github.com/filecoin-project/lotus/pull/12459))
Expand Down
30 changes: 30 additions & 0 deletions api/api_full.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,36 @@ type FullNode interface {
Common
Net

// MethodGroup: ChainIndexer
BigLep marked this conversation as resolved.
Show resolved Hide resolved
// The ChainIndexer method group contains methods for interacting with the chain indexer.
//
// The `ChainValidateIndex` API serves multiple purposes:
aarshkshah1992 marked this conversation as resolved.
Show resolved Hide resolved
//
// 1. Validates the chain index at a specific epoch:
BigLep marked this conversation as resolved.
Show resolved Hide resolved
// - Ensures consistency between indexed data and actual chain state
// - Reports any errors found during validation (i.e. the indexed data does not match the actual chain state, missing data, etc.)
//
// 2. Optionally backfills missing data:
// - Backfills data if the index is missing information for the specified epoch
// - Backfilling only occurs when the `backfill` parameter is set to `true`
//
// 3. Detects "holes" in the index:
// - If `backfill` is `false` and the index lacks data for the specified epoch, the API returns an error indicating missing data
//
// ChainValidateIndex validates the integrity of the chain index at a specified epoch and also optionally backfills missing data.
BigLep marked this conversation as resolved.
Show resolved Hide resolved
//
// Parameters:
// - epoch: The specific chain epoch for which to validate/backfill the index.
// - backfill: A boolean flag indicating whether to attempt backfilling of missing data if the index does not have data for the
// specified epoch.
//
// Returns:
// - *types.IndexValidation: A pointer to an IndexValidation struct containing the results of the validation/backfill.
// - error: An error object if the validation/backfill fails. The error message will contain details about the index
// corruption if the call fails because of an incosistency between indexed data and the actual chain state.
// Note: The API returns an error if the index does not have data for the specified epoch and backfill is set to false.
ChainValidateIndex(ctx context.Context, epoch abi.ChainEpoch, backfill bool) (*types.IndexValidation, error) //perm:write

// MethodGroup: Chain
// The Chain method group contains methods for interacting with the
// blockchain, but that do not require any form of state computation.
Expand Down
15 changes: 15 additions & 0 deletions api/mocks/mock_full.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions api/proxy_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading