Skip to content

Commit

Permalink
Merge branch 'main' into popzxc-qit-22-remove-env-var-get
Browse files Browse the repository at this point in the history
  • Loading branch information
popzxc committed Nov 13, 2023
2 parents d4653b4 + ab31f03 commit da672ba
Show file tree
Hide file tree
Showing 274 changed files with 10,011 additions and 9,810 deletions.
2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# What ❔
## What ❔

<!-- What are the changes this PR brings about? -->
<!-- Example: This PR adds a PR template to the repo. -->
Expand Down
2 changes: 1 addition & 1 deletion .github/release-please/manifest.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"sdk/zksync-rs": "0.4.0",
"core": "17.1.0",
"prover": "8.1.0"
"prover": "9.0.0"
}
2 changes: 0 additions & 2 deletions .github/workflows/build-core-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,6 @@ jobs:
DOCKER_ACTION: ${{ inputs.action }}
COMPONENT: ${{ matrix.component }}
run: |
ci_run docker login -u ${{ secrets.DOCKERHUB_USER }} -p ${{ secrets.DOCKERHUB_TOKEN }}
ci_run gcloud auth configure-docker us-docker.pkg.dev,asia-docker.pkg.dev -q
ci_run rustup default nightly-2023-07-21
ci_run zk docker $DOCKER_ACTION $COMPONENT -- --public
- name: Show sccache stats
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/ci-core-reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,7 @@ jobs:
echo ZKSYNC_HOME=$(pwd) >> $GITHUB_ENV
echo $(pwd)/bin >> $GITHUB_PATH
echo IN_DOCKER=1 >> .env
# TODO (EVM-374): Change the following to `true` after https://github.com/NomicFoundation/hardhat/pull/4552 is merged and released.
echo RUN_CONTRACT_VERIFICATION_TEST=false >> .env
echo RUN_CONTRACT_VERIFICATION_TEST=true >> .env
echo ZKSYNC_DEBUG_LOGS=true >> .env
- name: Download zksolc/solc and zkvyper/vyper
Expand Down Expand Up @@ -205,8 +204,7 @@ jobs:
echo ZKSYNC_HOME=$(pwd) >> $GITHUB_ENV
echo $(pwd)/bin >> $GITHUB_PATH
echo IN_DOCKER=1 >> .env
# TODO (EVM-374): Change the following to `true` after https://github.com/NomicFoundation/hardhat/pull/4552 is merged and released.
echo RUN_CONTRACT_VERIFICATION_TEST=false >> .env
echo RUN_CONTRACT_VERIFICATION_TEST=true >> .env
echo ZKSYNC_DEBUG_LOGS=true >> .env
- name: Download zksolc/solc and zkvyper/vyper
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ jobs:
- '.github/workflows/build-prover-template.yml'
- '.github/workflows/ci-prover-reusable.yml'
- 'docker-compose-runner-nightly.yml'
- '!**/*.md'
- '!**/*.MD'
core:
- 'core/**'
- '!core/CHANGELOG.md'
Expand All @@ -55,6 +57,8 @@ jobs:
- 'docker-compose-runner.yml'
- 'Cargo.toml'
- 'Cargo.lock'
- '!**/*.md'
- '!**/*.MD'
docs:
- '**/*.md'
- '**/*.MD'
Expand All @@ -65,6 +69,8 @@ jobs:
- 'etc/**'
- 'contracts/**'
- 'infrastructure/zk/**'
- '!**/*.md'
- '!**/*.MD'
ci-for-core-lint:
name: CI for Core lint Components
Expand Down
7 changes: 6 additions & 1 deletion .markdownlintignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# Ignore submodule
bellman-cuda


# Ignore Github configuration markdowns
.github

# Ignore contract submodules
contracts
etc/system-contracts
etc/system-contracts

1 change: 1 addition & 0 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion contracts
8 changes: 8 additions & 0 deletions core/bin/contract-verifier/src/verifier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -524,4 +524,12 @@ impl JobProcessor for ContractVerifier {
// Do nothing
Ok(())
}

fn max_attempts(&self) -> u32 {
u32::MAX
}

async fn get_job_attempts(&self, _job_id: &Self::JobId) -> anyhow::Result<u32> {
Ok(1)
}
}
51 changes: 24 additions & 27 deletions core/bin/system-constants-generator/src/utils.rs
Original file line number Diff line number Diff line change
@@ -1,24 +1,28 @@
use multivm::interface::{L1BatchEnv, L2BlockEnv, SystemEnv, TxExecutionMode, VmExecutionMode};
use multivm::vm_latest::{
constants::{BLOCK_GAS_LIMIT, BOOTLOADER_HEAP_PAGE},
BootloaderState, BoxedTracer, DynTracer, HistoryEnabled, HistoryMode, Vm,
VmExecutionStopReason, VmTracer, ZkSyncVmState,
};
use once_cell::sync::Lazy;
use std::cell::RefCell;
use std::rc::Rc;

