Skip to content
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
9455218
feat(platform)!: required document fields via contract updates (requi…
QuantumExplorer Aug 13, 2026
fb5d97e
fix(platform): address requiredSince review findings
QuantumExplorer Aug 13, 2026
c57720d
test(drive-abci): update PV14 fee baselines for contract-version stamp
QuantumExplorer Aug 13, 2026
72278c6
test(dpp): cover document serialization format 3 across all property …
QuantumExplorer Aug 13, 2026
5c255b8
docs(dpp): clarify which property types are not schema-reachable in f…
QuantumExplorer Aug 13, 2026
9f5f792
Merge remote-tracking branch 'origin/v4.2-dev' into claude/contract-v…
QuantumExplorer Aug 25, 2026
b837928
fix(dpp): reattach stray fixture doc comment tripping clippy doc_lazy…
QuantumExplorer Aug 25, 2026
7429545
refactor(dpp): version the contract-level requiredSince update valida…
QuantumExplorer Aug 25, 2026
879d21b
test(drive): cover contract-version stamping in create/replace action…
QuantumExplorer Aug 25, 2026
3e1d8ec
fix(dpp): classify requiredSince contract-version invariant failures …
QuantumExplorer Aug 25, 2026
ccb60da
refactor(dpp): name the contract-version stamp size in estimated_size v1
QuantumExplorer Aug 26, 2026
9908e80
refactor(dpp): move apply_required_since into its own versioned module
QuantumExplorer Aug 26, 2026
fc852d6
refactor(dpp): extract shared validate_update generation logic into c…
QuantumExplorer Aug 26, 2026
c4bfc3f
style(dpp): import requiredSince helpers instead of spelling out crat…
QuantumExplorer Aug 26, 2026
fc47637
refactor(dpp): move validate_required_since_within_contract_version t…
QuantumExplorer Aug 26, 2026
dfd20d7
refactor(dpp): validate_update_v1 delegates to the frozen generation 0
QuantumExplorer Aug 26, 2026
9e76e50
refactor(dpp): name the unconditional-requiredness check always_required
QuantumExplorer Aug 26, 2026
f534bba
test(drive-abci): pin protocol v13 fees on every path the stamp re-ba…
QuantumExplorer Aug 26, 2026
3b42f7f
docs(drive-abci): name the version gate behind the v13 fee deltas
QuantumExplorer Aug 26, 2026
820d73e
test(dpp): cover requiredSince layouts across property types and anno…
QuantumExplorer Aug 26, 2026
a26cea6
test(drive-abci): end-to-end grandfathering flow for requiredSince
QuantumExplorer Aug 26, 2026
5bbdc5d
test(drive-abci): cover the v13-to-v14 upgrade boundary for requiredS…
QuantumExplorer Aug 26, 2026
499ce4c
test(drive-abci): strategy run with a mid-chain requiredSince contrac…
QuantumExplorer Aug 26, 2026
1500e5e
docs(book): document requiredSince, the contract version stamp, and f…
QuantumExplorer Aug 26, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://github.com/dashpay/platform/blob/master/packages/rs-dpp/schema/meta_schemas/document/v1/document-meta.json",
"$comment": "EDITABLE UNTIL THE RELEASE CARRYING PROTOCOL V14 SHIPS — FROZEN AFTER. This v3 document meta-schema activates with protocol v14 (CONTRACT_VERSIONS_V6). It is v2 plus the ranked index keywords (rankedCountable, rankedSummable, rankedAverageable) and the refersTo reference keyword on identifier properties, and admits every v14+ contract written to disk. v2 stays in place for protocol v13, where those keys still fail an index entry's `additionalProperties: false`. Once the release carrying protocol v14 ships, mutating it would change historical validation results and break consensus replay. After release, any new top-level property or rule MUST go in a newer meta-schema version (v4+). The $id above deliberately still names the v1 path: v1, v2 and v3 all share that identity, and it is the exact string `enrich_with_base_schema` injects as every PV12+ document schema's `$schema`, so bumping it here would be a wire-visible change rather than a documentation fix.",
"$comment": "EDITABLE UNTIL THE RELEASE CARRYING PROTOCOL V14 SHIPS — FROZEN AFTER. This v3 document meta-schema activates with protocol v14 (CONTRACT_VERSIONS_V6). It is v2 plus the ranked index keywords (rankedCountable, rankedSummable, rankedAverageable), the refersTo reference keyword on identifier properties, and the requiredSince property keyword (the contract version a property is required from), and admits every v14+ contract written to disk. v2 stays in place for protocol v13, where those keys still fail an index entry's `additionalProperties: false`. Once the release carrying protocol v14 ships, mutating it would change historical validation results and break consensus replay. After release, any new top-level property or rule MUST go in a newer meta-schema version (v4+). The $id above deliberately still names the v1 path: v1, v2 and v3 all share that identity, and it is the exact string `enrich_with_base_schema` injects as every PV12+ document schema's `$schema`, so bumping it here would be a wire-visible change rather than a documentation fix.",
"type": "object",
"$defs": {
"documentProperties": {
Expand Down Expand Up @@ -224,6 +224,11 @@
"position": {
"type": "integer",
"minimum": 0
},
"requiredSince": {
"type": "integer",
"minimum": 1,
"maximum": 4294967295
}
},
"dependentSchemas": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use crate::consensus::basic::data_contract::DataContractInvalidRequiredFieldsUpdateError;
#[cfg(feature = "validation")]
use crate::consensus::basic::BasicError;
#[cfg(feature = "validation")]
Expand Down Expand Up @@ -26,6 +27,27 @@ pub(crate) fn consensus_or_protocol_data_contract_error(
}
}

#[inline]
pub(crate) fn consensus_or_protocol_required_fields_error(
error: DataContractInvalidRequiredFieldsUpdateError,
) -> ProtocolError {
#[cfg(feature = "validation")]
{
ProtocolError::ConsensusError(
ConsensusError::BasicError(BasicError::DataContractInvalidRequiredFieldsUpdateError(
error,
))
.into(),
)
}
#[cfg(not(feature = "validation"))]
{
ProtocolError::DataContractError(DataContractError::InvalidContractStructure(
error.to_string(),
))
}
}

#[inline]
pub(crate) fn consensus_or_protocol_value_error(
platform_value_error: platform_value::Error,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -745,6 +745,7 @@ fn parse_document_properties(
&mut document_properties,
&required_fields,
&transient_fields,
true,
property_key,
property_value,
root_schema,
Expand Down
Loading
Loading