Skip to content

Commit

Permalink
Merge pull request #973 from guydavis/integration
Browse files Browse the repository at this point in the history
Machinaris v2.2.0
  • Loading branch information
guydavis authored Feb 29, 2024
2 parents 328b771 + 76b1699 commit 0f06570
Show file tree
Hide file tree
Showing 37 changed files with 509 additions and 51 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/develop-achi.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: develop-achi

on:
push:
branches:
- 'develop'

jobs:
docker:
runs-on: ubuntu-20.04
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
-
name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v4
with:
file: docker/dockerfile
context: .
platforms: linux/amd64
provenance: false
push: true
build-args: |
"UBUNTU_VER=focal"
"MACHINARIS_STREAM=develop"
"CHIADOG_BRANCH=dev"
"FDCLI_BRANCH=dev"
"ACHI_BRANCH=master"
tags: |
${{ secrets.DOCKERHUB_USERNAME }}/machinaris-achi:develop
ghcr.io/${{ secrets.DOCKERHUB_USERNAME }}/machinaris-achi:develop
2 changes: 1 addition & 1 deletion .github/workflows/develop-chia.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ jobs:
"UBUNTU_VER=jammy"
"MACHINARIS_STREAM=develop"
"CHIADOG_BRANCH=dev"
"GIGAHORSE_BRANCH=v2.1.3.giga26"
"GIGAHORSE_BRANCH=v2.1.4.giga26"
"CHIA_BRANCH=main"
"PLOTMAN_BRANCH=compress"
tags: |
Expand Down
52 changes: 52 additions & 0 deletions .github/workflows/main-achi.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: release-achi

on:
workflow_dispatch:
inputs:
version:
description: 'Release Version'

jobs:
docker:
runs-on: ubuntu-20.04
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
-
name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v4
with:
file: docker/dockerfile
context: .
platforms: linux/amd64,linux/arm64
provenance: false
push: true
build-args: |
"UBUNTU_VER=focal"
"MACHINARIS_STREAM=latest"
"ACHI_BRANCH=master"
tags: |
${{ secrets.DOCKERHUB_USERNAME }}/machinaris-achi:latest
${{ secrets.DOCKERHUB_USERNAME }}/machinaris-achi:v${{ github.event.inputs.version }}
ghcr.io/${{ secrets.DOCKERHUB_USERNAME }}/machinaris-achi:latest
ghcr.io/${{ secrets.DOCKERHUB_USERNAME }}/machinaris-achi:v${{ github.event.inputs.version }}
2 changes: 1 addition & 1 deletion .github/workflows/main-chia.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ jobs:
build-args: |
"UBUNTU_VER=jammy"
"MACHINARIS_STREAM=latest"
"GIGAHORSE_BRANCH=v2.1.3.giga26"
"GIGAHORSE_BRANCH=v2.1.4.giga26"
"CHIA_BRANCH=main"
tags: |
${{ secrets.DOCKERHUB_USERNAME }}/machinaris-gigahorse:latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/main-mmx.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
"MACHINARIS_STREAM=latest"
"CHIA_BRANCH=latest"
"MMX_BRANCH=v0.10.6"
"GIGAHORSE_BRANCH=v2.1.3.giga26"
"GIGAHORSE_BRANCH=v2.1.4.giga26"
tags: |
${{ secrets.DOCKERHUB_USERNAME }}/machinaris-mmx:latest
${{ secrets.DOCKERHUB_USERNAME }}/machinaris-mmx:v${{ github.event.inputs.version }}
Expand Down
50 changes: 50 additions & 0 deletions .github/workflows/test-achi.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: test-achi

on:
push:
branches:
- 'integration'

