Skip to content

Conversation

gmega
Copy link
Contributor

@gmega gmega commented Apr 18, 2025

Not a real PR, just to keep the thing visible if someone's interested.

except CancelledError:
trace "Advertisement loop cancelled. Exiting."

proc loadBlockKnowledge*(self: Swarm): Future[void] {.async: (raises: []).} =
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure this is needed, why duplicate this if it is already in the blockstore? If you're worried about hitting the repostore too oftne, then we can always put a cache of some sort in front?

trace "Error updating pending block knowledge request state (peer dropped)",
peer = peer

proc handleBlockRequest(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know this is an experiment, but we should be lazy with handling requests, so I would still put this behind some throttling mechanism, such as the asyncqueue.

Copy link
Contributor

@dryajov dryajov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, I'm liking this direction very much. I think this might be close to being ussable. One thing we need to keep in mind, is that we still want the ability to stream requests, as this is a really imoprtant use case. I don't think anything specifically prevents it in this implementation, but just making sure it's know :)

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.

3 participants