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

WIP: make sure validate_header also validates seal on parent #1876

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion eth/vm/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -641,11 +641,19 @@ def validate_header(cls,
)

if check_seal:
try:
cls.validate_seal(parent_header)
except ValidationError:
cls.cls_logger.warning(
"Failed to validate seal on parent header: %r",
header.as_dict()
)
raise
try:
cls.validate_seal(header)
except ValidationError:
cls.cls_logger.warning(
"Failed to validate header proof of work on header: %r",
"Failed to validate seal on header: %r",
header.as_dict()
)
raise
Expand Down