aere-contracts/contracts/interop/mocks/LightClientHarness.sol
Aere Network a13a649b77
Some checks are pending
contracts-ci / Install (lockfile) → compile → full test suite (push) Waiting to run
contracts-ci / PQC known-answer tests (NIST vectors) (push) Waiting to run
contracts-ci / Coverage (scoped, with artifacts) (push) Waiting to run
Initial public release
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.
2026-07-20 01:02:37 +03:00

51 lines
1.6 KiB
Solidity

// SPDX-License-Identifier: MIT
pragma solidity 0.8.23;
import "../AereEthLightClient.sol";
import "../lib/BLS12381.sol";
import "../lib/SSZ.sol";
/**
* @title LightClientHarness — TEST-ONLY. Exposes AereEthLightClient internals and a
* few BLS/SSZ primitives so tests can assert the on-chain computations match an
* independent JS reference byte-for-byte. Not for deployment.
*/
contract LightClientHarness is AereEthLightClient {
constructor(
bytes memory dst_,
bytes32 gvr_,
bytes32 bootstrapCommitteeRoot,
BeaconHeader memory bootstrapFinalized
) AereEthLightClient(dst_, gvr_, bootstrapCommitteeRoot, bootstrapFinalized) {}
function h_committeeRoot(bytes calldata pk, bytes calldata agg) external view returns (bytes32) {
return _syncCommitteeRoot(pk, agg);
}
function h_domain(bytes4 fv) external view returns (bytes32) {
return _computeDomain(fv);
}
function h_headerRoot(BeaconHeader calldata hd) external view returns (bytes32) {
return _headerRoot(hd);
}
function h_compress(bytes calldata pk) external pure returns (bytes memory) {
return _compressCalldata(pk);
}
function h_hashToG2(bytes calldata message) external view returns (bytes memory) {
return BLS12381.hashToG2(message, dst);
}
function h_merkleBranch(
bytes32 leaf,
bytes32[] calldata branch,
uint256 depth,
uint256 index,
bytes32 root
) external view returns (bool) {
return SSZ.isValidMerkleBranch(leaf, branch, depth, index, root);
}
}