rateLimit option of setRpcEndpoint().
Indexing unfinalized blocks
When ingesting from RPC, Squid SDK can index blocks before they are finalized, enabling real-time use cases. If a blockchain reorganization happens, the processor will roll back any changes to the database made due to orphaned blocks, then re-run its batch handler on consensus blocks. To take advantage of this feature, a squid processor must- have a node RPC endpoint (
setRpcEndpoint()) as one of its data sources and - use a
Databasewith unfinalized blocks support (e.g.TypeormDatabase) in itsprocessor.run()call, and - not disable RPC ingestion explicitly with
setRpcDataIngestionSettings({ disabled: true }).
- All blocks above the latest finalized block provided by the
chain_getFinalizedHead()RPC method
Database to adjust its state. The Database then must roll back the changes made due to orphaned blocks and apply the new changes. With this, the state of the Database reflects the current blockchain consensus at all times.