-
Notifications
You must be signed in to change notification settings - Fork 627
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
Channel capability not found after chain_id change #613
Comments
Thanks @V-Staykov for raising this issue. I think the issue at hand is unrelated to the linked issue since new channels can be created without error. I have a few questions which will hopefully allow us to narrow in on the possible problem The ibc-upgrade proposal part looks correct to me, but what I don't follow is why you do a genesis state restart and set the upgrade handler. The upgrade handler only needs to be set if an in-place upgrade is to occur (otherwise you can remove the upgrade proposal after exporting genesis). Also, is there a particular reason you choose to do a genesis dump state restart as opposed to using the in-place upgrade? The binary is unchanged except for the upgrade handler added? What is interesting is that the error returned is unrelated to the client upgrade. If there was an issue with the ibc-upgrade proposal, we would get an error on chain B. Thus it sounds like there might be an issue with exporting capabilities. Are you certain the same channel id is being used for the transfer? Can you show me your |
Hi @colin-axner , thanks for the fast reply. I am doing a genesis dump state restart, because I wanted to test the process basically. The binary is unchanged, except for the upgrade handler added. Yes I make sure I use the same channel id, there is no other anyways. The capabilities is NOT on begin blocker before and after the upgrade. |
Could you add the capabilities begin blocker after upgrade and retry to send the packet? No need to do the whole process again, just start the chain with the updated binary and attempt to send the packet |
Tried it - it is the same. |
As @colin-axner mentiont it is most probably an issue with exporting/importing capabilities. I just tried just to export genesis, unsafe reset all and start the chain again, without any changes to it and the same problem occurs. Also accidently found out that after this erro occurs, if I just stop and start again the node, the error disappears and the tx passes... |
@V-Staykov can you link me the genesis file after exporting?
Very interesting, sounds like the capabilities are not being initialized in memory, but then when you restart they are via BeginBlock. Why they aren't being initialized in InitGenesis is beyond me. |
Also can you give me the exact ibc-go version? ibc-go v1.1.0 does not use v0.44.3 of the SDK |
Yes, here is the genesis. I did check it and the capabilities there seem fine. Also I started printing some stuff in the GetCapability in capability's keeper.go and found out that the indexBytes in this code returns [] after the first start. Other than that the name is correct and all the data from the genesis seems correctly imported.
The ibc-go version is indeed v1.1.0, I meant we use 0.44.3 of the sdk for our modules. Maybe that is a problem? I could try to convert ibc-go to v2 and try like that, although it will take me some time. Also the Hermes doesn't yer work with V2, so I am reluctant to do it. |
The link appears to be incorrect. That is the JSON for the upgraded client state in the upgrade proposal, I think. It isn't a genesis file What is the value of index in the genesis file?
No this is fine, it just means v0.44.0 is being used by ibc-go - I'm fairly certain. |
Sry about the link, I did fix it. |
Thanks for fixing the link. I see two entries for the same capability:
Could you try removing the index: 3? Did you modify the genesis file at all? It seems problematic to have duplicate entries |
I tried but it's the same. I did test though - exporting the genesis just adds this another time, no matter if it exists already. So it was in this file basically because I had done export a few times already. |
Hmm, this is very odd, but seems to be related to capability issues we have run into in the past. I will try to reproduce this issue on Monday using the |
Okay, so I managed to find the problem. Basically it was a problem on our side. On SDK v0.42.9 a bug was fixed with InitializeAndSeal method and the initialization was moved to InitGenezis and BeginBlocker. On our side we didn't correctly migrate and basically manually replased the InitializeAndSeal in this code in app.go
What happend was that the InitMemStore was setting an initialized flag to true, before the owners were set in init genesis. Then the init genesis was setting the owners, but when trying to init the mem store, it already had it's flag set to initialized. |
Summary of Bug
After I do an ibv-upgrade with changed chain_id to rev 2 and starting height from block 1, I get the following error:
I found a simmilar issue here.
In my case though, creating a new channel and transferring over it works fine.
Version
Cosmos sdk v0.44.3, Ibc-go v1.1, Hermes relayer v0.9
Steps to Reproduce
For Admin Use
The text was updated successfully, but these errors were encountered: