Bitcoin Forum
July 05, 2024, 07:32:50 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 [44] 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 ... 193 »
861  Economy / Gambling / Re: How do you create a dice gambling site? on: July 01, 2014, 07:38:15 PM
What does it mean when a transaction changes? When a transaction changes from 1 confirmation to 2 confirmation? Or does any new transaction count as a transaction change?

According to the comment in the source code:

// notify an external script when a wallet transaction comes in or is updated

It is done in CWallet::AddToWallet() which appears to be called when a transaction is seen on the network as a standalone transaction or in a block. It won't be called for the 2nd or later confirmation of a transaction.

I don't see an obvious way of defending against malleability attacks using this. It's quite possible you'll see a deposit to a customer address from an unconfirmed transaction, and then later see a deposit of the same amount to the same address from a transaction with a different txid that made it into a block, where the two transactions are mutually incompatible since they have the same inputs.

In other words, there's -walletnotify to tell you when a new transaction arrived, but there's nothing to tell you when that transaction was overwritten by a new version of the same transaction.

Yes walletnotify should NEVER be the only way to accept payments, I use it so I can run a cronjob every 5mins and still make it snappy. It basically tells my java application that a payment could be on it's way and to track this one.
862  Economy / Gambling / Re: How do you create a dice gambling site? on: June 30, 2014, 11:56:45 PM
Code:
-walletnotify=<cmd>    Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)

What does it mean when a transaction changes? When a transaction changes from 1 confirmation to 2 confirmation? Or does any new transaction count as a transaction change?

