Skip to content

Commit

Permalink
wip: comment parts trying to run app
Browse files Browse the repository at this point in the history
  • Loading branch information
boodyvo committed Oct 24, 2024
1 parent 50aa71d commit f5b62d8
Show file tree
Hide file tree
Showing 7 changed files with 686 additions and 562 deletions.
18 changes: 13 additions & 5 deletions client/testnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ package client

import (
"bufio"
"context"
sdkmath "cosmossdk.io/math"
"encoding/json"
"fmt"
"net"
Expand Down Expand Up @@ -324,12 +326,12 @@ func initTestnetFiles(

valTokens := sdk.TokensFromConsensusPower(100, ethermint.PowerReduction)
createValMsg, err := stakingtypes.NewMsgCreateValidator(
sdk.ValAddress(addr),
addr.String(),
valPubKeys[i],
sdk.NewCoin(ethermint.AttoPhoton, valTokens),
stakingtypes.NewDescription(nodeDirName, "", "", "", ""),
stakingtypes.NewCommissionRates(sdkmath.LegacyOneDec(), sdkmath.LegacyOneDec(), sdkmath.LegacyOneDec()),
sdk.OneInt(),
sdkmath.OneInt(),
)
if err != nil {
return err
Expand All @@ -349,7 +351,8 @@ func initTestnetFiles(
WithKeybase(kb).
WithTxConfig(clientCtx.TxConfig)

if err := tx.Sign(txFactory, nodeDirName, txBuilder, true); err != nil {
// TODO(boodyvo):
if err := tx.Sign(context.Background(), txFactory, nodeDirName, txBuilder, true); err != nil {
return err
}

Expand Down Expand Up @@ -486,7 +489,11 @@ func collectGenFiles(
nodeID, valPubKey := nodeIDs[i], valPubKeys[i]
initCfg := genutiltypes.NewInitConfig(chainID, gentxsDir, nodeID, valPubKey)

genDoc, err := types.GenesisDocFromFile(nodeConfig.GenesisFile())
//genDoc, err := types.GenesisDocFromFile(nodeConfig.GenesisFile())
//if err != nil {
// return err
//}
appGenesis, err := genutiltypes.AppGenesisFromFile(nodeConfig.GenesisFile())
if err != nil {
return err
}
Expand All @@ -496,9 +503,10 @@ func collectGenFiles(
clientCtx.TxConfig,
nodeConfig,
initCfg,
*genDoc,
appGenesis,
genBalIterator,
genutiltypes.DefaultMessageValidator,
clientCtx.TxConfig.SigningContext().ValidatorAddressCodec(),
)
if err != nil {
return err
Expand Down
6 changes: 4 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ require (
cosmossdk.io/x/feegrant v0.1.1
cosmossdk.io/x/tx v0.13.5
cosmossdk.io/x/upgrade v0.1.4
github.com/Kava-Labs/opendb v0.0.0-20240719173129-a2f11f6d7e51
//github.com/Kava-Labs/opendb v0.0.0-20240719173129-a2f11f6d7e51
github.com/Kava-Labs/opendb v0.0.0-20241024062216-dd5bc73e28f2
github.com/btcsuite/btcd v0.24.2
github.com/btcsuite/btcd/btcutil v1.1.6
github.com/cenkalti/backoff/v4 v4.3.0
Expand Down Expand Up @@ -53,6 +54,8 @@ require (
sigs.k8s.io/yaml v1.4.0
)

require golang.org/x/sync v0.8.0

require (
cloud.google.com/go v0.115.0 // indirect
cloud.google.com/go/auth v0.6.0 // indirect
Expand Down Expand Up @@ -221,7 +224,6 @@ require (
golang.org/x/crypto v0.26.0 // indirect
golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8 // indirect
golang.org/x/oauth2 v0.21.0 // indirect
golang.org/x/sync v0.8.0 // indirect
golang.org/x/sys v0.24.0 // indirect
golang.org/x/term v0.23.0 // indirect
golang.org/x/text v0.17.0 // indirect
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,8 @@ github.com/DataDog/zstd v1.5.5 h1:oWf5W7GtOLgp6bciQYDmhHHjdhYkALu6S/5Ni9ZgSvQ=
github.com/DataDog/zstd v1.5.5/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw=
github.com/Kava-Labs/go-ethereum v1.10.27-0.20240308170502-da7973e5eee0 h1:pPFzOjEZmihLk70TQRPUCWs8uar6nfh4vZ/I1r0zeso=
github.com/Kava-Labs/go-ethereum v1.10.27-0.20240308170502-da7973e5eee0/go.mod h1:/6CsT5Ceen2WPLI/oCA3xMcZ5sWMF/D46SjM/ayY0Oo=
github.com/Kava-Labs/opendb v0.0.0-20240719173129-a2f11f6d7e51 h1:tMTENCeSPIJO8yCpEQbT15XYXt4EFNQUx3s334uxVts=
github.com/Kava-Labs/opendb v0.0.0-20240719173129-a2f11f6d7e51/go.mod h1:LbPsJiWvj90NT3Y9YV8EFPkWfvp8A15Tp88qqKa3LxA=
github.com/Kava-Labs/opendb v0.0.0-20241024062216-dd5bc73e28f2 h1:nbPWQhtnAbLVcRwiboKRdAe9LHCqXTqv53LFWsbMBXI=
github.com/Kava-Labs/opendb v0.0.0-20241024062216-dd5bc73e28f2/go.mod h1:HVK6fke4/iQusTLZ0Us/0Mmj/CTiHmU2VQqmScQHsHg=
github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0=
github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow=
github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM=
Expand Down
3 changes: 1 addition & 2 deletions server/json_rpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import (

"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/server"
"github.com/cosmos/cosmos-sdk/server/types"
ethlog "github.com/ethereum/go-ethereum/log"
ethrpc "github.com/ethereum/go-ethereum/rpc"
"github.com/evmos/ethermint/rpc"
Expand Down Expand Up @@ -115,7 +114,7 @@ func StartJSONRPC(ctx *server.Context,
case err := <-errCh:
ctx.Logger.Error("failed to boot JSON-RPC server", "error", err.Error())
return nil, nil, err
case <-time.After(types.ServerStartTime): // assume JSON RPC server started successfully
case <-time.After(ServerStartTime): // assume JSON RPC server started successfully
}

ctx.Logger.Info("Starting JSON WebSocket server", "address", config.JSONRPC.WsAddress)
Expand Down
Loading

0 comments on commit f5b62d8

Please sign in to comment.