use multivm::interface::{
dyn_tracers::vm_1_4_0::DynTracer, tracer::VmExecutionStopReason, L1BatchEnv, L2BlockEnv,
SystemEnv, TxExecutionMode, VmExecutionMode, VmInterface,
};
use multivm::vm_latest::{
constants::{BLOCK_GAS_LIMIT, BOOTLOADER_HEAP_PAGE},
BootloaderState, HistoryEnabled, HistoryMode, SimpleMemory, ToTracerPointer, Vm, VmTracer,
ZkSyncVmState,
};
use zksync_contracts::{
load_sys_contract, read_bootloader_code, read_sys_contract_bytecode, read_zbin_bytecode,
BaseSystemContracts, ContractLanguage, SystemContractCode,
};
use zksync_state::{InMemoryStorage, StorageView, WriteStorage};
use zksync_types::block::legacy_miniblock_hash;
use zksync_types::{
ethabi::Token, fee::Fee, l1::L1Tx, l2::L2Tx, utils::storage_key_for_eth_balance, AccountTreeId,
Address, Execute, L1BatchNumber, L1TxCommonData, L2ChainId, MiniblockNumber, Nonce,
ProtocolVersionId, StorageKey, Timestamp, Transaction, BOOTLOADER_ADDRESS, H256,
SYSTEM_CONTEXT_ADDRESS, SYSTEM_CONTEXT_GAS_PRICE_POSITION, SYSTEM_CONTEXT_TX_ORIGIN_POSITION,
U256, ZKPORTER_IS_AVAILABLE,
block::legacy_miniblock_hash, ethabi::Token, fee::Fee, l1::L1Tx, l2::L2Tx,
utils::storage_key_for_eth_balance, AccountTreeId, Address, Execute, L1BatchNumber,
L1TxCommonData, L2ChainId, MiniblockNumber, Nonce, ProtocolVersionId, StorageKey, Timestamp,
Transaction, BOOTLOADER_ADDRESS, H256, SYSTEM_CONTEXT_ADDRESS,
SYSTEM_CONTEXT_GAS_PRICE_POSITION, SYSTEM_CONTEXT_TX_ORIGIN_POSITION, U256,
ZKPORTER_IS_AVAILABLE,
};
use zksync_utils::{bytecode::hash_bytecode, bytes_to_be_words, u256_to_h256};

Expand All @@ -31,7 +35,7 @@ struct SpecialBootloaderTracer {
output: Rc<RefCell<u32>>,
}

impl<S: WriteStorage, H: HistoryMode> DynTracer<S, H> for SpecialBootloaderTracer {}
impl<S: WriteStorage, H: HistoryMode> DynTracer<S, SimpleMemory<H>> for SpecialBootloaderTracer {}

impl<S: WriteStorage, H: HistoryMode> VmTracer<S, H> for SpecialBootloaderTracer {
fn initialize_tracer(&mut self, state: &mut ZkSyncVmState<S, H>) {
Expand Down Expand Up @@ -247,14 +251,11 @@ pub(super) fn execute_internal_transfer_test() -> u32 {
let tracer = SpecialBootloaderTracer {
input,
output: tracer_result.clone(),
};
let mut vm = Vm::new(
l1_batch,
system_env,
Rc::new(RefCell::new(storage_view)),
HistoryEnabled,
);
let result = vm.inspect(vec![tracer.into_boxed()], VmExecutionMode::Bootloader);
}
.into_tracer_pointer();
let mut vm: Vm<_, HistoryEnabled> =
Vm::new(l1_batch, system_env, Rc::new(RefCell::new(storage_view)));
let result = vm.inspect(tracer.into(), VmExecutionMode::Bootloader);

assert!(!result.result.is_failed(), "The internal call has reverted");
tracer_result.take()
Expand Down Expand Up @@ -307,12 +308,8 @@ pub(super) fn execute_user_txs_in_test_gas_vm(
chain_id: L2ChainId::default(),
};

let mut vm = Vm::new(
l1_batch,
system_env,
Rc::new(RefCell::new(storage_view)),
HistoryEnabled,
);
let mut vm: Vm<_, HistoryEnabled> =
Vm::new(l1_batch, system_env, Rc::new(RefCell::new(storage_view)));

let mut total_gas_refunded = 0;
for tx in txs {
Expand Down
1 change: 1 addition & 0 deletions core/lib/circuit_breaker/src/l1_txs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ impl CircuitBreaker for FailedL1TransactionChecker {
.eth_sender_dal()
.get_number_of_failed_transactions()
.await
.unwrap()
> 0
{
return Err(CircuitBreakerError::FailedL1Transaction);
Expand Down
1 change: 0 additions & 1 deletion core/lib/config/src/configs/house_keeper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ use serde::Deserialize;
#[derive(Debug, Deserialize, Clone, PartialEq)]
pub struct HouseKeeperConfig {
pub l1_batch_metrics_reporting_interval_ms: u64,
pub blob_cleaning_interval_ms: u64,
pub gpu_prover_queue_reporting_interval_ms: u64,
pub prover_job_retrying_interval_ms: u64,
pub prover_stats_reporting_interval_ms: u64,
Expand Down
Loading

0 comments on commit da672ba

Please sign in to comment.