AerePqcPrecompileProvider: eth_config names the AERE precompile band as the Besu-derived client does, and the AERE chains use the no-op execution-requests processor (as running on validator 10)

This commit is contained in:
Aere Network 2026-10-31 21:56:02 +02:00
parent 147becebef
commit 66f8f4528f

View File

@ -51,6 +51,17 @@ public sealed class AerePqcPrecompileProvider : IPrecompileProvider
new(SlhDsa128sPrecompile.Address, new CodeInfo(SlhDsa128sPrecompile.Instance)),
new(Shake256Precompile.Address, new CodeInfo(Shake256Precompile.Instance)),
];
/// <summary>The names eth_config gives the band (D-560, 2026-10-27): exactly the names the Besu-derived client gives the same five
/// addresses on chain 2800 (eth_config of rpc.aere.network, read 2026-10-27), so the two clients answer the same.</summary>
public static IEnumerable<KeyValuePair<string, Address>> BandNames() =>
[
new("AereFalcon512", Falcon512Precompile.Address),
new("AereFalcon1024", Falcon1024Precompile.Address),
new("AereMLDSA44", MlDsa44Precompile.Address),
new("AereSLHDSA128s", SlhDsa128sPrecompile.Address),
new("AereSHAKE256", Shake256Precompile.Address),
];
}
/// <summary>
@ -62,5 +73,13 @@ public sealed class AerePqcPrecompileProvider : IPrecompileProvider
internal static class AerePqcBandRegistration
{
[System.Runtime.CompilerServices.ModuleInitializer]
internal static void Register() => EthereumPrecompileProvider.AereBand = AerePqcPrecompileProvider.Band;
internal static void Register()
{
EthereumPrecompileProvider.AereBand = AerePqcPrecompileProvider.Band;
// D-560 (2026-10-27): eth_config names the band as the Besu-derived client does (d560-eth-config-nm.py adds the hook)
Nethermind.Evm.Precompiles.Extensions.AereBandNames = AerePqcPrecompileProvider.BandNames;
// D-561 (2026-10-27): every path that builds an execution-requests processor builds the no-op one of the AERE chains
// (d561-cereri-noop-nm.py adds the hook); the Besu-derived client processes no request on these chains
Nethermind.Consensus.ExecutionRequests.ExecutionRequestsProcessor.AereReplacement = _ => new Nethermind.AerePqc.Consensus.AereExecutionRequestsProcessor();
}
}