Skip to content

Sync the ProConfig to swarms rather than extra data#80

Open
Doy-lee wants to merge 5 commits intosession-foundation:devfrom
Doy-lee:doyle-sync-pro-config-to-swarms
Open

Sync the ProConfig to swarms rather than extra data#80
Doy-lee wants to merge 5 commits intosession-foundation:devfrom
Doy-lee:doyle-sync-pro-config-to-swarms

Conversation

@Doy-lee
Copy link
Contributor

@Doy-lee Doy-lee commented Feb 25, 2026

Restore syncing to the swarms so that multi-device Session accounts agree and unify and use the same Session Pro proof. Having every device use the same proof is important to prevent observers from identifying devices based on their attached proof.

This removes the std::optional from the user profile and instead it's loaded from the internal .data dict and follows the same pattern as the rest of the code. Caching the value is additional state that can go out of sync.

Restore syncing to the swarms so that multi-device Session accounts agree and
unify and use the same Session Pro proof. Having every device use the same proof
is important to prevent observers from identifying devices based on their
attached proof.

This removes the std::optional<ProConfig> from the user profile and instead it's
loaded from the internal `.data` dict and follows the same pattern as the rest
of the code. Caching the value is additional state that can go out of sync.
`pro_proof` is just as long as `pro.proof` so no need to pull it into
a reference.
Comment on lines 18 to 21
/// | +-- r - rotating ed25519 privkey
/// | +-- r - rotating ed25519 pubkey
/// | +-- s - proof signature, signed by the Session Pro Backend's ed25519 key
/// |
/// +-- r - rotating ed25519 pubkey
/// +-- r - rotating ed25519 privkey
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is now going into network config messages, we should try to minimize it dropping the duplicate pubkey field, and storing only the seed value instead of the privkey (i.e. just the first 32 bytes rather than the 64-byte seed + precomputed pubkey in the privkey value)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(and on load, recompute the pubkey from the seed)

Re-derive the private key and public key into the runtime structures
from the seed saving 64b on the wire.
@jagerman jagerman enabled auto-merge February 25, 2026 02:01
auto-merge was automatically disabled February 25, 2026 03:16

Head branch was pushed to by a user without write access

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants