Skip to content

[DO NOT MERGE] Bug in Gloas specs due to BUILDER_INDEX_FLAG#4835

Closed
leolara wants to merge 1 commit into
ethereum:masterfrom
leolara:leolara/gloas-test-next-validator-index-bug
Closed

[DO NOT MERGE] Bug in Gloas specs due to BUILDER_INDEX_FLAG#4835
leolara wants to merge 1 commit into
ethereum:masterfrom
leolara:leolara/gloas-test-next-validator-index-bug

Conversation

@leolara

@leolara leolara commented Jan 13, 2026

Copy link
Copy Markdown
Member

Bug description:

process_withdrawals (gloas) calls update_next_withdrawal_validator_index (capella), that in some situations reads a ValidatorIndex that since gloas could contain a builder index by BUILDER_INDEX_FLAG in some situations. But update_next_withdrawal_validator_index does not handle BUILDER_INDEX_FLAG and hence assumes a inexistent validator index.

My personal opinion:

BUILDER_INDEX_FLAG will cause bugs, not only in the specs but also on the clients, it requires that any method that handles a ValidatorIndex should be rewritten in order to avoid bugs. We should evaluate if adding more fields to the state could be a more robust solution.

@leolara leolara changed the title [DO NOT MERGE} Bug in Gloas specs due to BUILDER_INDEX_FLAG [DO NOT MERGE] Bug in Gloas specs due to BUILDER_INDEX_FLAG Jan 13, 2026
@jtraglia

Copy link
Copy Markdown
Member

@leolara you are confusing two separate things. This was a known issue & my mistake. Fixed here:

@leolara

leolara commented Jan 14, 2026

Copy link
Copy Markdown
Member Author

process_withdrawals (gloas) calls update_next_withdrawal_validator_index (capella), that in some situations reads a ValidatorIndex that since gloas could contain a builder index by BUILDER_INDEX_FLAG in some situations. But update_next_withdrawal_validator_index does not handle BUILDER_INDEX_FLAG and hence assumes a inexistent validator index.

and #4832

Is your opinion about how this specific bug caused by BUILDER_INDEX_FLAG should be fixed.

@jtraglia is this incorrect?

@jtraglia

Copy link
Copy Markdown
Member

Is your opinion about how this specific bug caused by BUILDER_INDEX_FLAG should be fixed.

@jtraglia is this incorrect?

I'm saying BUILDER_INDEX_FLAG isn't the reason for the bug. Let's assume builders were validators like before. If the withdrawals were full (the first condition in update_next_withdrawal_validator_index), the result would still be incorrect as it would set the next sweep index to some random validator index.

I've already explained to you during our meeting why we went this direction, but feel free to propose an alternative to BUILDER_INDEX_FLAG. This PR is not the appropriate place for it though. Start a thread on discord.

@leolara

leolara commented Jan 14, 2026

Copy link
Copy Markdown
Member Author

I'm saying BUILDER_INDEX_FLAG isn't the reason for the bug. Let's assume builders were validators like before. If the withdrawals were full (the first condition in update_next_withdrawal_validator_index), the result would still be incorrect as it would set the next sweep index to some random validator index.

It would be a different problem and different behaviour.

I've already explained to you during our meeting why we went this direction, but feel free to propose an alternative to BUILDER_INDEX_FLAG. This PR is not the appropriate place for it though. Start a thread on discord.

My intention is not to start a discussion here, but documenting the bug.

@leolara

leolara commented Jan 16, 2026

Copy link
Copy Markdown
Member Author

Closing as it is included here: #4830

@leolara leolara closed this Jan 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants