Skip to content

About

Nethermind Ethereum execution client package for StartOS

Resources

Stars

0 stars

Watchers

1 watching

Forks

 
 

Repository files navigation

Nethermind Logo

Nethermind on StartOS

Everything not listed in this document should behave the same as upstream Nethermind. If a feature, setting, or behavior is not mentioned here, the upstream documentation is accurate and fully applicable — see the Documentation section of instructions.md for links.

Packaging of the Nethermind Ethereum Mainnet execution client for StartOS, with RAM-, CPU-, thermal-, and disk-aware tuning, shared-volume storage support, and gateway-consistency monitoring.


Table of Contents


Image and Container Runtime

This package runs the upstream nethermind/nethermind OCI image directly on x86_64 and aarch64 with CPU emulation disabled (emulateMissing: false) and a 24 GiB host RAM requirement (hardwareRequirements.ram, requiring 32 GB+ servers and excluding 16 GB devices). One subcontainer (nethermind) runs a prepare-execution oneshot followed by the nethermind daemon with a 120-second SIGTERM shutdown timeout so RocksDB can flush cleanly.

At startup, main.ts applies the selected Memory profile (shared or dedicated), bounding --Db.SharedBlockCacheSize, --Db.StateDbRowCacheSize, --Pruning.CacheMb, --Pruning.DirtyCacheMb, --FlatDb.BlockCacheSizeBudget, --FlatDb.CompressedNodeRecordBufferMemoryBudget, --FlatDb.PersistedSnapshotArenaPageCacheBytes, --FlatDb.MaxInMemorySnapshotBytes, --Blocks.PreWarming, --Merge.CollectionsPerDecommit, --TxPool.Size, --TxPool.BlobCacheSize, .NET 11 GC tuning (DOTNET_gcServer, DOTNET_GCDynamicAdaptationMode / DATAS, DOTNET_GCHeapHardLimit in hex, DOTNET_GCConserveMemory), and MALLOC_ARENA_MAX, and caps --Sync.MaxProcessingThreads on multi-core hosts (cores - 1 on 4–7 cores, cores - 2 on 8+ cores) so initial sync leaves headroom for StartOS and the consensus client. The computed budget is logged at every start.

Volume and Data Layout

Three package volumes and optional StartOS shared volumes separate settings, authentication material, and reconstructible chain data.

Volume Mount point Purpose
config (host file model) Stores store.json settings and the generated Engine API secret.
engine-auth /run/engine-auth Holds jwt.hex (mode 0644); mounted read-only by dependents.
chain /chain Local StartOS data drive storage when __local__ is selected.

When a granted read/write shared volume is selected in Settings, it is mounted at /chain in place of chain. Chain databases live under /chain/nethermind. Missing, unavailable, or read-only grants prevent daemon startup.

File Models

One package-owned JSON file stores configuration and generated secrets.

  • config/store.json: stores storage, memoryProfile, history, executionPort, executionPeers, thermalProtection, fullySynced, and jwtSecret. main watches only startup-relevant fields (storage, memoryProfile, history, executionPort, executionPeers), so toggling thermalProtection or recording fullySynced never restarts Nethermind; setInterfaces watches only executionPort.

Dependencies

None. Nethermind requires a separate Ethereum consensus client (such as Nimbus) to drive the Engine API, but declares no hard dependency so users can pair any compatible consensus client.

Network Access and Interfaces

Three bindings separate private wallet RPC, bridge-only Engine API traffic, and public P2P networking.

  • Wallet RPC (wallet-rpc, port 8545, http with StartOS TLS): serves Eth, Net, and Web3 JSON-RPC modules with no application password.
  • Engine API (engine-api, port 8551, TCP, unexported): bound without an exported interface so it is reachable only on the StartOS bridge (getBridgeAddress) and authenticated via /run/engine-auth/jwt.hex.
  • Execution Peers (execution-peers, configurable TCP+UDP port, default 30303): P2P and discovery traffic. Changing executionPort in Settings retires the previous port binding via MultiHost.retirePort().
  • Admin RPC (127.0.0.1:8546, or 8547 if executionPort is 8546): loopback-only listener serving admin and txpool namespaces for health checks and Explorer actions (admin_peers, admin_nodeInfo, txpool_status); never bound or exported.

main.ts intentionally does not watch getOutboundGateway or interface addresses with .const(), so toggling StartTunnel vs. local WAN addresses and switching the outbound gateway never forces intermediate restarts.

Installation and First-Run Flow

