Skip to main content

Blockchain solution to domain name trustworthy

Project description

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.

Via pipx (recommended for end users)

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

Via pip (recommended for application developers)

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.

Recommended develpoment setup

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)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bchosttrust-0.0.4.tar.gz (23.2 kB view hashes)

Uploaded Source

Built Distribution

bchosttrust-0.0.4-py3-none-any.whl (42.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page