Skip to content

Take the OT extension's session id from the channel - #46

Merged
wangxiao1254 merged 2 commits into
mainfrom
channel-sid
Nov 18, 2026
Merged

wangxiao1254 merged 2 commits into
mainfrom
channel-sid

Conversation

@wangxiao1254

Copy link
Copy Markdown
Member

Summary

SH2PCSession had ALICE pick a random session id, send it to BOB, and both set it on the OT extension. This drops that exchange: with no explicit id, the OT extension takes the channel's next session id when it starts (emp-ot's default from emp-toolkit/emp-ot#100, built on emp-toolkit/emp-tool#220). That id comes from a root the parties agree on when they connect, so neither party picks it, and the session sends one block fewer. On a channel without a session root the id is zero.

Compatibility

Transcripts change, so both parties must upgrade together. Needs emp-tool with channel session ids and emp-ot with its default to them.

Tests

  • Locally against emp-tool#220 and emp-ot#100: 10/10.
  • Mutation: if only ALICE sets the id, test_ot fails in CSW's check.

Merge order

The second commit points CI at emp-tool's session-id and emp-ot's channel-sid branches. Merge emp-toolkit/emp-tool#220, then emp-toolkit/emp-ot#100, then drop that commit and merge this.

🤖 Generated with Claude Code

wangxiao1254 and others added 2 commits November 17, 2026 20:13
SH2PCSession had ALICE pick a random session id, send it to BOB, and
both set it on the OT extension. Drop that exchange: with no explicit
id, the OT extension takes the channel's next session id (emp-tool's
IOChannel::next_session_id()) when it starts. That id comes from a root
the parties agree on when they connect, so neither party picks it, and
the session sends one block fewer. On a channel without a session root
the id is zero.

Requires emp-tool's channel session ids and emp-ot's default to them;
transcripts change, so both parties must upgrade together.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The previous commit needs emp-tool's channel session ids and emp-ot's
default to them, which are on emp-tool's session-id branch and emp-ot's
channel-sid branch until those pull requests merge. Drop this commit
once both are on main.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@wangxiao1254
wangxiao1254 merged commit e480f55 into main Nov 18, 2026
14 checks passed
@wangxiao1254
wangxiao1254 deleted the channel-sid branch November 18, 2026 11:59
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.

1 participant