pub struct DevnetConfig {Show 13 fields
pub node_count: usize,
pub base_port: u16,
pub bootstrap_count: usize,
pub data_dir: PathBuf,
pub spawn_delay: Duration,
pub stabilization_timeout: Duration,
pub node_startup_timeout: Duration,
pub enable_node_logging: bool,
pub cleanup_data_dir: bool,
pub evm_network: Option<Network>,
pub advertise_ip: Option<Ipv4Addr>,
pub webrtc_direct: bool,
pub webrtc_direct_base_port: u16,
}Expand description
Configuration for the devnet.
Each configuration is automatically isolated with unique ports and data directories to prevent collisions when running multiple devnets.
Fields§
§node_count: usizeNumber of nodes to spawn (default: 25).
base_port: u16Base port for node allocation (0 = auto).
bootstrap_count: usizeNumber of bootstrap nodes (first N nodes, default: 3).
data_dir: PathBufDirectory each run creates its own data directory in (default:
{ant data root}/devnets).
Devnet::new creates a fresh {pid}-{random} directory inside it,
and from then on Devnet::config’s data_dir is that run
directory. A devnet deletes only a directory it created and marked as
its own (MARKER_FILE), never this one or anything else in it: the
ant data root also holds real nodes’ data and the client’s payment
caches and upload history (ant-node#261). Run directories that earlier
runs left here, killed before they could remove them, are removed when
the next run starts, unless they were kept.
On Unix it must be a directory only the user and root can change, as
must every directory above it, or Devnet::new fails: another user
who could would be able to redirect what the nodes write.
spawn_delay: DurationDelay between node spawns (default: 200ms).
stabilization_timeout: DurationTimeout for network stabilization (default: 120s).
node_startup_timeout: DurationTimeout for single node startup (default: 30s).
enable_node_logging: boolEnable verbose logging for devnet nodes.
cleanup_data_dir: boolWhether to remove the run’s data directory on shutdown. When false,
its marker also tells later runs to leave it alone.
evm_network: Option<Network>Optional EVM network for payment verification.
When Some, nodes will use this network (e.g. Anvil testnet) for
on-chain verification. Defaults to Arbitrum One when None.
advertise_ip: Option<Ipv4Addr>Optional IPv4 to advertise to peers/clients (LAN devnet). When Some,
nodes bind 0.0.0.0 and advertise this IP instead of 127.0.0.1.
webrtc_direct: boolRun one direct-browser WebRTC Direct listener per devnet node.
webrtc_direct_base_port: u16First UDP port in the WebRTC Direct node range (0 = allocate).
Implementations§
Trait Implementations§
Source§impl Clone for DevnetConfig
impl Clone for DevnetConfig
Source§impl Debug for DevnetConfig
impl Debug for DevnetConfig
Auto Trait Implementations§
impl Freeze for DevnetConfig
impl RefUnwindSafe for DevnetConfig
impl Send for DevnetConfig
impl Sync for DevnetConfig
impl Unpin for DevnetConfig
impl UnsafeUnpin for DevnetConfig
impl UnwindSafe for DevnetConfig
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more