Skip to content

Commit

Permalink
Set O1 optimization by default (#50)
Browse files Browse the repository at this point in the history
* Set O1 optimization by default

* rollback version

---------

Co-authored-by: Artem Chystiakov <[email protected]>
  • Loading branch information
Hrom131 and Arvolear authored Nov 1, 2024
1 parent f9009fd commit de2ed6f
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ module.exports = {
skipFiles: [],
c: false,
json: false,
optimization: "O2",
optimization: "O1",
},
setupSettings: {
contributionSettings: {
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"distributedlab",
"solarity",
"circom",
"snarkjs",
"zk",
"zkit"
],
Expand Down
2 changes: 1 addition & 1 deletion src/config/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const defaultConfig: ZKitConfig = {
skipFiles: [],
c: false,
json: false,
optimization: undefined,
optimization: "O1",
},
setupSettings: {
contributionSettings: {
Expand Down
2 changes: 1 addition & 1 deletion src/types/zkit-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export type CompilationSettings = FileFilterSettings & {
artifactsDir: string;
c: boolean;
json: boolean;
optimization?: "O0" | "O1" | "O2";
optimization: "O0" | "O1" | "O2";
};

export type SetupSettings = FileFilterSettings & {
Expand Down
2 changes: 1 addition & 1 deletion test/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export const defaultCompileFlags: CompileFlags = {
c: false,
json: false,
O0: false,
O1: false,
O1: true,
O2: false,
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const defaultConfig: HardhatUserConfig = {
circuitsDir: "circuits",
compilationSettings: {
skipFiles: ["vendor"],
optimization: "O1",
optimization: "O2",
},
setupSettings: {
ptauDir: "zkit/ptau",
Expand Down
4 changes: 2 additions & 2 deletions test/integration/setup/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ describe("config", () => {
skipFiles: ["vendor"],
c: false,
json: false,
optimization: "O1",
optimization: "O2",
},
setupSettings: {
contributionSettings: {
Expand Down Expand Up @@ -72,7 +72,7 @@ describe("config", () => {
skipFiles: [],
c: false,
json: false,
optimization: undefined,
optimization: "O1",
},
setupSettings: {
contributionSettings: {
Expand Down

0 comments on commit de2ed6f

Please sign in to comment.