Skip to content

Conversation

@arvidn
Copy link
Contributor

@arvidn arvidn commented Nov 3, 2025

Purpose:

With hard fork 2, we want to disallow block references. We have not seen any benefit or use of them so far. We currently compress block generators using (internal) back references. Deduplicating structures.

Disallowing block generators has the following upsides:

  • It's much simpler to validate a block, without needing access to the whole chain
  • A node don't necessarily need to keep every block around to validate and be a part of the chain
  • It's cheaper to validate blocks, without requiring additional DB lookups for previous blocks

There are two additional commits in this PR.

  1. Disable simulations of har fork 2 activation, since the existing chains do contain block references, we can't use them in tests after the hard fork. These will be re-enabled once we have new test block chains specifically made with the new consensus rules
  2. fix a flaky (and awkward) test related to rate limits

@arvidn arvidn added the Changed Required label for PR that categorizes merge commit message as "Changed" for changelog label Nov 3, 2025
@arvidn arvidn force-pushed the hard-fork-generator-refs branch from 82dab9f to e90d3c4 Compare November 4, 2025 12:27
@arvidn arvidn force-pushed the hard-fork-generator-refs branch from e90d3c4 to f4a0b5e Compare November 4, 2025 12:54
@arvidn arvidn marked this pull request as ready for review November 4, 2025 13:24
@arvidn arvidn requested a review from a team as a code owner November 4, 2025 13:24
@github-actions
Copy link
Contributor

github-actions bot commented Nov 4, 2025

File Coverage Missing Lines
chia/consensus/block_body_validation.py 66.7% lines 350
chia/consensus/blockchain.py 83.3% lines 710
chia/simulator/block_tools.py 33.3% lines 389-390
Total Missing Coverage
18 lines 4 lines 77%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Changed Required label for PR that categorizes merge commit message as "Changed" for changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants