0glabs / 0g-chain

The First Modular AI Chain
Apache License 2.0
28 stars 37 forks source link

upgrade to kava 26 / cosmos v0.47 #52

Closed 0g-wh closed 1 month ago

0g-wh commented 1 month ago

This change is Reviewable

Solovyov1796 commented 1 month ago

go.mod line 238 at r1 (raw file):

  github.com/ethereum/go-ethereum => github.com/evmos/go-ethereum v1.10.26-evmos-rc2
  // Use ethermint fork that respects min-gas-price with NoBaseFee true and london enabled, and includes eip712 support
  github.com/evmos/ethermint => github.com/0g-wh/ethermint v0.21.0-0glabs-v26.3.1

replace with 0glabs' repo

Solovyov1796 commented 1 month ago

go.mod line 28 at r1 (raw file):

  github.com/grpc-ecosystem/grpc-gateway v1.16.0
  github.com/influxdata/influxdb v1.8.3
  github.com/kava-labs/kava v0.26.1

should not be referenced

Solovyov1796 commented 1 month ago

go.mod line 38 at r1 (raw file):

  github.com/stretchr/testify v1.8.4
  github.com/subosito/gotenv v1.6.0
  github.com/tendermint/tendermint v0.35.9

using cometbft, not tendermint

Solovyov1796 commented 1 month ago

app/app.go line 652 at r1 (raw file):

      evmutil.NewAppModule(app.evmutilKeeper, app.bankKeeper, app.accountKeeper),
      // nil InflationCalculationFn, use SDK's default inflation function
      mint.NewAppModule(appCodec, app.mintKeeper, app.accountKeeper, nil, mintSubspace),

missing the chaincfg.NextInflationRate mint.NewAppModule(appCodec, app.mintKeeper, app.accountKeeper, chaincfg.NextInflationRate, mintSubspace),

Solovyov1796 commented 1 month ago

cmd/0gchaind/keys.go line 54 at r1 (raw file):

  addCmd := keys.AddKeyCommand()
  addCmd.Flags().Bool(ethFlag, false, "use default evm coin-type (60) and key signing algorithm (\"eth_secp256k1\")")
algoFlag := addCmd.Flag(flags.FlagKeyType)
algoFlag.DefValue = string(hd.EthSecp256k1Type)
err := algoFlag.Value.Set(string(hd.EthSecp256k1Type))
if err != nil {
    panic(err)
}
Solovyov1796 commented 1 month ago

cmd/0gchaind/main.go line 19 at r1 (raw file):

      switch e := err.(type) {
      case server.ErrorCode:
          fmt.Println("error")

remove this line

0g-wh commented 1 month ago

app/app.go line 652 at r1 (raw file):

        evmutil.NewAppModule(app.evmutilKeeper, app.bankKeeper, app.accountKeeper),
        // nil InflationCalculationFn, use SDK's default inflation function
        mint.NewAppModule(appCodec, app.mintKeeper, app.accountKeeper, nil, mintSubspace),

missing the chaincfg.NextInflationRate mint.NewAppModule(appCodec, app.mintKeeper, app.accountKeeper, chaincfg.NextInflationRate, mintSubspace),

the method moved to x/mint/abci.go, chaincfg.NextInflationRate will be deleted later.

0g-wh commented 1 month ago

cmd/0gchaind/keys.go line 54 at r1 (raw file):

    addCmd := keys.AddKeyCommand()
    addCmd.Flags().Bool(ethFlag, false, "use default evm coin-type (60) and key signing algorithm (\"eth_secp256k1\")")
algoFlag := addCmd.Flag(flags.FlagKeyType)
algoFlag.DefValue = string(hd.EthSecp256k1Type)
err := algoFlag.Value.Set(string(hd.EthSecp256k1Type))
if err != nil {
  panic(err)
}

why we need this? check https://github.com/Kava-Labs/kava/blob/v0.26.0/cmd/kava/cmd/keys.go#L53

Solovyov1796 commented 1 month ago

cmd/0gchaind/keys.go line 54 at r1 (raw file):

Previously, 0g-wh wrote…
why we need this? check https://github.com/Kava-Labs/kava/blob/v0.26.0/cmd/kava/cmd/keys.go#L53

default using EthSecp256k1Type when keys add without --eth