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

query_has_tx fails with Err(Plexer(AgentDequeue)) #444

Open
jonathangenlambda opened this issue Apr 18, 2024 · 3 comments
Open

query_has_tx fails with Err(Plexer(AgentDequeue)) #444

jonathangenlambda opened this issue Apr 18, 2024 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@jonathangenlambda
Copy link

I have added the txmonitor::client to network facades, (see https://github.com/txpipe/pallas/pull/442/files) and am trying to use the mempool querying functionality now.
query_size_and_capacity works repeatedly (when doing it in a loop, for example each block) perfectly fine, but query_has_tx fails with Err(Plexer(AgentDequeue)).

Here is my testcode:

async fn check_pending_tx_mempool(node_client: &mut NodeClient) {
    let monitor_client = node_client.monitor();

    let aquire_result = monitor_client.acquire().await;
    info!("aquire_result {:?}", aquire_result);
    
    let sac_result = monitor_client.query_size_and_capacity().await;
    info!("sac_result {:?}", sac_result);
    
    // this returns Err(Plexer(AgentDequeue)) 
    let has_tx_result = monitor_client.query_has_tx("fc43da88c808bbd84c394cf43d81679a4c319c21f64f9f6d9bbab57dc8bc5ff3".to_string()).await;
    info!("has_tx_result {:?}", has_tx_result);
}
@jonathangenlambda
Copy link
Author

Also it seems that query_next_tx blocks forever if there is no TX in the mempool - not sure if this is the intended behaviour.

@jonathangenlambda
Copy link
Author

Using a tokio timeout also doesnt work with query_next_tx as it renders the client in an invalid state ending up all subsequent requests in Err(AgencyIsTheirs):

let query_next_tx_result = monitor_client.query_next_tx();
if let Err(_) = tokio::time::timeout(Duration::from_millis(10), query_next_tx_result).await {
    info!("query_next_tx_result didnt return");
}

@scarmuega scarmuega self-assigned this May 14, 2024
@scarmuega scarmuega added the bug Something isn't working label May 14, 2024
@scarmuega
Copy link
Member

@jonathangenlambda thanks for reporting. I'll try to reproduce and then get back to you.

@scarmuega scarmuega moved this to 🆕 New in Development Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: 📋 Backlog
Development

No branches or pull requests

2 participants