jobs:
docker:
runs-on: ubuntu-20.04
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
-
name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v4
with:
file: docker/dockerfile
context: .
platforms: linux/amd64,linux/arm64
provenance: false
push: true
build-args: |
"UBUNTU_VER=focal"
"MACHINARIS_STREAM=test"
"CHIADOG_BRANCH=dev"
"ACHI_BRANCH=master"
tags: |
${{ secrets.DOCKERHUB_USERNAME }}/machinaris-achi:test
ghcr.io/${{ secrets.DOCKERHUB_USERNAME }}/machinaris-achi:test
2 changes: 1 addition & 1 deletion .github/workflows/test-chia.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ jobs:
"UBUNTU_VER=jammy"
"MACHINARIS_STREAM=test"
"CHIADOG_BRANCH=dev"
"GIGAHORSE_BRANCH=v2.1.3.giga26"
"GIGAHORSE_BRANCH=v2.1.4.giga26"
"CHIA_BRANCH=main"
"PLOTMAN_BRANCH=development"
tags: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-mmx.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
"CHIA_BRANCH=latest"
"PLOTMAN_BRANCH=development"
"MMX_BRANCH=v0.10.6"
"GIGAHORSE_BRANCH=v2.1.3.giga26"
"GIGAHORSE_BRANCH=v2.1.4.giga26"
tags: |
${{ secrets.DOCKERHUB_USERNAME }}/machinaris-mmx:test
ghcr.io/${{ secrets.DOCKERHUB_USERNAME }}/machinaris-mmx:test
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +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).

