mirror of
https://github.com/status-im/nimbus-eth2.git
synced 2025-01-10 14:26:26 +00:00
Remove BlobsSidecar used in BeaconChainDB (#4710)
This commit is contained in:
parent
5370a6b67b
commit
f5612f2a77
@ -23,7 +23,7 @@ import
|
||||
"."/[beacon_chain_db_light_client, filepath]
|
||||
|
||||
from ./spec/datatypes/capella import BeaconState
|
||||
from ./spec/datatypes/deneb import TrustedSignedBeaconBlock, BlobsSidecar
|
||||
from ./spec/datatypes/deneb import TrustedSignedBeaconBlock
|
||||
|
||||
export
|
||||
phase0, altair, eth2_ssz_serialization, eth2_merkleization, kvstore,
|
||||
@ -801,11 +801,6 @@ proc putBlobSidecar*(
|
||||
value: BlobSidecar) =
|
||||
db.blobs.putSZSSZ(blobkey(value.block_root, value.index), value)
|
||||
|
||||
proc putBlobsSidecar*(
|
||||
db: BeaconChainDB,
|
||||
value: BlobsSidecar) =
|
||||
db.blobs.putSZSSZ(value.beacon_block_root.data, value)
|
||||
|
||||
proc updateImmutableValidators*(
|
||||
db: BeaconChainDB, validators: openArray[Validator]) =
|
||||
# Must be called before storing a state that references the new validators
|
||||
@ -995,12 +990,6 @@ proc getBlock*[
|
||||
else:
|
||||
result.err()
|
||||
|
||||
proc getBlobsSidecar*(db: BeaconChainDB, key: Eth2Digest): Opt[BlobsSidecar] =
|
||||
var blobs: BlobsSidecar
|
||||
result.ok(blobs)
|
||||
if db.blobs.getSZSSZ(key.data, result.get) != GetResult.found:
|
||||
result.err()
|
||||
|
||||
proc getBlobSidecar*(db: BeaconChainDB, root: Eth2Digest, index: BlobIndex):
|
||||
Opt[BlobSidecar] =
|
||||
var blobs: BlobSidecar
|
||||
@ -1078,13 +1067,6 @@ proc getBlockSSZ*(
|
||||
of ConsensusFork.Deneb:
|
||||
getBlockSSZ(db, key, data, deneb.TrustedSignedBeaconBlock)
|
||||
|
||||
proc getBlobsSidecarSZ*(db: BeaconChainDB, key: Eth2Digest, data: var seq[byte]):
|
||||
bool =
|
||||
let dataPtr = addr data # Short-lived
|
||||
func decode(data: openArray[byte]) =
|
||||
assign(dataPtr[], data)
|
||||
db.blobs.get(key.data, decode).expectDb()
|
||||
|
||||
proc getBlobSidecarSZ*(db: BeaconChainDB, root: Eth2Digest, index: BlobIndex,
|
||||
data: var seq[byte]):
|
||||
bool =
|
||||
|
@ -26,7 +26,6 @@ from ../consensus_object_pools/block_quarantine import
|
||||
from ../validators/validator_monitor import
|
||||
MsgSource, ValidatorMonitor, registerAttestationInBlock, registerBeaconBlock,
|
||||
registerSyncAggregateInBlock
|
||||
from ../spec/datatypes/deneb import BlobsSidecar
|
||||
from ../spec/state_transition_block import validate_blobs_sidecar
|
||||
|
||||
export sszdump, signatures_batch
|
||||
@ -166,7 +165,6 @@ proc dumpBlock[T](
|
||||
|
||||
from ../consensus_object_pools/block_clearance import
|
||||
addBackfillBlock, addHeadBlock
|
||||
from ../beacon_chain_db import putBlobsSidecar
|
||||
|
||||
proc storeBackfillBlock(
|
||||
self: var BlockProcessor,
|
||||
|
Loading…
x
Reference in New Issue
Block a user