Skip to content

fix(genesis): reject zero block gas limit - #332

Closed
huklaa wants to merge 3 commits into
circlefin:mainfrom
huklaa:fix-321-block-gas-limit
Closed

fix(genesis): reject zero block gas limit#332
huklaa wants to merge 3 commits into
circlefin:mainfrom
huklaa:fix-321-block-gas-limit

Conversation

@huklaa

@huklaa huklaa commented Sep 3, 2026

Copy link
Copy Markdown

Fixes #321.

Aligns genesis ProtocolConfig validation with the runtime protocol config invariant by requiring blockGasLimit to be at least 1 instead of allowing zero.

Adds focused schema regression coverage verifying that:

  • blockGasLimit: 1n is accepted
  • blockGasLimit: 0n is rejected
  • values above uint64 are rejected

This keeps genesis configuration from accepting a value that the runtime mutative API would reject.

@kutluhaneth46

Copy link
Copy Markdown

Heads-up: this looks like a duplicate of #327 (same one-line blockGasLimit: schemaBigInt.min(1n) change for #321). #327 also adds unit coverage under a different test filename. Worth coordinating so maintainers only merge one — happy to close this in favor of #327 if that helps triage.

@huklaa

huklaa commented Sep 7, 2026

Copy link
Copy Markdown
Author

Closing this in favor of #327, which already implements the same #321 fix and focused boundary coverage. Keeping only one patch avoids duplicate review/merge work for maintainers. Thanks for the heads-up.

@huklaa huklaa closed this Sep 7, 2026
@kutluhaneth46

Copy link
Copy Markdown

Sounds good — thanks for closing in favor of #327. Agreed that keeping a single patch is cleaner for review.

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

Successfully merging this pull request may close these issues.

Genesis ProtocolConfig should reject zero blockGasLimit

2 participants