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

non working --use_poseidon flag on cairo-hash-program cli arg v0.13.1 #184

Open
rkdud007 opened this issue Mar 7, 2024 · 0 comments
Open

Comments

@rkdud007
Copy link

rkdud007 commented Mar 7, 2024

Context


--use_poseidon flag is not working properly in this cli argument

cairo-hash-program --use_poseidon false --program compiled_cairo/v1_hdp.json
0x36b89f0e160f103b39a8a6fb0d3271833225aeea2bb00d0c1cf06f4a6de0445

cairo-hash-program --use_poseidon true --program compiled_cairo/v1_hdp.json
0x36b89f0e160f103b39a8a6fb0d3271833225aeea2bb00d0c1cf06f4a6de0445

cairo-hash-program --program compiled_cairo/v1_hdp.json
0x71e9f412ed7dd8c0cc82f15a4739e35b958e2efe9d6b5b0bed937b8389dc9f0

cairo-hash-program --use_poseidon trudddde --program compiled_cairo/v1_hdp.json
0x36b89f0e160f103b39a8a6fb0d3271833225aeea2bb00d0c1cf06f4a6de0445

basically any thing after --use_poseidon flag, will route it to hash in poseidon. And I could not even use this flag without some value ( which is pretty confusing ).

cairo-hash-program --use_poseidon --program compiled_cairo/v1_hdp.json

usage: cairo-hash-program [-h] [-v] --program PROGRAM [--flavor {Debug,Release,RelWithDebInfo}] [--use_poseidon USE_POSEIDON]
cairo-hash-program: error: argument --use_poseidon: expected one argument

Suggested change

Would like to have , simply, if I pass --use_poseidon , will consider as true ( use poseidon hash for compute program hash ) if i don't pass that flag, use pedersen as before.

parser.add_argument(
    "--use_poseidon",
    action="store_true",  # Automatically stores True if --use_poseidon is exist, otherwise False.
    help="Use Poseidon hash.",
)
@rkdud007 rkdud007 changed the title non working --use_poseidon flag on cairo-hash-program v0.13.1 non working intuitively --use_poseidon flag on cairo-hash-program v0.13.1 Mar 7, 2024
@rkdud007 rkdud007 changed the title non working intuitively --use_poseidon flag on cairo-hash-program v0.13.1 non working --use_poseidon flag on cairo-hash-program v0.13.1 Mar 7, 2024
@rkdud007 rkdud007 changed the title non working --use_poseidon flag on cairo-hash-program v0.13.1 non working --use_poseidon flag on cairo-hash-program cli arg v0.13.1 Mar 7, 2024
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

No branches or pull requests

1 participant