diff --git a/cmd/resync.go b/cmd/resync.go index 0a04f3d5..945707f6 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 942ab5f8..af6c23e2 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 f0512557..de6ea570 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 00e1ec30..fa72d41d 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 02cd5d22..78bf9be4 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 6370e5bc..bf3fde28 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 fa603f5f..4b72d9a9 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=