Skip to content

Discussion: Keep Indexer Data on Disk #1634

@containerman17

Description

@containerman17

I propose storing the indexer data on disk. Right now, it's all kept in RAM, then copied to disk, and later restored from disk to RAM during Node startup. Speed shouldn't be a concern. Modern SSDs are cheap and abundant, and with ext4's page cache, performance should be solid. In production, a simple caching server could be placed in front for added speed.

I love having a built-in indexer. Indexers in EVM are a pain, so let's make this a fully functional one—we're already 99% there.

I also suggest removing the const maxBlockWindow uint64 = 1_000_000 limit on stored blocks. Since the data will be on disk, it’s no longer necessary. Instead, we can limit the size with an option like --max-indexer-size=4TB.

Indexer nodes shouldn't be validators, and validator nodes shouldn't index. That's how it works in EVM, and I envision the same for HyperSDK.

P.S. The only issue I see is that block history won't be syncable across nodes, but we've never discussed keeping the entire chain history anyway.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions