Skip to content

Instantly share code, notes, and snippets.

@grayfallstown
Last active June 10, 2021 16:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save grayfallstown/8530acb84eb131d3dae074e4be23badb to your computer and use it in GitHub Desktop.
Save grayfallstown/8530acb84eb131d3dae074e4be23badb to your computer and use it in GitHub Desktop.
plot.ps1
# drive letters
$temp1 = "c:\PlotTemp"
$temp2 = "c:\PlotTemp"
$final = "p:\Plots"
$username = "test"
$chiaversion = "1.1.5"
# Find these value by running
# C:\Users\ <your username here> \AppData\Local\chia-blockchain\app-1.1.5\resources\app.asar.unpacked\daemon\chia.exe keys show
# in your powershell.
$publickey = "ac8e049..."
$fingerprint = "341...."
$host.ui.RawUI.WindowTitle = "plotting $temp1-$temp2-$final"
$BUFFER=3416
$THREADS=4
$BUCKETS=128
& "C:\Users\$username\AppData\Local\chia-blockchain\app-$chiaversion\resources\app.asar.unpacked\daemon\chia.exe" plots create --tmp_dir "$temp1" --tmp2_dir "$temp2" --final_dir "$final" --size 32 --buffer $BUFFER --num_threads $THREADS --buckets $BUCKETS --alt_fingerprint $fingerprint --pool_public_key $publickey 2>&1 | % ToString | Tee-Object -FilePath "C:\Users\$username\.chia\mainnet\plotter\$([GUID]::NewGUID().ToString('D')).log"
@jddeltoro
Copy link

Thankyou

@evr1ka
Copy link

evr1ka commented May 26, 2021

The version number $chiaversion can be taken as follows:
$(ls "$env:LOCALAPPDATA\chia-blockchain\app-*").name

@evr1ka
Copy link

evr1ka commented May 26, 2021

And the username:
$username = $($env:USERNAME)

And you can use $env:LOCALAPPDATA and put everything on one line:
"$($env:LOCALAPPDATA)\chia-blockchain$($(ls "$env:LOCALAPPDATA\chia-blockchain\app-*").name)\resources\app.asar.unpacked\daemon\chia.exe"

@grayfallstown
Copy link
Author

@evr1ka nice of you to post this. I wanted to keep the example as simple as possible so I do not get many support issues.

@evr1ka
Copy link

evr1ka commented May 27, 2021

@evr1ka nice of you to post this. I wanted to keep the example as simple as possible so I do not get many support issues.

I agree. The simpler the code, the clearer it is.)

@itongx
Copy link

itongx commented Jun 10, 2021

any chance to make log name tag similar to chia gui did

@grayfallstown
Copy link
Author

@itongx what do they look like?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment