Hello all! I would like to introduce you to my new pet project: Satoshis! This plugin is a basic minecraft economy system... however, it allows users to add and subtract money to their accounts using Bitcoin, a relatively new, digital currency. Learn more about it here: https://en.bitcoin.it/wiki/Main_Page Features: This uses real world money, so system/item protection is ususally necessary. (Unless you don't want anyone playing on your server. Tax is a core part of the system, allowing the server owner to take a certain percentage of all in-game transactions for himself (Server upkeep/Greed). Vault integration Allocated Bitcoin addresses for configurable amount of time. Bitcoin multipliers - One bitcoin does not have to equal 1 in-game coin. You could multiply one Bitcoin by 100, 500, or just 2. The value is in the config. SHOUTOUT TO PLUGIN DEVELOPERS! I would like some help with this plugin. If you could spare a little bit of your time, just PM me here, on BukkitDev, or on Github. I'll get back to you as soon as I can. Github: https://github.com/MetaServe/Satoshis BukkitDev: http://dev.bukkit.org/server-mods/satoshis/pages/main/
Lots of people are interested in this. I got close with the Bit Mines http://www.thebitmines.com. Let me know if you need development assistance. I'm just finishing up the core to this system and will be releasing it soon. Good Luck! Also I went the original route you did with setting up a dedicated bitcoind that I communicate with. This new way has some interesting security implications: http://code.google.com/p/bitcoinj/wiki/SecurityModel Also I wrote up a lot of information on ways to approach this if you're interested: http://www.shapeandshare.com/2012/11/25/bitcoin-and-minecraft-together-at-last/
Also make sure to get in contact with the Vault dev as soon as your API reaches a stable state so it will at best be supported when you release it.
Joshua (or Josh, if you don't mind me calling you that), what do you use for the bitcoind backend connection? I have been looking for a good jsonrpc API, but I cannot seem to find any that I can wrap my feeble mind around. jsonrpc4j seems to be a good choice, but it seems confusing.
For the bit mines I did all the bitcoind communications in python using these libraries: Python json-rpc (http://json-rpc.org/wiki/python-json-rpc) module Python Bitcoin-python (https://github.com/laanwj/bitcoin-python) module For a Java implementation I'd also probably look at jsonrpc4j. I'll see if I can get a working demo implementable. Sometimes it makes all the difference. EDIT: Found this link: https://en.bitcoin.it/wiki/API_reference_(JSON-RPC) Might provide easier implementations. I'll start here.
Another thing to consider is using the BOSEconomy API (http://dev.bukkit.org/server-mods/boseconomy/pages/plugin-interfacing-api/) and only implement the hand-off between the bitocoin network and the economy plugin. That was the approach I was going to use anyway.
Could this work as well? http://sourceforge.net/projects/bitcoin-client/ It looks good, it just needs further research and some API experimentation.
Wow good find! The project hasn't been updated in 9 months so it will probably lack some of the wallet (un)encryption [lock & unlock] functions, but that shouldn't get in the way. They don't document the API for the project, but there is a sample application in the SVN repo that uses it and looks very easy to implement!
Getting the dependencies usable during runtime was a bit more problematic for me then I thought it would be. I created a directory in the server folder called 'lib' and put this API library and all it's dependencies into it: bitcoin-client-0.4.0.jar commons-beanutils-1.8.0.jar commons-codec-1.2.jar commons-collections-3.2.1.jar commons-httpclient-3.1.jar commons-lang-2.5.jar commons-logging-1.0.4.jar ezmorph-1.0.6.jar json-lib-2.4-jdk15.jar I had to lanch Bukkit like this to get it to see the libraries: java -Djava.ext.dirs="C:\Program Files\Java\jdk1.7.0_07\jre\lib\ext;lib" -jar craftbukkit-1.3.2-R2.0.jar
Let me know if the move function 'bClient.move(..)' works for you. So far calling the function locks up both the bukkit server and the bitcoin client in my implementation. :/
Upon further research, I have found out that BitcoinJ's security implications are easily negligible, mainly using a "Transaction Stack". Once the transaction appears, simply push it to an ArrayList of Transactions, to be checked for confidence every couple of minutes or so. In your opinion, would this work? Also, do you think that the confidence levels and period of confidence check should be provided in a configuration file? I think that would empower the server owner a little more, but could cause him/her trouble with an incorrect configuration.
I agree! I spent time yesterday re-reading their security information on Finney attacks and automated online stores. I think the risk is negligible and well within the bounds of acceptable for this application. Since transaction confidence will change over time I really like your approach of reviewing it periodically. Definitely make the confidence level and interval configurable for admins as I think people will want to change this based on their specific use-cases. I’ve ditched the bitcoin-client work I did earlier this week validating the usefulness of the API and have started reviewing your code base. I’ll ping you on github for anything specifically related to the source. Good job so far!
So, my last two commits were spent further implementing bitcoinj. However, it seemed almost too easy... I have a feeling that the code does not work/is insecure. Could you have a peek at my code and see what, if anything, is wrong? I'll work more on the bukkit side of the code tonight.
Well, @Sleaker just rejected adding Satoshis support to Vault, so we are out of luck in that department... I am suddenly thinking "Without Vault, why should anyone implement Satoshis in their plugin/I keep working on this plugin?" So far, the code has been nothing but buggy, accepting-but-not-really all deposits. I guess I am just tired. I thought that this would be a great plugin, but so far it has been nothing but a headache...
There's a common misconception here. There is no reason you can't implement the Economy API in your own plugin and register it just like Vault does. The reasoning behind me not putting a connector directly in Vault is pretty easy to understand. I would rather all code for your economy be in your economy, that way if there are problems or bugs in the connector I'm in no way liable for people complaining about losing their money. Like I said on github, I'm not comfortable with it in Vault, but that doesn't stop you from coding it yourself and registering it in your own plugin.
No, I know why you do not want it in your code. You don't want any trouble if people lose their money through minecraft. I just wanted Vault integration due to the massive amounts of shop plugins that use it. I would have to make a good enough reason to the shop plugin owners why they should link their plugin to mine, instead or in addition to Vault. I am in no way mad at you, I just am a little disappointed that I could realize my plugin to its full potential.
Okay, so... Vault is a go. @Sleaker showed me a way to implement Vault without modifying Vault itself. Unfortunately, I cannot control what other plugins do with my Vault implementation. While some plugins will be fine off the bat, most will need to have their configs edited to avoid monetary loss. For example, all "Something from nothing" features must be disabled to prevent overdrawing Bitcoin. I'll post a page on the BukkitDev page about this.