-
Notifications
You must be signed in to change notification settings - Fork 293
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrade to tendermint v0.35.4 and cosmos-sdk v0.46.0 (#399)
* update app to be v0.46.0 compat * remove store and mem keys as we shouldn't use these * comment out the IBC modules for now as it is not ready * use patch version of core and the sdk * more small changes to get to compile * replace cosmoscmd with local cmd infra * add missing modules to set begin,init,end methods * linter * fix validate basic test * comment out extra test case for now * add a validator set to the genesis state of the testapp * use default tx handler for middleware * uncomment out test * rename encoding config var to not overwrite encoding package * use patched version of core that removes malleated txs from the v1 mempool * linter * docs * remove commented code * fix makefile * add a command to change the mode to validator in script * use a release instead of a commit * add commets to ibc uninstall to point to issue #412 * get rid of all starport scaffolding comments * add comment describing panic * use a constant for env prefix * include comment for picking default snapshot interval * patch merge * fix integration test * remove print statement * use release and not a specific commit
- Loading branch information
1 parent
6080046
commit 5e4a1dc
Showing
36 changed files
with
1,170 additions
and
794 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package encoding | ||
|
||
import ( | ||
"github.com/cosmos/cosmos-sdk/client" | ||
"github.com/cosmos/cosmos-sdk/codec" | ||
codectypes "github.com/cosmos/cosmos-sdk/codec/types" | ||
"github.com/cosmos/cosmos-sdk/std" | ||
"github.com/cosmos/cosmos-sdk/x/auth/tx" | ||
) | ||
|
||
type InterfaceRegister func(codectypes.InterfaceRegistry) | ||
|
||
// EncodingConfig specifies the concrete encoding types to use for a given app. | ||
// This is provided for compatibility between protobuf and amino implementations. | ||
type EncodingConfig struct { | ||
InterfaceRegistry codectypes.InterfaceRegistry | ||
Codec codec.Codec | ||
TxConfig client.TxConfig | ||
Amino *codec.LegacyAmino | ||
} | ||
|
||
// MakeEncodingConfig creates an encoding config for the app. | ||
func MakeEncodingConfig(regs ...InterfaceRegister) EncodingConfig { | ||
amino := codec.NewLegacyAmino() | ||
interfaceRegistry := codectypes.NewInterfaceRegistry() | ||
std.RegisterInterfaces(interfaceRegistry) | ||
for _, reg := range regs { | ||
reg(interfaceRegistry) | ||
} | ||
marshaler := codec.NewProtoCodec(interfaceRegistry) | ||
txCfg := tx.NewTxConfig(marshaler, tx.DefaultSignModes) | ||
|
||
return EncodingConfig{ | ||
InterfaceRegistry: interfaceRegistry, | ||
Codec: marshaler, | ||
TxConfig: txCfg, | ||
Amino: amino, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,58 +1,17 @@ | ||
package main | ||
|
||
import ( | ||
"io" | ||
"os" | ||
|
||
"github.com/celestiaorg/celestia-app/app" | ||
"github.com/cosmos/cosmos-sdk/baseapp" | ||
svrcmd "github.com/cosmos/cosmos-sdk/server/cmd" | ||
servertypes "github.com/cosmos/cosmos-sdk/server/types" | ||
"github.com/tendermint/spm/cosmoscmd" | ||
"github.com/tendermint/tendermint/libs/log" | ||
dbm "github.com/tendermint/tm-db" | ||
) | ||
|
||
const envPrefix = "CELESTIA" | ||
|
||
func main() { | ||
rootCmd, _ := cosmoscmd.NewRootCmd( | ||
app.Name, | ||
app.AccountAddressPrefix, | ||
app.DefaultNodeHome, | ||
app.Name, | ||
app.ModuleBasics, | ||
appBuilder, | ||
// this line is used by starport scaffolding # root/arguments | ||
) | ||
if err := svrcmd.Execute(rootCmd, app.DefaultNodeHome); err != nil { | ||
rootCmd := NewRootCmd() | ||
if err := svrcmd.Execute(rootCmd, envPrefix, app.DefaultNodeHome); err != nil { | ||
os.Exit(1) | ||
} | ||
} | ||
|
||
// appBuilder wraps the app.New func to return a cosmoscmd.App interface instead | ||
// of the raw app.App. The New func has to return a raw app.App, because we need | ||
// to call PrepareProposal | ||
func appBuilder( | ||
logger log.Logger, | ||
db dbm.DB, | ||
traceStore io.Writer, | ||
loadLatest bool, | ||
skipUpgradeHeights map[int64]bool, | ||
homePath string, | ||
invCheckPeriod uint, | ||
encodingConfig cosmoscmd.EncodingConfig, | ||
appOpts servertypes.AppOptions, | ||
baseAppOptions ...func(*baseapp.BaseApp), | ||
) cosmoscmd.App { | ||
return app.New( | ||
logger, | ||
db, | ||
traceStore, | ||
loadLatest, | ||
skipUpgradeHeights, | ||
homePath, | ||
invCheckPeriod, | ||
encodingConfig, | ||
appOpts, | ||
baseAppOptions..., | ||
) | ||
} |
Oops, something went wrong.