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

Make the max bytes of extra_data configurable #1864

Merged

Conversation

@cburgdorf
Copy link
Contributor

cburgdorf commented Oct 29, 2019

What was wrong?

The validation check for the maximum bytes of the extra_data field is currently hardcoded. It needs to be configurable to allow different consensus schemes such as Clique which have a different opinion on the max bytes of this field.

How was it fixed?

Introduce a extra_data_max_bytes class var which defaults to 32 but can be overwritten.

Cute Animal Picture

put a cute animal picture link inside the parentheses

@cburgdorf cburgdorf requested a review from pipermerriam Oct 29, 2019
Copy link
Member

pipermerriam left a comment

I think you missed adding this to the VirtualMachineAPI

@@ -90,6 +90,7 @@ class VM(Configurable, VirtualMachineAPI):
- ``_state_class``: The :class:`~eth.abc.StateAPI` class used by this VM for execution.
"""
block_class: Type[BlockAPI] = None
extra_data_max_bytes = 32

This comment has been minimized.

Copy link
@pipermerriam

pipermerriam Oct 29, 2019

Member

Maybe type this as a ClassVar

This comment has been minimized.

Copy link
@cburgdorf

cburgdorf Oct 30, 2019

Author Contributor

Good idea 👍

@cburgdorf cburgdorf force-pushed the cburgdorf:christoph/feat/extra_data_max_length branch from 9b03398 to 62a2194 Oct 30, 2019
@cburgdorf cburgdorf merged commit 6fe3c72 into ethereum:master Oct 30, 2019
20 checks passed
20 checks passed
ci/circleci: py36-benchmark Your tests passed on CircleCI!
Details
ci/circleci: py36-core Your tests passed on CircleCI!
Details
ci/circleci: py36-database Your tests passed on CircleCI!
Details
ci/circleci: py36-docs Your tests passed on CircleCI!
Details
ci/circleci: py36-lint Your tests passed on CircleCI!
Details
ci/circleci: py36-native-blockchain-byzantium Your tests passed on CircleCI!
Details
ci/circleci: py36-native-blockchain-constantinople Your tests passed on CircleCI!
Details
ci/circleci: py36-native-blockchain-frontier Your tests passed on CircleCI!
Details
ci/circleci: py36-native-blockchain-homestead Your tests passed on CircleCI!
Details
ci/circleci: py36-native-blockchain-petersburg Your tests passed on CircleCI!
Details
ci/circleci: py36-native-blockchain-spurious_dragon Your tests passed on CircleCI!
Details
ci/circleci: py36-native-blockchain-tangerine_whistle Your tests passed on CircleCI!
Details
ci/circleci: py36-native-blockchain-transition Your tests passed on CircleCI!
Details
ci/circleci: py36-transactions Your tests passed on CircleCI!
Details
ci/circleci: py36-vm Your tests passed on CircleCI!
Details
ci/circleci: py37-core Your tests passed on CircleCI!
Details
ci/circleci: py37-database Your tests passed on CircleCI!
Details
ci/circleci: py37-lint Your tests passed on CircleCI!
Details
ci/circleci: py37-transactions Your tests passed on CircleCI!
Details
ci/circleci: py37-vm Your tests passed on CircleCI!
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.