On container init, seed initializes config/store.json defaults, generates a 32-byte hex Engine API JWT if absent, writes engine-auth/jwt.hex, and defaults memoryProfile to shared on upgrades of already-configured installs while leaving it unset on fresh installs. watchStorage raises a critical task until both a writable storage target and a memory profile are selected in Settings. Compatible consensus packages (such as Nimbus) mount engine-auth read-only and resolve engine-api over the bridge automatically.

Actions

Four actions manage configuration, live network exploration, and diagnostics.

  • configure (Settings, under Configuration): shows a hardware-tailored RAM & co-residency warning banner with detected server RAM, selects the storage target (annotating the StartOS data drive with free/total capacity, flagging unavailable shared volumes, and refusing local-drive selections too small for the chosen history mode), selects the required Memory profile (shared or dedicated — dynamically recommending shared on 32 GB hosts and dedicated on 64 GB+ hosts, and hiding/rejecting dedicated below 32 GB RAM), sets history retention (rolling, post-merge, full), configures the P2P TCP/UDP port (retiring the old binding on change), caps executionPeers to 50 on devices below 32 GB RAM, and selects Thermal protection (auto, quiet, off — applied immediately without restarting Nethermind when changed on its own). Never returns the Engine JWT.
  • connected-peers (Connected Peers, under Explorer, only-running): queries loopback admin_peers and admin_nodeInfo and performs an on-demand batch GeoIP lookup (ip-api.com/batch, only when clicked, degrading cleanly if offline) to show country reach with flag emojis, residential/ISP vs. datacenter counts, a Community Helper badge when contributing more inbound than outbound slots, a monospace client-diversity bar chart, a full copyable/downloadable per-peer table (flag, location, client & version, OS/arch, direction, protocol, host type, and IP:port), and your node's copyable enode URI.
  • ethereum-pulse (Ethereum Pulse, under Explorer, only-running): reads 100% locally from Nethermind (eth_getBlockByNumber, eth_feeHistory, eth_blobBaseFee, eth_maxPriorityFeePerGas, loopback txpool_status) plus in-memory session validation counters to display chain head & finality health, gas & blob fee market with 20-block Unicode sparklines and ETH cost estimates, EIP-1559 ETH burn, live TPS / gas fullness / L2 blobs / decoded block builders, local mempool depth, your node's session validation scorecard, and a copyable/downloadable table of the last 16 blocks.
  • diagnostics (System & Log Summary, under Maintenance): returns a copyable/downloadable plain-text report combining live hardware temperature sensors, active thermal throttle state, CPU/load/memory/PSI resource pressure, computed memory/thread budget, and categorized LogMonitor statistics and recent notable log lines.

Tasks

One critical task gates service startup on valid storage and a chosen memory profile.

  • configure (critical): raised by watchStorage whenever selected storage is unset, unavailable, revoked, or read-only, or when memoryProfile has not yet been chosen.

Health Checks

