C version of single-user Ripple server now finished

18 views
Skip to first unread message

Johan Nygren

unread,
Aug 23, 2025, 11:43:35 PMAug 23
to Ripple Project
Hi Ripple group.

A very minimalistic C version of the single-user Ripple server is now finished. It has its own scheduler, requires no operating system other than UDP+Ethernet. Does not use heap. Sha256 is included in the code. 1900 lines of code in total. Should run on more or less anything.

https://bitbucket.org/bipedaljoe/ripple-c/src/main/ripple.c

The Golang version is finished since many months,
https://bitbucket.org/bipedaljoe/ripple-normal

In the C version I switched back to authenticated ACK (previously scrapped as it seemed overkill, but, without it there are attack vectors and adding authentication is trivial and works better). The Golang version and C version are currently incompatible for that reason, but switching to authenticated ACK in Golang version is a days of work at most.

I have not run large tests on the C version (as I have on the Golang one and the Golang includes those tests) but it is a direct port and should work. I will be testing it going forwards as well.

If anyone missed, my 3-phase commit solves the "reserve payment attack" and picks up where Ryan got stuck in 2006, I presented it in Austria at the Collaborative Finance conference this summer: https://youtu.be/DVjMis02AE8

Peace, Johan

Johan Nygren

unread,
Aug 25, 2025, 5:58:44 AMAug 25
to Ripple Project
Now built a 3-person payment test anyone can run by pressing "Run", https://onlinegdb.com/y-8XIoCz7. Shows everything working incl. the 3-phase commit (the one that allows Ryan's old 2006 idea of gradual slow-acting penalties, something not possible with 2-phase commits as they lack a penalty on one phase and with "chunked penalty" the cumulative timeout gets too long so attack is possible at phase in 2-phase where there is no penalty). Peace, Johan
Reply all
Reply to author
Forward
0 new messages