Show Posts
|
Pages: [1] 2 3 4 5 6 »
|
Earlier I was just thinking about detecting double spends and I didn't think further about actually knowing how much has already been pledged. It is possible to fulfill the assurance contract even if you don't know how much each input is worth but that's not a road I want to take: it involves bringing in all pledges together in one transaction, submitting it to a bitcoin node and if it somehow gets in a block then we know that we had enough pledges. But this has so many downsides that I won't try this. The TransactionInput class would need to support caching of the values of the connected outputs. When a transaction is extracted from the chain normally the input values don't matter, you only care about the output values. For pledges you do care. Protobuf serialization would need to be upgraded so you can record that as well.
Agree, this will be needed here. We still have the problem as you stated of knowing what the output is. One is that bitcoind could get a new JSON-RPC to inspect the set of unspent outputs. It means some C++ hacking. Other projects can benefit too. Alternatively, Matt Corrallo has upgraded bitcoinj to be fully validating. I am reviewing and merging his code at the moment. Once that work is merged, it could all be done within Java. I think that approach is probably superior as you have enough control to avoid some tricky race conditions.
I'll wait till this is implemented in bitcoinj, especially if the code's already written  The Wallet class needs to understand what to do with pledges. I guess a wallet could contain both regular valid transactions and pledges. When you try and construct a spend, it would gather all the pledges that shared an identical output and see if the assurance contract can be completed. If so then it's counted towards your balance and will be used to construct a spend. If not, then no. I think TransactionConfidence might need an extension to reflect that the pledge tx is completely invalid.
There also needs to be a distinction to know if the assurance contract sends the bitcoins to an address owned by that wallet or not. The way I imagined this is that people can create assurance contracts on a website for a certain amount of bitcoins to be sent to a certain bitcoin address that they choose. The server manages the collecting of pledges and creates the actual transaction when there are enough. At no point will it be able to spend any of the bitcoins, which I think is a big plus as if the server gets cracked into then no one loses any bitcoins. One question is, what if you have a wallet with regular funds and some pledges, and you construct a spend that wants the value of all of them? You can merge the pledges together, but you can't then merge that completed contract together with another arbitrary transaction. I think the Wallet API needs to be upgraded to support creating multiple transactions as part of a spend. It doesn't play so well with the current design Sad Alternatively you could just impose some basic restrictions for now, like stating a wallet can contain pledges XOR regular funds. It's probably not an issue in practice.
Creating more than one transaction as part of a spend would also be nice too for when an user does not have the correct output values in order to pledge (for instance user has a 20 and 30 BTC transaction but wants to pledge 25 BTC) But I won't worry about it for now as this is not really needed, just a nice bonus 
|
|
|
Thanks, you're helpful as always Mike  This seemed to work, I never thought of adding the pledges to the wallet of the person making the assurance contract since they aren't actually valid transactions (input < output).
|
|
|
I haven't been able to work much on this: only a few hours during the weekends.
Bitcoinj seems to work perfectly for the client (with some changes) but I've been thinking about the server now: I don't think either bitcoinj or the satoshi client have an easy way to know if a certain transaction output is spent?
This is needed so that when there are enough pledges the final transaction can be made with only valid, not already spent, inputs and broadcasted to the bitcoin network.
|
|
|
The foundation site seems to be down now?
Tried locally and on downforeveryoneorjustme.com
|
|
|
This is a great news and I am happy that such a foundation exists with as purpose to help bitcoin grow. From the letter page: So, what will we be doing in 2013 with the Bitcoin Foundation? We’ve set our eyes on accomplishing the following things: -Begin to pay Gavin’s salary and get him some budget for the core development team -Run a payments-oriented Silicon Valley Bitcoin Conference in the spring (Bitcoin 2013) -Publish a set of best practices for businesses transacting in Bitcoin, covering topics from accounting to physical and digital security -Create an opt-in certification process for Bitcoin businesses
Those are great goals which I'm more than happy to help fund. Out of curiosity, I wonder if Gavin's salary will be paid in bitcoins  And for the doomsayers: the foundation does not suddenly have control over all your bitcoins or bitcoin in general. Bitcoin is, and will stay, an open source project. Every single change is publicly viewable and a lot of people do look at them (I do every now and then). If something were to change bitcoin so that it is not bitcoin anymore, then a fork would be quickly created. Besides, as time progresses, we will see more and more alternative clients too. So it will not simply be a matter of changing the main client, but also convincing the developers of every other client too.
|
|
|
wait, is that +4000 BTC for a royal flush?
I wish  I won 4 BTC then. The max bet is 10BTC though (for blackjack, I think it's the same for video poker), so if you do get a royal flush then you're looking at 8000BTC.
|
|
|
Donation sent. Assurance contracts are going to be one of the foundations of Bitcoin's acceptance by the larger world.
Speaking as a non-developing luser, please continue with this line of work.
Thanks, it's appreciated  Cool! Are you following BIP10? I didn't know about this BIP. I looked at it and at first glance it seems good: there is a transaction that needs to be signed. But I don't think it will work for this use case: every user wants to add transaction inputs to this, not just sign them. And they need to be signed using "anyonecanpay". long post...
Thanks  You convinced me to use the bitcoin p2p network itself. I do like the idea of an insurance contract being just a file you can download (which is also what Kjj suggested in his post). Your protobuffer example made this really clear how it can work. This makes the client/pledge application able to work more independently and not tied to one particular server. I've played around a bit with bitcoinj earlier today (while also brushing up my Java knowledge, it's been a while). From a quick look at the source, it seems that creating the contract transaction would already be possible, but the signing of inputs using anyonecanpay isn't possible yet?
|
|
|
I wanted to bump this thread to thank Libertaad for his helpfulness for technical things outside of bitZino. As a way to say thank you, I decided to "donate" my bitcoins to bitZino and found the following display glitch:  (I blackened out my total balance on there)
|
|
|
I strongly suggest to anyone who wants to implement these sorts of apps to consider the language and frameworks you're using beforehand. Python is great for prototyping and scripting. It is a poor choice for building user-friendly desktop apps that perform well. C++ apps are the best for that, but also harder to write. Java sits somewhere in the middle.
I don't want to start a language debate here as there are a lot of arguments made already both in favor and against Python. As an Ubuntu user though, a lot of applications I use are made in Python and they work just fine. The biggest downside is probably portability of a GUI-framework: GTK is horrible in Windows and no idea if it even works on Mac OS X. Qt is probably a better option here, but I don't have any experience with this. C++ would be the best option here, combined with Qt. But I'm only good with Python and .Net. Anything that depends on bitcoins RPC mechanism means you need a full node running, and that will become less and less common in future, especially for end users.
True. Ideally you would just have a website where people can send bitcoins to a certain bitcoin address to pledge how many bitcoins they want and it would not work any differently than sending bitcoins to a normal bitcoin address. But I doubt something like that is possible. The hard part of implementing these systems isn't really the crypto, it's all the stuff you need to layer on top to build a slick and straightforward user experience. Obviously starting with the command line is easy but you should really think ahead to how you can let your parents use it.
I already noticed that  Making this proof of concept was easy, but I've been thinking about how to progress and while there are different ways, they aren't as easy. If I was implementing this system, I'd write start with a GUI Java app using bitcoinj. Not just because I wrote it and so am familiar with it, but because it's able to directly connect to the P2P network and sync a wallet to the chain very fast compared to a full node. Also because the APIs should make it easy to set up the transactions you need. Having a separate wallet is useful because it means you can easily move money in and out, and pledge the same money to the same contracts (a useful ability when there are multiple providers competing to provide a service and you don't know which one will achieve the target first). Then I'd come up with a set of protocol buffers that described an assurance contract, how to submit it to the server and so on. I'd use protocol buffers for even very simple protocols because that way you get easy extensibility and the protocol can be easily described in, eg, a standards document.
I was thinking about something similar, except without any blockchain at all on the client side. Since there needs to be a central server anyways to collect all signed inputs, that central server can keep track of the blockchain too. I imagine something like that: a webserver like kickstarter where people can see all the projects they can pledge bitcoins to. If someone wishes to pledge to a project they can use a client application. This client application is very basic: 1) It creates a new bitcoin address and asks the user to send bitcoins to it. 2) It notifies the server about this address: when bitcoins are sent to it, the server will let the client know and the client will sign a pledge for the assurance contract and send it back to the server. 3) Whenever the server got enough pledges it'll broadcast the final transaction to the server 4) If there aren't enough pledges and the user wants their bitcoins back then the client can create a new bitcoin transaction and send it to the server who will broadcast it. This is, I think, still safe since the private key to this new bitcoin address is kept in the client application and the server never gets access to it. Using bitcoinj to directly connect to the bitcoin network would make some of those steps unnecessary, at the cost of the client having to handle the blockchain. I'm not really sure that extra cost is worth it, even if it goes a lot faster than a full node. Also, with protocol buffers, you mean to use that for the communication between the client and the server, right? If so, why not just use a http server and json? I don't know much about protocol buffers except from looking at the examples. Thanks for your thoughts 
|
|
|
Hello everyone, After seeing Mike Hearn's talk at the conference I wanted to play a bit with some of that stuff so I started working on an assurance contracts proof of concept. Using bitcoin 0.7 and the raw transaction API I got this working on testnet-in-a-box. I haven't tried this on the main bitcoin network. This is a small python script that does three things: 1) Creating a new assurance contract. $ python pledge.py createcontract miA6bqrz9thieUpd5rZmHe1XpTmY6DLjot 7500000000 Contract tx: Amount: 75 To: miA6bqrz9thieUpd5rZmHe1XpTmY6DLjot 01000000000100eb08bf010000001976a9141cf69384eb6b27a8161b59577f41310a93b9c14388ac00000000
2) Adding pledges (this should be done by the various people wanting to pledge some bitcoins): $ python pledge.py pledge 01000000000100eb08bf010000001976a9141cf69384eb6b27a8161b59577f41310a93b9c14388ac00000000 5000000000 Sent 50BTC to address n21Nw4ikZrURVxaydZwYrPmdDyd8J8ZdQw (private key: cVNe9DSbZPe71pzwWpRbiR1n4NQ2Bdqi67g7HGiJCzARtX66nefY) TXId: 0ae14dc7c016d8bce090cfaa2eb88ce1e2818f24d3372c5682118ff5a68e8200
TXOut: 0ae14dc7c016d8bce090cfaa2eb88ce1e2818f24d3372c5682118ff5a68e8200:0 Signing transaction...
Signed input: 00828ea6f58f1182562c37d3248f81e2e18cb82eaacf90e0bcd...
3) The person that made that contract needs to collect all inputs from everyone and put them in a single text file. If there are enough pledges they can be combined and the final transaction sent to the bitcoin network. $ python pledge.py finalize 01000000000100eb08bf010000001976a9141cf69384eb6b27a8161b59577f41310a93b9c14388ac00000000 inputs Sending raw tx... 010000000200828ea6f58f11...
This is still very much a proof of concept: command line application, having to share inputs, big strings that needs to be copied around, ... But it works  The code is on https://github.com/titeuf87/btcassuranceParts of it are copied from bitcoin-python, pynode and pywallet. I think the next thing for this is to divide it in a server/client model: a server that holds assurance contracts and a client that allows people to pledge bitcoins to one of those contract and send a signed input over.
|
|
|
Hello all, I'm looking to purchase a gift card from amazon.fr for an amount of € 25. I used to use spendbitcoins.com, but they stopped this  Any other similar service like this? Or anyone willing to purchase me one? If so, please let me know how many bitcoins you want. We can go through an escrow (not sure about what escrow services are there though) or if you look trustworthy then I can send the bitcoins first. If you want to do this but can't read French I can show you how to do it, the site is very similar to the amazon.com one. Thanks!
|
|
|
I haven't had the chance to play with real bitcoins yet, but I did with play money and I noticed a small bug: while the ball is spinning, it is possible to click on clear bets button. This increases your balance again, although once the ball is done spinning it gets corrected and you see the correct amount again. Also I agree with Casascius's about the popup dialog: I think it would be better if it only shows when you click on an already placed bet. Although you already answered that point  For the rest, great job! I love the clean, minimalistic design of bitZino and the way roulette is implemented fits in nicely.
|
|
|
Fair enough! Thanks for the replies.
|
|
|
Great to hear the site's doing great! I've been having fun with those 0.25 BTC  I do have a small suggestion: could you add a way to see how much you've won/lost per game and total you've deposited and withdrawn? It was easy to add them up myself before when I only had a few deposits, but now it starts taking some work...
|
|
|
Hi there,
Sorry. The form actually should have been disabled, but was left working by accident. None of the Amazons are working at the moment. Please forward your order details and a bitcoin refund address to jeremyATspendbitcoins.com and I'll refund your bitcoins.
Sorry for the inconvenience! Jeremy
Aww ok, I hope you get it fixed soon 
|
|
|
About Amazon: is it just the .com one that's suspended and the .fr one still works?
I guess I should have asked that before placing my order, heh.
|
|
|
Hi Jeremy,
Your site seems to be acting funny: I wanted to purchase something from Amazon. I wrote down my email, the country (France / EUR) and put in the required amount.
When clicking on submit I get pointed to a blank page and nothing seems to happen. I checked my e-mails too but didn't receive any either.
|
|
|
I was playing around on your site earlier, nicely done  One thing that was not obvious for me was how to withdraw: after I've won I wanted to stop playing and withdraw my bitcoins. I clicked on the withdraw link at the bottom of the page and there my bitcoins were shown under "Total balance" and "In-game balance", but not under "Available for withdrawal." It took me a little bit to figure out I had to go back to the table and click there on leave. Also, (just something small): if you're on the withdraw screen and click again on the link to withdraw at the bottom of the page, the "Back"- link just goes back to the withdraw screen. I would think that from the withdraw screen if you click on back you always go back to the table.
|
|
|
Oh...didn't think about checking the fees since the client suggested to add a fee to some and not to others. I thought the defaults were ok. I changed the settings to always include a fee and now it works great! Thanks  And enjoy my bitcoins I'll end up losing on your site!
|
|
|
Sorry, that was a database change I made. I make it use transactions in a more conservative way which ended up being a good bit slower so it was having trouble keeping up with people's bets. It should be much better now. I really need to track some metrics of bet to result time so that this sort of issue is more obvious to us.
It seems to be better now, I had three bets reply right away. But some bets just seems to get stuck. Take the following for instance fb6553405beb57ba270df9814adcfc63b94e6a5be5546b2e519255b0ed557fc8Look at both the bet tx and the payment tx: it took around 20 minutes. Now I have another bet which satoshidice hasn't picked up yet: ff6a2dedc9fd31194806ba8aec7236d32cd4666a5b77fcdc7e01d38bb3cb3b72That one shows up on blockchain.info, but not on the satoshidice website. on the home page when I look at processing status I see that that the last processing pass is from 22:52 with age 4 (that is the number of tx left to process?) I hope you manage to resolve those problems too 
|
|
|
|