Skip to content

Commit

Permalink
chore(eth_client): Remove support for old pre-boojum verifier (matter…
Browse files Browse the repository at this point in the history
…-labs#1375)

## What ❔

* Removing support for pre-boojum verifier (that used a different method
to return the verification key)

## Why ❔

* Boojum  migration was over 3 months ago
* removes one dependency on old zkevm_test_harness

## Checklist

<!-- Check your PR fulfills the following items. -->
<!-- For draft PRs check the boxes as you complete them. -->

- [ ] PR title corresponds to the body of PR (we generate changelog
entries from PRs).
- [ ] Tests for the changes have been added / updated.
- [ ] Documentation comments have been added / updated.
- [ ] Code has been formatted via `zk fmt` and `zk lint`.
- [ ] Spellcheck has been run via `zk spellcheck`.
- [ ] Linkcheck has been run via `zk linkcheck`.
  • Loading branch information
mm-zk authored Mar 6, 2024
1 parent 0adab9e commit b8deee4
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 123 deletions.
3 changes: 0 additions & 3 deletions core/lib/l1_contract_interface/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,3 @@ pub use zksync_types::web3::contract::tokens::{Detokenize, Tokenizable, Tokenize
pub mod i_executor;
/// Utilities for interacting with `Multicall3` contract.
pub mod multicall3;
/// Utilities for interacting with the old verifier contract.
/// Required for backward compatibility only.
pub mod pre_boojum_verifier;
3 changes: 0 additions & 3 deletions core/lib/l1_contract_interface/src/pre_boojum_verifier/mod.rs

This file was deleted.

104 changes: 0 additions & 104 deletions core/lib/l1_contract_interface/src/pre_boojum_verifier/vk_transform.rs

This file was deleted.

16 changes: 3 additions & 13 deletions core/lib/zksync_core/src/eth_watch/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@ use std::{fmt, sync::Arc};

use zksync_contracts::verifier_contract;
use zksync_eth_client::{CallFunctionArgs, Error as EthClientError, EthInterface};
use zksync_l1_contract_interface::pre_boojum_verifier::old_l1_vk_commitment;
use zksync_types::{
ethabi::{Contract, Token},
ethabi::Contract,
web3::{
self,
contract::tokens::Detokenize,
Expand Down Expand Up @@ -112,22 +111,13 @@ impl EthHttpQueryClient {
#[async_trait::async_trait]
impl EthClient for EthHttpQueryClient {
async fn scheduler_vk_hash(&self, verifier_address: Address) -> Result<H256, Error> {
// This is here for backward compatibility with the old verifier:
// Legacy verifier returns the full verification key;
// New verifier returns the hash of the verification key.

let args = CallFunctionArgs::new("verificationKeyHash", ())
.for_contract(verifier_address, self.verifier_contract_abi.clone());
let vk_hash_tokens = self.client.call_contract_function(args).await;
let vk_hash_tokens = self.client.call_contract_function(args).await?;

if let Ok(tokens) = vk_hash_tokens {
Ok(H256::from_tokens(tokens)?)
} else {
let args = CallFunctionArgs::new("get_verification_key", ())
.for_contract(verifier_address, self.verifier_contract_abi.clone());
let vk = self.client.call_contract_function(args).await?;
Ok(old_l1_vk_commitment(Token::from_tokens(vk)?))
}
Ok(H256::from_tokens(vk_hash_tokens)?)
}

async fn get_events(
Expand Down

0 comments on commit b8deee4

Please sign in to comment.