Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

maintenance #977

Merged
merged 6 commits into from
Sep 28, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions api/common/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@ import (
"context"
"errors"
"fmt"
"google.golang.org/protobuf/encoding/protowire"

"github.com/nknorg/nkn/v2/config"

"github.com/golang/protobuf/proto"
"github.com/nknorg/nkn/v2/common"
"github.com/nknorg/nkn/v2/config"
"github.com/nknorg/nkn/v2/transaction"
"github.com/nknorg/nkn/v2/vault"
)
Expand Down Expand Up @@ -197,7 +196,7 @@ func MakeGenerateIDTransaction(ctx context.Context, pubkey []byte, wallet *vault
default:
}

txn, err = transaction.NewGenerateIDTransaction(pubkey, sender, regFee, maxVersion, nonce, txnFee, proto.EncodeVarint(i))
txn, err = transaction.NewGenerateIDTransaction(pubkey, sender, regFee, maxVersion, nonce, txnFee, protowire.AppendVarint(nil, i))
if err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion api/websocket/server/relay.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ import (
"fmt"
"time"

"github.com/golang/protobuf/proto"
"github.com/nknorg/nkn/v2/pb"
"github.com/nknorg/nkn/v2/por"
"github.com/nknorg/nkn/v2/util/address"
"github.com/nknorg/nkn/v2/util/log"
"google.golang.org/protobuf/proto"
)

