Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Latest from development #968

Merged
merged 18 commits into from
Feb 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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 }}
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
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,17 @@ All notable changes to this project will be documented in this file. The format

## [Unreleased]
### Added
- Optionally launch Chia Data Layer services (https://docs.chia.net/guides/datalayer-user-guide/) if env var `chia_data=true` is set.
- 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.1.5) to v2.1.5 - 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
Expand Down
1 change: 1 addition & 0 deletions CREDITS.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ A big thanks to all that contributed with dev and test including:
* @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 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
17 changes: 17 additions & 0 deletions 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
2 changes: 1 addition & 1 deletion common/config/globals.py
Original file line number Diff line number Diff line change
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
91 changes: 91 additions & 0 deletions config/chiadog/achi.sample.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
# This is useful to differentiate multiple
# instances monitoring multiple harvesters
notification_title_prefix: '$HOSTNAME-achi'
log_level: INFO
coin_name: 'achi'
coin_symbol: 'achi'

# Only one consumer can be enabled at a time, you can
# delete the section for the consumer which you aren't using
# DON'T CHANGE file_path IT'S ALREADY SET IN-CONTAINER FOR MACHINARIS!
chia_logs:
file_log_consumer:
enable: true
prefix: 'achi'
file_path: '~/.chia/achi/mainnet/log/debug.log'

# Enable this and chiadog will ping a remote server every 5 minutes
# That way you can know that the monitoring is running as expected
#keep_alive_monitor:
# enable_remote_ping: false
# ping_url: ''

# Enable this and you'll receive a daily summary notification
# on your farm performance at the specified time of the day.
daily_stats:
enable: true
time_of_day: 21

# We support a lot of notifiers, please check the README for more
# information. You can delete the sections which you aren't using.
# You can also enable more than one notifier and send different
# notifications to each of them. E.g. enable daily_stats only to E-mail.
# If you enable wallet_events you'll get notifications anytime your
# wallet receives some XCH (e.g. farming reward).
notifier:
pushover:
enable: false
daily_stats: true
wallet_events: true
credentials:
api_token: 'dummy_token'
user_key: 'dummy_key'
telegram:
enable: false
daily_stats: true
wallet_events: true
credentials:
bot_token: 'dummy_bot_token'
chat_id: 'dummy_chat_id'
smtp:
enable: false
daily_stats: true
wallet_events: true
credentials:
sender: 'achi@example.com'
sender_name: 'Machinaris'
recipient: 'you@example.com'
username_smtp: 'username'
password_smtp: 'password'
host: 'smtp.example.com'
port: 587
script:
# DON'T CHANGE THIS SCRIPT NOTIFIER, IT'S USED BY MACHINARIS!
enable: true
daily_stats: true
wallet_events: true
script_path: '/root/.chia/chiadog/notifier.sh'
discord:
enable: false
daily_stats: true
wallet_events: true
credentials:
webhook_url: 'https://discord.com/api/webhooks/...'
slack:
enable: false
daily_stats: true
wallet_events: true
credentials:
webhook_url: 'https://hooks.slack.com/services/...'
mqtt:
enable: false
daily_stats: true
wallet_events: true
topic: achi/achidog/alert
qos: 1
retain: false
credentials:
host: '192.168.0.10'
port: 8883
username: ''
password: ''
4 changes: 3 additions & 1 deletion docker/dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ ARG FDCLI_BRANCH=master
ARG FORKTOOLS_BRANCH=main
ARG BLADEBIT_BRANCH=master

ARG ACHI_BRANCH
ARG APPLE_BRANCH
ARG BALLCOIN_BRANCH
ARG BPX_BRANCH
Expand Down Expand Up @@ -53,7 +54,8 @@ WORKDIR /chia-blockchain

# Install specific blockchain fork (based on branch enabled) + tools that depend on the fork
RUN \
/usr/bin/bash /machinaris/scripts/forks/apple_install.sh ${APPLE_BRANCH} \
/usr/bin/bash /machinaris/scripts/forks/achi_install.sh ${ACHI_BRANCH} \
&& /usr/bin/bash /machinaris/scripts/forks/apple_install.sh ${APPLE_BRANCH} \
&& /usr/bin/bash /machinaris/scripts/forks/ballcoin_install.sh ${BALLCOIN_BRANCH} \
&& /usr/bin/bash /machinaris/scripts/forks/bpx_install.sh ${BPX_BRANCH} \
&& /usr/bin/bash /machinaris/scripts/forks/btcgreen_install.sh ${BTCGREEN_BRANCH} \
Expand Down
26 changes: 26 additions & 0 deletions scripts/forks/achi_install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/env bash
#
# Installs Achi as per https://github.com/Achi-Coin/achi-blockchain
#

ACHI_BRANCH=$1
# On 2024-02-08
HASH=e3ca475efb3d7267d3a2eedef8b4897d129aeb5d

if [ -z ${ACHI_BRANCH} ]; then
echo 'Skipping Achi install as not requested.'
else
git clone --branch ${ACHI_BRANCH} --recurse-submodules https://github.com/Achi-Coin/achi-blockchain.git /achi-blockchain
cd /achi-blockchain
git submodule update --init mozilla-ca
git checkout $HASH
chmod +x install.sh
/usr/bin/sh ./install.sh

if [ ! -d /chia-blockchain/venv ]; then
cd /
rmdir /chia-blockchain
ln -s /achi-blockchain /chia-blockchain
ln -s /achi-blockchain/venv/bin/achi /chia-blockchain/venv/bin/chia
fi
fi
Loading
Loading