@@ -30,7 +30,7 @@ cfg.BLOB_SCHEDULE = @[
3030 BlobParameters (EPOCH : 9 .Epoch , MAX_BLOBS_PER_BLOCK : 9 )]
3131
3232proc cfd (
33- epoch: uint64 , genesis_validators_root: Eth2Digest ,
33+ cfg: RuntimeConfig , epoch: uint64 , genesis_validators_root: Eth2Digest ,
3434 fork_version: array [4 , byte ], expected: array [4 , byte ]) =
3535 var cfg = cfg
3636 cfg.FULU_FORK_VERSION = Version (fork_version)
@@ -48,23 +48,40 @@ func getGvr(filling: uint8): Eth2Digest =
4848
4949suite " EF - Fulu - BPO forkdigests" :
5050 test " Different lengths and blob limits" :
51- cfd (100 , getGvr (0 ), [6 'u8 , 0 , 0 , 0 ], [0x df 'u8 , 0x 67 , 0x 55 , 0x 7b ])
52- cfd (101 , getGvr (0 ), [6 'u8 , 0 , 0 , 0 ], [0x df 'u8 , 0x 67 , 0x 55 , 0x 7b ])
53- cfd (150 , getGvr (0 ), [6 'u8 , 0 , 0 , 0 ], [0x 8a 'u8 , 0x b3 , 0x 8b , 0x 59 ])
54- cfd (199 , getGvr (0 ), [6 'u8 , 0 , 0 , 0 ], [0x 8a 'u8 , 0x b3 , 0x 8b , 0x 59 ])
55- cfd (200 , getGvr (0 ), [6 'u8 , 0 , 0 , 0 ], [0x d9 'u8 , 0x b8 , 0x 14 , 0x 38 ])
56- cfd (201 , getGvr (0 ), [6 'u8 , 0 , 0 , 0 ], [0x d9 'u8 , 0x b8 , 0x 14 , 0x 38 ])
57- cfd (250 , getGvr (0 ), [6 'u8 , 0 , 0 , 0 ], [0x 4e 'u8 , 0x f3 , 0x 2a , 0x 62 ])
58- cfd (299 , getGvr (0 ), [6 'u8 , 0 , 0 , 0 ], [0x 4e 'u8 , 0x f3 , 0x 2a , 0x 62 ])
59- cfd (300 , getGvr (0 ), [6 'u8 , 0 , 0 , 0 ], [0x ca 'u8 , 0x 10 , 0x 0d , 0x 64 ])
60- cfd (301 , getGvr (0 ), [6 'u8 , 0 , 0 , 0 ], [0x ca 'u8 , 0x 10 , 0x 0d , 0x 64 ])
51+ cfg. cfd (100 , getGvr (0 ), [6 'u8 , 0 , 0 , 0 ], [0x df 'u8 , 0x 67 , 0x 55 , 0x 7b ])
52+ cfg. cfd (101 , getGvr (0 ), [6 'u8 , 0 , 0 , 0 ], [0x df 'u8 , 0x 67 , 0x 55 , 0x 7b ])
53+ cfg. cfd (150 , getGvr (0 ), [6 'u8 , 0 , 0 , 0 ], [0x 8a 'u8 , 0x b3 , 0x 8b , 0x 59 ])
54+ cfg. cfd (199 , getGvr (0 ), [6 'u8 , 0 , 0 , 0 ], [0x 8a 'u8 , 0x b3 , 0x 8b , 0x 59 ])
55+ cfg. cfd (200 , getGvr (0 ), [6 'u8 , 0 , 0 , 0 ], [0x d9 'u8 , 0x b8 , 0x 14 , 0x 38 ])
56+ cfg. cfd (201 , getGvr (0 ), [6 'u8 , 0 , 0 , 0 ], [0x d9 'u8 , 0x b8 , 0x 14 , 0x 38 ])
57+ cfg. cfd (250 , getGvr (0 ), [6 'u8 , 0 , 0 , 0 ], [0x 4e 'u8 , 0x f3 , 0x 2a , 0x 62 ])
58+ cfg. cfd (299 , getGvr (0 ), [6 'u8 , 0 , 0 , 0 ], [0x 4e 'u8 , 0x f3 , 0x 2a , 0x 62 ])
59+ cfg. cfd (300 , getGvr (0 ), [6 'u8 , 0 , 0 , 0 ], [0x ca 'u8 , 0x 10 , 0x 0d , 0x 64 ])
60+ cfg. cfd (301 , getGvr (0 ), [6 'u8 , 0 , 0 , 0 ], [0x ca 'u8 , 0x 10 , 0x 0d , 0x 64 ])
6161
6262 test " Different genesis validators roots" :
63- cfd (100 , getGvr (1 ), [6 'u8 , 0 , 0 , 0 ], [0x fd 'u8 , 0x 3a , 0x a2 , 0x a2 ])
64- cfd (100 , getGvr (2 ), [6 'u8 , 0 , 0 , 0 ], [0x 80 'u8 , 0x c6 , 0x bd , 0x 97 ])
65- cfd (100 , getGvr (3 ), [6 'u8 , 0 , 0 , 0 ], [0x f2 'u8 , 0x 09 , 0x fd , 0x fc ])
63+ cfg. cfd (100 , getGvr (1 ), [6 'u8 , 0 , 0 , 0 ], [0x fd 'u8 , 0x 3a , 0x a2 , 0x a2 ])
64+ cfg. cfd (100 , getGvr (2 ), [6 'u8 , 0 , 0 , 0 ], [0x 80 'u8 , 0x c6 , 0x bd , 0x 97 ])
65+ cfg. cfd (100 , getGvr (3 ), [6 'u8 , 0 , 0 , 0 ], [0x f2 'u8 , 0x 09 , 0x fd , 0x fc ])
6666
6767 test " Different fork versions" :
68- cfd (100 , getGvr (0 ), [6 'u8 , 0 , 0 , 1 ], [0x 44 'u8 , 0x a5 , 0x 71 , 0x e8 ])
69- cfd (100 , getGvr (0 ), [7 'u8 , 0 , 0 , 0 ], [0x 70 'u8 , 0x 6f , 0x 46 , 0x 1a ])
70- cfd (100 , getGvr (0 ), [7 'u8 , 0 , 0 , 1 ], [0x 1a 'u8 , 0x 34 , 0x 15 , 0x c2 ])
68+ cfg.cfd (100 , getGvr (0 ), [6 'u8 , 0 , 0 , 1 ], [0x 44 'u8 , 0x a5 , 0x 71 , 0x e8 ])
69+ cfg.cfd (100 , getGvr (0 ), [7 'u8 , 0 , 0 , 0 ], [0x 70 'u8 , 0x 6f , 0x 46 , 0x 1a ])
70+ cfg.cfd (100 , getGvr (0 ), [7 'u8 , 0 , 0 , 1 ], [0x 1a 'u8 , 0x 34 , 0x 15 , 0x c2 ])
71+
72+ test " Fusaka devnet-2" :
73+ var cfg = cfg
74+ cfg.ELECTRA_FORK_EPOCH = GENESIS_EPOCH
75+ cfg.ELECTRA_FORK_VERSION = Version ([0x 60 'u8 , 0x 93 , 0x 75 , 0x 44 ])
76+ cfg.FULU_FORK_EPOCH = 256 .Epoch
77+ cfg.BLOB_SCHEDULE = @ [
78+ BlobParameters (EPOCH : 1584 .Epoch , MAX_BLOBS_PER_BLOCK : 20 ),
79+ BlobParameters (EPOCH : 1280 .Epoch , MAX_BLOBS_PER_BLOCK : 9 ),
80+ BlobParameters (EPOCH : 1024 .Epoch , MAX_BLOBS_PER_BLOCK : 18 ),
81+ BlobParameters (EPOCH : 768 .Epoch , MAX_BLOBS_PER_BLOCK : 15 ),
82+ BlobParameters (EPOCH : 512 .Epoch , MAX_BLOBS_PER_BLOCK : 12 )]
83+
84+ cfg.cfd (
85+ 256 ,
86+ Eth2Digest .fromHex (" 0xd9d36cce7e1e5b021676d15cbc674ec2e02183a98373ca191a3cbcefca479f9b" ),
87+ [0x 70 'u8 , 0x 93 , 0x 75 , 0x 44 ], [0x 36 'u8 , 0x 9f , 0x 89 , 0x f7 ])
0 commit comments