chia-blockchain
chia-blockchain copied to clipboard
Cmj.bladebit
Summary
This PR is made to prepare new bladebit
and its new options.
Will poke around chia plotters install bladebit
command.
Important changes
Windows/Ubuntu users who install GUI app from installer are now able to integrate bladebit
installed from git source code.
Currently the chia app always searches for bladebit bundled in chia app folder(s.t. %LocalAppData%\chia-blockchain\app-1.x.x\resources\app.asar.unpacked\daemon\bladebit\bladebit.exe) and never looks into $CHIA_ROOT/plotters/bladebit
.
This makes it difficult to use non-bundled version of bladebit
with CLI/GUI.
This PR will make the app first search $CHIA_ROOT/plotters/bladebit
and if it doesn't exist then it goes for bundled bladebit
.
Enabled bladebit update
Currently if bladebit is already installed on $CHIA_ROOT/plotters/bladebit
, it won't update/override existing bladebit.
But after applying this PR, you can speficy -o/--override
option to update/override installed bladebit.
example: chia plotters install bladebit -o
Enabled to specify git branch/tag/commit on installing bladebit from GitHub
You can speficy a commit of https://github.com/Chia-Network/bladebit by adding -c/--commit
option like this:
chia plotters install bladebit --commit a65f438f1e3acefca287dbc4bc14b2b141db6ee6
Added chia plotters version
command
$ chia plotters version
chiapos: 1.0.9
bladebit: 2.0.0.dev
Added chia plotters install bladebit2
command
If you already have bladebit
installed by chia plotters install bladebit
command, you can override it with:
chia plotters install bladebit2 -o
Added chia plotters bladebit2
command family
You can set options for bladebit2
now.
chia plotters bladebit2 [-r|--threads <n>] [-n|--count <number-of-plots-to-create>] [-f|--farmerkey <farmer-public-key>] [-p|--pool-key <pool-public-key>] [-c|--contract <pool-contract-address>] [-w|--warmstart] [-i|--id <plot-id>] [-v|--verbose] [-m|--nonuma] [-u|--buckets <n>] [-2 <t2 dir>] [--no-cpu-affinity] [--cache <n>] [--f1-threads <n>] [--fp-threads <n>] [--c-threads <n>] [--p2-threads <n>] [--p3-threads <n>] -t <t1 dir> -d <out_dir>
Confirmed to work
OS | arch | Result |
---|---|---|
Windows 10 | x86_64 | OK |
Ubuntu 22.04 | x86_64 | OK |
Amazon Linux 2 | x86_64 | No (cmake version available via yum is too old) |
RHEL 8.5 | x86_64 | OK |
Fedora 35 | x86_64 | OK |
macOS M1 | arm64 | OK |
How to try new bladebit
Currently new bladebit(version 2) will at least run on Windows, macOS, Ubuntu. Additionally, you need NodeJS>=16 when you run the GUI. The below is command line snippets for challengers.
### You can skip the lines below if you already have the git repo ###
cd /tmp # Any directory you like
mkdir bb2-test && cd bb2-test
git clone https://github.com/Chia-Network/chia-blockchain
cd chia-blockchain
### You can skip until here ###
### For macOS/Ubuntu users ###
git checkout cmj.bladebit
sh install.sh
. ./activate
sh install-gui.sh origin/cmj.bladebit
chia plotters install bladebit2 # This installs bladebit2 to $CHIA_ROOT/plotters/bladebit
chia plotters version # Make sure bb2 is installed
bash start-gui.sh
### For Windows users ###
git checkout cmj.bladebit
install.ps1
. venv\Scripts\Activate.ps1
# This only "git clone" bladebit2 to $CHIA_ROOT/plotters/bladebit (Usually <UserDir>\.chia\mainnet\plotters)
chia plotters install bladebit2
# Launch VisualStudio >= 2019 on $CHIA_ROOT/plotters/bladebit folder
# On the Developer PowerShell console in Visual Studio:
#
# PS> pwd # Check whether you are in ...\plotters\bladebit folder.
# PS> mkdir build
# PS> cd build
# PS> cmake ..
# PS> cmake --build . --target bladebit --config Release
#
chia plotters version # Make sure bb2 is installed
cd chia-blockchain-gui
npm ci
npm run build
npx lerna run dev:fast --scope=@chia/gui
This pull request introduces 1 alert when merging 1ea0f1dcf70d5eb4534da6d06dc732510ff007d2 into 3abcbf1dfa6cfcd5f9f5b47285e8bd5afe35f839 - view on LGTM.com
new alerts:
- 1 for Module-level cyclic import
This pull request introduces 1 alert when merging 1e1e0b160a1e6710aaebb6b403349aff54a19e77 into 3abcbf1dfa6cfcd5f9f5b47285e8bd5afe35f839 - view on LGTM.com
new alerts:
- 1 for Module-level cyclic import
This pull request introduces 1 alert when merging 4ef203d405bc257e75ad609dc6b9ddf722828b45 into 6268722992819a2aea574d4e6b557e1ce6c6347f - view on LGTM.com
new alerts:
- 1 for Module-level cyclic import
This pull request introduces 2 alerts when merging 7a69b5397148ef9024a3039744f483742b9fa912 into b693aeb407ac1e71bda7f4f1db09f6bcb7b87db4 - view on LGTM.com
new alerts:
- 1 for Unused import
- 1 for Module-level cyclic import
This pull request has conflicts, please resolve those before we can evaluate the pull request.
This pull request has conflicts, please resolve those before we can evaluate the pull request.
Conflicts have been resolved. A maintainer will review the pull request shortly.
This pull request has conflicts, please resolve those before we can evaluate the pull request.
Conflicts have been resolved. A maintainer will review the pull request shortly.
This pull request has conflicts, please resolve those before we can evaluate the pull request.
Conflicts have been resolved. A maintainer will review the pull request shortly.
This pull request has conflicts, please resolve those before we can evaluate the pull request.
Conflicts have been resolved. A maintainer will review the pull request shortly.
This pull request has conflicts, please resolve those before we can evaluate the pull request.
Conflicts have been resolved. A maintainer will review the pull request shortly.
This pull request has conflicts, please resolve those before we can evaluate the pull request.
Conflicts have been resolved. A maintainer will review the pull request shortly.
This pull request introduces 1 alert when merging f51f81edd16707101c5b51b40987f4be72482771 into beaead85988ed7eca3185883e460c63d359a63b3 - view on LGTM.com
new alerts:
- 1 for Module is imported with 'import' and 'import from'
This pull request has conflicts, please resolve those before we can evaluate the pull request.
Conflicts have been resolved. A maintainer will review the pull request shortly.
This pull request introduces 11 alerts when merging 75d4a2140a36cbf601f23d4051cc97f46a13b24e into 467378de030cf688702f84937f991e4424d2769b - view on LGTM.com
new alerts:
- 11 for Module-level cyclic import
This pull request introduces 11 alerts when merging 0e6cdc1a1c7cbf455b53c68c119c65bc318af620 into 289b9306201c6e453255658eef35772eaa494cf3 - view on LGTM.com
new alerts:
- 11 for Module-level cyclic import
This pull request introduces 11 alerts when merging 0e5ce72ae6c67f86f71b95b125ab95dbe54b9284 into 199d98935223fca74df72e8ff23a7659ddaae05f - view on LGTM.com
new alerts:
- 11 for Module-level cyclic import
This PR does not assure you to make an installer which bundles bladebit2
In order to make installers which contains production ready bladebit2 binary, bladebit 2.0.0 (without alpha/beta suffix) must be released on GitHub Repository
@ChiaMineJP I appreciate all the hard work that went into making this as simple as possible for installing BB2.
Going forward, I think we need to seriously consider an alternative way for our source-based users to get BB2 and madmax plotters -- ideally through prebuilt packages. That should greatly simplify the chia plotters code and avoid complicated maintenance. In general I'd like to avoid scripting the build process since there are so many places where the process can breakdown.
Also we should add some tests to cover the affected code. I'll add a separate task to track that work.