Skip to content

fix: stop lowercasing CodeHash::encode Base58 output#77

Merged
iduartgomez merged 1 commit into
mainfrom
claude/github-issue-4214-PkQWx
May 23, 2026
Merged

fix: stop lowercasing CodeHash::encode Base58 output#77
iduartgomez merged 1 commit into
mainfrom
claude/github-issue-4214-PkQWx

Conversation

@iduartgomez
Copy link
Copy Markdown
Contributor

The BITCOIN Base58 alphabet is case-sensitive, so lowercasing the
encoded output corrupted any hash containing uppercase characters and
broke the encode -> ContractKey::from_params roundtrip, which decodes
with the same case-sensitive alphabet. This aligns CodeHash::encode
with ContractInstanceId::encode, ContractKey::encoded_code_hash, and
ContractCode::hash_str, which already preserve case.

Fixes freenet/freenet-core#4214

https://claude.ai/code/session_01ViYSqfF3NwQBiaVkzkWET6

The BITCOIN Base58 alphabet is case-sensitive, so lowercasing the
encoded output corrupted any hash containing uppercase characters and
broke the encode -> ContractKey::from_params roundtrip, which decodes
with the same case-sensitive alphabet. This aligns CodeHash::encode
with ContractInstanceId::encode, ContractKey::encoded_code_hash, and
ContractCode::hash_str, which already preserve case.

Fixes freenet/freenet-core#4214

https://claude.ai/code/session_01ViYSqfF3NwQBiaVkzkWET6
@iduartgomez iduartgomez merged commit ea31094 into main May 23, 2026
9 checks passed
@iduartgomez iduartgomez deleted the claude/github-issue-4214-PkQWx branch May 23, 2026 08:49
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.

CodeHash::encode lowercases bs58 output — breaks ContractKey::from_params roundtrip

2 participants