-
For the instrumentation of zkASM that was generated from WASM we would like to rely on custom helpers in the following way. Helper definitionclass MyHelper {
// Initiates internal state.
constructor(config) {
this.config = config;
this.counter = 0;
}
setup() {
// zkevm-proverjs throws an error if the helper Object doesn't have this function.
}
eval_increaseMyHelperCounter() {
// Modifies internal state.
this.counter += 1;
}
eval_writeMyHelperData() {
// Writes internal state to a file.
}
} Helper usage// Passing it to zkevm-proverjs as part of config:
let config = {
// ...
helpers: [
new MyHelper(someConfig),
]
}
Questions
|
Beta Was this translation helpful? Give feedback.
Answered by
krlosMata
Feb 2, 2024
Replies: 1 comment 1 reply
-
Comments
1
2
|
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
mooori
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Comments
setup()
function load some standard functions into the helper class, functions commonly used in helpers classsetup()
standard function --> https://github.com/0xPolygonHermez/zkevm-proverjs/blob/develop/src/sm/sm_main/helpers/helpers.js#L61
main_executor
: https://github.com/0xPolygonHermez/zkevm-proverjs/blob/develop/src/sm/sm_main/helpers/helpers.js