Skip to content
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

adds peerdas-supernode flag #6764

Merged
merged 3 commits into from
Dec 17, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions beacon_chain/conf.nim
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,12 @@ type
desc: "Subscribe to all subnet topics when gossiping"
name: "subscribe-all-subnets" .}: bool

peerdasSupernode* {.
hidden
defaultValue: false,
desc: "Subscribe to all column subnets, thereby becoming a peerdas supernode"
name: "debug-peerdas-supernode" .}: bool

slashingDbKind* {.
hidden
defaultValue: SlashingDbKind.v2
Expand Down
4 changes: 2 additions & 2 deletions beacon_chain/nimbus_beacon_node.nim
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ proc initFullNode(
onElectraAttesterSlashingAdded))
blobQuarantine = newClone(BlobQuarantine.init(onBlobSidecarAdded))
dataColumnQuarantine = newClone(DataColumnQuarantine.init())
supernode = node.config.subscribeAllSubnets
supernode = node.config.peerdasSupernode
localCustodySubnets =
if supernode:
DATA_COLUMN_SIDECAR_SUBNET_COUNT.uint64
Expand Down Expand Up @@ -564,7 +564,7 @@ proc initFullNode(
node.network.nodeId.get_custody_columns(max(SAMPLES_PER_SLOT.uint64,
localCustodySubnets))

if node.config.subscribeAllSubnets:
if node.config.peerdasSupernode:
node.network.loadCscnetMetadataAndEnr(DATA_COLUMN_SIDECAR_SUBNET_COUNT.uint8)
else:
node.network.loadCscnetMetadataAndEnr(CUSTODY_REQUIREMENT.uint8)
Expand Down
4 changes: 2 additions & 2 deletions beacon_chain/spec/eip7594_helpers.nim
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ type
CellBytes = array[fulu.CELLS_PER_EXT_BLOB, Cell]
ProofBytes = array[fulu.CELLS_PER_EXT_BLOB, KzgProof]

func sortedColumnIndices*(columnsPerSubnet: ColumnIndex,
func sortedColumnIndices(columnsPerSubnet: ColumnIndex,
subnetIds: HashSet[uint64]):
agnxsh marked this conversation as resolved.
Show resolved Hide resolved
seq[ColumnIndex] =
var res: seq[ColumnIndex] = @[]
Expand All @@ -35,7 +35,7 @@ func sortedColumnIndices*(columnsPerSubnet: ColumnIndex,
res.sort
res

func sortedColumnIndexList*(columnsPerSubnet: ColumnIndex,
func sortedColumnIndexList(columnsPerSubnet: ColumnIndex,
subnetIds: HashSet[uint64]):
agnxsh marked this conversation as resolved.
Show resolved Hide resolved
List[ColumnIndex, NUMBER_OF_COLUMNS] =
var
Expand Down
2 changes: 1 addition & 1 deletion beacon_chain/spec/helpers.nim
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
# Uncategorized helper functions from the spec

import
std/sequtils,
# Status libraries
stew/[byteutils, endians2, objects],
nimcrypto/sha2,
Expand Down Expand Up @@ -543,6 +542,7 @@ proc compute_execution_block_hash*(blck: ForkyBeaconBlock): Eth2Digest =
rlpHash(blockToBlockHeader(blck)).to(Eth2Digest)

from std/math import exp, ln
from std/sequtils import foldl

func ln_binomial(n, k: int): float64 =
if k > n:
Expand Down
Loading