Post
Topic
Board Gambling
Re: SatoshiDICE.com - The World's Most Popular Bitcoin Game
by
fireduck
on 03/12/2012, 23:20:28 UTC
So, some recent problems I've been working on:

1) Website/Frontend Database very slow (solved (I think))
I added some calls to a cache to avoid hitting the database.  This has improved things a great deal.

2) We were running out of available funds, which means we would pay with pending funds which can lead to a very poor user experience.  I've made a change such that once the available funds drops below a certain point Satoshidice will only process bets that meet our isLegit() check.  This check passes if the transaction is confirmed or if the transaction and all its UNCONFIRMED parents are known by Satoshidice and have a fee of at least 0.0005 BTC and if the depth of unconfirmed parents is less than 8.  This can lead to a delay, but I think it makes sense when available funds are running low to use them on the transactions most likely to confirm soon first.

3) We have had some things that have made me question the integrity of some of our databases.  As a recent example one of our internal reports of funds in accounts was off by several thousand BTC.  This is not good and led to the system thinking there was more funds than actually were there in our online wallet causing it to automatically send excess funds to an offline wallet.  This of course didn't help with problem #2 above.  I'll be working to track that down.  In the process of doing that there have been some outages in processing last night and this morning.  There will likely be more as I rebuild tables and do consistency checks over the next week or so.