Skip to content

Commit

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

Similar to the solution noted
AztecProtocol/aztec-packages#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
AztecProtocol/aztec-packages#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
2 people authored and AztecBot committed Sep 4, 2023
1 parent 297a20d commit 37ee120
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions cpp/src/barretenberg/bb/get_bytecode.hpp
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 37ee120

Please sign in to comment.