Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: stylus poseidon hash benchmark against solidity #463

Merged
merged 15 commits into from
Jan 8, 2025

Conversation

qalisander
Copy link
Member

@qalisander qalisander commented Dec 18, 2024

  • Optimize rise in pow for Poseidon hash.
  • Add Poseidon hash comparison benchmarks between stylus and plain solidity implementations.
  • Extend benchmark's report with additional column WASM Opt & Cached, that applies wasm-opt tool to the cached contract.
  • Small refactoring of bench-marking logic.

Follows #264
Addresses #468

PR Checklist

  • Tests
  • Documentation
  • Changelog

Copy link

netlify bot commented Dec 18, 2024

Deploy Preview for contracts-stylus canceled.

Name Link
🔨 Latest commit 41c8671
🔍 Latest deploy log https://app.netlify.com/sites/contracts-stylus/deploys/677eca812f98dd0008d0d137

Copy link

codecov bot commented Dec 18, 2024

Codecov Report

Attention: Patch coverage is 76.00000% with 6 lines in your changes missing coverage. Please review.

Project coverage is 87.8%. Comparing base (4553289) to head (41c8671).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
lib/crypto/src/bigint.rs 0.0% 6 Missing ⚠️
Additional details and impacted files
Files with missing lines Coverage Δ
lib/crypto/src/field/mod.rs 100.0% <100.0%> (ø)
lib/crypto/src/bigint.rs 84.1% <0.0%> (-3.7%) ⬇️

@qalisander qalisander requested a review from ggonzalez94 January 8, 2025 05:38
@qalisander qalisander changed the title feat: generic hash trait and benchmark for poseidon feat: stylus poseidon hash benchmark against solidity Jan 8, 2025
@qalisander qalisander marked this pull request as ready for review January 8, 2025 05:46
Copy link
Collaborator

@0xNeshi 0xNeshi left a comment

Choose a reason for hiding this comment

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

Nice work!

benches/src/PoseidonT3.sol Outdated Show resolved Hide resolved
benches/src/lib.rs Show resolved Hide resolved
benches/src/lib.rs Outdated Show resolved Hide resolved
benches/src/report.rs Show resolved Hide resolved
benches/src/poseidon_sol.rs Outdated Show resolved Hide resolved
benches/src/poseidon_sol.rs Show resolved Hide resolved
benches/src/poseidon_sol.rs Show resolved Hide resolved
scripts/bench.sh Outdated Show resolved Hide resolved
scripts/bench.sh Show resolved Hide resolved
Copy link
Collaborator

@bidzyyys bidzyyys left a comment

Choose a reason for hiding this comment

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

Looks good to me.

.github/workflows/gas-bench.yml Show resolved Hide resolved
scripts/bench.sh Show resolved Hide resolved
Copy link
Collaborator

@0xNeshi 0xNeshi left a comment

Choose a reason for hiding this comment

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

LGTM

@bidzyyys bidzyyys merged commit 6210620 into main Jan 8, 2025
26 checks passed
@bidzyyys bidzyyys deleted the generic-hash-interface-for-poseidon branch January 8, 2025 20:41
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.

3 participants