Skip to content

Comments

feat: rename bn128 to bn254 for Ethereum standard consistency#2810

Merged
rakita merged 3 commits intobluealloy:mainfrom
Pratham1812:alpha/rename
Jul 28, 2025
Merged

feat: rename bn128 to bn254 for Ethereum standard consistency#2810
rakita merged 3 commits intobluealloy:mainfrom
Pratham1812:alpha/rename

Conversation

@Pratham1812
Copy link
Contributor

Renames bn128 to bn254 for Ethereum standard consistency

Changes

  • Updates all references from bn128 to bn254 throughout codebase
  • Aligns naming with Ethereum EIP standards
  • No functional changes to cryptographic operations

Closes #2795

@codspeed-hq
Copy link

codspeed-hq bot commented Jul 26, 2025

CodSpeed Performance Report

Merging #2810 will degrade performances by 4.01%

Comparing Pratham1812:alpha/rename (1e95d38) with main (80e09f6)

Summary

❌ 1 regressions
✅ 168 untouched benchmarks
🆕 2 new benchmarks
⁉️ 2 dropped benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark BASE HEAD Change
⁉️ bn128 add precompile 21.3 µs N/A N/A
⁉️ bn128 mul precompile 335.4 µs N/A N/A
🆕 bn254 add precompile N/A 21.3 µs N/A
🆕 bn254 mul precompile N/A 335.4 µs N/A
ecrecover precompile 195.3 µs 203.4 µs -4.01%

@@ -70,7 +70,7 @@ pub fn granite() -> &'static Precompiles {
INSTANCE.get_or_init(|| {
let mut precompiles = fjord().clone();
// Restrict bn256Pairing input size
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you also grep for bn256 and change that to bn254?

Comment on lines 119 to 120
// EIP-196: Precompiled contracts for addition and scalar multiplication on the elliptic curve alt_bn128.
// EIP-197: Precompiled contracts for optimal ate pairing check on the elliptic curve alt_bn128.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of alt_bn254, it should just be bn254

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is exactly how the EIP is named, so I would leave it

Copy link
Contributor

@kevaundray kevaundray left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left some comments, though essentially the change should be:

  • bn256 -> bn254
  • alt_bn128 -> bn254
  • bn128 -> bn254

Copy link
Member

@rakita rakita left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Few nits on naming, otherwise lgtm

@rakita rakita merged commit 9bc0c04 into bluealloy:main Jul 28, 2025
29 of 30 checks passed
@github-actions github-actions bot mentioned this pull request Jul 28, 2025
@github-actions github-actions bot mentioned this pull request Aug 6, 2025
lwedge99 pushed a commit to sentioxyz/revm that referenced this pull request Sep 16, 2025
…loy#2810)

* feat: rename bn128 to bn254 for Ethereum standard consistency

* fix: renamed more occurences

* fix: addresed nits
theochap pushed a commit to ethereum-optimism/optimism that referenced this pull request Jan 21, 2026
…loy/revm#2810)

* feat: rename bn128 to bn254 for Ethereum standard consistency

* fix: renamed more occurences

* fix: addresed nits
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.

Change name bn128 to bn254

3 participants