elleflorio / scalachain Goto Github PK
View Code? Open in Web Editor NEWBlockchain implemented using the Scala programming language
License: MIT License
Blockchain implemented using the Scala programming language
License: MIT License
The current implementation of the blockchain is useful for didactic purposes, but it is not well suited for more realistic applications. It is required to improve the implementation in order to improve performance and/or the capabilities of the blockchain to handle a more complex scenario.
The persistence (journal and snapshot) is not working in docker container, at least when the container is running the local source code mounted in the volume. This is probably due to permissions issues on folders. Gosu should be considered to solve the issue.
Transactions right now are toy-examples. It would be interesting to implement a more realistic transaction model (like the Ethereum one)). This has lots of implication regarding public-key cryptography and addresses management.
The current PoW implementation is a toy-example. The implementation of a different distributed consensus algorithm would be interesting.
When a new block is created, it should be spread to other nodes in the cluster, and consensus should be reached
Hey,
First of all - thank for an awesome article!
I noticed that I can't run the project with docker-compose up
(after a successful build). This is what I get:
~/projects/scalachain(master*) » docker-compose up
Starting scalachain_node2_1 ... done
Starting scalachain_node1_1 ... done
Starting scalachain_seed_1 ... done
Attaching to scalachain_seed_1, scalachain_node1_1, scalachain_node2_1
seed_1 | Running local source code
seed_1 | copying local sources from /tmp/scalachain to /development
node1_1 | Running local source code
node2_1 | Running local source code
node2_1 | copying local sources from /tmp/scalachain to /development
node1_1 | copying local sources from /tmp/scalachain to /development
node2_1 | [warn] No sbt.version set in project/build.properties, base directory: /development
node1_1 | [warn] No sbt.version set in project/build.properties, base directory: /development
seed_1 | [warn] No sbt.version set in project/build.properties, base directory: /development
node2_1 | [info] Set current project to development (in build file:/development/)
node1_1 | [info] Set current project to development (in build file:/development/)
seed_1 | [info] Set current project to development (in build file:/development/)
node2_1 | [error] java.lang.RuntimeException: No main class detected.
node2_1 | [error] at scala.sys.package$.error(package.scala:26)
node2_1 | [error] (Compile / bgRun) No main class detected.
node2_1 | [error] Total time: 8 s, completed Apr 14, 2019 6:48:34 PM
node1_1 | [error] java.lang.RuntimeException: No main class detected.
node1_1 | [error] at scala.sys.package$.error(package.scala:26)
node1_1 | [error] (Compile / bgRun) No main class detected.
node1_1 | [error] Total time: 8 s, completed Apr 14, 2019 6:48:34 PM
scalachain_node2_1 exited with code 1
scalachain_node1_1 exited with code 1
seed_1 | [error] java.lang.RuntimeException: No main class detected.
seed_1 | [error] at scala.sys.package$.error(package.scala:26)
seed_1 | [error] (Compile / bgRun) No main class detected.
seed_1 | [error] Total time: 8 s, completed Apr 14, 2019 6:48:36 PM
scalachain_seed_1 exited with code 1
The docker image defined in the /docker folder is good for development purposes.
It would be good to integrate the sbt plugin for sbt Native Packager, in order to create a docker container running the Scalachain node binary.
The image should have the correct name - elleflorio/scalachain
- and the correct tags.
This issue can be implemented inside the docker-integration
branch.
The docker container get sbt and scala when it is created. It requires a lot of time during container creation, it would be better to find a way to prepare the environment correctly when the docker image is created.
The transaction sent to a node should be propagated to other ones in the cluster.
Tests are not passing due to some issues with clustering.
The introduction of Akka Cluster will enable and facilitate the discovery and communication between Scalachain nodes.
It is required to integrate Akka Cluster inside scalachain at a basic level:
The implementation of cluster logics (cluster event handling, communication, etc.) will follow in later issues
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.