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

[BUG] queries_v16::get_utxo_by_address fails on certain mainnet addresses #423

Open
Mercurial opened this issue Mar 13, 2024 · 1 comment
Labels
needs more info We need more information to triage the issue

Comments

@Mercurial
Copy link
Contributor

Mercurial commented Mar 13, 2024

This get_utxo_by_address query seems to fail with certain addresses on mainnet (failing decode cbor(?))

let addrx = "addr1w9sm8qpvuayw687645kkcaztr8csg2zl05cczu496ncx5nssarfwf".to_string();
    let addrx: Address = Address::from_bech32(&addrx).unwrap();
    let addrx: Addr = addrx.to_vec().into();

    let addrs: Addrs = vec![addrx];
    let result = queries_v16::get_utxo_by_address(client, era, addrs)
        .await
        .unwrap();
    info!("result: {:?}", result);

Error:

thread 'main' panicked at examples/n2c-miniprotocols/src/main.rs:54:10:
called `Result::unwrap()` on an `Err` value: InvalidCbor(Error { err: TypeMismatch(Bytes), pos: Some(362), msg: "expected tag" })
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Where as this works:

    let addrx = "addr1qxdr0dw7wlvdehmkx55w79hyp7vtnn5vyfp78nw2pyehq6xdl9me74py0xdc60uh5nrgfu5rch4fjtmu7hxeu2xce0ksnycw5g".to_string();
    let addrx: Address = Address::from_bech32(&addrx).unwrap();
    let addrx: Addr = addrx.to_vec().into();

Querying the same address but in CBOR-in-CBOR seems to work perfect

let addrz = "addr1w9sm8qpvuayw687645kkcaztr8csg2zl05cczu496ncx5nssarfwf".to_string();
    let addrz: Address = Address::from_bech32(&addrz).unwrap();
    let addrz: Addr = addrz.to_vec().into();
    let query = queries_v16::BlockQuery::GetUTxOByAddress(vec![addrz]);
    let result = queries_v16::get_cbor(client, era, query).await.unwrap();

Although I have not tested decoding the cbor after this query, so it could end up with the same issue.

@Mercurial Mercurial changed the title [BUG] queries_v16::get_utxo_by_address fails on certain addresses [BUG] queries_v16::get_utxo_by_address fails on certain mainnet addresses Mar 13, 2024
@scarmuega scarmuega moved this to 🆕 New in Development Sep 23, 2024
@scarmuega
Copy link
Member

@Mercurial could you confirm if this is still the case with latest Pallas?

@scarmuega scarmuega added the needs more info We need more information to triage the issue label Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs more info We need more information to triage the issue
Projects
Status: 📋 Backlog
Development

No branches or pull requests

2 participants