[PR #7016] [CLOSED] Port map: the HashOps hash functions are in horizon-protocol #7272

Closed
opened 2026-11-03 06:36:52 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/7016
Author: @MSedgeMC
Created: 11/2/2026
Status: ❌ Closed

Base: main ← Head: chore/port-map-rest-022


📝 Commits (1)

  • ab3fad0 Port map: the HashOps hash functions are in horizon-protocol

📊 Changes

1 file changed (+8 additions, -8 deletions)

View changed files

📝 tools/port_map/rest-022.tsv (+8 -8)

📄 Description

Eight rows in this file said the HashOps hash functions were missing because "no component hashing" exists, but crates/horizon-protocol/src/hash_ops.rs implements the whole HashOps surface over Guava's CRC32C: create_string (and create_string_units for the UTF-16 form the component codecs use), create_map with entries sorted by key hash then value hash, create_list, create_byte_list, create_int_list and create_long_list, plus from_nbt which hashes a number by its own type the way createNumeric dispatches. The component codecs that build on them are under crates/horizon-protocol/src/item/hash/.

  • HashOps.createString, createMap, createList, createByteList, createIntList, createLongList now say port with the function named.
  • HashOps.createNumeric and HashOps.hashMap say inline: a number takes one of the typed create_* functions chosen by tag type, and a string-keyed map hashes its keys with create_string_units before create_map.

mergeToList, mergeToMap and the two builders stay skip:java; nothing builds hashed data incrementally.

Proven: each named function was read in the tree (impl HashOps in hash_ops.rs holds all eight) - that is the existence half of map-check.
Not proven: python3 tools/port_ledger.py map-check tools/port_map/rest-022.tsv has not been run: the build VM that holds the last build index is cooling down and comes back at 2026-11-02T10:55:20Z. It will be run and its result reported as a comment; no behaviour changed, so nothing was run in the game.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/7016 **Author:** [@MSedgeMC](https://github.com/MSedgeMC) **Created:** 11/2/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `chore/port-map-rest-022` --- ### 📝 Commits (1) - [`ab3fad0`](https://github.com/horizon-rust/horizon/commit/ab3fad0298eed3df6b626014a515cd68520b8197) Port map: the HashOps hash functions are in horizon-protocol ### 📊 Changes **1 file changed** (+8 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `tools/port_map/rest-022.tsv` (+8 -8) </details> ### 📄 Description Eight rows in this file said the `HashOps` hash functions were missing because "no component hashing" exists, but `crates/horizon-protocol/src/hash_ops.rs` implements the whole `HashOps` surface over Guava's CRC32C: `create_string` (and `create_string_units` for the UTF-16 form the component codecs use), `create_map` with entries sorted by key hash then value hash, `create_list`, `create_byte_list`, `create_int_list` and `create_long_list`, plus `from_nbt` which hashes a number by its own type the way `createNumeric` dispatches. The component codecs that build on them are under `crates/horizon-protocol/src/item/hash/`. - `HashOps.createString`, `createMap`, `createList`, `createByteList`, `createIntList`, `createLongList` now say `port` with the function named. - `HashOps.createNumeric` and `HashOps.hashMap` say `inline`: a number takes one of the typed `create_*` functions chosen by tag type, and a string-keyed map hashes its keys with `create_string_units` before `create_map`. `mergeToList`, `mergeToMap` and the two builders stay `skip:java`; nothing builds hashed data incrementally. **Proven:** each named function was read in the tree (`impl HashOps` in `hash_ops.rs` holds all eight) - that is the existence half of `map-check`. **Not proven:** `python3 tools/port_ledger.py map-check tools/port_map/rest-022.tsv` has not been run: the build VM that holds the last build index is cooling down and comes back at 2026-11-02T10:55:20Z. It will be run and its result reported as a comment; no behaviour changed, so nothing was run in the game. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 06:36:52 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#7272
No description provided.