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

Snapshots #13

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ default_target: all

# process build tags

build_tags = netgo
build_tags = netgo objstore
ifeq ($(LEDGER_ENABLED),true)
ifeq ($(OS),Windows_NT)
GCCEXE = $(shell where gcc.exe 2> NUL)
Expand Down
5 changes: 5 additions & 0 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,8 @@ import (

capabilitytypes "github.com/cosmos/ibc-go/modules/capability/types"
icatypes "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/types"
memiavlstore "github.com/crypto-org-chain/cronos/store"
"github.com/cosmos/cosmos-sdk/client/flags"
)

const (
Expand Down Expand Up @@ -397,6 +399,9 @@ func New(
// }
// baseAppOptions = append(baseAppOptions, prepareOpt)

homePath := cast.ToString(appOpts.Get(flags.FlagHome))
baseAppOptions = memiavlstore.SetupMemIAVL(logger, homePath, appOpts, false, false, 0, baseAppOptions)

app.App = appBuilder.Build(db, traceStore, baseAppOptions...)

encConfig := MakeEncodingConfig()
Expand Down
17 changes: 17 additions & 0 deletions cmd/galacticad/cmd/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,3 +119,20 @@ func VerifyAddressFormat(bz []byte) error {

return nil
}

type VersionDBConfig struct {
// Enable defines if the versiondb should be enabled.
Enable bool `mapstructure:"enable"`
}

func DefaultVersionDBConfig() VersionDBConfig {
return VersionDBConfig{
Enable: false,
}
}

var DefaultVersionDBTemplate = `
[versiondb]
# Enable defines if the versiondb should be enabled.
enable = {{ .VersionDB.Enable }}
`
19 changes: 13 additions & 6 deletions cmd/galacticad/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,18 +65,20 @@ import (

// ethertypes "github.com/evmos/ethermint/types"

"github.com/Galactica-corp/galactica/app"
authtxconfig "github.com/cosmos/cosmos-sdk/x/auth/tx/config"
txsign "github.com/cosmos/cosmos-sdk/types/tx/signing"
authtx "github.com/cosmos/cosmos-sdk/x/auth/tx"
"slices"

confixcmd "cosmossdk.io/tools/confix/cmd"
"github.com/Galactica-corp/galactica/app"
appparams "github.com/Galactica-corp/galactica/app/params"
"github.com/Galactica-corp/galactica/cmd/galacticad/cmd/ethkeys"
dbm "github.com/cosmos/cosmos-db"
"github.com/cosmos/cosmos-sdk/crypto/keyring"
simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims"
txsign "github.com/cosmos/cosmos-sdk/types/tx/signing"
authtx "github.com/cosmos/cosmos-sdk/x/auth/tx"
authtxconfig "github.com/cosmos/cosmos-sdk/x/auth/tx/config"
memiavlcfg "github.com/crypto-org-chain/cronos/store/config"
evmenc "github.com/evmos/ethermint/encoding"
confixcmd "cosmossdk.io/tools/confix/cmd"
)

// NewRootCmd creates a new root command for a Cosmos SDK application
Expand Down Expand Up @@ -431,6 +433,9 @@ func initAppConfig() (string, interface{}) {

type CustomAppConfig struct {
ethermintconfig.Config

MemIAVL memiavlcfg.MemIAVLConfig `mapstructure:"memiavl"`
VersionDB VersionDBConfig `mapstructure:"versiondb"`
}

// Optionally allow the chain developer to overwrite the SDK's default
Expand All @@ -452,7 +457,9 @@ func initAppConfig() (string, interface{}) {
srvCfg.JSONRPC.API = ethermintconfig.GetAPINamespaces()

customAppConfig := CustomAppConfig{
Config: *srvCfg,
Config: *srvCfg,
MemIAVL: memiavlcfg.DefaultMemIAVLConfig(),
VersionDB: DefaultVersionDBConfig(),
}
customAppTemplate := serverconfig.DefaultConfigTemplate + ethermintconfig.DefaultConfigTemplate

Expand Down
55 changes: 40 additions & 15 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,15 @@ require (
cosmossdk.io/x/tx v0.13.3
cosmossdk.io/x/upgrade v0.1.1
github.com/bufbuild/buf v1.23.1
github.com/cometbft/cometbft v0.38.10
github.com/cometbft/cometbft v0.38.11
github.com/cosmos/cosmos-db v1.0.2
github.com/cosmos/cosmos-proto v1.0.0-beta.5
github.com/cosmos/cosmos-sdk v0.50.6
github.com/cosmos/gogoproto v1.4.12
github.com/cosmos/ibc-go/modules/capability v1.0.0
github.com/cosmos/ibc-go/v8 v8.2.1
github.com/cosmos/rosetta v0.50.3-1
github.com/crypto-org-chain/cronos/store v0.0.0-00010101000000-000000000000
github.com/ethereum/go-ethereum v1.10.26
github.com/evmos/ethermint v0.0.0-00010101000000-000000000000
github.com/golang/protobuf v1.5.4
Expand All @@ -38,7 +39,7 @@ require (
github.com/stretchr/testify v1.9.0
google.golang.org/genproto/googleapis/api v0.0.0-20240521202816-d264139d666e
google.golang.org/grpc v1.64.0
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.2.0
google.golang.org/protobuf v1.34.1
)

Expand All @@ -59,6 +60,7 @@ require (
github.com/Microsoft/go-winio v0.6.2 // indirect
github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6 // indirect
github.com/VictoriaMetrics/fastcache v1.6.0 // indirect
github.com/alitto/pond v1.8.3 // indirect
github.com/aws/aws-sdk-go v1.53.10 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect
Expand Down Expand Up @@ -86,14 +88,15 @@ require (
github.com/cosmos/btcutil v1.0.5 // indirect
github.com/cosmos/go-bip39 v1.0.0 // indirect
github.com/cosmos/gogogateway v1.2.0 // indirect
github.com/cosmos/iavl v1.0.1 // indirect
github.com/cosmos/iavl v1.1.2 // indirect
github.com/cosmos/ics23/go v0.10.0 // indirect
github.com/cosmos/ledger-cosmos-go v0.13.3 // indirect
github.com/cosmos/rosetta-sdk-go v0.10.0 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.3 // indirect
github.com/creachadair/atomicfile v0.3.1 // indirect
github.com/creachadair/tomledit v0.0.24 // indirect
github.com/crypto-org-chain/go-block-stm v0.0.0-20240408011717-9f11af197bde // indirect
github.com/crypto-org-chain/cronos/memiavl v0.0.4 // indirect
github.com/crypto-org-chain/go-block-stm v0.0.0-20240912024944-1cd89976aa5e // indirect
github.com/danieljoos/wincred v1.2.1 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/deckarep/golang-set/v2 v2.1.0 // indirect
Expand Down Expand Up @@ -180,6 +183,7 @@ require (
github.com/klauspost/pgzip v1.2.6 // indirect
github.com/kr/pretty v0.3.1 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/ledgerwatch/erigon-lib v0.0.0-20230210071639-db0e7ed11263 // indirect
github.com/lib/pq v1.10.9 // indirect
github.com/linxGnu/grocksdb v1.9.1 // indirect
github.com/magiconair/properties v1.8.7 // indirect
Expand All @@ -205,9 +209,9 @@ require (
github.com/pkg/errors v0.9.1 // indirect
github.com/pkg/profile v1.7.0 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/prometheus/client_golang v1.18.0 // indirect
github.com/prometheus/client_golang v1.19.0 // indirect
github.com/prometheus/client_model v0.6.1 // indirect
github.com/prometheus/common v0.47.0 // indirect
github.com/prometheus/common v0.52.2 // indirect
github.com/prometheus/procfs v0.15.0 // indirect
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect
github.com/rivo/uniseg v0.2.0 // indirect
Expand All @@ -233,11 +237,14 @@ require (
github.com/tidwall/match v1.1.1 // indirect
github.com/tidwall/pretty v1.2.0 // indirect
github.com/tidwall/sjson v1.2.5 // indirect
github.com/tidwall/tinylru v1.1.0 // indirect
github.com/tidwall/wal v1.1.7 // indirect
github.com/tklauser/go-sysconf v0.3.10 // indirect
github.com/tklauser/numcpus v0.4.0 // indirect
github.com/tyler-smith/go-bip39 v1.1.0 // indirect
github.com/ulikunitz/xz v0.5.12 // indirect
github.com/vbatts/tar-split v0.11.3 // indirect
github.com/zbiljic/go-filelock v0.0.0-20170914061330-1dbf7103ab7d // indirect
github.com/zondax/hid v0.9.2 // indirect
github.com/zondax/ledger-go v0.14.3 // indirect
go.etcd.io/bbolt v1.4.0-alpha.0.0.20240404170359-43604f3112c5 // indirect
Expand Down Expand Up @@ -274,20 +281,38 @@ require (
sigs.k8s.io/yaml v1.4.0 // indirect
)

// release/v0.50.x
replace (
cosmossdk.io/store => github.com/crypto-org-chain/cosmos-sdk/store v0.0.0-20240415105151-0108877a3201
cosmossdk.io/x/tx => github.com/crypto-org-chain/cosmos-sdk/x/tx v0.0.0-20240415105151-0108877a3201
// use cosmos fork of keyring
//github.com/99designs/keyring => github.com/cosmos/keyring v1.2.0
cosmossdk.io/client/v2 => github.com/crypto-org-chain/cosmos-sdk/client/v2 v2.0.0-20240911084450-6870ba130be2
cosmossdk.io/store => github.com/crypto-org-chain/cosmos-sdk/store v0.0.0-20240911084450-6870ba130be2
cosmossdk.io/x/tx => github.com/crypto-org-chain/cosmos-sdk/x/tx v0.0.0-20240911084450-6870ba130be2
github.com/cosmos/cosmos-sdk => github.com/crypto-org-chain/cosmos-sdk v0.50.6-0.20240911084450-6870ba130be2
)

replace (
github.com/crypto-org-chain/cronos/memiavl => ./memiavl
github.com/crypto-org-chain/cronos/store => ./store
github.com/crypto-org-chain/cronos/versiondb => ./versiondb
)

replace (
// Use cosmos keyring
github.com/99designs/keyring => github.com/cosmos/keyring v1.2.0

// for go-ethereum
github.com/cockroachdb/pebble => github.com/cockroachdb/pebble v0.0.0-20230209160836-829675f94811
// use cometbft
github.com/cometbft/cometbft-db => github.com/crypto-org-chain/cometbft-db v0.0.0-20231011055109-57922ac52a63
github.com/cosmos/cosmos-sdk => github.com/crypto-org-chain/cosmos-sdk v0.0.0-20240415105151-0108877a3201
// dgrijalva/jwt-go is deprecated and doesn't receive security updates.
// TODO: remove it: https://github.com/cosmos/cosmos-sdk/issues/13134
github.com/dgrijalva/jwt-go => github.com/golang-jwt/jwt/v4 v4.4.2
github.com/ethereum/go-ethereum => github.com/crypto-org-chain/go-ethereum v1.10.20-0.20240425065928-ebb09502e7a7
github.com/evmos/ethermint => github.com/crypto-org-chain/ethermint v0.6.1-0.20240502052908-179e436703b3
// replace broken goleveldb
// develop
github.com/evmos/ethermint => github.com/crypto-org-chain/ethermint v0.6.1-0.20240913100216-dbc7eb41488c

// Fix upstream GHSA-h395-qcrw-5vmq and GHSA-3vp4-m3rf-835h vulnerabilities.
// TODO Remove it: https://github.com/cosmos/cosmos-sdk/issues/10409
github.com/gin-gonic/gin => github.com/gin-gonic/gin v1.9.0
github.com/jhump/protoreflect => github.com/jhump/protoreflect v1.9.0
github.com/syndtr/goleveldb => github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7
github.com/tidwall/btree => github.com/crypto-org-chain/btree v0.0.0-20240406140148-2687063b042c

)
Loading