-
Notifications
You must be signed in to change notification settings - Fork 104
improvement(best-orders): return an rpc error when we can't find best orders #2318
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since it's been a month, can you share the status quo of this PR?
Changes seem harmless, so the current status is also LGTM.
@onur-ozkan there is one last place we ask for any peer's response but we don't error. |
Please ping me once this is on "pending review" status. |
ping @onur-ozkan :) |
some tests are failing now because when a single seed node in a network does orderbook request it must fail (no other seed node to reply). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Just to make sure, when remote peers return no data, will we still be able to return an empty list as a response?
yup, a no data (i.e. empty vector/set) response is a valid response. |
Can you pull |
If the local node is a seed node, we should never return an error, as it has already subscribed to all topics and possesses the order book. It should still request and fill the order book in case it doesn't have the latest state or just came online, but if no other seeds respond, we should return the local copy of the order book. For test cases you mentioned, we should run this single node as a seed node. We will still get this issue #2228 with seednodes, but it's a GUI issue so not a problem. What do you think @mariocynicys ? |
don't forget to pull the latest commit @mariocynicys, I wanted to see which tests were failing |
agreed. |
Some tests now return the new errors like |
looks like here in orderbook_depth_rpc we also may want to return an error, if no peer responded with some data? |
Yup, these are from a single (seed) node network test. Will have seed nodes never error all together since they should have all the data stored already.
refer to #2318 (comment). I am not sure though about whether this reasoning is good enough. So would be nice to have more inputs/opinions. |
As I can see in the code, |
for the seed node case. non-seed nodes will error instead
* dev: improvement(best-orders): return an rpc error when we can't find best orders (#2318) feat(utxo): support FIRO Spark verbose tx feat(ARRR): dockerize zombie/pirate tests (#2374) improvement(event-streaming): move UnknownClient error to trace level (#2401) feat(tpu): implement 0 dexfee for kmd trading pairs (#2323) feat(db-arch): ctx functions and use of global db (#2378) feat(swap): add utxo/cosmos/ARRR pre-burn address output (#2112)
* dev: (26 commits) chore(deps): remove base58 and replace it completely with bs58 (KomodoPlatform#2427) feat(tron): initial groundwork for full TRON integration (KomodoPlatform#2425) fix(UTXO): improve tx fee calculation and min relay fee handling (KomodoPlatform#2316) deps(timed-map): bump to 1.3.1 (KomodoPlatform#2413) improvement(tendermint): safer IBC channel handler (KomodoPlatform#2298) chore(release): complete v2.4.0-beta changelogs (KomodoPlatform#2436) fix(event-streaming): initial addresses registration in utxo balance streaming (KomodoPlatform#2431) improvement(watchers): re-write use-watchers handling (KomodoPlatform#2430) fix(evm): make withdraw_nft work in HD mode (KomodoPlatform#2424) feat(taproot): support parsing taproot output address types chore(RPC): use consistent param name for QTUM delegation (KomodoPlatform#2419) fix(makerbot): add LiveCoinWatch price provider (KomodoPlatform#2416) chore(release): add changelog entries for v2.4.0-beta (KomodoPlatform#2415) fix(wallets): prevent path traversal in `wallet_file_path` and update file extension (KomodoPlatform#2400) fix(nft): make `update_nft` work with hd wallets using the enabled address (KomodoPlatform#2386) fix(wasm): unify error handling for mm2_main (KomodoPlatform#2389) fix(tx-history): token information and query (KomodoPlatform#2404) test(electrums): fix failing test_one_unavailable_electrum_proto_version (KomodoPlatform#2412) improvement(network): remove static IPs from seed lists (KomodoPlatform#2407) improvement(best-orders): return an rpc error when we can't find best orders (KomodoPlatform#2318) ...
* lr-swap-wip: (45 commits) review (mariocynicys): fix iterators zipping, refactor 1inch url builder, add docs to cross prices data, remove extra coin decimals check added doc comments for LrData struct error msg improved fix tx value eth conversion eliminate from_api_error fn fix src_decimals var name improve bad api TokenInfo error messages improvement(best-orders): return an rpc error when we can't find best orders (KomodoPlatform#2318) feat(utxo): support FIRO Spark verbose tx feat(ARRR): dockerize zombie/pirate tests (KomodoPlatform#2374) improvement(event-streaming): move UnknownClient error to trace level (KomodoPlatform#2401) feat(tpu): implement 0 dexfee for kmd trading pairs (KomodoPlatform#2323) feat(db-arch): ctx functions and use of global db (KomodoPlatform#2378) feat(swap): add utxo/cosmos/ARRR pre-burn address output (KomodoPlatform#2112) review (laruh): rename fn review (laruh): add fn to get contracts from LrData add TODO fix find best lr swap behaviour: skip lr provider error results (to use successful ones) refactor 1inch url builder fix 1inch result conversion test ...
Return an RPC error in best orders rpc if we were not able to get the best orders because nobody in the network replied to our p2p request.
This is saner that returning a successful result with no best orders inside.
Kinda addresses #2228