Skip to content

Add leashing 0.27.0.0 leash#13

Merged
axman6 merged 3 commits intoadd-leashing-0.27.0.0from
add-leashing-0.27.0.0-leashId
Feb 19, 2026
Merged

Add leashing 0.27.0.0 leash#13
axman6 merged 3 commits intoadd-leashing-0.27.0.0from
add-leashing-0.27.0.0-leashId

Conversation

@axman6
Copy link

@axman6 axman6 commented Feb 6, 2026

Adds support for specifying a LeashID when using the leashed version of the LocalStateQuery protocol. The idea is that any node which can provide the current LeashID is able to control the lashing, and any other node will be rejected. If no node is currently leashing the node, this will begin leashing.

(For anyone not familiar with the project, this is part of an experiment for the plutus-script-reexecutor (PSR) project which aims to leash a node's progress until the PSR has completed processing each block. This implementation is just a proof of concept.)

Description

Please include a meaningful description of the PR and link the relevant issues
this PR might resolve.

Also note that:

  • New code should be properly tested (even if it does not add new features).
  • The fix for a regression should include a test that reproduces said regression.

traceM $ "idle: handle acquire"
traceM $ "idle: handle acquire"
handleAcquire tgt leashed
, recvMsgDone = return ()

Choose a reason for hiding this comment

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

We need to check the leashing client id here, to make sure other clients can't unleash.

close
-- TODO: Is this right? I think we need to make unleashing explicit
atomically $ writeTVar leashingPointVar Nothing
return idle

Choose a reason for hiding this comment

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

Same as in recvMsgDone — we need to check the leashing client id.

| otherwise -> do
requestedLeashPoint <- requestedPoint mpt
let newLeashState = (messageLeashId, requestedLeashPoint)
if requestedLeashPoint < currentLeashPoint

Choose a reason for hiding this comment

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

I think this might be incorrect as there is a scenario when we have tried to leash at volatile tip but then decided to leash on immutable tip. There is a window when the node haven't reached the volatile tip yet.

@axman6 axman6 force-pushed the add-leashing-0.27.0.0-leashId branch from 0a4a7a1 to 20365b0 Compare February 11, 2026 01:04
@axman6 axman6 force-pushed the add-leashing-0.27.0.0-leashId branch from 20365b0 to 4124c40 Compare February 19, 2026 00:26
@axman6 axman6 force-pushed the add-leashing-0.27.0.0-leashId branch from 4124c40 to b77f827 Compare February 19, 2026 01:41
@axman6 axman6 merged commit 5ac599d into add-leashing-0.27.0.0 Feb 19, 2026
5 checks passed
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