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

Restake doesn't work when accountNumber is 0 #638

Closed
netlinx2 opened this issue Oct 7, 2022 · 19 comments
Closed

Restake doesn't work when accountNumber is 0 #638

netlinx2 opened this issue Oct 7, 2022 · 19 comments

Comments

@netlinx2
Copy link

netlinx2 commented Oct 7, 2022

Everything on Restake works for me. No problem with any chain i'm using. But for Teritori i can not enable Restake. I can claim, delegate or redelegate TORI, but if i try to enable Restake, the transaction always fails with the following Error message:

Failed to broadcast: Error when broadcasting tx E7338FC0EA356CF183E317172473584F75CB4DF359975056FD4DCB660331300C at height 0. Code: 4; Raw log: signature verification failed; please verify account number (0) and chain-id (teritori-1): unauthorized

Here are the data details:

{
"txBody": {
"messages": [
{
"granter": "tori1ss4krazunlfnc8munks4uvsa5c42vlwrgy4hyq",
"grantee": "tori1e44rluarkdw56dy2turnwjtvtg4wqvs0slzdv4",
"grant": {
"authorization": {
"typeUrl": "/cosmos.staking.v1beta1.StakeAuthorization",
"value": "EjQKMnRvcml2YWxvcGVyMXRqaDZ3cGo2ZDlrcGtmcmN5Z2xrc2V2a2hodGs5Z203Y3c3ZWt1IAE="
},
"expiration": "2023-10-06T22:00:00.000Z"
}
}
],
"memo": "",
"timeoutHeight": "0",
"extensionOptions": [],
"nonCriticalExtensionOptions": []
},
"authInfo": {
"signerInfos": [
{
"publicKey": {
"typeUrl": "/cosmos.crypto.secp256k1.PubKey",
"value": "CiEC2TNI/UsuVsMde9SY8ZJqxJ1B4bFQp5ivUMLvsHtfHls="
},
"modeInfo": {
"single": {
"mode": "SIGN_MODE_DIRECT"
}
},
"sequence": "9"
}
],
"fee": {
"amount": [
{
"denom": "utori",
"amount": "0"
}
],
"gasLimit": "96175",
"payer": "",
"granter": ""
}
},
"chainId": "teritori-1",
"accountNumber": "0"
}

I already deleted the Teritori network from Keplr and reinstalled it from scratch, but the error remains. I also tried diefferent validators, but it's the same problem for all of them. Again: Anything else works perfectly!

@tombeynon
Copy link
Contributor

Interesting! This is because your wallet's accountNumber is 0, i.e. was created at genesis I assume. I found this issue and will try to get a similar fix in place soon: cosmos/cosmjs#549

In the meantime there's not much else you can do, other than use a different wallet I'm afraid.

@netlinx2
Copy link
Author

netlinx2 commented Oct 7, 2022

Many thanks for the quick reply! Will wait for the fix as using a different wallet is not an option for me.

@tombeynon tombeynon changed the title Enabling Restake doens't work for Terotori Restake doesn't work when accountNumber is 0 Oct 7, 2022
@tombeynon
Copy link
Contributor

@netlinx2 this is very difficult to test since I don't have a wallet with this accountNumber - would you mind seeing if https://test.restake.app/ solves the problem for you?

@netlinx2
Copy link
Author

netlinx2 commented Oct 7, 2022

@tombeynon Unfortunately not. The error message is exactly the same on test.restake.app

@tombeynon
Copy link
Contributor

@netlinx2 Could you refresh a few times and try again?

@netlinx2
Copy link
Author

netlinx2 commented Oct 7, 2022

I did but it's still the same error

@netlinx2
Copy link
Author

netlinx2 commented Oct 7, 2022

It's really strange. I'm using Restake with about 16 chains. One of them is Teritori. They all work without any problems. Even for Teritori I can successfully delegate, redelegate and claim. It's just the Enable Restake thing where the transaction fails.

@netlinx2
Copy link
Author

netlinx2 commented Oct 10, 2022

Hey @tombeynon! Is there anything else I can do to help finding the bug?

@tombeynon
Copy link
Contributor

I'm actually a bit stuck as to what to do next. I'm wondering if it could be a Keplr bug (chainapsis/keplr-wallet#422) but I'm going to do some more testing and see what else I can come up with.

To clarify the issue, this only affects the Authz related transactions because REStake defaults to using Amino signing, but authz transactions cannot be sent in Amino format until the chains upgrade (same issue as ledger support). Therefore Authz transactions use protobuf direct signing which is where this error presents itself.

In the meantime, the Ledger instructions would work if you wanted to create the necessary REStake grants using the CLI instead. I'll update this issue when I have more info.

@netlinx2
Copy link
Author

netlinx2 commented Oct 11, 2022 via email

@panache56
Copy link

has anyone found a solution for that problem ? I have exactly the same and it's quite frustrating to can't restake. Thanks for technicals answers and for the work made by the team

@tombeynon
Copy link
Contributor

Unfortunately not yet. Maybe just to triple check, can you confirm whether or not this version of REStake works for you? https://test.restake.app/

@techmik
Copy link

techmik commented Oct 13, 2022

I tried at https://test.restake.app/ and got the same error if that helps

@tombeynon
Copy link
Contributor

@techmik thanks so much for your help, all very useful info. I'll update here as soon as I've made some more progress.

@techmik
Copy link

techmik commented Nov 5, 2022

@tombeynon it seems like restake is working with teritori except in the case where the validator cannot accept more staking

restake-tori-error

my other 2 validators are restaking fine, just this one that is overcapacity will not restake and only throws that error if I manually compound

@netlinx2
Copy link
Author

netlinx2 commented Nov 6, 2022

Hi @tombeynon , I just want to let you know, that enabling Restake for Teritori now works. Not sure what have changed though. I haven't deleted and added the chain again. But there have been some updates for Keplr for sure. Anyway, it works since today!

@tombeynon
Copy link
Contributor

Well that's great news!! Suggests it might have been a Keplr bug in that case. @techmik @panache56 are you seeing the same?

Regarding the max delegation on Teritori @techmik, that makes sense it would error in that way. I'll raise a separate issue to deal with this.

@panache56
Copy link

just used restake yesterday and it's working like a charm, guess this update took care of this bug, thanks a lot team !

@tombeynon
Copy link
Contributor

tombeynon commented Nov 8, 2022

Brilliant news, closing this issue then 💥

Thanks for all your help!

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

4 participants