To contribute to BlockChain class and it’s working, you need to know:
- Rust Programming Language.
- Python Programming Language.
- pyo3 crate of rust.
- maturin library of python.
If the requirements are met, fork the repository, clone it and create a new branch:
git clone https://github.com/your-username-here/modstore.git
git checkout -b 'feature-name'
Make sure you add descriptive commit messages. To push them:
git push -u origin 'feature-name'
After that create a pull request and I will look into it.
Requirements to be installed:
Make sure you have python and rust installed.
pip install maturin
The files that you need to be concerned with:
- ‘src/blockchain.rs’ for changing internal blockchain working logic.
- ‘src/lib.rs’ for changing any module specific feature. This file incorporates both BlockChain and DAG inside a binary called
_binaries
. - ‘pysrc/_binaries.pyi’ for defining any changed feature’s type declaration. Note that when the library is built using maturin, a
binaries.so
will be created. Thebinaries.pyi
file is the static type declaration file for the same. Thebinaries.so
file is os-dependent and therefore make sure you don’t push it to git. It is supposed to be built during wheel generation and is not needed as it is a bin file and not source code. - ‘pysrc/rust/blockchain.py’ for adding the changes in the wrapper class that will be used by the user. This file contains a wrapper class so that the user does not have to interact with the rust binary directly. Instead the user deals with a safely designed structure.