Skip to content

fix(crypto): implement IHash64bit for Hash256AsKey#11091

Merged
LukaszRozmej merged 1 commit into
NethermindEth:masterfrom
JayeTurn:fix-hash256askey-ihash64bit
Apr 11, 2026
Merged

fix(crypto): implement IHash64bit for Hash256AsKey#11091
LukaszRozmej merged 1 commit into
NethermindEth:masterfrom
JayeTurn:fix-hash256askey-ihash64bit

Conversation

@JayeTurn
Copy link
Copy Markdown
Contributor

Changes

  • Implement IHash64bit<Hash256AsKey> for Hash256AsKey
  • Add Hash256.GetHashCode64() backed by FastHash64For32Bytes
  • Add a regression test covering SeqlockCache<Hash256AsKey, byte[]>

Types of changes

What types of changes does your code introduce?

  • Bugfix (a non-breaking change that fixes an issue)
  • New feature (a non-breaking change that adds functionality)
  • Breaking change (a change that causes existing functionality not to work as expected)
  • Optimization
  • Refactoring
  • Documentation update
  • Build-related changes
  • Other: Description

Testing

Requires testing

  • Yes
  • No

If yes, did you write tests?

  • Yes
  • No

Notes on testing

  • dotnet restore src/Nethermind/Nethermind.Core.Test/Nethermind.Core.Test.csproj --configfile /tmp/nethermind-nuget.config --verbosity minimal
  • dotnet test --project src/Nethermind/Nethermind.Core.Test/Nethermind.Core.Test.csproj -c release --no-restore -- --filter FullyQualifiedName~Hash256AsKey_works_with_cache

Documentation

Requires documentation update

  • Yes
  • No

Requires explanation in Release Notes

  • Yes
  • No

Remarks

  • Aligns Hash256AsKey with the existing IHash64bit pattern already used by AddressAsKey for SeqlockCache.

@LukaszRozmej LukaszRozmej requested a review from benaadams April 10, 2026 11:03
@LukaszRozmej LukaszRozmej merged commit d33d5dc into NethermindEth:master Apr 11, 2026
432 of 434 checks passed
@JayeTurn JayeTurn deleted the fix-hash256askey-ihash64bit branch April 12, 2026 08:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants