@@ -3,8 +3,7 @@ const fs = require("fs/promises");
3
3
const child_process = require ( "child_process" ) ;
4
4
const crypto = require ( "crypto" ) ;
5
5
6
- const megaHonkPatterns = require ( "../mega_honk_circuits.json" ) ;
7
- const ivcIntegrationPatterns = require ( "../ivc_integration_circuits.json" ) ;
6
+ const clientIvcPatterns = require ( "../client_ivc_circuits.json" ) ;
8
7
const {
9
8
readVKFromS3,
10
9
writeVKToS3,
@@ -33,19 +32,13 @@ async function getBytecodeHash(artifactPath) {
33
32
return crypto . createHash ( "md5" ) . update ( bytecode ) . digest ( "hex" ) ;
34
33
}
35
34
36
- async function getArtifactHash (
37
- artifactPath ,
38
- isMegaHonk ,
39
- isIvcIntegration ,
40
- isRecursive
41
- ) {
35
+ async function getArtifactHash ( artifactPath , isClientIvc , isRecursive ) {
42
36
const bytecodeHash = await getBytecodeHash ( artifactPath ) ;
43
37
const barretenbergHash = await getBarretenbergHash ( ) ;
44
38
return generateArtifactHash (
45
39
barretenbergHash ,
46
40
bytecodeHash ,
47
- isMegaHonk ,
48
- isIvcIntegration ,
41
+ isClientIvc ,
49
42
isRecursive
50
43
) ;
51
44
}
@@ -68,26 +61,19 @@ async function hasArtifactHashChanged(artifactHash, vkDataPath) {
68
61
return true ;
69
62
}
70
63
71
- function isMegaHonkCircuit ( artifactName ) {
72
- return megaHonkPatterns . some ( ( pattern ) =>
73
- artifactName . match ( new RegExp ( pattern ) )
74
- ) ;
75
- }
76
- function isIvcIntegrationCircuit ( artifactName ) {
77
- return ivcIntegrationPatterns . some ( ( pattern ) =>
64
+ function isClientIvcCircuit ( artifactName ) {
65
+ return clientIvcPatterns . some ( ( pattern ) =>
78
66
artifactName . match ( new RegExp ( pattern ) )
79
67
) ;
80
68
}
81
69
82
70
async function processArtifact ( artifactPath , artifactName , outputFolder ) {
83
- const isMegaHonk = isMegaHonkCircuit ( artifactName ) ;
84
- const isIvcIntegration = isIvcIntegrationCircuit ( artifactName ) ;
71
+ const isClientIvc = isClientIvcCircuit ( artifactName ) ;
85
72
const isRecursive = true ;
86
73
87
74
const artifactHash = await getArtifactHash (
88
75
artifactPath ,
89
- isMegaHonk ,
90
- isIvcIntegration ,
76
+ isClientIvc ,
91
77
isRecursive
92
78
) ;
93
79
@@ -106,8 +92,7 @@ async function processArtifact(artifactPath, artifactName, outputFolder) {
106
92
outputFolder ,
107
93
artifactPath ,
108
94
artifactHash ,
109
- isMegaHonk ,
110
- isIvcIntegration ,
95
+ isClientIvc ,
111
96
isRecursive
112
97
) ;
113
98
await writeVKToS3 ( artifactName , artifactHash , JSON . stringify ( vkData ) ) ;
@@ -123,14 +108,11 @@ async function generateVKData(
123
108
outputFolder ,
124
109
artifactPath ,
125
110
artifactHash ,
126
- isMegaHonk ,
127
- isIvcIntegration ,
111
+ isClientIvc ,
128
112
isRecursive
129
113
) {
130
- if ( isMegaHonk ) {
131
- console . log ( "Generating new mega honk vk for" , artifactName ) ;
132
- } else if ( isIvcIntegration ) {
133
- console . log ( "Generating new IVC vk for" , artifactName ) ;
114
+ if ( isClientIvc ) {
115
+ console . log ( "Generating new client ivc vk for" , artifactName ) ;
134
116
} else {
135
117
console . log ( "Generating new vk for" , artifactName ) ;
136
118
}
@@ -142,8 +124,7 @@ async function generateVKData(
142
124
const jsonVkPath = vkJsonFileNameForArtifactName ( outputFolder , artifactName ) ;
143
125
144
126
function getVkCommand ( ) {
145
- if ( isMegaHonk ) return "write_vk_mega_honk" ;
146
- if ( isIvcIntegration ) return "write_vk_for_ivc" ;
127
+ if ( isClientIvc ) return "write_vk_for_ivc" ;
147
128
return "write_vk_ultra_honk" ;
148
129
}
149
130
@@ -154,9 +135,7 @@ async function generateVKData(
154
135
console . log ( "WRITE VK CMD: " , writeVkCommand ) ;
155
136
156
137
const vkAsFieldsCommand = `${ BB_BIN_PATH } ${
157
- isMegaHonk || isIvcIntegration
158
- ? "vk_as_fields_mega_honk"
159
- : "vk_as_fields_ultra_honk"
138
+ isClientIvc ? "vk_as_fields_mega_honk" : "vk_as_fields_ultra_honk"
160
139
} -k "${ binaryVkPath } " -o "${ jsonVkPath } "`;
161
140
162
141
await new Promise ( ( resolve , reject ) => {
0 commit comments