Patch 0008: AIP-22 stages 1 to 3 and the rest of the chain-2800 fleet distribution of 2026-09-29; run-node.sh applies it, passes the stage-3 properties, ships the registry v3 epoch and rebuilds when the patch set changes

This commit is contained in:
Aere Network 2026-10-01 15:21:46 +03:00
parent ea4ebcda5d
commit 063424c490
7 changed files with 23074 additions and 3 deletions

View File

@ -99,6 +99,14 @@ Both patches target upstream commit `d2032017bb3b8cb215a97303980a1e4a643f7180`,
| `patches/0001-aere-pqc-precompiles-mainnet.patch` | `0x0AE1` to `0x0AE5`, the five live on mainnet | pristine upstream `d2032017` |
| `patches/0002-aere-pqc-precompiles-testnet.patch` | `0x0AE6` and `0x0AE7`, testnet only | the tree after 0001 |
| `patches/0003-aere-pq-anchor.patch` | the post-quantum certificate anchor for QBFT | pristine upstream `d2032017` |
| `patches/0004-aere-basefee-floor.patch` | the 1 Gwei base-fee floor live from block 10,141,734 | the tree after 0001 and 0003 |
| `patches/0005-aere-eip2935-futureeips.patch` | EIP-2935 in the futureEips milestone, Osaka block format kept | the tree after 0004 |
| `patches/0006-aere-pq-transactions.patch` | AIP-20, transaction type `0x50` authorized by ML-DSA | the tree after 0005 |
| `patches/0007-aere-pq-finality.patch` | AIP-21, `aere_getPqFinality` and the on-disk seal window | the tree after 0006 |
| `patches/0008-aere-pq-aip22.patch` | AIP-22 stages 1 to 3 (post-quantum validator ids from block 20,836,228) and the rest of the fleet distribution of 2026-09-29 | the tree after 0007 |
`run-node.sh` applies 0001 and 0003 to 0008, in that order; 0002 is for the testnet only. A node
built without 0008 stops at block 20,836,227.
Patch 0003 is a different kind of thing from the first two and is described in `anchor/README.md`.
It changes twenty upstream files and adds fifty-five, and it changes one build file by one line.

View File

@ -232,6 +232,37 @@ patch message; the in-file "Modifications Copyright" blocks for those files are
the delta (it is exact to the fleet sources) and enter the production sources with the next fleet
distribution.
## Patch 0008: AIP-22 stages 1 to 3 (2026-10-01)
**A node built from patches 0001 and 0003 to 0007 stops at block 20,836,227.** From block
20,836,228 (AIP-22 stage 3, 2026-09-30) the header of every chain-2800 block names the validators by
post-quantum ids from the registry v3 epoch, and such a node refuses the block with
`Invalid block header: Incorrect validators`. Measured: a follower built from patches 0001 and 0003
to 0007 refuses block 20,836,228 with exactly that message.
`patches/0008-aere-pq-aip22.patch` brings the recipe to the exact source tree of the chain-2800 fleet
distribution of 2026-09-29: AIP-22 stages 1 to 3 (and the code of stages 4 and 5, inactive unless
their own activation properties are set, which `run-node.sh` does not do), and the rest of what the
fleet runs (see the patch message). `run-node.sh` applies it, passes the four stage-3 properties
(`aere.pq.identityBlock`, `aere.pq.registryV3`, `aere.pq.registryV3.hashes`,
`aere.pq.registryV3.keysFrom`) and verifies the registry v3 epoch file in `registries/` against
`SHA256SUMS`. **If you built a node before, `run-node.sh` now rebuilds it**: the patch set is
fingerprinted, and a binary built from another patch set is no longer reused.
Measured 2026-10-01: patches 0001 and 0003 to 0008 applied with plain `git apply` on a pristine
`d2032017` checkout reproduce the patch generator's tree with zero differences; the build has the
same 3,554 classes as the fleet distribution, none only on one side, and **no class with different
code** (`javap -p -c` on the 45 pairs whose bytes differ: they differ only in the line-number table,
because of the in-file licence notices). The same comparison on the build without 0008 finds 51
classes missing and 56 with different code, so the comparison can tell them apart. A follower built
from this recipe, started on a database that ended at block 20,836,227, imported block 20,836,228 and
went on with ten peers and no refusal (20,840,327 within two minutes).
A follower started with `run-node.sh` logs `AERE-PQC-EMG-CEILING-01` at ERROR level while it
imports: that is the emergency seal-count ceiling the script sets for followers (see the comment
above `ANCHOR_MIN_SEALS_CEILING` in the script), not a refusal. A refusal names the block and the
rule that refused it.
---
## Sizing the JVM heap: bigger is not faster
@ -324,6 +355,10 @@ export BESU_OPTS="\
-Daere.pq.anchorV2Block=17047600 \
-Daere.pq.chainId=2800 \
-Daere.pq.hybridRegistry=$REG/hibrid-10.properties \
-Daere.pq.identityBlock=20836228 \
-Daere.pq.registryV3.hashes=20836228:0x5c6f09a44f1b6cc0e2264c9beaf4496e5fdd5bf8ee0dc6571fb5616c80a2e900 \
-Daere.pq.registryV3.keysFrom=20836228 \
-Daere.pq.registryV3=$REG/epoca-v3-2800-20836228.json \
-Daere.pq.schemeSchedule=17047568:falcon-512+slh-dsa-sha2-128s,20746736:falcon-512/32+slh-dsa-sha2-128s/128 \
-Daere.pqtx.forkBlock=19900000 \
-Daere.pq.anchor.minSealsCeiling=1"

