Add reacquireLeash function - #4
Draft
axman6 wants to merge 2 commits into
Draft
Conversation
tweag-ev-ak
force-pushed
the
add-leashing-10.23.0.0
branch
2 times, most recently
from
March 12, 2026 07:12
9fc52b8 to
a992d1f
Compare
tweag-ev-ak
force-pushed
the
add-leashing-10.23.0.0
branch
from
March 20, 2026 11:17
a992d1f to
19e8ce1
Compare
tweag-ev-ak
force-pushed
the
add-leashing-10.23.0.0
branch
from
March 30, 2026 05:18
19e8ce1 to
d5270c9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
reacquireLeash, which just connects to the node, acquires the given point with the LeashID, and then returns. The function can fail if the target point can't be acquired.An obvious question would be "Why doesn't this use
MsgReacquire?"; when ever aMsgAcquireis sent with aLeashID, that automatically updates the leash point for thatLeashID.MsgReacquireis only needed when the protocol is used for long term connections.We should consider changing the way we interact with the cardano-node via the LocalStateQuery protocol to use a long running thread so we don't have the overhead of multiple messages each time we make a query or update the leash. Forking a thread dedicated to this and communicating with it via a channel should work for this (not sure if there'd be a clean way to do that with streamly, the way you interact with the protocol code is fairly verbose). I'll make a ticket for this.