Skip to content
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
c3f42f1
vtxo: rename ExpiringState to UnilateralExitState
ellemouton Mar 11, 2026
9731e0f
vtxo: replace RefreshRequestedState with PendingForfeitState
ellemouton Mar 11, 2026
aae932f
vtxo: remove business-intent distinction from VTXO FSM
ellemouton Mar 11, 2026
e7caa06
vtxo: route round-bound signals through manager
ellemouton Mar 11, 2026
30ed97d
vtxo: add manager-driven expiry liveness tests
ellemouton Mar 11, 2026
e1b737f
vtxo: remove RefreshAcknowledgedEvent
ellemouton Mar 11, 2026
17d65f1
vtxo: clean up stale comments and documentation
ellemouton Mar 11, 2026
9190028
multi: replace trigger events with PendingForfeitEvent
ellemouton Mar 11, 2026
6b2f6c1
round: add RegisterIntentRequest entry point
ellemouton Mar 11, 2026
7142bcd
multi: switch wallet refresh flow to RegisterIntentMsg
ellemouton Mar 11, 2026
53172b8
wallet: switch leave flow to RegisterIntentMsg
ellemouton Mar 11, 2026
11e9bc1
multi: remove trigger messages and obsolete round handlers
ellemouton Mar 11, 2026
b555f2f
round: remove LeaveVTXORequest and dead code
ellemouton Mar 11, 2026
0c43aaa
multi: carry local forfeit amounts into round intents
ellemouton Mar 11, 2026
01ad4cb
round: detach local persistence from actor request contexts
ellemouton Mar 12, 2026
696ae8b
multi: regenerate proto stubs and fix mailbox interface
ellemouton Mar 12, 2026
083e68e
round: use findAssemblingRound for intent registration and add VTXO d…
Roasbeef Mar 13, 2026
71ec7c6
round: validate forfeit amounts against VTXOStore instead of trusting…
Roasbeef Mar 13, 2026
a421b04
docs: update per-package docs for VTXO FSM refactor
Roasbeef Mar 13, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions arkrpc/indexer.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions arkrpc/indexer.proto
Original file line number Diff line number Diff line change
Expand Up @@ -202,9 +202,9 @@ enum VTXOStatus {
// VTXO_STATUS_LIVE indicates the VTXO is active and can be spent.
VTXO_STATUS_LIVE = 2;

// VTXO_STATUS_REFRESH_REQUESTED indicates a refresh has been requested
// but not yet completed via a new round.
VTXO_STATUS_REFRESH_REQUESTED = 3;
// VTXO_STATUS_PENDING_FORFEIT indicates the VTXO has been committed
// to cooperative consumption and is awaiting forfeit details.
VTXO_STATUS_PENDING_FORFEIT = 3;

// VTXO_STATUS_FORFEITING indicates the VTXO is being forfeited in a
// round.
Expand All @@ -217,9 +217,9 @@ enum VTXOStatus {
// transaction (terminal).
VTXO_STATUS_SPENT = 6;

// VTXO_STATUS_EXPIRING indicates the VTXO is close to expiry and has been
// escalated to chain resolution (terminal for the VTXO actor).
VTXO_STATUS_EXPIRING = 7;
// VTXO_STATUS_UNILATERAL_EXIT indicates the VTXO has reached critical expiry
// and is being resolved on-chain (terminal for the VTXO actor).
VTXO_STATUS_UNILATERAL_EXIT = 7;

// VTXO_STATUS_FAILED indicates an unrecoverable error (terminal).
VTXO_STATUS_FAILED = 8;
Expand Down
24 changes: 12 additions & 12 deletions daemonrpc/daemon.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions daemonrpc/daemon.proto
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,9 @@ enum VTXOStatus {
// VTXO_STATUS_LIVE indicates the VTXO is active and spendable.
VTXO_STATUS_LIVE = 1;

// VTXO_STATUS_REFRESH_REQUESTED indicates a refresh has been queued
// but the forfeit transaction has not yet been signed.
VTXO_STATUS_REFRESH_REQUESTED = 2;
// VTXO_STATUS_PENDING_FORFEIT indicates the VTXO has been committed
// to cooperative consumption and is awaiting forfeit details.
VTXO_STATUS_PENDING_FORFEIT = 2;

// VTXO_STATUS_FORFEITING indicates the forfeit transaction has been
// signed and the VTXO is awaiting confirmation of the new round.
Expand All @@ -208,9 +208,9 @@ enum VTXOStatus {
// out-of-round transfer.
VTXO_STATUS_SPENT = 5;

// VTXO_STATUS_EXPIRING is terminal: the VTXO is being resolved
// on-chain via the unilateral exit path.
VTXO_STATUS_EXPIRING = 6;
// VTXO_STATUS_UNILATERAL_EXIT is terminal: the VTXO has reached critical
// expiry and is being resolved on-chain.
VTXO_STATUS_UNILATERAL_EXIT = 6;

// VTXO_STATUS_FAILED is terminal: an unrecoverable error occurred.
VTXO_STATUS_FAILED = 7;
Expand Down
16 changes: 8 additions & 8 deletions darepod/rpc_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -278,8 +278,8 @@ func protoStatusToDomain(
case daemonrpc.VTXOStatus_VTXO_STATUS_LIVE:
return vtxo.VTXOStatusLive, nil

case daemonrpc.VTXOStatus_VTXO_STATUS_REFRESH_REQUESTED:
return vtxo.VTXOStatusRefreshRequested, nil
case daemonrpc.VTXOStatus_VTXO_STATUS_PENDING_FORFEIT:
return vtxo.VTXOStatusPendingForfeit, nil

case daemonrpc.VTXOStatus_VTXO_STATUS_FORFEITING:
return vtxo.VTXOStatusForfeiting, nil
Expand All @@ -290,8 +290,8 @@ func protoStatusToDomain(
case daemonrpc.VTXOStatus_VTXO_STATUS_SPENT:
return vtxo.VTXOStatusSpent, nil

case daemonrpc.VTXOStatus_VTXO_STATUS_EXPIRING:
return vtxo.VTXOStatusExpiring, nil
case daemonrpc.VTXOStatus_VTXO_STATUS_UNILATERAL_EXIT:
return vtxo.VTXOStatusUnilateralExit, nil

case daemonrpc.VTXOStatus_VTXO_STATUS_FAILED:
return vtxo.VTXOStatusFailed, nil
Expand All @@ -307,8 +307,8 @@ func vtxoStatusToProto(s vtxo.VTXOStatus) daemonrpc.VTXOStatus {
case vtxo.VTXOStatusLive:
return daemonrpc.VTXOStatus_VTXO_STATUS_LIVE

case vtxo.VTXOStatusRefreshRequested:
return daemonrpc.VTXOStatus_VTXO_STATUS_REFRESH_REQUESTED
case vtxo.VTXOStatusPendingForfeit:
return daemonrpc.VTXOStatus_VTXO_STATUS_PENDING_FORFEIT

case vtxo.VTXOStatusForfeiting:
return daemonrpc.VTXOStatus_VTXO_STATUS_FORFEITING
Expand All @@ -319,8 +319,8 @@ func vtxoStatusToProto(s vtxo.VTXOStatus) daemonrpc.VTXOStatus {
case vtxo.VTXOStatusSpent:
return daemonrpc.VTXOStatus_VTXO_STATUS_SPENT

case vtxo.VTXOStatusExpiring:
return daemonrpc.VTXOStatus_VTXO_STATUS_EXPIRING
case vtxo.VTXOStatusUnilateralExit:
return daemonrpc.VTXOStatus_VTXO_STATUS_UNILATERAL_EXIT

case vtxo.VTXOStatusFailed:
return daemonrpc.VTXOStatus_VTXO_STATUS_FAILED
Expand Down
10 changes: 5 additions & 5 deletions db/vtxo_store_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ func TestVTXOPersistenceStoreListLiveVTXOs(t *testing.T) {

// Mark vtxo3 as RefreshRequested (non-terminal, should still be live).
err = vtxoStore.UpdateVTXOStatus(
ctx, vtxo3.Outpoint, vtxo.VTXOStatusRefreshRequested,
ctx, vtxo3.Outpoint, vtxo.VTXOStatusPendingForfeit,
)
require.NoError(t, err)

Expand Down Expand Up @@ -262,13 +262,13 @@ func TestVTXOPersistenceStoreStatusTransitions(t *testing.T) {

// Transition to RefreshRequested.
err = vtxoStore.UpdateVTXOStatus(
ctx, desc.Outpoint, vtxo.VTXOStatusRefreshRequested,
ctx, desc.Outpoint, vtxo.VTXOStatusPendingForfeit,
)
require.NoError(t, err)

fetched, err = vtxoStore.GetVTXO(ctx, desc.Outpoint)
require.NoError(t, err)
require.Equal(t, vtxo.VTXOStatusRefreshRequested, fetched.Status)
require.Equal(t, vtxo.VTXOStatusPendingForfeit, fetched.Status)

// Transition to Forfeiting via MarkForfeiting.
forfeitRoundID := testRoundIDDB("forfeit-round")
Expand Down Expand Up @@ -528,7 +528,7 @@ func TestVTXOPersistenceStoreMultipleVTXOsLifecycle(t *testing.T) {
// VTXO 0: stays live (no changes).
// VTXO 1: goes to RefreshRequested (still live).
err = vtxoStore.UpdateVTXOStatus(
ctx, vtxos[1].Outpoint, vtxo.VTXOStatusRefreshRequested,
ctx, vtxos[1].Outpoint, vtxo.VTXOStatusPendingForfeit,
)
require.NoError(t, err)

Expand Down Expand Up @@ -577,7 +577,7 @@ func TestVTXOPersistenceStoreMultipleVTXOsLifecycle(t *testing.T) {

fetched1, err := vtxoStore.GetVTXO(ctx, vtxos[1].Outpoint)
require.NoError(t, err)
require.Equal(t, vtxo.VTXOStatusRefreshRequested, fetched1.Status)
require.Equal(t, vtxo.VTXOStatusPendingForfeit, fetched1.Status)

fetched2, err := vtxoStore.GetVTXO(ctx, vtxos[2].Outpoint)
require.NoError(t, err)
Expand Down
Loading