You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The re-executor can be too slow to follow the node's ledger state. It should be able to leash the node in such a way that the node won't proceed until the re-executor has caught up. The specification describes three strategies for leashing implementation.
16
+
17
+
1. Pausing the `BlockFetch` client.
18
+
2. Removal of the connected peers.
19
+
3. Use the LoE mechanism.
20
+
21
+
## Decision
22
+
23
+
We decided that the first two strategies are too invasive and the third strategy described in the specification seems to be the most viable and correct one, increasing our chances to get it accepted by the cardano-node developers, since we are utilising the already existing and well-tested mechanism.
24
+
25
+
## Consequences
26
+
27
+
We get leashing working and have more chances to get it merged to the upstream cardano-node implementation.
We can implement leashing there utilising the existing LoE component.
363
+
We consider the leashing implementation utilising the existing LoE mechanism.
364
+
365
+
1. We introduce a `LeashingState blk = Map LeashID (AnchoredFragment (HeaderWithTime blk))` structure to keep the leashing fragments associated with each leashing client.
366
+
2. We update the `LocalStateQuery` server to interact with that state:
367
+
- If a new client connects to the server with `leashId`, the server will put the `leashId` together with the client's leashing fragment into the leashing state;
368
+
- The leashing fragment is calculated using the current chain of the node and the `Target (Point Block)` provided by user. It's either a `SpecificPoint pt`, `ImmutableTip` or `VolatileTip`.
369
+
- If the connected client sends the `MsgRelease` with the `leashId`, the server will remove the leashing fragment from the state;
370
+
3. We introduce a `leashingWatcher` similar to existing `gddWatcher`. This watcher is responsible for watching the leashing state variable and the genesis LoE fragment variable. If either one of them is changed, the leashing watcher will recalculate the current LoE fragment, using the `sharedCandidatePrefix` function, and trigger manually the chain selection mechanism to consider the LoE fragment. This way we introduce the local chain candidates and provide the LoE fragment to the chain selection.
371
+
4. Such implementation would support both scenarios - the genesis one and the leashing one. The leashing will work even if the genesis is not enabled.
357
372
358
-
**Sum up**: the first two strategies seem to be too invasive and we are investigating the third strategy to implement the leashing.
373
+
**Summary**: the first two strategies seem to be too invasive and [we decided to implement leashing using the third strategy](adr/2026-02-23_004-node-leashing.md).
0 commit comments