Skip to content

Commit

Permalink
fix: unify base64 interface between mac and linux (cherry-picked) (#1968
Browse files Browse the repository at this point in the history
)

Similar to the solution noted
#1850 (comment)

This has moved up in priority because Mac has decided to change the
base64 interface again for newer Mac's.

We can remove base64 in a followup PR, it was originally blocked by
double_verify_proof but we've noted that is an orthogonal problem.

This has been cherry-picked from
#1855

# Checklist:
Remove the checklist to signal you've completed it. Enable auto-merge if
the PR is ready to merge.
- [ ] If the pull request requires a cryptography review (e.g.
cryptographic algorithm implementations) I have added the 'crypto' tag.
- [ ] I have reviewed my diff in github, line by line and removed
unexpected formatting changes, testing logs, or commented-out code.
- [ ] Every change is related to the PR description.
- [ ] I have
[linked](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue)
this pull request to relevant issues (if any exist).

Co-authored-by: Charlie Lye <[email protected]>
  • Loading branch information
kevaundray and charlielye authored Sep 4, 2023
1 parent 12ecb04 commit ee24b52
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
1 change: 1 addition & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1239,6 +1239,7 @@ circuits-x86_64-test: &circuits-x86_64-test
requires:
- circuits-x86_64-linux-clang-assert
<<: *defaults

workflows:
system:
when:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,6 @@
*/
inline std::vector<uint8_t> get_bytecode(const std::string& bytecodePath)
{
// base64 on mac is different from linux
#ifdef __APPLE__
std::string command = "base64 -D -i " + bytecodePath + " | gunzip";
#else
std::string command = "base64 -d " + bytecodePath + " | gunzip";
#endif

std::string command = "cat " + bytecodePath + " | base64 -d | gunzip";
return exec_pipe(command);
}

0 comments on commit ee24b52

Please sign in to comment.