XRPLF / rippled

Decentralized cryptocurrency blockchain daemon implementing the XRP Ledger protocol in C++
https://xrpl.org
ISC License
4.48k stars 1.45k forks source link

Asymmetric Pathfinding Issue #302

Closed BobWay closed 10 years ago

BobWay commented 10 years ago

I have a pretty straight forward "saaad" path. Rippled is finding the path in one direction but not the other. Interestingly, in the direction it is finding the path, it is reporting an orderbook path even though there are no orders. Rippling is enabled on all trust lines.

Alice = rBpnzaxRxd7QbcLF8T6S6iXNouJPBNKD7y NewGate = rUyPiNcSFFj6uMR2gEaD8jUerQ59G1qvwN Mark = raD1PjscAej2Vj1syFi95F6SP1HAqpReQU SnapSwap = rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q Bob = r3euRcVNBpNJy7M96SGBw21kyZx15bB8D6

Path: A --> NG <-- M --> SS <-- B Balance: 1/USD 6/USD 3/USD 1/USD Limit: 10 100 100 10

Path: B --> SS <-- M --> NG <-- A NOT FOUND

MacBook-15:public bway$ ./rippled ripple_path_find '{"command":"ripple_path_find", "source_account":"r3euRcVNBpNJy7M96SGBw21kyZx15bB8D6", "destination_account":"rBpnzaxRxd7QbcLF8T6S6iXNouJPBNKD7y", "destination_amount":{"currency":"USD","issuer":"rBpnzaxRxd7QbcLF8T6S6iXNouJPBNKD7y", "value":"1"}}' Loading: "/Users/bway/Code/OpenCoin/ripple/rippled/public/rippled.cfg" Connecting to: s1.ripple.com:51234 { "result" : { "alternatives" : [], "destination_account" : "rBpnzaxRxd7QbcLF8T6S6iXNouJPBNKD7y", "destination_currencies" : [ "USD", "XRP" ], "status" : "success" } }

Path: A --> NG <-- M --> SS <-- B FOUND

MacBook-15:public bway$ ./rippled ripple_path_find '{"command":"ripple_path_find", "source_account":"rBpnzaxRxd7QbcLF8T6S6iXNouJPBNKD7y", "destination_account":"r3euRcVNBpNJy7M96SGBw21kyZx15bB8D6", "destination_amount":{"currency":"USD","issuer":"r3euRcVNBpNJy7M96SGBw21kyZx15bB8D6", "value":"1"}}' Loading: "/Users/bway/Code/OpenCoin/ripple/rippled/public/rippled.cfg" Connecting to: s1.ripple.com:51234 { "result" : { "alternatives" : [ { "paths_canonical" : [], "paths_computed" : [ [ { "account" : "rUyPiNcSFFj6uMR2gEaD8jUerQ59G1qvwN", "type" : 1, "type_hex" : "0000000000000001" }, { "currency" : "USD", "issuer" : "rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q", "type" : 48, "type_hex" : "0000000000000030" }, { "account" : "rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q", "type" : 1, "type_hex" : "0000000000000001" } ], [ { "account" : "rUyPiNcSFFj6uMR2gEaD8jUerQ59G1qvwN", "type" : 1, "type_hex" : "0000000000000001" }, { "account" : "raD1PjscAej2Vj1syFi95F6SP1HAqpReQU", "type" : 1, "type_hex" : "0000000000000001" }, { "account" : "rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q", "type" : 1, "type_hex" : "0000000000000001" } ] ], "source_amount" : { "currency" : "USD", "issuer" : "rBpnzaxRxd7QbcLF8T6S6iXNouJPBNKD7y", "value" : "1" } } ], "destination_account" : "r3euRcVNBpNJy7M96SGBw21kyZx15bB8D6", "destination_currencies" : [ "USD", "XRP" ], "status" : "success" } }

NO ORDERS IN THE BOOK

MacBook-15:public bway$ ./rippled book_offers USD/rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q USD/rUyPiNcSFFj6uMR2gEaD8jUerQ59G1qvwN Loading: "/Users/bway/Code/OpenCoin/ripple/rippled/public/rippled.cfg" Connecting to: s1.ripple.com:51234 { "result" : { "ledger_current_index" : 5445184, "offers" : [], "status" : "success" } } MacBook-15:public bway$ ./rippled book_offers USD/rUyPiNcSFFj6uMR2gEaD8jUerQ59G1qvwN USD/rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q Loading: "/Users/bway/Code/OpenCoin/ripple/rippled/public/rippled.cfg" Connecting to: s1.ripple.com:51234 { "result" : { "ledger_current_index" : 5445185, "offers" : [], "status" : "success" } }

BobWay commented 10 years ago

If I put an order in the book, the path DOES get found. But it still does not show the rippling path.

MacBook-15:public bway$ ./rippled ripple_path_find '{"command":"ripple_path_find", "source_account":"r3euRcVNBpNJy7M96SGBw21kyZx15bB8D6", "destination_account":"rBpnzaxRxd7QbcLF8T6S6iXNouJPBNKD7y", "destination_amount":{"currency":"USD","issuer":"rBpnzaxRxd7QbcLF8T6S6iXNouJPBNKD7y", "value":"1"}}' Loading: "/Users/bway/Code/OpenCoin/ripple/rippled/public/rippled.cfg" Connecting to: s1.ripple.com:51234 { "result" : { "alternatives" : [ { "paths_canonical" : [], "paths_computed" : [ [ { "account" : "rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q", "type" : 1, "type_hex" : "0000000000000001" }, { "currency" : "USD", "issuer" : "rUyPiNcSFFj6uMR2gEaD8jUerQ59G1qvwN", "type" : 48, "type_hex" : "0000000000000030" }, { "account" : "rUyPiNcSFFj6uMR2gEaD8jUerQ59G1qvwN", "type" : 1, "type_hex" : "0000000000000001" } ] ], "source_amount" : { "currency" : "USD", "issuer" : "r3euRcVNBpNJy7M96SGBw21kyZx15bB8D6", "value" : "1" } } ], "destination_account" : "rBpnzaxRxd7QbcLF8T6S6iXNouJPBNKD7y", "destination_currencies" : [ "USD", "XRP" ], "status" : "success" } }

BobWay commented 10 years ago

Moved to JIRA