Skip to content

Commit

Permalink
Merge branch 'refs/heads/latest'
Browse files Browse the repository at this point in the history
# Conflicts:
#	.github/workflows/benchmarks.yml
#	.github/workflows/check-commit-signing.yml
#	.github/workflows/check_wheel_availability.yaml
#	.github/workflows/codeql-analysis.yml
#	.github/workflows/pre-commit.yml
#	.github/workflows/super-linter.yml
#	.github/workflows/test-install-scripts.yml
#	.github/workflows/test-single.yml
#	.github/workflows/test.yml
#	.github/workflows/trigger-docker-dev.yml
#	.github/workflows/trigger-docker-main.yml
#	.github/workflows/upload-pypi-source.yml
#	chia/farmer/farmer.py
#	chia/pools/pool_config.py
  • Loading branch information
felixbrucker committed Dec 19, 2024
2 parents f40b773 + 40ca4f9 commit 87cf138
Show file tree
Hide file tree
Showing 252 changed files with 12,179 additions and 7,023 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/build-linux-installer-deb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ on:
- "**"

concurrency:
# SHA is added to the end if on `main` to let all main workflows run
group: ${{ github.ref }}-${{ github.workflow }}-${{ github.event_name }}-${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/') || startsWith(github.ref, 'refs/heads/long_lived/')) && github.sha || '' }}
group: ${{ github.event_name == 'pull_request' && format('{0}-{1}', github.workflow_ref, github.event.pull_request.number) || github.run_id }}
cancel-in-progress: true

permissions:
Expand Down Expand Up @@ -61,7 +60,7 @@ jobs:

env:
CHIA_INSTALLER_VERSION: ${{ needs.version.outputs.chia-installer-version }}
SETUPTOOLS_SCM_PRETEND_VERSION_FOR_CHIA_BLOCKCHAIN: ${{ needs.version.outputs.chia-installer-version }}
POETRY_DYNAMIC_VERSIONING_OVERRIDE: "chia-blockchain=${{ needs.version.outputs.chia-installer-version }}"
TAG_TYPE: ${{ needs.version.outputs.tag-type }}

steps:
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/build-linux-installer-rpm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ on:
- "**"

concurrency:
# SHA is added to the end if on `main` to let all main workflows run
group: ${{ github.ref }}-${{ github.workflow }}-${{ github.event_name }}-${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/') || startsWith(github.ref, 'refs/heads/long_lived/')) && github.sha || '' }}
group: ${{ github.event_name == 'pull_request' && format('{0}-{1}', github.workflow_ref, github.event.pull_request.number) || github.run_id }}
cancel-in-progress: true

permissions:
Expand Down Expand Up @@ -58,7 +57,7 @@ jobs:

env:
CHIA_INSTALLER_VERSION: ${{ needs.version.outputs.chia-installer-version }}
SETUPTOOLS_SCM_PRETEND_VERSION_FOR_CHIA_BLOCKCHAIN: ${{ needs.version.outputs.chia-installer-version }}
POETRY_DYNAMIC_VERSIONING_OVERRIDE: "chia-blockchain=${{ needs.version.outputs.chia-installer-version }}"
TAG_TYPE: ${{ needs.version.outputs.tag-type }}

steps:
Expand Down
13 changes: 4 additions & 9 deletions .github/workflows/build-macos-installers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ on:
- "**"

concurrency:
# SHA is added to the end if on `main` to let all main workflows run
group: ${{ github.ref }}-${{ github.workflow }}-${{ github.event_name }}-${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/') || startsWith(github.ref, 'refs/heads/long_lived/')) && github.sha || '' }}
group: ${{ github.event_name == 'pull_request' && format('{0}-{1}', github.workflow_ref, github.event.pull_request.number) || github.run_id }}
cancel-in-progress: true

permissions:
Expand All @@ -52,7 +51,7 @@ jobs:
matrix:
python-version: ["3.10"]
os:
- runs-on: macos-12
- runs-on: macos-13
name: intel
bladebit-suffix: macos-x86-64.tar.gz
arch-artifact-name: intel
Expand All @@ -63,7 +62,7 @@ jobs:

env:
CHIA_INSTALLER_VERSION: ${{ needs.version.outputs.chia-installer-version }}
SETUPTOOLS_SCM_PRETEND_VERSION_FOR_CHIA_BLOCKCHAIN: ${{ needs.version.outputs.chia-installer-version }}
POETRY_DYNAMIC_VERSIONING_OVERRIDE: "chia-blockchain=${{ needs.version.outputs.chia-installer-version }}"
TAG_TYPE: ${{ needs.version.outputs.tag-type }}

steps:
Expand All @@ -84,7 +83,7 @@ jobs:
uses: Chia-Network/actions/setjobenv@main
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MACOSX_DEPLOYMENT_TARGET: 12
MACOSX_DEPLOYMENT_TARGET: 13

- name: Test for secrets access
id: check_secrets
Expand Down Expand Up @@ -297,10 +296,6 @@ jobs:
fail-fast: false
matrix:
os:
- name: 12
matrix: 12
runs-on:
intel: macos-12
- name: 13
matrix: 13
runs-on:
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/build-windows-installer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ on:
- "**"

concurrency:
# SHA is added to the end if on `main` to let all main workflows run
group: ${{ github.ref }}-${{ github.workflow }}-${{ github.event_name }}-${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/') || startsWith(github.ref, 'refs/heads/long_lived/')) && github.sha || '' }}
group: ${{ github.event_name == 'pull_request' && format('{0}-{1}', github.workflow_ref, github.event.pull_request.number) || github.run_id }}
cancel-in-progress: true

permissions:
Expand All @@ -56,7 +55,7 @@ jobs:

env:
CHIA_INSTALLER_VERSION: ${{ needs.version.outputs.chia-installer-version }}
SETUPTOOLS_SCM_PRETEND_VERSION_FOR_CHIA_BLOCKCHAIN: ${{ needs.version.outputs.chia-installer-version }}
POETRY_DYNAMIC_VERSIONING_OVERRIDE: "chia-blockchain=${{ needs.version.outputs.chia-installer-version }}"
TAG_TYPE: ${{ needs.version.outputs.tag-type }}

steps:
Expand Down Expand Up @@ -88,6 +87,8 @@ jobs:
${{ runner.os }}-node-
- uses: chia-network/actions/cache-pip@main
with:
mode: poetry

- uses: Chia-Network/actions/setup-python@main
name: Install Python ${{ matrix.python-version }}
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ activate
# Editors
.vscode
.idea
.vs

# Packaging
chia-blockchain.tar.gz
Expand Down
7 changes: 7 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,13 @@ repos:
language: system
require_serial: true
types_or: [python, pyi]
- repo: local
hooks:
- id: poetry
name: poetry
entry: ./activated.py --poetry poetry check
language: system
pass_filenames: false
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.1.0
hooks:
Expand Down
14 changes: 0 additions & 14 deletions .prettierrc.yaml

This file was deleted.

104 changes: 104 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,110 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project does not yet adhere to [Semantic Versioning](https://semver.org/spec/v2.0.0.html)
for setuptools_scm/PEP 440 reasons.

## 2.5.0 Chia blockchain 2024-12-12

## What's Changed

### Added

- Implemented CHIP-36: Introduced new soft-fork with CLVM `keccak256` operator

### Changed

- Bump `chia_rs` to `0.16.0`

### Removed

- Python 3.8 support has been removed

## 2.4.4 Chia blockchain 2024-10-15

## What's Changed

### Added

- Build both sdist and wheel for upload to pypi
- Add a `fee` option to `push_transactions`
- Add bech32m options to some key functions
- Add `--valid-at/--expires-at` to all CLI transaction RPC endpoints
- Add TXConfig args to coin commands
- Add missing client endpoints for corresponding Wallet RPC endpoints
- Add version number to every log line

### Changed

- Remove `block_height_list` from `BlockGenerator`
- Display sync percentage in 'chia show -s'
- Make 'chia plotnft -f fingerprint -i wallet_id' output JSON
- make Program.run() and Program.run_with_cost() default to enabling all the most recent features
- Remove soft-fork 4 special cases
- Log the rate at which blocks are added during long sync
- Rename `Spend` to `SpendConditions`
- Remove `Backend*` warning ignores
- Replace `get_flags_for_height_and_constants()` with Rust version
- Refactor `get_puzzle_and_solution_for_coin()` and introduce `get_puzzle_and_solution_for_coin2()`
- Warm up the cache once per batch in `pre_validate_blocks_multiprocessing`
- Cleanup and convert to a protocol for `BlockchainInterface`
- Update `BlockGenerator` type
- Extract coin splitting and combining logic from CLI and move to RPC
- Update long-reorg tests along with the reorg test chains
- Switch mempool TX prevalidation to the Rust version
- Remove `initial_freeze_period` from RPCs
- Introduce new `AugmentedBlockchain` class
- Use smarter coin selection algorithm for DAO wallet `select_coins_for_asset_type`
- Refactor `multiprocess_validation`
- Deduct block overhead from the mempool's maximum block clvm cost limit
- Update to macOS 13 for build and test
- Simplify batch pre validate blocks
- Add a configurable limit to the amount of DIDs that can be automatically added to the users wallet from transfer
- Datalayer: Revert ancestors table schema change from #18100
- Datalayer: separate DAT files in folders by store id
- Datalayer: Reduce level log spam when downloading DAT files
- Datalayer: Limit full file creation when processing subscription generations
- Bump `aiohttp` to `3.10.4`
- Bump `chia_rs` to `0.14.0`
- Bump `chiavdf` to `1.1.6`
- Bump `cryptography` to `43.0.1`
- Bump `dnslib` to `0.9.25`
- Bump `pip` to `24.2`
- Bump `setuptools` to `75.1.0`

### Fixed

- refactor `new_peak_timelord`
- Fixed missing partial count was incorrectly incremented on solo plotNFT farming
- Timelord logging: Updated peak to hex from bytestring
- Source offer confirmed height from original coin state (fixes #18330)
- fix long sync cache
- Fix `request_fee_estimates` (thanks @Yakuhito)
- Fix confusing amount-related CLI help messages
- Fix `raise` on too much decimal precision in CLI
- Remove the coin amount from state layer solution
- Fix `BrokenProcessPool` error for Windows installer blueboxing
- Check to confirm external TXs submitted by wallet
- Correctly set `start_index` in `create_more_puzzle_hashes`
- Use better key resolution logic in derivation commands
- Fix new pool url detection (thanks @felixbrucker)
- Fixed logging for fast bluebox timelord (thanks @thesemaphoreslim)
- remove no-wallet-found traceback from `/dl_owned_singletons` (fixes #18518)
- Fix DID balance reporting, and port DID tests to `WalletTestFramwork`
- Fix object has no attribute code errors
- Fix fee behavior with `chia wallet coins combine`
- Fix install.sh upgrade issue (thanks @wallentx) (fixes #18672)
- fix some comments typos (thanks @pengbanban, @murongshaozong, @linchizhen)

### Known Issues

- The wallet rpc `combine_coins` requires `number_of_coins` to be set explicitly in the request and otherwise will return an error

### Deprecated

- Python 3.8 is deprecated per the Python EOL schedule and this release (2.4.4) will be the last to support Python 3.8

### Removed

- Support for macOS 12 (Monterey)

## 2.4.3 Chia blockchain 2024-08-21

## What's Changed
Expand Down
4 changes: 1 addition & 3 deletions Install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ if ($null -eq (Get-Command py -ErrorAction SilentlyContinue))
Exit 1
}

$supportedPythonVersions = "3.12", "3.11", "3.10", "3.9", "3.8"
$supportedPythonVersions = "3.12", "3.11", "3.10", "3.9"
if ("$env:INSTALL_PYTHON_VERSION" -ne "")
{
$pythonVersion = $env:INSTALL_PYTHON_VERSION
Expand Down Expand Up @@ -104,8 +104,6 @@ foreach ($extra in $extras)

./Setup-poetry.ps1 -pythonVersion "$pythonVersion"
.penv/Scripts/poetry env use $(py -"$pythonVersion" -c 'import sys; print(sys.executable)')
# TODO: Decide if this is needed or should be handled automatically in some way
.penv/Scripts/pip install "poetry-dynamic-versioning[plugin]"
.penv/Scripts/poetry install @extras_cli

if ($i)
Expand Down
2 changes: 1 addition & 1 deletion Setup-poetry.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ $ErrorActionPreference = "Stop"
py -$pythonVersion -m venv .penv
.penv/Scripts/python -m pip install --upgrade pip setuptools wheel
# TODO: maybe make our own zipapp/shiv/pex of poetry and download that?
.penv/Scripts/python -m pip install poetry
.penv/Scripts/python -m pip install poetry "poetry-dynamic-versioning[plugin]"
6 changes: 4 additions & 2 deletions activated.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@ $ErrorActionPreference = "Stop"

$script_directory = Split-Path $MyInvocation.MyCommand.Path -Parent

$command = $args[0]
$env_directory = $args[0]
$command = $args[1]
$parameters = [System.Collections.ArrayList]$args
$parameters.RemoveAt(0)
$parameters.RemoveAt(0)

& $script_directory/.venv/Scripts/Activate.ps1
& $script_directory/$env_directory/Scripts/Activate.ps1
& $command @parameters

exit $LASTEXITCODE
15 changes: 13 additions & 2 deletions activated.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

from __future__ import annotations

import enum
import os
import pathlib
import subprocess
Expand All @@ -10,17 +11,27 @@
here = pathlib.Path(__file__).parent.absolute()


class Env(enum.Enum):
chia = ".venv"
poetry = ".penv"


def main(*args: str) -> int:
if len(args) == 0:
print("Parameters required")
return 1

env = Env.chia
if args[0].startswith("--"):
env = Env[args[0][2:]]
args = args[1:]

if sys.platform == "win32":
script = "activated.ps1"
command = ["powershell", os.fspath(here.joinpath(script)), *args]
command = ["powershell", os.fspath(here.joinpath(script)), env.value, *args]
else:
script = "activated.sh"
command = ["sh", os.fspath(here.joinpath(script)), *args]
command = ["sh", os.fspath(here.joinpath(script)), env.value, *args]

completed_process = subprocess.run(command)

Expand Down
8 changes: 6 additions & 2 deletions activated.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ SCRIPT_DIRECTORY=$(
cd -- "$(dirname -- "$0")"
pwd
)
# shellcheck disable=SC1091
. "${SCRIPT_DIRECTORY}/.venv/bin/activate"

ENV_DIRECTORY="$1"
shift

# shellcheck disable=SC1090,SC1091
. "${SCRIPT_DIRECTORY}/${ENV_DIRECTORY}/bin/activate"

"$@"
3 changes: 2 additions & 1 deletion benchmarks/block_ref.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

from chia.consensus.blockchain import Blockchain
from chia.consensus.default_constants import DEFAULT_CONSTANTS
from chia.consensus.get_block_generator import get_block_generator
from chia.full_node.block_store import BlockStore
from chia.full_node.coin_store import CoinStore
from chia.types.blockchain_format.serialized_program import SerializedProgram
Expand Down Expand Up @@ -80,7 +81,7 @@ async def main(db_path: Path) -> None:
)

start_time = monotonic()
gen = await blockchain.get_block_generator(block)
gen = await get_block_generator(blockchain.lookup_block_generators, block)
one_call = monotonic() - start_time
timing += one_call
assert gen is not None
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/block_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ async def run_add_block_benchmark(version: int) -> None:

start = monotonic()
for i in tx_block_heights:
gens = await block_store.get_generators_at([i])
gens = await block_store.get_generators_at({i})
assert len(gens) == 1

stop = monotonic()
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/mempool-long-lived.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ async def get_coin_record(coin_ids: Collection[bytes32]) -> List[CoinRecord]:
coin.name(): CoinRecord(coin, uint32(height // 2), uint32(0), False, uint64(timestamp // 2))
}
spend_bundle_id = sb.name()
sbc = await mempool.pre_validate_spendbundle(sb, None, spend_bundle_id)
sbc = await mempool.pre_validate_spendbundle(sb, spend_bundle_id)
assert sbc is not None
await mempool.add_spend_bundle(sb, sbc, spend_bundle_id, uint32(height))

Expand Down
Loading

0 comments on commit 87cf138

Please sign in to comment.