{"id":19573953,"url":"https://github.com/hexresearch/hschain","last_synced_at":"2026-02-27T22:09:40.490Z","repository":{"id":48055251,"uuid":"128362488","full_name":"hexresearch/hschain","owner":"hexresearch","description":null,"archived":false,"fork":false,"pushed_at":"2023-01-18T14:16:09.000Z","size":8546,"stargazers_count":4,"open_issues_count":65,"forks_count":0,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-04-27T05:33:30.974Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hexresearch.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}},"created_at":"2018-04-06T07:17:16.000Z","updated_at":"2021-11-05T12:22:02.000Z","dependencies_parsed_at":"2023-02-10T15:30:52.105Z","dependency_job_id":null,"html_url":"https://github.com/hexresearch/hschain","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/hexresearch/hschain","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hexresearch%2Fhschain","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hexresearch%2Fhschain/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hexresearch%2Fhschain/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hexresearch%2Fhschain/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hexresearch","download_url":"https://codeload.github.com/hexresearch/hschain/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hexresearch%2Fhschain/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29917209,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-27T19:37:42.220Z","status":"ssl_error","status_checked_at":"2026-02-27T19:37:41.463Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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:37:07.372Z","updated_at":"2026-02-27T22:09:40.475Z","avatar_url":"https://github.com/hexresearch.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# HSchain\n\n[![Build Status](https://drone.hxr.dev/api/badges/hexresearch/hschain/status.svg)]()\n\nHSchain is a collection of packages for blockchain development. Currently only\nPBFT-based consensus algorithms is implemented. PoW development is under way.\nFollowing packages could be conidered relatively stable:\n\n - **hschain-crypto** — wrappers for cryptography which work both on GHC and\n   GHCJS.\n\n - **hschain-merkle** — data structures for Merkle trees.\n\n - **hschain-control** — various utilities for control flow and concurrency.\n\n - **hschain-types** — data types for hschain. It's split into separate package\n   to make possible to reuse data type in GHCJS.\n\n - **hschain** — implementation of PBFT-based consensus engine.\n\n - **hschain-examples** — examples and tests for hschain.\n\nRest of packages in repository are highly experimental.\n\n\n\n# Development\n\n## Nix\n\nStandard way of working on hschain is to use [Nix](https://nixos.org/) to set up\ndevelopment environment. To use this method one need to [install\nNix](https://nixos.wiki/wiki/Nix_Installation_Guide) unless it's not already\ndone. After that one only need to type\n\n```\n$ nix-shell\n```\nin project root. After new-style cabal should be used. For example:\n```\n$ cabal new-build all\n```\n\nNote that if project directory contains `.ghc.environment.*` files created by\nnew-style cabal commands build will fail.\n\n## Cabal\n\nIt's possible to use cabal without nix but one'll have to install required C\nlibraries manually (some configurations require libsodium)\n\n## Stack\n\nIt's also possible to use\n[stack](https://docs.haskellstack.org/en/stable/README/) for development\n\n```\nstack build\n```\n\n# Build with `docker`\n\nDocker image https://github.com/phadej/docker-ghc can be used to build project.\n\nExecutables are compatable with Ubuntu 18.04.\n\nSteps to build:\n\n* Download docker image: `docker pull phadej/ghc:8.6.5-bionic`\n* Login into: `docker run -it --rm --mount type=bind,src=$PWD,target=/project --workdir /project phadej/ghc:8.6.5-bionic /bin/bash --login`\n* Now in image:\n    * Update cabal db: `cabal new-update`\n    * Build exe: `cabal new-build hschain-dioxane-node --flags=\"-libsodium\"`. Note turned off flag `libsodium`, so it is not need to install `libsodium` library in image.\n    * Last output of `cabal` will contain path to built executable.\n\n\n# Build docker image\n\n```\ncd nix\nbuild-docker.sh\n```\n\nAll info about building docker images by `nix` I found\n[here](https://github.com/Gabriel439/haskell-nix/blob/master/project3/README.md#minimizing-the-closure).\n\nWhen that command is finished you will have `result` simlink that refers to the docker image in tar archive format.\n\n`build-docker.sh` loads this archive into local docker image.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhexresearch%2Fhschain","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhexresearch%2Fhschain","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhexresearch%2Fhschain/lists"}