Closed SupernaviX closed 1 month ago
we'll update the minicbor
lib but since it's an integral part of Pallas, I want to make sure we can run end-to-end tests that make sure we can decode the whole history of Cardano mainnet / preview / preprod / sanchonet.
In the meantime, unless you have specific requirements, my recommendation is to rely on pallas_codec::minicbor
. This is a re-export of the lib that you can use throughout your code while making sure it's compatible with Pallas.
You could do the following to avoid those weird errors you're getting:
fn parse(tx_bytes: &[u8]) -> Result<Tx> {
let tx: Tx = pallas_codec::minicbor::decode(&tx_bytes).context("Invalid transaction")?;
Ok(tx)
}
actually, I see that we're already at 0.20
. Closing the issue but JFYI, we'll probably be moving to 0.24
in the short term.
👋
The pallas projects use minicbor version 0.20.0. If you make a new project with the latest pallas and minicbor libs, and try decoding a transaction,
You get strange errors about the
Decode
impl not being found, and it takes some debugging to realize that they're due to a version mismatch. This minicbor version is a year old, would it be possible to upgrade to the latest?