type sigChainInfo struct {
Expand Down
2 changes: 1 addition & 1 deletion api/websocket/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import (
"sync"
"time"

"github.com/golang/protobuf/proto"
api "github.com/nknorg/nkn/v2/api/common"
"github.com/nknorg/nkn/v2/api/common/errcode"
"github.com/nknorg/nkn/v2/api/webrtc"
Expand All @@ -34,6 +33,7 @@ import (
"github.com/nknorg/nkn/v2/util/address"
"github.com/nknorg/nkn/v2/util/log"
"github.com/nknorg/nkn/v2/vault"
"google.golang.org/protobuf/proto"

"github.com/gorilla/websocket"
)
Expand Down
2 changes: 1 addition & 1 deletion block/block.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ import (
"fmt"
"io"

"github.com/golang/protobuf/proto"
"github.com/nknorg/nkn/v2/common"
"github.com/nknorg/nkn/v2/common/serialization"
"github.com/nknorg/nkn/v2/config"
"github.com/nknorg/nkn/v2/crypto"
"github.com/nknorg/nkn/v2/pb"
"github.com/nknorg/nkn/v2/signature"
"github.com/nknorg/nkn/v2/transaction"
"google.golang.org/protobuf/proto"
)

type Block struct {
Expand Down
2 changes: 1 addition & 1 deletion block/header.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ import (

"github.com/nknorg/nkn/v2/crypto"

"github.com/golang/protobuf/proto"
"github.com/nknorg/nkn/v2/common"
"github.com/nknorg/nkn/v2/common/serialization"
"github.com/nknorg/nkn/v2/pb"
"github.com/nknorg/nkn/v2/program"
"github.com/nknorg/nkn/v2/signature"
"google.golang.org/protobuf/proto"
)

type Header struct {
Expand Down
2 changes: 1 addition & 1 deletion chain/blockvalidator.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import (

"github.com/nknorg/nkn/v2/chain/txvalidator"

"github.com/golang/protobuf/proto"
"github.com/nknorg/nkn/v2/block"
"github.com/nknorg/nkn/v2/common"
"github.com/nknorg/nkn/v2/config"
Expand All @@ -21,6 +20,7 @@ import (
"github.com/nknorg/nkn/v2/program"
"github.com/nknorg/nkn/v2/transaction"
"github.com/nknorg/nkn/v2/util"
"google.golang.org/protobuf/proto"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion chain/store/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (
"io"
"sync"

"github.com/golang/protobuf/proto"
"github.com/nknorg/nkn/v2/block"
"github.com/nknorg/nkn/v2/chain/db"
"github.com/nknorg/nkn/v2/common"
Expand All @@ -19,6 +18,7 @@ import (
"github.com/nknorg/nkn/v2/program"
"github.com/nknorg/nkn/v2/transaction"
"github.com/nknorg/nkn/v2/util/log"
"google.golang.org/protobuf/proto"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion common/uint160.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"io"
"math/big"

base58 "github.com/itchyny/base58-go"
"github.com/itchyny/base58-go"
)

// FOOLPROOFPREFIX used for fool-proof prefix
Expand Down
2 changes: 1 addition & 1 deletion consensus/message.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ import (
"crypto/sha256"
"fmt"

"github.com/golang/protobuf/proto"
"github.com/nknorg/nkn/v2/block"
"github.com/nknorg/nkn/v2/chain"
"github.com/nknorg/nkn/v2/common"
"github.com/nknorg/nkn/v2/node"
"github.com/nknorg/nkn/v2/pb"
"github.com/nknorg/nkn/v2/transaction"
"google.golang.org/protobuf/proto"
)

// NewVoteMessage creates a VOTE message
Expand Down
2 changes: 1 addition & 1 deletion consensus/proposal.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (
"sync"
"time"

"github.com/golang/protobuf/proto"
"github.com/nknorg/nkn/v2/block"
"github.com/nknorg/nkn/v2/chain"
"github.com/nknorg/nkn/v2/common"
Expand All @@ -22,6 +21,7 @@ import (
"github.com/nknorg/nkn/v2/transaction"
"github.com/nknorg/nkn/v2/util/log"
"github.com/nknorg/nkn/v2/util/timer"
"google.golang.org/protobuf/proto"
)

type requestProposalInfo struct {
Expand Down
2 changes: 1 addition & 1 deletion consensus/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"sync"
"time"

"github.com/golang/protobuf/proto"
"github.com/nknorg/nkn/v2/chain"
"github.com/nknorg/nkn/v2/common"
"github.com/nknorg/nkn/v2/node"
Expand All @@ -13,6 +12,7 @@ import (
"github.com/nknorg/nkn/v2/util"
"github.com/nknorg/nkn/v2/util/log"
"github.com/nknorg/nkn/v2/util/timer"
"google.golang.org/protobuf/proto"
)

// startGettingNeighborConsensusState periodically checks neighbors' majority
Expand Down
123 changes: 63 additions & 60 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,103 +1,106 @@
module github.com/nknorg/nkn/v2

go 1.19
go 1.20

replace github.com/nknorg/nnet => ../nnet
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't forget to remove this replace and upgrade nnet to the latest version that includes nknorg/nnet#46 to be compatible with go 1.20

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done. thanks for the reminder.


require (
github.com/emirpasic/gods v1.18.1
github.com/gin-contrib/sessions v0.0.0-20190512062852-3cb4c4f2d615
github.com/gin-gonic/gin v1.9.1
github.com/go-acme/lego/v3 v3.8.0
github.com/golang/protobuf v1.5.0
github.com/gorilla/securecookie v1.1.1
github.com/gorilla/websocket v1.4.2
github.com/howeyc/gopass v0.0.0-20170109162249-bf9dde6d0d2c
github.com/itchyny/base58-go v0.0.5
github.com/nknorg/consequential v0.0.0-20190823093205-a45aff4a218a
github.com/nknorg/nnet v0.0.0-20220621093239-b22b80b04216
github.com/gin-contrib/sessions v1.0.1
github.com/gin-gonic/gin v1.10.0
github.com/go-acme/lego/v3 v3.9.0
github.com/gorilla/securecookie v1.1.2
github.com/gorilla/websocket v1.5.3
github.com/howeyc/gopass v0.0.0-20210920133722-c8aef6fb66ef
github.com/itchyny/base58-go v0.2.2
github.com/nknorg/consequential v0.0.0-20191113113929-5fd13b7f5984
github.com/nknorg/nnet v0.0.0-00010101000000-000000000000
github.com/nknorg/portmapper v0.0.0-20200114081049-1c03cdccc283
github.com/patrickmn/go-cache v2.1.0+incompatible
github.com/pbnjay/memory v0.0.0-20190104145345-974d429e7ae4
github.com/pborman/uuid v1.2.0
github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58
github.com/pborman/uuid v1.2.1
github.com/pion/webrtc/v4 v4.0.0-beta.30
github.com/rdegges/go-ipify v0.0.0-20150526035502-2d94a6a86c40
github.com/spf13/cobra v1.4.0
github.com/spf13/cobra v1.8.1
github.com/spf13/pflag v1.0.5
github.com/stretchr/testify v1.9.0
github.com/syndtr/goleveldb v1.0.1-0.20210305035536-64b5b1c73954
github.com/wk8/go-ordered-map v1.0.0
golang.org/x/crypto v0.21.0
golang.org/x/sys v0.18.0 // indirect
golang.org/x/time v0.0.0-20201208040808-7e3f01d25324
google.golang.org/protobuf v1.33.0
golang.org/x/crypto v0.27.0
golang.org/x/time v0.6.0
google.golang.org/protobuf v1.34.2
)

require github.com/pion/webrtc/v4 v4.0.0-beta.17

require (
github.com/bytedance/sonic v1.9.1 // indirect
github.com/bytedance/sonic v1.11.6 // indirect
github.com/bytedance/sonic/loader v0.1.1 // indirect
github.com/cenkalti/backoff/v4 v4.0.0 // indirect
github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 // indirect
github.com/cloudwego/base64x v0.1.4 // indirect
github.com/cloudwego/iasm v0.2.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/gabriel-vasile/mimetype v1.4.2 // indirect
github.com/gabriel-vasile/mimetype v1.4.3 // indirect
github.com/gin-contrib/sse v0.1.0 // indirect
github.com/go-playground/locales v0.14.1 // indirect
github.com/go-playground/universal-translator v0.18.1 // indirect
github.com/go-playground/validator/v10 v10.14.0 // indirect
github.com/go-playground/validator/v10 v10.20.0 // indirect
github.com/goccy/go-json v0.10.2 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/snappy v0.0.1 // indirect
github.com/golang/snappy v0.0.4 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/gorilla/context v1.1.1 // indirect
github.com/gorilla/sessions v1.1.3 // indirect
github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d // indirect
github.com/huin/goupnp v1.0.0 // indirect
github.com/imdario/mergo v0.3.6 // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/jackpal/gateway v1.0.5 // indirect
github.com/jackpal/go-nat-pmp v1.0.1 // indirect
github.com/gorilla/context v1.1.2 // indirect
github.com/gorilla/sessions v1.2.2 // indirect
github.com/hashicorp/yamux v0.1.2 // indirect
github.com/huin/goupnp v1.3.0 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/jackpal/gateway v1.0.11 // indirect
github.com/jackpal/go-nat-pmp v1.0.2 // indirect
github.com/jinzhu/copier v0.4.0 // indirect
github.com/jpillora/backoff v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/klauspost/cpuid v1.2.1 // indirect
github.com/klauspost/cpuid/v2 v2.2.4 // indirect
github.com/klauspost/reedsolomon v0.0.0-20190407153631-a373324398e4 // indirect
github.com/leodido/go-urn v1.2.4 // indirect
github.com/mattn/go-isatty v0.0.19 // indirect
github.com/klauspost/cpuid/v2 v2.2.8 // indirect
github.com/klauspost/reedsolomon v1.12.4 // indirect
github.com/leodido/go-urn v1.4.0 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/miekg/dns v1.1.27 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/nknorg/go-nat v1.0.1 // indirect
github.com/nxadm/tail v1.4.11 // indirect
github.com/op/go-logging v0.0.0-20160315200505-970db520ece7 // indirect
github.com/pelletier/go-toml/v2 v2.0.8 // indirect
github.com/pion/datachannel v1.5.6 // indirect
github.com/pion/dtls/v2 v2.2.10 // indirect
github.com/pion/ice/v3 v3.0.6 // indirect
github.com/pion/interceptor v0.1.29 // indirect
github.com/pelletier/go-toml/v2 v2.2.2 // indirect
github.com/pion/datachannel v1.5.9 // indirect
github.com/pion/dtls/v3 v3.0.2 // indirect
github.com/pion/ice/v4 v4.0.1 // indirect
github.com/pion/interceptor v0.1.30 // indirect
github.com/pion/logging v0.2.2 // indirect
github.com/pion/mdns/v2 v2.0.7 // indirect
github.com/pion/randutil v0.1.0 // indirect
github.com/pion/rtcp v1.2.14 // indirect
github.com/pion/rtp v1.8.5 // indirect
github.com/pion/sctp v1.8.16 // indirect
github.com/pion/rtp v1.8.9 // indirect
github.com/pion/sctp v1.8.33 // indirect
github.com/pion/sdp/v3 v3.0.9 // indirect
github.com/pion/srtp/v3 v3.0.1 // indirect
github.com/pion/stun/v2 v2.0.0 // indirect
github.com/pion/transport/v2 v2.2.4 // indirect
github.com/pion/transport/v3 v3.0.2 // indirect
github.com/pion/turn/v3 v3.0.2 // indirect
github.com/pion/srtp/v3 v3.0.3 // indirect
github.com/pion/stun/v3 v3.0.0 // indirect
github.com/pion/transport/v3 v3.0.7 // indirect
github.com/pion/turn/v4 v4.0.0 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/stretchr/objx v0.5.2 // indirect
github.com/templexxx/cpufeat v0.0.0-20180724012125-cef66df7f161 // indirect
github.com/templexxx/xor v0.0.0-20181023030647-4e92f724b73b // indirect
github.com/tjfoc/gmsm v0.0.0-20190417070453-18fd8096dc8a // indirect
github.com/templexxx/xor v0.0.0-20191217153810-f85b25db303b // indirect
github.com/tjfoc/gmsm v1.4.1 // indirect
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
github.com/ugorji/go/codec v1.2.11 // indirect
github.com/xtaci/kcp-go v4.3.1+incompatible // indirect
github.com/xtaci/smux v1.2.11 // indirect
github.com/ugorji/go/codec v1.2.12 // indirect
github.com/wlynxg/anet v0.0.3 // indirect
github.com/xtaci/kcp-go v5.4.20+incompatible // indirect
github.com/xtaci/smux v1.5.30 // indirect
gitlab.com/NebulousLabs/fastrand v0.0.0-20181126182046-603482d69e40 // indirect
gitlab.com/NebulousLabs/go-upnp v0.0.0-20181011194642-3a71999ed0d3 // indirect
golang.org/x/arch v0.3.0 // indirect
golang.org/x/net v0.23.0 // indirect
golang.org/x/term v0.18.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/arch v0.8.0 // indirect
golang.org/x/net v0.29.0 // indirect
golang.org/x/sync v0.8.0 // indirect
golang.org/x/sys v0.25.0 // indirect
golang.org/x/term v0.24.0 // indirect
golang.org/x/text v0.18.0 // indirect
gopkg.in/square/go-jose.v2 v2.3.1 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading