-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Improved scheme for Conflicts attribute storing and pricing #2913
Merged
Merged
Changes from 10 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
d6d3d47
Ledger: change conflict records storage scheme
AnnaShaleva 002e7bf
UT_MemoryPool: remove unused test
AnnaShaleva cba97f1
Policy: introduce fee for Conflicts attribute
AnnaShaleva ffa7e8d
Merge branch 'master' into fix-conflicts
shargon fff3129
Merge branch 'master' of https://github.com/neo-project/neo into fix-…
AnnaShaleva 330cbea
*: remove remnants of ConflictsFee in native Policy
AnnaShaleva 024a82a
Native: do not remove malicious conflict records during OnPersist
AnnaShaleva 51a51a1
Merge branch 'master' into fix-conflicts
AnnaShaleva be19957
Merge branch 'master' into fix-conflicts
shargon 25b7d1b
Merge branch 'master' into fix-conflicts
shargon 2350393
Merge branch 'master' into fix-conflicts
Jim8y c6105c0
Properly rewrite previously added malicious conflict if it's in the s…
AnnaShaleva 32d1341
Throw proper exception if TestMaliciousOnChainConflict fails
AnnaShaleva 9845609
Optimize conflicts records storing
AnnaShaleva fc455f4
Merge branch 'master' into fix-conflicts
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 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
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.
I tried to hack a private net by the code from #2907, when multi transactions want to cancel the same tx(the same conflict attribute), it will throw
InvalidOperationException
when they all change the same key's vale in the same block but it passed consensus. So finally it will be like: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.
It's my poor knowledge of NeoC# codebase, the intention here was to replace the existing conflict record (if it's in the DB), but
engine.Snapshot.Add
doesn't allow to do it. I'll fix it, thank you for testing!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.
@superboyiii, could you, please, run the same test? I've modified the code so that now it's possible to rewrite existing malicious conflict record with the proper transaction.