-
Notifications
You must be signed in to change notification settings - Fork 20k
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
all: implement EIP-6110, execution layer triggered deposits #29431
Conversation
We added some logics in downloader when we introduce |
core/types/block.go
Outdated
if deposits == nil { | ||
b.header.DepositsHash = nil | ||
} else if len(deposits) == 0 { | ||
b.header.DepositsHash = &EmptyWithdrawalsHash |
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.
EmptyDepositsHash
core/types/block.go
Outdated
b = b.WithWithdrawals(withdrawals) | ||
|
||
// TODO(matt): copy this | ||
b.deposits = deposits |
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.
e.g. b.deposits = slices.Clone(deposits)
?
b6ebd84
to
e86bac2
Compare
e4446bb
to
7a41242
Compare
We need to allow prague in fcuV3 as well |
e942406
to
8ea1e62
Compare
e631d4c
to
fc447bb
Compare
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.
Added some review comments, the thing I dislike the most is that we need to use abigen, which panics btw
f1e9ed7
to
517c2d9
Compare
I like the handwritten decoder much better, I did a bunch of fuzzing of the types and nothing came up, but I haven't verified that the decoding is_actually_ correct |
if header.RequestsHash != nil { | ||
depositSha := types.DeriveSha(res.Requests, trie.NewStackTrie(nil)) | ||
if depositSha != *header.RequestsHash { | ||
return fmt.Errorf("invalid deposit root hash (remote: %x local: %x)", *header.RequestsHash, depositSha) |
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.
Perhaps invalid request root
?
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.
and also please change the var name to requestSha
a2df8b2
to
94ea9c8
Compare
I think there's a missing validation in fyi prague := chain.Config().IsPrague(header.Number, header.Time)
if !prague {
if header.RequestsHash != nil {
return fmt.Errorf("invalid requestsRoot: have %d, expected nil", header.RequestsHash)
}
} else {
if header.RequestsHash == nil {
return errors.New("header is missing requestsRoot")
}
} |
… 6110 deposit type
94ea9c8
to
ed290cd
Compare
@islishude that occurs in |
it doesn't have a validation for the chain fork rule |
ed290cd
to
eff58ff
Compare
eff58ff
to
0fc2c72
Compare
This PR implements EIP-6110: Supply validator deposits on chain. It also sketches out the base for Prague in the engine API types. I plan to base future Prague EIP work against this PR.