Skip to content

Commit

Permalink
Merge pull request #917 from guydavis/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
guydavis authored Aug 21, 2023
2 parents 83b082f + 8e590e1 commit f0c80a1
Show file tree
Hide file tree
Showing 21 changed files with 32 additions and 49 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/develop-chia.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
"UBUNTU_VER=jammy"
"MACHINARIS_STREAM=develop"
"CHIADOG_BRANCH=dev"
"CHIA_BRANCH=main"
"CHIA_BRANCH=release/2.0.0"
"BLADEBIT_BRANCH=cuda-compression"
"MADMAX_BRANCH=master"
"PLOTMAN_BRANCH=compress"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/main-chia.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
build-args: |
"UBUNTU_VER=jammy"
"MACHINARIS_STREAM=latest"
"CHIA_BRANCH=release/1.8.2"
"CHIA_BRANCH=release/2.0.0"
"MADMAX_BRANCH=v1.8.2.giga14"
"BLADEBIT_BRANCH=cuda-compression"
tags: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-chia.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
"UBUNTU_VER=jammy"
"MACHINARIS_STREAM=test"
"CHIADOG_BRANCH=dev"
"CHIA_BRANCH=release/1.8.2"
"CHIA_BRANCH=release/2.0.0"
"PLOTMAN_BRANCH=development"
"BLADEBIT_BRANCH=cuda-compression"
"MADMAX_BRANCH=v1.8.2.giga14"
Expand Down
13 changes: 5 additions & 8 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,20 @@

