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

Open
AArnott opened this issue Dec 10, 2024 · 0 comments
Open

UFVK rev. 1 support #1644

AArnott opened this issue Dec 10, 2024 · 0 comments

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?

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

1 participant