Local Policy Simulation
Test Rego policy logic without the network using the Newton CLI:newton.crypto.ecdsa_recover_signer, newton.crypto.ecdsa_recover_signer_personal).
Local Oracle Simulation
Test your WASM data oracle without deploying:--input-json value is passed to your run function as the input string.
Gateway Simulation
Simulate a full policy evaluation via the Gateway RPC without any on-chain interaction:Simulate a Task
Tests the complete evaluation pipeline (data oracle + policy) for a specific PolicyClient:Simulate Policy Only
Test Rego policy evaluation with provided inputs (no oracle execution):Simulate PolicyData Only
Test a WASM oracle execution via the Gateway:- With inline secrets
- With stored secrets
Newton Explorer
The Newton Explorer provides a visual interface for inspecting tasks, attestations, and policy evaluations on-chain. Use it to:- View task status and results
- Inspect attestation details (signers, quorum, expiration)
- Trace the evaluation flow from intent to on-chain verification
BLS Diagnostics
If an attestation fails on-chain verification, check:| Check | How |
|---|---|
| Attestation expiration | Compare attestation.expiration against current block number |
| Signer bitmap | Verify the signer bitmap includes enough operators for quorum |
| Reference block | Ensure the reference block matches the operator set used for verification |
| Chain ID | Confirm the intent’s chainId matches the chain where the PolicyClient is deployed |
Debugging Patterns
| Symptom | Likely Cause | Diagnostic Step |
|---|---|---|
newt_simulateTask returns non-compliant | Policy logic rejects the intent | Run newt_simulatePolicy with the same inputs to isolate the Rego evaluation |
| Oracle returns empty data | WASM run function error or HTTP fetch failure | Test locally with newton-cli policy-data simulate |
| Attestation expires before on-chain submission | Too much time between evaluation and transaction | Reduce latency or increase the expiry_offset parameter |
| On-chain verification fails | Operator set rotated or wrong chain | Check reference block and chain ID |
TaskAlreadyExists error | Duplicate intent hash | Modify the intent nonce or wait for the existing task |
Policy returns CAP instead of ALLOW | Intent value exceeds policy threshold | Check data.params values on your PolicyClient |
SDK Debugging
Enable verbose logging in the Newton SDK:Next Steps
Deployment Checklist
Pre-launch verification checklist
Error Reference
Complete error code reference