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

perf: Update offchain signature with POSEIDON hash #151

Closed
akhercha opened this issue Jul 18, 2024 · 0 comments · Fixed by #225
Closed

perf: Update offchain signature with POSEIDON hash #151

akhercha opened this issue Jul 18, 2024 · 0 comments · Fixed by #225
Assignees

Comments

@akhercha
Copy link
Member

akhercha commented Jul 18, 2024

Feature Request

Current behavior

At the moment, our offchain batch signature of entries uses the Pedersen hash. Which is O(n) and thus is a big bottleneck when a publisher wants to publish a lot of entries in one batch.

With the recent starknet.py bump, we can now use the Poseidon hash, which gives us ~60% better performances.

We recently made some investigations here:
astraly-labs/pragma-node#83 (comment)

Expected behavior

We want to update the revision field here to 1 so the Poseidon hash is correctly used by starknet.py.

This requires synchronisation with the pragma-node, we will need to update the way we check for signature correctness, see:
astraly-labs/pragma-node#87

After that, test properly a publishing process from the price pusher to the API to be sure everything is ok.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant