Skip to content

Commit 9b4ca68

Browse files
committed
fix(spec-tests): align fork_choice test runner with Lodestar TS
- Fix attestation step: use force_import=false for step attestations (only block-body attestations use force_import=true, matching TS importAttestations: Force) - Add importBlockAttestations to process block body attestations through fork choice after onBlock (mirrors pyspec is_from_block=True) - Add pending_payload_statuses map to store execution engine mock statuses for consumption during block processing (mirrors TS ExecutionEngineMockBackend.addPredefinedPayloadStatus) - Add getBlockExecutionStatus to look up stored payload status by execution payload block hash before defaulting to .valid - Add validateBlobsProofs for deneb/electra blocks: validate that blobs and proofs counts match blobKzgCommitments (count-only, no KZG proof verification) - Parse blobs/proofs fields from YAML block steps - Handle multi-line should_override_forkchoice_update YAML values - Add skip patterns in writer matching Lodestar TS skip list - Bump spec test version to v1.7.0-alpha.2 - Add TODO for v1.7.0-alpha.1 proposer index check in onBlock
1 parent 419043b commit 9b4ca68

File tree

5 files changed

+252
-15
lines changed

5 files changed

+252
-15
lines changed

build.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ pub fn build(b: *std.Build) void {
2525
const options_spec_test_options = b.addOptions();
2626
const option_spec_test_url = b.option([]const u8, "spec_test_url", "") orelse "https://github.com/ethereum/consensus-specs";
2727
options_spec_test_options.addOption([]const u8, "spec_test_url", option_spec_test_url);
28-
const option_spec_test_version = b.option([]const u8, "spec_test_version", "") orelse "v1.6.0-beta.2";
28+
const option_spec_test_version = b.option([]const u8, "spec_test_version", "") orelse "v1.7.0-alpha.2";
2929
options_spec_test_options.addOption([]const u8, "spec_test_version", option_spec_test_version);
3030
const option_spec_test_out_dir = b.option([]const u8, "spec_test_out_dir", "") orelse "test/spec/spec_tests";
3131
options_spec_test_options.addOption([]const u8, "spec_test_out_dir", option_spec_test_out_dir);

src/fork_choice/fork_choice.zig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -474,6 +474,9 @@ pub const ForkChoice = struct {
474474
// (before attesting interval = before 1st interval).
475475
const is_timely = self.isBlockTimely(slot, block_delay_sec);
476476
// Only boost the first block we see.
477+
// TODO GLOAS: v1.7.0-alpha.1 added proposer index check in update_proposer_boost_root
478+
// (block.proposer_index == get_beacon_proposer_index(head_state)).
479+
// Not yet implemented — matches Lodestar TS unstable.
477480
if (self.opts.proposer_boost and is_timely and self.proposer_boost_root == null) {
478481
self.proposer_boost_root = block_root;
479482
}

0 commit comments

Comments
 (0)