Giter Site home page Giter Site logo

pos-blockchain's Introduction

Hi πŸ‘‹, I'm Kashish Khullar


kasheyyysh

Blogs posts

Connect with me:

thisis_kashish https://www.linkedin.com/in/kashish-khullar-bb65b014a/ @kashishkhullar

kashishkhullar

pos-blockchain's People

Contributors

dependabot[bot] avatar kashishkhullar avatar msharekh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

pos-blockchain's Issues

Fixed wallet amount

Thanks for great sample.
Small question, when I follow instruction, for some reason amount after transaction don't change. Seems like don't call any wallet method. Any suggestion?
Thanks

False Transactions Checking

Is there any checking for false transactions?

i.e. if a user generated a legitimate key pair, then signs a fraudulent transactions transferring 10,000 currency to a secondary address (controlled by the attacker) what stops this being mined to the blockchain as legitimate given the signature and balance outputs for this transaction can be verified as correct

Transactions and balance

Thanks for the medium tutorial. I've been searching through this project for awhile but can't seem to find the issue. Starting the nodes results in "Recieved chain is not longer than the current chain", and sending transactions appear to go through on the console but balances are never updated, nor are new blocks created. @kashishkhullar

Weird blockchain, no more then 1 block..

Hi!

The Blockchain is very weird..

I dropped the Threshold at 2
I've sent twice 11 coins to 2 nodes

The block is rewritten into its data, so each block has 2 hashes and last hash, the same validator twice and 2 signatures..

Yes I know, see file joined : Results.txt

Balances of accounts arent incremented/decremented as well..

Twying to find out where the bug is from, it looks like it's during the block is pushed into the chain, before this the chain and the block look legit..

Also, can't send another transaction after that, all nodes crashes..

Found first the totorial, then corrected with the files, got the issues so I cloned the folder : same thing!

Any hint?

Thanks!

Stake.getMax() might be missing something

if (this.getBalance(address) > balance) {

I think this:

 getMax(addresses) {
    let balance = -1;
    let leader = undefined;
    addresses.forEach(address => {
      if (this.getBalance(address) > balance) {
        leader = address;
      }
    });
    return leader;
  }

Should actually be:

 getMax(addresses) {
    let balance = -1;
    let leader = undefined;
    addresses.forEach(address => {
      let address_balance = this.getBalance(address);
      if (address_balance > balance) {
        leader = address;
        balance = address_balance;
      }
    });
    return leader;
  }

Otherwise getMax will just return the last address that has a balance greater than -1.

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.