-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix terse bitstring status list config bugs.
- Loading branch information
Showing
7 changed files
with
57 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,10 @@ | ||
# bedrock-vc-issuer ChangeLog | ||
|
||
## 29.0.1 - 2025-02-dd | ||
|
||
### Fixed | ||
- Ensure `MAX_BLOCK_SIZE` accommodates `MAX_LIST_SIZE`. | ||
|
||
## 29.0.0 - 2025-02-27 | ||
|
||
### Changed | ||
|
@@ -10,7 +15,10 @@ | |
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. | ||
existing use. Other upgrade paths and behavior are undefined. Note that | ||
the associated status instance must support larger list sizes as well, for | ||
example, install `@bedrock/[email protected]` or later (if using bedrock) on | ||
the status service. | ||
- Increase `MAX_LIST_SIZE` to accommodate lists of up to size `2^26`, which is | ||
how large terse bitstring status lists are by default. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,40 @@ | ||
/*! | ||
* 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^26 = 2^6 = 64; each list will | ||
// be 2^26 in size = 67108864 | ||
export const DEFAULT_TERSE_LIST_COUNT = 64; | ||
|
||
// maximum number of cryptosuites to be used in a proof set | ||
export const MAX_CRYPTOSUITE_OPTIONS = 10; | ||
|
||
// 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 | ||
// 2^26/2^3/2^10/2^10=2^3 = 8 | ||
// 67108864 bits / 8 / 1024 / 1024 = 8MiB | ||
export const MAX_LIST_SIZE = 67108864; | ||
// 2^5 = 32; max block size should be small to increase concurrency | ||
export const MAX_BLOCK_SIZE = 32; | ||
// max block count is MAX_LIST_SIZE / MAX_BLOCK_SIZE | ||
// 2^21 = 2^26/2^5 = 2097152 | ||
export const MAX_BLOCK_COUNT = 2097152; | ||
|
||
// maximum number of lists this software can keep track of (applies only to | ||
// status list configurations where the number of lists is limited) | ||
export const MAX_LIST_COUNT = Number.MAX_SAFE_INTEGER; | ||
|
||
export const MAX_STATUS_LIST_OPTIONS = 1; | ||
|
||
// default `TerseBitstringStatusList` list count is 32-bit integer size | ||
// divided by default list size = 2^32/2^26 = 2^6 = 64; each list will | ||
// be 2^26 in size = 67108864 | ||
export const DEFAULT_TERSE_LIST_COUNT = 64; | ||
|
||
// default is only 4096 for smaller use cases of ~100K populations | ||
// where 4096 * 32 = 131072 | ||
export const DEFAULT_BLOCK_COUNT = 4096; | ||
export const DEFAULT_BLOCK_SIZE = MAX_BLOCK_SIZE; | ||
|
||
// default list size is DEFAULT_BLOCK_COUNT * DEFAULT_BLOCK_SIZE | ||
// = 2^17 = 131072 | ||
export const DEFAULT_LIST_SIZE = DEFAULT_BLOCK_COUNT * DEFAULT_BLOCK_SIZE; | ||
|
||
export const serviceType = 'vc-issuer'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters