Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Artemka374 committed Jul 29, 2024
1 parent af39e9d commit b78aa49
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 42 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ALTER TABLE protocol_versions ADD COLUMN IF NOT EXISTS recursion_node_level_vk_hash;
ALTER TABLE protocol_versions ADD COLUMN IF NOT EXISTS recursion_leaf_level_vk_hash;
ALTER TABLE protocol_versions ADD COLUMN IF NOT EXISTS recursion_circuits_set_vks_hash;
ALTER TABLE protocol_versions ALTER COLUMN recursion_node_level_vk_hash SET NOT NULL;
ALTER TABLE protocol_versions ALTER COLUMN recursion_leaf_level_vk_hash SET NOT NULL;
ALTER TABLE protocol_versions ALTER COLUMN recursion_circuits_set_vks_hash SET NOT NULL;

ALTER TABLE protocol_patches ADD COLUMN IF NOT EXISTS recursion_node_level_vk_hash;
ALTER TABLE protocol_patches ADD COLUMN IF NOT EXISTS recursion_leaf_level_vk_hash;
ALTER TABLE protocol_patches ADD COLUMN IF NOT EXISTS recursion_circuits_set_vks_hash;
ALTER TABLE protocol_patches ALTER COLUMN recursion_node_level_vk_hash SET NOT NULL;
ALTER TABLE protocol_patches ALTER COLUMN recursion_leaf_level_vk_hash SET NOT NULL;
ALTER TABLE protocol_patches ALTER COLUMN recursion_circuits_set_vks_hash SET NOT NULL;
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ALTER TABLE protocol_versions DROP COLUMN IF EXISTS recursion_node_level_vk_hash;
ALTER TABLE protocol_versions DROP COLUMN IF EXISTS recursion_leaf_level_vk_hash;
ALTER TABLE protocol_versions DROP COLUMN IF EXISTS recursion_circuits_set_vks_hash;
ALTER TABLE protocol_versions ALTER COLUMN recursion_node_level_vk_hash DROP NOT NULL;
ALTER TABLE protocol_versions ALTER COLUMN recursion_leaf_level_vk_hash DROP NOT NULL;
ALTER TABLE protocol_versions ALTER COLUMN recursion_circuits_set_vks_hash DROP NOT NULL;

ALTER TABLE protocol_patches DROP COLUMN IF EXISTS recursion_node_level_vk_hash;
ALTER TABLE protocol_patches DROP COLUMN IF EXISTS recursion_leaf_level_vk_hash;
ALTER TABLE protocol_patches DROP COLUMN IF EXISTS recursion_circuits_set_vks_hash;
ALTER TABLE protocol_patches ALTER COLUMN recursion_node_level_vk_hash DROP NOT NULL;
ALTER TABLE protocol_patches ALTER COLUMN recursion_leaf_level_vk_hash DROP NOT NULL;
ALTER TABLE protocol_patches ALTER COLUMN recursion_circuits_set_vks_hash DROP NOT NULL;
25 changes: 1 addition & 24 deletions core/node/eth_sender/src/eth_tx_aggregator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use zksync_types::{
eth_sender::{EthTx, EthTxBlobSidecar, EthTxBlobSidecarV1, SidecarBlobV1},
ethabi::{Function, Token},
l2_to_l1_log::UserL2ToL1Log,
protocol_version::{L1VerifierConfig, VerifierParams, PACKED_SEMVER_MINOR_MASK},
protocol_version::{L1VerifierConfig, PACKED_SEMVER_MINOR_MASK},
pubdata_da::PubdataDA,
web3::{contract::Error as Web3ContractError, BlockNumber},
Address, L2ChainId, ProtocolVersionId, H256, U256,
Expand All @@ -37,7 +37,6 @@ use crate::{
#[allow(dead_code)]
pub struct MulticallData {
pub base_system_contracts_hashes: BaseSystemContractsHashes,
pub verifier_params: VerifierParams,
pub verifier_address: Address,
pub protocol_version_id: ProtocolVersionId,
}
Expand Down Expand Up @@ -265,27 +264,6 @@ impl EthTxAggregator {
default_aa,
};

let multicall3_verifier_params =
Multicall3Result::from_token(call_results_iterator.next().unwrap())?.return_data;
if multicall3_verifier_params.len() != 96 {
return Err(EthSenderError::Parse(Web3ContractError::InvalidOutputType(
format!(
"multicall3 verifier params data is not of the len of 96: {:?}",
multicall3_default_aa
),
)));
}
let recursion_node_level_vk_hash = H256::from_slice(&multicall3_verifier_params[..32]);
let recursion_leaf_level_vk_hash =
H256::from_slice(&multicall3_verifier_params[32..64]);
let recursion_circuits_set_vks_hash =
H256::from_slice(&multicall3_verifier_params[64..]);
let verifier_params = VerifierParams {
recursion_node_level_vk_hash,
recursion_leaf_level_vk_hash,
recursion_circuits_set_vks_hash,
};

let multicall3_verifier_address =
Multicall3Result::from_token(call_results_iterator.next().unwrap())?.return_data;
if multicall3_verifier_address.len() != 32 {
Expand Down Expand Up @@ -320,7 +298,6 @@ impl EthTxAggregator {

return Ok(MulticallData {
base_system_contracts_hashes,
verifier_params,
verifier_address,
protocol_version_id,
});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
ALTER TABLE prover_fri_protocol_versions ADD COLUMN IF NOT EXISTS recursion_node_level_vk_hash;
ALTER TABLE prover_fri_protocol_versions ADD COLUMN IF NOT EXISTS recursion_leaf_level_vk_hash;
ALTER TABLE prover_fri_protocol_versions ADD COLUMN IF NOT EXISTS recursion_circuits_set_vks_hash;
ALTER TABLE prover_fri_protocol_versions ALTER COLUMN recursion_node_level_vk_hash SET NOT NULL;
ALTER TABLE prover_fri_protocol_versions ALTER COLUMN recursion_leaf_level_vk_hash SET NOT NULL;
ALTER TABLE prover_fri_protocol_versions ALTER COLUMN recursion_circuits_set_vks_hash SET NOT NULL;
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
ALTER TABLE prover_fri_protocol_versions DROP COLUMN IF EXISTS recursion_node_level_vk_hash;
ALTER TABLE prover_fri_protocol_versions DROP COLUMN IF EXISTS recursion_leaf_level_vk_hash;
ALTER TABLE prover_fri_protocol_versions DROP COLUMN IF EXISTS recursion_circuits_set_vks_hash;
ALTER TABLE prover_fri_protocol_versions ALTER COLUMN recursion_node_level_vk_hash DROP NOT NULL;
ALTER TABLE prover_fri_protocol_versions ALTER COLUMN recursion_leaf_level_vk_hash DROP NOT NULL;
ALTER TABLE prover_fri_protocol_versions ALTER COLUMN recursion_circuits_set_vks_hash DROP NOT NULL;

0 comments on commit b78aa49

Please sign in to comment.