Crypto economy for minecraft. WORK IN PROGRESS
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
gradle/wrapper
licenses
src
.gitignore
.gitmodules
.travis.yml
LICENSE.md
README.md
build.gradle
deploy.sh
gradlew
settings.gradle

README.md

Reddconomy Build Status Docker Build (doge_amd64) Status Docker Build (rdd_amd64) Status

Reddcoin-based economy for minecraft.

WORK IN PROGRESS

DO NOT USE THIS WITH REAL COINS


Setting up the test environment

The latest snapshot of the master branch can be downloaded from HERE or automatically with the following script

VERSION="`curl -L  https://dl.bintray.com/reddconomy/Reddconomy/Reddconomy_latest.txt`"

#Download sponge plugin
curl -L https://dl.bintray.com/reddconomy/Reddconomy/Reddconomy-sponge-$VERSION.jar -o Reddconomy-sponge.jar

#Download backend
curl -L https://dl.bintray.com/reddconomy/Reddconomy/Reddconomy-$VERSION.jar -o Reddconomy.jar

To run reddconomy you'll need four components:

  • A bitcoind (or fork!) daemon with RPC enabled (dogecoind, reddcoind ... ).
  • The reddconomy backend (Reddconomy.jar)
  • A MYSQL server (optional, currently not implemented)
  • A sponge server with the Reddconomy-sponge.jar plugin

How things connect?

  • (Bit)coind daemon connects to the blockchain and exposes the RPC interface
  • Backend connects to the MySQL/SQLite database and to (Bit)coind daemon and exposes the HTTP Apis
  • The sponge Plugin connects ONLY to Backend

Since the backend and the sponge server can be hosted on different machines, the connection between the two is protected with a secret key generated at the first start by the backend and stored in reddconomy.json. You'll need this secret key to configure the plugin.

Fastest way to run the backend with Docker

For simplicity we have a docker container that runs the latest backend snapshot, to use it, you need to:

  1. Start the container (/srv/reddconomy_testnet is the path where the blockchain and other configuration files will be stored persistently)

With Reddcoin

docker run --name=reddconomy_test -d -p 8099:8099  -v /srv/reddconomy_testnet:/data --restart=always riccardoblb/reddconomy-backend-testnet-docker:rdd_amd64

Or with Dogecoin

docker run --name=reddconomy_test -d -p 8099:8099  -v /srv/reddconomy_testnet:/data --restart=always riccardoblb/reddconomy-backend-testnet-docker:doge_amd64
  1. Get the secret key required to connect the plugin, save this somewhere, you'll need it later
docker exec -it reddconomy_test cat /data/reddconomy.json | grep secret
  1. Wait for the blockchain to synchronize, you can check the status with
docker logs reddconomy_test --tail 50

Other useful commands

  • Get wallet info
docker exec -it reddconomy_test  bash -c '/opt/dogecoin/bin/dogecoin-cli   -conf="${DATA_DIR}/${CONFIG_FILE}" -datadir="${DATA_DIR}" getwalletinfo'
  • Get available balance
docker exec -it reddconomy_test  bash -c '/opt/dogecoin/bin/dogecoin-cli  -conf="${DATA_DIR}/${CONFIG_FILE}" -datadir="${DATA_DIR}" getbalance'

Configure the plugin

  1. You'll need to have a running sponge server check the official documentation for that
  2. Copy the plugin in the mods/ directory
  3. Start the server
  4. Stop the server
  5. Edit the newly generated config/reddconomy-sponge.conf to use the secret key generated by the backend
  6. Start the server again
  7. Done.

Build from sources

Build backend

gradle buildBackend

Build plugin

gradle buildSpongePlugin