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

wip: fix obsolete marshal #4543

Closed
wants to merge 3 commits into from
Closed

wip: fix obsolete marshal #4543

wants to merge 3 commits into from

Conversation

notanatol
Copy link
Contributor

Checklist

Description

staticcheck has raised the issue of using obsolete methods, this PR looks into ways to fix it.

@notanatol notanatol marked this pull request as draft January 15, 2024 10:38
@notanatol notanatol self-assigned this Jan 15, 2024
@notanatol notanatol closed this Jan 15, 2024
@notanatol notanatol reopened this Jan 15, 2024
pubBytes := elliptic.Marshal(btcec.S256(), p.X, p.Y)
pk, err := p.ECDH()
if err != nil {
return nil, fmt.Errorf("to ECDH: %w", err)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@janos this fails with

--- FAIL: TestNewEthereumAddress (0.01s)
    /home/swarm/swarm/bee/pkg/crypto/crypto_test.go:250: to ECDH: ecdsa: unsupported curve by crypto/ecdh

not sure what the work around is

Copy link
Member

Choose a reason for hiding this comment

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

It appears we cannot do anything for now. go-ethereum still uses the same function https://github.com/ethereum/go-ethereum/blob/master/crypto/crypto.go#L179.

@notanatol notanatol closed this Jan 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants