Skip to content

Commit

Permalink
WEB3-92: Bootstrap control root with segment sizes up to po2 21 (#205)
Browse files Browse the repository at this point in the history
Related to risc0/risc0#2276, this PR uses the
new control root created by excluding po2 22, 23, and 24 as the default
for the Groth16 verifier contract.
  • Loading branch information
nategraf authored Aug 28, 2024
1 parent 270e57e commit 34d2fee
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion contracts/src/groth16/ControlID.sol
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
pragma solidity ^0.8.9;

library ControlID {
bytes32 public constant CONTROL_ROOT = hex"9a3767040e4cf554112afa68bc043274a8636a06565e1d5e2b7fa90fda941218";
bytes32 public constant CONTROL_ROOT = hex"8b6dcf11d463ac455361b41fb3ed053febb817491bdea00fdb340e45013b852e";
// NOTE: This has the opposite byte order to the value in the risc0 repository.
bytes32 public constant BN254_CONTROL_ID = hex"05a022e1db38457fb510bc347b30eb8f8cf3eda95587653d0eac19e1f10d164e";
}
2 changes: 1 addition & 1 deletion contracts/test/RiscZeroGroth16Verifier.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,6 @@ contract RiscZeroGroth16VerifierTest is Test {
}

function testSelectorIsStable() external view {
require(verifier.SELECTOR() == hex"4c630d87");
require(verifier.SELECTOR() == hex"50bd1769");
}
}
4 changes: 2 additions & 2 deletions contracts/test/TestReceipt.sol
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ pragma solidity ^0.8.13;

library TestReceipt {
bytes public constant SEAL =
hex"4c630d8709d667c3a1be65199b8c1b7649baf9e5b7685bd219c083d8e6d038cfd257ce3925ee0d0500dd57db9a1f0e7da4f5f86a1039742018021656b510a4acb8f9f6ae021b8eb4e0f4f6afb899710a9bb45f7a4f9c4321197e1c6c7f4920658e97e4ce0ab96f3de1b264ec1a91ee25bc89e7fcffefbba271d00f6082c17b441a93b7de0d73991c6deef685821e47e1974ed5e59983004b14893c5c3ac664113ac7e1f21e40f65b7f29612cad7c81aa0a5ef745ba78784c45fcfe41f984bd43ebcaf3e317a94ecadad724b73234d046825f0f4a97b5263fdc461f8167b9637d263675a122909f8d35485e761fd91f3066d64485909c0307c5aded6a690f7a70242171f7";
hex"50bd1769096d29a4e342d93785757cde64ef07c09f317481f0ee9274f14281dc501c1b2e036ee070b7bd75b4f0253f7349afaa4074d73f77b09de60dd82d3fbeba8cc4a10dab619b389ed53ddfc3113e055729ff430a82f57d7edc24821e782653b9f1ba00558126e75bcb392a9a58d45af8489f4441d77e91d10c11dcea70c33c93f3ba03dab52a25735bb04f2526ec7289c1ee8912f921c4f5d380a5f906782f60044a0d44d7005528e1821e458e7bf108777452b2327ba1998710aa62e1e106858a302c0fe02760c5fda0000e039d263b2cc918eb2539da008bbbe7007f767d45d22d18f589ab466da35e0d0bfc300af4b0bc941a9897a863b48a2deb5f057c2f512c";
bytes public constant JOURNAL = hex"6a75737420612073696d706c652072656365697074";
bytes32 public constant IMAGE_ID = hex"402d6bc922883f3d16d41fdab3a8836723f720f510fabd57d5645d6bc14b768a";
bytes32 public constant IMAGE_ID = hex"d01c15afa768a05b213a9e5fcdcc5724a2947e00098c7ec34ccbe2946bbc0013";
}

0 comments on commit 34d2fee

Please sign in to comment.