# KVAZAR Crawler [Kevacoin](https://github.com/kvazar-network/kevacoin) blockchain crawler with full-text index storage in the shared [Manticore](https://manticoresearch.com/) database (based on [Sphinx](https://sphinxsearch.com/)) ## Compatible * [webapp](https://github.com/kvazar-network/webapp) * [geminiapp](https://github.com/kvazar-network/geminiapp) ## Install * `apt install git composer manticore php-fpm php-curl php-mbstring php-pdo php-bcmath` * `git clone https://github.com/kvazar-network/crawler.git` * `cd crawler` * `composer update` ## Setup ``` bash cp example/config.json config.json ``` ## Launch * `php src/index.php 60` - crawl, check for new blocks every `n` seconds (`60` by default) * `php src/index.php drop` - truncate index * `php src/index.php optimize` - optimize index ### Manticore To prevent data lose on server failures, change default [binlog flush strategy](https://manual.manticoresearch.com/Logging/Binary_logging#Binary-flushing-strategies) to `binlog_flush = 1` ### Kevacoin Remote or local `kevacoind` connection required as the data source for this crawler. ##### Requirements * RAM: 1.5G+ * Disk: 2G+ (Kevacoin blockchain size in 2025) ##### kevacoin.conf Before continue with examples below, create new system user: `useradd -m kevacoin` then copy `kevacoind` compiled into the profile root; make sure `kevacoind` binary has executable permissions: `chmod +x kevacoind` To accept RPC connections, create `kevacoin.conf`: ``` /home/kevacoin/.kevacoin/kevacoin.conf #/home/kevacoin/.kevacoin/kevacoin.conf rpcuser=USERNAME rpcpassword=PASSWORD ``` * make sure `config.json` corresponds `rpcuser` and `rpcpassword` values! ##### systemd ``` /etc/systemd/system/kevacoin.service #/etc/systemd/system/kevacoin.service [Unit] After=network-online.target Wants=network-online.target [Service] Type=simple User=kevacoin Group=kevacoin ExecStart=/home/kevacoin/kevacoind -server [Install] WantedBy=multi-user.target ``` * `systemctl daemon-reload` - apply `systemd` changes * `systemctl enable kevacoin` - enable on system startup * `systemctl start kevacoin` - launch `kevacoind`