Skip to content

eth_sign: JSON RPC spec and Go API are not conform #2397

@Georgi87

Description

@Georgi87

The JSON-RPC interface describes that the data returned from the eth_sign call is the signed data while the go implementation signs a hash of the data:

https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_sign

Go:
https://github.com/ethereum/go-ethereum/blob/develop/eth/api.go#L1108

func (s *PublicTransactionPoolAPI) Sign(address common.Address, data string) (string, error) {
    signature, error := s.am.Sign(accounts.Account{Address: address}, common.HexToHash(data).Bytes())
    return common.ToHex(signature), error
}

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions