[WIP] Satoshis - Bitcoin-based Minecraft Economy

Discussion in 'WIP and Development Status' started by Meta1203, Nov 20, 2012.

Thread Status:
Not open for further replies.
  1. Offline

    Meta1203

    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/
     
  2. Offline

    egokick

    Brilliant, do you think this could be integrated with the physical shop plugin?
     
  3. Offline

    Joshua Burt

    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/
     
  4. 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.
     
  5. Offline

    Meta1203

    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.
     
  6. Offline

    Joshua Burt

    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. ;)

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 30, 2016
  7. Offline

    Meta1203

  8. Offline

    Joshua Burt

    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! :)
     
  9. Offline

    Meta1203

    Excellent! I will start implementing this. Expect to see it in the repo soon!
     
  10. Offline

    Joshua Burt

    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

    Well, so far.. getServerInfo doesn't appear to work, but getBalance appears to..

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 30, 2016
  11. Offline

    Joshua Burt

    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. :/
     
  12. Offline

    Meta1203

    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.
     
  13. Offline

    Joshua Burt

    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! :)
     
  14. Offline

    Meta1203

    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.
     
  15. Offline

    Meta1203

    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...
     
  16. Offline

    Sleaker

    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.
     
  17. Offline

    Meta1203

    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.
     
  18. Offline

    Joshua Burt

    Sure thing! I'll take a look at the current code base.
     
  19. Offline

    Meta1203

    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.
     
  20. Offline

    The_Architect

    this sounds like good news,. so you think there is any chance we could maybe apply this to other coins? just kinda wondering because we have a project that I would not mind taking megacoins or quark or some others that are out there :)
     
  21. The_Architect
    You do realize that this thread has been inactive for over a year?
     
  22. Offline

    The_Architect

    does this mean it is dead? can some one reach out to the developer? also since the last person to respond here was the thread starter, so is it not possible that if he gets a response to it, that he will come back and discuss it further?
     
  23. Offline

    niels1189

    We still want this back
     
  24. Offline

    Meta1203

    I'm beginning work on a new plugin like this, but with some changes (primarily alt-coin support). The changes will take a while, but I'll submit a new bukkitdev link when it is usable.
     
  25. Offline

    Lactem

    You should add support for Dogecoins. Who doesn't like those?
     
  26. Offline

    Meta1203

    The plan is to use a modular system to allow for multiple cryptocurrencies and in game functions using a public api. I am also going to support bitcoin, litecoin, and dogecoin right off the bat. The api will be there for anyone else who wants to add their own currency support in game functionality.
     
Thread Status:
Not open for further replies.

Share This Page