Skip to content

Test contains non-monotonic withdrawal indices specified in subsequent withdrawals within one block #377

Open
@danceratopz

Description

@danceratopz

I think we should ensure that the withdrawal indices here are monotonically increasing, or the test may not be valid (we define two withdrawals with index=0):

Withdrawal(
index=0,
validator=0,
address=to_address(0x100),
amount=0,
),
# No value, touched account
Withdrawal(
index=0,
validator=0,
address=to_address(0x200),
amount=0,
),

According to geth's Withdrawal struct implementation, the index is a

monotonically increasing identifier issued by consensus layer

Should a block be able to contain two withdrawals with the same index? This test also performs multiple withdrawals from the same validator index to multiple addresses, which is an unusual test case in itself (there is a 1-1 mapping between validator and withdrawal index and this can not be changed). Surely it's good to test this, but perhaps we should additionally test with more typical values, as found on the beacon chain?

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is neededneeds-discussionNeeds discussion before proceedingscope:testsScope: Changes EL client test cases in `./tests`type:bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions