Crate arbiter_core
source ·Expand description
_ _____ ____ _____ _______ ______ _____
/ \ | __ \| _ \_ _|__ __| ____| __ \
/ \ | |__) | |_) || | | | | |__ | |__) |
/ / \ \ | _ /| _ < | | | | | __| | _ /
/ _____ \| | \ \| |_) || |_ | | | |____| | \ \
/_/ \_\_| \_\____/_____| |_| |______|_| \_\
arbiter-core
is designed to facilitate agent-based simulations of Ethereum
smart contracts in a local environment.
With a primary emphasis on ease of use and performance, it employs the
revm
(Rust EVM) to provide a local
execution environment that closely simulates the Ethereum blockchain but
without associated overheads like networking latency.
Key Features:
- Environment Handling: Detailed setup and control mechanisms for running the Ethereum-like blockchain environment.
- Middleware Implementation: Customized middleware to reduce overhead and provide optimal performance.
For a detailed guide on getting started, check out the Arbiter Github page.
For specific module-level information and examples, navigate to the respective module documentation below.
Modules§
- This module contains the backend for the
console2.log
Solidity function so that these logs can be read in Arbiter. - The
Coprocessor
is used to process calls and can access read-only from theEnvironment
’s database while staying up to date with the latest state of theEnvironment
’s database. - The
ArbiterDB
is a wrapper around aCacheDB
that is used to provide access to theEnvironment
’s database to multipleCoprocessors
. It is also used to be able to write out theEnvironment
database to a file. - The
environment
module provides abstractions and functionality for handling the Ethereum execution environment. This includes managing its state, interfacing with the EVM, and broadcasting events to subscribers. Other features include the ability to control block rate and gas settings and execute other database modifications from external agents. - Errors that can occur when managing or interfacing with Arbiter’s sandboxed Ethereum environment.
- The
data_collection
module provides theEventLogger
struct for logging events from the Ethereum network. - The
middleware
module provides functionality to interact with Ethereum-like virtual machines. It achieves this by offering a middleware implementation for sending and reading transactions, as well as watching for events.