Skip to content

Commit

Permalink
docs: update data size info
Browse files Browse the repository at this point in the history
  • Loading branch information
thephez committed Jan 13, 2025
1 parent 384f75b commit 08c6a00
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions docs/protocol-ref/data-contract.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,17 @@ There are a variety of constraints currently defined for performance and securit

#### Data Size

**Note:** These constraints are defined in the Dash Platform Protocol logic (not in JSON Schema).

All serialized data (including state transitions) is limited to a maximum size of [16 KB](https://github.com/dashpay/platform/blob/v0.24.5/packages/rs-dpp/src/util/serializer.rs#L8).
| Parameter | Size |
| - | - |
| Maximum serialized data contract size | [16384 byes (16 KB)](https://github.com/dashpay/platform/blob/v1.7.1/packages/rs-platform-version/src/version/system_limits/v1.rs#L4) |
| Maximum field value size | [5120 bytes (5 KB)](https://github.com/dashpay/platform/blob/v1.7.1/packages/rs-platform-version/src/version/system_limits/v1.rs#L5) |
| Maximum state transition size | [20480 bytes (20 KB)](https://github.com/dashpay/platform/blob/v1.7.1/packages/rs-platform-version/src/version/system_limits/v1.rs#L6) |

A document cannot exceed the maximum state transition size in any case. For example, although it is
possible to define a data contract with 10 fields that each support the maximum field size (5120),
it is not possible to create a document where all 10 fields contain the full 5120 bytes. This is
because the overall document and state transition containing it would be too large (5120 * 10 =
51200 bytes).

#### Additional Properties

Expand Down

0 comments on commit 08c6a00

Please sign in to comment.