mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-09 21:38:05 -05:00
Dynamic max blobs config (#14911)
* fixing max config helpers to use dynamic values instead of static ones * changelog
This commit is contained in:
3
changelog/james-prysm_dynamic-max-blobs.md
Normal file
3
changelog/james-prysm_dynamic-max-blobs.md
Normal file
@@ -0,0 +1,3 @@
|
||||
### Fixed
|
||||
|
||||
- fixed max and target blob per block from static to dynamic values
|
||||
@@ -387,7 +387,7 @@ func (b *BeaconChainConfig) MaximumGossipClockDisparityDuration() time.Duration
|
||||
// TargetBlobsPerBlock returns the target number of blobs per block for the given slot,
|
||||
// accounting for changes introduced by the Electra fork.
|
||||
func (b *BeaconChainConfig) TargetBlobsPerBlock(slot primitives.Slot) int {
|
||||
if primitives.Epoch(slot.DivSlot(32)) >= b.ElectraForkEpoch {
|
||||
if primitives.Epoch(slot.DivSlot(b.SlotsPerEpoch)) >= b.ElectraForkEpoch {
|
||||
return b.DeprecatedTargetBlobsPerBlockElectra
|
||||
}
|
||||
return b.DeprecatedMaxBlobsPerBlock / 2
|
||||
@@ -396,7 +396,7 @@ func (b *BeaconChainConfig) TargetBlobsPerBlock(slot primitives.Slot) int {
|
||||
// MaxBlobsPerBlock returns the maximum number of blobs per block for the given slot,
|
||||
// adjusting for the Electra fork.
|
||||
func (b *BeaconChainConfig) MaxBlobsPerBlock(slot primitives.Slot) int {
|
||||
if primitives.Epoch(slot.DivSlot(32)) >= b.ElectraForkEpoch {
|
||||
if primitives.Epoch(slot.DivSlot(b.SlotsPerEpoch)) >= b.ElectraForkEpoch {
|
||||
return b.DeprecatedMaxBlobsPerBlockElectra
|
||||
}
|
||||
return b.DeprecatedMaxBlobsPerBlock
|
||||
|
||||
Reference in New Issue
Block a user