您当前的位置: 首页 >  区块链
  • 0浏览

    0关注

    1477博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

区块链 以太坊 交易中 r,s,v 是什么 作用

软件工程小施同学 发布时间:2021-08-07 09:59:47 ,浏览量:0

type txdata struct {
   AccountNonce uint64          `json:"nonce"    gencodec:"required"`
   Price        *big.Int        `json:"gasPrice" gencodec:"required"`
   GasLimit     uint64          `json:"gas"      gencodec:"required"`
   Recipient    *common.Address `json:"to"       rlp:"nil"` // nil means contract creation
   Amount       *big.Int        `json:"value"    gencodec:"required"`
   Payload      []byte          `json:"input"    gencodec:"required"`

   // Signature values
   V *big.Int `json:"v" gencodec:"required"`
   R *big.Int `json:"r" gencodec:"required"`
   S *big.Int `json:"s" gencodec:"required"`

   // This is only used when marshaling to JSON.
   Hash *common.Hash `json:"hash" rlp:"-"`
}

r,s,v是交易签名后的值,它们可以被用来生成签名者的公钥;R,S是ECDSA椭圆加密算法的输出值,V是用于恢复结果的ID

关注
打赏
1665320866
查看更多评论
立即登录/注册

微信扫码登录

0.1215s