Skip to content

fix!: store headers in BTreeMap instead of HashMap - #4392

Merged
ilbertt merged 4 commits into
masterfrom
luca/btreemap-headers
Sep 26, 2025
Merged

fix!: store headers in BTreeMap instead of HashMap#4392
ilbertt merged 4 commits into
masterfrom
luca/btreemap-headers

Conversation

@ilbertt

@ilbertt ilbertt commented Sep 26, 2025

Copy link
Copy Markdown
Contributor

Description

BREAKING: Use BTreeMap instead of HashMap for headers to guarantee deterministic ordering.

How Has This Been Tested?

Same tests should still pass.

Checklist:

  • The title of this PR complies with Conventional Commits.
  • I have edited the CHANGELOG accordingly.
  • I have made corresponding changes to the documentation.

@ilbertt
ilbertt requested a review from a team as a code owner September 26, 2025 08:28

@viviveevee viviveevee left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

HashMap and BTreeMap seralize to the same thing with Candid, so this will not break the stable state deserialization

@ilbertt

ilbertt commented Sep 26, 2025

Copy link
Copy Markdown
Contributor Author

HashMap and BTreeMap seralize to the same thing with Candid, so this will not break the stable state deserialization

I've added a couple of tests to check this

@ilbertt
ilbertt merged commit 4d96d1d into master Sep 26, 2025
216 of 225 checks passed
@ilbertt
ilbertt deleted the luca/btreemap-headers branch September 26, 2025 09:27
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