diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml
index fbf9bb653..af5a93cfc 100644
--- a/.github/workflows/coverage.yml
+++ b/.github/workflows/coverage.yml
@@ -17,7 +17,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v5
with:
- go-version: '1.22.2'
+ go-version: '1.23.1'
- name: Checkout code
uses: actions/checkout@v4
diff --git a/.github/workflows/deadlock.yml b/.github/workflows/deadlock.yml
index b36e5efbf..825b94406 100644
--- a/.github/workflows/deadlock.yml
+++ b/.github/workflows/deadlock.yml
@@ -13,7 +13,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v5
with:
- go-version: '1.22.2'
+ go-version: '1.23.1'
- name: Checkout code
uses: actions/checkout@v4
diff --git a/.github/workflows/gui.yml b/.github/workflows/gui.yml
index 38862fb1d..dac629395 100644
--- a/.github/workflows/gui.yml
+++ b/.github/workflows/gui.yml
@@ -24,13 +24,13 @@ jobs:
- name: Install Go
uses: actions/setup-go@v5
with:
- go-version: '1.22.2'
+ go-version: '1.23.1'
- name: Build the binary
run: make build_gui
- name: Installing golangci-lint
- run: go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.59
+ run: go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.61.1
- name: Lint check
run: BUILD_TAG=gtk make check
@@ -47,7 +47,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v5
with:
- go-version: '1.22.2'
+ go-version: '1.23.1'
- name: Build the binary
run: make build_gui
diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml
index 7fabeb73b..deb3138a5 100644
--- a/.github/workflows/linting.yml
+++ b/.github/workflows/linting.yml
@@ -17,7 +17,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v5
with:
- go-version: '1.22.2'
+ go-version: '1.23.1'
- name: Checkout code
uses: actions/checkout@v4
diff --git a/.github/workflows/releaser.yml b/.github/workflows/releaser.yml
index b5d857284..50739d8c1 100644
--- a/.github/workflows/releaser.yml
+++ b/.github/workflows/releaser.yml
@@ -26,7 +26,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v5
with:
- go-version: '1.22.2'
+ go-version: '1.23.1'
- name: Create release files
run: bash ./.github/releasers/releaser_cli.sh
@@ -69,7 +69,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v5
with:
- go-version: '1.22.2'
+ go-version: '1.23.1'
- name: Create release files
run: bash ./.github/releasers/releaser_gui_linux.sh
@@ -111,7 +111,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v5
with:
- go-version: '1.22.2'
+ go-version: '1.23.1'
- name: Create release files
run: bash ./.github/releasers/releaser_gui_macos.sh
@@ -155,7 +155,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v5
with:
- go-version: '1.22.2'
+ go-version: '1.23.1'
- name: Create release files
run: bash ./.github/releasers/releaser_gui_macos.sh
@@ -267,4 +267,4 @@ jobs:
with:
files: .github/releasers/pactus_downloader.sh
env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
\ No newline at end of file
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml
index 7ded4b663..0940d2aa6 100644
--- a/.github/workflows/testing.yml
+++ b/.github/workflows/testing.yml
@@ -23,7 +23,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v5
with:
- go-version: '1.22.2'
+ go-version: '1.23.1'
- name: Unit tests
run: make unit_test
diff --git a/Dockerfile b/Dockerfile
index cab20bddc..3c2654560 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,4 +1,4 @@
-FROM golang:1.22.2-alpine3.19 as builder
+FROM golang:1.23.1-alpine3.19 as builder
RUN apk add --no-cache git gmp-dev build-base g++ openssl-dev
ADD . /pactus
diff --git a/Makefile b/Makefile
index 42dbd216b..0f500f59a 100644
--- a/Makefile
+++ b/Makefile
@@ -14,16 +14,15 @@ all: build test
### Tools needed for development
devtools:
@echo "Installing devtools"
- go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.59
- go install github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway@v2.20
- go install github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2@v2.20
+ go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.61
+ go install github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway@v2.22
+ go install github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2@v2.22
go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.34
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.4
go install github.com/NathanBaulch/protoc-gen-cobra@v1.2
go install github.com/pactus-project/protoc-gen-doc/cmd/protoc-gen-doc@v0.0.0-20240815105130-84e89d0170e4
- go install github.com/bufbuild/buf/cmd/buf@v1.34
+ go install github.com/bufbuild/buf/cmd/buf@v1.42
go install mvdan.cc/gofumpt@latest
- go install github.com/rakyll/statik@v0.1.7
go install github.com/pacviewer/jrpc-gateway/protoc-gen-jrpc-gateway@v0.3.2
########################################
diff --git a/go.mod b/go.mod
index 26e5f3a79..311765c72 100644
--- a/go.mod
+++ b/go.mod
@@ -1,6 +1,6 @@
module github.com/pactus-project/pactus
-go 1.22.2
+go 1.23.1
require (
github.com/NathanBaulch/protoc-gen-cobra v1.2.1
@@ -52,8 +52,8 @@ require (
github.com/chzyer/readline v1.5.1 // indirect
github.com/containerd/cgroups v1.1.0 // indirect
github.com/coreos/go-systemd/v22 v22.5.0 // indirect
- github.com/creachadair/jrpc2 v1.2.0 // indirect
- github.com/creachadair/mds v0.15.0 // indirect
+ github.com/creachadair/jrpc2 v1.2.1 // indirect
+ github.com/creachadair/mds v0.21.2 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/davidlazar/go-crypto v0.0.0-20200604182044-b73af7476f6c // indirect
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 // indirect
diff --git a/go.sum b/go.sum
index 85f8e287e..b738d9647 100644
--- a/go.sum
+++ b/go.sum
@@ -52,10 +52,10 @@ github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSV
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
-github.com/creachadair/jrpc2 v1.2.0 h1:SXr0OgnwM0X18P+HccJP0uT3KGSDk/BCSRlJBvE2bMY=
-github.com/creachadair/jrpc2 v1.2.0/go.mod h1:66uKSdr6tR5ZeNvkIjDSbbVUtOv0UhjS/vcd8ECP7Iw=
-github.com/creachadair/mds v0.15.0 h1:St6HvUcrX1UJ517Zha6GKxVibGyRDBDtInOjuaaHOrQ=
-github.com/creachadair/mds v0.15.0/go.mod h1:4vrFYUzTXMJpMBU+OA292I6IUxKWCCfZkgXg+/kBZMo=
+github.com/creachadair/jrpc2 v1.2.1 h1:eIgmguoqLbEjn4Pb/XYMg5U1PhVpAClGdhI/Q4gfC5o=
+github.com/creachadair/jrpc2 v1.2.1/go.mod h1:RvEKAYVpDBKn3YWlTVQJIFmxG5GuLD7ztp9FMTJx8eI=
+github.com/creachadair/mds v0.21.2 h1:D5130qi/kqmu+gGUQyDNOhrocGQp075ziTCgttxhh3k=
+github.com/creachadair/mds v0.21.2/go.mod h1:1ltMWZd9yXhaHEoZwBialMaviWVUpRPvMwVP7saFAzM=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
diff --git a/www/grpc/gen/docs/json-rpc.md b/www/grpc/gen/docs/json-rpc.md
index ee6ec9275..7a6f9a72d 100644
--- a/www/grpc/gen/docs/json-rpc.md
+++ b/www/grpc/gen/docs/json-rpc.md
@@ -243,7 +243,7 @@ parameters.
verbosity |
- string |
+ numeric |
(Enum) The verbosity level for transaction details.
Available values:
@@ -326,7 +326,7 @@ parameters.
|
transaction.payload_type |
- string |
+ numeric |
(Enum) The type of transaction payload.
Available values:
@@ -503,7 +503,7 @@ and payload type.
|
payload_type |
- string |
+ numeric |
(Enum) The type of transaction payload.
Available values:
@@ -889,7 +889,7 @@ parameters.
|
verbosity |
- string |
+ numeric |
(Enum) The verbosity level for block information.
Available values:
@@ -1072,7 +1072,7 @@ BLOCK_TRANSACTIONS.
|
txs[].payload_type |
- string |
+ numeric |
(Enum) The type of transaction payload.
Available values:
@@ -1553,7 +1553,7 @@ committee.
|
instances[].votes[].type |
- string |
+ numeric |
(Enum) The type of the vote.
Available values:
@@ -1966,7 +1966,7 @@ address.
payload_type |
- string |
+ numeric |
(Enum) The type of transactions to retrieve from the transaction pool. 0 means all
types.
@@ -2040,7 +2040,7 @@ types.
|
txs[].payload_type |
- string |
+ numeric |
(Enum) The type of transaction payload.
Available values:
@@ -2967,7 +2967,7 @@ public key.
|
address_type |
- string |
+ numeric |
(Enum) The type of address to generate.
Available values:
diff --git a/www/grpc/gen/go/blockchain.pb.gw.go b/www/grpc/gen/go/blockchain.pb.gw.go
index f37d0cb57..b5124a06a 100644
--- a/www/grpc/gen/go/blockchain.pb.gw.go
+++ b/www/grpc/gen/go/blockchain.pb.gw.go
@@ -359,6 +359,7 @@ func local_request_Blockchain_GetTxPoolContent_0(ctx context.Context, marshaler
// UnaryRPC :call BlockchainServer directly.
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterBlockchainHandlerFromEndpoint instead.
+// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call.
func RegisterBlockchainHandlerServer(ctx context.Context, mux *runtime.ServeMux, server BlockchainServer) error {
mux.Handle("GET", pattern_Blockchain_GetBlock_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
@@ -649,7 +650,7 @@ func RegisterBlockchainHandler(ctx context.Context, mux *runtime.ServeMux, conn
// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "BlockchainClient".
// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "BlockchainClient"
// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in
-// "BlockchainClient" to call the correct interceptors.
+// "BlockchainClient" to call the correct interceptors. This client ignores the HTTP middlewares.
func RegisterBlockchainHandlerClient(ctx context.Context, mux *runtime.ServeMux, client BlockchainClient) error {
mux.Handle("GET", pattern_Blockchain_GetBlock_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
diff --git a/www/grpc/gen/go/network.pb.gw.go b/www/grpc/gen/go/network.pb.gw.go
index 9089b05ab..3c9d06405 100644
--- a/www/grpc/gen/go/network.pb.gw.go
+++ b/www/grpc/gen/go/network.pb.gw.go
@@ -89,6 +89,7 @@ func local_request_Network_GetNodeInfo_0(ctx context.Context, marshaler runtime.
// UnaryRPC :call NetworkServer directly.
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterNetworkHandlerFromEndpoint instead.
+// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call.
func RegisterNetworkHandlerServer(ctx context.Context, mux *runtime.ServeMux, server NetworkServer) error {
mux.Handle("GET", pattern_Network_GetNetworkInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
@@ -179,7 +180,7 @@ func RegisterNetworkHandler(ctx context.Context, mux *runtime.ServeMux, conn *gr
// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "NetworkClient".
// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "NetworkClient"
// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in
-// "NetworkClient" to call the correct interceptors.
+// "NetworkClient" to call the correct interceptors. This client ignores the HTTP middlewares.
func RegisterNetworkHandlerClient(ctx context.Context, mux *runtime.ServeMux, client NetworkClient) error {
mux.Handle("GET", pattern_Network_GetNetworkInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
diff --git a/www/grpc/gen/go/transaction.pb.gw.go b/www/grpc/gen/go/transaction.pb.gw.go
index 52f00400b..83467c5b1 100644
--- a/www/grpc/gen/go/transaction.pb.gw.go
+++ b/www/grpc/gen/go/transaction.pb.gw.go
@@ -287,6 +287,7 @@ func local_request_Transaction_GetRawWithdrawTransaction_0(ctx context.Context,
// UnaryRPC :call TransactionServer directly.
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterTransactionHandlerFromEndpoint instead.
+// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call.
func RegisterTransactionHandlerServer(ctx context.Context, mux *runtime.ServeMux, server TransactionServer) error {
mux.Handle("GET", pattern_Transaction_GetTransaction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
@@ -502,7 +503,7 @@ func RegisterTransactionHandler(ctx context.Context, mux *runtime.ServeMux, conn
// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "TransactionClient".
// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "TransactionClient"
// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in
-// "TransactionClient" to call the correct interceptors.
+// "TransactionClient" to call the correct interceptors. This client ignores the HTTP middlewares.
func RegisterTransactionHandlerClient(ctx context.Context, mux *runtime.ServeMux, client TransactionClient) error {
mux.Handle("GET", pattern_Transaction_GetTransaction_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
diff --git a/www/grpc/gen/go/utils.pb.gw.go b/www/grpc/gen/go/utils.pb.gw.go
index b39071861..605051439 100644
--- a/www/grpc/gen/go/utils.pb.gw.go
+++ b/www/grpc/gen/go/utils.pb.gw.go
@@ -107,6 +107,7 @@ func local_request_Utils_VerifyMessage_0(ctx context.Context, marshaler runtime.
// UnaryRPC :call UtilsServer directly.
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterUtilsHandlerFromEndpoint instead.
+// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call.
func RegisterUtilsHandlerServer(ctx context.Context, mux *runtime.ServeMux, server UtilsServer) error {
mux.Handle("GET", pattern_Utils_SignMessageWithPrivateKey_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
@@ -197,7 +198,7 @@ func RegisterUtilsHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc
// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "UtilsClient".
// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "UtilsClient"
// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in
-// "UtilsClient" to call the correct interceptors.
+// "UtilsClient" to call the correct interceptors. This client ignores the HTTP middlewares.
func RegisterUtilsHandlerClient(ctx context.Context, mux *runtime.ServeMux, client UtilsClient) error {
mux.Handle("GET", pattern_Utils_SignMessageWithPrivateKey_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
diff --git a/www/grpc/gen/go/wallet.pb.gw.go b/www/grpc/gen/go/wallet.pb.gw.go
index 67c180ab2..dd3b0959f 100644
--- a/www/grpc/gen/go/wallet.pb.gw.go
+++ b/www/grpc/gen/go/wallet.pb.gw.go
@@ -359,6 +359,7 @@ func local_request_Wallet_SignMessage_0(ctx context.Context, marshaler runtime.M
// UnaryRPC :call WalletServer directly.
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterWalletHandlerFromEndpoint instead.
+// GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call.
func RegisterWalletHandlerServer(ctx context.Context, mux *runtime.ServeMux, server WalletServer) error {
mux.Handle("GET", pattern_Wallet_CreateWallet_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
@@ -624,7 +625,7 @@ func RegisterWalletHandler(ctx context.Context, mux *runtime.ServeMux, conn *grp
// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "WalletClient".
// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "WalletClient"
// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in
-// "WalletClient" to call the correct interceptors.
+// "WalletClient" to call the correct interceptors. This client ignores the HTTP middlewares.
func RegisterWalletHandlerClient(ctx context.Context, mux *runtime.ServeMux, client WalletClient) error {
mux.Handle("GET", pattern_Wallet_CreateWallet_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
| |