All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased] - 2023-?-?
## [2.0.0] - 2023-08-?
### Added
- [Chia](https://docs.google.com/document/d/1MSJ8JzAQGDGrnEzdr4zK4IcTDbokJfpHypn8Dt60Mx8/) - Beta GPU-farming, requires manual config changes. [Status](https://github.com/Chia-Network/chia-blockchain/issues)
- Request a new plot check, via 'Recheck' button added to Check results dialog on Farming page.
- Optionally exclude certain plot directories from replotting check to free disk space. Useful for drives only partially dedicated to holding plots.
### Changed
- Deprecated stale blockchains, by hiding from Worker wizards: BPX, N-Chain, Silicoin, Stor
- Deprecated stale blockchains, by hiding them from Worker wizards: BPX, N-Chain, Silicoin, Stor
### Updated
- [Bladebit](https://github.com/Chia-Network/bladebit/releases/tag/v3.0.0-rc1) to 3.0.0rc1.
- [Cactus](https://github.com/Cactus-Network/cactus-blockchain/releases/tag/1.8.1) to v1.8.1
- [Chia](https://github.com/Chia-Network/chia-blockchain/releases/tag/2.0.0-rc3) to v2.0.0.
- [Bladebit](https://github.com/Chia-Network/bladebit/releases/tag/v3.0.0) to 3.0.0.
- [Cactus](https://github.com/Cactus-Network/cactus-blockchain/releases/tag/2.0.0) to v2.0.0
- [Chia](https://github.com/Chia-Network/chia-blockchain/releases/tag/2.0.0) to v2.0.0.
- [Gigahorse](https://github.com/madMAx43v3r/chia-gigahorse/releases/tag/v1.8.1.giga14) to v1.8.1.giga14.
- [HDDCoin](https://github.com/HDDcoin-Network/hddcoin-blockchain/releases/tag/3.0.0) to 3.0.0 based on Chia 1.8.2.
- [MMX](https://github.com/madMAx43v3r/mmx-node/releases/tag/v0.10.6) to v0.10.6.
- [Wheat](https://github.com/wheatnetwork/wheat-blockchain/releases/tag/1.8.2) to v1.8.2.
### Notes
- Support for new blockchains and tools DOES NOT imply my endorsement for them. *Only run those you are comfortable with.*

## [1.8.2] - 2023-06-28
## Updated
Expand Down
1 change: 1 addition & 0 deletions CREDITS.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ A big thanks to all that contributed with dev and test including:
* @miguell
* @slowfinger
* @ToTo
* @Finball

## Trademark Notice
CHIA NETWORK INC, CHIA™, the CHIA BLOCKCHAIN™, the CHIA PROTOCOL™, CHIALISP™ and the “leaf Logo” (including the leaf logo alone when it refers to or indicates Chia), are trademarks or registered trademarks of Chia Network, Inc., a Delaware corporation. *There is no affliation between this Machinaris project and the main Chia Network project.*
6 changes: 0 additions & 6 deletions api/commands/chia_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,19 +169,13 @@ def restart_farmer(blockchain):
Popen("nohup sh -c '{0}' >/dev/null 2>&1 &".format(cmd), cwd=working_dir, stdout=PIPE, stderr=PIPE, shell=True)

def start_wallet(blockchain):
if blockchain == 'gigahorse':
app.logger.info("Gigahorse doesn't run it's own wallet. Machinaris uses the wallet of the main Chia container instead.")
return
chia_binary = globals.get_blockchain_binary(blockchain)
working_dir = globals.get_blockchain_working_dir(blockchain)
cmd = "{0} start wallet -r".format(chia_binary)
app.logger.info("Executing wallet start: {0}".format(cmd))
Popen("nohup sh -c '{0}' >/dev/null 2>&1 &".format(cmd), cwd=working_dir, stdout=PIPE, stderr=PIPE, shell=True)

def pause_wallet(blockchain):
if blockchain == 'gigahorse':
app.logger.info("Gigahorse doesn't run it's own wallet. Machinaris uses the wallet of the main Chia container instead.")
return
chia_binary = globals.get_blockchain_binary(blockchain)
working_dir = globals.get_blockchain_working_dir(blockchain)
if globals.legacy_blockchain(blockchain): # Old chains will stop fullnode(!) if ask to stop just the wallet...
Expand Down
3 changes: 2 additions & 1 deletion api/commands/websvcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,9 @@ def cold_wallet_farmed_balance(blockchain):

# Only for Chia on the controller for now.
def cold_wallet_farmed_most_recent_date(blockchain):
if blockchain != 'chia':
if blockchain != 'chia' and blockchain != 'gigahorse':
raise Exception("Most recent cold wallet farmed block lookup not supported off controller.")
blockchain = 'chia' # Treat gigahorse like chia
most_recent_farmed_block_time = 0 # Seconds since epoch
addresses_per_blockchain = load_cold_wallet_addresses()
if blockchain in addresses_per_blockchain:
Expand Down
4 changes: 2 additions & 2 deletions api/schedules/stats_effort.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def collect():
current_datetime = datetime.datetime.now().strftime("%Y%m%d%H%M")
blockchain = globals.enabled_blockchains()[0]
try:
if blockchain in ['gigahorse', 'mmx']:
if blockchain in ['mmx']:
app.logger.debug("Unable to calculate effort for MMX blockchain. Only Chia and forks supported.")
return
farm_summary = chia_cli.load_farm_summary(blockchain)
Expand All @@ -72,7 +72,7 @@ def collect():
most_recent_block_reward_time = transaction.created_at_time
break
# For Chia only (on the controller), check for a more recently farmed block time in cold wallet transactions
if blockchain == 'chia':
if blockchain in ['chia', 'gigahorse']:
most_recent_block_reward_time_cold_wallet = websvcs.cold_wallet_farmed_most_recent_date(blockchain) # Order is reversed; newest to oldest
if most_recent_block_reward_time < most_recent_block_reward_time_cold_wallet:
app.logger.info("At {0}, a more recent cold wallet fee reward was found.".format(readable(most_recent_block_reward_time_cold_wallet)))
Expand Down
2 changes: 1 addition & 1 deletion api/schedules/status_plotnfts.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def update():
with app.app_context():
try:
for blockchain in globals.enabled_blockchains():
if not blockchain in ['chia', 'chives']:
if not blockchain in ['chia', 'chives', 'gigahorse']:
continue
hostname = utils.get_hostname()
plotnfts = pools_cli.load_plotnft_show(blockchain)
Expand Down
2 changes: 1 addition & 1 deletion api/schedules/status_pools.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def update():
blockchain_rpc = rpc.RPC()
try:
for blockchain in globals.enabled_blockchains():
if not blockchain in ['chia', 'chives']:
if not blockchain in p.POOLABLE_BLOCKCHAINS:
continue
payload = []
hostname = utils.get_hostname()
Expand Down
4 changes: 1 addition & 3 deletions api/schedules/status_wallets.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@ def update():
try:
blockchain = globals.enabled_blockchains()[0]
hostname = utils.get_hostname()
if blockchain == 'gigahorse':
return # Gigahorse is Chia blockchain with proprietary plot files, no wallet running
elif blockchain == 'mmx':
if blockchain == 'mmx':
public_wallet = mmx_cli.load_wallet_show(blockchain)
else:
public_wallet = chia_cli.load_wallet_show(blockchain)
Expand Down
5 changes: 4 additions & 1 deletion common/config/globals.py
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,10 @@ def wallet_running():
blockchain = enabled_blockchains()[0]
if blockchain == 'mmx':
return True # Always running for MMX
chia_binary_short = get_blockchain_binary(blockchain).split('/')[-1]
if blockchain == 'gigahorse':
chia_binary_short = 'chia' # wallet process is 'chia_wallet'
else:
chia_binary_short = get_blockchain_binary(blockchain).split('/')[-1]
try:
cmd = "pidof {0}_wallet".format(chia_binary_short)
proc = Popen(cmd, stdout=PIPE, stderr=PIPE, shell=True)
Expand Down
4 changes: 2 additions & 2 deletions scripts/forks/cactus_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
#

CACTUS_BRANCH=$1
# On 2023-05-19
HASH=8c7956d9fdd751235824af2630d472ccd77fa936
# On 2023-08-20
HASH=9144b99fa71baa9ab84c178b0fe0cf539613514f

if [ -z ${CACTUS_BRANCH} ]; then
echo 'Skipping Cactus install as not requested.'
Expand Down
6 changes: 2 additions & 4 deletions scripts/forks/chia_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,10 @@ else
echo "Installing Chia CUDA binaries on ${arch_name}..."
cd /tmp
if [[ "${arch_name}" = "x86_64" ]]; then
curl -sLJO https://github.com/Chia-Network/chia-blockchain/releases/download/2.0.0-rc3/chia-blockchain-cli_2.0.0rc3-1_amd64.deb
unzip *.zip
curl -sLJO https://github.com/Chia-Network/chia-blockchain/releases/download/2.0.0-rc6/chia-blockchain-cli_2.0.0rc6-1_amd64.deb
apt-get install ./chia-blockchain-cli*.deb
elif [[ "${arch_name}" = "arm64" ]]; then
curl -sLJO https://github.com/Chia-Network/chia-blockchain/releases/download/2.0.0-rc3/chia-blockchain-cli_2.0.0rc3-1_arm64.deb
unzip *.zip
curl -sLJO https://github.com/Chia-Network/chia-blockchain/releases/download/2.0.0-rc6/chia-blockchain-cli_2.0.0rc6-1_arm64.deb
apt-get install ./chia-blockchain-cli*.deb
else
echo "Installing Chia CUDA binaries skipped -> unsupported architecture: ${arch_name}"
Expand Down
9 changes: 7 additions & 2 deletions scripts/forks/gigahorse_launch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,14 @@ chmod 755 -R /root/.chia/mainnet/config/ssl/ &> /dev/null

/usr/bin/bash /machinaris/scripts/gpu_drivers_setup.sh

# Start services based on mode selected. Always skip a duplicate Chia wallet launch
# Start services based on mode selected.
if [[ ${mode} =~ ^fullnode.* ]]; then
/chia-gigahorse-farmer/chia.bin start farmer-no-wallet
if [ -f /root/.chia/machinaris/config/wallet_settings.json ]; then
/chia-gigahorse-farmer/chia.bin start farmer-no-wallet
else
/chia-gigahorse-farmer/chia.bin start farmer
/chia-gigahorse-farmer/chia.bin start wallet
fi
elif [[ ${mode} =~ ^farmer.* ]]; then
/chia-gigahorse-farmer/chia.bin start farmer-only
elif [[ ${mode} =~ ^harvester.* ]]; then
Expand Down
2 changes: 0 additions & 2 deletions web/actions/plotman.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,6 @@ def load_key_pk(type, blockchain):

def load_pool_contract_address(blockchain):
pool_blockchain = blockchain
if blockchain == 'gigahorse': # Use the pool settings for Chia when checking for Gigahorse
pool_blockchain = 'chia'
plotnfts = p.load_plotnfts_by_blockchain(pool_blockchain)
if len(plotnfts.rows) == 1:
m = re.search('Pool contract address .*: (\w+)'.format(type), plotnfts.rows[0]['details'])
Expand Down
2 changes: 0 additions & 2 deletions web/actions/pools.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,6 @@ def send_request(fullnode, selected_blockchain, launcher_ids, choices, pool_urls
def get_pool_configs():
configs = {}
for blockchain in po.POOLABLE_BLOCKCHAINS:
if blockchain == 'gigahorse':
continue
plotnfts = db.session.query(pn.Plotnft).filter(pn.Plotnft.blockchain == blockchain).all()
wallets = db.session.query(w.Wallet).filter(w.Wallet.blockchain == blockchain).all()
configs[blockchain] = PoolConfigs(blockchain, plotnfts, wallets)
Expand Down
2 changes: 0 additions & 2 deletions web/models/chia.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ def __init__(self, blockchains, farms, wallets, stats):
app.logger.error("No farm summary found for {0}".format(blockchain['blockchain']))
continue
blockhain_for_wallet = blockchain['blockchain']
if blockhain_for_wallet == 'gigahorse':
blockhain_for_wallet = 'chia' # Same wallet
wallet = self.find_wallet(wallets, blockhain_for_wallet)
if not wallet:
app.logger.error("No wallet found for {0}".format(blockhain_for_wallet))
Expand Down
6 changes: 1 addition & 5 deletions web/models/pools.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ def __init__(self, plotnfts):
self.columns = ['hostname', 'details', 'updated_at']
self.rows = []
for plotnft in plotnfts:
if plotnft.blockchain == 'gigahorse':
continue # Ignore these, use Chia instead.
try:
app.logger.debug("Found worker with hostname '{0}'".format(plotnft.hostname))
displayname = w.get_worker(plotnft.hostname).displayname
Expand Down Expand Up @@ -52,8 +50,6 @@ class Pools:
def __init__(self, pools, plotnfts):
self.blockchains = {}
for pool in pools:
if pool.blockchain == 'gigahorse':
continue # Ignore these, use Chia instead.
try:
app.logger.debug("Found worker with hostname '{0}'".format(pool.hostname))
displayname = w.get_worker(pool.hostname, pool.blockchain).displayname
Expand Down Expand Up @@ -143,7 +139,7 @@ class PoolConfigs():

def __init__(self, blockchain, plotnfts, wallets):
self.plotnfts = plotnfts
if blockchain == 'chia':
if blockchain in ['chia', 'gigahorse']:
self.links = self.chia_links()
elif blockchain == 'chives':
self.links = self.chives_links()
Expand Down
2 changes: 0 additions & 2 deletions web/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -508,8 +508,6 @@ def settings_pools():
fullnodes_by_blockchain = worker.get_fullnodes_by_blockchain()
poolable_blockchains = []
for pb in po.POOLABLE_BLOCKCHAINS:
if pb == 'gigahorse':
continue
if pb in fullnodes_by_blockchain:
poolable_blockchains.append(pb)
return render_template('settings/pools.html', global_config=gc, fullnodes_by_blockchain=fullnodes_by_blockchain,
Expand Down
2 changes: 0 additions & 2 deletions web/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ <h6 class="display-6 text-center">{{_('Total Plots Size')}}</h6>
</div>
</div>

{% if blockchain != 'gigahorse' %}
<div class="row align-items-md-stretch">
<div class="col-md-4" style="margin-top:5px; margin-bottom:5px;">
<div class="h-100 p-2 text-white bg-dark rounded-3">
Expand Down Expand Up @@ -131,7 +130,6 @@ <h6 class="display-6 text-center">{{blockchain|capitalize}} - {{_('Wallets')}}</
</div>
</div>
{% endif %}
{% endif %}

{% if farms[blockchain].challenges.labels|length > 0 %}
<div class="col-md-12" style="margin-top:5px; margin-bottom:5px;">
Expand Down

0 comments on commit f0c80a1

Please sign in to comment.