Skip to content

test(op-precompiles): Check subset of l1 precompiles in op#2204

Merged
rakita merged 13 commits intobluealloy:mainfrom
emhane:precompile-subsets
Mar 21, 2025
Merged

test(op-precompiles): Check subset of l1 precompiles in op#2204
rakita merged 13 commits intobluealloy:mainfrom
emhane:precompile-subsets

Conversation

@emhane
Copy link
Contributor

@emhane emhane commented Mar 13, 2025

Ref #2189

Checks that subset of l1 precompiles are part of op precompiles wrt hardfork

@codspeed-hq
Copy link

codspeed-hq bot commented Mar 13, 2025

CodSpeed Performance Report

Merging #2204 will degrade performances by 2.07%

Comparing emhane:precompile-subsets (2643c9f) with main (8ed1b16)

Summary

❌ 1 regressions
✅ 7 untouched benchmarks

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

Benchmarks breakdown

Benchmark BASE HEAD Change
precompile bench | ecrecover precompile 197.1 µs 201.2 µs -2.07%

@emhane emhane force-pushed the precompile-subsets branch from ae1af23 to 528a1bf Compare March 13, 2025 15:25
@emhane
Copy link
Contributor Author

emhane commented Mar 13, 2025

@rakita could you pls explain how tests pass locally without default features, but not in ci?

@rakita
Copy link
Member

rakita commented Mar 13, 2025

Need to check to be sure, but bls does not have a no_std variant so one precompile will be missing.

@rakita
Copy link
Member

rakita commented Mar 14, 2025

Need to check to be sure, but bls does not have a no_std variant so one precompile will be missing.

Lets wait for #2210, it should make that test pass.

blst are not supported for no_std but for kona they accelare all precompiles so they are fine without it.

@rakita
Copy link
Member

rakita commented Mar 19, 2025

#2249 is done so if we merge this, diff would be same. if there is no bls feature and this precompile is called by default it will throw Fatal error.

@emhane
Copy link
Contributor Author

emhane commented Mar 19, 2025

found the issue here, when blst is not enabled, we still add all the addresses to Prague with bls12_381_precompiles_not_supported, but not to isthmus

@emhane
Copy link
Contributor Author

emhane commented Mar 19, 2025

odd , this still works locally, but in ci the output is different

@emhane
Copy link
Contributor Author

emhane commented Mar 19, 2025

ah it's the precompile function pointers that are different in ci for Prague and isthmus sets...no easy way around that unfortunately. equality of function pointers is needed to see that granite overwrites the bn128 pair. will simplify the difference check to just check for address, to make it pass in ci. that granite overwrites bn128 pair is checked in another test already.

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.

lgtm

@rakita
Copy link
Member

rakita commented Mar 21, 2025

Testing that at least the address of the precompile is present is a good quick sanity test.

@rakita rakita merged commit 43ce335 into bluealloy:main Mar 21, 2025
28 of 29 checks passed
This was referenced Mar 21, 2025
@emhane emhane deleted the precompile-subsets branch March 21, 2025 15:24
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.

2 participants