|
224 | 224 |
|
225 | 225 | (defproperty precompile-processing---common---address-recovery-success-shorthands-sanity-checks |
226 | 226 | (if-not-zero (precompile-processing---common---precondition) |
227 | | - (begin |
228 | | - (is-binary (precompile-processing---common---address-recovery-failure)) |
229 | | - (is-binary (precompile-processing---common---address-recovery-success)) |
230 | | - (eq! (precompile-processing---common---OOB-hub-success) |
231 | | - (+ (precompile-processing---common---address-recovery-failure) |
232 | | - (precompile-processing---common---address-recovery-success) |
233 | | - ))))) |
| 227 | + (if-not-zero scenario/PRC_ECRECOVER |
| 228 | + (begin |
| 229 | + (is-binary (precompile-processing---common---address-recovery-failure)) |
| 230 | + (is-binary (precompile-processing---common---address-recovery-success)) |
| 231 | + (eq! (precompile-processing---common---OOB-hub-success) |
| 232 | + (+ (precompile-processing---common---address-recovery-failure) |
| 233 | + (precompile-processing---common---address-recovery-success) |
| 234 | + )))))) |
234 | 235 |
|
235 | 236 |
|
236 | 237 | ;;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~;; |
|
247 | 248 | ;; ECADD, ECMUL, ECPAIRING and BLS related shorthands sanity checks ;; |
248 | 249 | ;;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~;; |
249 | 250 |
|
| 251 | +(defun (common-precompiles-where-wellformed-and-malformed-data-matters) (+ scenario/PRC_ECADD |
| 252 | + scenario/PRC_ECMUL |
| 253 | + scenario/PRC_ECPAIRING |
| 254 | + (scenario-shorthand---PRC---common-BLS-address-bit-sum) |
| 255 | + )) |
| 256 | + |
| 257 | + |
250 | 258 | (defproperty precompile-processing---common---well-and-mal-formed-data-shorthands-sanity-checks |
251 | 259 | (if-not-zero (precompile-processing---common---precondition) |
252 | | - (begin |
253 | | - (is-binary (precompile-processing---common---malformed-data)) |
254 | | - (is-binary (precompile-processing---common---wellformed-data)) |
255 | | - (eq! (precompile-processing---common---OOB-hub-success) |
256 | | - (+ (precompile-processing---common---malformed-data) |
257 | | - (precompile-processing---common---wellformed-data) |
258 | | - ))))) |
| 260 | + (if-not-zero (common-precompiles-where-wellformed-and-malformed-data-matters) |
| 261 | + (begin |
| 262 | + (is-binary (precompile-processing---common---malformed-data)) |
| 263 | + (is-binary (precompile-processing---common---wellformed-data)) |
| 264 | + (eq! (precompile-processing---common---OOB-hub-success) |
| 265 | + (+ (precompile-processing---common---malformed-data) |
| 266 | + (precompile-processing---common---wellformed-data) |
| 267 | + )))))) |
259 | 268 |
|
260 | 269 | ;;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~;; |
261 | 270 | ;; P256_VERIFY related shorthands ;; |
|
277 | 286 |
|
278 | 287 | (defproperty precompile-processing---common---signature-verification-success-shorthands-sanity-checks |
279 | 288 | (if-not-zero (precompile-processing---common---precondition) |
280 | | - (begin |
281 | | - (is-binary (precompile-processing---common---p256-sufficient-gas-wrong-cds)) |
282 | | - (is-binary (precompile-processing---common---p256-sig-verification-failure)) |
283 | | - (is-binary (precompile-processing---common---p256-sig-verification-success)) |
284 | | - (eq! (precompile-processing---common---OOB-hub-success) |
285 | | - (+ (precompile-processing---common---p256-sufficient-gas-wrong-cds) |
286 | | - (precompile-processing---common---p256-sig-verification-failure) |
287 | | - (precompile-processing---common---p256-sig-verification-success) |
288 | | - ))))) |
| 289 | + (if-not-zero scenario/PRC_P256_VERIFY |
| 290 | + (begin |
| 291 | + (is-binary (precompile-processing---common---p256-sufficient-gas-wrong-cds)) |
| 292 | + (is-binary (precompile-processing---common---p256-sig-verification-failure)) |
| 293 | + (is-binary (precompile-processing---common---p256-sig-verification-success)) |
| 294 | + (eq! (precompile-processing---common---OOB-hub-success) |
| 295 | + (+ (precompile-processing---common---p256-sufficient-gas-wrong-cds) |
| 296 | + (precompile-processing---common---p256-sig-verification-failure) |
| 297 | + (precompile-processing---common---p256-sig-verification-success) |
| 298 | + )))))) |
289 | 299 |
|
290 | 300 |
|
291 | 301 |
|
|
0 commit comments