Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UFVK rev. 1 support #1644

Closed
AArnott opened this issue Dec 10, 2024 · 1 comment
Closed

UFVK rev. 1 support #1644

AArnott opened this issue Dec 10, 2024 · 1 comment

Comments

@AArnott
Copy link
Contributor

AArnott commented Dec 10, 2024

Per ZIP-316 rev. 1, urview is a valid HRP for UFVKs.

But librustzcash rejects such UFVKs from UnifiedFullViewingKey::decode with:

Invalid UFVK: Unrecognized Bech32m human-readable prefix: urview

The code that identifies the allowed HRPs is here:

impl SealedContainer for Ufvk {
/// The HRP for a Bech32m-encoded mainnet Unified FVK.
///
/// Defined in [ZIP 316][zip-0316].
///
/// [zip-0316]: https://zips.z.cash/zip-0316
const MAINNET: &'static str = "uview";
/// The HRP for a Bech32m-encoded testnet Unified FVK.
///
/// Defined in [ZIP 316][zip-0316].
///
/// [zip-0316]: https://zips.z.cash/zip-0316
const TESTNET: &'static str = "uviewtest";
/// The HRP for a Bech32m-encoded regtest Unified FVK.
const REGTEST: &'static str = "uviewregtest";
fn from_inner(fvks: Vec<Self::Item>) -> Self {
Self(fvks)
}
}

Callstack:

>	nerdbank_zcash_rust.dll!zcash_address::kind::unified::private::SealedContainer::hrp_network<zcash_address::kind::unified::fvk::Ufvk>(ref$<str$>) Line 210	Rust
 	nerdbank_zcash_rust.dll!zcash_address::kind::unified::Encoding::decode<zcash_address::kind::unified::fvk::Ufvk>(ref$<str$>) Line 386	Rust
 	nerdbank_zcash_rust.dll!zcash_keys::keys::UnifiedFullViewingKey::decode<zcash_protocol::consensus::Network>(ref$<str$> params) Line 733	Rust

Shouldn't ZIP-316 rev. 1 be supported by librustzcash by now?

@str4d
Copy link
Contributor

str4d commented Jan 9, 2025

Duplicate of #1153, which is implemented in #1135 (and has just been blocking on sufficient time and resources to get it in without conflicts).

@str4d str4d closed this as completed Jan 9, 2025
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

No branches or pull requests

2 participants