mirror of https://github.com/status-im/op-geth.git
0703ef62d3
This commit changes the behavior of BitCurve.Add to be more inline with btcd. It fixes two different bugs: 1) When adding a point at infinity to another point, the other point should be returned. While this is undefined behavior, it is better to be more inline with the go standard library. Thus (0,0) + (a, b) = (a,b) 2) Adding the same point to itself produced the point at infinity. This is incorrect, now doubleJacobian is used to correctly calculate it. Thus (a,b) + (a,b) == 2* (a,b) and not (0,0) anymore. The change also adds a differential fuzzer for Add, testing it against btcd. Co-authored-by: Felix Lange <fjl@twurst.com> |
||
---|---|---|
.. | ||
fuzzers | ||
solidity | ||
testdata@c600d7795a | ||
block_test.go | ||
block_test_util.go | ||
difficulty_test.go | ||
difficulty_test_util.go | ||
gen_btheader.go | ||
gen_difficultytest.go | ||
gen_stenv.go | ||
gen_sttransaction.go | ||
gen_vmexec.go | ||
init.go | ||
init_test.go | ||
rlp_test.go | ||
rlp_test_util.go | ||
state_test.go | ||
state_test_util.go | ||
transaction_test.go | ||
transaction_test_util.go | ||
vm_test.go | ||
vm_test_util.go |