MCPcopy Index your code
hub / github.com/Irys-xyz/irys

github.com/Irys-xyz/irys @testnet-4.0.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release testnet-4.0.0 ↗ · + Follow
7,011 symbols 30,431 edges 483 files 1,535 documented · 22% updated todaytestnet-4.0.0 · 2026-07-01★ 42240 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

irys

Development setup

Clone the repository, install Rust rust-toolchain.toml contains the version you should be using.\ Or, use the development container configuration contained in .devcontainer

Other dependencies (for the OpenSSL build):

clang & a C/C++ build toolchain
gmp
pkg-config

The NVIDIA feature flag/CUDA accelerated matrix packing requires the latest CUDA toolkit (12.6+)\ and GCC-13 (as well as g++ 13).\ See .devcontainer/setup.sh for more information.

Local development commands:

cargo xtask --help

cargo xtask check
cargo xtask test
cargo xtask unused-deps
cargo xtask typos

cargo xtask local-checks # runs 99% of the tasks CI does

Testing

General:

cargo xtask test

Testing code examples in comments

cargo test --doc

Re-run only failing tests:

cargo xtask test --rerun-failures

Run a single package:

cargo xtask test -- -p irys-actors

Test resource monitoring

cargo xtask test always tracks pass/fail results per test (via the nextest-wrapper binary). Add --monitor to also sample CPU and memory usage at 50 ms intervals:

# Run tests with CPU + memory monitoring
cargo xtask test --monitor

# Run three times for better averages, then analyze
cargo xtask test --monitor
cargo xtask test --monitor
cargo xtask test --monitor

# See which tests are heaviest
cargo run --bin nextest-report -- summary --sort peak --top 10

# See which tests use the most memory
cargo run --bin nextest-report -- summary --sort peak_rss --top 10

# Find tests that need reclassification (e.g. missing heavy_ prefix)
cargo run --bin nextest-report -- analyze

Tests are classified by naming convention in .config/nextest.toml: - serial_* — run serially - slow_* — 90 s timeout - heavy_* — 2 threads required - heavy3_* — 3 threads required - heavy4_* — 4 threads required

The analyze command identifies tests whose actual CPU usage doesn't match their classification and suggests the correct prefix.

See crates/utils/nextest-monitor/README.md for full documentation.

Debugging

If you're debugging and noticing any issues (i.e unable to inspect local variables)\ comment out all instances of the debug = "line-tables-only" and split-debuginfo = "unpacked" lines in the root Cargo.toml\ these options accelerate debug build times at the cost of interfering with debugging.

Common env issues

MacOS has a soft limit of 256 open file limit per process. Some tests currently require more than 256 open files. Here we significantly increase that and persist across reboots.

sudo tee /Library/LaunchDaemons/limit.maxfiles.plist >/dev/null <<'EOF'
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple/DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
  <dict>
    <key>Label</key>
      <string>limit.maxfiles</string>
    <key>ProgramArguments</key>
      <array>
        <string>launchctl</string>
        <string>limit</string>
        <string>maxfiles</string>
        <string>8192</string>
        <string>81920</string>
      </array>
    <key>RunAtLoad</key>
      <true/>
    <key>ServiceIPC</key>
      <false/>
  </dict>
</plist>
EOF

sudo chown root:wheel /Library/LaunchDaemons/limit.maxfiles.plist
sudo chmod 644 /Library/LaunchDaemons/limit.maxfiles.plist

sudo launchctl load -w /Library/LaunchDaemons/limit.maxfiles.plist

WSL2 clock instability

If you're running tests under WSL2, you may see intermittent failures around block production, hardfork activation, or any test that mixes tokio::time::sleep (monotonic) with SystemTime::now() / UnixTimestamp::now() (realtime). This is WSL2's Hyper-V time-sync integration component periodically jamming the Windows host clock into the VM, which makes CLOCK_REALTIME lurch backwards (we've measured backward jumps of up to ~12s on this codebase) while CLOCK_MONOTONIC keeps ticking smoothly.

Fix (Windows-side, persistent)

Edit %UserProfile%\.wslconfig:

[wsl2]
kernelCommandLine = hv_utils.timesync_implicit=0

Then wsl --shutdown once.

Misc

use the IRYS_CUSTOM_TMP_DIR env var to change the temporary directory used for tests from ./.tmp to whatever path you like. it can also be set to another env var to lookup and resolve as a path at runtime.

Extension points exported contracts — how you extend this code

Core symbols most depended-on inside this repo

Shape

Function 3,259
Method 2,793
Class 696
Enum 225
Interface 38

Languages

Rust100%
C1%
TypeScript1%

Modules by API surface

crates/chain-tests/src/utils.rs170 symbols
crates/actors/src/block_validation.rs153 symbols
crates/p2p/src/gossip_client.rs122 symbols
crates/actors/src/mempool_service.rs118 symbols
crates/types/src/block.rs116 symbols
crates/types/src/canonical.rs100 symbols
crates/types/src/storage_pricing.rs95 symbols
crates/domain/src/models/block_tree.rs89 symbols
crates/types/src/config/node.rs85 symbols
crates/irys-reth/src/lib.rs81 symbols
crates/domain/src/models/peer_list.rs77 symbols
crates/actors/src/block_producer/ledger_expiry.rs77 symbols

For agents

$ claude mcp add irys \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page