Skip to content

Commit

Permalink
feat(prover): Fixing snark verification keys (#1225)
Browse files Browse the repository at this point in the history
## What ❔

* Compute the snark verification key in rust code
* Added historical values and tests to make sure that computations are
correct
* Write the small json file with commitments when generating new
verification key.
* Stopped loading CONTRACTS_SNARK_WRAPPER_VK_HASH from env variable, and
computing it locally instead.

## Why ❔

* In the past, the snark verification key generation was a complex
process, that involved running a separate binaries
* Now it is all the part of the key generator, with a simple utils
library (and without including the old test harness)
* Historical files will allow us to quickly check the correctness of the
older blocks
  • Loading branch information
mm-zk committed Mar 6, 2024
1 parent b8deee4 commit 5cbef73
Show file tree
Hide file tree
Showing 18 changed files with 1,789 additions and 32 deletions.
2 changes: 1 addition & 1 deletion etc/env/base/contracts.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ L2_WETH_TOKEN_PROXY_ADDR="0x5E6D086F5eC079ADFF4FB3774CDf3e8D6a34F7E9"
FRI_RECURSION_LEAF_LEVEL_VK_HASH ="0x062362cb3eaf1f631406cbe19bf2a2c5d0d9ea69d069309a6003addae9f387be"
FRI_RECURSION_NODE_LEVEL_VK_HASH ="0x5a3ef282b21e12fe1f4438e5bb158fc5060b160559c5158c6389d62d9fe3d080"
FRI_RECURSION_SCHEDULER_LEVEL_VK_HASH ="0x1405880dc3317d635bddb0ab62bf5d013e5d1f462161c1f7ac3289c7fef956da"
SNARK_WRAPPER_VK_HASH = "0x063c6fb5c70404c2867f413a8e35563ad3d040b1ad8c11786231bfdba7b472c7"
SNARK_WRAPPER_VK_HASH ="0x063c6fb5c70404c2867f413a8e35563ad3d040b1ad8c11786231bfdba7b472c7"
BLOB_VERSIONED_HASH_RETRIEVER_ADDR="0x0000000000000000000000000000000000000000"

# Prover that should be used at genesis. 'fri' or 'snark'
Expand Down
2 changes: 2 additions & 0 deletions prover/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions prover/vk_setup_data_generator_server_fri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ structopt = "0.3.26"
once_cell = "1.8.0"
toml_edit = "0.14.4"
md5 = "0.7.0"
sha3 = "0.10.8"
hex = "0.4.3"

[dev-dependencies]
proptest = "1.2.0"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"leaf": "0x72167c43a46cf38875b267d67716edc4563861364a3c03ab7aee73498421e828",
"node": "0x5a3ef282b21e12fe1f4438e5bb158fc5060b160559c5158c6389d62d9fe3d080",
"scheduler": "0x201d4c7d8e781d51a3bbd451a43a8f45240bb765b565ae6ce69192d918c3563d",
"snark_wrapper": "0x4be443afd605a782b6e56d199df2460a025c81b3dea144e135bece83612563f2"
}
Loading

0 comments on commit 5cbef73

Please sign in to comment.