Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix random build failure #1341

Open
cstrangedk opened this issue Nov 23, 2022 · 2 comments
Open

Fix random build failure #1341

cstrangedk opened this issue Nov 23, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@cstrangedk
Copy link
Contributor

see https://github.com/skalenetwork/IMA/actions/runs/3534055444/jobs/5930476823#step:16:520

@cstrangedk cstrangedk added the bug Something isn't working label Nov 23, 2022
@payvint
Copy link
Collaborator

payvint commented Nov 30, 2022

Looks like bytes32 string became bytes31 string:)

1) ERC721MintingFromSchainToMainnet
[518](https://github.com/skalenetwork/IMA/actions/runs/3534055444/jobs/5930476823#step:16:519)
       "before each" hook for "should not send message if not registered":
[519](https://github.com/skalenetwork/IMA/actions/runs/3534055444/jobs/5930476823#step:16:520)
     Error: incorrect data length (argument=null, value="0xbdecb447c02cb45c912ea72dc3ea66fb9c8a3339b9df544cc512f07089fb27", code=INVALID_ARGUMENT, version=abi/5.4.1)

len("0xbdecb447c02cb45c912ea72dc3ea66fb9c8a3339b9df544cc512f07089fb27") = 64 = 2 + 2 * 31

@payvint
Copy link
Collaborator

payvint commented Nov 30, 2022

My assumption:
In this test there is only one place where some rand string is used here
After that we extract public key from private key here

Review getPublicKey function - it uses function hexlify over getX().toBuffer() function - hexlify can return non fixed to 32 bytes and getX is returning number and converting to bytes array also it is non fixed to 32 bytes.
So I think it would be good to rewrite this function and use already created solutions from ethers or web3 libraries.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: No status
Development

No branches or pull requests

2 participants