-
Notifications
You must be signed in to change notification settings - Fork 1k
[N3] Proof of node #4304
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
Open
shargon
wants to merge
17
commits into
neo-project:master-n3
Choose a base branch
from
shargon:proof-of-node
base: master-n3
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+271
−21
Open
[N3] Proof of node #4304
Changes from 1 commit
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
cbc8ce8
Proof of node
shargon 7b73285
Fix pow
shargon 58778c3
Ensure Primary it's alive
shargon de06e7b
Max Proof Of Node Height in policy
shargon 75b2bc7
Set difficulty by policy
shargon 1140f19
Update src/Neo/SmartContract/Native/PolicyContract.cs
shargon 0d2a56f
Remove extra blank line
shargon 841ba47
Add comment
shargon 6738aa7
Pow in separate class
shargon fe20a2e
Remove null
shargon c34ab6c
Reduce difficulty
shargon 829f58e
Update src/Neo/Cryptography/ProofOfWork.cs
shargon 35ca4e2
fix
shargon a938a2b
Merge branch 'proof-of-node' of https://github.com/shargon/neo into p…
shargon 9cdbeec
Merge branch 'master-n3' into proof-of-node
ajara87 b3a5248
Fix conflicts
ajara87 1f96009
Merge pull request #18 from ajara87/pr-4304
shargon File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need a proof of work at all here? What does it prove?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe it is for all committee , not only CN
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cn could be set every time he is the primary
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Proof that the committee has a node
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, this doesn't prove there is a node. I can separate this code from the node. My point is that a transaction is sufficient. Adding any calculations would be a serious regression for Neo and it wouldn't add any benefit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's your proposal? Regular tx is easy to fake. I thought an idea but it's incompatible with huge amount of committee (outside 21).
If committee produce a signature of the previous block, the primary can choose this rpc signatures and use them as a proof when they persist the block.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shargon @erikzhang , do you know? Double speakers would be perfect for that because we could, every round, make a committee to be a speaker and do round robin on that.
So, every member would need to be ready. Double speakers do that without any problems because they would be fallback. Based on node's statistics we would know the truth.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's only work for 21, no for outside 21
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe that if a node deliberately pretends to be online while refusing to participate in the consensus process, there is essentially no reliable way for us to detect such behavior. Therefore, the primary purpose of “proof of node” should not be to identify malicious non-participation. Instead, it should focus on preventing accidental misconfigurations by candidates—such as forgetting to run the node, failing to start the consensus module, or unintentionally launching multiple consensus instances.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then only a tx is good for you, and maybe a counter of how many view changes?