The 3-phase commit presented in Austria (video)

12 views
Skip to first unread message

Johan Nygren

unread,
Jun 26, 2025, 1:16:22 PMJun 26
to Ripple Project
3-phase commit for multihop payments: https://youtu.be/DVjMis02AE8

Summary: The first idea to prevent the "reserve credit attack" is to use a timeout. A timeout when a 2-phase commit is used will always cause a penalty but never cause the penalty on every phase. The penalty is problematic unless it is done in small "chunks" - as Ryan suggested in 2006. But, doing penalty in small chunks tends to increase total duration until payment times out, and this causes a problem on the phase where there is no penalty, as it becomes possible to "reserve credit attack" that phase. A 2-phase commit can be done in two ways, either cancel on timeout or finish on timeout. The two variants cause penalties on opposite phases. They can be combined into a 3-phase commit where there is a penalty on all phases (the 3rd phase is an intermediary phase that switches timeout behavior from finish-on-timeout to cancel-on-timeout).

Code: Full implementation of Ripple with 3-phase commit on https://bitbucket.org/bipedaljoe/ripple-normal.

Illustrations: http://ripple.archi/3phase.pdf

Simulation: https://multihop.xyz/?view=sim

Peace, Johan
Reply all
Reply to author
Forward
0 new messages