Implement beacon chain push withdrawals (EIP-4895)#4731
Merged
Conversation
MarekM25
reviewed
Oct 7, 2022
src/Nethermind/Nethermind.Merge.Plugin/Data/V1/ExecutionPayloadV1.cs
Outdated
Show resolved
Hide resolved
MarekM25
reviewed
Oct 7, 2022
src/Nethermind/Nethermind.Consensus/Processing/BlockProcessor.cs
Outdated
Show resolved
Hide resolved
MarekM25
reviewed
Oct 7, 2022
MarekM25
reviewed
Oct 7, 2022
|
|
||
| foreach (var withdrawal in block.Withdrawals) | ||
| { | ||
| if (_logger.IsTrace) _logger.Trace($" {(BigInteger)withdrawal.Amount / (BigInteger)Unit.Ether:N3}{Unit.EthSymbol} to account {withdrawal.Recipient}"); |
Contributor
There was a problem hiding this comment.
what about traces around withdrawals?
MarekM25
requested changes
Oct 7, 2022
Contributor
MarekM25
left a comment
There was a problem hiding this comment.
Could you reach out Mikhail Kalinin and Alex Stokes about withdrawalRoot validation?
It should be added to BlockValidator for sure (even now), but the question is how we should validate them when we're receiving newPayload from CL client.
8d3db64 to
6d83a24
Compare
2539d2f to
9e6ee93
Compare
MarekM25
reviewed
Oct 28, 2022
MarekM25
reviewed
Oct 28, 2022
MarekM25
reviewed
Oct 28, 2022
MarekM25
reviewed
Oct 31, 2022
MarekM25
reviewed
Nov 1, 2022
src/Nethermind/Nethermind.Merge.Plugin/Data/ExecutionPayload.cs
Outdated
Show resolved
Hide resolved
…stamp_activation_fix
…e_valid_responses
d506374 to
7e804d8
Compare
LukaszRozmej
requested changes
Jan 5, 2023
Member
There was a problem hiding this comment.
Main issues:
Incomplete validation ofindexandamountcould lead to consensus issue on our side- I don't like how engine versioning is being handled. IMO we should model it as it is in the spec with either composition or inheritance + generics for messages. This would help us have better separation between protocol versions similar to what we have for eth protocol in networking. Would make code changes tracked easier. Would make code more resemble the spec. We could potentially use similar strategy on tests. More details with example in NewPayloadHandler.cs comment.
src/Nethermind/Nethermind.Consensus/Withdrawals/ValidationWithdrawalProcessor.cs
Show resolved
Hide resolved
src/Nethermind/Nethermind.Consensus/Processing/BlockProcessor.cs
Outdated
Show resolved
Hide resolved
src/Nethermind/Nethermind.Consensus/Withdrawals/ValidationWithdrawalProcessor.cs
Outdated
Show resolved
Hide resolved
src/Nethermind/Nethermind.Blockchain.Test/GenesisLoaderTests.cs
Outdated
Show resolved
Hide resolved
src/Nethermind/Nethermind.Merge.Plugin/Handlers/ForkchoiceUpdatedHandler.cs
Show resolved
Hide resolved
LukaszRozmej
approved these changes
Jan 6, 2023
b4bcf93 to
8e7be8d
Compare
dcb5a6a to
a25e999
Compare
…b.com/nethermindeth/nethermind into feature/shanghai-eip-4895-withdrawals # Conflicts: # src/Nethermind/Nethermind.Consensus/Validators/BlockValidator.cs
…into feature/shanghai-eip-4895-withdrawals
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #4580
Changes:
These changes are preliminary for prototyping purposes and are subject to change.
Withdrawalclass has been added to theBlockBlockProcessorhas been modified to process withdrawals if anyTypes of changes
What types of changes does your code introduce?
Testing
Requires testing
In case you checked yes, did you write tests??
Further comments