Skip to content

feat: wire DacExecConfig pallet constant into cere + cere-dev runtimes#709

Merged
yahortsaryk merged 4 commits into
devfrom
feat/dac-exec-config
May 27, 2026
Merged

feat: wire DacExecConfig pallet constant into cere + cere-dev runtimes#709
yahortsaryk merged 4 commits into
devfrom
feat/dac-exec-config

Conversation

@yahortsaryk
Copy link
Copy Markdown
Contributor

parameter_types! { DacExecConfigConst: DacExecConfig = ... } in both runtimes, wired into ddc-verification + ddc-payouts pallet impls. Mainnet: diagnostics off. Cere-dev: coredumps + DWARF + detailed backtrace on for testnet forensics. Cascade lockfile bumps for ddc-dac-host, pallet-ddc-verification, pallet-ddc-payouts. After this lands, any wasmtime knob is tunable via runtime upgrade alone — no node-binary rebuild.

Adds a `parameter_types! { DacExecConfigConst: DacExecConfig = ... }`
block in both runtimes and threads it into the ddc-verification and
ddc-payouts pallet impls as `type DacExecConfig = DacExecConfigConst`.

Per-network defaults:

- cere (mainnet): diagnostics OFF — no coredumps, minimal backtrace,
  no DWARF debug info preserved. Keeps the runtime wasm lean and avoids
  per-trap log/disk pressure.

- cere-dev (testnet/devnet): diagnostics ON — coredumps written to
  /data/dac-coredumps/, full backtrace details, DWARF debug info
  preserved through Cranelift compilation. The next dac.wasm trap
  captures a forensic-quality snapshot for post-mortem in
  `wasmtime explore`.

Both: 60 s per-invoke deadline, 256 MiB linear-memory cap, 2 MiB
stack, Cranelift Speed opt level, parallel compilation on.

Cascade lockfile bumps for ddc-dac-host, pallet-ddc-verification,
pallet-ddc-payouts (all on feat/dac-exec-config). From here on,
tuning any of the wasmtime knobs in DacExecConfig is a runtime-upgrade
only — no node-binary rebuild required.
Per the dac.wasm CPU-burn pathology hit on era 494268 (testnet),
raise the per-invoke deadline + linear-memory cap so multi-thousand-
path inspection eras don't hit a wasmtime ceiling, while keeping
resource use safe on 8 GiB validator hosts.

Both runtimes:
  invoke_deadline_ms:    60_000      → 300_000   (5 min)
  max_memory_bytes:      256 MiB     → 512 MiB
  max_wasm_stack_bytes:  2 MiB       → 4 MiB
  memory_reservation:    4 GiB       → 4 GiB     (unchanged — virtual)

Diagnostics per network unchanged:
  cere: coredump off, minimal backtrace, no DWARF
  cere-dev: coredump on (→ /data/dac-coredumps/), DWARF + detailed
            backtrace preserved for post-mortem in `wasmtime explore`
Flip cere runtime's DacExecConfigConst to the same diagnostics-on
shape as cere-dev so the next dac.wasm trap on testnet writes a
coredump to /data/dac-coredumps/ for post-mortem analysis.

  coredump_on_trap:       false → true
  wasm_backtrace_details: false → true
  debug_info:             false → true
@yahortsaryk yahortsaryk merged commit 8e59660 into dev May 27, 2026
6 of 11 checks passed
@yahortsaryk yahortsaryk deleted the feat/dac-exec-config branch May 27, 2026 10:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant