forked from ethereum/go-ethereum
-
Notifications
You must be signed in to change notification settings - Fork 0
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
core: check Chain Attack using Penalty System #1
Open
hackmod
wants to merge
4
commits into
master
Choose a base branch
from
penalty-system
base: master
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.
Conversation
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
hackmod
force-pushed
the
penalty-system
branch
3 times, most recently
from
January 8, 2019 06:41
34985e9
to
67356f0
Compare
hackmod
force-pushed
the
penalty-system
branch
3 times, most recently
from
January 8, 2019 21:46
288f92c
to
0fa8224
Compare
based on the PirlGuard by Pirl Team <[email protected]> Original authors: - 0x1337coding <[email protected]> - masterdubs <[email protected]> See also Penalty System by Horizon(Zencash) manually applied by hackmod <[email protected]> Sun Jan 6 22:55:53 2019 +0900 * extract routines as core/penaltysystem.go * small fix for geth-1.8.21 develop branch Co-authored-by: 0x1337coding <[email protected]> Co-authored-by: hackmod <[email protected]>
- remove not used difficultyWeight() - remove sort, blocks already sorted - check syncing status like as eth.syncing - use core.BadHashes to save possible attack hash
hackmod
force-pushed
the
penalty-system
branch
from
January 8, 2019 21:51
0fa8224
to
2b5f928
Compare
* log and metric some information * exit immediatly after CheckDelayedChain(chain) error
- call CheckDelayedChain in reorg() - always log Chain split/reorg - add chain/reorg/add,drop metrics
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
WIP
based on the PirlGuard by Pirl Team.
difficultyWeight()
procFutureBlocks()
https://github.com/ethereum/go-ethereum/blob/master/core/blockchain.go#L737-L744 )eth.syncing
core.BadHashes
to save possible attack hash (could be extracted asconfig.BadHashes
)Ideas
core.BadHashes
configurable.See also
cc: @masterdubs, @0x1337coding
cc: @magnalucus @kimmyeonghun