Aere Network public source. Everything here can be checked against the live chain (chain id 2800, https://rpc.aere.network). Scope note, stated up front rather than buried: consensus on chain 2800 is classical secp256k1 ECDSA QBFT. The post-quantum work in this repository is at the signature, precompile, account and transport layers. Nothing here makes the consensus post-quantum, and no document in it should be read as claiming so.
44 lines
3.2 KiB
Diff
44 lines
3.2 KiB
Diff
diff --git a/datatypes/src/main/java/org/hyperledger/besu/datatypes/Address.java b/datatypes/src/main/java/org/hyperledger/besu/datatypes/Address.java
|
|
index 0ddc8ce..1a2b3c4 100644
|
|
--- a/datatypes/src/main/java/org/hyperledger/besu/datatypes/Address.java
|
|
+++ b/datatypes/src/main/java/org/hyperledger/besu/datatypes/Address.java
|
|
@@ -112,6 +112,12 @@ public class Address extends BytesHolder {
|
|
/** AERE PQC precompile: Falcon HashToPoint (FIPS 206) SHAKE256 rejection sampler. */
|
|
public static final Address AERE_HASHTOPOINT = Address.fromHexString("0x0000000000000000000000000000000000000ae7");
|
|
|
|
+ /**
|
|
+ * AERE PQC precompile: DIRECT SP1 (Plonky3) inner FRI/STARK verification (hash-based, no BN254
|
|
+ * Groth16 wrap). REFERENCE SKELETON as of 2026-07-18 - fail-closed, NOT a working verifier.
|
|
+ */
|
|
+ public static final Address AERE_SP1_STARK_VERIFY = Address.fromHexString("0x0000000000000000000000000000000000000ae8");
|
|
+
|
|
/** The constant ZERO. */
|
|
public static final Address ZERO = Address.fromHexString("0x0");
|
|
|
|
diff --git a/evm/src/main/java/org/hyperledger/besu/evm/precompile/MainnetPrecompiledContracts.java b/evm/src/main/java/org/hyperledger/besu/evm/precompile/MainnetPrecompiledContracts.java
|
|
index 38baa14..49c0d1e 100644
|
|
--- a/evm/src/main/java/org/hyperledger/besu/evm/precompile/MainnetPrecompiledContracts.java
|
|
+++ b/evm/src/main/java/org/hyperledger/besu/evm/precompile/MainnetPrecompiledContracts.java
|
|
@@ -236,6 +236,10 @@ public interface MainnetPrecompiledContracts {
|
|
registry.put(Address.AERE_MLKEM768, new MLKEM768PrecompiledContract(gasCalculator));
|
|
registry.put(Address.AERE_HASHTOPOINT, new HashToPointPrecompiledContract(gasCalculator));
|
|
+ // AERE PQ STARK verifier at 0x0AE8. REFERENCE SKELETON: registered so the fork can be built
|
|
+ // and the wire/gas/fail-closed behavior tested, but it verifies NOTHING yet (returns EMPTY for
|
|
+ // every input) until the delegated crypto core is ported. It MUST NOT be registered under an
|
|
+ // already-crossed activation milestone on mainnet. See docs/PQ-STARK-VERIFIER-*-2026-07-18.md.
|
|
+ registry.put(Address.AERE_SP1_STARK_VERIFY, new Sp1StarkVerifierPrecompiledContract(gasCalculator));
|
|
}
|
|
}
|
|
diff --git a/evm/src/main/java/org/hyperledger/besu/evm/precompile/Sp1StarkVerifierPrecompiledContract.java b/evm/src/main/java/org/hyperledger/besu/evm/precompile/Sp1StarkVerifierPrecompiledContract.java
|
|
new file mode 100644
|
|
--- /dev/null
|
|
+++ b/evm/src/main/java/org/hyperledger/besu/evm/precompile/Sp1StarkVerifierPrecompiledContract.java
|
|
@@ -0,0 +1,1 @@
|
|
+// See aerenew/pqc-fork/precompiles/Sp1StarkVerifierPrecompiledContract.java for the full class
|
|
+// body (kept in the repo tree, not inlined here, to keep this patch reviewable). Copy that file
|
|
+// verbatim to this path when applying the patch to a besu checkout. It is a REFERENCE SKELETON:
|
|
+// BabyBear field arithmetic + wire parser + challenger/FRI/constraint STRUCTURE are present and
|
|
+// testable; the Poseidon2-BabyBear permutation, FRI folding arithmetic, and SP1 recursion-AIR
|
|
+// constraint evaluation are DELEGATED (port targets: Plonky3 p3-fri / p3-poseidon2 / p3-uni-stark
|
|
+// and SP1 sp1-stark) and currently return UNAVAILABLE, so the precompile fail-closes to EMPTY.
|