diff --git a/node/consensus/global/event_distributor.go b/node/consensus/global/event_distributor.go index cfb1c92..8ed2850 100644 --- a/node/consensus/global/event_distributor.go +++ b/node/consensus/global/event_distributor.go @@ -766,6 +766,21 @@ func (e *GlobalConsensusEngine) reconcileWorkerAllocations( continue } + // Expired joins (implicitly rejected) and expired leaves + // (implicitly confirmed) should also be cleared immediately — + // the allocation will never be confirmed/completed and the + // worker is stuck waiting for a state change that cannot come. + if alloc.Status == typesconsensus.ProverStatusJoining && + frameNumber > alloc.JoinFrameNumber+pendingFilterGraceFrames { + rejectedFilters[string(alloc.ConfirmationFilter)] = struct{}{} + continue + } + if alloc.Status == typesconsensus.ProverStatusLeaving && + frameNumber > alloc.LeaveFrameNumber+pendingFilterGraceFrames { + rejectedFilters[string(alloc.ConfirmationFilter)] = struct{}{} + continue + } + key := string(alloc.ConfirmationFilter) worker, ok := filtersToWorkers[key] if !ok { diff --git a/node/main.go b/node/main.go index 1134749..c381c1f 100644 --- a/node/main.go +++ b/node/main.go @@ -12,6 +12,7 @@ import ( "fmt" "log" "math/big" + "net" "net/http" npprof "net/http/pprof" "os" @@ -46,6 +47,12 @@ import ( qruntime "source.quilibrium.com/quilibrium/monorepo/utils/runtime" ) +func init() { + // Use the pure-Go DNS resolver to avoid SIGFPE crashes in cgo-based + // system resolvers (observed on some glibc/musl configurations). + net.DefaultResolver = &net.Resolver{PreferGo: true} +} + var ( configDirectory = flag.String( "config",