diff --git a/.circleci/config.yml b/.circleci/config.yml index 986a6253a..c18bf2bfa 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -10,7 +10,7 @@ jobs: # TODO: Make builds for all platforms where Pocket Core is expected to run build: docker: - - image: cimg/go:1.18 + - image: cimg/go:1.19 environment: GO111MODULE: "on" resource_class: medium+ @@ -35,7 +35,7 @@ jobs: # TODO: Expand the testing capabilities test: docker: - - image: cimg/go:1.18 + - image: cimg/go:1.19 environment: GO111MODULE: "on" working_directory: /home/circleci/go/src/github.com/pokt-network/pocket-core @@ -52,7 +52,7 @@ jobs: # Job to trigger the Pocket Core deployments CI with a specific branch trigger-pocket-core-deployments-branches: docker: - - image: cimg/go:1.18 + - image: cimg/go:1.19 environment: GO111MODULE: "on" working_directory: /home/circleci/go/src/github.com/pokt-network/pocket-core @@ -67,11 +67,11 @@ jobs: # Trigger Pocket Core deployments CI - run: name: Trigger Pocket Core Deployment build using branch. - command: "sh .circleci/trigger.sh ${POCKET_CORE_DEPLOYMENTS_TRIGGER_API_KEY} ${CIRCLE_BRANCH} 1.18 staging" + command: "sh .circleci/trigger.sh ${POCKET_CORE_DEPLOYMENTS_TRIGGER_API_KEY} ${CIRCLE_BRANCH} 1.19 staging" # Job to trigger the Pocket Core deployments CI with a specific tag trigger-pocket-core-deployments-tags: docker: - - image: cimg/go:1.18 + - image: cimg/go:1.19 environment: GO111MODULE: "on" working_directory: /home/circleci/go/src/github.com/pokt-network/pocket-core @@ -86,7 +86,7 @@ jobs: # Trigger Pocket Core deployments CI - run: name: Trigger Pocket Core Deployment build using tags. - command: "sh .circleci/trigger.sh ${POCKET_CORE_DEPLOYMENTS_TRIGGER_API_KEY} ${CIRCLE_TAG} 1.18 staging" + command: "sh .circleci/trigger.sh ${POCKET_CORE_DEPLOYMENTS_TRIGGER_API_KEY} ${CIRCLE_TAG} 1.19 staging" # Workflow definitions workflows: diff --git a/README.md b/README.md index 9c26dadc5..169e03a33 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Official golang implementation of the Pocket Network Protocol.
diff --git a/app/cmd/cli/root.go b/app/cmd/cli/root.go index b3bedcd09..0e5ba5ebc 100644 --- a/app/cmd/cli/root.go +++ b/app/cmd/cli/root.go @@ -5,6 +5,7 @@ import ( "log" "os" "os/signal" + "runtime/debug" "syscall" "time" @@ -28,6 +29,7 @@ var ( useCache bool forceSetValidatorsLean bool useLean bool + memoryLimit int64 ) var CLIVersion = app.AppVersion @@ -61,6 +63,7 @@ func init() { startCmd.Flags().BoolVar(&profileApp, "profileApp", false, "expose cpu & memory profiling") startCmd.Flags().BoolVar(&useCache, "useCache", false, "use cache") startCmd.Flags().BoolVar(&forceSetValidatorsLean, "forceSetValidators", false, "reads your lean_pocket_user_key_file (lean_nodes_keys.json) and updates your last signed state/validator files before starting your node") + startCmd.Flags().Int64Var(&memoryLimit, "memoryLimit", 0, "number of bytes that on go 1.19 limits the amount of memory available for the process, 0 is unlimited, 8589934592 is 8gb") rootCmd.AddCommand(startCmd) rootCmd.AddCommand(resetCmd) rootCmd.AddCommand(version) @@ -84,6 +87,11 @@ var startCmd = &cobra.Command{ } func start(cmd *cobra.Command, args []string) { + // should be realistically at least 1gb + if memoryLimit > 1000000000 { + debug.SetMemoryLimit(memoryLimit) + } + var genesisType app.GenesisType if mainnet && testnet { fmt.Println("cannot run with mainnet and testnet genesis simultaneously, please choose one") diff --git a/go.mod b/go.mod index 48426a6cf..d18447887 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/pokt-network/pocket-core -go 1.18 +go 1.19 require ( github.com/alitto/pond v1.8.1