## [2.2.0] - 2024-02-29
### Added
- Support for Achi blockchain. Requires its own plots (like Chives), you'll have to plot separately if interested. Thanks @priyankub
- Optionally launch Chia Data Layer services (https://docs.chia.net/guides/datalayer-user-guide/) if env var `chia_data=true` is set.
### Changed
- Harvester mode will now optionally also run chia-exporter for Prometheus results.
### Updated
- [Chia](https://github.com/Chia-Network/chia-blockchain/releases/tag/2.2.0) to v2.2.0 - misc improvements, see their release notes.
- [Cactus](https://github.com/Cactus-Network/cactus-blockchain/releases/tag/v2.1.4) to v2.1.4.
- [Gigahorse](https://github.com/madMAx43v3r/chia-gigahorse/releases/tag/v2.1.4.giga26) to v2.1.4.giga26.
- [Wheat](https://github.com/wheatnetwork/wheat-blockchain/releases/tag/2.1.6) to v2.1.6
### Notes
- Support for new blockchains and tools DOES NOT imply my endorsement for them. *Only run those you are comfortable with.*

## [2.1.4] - 2024-01-11
### Added
- Optionally launch `chia-exporter` [metrics endpoint](https://github.com/Chia-Network/chia-exporter) for Prometheus reporting if env var `chia_exporter=true` is set.
Expand Down
2 changes: 2 additions & 0 deletions CREDITS.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ A big thanks to all that contributed with dev and test including:
* @slowfinger
* @ToTo
* @Finball
* @chris-merritt
* @priyankub

## 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.*
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.1.4
2.2.0
2 changes: 1 addition & 1 deletion api/commands/chia_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
WALLET_SETTINGS_FILE = '/root/.chia/machinaris/config/wallet_settings.json'

# Blockchains which dropped compatibility with `show -c` commands around v1.6
BLOCKCHAINS_USING_PEER_CMD = ['btcgreen', 'cactus', 'chia', 'chinilla', 'flax', 'flora', 'gigahorse', 'hddcoin', 'littlelambocoin', 'maize', 'one', 'pipscoin', 'shibgreen', 'tad', 'wheat']
BLOCKCHAINS_USING_PEER_CMD = ['btcgreen', 'cactus', 'chia', 'chinilla', 'flax', 'flora', 'gigahorse', 'greenbtc', 'hddcoin', 'littlelambocoin', 'maize', 'one', 'pipscoin', 'shibgreen', 'tad', 'wheat']

def load_farm_summary(blockchain):
chia_binary = globals.get_blockchain_binary(blockchain)
Expand Down
9 changes: 8 additions & 1 deletion api/commands/rpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,14 @@

blockchain = globals.enabled_blockchains()[0]

if blockchain == "apple":
if blockchain == "achi":
from achi.rpc.full_node_rpc_client import FullNodeRpcClient
from achi.rpc.farmer_rpc_client import FarmerRpcClient
from achi.rpc.wallet_rpc_client import WalletRpcClient
from achi.util.default_root import DEFAULT_ROOT_PATH
from achi.util.ints import uint16
from achi.util.config import load_config as load_fork_config
elif blockchain == "apple":
from apple.rpc.full_node_rpc_client import FullNodeRpcClient
from apple.rpc.farmer_rpc_client import FarmerRpcClient
from apple.rpc.wallet_rpc_client import WalletRpcClient
Expand Down
2 changes: 2 additions & 0 deletions api/schedules/status_plotnfts.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ def extract_wallet_num(plotnft):
for line in plotnft.split('\n'):
if line.strip().startswith("Wallet id"):
return int(line[len('Wallet id '): len(line)-2])
if line.strip().startswith("Wallet ID:"):
return int(line[len('Wallet ID: '): len(line)])
return None

def extract_launcher_id(plotnft):
Expand Down
19 changes: 18 additions & 1 deletion common/config/blockchains.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,21 @@
{
"achi": {
"name": "Achi",
"symbol": "ACH" ,
"binary": "/achi-blockchain/venv/bin/achi",
"network_path": "/root/.achi/mainnet",
"network_name": "mainnet",
"network_port": 9975,
"farmer_port": 9977,
"fullnode_rpc_port": 9965,
"worker_port": 8960,
"reward": 512.0,
"mojos_per_coin": 1000000000,
"blocks_per_day": 4608,
"git_url": "https://github.com/Achi-Coin/achi-blockchain",
"discord_url": "https://discord.gg/cnS7fUfwTq",
"website_url": "https://achicoin.org/"
},
"apple": {
"name": "Apple",
"symbol": "APPLE",
Expand Down Expand Up @@ -94,7 +111,7 @@
"farmer_port": 8447,
"fullnode_rpc_port": 8555,
"worker_port": 8927,
"reward": 2.0,
"reward": 1.0,
"mojos_per_coin": 1000000000000,
"blocks_per_day": 4608,
"git_url": "https://github.com/Chia-Network/chia-blockchain",
Expand Down
6 changes: 3 additions & 3 deletions common/config/globals.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,8 @@ def is_setup():
return foundKey

# On very first launch of the main Chia container, blockchain DB gz is being downloaded via torrent so must wait.
CHIA_COMPRESSED_DB_SIZE = 56 * 1024 * 1024 * 1024 # Compressed GB in March 2023
CHIA_BLOCKCHAIN_DB_SIZE = 106 * 1024 * 1024 * 1024 # Uncompressed GB in March 2023
CHIA_COMPRESSED_DB_SIZE = 75 * 1024 * 1024 * 1024 # Compressed GB in March 2024
CHIA_BLOCKCHAIN_DB_SIZE = 127 * 1024 * 1024 * 1024 # Uncompressed GB in March 2024
def blockchain_downloading():
db_path = '/root/.chia/mainnet/db'
if path.exists(f"{db_path}/blockchain_v1_mainnet.sqlite") or path.exists(f"{db_path}/blockchain_v2_mainnet.sqlite"):
Expand Down Expand Up @@ -460,7 +460,7 @@ def get_alltheblocks_name(blockchain):
return blockchain

def legacy_blockchain(blockchain):
return blockchain in ['ballcoin', 'coffee', 'ecostake', 'greenbtc', 'gold', 'mint', 'nchain', 'petroleum', 'profit', 'silicoin', 'stor']
return blockchain in ['achi', 'ballcoin', 'coffee', 'ecostake', 'gold', 'mint', 'nchain', 'petroleum', 'profit', 'silicoin', 'stor']

last_mmx_reward = None
last_mmx_reward_load_time = None
Expand Down
Loading

0 comments on commit 0f06570

Please sign in to comment.