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

Blockchain tests without PoW #480

Closed
winsvega opened this issue Aug 7, 2018 · 5 comments
Closed

Blockchain tests without PoW #480

winsvega opened this issue Aug 7, 2018 · 5 comments

Comments

@winsvega
Copy link
Collaborator

winsvega commented Aug 7, 2018

A small change to the blockchain test format.
It could now have field:

"sealEngine" : "Ethash",

meaning that it is the ordinarty PoW test.
And another option is

"sealEngine" : "NoProof",

Meaning that blocks in the test shoul not be checked for difficutly check.
If there is no sealEngine field then difficulty check should be performed.

Rationaly:
Most of the blockchain tests does not meant to check the actual difficulty calculation. so the PoW could be skipped to save verification time and test generation time. The difficulty PoW will present only in those blockchain test that do actually test some difficulty related logic.

@holiman
Copy link
Contributor

holiman commented Aug 7, 2018

If we do change this, it means that it'll break all clients genesis parsing. Otoh, if we just start shipping invalid PoW (or a static deadc0de nonce), and modify e.g. hive to run clients with --no-verify during import, nothing will break... Just sayin...

@winsvega
Copy link
Collaborator Author

winsvega commented Aug 7, 2018

not the genesis parsing but block verification. the blocks in tests will have invalid nonce / difficulty

@holiman
Copy link
Contributor

holiman commented Aug 7, 2018

As for hive, the actual json in the blockchain test is ignored -- only the block RLP is used, so the only way to configure anything is to use the node-specific genesis/config. Or, alternatively, to modify each node-specific bootstrap script to make the node ignore PoW. Geth, parity and ethereumJ supports this, from what I can tell, so that should be ok. I don't know if blockchain tests are used, in other places. I think most client-specific frameworks rely more on the statetests than the blockchain tests, but I may be wrong.

@winsvega
Copy link
Collaborator Author

winsvega commented Aug 7, 2018

well the script that read block RLP from json could configure the node then.

@winsvega
Copy link
Collaborator Author

implemented

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants