OpenZesame / Zhip

iOS Wallet for Zilliqa
MIT License
35 stars 6 forks source link

[✅ SOLVED] GasLimit too low #127

Closed mervyn126 closed 3 years ago

mervyn126 commented 3 years ago

New Issue Checklist

Issue Description

The wallet is not letting me send Zillow’s out of the wallet. Is there an issue I need to be aware of?

Environment

Stand in the root of the repo and run ./environments.sh and paste the output below

[INSERT OUTPUT HERE]
Sajjon commented 3 years ago

@mervyn126 were you aware that Zilliqa network was down yesterday for maintenance?

https://twitter.com/zilliqa/status/1397788292200816643

Try again now please. And you can try setting TX fee to 0.1 Zil, that is 100 000 ”Li” I believe. Should work!

mervyn126 commented 3 years ago

Thank you!

Sent from my iPhone

On May 28, 2021, at 3:25 AM, Alexander Cyon @.***> wrote:



@mervyn126https://github.com/mervyn126 were you aware that Zilliqa network was down yesterday for maintenance?

https://twitter.com/zilliqa/status/1397788292200816643

Try again now please. And you can try setting TX fee to 0.1 Zil, that is 100 000 ”Li” I believe. Should work!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/OpenZesame/Zhip/issues/127#issuecomment-850209261, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AUIBMBUEZDCQ5G2WTPNXPC3TP5AMTANCNFSM45VEQ3QA.

mervyn126 commented 3 years ago

Ok I tried again with 1,000,000 gas fee (1 Zil) and no luck. I’m not a newbie but I don’t get why it’s not working. [cid:0BFD7BCA-BF74-4CC3-83AA-F8D2BA9A3886-L0-001]

Sent from my iPhone

On May 28, 2021, at 8:34 AM, Mervyn Arana @.***> wrote:

 Thank you!

Sent from my iPhone

On May 28, 2021, at 3:25 AM, Alexander Cyon @.***> wrote:



@mervyn126https://github.com/mervyn126 were you aware that Zilliqa network was down yesterday for maintenance?

https://twitter.com/zilliqa/status/1397788292200816643

Try again now please. And you can try setting TX fee to 0.1 Zil, that is 100 000 ”Li” I believe. Should work!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/OpenZesame/Zhip/issues/127#issuecomment-850209261, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AUIBMBUEZDCQ5G2WTPNXPC3TP5AMTANCNFSM45VEQ3QA.

Sajjon commented 3 years ago

@mervyn126 you are right, thank you for reporting! Zilliqa must have a breaking change recently in their RPC API.

So I must implement these changes and upload a new version of Zhip to AppStore, this might take 1-2 weeks.

I don’t want you to be blocked by this, so I recommend you import your private key into Chrome Extension ”ZilPay” and send your funds from//with ZilPay.

Please report back that you managed to do this :) they might support keystore, but simplest would just be to use the private key. Which you should have backed up? Otherwise you can reveal it in Zhip under Settings => Backup Wallet and enter your password.

mervyn126 commented 3 years ago

Thanks for the reply. I don’t mind waiting for the Zhip update. I just wanted to report the issue and know I wasn’t crazy. Thanks for looking into it for us. Have a great day!!

Mervyn.

Sent from my iPhone

On May 28, 2021, at 9:50 AM, Alexander Cyon @.***> wrote:



@mervyn126https://github.com/mervyn126 you are right, thank you for reporting! Zilliqa must have a breaking change recently in their RPC API.

So I must implement these changes and upload a new version of Zhip to AppStore, this might take 1-2 weeks.

I don’t want you to be blocked by this, so I recommend you import your private key into Chrome Extension ”ZilPay” and send your funds from//with ZilPay.

Please report back that you managed to do this :) they might support keystore, but simplest would just be to use the private key. Which you should have backed up? Otherwise you can reveal it in Zhip under Settings => Backup Wallet and enter your password.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/OpenZesame/Zhip/issues/127#issuecomment-850433608, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AUIBMBSNAWGQW6722EOPKO3TP6NSLANCNFSM45VEQ3QA.

Sajjon commented 3 years ago

@mervyn126 Thx for the confidence and patience! I believe I've identified the change, see here:

Two months ago Zilliqa merged a Pull request in their JS lib which changes the gas limit for payment transaction to 50 instead of 1: https://github.com/Zilliqa/Zilliqa-JavaScript-Library/pull/290/files

So I must make the same change in my Swift library Zesame which Zhip uses, to also use the value 50. So I actually just need to change this single line of code and then make a release. Will probably have time to do this tomorrow and then it might take ~1 week for Apple to approve the change.

We can also see that the documentation of Zilliqas RPC API have been changed to 50 in its example:

https://dev.zilliqa.com/docs/apis/api-transaction-create-tx

curl -d '{
    "id": "1",
    "jsonrpc": "2.0",
    "method": "CreateTransaction",
    "params": [{
      "version": 65537,
      "nonce": 1,
      "toAddr": "0x4BAF5faDA8e5Db92C3d3242618c5B47133AE003C",
      "amount": "1000000000000",
      "pubKey": "0205273e54f262f8717a687250591dcfb5755b8ce4e3bd340c7abefd0de1276574",
      "gasPrice": "2000000000",
      "gasLimit": "50",
      "code": "",
      "data": "",
      "signature": "29ad673848dcd7f5168f205f7a9fcd1e8109408e6c4d7d03e4e869317b9067e636b216a32314dd37176c35d51f9d4c24e0e519ba80e66206457c83c9029a490d",
      "priority": false
    }]
}' -H "Content-Type: application/json" -X POST "https://api.zilliqa.com/"

(see "gasLimit": "50" above)

But the the table below incorrectly specifies 1:

Screenshot 2021-05-28 at 16 10 18

I will inform them and ask them to update this.

Sajjon commented 3 years ago

@mervyn126 so I've fixed the issue in Zesame (in this PR), and will now update in Zhip and then publish a release.

Sajjon commented 3 years ago

@mervyn126 I've now fixed the issue in PR #128 and submitted a new version to App Store, version 1.0.4. Expect it to take ~1 week for it to be approved and released.

Thank you for reporting this and thank you for the patience!

mervyn126 commented 3 years ago

Thanks again for the support!! Go Zil!!

Sent from my iPhone

On May 30, 2021, at 6:51 AM, Alexander Cyon @.***> wrote:



Closed #127https://github.com/OpenZesame/Zhip/issues/127.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/OpenZesame/Zhip/issues/127#event-4816993004, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AUIBMBXWI3YHSI5THYMLBGDTQIKCRANCNFSM45VEQ3QA.

Sajjon commented 3 years ago

@mervyn126 Good news, it is released! Apple was very quick with the review, so in a couple of minutes, look for version 1.0.4 of Zhip in App Store.

Thanks again!