Skip to content
This repository was archived by the owner on Jun 17, 2022. It is now read-only.

Variety of Consensus #103

Open
shogochiai opened this issue Apr 4, 2018 · 1 comment
Open

Variety of Consensus #103

shogochiai opened this issue Apr 4, 2018 · 1 comment

Comments

@shogochiai
Copy link

shogochiai commented Apr 4, 2018

Is lotion only uses PoA?

According to Consensus Compare: Casper vs. Tendermint, tendermint uses Slasher-applied-PoS.

Any way to use PoS on lotion.js?

@ebuchman
Copy link

Lotion uses Tendermint, a general purpose Byzantine Fault Tolerant consensus engine. It's much more correct, secure, and flexible than PoA.

You can build Proof of Stake as an economic layer in lotion by modifying the validator voting power based on some token stake. Eg:

// to modify voting power in a tx handler:
app.use(function(state, tx, context){
   context.validators[tx.somePubKey] += 42
})

// to modify voting power in endblock:
app.useBlock(function(state, context){
  context.validators['aOSx00CgYJ3/WGNgioJEs91irUHNvy+bV20hRTby7ak='] = 200
})

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants