diff --git a/cmd/resync.go b/cmd/resync.go index 0a04f3d53..945707f64 100644 --- a/cmd/resync.go +++ b/cmd/resync.go @@ -59,8 +59,6 @@ func init() { rootCmd.AddCommand(resyncCmd) // flags - resyncCmd.PersistentFlags().String("ipfs-path", "", "ipfs repository path") - resyncCmd.PersistentFlags().String("resync-chain", "", "which chain to support, options are currently Ethereum or Bitcoin.") resyncCmd.PersistentFlags().String("resync-type", "", "which type of data to resync") resyncCmd.PersistentFlags().Int("resync-start", 0, "block height to start resync") @@ -86,8 +84,6 @@ func init() { resyncCmd.PersistentFlags().String("eth-network-id", "", "eth network id") // and their bindings - viper.BindPFlag("ipfs.path", resyncCmd.PersistentFlags().Lookup("ipfs-path")) - viper.BindPFlag("resync.chain", resyncCmd.PersistentFlags().Lookup("resync-chain")) viper.BindPFlag("resync.type", resyncCmd.PersistentFlags().Lookup("resync-type")) viper.BindPFlag("resync.start", resyncCmd.PersistentFlags().Lookup("resync-start")) diff --git a/cmd/root.go b/cmd/root.go index 942ab5f86..af6c23e22 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -65,6 +65,7 @@ func initFuncs(cmd *cobra.Command, args []string) { } func logLevel() error { + viper.BindEnv("log.level", "LOGRUS_LEVEL") lvl, err := log.ParseLevel(viper.GetString("log.level")) if err != nil { return err diff --git a/cmd/watch.go b/cmd/watch.go index f05125574..de6ea5706 100644 --- a/cmd/watch.go +++ b/cmd/watch.go @@ -131,9 +131,6 @@ func init() { rootCmd.AddCommand(watchCmd) // flags for all config variables - watchCmd.PersistentFlags().String("ipfs-path", "", "ipfs repository path") - watchCmd.PersistentFlags().String("ipfs-mode", "", "ipfs operation mode") - watchCmd.PersistentFlags().String("watcher-chain", "", "which chain to support, options are currently Ethereum or Bitcoin.") watchCmd.PersistentFlags().Bool("watcher-server", false, "turn vdb server on or off") watchCmd.PersistentFlags().String("watcher-ws-path", "", "vdb server ws path") @@ -165,9 +162,6 @@ func init() { watchCmd.PersistentFlags().String("eth-network-id", "", "eth network id") // and their bindings - viper.BindPFlag("ipfs.path", watchCmd.PersistentFlags().Lookup("ipfs-path")) - viper.BindPFlag("ipfs.mode", watchCmd.PersistentFlags().Lookup("ipfs-mode")) - viper.BindPFlag("watcher.chain", watchCmd.PersistentFlags().Lookup("watcher-chain")) viper.BindPFlag("watcher.server", watchCmd.PersistentFlags().Lookup("watcher-server")) viper.BindPFlag("watcher.wsPath", watchCmd.PersistentFlags().Lookup("watcher-ws-path")) diff --git a/environments/superNodeBTC.toml b/environments/superNodeBTC.toml index 00e1ec302..fa72d41df 100644 --- a/environments/superNodeBTC.toml +++ b/environments/superNodeBTC.toml @@ -10,6 +10,9 @@ [database.backFill] maxIdle = 5 +[log] + level = "debug" # $LOGRUS_LEVEL + [resync] chain = "bitcoin" # $RESYNC_CHAIN type = "full" # $RESYNC_TYPE diff --git a/environments/superNodeETH.toml b/environments/superNodeETH.toml index 02cd5d220..78bf9be40 100644 --- a/environments/superNodeETH.toml +++ b/environments/superNodeETH.toml @@ -1,8 +1,8 @@ [database] - name = "vulcanize_public" # $DATABASE_NAME + name = "vulcanize_testing" # $DATABASE_NAME hostname = "localhost" # $DATABASE_HOSTNAME port = 5432 # $DATABASE_PORT - user = "vdbm" # $DATABASE_USER + user = "postgres" # $DATABASE_USER password = "" # $DATABASE_PASSWORD [database.sync] @@ -10,6 +10,9 @@ [database.backFill] maxIdle = 5 +[log] + level = "debug" # $LOGRUS_LEVEL + [resync] chain = "ethereum" # $RESYNC_CHAIN type = "state" # $RESYNC_TYPE @@ -23,13 +26,13 @@ [watcher] chain = "ethereum" # $SUPERNODE_CHAIN - server = true # $SUPERNODE_SERVER + server = false # $SUPERNODE_SERVER ipcPath = "~/.vulcanize/vulcanize.ipc" # $SUPERNODE_IPC_PATH wsPath = "127.0.0.1:8081" # $SUPERNODE_WS_PATH httpPath = "127.0.0.1:8082" # $SUPERNODE_HTTP_PATH sync = true # $SUPERNODE_SYNC workers = 1 # $SUPERNODE_WORKERS - backFill = true # $SUPERNODE_BACKFILL + backFill = false # $SUPERNODE_BACKFILL frequency = 15 # $SUPERNODE_FREQUENCY batchSize = 5 # $SUPERNODE_BATCH_SIZE batchNumber = 5 # $SUPERNODE_BATCH_NUMBER diff --git a/go.mod b/go.mod index 6370e5bcd..bf3fde288 100644 --- a/go.mod +++ b/go.mod @@ -28,4 +28,4 @@ require ( golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a // indirect ) -replace github.com/ethereum/go-ethereum v1.9.11 => github.com/vulcanize/go-ethereum v1.9.11-statediff-0.0.2 +replace github.com/ethereum/go-ethereum v1.9.11 => github.com/vulcanize/go-ethereum v1.9.11-statediff-0.0.5 diff --git a/go.sum b/go.sum index fa603f5ff..4b72d9a94 100644 --- a/go.sum +++ b/go.sum @@ -934,6 +934,8 @@ github.com/viant/assertly v0.4.8/go.mod h1:aGifi++jvCrUaklKEKT0BU95igDNaqkvz+49u github.com/viant/toolbox v0.24.0/go.mod h1:OxMCG57V0PXuIP2HNQrtJf2CjqdmbrOx5EkMILuUhzM= github.com/vulcanize/go-ethereum v1.9.11-statediff-0.0.2 h1:ebv2bWocCmNKGnpHtRjSWoTpkgyEbRBb028PanH43H8= github.com/vulcanize/go-ethereum v1.9.11-statediff-0.0.2/go.mod h1:7oC0Ni6dosMv5pxMigm6s0hN8g4haJMBnqmmo0D9YfQ= +github.com/vulcanize/go-ethereum v1.9.11-statediff-0.0.5 h1:U+BqhjRLR22e9OEm8cgWC3Eq3bh8G6azjNpXeenfCG4= +github.com/vulcanize/go-ethereum v1.9.11-statediff-0.0.5/go.mod h1:7oC0Ni6dosMv5pxMigm6s0hN8g4haJMBnqmmo0D9YfQ= github.com/vulcanize/pg-ipfs-ethdb v0.0.1-alpha h1:Y7j0Hw1jgVVOg+eUGUr7OgH+gOBID0DwbsfZV1KoL7I= github.com/vulcanize/pg-ipfs-ethdb v0.0.1-alpha/go.mod h1:OuqE4r2LGWAtDVx3s1yaAzDcwy+LEAqrWaE1L8UfrGY= github.com/wangjia184/sortedset v0.0.0-20160527075905-f5d03557ba30/go.mod h1:YkocrP2K2tcw938x9gCOmT5G5eCD6jsTz0SZuyAqwIE=