Skip to content

Add reacquireLeash function - #4

Draft
axman6 wants to merge 2 commits into
add-leashing-10.23.0.0from
add-leashing-10.23.0.0-reacquireLeash
Draft

Add reacquireLeash function#4
axman6 wants to merge 2 commits into
add-leashing-10.23.0.0from
add-leashing-10.23.0.0-reacquireLeash

Conversation

@axman6

@axman6 axman6 commented Feb 27, 2026

Copy link
Copy Markdown

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 a MsgAcquire is sent with a LeashID, that automatically updates the leash point for that LeashID. MsgReacquire is 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.

@tweag-ev-ak
tweag-ev-ak force-pushed the add-leashing-10.23.0.0 branch 2 times, most recently from 9fc52b8 to a992d1f Compare March 12, 2026 07:12
@tweag-ev-ak
tweag-ev-ak force-pushed the add-leashing-10.23.0.0 branch from a992d1f to 19e8ce1 Compare March 20, 2026 11:17
@tweag-ev-ak
tweag-ev-ak force-pushed the add-leashing-10.23.0.0 branch from 19e8ce1 to d5270c9 Compare March 30, 2026 05:18
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