feat(contracts): add MxSparseArray write-only value for default-fill partial writes

This commit is contained in:
Joseph Doherty
2026-06-18 02:48:18 -04:00
parent dd35ae1fe6
commit 8ac9a33d91
2 changed files with 740 additions and 148 deletions
File diff suppressed because it is too large Load Diff
@@ -1040,6 +1040,7 @@ message MxValue {
google.protobuf.Timestamp timestamp_value = 16;
MxArray array_value = 17;
bytes raw_value = 18;
MxSparseArray sparse_array_value = 19;
}
}
@@ -1062,6 +1063,21 @@ message MxArray {
}
}
// Write-only sparse array value. The gateway expands this into a full,
// default-filled MxArray before forwarding to the worker; the worker never
// receives or produces it. Unmentioned indices take the element type's
// default (reset, NOT preserved).
message MxSparseArray {
MxDataType element_data_type = 1;
uint32 total_length = 2;
repeated MxSparseElement elements = 3;
}
message MxSparseElement {
uint32 index = 1;
MxValue value = 2; // scalar
}
message BoolArray {
repeated bool values = 1;
}