-
Notifications
You must be signed in to change notification settings - Fork 204
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
stabilization-equivalent-proofs #6686
Open
AdoAdoAdo
wants to merge
41
commits into
feat/equivalent-messages
Choose a base branch
from
equivalent-proofs-feat-stabilization
base: feat/equivalent-messages
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.
+1,834
−373
Open
Changes from 25 commits
Commits
Show all changes
41 commits
Select commit
Hold shift + click to select a range
be02d30
use EpochNotifier instead of EpochStartNotifier to transition to the …
AdoAdoAdo 97b9e06
trigger consensus version change as validator
AdoAdoAdo ccdd6cb
temp change of equivalent messages enable epoch to shorten transition…
AdoAdoAdo 75e042a
fixes integration tests
AdoAdoAdo 6092d21
Merge branch 'feat/equivalent-messages' into equivalent-proofs-feat-s…
AdoAdoAdo 5cd3d46
fixes integration tests
AdoAdoAdo 330eb4a
fixes check proof on first block after genesis
AdoAdoAdo 7832305
fix header finality check for equivalent proofs
AdoAdoAdo 60584a0
adapt integration tests
AdoAdoAdo a8fb6f1
adapt integration tests
AdoAdoAdo df47f28
fixes & debug logs
AdoAdoAdo 492631c
fix eqv proofs epoch cfg for chain simulator tests
AdoAdoAdo 84c0b98
fix interceptor save unit test
AdoAdoAdo 700f252
fixes header prev proof verification
AdoAdoAdo b03af58
avoid deadlock when switching consensus
AdoAdoAdo b1be55c
remove check on first block after activation
ssd04 f695092
integrate header proof round
ssd04 13d6458
add test for equivalent proof on shard block sync
ssd04 bbbeb98
Merge pull request #6697 from multiversx/check-proof-on-activation-bl…
AdoAdoAdo 5f650fb
adapt fork detector and highest probable nonce for equivalent proofs
AdoAdoAdo b7d1990
Merge branch 'equivalent-proofs-feat-stabilization' of github.com:mul…
AdoAdoAdo 2211c74
add the round to the header info
AdoAdoAdo f1a55a9
update tests
AdoAdoAdo 958bf29
update more tests
AdoAdoAdo 1235b89
added checks on proofs parameters like epoch, nonce and shard
sstanculeanu d4243bc
fixes after review
sstanculeanu 681f506
small refactor + extended checks
sstanculeanu 68ec7b7
integrate fork detector process received proof
AdoAdoAdo a1cf4c8
further fixes after review
sstanculeanu 3db5c03
fixed typo
sstanculeanu 5495467
Merge pull request #6698 from multiversx/check_proof_validity
sstanculeanu 9c0a622
fix base fork detector process received block
AdoAdoAdo be77f2d
fix fork detector with equivalent proofs
AdoAdoAdo c3333bb
Merge remote-tracking branch 'origin/equivalent-proofs-feat-stabiliza…
AdoAdoAdo 828708c
fix intercepted proof checks
AdoAdoAdo 747cd55
fixes after review
AdoAdoAdo 6e25ca3
fix check for accepting a proof on interceptor
AdoAdoAdo 25276b1
remove v1 consensus callbacks from worker after v2 activation
AdoAdoAdo f61ee57
consensus v2 fixes
AdoAdoAdo 6a11dbe
move setting of prev proof in processor and fix rating update
AdoAdoAdo 0abb837
fix checkProofsForShardData and shard transition trigger
AdoAdoAdo 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
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -3,7 +3,6 @@ package proxy | |||||
import ( | ||||||
"github.com/multiversx/mx-chain-core-go/core" | ||||||
"github.com/multiversx/mx-chain-core-go/core/check" | ||||||
"github.com/multiversx/mx-chain-core-go/data" | ||||||
logger "github.com/multiversx/mx-chain-logger-go" | ||||||
|
||||||
"github.com/multiversx/mx-chain-go/common" | ||||||
|
@@ -57,6 +56,14 @@ type SubroundsHandler struct { | |||||
currentConsensusType consensusStateMachineType | ||||||
} | ||||||
|
||||||
// EpochConfirmed is called when the epoch is confirmed (this is registered as callback) | ||||||
func (s *SubroundsHandler) EpochConfirmed(epoch uint32, _ uint64) { | ||||||
err := s.initSubroundsForEpoch(epoch) | ||||||
if err != nil { | ||||||
log.Error("SubroundsHandler.EpochStartAction: cannot initialize subrounds", "error", err) | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done |
||||||
} | ||||||
} | ||||||
|
||||||
const ( | ||||||
consensusNone consensusStateMachineType = iota | ||||||
consensusV1 | ||||||
|
@@ -85,7 +92,7 @@ func NewSubroundsHandler(args *SubroundsHandlerArgs) (*SubroundsHandler, error) | |||||
currentConsensusType: consensusNone, | ||||||
} | ||||||
|
||||||
subroundHandler.consensusCoreHandler.EpochStartRegistrationHandler().RegisterHandler(subroundHandler) | ||||||
subroundHandler.consensusCoreHandler.EpochNotifier().RegisterNotifyHandler(subroundHandler) | ||||||
|
||||||
return subroundHandler, nil | ||||||
} | ||||||
|
@@ -189,28 +196,6 @@ func (s *SubroundsHandler) initSubroundsForEpoch(epoch uint32) error { | |||||
return nil | ||||||
} | ||||||
|
||||||
// EpochStartAction is called when the epoch starts | ||||||
func (s *SubroundsHandler) EpochStartAction(hdr data.HeaderHandler) { | ||||||
if check.IfNil(hdr) { | ||||||
log.Error("SubroundsHandler.EpochStartAction: nil header") | ||||||
return | ||||||
} | ||||||
|
||||||
err := s.initSubroundsForEpoch(hdr.GetEpoch()) | ||||||
if err != nil { | ||||||
log.Error("SubroundsHandler.EpochStartAction: cannot initialize subrounds", "error", err) | ||||||
} | ||||||
} | ||||||
|
||||||
// EpochStartPrepare prepares the subrounds handler for the epoch start | ||||||
func (s *SubroundsHandler) EpochStartPrepare(_ data.HeaderHandler, _ data.BodyHandler) { | ||||||
} | ||||||
|
||||||
// NotifyOrder returns the order of the subrounds handler | ||||||
func (s *SubroundsHandler) NotifyOrder() uint32 { | ||||||
return common.ConsensusHandlerOrder | ||||||
} | ||||||
|
||||||
// IsInterfaceNil returns true if there is no value under the interface | ||||||
func (s *SubroundsHandler) IsInterfaceNil() bool { | ||||||
return s == nil | ||||||
|
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
Oops, something went wrong.
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.
missing comment