Skip to content

Commit

Permalink
Merge pull request ethereum#1 from 0rac1e/symbiosis/master
Browse files Browse the repository at this point in the history
zksync sanity check signature
  • Loading branch information
nevidimov committed Apr 5, 2023
2 parents 9ecefac + 49d0b3c commit 0d8f2ba
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion core/types/transaction_marshalling.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,11 @@ func (t *Transaction) UnmarshalJSON(input []byte) error {
itx.S = (*big.Int)(dec.S)
withSignature := itx.V.Sign() != 0 || itx.R.Sign() != 0 || itx.S.Sign() != 0
if withSignature {
if err := sanityCheckSignature(itx.V, itx.R, itx.S, true); err != nil {
mayBeProtected := true
if byte(itx.V.Uint64()) < 27 {
mayBeProtected = false
}
if err := sanityCheckSignature(itx.V, itx.R, itx.S, mayBeProtected); err != nil {
return err
}
}
Expand Down

0 comments on commit 0d8f2ba

Please sign in to comment.