Skip to content

Latest commit

 

History

History
49 lines (24 loc) · 2.15 KB

README.md

File metadata and controls

49 lines (24 loc) · 2.15 KB

Scorex Examples

There are two examples of blockchain systems built on top of Scorex at the moment.

The first one is the simplest proof-of-stake cryptocurrency with an account-based transactional model and everything stored in memory. It can be found under the src/main/scala/examples/curvepos folder.

The second one is Twinscoin, explained in more detail below.

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 points of the implementation are:

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.