{"id":15063900,"url":"https://github.com/concordium/concordium-base","last_synced_at":"2025-04-04T13:05:02.559Z","repository":{"id":37077637,"uuid":"352547321","full_name":"Concordium/concordium-base","owner":"Concordium","description":"Core Rust and Haskell libraries used by various components of the Concordium blockchain, as well as some tools used for testing and development.","archived":false,"fork":false,"pushed_at":"2025-03-21T13:44:03.000Z","size":34382,"stargazers_count":25,"open_issues_count":18,"forks_count":23,"subscribers_count":10,"default_branch":"main","last_synced_at":"2025-03-25T03:15:05.126Z","etag":null,"topics":["blockchain","cryptography","haskell","rust","wasm","zero-knowledge-proofs"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Concordium.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}},"created_at":"2021-03-29T07:03:08.000Z","updated_at":"2025-03-18T13:30:08.000Z","dependencies_parsed_at":"2023-10-01T16:38:30.601Z","dependency_job_id":"cbecc5dd-606c-40c6-b872-40d8dbeae8c2","html_url":"https://github.com/Concordium/concordium-base","commit_stats":{"total_commits":4012,"total_committers":50,"mean_commits":80.24,"dds":0.6149052841475573,"last_synced_commit":"092edb7dc8e0729409537115b56ba99901815e6b"},"previous_names":[],"tags_count":91,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Concordium%2Fconcordium-base","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Concordium%2Fconcordium-base/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Concordium%2Fconcordium-base/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Concordium%2Fconcordium-base/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Concordium","download_url":"https://codeload.github.com/Concordium/concordium-base/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246026103,"owners_count":20711580,"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":["blockchain","cryptography","haskell","rust","wasm","zero-knowledge-proofs"],"created_at":"2024-09-25T00:08:33.200Z","updated_at":"2025-03-28T12:03:18.257Z","avatar_url":"https://github.com/Concordium.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# concordium-base\n\nThis repository contains core Rust and Haskell libraries used by various\ncomponents of the Concordium blockchain, as well as some tools used for testing\nand development.\n\n[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.0-4baaaa.svg)](https://github.com/Concordium/.github/blob/main/.github/CODE_OF_CONDUCT.md)\n\n## Haskell modules\n\n### [haskell-src](./haskell-src)\n\nContains the Haskell package `concordium-base` which contains\n\n- foreign imports of rust libraries that are needed in the rest of the project\n- basic type definitions, e.g., account address, block hash, with serializations\n  and basic functionality. These are used consistently throughout the rest of\n  the project.\n\n### [haskell-tests](./haskell-tests/)\n\nUnit tests of the `concordium-base` Haskell library.\n\n### [haskell-bench](./haskell-bench/)\n\nBenchmarks of some functions that are of interest. This is ad-hoc and functions\nare added there by need.\n\n### [generate-update-keys](./haskell-bins/generate-update-keys)\n\nIs a utility for generating authorization keys for different kinds of updates.\nIt is used for generating such keys for internal testing. The key generation it\nsupports is not very secure.\n\n### [genesis](./haskell-bins/genesis/)\n\nIs a tool that takes all the parameters, accounts, and other data that goes into\na genesis block, and combines them into a single file that is needed to start\nthe node.\n\n### [testdata](./testdata/)\n\nContains auxiliary data files used by Haskell tests.\n\n### Rust modules\n\n### [rust-src](./rust-src)\n\nContains\n- definitions of some core datatypes, such as account addresses, hashes,\n  as well as serialization and basic functionality.\n- implementations of all custom cryptographic protocols used by Concordium,\n  e.g., custom sigma proofs, implementation of bulletproofs, and top-level\n  functionality for anonymity revokers, identity providers, and the account\n  holders.\n\n### [idiss](./idiss)\n\nThis is the wrapper around the functionality in the [id](./rust-src/id) library\nthat exports the functionality needed by the identity provider in the format\nthat they need it. The library is currently tailored to be used from NodeJS.\n\n`idiss` is an acronym, standing for \"identity issuer\".\n\n### [identity-provider-service](./identity-provider-service)\n\nIs a prototype implementation of a pure Rust identity provider we use for\ntesting.\n\n### [mobile_wallet](./mobile_wallet)\n\nThis contains thin wrappers around the [wallet](./rust-src/wallet/) library that\nexposes the necessary functions in a format suitable for use from Android and\niOS platforms, respectively.\n\n### [rust-bins](./rust-bins/)\n\nContains various utilities that are used for testing and prototyping. From key generation to\ngeneration to tools for analyzing the chain.\n\nSee documentation for\n- [id-client](./rust-bins/docs/id-client.md) (identity layer interactions for testing)\n- [keygen tool](./rust-bins/docs/keygen.md) key generation for identity\n  providers and anonymity revokers\n- [keygen genesis](./rust-bins/docs/keygen-genesis.md) (this uses a different\n  key generation procedure that allows key recovery from a seed phrase)\n\n# Build requirements.\n\nIn order to build the components in this repository you need\n- The [cargo](https://doc.rust-lang.org/cargo/) tool for building the Rust\ncomponents. The currently supported version is 1.82. Others may work, but we\ndo not regularly test with them. The easiest way to install it is via the\n[rustup](https://rustup.rs/) tool.\n- The [Haskell Stack](https://docs.haskellstack.org/en/stable/README/) tool for\nbuilding the Haskell components.\n- [protoc](https://github.com/protocolbuffers/protobuf/releases) \u003e= 3.15\n  installed and on PATH.\n\nSome Rust components may require additional dependencies, see\n[mobile_wallet/README.md](./mobile_wallet/README.md) and\n[idiss/README.md](./idiss/README.md) for details.\n\n\n# Contributing\n\n## Haskell workflow\n\nWe typically use [stack](https://docs.haskellstack.org/en/stable/README/) to\nbuild, run, and test the code. In order to build the haskell libraries the rust\ndependencies must be pre-build, which is done automatically by the cabal setup\nscript.\n\nCode should be formatted using [`fourmolu`](https://github.com/fourmolu/fourmolu)\nversion `0.13.1.0` and using the config `fourmolu.yaml` found in the project root.\nThe CI is setup to ensure the code follows this style.\n\nTo check the formatting locally run the following command from the project root:\n\n\n**On unix-like systems**:\n\n```\n$ fourmolu --mode check $(git ls-files '*.hs')\n```\n\nTo format run the following command from the project root:\n\n**On unix-like systems**:\n\n```\n$ fourmolu --mode inplace $(git ls-files '*.hs')\n```\n\nLines should strive to be at most 100 characters, naming and code style should\nfollow the scheme that already exists.\n\nWe do not use any linting tool on the CI. Running hlint might uncover common\nissues.\n\n## Rust workflow\n\nWe use **stable version** of rust, 1.82, to compile the code. The minimal\nsupported rust version is 1.73.\n\nThe CI is configured to check two things\n- the [clippy](https://github.com/rust-lang/rust-clippy) tool is run to check\n  for common mistakes and issues. We try to have no clippy warnings. Sometimes\n  what clippy thinks is not reasonable is necessary, in which case you should\n  explicitly disable the warning on that site (a function or module), such as\n  `#[allow(clippy::too_many_arguments)]`, but that is a method of last resort.\n  Try to resolve the issue in a different way first.\n\n- the [rust fmt](https://github.com/rust-lang/rustfmt) tool is run to check the\n  formatting. Unfortunately the stable version of the tool is quite outdated, so\n  we use a nightly version, which is updated a few times a year. Thus in order\n  for the CI to pass you will need to install the relevant nightly version, see\n  see the `rustfmt` job in the file [.github/workflows/build-test-sources.yaml](.github/workflows/build-test-sources.yaml),\n  look for `nightly-...`).\n\n## Overall workflow\n\nThe typical workflow should be the following.\n- make changes, commit and push on a separate branch\n- make a merge request to merge your branch into master. Assign somebody else\n  with knowledge of the code to review the changes before they are merged.\n\n# Licenses\n\nMost of the sources in this repository are licensed under [MPL-2.0](./LICENSE).\nSome Rust packages are licensed under [APACHE-2.0](./LICENSE-APACHE). The\n`license` field in Cargo.toml package indicates which license the sources in\nthat package are under.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconcordium%2Fconcordium-base","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fconcordium%2Fconcordium-base","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconcordium%2Fconcordium-base/lists"}