From 749bb737a85fcfe9fa633a5b1df76c20caca8c23 Mon Sep 17 00:00:00 2001 From: Diego Campo Date: Mon, 6 May 2024 20:35:36 +0200 Subject: [PATCH] Explicitly require initial stake, or no stake is added initially --- cmd/node/appchain.go | 4 ++-- cmd/node/flags.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/node/appchain.go b/cmd/node/appchain.go index 2661db5..5ad7b7a 100644 --- a/cmd/node/appchain.go +++ b/cmd/node/appchain.go @@ -250,9 +250,9 @@ func registerWithBlockchain(appchain *AppChain) { appchain.Logger.Error().Err(err).Uint64("topic", topicId).Str("txHash", res.TxHash). Msg("could not stake the node with the Allora blockchain in specified topic") } + } else { + appchain.Logger.Info().Msg("No initial stake configured") } - } else { - appchain.Logger.Info().Msg("No initial stake configured") } } } else { diff --git a/cmd/node/flags.go b/cmd/node/flags.go index d1b8d7c..a558b75 100644 --- a/cmd/node/flags.go +++ b/cmd/node/flags.go @@ -62,7 +62,7 @@ func parseFlags() *alloraCfg { pflag.StringVarP(&cfg.AppChainConfig.NodeRPCAddress, "allora-node-rpc-address", "", "http://localhost:26657", "The address for the client to connect to a node.") pflag.StringSliceVar(&cfg.AppChainConfig.TopicIds, "allora-chain-topic-id", nil, "The topic id for the topic that the node will subscribe to.") pflag.Uint64Var(&cfg.AppChainConfig.ReconnectSeconds, "allora-chain-reconnect-seconds", 60, "If connection to Allora Appchain breaks, it will attempt to reconnect with this interval. O means no reconnection.") - pflag.Uint64Var(&cfg.AppChainConfig.InitialStake, "allora-chain-initial-stake", 100, "Upon registering on a new topic, amount of stake to use.") + pflag.Uint64Var(&cfg.AppChainConfig.InitialStake, "allora-chain-initial-stake", 0, "Upon registering on a new topic, amount of stake to use.") pflag.StringVarP(&cfg.AppChainConfig.WorkerMode, "allora-chain-worker-mode", "", WorkerModeWorker, "Worker mode of an Allora Network node.") pflag.StringVar(&cfg.AppChainConfig.Gas, "allora-chain-gas", "auto", "Max gas on Allora client.") pflag.Float64Var(&cfg.AppChainConfig.GasAdjustment, "allora-chain-gas-adjustment", 0.1, "Gas adjustment on Allora client.")