Eight checks report Engine readiness, sync progress, peer-network/gateway alignment, peer counts, hardware temperature and thermal throttling, system resource pressure, automated log health, and disk space.

  • nethermind (Execution RPC): daemon readiness check on TCP port 8551 (120 s grace period).
  • execution-sync (Execution Sync): queries eth_syncing and eth_getBlockByNumber (tolerating single transient RPC timeouts during heavy I/O before failing) and parses Nethermind's live Snap / Old Headers / Old Bodies / Old Receipts / DB-clearing / pivot-header-target / block-processing output from stdout. Shows phase percentages, ETAs (after 2+ minutes of smooth progress), target block height during snap sync, atomic block catch-up fractions once block execution begins, inline thermal-throttle status if throttled during sync, block height and lag if waiting on consensus, and synced block height with head age and block processing latency once caught up. Posts a one-shot StartOS notification when initial sync completes.
  • peer-ports (Peer Network): verifies external port assignment matches executionPort, checks inbound vs. outbound gateway consistency with sdk.host.getAddressGateways, notes additional enabled public addresses, and compares admin_nodeInfo.ip against the active gateway's public IP so the user knows when a single restart is needed after switching between StartTunnel and local WAN. Uses an event-driven trigger on execution-peers and getOutboundGateway so port and gateway edits update immediately without restarting Nethermind. Does not perform an external connectivity probe.
  • peers (Peers): reports total vs. configured max, inbound, and outbound peer counts from loopback admin_peers (with single-error retry tolerance and low-peer notice below 5 peers).
  • thermals (Temperature): reads Linux sysfs temperature sensors (/sys/class/hwmon with /sys/class/thermal fallback) for CPU and NVMe temperatures and drives a hysteresis-guarded thermal controller (ThermalController in startos/systemMonitor.ts). In Automatic mode (default), dynamically throttles all running Nethermind threads without restarting using reversible CPU affinity and disk I/O scheduling (taskset -acp, ionice) at Level 1 (50% cores, low best-effort I/O priority at CPU ≥ 80°C or NVMe ≥ 68°C) and Level 2 (25% cores, idle I/O class at CPU ≥ 88°C or NVMe ≥ 74°C), releasing only after cooling past an 8°C hysteresis band and a 60 s hold. Low Heat / Quiet holds Level 1 as a baseline (escalating to Level 2 at CPU ≥ 82°C or NVMe ≥ 70°C); Monitoring Only never throttles. Critical overheating (CPU ≥ 95°C or NVMe ≥ 80°C) reports failure and fires a rate-limited StartOS error notification with cooling guidance. Wakes immediately via .onChange() when Thermal protection changes in Settings. Reports disabled on virtualized hardware without thermal sensors.
  • resources (System Resources): samples real host /proc/stat, /proc/meminfo, /proc/loadavg, /proc/pressure/* (Linux PSI), and Nethermind's own VmRSS from inside the subcontainer every 20 s (10 s under pressure), bypassing LXCFS per-container /proc/meminfo virtualization so total server RAM usage across all services matches StartOS Server Metrics. Reports CPU utilization, load average, RAM usage/free capacity, and Nethermind RSS; surfaces informational messages under success for heavy disk I/O (iowait >= 35% or IO PSI fullAvg60 >= 25%) or sustained CPU saturation (>= 90% or load > 1.25× cores); reports loading for high memory usage (>= 88%, < 2 GiB free, or memory PSI someAvg60 >= 15%); reports failure and sends a rate-limited warning notification on critically low RAM (>= 95% used and < 768 MiB free, or severe memory PSI stalls).
  • log-health (Log Health): scans Nethermind's live stdout/stderr stream in real time (including multi-line .NET exception stack traces), filtering out known benign snap-sync and P2P weather while translating actionable issues (server out-of-memory vs. .NET memory-profile heap-limit OOM, storage/RocksDB errors, Engine JWT authentication failures, clock skew, consensus client silence, snap sync restarts, post-error recovery restarts, and error bursts) into plain-English dashboard status, rate-limited StartOS notifications with markdown troubleshooting details (at most once per 6 hours per category), and ephemeral diagnostics persisted for System & Log Summary. Clears stale active failures when Nethermind boots a fresh process after an unexpected restart while preserving historical counters and log lines for diagnostics.
  • storage (Disk Space): checks /chain capacity every 5 minutes (using instant statfs() for the StartOS data drive and timeout-bounded df -PB1 /chain for shared volumes, retaining the last valid reading across transient failures); displays free/total space and used percentage, warns below 250 GiB free (Nethermind's minimum headroom for state pruning), reports failure below 50 GiB free, and sends rate-limited StartOS notifications on low or critical space.

Backups and Restore

Backups include config and engine-auth only; reconstructible chain data in chain is excluded. Shared volumes are backed up and restored separately by StartOS — after restoring a shared volume, re-grant read/write access and select its new identity in Settings.

Limitations and Differences

Mainnet only; no validator key management, archive-state mode, bandwidth cap, or public Wallet RPC authentication is included. On StartOS, Network.P2PPort and Network.DiscoveryPort must match the external port assigned to Execution Peers because Nethermind advertises its listening port in ENR.


Quick Reference for AI Consumers

package_id: nethermind
image: nethermind/nethermind
architectures: [x86_64, aarch64]
subcontainers: [nethermind]
volumes:
  config: (file model)
  engine-auth: /run/engine-auth
  chain: /chain
file_models:
  - config/store.json
startos_managed_env_vars: []
dependencies: none
interfaces:
  wallet-rpc: { type: api, port: 8545 }
  execution-peers: { type: p2p, port: 30303 }
actions:
  - configure
  - connected-peers
  - ethereum-pulse
  - diagnostics
tasks:
  - { action: configure, severity: critical }
health_checks:
  - nethermind
  - execution-sync
  - peer-ports
  - peers
  - thermals
  - resources
  - log-health
  - storage

About

Nethermind Ethereum execution client package for StartOS

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages