Skip to content

Commit

Permalink
testing out different configs
Browse files Browse the repository at this point in the history
  • Loading branch information
nulltea committed Aug 28, 2023
1 parent 324e4c4 commit 09a1b30
Show file tree
Hide file tree
Showing 11 changed files with 2,110 additions and 61 deletions.
4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ poseidon = { git = "https://github.com/timoftime/halo2-lib", rev = "7cebe716bb05
# halo2-ecc = { path = "../halo2-lib/halo2-ecc", default-features = false }
# poseidon = { path = "../halo2-lib/hashes/poseidon", default-features = false }

[patch."https://github.com/axiom-crypto/snark-verifier.git"]
snark-verifier = { path = "../examples/snark-verifier/snark-verifier", default-features = false }
snark-verifier-sdk = { path = "../examples/snark-verifier/snark-verifier-sdk", default-features = false }


# [patch."https://github.com/timoftime/halo2curves"]
# halo2curves = { path = "../halo2curves" }
15 changes: 12 additions & 3 deletions contracts/script/SpectreDeployLocal.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,22 @@ contract SpectreDeployLocal is Script {
return deployedAddress;
}

bytes proof;
address syncStepVerifierAddress;

function run() external {
vm.startBroadcast();

// address verifierAddress = address(deployContract("sync_step"));
// deployContract("committee_update");
deployContract("sync_step");
syncStepVerifierAddress = address(deployContract("sync_step_k21"));

proof = vm.parseBytes(vm.readFile("test/data/sync_step_21.calldata"));

(bool success,) = syncStepVerifierAddress.call(proof);

if (!success) {
revert("Proof verification failed");
}


vm.stopBroadcast();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
valid := and(valid, is_affine)
}
}
mstore(0x0, 1705927711568848903438038658430721991757481144695824872113726915196219523142)
mstore(0x0, 7642356835104901532862826893514769525427175530059559282317548235130832990729)

{
let x := calldataload(0x0)
Expand Down Expand Up @@ -2481,8 +2481,8 @@ mstore(0xc140, mload(0xc060))
mstore(0xc180, mload(0xc0e0))
mstore(0xc1a0, mload(0xc100))
success := and(eq(staticcall(gas(), 0x6, 0xc140, 0x80, 0xc140, 0x40), 1), success)
mstore(0xc1c0, 0x27a850f8547f71339614747fe882e720856adabc5d73bf623b94f239b4ca325c)
mstore(0xc1e0, 0x02bced9a03998237daeac25e8b24646ee91b94d28b48fe82c2e8bf201f98f9f7)
mstore(0xc1c0, 0x0c01ab9642035ecdfc617935bb6d1828213370e01838af8c80549c6f98435dab)
mstore(0xc1e0, 0x12ddbf76f97eaeeb72519500ed7683bd9e8f3bb86adf7775a48864136b402b55)
mstore(0xc200, mload(0x9800))
success := and(eq(staticcall(gas(), 0x7, 0xc1c0, 0x60, 0xc1c0, 0x40), 1), success)
mstore(0xc220, mload(0xc140))
Expand Down Expand Up @@ -2616,17 +2616,17 @@ mstore(0xce60, mload(0xcd80))
mstore(0xcea0, mload(0xce00))
mstore(0xcec0, mload(0xce20))
success := and(eq(staticcall(gas(), 0x6, 0xce60, 0x80, 0xce60, 0x40), 1), success)
mstore(0xcee0, 0x24a7fee60ca06fe974cd99eb1e0231e5227012fa59ca9f4499681d0c1ccd656f)
mstore(0xcf00, 0x2ed3e9fb97f59eae97adacec68d5bdce0cd53ec7c455f7663cc71c83da7b92a0)
mstore(0xcee0, 0x21b16762bf25deb5850657cecaf1dae3c286231675d5f095fb3245f957c7c9fb)
mstore(0xcf00, 0x2326d435ac965380896279d6de5aab8b1527069923bdeef8d68943e4ba34f780)
mstore(0xcf20, mload(0x99e0))
success := and(eq(staticcall(gas(), 0x7, 0xcee0, 0x60, 0xcee0, 0x40), 1), success)
mstore(0xcf40, mload(0xce60))
mstore(0xcf60, mload(0xce80))
mstore(0xcf80, mload(0xcee0))
mstore(0xcfa0, mload(0xcf00))
success := and(eq(staticcall(gas(), 0x6, 0xcf40, 0x80, 0xcf40, 0x40), 1), success)
mstore(0xcfc0, 0x1b8428e8cf6ed4fc217444cefa5bbf19edf9e04107ede506653aad90286be9f8)
mstore(0xcfe0, 0x2a2934a21ad4b7ca95ef3618edc32cc1c9c6d6d661291820c79f059df997dcde)
mstore(0xcfc0, 0x28475ed1c54ff3947ca373e6d7a0cc1f9414ea7b3ad22544391dce964cb96b52)
mstore(0xcfe0, 0x141647cd7fae4dc6b8f782ba9f94e17a509bf9f429937d7965d269970075fa4b)
mstore(0xd000, mload(0x9a00))
success := and(eq(staticcall(gas(), 0x7, 0xcfc0, 0x60, 0xcfc0, 0x40), 1), success)
mstore(0xd020, mload(0xcf40))
Expand Down Expand Up @@ -2706,8 +2706,8 @@ mstore(0xd720, mload(0xd640))
mstore(0xd760, mload(0xd6c0))
mstore(0xd780, mload(0xd6e0))
success := and(eq(staticcall(gas(), 0x6, 0xd720, 0x80, 0xd720, 0x40), 1), success)
mstore(0xd7a0, 0x1ee2743c267121b4a661fbdd683ae6e7ad7affb6d39970832a580778df18611e)
mstore(0xd7c0, 0x2d3413793a7f6f05fce062a1dedcea55e9d4b2394c56bb34707722b66ef6828a)
mstore(0xd7a0, 0x268b3995bf115ccd55fb125128ea15ea6edc04d82e641827be5a45b84de8f71c)
mstore(0xd7c0, 0x04b08df449f913f6ae0f8d06312e30a09be96913fa888305d19695a256cb0d9f)
mstore(0xd7e0, mload(0x9b20))
success := and(eq(staticcall(gas(), 0x7, 0xd7a0, 0x60, 0xd7a0, 0x40), 1), success)
mstore(0xd800, mload(0xd720))
Expand Down
Loading

0 comments on commit 09a1b30

Please sign in to comment.