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
block: add new consensusFormatValidation flag #2139
Conversation
Codecov Report
Flags with carried forward coverage won't be shown. Click here to find out more. |
packages/block/src/header.ts
Outdated
@@ -26,6 +26,7 @@ import { CLIQUE_EXTRA_SEAL, CLIQUE_EXTRA_VANITY } from './clique' | |||
import type { BlockHeaderBuffer, BlockOptions, HeaderData, JsonHeader } from './types' | |||
import type { CliqueConfig } from '@ethereumjs/common' | |||
|
|||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extra space
packages/block/src/types.ts
Outdated
@@ -1,3 +1,4 @@ | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extra space
packages/block/src/types.ts
Outdated
@@ -69,6 +69,10 @@ export interface BlockOptions { | |||
* Will throw if provided on a non-PoA chain. | |||
*/ | |||
cliqueSigner?: Buffer | |||
/** | |||
* Perform consensus validation checks on header if set. Defaults to true. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* Perform consensus validation checks on header if set. Defaults to true. | |
* Perform consensus validation checks on header if set. Defaults to true. |
packages/block/test/header.spec.ts
Outdated
(err: any) => err.message.includes('transactionsTrie must be 32 bytes'), | ||
'throws on invalid transactionsTrie root hash length' | ||
) | ||
let nonce = Buffer.alloc(5) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a big deal, but I find the nonce reassignment a bit weird. Could we just either scope it differently or directly assign fromHeaderData({nonce: Buffer.alloc(5)})
?
Just a short additional LGTM from my side as well, @acolytec3 thanks for addressing! 🙂 |
Fixes #2135