Skip to content
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

Fee detection: active error = keeps on idling & times out #136

Open
WietseWind opened this issue Jan 12, 2025 · 2 comments
Open

Fee detection: active error = keeps on idling & times out #136

WietseWind opened this issue Jan 12, 2025 · 2 comments
Labels
Milestone

Comments

@WietseWind
Copy link
Member

WietseWind commented Jan 12, 2025

During fee detection, on Xahau and Xahau Testnet, the network parses the tx blob as part of the fee detection.

That tx may not be valid, e.g. the Hook a payload refers to does not exist yet, which results in a fee detection error.

If that happens, we keep on showing we're detecting fee which times out.

[22:56:20.903] Unable to calculate available network fees: "Call timeout after 40 seconds"
[22:57:31.544] Unable to calculate available network fees: "Call timeout after 40 seconds"

Request:

  • If fee command returns an error (error exists), show an alert: Could not reliably detect fees (${response.error 'unknown error type'}), message: ${response.error_exception || 'unknown error message'} and
  • Fall back to the regular fee mechanism of low medium high with an assumed fee that is relatively high, e.g. 5000 drops + the escalation based on top of that.

Easy to simulate by overruling tx_blob
Examples:

Connected (press CTRL+C to quit)
> {"command":"fee","tx_blob":"FFAA"}
< {"error":"invalidTransaction","error_exception":"Transaction length invalid","request":{"command":"fee","tx_blob":"FFAA"},"status":"error","type":"response"}
> {"command":"fee","tx_blob":"12001621000053592200000000242D06252D201B00AC600968400000000000000C732102A78AF0DDAE84413BD7F9C4DCE0213A9B44EADE0AA9B74A49B6A4AED3249FA72574473045022100927CD6383F6AB9D07C699587ED14B4E4E8690F35C64E83BCF5B40091763A58D0022013BD7BB173BED64B1D9FC79D70C0FED2DA8A8B1EBAE2A38F2E59C745EFBAFC3581143BDE6D1BDE9109DE704C416FF411D4B8680C9F03FBEE22000000015014FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFFFFFFFFFFFFFBFFFFF501F1A9D1EEA98A9BE3C45A35872E51E36B6E73CBB7033A96CE0D98DB484215E049450200000000000000000000000000000000000000000000000000000000000000000E1F1"}
< {"result":{"current_ledger_size":"0","current_queue_size":"0","drops":{"base_fee":"10","base_fee_no_hooks":"10","median_fee":"5000","minimum_fee":"10","open_ledger_fee":"10"},"expected_ledger_size":"32","fee_hooks_feeunits":"10","ledger_current_index":20481219,"levels":{"median_level":"128000","minimum_level":"256","open_ledger_level":"256","reference_level":"256"},"max_queue_size":"2000"},"status":"success","type":"response"}
> {"command":"fee","tx_blob":"12001621000053592200000000242D06252D201B00AC600968400000000000000C732102A78AF0DDAE84413BD7F9C4DCE0213A9B44EADE0AA9B74A49B6A4AED3249FA72574473045022100927CD6383F6AB9D07C699587ED14B4E4E8690F35C64E83BCF5B40091763A58D0022013BD7BB173BED64B1D9FC79D70C0FED2DA8A8B1EBAE2A38F2E59C745EFBAFC3581143BDE6D1BDE9109DE704C416FF411D4B8680C9F03FBEE22000000015014FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFFFFFFFFFFFFFBFFFFF501F1A9D1EEA98A9BE3C45A35872E51E36B6E73CBB7033A96CE0D98DB484215E04945020000000000000000000000000000000000000000000000000000000000001"}
< {"error":"invalidTransaction","error_exception":"invalid SerialIter getBitString","request":{"command":"fee","tx_blob":"12001621000053592200000000242D06252D201B00AC600968400000000000000C732102A78AF0DDAE84413BD7F9C4DCE0213A9B44EADE0AA9B74A49B6A4AED3249FA72574473045022100927CD6383F6AB9D07C699587ED14B4E4E8690F35C64E83BCF5B40091763A58D0022013BD7BB173BED64B1D9FC79D70C0FED2DA8A8B1EBAE2A38F2E59C745EFBAFC3581143BDE6D1BDE9109DE704C416FF411D4B8680C9F03FBEE22000000015014FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFFFFFFFFFFFFFBFFFFF501F1A9D1EEA98A9BE3C45A35872E51E36B6E73CBB7033A96CE0D98DB484215E04945020000000000000000000000000000000000000000000000000000000000001"},"status":"error","type":"response"}
@WietseWind WietseWind added this to the 3.3 milestone Jan 12, 2025
@WietseWind WietseWind added the Prio Important label Jan 12, 2025
@N3TC4T
Copy link
Member

N3TC4T commented Jan 17, 2025

Fixed in 4978f24

The fix will first attempt to request the fee using tx_blob. If this fails, the tx_blob will be omitted, and the request will be retried. If the second attempt succeeds, the generic fee calculation logic will be applied.

Note: This fix does not implement any customization for the returned fee when the fallback method is applied. The generic fee calculation logic will always be used.

with an assumed fee that is relatively high, e.g. 5000 drops + the escalation based on top of that.

@WietseWind
Copy link
Member Author

@N3TC4T Sounds like a plan, great fallback. And generic fee is OK, they can always pick the higher fee from the selection.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants