Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NEP: Lightning-Voting #82

Closed
wants to merge 4 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 33 additions & 16 deletions nep-X.mediawiki
Original file line number Diff line number Diff line change
@@ -1,40 +1,57 @@
<pre>
NEP: <to be assigned>
Title: <NEP title>
Author: <list of authors' names and optionally, email addresses>
Type: <Standard | Informational | Meta>
Title: Lightning-Voting
Author: Vitor N. Coelho, Igor M.Coelho, Jeff Solinsky, et al. (join us!)
Type: Standard
Status: Draft
Created: <date created on, in ISO 8601 (yyyy-mm-dd) format>
Requires (*optional): <NEP number(s)>
Replaces (*optional): <NEP number(s)>
Created: 2018-12-21
</pre>

==Abstract==

A short (~200 words) description of the technical issue being addressed.
Fully distributed systems have the cost of safety.

==Motivation==
It is impossible to deny that, in unlucky cases, M (safety level) nodes can be Byzantine and attack the Blockchain.
While there are different types of possible attacks, some of them are easy to detect, such as: 1- blocks with wrong transactions; 2- blocks with double-spending; 3 - more than f consensus node lagging plenty of time to sign next block: among others.

The motivation is critical for NEPs that want to change the NEO protocol. It should clearly explain why the existing protocol specification is inadequate to address the problem that the NEP solves. NEP submissions without sufficient motivation may be rejected outright.
Considering this possibility, this NEP proposes a lightning voting experience, in which NEO holders would be able to modify validators during block creation.
In this sense, this proposal is a simple mechanism that allows voting to happen in an upper layer, namely, in the mempool.


==Motivation and Rationale==

After dBFT 2.0 was merged it is believed that no more natural forks will occur on the network.
Then, an additional safety mechanism should be implemented in order to boost massive decentralization.
Furthermore, in case that NEO holders detects missbehavior of CN they should be able to vote at any time, without having to trust that most of us will post your request

The name Lightining Voting came with the idea that the voting is an offchain process.
The state channel with NEO blockchain was already created by means of UTXO or a Native Contract Asset.
In this sense, as soon as NEO holders sign txs and the majority agrees with validators change, that could happen during block creation (and not only after publishing the vote intentation).


In addition, in a "normal" scenario where `f+1` nodes lose acess to their private key the network could stuck.
In this sense, this proposal is a mechanism that prepares NEO blockchain for the most adverse situation.

==Specification==

The technical specification should describe the syntax and semantics of any new feature. The specification should be detailed enough to allow competing, interoperable implementations for any of the current NEO platforms.
TO CHANGE after the idea of lightining voting.

==Rationale==
A new message should be added, in which nodes can report the byzantine blocks.
Initially, there will be two types of possible bans:

The rationale fleshes out the specification by describing what motivated the design and why particular design decisions were made. It should describe alternate designs that were considered and related work, e.g. how the feature is supported in other languages.
* If the block contains wrong transactions all nodes that signed that blocked are automatically banned, removed as validators and losing their stake;
* If two/more blocks on a same height are reported, the longer branch (with, at least, more than `X` blocks. `X` should be defined in a safety manner. Maybe 2 blocks could be enough) will be defined as the correct chain and all signatures from the other branches will be banned.

The rationale may also provide evidence of consensus within the community, and should discuss important objections or concerns raised during discussion.
In both cases the Blockchain will be deep reorganized and re-synced.

==Backwards Compatibility==

All NEPs that introduce backwards incompatibilities must include a section describing these incompatibilities and their severity. The NEP must explain how the author proposes to deal with these incompatibilities. NEP submissions without a sufficient backwards compatibility treatise may be rejected outright.
This NEP will be fully compatible.

==Test Cases==

Test cases for an implementation are mandatory for NEPs that are affecting consensus changes. Other NEPs can choose to include links to test cases if applicable.
TODO

==Implementation==

The implementations must be completed before any NEP is given status "Final", but it need not be completed before the NEP is accepted. It is better to finish the specification and rationale first and reach consensus on it before writing code.
TODO