stellar-slack has quit [Remote host closed the connection]
stellar-slack has joined #stellar-dev
de_henne has joined #stellar-dev
koshii has quit [Ping timeout: 276 seconds]
koshii has joined #stellar-dev
acetakwas has joined #stellar-dev
bit2017 has quit [Ping timeout: 276 seconds]
acetakwas has quit [Ping timeout: 240 seconds]
acetakwas has joined #stellar-dev
acetakwas has quit [Quit: Leaving]
<stellar-slack>
<armed10> When i send 30 000 transaction to a standalone core. they are all status: pending. but after 10 minutes there are only 26 200 records in the txhistory table of the stellar database. What could be the reason of that?
<stellar-slack>
<sacarlson> are you feeding back the status as you perform the operations?
<stellar-slack>
<sacarlson> I don't think you can be performing two transactions on one account if the last in in process
<stellar-slack>
<sacarlson> just my guess
<stellar-slack>
<armed10> The transactions are submitted to the core directly, and it returns the status.
<stellar-slack>
<armed10> That could be it, I'll try doing a bunch of transactions from all seperate accounts
<stellar-slack>
<sacarlson> ok and you program looks at the status results before it performs the next tx on that account
<stellar-slack>
<sacarlson> ok
<stellar-slack>
<sacarlson> just have it monitor before continuation on each account
<stellar-slack>
<armed10> No it doesn't wait for it, but 10000 accounts are used, so it would have to submit 10000 payments before doing one from the same account
<stellar-slack>
<sacarlson> ok if that's the case what was the results of the transactions that failed?
<stellar-slack>
<armed10> The records don't show up in the database
<stellar-slack>
<armed10> so only the status pending is returned
<stellar-slack>
<sacarlson> yes no records in the database but what was the return results from the attempted tx?
<stellar-slack>
<sacarlson> or you don't look?
<stellar-slack>
<armed10> Just the status PENDING
<stellar-slack>
<sacarlson> well after pending it should return something I would think
<stellar-slack>
<sacarlson> I don't recall not getting anything but I don't do 10k tx
<stellar-slack>
<sacarlson> is pending all you ever get?
<stellar-slack>
<armed10> yes I determine success based on a query to the database
<stellar-slack>
<armed10> It does not employ Horizon, so you have to query the results yourself
<stellar-slack>
<sacarlson> oh IC well I somehow get more results than that even in the mss-server I get the reason for failure
<stellar-slack>
<sacarlson> I would have to look at how I do it with mss-server that also bypasses horizon and is direct to stellar-core
<stellar-slack>
<dchrist22> @ armed10 I have the same kind of behaviour. When I send ~10 tx per second over one connection, I've also get PENDING responses, but not all of them appear in the database after waiting for a few ledger closes.
<stellar-slack>
<sacarlson> with a quick look I see after the tx I look the the tx in the database every 1 sec. if I fail to find it in 15 sec I consider it a time out failure
<stellar-slack>
<sacarlson> otherwise I get he tx return results and decode them and return that
<stellar-slack>
<sacarlson> I don't recall seeing many timeout failures but I guess it's posible. maybe wait 30 sec if no result perform the tx again
<stellar-slack>
<armed10> When we only do 1 transaction per account, they all resolved fine
<stellar-slack>
<armed10> So it was probably a bad sequence number
<stellar-slack>
<armed10> in other words, you were right :)
<stellar-slack>
<dchrist22> but with bad sequence numbers you don't get a "PENDING" response, they got rejected in the first place
<stellar-slack>
<sacarlson> how do you setup for sequence numbers? you don't fetch them from database before tx?
<stellar-slack>
<armed10> We do fetch them, but with 10000 transactions in between, it might not work
<stellar-slack>
<armed10> The first transaction might not have been processed after the second one is submitted
<stellar-slack>
<sacarlson> well it sounds like plenty of time if 10k tx before the next lookup of sequence
<stellar-slack>
<sacarlson> I guess that's like 10 sec so that's not quite enuf time I leave 15 sec for timeout
<stellar-slack>
<sacarlson> since I guess you can perform about 1000 tx per sec
<stellar-slack>
<armed10> So for each account we would ask for a sequence number (10k accounts) then just add one for the second and one more for the third transaction of each account
<stellar-slack>
<sacarlson> so setup 20k accounts that should take 20 sec maybe it will work with out any timing problems
<stellar-slack>
<sacarlson> well if you note after 20 sec that the sequence number didn't change then you know something went wrong on that tx and you can perform it again
<stellar-slack>
<armed10> Maybe we're just pushing the system a bit hard, these aren't exactly heavy duty servers we're testing on
<stellar-slack>
<armed10> What kind of ledger size do you guys use? default or bigger?
<stellar-slack>
<sacarlson> well sounds like you just get out of sync with seq I guess
<stellar-slack>
<sacarlson> what's a ledger size? is that some config on stellar-core?
<stellar-slack>
<armed10> yes, default it does about 400 transaction per ledger (1 ledger every 4-5 seconds)
<stellar-slack>
<sacarlson> I've never played with it. just the defaults
<stellar-slack>
<sacarlson> I would at least try feedback of the sequence number on each tx instead of just incrementing. then you might also detect when it starts failing
<stellar-slack>
<sacarlson> oh as I read my code I'm guessing if your hitting this core hard it will probly fall out of sync with the other cores. when they are not in sync I guess the tx might take a long time to succeed if ever
<stellar-slack>
<sacarlson> so on timeout you could also add a sub that checks the stellar-core status state of sync
<stellar-slack>
<sacarlson> I'm not sure what the transaction return from a stellar-core out of sync is
<stellar-slack>
<armed10> Well I'm testing against a standalone node currently to rule the out-of-sync possibility out
<stellar-slack>
<dchrist22> are you sending over one or multiple connections?
<stellar-slack>
<sacarlson> oh ok so I guess out of sync might not be posible then
<stellar-slack>
<armed10> @dchrist22: I use a simple nodeJS http get, not sure what connections it uses.
<stellar-slack>
<dchrist22> @armed10: okay because I am currently trying out sending over multiple connections. with a single connection I only can send ~10-15 transactions / second to the core
<stellar-slack>
<sacarlson> I would assume you would would have to have multi processes running with some waiting and other setting up new transactions
<stellar-slack>
<armed10> we got up to 58 last round, now we're doing a batch (20 operations per transaction)
<stellar-slack>
<armed10> We only use multiple threads to generate the keypairs for the accoutns
<stellar-slack>
<sacarlson> oh envelopes with 20 transactions?
<stellar-slack>
<armed10> yes
<stellar-slack>
<sacarlson> why not just fill it with 100 or 99 then
<stellar-slack>
<dchrist22> I use for each connection one thread, but basicly without waiting
<stellar-slack>
<armed10> because you can only use 20 signatures per envelope and each account needs to sign
<stellar-slack>
<armed10> 1 transaction per accounts
<stellar-slack>
<sacarlson> IC
<stellar-slack>
<sacarlson> but you could do 5 transactions per account then with 100
<stellar-slack>
<armed10> indeed
<stellar-slack>
<dchrist22> thats also something what I tested. one tx with 100 operations in it, all from one account
<stellar-slack>
<armed10> @dc
<stellar-slack>
<armed10> Also, it wouldn't exactly mimic real-world behavior
<stellar-slack>
<dchrist22> @armed10: yes, that's true. It was more a way to get many transactions into the network than mimic a real scenario
<stellar-slack>
<fredolafritte> @armed10: what is the value of the configuration parameter `DESIRED_MAX_TX_PER_LEDGER` ?
<stellar-slack>
<fredolafritte> also check or set `HTTP_MAX_CLIENT`
<stellar-slack>
<fredolafritte> with a standalone config and the client taking more than 70% CPU on a 4-year-old mac, the number of transaction per second should be at least 350 TPS
<stellar-slack>
<fredolafritte> to find out when the transaction has been included in the ledger, you could the library [pg-live-table](https://github.com/FredericHeem/pg-live-table) which monitors the postgresql table `txhistory`, no more polling, it's event based