View File

@ -494,6 +494,10 @@ passes"):
-Daere.pq.anchorV2Block=17047600
-Daere.pq.chainId=2800
-Daere.pq.hybridRegistry=<registries>/hibrid-10.properties
-Daere.pq.identityBlock=20836228
-Daere.pq.registryV3.hashes=20836228:0x5c6f09a44f1b6cc0e2264c9beaf4496e5fdd5bf8ee0dc6571fb5616c80a2e900
-Daere.pq.registryV3.keysFrom=20836228
-Daere.pq.registryV3=<registries>/epoca-v3-2800-20836228.json
-Daere.pq.schemeSchedule=17047568:falcon-512+slh-dsa-sha2-128s,20746736:falcon-512/32+slh-dsa-sha2-128s/128
-Daere.pqtx.forkBlock=19900000
-Daere.pq.anchor.minSealsCeiling=1

File diff suppressed because one or more lines are too long

View File

@ -4,3 +4,4 @@ c9a215d294e106f69fb2f16e3af21f9787523969e4b7260a3098f4b2cf458059 *registru-2800-
f155bd46958cd533e710f79aac4fd96549d7b6ca54df17df71a4e5d876012c59 *hibrid-1.properties
c6601ae5159875a090066946991517c9a38e5d6206da76b018c0917e1ca6f12f *manifest-18082816.json
35d69f60e357d405aff39fd33858de901dfb21327b0c4aeb18be17ffdaa115d6 *hibrid-10.properties
0212d8ff9e857f1c756b0004929e9ad4c7988341af4837d947e7b5263fb8c581 *epoca-v3-2800-20836228.json

File diff suppressed because one or more lines are too long

View File

@ -49,6 +49,7 @@ PATCHES=(
"0005-aere-eip2935-futureeips.patch"
"0006-aere-pq-transactions.patch"
"0007-aere-pq-finality.patch"
"0008-aere-pq-aip22.patch"
)
# --- locate self -------------------------------------------------------------------------------
@ -143,7 +144,7 @@ if [ -f "$REG_DIR/SHA256SUMS" ]; then
if command -v sha256sum >/dev/null 2>&1; then sha256sum -c SHA256SUMS >/dev/null
else shasum -a 256 -c SHA256SUMS >/dev/null; fi ) \
|| die "registries failed their SHA256SUMS check. Refusing to run with tampered registries."
ok "registries verified against SHA256SUMS (7 keys @ 13,014,000; 9 keys @ 13,600,000)"
ok "registries verified against SHA256SUMS ($(grep -c . "$REG_DIR/SHA256SUMS") files, see registries/README.md)"
else
note "WARNING: registries/SHA256SUMS not found; skipping registry integrity check"
fi
@ -191,12 +192,18 @@ for p in "${PATCHES[@]}"; do apply_patch "$p"; done
# --- 5. build ----------------------------------------------------------------------------------
say "5/6 Building the node (gradlew installDist)"
BESU_BIN="$BUILD_DIR/build/install/besu/bin/besu"
if [ -x "$BESU_BIN" ] && [ "$REBUILD" -eq 0 ]; then
ok "built node already present: $BESU_BIN (use --rebuild to force)"
# A binary built from an older patch set must not be reused: a node built from 0001-0007 stops at block 20,836,227
# (AIP-22 stage 3). The patch set is fingerprinted and a change forces a rebuild.
PATCHSET="$(for p in "${PATCHES[@]}"; do printf '%s %s\n' "$(sha256_of "$SCRIPT_DIR/patches/$p")" "$p"; done)"
BUILT_FROM="$(cat "$BUILD_DIR/.aere-patchset" 2>/dev/null || true)"
if [ -x "$BESU_BIN" ] && [ "$REBUILD" -eq 0 ] && [ "$BUILT_FROM" = "$PATCHSET" ]; then
ok "built node already present, from this exact patch set: $BESU_BIN (use --rebuild to force)"
else
[ -x "$BESU_BIN" ] && [ "$BUILT_FROM" != "$PATCHSET" ] && note "the existing build is from another patch set; rebuilding"
note "this compiles Besu from source and can take many minutes on the first run"
( cd "$BUILD_DIR" && ./gradlew --no-daemon installDist -x spotlessJavaCheck -x test )
[ -x "$BESU_BIN" ] || die "build finished but $BESU_BIN is missing"
printf '%s\n' "$PATCHSET" > "$BUILD_DIR/.aere-patchset"
ok "built: $BESU_BIN"
fi
@ -270,6 +277,10 @@ export BESU_OPTS="\
-Daere.pq.anchorV2Block=17047600 \
-Daere.pq.chainId=2800 \
-Daere.pq.hybridRegistry=$REG/hibrid-10.properties \
-Daere.pq.identityBlock=20836228 \
-Daere.pq.registryV3.hashes=20836228:0x5c6f09a44f1b6cc0e2264c9beaf4496e5fdd5bf8ee0dc6571fb5616c80a2e900 \
-Daere.pq.registryV3.keysFrom=20836228 \
-Daere.pq.registryV3=$REG/epoca-v3-2800-20836228.json \
-Daere.pq.schemeSchedule=17047568:falcon-512+slh-dsa-sha2-128s,20746736:falcon-512/32+slh-dsa-sha2-128s/128 \
-Daere.pqtx.forkBlock=19900000 \
-Daere.pq.anchor.minSealsCeiling=$ANCHOR_MIN_SEALS_CEILING"