mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-08 21:08:10 -05:00
Fix sandwich attack on honest reorgs (#12418)
* Fix sandwich attack on honest reorgs * fix test --------- Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
This commit is contained in:
@@ -69,6 +69,7 @@ type BeaconChainConfig struct {
|
||||
// Fork choice algorithm constants.
|
||||
ProposerScoreBoost uint64 `yaml:"PROPOSER_SCORE_BOOST" spec:"true"` // ProposerScoreBoost defines a value that is a % of the committee weight for fork-choice boosting.
|
||||
ReorgWeightThreshold uint64 `yaml:"REORG_WEIGHT_THRESHOLD" spec:"true"` // ReorgWeightThreshold defines a value that is a % of the committee weight to consider a block weak and subject to being orphaned.
|
||||
ReorgParentWeightThreshold uint64 `yaml:"REORG_PARENT_WEIGHT_THRESHOLD" spec:"true"` // ReorgParentWeightThreshold defines a value that is a % of the committee weight to consider a parent block strong and subject its child to being orphaned.
|
||||
ReorgMaxEpochsSinceFinalization primitives.Epoch `yaml:"REORG_MAX_EPOCHS_SINCE_FINALIZATION" spec:"true"` // This defines a limit to consider safe to orphan a block if the network is finalizing
|
||||
IntervalsPerSlot uint64 `yaml:"INTERVALS_PER_SLOT" spec:"true"` // IntervalsPerSlot defines the number of fork choice intervals in a slot defined in the fork choice spec.
|
||||
|
||||
|
||||
@@ -115,6 +115,7 @@ var mainnetBeaconConfig = &BeaconChainConfig{
|
||||
// Fork choice algorithm constants.
|
||||
ProposerScoreBoost: 40,
|
||||
ReorgWeightThreshold: 20,
|
||||
ReorgParentWeightThreshold: 160,
|
||||
ReorgMaxEpochsSinceFinalization: 2,
|
||||
IntervalsPerSlot: 3,
|
||||
|
||||
|
||||
Reference in New Issue
Block a user