Skip to content

How Polytone Handles Channel Closure

ekez edited this page Apr 24, 2023 · 2 revisions

Every note has a pair, which corresponds to the voice module that the note is connected to. This can either be set during instantiation, or note modules will pair with the first voice module they are connected to. Once paired, a note will reject all future connections to a different voice module.

image

This means that if a channel closes between a note and its pair, anyone can re-open the channel permissionlessly and re-enable the accounts. While a note has a pair but no channel, those accounts are paused as the note will not send any messages to control them.

To ensure that the same account will be used, even if a channel closes, the voice module generates user account addresses based on the (connection_id, note_port, user_address) triplet. This ensures that two notes on the same remote chain will have different addresses for a user, but a channel closing and being reopened (channel ID changes) won't cause the user's account to change.