feat: wire DacExecConfig pallet constant into cere + cere-dev runtimes#709
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.