-
Notifications
You must be signed in to change notification settings - Fork 256
chore(types): remove ExecutionPayloadHeader version #2701
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
base: main
Are you sure you want to change the base?
Conversation
…nding-partial-withdrawals
…hain/beacon-kit into pppw-gindexes
…hain/beacon-kit into pppw-gindexes
…hain/beacon-kit into pppw-gindexes
| ); err != nil { | ||
| return err | ||
| // NOTE: marshalling this struct is NOT affected by it's own fork version. | ||
| if version.IsBefore(forkVersion, version.Electra()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can delay the hard fork by making this version.Electra1() or something else in the future
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This refactored code is still backwards compatible
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
super nit: consider inverting test to simplfiy code. Something like
if !version.IsBefore(forkVersion, version.Electra()) {
// post Electra we simplified marshalling and we do not need to store version
return nil
}
...…into remove-eph-version
|
Agree with this change for a later fork. Will review properly after all bectra related work is done |
| eth1DepositIndex sdkcollections.Item[uint64] | ||
| // latestExecutionPayloadVersion stores the latest execution payload | ||
| // version. | ||
| // version. Kept for backwards compatibility for versions before Electra. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am afraid we really need to do that. One of the downside of a blockchain
| // the BeaconStore. | ||
| func (kv *KVStore) SetLatestExecutionPayloadHeader( | ||
| payloadHeader *ctypes.ExecutionPayloadHeader, | ||
| payloadHeader *ctypes.ExecutionPayloadHeader, forkVersion common.Version, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
spitballing here: an alternative could be to have a SetLatestExecutionPayloadHeaderPreElectra and a SetLatestExecutionPayloadHeader.
From Pectra on we would call only the latter, but clients of this method would have to decide which method to call.
Probably does not make much of a different, just pointing it out
abi87
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Content is fine by me. I agree it's probably slightly best to include this change in a sequent fork instead of Electra, but not by much.
A non-critical proposal to clean up tech debt. This PR can be merged now but chosen to be kept as a simple refactor instead of a hard fork by changing this line