bls-keygen icon indicating copy to clipboard operation
bls-keygen copied to clipboard

feat: Add perf benchmark tests (with breaking changes due to ESM updates)

Open jaybhanushali3166 opened this issue 7 months ago • 5 comments

This PR closes #40. However, as part of the changes, I updated some dependencies and module handling, which has caused issues with the linting and test setup.

  1. Linting Issue: The .eslintrc.js configuration is outdated, and it's not compatible with ESM-based module execution. The recommended setup for modern ESlint is to migrate to eslint.config.js. I’ve found a migration guide here, however this tool works great for static config and will need careful implementation for dynamic config.
  2. Test Issue: The Mocha test setup is using a CommonJS approach, which might require an upgrade to support ESM modules fully. This has led to test failures.

I'd appreciate guidance on how best to resolve these issues, particularly regarding ESM module support and Mocha compatibility.

jaybhanushali3166 avatar May 01 '25 14:05 jaybhanushali3166

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar May 01 '25 14:05 CLAassistant

Thanks for the PR, several comments:

  • ESM - we definitely want to do this, it may be prudent to do this as a separate PR and cut a breaking release
  • linting - we're now using biome, check out how we're doing it in the lodestar repo
  • testing - we're now using vitest, check out how we're doing it in the lodestar repo
  • benchmarking - we're now using @chainsafe/benchmark (check out how we're doing it in the lodestar repo)

wemeetagain avatar May 08 '25 21:05 wemeetagain

@wemeetagain , thanks for your inputs.

  • For benchmarking, yes this PR itself uses the @chainsafe/benchmark For linting, testing upgrades, the ESM migration must be done before. Shall I plan to do that first?

jaybhanushali3166 avatar Jun 02 '25 15:06 jaybhanushali3166

feel free to add all changes here in this PR

wemeetagain avatar Jul 31 '25 16:07 wemeetagain

feel free to add all changes here in this PR

Sure, I’ll be working on it. Just a quick heads-up — doing ESM migration as a separate PR might not work smoothly since the current deprecated lint and test setups could break. It would be better to update them together. Let me know if you're okay with that approach.

jaybhanushali3166 avatar Jul 31 '25 17:07 jaybhanushali3166