# SIZE_CONSTANTS

> `const` **SIZE\_CONSTANTS**: `object`

Defined in: [packages/synapse-core/src/utils/constants.ts:45](https://github.com/FilOzone/synapse-sdk/blob/b35b371ef603fd76d17b0f4e9e740bcdd9b7fbc3/packages/synapse-core/src/utils/constants.ts#L45)

Data size constants

## Type Declaration

### BYTES\_PER\_LEAF

> `readonly` **BYTES\_PER\_LEAF**: `32n` = `32n`

Bytes per leaf in the PDP merkle tree.
The FWSS contract converts leaf counts to bytes via `totalBytes = leafCount * BYTES_PER_LEAF`.

### DEFAULT\_UPLOAD\_BATCH\_SIZE

> `readonly` **DEFAULT\_UPLOAD\_BATCH\_SIZE**: `32` = `32`

Default number of uploads to batch together in a single addPieces transaction
This balances gas efficiency with reasonable transaction sizes

### GiB

> `readonly` **GiB**: `bigint`

Bytes in 1 GiB

### KiB

> `readonly` **KiB**: `1024n` = `1024n`

Bytes in 1 KiB

### MAX\_ADD\_PIECES\_BATCH\_SIZE

> `readonly` **MAX\_ADD\_PIECES\_BATCH\_SIZE**: `40` = `40`

Maximum pieces per addPieces (or createDataSetAndAddPieces) call.

On-chain limitations fail batch sizes above 41; we constrain to 40 here to
catch those failures early and surface informative errors.

### MAX\_DELETE\_PIECES\_BATCH\_SIZE

> `readonly` **MAX\_DELETE\_PIECES\_BATCH\_SIZE**: `500` = `500`

Maximum pieces per schedulePieceDeletions call accepted by the Curio PDP API.

PDPVerifier also limits a data set to 2,000 cumulative queued removals until
its next proving period, so a valid batch can still fail when that queue is full.

### MAX\_UPLOAD\_SIZE

> `readonly` **MAX\_UPLOAD\_SIZE**: `1065353216` = `1_065_353_216`

Maximum upload size currently supported by PDP servers.

1 GiB adjusted for fr32 expansion: 1 GiB * (127/128) = 1,065,353,216 bytes

Fr32 encoding adds 2 bits of padding per 254 bits of data, resulting in 128 bytes
of padded data for every 127 bytes of raw data.

Note: While it's technically possible to upload pieces this large as Uint8Array,
streaming via AsyncIterable is strongly recommended for non-trivial sizes.
See SIZE_CONSTANTS.MAX_UPLOAD_SIZE in synapse-sdk for detailed guidance.

### MiB

> `readonly` **MiB**: `bigint`

Bytes in 1 MiB

### MIN\_UPLOAD\_SIZE

> `readonly` **MIN\_UPLOAD\_SIZE**: `127` = `127`

Minimum upload size; matches what storage providers currently accept.

### PiB

> `readonly` **PiB**: `bigint`

Bytes in 1 PiB

### TiB

> `readonly` **TiB**: `bigint`

Bytes in 1 TiB