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

Implement full DHT census #109

Closed

Conversation

pipermerriam
Copy link
Member

@pipermerriam pipermerriam commented Apr 19, 2023

What is wrong

We need glados-cartographer to perform full census walking of the network.

How was it fixed.

The glados-cartographer process now performs a full census of the network every 15 minutes. We still aren't saving them to the database (for example we should be recording the data_radius)... but this is a start.

@pipermerriam pipermerriam force-pushed the piper/implement-census branch 3 times, most recently from 7854021 to 0bcf768 Compare April 24, 2023 17:30
@pipermerriam pipermerriam marked this pull request as ready for review April 24, 2023 17:30
@pipermerriam pipermerriam force-pushed the piper/implement-census branch 2 times, most recently from 6835980 to a5717b9 Compare April 26, 2023 20:46
@pipermerriam
Copy link
Member Author

This implements the basic functionality, blocked by having a basic system for recording client version string info, and then having a db model for saving census info.

@pipermerriam
Copy link
Member Author

I've got an issue that I'm really not sure how to correctly fix.

error[E0597]: `limiter` does not live long enough
   --> glados-cartographer/src/lib.rs:289:22
    |
289 |         let permit = limiter.acquire().await.expect("Error acquiring lock");
    |                      ^^^^^^^^^^^^^^^^^ borrowed value does not live long enough
290 |         tokio::spawn(do_liveliness_check(enr, tx.clone(), census.clone(), config.clone(), conn.clone(), permit));
    |                      ------------------------------------------------------------------------------------------ argument requires that `limiter` is borrowed for `'static`
291 |     }
292 | }
    | - `limiter` dropped here while still borrowed

error[E0597]: `limiter` does not live long enough
   --> glados-cartographer/src/lib.rs:349:22
    |
349 |         let permit = limiter.acquire().await.expect("Error acquiring lock");
    |                      ^^^^^^^^^^^^^^^^^ borrowed value does not live long enough
350 |         tokio::spawn(do_routing_table_enumeration(enr, tx.clone(), census.clone(), config.clone(), permit));
    |                      ------------------------------------------------------------------------------------- argument requires that `limiter` is borrowed for `'static`
351 |     }
352 | }
    | - `limiter` dropped here while still borrowed

For more information about this error, try `rustc --explain E0597`.

I understand the error, but I don't understand how to fix it. It seems I need to maybe do something with the lifetime of the limiter object, but that's about as far as I've been able to figure out.

@perama-v
Copy link
Contributor

Could you push the changes where this error is occurring?

@pipermerriam
Copy link
Member Author

I ended up fixing it this morning. Bad commit hygene on my side and don't really have any easy way to expose the history correctly without dumb git futzing....

@pipermerriam
Copy link
Member Author

replaced by #117

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

Successfully merging this pull request may close these issues.

2 participants