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

Feat/rollback #15

Merged
merged 6 commits into from
Apr 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -376,10 +376,16 @@
apphook.NewWasmBridgeHook(ac, app.WasmKeeper).Hook,
app.MsgServiceRouter(),
authorityAddr,
ac,
vc,
cc,
)

err = app.RegisterExecutorChangePlans()
if err != nil {
panic(err)

Check warning on line 386 in app/app.go

View check run for this annotation

Codecov / codecov/patch

app/app.go#L386

Added line #L386 was not covered by tests
}

// get skipUpgradeHeights from the app options
skipUpgradeHeights := map[int64]bool{}
for _, h := range cast.ToIntSlice(appOpts.Get(server.FlagUnsafeSkipUpgrades)) {
Expand Down
21 changes: 21 additions & 0 deletions app/executor_change.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package app

// Executor change plans

func (app *MinitiaApp) RegisterExecutorChangePlans() error {
// err := app.OPChildKeeper.RegisterExecutorChangePlan(
// 1,
// 361,
// "initvaloper158x0dpu5f4x703fhtseg5kpytsj02hw04qyw0t",
// "init158x0dpu5f4x703fhtseg5kpytsj02hw0p9ahpm",
// "op2",
// "{\"@type\":\"/cosmos.crypto.ed25519.PubKey\",\"key\":\"GTJEksmVK7gkzPXdj+YIJxipfJ+yYUlc6jzIuh9s2t0=\"}",
// "testestestestsetsetestsetest",
// )

// if err != nil {
// return err
// }

return nil
}
120 changes: 0 additions & 120 deletions cmd/minitiad/genvalidators.go

This file was deleted.

4 changes: 3 additions & 1 deletion cmd/minitiad/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ import (

"github.com/initia-labs/initia/app/params"
minitiaapp "github.com/initia-labs/miniwasm/app"

opchildcli "github.com/initia-labs/OPinit/x/opchild/client/cli"
)

// NewRootCmd creates a new root command for initiad. It is called once in the
Expand Down Expand Up @@ -183,7 +185,7 @@ func genesisCommand(encodingConfig params.EncodingConfig, basicManager module.Ba

cmd.AddCommand(
genutilcli.AddGenesisAccountCmd(minitiaapp.DefaultNodeHome, ac),
AddGenesisValidatorCmd(basicManager, encodingConfig.TxConfig, banktypes.GenesisBalancesIterator{}, minitiaapp.DefaultNodeHome),
opchildcli.AddGenesisValidatorCmd(basicManager, encodingConfig.TxConfig, banktypes.GenesisBalancesIterator{}, minitiaapp.DefaultNodeHome),
genutilcli.ValidateGenesisCmd(basicManager),
genutilcli.GenTxCmd(basicManager, encodingConfig.TxConfig, banktypes.GenesisBalancesIterator{}, minitiaapp.DefaultNodeHome, ac),
)
Expand Down
9 changes: 5 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ require (
github.com/golang/protobuf v1.5.4
github.com/gorilla/mux v1.8.1
github.com/grpc-ecosystem/grpc-gateway v1.16.0
github.com/initia-labs/OPinit v0.2.2
github.com/initia-labs/initia v0.2.3
github.com/initia-labs/OPinit v0.2.3-0.20240404023002-8608273959a8
github.com/initia-labs/initia v0.2.2
github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v1.18.0
github.com/rakyll/statik v0.1.7
Expand Down Expand Up @@ -69,6 +69,7 @@ require (
github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 // indirect
github.com/bits-and-blooms/bitset v1.13.0 // indirect
github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect
github.com/celestiaorg/go-square v1.0.1 // indirect
github.com/cenkalti/backoff/v4 v4.2.1 // indirect
github.com/cespare/xxhash v1.1.0 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
Expand Down Expand Up @@ -141,6 +142,7 @@ require (
github.com/iancoleman/strcase v0.3.0 // indirect
github.com/improbable-eng/grpc-web v0.15.0 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/initia-labs/OPinit/api v0.0.0-20240404023002-8608273959a8 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/jmhodges/levigo v1.0.0 // indirect
github.com/klauspost/compress v1.17.7 // indirect
Expand Down Expand Up @@ -217,8 +219,8 @@ require (
replace (
// use cosmos fork of keyring
github.com/99designs/keyring => github.com/cosmos/keyring v1.2.0
github.com/cometbft/cometbft => github.com/initia-labs/cometbft v0.0.0-20240404091408-238cddd887d3

github.com/cometbft/cometbft => github.com/initia-labs/cometbft v0.0.0-20240104081544-34081fc84daf
github.com/cosmos/cosmos-sdk => github.com/initia-labs/cosmos-sdk v0.0.0-20240313050640-ff14560eeb21

github.com/cosmos/iavl => github.com/initia-labs/iavl v0.0.0-20240208034922-5d81c449d4c0
Expand All @@ -233,7 +235,6 @@ replace (
github.com/gin-gonic/gin => github.com/gin-gonic/gin v1.9.1

github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1

// Downgraded to avoid bugs in following commits which caused simulations to fail.
github.com/syndtr/goleveldb => github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7
)
16 changes: 10 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,8 @@ github.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1
github.com/bytedance/sonic v1.9.1 h1:6iJ6NqdoxCDr6mbY8h18oSO+cShGSMRGCEo7F2h0x8s=
github.com/bytedance/sonic v1.9.1/go.mod h1:i736AoUSYt75HyZLoJW9ERYxcy6eaN6h4BZXU064P/U=
github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ=
github.com/celestiaorg/go-square v1.0.1 h1:LEG1zrw4i03VBMElQF8GAbKYgh1bT1uGzWxasU2ePuo=
github.com/celestiaorg/go-square v1.0.1/go.mod h1:XMv5SGCeGSkynW2OOsedugaW/rQlvzxGzWGxTKsyYOU=
github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4=
github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM=
github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw=
Expand Down Expand Up @@ -728,16 +730,18 @@ github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANyt
github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo=
github.com/initia-labs/OPinit v0.2.2 h1:lcBQCQcn7zgkpQaKqIfNLaj15Dy6qSDYv62/XJ1iISE=
github.com/initia-labs/OPinit v0.2.2/go.mod h1:1dn1iseG1S4wfXUtnb4mUkraJdL9/lWBQPpI+HbVzL0=
github.com/initia-labs/cometbft v0.0.0-20240104081544-34081fc84daf h1:7k3u0huB7OpiDfQKnfcwKUvByl7HyYs3itgROO/YpFg=
github.com/initia-labs/cometbft v0.0.0-20240104081544-34081fc84daf/go.mod h1:PIi48BpzwlHqtV3mzwPyQgOyOnU94BNBimLS2ebBHOg=
github.com/initia-labs/OPinit v0.2.3-0.20240404023002-8608273959a8 h1:d4Wz4h9q/Kc+tmwP+S6Ra1aCTJKUDb0g2w2V5Z5uFuM=
github.com/initia-labs/OPinit v0.2.3-0.20240404023002-8608273959a8/go.mod h1:1dn1iseG1S4wfXUtnb4mUkraJdL9/lWBQPpI+HbVzL0=
github.com/initia-labs/OPinit/api v0.0.0-20240404023002-8608273959a8 h1:Wk/SJ6RCGA34Sr0i0t+pXL+cVreaptuuHFuWDO9KVu4=
github.com/initia-labs/OPinit/api v0.0.0-20240404023002-8608273959a8/go.mod h1:ASCaZChzhQenOxDLIBicEgi5drhMV3YjPxzV29nGvwM=
github.com/initia-labs/cometbft v0.0.0-20240404091408-238cddd887d3 h1:IX3182+BZ8ksVtAdIlU9ub01dmSAM9lvjHuUz9GWzjc=
github.com/initia-labs/cometbft v0.0.0-20240404091408-238cddd887d3/go.mod h1:qv+nhSohSXLgU45IxHDGM5x4+bG4khsqqyn+e0iEbfo=
github.com/initia-labs/cosmos-sdk v0.0.0-20240313050640-ff14560eeb21 h1:AwqnO5IR+3LWzjqR33MzOkce38ExWLtQwlqrLZVrMyw=
github.com/initia-labs/cosmos-sdk v0.0.0-20240313050640-ff14560eeb21/go.mod h1:oV/k6GJgXV9QPoM2fsYDPPsyPBgQbdotv532O6Mz1OQ=
github.com/initia-labs/iavl v0.0.0-20240208034922-5d81c449d4c0 h1:GQ7/UD5mB6q104roqZK5jxb6ff9sBk0/uwFxgERQIaU=
github.com/initia-labs/iavl v0.0.0-20240208034922-5d81c449d4c0/go.mod h1:CmTGqMnRnucjxbjduneZXT+0vPgNElYvdefjX2q9tYc=
github.com/initia-labs/initia v0.2.3 h1:btg3UoX6oy7LOcsy03rZaYmxDk5RvOyBY+hQ4EtuxUg=
github.com/initia-labs/initia v0.2.3/go.mod h1:xLkPASIv+6EuE7BHCxB3ag2K9+rUwJ/6AC5fkYmSejw=
github.com/initia-labs/initia v0.2.2 h1:qbHs7TO9coC2iEMBKbmF5JoosbiGvs/TIve6nWOCQyE=
github.com/initia-labs/initia v0.2.2/go.mod h1:oSWtBjAI9hA8umlp1patsSzqlUL4aSymwRnC+WxHhQA=
github.com/initia-labs/movevm v0.2.2 h1:T0FwprEEDWhNfPREthNDvRr+IGg9N7eQg+zXvT8V/U4=
github.com/initia-labs/movevm v0.2.2/go.mod h1:1EyJ06+Hn43MfaXZ+30a2gmhS5zjqiFF8oSF5CHai28=
github.com/jhump/protoreflect v1.15.3 h1:6SFRuqU45u9hIZPJAoZ8c28T3nK64BNdp9w6jFonzls=
Expand Down
Loading