diff --git a/app/options.go b/app/options.go index 1db4f62..fa7521c 100644 --- a/app/options.go +++ b/app/options.go @@ -16,7 +16,7 @@ func SetPlasmaOptionsFromConfig(conf config.PlasmaConfig) func(*PlasmaMVPChain) var blockFinality uint64 if conf.IsOperator { - d, err := hex.DecodeString(conf.EthOperatorPrivateKey) + d, err := hex.DecodeString(conf.OperatorPrivateKey) if err != nil { errMsg := fmt.Sprintf("Could not parse private key: %v", err) diff --git a/cmd/plasmacli/config/cobra.go b/cmd/plasmacli/config/cobra.go index 519adaf..0e373a1 100644 --- a/cmd/plasmacli/config/cobra.go +++ b/cmd/plasmacli/config/cobra.go @@ -7,10 +7,10 @@ import ( ) func AddPersistentTMFlags(cmd *cobra.Command) { - cmd.PersistentFlags().String(client.FlagNode, "tcp://localhost:26657", ": to tendermint rpc interface for this chain") + cmd.PersistentFlags().String(client.FlagNode, "", ": to tendermint rpc interface for this chain") cmd.PersistentFlags().Bool(client.FlagTrustNode, false, "Trust connected full node (don't verify proofs for responses)") cmd.PersistentFlags().String(client.FlagChainID, "", "id of the chain. Required if --trust-node=false") + viper.BindPFlag(client.FlagNode, cmd.PersistentFlags().Lookup(client.FlagNode)) viper.BindPFlag(client.FlagTrustNode, cmd.PersistentFlags().Lookup(client.FlagTrustNode)) viper.BindPFlag(client.FlagChainID, cmd.PersistentFlags().Lookup(client.FlagChainID)) - viper.BindPFlag(client.FlagNode, cmd.PersistentFlags().Lookup(client.FlagNode)) } diff --git a/cmd/plasmacli/config/config.go b/cmd/plasmacli/config/config.go index dac8484..b985e4f 100644 --- a/cmd/plasmacli/config/config.go +++ b/cmd/plasmacli/config/config.go @@ -7,62 +7,101 @@ import ( cmn "github.com/tendermint/tendermint/libs/common" "os" "path/filepath" + "strings" "text/template" ) const defaultConfigTemplate = `# This is a TOML config file. # For more information, see https://github.com/toml-lang/toml -##### ethereum config options ##### +##### ethereum configuration ##### + # Ethereum plasma contract address -ethereum_plasma_contract_address = "{{ .EthPlasmaContractAddr }}" +ethereum_contract_address = "{{ .EthPlasmaContractAddr }}" # Node URL for eth client ethereum_nodeurl = "{{ .EthNodeURL }}" -# Number of Ethereum blocks until a transaction is considered final -ethereum_finality = "{{ .EthBlockFinality }}"` + +##### plasamd configuration ##### + +# Node URL for plasmad +node = "{{ .PlasmadNodeURL }}" + +# Trust the connected plasmad node (don't verify proofs for responses) +trust_node = {{ .PlasmadTrustNode }} + +# Chain identifier. Must be set if trust-node == false +chain_id = "{{ .PlasmadChainID }}"` // Must match the above defaultConfigTemplate -type PlasmaConfig struct { - EthPlasmaContractAddr string `mapstructure:"ethereum_plasma_contract_address"` +type Config struct { + // Ethereum config + EthPlasmaContractAddr string `mapstructure:"ethereum_contract_address"` EthNodeURL string `mapstructure:"ethereum_nodeurl"` - EthBlockFinality string `mapstructure:"ethereum_finality"` + + // Plasmad config + PlasmadNodeURL string `mapstructure:"node"` + PlasmadTrustNode bool `mapstructure:"trust_node"` + PlasmadChainID string `mapstructure:"chain_id"` } var configTemplate *template.Template func init() { var err error - tmpl := template.New("plasmaConfigFileTemplate") + tmpl := template.New("configFileTemplate") if configTemplate, err = tmpl.Parse(defaultConfigTemplate); err != nil { panic(err) } } -func DefaultPlasmaConfig() PlasmaConfig { - return PlasmaConfig{"", "http://localhost:8545", "0"} +func DefaultConfig() Config { + return Config{ + EthPlasmaContractAddr: "", + EthNodeURL: "http://localhost:8545", + PlasmadNodeURL: "tcp://localhost:26657", + PlasmadTrustNode: false, + PlasmadChainID: "", + } +} + +// RegisterViper will match client flags with config and register env +func RegisterViperAndEnv() { + viper.SetEnvPrefix("PCLI") + viper.SetEnvKeyReplacer(strings.NewReplacer("-", "_")) + viper.AutomaticEnv() + + // The configuration files use underscores while the Cosmos SDK uses + // hypens. These aliases align `Viper.Get(..)` for both + // the SDK and the configuration file + viper.RegisterAlias("trust_node", "trust-node") + viper.RegisterAlias("chain_id", "chain-id") } // parses the plasma.toml file and unmarshals it into a Config struct -func ParsePlasmaConfigFromViper() (PlasmaConfig, error) { - config := DefaultPlasmaConfig() +func ParseConfigFromViper() (Config, error) { + config := Config{} err := viper.Unmarshal(&config) return config, err } // WriteConfigFile renders config using the template and writes it to configFilePath. -func WritePlasmaConfigFile(configFilePath string, config PlasmaConfig) { +func WriteConfigFile(configFilePath string, config Config) error { var buffer bytes.Buffer if err := configTemplate.Execute(&buffer, &config); err != nil { - panic(err) + return fmt.Errorf("template: %s", err) } if err := cmn.EnsureDir(filepath.Dir(configFilePath), os.ModePerm); err != nil { - fmt.Printf("ERROR: failed to create directory: %s, recieved error: { %s }", filepath.Dir(configFilePath), err) + return fmt.Errorf("ensuredir: %s", err) } // 0666 allows for read and write for any user - cmn.MustWriteFile(configFilePath, buffer.Bytes(), 0666) + if err := cmn.WriteFile(configFilePath, buffer.Bytes(), 0666); err != nil { + return fmt.Errorf("writefile: %s", err) + } + + return nil } diff --git a/cmd/plasmacli/config/connection.go b/cmd/plasmacli/config/connection.go index db7ecf4..eb24c83 100644 --- a/cmd/plasmacli/config/connection.go +++ b/cmd/plasmacli/config/connection.go @@ -2,13 +2,10 @@ package config import ( "fmt" - "github.com/FourthState/plasma-mvp-sidechain/cmd/plasmacli/store" + "github.com/FourthState/plasma-mvp-sidechain/cmd/plasmacli/flags" "github.com/FourthState/plasma-mvp-sidechain/eth" ethcmn "github.com/ethereum/go-ethereum/common" "github.com/spf13/viper" - "os" - "path/filepath" - "strconv" ) var plasmaContract *eth.Plasma @@ -28,42 +25,27 @@ func GetContractConn() (*eth.Plasma, error) { } func setupContractConn() (*eth.Plasma, error) { - // Parse plasma.toml before every call to the eth command - // Update ethereum client connection if params have changed - plasmaConfigFilePath := filepath.Join(viper.GetString(store.DirFlag), "plasma.toml") - - if _, err := os.Stat(plasmaConfigFilePath); os.IsNotExist(err) { - plasmaConfig := DefaultPlasmaConfig() - WritePlasmaConfigFile(plasmaConfigFilePath, plasmaConfig) - } - - viper.SetConfigName("plasma") - if err := viper.MergeInConfig(); err != nil { + conf, err := ParseConfigFromViper() + if err != nil { return nil, err } - conf, err := ParsePlasmaConfigFromViper() - if err != nil { - return nil, err + dir := viper.GetString(flags.Home) + if dir[len(dir)-1] != '/' { + dir = dir + "/" } - // Check to see if the eth connection params have changed - dir := viper.GetString(store.DirFlag) if conf.EthNodeURL == "" { - return nil, fmt.Errorf("please specify a node url for eth connection in %s/plasma.toml", dir) + return nil, fmt.Errorf("please specify a node url for eth connection in %sconfig.toml", dir) } else if conf.EthPlasmaContractAddr == "" || !ethcmn.IsHexAddress(conf.EthPlasmaContractAddr) { - return nil, fmt.Errorf("please specic a valid contract address in %s/plasma.toml", dir) + return nil, fmt.Errorf("please specify a valid contract address in %sconfig.toml", dir) } ethClient, err := eth.InitEthConn(conf.EthNodeURL) if err != nil { return nil, err } - blockFinality, err := strconv.ParseUint(conf.EthBlockFinality, 10, 64) - if err != nil { - return nil, err - } - plasma, err := eth.InitPlasma(ethcmn.HexToAddress(conf.EthPlasmaContractAddr), ethClient, blockFinality) + plasma, err := eth.InitPlasma(ethcmn.HexToAddress(conf.EthPlasmaContractAddr), ethClient, 0) if err != nil { return nil, err } diff --git a/cmd/plasmacli/flags/flags.go b/cmd/plasmacli/flags/flags.go new file mode 100644 index 0000000..1077fd5 --- /dev/null +++ b/cmd/plasmacli/flags/flags.go @@ -0,0 +1,9 @@ +package flags + +import ( + tmcli "github.com/tendermint/tendermint/libs/cli" +) + +const ( + Home = tmcli.HomeFlag +) diff --git a/cmd/plasmacli/store/keystore.go b/cmd/plasmacli/store/keystore.go index 25f749a..f59815b 100644 --- a/cmd/plasmacli/store/keystore.go +++ b/cmd/plasmacli/store/keystore.go @@ -7,11 +7,9 @@ import ( "github.com/ethereum/go-ethereum/accounts" "github.com/ethereum/go-ethereum/accounts/keystore" ethcmn "github.com/ethereum/go-ethereum/common" - "github.com/spf13/viper" "github.com/syndtr/goleveldb/leveldb" "github.com/syndtr/goleveldb/leveldb/iterator" "io/ioutil" - "os" "path/filepath" ) @@ -23,16 +21,19 @@ const ( PassphrasePrompt = "Enter passphrase:" - accountDir = "data/accounts.ldb" - keysDir = "keys" - - DirFlag = "directory" + accountsDir = "data/accounts.ldb" + keysDir = "keys" ) -var ks *keystore.KeyStore +var ( + home string + ks *keystore.KeyStore +) // initialize a keystore in the specified directory -func InitKeystore() { +func InitKeystore(homeDir string) { + home = homeDir + dir := getDir(keysDir) if ks == nil { ks = keystore.NewKeyStore(dir, keystore.StandardScryptN, keystore.StandardScryptP) @@ -42,7 +43,7 @@ func InitKeystore() { // Return iterator over accounts // returns db so db.close can be called func AccountIterator() (iterator.Iterator, *leveldb.DB) { - dir := getDir(accountDir) + dir := getDir(accountsDir) db, err := leveldb.OpenFile(dir, nil) if err != nil { fmt.Printf("leveldb: %s", err) @@ -55,7 +56,7 @@ func AccountIterator() (iterator.Iterator, *leveldb.DB) { // Add a new account to the keystore // Add account name and address to leveldb func AddAccount(name string) (ethcmn.Address, error) { - dir := getDir(accountDir) + dir := getDir(accountsDir) db, err := leveldb.OpenFile(dir, nil) if err != nil { return ethcmn.Address{}, fmt.Errorf("leveldb: %s", err) @@ -87,7 +88,7 @@ func AddAccount(name string) (ethcmn.Address, error) { // Retrieve the address of an account func GetAccount(name string) (ethcmn.Address, error) { - dir := getDir(accountDir) + dir := getDir(accountsDir) db, err := leveldb.OpenFile(dir, nil) if err != nil { return ethcmn.Address{}, fmt.Errorf("leveldb: %s", err) @@ -107,7 +108,7 @@ func GetAccount(name string) (ethcmn.Address, error) { // Remove an account from the local keystore // and the leveldb func DeleteAccount(name string) error { - dir := getDir(accountDir) + dir := getDir(accountsDir) db, err := leveldb.OpenFile(dir, nil) if err != nil { return fmt.Errorf("leveldb: %s", err) @@ -140,7 +141,7 @@ func DeleteAccount(name string) error { // Update either the name of an account or the passphrase for an account func UpdateAccount(name string, updatedName string) (msg string, err error) { - dir := getDir(accountDir) + dir := getDir(accountsDir) db, err := leveldb.OpenFile(dir, nil) if err != nil { return msg, fmt.Errorf("leveldb: %s", err) @@ -188,7 +189,7 @@ func UpdateAccount(name string, updatedName string) (msg string, err error) { // Import a private key with an account name func ImportECDSA(name string, pk *ecdsa.PrivateKey) (ethcmn.Address, error) { - dir := getDir(accountDir) + dir := getDir(accountsDir) db, err := leveldb.OpenFile(dir, nil) if err != nil { return ethcmn.Address{}, fmt.Errorf("leveldb: %s", err) @@ -240,7 +241,7 @@ func SignHashWithPassphrase(signer string, hash []byte) ([]byte, error) { } func GetKey(name string) (*ecdsa.PrivateKey, error) { - dir := getDir(accountDir) + dir := getDir(accountsDir) db, err := leveldb.OpenFile(dir, nil) if err != nil { return nil, fmt.Errorf("leveldb: %s", err) @@ -284,9 +285,5 @@ func GetKey(name string) (*ecdsa.PrivateKey, error) { // Return the directory specified by the --directory flag // with the passed in string appended to the end func getDir(location string) string { - dir := viper.GetString(DirFlag) - if dir[len(dir)-1] != '/' { - dir = filepath.Join(dir, "/") - } - return os.ExpandEnv(filepath.Join(dir, location)) + return filepath.Join(home, location) } diff --git a/cmd/plasmacli/store/keystore_test.go b/cmd/plasmacli/store/keystore_test.go index 79320e2..ea0dd82 100644 --- a/cmd/plasmacli/store/keystore_test.go +++ b/cmd/plasmacli/store/keystore_test.go @@ -15,7 +15,7 @@ import ( func TestAccounts(t *testing.T) { // setup testing env os.Mkdir("testing", os.ModePerm) - viper.Set(DirFlag, os.ExpandEnv("./testing")) + InitKeystore("./testing") // cleanup defer func() { @@ -23,8 +23,6 @@ func TestAccounts(t *testing.T) { os.RemoveAll("testing") }() - InitKeystore() - cases := []string{ "mykey", "another-key", diff --git a/cmd/plasmacli/store/sigs_test.go b/cmd/plasmacli/store/sigs_test.go index 8c6193d..7c23fb1 100644 --- a/cmd/plasmacli/store/sigs_test.go +++ b/cmd/plasmacli/store/sigs_test.go @@ -1,6 +1,7 @@ package store import ( + "github.com/FourthState/plasma-mvp-sidechain/cmd/plasmacli/flags" "github.com/FourthState/plasma-mvp-sidechain/plasma" "github.com/ethereum/go-ethereum/crypto" "github.com/spf13/viper" @@ -13,7 +14,7 @@ import ( func TestSavSig(t *testing.T) { // setup testing env os.Mkdir("testing", os.ModePerm) - viper.Set(DirFlag, os.ExpandEnv("./testing")) + viper.Set(flags.Home, "./testing") // cleanup defer func() { @@ -66,7 +67,7 @@ func TestSavSig(t *testing.T) { func TestBadSigs(t *testing.T) { // setup testing env os.Mkdir("testing", os.ModePerm) - viper.Set(DirFlag, os.ExpandEnv("./testing")) + viper.Set(flags.Home, "./testing") // cleanup defer func() { @@ -89,7 +90,7 @@ func TestBadSigs(t *testing.T) { func TestMultiConfirmSig(t *testing.T) { // setup testing env os.Mkdir("testing", os.ModePerm) - viper.Set(DirFlag, os.ExpandEnv("./testing")) + viper.Set(flags.Home, "./testing") // cleanup defer func() { diff --git a/cmd/plasmacli/subcmd/eth/query/root.go b/cmd/plasmacli/subcmd/eth/query/root.go index 05bcfb6..f82a90b 100644 --- a/cmd/plasmacli/subcmd/eth/query/root.go +++ b/cmd/plasmacli/subcmd/eth/query/root.go @@ -33,7 +33,7 @@ func QueryCmd() *cobra.Command { var queryCmd = &cobra.Command{ Use: "query", Short: "Query for rootchain related information", - PersistentPreRunE: func(cmd *cobra.Command, args []string) error { + PreRunE: func(cmd *cobra.Command, args []string) error { plasma, err := config.GetContractConn() plasmaContract = plasma return err diff --git a/cmd/plasmacli/subcmd/eth/root.go b/cmd/plasmacli/subcmd/eth/root.go index baacd73..f52e6c0 100644 --- a/cmd/plasmacli/subcmd/eth/root.go +++ b/cmd/plasmacli/subcmd/eth/root.go @@ -51,7 +51,7 @@ var ethCmd = &cobra.Command{ Short: "Interact with the plasma smart contract", Long: `Configurations for interacting with the rootchain contract can be specified in /plasma.toml. An eth node instance needs to be running for this command to work.`, - PersistentPreRunE: func(cmd *cobra.Command, args []string) error { + PreRunE: func(cmd *cobra.Command, args []string) error { plasma, err := config.GetContractConn() plasmaContract = plasma return err diff --git a/cmd/plasmacli/subcmd/keys/root.go b/cmd/plasmacli/subcmd/keys/root.go index 47919e1..ba05828 100644 --- a/cmd/plasmacli/subcmd/keys/root.go +++ b/cmd/plasmacli/subcmd/keys/root.go @@ -1,7 +1,6 @@ package keys import ( - "github.com/FourthState/plasma-mvp-sidechain/cmd/plasmacli/store" "github.com/spf13/cobra" ) @@ -11,15 +10,7 @@ const ( fileF = "file" ) -var keysCmd = &cobra.Command{ - Use: "keys", - Short: "Manage local private keys", - Long: `Keys allows you to manage your local keystore.`, -} - func KeysCmd() *cobra.Command { - store.InitKeystore() - keysCmd.AddCommand( AddCmd(), DeleteCmd(), @@ -30,3 +21,9 @@ func KeysCmd() *cobra.Command { return keysCmd } + +var keysCmd = &cobra.Command{ + Use: "keys", + Short: "Manage local private keys", + Long: `Keys allows you to manage your local keystore.`, +} diff --git a/cmd/plasmacli/subcmd/root.go b/cmd/plasmacli/subcmd/root.go index e9a56d3..4cbe50f 100644 --- a/cmd/plasmacli/subcmd/root.go +++ b/cmd/plasmacli/subcmd/root.go @@ -3,6 +3,7 @@ package subcmd import ( "fmt" "github.com/FourthState/plasma-mvp-sidechain/cmd/plasmacli/config" + "github.com/FourthState/plasma-mvp-sidechain/cmd/plasmacli/flags" "github.com/FourthState/plasma-mvp-sidechain/cmd/plasmacli/store" "github.com/FourthState/plasma-mvp-sidechain/cmd/plasmacli/subcmd/eth" "github.com/FourthState/plasma-mvp-sidechain/cmd/plasmacli/subcmd/keys" @@ -15,36 +16,17 @@ import ( "path/filepath" ) -// default directory -var homeDir string = os.ExpandEnv("$HOME/.plasmacli/") - -// Flags -const () - -func init() { - // initConfig to be ran when Execute is called - cobra.OnInitialize(initConfig) -} - -// initConfig reads in config file and ENV variables if set -func initConfig() { - viper.AutomaticEnv() -} +// default home directory +var homeDir = os.ExpandEnv("$HOME/.plasmacli/") func RootCmd() *cobra.Command { cobra.EnableCommandSorting = false - rootCmd.PersistentFlags().StringP(store.DirFlag, "d", homeDir, "directory for plasmacli") + rootCmd.PersistentFlags().String(flags.Home, homeDir, "home directory for plasmacli") if err := viper.BindPFlags(rootCmd.PersistentFlags()); err != nil { fmt.Println(err) os.Exit(1) } - viper.AddConfigPath(homeDir) - plasmaDir := filepath.Join(homeDir, "plasma.toml") - if _, err := os.Stat(plasmaDir); os.IsNotExist(err) { - config.WritePlasmaConfigFile(plasmaDir, config.DefaultPlasmaConfig()) - } - rootCmd.AddCommand( tx.TxCmd(), eth.EthCmd(), @@ -67,4 +49,27 @@ var rootCmd = &cobra.Command{ Use: "plasmacli", Short: "Plasma Client", SilenceErrors: true, + PersistentPreRunE: func(cmd *cobra.Command, args []string) error { + config.RegisterViperAndEnv() + homeDir := viper.GetString(flags.Home) + + store.InitKeystore(homeDir) + + configFilepath := filepath.Join(homeDir, "config.toml") + if _, err := os.Stat(configFilepath); os.IsNotExist(err) { + if err := config.WriteConfigFile(configFilepath, config.DefaultConfig()); err != nil { + return err + } + } else if err != nil { + return err + } + + viper.AddConfigPath(homeDir) + viper.SetConfigName("config") + if err := viper.MergeInConfig(); err != nil { + return err + } + + return nil + }, } diff --git a/cmd/plasmacli/subcmd/tx/root.go b/cmd/plasmacli/subcmd/tx/root.go index 802571f..24d2374 100644 --- a/cmd/plasmacli/subcmd/tx/root.go +++ b/cmd/plasmacli/subcmd/tx/root.go @@ -25,6 +25,7 @@ func TxCmd() *cobra.Command { SpendCmd(), SignCmd(), ) + return txCmd } diff --git a/cmd/plasmad/config/config.go b/cmd/plasmad/config/config.go index 025c9ee..d0f7f8d 100644 --- a/cmd/plasmad/config/config.go +++ b/cmd/plasmad/config/config.go @@ -10,34 +10,38 @@ import ( const defaultConfigTemplate = `# This is a TOML config file. # For more information, see https://github.com/toml-lang/toml -##### ethereum config options ##### -# Boolean specifying if this node is the operator of the plasma contract -is_operator = "{{ .IsOperator }}" - -# Hex encoded private key -# Used to sign eth transactions interacting with the contract -ethereum_operator_privatekey = "{{ .EthOperatorPrivateKey }}" +##### ethereum configuration ##### # Ethereum plasma contract address ethereum_plasma_contract_address = "{{ .EthPlasmaContractAddr }}" -# Plasma block commitment rate. i.e 1m30s, 1m, 1h, etc. -plasma_block_commitment_rate = "{{ .PlasmaCommitmentRate }}" - # Node URL for eth client ethereum_nodeurl = "{{ .EthNodeURL }}" # Number of Ethereum blocks until a submitted block header is considered final -ethereum_finality = "{{ .EthBlockFinality }}"` +ethereum_finality = "{{ .EthBlockFinality }}" + +##### plasma configuration ##### + +# Plasma block commitment rate. i.e 1m30s, 1m, 1h, etc. +block_commitment_rate = "{{ .PlasmaCommitmentRate }}" + +# Boolean specifying if this node is the operator of the plasma contract +is_operator = "{{ .IsOperator }}" + +# Hex encoded private key +# Used to sign eth transactions interacting with the contract +operator_privatekey = "{{ .OperatorPrivateKey }}"` // Must match the above defaultConfigTemplate type PlasmaConfig struct { - IsOperator bool `mapstructure:"is_operator"` - EthOperatorPrivateKey string `mapstructure:"ethereum_operator_privatekey"` EthPlasmaContractAddr string `mapstructure:"ethereum_plasma_contract_address"` - PlasmaCommitmentRate string `mapstructure:"plasma_block_commitment_rate"` EthNodeURL string `mapstructure:"ethereum_nodeurl"` EthBlockFinality string `mapstructure:"ethereum_finality"` + + IsOperator bool `mapstructure:"is_operator"` + OperatorPrivateKey string `mapstructure:"operator_privatekey"` + PlasmaCommitmentRate string `mapstructure:"block_commitment_rate"` } var configTemplate *template.Template @@ -51,7 +55,15 @@ func init() { } func DefaultPlasmaConfig() PlasmaConfig { - return PlasmaConfig{false, "", "", "30s", "http://localhost:8545", "16"} + return PlasmaConfig{ + EthPlasmaContractAddr: "", + EthNodeURL: "http://localhost:8545", + EthBlockFinality: "16", + + IsOperator: false, + OperatorPrivateKey: "", + PlasmaCommitmentRate: "1m", + } } // TestPlasmaConfig writes the plasma.toml file used for testing @@ -59,12 +71,13 @@ func DefaultPlasmaConfig() PlasmaConfig { // Contract address and private key generated deterministically using the "plasma" moniker with ganache func TestPlasmaConfig() PlasmaConfig { return PlasmaConfig{ - IsOperator: true, - EthOperatorPrivateKey: "9cd69f009ac86203e54ec50e3686de95ff6126d3b30a19f926a0fe9323c17181", EthPlasmaContractAddr: "31E491FC70cDb231774c61B7F46d94699dacE664", - PlasmaCommitmentRate: "1m", EthNodeURL: "http://localhost:8545", EthBlockFinality: "0", + + IsOperator: true, + OperatorPrivateKey: "9cd69f009ac86203e54ec50e3686de95ff6126d3b30a19f926a0fe9323c17181", + PlasmaCommitmentRate: "1m", } }