{"id":19571579,"url":"https://github.com/block-core/chaininfo","last_synced_at":"2025-07-13T02:11:34.165Z","repository":{"id":37206363,"uuid":"236364839","full_name":"block-core/chaininfo","owner":"block-core","description":"Repo for chain information that are compatible with the Blockcore tooling (such as Explorer and Indexer).","archived":false,"fork":false,"pushed_at":"2025-05-04T11:21:38.000Z","size":2238,"stargazers_count":4,"open_issues_count":4,"forks_count":15,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-10T05:02:17.485Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.blockcore.net/chains","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/block-core.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-01-26T19:33:48.000Z","updated_at":"2025-05-04T11:21:33.000Z","dependencies_parsed_at":"2023-12-17T03:40:39.122Z","dependency_job_id":"52a14edc-1811-491c-bcbb-e3558ac9bbb2","html_url":"https://github.com/block-core/chaininfo","commit_stats":{"total_commits":511,"total_committers":9,"mean_commits":56.77777777777778,"dds":"0.12524461839530332","last_synced_commit":"e16b161690a3e69c4e2ff8ba4ec2238aeecab494"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/block-core/chaininfo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/block-core%2Fchaininfo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/block-core%2Fchaininfo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/block-core%2Fchaininfo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/block-core%2Fchaininfo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/block-core","download_url":"https://codeload.github.com/block-core/chaininfo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/block-core%2Fchaininfo/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260749615,"owners_count":23056788,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-11T06:19:23.434Z","updated_at":"2025-07-13T02:11:34.153Z","avatar_url":"https://github.com/block-core.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Blockcore Chain Info\nRepo for chain information that are compatible with the Blockcore tooling (such as Explorer and Indexer).\n\nIf you are responsible for an Blockcore compatible blockchain, please provide a pull request to this repo with your details. Please include external links to logos, etc.\n\nThe chain files should use the exact same symbol as registered in the \"official\" SLIP-0044 list: https://github.com/satoshilabs/slips/blob/master/slip-0044.md\n\nIf your project/chain is not listed in the list yet, please go ahead and provide a PR to that and reserve your HD path and symbol.\n\nThe Blockcore devs reserves the rights to remove a chain from this repo at any time. Projects (chains) that are not responding and is not acting responsible, will likely be removed from this repo.\n\n\n# Add your own chain\n\nFeel free to go ahead and duplicate one of the existing configurations for a chain, and create a pull request for us to approve. It is fairl self-describing how to do it if you look at existing files and setup.\n\n\n# Host a Blockcore Infrastructure Server\n\n\n## Server Deployment\n\nTo deploy and run the indexer and explorer, you need a computer with Docker. As long as Docker (Linux/Windows) is supported, you should be able to run your own Blockcore Infrastructure Server (BIS).\n\n\n### Ubuntu 22.04\n\n```sh\nsudo apt update\nsudo apt install apt-transport-https ca-certificates curl gnupg-agent software-properties-common\ncurl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -\nsudo apt-key fingerprint 0EBFCD88\nsudo add-apt-repository \"deb [arch=amd64] https://download.docker.com/linux/ubuntu disco stable\"\nsudo apt update\nsudo apt install docker-ce\n```\n\nNext you also need docker-compose. Make sure you run the installation like explained in the official documentation and not apt-get, as that repository has an older version of docker-compose.\n\nhttps://docs.docker.com/compose/install/\n\n```sh\nsudo curl -L \"https://github.com/docker/compose/releases/download/v2.6.1/docker-compose-$(uname -s)-$(uname -m)\" -o /usr/local/bin/docker-compose\n```\n\nThen apply executable permissoins:\n```sh\nsudo chmod +x /usr/local/bin/docker-compose\n```\nTo create a cgroup directory with systemd, copy and paste the following two commands:\n```sh\nsudo mkdir /sys/fs/cgroup/systemd\nsudo mount -t cgroup -o none,name=systemd cgroup /sys/fs/cgroup/systemd\n```\n### Reverse Proxy (route DNS to containers)\n\nNext step is to navigate to the docker/SERVER folder.\n\n```sh\nsudo docker-compose up -d\n``` \n\nThis will start both an Let's Encrypt container and Proxy container. These will redirect HTTP traffic to the correct chain containers.\n\nYou might need to find the correct names if these doesn't work, or if you have other networks you must change prefix.\n\nMore information: https://github.com/JrCs/docker-letsencrypt-nginx-proxy-companion\n\nWhen this is done, you must ensure local firewall has open traffic for TCP 80 and TCP 443. If you run server behind a gateway/router, you must forward public traffic on port 80 and 443 and route that to the IP address of your server.\n\n\n### Domain Names\n\nWhat domain names your explorer and indexer will respond to, is controlled by the VIRTUAL_HOST and LETSENCRYPT_HOST environment variables. You must edit these before you run up a chain.\n\n```yml\n    environment:\n      VIRTUAL_HOST: city.indexer.blockcore.net\n      LETSENCRYPT_HOST: city.indexer.blockcore.net\n      LETSENCRYPT_EMAIL: admin@blockcore.net\n```\n\nThen modify your DNS entry with your DNS provider to target your network public IP.\n\n\n### Running a chain\n\nAll supported chains should be located within the \"docker\" folder. Navigate to either of the sub-folders, and run a docker-compose with multiple file targets to ensure you run both indexer and explorer.\n\nHere is how you can run both indexer and explorer at the same time:\n\n```sh\nsudo docker-compose up -d\n``` \n\n### Running a DNS agent\n\nRunning a dns agent will allow your indexer to be discovered by explorers and wallets  \n\nFollow the isntructions here to deploy a dns agent  \nhttps://github.com/block-core/chaininfo/tree/master/docker/SERVER-DNS#deploy-a-dns-agent\n\n### Local Image Dependency (Optional)\n\nNormally your locally running Explorer, will attempt to request your Indexer, using public traffic. It will read the JSON configuration file hosted on chains.blockcore.net and forward traffic through your router. You can manually override this with the following instructions:\n\nYou can spin up both indexer and explorer locally, but it require a few minor edits. You must modify the listening ports of the indexer, \nso it doesn't attempt to use port 80, which also the explorer does.\n\nAdditionally you would need to modify the startup parameters for the explorer to use your localhost (docker-hosted) instance of the indexer.\n\n1. Make sure only port 9910 is mapped on the indexer, default it maps to both that and port 80.\n\n2. Add override argument to the command arguments in the explorer: --Explorer:Indexer:ApiUrl=http://127.0.0.1:9910/api/\n\n```yml\n   command: [\"--chain=CITY\", \"--Explorer:Indexer:ApiUrl=http://127.0.0.1:9910/api/\"]\n```\n\n\n### Clean Your Docker Instance\n\n```sh\n// Cleanup the majority of resources (doesn't delete volumes)\nsudo docker system prune -a\n```\n\n## Hosting Web Wallet\n\nThe wallet can run in multiple different modes, one of them is web (Progressive Web App, PWA). There are security and privacy risks by allowing users to run their wallet directly in the web browser.\n\nThe hosted web wallet will attempt to enforce users to run as installed PWA, instead of directly in browser. This can potentially increase security.\n\n```sh\ncd docker/BLOCKCORE/WALLET\nsudo sh ./wallet.sh 0.0.42\n# Restart the container which probably has not changed if run before, but needs a restart\n# after files has been replaced.\nsudo docker restart blockcore-wallet\n```\n\n## Debugging network issues\n\nThere are many things that can be problematic with a setup with reverse proxy, certificates, etc.\n\nHere are some useful debugging commands:\n\nOutput the configuration of the nginx reverse proxy:\n```\nsudo docker exec proxy cat /etc/nginx/conf.d/default.conf\n```\n\n\n## Examples\n\nNavigate into the chaininfo/docker/CHAIN folders and run these commands.\n\n\n### Spin up docker containers\n\n```sh\nsudo docker-compose up -d\nsudo docker network connect city_default proxy\n```\n\nAfter you start, you must connect the proxy network with the newly created network, like below:\n\n```sh\nsudo docker network connect blockcore_default proxy\nsudo docker network connect exos_default proxy\nsudo docker network connect ruta_default proxy\nsudo docker network connect city_default proxy\nsudo docker network connect btc_default proxy\nsudo docker network connect strat_default proxy\nsudo docker network connect x42_default proxy\nsudo docker network connect xds_default proxy\nsudo docker network connect xlr_default proxy\nsudo docker network connect implx_default proxy\nsudo docker network connect mol_default proxy\nsudo docker network connect xrc_default proxy\nsudo docker network connect home_default proxy\nsudo docker network connect serf_default proxy\nsudo docker network connect crs_default proxy\nsudo docker network connect tcrs_default proxy\nsudo docker network connect rsc_default proxy\nsudo docker network connect sbc_default proxy\nsudo docker network connect tstrax_default proxy\nsudo docker network connect strax_default proxy\nsudo docker network connect coinvault_default proxy\nsudo docker network connect cybits_default proxy\n```\n\nIf you host the paperwallet, you'll also need:\n```\nsudo docker network connect paperwallet_default proxy\n```\n\nAlso if you run mongo-express for debugging:\n\n```sh\nsudo docker network connect city_default mongo-express\n```\n\n### CHAINS\n\nTo run multichain explorer, navigate to the BLOCKCORE folder and run:\n\n```\nsudo docker-compose -f explorer.yml up -d\nsudo docker network connect blockcore_default proxy\n```\n\n## Hosting a DNS server\n\nA DNS server will allow you to expose indexers to the world     \n\nTo host a DNS server follow the instrucitons in the DNS server folder  \nhttps://github.com/block-core/chaininfo/tree/master/docker/SERVER-DNS\n\n\n## Additional docker information.\n\nUse the down command stop and start up again. This should remove container data, except persistent volumes.\n```\nsudo docker-compose down\n```\n\nLook into the running container\n```\nsudo docker exec -it xlr-chain /bin/bash\n```\n\nData folders are located in:\n```\n/root/.blockcore/xlr/\n```\n\n\n## Limiting Resource Usage\n\nMongoDB which is used for Blockcore Indexer, will often utilize a fair amount of memory if it can.\n\nIf you want to restrict this, especially if you run more than a single instance on the same machine, you can do the following:\n\n1. Configuring Ubuntu to Use Docker’s Limiting Resources Feature\n\n```\nsudo docker info\n```\n\nAt the end of this command output, you should see:\n\nWARNING: Noswaplimitsupport\n\n2. Enable SWAP limit support.\n\n```\nsudo nano /etc/default/grub\n```\n\nThen edit and add the following\n\n```\nGRUB_CMDLINE_LINUX=\"cgroup_enable=memory swapaccount=1\"\n```\n\nThen run:\n\n```\nsudo update-grub\n```\n\nNow you must restart your computer.\n\nAfter restart, run the same command to see if warning is gone:\n\n```\nsudo docker info\n```\n\n3. Limit a Container's Memory Access\n\nSet the `deploy.resources.limits` options in the docker-compose (v2.x) file and specifically for all the services.\n\n```\n  mongo:\n    container_name: xlr-mongo\n    image: mongo:5.0.12\n```\n\n4. Verify\n\nIf you run stats you can check if the container has an actual memory limit:\n\n```\nsudo docker stats\n```\n\nThen you can verify that MongoDB starts up with the restritions by looking in the log:\n\n```\nsudo docker logs -f xlr-mongo\n```\n\n# Blockcore Wallet Service (BWS)\n\nThe Blockcore Wallet Service is based upon a fork of Bitcore.\n\n```\ngit clone repo\n```\n\n```\n// Navigate to:\nCITY/BWS/\n```\n\n```\nsudo docker-compose up -d\n```\n\n\n# Debugging\n\n## MongoDB - Database corruption\n\nYou can run the following command to repair corrupted database for bws-mongo:\n\n```sh\ndocker run -it -v /var/lib/docker/volumes/city-bws-db/_data:/data/db -v /var/lib/docker/volumes/city-bws-db/_data:/data/configdb mongo:3.6.18 mongod --repair\n```\n\n## Backups\n\n```sh\nsudo cp -a /var/lib/docker/volumes/city-bws-db /home/blockcore/backup/docker/city-bws-db\n```\n\n## Top processes\n\n```sh\nsudo ps aux --sort -rss | head -10\n```\n\n\n# Logging\n\nIf left to run with default logging enabled, the containers will eventually use all available disk space for logging.\n\nEnsure you configure your daemon.json to keep log files in check:\n\nhttps://docs.docker.com/config/containers/logging/json-file/\n\n\n## System Wide Configuration\nConfigure ```/etc/docker/``` on Linux hosts or ```C:\\ProgramData\\docker\\config\\``` on Windows Servers.\n\n```\n{\n  \"log-driver\": \"json-file\",\n  \"log-opts\": {\n    \"max-size\": \"10m\",\n    \"max-file\": \"3\" \n  }\n}\n```\nFor the new configuration to take effect:\n\n* Stop all Containers\n* Restart the docker daemon\n* Recreate the containers \n\n\n## Container Specific Configuration\n\nModify the file ```docker\\\u003cCHAIN\u003e\\docker-compose.yml``` and include the ```logging``` section as per example:\n```\n chain:\n    container_name: btc-chain\n    mem_limit: 6000m\n    image: blockcore/node-multi:1.2.62\n    logging:\n        driver: \"json-file\"\n        options:\n            max-file: 5\n            max-size: 10m\n    .\n    .\n    .\n```\nOptions:\n* ``` max-size ``` - The maximum size of the log before it is rolled. A positive integer plus a modifier representing the unit of measure (k, m, or g)\n* ``` max-file ``` - The maximum number of log files that can be present. If rolling the logs creates excess files, the oldest file is removed. Only effective when max-size is also set. A positive integer\n\n## 10 largest files\n\n```\n# Available space:\ndf -h\n```\n\n```\ndu -a /var | sort -n -r | head -n 10\n```\n\n```\nfind . -type f -printf '%s %p\\n'| sort -nr | head -10\n```\n\n# mssql tipbot database restarts\n\nThe mssql container can get into trouble with the lock file.\n\nWhen that happens, the container keeps restarting and the log says:\n\n```sh\nsudo docker logs -t --tail 1000 city-tipbot-db\n```\n\n```\n2022-01-03T04:24:58.094242967Z \n2022-01-03T04:25:58.518057048Z SQL Server 2019 will run as non-root by default.\n2022-01-03T04:25:58.518070343Z This container is running as user mssql.\n2022-01-03T04:25:58.518072594Z Your master database file is owned by mssql.\n2022-01-03T04:25:58.518074227Z To learn more visit https://go.microsoft.com/fwlink/?linkid=2099216.\n2022-01-03T04:25:58.739964034Z sqlservr: Unable to read instance id from /var/opt/mssql/.system/instance_id: No such file or directory (2)\n2022-01-03T04:25:58.740007717Z /opt/mssql/bin/sqlservr: PAL initialization failed. Error: 101\n2022-01-03T04:25:58.740012125Z\n```\n\nThis can be fixed by renaming the lock file:\n\n```\n# Stop the container\nsudo docker stop city-tipbot-db\n\n# Inspect to find volume path:\nsudo docker inspect city-tipbot-db\n\n# Navigate to:\ncd /var/lib/docker/volumes/city-tipbot-db/_data/.system\n\n# Move the file\nmv instance_id instance_id.bak\n\nsudo docker start city-tipbot-db\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblock-core%2Fchaininfo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblock-core%2Fchaininfo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblock-core%2Fchaininfo/lists"}