Skip to main content

BCHostTrust - Reference Implementation

This repository is the reference implementation of BCHostTrust, a distributed database of domain name trustworthiness. It uses the concept of blockchain, a growing list of records linked together via cryptographic hashes, in which SHA3-256 is used in BCHostTrust. More detailed information can be found at documents/tech_paper/README.md.

DISCLAIMER: DESPITE USING SIMILAR TECHNOLOGIES, THIS PROJECT IS NOT RELATED TO CRYPTOCURRENCY!

Installation

To use BCHostTrust, Python 3.11 is required.

In order to use the command-line tool, it is recommended to install it via pipx, which runs BCHostTrust in an dedicated virtual environment, isolating it from potential dependency problems. pipx is usually provided via your operating system's package repository, after installing it, run the following command:

pipx ensurepath  # This ensures pipx is properly configured
pipx install bchosttrust

After that, you can run the following command to verify if the installation is working properly:

$ bcht version
BCHostTrust Reference Implementation, version 0.0.0

To import BCHostTrust into your projects, install the package via pip after activating the virtual environment:

pip install bchosttrust

After that, run the following in a Python console to verify the installation:

>>> import bchosttrust
>>> bchosttrust.__version__
"0.0.0"

Installing BCHostTrust directly user-wide or system-wide is discouraged as it may cause conflicts between versions or system packages.

API Usage

The API of BCHostTrust is well-documented in their respective docstrings. Take a look before writing your code on top of BCHostTrust.

All parameters passed into the functions are forced to follow the hinted type, thanks to the usage of typeguard. You should run your code in debug mode (the default in most cases) to see if your code is violating any of the type hints. After that, you may run your well-tested code in optimized mode to avoid performance overheads.

Contribution

We welcome all kinds of contributions to the BCHostTrust project. You may join in the following ways:

  1. Opening an issue. This can be either requesting for new features or reporting misbehaviors. By sending feedback to us, we can improve the protocol and the application.
  2. Submiting your codes. If you are keen on working on codes, you can submit your own by opening a pull request. By doing so, the codebase can be improved collectively.

It is recommended to have the following before starting your journey in development:

  1. Visual Studio Code, an highly customizable code editor with built-in git integration and a broad of extensions.
  2. Pylint, a static code analyzer that can detect more potential errors and mistakes than other analyzers. It can be integrated into VSCode by the Pylint extension.
  3. autopep8, an extension of VSCode automatically formats your code to fit the standard as specified in PEP 8. It should be configured properly in accordance with its documentation.

To start, create your own fork to work on. Refer to GitHub's documentation for how to operate with forks.

After that, clone the repository to your local machine:

# Using SSH
git clone ssh://git@github.com/[your username]/bchosttrust

# Using GitHub CLI
gh repo clone [your username]/bchosttrust

After that, create an virtual environment and install BCHostTrust in development mode:

# Go into BCHostTrust directory
cd bchosttrust

# Create and activate a virtual environment
python -m venv .venv
source .venv/bin/activate # or .venv\Scripts\activate on Windows

# Install BCHostTrust in develpoment mode
pip install --editable .

Done! Now you can work on BCHostTrust. Don't forget to push your changes to your fork and file a pull request.

Roadmap

  • Prototype
    • Blockchain Core
    • Basic Proof-of-work Mechanism
    • Chain Search and Analysis
    • Command-line client
  • Configuration file for command-line
  • Block exchange protocol
  • Browser integration (probably in dedicated repository)

Metadata

Release files for bchosttrust 0.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bchosttrust 0.0.4
File Size Uploaded Provenance Actions
bchosttrust-0.0.4.tar.gz 23.2 kB Without provenance Details for bchosttrust-0.0.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for bchosttrust 0.0.4
File Interpreter ABI Platform Actions
bchosttrust-0.0.4-py3-none-any.whl Python 3 none any Details for bchosttrust-0.0.4-py3-none-any.whl

Total release size: 65.6 kB

Release files / bchosttrust-0.0.4.tar.gz

Download URL bchosttrust-0.0.4.tar.gz
Size 23.2 kB
Tags Source
SHA-256 checksum
How to use checksums
e0b7c643b8f37e4be13c345dab2ca65145005c1df48e853f87bd0d47416327d8
BLAKE2b-256 checksum
How to use checksums
820e086755c7fdb36c5a4a8f5fc9c5abd99d121c82e2635e3f44ad4070784cd0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.2 CPython/3.11.7

Release files / bchosttrust-0.0.4-py3-none-any.whl

Download URL bchosttrust-0.0.4-py3-none-any.whl
Size 42.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f9b76d5232ff955c4967de3df2854579d970025e1a2864144ace783262d47fd9
BLAKE2b-256 checksum
How to use checksums
14260567e4db0f98ad04f1f4b8577190edc5bca9059f4203d7783a65a775613b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.2 CPython/3.11.7

Security for bchosttrust 0.0.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page