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

fix_: remove go-ethereum's UnmarshalPubkey usage #6331

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion appdatabase/database.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ import (
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common/hexutil"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/crypto"

"github.com/status-im/status-go/appdatabase/migrations"
migrationsprevnodecfg "github.com/status-im/status-go/appdatabase/migrationsprevnodecfg"
"github.com/status-im/status-go/eth-node/crypto"
"github.com/status-im/status-go/nodecfg"
"github.com/status-im/status-go/services/wallet/bigint"
w_common "github.com/status-im/status-go/services/wallet/common"
Expand Down
16 changes: 8 additions & 8 deletions wakuv1/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,17 @@ import (

"go.uber.org/zap"

"github.com/status-im/status-go/logutils"

ethtypes "github.com/status-im/status-go/eth-node/types"
"github.com/status-im/status-go/waku/types"
"github.com/status-im/status-go/wakuv1/common"

ethcommon "github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common/hexutil"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/p2p/enode"
"github.com/ethereum/go-ethereum/rpc"

gocommon "github.com/status-im/status-go/common"
"github.com/status-im/status-go/eth-node/crypto"
ethtypes "github.com/status-im/status-go/eth-node/types"
"github.com/status-im/status-go/logutils"
"github.com/status-im/status-go/waku/types"
"github.com/status-im/status-go/wakuv1/common"
)

// List of errors
Expand Down Expand Up @@ -362,7 +362,7 @@ func (api *PublicWakuAPI) Messages(ctx context.Context, crit types.Criteria) (*r
return nil, ErrInvalidSymmetricKey
}
filter.KeySym = key
filter.SymKeyHash = crypto.Keccak256Hash(filter.KeySym)
filter.SymKeyHash = ethcommon.Hash(crypto.Keccak256Hash(filter.KeySym))
}

// listen for messages that are encrypted with the given public key
Expand Down
18 changes: 9 additions & 9 deletions wakuv2/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,21 @@ import (

"go.uber.org/zap"

"google.golang.org/protobuf/proto"

"github.com/waku-org/go-waku/waku/v2/payload"
"github.com/waku-org/go-waku/waku/v2/protocol/pb"

ethtypes "github.com/status-im/status-go/eth-node/types"
"github.com/status-im/status-go/logutils"
"github.com/status-im/status-go/waku/types"
"github.com/status-im/status-go/wakuv2/common"

ethcommon "github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common/hexutil"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/rpc"

"google.golang.org/protobuf/proto"

gocommon "github.com/status-im/status-go/common"
"github.com/status-im/status-go/eth-node/crypto"
ethtypes "github.com/status-im/status-go/eth-node/types"
"github.com/status-im/status-go/logutils"
"github.com/status-im/status-go/waku/types"
"github.com/status-im/status-go/wakuv2/common"
)

// List of errors
Expand Down Expand Up @@ -320,7 +320,7 @@ func (api *PublicWakuAPI) Messages(ctx context.Context, crit types.Criteria) (*r
return nil, ErrInvalidSymmetricKey
}
filter.KeySym = key
filter.SymKeyHash = crypto.Keccak256Hash(filter.KeySym)
filter.SymKeyHash = ethcommon.Hash(crypto.Keccak256Hash(filter.KeySym))
}

// listen for messages that are encrypted with the given public key
Expand Down
2 changes: 1 addition & 1 deletion wakuv2/persistence/signed_messages.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

"go.uber.org/zap"

"github.com/ethereum/go-ethereum/crypto"
"github.com/status-im/status-go/eth-node/crypto"
)

// DBStore is a MessageProvider that has a *sql.DB connection
Expand Down