Skip to content

Commit

Permalink
go 1.19
Browse files Browse the repository at this point in the history
  • Loading branch information
oten91 committed Dec 1, 2022
1 parent e1371aa commit 1634c0c
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 8 deletions.
12 changes: 6 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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+
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Official golang implementation of the Pocket Network Protocol.
<div>
<a href="https://godoc.org/github.com/pokt-network/pocket-core"><img src="https://img.shields.io/badge/godoc-reference-blue.svg"/></a>
<a href="https://goreportcard.com/report/github.com/pokt-network/pocket-core"><img src="https://goreportcard.com/badge/github.com/pokt-network/pocket-core"/></a>
<a href="https://golang.org"><img src="https://img.shields.io/badge/golang-v1.18-red.svg"/></a>
<a href="https://golang.org"><img src="https://img.shields.io/badge/golang-v1.19-red.svg"/></a>
<a href="https://github.com/tools/godep" ><img src="https://img.shields.io/badge/godep-dependency-71a3d9.svg"/></a>
</div>

Expand Down
8 changes: 8 additions & 0 deletions app/cmd/cli/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"log"
"os"
"os/signal"
"runtime/debug"
"syscall"
"time"

Expand All @@ -28,6 +29,7 @@ var (
useCache bool
forceSetValidatorsLean bool
useLean bool
memoryLimit int64
)

var CLIVersion = app.AppVersion
Expand Down Expand Up @@ -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)
Expand All @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 1634c0c

Please sign in to comment.