ledgerloops / jerboa

A state-driven Ledger Loops node in TypeScript. Successor of strategies in https://github.com/ledgerloops/strategy-pit
Apache License 2.0
1 stars 0 forks source link

build/src/jerboaChallenge.js works but build/src/main.js does not #42

Open michielbdejong opened 1 month ago

michielbdejong commented 1 month ago

$ PROBING_REPORT=1 node ./build/src/jerboaChallenge.js ./__tests__/hourglass.csv ./jerboa.csv
Running single thread with 1 workers
resetting solution file ./jerboa.csv
Node 1 found loop (1-0:0 [] [ '1', '2', '3', '1' ]
Node 1 found loop (1-1:0 [] [ '1', '4', '5', '6', '1' ]
Finished 2 probes using 1 workers in a single thread
Worker 0 return stats {
  messagesReceived: 35,
  messagesSent: 35,
  transfersReceived: 7,
  transfersSent: 7,
  transferAmount: 7,
  bilateralNum: 14,
  bilateralAmount: 14,
  multilateralNum: 7,
  multilateralAmount: 7,
  numNodes: 6
}
7 transfers between 6 participants triggered an average of 5.00 messages each
Transfer amount 7
200% netted bilaterally
100% netted multilaterally
-200% not netted
{
  messagesReceived: 35,
  messagesSent: 35,
  transfersReceived: 7,
  transfersSent: 7,
  transferAmount: 7,
  bilateralNum: 14,
  bilateralAmount: 14,
  multilateralNum: 7,
  multilateralAmount: 7,
  numNodes: 6
}
michielbdejong commented 1 month ago

Also stats for build/src/main.js are zero:


$ PROBING_REPORT=1 node ./build/src/main.js ./__tests__/hourglass.csv
Running single thread with 1 workers
Finished 0 probes using 1 workers in a single thread
Worker 0 return stats {
  messagesReceived: 0,
  messagesSent: 0,
  transfersReceived: 0,
  transfersSent: 0,
  transferAmount: 0,
  bilateralNum: 0,
  bilateralAmount: 0,
  multilateralNum: 0,
  multilateralAmount: 0,
  numNodes: 0
}
0 transfers between 0 participants triggered an average of NaN messages each
Transfer amount 0
NaN% netted bilaterally
NaN% netted multilaterally
NaN% not netted
{
  messagesReceived: 0,
  messagesSent: 0,
  transfersReceived: 0,
  transfersSent: 0,
  transferAmount: 0,
  bilateralNum: 0,
  bilateralAmount: 0,
  multilateralNum: 0,
  multilateralAmount: 0,
  numNodes: 0
}
michielbdejong commented 1 month ago

First issue solved, second issue is because it's actually running at all, renaming issue.