chihuahua icon indicating copy to clipboard operation
chihuahua copied to clipboard

fix: unmatched wasmd and wasmvm

Open faddat opened this issue 2 years ago • 4 comments

Hi,

I think that a possible root cause of issues bringing the network back is that for a minute we made blocks on wasmvm 1.4

So this PR brings us to the latest wasmd release, which properly supports the new wasmvm.

I haven't done a thorough study but this feels right to me.

Happy to get on a call or whatever to do a thorough study.

faddat avatar Sep 29 '23 09:09 faddat

Hey, so this PR needs some TLC. If I have time, I will give it that.

Putting it on draft for now.

faddat avatar Sep 29 '23 11:09 faddat

we finally reverted back to wasmvm 1.3.0 and restarted, although we had 2 tombstoned nodes, could you help us reverting that by any chance?

woof-chihuahua avatar Sep 29 '23 20:09 woof-chihuahua

As I was looking at the consensus dump, my backscroll quickly filled up for my putty window. This is my bash_history for my huahua user. Backed up current data to data-bak Downloaded and untar'd polka's snap. Copied my state file back over. Exited but logged back in to display the state file contents to just double check it was correct before restarting the node. image

effofxprime avatar Sep 29 '23 21:09 effofxprime

@faddat @joeabbey @woof-chihuahua This adds both validators and delegators to be untombstoned. Changing the variable holding the val addresses was changed to an array and I am not sure the best way to deal with the resulting errors from cos_patch.go.
https://github.com/effofxprime/chihuahua/commit/ea5a69e866c035d50d6b4634dc3e4c04084d9afb

Last time the following method was used to go this route and I just 'copied' that. https://github.com/effofxprime/cosmos-sdk/tree/chihuahua-0.47.5-tombstone It's probably not ideal to 'temp' switch off to a modified SDK to just get back on next upgrade.

Possible solution that would require help with. Geo(@george-aj) from yieldmos came up with an idea to use purely the upgrade handler as to avoid needing a custom modification to the SDK.

func UpgradeHandler(ctx sdk.Context, slashingKeeper slashing.Keeper, consAddr sdk.ConsAddress) {
    signInfo, found := slashingKeeper.GetValidatorSigningInfo(ctx, consAddr)
    
    if !found {
        fmt.println(fmt.Sprintf("Unable to find validator: %s", consAddr.String()))
        return
    }

    if signInfo.Tombstoned {
        fmt.println(fmt.Sprintf("Un-tombstoned validator: %s", consAddr.String()))
        signInfo.Tombstoned = false
    }
    
    if signInfo.Jailed {
        fmt.println(fmt.Sprintf("Un-jailed validator: %s", consAddr.String()))
        signInfo.Jailed = false
    }
    
    slashingKeeper.SetValidatorSigningInfo(ctx, consAddr, signInfo)
}

What would be the best way to implement this?

effofxprime avatar Sep 30 '23 22:09 effofxprime

closed for inactivity

woof-chihuahua avatar May 18 '24 12:05 woof-chihuahua