lambdaclass / lambdaclass/lambda_ethereum_consensus

Compressed SSZ files used in unit test need to be related

Open
#1,407 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

electra ssz
Dominant language
Elixir
Stars
109
Forks
41
PR merge metrics
No merged PRs in 30d

Description

We have 2 ssz files as fixtures, one for the beacon state and another one for an empty block, the two appear to be related and picking any two of those fail a specific test:

  1) test construct block (Unit.Validator.BlockBuilderTest)
     test/unit/validator/block_builder_test.exs:21
     Assertion with == failed
     code:  assert block.body.randao_reveal == spec_block.message.body.randao_reveal
     left:  "\x97M_\x1D\xBB\xC5\xF5\xE5QW]^\xEFԼxl\x13Y\xB80\xA8x\xC8\xDDK\xAEP9\x91\xF8\x92\x10\xB6\xF1\xF8\x8Cpdw\xD7A\x8A\x86\x05$\xC0\xFF\x14\x1C\xE1\xF4`\xB6\x96BU\xCB\x18\xD0\xF4\xBE\xD0F\x92\xE3ka\xE7)U\e\x9A\x8F-.o\xC1\xA4$\xC3\xD4-\xBD`\x89l\xB6\xED\xFD\xD8\tG\x9C\xFB\xC5"
     right: "?\xAD\xB5\xBE\xE4\xD4_\xF7\x01eE\x15W\x9F\x13\xE4$\xA8\x82\x89r\x97\xBF\vb\xFB}(\xDE(\xAC\xBCHy\xD2wZ\x0E\x0Ew)=*\xD3\"\xED\xC5S\xA4\x04\xEDʪ\xF7ɯ\xFB\tg\e\xD4޺[`D\x82>VE\x8D\x8F\xB4C\xBE/\xED\xCD\r\x9C\d}5\xB4\xD4\x13l9\xFFӻ*i\xD7\xF0\xD8"
     stacktrace:
       test/unit/validator/block_builder_test.exs:59: (test)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with test/unit/validator/block_builder_test.exs, especially the failing test at lines 21 and 59, and inspect the two SSZ fixtures used for the beacon state and empty block. Verify how the fixtures are loaded and make them represent related data so the block body's randao_reveal matches the expected specification block; rerun the block builder test to confirm it passes.

Written by the indexing model from the issue text.

Assessment

Tech stack
elixir
Domain
testing
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.