Skip to content
This repository has been archived by the owner on Apr 13, 2022. It is now read-only.

Latest commit

 

History

History
39 lines (19 loc) · 1.86 KB

README.md

File metadata and controls

39 lines (19 loc) · 1.86 KB

Scorex Example: Twinscoin

Currently, Scorex's distribution contains one example of blockchain system built on top of Scorex: TwinsCoin.

Twinscoin is a hybrid Proof-of-Work(PoW) and Proof-of-Stake(PoS) cryptocurrency with 1:1 correspondence between PoW and PoS blocks. The main goal is to protect the hybrid chain against majority of hashing power being adversarial.

The main characteristic of the implementation are:

  • The use of the Twinscoin consensus protocol;

  • A Bitcoin-like transaction model with a transaction having multiple inputs and outputs (with no scripts, however);

  • Persistence through the IODB versioned key-value database.

Execution

To run, you need to have Java8 and SBT (Scala Build Tool) installed.

In the terminal, run sbt, and then type the following commands in the SBT shell:

  1. > project examples
  2. > runMain examples.hybrid.HybridApp src/main/resources/settings.conf

This will create and run a node with the given settings. To create and run more nodes, repeat the steps above using the other setting files (e.g. settings2.conf, settings3.conf, ...) in the src/main/resources/ folder.

Note to MacOS users: The 127.0.0.X loopback addresses (for X > 1) are disabled by default in MacOS. Therefore, the creation of nodes with settingsX.conf (for X > 1) fails. To prevent the failure, enable the addresses.

Web User Interface

You can interact with the nodes you created through a web browser. For the node created with settings.conf, visit localhost:9085.

TODO: Add instructions about how to perform a transaction through wallet/transfer.