Skip to content

Commit

Permalink
Result with 12 seconds max between loops
Browse files Browse the repository at this point in the history
  • Loading branch information
michielbdejong committed Oct 25, 2024
1 parent 56d0c01 commit 30dc2cc
Show file tree
Hide file tree
Showing 2 changed files with 79 additions and 9 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ node ./build/src/analyse-sarafu-challenge-solution.js ./debt.csv ../jerboa/__tes
The last three lines will show you the performance of Min-Cost-Flow, Dept-First Search, and Jerboa (this prototype).
* Min-Cost-Flow will show a performance of roughly 18.9%, the optimum.
* Depth-First Search will show a performance of roughly 16.6%, a close second, but still a centralised algorithm.
* Jerboa will show our prototype's performance of roughly 15.5%
* Jerboa will show a performance of roughly 15.5%.

So this prototype achieves 80% of the optimum total amount of obligation cleared, which we believe is encouraging performance for a prototype.
So our Jerboa prototype achieves 80% of the optimum total amount of obligation cleared, which we believe is encouraging performance for a prototype.
As mentioned before, this prototype is not entirely decentralised yet, it still [uses a semaphore services](https://github.com/ledgerloops/jerboa/issues/57).
Its source code is also quite rough and it [takes a few shortcuts](https://github.com/ledgerloops/jerboa/issues), which is why we plan to do a full rewrite in 2025.

We did want to share these preliminary results though, to show to the CoFi community that peer-to-peer obligation clearing is, in principle, feasible.
80 changes: 73 additions & 7 deletions __tests__/fixtures/sarafu-50k.solution
Original file line number Diff line number Diff line change
Expand Up @@ -1060,20 +1060,20 @@
7980 2810 11378 4937 100
8073 9919 9420 9832 9806 9852 11249 7859 7916 7898 7820 24
9970 7980 2810 11378 350
7980 2810 11381 86
658 1593 1191 663 4038 180
7980 2810 13108 5759 13112 1899 7989 12943 9970 250
661 658 1593 1922 2356 370
1593 1922 2356 661 658 370
4027 6547 6900 8322 8326 8812 10
4027 8322 8799 8798 2
11650 11649 7209 200
7980 2810 11381 86
4027 6547 6900 8322 8326 9949 117
4027 8322 10281 8288 20
5205 8984 8841 50
10456 6228 10442 12465 13316 13135 12968 8
9970 7980 2810 13108 150
1899 7989 12943 9970 7980 2810 13108 5759 13112 250
8072 8073 9919 9876 9880 2
9970 7980 2810 13108 150
7980 2810 13646 100
4027 6547 6900 8322 8326 9949 117
4027 8322 10281 8288 20
11650 11649 7209 200
4027 6900 8322 8326 9949 53
4027 8322 10281 8798 50
8073 9919 9882 9878 9428 2
Expand Down Expand Up @@ -1103,3 +1103,69 @@
7863 9155 11292 11325 39
5999 10927 10930 10
6297 10275 4193 100
7863 11236 11313 11120 8134 75
2155 5196 6130 15
7626 1507 1515 550
7626 7300 8711 6032 40
7626 8711 9097 1250
7863 11236 11313 11257 7898 7950 9155 11292 11325 5
7863 11257 8134 4
7863 11313 11312 20
7863 11259 8849 7898 10038 11322 9346 7808 10988 9453 7
8191 7863 11619 9163 7916 7898 11120 8134 25
11249 11239 9746 8191 9346 7863 11626 7808 11259 9453 9446 9404 11337 11240 9411 9379 17
7916 8849 11309 8045 110
10988 9702 9346 7898 11325 8045 70
7898 11370 11605 11185 7806 9520 7979 47
7916 10988 11609 11341 9796 9346 5
7947 11249 11286 7800 7916 11309 9520 9346 7979 92
9155 11292 11325 7863 11236 11611 6
9346 7808 10988 9702 12
7898 10038 11322 9346 7863 11257 45
7898 11120 8134 7863 11259 8849 23
7916 7898 11370 11328 7863 11619 9163 20
7434 8477 5040 245
9155 11292 11325 8045 7916 7898 7950 10
10988 9702 9446 9404 11337 11240 9661 9670 7882 7916 8849 7898 10038 11322 9346 7808 5
7863 11236 11611 10988 11609 7898 11120 8134 17
7898 10038 11322 9346 7808 11259 8849 1
7916 7898 11120 11341 9796 7863 11236 11611 10988 9702 9446 9404 11337 11240 9661 9670 7882 25
7863 11236 11611 10988 9702 9446 9404 11337 11240 9661 9670 7882 7916 7898 11370 11328 25
12465 13316 13135 12968 10
7898 11370 11328 7863 11236 11611 10988 11609 27
8849 11309 9520 7979 8134 7863 11257 6
7863 11619 11309 9796 75
8849 11313 11257 9453 7863 11626 7808 11259 9
7916 11605 11185 7806 11313 11312 50
7863 11236 11619 11309 9520 7979 7898 11370 11328 44
7898 11370 11328 7863 11257 8849 2
7863 11236 11619 11309 9520 9346 7808 11259 9453 3
7863 11619 11312 40
7916 8849 11309 9796 8191 9346 7863 11626 7808 11325 8045 5
11370 11328 7863 11236 11619 11309 9520 9346 7808 11259 10
11257 8849 11309 9796 8191 9346 7863 15
7898 11370 11605 11185 7806 11313 11257 9453 7863 11619 11341 9796 10988 11609 3
7916 11605 11341 9917 9346 20
8273 8808 8707 11088 8819 50
7902 8266 8789 250
8819 8707 11092 8808 150
8820 8819 10595 8808 2
11084 4683 4685 200
8808 11084 11094 100
8820 11092 11093 280
6679 11451 8820 11450 20
9097 7626 1507 8711 60
11370 11328 7863 11236 11619 11309 9520 9515 9346 7808 11259 13
7898 11370 11605 11185 7806 11325 8045 10988 11609 20
7863 11257 8849 11309 9796 11312 20
9346 7863 11619 11341 9917 27
8134 8191 9346 7979 50
11213 11337 11240 9661 9670 7882 26
11626 7808 11609 11341 5
7863 11626 9173 70
9346 11135 11609 11608 100
9346 11257 9453 11185 7
11332 8848 9670 11194 10083 100
11159 9165 11264 9919 11251 9905 11332 11307 9661 9916 11372 11254 9444 11276 11333 7948 35
11239 11402 11361 9440 11296 8848 10924 11337 11254 9715 75
11366 9670 11249 79

0 comments on commit 30dc2cc

Please sign in to comment.