fix: return G2NotInSubgroup for G2 subgroup check failure#3179
Closed
Fibonacci747 wants to merge 1 commit intobluealloy:mainfrom
Closed
fix: return G2NotInSubgroup for G2 subgroup check failure#3179Fibonacci747 wants to merge 1 commit intobluealloy:mainfrom
Fibonacci747 wants to merge 1 commit intobluealloy:mainfrom
Conversation
CodSpeed Performance ReportMerging #3179 will not alter performanceComparing Summary
|
Member
|
Will be merged later |
rakita
added a commit
that referenced
this pull request
Jan 9, 2026
This commit consolidates improvements from 8 community PRs with the ai-bot label: - fix: correct debug log for blob gas fields in blockchaintest (#3291) Split blob_excess_gas_and_price into separate debug outputs for clarity - perf(state): remove redundant clones in account_info.rs (#3287) Eliminate unnecessary clone operations in test code - docs: fix duplicate word in MIGRATION_GUIDE.md (#3209) Remove duplicate "allows" in PrecompileError documentation - fix: return G2NotInSubgroup for G2 subgroup check failure (#3179) Correct error type from G1NotInSubgroup to G2NotInSubgroup in BLS12-381 - refactor: reuse bound tx and remove redundant context.tx() calls (#3176) Optimize validation by reusing transaction binding - docs: fix incorrect reth references in blockchain.rs comments (#3169) Update comments to use correct terminology instead of "reth" - perf: use lazy defaults for env vars in burntpix benchmark (#3071) Replace unwrap_or with unwrap_or_else to avoid unnecessary allocations All changes have been tested with cargo check and cargo test.
rakita
added a commit
that referenced
this pull request
Jan 9, 2026
* chore: apply improvements from ai-bot labeled PRs This commit consolidates improvements from 8 community PRs with the ai-bot label: - fix: correct debug log for blob gas fields in blockchaintest (#3291) Split blob_excess_gas_and_price into separate debug outputs for clarity - perf(state): remove redundant clones in account_info.rs (#3287) Eliminate unnecessary clone operations in test code - docs: fix duplicate word in MIGRATION_GUIDE.md (#3209) Remove duplicate "allows" in PrecompileError documentation - fix: return G2NotInSubgroup for G2 subgroup check failure (#3179) Correct error type from G1NotInSubgroup to G2NotInSubgroup in BLS12-381 - refactor: reuse bound tx and remove redundant context.tx() calls (#3176) Optimize validation by reusing transaction binding - docs: fix incorrect reth references in blockchain.rs comments (#3169) Update comments to use correct terminology instead of "reth" - perf: use lazy defaults for env vars in burntpix benchmark (#3071) Replace unwrap_or with unwrap_or_else to avoid unnecessary allocations All changes have been tested with cargo check and cargo test. * fmt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The arkworks backend returned Bls12381G1NotInSubgroup from read_g2() when the G2 subgroup check failed. This was inconsistent with both the logical context (G2 subgroup validation) and the blst backend, which correctly returns Bls12381G2NotInSubgroup. Aligning the error variant ensures consistent behavior across backends, corrects diagnostics for callers that rely on precise error reporting, and matches EIP-2537 expectations where MSM and pairing must enforce subgroup checks for their respective groups.