Skip to content
This repository has been archived by the owner on Dec 15, 2023. It is now read-only.

Declare tx signature type is int instead of hex-encoded string #225

Closed
1 of 2 tasks
Arcticae opened this issue Aug 17, 2022 · 8 comments
Closed
1 of 2 tasks

Declare tx signature type is int instead of hex-encoded string #225

Arcticae opened this issue Aug 17, 2022 · 8 comments
Assignees
Labels
Type: bug Something isn't working

Comments

@Arcticae
Copy link

Describe the bug
A clear and concise description of what the bug is.
When querying the declare tx with signature, the return type is integer and not hex-encoded string (like in invoke)

Not reproducible on alpha-goerli

  • This issue is only present on Devnet and cannot be reproduced on alpha-goerli (check the box if true).

To Reproduce
Steps to reproduce the behavior:

  1. Send a signed declare tx
  2. Wait for acceptance
  3. Fetch the tx and get the signature

Expected behavior
A clear and concise description of what you expected to happen.

Devnet version

  • I am using Devnet version: 0.2.10
  • This happens with a dockerized Devnet (check the box if true).
  • This does not appear on the following Devnet version:

Machine specifications

  • OS: MacOS
  • CPU: M1 Pro
  • Memory: 16GB
@FabijanC FabijanC added the Type: bug Something isn't working label Aug 18, 2022
@FabijanC
Copy link
Collaborator

Can declare transactions be signed using Starknet CLI? How are you signing them?

With some hacking in Starknet CLI, I got

BadRequest: HTTP error ocurred. Status: 500. Text: {"code": "StarknetErrorCode.NON_EMPTY_SIGNATURE", "message": "The signature field in Declare transactions must be an empty list.\n0 != 2"

Is this issue a blocker for you?

@Arcticae
Copy link
Author

No it's not a blocker - but it looks like it should be easily fixable, right? Since the expected return type is known from other endpoints

@FabijanC
Copy link
Collaborator

FabijanC commented Aug 23, 2022

Sure it looks like it should be easily fixable, but I'm not able to reproduce it. How do I reproduce declare tx signing with Starknet CLI and how are you doing it?

@mikiw
Copy link
Contributor

mikiw commented Aug 25, 2022

@Arcticae Please, could you specify a detailed way how to reproduce this issue? What does this transaction look like and how is signed?

@Arcticae
Copy link
Author

We use python (starknet.py) with native cairo-lang methods (starkware.starknet.core.os.transaction_hash.transaction_hash.calculate_declare_transaction_hash, and then starknet_py.utils.crypto.facade.message_signature)

@FabijanC
Copy link
Collaborator

FabijanC commented Sep 8, 2022

I tested this with Starknet CLI 0.10.0 which signs declare transactions. I tried getting the transaction after declaration in Devnet v0.3.0 and it has hex strings as members of its signature list. If you can confirm that this is no longer an issue for you, we can close this. @Arcticae

@Arcticae
Copy link
Author

Arcticae commented Sep 9, 2022

Will tell the guys to test this one, thx!

@Arcticae
Copy link
Author

@FabijanC this is no longer an issue - thanks!

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

No branches or pull requests

3 participants