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

Add a dev flags for validation of locally built block #7636

Open
kamilchodola opened this issue Oct 21, 2024 · 5 comments
Open

Add a dev flags for validation of locally built block #7636

kamilchodola opened this issue Oct 21, 2024 · 5 comments
Labels

Comments

@kamilchodola
Copy link
Contributor

kamilchodola commented Oct 21, 2024

We have a possibility to "Simulate" block production for testing purpose.
Issue with that is that we do not validate if built block is valid so we are only checking the "building" part, not if the block could potentially be accepted on chain.

Would be great to have a way to validate blocks:

  1. Locally - maybe some flag like "Merge.ValidateProposedBlock" which after block creation will also make it's verification (as we do usually for newPayload) - by default false and hidden from docs as it should be dev only flag
  2. Remotely - as point 1 will be checking on very same implementation it could potentially still be faulty - we could provide a mechanism (maybe with some custom debug endpoint?) to send proposed block to remote node which can run different version of nethermind client to verify it here and just answer with "Valid" or "Invalid" Custom RPC seems like a must but if there will be any way to reuse any existing endpoint (like newPayload" for that purpose to allow even now to use old versions like 1.27.1 would be amazing but probably not possible. Configuration of it on a simulation node should be like:
  • Merge.ValidateProposedBlock=true
  • Merge.RemoteBlockProposalValidator="RPC of node here"

All names and namespaces are just suggestion - To be adjusted.

@LukaszRozmej
Copy link
Member

I think we don't need new flags it should just be validated.

@kamilchodola
Copy link
Contributor Author

@LukaszRozmej What about cross-version verification? The recent issue probably would be noticed on the very same version but sometimes you may produce block which you think is valid and validation will still prove that - but some regression introduced very recently will (between two versions) will be there and node running old version will notice that.

@LukaszRozmej
Copy link
Member

Maybe, but less important

@kamilchodola
Copy link
Contributor Author

More complex for sure but not to ommit :) First point is mandatory asap to have some sort of validation.

@benaadams
Copy link
Member

I think we don't need new flags it should just be validated.

Block is produced via validation so would be excessive to always do it twice by default?

@NethermindEth NethermindEth deleted a comment Oct 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants