Skip to content

Commit e862431

Browse files
authored
catchup: into long_lived/datalayer_merkle_blob from main @ da20e41 (#19745)
Source hash: da20e41 Remaining commits: 0
2 parents 8e2545f + 668548c commit e862431

File tree

218 files changed

+2470
-1331
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

218 files changed

+2470
-1331
lines changed

.github/workflows/conflict-check.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,3 @@ jobs:
2222
# targeting 2 minutes of retry, longest observed window thus far is ~30 seconds
2323
retryIntervalSec: 5
2424
retryMax: 24
25-
commentToAddOnConflict: "This pull request has conflicts, please resolve those before we can evaluate the pull request."
26-
commentToAddOnClean: "Conflicts have been resolved. A maintainer will review the pull request shortly."

.pre-commit-config.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,14 @@ repos:
2828
entry: ./activated.py ruff check --fix
2929
language: system
3030
types: [python]
31+
- repo: local
32+
hooks:
33+
- id: tach
34+
name: tach
35+
entry: ./activated.py tach check
36+
language: system
37+
types: [python]
38+
pass_filenames: false
3139
- repo: local
3240
hooks:
3341
- id: poetry
@@ -56,7 +64,6 @@ repos:
5664
- id: trailing-whitespace
5765
- id: check-merge-conflict
5866
- id: check-ast
59-
- id: debug-statements
6067
- repo: local
6168
hooks:
6269
- id: chialispp

CHANGELOG.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,28 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project does not yet adhere to [Semantic Versioning](https://semver.org/spec/v2.0.0.html)
77
for setuptools_scm/PEP 440 reasons.
88

9+
## 2.5.4 Chia blockchain 2025-05-28
10+
11+
## What's Changed
12+
13+
### Added
14+
15+
- Enabled Keccak support in the wallet
16+
- Improved logging and timing around block validation
17+
- Improved logging of block creation
18+
19+
### Changed
20+
21+
- Mempool: Optimized removal checking
22+
- Mempool: Optimized and hardened dedup logic
23+
- Mempool: Reject transactions that take too long to validate (2 seconds)
24+
25+
### Fixed
26+
27+
- Tighten chia_rs version to `>=0.21, <0.22` (Fixes #19613)
28+
- Fixed timelord peak selection to match the full node
29+
- Used monotonic clock for timing functions in harvester (Fixes "does not fit into uint" log errors)
30+
931
## 2.5.3 Chia blockchain 2025-03-25
1032

1133
## What's Changed

benchmarks/block_ref.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
from chia.consensus.blockchain import Blockchain
1717
from chia.consensus.default_constants import DEFAULT_CONSTANTS
1818
from chia.consensus.get_block_generator import get_block_generator
19+
from chia.full_node.block_height_map import BlockHeightMap
1920
from chia.full_node.block_store import BlockStore
2021
from chia.full_node.coin_store import CoinStore
2122
from chia.types.blockchain_format.serialized_program import SerializedProgram
@@ -68,7 +69,8 @@ async def main(db_path: Path) -> None:
6869
start_time = monotonic()
6970
# make configurable
7071
reserved_cores = 4
71-
blockchain = await Blockchain.create(coin_store, block_store, DEFAULT_CONSTANTS, db_path.parent, reserved_cores)
72+
height_map = await BlockHeightMap.create(db_path.parent, db_wrapper)
73+
blockchain = await Blockchain.create(coin_store, block_store, height_map, DEFAULT_CONSTANTS, reserved_cores)
7274

7375
peak = blockchain.get_peak()
7476
assert peak is not None

benchmarks/coin_store.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,12 +144,13 @@ async def run_new_block_benchmark(version: int) -> None:
144144

145145
# add one new coins
146146
c = make_coin()
147+
coin_id = c.name()
147148
additions.append(c)
148149
total_add += 1
149150

150151
farmer_coin, pool_coin = rewards(uint32(height))
151-
all_coins += [c.name()]
152-
all_unspent += [c.name()]
152+
all_coins += [coin_id]
153+
all_unspent += [coin_id]
153154
all_unspent += [pool_coin.name(), farmer_coin.name()]
154155
total_add += 2
155156

benchmarks/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def get_commit_hash() -> str:
6464
sys.exit("Failed to get the commit hash")
6565
try:
6666
if len(subprocess.run(["git", "status", "-s"], check=True, stdout=subprocess.PIPE).stdout) > 0:
67-
raise Exception()
67+
raise Exception
6868
except Exception:
6969
commit_hash += "-dirty"
7070
return commit_hash

build_scripts/npm_windows/package-lock.json

Lines changed: 42 additions & 36 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

chia/_tests/clvm/coin_store.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
from chia_rs.sized_ints import uint32, uint64
1111

1212
from chia._tests.util.get_name_puzzle_conditions import get_name_puzzle_conditions
13+
from chia.consensus.check_time_locks import check_time_locks
1314
from chia.consensus.cost_calculator import NPCResult
1415
from chia.full_node.bundle_tools import simple_solution_generator
15-
from chia.full_node.mempool_check_conditions import mempool_check_time_locks
1616
from chia.types.blockchain_format.coin import Coin
1717
from chia.types.coin_record import CoinRecord
1818
from chia.util.errors import Err
@@ -83,7 +83,7 @@ def validate_spend_bundle(self, spend_bundle: SpendBundle, now: CoinTimestamp, m
8383
uint64(now.seconds),
8484
)
8585

86-
err = mempool_check_time_locks(
86+
err = check_time_locks(
8787
ephemeral_db,
8888
result.conds,
8989
# TODO: this is technically not right, it's supposed to be the

chia/_tests/clvm/test_spend_sim.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
@pytest.mark.anyio
1515
async def test_farming():
1616
async with sim_and_client(pass_prefarm=False) as (sim, _):
17-
for i in range(0, 5):
17+
for i in range(5):
1818
await sim.farm_block()
1919

2020
assert len(sim.blocks) == 5
@@ -25,7 +25,7 @@ async def test_farming():
2525
@pytest.mark.anyio
2626
async def test_rewind():
2727
async with sim_and_client() as (sim, _):
28-
for i in range(0, 5):
28+
for i in range(5):
2929
await sim.farm_block()
3030

3131
save_height = sim.get_height()
@@ -39,11 +39,11 @@ async def test_rewind():
3939
@pytest.mark.anyio
4040
async def test_all_endpoints():
4141
async with sim_and_client() as (sim, sim_client):
42-
for i in range(0, 5):
42+
for i in range(5):
4343
await sim.farm_block()
4444
await sim.farm_block(bytes32.zeros)
4545
await sim.farm_block(bytes32([1] * 32))
46-
for i in range(0, 5):
46+
for i in range(5):
4747
await sim.farm_block()
4848

4949
# get_coin_records_by_hint

chia/_tests/cmds/cmd_test_utils.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,10 @@
1717
from chia.cmds.chia import cli as chia_cli
1818
from chia.cmds.cmds_util import _T_RpcClient, node_config_section_names
1919
from chia.consensus.default_constants import DEFAULT_CONSTANTS
20-
from chia.rpc.data_layer_rpc_client import DataLayerRpcClient
21-
from chia.rpc.farmer_rpc_client import FarmerRpcClient
22-
from chia.rpc.full_node_rpc_client import FullNodeRpcClient
20+
from chia.data_layer.data_layer_rpc_client import DataLayerRpcClient
21+
from chia.farmer.farmer_rpc_client import FarmerRpcClient
22+
from chia.full_node.full_node_rpc_client import FullNodeRpcClient
2323
from chia.rpc.rpc_client import RpcClient
24-
from chia.rpc.wallet_request_types import GetSyncStatusResponse, SendTransactionMultiResponse
25-
from chia.rpc.wallet_rpc_client import WalletRpcClient
2624
from chia.simulator.simulator_full_node_rpc_client import SimulatorFullNodeRpcClient
2725
from chia.types.coin_record import CoinRecord
2826
from chia.types.signing_mode import SigningMode
@@ -35,6 +33,8 @@
3533
from chia.wallet.util.transaction_type import TransactionType
3634
from chia.wallet.util.tx_config import CoinSelectionConfig, TXConfig
3735
from chia.wallet.util.wallet_types import WalletType
36+
from chia.wallet.wallet_request_types import GetSyncStatusResponse, SendTransactionMultiResponse
37+
from chia.wallet.wallet_rpc_client import WalletRpcClient
3838
from chia.wallet.wallet_spend_bundle import WalletSpendBundle
3939

4040
# Any functions that are the same for every command being tested should be below.

0 commit comments

Comments
 (0)