Skip to content

Commit

Permalink
Change default terse list count from 2^15 to 2^6.
Browse files Browse the repository at this point in the history
- Also increase max list size to 2^26.
  • Loading branch information
dlongley committed Feb 27, 2025
1 parent fee373d commit 0f23514
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 5 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# bedrock-vc-issuer ChangeLog

## 29.0.0 - 2025-mm-dd

### Changed
- **BREAKING**: Update default terse list count to match spec; it is now
64 (2^6) instead of 32768 (2^15). See the `TerseBitstringStatusList` spec
for more details on the list count choice. Existing deployments that do not
use `TerseBitstringStatusList` can be safely updated to this version.
Existing deployments that do use it but where an upgrade is desirable, should
stop using existing instances that use `TerseBitstringStatusList`, upgrade
and then create new instances that use `TerseBitstringStatusList` to reenable
existing use. Other upgrade paths and behavior are undefined.
- Increase `MAX_LIST_SIZE` to accommodate lists of up to size `2^26`, which is
how large terse bitstring status lists are by default.

## 28.4.0 - 2024-12-17

### Added
Expand Down
16 changes: 11 additions & 5 deletions lib/constants.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,24 @@
/*!
* Copyright (c) 2024 Digital Bazaar, Inc. All rights reserved.
* Copyright (c) 2024-2025 Digital Bazaar, Inc. All rights reserved.
*/
export const DEFAULT_BLOCK_COUNT = 4096;
export const DEFAULT_BLOCK_SIZE = 32;

// default `TerseBitstringStatusList` list count is 32-bit integer size
// divided by default list size = 2^32/2^17 = 2^15 = 32768
export const DEFAULT_TERSE_LIST_COUNT = 32768;
// divided by default list size = 2^32/2^26 = 2^6 = 64; each list
export const DEFAULT_TERSE_LIST_COUNT = 64;

// maximum number of cryptosuites to be used in a proof set
export const MAX_CRYPTOSUITE_OPTIONS = 10;

// max list size is DEFAULT_BLOCK_COUNT * DEFAULT_BLOCK_SIZE = 131072
export const MAX_LIST_SIZE = DEFAULT_BLOCK_COUNT * DEFAULT_BLOCK_SIZE;
// default list size is DEFAULT_BLOCK_COUNT * DEFAULT_BLOCK_SIZE = 131072
export const DEFAULT_LIST_SIZE = DEFAULT_BLOCK_COUNT * DEFAULT_BLOCK_SIZE;

// max list size is 2^26, which is the largest size a totally random,
// unencrypted list can be (8MiB) without breaking the max 10MiB storage
// barrier for a single VC -- leaving 2MiB of space for other information
// beyond the list in a status list credential
export const MAX_LIST_SIZE = 67108864;

// maximum number of lists this software can keep track of (applies only to
// status list configurations where the number of lists is limited)
Expand Down

0 comments on commit 0f23514

Please sign in to comment.