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

migrate: Core-1 vesting accounts to the Charter #741

Closed
wants to merge 35 commits into from

Conversation

Reecepbcups
Copy link
Contributor

@Reecepbcups Reecepbcups commented Jul 3, 2023

Summary

Migrates all Core-1 to new vesting contracts. If the wallet is wolf, send funds to the Core-1 subdao (No more vesting for him)

Uses - https://pastebin.com/raw/89MJms1c - to test manually

SDK v47 now lets us create accounts at runtime

Should also use Osmosis as ref: https://github.com/osmosis-labs/cosmos-sdk/blob/osmo/v0.47.5/x/auth/vesting/types/vesting_account.go#L813-L859

@Reecepbcups Reecepbcups changed the title Migrate Core-1 vesting accounts to cw-vesting chore(migrate) Core-1 vesting accounts to cw-vesting Jul 3, 2023
app/upgrades/vesting.go Outdated Show resolved Hide resolved
@Reecepbcups Reecepbcups changed the title chore(migrate) Core-1 vesting accounts to cw-vesting v17: chore(migrate) Core-1 vesting accounts to cw-vesting Jul 5, 2023
@Reecepbcups Reecepbcups changed the title v17: chore(migrate) Core-1 vesting accounts to cw-vesting chore(migrate) Core-1 vesting accounts to cw-vesting Jul 7, 2023
@Reecepbcups
Copy link
Contributor Author

Bumping to v17+ due to complexity. Would rather it be safe and get more testing since we are moving like millions in funds

@Reecepbcups Reecepbcups linked an issue Jul 7, 2023 that may be closed by this pull request
app/upgrades/v19/upgrades.go Fixed Show resolved Hide resolved
@Reecepbcups
Copy link
Contributor Author

Reecepbcups commented Dec 24, 2023

Needs a signaling proposal via main gov, not just Core-1; per validator comments to me & modification of genesis accounts

@Reecepbcups
Copy link
Contributor Author

Reecepbcups commented Jan 12, 2024

Putting this snippet here from the other PR to remove the multisig, as it may be useful (i.e. get the unvested amount, subtract balance, and handle)

func mintUnvestedToCharter(ctx sdk.Context, k *keepers.AppKeepers, CouncilAddr sdk.AccAddress, vestingAcc *vestingtypes.PeriodicVestingAccount) { // nolint:gocritic
	unvested := SumPeriodVestingAccountsUnvestedTokensAmount(ctx, vestingAcc)
	fmt.Printf("Core1Addr Unvested to mint to the charter: %s\n", unvested)

	coins := sdk.NewCoins(sdk.NewCoin("ujuno", unvested))

	if err := k.BankKeeper.MintCoins(ctx, "mint", coins); err != nil {
		panic(err)
	}

	if err := k.BankKeeper.SendCoinsFromModuleToAccount(ctx, "mint", CouncilAddr, coins); err != nil {
		panic(err)
	}
}

Implement Tests with Mainnet snapshot accounts
@joelsmith-2019 joelsmith-2019 removed the blocked We can't do this until something else is done label Jan 25, 2024
@joelsmith-2019
Copy link
Contributor

FYI:

This pull request provides the logic to send all remaining funds from the core-1 vesting accounts to the council wallet. All core-1 accounts will undergo instant redelegation and unbonding. The only exception is Jack's delegations to his validator at Strangelove will not be unbonded.

All logic takes place in the v20 upgrade handler. Once v20 goes into production, the council will then be required to issue new vesting accounts.

The v20 namespace will be created after this PR is approved and merged.

@joelsmith-2019 joelsmith-2019 marked this pull request as ready for review February 2, 2024 21:18
@joelsmith-2019 joelsmith-2019 added the review me Review me for merge label Feb 2, 2024
@Reecepbcups Reecepbcups changed the title migrate: Core-1 vesting accounts to cw-vesting migrate: Core-1 vesting accounts to the Charter Feb 2, 2024
Fix Test Vesting Account Instantiation
@dimiandre
Copy link
Member

With Ops Department we decided to put this on hold since not all core-1 members agreed to cancel their vesting

@joelsmith-2019 joelsmith-2019 added blocked We can't do this until something else is done and removed review me Review me for merge labels Feb 16, 2024
@faddat
Copy link
Contributor

faddat commented Mar 1, 2024

probably should be closed, unless the migration isn't actually done

@Reecepbcups
Copy link
Contributor Author

not done, only the multisig was transfered. doubt it will get through since the charter is against upgrades

@faddat
Copy link
Contributor

faddat commented Mar 4, 2024

thanks for clarifying @Reecepbcups

@dimiandre dimiandre closed this Aug 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked We can't do this until something else is done
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Migrate core-1 SDK vesting -> contracts
5 participants