Skip to main content
Test assertion logic, builder enforcement, guards, and transaction routing. Alerting checks rule behavior but does not exercise every production dependency.

Prerequisites

Identify the protected contracts and entry points, assertion specification, intended guard implementation, transaction submitters, Protocol Manager, and recovery roles. Confirm the test environment available for the deployment; alerting is not itself a public Ethereum testnet.

1. Test Rules Locally

Use local assertion tests for allowed actions and intended failures. Cover trigger matching, snapshot selection, boundary values, gas limits, and exceptional legitimate operations such as migrations and upgrades. Include a failure case that would pass if the assertion were absent. A test that only observes the protocol’s existing revert does not demonstrate added assertion protection. Reuse protocol fixtures and add focused regression tests for findings from alerting or historical replay.

2. Review the Release Evidence

Creating a release with pcl apply starts the platform’s verification, source-code, and backtesting checks. Review the actual target contracts and assertion changes, then investigate each backtesting finding before deployment. A clean backtest applies only to the tested history and replay conditions. See Backtesting and Review and Deploy Policies.

3. Observe Alerting Behavior

Deploy the reviewed release to alerting on the Ethereum platform. Wait for the configured activation time and monitor matching activity and invalidations. Test ordinary activity and legitimate exceptions. Check that transactions exercised the assertions. Choose the review period based on the scenarios covered. Investigate false positives, add local regression cases, and review a new release after changes. Alerting does not drop live transactions, so it does not prove that production rejection or recovery works.

4. Test Guards and the Submission Path

Use local or fork-based guard tests, then the approved end-to-end environment with the real integration path. A timeout alone is not rejection evidence. Check transaction status, builder or platform evidence, and contract state. Distinguish a pre-inclusion exclusion from an included guard revert, which consumes gas. See Guard Testing for the local harness. Its fixture proves the harness behavior; target your actual contract to validate its integration. For a proxy guard, test guarded and unguarded selectors, selector collisions, and internal routes to protected operations. For a hook adapter, verify that every covered operation reaches check(true) through the authorized caller. If proxy queue mode is enabled, verify the event, unchanged state, retry identity, and caller behavior after a successful return with no effect.

5. Rehearse Recovery

Test the configured fail-open boundary, Registry-read failures, authorized bypasses, assertion changes, and manager recovery. Use the exact guard implementation: Safe and generic contract guards do not handle Registry failures identically. Test restrictive assertions while builders continue producing credible blocks. This scenario may never trigger a block-gap fallback. Verify that recovery remains authorized and executable, then test safe resubmission or reconciliation of excluded operations.

6. Review Production Readiness

Resolve findings from the tests above before production. Record coverage gaps, activation delays, and conditions that reduce enforcement. Complete the integration plan, including monitoring and recovery responsibilities.