Merge pull request #1405 from ethereum/bls_tests_name_length
fix BLS tests name length
This commit is contained in:
commit
d0c6b6719f
|
@ -11,6 +11,12 @@ from eth_utils import (
|
|||
from gen_base import gen_runner, gen_typing
|
||||
|
||||
from py_ecc import bls
|
||||
from hashlib import sha256
|
||||
|
||||
|
||||
def hash(x):
|
||||
return sha256(x).digest()
|
||||
|
||||
|
||||
F2Q_COEFF_LEN = 48
|
||||
G2_COMPRESSED_Z_LEN = 48
|
||||
|
@ -122,7 +128,8 @@ def case04_sign_messages():
|
|||
for message in MESSAGES:
|
||||
for domain in DOMAINS:
|
||||
sig = bls.sign(message, privkey, domain)
|
||||
yield f'sign_msg_{int_to_hex(privkey)}_{encode_hex(message)}_{encode_hex(domain)}', {
|
||||
full_name = f'{int_to_hex(privkey)}_{encode_hex(message)}_{encode_hex(domain)}'
|
||||
yield f'sign_msg_case_{(hash(bytes(full_name, "utf-8"))[:8]).hex()}', {
|
||||
'input': {
|
||||
'privkey': int_to_hex(privkey),
|
||||
'message': encode_hex(message),
|
||||
|
|
Loading…
Reference in New Issue