Skip to content

Lint: Fix deprecated elliptic.Marshal/Unmarshal usage (SA1019 warnings) #3832

@jose-blockchain

Description

@jose-blockchain

Summary

The codebase contains 16 instances of deprecated elliptic.Marshal and elliptic.Unmarshal functions that have been deprecated since Go 1.21. These should be migrated to use the crypto/ecdh package.

Affected Files

  • pkg/bitcoin/script_test.go (2 instances)
  • pkg/bitcoin/transaction_test.go (1 instance)
  • pkg/chain/ethereum/tbtc.go (2 instances)
  • pkg/protocol/inactivity/member_test.go (1 instance)
  • pkg/tbtc/chain_test.go (1 instance)
  • pkg/tbtc/internal/test/marshaling.go (4 instances)
  • pkg/tbtc/marshaling.go (2 instances)
  • pkg/tbtc/registry.go (1 instance)
  • pkg/tbtc/wallet.go (1 instance)
  • pkg/tecdsa/dkg/protocol_test.go (1 instance)
  • pkg/tecdsa/dkg/result.go (1 instance)

Required Changes

Replace deprecated functions:

  • elliptic.Marshal → Use crypto/ecdh package equivalent
  • elliptic.Unmarshal → Use crypto/ecdh package equivalent

Impact

  • Low Risk: These are deprecation warnings, not errors
  • Backward Compatible: Current code still works
  • Future-Proofing: Migration needed for future Go versions

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions