log level env var; update geth dep
This commit is contained in:
parent
578afaf314
commit
2817d847ef
@ -59,8 +59,6 @@ func init() {
|
|||||||
rootCmd.AddCommand(resyncCmd)
|
rootCmd.AddCommand(resyncCmd)
|
||||||
|
|
||||||
// flags
|
// 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-chain", "", "which chain to support, options are currently Ethereum or Bitcoin.")
|
||||||
resyncCmd.PersistentFlags().String("resync-type", "", "which type of data to resync")
|
resyncCmd.PersistentFlags().String("resync-type", "", "which type of data to resync")
|
||||||
resyncCmd.PersistentFlags().Int("resync-start", 0, "block height to start 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")
|
resyncCmd.PersistentFlags().String("eth-network-id", "", "eth network id")
|
||||||
|
|
||||||
// and their bindings
|
// and their bindings
|
||||||
viper.BindPFlag("ipfs.path", resyncCmd.PersistentFlags().Lookup("ipfs-path"))
|
|
||||||
|
|
||||||
viper.BindPFlag("resync.chain", resyncCmd.PersistentFlags().Lookup("resync-chain"))
|
viper.BindPFlag("resync.chain", resyncCmd.PersistentFlags().Lookup("resync-chain"))
|
||||||
viper.BindPFlag("resync.type", resyncCmd.PersistentFlags().Lookup("resync-type"))
|
viper.BindPFlag("resync.type", resyncCmd.PersistentFlags().Lookup("resync-type"))
|
||||||
viper.BindPFlag("resync.start", resyncCmd.PersistentFlags().Lookup("resync-start"))
|
viper.BindPFlag("resync.start", resyncCmd.PersistentFlags().Lookup("resync-start"))
|
||||||
|
@ -65,6 +65,7 @@ func initFuncs(cmd *cobra.Command, args []string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func logLevel() error {
|
func logLevel() error {
|
||||||
|
viper.BindEnv("log.level", "LOGRUS_LEVEL")
|
||||||
lvl, err := log.ParseLevel(viper.GetString("log.level"))
|
lvl, err := log.ParseLevel(viper.GetString("log.level"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
@ -131,9 +131,6 @@ func init() {
|
|||||||
rootCmd.AddCommand(watchCmd)
|
rootCmd.AddCommand(watchCmd)
|
||||||
|
|
||||||
// flags for all config variables
|
// 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().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().Bool("watcher-server", false, "turn vdb server on or off")
|
||||||
watchCmd.PersistentFlags().String("watcher-ws-path", "", "vdb server ws path")
|
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")
|
watchCmd.PersistentFlags().String("eth-network-id", "", "eth network id")
|
||||||
|
|
||||||
// and their bindings
|
// 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.chain", watchCmd.PersistentFlags().Lookup("watcher-chain"))
|
||||||
viper.BindPFlag("watcher.server", watchCmd.PersistentFlags().Lookup("watcher-server"))
|
viper.BindPFlag("watcher.server", watchCmd.PersistentFlags().Lookup("watcher-server"))
|
||||||
viper.BindPFlag("watcher.wsPath", watchCmd.PersistentFlags().Lookup("watcher-ws-path"))
|
viper.BindPFlag("watcher.wsPath", watchCmd.PersistentFlags().Lookup("watcher-ws-path"))
|
||||||
|
@ -10,6 +10,9 @@
|
|||||||
[database.backFill]
|
[database.backFill]
|
||||||
maxIdle = 5
|
maxIdle = 5
|
||||||
|
|
||||||
|
[log]
|
||||||
|
level = "debug" # $LOGRUS_LEVEL
|
||||||
|
|
||||||
[resync]
|
[resync]
|
||||||
chain = "bitcoin" # $RESYNC_CHAIN
|
chain = "bitcoin" # $RESYNC_CHAIN
|
||||||
type = "full" # $RESYNC_TYPE
|
type = "full" # $RESYNC_TYPE
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
[database]
|
[database]
|
||||||
name = "vulcanize_public" # $DATABASE_NAME
|
name = "vulcanize_testing" # $DATABASE_NAME
|
||||||
hostname = "localhost" # $DATABASE_HOSTNAME
|
hostname = "localhost" # $DATABASE_HOSTNAME
|
||||||
port = 5432 # $DATABASE_PORT
|
port = 5432 # $DATABASE_PORT
|
||||||
user = "vdbm" # $DATABASE_USER
|
user = "postgres" # $DATABASE_USER
|
||||||
password = "" # $DATABASE_PASSWORD
|
password = "" # $DATABASE_PASSWORD
|
||||||
|
|
||||||
[database.sync]
|
[database.sync]
|
||||||
@ -10,6 +10,9 @@
|
|||||||
[database.backFill]
|
[database.backFill]
|
||||||
maxIdle = 5
|
maxIdle = 5
|
||||||
|
|
||||||
|
[log]
|
||||||
|
level = "debug" # $LOGRUS_LEVEL
|
||||||
|
|
||||||
[resync]
|
[resync]
|
||||||
chain = "ethereum" # $RESYNC_CHAIN
|
chain = "ethereum" # $RESYNC_CHAIN
|
||||||
type = "state" # $RESYNC_TYPE
|
type = "state" # $RESYNC_TYPE
|
||||||
@ -23,13 +26,13 @@
|
|||||||
|
|
||||||
[watcher]
|
[watcher]
|
||||||
chain = "ethereum" # $SUPERNODE_CHAIN
|
chain = "ethereum" # $SUPERNODE_CHAIN
|
||||||
server = true # $SUPERNODE_SERVER
|
server = false # $SUPERNODE_SERVER
|
||||||
ipcPath = "~/.vulcanize/vulcanize.ipc" # $SUPERNODE_IPC_PATH
|
ipcPath = "~/.vulcanize/vulcanize.ipc" # $SUPERNODE_IPC_PATH
|
||||||
wsPath = "127.0.0.1:8081" # $SUPERNODE_WS_PATH
|
wsPath = "127.0.0.1:8081" # $SUPERNODE_WS_PATH
|
||||||
httpPath = "127.0.0.1:8082" # $SUPERNODE_HTTP_PATH
|
httpPath = "127.0.0.1:8082" # $SUPERNODE_HTTP_PATH
|
||||||
sync = true # $SUPERNODE_SYNC
|
sync = true # $SUPERNODE_SYNC
|
||||||
workers = 1 # $SUPERNODE_WORKERS
|
workers = 1 # $SUPERNODE_WORKERS
|
||||||
backFill = true # $SUPERNODE_BACKFILL
|
backFill = false # $SUPERNODE_BACKFILL
|
||||||
frequency = 15 # $SUPERNODE_FREQUENCY
|
frequency = 15 # $SUPERNODE_FREQUENCY
|
||||||
batchSize = 5 # $SUPERNODE_BATCH_SIZE
|
batchSize = 5 # $SUPERNODE_BATCH_SIZE
|
||||||
batchNumber = 5 # $SUPERNODE_BATCH_NUMBER
|
batchNumber = 5 # $SUPERNODE_BATCH_NUMBER
|
||||||
|
2
go.mod
2
go.mod
@ -28,4 +28,4 @@ require (
|
|||||||
golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a // indirect
|
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
|
||||||
|
2
go.sum
2
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/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 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.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 h1:Y7j0Hw1jgVVOg+eUGUr7OgH+gOBID0DwbsfZV1KoL7I=
|
||||||
github.com/vulcanize/pg-ipfs-ethdb v0.0.1-alpha/go.mod h1:OuqE4r2LGWAtDVx3s1yaAzDcwy+LEAqrWaE1L8UfrGY=
|
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=
|
github.com/wangjia184/sortedset v0.0.0-20160527075905-f5d03557ba30/go.mod h1:YkocrP2K2tcw938x9gCOmT5G5eCD6jsTz0SZuyAqwIE=
|
||||||
|
Loading…
Reference in New Issue
Block a user