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

OpenZeppeling 0.2.0 account contract have an issue with signature verification. #161

Closed
amanusk opened this issue Jul 13, 2022 · 3 comments · Fixed by #169
Closed

OpenZeppeling 0.2.0 account contract have an issue with signature verification. #161

amanusk opened this issue Jul 13, 2022 · 3 comments · Fixed by #169
Assignees
Labels
bug Something isn't working

Comments

@amanusk
Copy link
Contributor

amanusk commented Jul 13, 2022

I have tried running the oz-account-test.ts test of starknet-plugin-exaple and ran into the following issue:


  2) OpenZeppelin account
       should handle multiple invokes through an account:
     Error: Transaction rejected. Error message:

Error at pc=0:133:
Got an exception while executing a hint.
Cairo traceback (most recent call last):
Unknown location (pc=0:746)
Unknown location (pc=0:682)
Error message: Account: invalid signature
Unknown location (pc=0:347)
Unknown location (pc=0:321)

Traceback (most recent call last):
  File "<hint14>", line 1, in <module>
  File "/app/src/starkware/starknet/services/batcher/starknet_batcher_venv-site/starkware/cairo/lang/builtins/signature/signature_builtin_runner.py", line 94, in add_signature
    ), f"Signature hint must point to the signature builtin segment, not {addr}."
AssertionError: Signature hint must point to the signature builtin segment, not 14:0.

The cause is probably this issue #378 of OpenZeppelin with contracts of version 0.2.0 on Goerli testnet.

@FabijanC FabijanC self-assigned this Jul 14, 2022
@FabijanC FabijanC added the bug Something isn't working label Jul 14, 2022
@FabijanC
Copy link
Collaborator

FabijanC commented Jul 14, 2022

So it happens only on alpha-goerli? Not on Devnet? Should it be fixed with the newly released OZ v0.2.1?

I still don't really understand what's the issue here. Running the oz-account-test.ts test passed against alpha-goerli in the CI/CD workflow that released plugin v0.6.1.

@amanusk
Copy link
Contributor Author

amanusk commented Jul 14, 2022

That's my understanding, yes.
Only happens on alpha-goerli.
A fix was already merged, I assume it will be available in the next version.

This can be used to track the fix here.

amanusk added a commit to amanusk/starknet-hardhat-plugin that referenced this issue Jul 17, 2022
Updates OpenZeppelin account version to 0.2.1
Fixes issue 0xSpaceShard#161
@archseer
Copy link

archseer commented Jul 19, 2022

I'd recommend fixing this to address OpenZeppelin/cairo-contracts#344 too

Edit: Looks like this is already fixed in 0.2.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants