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

prover: make sure response values have 0x and 0 padding #21

Open
wants to merge 2 commits into
base: next
Choose a base branch
from

Conversation

wzmuda
Copy link
Collaborator

@wzmuda wzmuda commented Sep 16, 2024

Fix inconsistency in JSON response - make sure every number in the response is prefixed with "0x" if it's a hex.

Make sure hex numbers are 0-padded to full bytes. E.g. instead of 0xaab return 0x0aab. This makes the response Solidity-friendly, as Solidity gets confused if hex numbers contain nibbles.

Fix inconsistency in JSON response - make sure every number in the
response is prefixed with "0x" if it's a hex.

Make sure hex numbers are 0-padded to full bytes. E.g. instead of 0xaab
return 0x0aab. This makes the response Solidity-friendly, as Solidity
gets confused if hex numbers contain nibbles.

Signed-off-by: Wojciech Zmuda <[email protected]>
When proving failed, error code was ignored, and null response was
parsed and returned. Catch the error and return early.

Signed-off-by: Wojciech Zmuda <[email protected]>
@wzmuda wzmuda force-pushed the wz/response-nicer-hex branch from 8d230c7 to 2d91e93 Compare September 18, 2024 19:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant