-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Recent fee rises and TxQ issues #2215
Comments
@donovanhide Thanks for the feedback and your question. As far as we can tell, yes, everything is processing exactly as designed. To prevent runaway resource usage and/or abuse, the queue was implemented with a size limit of 20 ledgers' worth of transactions (https://github.com/ripple/rippled/blob/develop/src/ripple/app/misc/FeeEscalation.md#other-constants). If the network was staying healthy, and there were no problems with consensus times (and I haven't seen any evidence of problems yet), then it's safe to presume that the expected ledger size was at least 50, which means there were at least 1,000 transactions in the queue, which is honestly pretty impressive! |
It looks like that's the case. For example, here's a fee distribution from one of those ledgers. The first column is the number of transactions, the second is the fee paid in drops:
You'll notice that several 10 drop transactions still managed to get into the ledger and the total number of transactions in the ledger was 52. |
Thanks for the responses. I guess the real question is how do I choose a fee which can make a profit based on the information fed out from rippled. For example here are two recent ledgers and the fee amounts advertised during the time before each ledger closes:
32299043 seems to end on a fee of 10 drops, while 32299042 ends on 5363. I don't really know how to interpret this data. A market maker needs to be able to adjust his/her prices based on external data and/or trades occurring on the rippled ledger in a timely manner. Without being able to alter his/her offers in a timely manner, money will be lost or opportunities missed. If the fees are too high then profits will also decrease. Finding the balance to this problem is difficult, especially when the fees are sustained at such high levels as they were yesterday. |
I don't recognize the format of that data, but if those are all the fees that were paid by transactions on that ledger, it means that any transactions that paid less than those amounts were either put into the queue or kept in the queue. Remember, that when a new ledger is opened, transactions are first pulled off the queue in order from highest fee to lowest. As those txs are added, the open ledger fee can start rising. And if it rises above the fee paid by the remaining highest fee tx in the queue, that tx will be left in the queue. Then both the open ledger and the queue are opened up for submissions. Transactions can be put in front of other transactions in the queue if they're willing to pay more. It's a trade-off between fee paid and time waited, and I have no idea how to make that decision for you. Oh, there is one additional set of data points I can offer. If you use rippled's |
The Based on this information: https://ripple.com/build/transaction-cost/#server-state The basic problem statement for a typical market-maker might be: I'd say that this is a usability problem. Currently, an understanding of a complex queue at the rippled end is required and the client needs to manage a further queue to dynamically feed the rippled queue. This is further complicated by the need to deal with cancellation of existing offers, which can get messy, as there is no way to mark an offer with a client-generated id, other than hacking the If there was an estimateFee API call which could take parameters |
Given the above section of the ledger current queue output, if that was my transaction, and I wanted to push it faster into a ledger, are you saying to re-sign it with a fee of |
Honestly, that link does not help or answer the question :-)
How do I use the information from the |
I think the crux of this problem you're describing is that you're asking rippled to predict the future actions of the other users / transactions / servers on the ripple network, and that's really just impossible without a well trained neural network or a time machine. All we can do is describe the past and present. If you want a (nearly) 100% chance of successful submission, the only real way is to pay the current open ledger fee (from the |
I agree that a predictive statistical model of varying number of transactions combined with varying levels of fees yielding a chance of success output would be very useful, but it would certainly cost a large amount of XRP to produce the training data on the live network :-) I'm more than happy to use the present values in rippled, which seems to be the open ledger fee. What I need to know is if the values in the server subscribe stream are appropriate. Strangely, I see the response is no longer documented here: https://ripple.com/build/rippled-apis/#subscribe except the brief excerpt:
The formula used is here: If I were to select the highest seen value after the last ledger close, and just before submitting my transactions, would that figure be a fair representation of the open ledger fee? Unfortunately there are four separate API responses where fee information is presented: |
Well, today it seems like: |
I wonder if it's the same issue that rippled when I do send some ripples gives me transaction hash today but when I look it at https://ripple.com/build/ripple-info-tool/ it says tx not found. What do you guys think? I do not see any errors in rippled log though. |
Ledger 32683368 is a good example of dysfunction. 4 out of 5 transactions all paying over 2 cents worth of XRP to be in an empty ledger, preceded by not particularly full ledgers. |
All day today I'm getting 'transaction not found' on ripple-info-tool whilst locally transactions are accepted. I've resent now few of them, but I'm worried that I might send two times. |
@gituser You need to check the validated transactions up until your specified LastLedgerSequence. The response you get when you submit is effectively useless. |
@donovanhide how do I do this? |
@gituser Attempt to interpret this: https://ripple.com/build/reliable-transaction-submission/ into your own code :-) |
@donovanhide the thing is the method I've been using for sending was working perfectly fine until today. Is there some network issues at the moment? I can see also via account_info that my account is |
@gituser I can't really help you debug your code, but this issue is that today, and on previous days, when some accounts raise the overall transaction fee, most other bots seem to fail to get their transactions into a ledger. |
@donovanhide ok, I'm looking into that documentation you sent before to make proper submission of the transaction in Ripple network. Thank you. |
@donovanhide so I read about reliable transaction posting and it seems just too much hassle to implement all of that and I'm not sure that even after I do create the system which will check for LastLedgerSequence and re-submit transactions it will work better and won't give me more headache. In current system the transaction is only sent once. And if something goes wrong you've got to re-send it manually, but this also protects from accidental double sending. So here's workaround I've used - I've just increased and made fee static to 0.5 XRP instead of using |
Yeah the fees are getting "ridiculously" high for market makers...they are not low enough to not be considered in the risk model. And it seems there are not too many transactions per second. Are the validators overloaded by some "malicious" attack that don't claim any XRP and the load_factor goes high? How is the load_factor calculated? |
Certainly lots of transactions in the queue, not many getting into ledgers... |
We've escalated and are investigating. We have definitely seen evidence of undesirable emergent behavior. |
I'm seeing https://www.eobot.com/user/436753 Which suggests that maybe the ledger is being used for mining payouts and the payout bot has some bad fee calculation code? Edit: seems that address is also linked to https://www.jubi.com/ ... |
What is the "latency" I see in rippled code to calculate if the server is overloaded? Where that time is coming from? I see there are 2ms removed for jitter so I suppose it is related to the communication with the other nodes, but it's weird that it is the only measure of load of the network. And then there are a lot of magic numbers (+8 *4) :)...hard to decode that code. |
The load factor I see is very high (minimum 3000 up to 400000 or more), so the fee is correctly calculated based on the loadFactor. Is there one of the validators having high load and then it propagates to the network? |
No I don't. I'm getting The old ones of course I can try to find in the history, but I'm not running full rippled node, I've set pruning to 2000 there so old data is being deleted and also by looking via https://ripple.com/build/ripple-info-tool/ on all those transactions I'm getting EDIT: I've just checked the transaction which I sent earlier (about 1.5 hours ago) and it's not found anywhere neither on the tool neither in my local rippled instance. |
You can imagine the Ops department in a bank phoning the dev late at night saying the exact same thing :-) There are definite usability questions about the transaction queue... Batch submission with atomic guarantees would go a long way to simplify the user experience. My best advice is just wait for the fix; my market makers cannot operate at a profit with the way things are currently working. |
That just means that you are asking the server for the most recent information, which is unvalidated. Most rippled queries default to querying the open ledger. Typically this gets you the most current information, taking into account even unverified transactions. That's usually what you want. (For example, if you submit a transaction to send XRP to someone else, you don't want to see that you still have the XRP just because the transaction isn't fully validated yet.) Unfortunately, at the moment, open ledgers are diverging a bit and querying the open ledger can show you things that are less likely to correlate with future network states. Querying validated information is always safe unless you're querying a misconfigured server or the network's consensus logic as a whole is broken.
Anything relying on being able to clear large numbers of transactions at low cost should probably wait for a fix. |
I understand the difference between querying unvalidated vs validated open ledger. The question is how to reliably submit new transaction?
So what should be the logic regarding 2) & 3) if I submit let's say simultaneously (at the same time) multiple transactions will be there a problem? Also, another question: And another question:
That's very true.
Seems it is the only way, but I'd like to understand more about how ripple works in terms of sending/confirming transactions and why some are confirmed faster than others. |
@tuloski, I tried all combinations. It turns out that each rippled gives different fees back. (not sure if that is worriesome, I can imagine it will also look at local load). When connecting to the same rippled it will give the same fees back. It was at first a bit confusing, but even when connecting to s1.ripple.com it sometimes gives different fees. This is because there are several rippleds behind that address. The factor of difference can be significant. Below are 2 connections to s1.ripple.com at the same time: [15/09/2017 21:15:03] Connected.. [15/09/2017 21:14:54] Connected.. The client (C1 or C2) do not make the difference in fees. |
could it be that the systems are busy due to increasing use of some of the new functionality, which then would use more system resources then perhaps anticipated? in that case it would be just organic growth and the fee-escalation should be loosened somewhat. Or maybe we're dealing with non-optimal implementation of the new functionality..(But I am just wildly guessing here of course) |
@gituser I'm using the MaxFee without problem...just the transactions don't go through because my max fee is often not enough and it fails with telINSUF_FEE_P @jnr101 I don't get why 2 different rippled should give different fees. At the end the fee that matters is the open ledger, because you could modify your rippled code to "ask" you 0 fees, but then it would fail in the consensus. In your case your rippled was giving a lower fee and then the transaction was validated? So now I can say that whatever I thought to know about the fees is not true :) |
I'm getting this when I try to sign transaction with |
@tuloski All I can say is my transactions validate with apparently a lower fee setting than what @gituser is using. I don't know why. But I can say that my instance of rippled is configured 'tiny' and running on relatively fast system. And perhaps of influence, I do not allow inbound connections on my rippled You can try the test with the fees with this code:
install/run with
start two instances and when it connects to different server you will find different fees For comparison here are some fee results from my own rippled:
|
Regarding: EDIT: hm, no, after some further testing there is a difference again between |
@donovanhide do you have |
Yep, had it whacked up since Ed advised me to do so about a year ago :-) I submit batches of market maker transactions greater than 10 about once a minute:
|
I'm now seeing less transactions per ledger than a Chinese Bitcoin Exchange circa 1st October 2017 :-) |
BTW I'm seeing many transactions with low fees (0.000011) getting into the ledger. I don't get how is that possible...they might have their local rippled with low load and low fee, but then why don't they fail in the consensus? How can I retrieve the open ledger fee? |
* Recover to the open ledger once, then to the queue. * If transaction fails to queue for any reason, drop it. * New result codes for transactions that can not queue. * Add minimum queue size * RIPD-1530 fix XRPLF#2215
* Recover to the open ledger once, then to the queue. * If transaction fails to queue for any reason, drop it. * New result codes for transactions that can not queue. * Add minimum queue size * RIPD-1530 fix XRPLF#2215
* Recover to the open ledger once, then to the queue. * If transaction fails to queue for any reason, drop it. * New result codes for transactions that can not queue. * Add minimum queue size * RIPD-1530 fix XRPLF#2215
Hi Ed (@ximinez)! thought I'd give the 0.70.2 hotfix an early quick spin. The queue submission responses are a lot more enlightening than the old blanket So, my market making bots now can submit transactions to the queue, and now strangely, exactly 10 from each batch always seems to succeed and the rest get queued locally, but do not succeed before the next batch, roughly a minute later. Is this the |
Most likely. |
We don't expect the fixes in 0.70.2 to have much effect until they're more widely deployed. We are still testing and finalizing the build. |
* Recover to the open ledger once, then to the queue. * If transaction fails to queue for any reason, drop it. * New result codes for transactions that can not queue. * Add minimum queue size * RIPD-1530 * fix XRPLF#2215
* If the transaction can't be queued, recover to the open ledger once, and drop it on the next attempt. * New result codes for transactions that can not queue. * Add minimum queue size * fix XRPLF#2215
Queues have been drained and local load_factor seems to be back to normal. Guess the fix has been deployed to the validators. Any chance of a tagged release? |
Soon™️ |
* If the transaction can't be queued, recover to the open ledger once, and drop it on the next attempt. * New result codes for transactions that can not queue. * Add minimum queue size. * Remove the obsolete and incorrect SF_RETRY flag. * fix XRPLF#2215
0.70.2 has been released to master and tagged. Enjoy! I'm going to go ahead and close this issue. If you have any further problems, feel free to reopen or open a new issue. |
Nice work. Trading has resumed :-) If you do get a spare moment after this slog, would be good to get some thoughts on building a local model for predicting a transaction fee for a range of possible transaction numbers in the next ledger: https://www.xrpchat.com/topic/9809-questions-on-fees/?do=findComment&comment=98593 |
During today's large increase in transaction fees, possibly due to a certain tweet, rippled is spewing lots of the following logs. Market makers connected to this instance are receiving "Can not queue at this time." responses. Is this the intended behaviour? The market makers are trying to use low transaction fees to get their offers onto the books and to make money by keeping the fees low. The end effect of the transaction fee increment process seems to be that the market makers are getting priced out of the market, which is ironic :-)
The text was updated successfully, but these errors were encountered: