freigeist
|
|
August 24, 2014, 11:18:16 AM |
|
Hello. funny image you have put there it made my laugh --
I also discovered that SQLite doesn't free shared locks unless you explicitly call finalize() or reset() and this makes working with prepared statements a bit of a hassle. Had to write additional code to manage automatic destruction of these statements too...
Databases are hard!
Yes they can be very hard sometimes depending on the complexity of the workflow that you need to implement. One thing that maybe you could do is to use memory tables to save transactions in memory and periodically dump them in 1 second timeframe onto the disk. In MySQL (i think SQLite too ) when you create a table you can specify the database engine that you want to be used with this table. Using memory tables can improve performance but then you get other limitation because if you need transaction and rollbacks this features are not supported in memory tables.
|
|
|
|
|
|
|
|
"Bitcoin: the cutting edge of begging technology." -- Giraffe.BTC
|
|
|
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
|
|
|
NxtChg (OP)
|
|
August 24, 2014, 11:48:44 AM |
|
One thing that maybe you could do is to use memory tables to save transactions in memory and periodically dump them in 1 second timeframe onto the disk.
Transactions are already queued in memory as C++ objects, so no need for memory tables. Yes, my current approach is to accumulate them in a separate thread for some time, then group into a single DB transaction and write. If checkpointing gets triggered it will not stall the system, because writing is now done in a separate thread and checkpointing doesn't block readers, at least not for any significant time. Thanks
|
|
|
|
Nxtblg
Legendary
Offline
Activity: 924
Merit: 1000
|
|
August 24, 2014, 04:18:50 PM |
|
Progress report
Wow...it sounds almost like you could write a textbook on DB programming. (So stop complaining that this project is taking too long – go invest in toy coins that don't pay attention to this kind of stuff).
Not complaining at all...in fact, I'm sitting here regretting that I'm fiat-broke and BTC-locked. If only I had a few thousand to spare, I'd be bothering you with another deposit to SimXchg.
|
|
|
|
NxtChg (OP)
|
|
August 25, 2014, 10:44:03 AM Last edit: August 25, 2014, 10:57:35 AM by NxtChg |
|
2014/08/24 Monero Blockchain Spam Attack - Post Mortem
On 2014/08/24 a spam attack was launched against the Monero blockchain. Up to that point, Monero had a relatively low fixed fee per transaction of 0.005 XMR (under 1 US cent per transaction). This allowed the attacker to broadcast extremely large transactions every 5 seconds.
For the most part, the network worked as expected. The dynamic block size limit allowed the max block size to grow, and transactions were broadcast without incident. However, the (relatively) slow expansion in the median block size, among other things, lead to some transactions taking some time to confirm. This is not the usual turn of events - normally an increase in usage occurs over a couple of days in a best case scenario (Monero is featured on Dr Phil and Oprah, and every Monero user gets a whale once they check under their seat). At its worst, there were ~400 transactions in the memory pool that were waiting to be confirmed. The sudden, sharp, drastic increase means that the network needed to adjust, and in the interim some transactions took anything from a few extra minutes to an hour longer than usual.
Let me get this right, an unusually large transaction every 5 seconds brought Monero to a halt and required an urgent fork to hike up the fees. See, what I am talking about? Almost every coin out there now is a toy coin. The fact that they seem working is just a consequence of the fact that nobody bothered to seriously rattle them.
|
|
|
|
klee
Legendary
Offline
Activity: 1498
Merit: 1000
|
|
August 25, 2014, 11:18:34 AM |
|
2014/08/24 Monero Blockchain Spam Attack - Post Mortem
On 2014/08/24 a spam attack was launched against the Monero blockchain. Up to that point, Monero had a relatively low fixed fee per transaction of 0.005 XMR (under 1 US cent per transaction). This allowed the attacker to broadcast extremely large transactions every 5 seconds.
For the most part, the network worked as expected. The dynamic block size limit allowed the max block size to grow, and transactions were broadcast without incident. However, the (relatively) slow expansion in the median block size, among other things, lead to some transactions taking some time to confirm. This is not the usual turn of events - normally an increase in usage occurs over a couple of days in a best case scenario (Monero is featured on Dr Phil and Oprah, and every Monero user gets a whale once they check under their seat). At its worst, there were ~400 transactions in the memory pool that were waiting to be confirmed. The sudden, sharp, drastic increase means that the network needed to adjust, and in the interim some transactions took anything from a few extra minutes to an hour longer than usual.
Let me get this right, an unusually large transaction every 5 seconds brought Monero to a halt and required an urgent fork to hike up the fees. See, what I am talking about? Almost every coin out there now is a toy coin. The fact that they seem working is just a consequence of the fact that nobody bothered to seriously rattle them. Few, but ripe. -Carl Friedrich Gauss
|
|
|
|
xiaosu
|
|
August 25, 2014, 11:21:51 AM |
|
At least NxtChg is still work and i trust this guy coz he is really have balls.
|
|
|
|
klee
Legendary
Offline
Activity: 1498
Merit: 1000
|
|
August 25, 2014, 12:05:28 PM |
|
Most coins promise so many features and breakthroughs and shills try to hype them. I have invested in some of them too but when SIM will ROI like BTC and NXT I will be again the one who saw it again.
The rest can go follow stupid pump & dumpers at twitter and NXT AE..
|
|
|
|
fotathan
Newbie
Offline
Activity: 7
Merit: 0
|
|
August 25, 2014, 03:27:35 PM |
|
Most coins promise so many features and breakthroughs and shills try to hype them. I have invested in some of them too but when SIM will ROI like BTC and NXT I will be again the one who saw it again.
The rest can go follow stupid pump & dumpers at twitter and NXT AE..
+1 I'm with you on that!
|
|
|
|
wizzardTim
Legendary
Offline
Activity: 1708
Merit: 1000
Reality is stranger than fiction
|
|
August 25, 2014, 05:27:56 PM |
|
Most coins promise so many features and breakthroughs and shills try to hype them. I have invested in some of them too but when SIM will ROI like BTC and NXT I will be again the one who saw it again.
The rest can go follow stupid pump & dumpers at twitter and NXT AE..
Well said
|
Behold the Tangle Mysteries! Dare to know It's truth.
- Excerpt from the IOTA Sacred Texts Vol. I
|
|
|
NxtChg (OP)
|
|
August 25, 2014, 05:30:42 PM |
|
Thanks for your support, guys
|
|
|
|
NxtChg (OP)
|
|
August 25, 2014, 07:40:58 PM |
|
class Thread { protected: HANDLE h; public: virtual void run(){ }
bool start(){ h = (HANDLE)_beginthread(Run, 0, this); return (h > 0); }
static void __cdecl Run(void *obj){ ((Thread*)obj)->run(); } };
Ain't this class a beauty?
|
|
|
|
lemfuture
|
|
August 25, 2014, 07:43:01 PM |
|
i don't get it ^
|
1ADLcfwTofFXb95pKhebpeRkJ4WTWsvQXB
|
|
|
NxtChg (OP)
|
|
August 28, 2014, 12:08:41 PM |
|
|
|
|
|
kufan
|
|
August 30, 2014, 06:08:52 AM |
|
It seems that it will become a good coin.
|
|
|
|
dance
|
|
August 30, 2014, 10:19:45 AM |
|
What speed of transactions it will have?
My design goal is "at least 100 transactions per second with confirmation time under 1 second". Ye, that's why I'm asking. How fast transactions will be in the September's core release? Is it possible to have (and exceed) the TPS of Visa? By the way, transaction size: * Bitcoin: 250 bytes (although it can easily reach 5-10 Kb, depending on the number of inputs and outputs) * NXT: 160 bytes * SIM: 96 bytes Not bad.
Yes, but 100 bytes * 30,000 tps = 3MB/s. Which brings me to thoughts about decentralized currencies having decentralized hierarchy.
|
|
|
|
NxtChg (OP)
|
|
August 30, 2014, 11:09:58 AM |
|
Is it possible to have (and exceed) the TPS of Visa?
No crypto will be able to match Visa any time soon. Luckily, it will also probably not be needed in the nearest future. Yes, but 100 bytes * 30,000 tps = 3MB/s. Which brings me to thoughts about decentralized currencies having decentralized hierarchy.
30,000 TPS is a ridiculous number. And at 100 TPS it will be just 10 Kb/sec.
|
|
|
|
dance
|
|
August 30, 2014, 11:29:29 AM |
|
Is it possible to have (and exceed) the TPS of Visa?
No crypto will be able to match Visa any time soon. Luckily, it will also probably not be needed in the nearest future. Yes, but 100 bytes * 30,000 tps = 3MB/s. Which brings me to thoughts about decentralized currencies having decentralized hierarchy.
30,000 TPS is a ridiculous number. And at 100 TPS it will be just 10 Kb/sec. 25,000 TPS it is just what is written about Visa alone. There are other payment systems, plus I guess most of the people on the planet still using paper money. I don't want to hear about crypto not trying to supersede majority of money transactions in the world.
|
|
|
|
NxtChg (OP)
|
|
August 30, 2014, 11:39:37 AM |
|
I don't want to hear about crypto not trying to supersede majority of money transactions in the world.
I guess if you lived a century ago you would go to Wright brothers and tell them that you are very upset they do not build their planes to be able to fly to Mars...
|
|
|
|
klee
Legendary
Offline
Activity: 1498
Merit: 1000
|
|
August 30, 2014, 11:44:55 AM |
|
I don't want to hear about crypto not trying to supersede majority of money transactions in the world.
I guess if you lived a century ago you would go to Wright brothers and tell them that you are very upset they do not build their planes to be able to fly to Mars... I HAVE A DREAM!!!!....
|
|
|
|
|