A fork of 0xTracker component to specialise of Metric related trades only
set up elasticsearch vm conf:
sysctl -w vm.max_map_count=262144and persist it for next runs
echo "vm.max_map_count=262144" >> /etc/sysctl.confinit env configs for 0xTracker processes
cp 0x-tracker-api/.env.example 0x-tracker-api/.env
cp 0x-tracker-worker/.env.example 0x-tracker-worker/.env
cp 0x-event-extractor/.env.example 0x-event-extractor/.envthen run
docker-compose up -dIn order to serve the API over https you need to setup a certificate using certbot.
Follow this tutorial to set it up
and then redirect the domain url to the local port 3001.
This is done by adding the following into the nginx config under /etc/nginx/sites-enabled/default:
location / {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_pass http://127.0.0.1:3001/;
}finally, the http ports need to be opened on the host firewall
ufw allow http
ufw allow httpsSometime some fills maybe missing. A straightforward way to regenerate them is by removing the fillCreated tag
from the events as the following:
db.events.updateMany({ fillCreated: { $in: [false, null] }, scheduler: { $ne: null } } , [ {$unset: "scheduler" } ] );
the filter part can be adapted to match a specific transaction using transactionHash attribute