@@ -542,6 +542,12 @@ export class Block implements BlockParams, Iterable<string> {
542
542
*/
543
543
readonly miner ! : string ;
544
544
545
+ /**
546
+ * The latest RANDAO mix of the post beacon state of
547
+ * the previous block.
548
+ */
549
+ readonly prevRandao ! : null | string ;
550
+
545
551
/**
546
552
* Any extra data the validator wished to include.
547
553
*/
@@ -592,6 +598,7 @@ export class Block implements BlockParams, Iterable<string> {
592
598
blobGasUsed : block . blobGasUsed ,
593
599
excessBlobGas : block . excessBlobGas ,
594
600
miner : block . miner ,
601
+ prevRandao : getValue ( block . prevRandao ) ,
595
602
extraData : block . extraData ,
596
603
597
604
baseFeePerGas : getValue ( block . baseFeePerGas ) ,
@@ -640,7 +647,7 @@ export class Block implements BlockParams, Iterable<string> {
640
647
toJSON ( ) : any {
641
648
const {
642
649
baseFeePerGas, difficulty, extraData, gasLimit, gasUsed, hash,
643
- miner, nonce, number, parentHash, parentBeaconBlockRoot,
650
+ miner, prevRandao , nonce, number, parentHash, parentBeaconBlockRoot,
644
651
stateRoot, receiptsRoot, timestamp, transactions
645
652
} = this ;
646
653
@@ -653,7 +660,7 @@ export class Block implements BlockParams, Iterable<string> {
653
660
gasUsed : toJson ( gasUsed ) ,
654
661
blobGasUsed : toJson ( this . blobGasUsed ) ,
655
662
excessBlobGas : toJson ( this . excessBlobGas ) ,
656
- hash, miner, nonce, number, parentHash, timestamp,
663
+ hash, miner, prevRandao , nonce, number, parentHash, timestamp,
657
664
parentBeaconBlockRoot, stateRoot, receiptsRoot,
658
665
transactions,
659
666
} ;
0 commit comments