-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch from NitroProver to nitro-validator library
- Loading branch information
Showing
15 changed files
with
77 additions
and
188 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"CertManager": "0x6775BB4C4b0D32f07EeE370369ceED41029A5352" | ||
} |
This file was deleted.
Oops, something went wrong.
Submodule NitroProver
deleted from
8790b4
Submodule nitro-validator
added at
fa8d93
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
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.
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,31 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.15; | ||
|
||
import {Test, console} from "forge-std/Test.sol"; | ||
|
||
import "../src/SystemConfigGlobal.sol"; | ||
|
||
contract SystemConfigGlobalTest is Test { | ||
SystemConfigGlobal systemConfigGlobal; | ||
|
||
function setUp() public { | ||
vm.warp(1708930774); | ||
CertManager certManager = new CertManager(); | ||
systemConfigGlobal = new SystemConfigGlobal(certManager); | ||
} | ||
|
||
function test_validateAttestation() public { | ||
vm.startPrank(systemConfigGlobal.owner()); | ||
|
||
systemConfigGlobal.registerPCR0( | ||
hex"17BF8F048519797BE90497001A7559A3D555395937117D76F8BAAEDF56CA6D97952DE79479BC0C76E5D176D20F663790" | ||
); | ||
|
||
bytes memory attestation = vm.readFileBinary("./test/nitro-attestation/sample_attestation.bin"); | ||
(bytes memory attestationTbs, bytes memory signature) = systemConfigGlobal.decodeAttestationTbs(attestation); | ||
systemConfigGlobal.registerSigner(attestationTbs, signature); | ||
|
||
address expectedSigner = 0xe04d808785d2BBdE18E9D0C01c05FB8CE0711f2d; | ||
assertTrue(systemConfigGlobal.validSigners(expectedSigner)); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.