Skip to content

Commit

Permalink
Merge #2064
Browse files Browse the repository at this point in the history
2064: Run node with different actors r=Deniallugo a=Deniallugo



Co-authored-by: deniallugo <[email protected]>
  • Loading branch information
bors-matterlabs-dev[bot] and Deniallugo authored Dec 3, 2021
2 parents 04d2f20 + 81a8e94 commit 78e35f3
Show file tree
Hide file tree
Showing 55 changed files with 934 additions and 1,055 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,8 @@ jobs:

- name: run-services
run: |
ci_run zk server &>server.log &
ci_run zk server core &>server.log &
ci_run zk server api &>api.log &
ci_run sleep 10
ci_run zk dummy-prover run &>dummy_prover.log &
ci_run sleep 100
Expand All @@ -133,6 +134,7 @@ jobs:
if: always()
run: |
ci_run cat server.log
ci_run cat api.log
ci_run cat dummy_prover.log
circuit-tests:
Expand Down
15 changes: 11 additions & 4 deletions core/bin/block_revert/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use web3::{
contract::Options,
types::{TransactionReceipt, U256, U64},
};
use zksync_config::ZkSyncConfig;
use zksync_config::{ContractsConfig, ETHClientConfig, ETHSenderConfig};
use zksync_eth_client::EthereumGateway;
use zksync_storage::StorageProcessor;
use zksync_types::{aggregated_operations::stored_block_info, block::Block, BlockNumber, H256};
Expand Down Expand Up @@ -226,18 +226,25 @@ struct Opt {
#[tokio::main]
async fn main() -> anyhow::Result<()> {
let opt = Opt::from_args();
let mut config = ZkSyncConfig::from_env();

let key_without_prefix = opt
.operator_private_key
.strip_prefix("0x")
.unwrap_or_else(|| opt.operator_private_key.as_str());

config.eth_sender.sender.operator_private_key =
let contracts = ContractsConfig::from_env();
let eth_client_config = ETHClientConfig::from_env();
let mut eth_sender_config = ETHSenderConfig::from_env();

eth_sender_config.sender.operator_private_key =
H256::from_str(key_without_prefix).expect("Cannot deserialize private key");

let mut storage = StorageProcessor::establish_connection().await?;
let client = EthereumGateway::from_config(&config);
let client = EthereumGateway::from_config(
&eth_client_config,
&eth_sender_config,
contracts.contract_addr,
);

let last_commited_block = storage
.chain()
Expand Down
6 changes: 3 additions & 3 deletions core/bin/server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,21 @@ zksync_prometheus_exporter = { path = "../../lib/prometheus_exporter", version =
zksync_config = { path = "../../lib/config", version = "1.0" }
zksync_storage = { path = "../../lib/storage", version = "1.0" }
zksync_gateway_watcher = { path = "../../lib/gateway_watcher", version = "1.0" }
zksync_utils = { path = "../../lib/utils", version = "1.0" }
zksync_types = { path = "../../lib/types", version = "1.0" }

anyhow = "1.0"
structopt = "0.3.20"
ctrlc = { version = "3.1", features = ["termination"] }
futures = "0.3"
tokio = { version = "1", features = ["full"] }
serde = "1.0.90"

vlog = { path = "../../lib/vlog", version = "1.0" }

[dev-dependencies]
zksync_crypto = { path = "../../lib/crypto", version = "1.0" }
zksync_types = { path = "../../lib/types", version = "1.0" }
zksync_prover = { path = "../prover", version = "1.0" }
zksync_utils = { path = "../../lib/utils", version = "1.0" }

num = { version = "0.3.1", features = ["serde"] }
serde = "1.0.90"
serde_json = "1.0.0"
Loading

0 comments on commit 78e35f3

Please sign in to comment.