Welcome to the dogechia-blockchain project! We are happy that you are taking a look at the code for DogeChia, a proof of space and time cryptocurrency.
A lot of fascinating new cryptography and blockchain concepts are used and implemented here. This repo includes the code for the DogeChia full node, farmer, and timelord (in dogechia folder), which are all written in python. It also includes a verifiable delay function implementation that it imports from the chiavdf repo (in c/c++), and a proof of space implementation that it imports from the chiapos repo. BLS signatures are imported from the bls-signatures repo as blspy. There is an additional dependency on the chiabip158 repo. For major platforms, binary and source wheels are shipped to PyPI from each dependent repo. Then dogechia-blockchain can pip install those from PyPI or they can be prepackaged as is done for the Windows installer. On unsupported platforms, pip will fall back to the source distributions, to be compiled locally.
If you want to learn more about this project, read the wiki, or check out the green paper.
Members of the DogeChia organization may create feature branches from the main
branch.
In the event an emergency fix is required for the release version of DogeChia, members of the DogeChia organization will create a feature branch from the current release branch 1.0.0
.
- All changes go into the main branch.
- Main is stable at all times, all tests pass.
- Features (with tests) are developed and fully tested on feature branches, and reviewed before landing in main.
- DogeChia Network's nodes on the public testnet are running the latest version
x.y.z
. - The
main
branch will have a long runningbeta testnet
to allow previewing of changes. - Pull Request events may require a
beta testnet
review environment. At the moment this is at the discretion of the reviewer. - Hotfixes land in the release branch they fix, and all later versions. (This will be achieved by regularly merging from
1.0.x
to main). - Hotfixes that are emergency fixes for a specific version will be merged into (???), and removed from down-stream branches. This allows future merges without issues.
- Whoever develops a hotfix is also responsible for merging it into all later branches.
- A release branch (e.g.
1.1.x
) will be cut prior to a release, in order to separate work that should go into the release from work going into the next major release (main branch). (This pre-release branch will also have abeta testnet
spun up for preview). - All Merge events will be squash merged.
The first time the tests are run, BlockTools will create and persist many plots. These are used for creating proofs of space during testing. The next time tests are run, this will not be necessary.
. ./activate
pip install ".[dev]"
black dogechia tests && mypy dogechia tests && flake8 dogechia tests
py.test tests -v --durations 0
The black library is used as an automatic style formatter to make things easier. The flake8 library helps ensure consistent style. The Mypy library is very useful for ensuring objects are of the correct type, so try to always add the type of the return value, and the type of local variables.
If you want verbose logging for tests, edit the tests/pytest.ini
file.
- Install python extension
- Set the environment to
./venv/bin/python
- Install mypy plugin
- Preferences > Settings > Python > Linting > flake8 enabled
- Preferences > Settings > Python > Linting > mypy enabled
- Preferences > Settings > Formatting > Python > Provider > black
- Preferences > Settings > mypy > Targets: set to
./dogechia
and./tests
Pycharm is an amazing and beautiful python IDE that some of us use to work on this project. If you combine it with python black and formatting on save, you will get a very efficient workflow.
- pip install black
- Run blackd in a terminal
- Install BlackConnect plugin
- Set to run python black on save
- Set line length to 120
- Install these linters https://github.com/DogeChia/dogechia-blockchain/tree/main/.github/linters
With the launch of 1.0.0
we will begin running an official testnet
.
Prior to the release of 1.1.0
there will be two running test nets. testnet
and transaction-beta-testnet
. The transaction-beta-testnet
testnet will be a beta of the pending 1.1 release, which will enable transactions on the dogechia blockchain.
Following the release of 1.1.0
, the official testnet
will include all changes that have been accepted to the current release branch.
Prior to proposing changes to main
, proposers should consider if running a beta testnet
review environment will make the reviewer more effective when evaluating a change.
Changes that impact the blockchain could require a review environment before acceptance into main
. This is at the discretion of the reviewer.
DogeChia organization members have been granted CI access to deploy beta testnets
.
If you are not a DogeChia organization member, you can enquire about deploying a beta testnet
in the public dev Discord channel.
To propose changes, please make a pull request to the main
branch. See Branching Strategy above.
To propose changes for the production releases of DogeChia, please make a pull request to the latest release branch.
By contributing to this repository, you agree to license your work under the Apache License Version 2.0, or the MIT License, or release your work to the public domain. Any work contributed where you are not the original author must contain its license header with the original author(s) and be in the public domain, or licensed under the Apache License Version 2.0 or the MIT License.