Yes that is why I run bitcoind in tx=1 so I can track the transaction.
863  Economy / Gambling / Re: How do you create a dice gambling site? on: June 30, 2014, 10:49:35 PM
So the flow I did for javaEE, is a couple of checks. One was a cronjob, in tomcat they are not called that, this runs every 5 mins (remember I wait for 1 confirmations anyway, so I don't have to run every 5-10 secs which is probably what you would do for non-confirmed transactions). For my next check, I always run bitcoind in -tx=1 mode so I have access to the entire bitcoin blockchain, and don't have to use a blockchain api. Then using netcat and java socket server, I would have bitcoind send any wallet transactions to the socket server, and put in a queue (any first in first out data structure would work). Remember take this with a grain of salt this transaction, it is usually a non-confirmed transaction, and it can be subject to many attacks. This just alerts my application that a transaction is possible waiting and to track it a bit.

Thanks gweed Smiley

Would you ever consider using the websockets API ( https://blockchain.info/api/api_websocket ) with grep to filter out only transactions to the addresses you are interested in?

Code:
dumpsockets.py ws://ws.blockchain.info/inv | grep -f myaddresses.txt

I'm learning about websockets because I really like the "live" information concept instead of running a script over and over again.

Depends on the situation. For me bitcoind over everything, because I have trust issues Wink but looking at the callbacks of bitcoind...

Code:
-walletnotify=<cmd>    Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)
https://en.bitcoin.it/wiki/Running_Bitcoin#Command-line_arguments

You can't beat them, just don't trust them too much, since they are all done with no confirmations.
864  Bitcoin / Project Development / Re: NSFW site looking for help on: June 30, 2014, 10:24:30 PM
Marketing is probably what he needs the most, and probably a good UI designer.

That is all it takes my friend, good luck!
865  Economy / Gambling / Re: How do you create a dice gambling site? on: June 30, 2014, 10:18:29 PM
So basically I make a new address for each user, but it's just 1 of many addresses in the hot wallet?

Yes. At Just-Dice I used bitcoind, and simply did getAddressesByAccount() to see if there was already an address associated with a userid, and getAccountAddress() to get one if there wasn't. Then you can listAccounts() to see the balance for each account with the required number of confirmations and move() to move the funds from a player's 'account' to the main hot wallet account so you don't count it twice.

Recently I heard Gavin saying that the 'accounts' feature in bitcoind is likely to be removed soon, so I guess this isn't a good idea to use any more.

I would advise against the account feature, it isn't meant to be a database, like you are using it. I usually just keep a database table that links addresses to users, I think this system is more robust than using the account feature.


And to be honest I have written dice games in javaEE, which is actually really strong.

How do you get live updates from new deposits. Do I have to check for new deposits for every possible deposit address once per minute? What do you recommend to run so that when a deposit happens there is a event that says "Hey, you got a new deposit" and how do you link this to the site?

So the flow I did for javaEE, is a couple of checks. One was a cronjob, in tomcat they are not called that, this runs every 5 mins (remember I wait for 1 confirmations anyway, so I don't have to run every 5-10 secs which is probably what you would do for non-confirmed transactions). For my next check, I always run bitcoind in -tx=1 mode so I have access to the entire bitcoin blockchain, and don't have to use a blockchain api. Then using netcat and java socket server, I would have bitcoind send any wallet transactions to the socket server, and put in a queue (any first in first out data structure would work). Remember take this with a grain of salt this transaction, it is usually a non-confirmed transaction, and it can be subject to many attacks. This just alerts my application that a transaction is possible waiting and to track it a bit.

Now that we verified that indeed we have a new balance, I use web sockets to push it to the user. JavaEE is amazing at writing this in a simple class. If you don't want to use websockets, or the the users can't get a good connection, then just simple javascript polling works as well. Then that updates the frontend accordingly. Remember to always check the balance before executing anything server side. This is just a view, and should never be trusted.

Pretty sure listreceivedbyaddress also protects against that.

I looked into it - I don't see any way to prevent it returning the entire list of addresses and transactions each time you call it.

That's a huge ever-growing amount of data to parse over and over again.

I'd much rather have bitcoind do all that grunt work for me and just tell me which account has a new confirmed deposit.

Yes it is a big list, but what I usually do with java, is just hold on to it in an array of objects and remove the the ones we have already processed already. I can always build that array at startup from the double entry database, incase of shutdown or restart.
866  Economy / Gambling / Re: How do you create a dice gambling site? on: June 30, 2014, 04:56:27 PM
I always wait at least 1 confirmation. I always do a double entry balance and withdrawl, then I use listreceivedbyaddress to get the transactions.

What do you do if there's a 2 block reorganisation, and the deposit changes its transaction ID?

Would you credit it twice?

Pretty sure listreceivedbyaddress also protects against that.
867  Economy / Gambling / Re: How do you create a dice gambling site? on: June 30, 2014, 05:35:44 AM
Buy the script from other and i think they have the details  Wink
Buying the script is kinda lame. I'll feel a lot better about it if I build it completely.
Curious, how much does the script cost?

Make sure their is no backdoors, in the RNG or in the software in general.

The problem with this is that if the programmer isn't experienced enough, which is usually the reason for buying the scripts, they won't know what to look for in terms of insecurities and backdoors.

That is why you pay someone to look it over, that you trust as a programmer.
868  Economy / Gambling / Re: How do you create a dice gambling site? on: June 30, 2014, 04:00:28 AM
Buy the script from other and i think they have the details  Wink
Buying the script is kinda lame. I'll feel a lot better about it if I build it completely.
Curious, how much does the script cost?

Make sure their is no backdoors, in the RNG or in the software in general.
869  Economy / Gambling / Re: How do you create a dice gambling site? on: June 30, 2014, 02:38:49 AM
I would advise against the account feature, it isn't meant to be a database, like you are using it. I usually just keep a database table that links addresses to users, I think this system is more robust than using the account feature.

Then how do you keep track of which incoming payments are for which user, and make sure not to credit them twice in the event of a blockchain re-org or transaction malleability?

The account system takes care of all that for you. I wouldn't want to have to reinvent the wheel.

I always wait at least 1 confirmation. I always do a double entry balance and withdrawl, then I use listreceivedbyaddress to get the transactions.
870  Bitcoin / Project Development / Re: Sexy Bitcoin News Show needs investor on: June 30, 2014, 01:23:33 AM
She is real, I have seen her, and she has been talking to me about this idea, I think this would be great fun thing for bitcoin to be involved in!

Hope more people get involved and help her out!

871  Bitcoin / Project Development / Re: Thinking develop a dice casino. What do you think? on: June 29, 2014, 11:00:08 PM
The scripts are cheap. It seems a good business if I can attract enough people. What do you think? Advices?

wasting time

Yes it is a waste of time, the market is flooded.
872  Economy / Gambling / Re: How do you create a dice gambling site? on: June 29, 2014, 10:40:42 PM
So basically I make a new address for each user, but it's just 1 of many addresses in the hot wallet?

Yes. At Just-Dice I used bitcoind, and simply did getAddressesByAccount() to see if there was already an address associated with a userid, and getAccountAddress() to get one if there wasn't. Then you can listAccounts() to see the balance for each account with the required number of confirmations and move() to move the funds from a player's 'account' to the main hot wallet account so you don't count it twice.

Recently I heard Gavin saying that the 'accounts' feature in bitcoind is likely to be removed soon, so I guess this isn't a good idea to use any more.

I would advise against the account feature, it isn't meant to be a database, like you are using it. I usually just keep a database table that links addresses to users, I think this system is more robust than using the account feature.


And to be honest I have written dice games in javaEE, which is actually really strong.
873  Other / Archival / Re: Coindesk Censorship on: June 29, 2014, 01:45:14 AM
Yes coindesk is only used to promote Khan's investments!
874  Economy / Services / Re: Are You A Developer? Could I Ask You Some Questions (Costs $$) ? on: June 28, 2014, 08:35:27 PM
I've got the time to write out what I want, so here it is:

- Image Gallery
- I can categorize / tag images
- People can comment/rate images
- Blog page
- Social media (tweet this image, facebook etc)
- Create an account if you don't want to comment in facebook/twitter etc
- easily editable (wordpress?)
- Basic graphics

 

I suspect this can be done in WordPress, correct?

Yes, there are plugins for most of these things already.
875  Bitcoin / Project Development / Re: [ANN] Beyond Bitcoin Show on: June 28, 2014, 04:50:42 PM

I am not sure why the password wouldn't work.  Go to beyondbitcoinshow.com and click on "Get involved".  We are about to go online in 5 minutes.

Cause the password on the site has a ! not a 1
site password:
Quote
w0rldCh@NG3rsUN!t3

Password in OP
Quote
w0rldCh@NG3rsUN1t3
876  Bitcoin / Project Development / Re: BitcoinAverage.com - bitcoin price index on: June 28, 2014, 05:23:49 AM
Hey guys, we really need you to not be offline.

https://github.com/bitcoinaverage/bitcoinaverage Why not run it yourself?
877  Bitcoin / Project Development / Re: [ANN] Beyond Bitcoin Show on: June 28, 2014, 04:24:10 AM
The password doesn't work...
878  Bitcoin / Bitcoin Discussion / Re: Would you blacklist/block any coins/addresses if given the option?? BTC BS on: June 28, 2014, 01:49:20 AM
As much as I think everyone here has been taken advantage at one point and would love to teach those scammers a lesson, for the greater good of the experiment I think most of us would give up that ability. I know if a scammer took all my bitcoins I wouldn't use blacklist of any sort and take responsibility as my own fault.
879  Bitcoin / Bitcoin Discussion / Re: Delta Financial Offers Interest-Bearing Bitcoin Accounts on: June 27, 2014, 08:12:14 PM
I can see people are taking the pirateat40 model.

For any newbies, pirateat40 had a ponzi scheme, which first started off him trying to day trade the funds to get the 7% he was offering.

I don't think it's fair to compare 5% per year with the 7% per week Pirateat40 offered at Bitcoin Saving and Trust.

It is the same model, you do realize that.

How so? This bank is loaning out leverage to people with the deposited btc is it not? Pirate didn't do anything of the sort.

Yes pirate traded his currency, and this bank is lending it out to people to trade. What happens if whales come in and just easily scape the trades and take all the coins, then you don't get your 5% or any coins back. It is highly risky, and so was pirate, same model. Please do your research.

It's not the same model at all. They also take US dollars and they're not just going to give out leverage to anyone who walks in the door. Not to mention they will stop people out of a trade if they have to.

It's really not like Pirate at all. A person who took peoples deposits and attempted to day trade with them while promising them ~370% interest is not the same as a financial institution offering 5% per year. Offering leverage and profiting of peoples trading is not the same at all to day trading. I can't imagine where you're connecting the two.

I am looking at both from a rational view. You are looking at one as this financial institution which can't lose money. Plus do they even have the proper licenses? And yes they are giving accounts to anyone that walks in the door, I was given account their Wink I seen there beta in action.
880  Bitcoin / Bitcoin Discussion / Re: Delta Financial Offers Interest-Bearing Bitcoin Accounts on: June 27, 2014, 07:25:48 PM
I can see people are taking the pirateat40 model.

For any newbies, pirateat40 had a ponzi scheme, which first started off him trying to day trade the funds to get the 7% he was offering.

I don't think it's fair to compare 5% per year with the 7% per week Pirateat40 offered at Bitcoin Saving and Trust.

It is the same model, you do realize that.

How so? This bank is loaning out leverage to people with the deposited btc is it not? Pirate didn't do anything of the sort.

Yes pirate traded his currency, and this bank is lending it out to people to trade. What happens if whales come in and just easily scape the trades and take all the coins, then you don't get your 5% or any coins back. It is highly risky, and so was pirate, same model. Please do your research.
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 [44] 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 ... 193 »
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!