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

chore: serialize circuit as hex string in build artifact file #950

Merged
merged 1 commit into from
Mar 6, 2023

Conversation

TomAFrench
Copy link
Member

@TomAFrench TomAFrench commented Mar 6, 2023

Related issue(s)

Resolves #

Description

Summary of changes

We now output the CompiledProgram json file with the circuit represented as a hex string rather than as a long array of byte values. This is more consistent with standard solidity tooling.

Note that this hex is not 0x-prefixed, in case there are strong feelings around this.

Dependency additions / changes

Test additions / changes

Checklist

  • I have tested the changes locally.
  • I have formatted the changes with Prettier and/or cargo fmt with default settings.
  • I have linked this PR to the issue(s) that it resolves.
  • I have reviewed the changes on GitHub, line by line.
  • I have ensured all changes are covered in the description.

Documentation needs

Additional context

@kevaundray kevaundray added this pull request to the merge queue Mar 6, 2023
@guipublic
Copy link
Contributor

Shouldn't we always compress the circuit when serialising it?

@guipublic guipublic removed this pull request from the merge queue due to a manual request Mar 6, 2023
@kevaundray
Copy link
Contributor

Shouldn't we always compress the circuit when serialising it?

Compression can be done on the ACVM level when serialize is called instead of on the Noir level.

This is also not a blocker to this PR as its just changing it from being displayed as bytes to a hex string in the build artifact to align more with what solidity does.

@guipublic
Copy link
Contributor

Compression can be done on the ACVM level when serialize is called instead of on the Noir level.

Yes I agree, it should be handled at the ACVM level.

@guipublic guipublic added this pull request to the merge queue Mar 6, 2023
Merged via the queue into master with commit 03a2088 Mar 6, 2023
@guipublic guipublic deleted the hex-circuit branch March 6, 2023 14:12
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.

3 participants