2021-11-01 11:30:35 +00:00
|
|
|
// SPDX-License-Identifier: MIT
|
2024-07-24 16:50:18 +00:00
|
|
|
pragma solidity ^0.8.23;
|
2021-11-01 11:30:35 +00:00
|
|
|
|
|
|
|
import "./Proofs.sol";
|
|
|
|
|
|
|
|
// exposes internal functions of Proofs for testing
|
|
|
|
contract TestProofs is Proofs {
|
2023-01-23 10:57:10 +00:00
|
|
|
mapping(SlotId => SlotState) private _states;
|
2023-01-10 11:11:20 +00:00
|
|
|
|
2024-01-10 14:12:06 +00:00
|
|
|
constructor(
|
|
|
|
ProofConfig memory config,
|
2024-01-23 12:28:53 +00:00
|
|
|
IGroth16Verifier verifier
|
2024-01-10 14:12:06 +00:00
|
|
|
) Proofs(config, verifier) {} // solhint-disable-line no-empty-blocks
|
2022-03-02 14:44:58 +00:00
|
|
|
|
2023-01-18 14:26:21 +00:00
|
|
|
function slotState(SlotId slotId) public view override returns (SlotState) {
|
2023-01-23 10:57:10 +00:00
|
|
|
return _states[slotId];
|
2023-01-10 11:11:20 +00:00
|
|
|
}
|
|
|
|
|
2023-01-23 10:57:10 +00:00
|
|
|
function startRequiringProofs(SlotId slot, uint256 probability) public {
|
|
|
|
_startRequiringProofs(slot, probability);
|
2021-11-01 11:30:35 +00:00
|
|
|
}
|
|
|
|
|
2023-01-23 10:57:10 +00:00
|
|
|
function markProofAsMissing(SlotId id, Period period) public {
|
|
|
|
_markProofAsMissing(id, period);
|
2021-11-01 11:30:35 +00:00
|
|
|
}
|
2022-09-29 10:07:55 +00:00
|
|
|
|
2024-01-22 15:43:03 +00:00
|
|
|
function proofReceived(
|
|
|
|
SlotId id,
|
|
|
|
Groth16Proof calldata proof,
|
2024-01-23 11:50:14 +00:00
|
|
|
uint[] memory pubSignals
|
2024-01-22 15:43:03 +00:00
|
|
|
) public {
|
|
|
|
_proofReceived(id, proof, pubSignals);
|
2024-01-18 13:09:36 +00:00
|
|
|
}
|
|
|
|
|
2023-01-16 15:31:04 +00:00
|
|
|
function setSlotState(SlotId id, SlotState state) public {
|
2023-01-23 10:57:10 +00:00
|
|
|
_states[id] = state;
|
2022-09-29 10:07:55 +00:00
|
|
|
}
|
2021-11-01 11:30:35 +00:00
|
|
|
}
|