Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
6711f09
Updated GUI pin (#20008)
ChiaMineJP Aug 29, 2025
c00e7cc
Merge commit '6711f095b3adb8673a0f51e0484b85ee879172db' into checkpoi…
AmineKhaldi Sep 5, 2025
5f151e5
Update the GUI anchor.
AmineKhaldi Sep 5, 2025
6539443
move workaround arm64 ruby install to the build image (#20037)
altendky Sep 8, 2025
b872728
add another case to `test_get_rate_limits_to_use()` (#20004)
altendky Sep 9, 2025
d62a61d
[CHIA-3701] Check plots v2 (#19982)
arvidn Sep 9, 2025
3acce7b
test on linux arm :penguin: :muscle: :boom: (#20010)
altendky Sep 9, 2025
0396922
difficulty -> strength (#20045)
altendky Sep 9, 2025
81a0a95
CHIA-3731 Cover peak post processing w.r.t. added transactions as a r…
AmineKhaldi Sep 10, 2025
326b108
[CHIA-3729] Fix clvm streamable type analysis (#20031)
Quexington Sep 10, 2025
698b2dd
CHIA-3704 Optimize peak post processing by using transaction IDs inst…
AmineKhaldi Sep 11, 2025
c1d15df
Simplify rate limit numbers (#19991)
arvidn Sep 11, 2025
23ad961
CHIA-3736 Avoid recomputing skipped transaction ID in create_bundle_f…
AmineKhaldi Sep 11, 2025
61034b5
[CHIA-3602] Port wallet coin endpoints to `@marshal` (#19966)
Quexington Sep 13, 2025
e836b4a
checkpoint: into main from release/2.5.6 @ 6711f095b3adb8673a0f51e04…
pmaslana Sep 15, 2025
83e164d
Use setup-node action and .nvmrc specified version for all installers…
cmmarslender Sep 16, 2025
dbd6700
fix sp lookup at genesis (#20057)
almogdepaz Sep 16, 2025
73cb547
[CHIA-3712] simplify add_transaction() (#20063)
arvidn Sep 16, 2025
5f5ab60
Merge commit '73cb54789be134e0e373960f73e1a6ba70d3a90f' into catchup/…
altendky Sep 16, 2025
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
5 changes: 5 additions & 0 deletions .github/workflows/build-linux-installer-deb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,11 @@ jobs:
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Setup Node per .nvmrc in GUI
uses: actions/setup-node@v5
with:
node-version-file: chia-blockchain-gui/.nvmrc

- name: Get latest madmax plotter
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/build-linux-installer-rpm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,11 @@ jobs:
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Setup Node per .nvmrc in GUI
uses: actions/setup-node@v5
with:
node-version-file: chia-blockchain-gui/.nvmrc

- name: Get latest madmax plotter
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build-macos-installers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,10 @@ jobs:

- uses: chia-network/actions/activate-venv@main

- name: Setup Node 20.x
uses: actions/setup-node@v4
- name: Setup Node per .nvmrc in GUI
uses: actions/setup-node@v5
with:
node-version: "20.x"
node-version-file: chia-blockchain-gui/.nvmrc

- name: Prepare GUI cache
id: gui-ref
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build-windows-installer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,10 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Setup Node 20.x
uses: actions/setup-node@v4
- name: Setup Node per .nvmrc in GUI
uses: actions/setup-node@v5
with:
node-version: "20.x"
node-version-file: chia-blockchain-gui/.nvmrc

- name: Test for secrets access
id: check_secrets
Expand Down
36 changes: 29 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,13 @@ on:
default: 1
required: false
type: number
run-linux:
description: "run Linux tests"
run-linux-intel:
description: "run Linux-intel tests"
default: true
required: false
type: boolean
run-linux-arm:
description: "run Linux-arm tests"
default: true
required: false
type: boolean
Expand Down Expand Up @@ -151,22 +156,38 @@ jobs:
arch: arm
arch-emoji: 💪
collect-junit: false
ubuntu:
if: github.event_name != 'workflow_dispatch' || inputs.run-linux
ubuntu-intel:
if: github.event_name != 'workflow_dispatch' || inputs.run-linux-intel
uses: ./.github/workflows/test-single.yml
needs: configure
with:
os-emoji: 🐧
matrix: ubuntu
name: Ubuntu
file_name: ubuntu
concurrency-name: ubuntu
file_name: ubuntu-intel
concurrency-name: ubuntu-intel
configuration: ${{ needs.configure.outputs.configuration }}
matrix_mode: ${{ needs.configure.outputs.matrix_mode }}
runs-on: ubuntu-latest
arch: intel
arch-emoji: 🌀
collect-junit: false
ubuntu-arm:
if: github.event_name != 'workflow_dispatch' || inputs.run-linux-arm
uses: ./.github/workflows/test-single.yml
needs: configure
with:
os-emoji: 🐧
matrix: ubuntu
name: Ubuntu
file_name: ubuntu-arm
concurrency-name: ubuntu-arm
configuration: ${{ needs.configure.outputs.configuration }}
matrix_mode: ${{ needs.configure.outputs.matrix_mode }}
runs-on: ubuntu-24.04-arm
arch: arm
arch-emoji: 💪
collect-junit: false
windows:
if: github.event_name != 'workflow_dispatch' || inputs.run-windows
uses: ./.github/workflows/test-single.yml
Expand All @@ -192,7 +213,8 @@ jobs:
- configure
- macos-intel
- macos-arm
- ubuntu
- ubuntu-intel
- ubuntu-arm
- windows
strategy:
fail-fast: false
Expand Down
7 changes: 2 additions & 5 deletions build_scripts/build_linux_deb-2-installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,9 @@ jq --arg VER "$CHIA_INSTALLER_VERSION" '.version=$VER' package.json >temp.json &
echo "Building Linux(deb) Electron app"
PRODUCT_NAME="chia"
if [ "$PLATFORM" = "arm64" ]; then
# electron-builder does not work for arm64 as of Aug 16, 2022.
# This is a temporary fix.
# https://github.com/jordansissel/fpm/issues/1801#issuecomment-919877499
# @TODO Consolidates the process to amd64 if the issue of electron-builder is resolved
sudo apt-get -y install ruby ruby-dev
sudo gem install fpm
# workaround for above now implemented in the image build at
# https://github.com/Chia-Network/build-images/blob/7c74d2f20739543c486c2522032cf09d96396d24/ubuntu-22.04/Dockerfile#L48-L61
echo USE_SYSTEM_FPM=true "${NPM_PATH}/electron-builder" build --linux deb --arm64 \
--config.extraMetadata.name=chia-blockchain \
--config.productName="$PRODUCT_NAME" --config.linux.desktop.Name="Chia Blockchain" \
Expand Down
2 changes: 1 addition & 1 deletion chia-blockchain-gui
43 changes: 1 addition & 42 deletions chia/_tests/cmds/cmd_test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
from chia.full_node.full_node_rpc_client import FullNodeRpcClient
from chia.rpc.rpc_client import RpcClient
from chia.simulator.simulator_full_node_rpc_client import SimulatorFullNodeRpcClient
from chia.types.coin_record import CoinRecord
from chia.types.signing_mode import SigningMode
from chia.util.bech32m import encode_puzzle_hash
from chia.util.config import load_config
Expand All @@ -31,7 +30,7 @@
from chia.wallet.nft_wallet.nft_wallet import NFTWallet
from chia.wallet.transaction_record import TransactionRecord
from chia.wallet.util.transaction_type import TransactionType
from chia.wallet.util.tx_config import CoinSelectionConfig, TXConfig
from chia.wallet.util.tx_config import TXConfig
from chia.wallet.util.wallet_types import WalletType
from chia.wallet.wallet_request_types import (
GetSyncStatusResponse,
Expand Down Expand Up @@ -232,46 +231,6 @@ async def nft_calculate_royalties(
)
)

async def get_spendable_coins(
self,
wallet_id: int,
coin_selection_config: CoinSelectionConfig,
) -> tuple[list[CoinRecord], list[CoinRecord], list[Coin]]:
"""
We return a tuple containing: (confirmed records, unconfirmed removals, unconfirmed additions)
"""
self.add_to_log(
"get_spendable_coins",
(wallet_id, coin_selection_config),
)
confirmed_records = [
CoinRecord(
Coin(bytes32([1] * 32), bytes32([2] * 32), uint64(1234560000)),
uint32(123456),
uint32(0),
False,
uint64(0),
),
CoinRecord(
Coin(bytes32([3] * 32), bytes32([4] * 32), uint64(1234560000)),
uint32(123456),
uint32(0),
False,
uint64(0),
),
]
unconfirmed_removals = [
CoinRecord(
Coin(bytes32([5] * 32), bytes32([6] * 32), uint64(1234570000)),
uint32(123457),
uint32(0),
True,
uint64(0),
)
]
unconfirmed_additions = [Coin(bytes32([7] * 32), bytes32([8] * 32), uint64(1234580000))]
return confirmed_records, unconfirmed_removals, unconfirmed_additions

async def send_transaction_multi(
self,
wallet_id: int,
Expand Down
81 changes: 72 additions & 9 deletions chia/_tests/core/full_node/test_full_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -919,6 +919,10 @@ async def suppress_value_error(coro: Coroutine[Any, Any, None]) -> None:


@pytest.mark.anyio
@pytest.mark.limit_consensus_modes(
allowed=[ConsensusMode.HARD_FORK_2_0, ConsensusMode.HARD_FORK_3_0],
reason="We can no longer (reliably) farm blocks from before the hard fork",
)
async def test_new_transaction_and_mempool(
wallet_nodes: tuple[
FullNodeSimulator, FullNodeSimulator, ChiaServer, ChiaServer, WalletTool, WalletTool, BlockTools
Expand Down Expand Up @@ -946,8 +950,10 @@ async def test_new_transaction_and_mempool(

# Makes a bunch of coins
conditions_dict: dict[ConditionOpcode, list[ConditionWithArgs]] = {ConditionOpcode.CREATE_COIN: []}
# This should fit in one transaction
for _ in range(100):
# This should fit in one transaction. The test constants have a max block cost of 400,000,000
# and the default max *transaction* cost is half that, so 200,000,000. CREATE_COIN has a cost of
# 1,800,000, we create 80 coins
for _ in range(80):
receiver_puzzlehash = wallet_receiver.get_new_puzzlehash()
puzzle_hashes.append(receiver_puzzlehash)
output = ConditionWithArgs(ConditionOpcode.CREATE_COIN, [receiver_puzzlehash, int_to_bytes(10000000000)])
Expand Down Expand Up @@ -1046,8 +1052,8 @@ async def test_new_transaction_and_mempool(
# these numbers reflect the capacity of the mempool. In these
# tests MEMPOOL_BLOCK_BUFFER is 1. The other factors are COST_PER_BYTE
# and MAX_BLOCK_COST_CLVM
assert included_tx == 23
assert not_included_tx == 10
assert included_tx == 20
assert not_included_tx == 7
assert seen_bigger_transaction_has_high_fee

# Mempool is full
Expand Down Expand Up @@ -1882,7 +1888,9 @@ async def test_new_signage_point_caching(
) -> None:
full_node_1, _full_node_2, server_1, server_2, _wallet_a, _wallet_receiver, bt = wallet_nodes
blocks = await full_node_1.get_all_full_blocks()

assert full_node_1.full_node.full_node_store.get_signage_point_by_index_and_cc_output(
bytes32.zeros, full_node_1.full_node.constants.GENESIS_CHALLENGE, uint8(0)
) == SignagePoint(None, None, None, None)
peer = await connect_and_get_peer(server_1, server_2, self_hostname)
blocks = bt.get_consecutive_blocks(3, block_list_input=blocks, skip_slots=2)
await full_node_1.full_node.add_block(blocks[-3])
Expand Down Expand Up @@ -1951,10 +1959,6 @@ async def test_new_signage_point_caching(
is not None
)

assert full_node_1.full_node.full_node_store.get_signage_point_by_index_and_cc_output(
full_node_1.full_node.constants.GENESIS_CHALLENGE, bytes32.zeros, uint8(0)
) == SignagePoint(None, None, None, None)


@pytest.mark.anyio
async def test_slot_catch_up_genesis(
Expand Down Expand Up @@ -3294,3 +3298,62 @@ def compare_unfinished_blocks(block1: UnfinishedBlock, block2: UnfinishedBlock)
# Final assertion to check the entire block
assert block1 == block2, "The entire block objects are not identical"
return True


@pytest.mark.anyio
@pytest.mark.parametrize(
"condition, error",
[
(ConditionOpcode.ASSERT_HEIGHT_RELATIVE, "ASSERT_HEIGHT_RELATIVE_FAILED"),
(ConditionOpcode.ASSERT_HEIGHT_ABSOLUTE, "ASSERT_HEIGHT_ABSOLUTE_FAILED"),
],
)
async def test_pending_tx_cache_retry_on_new_peak(
condition: ConditionOpcode, error: str, blockchain_constants: ConsensusConstants, caplog: pytest.LogCaptureFixture
) -> None:
"""
Covers PendingTXCache items that are placed there due to unmet relative or
absolute height conditions, to make sure those items get retried at peak
post processing when those conditions are met.
"""
async with setup_simulators_and_wallets(1, 0, blockchain_constants) as new:
full_node_api = new.simulators[0].peer_api
bt = new.bt
wallet = WalletTool(test_constants)
ph = wallet.get_new_puzzlehash()
blocks = bt.get_consecutive_blocks(
3, guarantee_transaction_block=True, farmer_reward_puzzle_hash=ph, pool_reward_puzzle_hash=ph
)
for block in blocks:
await full_node_api.full_node.add_block(block)
peak = full_node_api.full_node.blockchain.get_peak()
assert peak is not None
current_height = peak.height
# Create a transaction with a height condition that makes it pending
coin = blocks[-1].get_included_reward_coins()[0]
if condition == ConditionOpcode.ASSERT_HEIGHT_RELATIVE:
condition_height = 1
else:
condition_height = current_height + 1
condition_dic = {condition: [ConditionWithArgs(condition, [int_to_bytes(condition_height)])]}
sb = wallet.generate_signed_transaction(uint64(42), ph, coin, condition_dic)
sb_name = sb.name()
# Send the transaction
res = await full_node_api.send_transaction(SendTransaction(sb))
assert res is not None
assert ProtocolMessageTypes(res.type) == ProtocolMessageTypes.transaction_ack
transaction_ack = TransactionAck.from_bytes(res.data)
assert transaction_ack.status == MempoolInclusionStatus.PENDING.value
assert transaction_ack.error == error
# Make sure it ends up in the pending cache, not the mempool
assert full_node_api.full_node.mempool_manager.get_mempool_item(sb_name, include_pending=False) is None
assert full_node_api.full_node.mempool_manager.get_mempool_item(sb_name, include_pending=True) is not None
# Advance peak to meet the asserted height condition
with caplog.at_level(logging.DEBUG):
blocks = bt.get_consecutive_blocks(2, block_list_input=blocks, guarantee_transaction_block=True)
for block in blocks:
await full_node_api.full_node.add_block(block)
# This should trigger peak post processing with the added transaction
assert f"Added transaction to mempool: {sb_name}\n" in caplog.text
# Make sure the transaction was retried and got added to the mempool
assert full_node_api.full_node.mempool_manager.get_mempool_item(sb_name, include_pending=False) is not None
12 changes: 8 additions & 4 deletions chia/_tests/core/mempool/test_mempool.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
from chia.types.mempool_inclusion_status import MempoolInclusionStatus
from chia.types.mempool_item import MempoolItem, UnspentLineageInfo
from chia.util.casts import int_to_bytes
from chia.util.errors import Err
from chia.util.errors import Err, ValidationError
from chia.util.hash import std_hash
from chia.util.recursive_replace import recursive_replace
from chia.wallet.conditions import AssertCoinAnnouncement, AssertPuzzleAnnouncement
Expand Down Expand Up @@ -361,7 +361,10 @@ async def respond_transaction(
self.full_node.full_node_store.pending_tx_request.pop(spend_name)
if spend_name in self.full_node.full_node_store.peers_with_tx:
self.full_node.full_node_store.peers_with_tx.pop(spend_name)
ret = await self.full_node.add_transaction(tx.transaction, spend_name, peer, test)
try:
ret = await self.full_node.add_transaction(tx.transaction, spend_name, peer, test)
except ValidationError as e:
ret = (MempoolInclusionStatus.FAILED, e.code)
invariant_check_mempool(self.full_node.mempool_manager.mempool)
return ret

Expand Down Expand Up @@ -2865,8 +2868,9 @@ async def test_invalid_coin_spend_coin(
coin_spend_0 = make_spend(coin_0, cs.puzzle_reveal, cs.solution)
new_bundle = recursive_replace(spend_bundle, "coin_spends", [coin_spend_0, *spend_bundle.coin_spends[1:]])
assert spend_bundle is not None
res = await full_node_1.full_node.add_transaction(new_bundle, new_bundle.name(), test=True)
assert res == (MempoolInclusionStatus.FAILED, Err.WRONG_PUZZLE_HASH)
with pytest.raises(ValidationError) as e:
await full_node_1.full_node.add_transaction(new_bundle, new_bundle.name(), test=True)
assert e.value.code == Err.WRONG_PUZZLE_HASH


coins = make_test_coins()
Expand Down
10 changes: 4 additions & 6 deletions chia/_tests/core/mempool/test_mempool_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
QUOTE_BYTES,
QUOTE_EXECUTION_COST,
MempoolManager,
NewPeakItem,
TimelockConditions,
can_replace,
check_removals,
Expand Down Expand Up @@ -3288,7 +3287,7 @@ async def test_new_peak_txs_added(condition_and_error: tuple[ConditionOpcode, Er
assert mempool_manager.peak is not None
condition_height = mempool_manager.peak.height + 1
condition, expected_error = condition_and_error
sb, sb_name, result = await generate_and_add_spendbundle(mempool_manager, [[condition, condition_height]])
_, sb_name, result = await generate_and_add_spendbundle(mempool_manager, [[condition, condition_height]])
_, status, error = result
assert status == MempoolInclusionStatus.PENDING
assert error == expected_error
Expand All @@ -3299,14 +3298,13 @@ async def test_new_peak_txs_added(condition_and_error: tuple[ConditionOpcode, Er
create_test_block_record(height=uint32(condition_height)), spent_coins
)
# We're not there yet (needs to be higher, not equal)
assert new_peak_info.spend_bundle_ids == []
assert mempool_manager.get_mempool_item(sb_name, include_pending=False) is None
assert new_peak_info.items == []
else:
spent_coins = None
new_peak_info = await mempool_manager.new_peak(
create_test_block_record(height=uint32(condition_height + 1)), spent_coins
)
# The item gets retried successfully now
mi = mempool_manager.get_mempool_item(sb_name, include_pending=False)
assert mi is not None
assert new_peak_info.items == [NewPeakItem(sb_name, sb, mi.conds)]
assert new_peak_info.spend_bundle_ids == [sb_name]
assert mempool_manager.get_mempool_item(sb_name, include_pending=False) is not None
Loading
Loading