diff --git a/NOTICE b/NOTICE index e948296..06463f5 100644 --- a/NOTICE +++ b/NOTICE @@ -3,9 +3,18 @@ Copyright contributors to the Aere Network This product includes software developed by Hyperledger Besu (https://github.com/hyperledger/besu), -Copyright contributors to Hyperledger Besu, licensed under the Apache License, Version 2.0. +The attribution notices carried by the upstream files in this repository are: + + Copyright ConsenSys AG. + Copyright contributors to Besu. + Copyright contributors to Hyperledger Besu. + +They are reproduced here because section 4(d) of the Apache License requires the +NOTICE to carry the attribution notices of the work it derives from, and because +naming only one of three would have been a smaller truth than the files tell. + The files in this repository are additions to, and modifications of, Hyperledger Besu. They are published under the same licence as the code they derive from. Several files remain in Besu's own Java packages (for example diff --git a/anchor/README.md b/anchor/README.md index 318c3a0..d6934c2 100644 --- a/anchor/README.md +++ b/anchor/README.md @@ -67,12 +67,6 @@ now pinned: change one byte of it and the digest no longer matches, and the head - tests — including the negative controls. A test that cannot fail is not a test, and several of these exist specifically to prove the guards can fail. -The same code is also delivered as `../patches/0003-aere-pq-anchor.patch`, generated against -that commit. Applying the patch produces files byte-identical to the ones in this directory, which -was checked rather than assumed: 75 files compared, 0 differences. Use the patch to build; read the -files here to review. Whole files are convenient to read and dangerous to apply, and `BASE.txt` -explains why. - `BASE.txt` names the upstream commit. Applying these files to any other tree overwrites whatever upstream added since, silently. That is stated there in more detail because it is a real hazard. diff --git a/anchor/app/src/main/java/org/hyperledger/besu/cli/BesuCommand.java b/anchor/app/src/main/java/org/hyperledger/besu/cli/BesuCommand.java index 8441bb6..df19c1d 100644 --- a/anchor/app/src/main/java/org/hyperledger/besu/cli/BesuCommand.java +++ b/anchor/app/src/main/java/org/hyperledger/besu/cli/BesuCommand.java @@ -11,6 +11,12 @@ * specific language governing permissions and limitations under the License. * * SPDX-License-Identifier: Apache-2.0 + * + * Modifications Copyright contributors to the Aere Network. + * + * This file was modified by contributors to the Aere Network, as required by section 4(b) of the + * Apache License 2.0. The copyright header above is the upstream one and is left exactly as it was + * found, as section 4(c) requires. The change itself is in patches/0003-aere-pq-anchor.patch. */ package org.hyperledger.besu.cli; diff --git a/anchor/app/src/main/java/org/hyperledger/besu/controller/QbftBesuControllerBuilder.java b/anchor/app/src/main/java/org/hyperledger/besu/controller/QbftBesuControllerBuilder.java index f6dcb1e..c245c06 100644 --- a/anchor/app/src/main/java/org/hyperledger/besu/controller/QbftBesuControllerBuilder.java +++ b/anchor/app/src/main/java/org/hyperledger/besu/controller/QbftBesuControllerBuilder.java @@ -11,6 +11,12 @@ * specific language governing permissions and limitations under the License. * * SPDX-License-Identifier: Apache-2.0 + * + * Modifications Copyright contributors to the Aere Network. + * + * This file was modified by contributors to the Aere Network, as required by section 4(b) of the + * Apache License 2.0. The copyright header above is the upstream one and is left exactly as it was + * found, as section 4(c) requires. The change itself is in patches/0003-aere-pq-anchor.patch. */ package org.hyperledger.besu.controller; diff --git a/anchor/config/src/main/java/org/hyperledger/besu/config/JsonGenesisConfigOptions.java b/anchor/config/src/main/java/org/hyperledger/besu/config/JsonGenesisConfigOptions.java index fb0b9ed..e0d6a60 100644 --- a/anchor/config/src/main/java/org/hyperledger/besu/config/JsonGenesisConfigOptions.java +++ b/anchor/config/src/main/java/org/hyperledger/besu/config/JsonGenesisConfigOptions.java @@ -11,6 +11,12 @@ * specific language governing permissions and limitations under the License. * * SPDX-License-Identifier: Apache-2.0 + * + * Modifications Copyright contributors to the Aere Network. + * + * This file was modified by contributors to the Aere Network, as required by section 4(b) of the + * Apache License 2.0. The copyright header above is the upstream one and is left exactly as it was + * found, as section 4(c) requires. The change itself is in patches/0003-aere-pq-anchor.patch. */ package org.hyperledger.besu.config; diff --git a/anchor/consensus/common/build.gradle b/anchor/consensus/common/build.gradle index c603ca0..a6f5276 100644 --- a/anchor/consensus/common/build.gradle +++ b/anchor/consensus/common/build.gradle @@ -11,6 +11,12 @@ * specific language governing permissions and limitations under the License. * * SPDX-License-Identifier: Apache-2.0 + * + * Modifications Copyright contributors to the Aere Network. + * + * This file was modified by contributors to the Aere Network, as required by section 4(b) of the + * Apache License 2.0. The copyright header above is the upstream one and is left exactly as it was + * found, as section 4(c) requires. The change itself is in patches/0003-aere-pq-anchor.patch. */ apply plugin: 'java-library' diff --git a/anchor/consensus/common/src/main/java/org/hyperledger/besu/consensus/common/bft/BftBlockInterface.java b/anchor/consensus/common/src/main/java/org/hyperledger/besu/consensus/common/bft/BftBlockInterface.java index 2e565ec..da9a3e3 100644 --- a/anchor/consensus/common/src/main/java/org/hyperledger/besu/consensus/common/bft/BftBlockInterface.java +++ b/anchor/consensus/common/src/main/java/org/hyperledger/besu/consensus/common/bft/BftBlockInterface.java @@ -11,6 +11,12 @@ * specific language governing permissions and limitations under the License. * * SPDX-License-Identifier: Apache-2.0 + * + * Modifications Copyright contributors to the Aere Network. + * + * This file was modified by contributors to the Aere Network, as required by section 4(b) of the + * Apache License 2.0. The copyright header above is the upstream one and is left exactly as it was + * found, as section 4(c) requires. The change itself is in patches/0003-aere-pq-anchor.patch. */ package org.hyperledger.besu.consensus.common.bft; diff --git a/anchor/consensus/common/src/main/java/org/hyperledger/besu/consensus/common/bft/BftExtraData.java b/anchor/consensus/common/src/main/java/org/hyperledger/besu/consensus/common/bft/BftExtraData.java index e911ca4..913f68f 100644 --- a/anchor/consensus/common/src/main/java/org/hyperledger/besu/consensus/common/bft/BftExtraData.java +++ b/anchor/consensus/common/src/main/java/org/hyperledger/besu/consensus/common/bft/BftExtraData.java @@ -11,6 +11,12 @@ * specific language governing permissions and limitations under the License. * * SPDX-License-Identifier: Apache-2.0 + * + * Modifications Copyright contributors to the Aere Network. + * + * This file was modified by contributors to the Aere Network, as required by section 4(b) of the + * Apache License 2.0. The copyright header above is the upstream one and is left exactly as it was + * found, as section 4(c) requires. The change itself is in patches/0003-aere-pq-anchor.patch. */ package org.hyperledger.besu.consensus.common.bft; diff --git a/anchor/consensus/common/src/main/java/org/hyperledger/besu/consensus/common/bft/blockcreation/BftBlockCreatorFactory.java b/anchor/consensus/common/src/main/java/org/hyperledger/besu/consensus/common/bft/blockcreation/BftBlockCreatorFactory.java index c5a78af..1ecdcbf 100644 --- a/anchor/consensus/common/src/main/java/org/hyperledger/besu/consensus/common/bft/blockcreation/BftBlockCreatorFactory.java +++ b/anchor/consensus/common/src/main/java/org/hyperledger/besu/consensus/common/bft/blockcreation/BftBlockCreatorFactory.java @@ -11,6 +11,12 @@ * specific language governing permissions and limitations under the License. * * SPDX-License-Identifier: Apache-2.0 + * + * Modifications Copyright contributors to the Aere Network. + * + * This file was modified by contributors to the Aere Network, as required by section 4(b) of the + * Apache License 2.0. The copyright header above is the upstream one and is left exactly as it was + * found, as section 4(c) requires. The change itself is in patches/0003-aere-pq-anchor.patch. */ package org.hyperledger.besu.consensus.common.bft.blockcreation; diff --git a/anchor/consensus/qbft-core/src/main/java/org/hyperledger/besu/consensus/qbft/core/messagewrappers/Commit.java b/anchor/consensus/qbft-core/src/main/java/org/hyperledger/besu/consensus/qbft/core/messagewrappers/Commit.java index 7e89e5b..b3ba746 100644 --- a/anchor/consensus/qbft-core/src/main/java/org/hyperledger/besu/consensus/qbft/core/messagewrappers/Commit.java +++ b/anchor/consensus/qbft-core/src/main/java/org/hyperledger/besu/consensus/qbft/core/messagewrappers/Commit.java @@ -11,6 +11,12 @@ * specific language governing permissions and limitations under the License. * * SPDX-License-Identifier: Apache-2.0 + * + * Modifications Copyright contributors to the Aere Network. + * + * This file was modified by contributors to the Aere Network, as required by section 4(b) of the + * Apache License 2.0. The copyright header above is the upstream one and is left exactly as it was + * found, as section 4(c) requires. The change itself is in patches/0003-aere-pq-anchor.patch. */ package org.hyperledger.besu.consensus.qbft.core.messagewrappers; diff --git a/anchor/consensus/qbft-core/src/main/java/org/hyperledger/besu/consensus/qbft/core/network/QbftMessageTransmitter.java b/anchor/consensus/qbft-core/src/main/java/org/hyperledger/besu/consensus/qbft/core/network/QbftMessageTransmitter.java index ebd0771..b0ba9ea 100644 --- a/anchor/consensus/qbft-core/src/main/java/org/hyperledger/besu/consensus/qbft/core/network/QbftMessageTransmitter.java +++ b/anchor/consensus/qbft-core/src/main/java/org/hyperledger/besu/consensus/qbft/core/network/QbftMessageTransmitter.java @@ -11,6 +11,12 @@ * specific language governing permissions and limitations under the License. * * SPDX-License-Identifier: Apache-2.0 + * + * Modifications Copyright contributors to the Aere Network. + * + * This file was modified by contributors to the Aere Network, as required by section 4(b) of the + * Apache License 2.0. The copyright header above is the upstream one and is left exactly as it was + * found, as section 4(c) requires. The change itself is in patches/0003-aere-pq-anchor.patch. */ package org.hyperledger.besu.consensus.qbft.core.network; diff --git a/anchor/consensus/qbft-core/src/main/java/org/hyperledger/besu/consensus/qbft/core/payload/CommitPayload.java b/anchor/consensus/qbft-core/src/main/java/org/hyperledger/besu/consensus/qbft/core/payload/CommitPayload.java index 4aefac6..e55efb5 100644 --- a/anchor/consensus/qbft-core/src/main/java/org/hyperledger/besu/consensus/qbft/core/payload/CommitPayload.java +++ b/anchor/consensus/qbft-core/src/main/java/org/hyperledger/besu/consensus/qbft/core/payload/CommitPayload.java @@ -11,6 +11,12 @@ * specific language governing permissions and limitations under the License. * * SPDX-License-Identifier: Apache-2.0 + * + * Modifications Copyright contributors to the Aere Network. + * + * This file was modified by contributors to the Aere Network, as required by section 4(b) of the + * Apache License 2.0. The copyright header above is the upstream one and is left exactly as it was + * found, as section 4(c) requires. The change itself is in patches/0003-aere-pq-anchor.patch. */ package org.hyperledger.besu.consensus.qbft.core.payload; diff --git a/anchor/consensus/qbft-core/src/main/java/org/hyperledger/besu/consensus/qbft/core/payload/MessageFactory.java b/anchor/consensus/qbft-core/src/main/java/org/hyperledger/besu/consensus/qbft/core/payload/MessageFactory.java index da18fd3..7d0e371 100644 --- a/anchor/consensus/qbft-core/src/main/java/org/hyperledger/besu/consensus/qbft/core/payload/MessageFactory.java +++ b/anchor/consensus/qbft-core/src/main/java/org/hyperledger/besu/consensus/qbft/core/payload/MessageFactory.java @@ -11,6 +11,12 @@ * specific language governing permissions and limitations under the License. * * SPDX-License-Identifier: Apache-2.0 + * + * Modifications Copyright contributors to the Aere Network. + * + * This file was modified by contributors to the Aere Network, as required by section 4(b) of the + * Apache License 2.0. The copyright header above is the upstream one and is left exactly as it was + * found, as section 4(c) requires. The change itself is in patches/0003-aere-pq-anchor.patch. */ package org.hyperledger.besu.consensus.qbft.core.payload; diff --git a/anchor/consensus/qbft-core/src/main/java/org/hyperledger/besu/consensus/qbft/core/statemachine/QbftBlockHeightManager.java b/anchor/consensus/qbft-core/src/main/java/org/hyperledger/besu/consensus/qbft/core/statemachine/QbftBlockHeightManager.java index 4a20d6b..f8cd071 100644 --- a/anchor/consensus/qbft-core/src/main/java/org/hyperledger/besu/consensus/qbft/core/statemachine/QbftBlockHeightManager.java +++ b/anchor/consensus/qbft-core/src/main/java/org/hyperledger/besu/consensus/qbft/core/statemachine/QbftBlockHeightManager.java @@ -11,6 +11,12 @@ * specific language governing permissions and limitations under the License. * * SPDX-License-Identifier: Apache-2.0 + * + * Modifications Copyright contributors to the Aere Network. + * + * This file was modified by contributors to the Aere Network, as required by section 4(b) of the + * Apache License 2.0. The copyright header above is the upstream one and is left exactly as it was + * found, as section 4(c) requires. The change itself is in patches/0003-aere-pq-anchor.patch. */ package org.hyperledger.besu.consensus.qbft.core.statemachine; diff --git a/anchor/consensus/qbft-core/src/main/java/org/hyperledger/besu/consensus/qbft/core/statemachine/QbftRound.java b/anchor/consensus/qbft-core/src/main/java/org/hyperledger/besu/consensus/qbft/core/statemachine/QbftRound.java index 2b2dd48..054b9c3 100644 --- a/anchor/consensus/qbft-core/src/main/java/org/hyperledger/besu/consensus/qbft/core/statemachine/QbftRound.java +++ b/anchor/consensus/qbft-core/src/main/java/org/hyperledger/besu/consensus/qbft/core/statemachine/QbftRound.java @@ -11,6 +11,12 @@ * specific language governing permissions and limitations under the License. * * SPDX-License-Identifier: Apache-2.0 + * + * Modifications Copyright contributors to the Aere Network. + * + * This file was modified by contributors to the Aere Network, as required by section 4(b) of the + * Apache License 2.0. The copyright header above is the upstream one and is left exactly as it was + * found, as section 4(c) requires. The change itself is in patches/0003-aere-pq-anchor.patch. */ package org.hyperledger.besu.consensus.qbft.core.statemachine; diff --git a/anchor/consensus/qbft-core/src/main/java/org/hyperledger/besu/consensus/qbft/core/statemachine/RoundState.java b/anchor/consensus/qbft-core/src/main/java/org/hyperledger/besu/consensus/qbft/core/statemachine/RoundState.java index 9a647fb..e7a7aad 100644 --- a/anchor/consensus/qbft-core/src/main/java/org/hyperledger/besu/consensus/qbft/core/statemachine/RoundState.java +++ b/anchor/consensus/qbft-core/src/main/java/org/hyperledger/besu/consensus/qbft/core/statemachine/RoundState.java @@ -11,6 +11,12 @@ * specific language governing permissions and limitations under the License. * * SPDX-License-Identifier: Apache-2.0 + * + * Modifications Copyright contributors to the Aere Network. + * + * This file was modified by contributors to the Aere Network, as required by section 4(b) of the + * Apache License 2.0. The copyright header above is the upstream one and is left exactly as it was + * found, as section 4(c) requires. The change itself is in patches/0003-aere-pq-anchor.patch. */ package org.hyperledger.besu.consensus.qbft.core.statemachine; diff --git a/anchor/consensus/qbft-core/src/main/java/org/hyperledger/besu/consensus/qbft/core/types/QbftBlockCreator.java b/anchor/consensus/qbft-core/src/main/java/org/hyperledger/besu/consensus/qbft/core/types/QbftBlockCreator.java index acc3cc8..c397cab 100644 --- a/anchor/consensus/qbft-core/src/main/java/org/hyperledger/besu/consensus/qbft/core/types/QbftBlockCreator.java +++ b/anchor/consensus/qbft-core/src/main/java/org/hyperledger/besu/consensus/qbft/core/types/QbftBlockCreator.java @@ -11,6 +11,12 @@ * specific language governing permissions and limitations under the License. * * SPDX-License-Identifier: Apache-2.0 + * + * Modifications Copyright contributors to the Aere Network. + * + * This file was modified by contributors to the Aere Network, as required by section 4(b) of the + * Apache License 2.0. The copyright header above is the upstream one and is left exactly as it was + * found, as section 4(c) requires. The change itself is in patches/0003-aere-pq-anchor.patch. */ package org.hyperledger.besu.consensus.qbft.core.types; diff --git a/anchor/consensus/qbft/src/main/java/org/hyperledger/besu/consensus/qbft/QbftBlockHeaderValidationRulesetFactory.java b/anchor/consensus/qbft/src/main/java/org/hyperledger/besu/consensus/qbft/QbftBlockHeaderValidationRulesetFactory.java index d355ed2..6c3fba5 100644 --- a/anchor/consensus/qbft/src/main/java/org/hyperledger/besu/consensus/qbft/QbftBlockHeaderValidationRulesetFactory.java +++ b/anchor/consensus/qbft/src/main/java/org/hyperledger/besu/consensus/qbft/QbftBlockHeaderValidationRulesetFactory.java @@ -11,6 +11,12 @@ * specific language governing permissions and limitations under the License. * * SPDX-License-Identifier: Apache-2.0 + * + * Modifications Copyright contributors to the Aere Network. + * + * This file was modified by contributors to the Aere Network, as required by section 4(b) of the + * Apache License 2.0. The copyright header above is the upstream one and is left exactly as it was + * found, as section 4(c) requires. The change itself is in patches/0003-aere-pq-anchor.patch. */ package org.hyperledger.besu.consensus.qbft; diff --git a/anchor/consensus/qbft/src/main/java/org/hyperledger/besu/consensus/qbft/QbftExtraDataCodec.java b/anchor/consensus/qbft/src/main/java/org/hyperledger/besu/consensus/qbft/QbftExtraDataCodec.java index 5563091..59ef0ed 100644 --- a/anchor/consensus/qbft/src/main/java/org/hyperledger/besu/consensus/qbft/QbftExtraDataCodec.java +++ b/anchor/consensus/qbft/src/main/java/org/hyperledger/besu/consensus/qbft/QbftExtraDataCodec.java @@ -11,6 +11,12 @@ * specific language governing permissions and limitations under the License. * * SPDX-License-Identifier: Apache-2.0 + * + * Modifications Copyright contributors to the Aere Network. + * + * This file was modified by contributors to the Aere Network, as required by section 4(b) of the + * Apache License 2.0. The copyright header above is the upstream one and is left exactly as it was + * found, as section 4(c) requires. The change itself is in patches/0003-aere-pq-anchor.patch. */ package org.hyperledger.besu.consensus.qbft; diff --git a/anchor/consensus/qbft/src/main/java/org/hyperledger/besu/consensus/qbft/adaptor/QbftBlockCreatorAdaptor.java b/anchor/consensus/qbft/src/main/java/org/hyperledger/besu/consensus/qbft/adaptor/QbftBlockCreatorAdaptor.java index 267d79e..2151f57 100644 --- a/anchor/consensus/qbft/src/main/java/org/hyperledger/besu/consensus/qbft/adaptor/QbftBlockCreatorAdaptor.java +++ b/anchor/consensus/qbft/src/main/java/org/hyperledger/besu/consensus/qbft/adaptor/QbftBlockCreatorAdaptor.java @@ -11,6 +11,12 @@ * specific language governing permissions and limitations under the License. * * SPDX-License-Identifier: Apache-2.0 + * + * Modifications Copyright contributors to the Aere Network. + * + * This file was modified by contributors to the Aere Network, as required by section 4(b) of the + * Apache License 2.0. The copyright header above is the upstream one and is left exactly as it was + * found, as section 4(c) requires. The change itself is in patches/0003-aere-pq-anchor.patch. */ package org.hyperledger.besu.consensus.qbft.adaptor; diff --git a/anchor/consensus/qbft/src/main/java/org/hyperledger/besu/consensus/qbft/blockcreation/QbftBlockCreatorFactory.java b/anchor/consensus/qbft/src/main/java/org/hyperledger/besu/consensus/qbft/blockcreation/QbftBlockCreatorFactory.java index 242efbe..cabeba9 100644 --- a/anchor/consensus/qbft/src/main/java/org/hyperledger/besu/consensus/qbft/blockcreation/QbftBlockCreatorFactory.java +++ b/anchor/consensus/qbft/src/main/java/org/hyperledger/besu/consensus/qbft/blockcreation/QbftBlockCreatorFactory.java @@ -11,6 +11,12 @@ * specific language governing permissions and limitations under the License. * * SPDX-License-Identifier: Apache-2.0 + * + * Modifications Copyright contributors to the Aere Network. + * + * This file was modified by contributors to the Aere Network, as required by section 4(b) of the + * Apache License 2.0. The copyright header above is the upstream one and is left exactly as it was + * found, as section 4(c) requires. The change itself is in patches/0003-aere-pq-anchor.patch. */ package org.hyperledger.besu.consensus.qbft.blockcreation; diff --git a/anchor/ethereum/eth/src/main/java/org/hyperledger/besu/ethereum/eth/sync/DownloadHeadersStep.java b/anchor/ethereum/eth/src/main/java/org/hyperledger/besu/ethereum/eth/sync/DownloadHeadersStep.java index f8a4bed..76c4356 100644 --- a/anchor/ethereum/eth/src/main/java/org/hyperledger/besu/ethereum/eth/sync/DownloadHeadersStep.java +++ b/anchor/ethereum/eth/src/main/java/org/hyperledger/besu/ethereum/eth/sync/DownloadHeadersStep.java @@ -11,6 +11,12 @@ * specific language governing permissions and limitations under the License. * * SPDX-License-Identifier: Apache-2.0 + * + * Modifications Copyright contributors to the Aere Network. + * + * This file was modified by contributors to the Aere Network, as required by section 4(b) of the + * Apache License 2.0. The copyright header above is the upstream one and is left exactly as it was + * found, as section 4(c) requires. The change itself is in patches/0003-aere-pq-anchor.patch. */ package org.hyperledger.besu.ethereum.eth.sync; diff --git a/patches/0003-aere-pq-anchor.patch b/patches/0003-aere-pq-anchor.patch index 828104b..3101d43 100644 --- a/patches/0003-aere-pq-anchor.patch +++ b/patches/0003-aere-pq-anchor.patch @@ -1,6 +1,6 @@ -From 46c30d127f389d1c02778e546733e33db56c2dde Mon Sep 17 00:00:00 2001 +From 050489f7245fd9e1fa982e844b6984a3eba45d29 Mon Sep 17 00:00:00 2001 From: Aere Network -Date: Wed, 12 Aug 2026 02:02:19 +0300 +Date: Wed, 12 Aug 2026 02:25:12 +0300 Subject: [PATCH] Aere Network: post-quantum certificate anchor for QBFT Puts a 32-byte digest of the validator certificate into vanityData, which is @@ -16,14 +16,14 @@ Consensus on chain 2800 remains classical secp256k1 ECDSA. This binds a post-quantum certificate to the block hash; it does not make consensus post-quantum. --- - .../org/hyperledger/besu/cli/BesuCommand.java | 18 + + .../org/hyperledger/besu/cli/BesuCommand.java | 24 + .../cli/options/AerePqEmergencyOptions.java | 245 ++ - .../controller/QbftBesuControllerBuilder.java | 267 ++ + .../controller/QbftBesuControllerBuilder.java | 273 ++ .../options/AerePqEmergencyOptionsTest.java | 136 + - .../besu/config/JsonGenesisConfigOptions.java | 17 + - consensus/common/build.gradle | 1 + - .../common/bft/BftBlockInterface.java | 16 +- - .../consensus/common/bft/BftExtraData.java | 44 +- + .../besu/config/JsonGenesisConfigOptions.java | 23 + + consensus/common/build.gradle | 7 + + .../common/bft/BftBlockInterface.java | 22 +- + .../consensus/common/bft/BftExtraData.java | 50 +- .../besu/consensus/common/bft/FalconSeal.java | 88 + .../common/bft/FalconSealSupport.java | 3709 +++++++++++++++++ .../besu/consensus/common/bft/PqAnchor.java | 335 ++ @@ -37,7 +37,7 @@ post-quantum. .../consensus/common/bft/PqSealCache.java | 351 ++ .../consensus/common/bft/PqSealStore.java | 384 ++ .../common/bft/PqSignerRegistry.java | 172 + - .../blockcreation/BftBlockCreatorFactory.java | 19 +- + .../blockcreation/BftBlockCreatorFactory.java | 25 +- .../bft/blockcreation/PqAnchorProducer.java | 347 ++ .../common/bft/tools/PqRegistryHashTool.java | 231 + .../common/bft/FalconAttachIntervalTest.java | 232 ++ @@ -63,18 +63,18 @@ post-quantum. .../common/bft/PqSignedHeightTest.java | 403 ++ .../common/bft/PqStartupHistoryTest.java | 325 ++ .../consensus/common/bft/PqV2Fixture.java | 233 ++ - .../qbft/core/messagewrappers/Commit.java | 12 + - .../core/network/QbftMessageTransmitter.java | 19 +- - .../qbft/core/payload/CommitPayload.java | 141 +- - .../qbft/core/payload/MessageFactory.java | 22 +- - .../statemachine/QbftBlockHeightManager.java | 23 +- - .../qbft/core/statemachine/QbftRound.java | 185 +- - .../qbft/core/statemachine/RoundState.java | 19 + - .../qbft/core/types/QbftBlockCreator.java | 31 + - ...ftBlockHeaderValidationRulesetFactory.java | 104 +- - .../consensus/qbft/QbftExtraDataCodec.java | 86 +- - .../qbft/adaptor/QbftBlockCreatorAdaptor.java | 208 +- - .../QbftBlockCreatorFactory.java | 29 +- + .../qbft/core/messagewrappers/Commit.java | 18 + + .../core/network/QbftMessageTransmitter.java | 25 +- + .../qbft/core/payload/CommitPayload.java | 147 +- + .../qbft/core/payload/MessageFactory.java | 28 +- + .../statemachine/QbftBlockHeightManager.java | 29 +- + .../qbft/core/statemachine/QbftRound.java | 191 +- + .../qbft/core/statemachine/RoundState.java | 25 + + .../qbft/core/types/QbftBlockCreator.java | 37 + + ...ftBlockHeaderValidationRulesetFactory.java | 110 +- + .../consensus/qbft/QbftExtraDataCodec.java | 92 +- + .../qbft/adaptor/QbftBlockCreatorAdaptor.java | 214 +- + .../QbftBlockCreatorFactory.java | 35 +- .../FalconSealValidationRule.java | 501 +++ .../PqAnchorDigestAttachedRule.java | 115 + .../PqAnchorDigestRule.java | 207 + @@ -90,8 +90,8 @@ post-quantum. .../PqArmedWithoutRegistryTest.java | 185 + .../PqEmergencyShoutRuleTest.java | 78 + .../PqForkGateFeedTest.java | 189 + - .../eth/sync/DownloadHeadersStep.java | 97 +- - 75 files changed, 24017 insertions(+), 45 deletions(-) + .../eth/sync/DownloadHeadersStep.java | 103 +- + 75 files changed, 24137 insertions(+), 45 deletions(-) create mode 100755 app/src/main/java/org/hyperledger/besu/cli/options/AerePqEmergencyOptions.java create mode 100755 app/src/test/java/org/hyperledger/besu/cli/options/AerePqEmergencyOptionsTest.java create mode 100755 consensus/common/src/main/java/org/hyperledger/besu/consensus/common/bft/FalconSeal.java @@ -149,10 +149,23 @@ post-quantum. create mode 100755 consensus/qbft/src/test/java/org/hyperledger/besu/consensus/qbft/headervalidationrules/PqForkGateFeedTest.java diff --git a/app/src/main/java/org/hyperledger/besu/cli/BesuCommand.java b/app/src/main/java/org/hyperledger/besu/cli/BesuCommand.java -index 2767db2eb..8441bb64f 100644 +index 2767db2eb..df19c1dd2 100644 --- a/app/src/main/java/org/hyperledger/besu/cli/BesuCommand.java +++ b/app/src/main/java/org/hyperledger/besu/cli/BesuCommand.java -@@ -41,6 +41,7 @@ import org.hyperledger.besu.cli.config.ProfilesCompletionCandidates; +@@ -11,6 +11,12 @@ + * specific language governing permissions and limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 ++ * ++ * Modifications Copyright contributors to the Aere Network. ++ * ++ * This file was modified by contributors to the Aere Network, as required by section 4(b) of the ++ * Apache License 2.0. The copyright header above is the upstream one and is left exactly as it was ++ * found, as section 4(c) requires. The change itself is in patches/0003-aere-pq-anchor.patch. + */ + package org.hyperledger.besu.cli; + +@@ -41,6 +47,7 @@ import org.hyperledger.besu.cli.config.ProfilesCompletionCandidates; import org.hyperledger.besu.cli.custom.JsonRPCAllowlistHostsProperty; import org.hyperledger.besu.cli.error.BesuExecutionExceptionHandler; import org.hyperledger.besu.cli.error.BesuParameterExceptionHandler; @@ -160,7 +173,7 @@ index 2767db2eb..8441bb64f 100644 import org.hyperledger.besu.cli.options.ApiConfigurationOptions; import org.hyperledger.besu.cli.options.BalConfigurationOptions; import org.hyperledger.besu.cli.options.ChainPruningOptions; -@@ -299,6 +300,13 @@ public class BesuCommand implements DefaultCommandValues, Runnable { +@@ -299,6 +306,13 @@ public class BesuCommand implements DefaultCommandValues, Runnable { private final ChainPruningOptions unstableChainPruningOptions = ChainPruningOptions.create(); private final QBFTOptions unstableQbftOptions = QBFTOptions.create(); @@ -174,7 +187,7 @@ index 2767db2eb..8441bb64f 100644 // stable CLI options final DataStorageOptions dataStorageOptions = DataStorageOptions.create(); private final EthstatsOptions ethstatsOptions = EthstatsOptions.create(); -@@ -950,6 +958,13 @@ public class BesuCommand implements DefaultCommandValues, Runnable { +@@ -950,6 +964,13 @@ public class BesuCommand implements DefaultCommandValues, Runnable { logger.info("Starting Besu"); @@ -188,7 +201,7 @@ index 2767db2eb..8441bb64f 100644 // set merge config on the basis of genesis config setMergeConfigOptions(); -@@ -1243,6 +1258,9 @@ public class BesuCommand implements DefaultCommandValues, Runnable { +@@ -1243,6 +1264,9 @@ public class BesuCommand implements DefaultCommandValues, Runnable { .put("IPC Options", unstableIpcOptions) .put("Chain Data Pruning Options", unstableChainPruningOptions) .put("QBFT Options", unstableQbftOptions) @@ -450,10 +463,23 @@ index 000000000..0d685347a + } +} diff --git a/app/src/main/java/org/hyperledger/besu/controller/QbftBesuControllerBuilder.java b/app/src/main/java/org/hyperledger/besu/controller/QbftBesuControllerBuilder.java -index 7fbf58d0b..f6dcb1e56 100644 +index 7fbf58d0b..c245c06d2 100644 --- a/app/src/main/java/org/hyperledger/besu/controller/QbftBesuControllerBuilder.java +++ b/app/src/main/java/org/hyperledger/besu/controller/QbftBesuControllerBuilder.java -@@ -18,6 +18,7 @@ import static com.google.common.base.Preconditions.checkNotNull; +@@ -11,6 +11,12 @@ + * specific language governing permissions and limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 ++ * ++ * Modifications Copyright contributors to the Aere Network. ++ * ++ * This file was modified by contributors to the Aere Network, as required by section 4(b) of the ++ * Apache License 2.0. The copyright header above is the upstream one and is left exactly as it was ++ * found, as section 4(c) requires. The change itself is in patches/0003-aere-pq-anchor.patch. + */ + package org.hyperledger.besu.controller; + +@@ -18,6 +24,7 @@ import static com.google.common.base.Preconditions.checkNotNull; import org.hyperledger.besu.config.BftConfigOptions; import org.hyperledger.besu.config.BftFork; @@ -461,7 +487,7 @@ index 7fbf58d0b..f6dcb1e56 100644 import org.hyperledger.besu.config.QbftConfigOptions; import org.hyperledger.besu.config.QbftFork; import org.hyperledger.besu.consensus.common.BftValidatorOverrides; -@@ -33,7 +34,14 @@ import org.hyperledger.besu.consensus.common.bft.BftRoundExpiryTimeCalculator; +@@ -33,7 +40,14 @@ import org.hyperledger.besu.consensus.common.bft.BftRoundExpiryTimeCalculator; import org.hyperledger.besu.consensus.common.bft.BlockTimer; import org.hyperledger.besu.consensus.common.bft.EthSynchronizerUpdater; import org.hyperledger.besu.consensus.common.bft.EventMultiplexer; @@ -476,7 +502,7 @@ index 7fbf58d0b..f6dcb1e56 100644 import org.hyperledger.besu.consensus.common.bft.RoundTimer; import org.hyperledger.besu.consensus.common.bft.UniqueMessageMulticaster; import org.hyperledger.besu.consensus.common.bft.blockcreation.BftMiningCoordinator; -@@ -197,6 +205,212 @@ public class QbftBesuControllerBuilder extends BesuControllerBuilder { +@@ -197,6 +211,212 @@ public class QbftBesuControllerBuilder extends BesuControllerBuilder { final SyncState syncState, final EthProtocolManager ethProtocolManager) { final MutableBlockchain blockchain = protocolContext.getBlockchain(); @@ -689,7 +715,7 @@ index 7fbf58d0b..f6dcb1e56 100644 final BftExecutors bftExecutors = BftExecutors.create(metricsSystem, BftExecutors.ConsensusType.QBFT); final QbftBlockCodec blockEncoder = new QbftBlockCodecAdaptor(qbftExtraDataCodec); -@@ -226,6 +440,22 @@ public class QbftBesuControllerBuilder extends BesuControllerBuilder { +@@ -226,6 +446,22 @@ public class QbftBesuControllerBuilder extends BesuControllerBuilder { validatorProvider = protocolContext.getConsensusContext(BftContext.class).getValidatorProvider(); } @@ -712,7 +738,7 @@ index 7fbf58d0b..f6dcb1e56 100644 final QbftValidatorProvider qbftValidatorProvider = new QbftValidatorProviderAdaptor(validatorProvider); -@@ -447,6 +677,43 @@ public class QbftBesuControllerBuilder extends BesuControllerBuilder { +@@ -447,6 +683,43 @@ public class QbftBesuControllerBuilder extends BesuControllerBuilder { return new BftValidatorOverrides(result); } @@ -899,10 +925,23 @@ index 000000000..e74459f24 + } +} diff --git a/config/src/main/java/org/hyperledger/besu/config/JsonGenesisConfigOptions.java b/config/src/main/java/org/hyperledger/besu/config/JsonGenesisConfigOptions.java -index eeaa4ac3e..fb0b9edb6 100644 +index eeaa4ac3e..e0d6a6025 100644 --- a/config/src/main/java/org/hyperledger/besu/config/JsonGenesisConfigOptions.java +++ b/config/src/main/java/org/hyperledger/besu/config/JsonGenesisConfigOptions.java -@@ -639,4 +639,21 @@ public class JsonGenesisConfigOptions implements GenesisConfigOptions { +@@ -11,6 +11,12 @@ + * specific language governing permissions and limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 ++ * ++ * Modifications Copyright contributors to the Aere Network. ++ * ++ * This file was modified by contributors to the Aere Network, as required by section 4(b) of the ++ * Apache License 2.0. The copyright header above is the upstream one and is left exactly as it was ++ * found, as section 4(c) requires. The change itself is in patches/0003-aere-pq-anchor.patch. + */ + package org.hyperledger.besu.config; + +@@ -639,4 +645,21 @@ public class JsonGenesisConfigOptions implements GenesisConfigOptions { public int hashCode() { return Objects.hash(configRoot, configOverrides); } @@ -925,10 +964,23 @@ index eeaa4ac3e..fb0b9edb6 100644 + } } diff --git a/consensus/common/build.gradle b/consensus/common/build.gradle -index 499c974f1..c603ca03c 100644 +index 499c974f1..a6f5276f2 100644 --- a/consensus/common/build.gradle +++ b/consensus/common/build.gradle -@@ -47,6 +47,7 @@ dependencies { +@@ -11,6 +11,12 @@ + * specific language governing permissions and limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 ++ * ++ * Modifications Copyright contributors to the Aere Network. ++ * ++ * This file was modified by contributors to the Aere Network, as required by section 4(b) of the ++ * Apache License 2.0. The copyright header above is the upstream one and is left exactly as it was ++ * found, as section 4(c) requires. The change itself is in patches/0003-aere-pq-anchor.patch. + */ + + apply plugin: 'java-library' +@@ -47,6 +53,7 @@ dependencies { implementation 'com.fasterxml.jackson.core:jackson-databind' implementation 'com.google.guava:guava' @@ -937,10 +989,23 @@ index 499c974f1..c603ca03c 100644 testImplementation project(':config') diff --git a/consensus/common/src/main/java/org/hyperledger/besu/consensus/common/bft/BftBlockInterface.java b/consensus/common/src/main/java/org/hyperledger/besu/consensus/common/bft/BftBlockInterface.java -index b7a886c29..2e565eceb 100644 +index b7a886c29..da9a3e3ae 100644 --- a/consensus/common/src/main/java/org/hyperledger/besu/consensus/common/bft/BftBlockInterface.java +++ b/consensus/common/src/main/java/org/hyperledger/besu/consensus/common/bft/BftBlockInterface.java -@@ -79,6 +79,19 @@ public class BftBlockInterface implements BlockInterface { +@@ -11,6 +11,12 @@ + * specific language governing permissions and limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 ++ * ++ * Modifications Copyright contributors to the Aere Network. ++ * ++ * This file was modified by contributors to the Aere Network, as required by section 4(b) of the ++ * Apache License 2.0. The copyright header above is the upstream one and is left exactly as it was ++ * found, as section 4(c) requires. The change itself is in patches/0003-aere-pq-anchor.patch. + */ + package org.hyperledger.besu.consensus.common.bft; + +@@ -79,6 +85,19 @@ public class BftBlockInterface implements BlockInterface { /** * Replace round in block. * @@ -960,7 +1025,7 @@ index b7a886c29..2e565eceb 100644 * @param block the block * @param round the round * @param blockHeaderFunctions the block header functions -@@ -93,7 +106,8 @@ public class BftBlockInterface implements BlockInterface { +@@ -93,7 +112,8 @@ public class BftBlockInterface implements BlockInterface { prevExtraData.getSeals(), prevExtraData.getVote(), round, @@ -971,10 +1036,23 @@ index b7a886c29..2e565eceb 100644 final BlockHeaderBuilder headerBuilder = BlockHeaderBuilder.fromHeader(block.getHeader()); headerBuilder diff --git a/consensus/common/src/main/java/org/hyperledger/besu/consensus/common/bft/BftExtraData.java b/consensus/common/src/main/java/org/hyperledger/besu/consensus/common/bft/BftExtraData.java -index a24c33a93..e911ca44d 100644 +index a24c33a93..913f68f0a 100644 --- a/consensus/common/src/main/java/org/hyperledger/besu/consensus/common/bft/BftExtraData.java +++ b/consensus/common/src/main/java/org/hyperledger/besu/consensus/common/bft/BftExtraData.java -@@ -21,6 +21,7 @@ import org.hyperledger.besu.datatypes.Address; +@@ -11,6 +11,12 @@ + * specific language governing permissions and limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 ++ * ++ * Modifications Copyright contributors to the Aere Network. ++ * ++ * This file was modified by contributors to the Aere Network, as required by section 4(b) of the ++ * Apache License 2.0. The copyright header above is the upstream one and is left exactly as it was ++ * found, as section 4(c) requires. The change itself is in patches/0003-aere-pq-anchor.patch. + */ + package org.hyperledger.besu.consensus.common.bft; + +@@ -21,6 +27,7 @@ import org.hyperledger.besu.datatypes.Address; import org.hyperledger.besu.ethereum.core.ParsedExtraData; import java.util.Collection; @@ -982,7 +1060,7 @@ index a24c33a93..e911ca44d 100644 import java.util.Optional; import org.apache.tuweni.bytes.Bytes; -@@ -34,7 +35,15 @@ public class BftExtraData implements ParsedExtraData { +@@ -34,7 +41,15 @@ public class BftExtraData implements ParsedExtraData { private final int round; /** @@ -999,7 +1077,7 @@ index a24c33a93..e911ca44d 100644 * * @param vanityData the vanity data * @param seals the seals -@@ -48,14 +57,36 @@ public class BftExtraData implements ParsedExtraData { +@@ -48,14 +63,36 @@ public class BftExtraData implements ParsedExtraData { final Optional vote, final int round, final Collection
validators) { @@ -1036,7 +1114,7 @@ index a24c33a93..e911ca44d 100644 } /** -@@ -103,6 +134,15 @@ public class BftExtraData implements ParsedExtraData { +@@ -103,6 +140,15 @@ public class BftExtraData implements ParsedExtraData { return round; } @@ -1052,7 +1130,7 @@ index a24c33a93..e911ca44d 100644 @Override public String toString() { return "BftExtraData{" -@@ -116,6 +156,8 @@ public class BftExtraData implements ParsedExtraData { +@@ -116,6 +162,8 @@ public class BftExtraData implements ParsedExtraData { + vote + ", round=" + round @@ -11333,10 +11411,23 @@ index 000000000..3646b9a22 + } +} diff --git a/consensus/common/src/main/java/org/hyperledger/besu/consensus/common/bft/blockcreation/BftBlockCreatorFactory.java b/consensus/common/src/main/java/org/hyperledger/besu/consensus/common/bft/blockcreation/BftBlockCreatorFactory.java -index 20c072202..c5a78af24 100644 +index 20c072202..1ecdcbf34 100644 --- a/consensus/common/src/main/java/org/hyperledger/besu/consensus/common/bft/blockcreation/BftBlockCreatorFactory.java +++ b/consensus/common/src/main/java/org/hyperledger/besu/consensus/common/bft/blockcreation/BftBlockCreatorFactory.java -@@ -157,6 +157,23 @@ public class BftBlockCreatorFactory { +@@ -11,6 +11,12 @@ + * specific language governing permissions and limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 ++ * ++ * Modifications Copyright contributors to the Aere Network. ++ * ++ * This file was modified by contributors to the Aere Network, as required by section 4(b) of the ++ * Apache License 2.0. The copyright header above is the upstream one and is left exactly as it was ++ * found, as section 4(c) requires. The change itself is in patches/0003-aere-pq-anchor.patch. + */ + package org.hyperledger.besu.consensus.common.bft.blockcreation; + +@@ -157,6 +163,23 @@ public class BftBlockCreatorFactory { * @return the bytes */ public Bytes createExtraData(final int round, final BlockHeader parentHeader) { @@ -11360,7 +11451,7 @@ index 20c072202..c5a78af24 100644 final BftContext bftContext = protocolContext.getConsensusContext(BftContext.class); final ValidatorProvider validatorProvider = bftContext.getValidatorProvider(); Optional voteProviderAfterBlock = -@@ -177,7 +194,7 @@ public class BftBlockCreatorFactory { +@@ -177,7 +200,7 @@ public class BftBlockCreatorFactory { round, validators); @@ -20167,10 +20258,19 @@ index 000000000..2c7108f4d + } +} diff --git a/consensus/qbft-core/src/main/java/org/hyperledger/besu/consensus/qbft/core/messagewrappers/Commit.java b/consensus/qbft-core/src/main/java/org/hyperledger/besu/consensus/qbft/core/messagewrappers/Commit.java -index 142069ec7..7e89e5b8c 100644 +index 142069ec7..b3ba74635 100644 --- a/consensus/qbft-core/src/main/java/org/hyperledger/besu/consensus/qbft/core/messagewrappers/Commit.java +++ b/consensus/qbft-core/src/main/java/org/hyperledger/besu/consensus/qbft/core/messagewrappers/Commit.java -@@ -14,6 +14,7 @@ +@@ -11,9 +11,16 @@ + * specific language governing permissions and limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 ++ * ++ * Modifications Copyright contributors to the Aere Network. ++ * ++ * This file was modified by contributors to the Aere Network, as required by section 4(b) of the ++ * Apache License 2.0. The copyright header above is the upstream one and is left exactly as it was ++ * found, as section 4(c) requires. The change itself is in patches/0003-aere-pq-anchor.patch. */ package org.hyperledger.besu.consensus.qbft.core.messagewrappers; @@ -20178,7 +20278,7 @@ index 142069ec7..7e89e5b8c 100644 import org.hyperledger.besu.consensus.common.bft.messagewrappers.BftMessage; import org.hyperledger.besu.consensus.common.bft.payload.SignedData; import org.hyperledger.besu.consensus.qbft.core.payload.CommitPayload; -@@ -22,6 +23,8 @@ import org.hyperledger.besu.datatypes.Hash; +@@ -22,6 +29,8 @@ import org.hyperledger.besu.datatypes.Hash; import org.hyperledger.besu.ethereum.rlp.RLP; import org.hyperledger.besu.ethereum.rlp.RLPInput; @@ -20187,7 +20287,7 @@ index 142069ec7..7e89e5b8c 100644 import org.apache.tuweni.bytes.Bytes; /** The Commit payload message. */ -@@ -45,6 +48,15 @@ public class Commit extends BftMessage { +@@ -45,6 +54,15 @@ public class Commit extends BftMessage { return getPayload().getCommitSeal(); } @@ -20204,10 +20304,20 @@ index 142069ec7..7e89e5b8c 100644 * Gets digest. * diff --git a/consensus/qbft-core/src/main/java/org/hyperledger/besu/consensus/qbft/core/network/QbftMessageTransmitter.java b/consensus/qbft-core/src/main/java/org/hyperledger/besu/consensus/qbft/core/network/QbftMessageTransmitter.java -index 30156ed6d..ebd07717a 100644 +index 30156ed6d..b0ba9ea09 100644 --- a/consensus/qbft-core/src/main/java/org/hyperledger/besu/consensus/qbft/core/network/QbftMessageTransmitter.java +++ b/consensus/qbft-core/src/main/java/org/hyperledger/besu/consensus/qbft/core/network/QbftMessageTransmitter.java -@@ -15,6 +15,7 @@ +@@ -11,10 +11,17 @@ + * specific language governing permissions and limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 ++ * ++ * Modifications Copyright contributors to the Aere Network. ++ * ++ * This file was modified by contributors to the Aere Network, as required by section 4(b) of the ++ * Apache License 2.0. The copyright header above is the upstream one and is left exactly as it was ++ * found, as section 4(c) requires. The change itself is in patches/0003-aere-pq-anchor.patch. + */ package org.hyperledger.besu.consensus.qbft.core.network; import org.hyperledger.besu.consensus.common.bft.ConsensusRoundIdentifier; @@ -20215,7 +20325,7 @@ index 30156ed6d..ebd07717a 100644 import org.hyperledger.besu.consensus.common.bft.network.ValidatorMulticaster; import org.hyperledger.besu.consensus.common.bft.payload.SignedData; import org.hyperledger.besu.consensus.qbft.core.messagedata.CommitMessageData; -@@ -118,8 +119,24 @@ public class QbftMessageTransmitter { +@@ -118,8 +125,24 @@ public class QbftMessageTransmitter { final ConsensusRoundIdentifier roundIdentifier, final Hash digest, final SECPSignature commitSeal) { @@ -20242,10 +20352,20 @@ index 30156ed6d..ebd07717a 100644 final CommitMessageData message = CommitMessageData.create(data); diff --git a/consensus/qbft-core/src/main/java/org/hyperledger/besu/consensus/qbft/core/payload/CommitPayload.java b/consensus/qbft-core/src/main/java/org/hyperledger/besu/consensus/qbft/core/payload/CommitPayload.java -index db481acd0..4aefac65f 100644 +index db481acd0..e55efb55c 100644 --- a/consensus/qbft-core/src/main/java/org/hyperledger/besu/consensus/qbft/core/payload/CommitPayload.java +++ b/consensus/qbft-core/src/main/java/org/hyperledger/besu/consensus/qbft/core/payload/CommitPayload.java -@@ -15,26 +15,44 @@ +@@ -11,30 +11,54 @@ + * specific language governing permissions and limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 ++ * ++ * Modifications Copyright contributors to the Aere Network. ++ * ++ * This file was modified by contributors to the Aere Network, as required by section 4(b) of the ++ * Apache License 2.0. The copyright header above is the upstream one and is left exactly as it was ++ * found, as section 4(c) requires. The change itself is in patches/0003-aere-pq-anchor.patch. + */ package org.hyperledger.besu.consensus.qbft.core.payload; import org.hyperledger.besu.consensus.common.bft.ConsensusRoundIdentifier; @@ -20292,7 +20412,7 @@ index db481acd0..4aefac65f 100644 * * @param roundIdentifier the round identifier * @param digest the digest -@@ -44,26 +62,107 @@ public class CommitPayload extends QbftPayload { +@@ -44,26 +68,107 @@ public class CommitPayload extends QbftPayload { final ConsensusRoundIdentifier roundIdentifier, final Hash digest, final SECPSignature commitSeal) { @@ -20371,8 +20491,7 @@ index db481acd0..4aefac65f 100644 - rlpInput.readBytes(SignatureAlgorithmFactory.getInstance()::decodeSignature); - rlpInput.leaveList(); + payloadRlp.readBytes(SignatureAlgorithmFactory.getInstance()::decodeSignature); - -- return new CommitPayload(roundIdentifier, digest, commitSeal); ++ + // AERE hybrid PQC: an OPTIONAL parallel Falcon-512 seal [index, sig] may follow the ECDSA seal. + // A Falcon-less commit ends the list here and decodes to Optional.empty(). + Optional falconSeal = Optional.empty(); @@ -20386,7 +20505,8 @@ index db481acd0..4aefac65f 100644 + payloadRlp.leaveList(); + + final CommitPayload payload = new CommitPayload(roundIdentifier, digest, commitSeal, falconSeal); -+ + +- return new CommitPayload(roundIdentifier, digest, commitSeal); + // AERE FIX-MALEABILITATE: exactly one encoding is accepted for a given payload value. This + // catches everything the RLP reader itself would tolerate, including any element the decode + // path above does not consume, and any encoding difference the reader does not consider an @@ -20406,7 +20526,7 @@ index db481acd0..4aefac65f 100644 } @Override -@@ -72,6 +171,17 @@ public class CommitPayload extends QbftPayload { +@@ -72,6 +177,17 @@ public class CommitPayload extends QbftPayload { writeConsensusRound(rlpOutput); rlpOutput.writeBytes(digest.getBytes()); rlpOutput.writeBytes(commitSeal.encodedBytes()); @@ -20424,7 +20544,7 @@ index db481acd0..4aefac65f 100644 rlpOutput.endList(); } -@@ -98,6 +208,15 @@ public class CommitPayload extends QbftPayload { +@@ -98,6 +214,15 @@ public class CommitPayload extends QbftPayload { return commitSeal; } @@ -20440,7 +20560,7 @@ index db481acd0..4aefac65f 100644 @Override public ConsensusRoundIdentifier getRoundIdentifier() { return roundIdentifier; -@@ -114,12 +233,13 @@ public class CommitPayload extends QbftPayload { +@@ -114,12 +239,13 @@ public class CommitPayload extends QbftPayload { final CommitPayload that = (CommitPayload) o; return Objects.equals(roundIdentifier, that.roundIdentifier) && Objects.equals(digest, that.digest) @@ -20456,7 +20576,7 @@ index db481acd0..4aefac65f 100644 } @Override -@@ -128,6 +248,7 @@ public class CommitPayload extends QbftPayload { +@@ -128,6 +254,7 @@ public class CommitPayload extends QbftPayload { .add("roundIdentifier=" + roundIdentifier) .add("digest=" + digest) .add("commitSeal=" + commitSeal) @@ -20465,10 +20585,20 @@ index db481acd0..4aefac65f 100644 } } diff --git a/consensus/qbft-core/src/main/java/org/hyperledger/besu/consensus/qbft/core/payload/MessageFactory.java b/consensus/qbft-core/src/main/java/org/hyperledger/besu/consensus/qbft/core/payload/MessageFactory.java -index 1bcd73ae9..da18fd36d 100644 +index 1bcd73ae9..7d0e37134 100644 --- a/consensus/qbft-core/src/main/java/org/hyperledger/besu/consensus/qbft/core/payload/MessageFactory.java +++ b/consensus/qbft-core/src/main/java/org/hyperledger/besu/consensus/qbft/core/payload/MessageFactory.java -@@ -15,6 +15,7 @@ +@@ -11,10 +11,17 @@ + * specific language governing permissions and limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 ++ * ++ * Modifications Copyright contributors to the Aere Network. ++ * ++ * This file was modified by contributors to the Aere Network, as required by section 4(b) of the ++ * Apache License 2.0. The copyright header above is the upstream one and is left exactly as it was ++ * found, as section 4(c) requires. The change itself is in patches/0003-aere-pq-anchor.patch. + */ package org.hyperledger.besu.consensus.qbft.core.payload; import org.hyperledger.besu.consensus.common.bft.ConsensusRoundIdentifier; @@ -20476,7 +20606,7 @@ index 1bcd73ae9..da18fd36d 100644 import org.hyperledger.besu.consensus.common.bft.payload.Payload; import org.hyperledger.besu.consensus.common.bft.payload.SignedData; import org.hyperledger.besu.consensus.qbft.core.messagewrappers.Commit; -@@ -116,7 +117,26 @@ public class MessageFactory { +@@ -116,7 +123,26 @@ public class MessageFactory { final ConsensusRoundIdentifier roundIdentifier, final Hash digest, final SECPSignature commitSeal) { @@ -20505,10 +20635,22 @@ index 1bcd73ae9..da18fd36d 100644 } diff --git a/consensus/qbft-core/src/main/java/org/hyperledger/besu/consensus/qbft/core/statemachine/QbftBlockHeightManager.java b/consensus/qbft-core/src/main/java/org/hyperledger/besu/consensus/qbft/core/statemachine/QbftBlockHeightManager.java -index 49099c2c1..4a20d6b63 100644 +index 49099c2c1..f8cd07112 100644 --- a/consensus/qbft-core/src/main/java/org/hyperledger/besu/consensus/qbft/core/statemachine/QbftBlockHeightManager.java +++ b/consensus/qbft-core/src/main/java/org/hyperledger/besu/consensus/qbft/core/statemachine/QbftBlockHeightManager.java -@@ -17,6 +17,7 @@ package org.hyperledger.besu.consensus.qbft.core.statemachine; +@@ -11,12 +11,19 @@ + * specific language governing permissions and limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 ++ * ++ * Modifications Copyright contributors to the Aere Network. ++ * ++ * This file was modified by contributors to the Aere Network, as required by section 4(b) of the ++ * Apache License 2.0. The copyright header above is the upstream one and is left exactly as it was ++ * found, as section 4(c) requires. The change itself is in patches/0003-aere-pq-anchor.patch. + */ + package org.hyperledger.besu.consensus.qbft.core.statemachine; + import org.hyperledger.besu.consensus.common.bft.ConsensusRoundIdentifier; import org.hyperledger.besu.consensus.common.bft.events.RoundExpiry; import org.hyperledger.besu.consensus.common.bft.messagewrappers.BftMessage; @@ -20516,7 +20658,7 @@ index 49099c2c1..4a20d6b63 100644 import org.hyperledger.besu.consensus.common.bft.payload.Payload; import org.hyperledger.besu.consensus.qbft.core.messagewrappers.Commit; import org.hyperledger.besu.consensus.qbft.core.messagewrappers.Prepare; -@@ -200,8 +201,26 @@ public class QbftBlockHeightManager implements BaseQbftBlockHeightManager { +@@ -200,8 +207,26 @@ public class QbftBlockHeightManager implements BaseQbftBlockHeightManager { } final long headerTimeStampSeconds = Math.round(clock.millis() / 1000D); @@ -20546,10 +20688,22 @@ index 49099c2c1..4a20d6b63 100644 final Optional blockAccessList = blockCreationResult.blockAccessList(); if (!block.isEmpty()) { diff --git a/consensus/qbft-core/src/main/java/org/hyperledger/besu/consensus/qbft/core/statemachine/QbftRound.java b/consensus/qbft-core/src/main/java/org/hyperledger/besu/consensus/qbft/core/statemachine/QbftRound.java -index 832149e2f..2b2dd48c9 100644 +index 832149e2f..054b9c36c 100644 --- a/consensus/qbft-core/src/main/java/org/hyperledger/besu/consensus/qbft/core/statemachine/QbftRound.java +++ b/consensus/qbft-core/src/main/java/org/hyperledger/besu/consensus/qbft/core/statemachine/QbftRound.java -@@ -17,7 +17,13 @@ package org.hyperledger.besu.consensus.qbft.core.statemachine; +@@ -11,13 +11,25 @@ + * specific language governing permissions and limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 ++ * ++ * Modifications Copyright contributors to the Aere Network. ++ * ++ * This file was modified by contributors to the Aere Network, as required by section 4(b) of the ++ * Apache License 2.0. The copyright header above is the upstream one and is left exactly as it was ++ * found, as section 4(c) requires. The change itself is in patches/0003-aere-pq-anchor.patch. + */ + package org.hyperledger.besu.consensus.qbft.core.statemachine; + import static java.util.Collections.emptyList; import org.hyperledger.besu.consensus.common.bft.ConsensusRoundIdentifier; @@ -20563,7 +20717,7 @@ index 832149e2f..2b2dd48c9 100644 import org.hyperledger.besu.consensus.common.bft.payload.SignedData; import org.hyperledger.besu.consensus.qbft.core.messagewrappers.Commit; import org.hyperledger.besu.consensus.qbft.core.messagewrappers.Prepare; -@@ -42,6 +48,7 @@ import org.hyperledger.besu.ethereum.mainnet.block.access.list.BlockAccessList; +@@ -42,6 +54,7 @@ import org.hyperledger.besu.ethereum.mainnet.block.access.list.BlockAccessList; import org.hyperledger.besu.plugin.services.securitymodule.SecurityModuleException; import org.hyperledger.besu.util.Subscribers; @@ -20571,7 +20725,7 @@ index 832149e2f..2b2dd48c9 100644 import java.util.List; import java.util.Optional; -@@ -75,6 +82,22 @@ public class QbftRound { +@@ -75,6 +88,22 @@ public class QbftRound { private final QbftBlockHeader parentHeader; @@ -20594,7 +20748,7 @@ index 832149e2f..2b2dd48c9 100644 /** * Instantiates a new Qbft round. * -@@ -159,8 +182,26 @@ public class QbftRound { +@@ -159,8 +188,26 @@ public class QbftRound { final Optional blockAccessList; if (bestPreparedCertificate.isEmpty()) { LOG.debug("Sending proposal with new block. round={}", roundState.getRoundIdentifier()); @@ -20623,7 +20777,7 @@ index 832149e2f..2b2dd48c9 100644 blockToPublish = blockCreationResult.block(); blockAccessList = blockCreationResult.blockAccessList(); } else { -@@ -282,23 +323,33 @@ public class QbftRound { +@@ -282,23 +329,33 @@ public class QbftRound { private boolean updateStateWithProposedBlock(final Proposal msg) { final boolean wasPrepared = roundState.isPrepared(); @@ -20660,7 +20814,7 @@ index 832149e2f..2b2dd48c9 100644 } // can automatically add _our_ commit message to the roundState -@@ -306,18 +357,26 @@ public class QbftRound { +@@ -306,18 +363,26 @@ public class QbftRound { // prepare try { final Commit localCommitMessage = @@ -20692,7 +20846,7 @@ index 832149e2f..2b2dd48c9 100644 } return blockAccepted; -@@ -330,7 +389,14 @@ public class QbftRound { +@@ -330,7 +395,14 @@ public class QbftRound { LOG.debug("Sending commit message. round={}", roundState.getRoundIdentifier()); final QbftBlock block = roundState.getProposedBlock().get(); try { @@ -20708,7 +20862,7 @@ index 832149e2f..2b2dd48c9 100644 // Note: the local-node's commit message was added to RoundState on block acceptance // and thus does not need to be done again here. } catch (final SecurityModuleException e) { -@@ -340,20 +406,41 @@ public class QbftRound { +@@ -340,20 +412,41 @@ public class QbftRound { } private void peerIsCommitted(final Commit msg) { @@ -20756,7 +20910,7 @@ index 832149e2f..2b2dd48c9 100644 final long blockNumber = blockToImport.getHeader().getNumber(); if (getRoundIdentifier().getRoundNumber() > 0) { -@@ -373,19 +460,77 @@ public class QbftRound { +@@ -373,19 +466,77 @@ public class QbftRound { final boolean result = blockImporter.importBlock(blockToImport, roundState.getProposedBlockAccessList()); if (!result) { @@ -20838,10 +20992,20 @@ index 832149e2f..2b2dd48c9 100644 private QbftBlock createCommitBlock(final QbftBlock block) { diff --git a/consensus/qbft-core/src/main/java/org/hyperledger/besu/consensus/qbft/core/statemachine/RoundState.java b/consensus/qbft-core/src/main/java/org/hyperledger/besu/consensus/qbft/core/statemachine/RoundState.java -index 1c3078602..9a647fb2d 100644 +index 1c3078602..e7a7aad94 100644 --- a/consensus/qbft-core/src/main/java/org/hyperledger/besu/consensus/qbft/core/statemachine/RoundState.java +++ b/consensus/qbft-core/src/main/java/org/hyperledger/besu/consensus/qbft/core/statemachine/RoundState.java -@@ -15,6 +15,7 @@ +@@ -11,10 +11,17 @@ + * specific language governing permissions and limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 ++ * ++ * Modifications Copyright contributors to the Aere Network. ++ * ++ * This file was modified by contributors to the Aere Network, as required by section 4(b) of the ++ * Apache License 2.0. The copyright header above is the upstream one and is left exactly as it was ++ * found, as section 4(c) requires. The change itself is in patches/0003-aere-pq-anchor.patch. + */ package org.hyperledger.besu.consensus.qbft.core.statemachine; import org.hyperledger.besu.consensus.common.bft.ConsensusRoundIdentifier; @@ -20849,7 +21013,7 @@ index 1c3078602..9a647fb2d 100644 import org.hyperledger.besu.consensus.qbft.core.messagewrappers.Commit; import org.hyperledger.besu.consensus.qbft.core.messagewrappers.Prepare; import org.hyperledger.besu.consensus.qbft.core.messagewrappers.Proposal; -@@ -27,6 +28,7 @@ import org.hyperledger.besu.ethereum.mainnet.block.access.list.BlockAccessList; +@@ -27,6 +34,7 @@ import org.hyperledger.besu.ethereum.mainnet.block.access.list.BlockAccessList; import java.util.Collection; import java.util.LinkedHashMap; import java.util.Map; @@ -20857,7 +21021,7 @@ index 1c3078602..9a647fb2d 100644 import java.util.Optional; import java.util.stream.Collectors; -@@ -196,6 +198,23 @@ public class RoundState { +@@ -196,6 +204,23 @@ public class RoundState { .collect(Collectors.toList()); } @@ -20882,10 +21046,19 @@ index 1c3078602..9a647fb2d 100644 * Construct prepared certificate. * diff --git a/consensus/qbft-core/src/main/java/org/hyperledger/besu/consensus/qbft/core/types/QbftBlockCreator.java b/consensus/qbft-core/src/main/java/org/hyperledger/besu/consensus/qbft/core/types/QbftBlockCreator.java -index afe4fb00e..acc3cc82a 100644 +index afe4fb00e..c397cab98 100644 --- a/consensus/qbft-core/src/main/java/org/hyperledger/besu/consensus/qbft/core/types/QbftBlockCreator.java +++ b/consensus/qbft-core/src/main/java/org/hyperledger/besu/consensus/qbft/core/types/QbftBlockCreator.java -@@ -14,10 +14,12 @@ +@@ -11,13 +11,21 @@ + * specific language governing permissions and limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 ++ * ++ * Modifications Copyright contributors to the Aere Network. ++ * ++ * This file was modified by contributors to the Aere Network, as required by section 4(b) of the ++ * Apache License 2.0. The copyright header above is the upstream one and is left exactly as it was ++ * found, as section 4(c) requires. The change itself is in patches/0003-aere-pq-anchor.patch. */ package org.hyperledger.besu.consensus.qbft.core.types; @@ -20898,7 +21071,7 @@ index afe4fb00e..acc3cc82a 100644 import java.util.Optional; /** Responsible for creating a block. */ -@@ -50,4 +52,33 @@ public interface QbftBlockCreator { +@@ -50,4 +58,33 @@ public interface QbftBlockCreator { */ QbftBlock createSealedBlock( final QbftBlock block, final int roundNumber, final Collection commitSeals); @@ -20933,10 +21106,23 @@ index afe4fb00e..acc3cc82a 100644 + } } diff --git a/consensus/qbft/src/main/java/org/hyperledger/besu/consensus/qbft/QbftBlockHeaderValidationRulesetFactory.java b/consensus/qbft/src/main/java/org/hyperledger/besu/consensus/qbft/QbftBlockHeaderValidationRulesetFactory.java -index f54d7bfcd..d355ed2c0 100644 +index f54d7bfcd..6c3fba591 100644 --- a/consensus/qbft/src/main/java/org/hyperledger/besu/consensus/qbft/QbftBlockHeaderValidationRulesetFactory.java +++ b/consensus/qbft/src/main/java/org/hyperledger/besu/consensus/qbft/QbftBlockHeaderValidationRulesetFactory.java -@@ -18,8 +18,16 @@ import static org.hyperledger.besu.ethereum.mainnet.AbstractGasLimitSpecificatio +@@ -11,6 +11,12 @@ + * specific language governing permissions and limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 ++ * ++ * Modifications Copyright contributors to the Aere Network. ++ * ++ * This file was modified by contributors to the Aere Network, as required by section 4(b) of the ++ * Apache License 2.0. The copyright header above is the upstream one and is left exactly as it was ++ * found, as section 4(c) requires. The change itself is in patches/0003-aere-pq-anchor.patch. + */ + package org.hyperledger.besu.consensus.qbft; + +@@ -18,8 +24,16 @@ import static org.hyperledger.besu.ethereum.mainnet.AbstractGasLimitSpecificatio import static org.hyperledger.besu.ethereum.mainnet.AbstractGasLimitSpecification.DEFAULT_MIN_GAS_LIMIT; import org.hyperledger.besu.consensus.common.bft.BftHelpers; @@ -20953,7 +21139,7 @@ index f54d7bfcd..d355ed2c0 100644 import org.hyperledger.besu.consensus.qbft.headervalidationrules.QbftValidatorsValidationRule; import org.hyperledger.besu.ethereum.core.BlockHeader; import org.hyperledger.besu.ethereum.mainnet.BlockHeaderValidator; -@@ -54,8 +62,75 @@ public class QbftBlockHeaderValidationRulesetFactory { +@@ -54,8 +68,75 @@ public class QbftBlockHeaderValidationRulesetFactory { final Duration minimumTimeBetweenBlocks, final boolean useValidatorContract, final Optional baseFeeMarket) { @@ -21029,7 +21215,7 @@ index f54d7bfcd..d355ed2c0 100644 .addRule(new AncestryValidationRule()) .addRule(new GasUsageValidationRule()) .addRule( -@@ -70,7 +145,34 @@ public class QbftBlockHeaderValidationRulesetFactory { +@@ -70,7 +151,34 @@ public class QbftBlockHeaderValidationRulesetFactory { "Difficulty", BlockHeader::getDifficulty, UInt256.ONE)) .addRule(new QbftValidatorsValidationRule(useValidatorContract)) .addRule(new BftCoinbaseValidationRule()) @@ -21066,10 +21252,23 @@ index f54d7bfcd..d355ed2c0 100644 // Currently the minimum acceptable time between blocks is 1 second. The timestamp of an // Ethereum header is stored as seconds since Unix epoch so blocks being produced more diff --git a/consensus/qbft/src/main/java/org/hyperledger/besu/consensus/qbft/QbftExtraDataCodec.java b/consensus/qbft/src/main/java/org/hyperledger/besu/consensus/qbft/QbftExtraDataCodec.java -index 39c7aa300..55630913c 100644 +index 39c7aa300..59ef0edd8 100644 --- a/consensus/qbft/src/main/java/org/hyperledger/besu/consensus/qbft/QbftExtraDataCodec.java +++ b/consensus/qbft/src/main/java/org/hyperledger/besu/consensus/qbft/QbftExtraDataCodec.java -@@ -19,6 +19,7 @@ import static org.hyperledger.besu.consensus.common.bft.Vote.DROP_BYTE_VALUE; +@@ -11,6 +11,12 @@ + * specific language governing permissions and limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 ++ * ++ * Modifications Copyright contributors to the Aere Network. ++ * ++ * This file was modified by contributors to the Aere Network, as required by section 4(b) of the ++ * Apache License 2.0. The copyright header above is the upstream one and is left exactly as it was ++ * found, as section 4(c) requires. The change itself is in patches/0003-aere-pq-anchor.patch. + */ + package org.hyperledger.besu.consensus.qbft; + +@@ -19,6 +25,7 @@ import static org.hyperledger.besu.consensus.common.bft.Vote.DROP_BYTE_VALUE; import org.hyperledger.besu.consensus.common.bft.BftExtraData; import org.hyperledger.besu.consensus.common.bft.BftExtraDataCodec; @@ -21077,7 +21276,7 @@ index 39c7aa300..55630913c 100644 import org.hyperledger.besu.consensus.common.bft.Vote; import org.hyperledger.besu.consensus.common.validator.VoteType; import org.hyperledger.besu.crypto.SECPSignature; -@@ -41,6 +42,15 @@ import org.apache.tuweni.bytes.Bytes; +@@ -41,6 +48,15 @@ import org.apache.tuweni.bytes.Bytes; /** * Represents the data structure stored in the extraData field of the BlockHeader used when * operating under an BFT consensus mechanism. @@ -21093,7 +21292,7 @@ index 39c7aa300..55630913c 100644 */ public class QbftExtraDataCodec extends BftExtraDataCodec { private static final ImmutableBiMap voteToValue = -@@ -102,9 +112,66 @@ public class QbftExtraDataCodec extends BftExtraDataCodec { +@@ -102,9 +118,66 @@ public class QbftExtraDataCodec extends BftExtraDataCodec { final List seals = rlpInput.readList( rlp -> SignatureAlgorithmFactory.getInstance().decodeSignature(rlp.readBytes())); @@ -21162,7 +21361,7 @@ index 39c7aa300..55630913c 100644 } @Override -@@ -126,6 +193,21 @@ public class QbftExtraDataCodec extends BftExtraDataCodec { +@@ -126,6 +199,21 @@ public class QbftExtraDataCodec extends BftExtraDataCodec { if (encodingType != EncodingType.EXCLUDE_COMMIT_SEALS) { encoder.writeList( bftExtraData.getSeals(), (committer, rlp) -> rlp.writeBytes(committer.encodedBytes())); @@ -21185,10 +21384,19 @@ index 39c7aa300..55630913c 100644 encoder.writeEmptyList(); } diff --git a/consensus/qbft/src/main/java/org/hyperledger/besu/consensus/qbft/adaptor/QbftBlockCreatorAdaptor.java b/consensus/qbft/src/main/java/org/hyperledger/besu/consensus/qbft/adaptor/QbftBlockCreatorAdaptor.java -index 594fe83e4..267d79e00 100644 +index 594fe83e4..2151f5760 100644 --- a/consensus/qbft/src/main/java/org/hyperledger/besu/consensus/qbft/adaptor/QbftBlockCreatorAdaptor.java +++ b/consensus/qbft/src/main/java/org/hyperledger/besu/consensus/qbft/adaptor/QbftBlockCreatorAdaptor.java -@@ -14,23 +14,42 @@ +@@ -11,26 +11,51 @@ + * specific language governing permissions and limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 ++ * ++ * Modifications Copyright contributors to the Aere Network. ++ * ++ * This file was modified by contributors to the Aere Network, as required by section 4(b) of the ++ * Apache License 2.0. The copyright header above is the upstream one and is left exactly as it was ++ * found, as section 4(c) requires. The change itself is in patches/0003-aere-pq-anchor.patch. */ package org.hyperledger.besu.consensus.qbft.adaptor; @@ -21231,7 +21439,7 @@ index 594fe83e4..267d79e00 100644 private final BlockCreator besuBlockCreator; private final BftExtraDataCodec bftExtraDataCodec; -@@ -59,11 +78,57 @@ public class QbftBlockCreatorAdaptor implements QbftBlockCreator { +@@ -59,11 +84,57 @@ public class QbftBlockCreatorAdaptor implements QbftBlockCreator { @Override public QbftBlock createSealedBlock( final QbftBlock block, final int roundNumber, final Collection commitSeals) { @@ -21289,7 +21497,7 @@ index 594fe83e4..267d79e00 100644 final BftExtraData sealedExtraData = new BftExtraData( initialExtraData.getVanityData(), -@@ -72,12 +137,153 @@ public class QbftBlockCreatorAdaptor implements QbftBlockCreator { +@@ -72,12 +143,153 @@ public class QbftBlockCreatorAdaptor implements QbftBlockCreator { roundNumber, initialExtraData.getValidators()); @@ -21445,10 +21653,23 @@ index 594fe83e4..267d79e00 100644 + } } diff --git a/consensus/qbft/src/main/java/org/hyperledger/besu/consensus/qbft/blockcreation/QbftBlockCreatorFactory.java b/consensus/qbft/src/main/java/org/hyperledger/besu/consensus/qbft/blockcreation/QbftBlockCreatorFactory.java -index 5e6de291b..242efbec5 100644 +index 5e6de291b..cabeba99c 100644 --- a/consensus/qbft/src/main/java/org/hyperledger/besu/consensus/qbft/blockcreation/QbftBlockCreatorFactory.java +++ b/consensus/qbft/src/main/java/org/hyperledger/besu/consensus/qbft/blockcreation/QbftBlockCreatorFactory.java -@@ -20,6 +20,7 @@ import org.hyperledger.besu.consensus.common.ForksSchedule; +@@ -11,6 +11,12 @@ + * specific language governing permissions and limitations under the License. + * + * SPDX-License-Identifier: Apache-2.0 ++ * ++ * Modifications Copyright contributors to the Aere Network. ++ * ++ * This file was modified by contributors to the Aere Network, as required by section 4(b) of the ++ * Apache License 2.0. The copyright header above is the upstream one and is left exactly as it was ++ * found, as section 4(c) requires. The change itself is in patches/0003-aere-pq-anchor.patch. + */ + package org.hyperledger.besu.consensus.qbft.blockcreation; + +@@ -20,6 +26,7 @@ import org.hyperledger.besu.consensus.common.ForksSchedule; import org.hyperledger.besu.consensus.common.bft.BftExtraData; import org.hyperledger.besu.consensus.common.bft.BftExtraDataCodec; import org.hyperledger.besu.consensus.common.bft.blockcreation.BftBlockCreatorFactory; @@ -21456,7 +21677,7 @@ index 5e6de291b..242efbec5 100644 import org.hyperledger.besu.datatypes.Address; import org.hyperledger.besu.ethereum.ProtocolContext; import org.hyperledger.besu.ethereum.core.BlockHeader; -@@ -67,14 +68,34 @@ public class QbftBlockCreatorFactory extends BftBlockCreatorFactory