From 6294aa1699918d3f79e5d91a62c0958d53841f42 Mon Sep 17 00:00:00 2001 From: Dustin Brickwood Date: Mon, 11 Sep 2023 08:48:20 -0500 Subject: [PATCH] chore: update lib.rs to include main rust docs content (#100) * chore: move main rust docs to lib.rs for readability * chore: remove limitation that has been resolved --------- Co-authored-by: Nicolas Villanueva --- src/lib.rs | 43 +++++++++++++++++++++++++++++++++++++++++++ src/main.rs | 43 ------------------------------------------- 2 files changed, 43 insertions(+), 43 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index ad1f96e7..e3daac0b 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,3 +1,46 @@ +//! zkSync Era In-Memory Node +//! +//! The `era-test-node` crate provides an in-memory node designed primarily for local testing. +//! It supports forking the state from other networks, making it a valuable tool for integration testing, +//! bootloader and system contract testing, and prototyping. +//! +//! ## Overview +//! +//! - **In-Memory Database**: The node uses an in-memory database for storing state information, +//! and employs simplified hashmaps for tracking blocks and transactions. +//! +//! - **Forking**: In fork mode, the node fetches missing storage data from a remote source if not available locally. +//! +//! - **Remote Server Interaction**: The node can use the remote server (openchain) to resolve the ABI and topics +//! to human-readable names. +//! +//! - **Local Testing**: Designed for local testing, this node is not intended for production use. +//! +//! ## Features +//! +//! - Fork the state of mainnet, testnet, or a custom network. +//! - Replay existing mainnet or testnet transactions. +//! - Use local bootloader and system contracts. +//! - Operate deterministically in non-fork mode. +//! - Start quickly with pre-configured 'rich' accounts. +//! - Resolve names of ABI functions and Events using openchain. +//! +//! ## Limitations +//! +//! - No communication between Layer 1 and Layer 2. +//! - Many APIs are not yet implemented. +//! - No support for accessing historical data. +//! - Only one transaction allowed per Layer 1 batch. +//! +//! ## Usage +//! +//! To start the node, use the command `era_test_node run`. For more advanced functionalities like forking or +//! replaying transactions, refer to the [official documentation](https://era.zksync.io/docs/tools/testing/era-test-node.html). +//! +//! ## Contributions +//! +//! Contributions to improve `era-test-node` are welcome. Please refer to the [contribution guidelines](https://github.com/matter-labs/era-test-node/blob/main/.github/CONTRIBUTING.md) for more details. + pub mod bootloader_debug; pub mod configuration_api; pub mod console_log; diff --git a/src/main.rs b/src/main.rs index 5dbb6366..5d8f6c2d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,46 +1,3 @@ -//! zkSync Era In-Memory Node -//! -//! The `era-test-node` crate provides an in-memory node designed primarily for local testing. -//! It supports forking the state from other networks, making it a valuable tool for integration testing, -//! bootloader and system contract testing, and prototyping. -//! -//! ## Overview -//! -//! - **In-Memory Database**: The node uses an in-memory database for storing state information, -//! and employs simplified hashmaps for tracking blocks and transactions. -//! -//! - **Forking**: In fork mode, the node fetches missing storage data from a remote source if not available locally. -//! -//! - **Remote Server Interaction**: The node can use the remote server (openchain) to resolve the ABI and topics -//! to human-readable names. -//! -//! - **Local Testing**: Designed for local testing, this node is not intended for production use. -//! -//! ## Features -//! -//! - Fork the state of mainnet, testnet, or a custom network. -//! - Replay existing mainnet or testnet transactions. -//! - Use local bootloader and system contracts. -//! - Operate deterministically in non-fork mode. -//! - Start quickly with pre-configured 'rich' accounts. -//! - Resolve names of ABI functions and Events using openchain. -//! -//! ## Limitations -//! -//! - No communication between Layer 1 and Layer 2. -//! - Many APIs are not yet implemented. -//! - No support for accessing historical data. -//! - Only one transaction allowed per Layer 1 batch. -//! - Fixed values returned for zk Gas estimation. -//! -//! ## Usage -//! -//! To start the node, use the command `era_test_node run`. For more advanced functionalities like forking or -//! replaying transactions, refer to the official documentation. -//! -//! ## Contributions -//! -//! Contributions to improve `era-test-node` are welcome. Please refer to the contribution guidelines for more details. use crate::hardhat::{HardhatNamespaceImpl, HardhatNamespaceT}; use crate::node::{ShowGasDetails, ShowStorageLogs, ShowVMDetails}; use clap::{Parser, Subcommand};