test_unrecoverable_signature()¶
Documentation for tests/frontier/validation/test_transaction.py::test_unrecoverable_signature@02aafd78.
Generate fixtures for these test cases for Bogota with:
fill -v tests/frontier/validation/test_transaction.py::test_unrecoverable_signature --fork Bogota
A signature whose components are each individually in range but which recovers no public key must be rejected.
test_bad_v_r_s covers the RANGE rules (v below 27/35, r or s at or
above secp256k1n, s above the EIP-2 halfway point). This is the distinct
failure that lies inside those ranges: r is read as the x-coordinate of
the ephemeral point R, and only about half of the values in [1, n) are
x-coordinates of a curve point at all. For the other half there is no R,
hence no public key and no sender -- with no range check violated anywhere.
A client that guards recovery by range-checking alone, or that treats the two failures as different kinds of error, reaches this case through an unintended path.
Source code in tests/frontier/validation/test_transaction.py
343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 | |
Parametrized Test Cases¶
This test generates 3 parametrized test cases across 17 forks.