2.3 DAG Execution Model
Node Output Schema
Every DAG node produces output in this schema:
{
"text": "primary textual output (max 16 KB)",
"artifacts": {
"code": "optional code string (max 64 KB)",
"metadata": {}
}
}
DataRef Syntax
Nodes reference earlier outputs using DataRef patterns:
"${<step_id>.output.<field_path>}"
Examples:
"${step_1.output.text}"— text output from step_1"${step_2.output.artifacts.code}"— code artifact from step_2
Execution Contract
The validator executor follows these 5 steps:
- Topological sort — derive execution plan from
edges. Nodes with no shared dependency run concurrently in the same execution tier. - Store outputs — after each node completes, store result in
context[node_id]. - Resolve DataRefs — before executing node K, resolve
${...}patterns referencing completed upstream nodes. - Budget ceiling check — before dispatching each node:
budget_ceiling = min(constraints["max_budget_tao"],
1.5 * workflow_plan["total_estimated_cost"])
if cumulative_tao >= budget_ceiling:
for node in remaining_nodes:
context[node.id] = {"status": "budget_abort", "output": None}
break - Failure propagation — if a referenced field doesn't exist or the upstream node failed, current step is marked a hard failure.
Parallel DAG Rules
| Metric | Sequential DAG | Parallel DAG |
|---|---|---|
completion_ratio | steps_completed / total_nodes | steps_completed / total_nodes (same) |
S_latency | wall-clock end-to-end | wall-clock end-to-end (parallel compresses it) |
S_cost | sum of all step costs | sum of all step costs (both charged) |
| DataRef failure propagation | upstream fail → downstream fails | only if specific referenced node failed |
Example: A→C and B→C (A and B independent). A completes, B fails. C only needs ${A.output.text}. C proceeds; B's failure reduces completion_ratio by 1/3 but does not block C.
Miners must not implement their own DataRef resolvers. All resolution is performed by the validator executor.
Navigation
| ← Previous | 2.2 WorkflowSynapse Protocol |
| → Next | 3.1 Emission Structure |
| Index | Documentation Index |