Use out-of-the-box indexer application
Yaci Store comes with an out-of-the-box indexer application with all modules included in it. Apart from ledger state modules like adapot and governance-aggr, all other modules or stores are enabled by default. Based on your use case, you can enable or disable different stores by changing the configuration.
For details on how to install yaci store out-of-the-box applications, please refer to the Installation section.
Configuration
You can find configuration file application.properties in the config directory.
Mandatory Configuration
Network Configuration
store.cardano.host=preprod-node.world.dev.cardano.org
store.cardano.port=30000
store.cardano.protocol-magic=1Database Configuration
Uncomment and edit the following properties to configure the database connection.
spring.datasource.url=
spring.datasource.username=user
spring.datasource.password=Additional configurations for database connection pool and batch insert.
spring.datasource.hikari.maximum-pool-size=50
spring.datasource.hikari.minimum-idle=5
spring.jpa.properties.hibernate.jdbc.batch_size=100
spring.jpa.properties.hibernate.order_inserts=trueParallel Processing Configuration
The following properties are used to configure parallel processing. You can leave them as-is or change them based on your machine configuration.
Note: If you are using parallel processing, you also need to configure the database connection pool size accordingly.
store.executor.enable-parallel-processing=true
store.executor.blocks-batch-size=200
store.executor.blocks-partition-size=10
store.executor.use-virtual-thread-for-batch-processing=true
store.executor.use-virtual-thread-for-event-processing=trueOptional Configuration
The following are optional configurations.
Genesis files Configuration for custom networks
This is only required if you are using any custom networks. For following public networks, the genesis files are already available in the application.
- mainnet
- preprod
- preview
Configure genesis files location for custom network
store.cardano.byron-genesis-file=/Users/xyz/cardano-node/files/byron-genesis.json
store.cardano.shelley-genesis-file=/Users/xyz/cardano-node/files/shelley-genesis.json
store.cardano.alonzo-genesis-file=/Users/xyz/work/cardano-node/preprod/files/alonzo-genesis.json
store.cardano.conway-genesis-file=/Users/xyz/work/cardano-node/preprod/files/conway-genesis.jsonN2C Configuration
The following properties are required for node-to-client (n2c) communication. This is required for transaction submission, fetching protocol parameters etc. If you don’t need these functionalities, you can leave them as-is.
#store.cardano.n2c-node-socket-path=/Users/satya/work/cardano-node/preprod-8.1.2/db/node.socket
# If you are accessing n2c through a relay like "socat", uncomment and edit the following properties.
#store.cardano.n2c-host=<relay_host>
#store.cardano.n2c-port=<relay_port>Enable / Disable specific store
Even if you are using yaci-store-all application, you can enable/disable specific stores. For example, if you want to disable utxo store, you can do so by setting the following property to false.
store.utxo.enabled=falseThis property is available for all stores.
store.<store_name></store_name>.enabled=falseStarting from a specific point
By default, sync starts from the genesis block. If you want to start from a specific point, you can do so by setting the following property.
store.cardano.sync-start-slot=2738868
store.cardano.sync-start-blockhash=a5c72a0e74cf066873ae7741c488acaef32746e1c4ac3b0d49c4acf4add1a47c
# For Byron block as start point
#store.cardano.sync-start-byron-block-number=2737340
# For stop point
#store.cardano.sync-stop-slot=76667163
#store.cardano.sync-stop-blockhash=3e9a93afb174503befd4e8dabd52f73e6c4e9c3c76886713475dd43b00e6acbfSwagger UI
By default, swagger UI for the application is available at http://localhost:8080/swagger-ui/index.html
DB Indexes (After Initial Sync)
After the initial sync is complete, you can create additional optional indexes to improve query performance of out-of-box REST APIs. To create optional indexes, check installation section for more details: Installation