Commit 0d9140a
committed
feat: Add conditional indexing to filter Safes by initiator/recipient address (#2703)
Implement selective Safe indexing on L2 networks to reduce database size and improve indexing speed by filtering out Safes created by specific initiators.
Changes:
- Disable ProxyFactoryIndexer. Not required anymore, it's done by SafeEventsIndexer
- Add ETH_EVENTS_IGNORED_INITIATORS setting to define blocklisted initiators
- Add ETH_EVENTS_IGNORED_TO setting to define blocklisted recipients
- Override process_elements in SafeEventsIndexer to filter by tx._from or tx.to before storing EthereumTx records
- Optimize RPC calls: fetch transactions first, filter, then fetch receipts only for allowed transactions
- Add comprehensive tests for conditional indexing
Closes #27031 parent a4428ab commit 0d9140a
File tree
5 files changed
+710
-10
lines changed- config/settings
- safe_transaction_service/history
- indexers
- management/commands
- tests
5 files changed
+710
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
609 | 609 | | |
610 | 610 | | |
611 | 611 | | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
612 | 621 | | |
613 | 622 | | |
614 | 623 | | |
| |||
0 commit comments