@@ -15,8 +15,8 @@ const era = @import("era");
1515const preset = state_transition .preset ;
1616const ForkSeq = config .ForkSeq ;
1717const CachedBeaconState = state_transition .CachedBeaconState ;
18- const ForkBeaconBlock = fork_types .ForkBeaconBlock ;
19- const ForkBeaconBlockBody = fork_types .ForkBeaconBlockBody ;
18+ const BeaconBlock = fork_types .BeaconBlock ;
19+ const BeaconBlockBody = fork_types .BeaconBlockBody ;
2020const ValidatorIndex = types .primitive .ValidatorIndex .Type ;
2121const PubkeyIndexMap = state_transition .PubkeyIndexMap (ValidatorIndex );
2222const Withdrawals = types .capella .Withdrawals .Type ;
@@ -33,7 +33,7 @@ const BenchOpts = struct {
3333fn ProcessBlockHeaderBench (comptime fork : ForkSeq ) type {
3434 return struct {
3535 cached_state : * CachedBeaconState ,
36- block : * const ForkBeaconBlock ( fork , .full ),
36+ block : * const BeaconBlock ( .full , fork ),
3737
3838 pub fn run (self : @This (), allocator : std .mem .Allocator ) void {
3939 const cloned = self .cached_state .clone (allocator , .{}) catch unreachable ;
@@ -56,7 +56,7 @@ fn ProcessBlockHeaderBench(comptime fork: ForkSeq) type {
5656fn ProcessWithdrawalsBench (comptime fork : ForkSeq ) type {
5757 return struct {
5858 cached_state : * CachedBeaconState ,
59- body : * const ForkBeaconBlockBody ( fork , .full ),
59+ body : * const BeaconBlockBody ( .full , fork ),
6060
6161 pub fn run (self : @This (), allocator : std .mem .Allocator ) void {
6262 const cloned = self .cached_state .clone (allocator , .{}) catch unreachable ;
@@ -101,7 +101,7 @@ fn ProcessWithdrawalsBench(comptime fork: ForkSeq) type {
101101fn ProcessExecutionPayloadBench (comptime fork : ForkSeq ) type {
102102 return struct {
103103 cached_state : * CachedBeaconState ,
104- body : * const ForkBeaconBlockBody ( fork , .full ),
104+ body : * const BeaconBlockBody ( .full , fork ),
105105
106106 pub fn run (self : @This (), allocator : std .mem .Allocator ) void {
107107 const cloned = self .cached_state .clone (allocator , .{}) catch unreachable ;
@@ -127,8 +127,8 @@ fn ProcessExecutionPayloadBench(comptime fork: ForkSeq) type {
127127fn ProcessRandaoBench (comptime fork : ForkSeq , comptime opts : BenchOpts ) type {
128128 return struct {
129129 cached_state : * CachedBeaconState ,
130- block : * const ForkBeaconBlock ( fork , .full ),
131- body : * const ForkBeaconBlockBody ( fork , .full ),
130+ block : * const BeaconBlock ( .full , fork ),
131+ body : * const BeaconBlockBody ( .full , fork ),
132132
133133 pub fn run (self : @This (), allocator : std .mem .Allocator ) void {
134134 const cloned = self .cached_state .clone (allocator , .{}) catch unreachable ;
@@ -153,7 +153,7 @@ fn ProcessRandaoBench(comptime fork: ForkSeq, comptime opts: BenchOpts) type {
153153fn ProcessEth1DataBench (comptime fork : ForkSeq ) type {
154154 return struct {
155155 cached_state : * CachedBeaconState ,
156- body : * const ForkBeaconBlockBody ( fork , .full ),
156+ body : * const BeaconBlockBody ( .full , fork ),
157157
158158 pub fn run (self : @This (), allocator : std .mem .Allocator ) void {
159159 const cloned = self .cached_state .clone (allocator , .{}) catch unreachable ;
@@ -173,7 +173,7 @@ fn ProcessEth1DataBench(comptime fork: ForkSeq) type {
173173fn ProcessOperationsBench (comptime fork : ForkSeq , comptime opts : BenchOpts ) type {
174174 return struct {
175175 cached_state : * CachedBeaconState ,
176- body : * const ForkBeaconBlockBody ( fork , .full ),
176+ body : * const BeaconBlockBody ( .full , fork ),
177177
178178 pub fn run (self : @This (), allocator : std .mem .Allocator ) void {
179179 const cloned = self .cached_state .clone (allocator , .{}) catch unreachable ;
@@ -198,7 +198,7 @@ fn ProcessOperationsBench(comptime fork: ForkSeq, comptime opts: BenchOpts) type
198198fn ProcessSyncAggregateBench (comptime fork : ForkSeq , comptime opts : BenchOpts ) type {
199199 return struct {
200200 cached_state : * CachedBeaconState ,
201- body : * const ForkBeaconBlockBody ( fork , .full ),
201+ body : * const BeaconBlockBody ( .full , fork ),
202202
203203 pub fn run (self : @This (), allocator : std .mem .Allocator ) void {
204204 const cloned = self .cached_state .clone (allocator , .{}) catch unreachable ;
@@ -222,7 +222,7 @@ fn ProcessSyncAggregateBench(comptime fork: ForkSeq, comptime opts: BenchOpts) t
222222fn ProcessBlockBench (comptime fork : ForkSeq , comptime opts : BenchOpts ) type {
223223 return struct {
224224 cached_state : * CachedBeaconState ,
225- block : * const ForkBeaconBlock ( fork , .full ),
225+ block : * const BeaconBlock ( .full , fork ),
226226
227227 pub fn run (self : @This (), allocator : std .mem .Allocator ) void {
228228 const cloned = self .cached_state .clone (allocator , .{}) catch unreachable ;
@@ -302,8 +302,8 @@ fn printSegmentStats(stdout: anytype) !void {
302302fn ProcessBlockSegmentedBench (comptime fork : ForkSeq ) type {
303303 return struct {
304304 cached_state : * CachedBeaconState ,
305- block : * const ForkBeaconBlock ( fork , .full ),
306- body : * const ForkBeaconBlockBody ( fork , .full ),
305+ block : * const BeaconBlock ( .full , fork ),
306+ body : * const BeaconBlockBody ( .full , fork ),
307307
308308 pub fn run (self : @This (), allocator : std .mem .Allocator ) void {
309309 const cloned = self .cached_state .clone (allocator , .{}) catch unreachable ;
@@ -501,9 +501,7 @@ fn runBenchmark(comptime fork: ForkSeq, allocator: std.mem.Allocator, pool: *Nod
501501
502502 try state_transition .state_transition .processSlots (
503503 allocator ,
504- cached_state .config ,
505- cached_state .getEpochCache (),
506- cached_state .state ,
504+ cached_state ,
507505 block_slot ,
508506 .{},
509507 );
0 commit comments