Code Monkey home page Code Monkey logo

blockchain's People

Contributors

tabone avatar

Watchers

 avatar  avatar

blockchain's Issues

Push Initialized Queued Data

With the current implementation of the blockchain module, it is not possible to add a Queued Data object that is initialized from another Blockchain object. Although it is possible to extract the Queued Data data and include it in both Blockchain objects, each Queued Data will be having its own ID which may cause some issues when implementing blockchain-node since when a Block is created the Queued Data object which the new Block was created for should be removed from the queue.

Child Process for Hash Generation

With the current implementation of the Block module, the hash of a Block object is being generated in the main NodeJS process, resulting in the app to be completely blocked, thus making the solution implemented in #1 useless. For this reason the Hash Generation implementation should be extracted from the Block module and placed in its own JS file so that it can be executed in its own NodeJS process using the execFile function provided by the child_process modules.

Invalid State

With the current implementation of the Block module, when creating a new Block object which has its hash already generated, its state is being left as INITIALIZED. This should be changed so that the state of such Blocks is set to READY.

Blockchain Validation

With the current implementation of the Blockchain module, when validating the Blockchain we are only validating the Block's hash. Logic should be included to also validate the Blockchain like for example:

  • Block's previous hash
  • Block's index

Store QueuedData ID in Block

With the current implementation, when creating a Block for a Queue Data, the Block only stores the Queue Data data. With this approach there is the chance that multiple Blocks will be created for the same Queue Data. For this reason the Block module should be enhanced so that apart from the data it also stores the Queue Data ID.

Push Already Generated Blocks

With the current public api of the module, Blocks can only be added to the chain by being generated by the blockchain object. There is currently no way to push already generated Blocks. This functionality will be needed when implementing blockchain-node since Blocks may be generated from another blockchain object.

Abort Block Generation

With the current implementation of the module, there is no way to abort the generation of a Block. Such functionality will be needed when implementing blockchain-node module since when a new Block will be received the blockchain-node should abort the current Block generation and start on a new one.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.