Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v1.1.6 field/method renaming #2853

Closed

Conversation

realbigsean
Copy link
Member

@realbigsean realbigsean commented Dec 2, 2021

Issue Addressed

We will probably want a kintsugi-v2 or kintsugi-v3 branch before merging these, because these changes are a part of v3

ethereum/consensus-specs#2728
ethereum/consensus-specs#2738

Proposed Changes

Rename coinbase to fee_recipient
Rename is_merge_* to is_merge_transition_*

Additional Info

Commented out the ssz static merge EF tests because those will fail on v1.1.5 with these changes, they will pass once we start testing against v1.1.6

@realbigsean realbigsean added ready-for-review The code is ready for review do-not-merge labels Dec 2, 2021
@realbigsean
Copy link
Member Author

Tagged as "do not merge" until we figure out how we're handling kintsugi-v2 vs kintsugi-v3

@realbigsean realbigsean added work-in-progress PR is a work-in-progress and removed ready-for-review The code is ready for review labels Dec 3, 2021
@michaelsproul
Copy link
Member

I think we should merge this (via #2822) and let the old kintsugi branch retain spec v2 for now. Once the new devnet launches (on unstable or kintsugi) a kintsugi-v2 branch could be maintained if necessary (or we can probably just drop it).

@realbigsean
Copy link
Member Author

Closing for #2822

@realbigsean realbigsean closed this Dec 6, 2021
bors bot pushed a commit that referenced this pull request Dec 13, 2021
## Issue Addressed

Resolves: #2741
Includes: #2853 so that we can get ssz static tests passing here on v1.1.6. If we want to merge that first, we can make this diff slightly smaller

## Proposed Changes

- Changes the `justified_epoch` and `finalized_epoch` in the `ProtoArrayNode` each to an `Option<Checkpoint>`. The `Option` is necessary only for the migration, so not ideal. But does allow us to add a default logic to `None` on these fields during the database migration.
- Adds a database migration from a legacy fork choice struct to the new one, search for all necessary block roots in fork choice by iterating through blocks in the db.
- updates related to ethereum/consensus-specs#2727
  -  We will have to update the persisted forkchoice to make sure the justified checkpoint stored is correct according to the updated fork choice logic. This boils down to setting the forkchoice store's justified checkpoint to the justified checkpoint of the block that advanced the finalized checkpoint to the current one. 
  - AFAICT there's no migration steps necessary for the update to allow applying attestations from prior blocks, but would appreciate confirmation on that
- I updated the consensus spec tests to v1.1.6 here, but they will fail until we also implement the proposer score boost updates. I confirmed that the previously failing scenario `new_finalized_slot_is_justified_checkpoint_ancestor` will now pass after the boost updates, but haven't confirmed _all_ tests will pass because I just quickly stubbed out the proposer boost test scenario formatting.
- This PR now also includes proposer boosting ethereum/consensus-specs#2730

## Additional Info
I realized checking justified and finalized roots in fork choice makes it more likely that we trigger this bug: ethereum/consensus-specs#2727

It's possible the combination of justified checkpoint and finalized checkpoint in the forkchoice store is different from in any block in fork choice. So when trying to startup our store's justified checkpoint seems invalid to the rest of fork choice (but it should be valid). When this happens we get an `InvalidBestNode` error and fail to start up. So I'm including that bugfix in this branch.

Todo:

- [x] Fix fork choice tests
- [x] Self review
- [x] Add fix for ethereum/consensus-specs#2727
- [x] Rebase onto Kintusgi 
- [x] Fix `num_active_validators` calculation as @michaelsproul pointed out
- [x] Clean up db migrations

Co-authored-by: realbigsean <seananderson33@gmail.com>
@realbigsean realbigsean deleted the 1.1.6-rename-coinbase-fields branch November 21, 2023 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge work-in-progress PR is a work-in-progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants