-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: move away the
EvidenceVerifier
from the service (#53)
* separate EvidenceVerifier * whitelist
- Loading branch information
1 parent
4f01648
commit 039ceee
Showing
10 changed files
with
223 additions
and
177 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.12; | ||
|
||
// Evidence is the data structure to store the slashing evidence. | ||
struct Evidence { | ||
address operator; | ||
bytes32 blockHash; | ||
bytes32 correctBlockHash; | ||
bytes32 currentCommitteeRoot; | ||
bytes32 correctCurrentCommitteeRoot; | ||
bytes32 nextCommitteeRoot; | ||
bytes32 correctNextCommitteeRoot; | ||
uint256 blockNumber; | ||
uint256 l1BlockNumber; | ||
bytes blockSignature; // 192-byte | ||
bytes commitSignature; // 65-byte | ||
uint32 chainID; | ||
bytes sigProof; | ||
bytes aggProof; | ||
} | ||
|
||
// ProofParams is the proof parameters for the BLS signature verification. | ||
struct ProofParams { | ||
uint256[2] a; | ||
uint256[2][2] b; | ||
uint256[2] c; | ||
} | ||
|
||
// Path: contracts/interfaces/IEvidenceVerifier.sol | ||
interface IEvidenceVerifier { | ||
function setAggregateVerifierRoute(uint256 routeIndex, address _verifierAddress) external; | ||
function setSingleVerifier(address _verifierAddress) external; | ||
function uploadEvidence(Evidence calldata evidence) external; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.