feat(pool): a member's pin reaches its pool, rounded as its owner chose #592
No Reviewers
Labels
Clear labels
accessibility
all-platforms
area:agents
area:ai
area:chain
area:ci
area:client
area:daemon
area:p2p
area:project
area:protocol
area:runtime
area:storage
bug
chore
community
dependencies
discussion
discussion/Announcements
discussion/General
discussion/Ideas
discussion/Q&A
discussion/Show and tell
discussion/answered
documentation
duplicate
enhancement
good first issue
help wanted
i18n
infra
invalid
needs:decision
needs:hardware
paired
question
research
security
status:in-review
test
testing
tracking
wontfix
Barrier affecting people with disabilities
Run every platform's packaging and checks on this pull request, not only the three main ones
MCP server, skill, and thinking on the pool
Planner and model providers
Blockchain, SISY, verification
Continuous integration and build workflows
Desktop and web clients
sisyphusd coordinator, worker, scheduler
libp2p hosts, relays, discovery, connections between nodes
Project planning, roadmap, and governance
Protobuf schemas and RPC contracts
Workload execution and environments
Content-addressed storage, IPFS, Kubo, Cluster, S3, names, pinning
Something isn't working
Repository health, templates, Discussions, contributor experience
Updates to actions, Go modules or npm packages
Migrated from GitHub Discussions
GitHub Discussions category: Announcements
GitHub Discussions category: General
GitHub Discussions category: Ideas
GitHub Discussions category: Q&A
GitHub Discussions category: Show and tell
Q&A discussion with an accepted answer
Improvements or additions to documentation
This issue or pull request already exists
New feature or request
Good for newcomers
Extra attention is needed
Translations and right-to-left layouts
Build, CI, releases
This doesn't seem right
Waits on a decision from both owners
Waits on a machine we do not have yet
Built together by both maintainers, with co-authored commits
Further information is requested
Needs investigation or a design decision
Sealing, keys, access control, tokens, the security model
Built and in an open pull request; closes when it merges
Tests, test harnesses and the rehearsal
Roadmap and meta issues
This will not be worked on
type
Feature
A request, idea, or new functionality (GitHub issue type)
type
Task
A specific piece of work (GitHub issue type)
Milestone
No items
No Milestone
V0: prove the loop
Projects
Clear projects
No projects
Sisyphus roadmap
Done
No Assignees
rvnminers-A-and-N
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: Sisyphus/Sisyphus#592
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
This is slice 2b of #573. With #586 the owner can save a pin for the node and choose how much of it other members may see. This PR sends that pin to the pool, rounded to the owner's choice and no finer, so other members can place the node.
What changes:
Hellocarries an optionalshared_location(latitude and longitude). The worker rounds it withgeo.Sharedbefore it is sent: unchanged for exact, to 0.01° for about-1km, to 0.1° for city. For country or nothing, or when there is no pin, the field is left out. The exact pin leaves the machine only when the share is exact.SetNodeLocation, the pool sees it at once, with no reconnection. The local API tells the worker, and the worker sends a heartbeat with a newLocationUpdate. The update holds the new place, or nothing when sharing has stopped. The same notice also reaches the workers this node runs for other nodes it works for. A change made withsisyphusd location setwhile the node is running is sent the next time the worker connects, and the command now says so.NodeInfo.shared_location(ListNodes, which only clients may call). It checks only that the coordinates are a place on the Earth. Coordinates out of range are treated as no place.Worker.shared_locationinListWorkersandWatchWorkers.ListWorkersincludes it only for a caller that presents the token, the same ruleGetNodeInfouses for the owner's own pin. When the field is absent, the node shares no coordinates.sisyphusd nodesadds a line below its table for each node that shares a place, such asrig: shared place 48.9, 2.4. This follows the existing per-node lines for models and standing.apps/sisyphusd/README.mddescribes what is shared and when.docs/user-guide.mdhas a table of what other members see for each choice.docs/security-model.mdhas a short "Where a node is" section: other members see the rounded place the owner chose and nothing more, and the place is the worker's own claim.Backward compatibility: older workers send nothing and are listed with no place, and older coordinators ignore the new fields. A heartbeat without the new field leaves the place as it was. Tests cover an old-style hello and old-style heartbeats.
Not done here: the globe placing other members by their shared place. That is the desktop's next step, after #590.
Peer(libp2p peers) is unchanged. The place belongs to pool membership, and peers that are not in the pool are not told.How it was tested:
worker/location_test.go): the hello carries the place, word of a change sends one update and an unchanged place sends nothing, an update when sharing stops carries no place, and a worker with no place or no source says nothing.shared_location_test.go): an old-style hello, an out-of-range hello, a heartbeat with no location field, moving, clearing, and an out-of-range update.ListWorkersrounded to 0.1°, and insisyphusd nodes. Without the token it is absent. Changing to about-1km, exact, country, city and clearing through the API each reach the pool without a restart.make coverreports every statement covered. gofmt andgo vetare clean, andnpm run -s typecheckinapps/sisyphuspasses after regenerating the TS client.