aptos-core
aptos-core copied to clipboard
[Indexer] Update models
Description
- Big thing is model changes according to this: https://dbdiagram.io/d/62f5d9fdc2d9cf52fa934cdc
- Also made some minor upgrades:
- fixed status marking (was missing last version)
- Added latest version processed to prom
indexer_processor_latest_version{processor_name="default_processor"} 1033499 - Remove repeated chain checking since we only need to check on startup.
- If timestamp overflow use timestamp max which is year 9999
What's not in here
- Token offer/claim/coin swap
- Current tables
Test Plan
Test with devnet. Add this to fullnode.yaml config
storage:
enable_indexer: true
indexer:
enabled: true
postgres_uri: "postgres://postgres@localhost:5432/indexer_v2"
processor: "default_processor"
check_chain_id: true
Run node with
INDEXER_DATABASE_URL=postgres://postgres@localhost:5432/indexer_v2 cargo run -p aptos-node --release -- -f ./fullnode.yaml
I tested default_processor to 1.6M versions and token_processor to 4.7M versions. It's very performant on my m1. I was getting 12K - 30K TPS (token transactions can be sparse so at that point we were being limited by state sync).