Hypergrid friendships: confirmation, FriendsStore and migration
Two avatars, separately administered home grids · The second confirmation after returning home
Two avatars, separately administered home grids
Alice has an account on grid A, Bob on grid B. When Alice visits B and befriends Bob, both home worlds' friendship services are involved. If they meet on a third grid C, that meeting grid does not own either home account.
The second confirmation after returning home
An offer may be accepted during a visit and sent to home services, but the home grid may store a pending relationship. Upon return, Firestorm can display “Please confirm this friendship you made while you were on another HG grid”. HGFriendsModule and HGFriendsService explicitly support this confirmation, which is not necessarily an accidental duplicate invitation.
Each grid stores its own FriendsStore relationship
In a Grid deployment with ROBUST/MySQL, the Friends service uses FriendsStore in its configured database. A stores the references needed for Alice's account; B stores Bob's. They are not one worldwide SQL database or automatically SQL-replicated tables. Running SQL on A writes nothing on B.
Actual data model: PrincipalID, Friend, Flags, TheirFlags
In MySQLFriendsData.cs, PrincipalID identifies one end, Friend the other and Flags stores rights for that direction. The service derives TheirFlags by matching a reciprocal row; it is not an independent column to copy. Friend may contain a full universal identifier for a foreign user. Pending state and permissions are not arbitrary labels to edit.
UUI and relationship validation secret
HGFriendsModule builds universal identifiers describing the foreign avatar and associates a short secret with some relationships. HGFriendsService uses it to validate operations including presence notifications and remote deletion. The secret is not decorative and must not be exposed in database screenshots or public reports.
Example: Alice replaces her avatar and restores inventory
Alice creates Alice2 on grid A, uses the same name or appearance, and restores inventory where permitted. But Alice2 has a new UUID. Local and foreign friends established relationships with the former Alice, not Alice2. Transferring objects has never transferred that identity.
Why copying SQL records can be misleading
The administrator of A copies old Alice's FriendsStore entries to Alice2. Some entries may then appear in the viewer, creating an illusion of success. But Bob's grid B still has a relationship referencing the former Alice's UUID, UUI and associated data. B does not recognize Alice2 as Bob's authorized friend and has not confirmed her new identity.
Consequences: presence, permissions and deletion break
Online/offline notifications may be rejected because identifiers or the secret do not match the relationship stored on B. Rights can appear inconsistent, reciprocal deletion may fail and orphaned records can remain. Changing PrincipalID or Friend in one ROBUST database does not replay cross-grid negotiation.
Why local friends are a different case
For two residents of A, its administrator generally controls records for both ends. A careful local migration could be investigated with backups, reciprocal references and tests, though a simplistic UPDATE is not guaranteed safe. Across A and B, the administrator of A normally has neither access to nor authority over B's database, much less those of dozens of grids.
Cross-grid notifications and friendship validation
HGStatusNotifier groups foreign friends by remote service and sends status requests. HGFriendsService checks that the foreign avatar matches an established local relationship and validates its secret. Source code also contains a known limitation around initial online lookup for remote friends: an offline display is not always proof of disconnection.
Friendship deletion is also coordinated
HGFriendsModule can contact a foreign service to remove a relationship and validate data including the secret. If one side manually changed records, removal may no longer propagate consistently. Avoid creating or deleting foreign friendships using simple SQL queries.
Practical approach after creating a new avatar
Keep a backup, distinguish local from HG friends and inform the resident before any migration. For foreign friends, the supported practical approach is to send new invitations from the new avatar and complete confirmations, including at home. Safe automated migration would need a cooperating protocol and renewed validation on each affected grid, not SQL copying.
Read-only inspection without modifications
Reading FriendsStore and service logs helps diagnose pending relations. First identify the correct ROBUST Friends database, inspect reciprocal links and confirmation state, and redact full values containing secrets. Never directly update Flags or replace UUIDs without understanding the complete consequences.
Example structure: two databases that do not synchronize
Conceptual illustration only: not executable SQL. Exact record organization depends on the confirmation stage.
GRILLE A / GRID A (ROBUST FriendsStore) PrincipalID = UUID_ALICE Friend = UUI_BOB + secret GRILLE B / GRID B (ROBUST FriendsStore) PrincipalID = UUID_BOB Friend = UUI_ALICE + secret NOUVEL AVATAR / NEW AVATAR: UUID_ALICE2 Une copie SQL sur A ne met PAS à jour B. Copying SQL on A does NOT update B.
Inspecting rows read-only
Read-only SQL example on a backup or test instance. Friend values may contain tokens: do not publish raw output.
SELECT PrincipalID, Friend, Flags FROM FriendsStore WHERE PrincipalID = 'UUID_DU_RESIDENT';
Explore more Hypergrid guides
- Hypergrid installation and configuration
- Principles and architecture
- Visitor identity
- Cross-grid teleports
- Networking and ports
- Inventory and assets
- Security
- Troubleshooting