go
go copied to clipboard
stellar/horizon: Figure out difference from core in path payment ingestion
From the outage on 2023-07-27, Horizon is processing path payments differently from Core (somehow). We should figure out what the difference is and fix it so it doesn't happen again.
Possibilities from @sisuresh:
- This was a pathPaymentStrictSend. Is it possible that horizon processes the trades dest->source instead of source->dest? 9223358264400180200 + 30759900666599 (the xlm-silver math if you do the last trade first) overflows int64, but 9223358264400180200 + 30759900666599 - 26780386209640 (the xlm-silver math if you do it in order) doesn't.
- The effects also show the same reserve amounts for Silver on the first and last hop. Is that the reserve before the operation is applied?
- Another guess related to the question above - maybe the intermediate reserve isn't accounted for after the xlm -> silver trade.