Skip to content

revocation: support for V1 index format#200

Open
cpu wants to merge 1 commit into
rustls:mainfrom
cpu:ci/upkiidx1
Open

revocation: support for V1 index format#200
cpu wants to merge 1 commit into
rustls:mainfrom
cpu:ci/upkiidx1

Conversation

@cpu

@cpu cpu commented Jul 17, 2026

Copy link
Copy Markdown
Member

The "upkiidx1" magic bytes identify a new V1 index.bin format that is almost identical to the existing "upkiidx0" (V0) format with two main exceptions:

  1. The header num_filenames count is now a u16 instead of u8
  2. The per-entry filter_index is now a u16 instead of a u8

These changes are necessary in order to facilitate having more than 255 filter files in the revocation cache. We believe the combination of the webpki decreasing certificate maximum validity periods, and a potential increase in the frequency of filter file production could require more headroom than a maximum of 255 would allow. See the spec discussion thread for more details.

To accommodate these changes, when writing a new index.bin upki will always write the V1 format & data-types. When reading an existing index.bin, both formats are supported and use the correct data type based on the header magic bytes. In the future this can be simplified to only support V1 on the read-path once all extant data is updated to the new format.

The "upkiidx1" magic bytes identify a new V1 index.bin format that is
almost identical to the existing "upkiidx0" (V0) format with two
main exceptions:

1. The header `num_filenames` count is now a u16 instead of u8
2. The per-entry `filter_index` is now a u16 instead of a u8

These changes are necessary in order to facilitate having more than 255
filter files in the revocation cache. We believe the combination of
the webpki decreasing certificate maximum validity periods, and
a potential increase in the frequency of filter file production could
require more headroom than a maximum of 255 would allow.

To accommodate these changes when writing a new index.bin upki will
always write the V1 format & data-types. When _reading_ an existing
index.bin, both formats are supported and use the correct data type
based on the header magic bytes. In the future this can be simplified to
only support V1 on the read-path once all extent data is updated to the
new format.
@codspeed-hq

codspeed-hq Bot commented Jul 17, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 4 untouched benchmarks


Comparing cpu:ci/upkiidx1 (7d4e416) with main (3d2546f)

Open in CodSpeed

@ctz ctz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants