certora-cli-beta-mirror 8.4.1__py3-none-macosx_10_9_universal2.whl → 8.4.3__py3-none-macosx_10_9_universal2.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- certora_cli/CertoraProver/certoraCloudIO.py +4 -1
- certora_cli/CertoraProver/certoraCollectRunMetadata.py +29 -0
- certora_cli/Shared/certoraUtils.py +2 -2
- certora_cli/certoraRun.py +9 -1
- certora_cli/certoraSuiProver.py +93 -0
- {certora_cli_beta_mirror-8.4.1.dist-info → certora_cli_beta_mirror-8.4.3.dist-info}/METADATA +2 -2
- {certora_cli_beta_mirror-8.4.1.dist-info → certora_cli_beta_mirror-8.4.3.dist-info}/RECORD +14 -13
- {certora_cli_beta_mirror-8.4.1.dist-info → certora_cli_beta_mirror-8.4.3.dist-info}/entry_points.txt +1 -0
- certora_jars/ASTExtraction.jar +0 -0
- certora_jars/CERTORA-CLI-VERSION-METADATA.json +1 -1
- certora_jars/Typechecker.jar +0 -0
- {certora_cli_beta_mirror-8.4.1.dist-info → certora_cli_beta_mirror-8.4.3.dist-info}/LICENSE +0 -0
- {certora_cli_beta_mirror-8.4.1.dist-info → certora_cli_beta_mirror-8.4.3.dist-info}/WHEEL +0 -0
- {certora_cli_beta_mirror-8.4.1.dist-info → certora_cli_beta_mirror-8.4.3.dist-info}/top_level.txt +0 -0
|
@@ -689,8 +689,11 @@ class CloudVerification:
|
|
|
689
689
|
auth_data["mutationTestId"] = self.context.mutation_test_id
|
|
690
690
|
return auth_data
|
|
691
691
|
|
|
692
|
+
def get_group_id_url(self) -> str:
|
|
693
|
+
return f"{self.get_domain()}/?groupIds={self.context.group_id}"
|
|
694
|
+
|
|
692
695
|
def print_group_id_url(self) -> None:
|
|
693
|
-
group_id_url =
|
|
696
|
+
group_id_url = self.get_group_id_url()
|
|
694
697
|
print(f"See all jobs generated from splitting the rules at {group_id_url}", flush=True)
|
|
695
698
|
|
|
696
699
|
def print_output_links(self) -> None:
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
15
15
|
import dataclasses
|
|
16
16
|
import json
|
|
17
|
+
import re
|
|
17
18
|
from typing import Any, Dict, List, Optional
|
|
18
19
|
import subprocess
|
|
19
20
|
from datetime import datetime, timezone
|
|
@@ -73,6 +74,7 @@ class RunMetaData:
|
|
|
73
74
|
conf_path -- the relative path form the cwd_relative to the configuration file
|
|
74
75
|
group_id -- optional identifier for grouping this run
|
|
75
76
|
java_version -- version of Java used during the run, if available
|
|
77
|
+
default_solc_version -- version of default solc version on current machine, if available
|
|
76
78
|
python_version -- version of Python running the process
|
|
77
79
|
certora_ci_client -- name of the CI client if available, derived from environment
|
|
78
80
|
timestamp -- UTC timestamp when the run metadata was generated
|
|
@@ -95,6 +97,7 @@ class RunMetaData:
|
|
|
95
97
|
self.group_id = group_id
|
|
96
98
|
self.python_version = ".".join(str(x) for x in sys.version_info[:3])
|
|
97
99
|
self.java_version = java_version
|
|
100
|
+
self.default_solc_version = get_solc_version(self.conf)
|
|
98
101
|
self.certora_ci_client = Utils.get_certora_ci_name()
|
|
99
102
|
self.timestamp = str(datetime.now(timezone.utc).timestamp())
|
|
100
103
|
_, self.CLI_package_name, self.CLI_version = Utils.get_package_and_version()
|
|
@@ -116,6 +119,7 @@ class RunMetaData:
|
|
|
116
119
|
f" group_id: {self.group_id}\n"
|
|
117
120
|
f" python_version: {self.python_version}\n"
|
|
118
121
|
f" java_version: {self.java_version}\n"
|
|
122
|
+
f" default_solc_version: {self.default_solc_version}\n"
|
|
119
123
|
f" CertoraCI client: {self.certora_ci_client}\n"
|
|
120
124
|
f" jar_flag_info: {self.jar_flag_info}\n"
|
|
121
125
|
)
|
|
@@ -279,3 +283,28 @@ def collect_run_metadata(wd: Path, raw_args: List[str], context: CertoraContext)
|
|
|
279
283
|
conf_path=conf_path,
|
|
280
284
|
group_id=context.group_id,
|
|
281
285
|
java_version=context.java_version)
|
|
286
|
+
|
|
287
|
+
|
|
288
|
+
def get_solc_version(conf: Dict[str, Any]) -> Optional[str]:
|
|
289
|
+
if conf.get('solc') or conf.get('solc_map') or conf.get('compiler_map'):
|
|
290
|
+
return None
|
|
291
|
+
|
|
292
|
+
try:
|
|
293
|
+
result = subprocess.run(
|
|
294
|
+
["solc", "--version"],
|
|
295
|
+
capture_output=True,
|
|
296
|
+
text=True,
|
|
297
|
+
check=True
|
|
298
|
+
)
|
|
299
|
+
for line in result.stdout.splitlines():
|
|
300
|
+
if line.startswith("Version:"):
|
|
301
|
+
version_matches = re.findall(r'^Version: (\d+)\.(\d+)\.(\d+)', line, re.MULTILINE)
|
|
302
|
+
if len(version_matches) != 1:
|
|
303
|
+
return None
|
|
304
|
+
match = version_matches[0]
|
|
305
|
+
return f'solc{int(match[1])}.{int(match[2])}'
|
|
306
|
+
|
|
307
|
+
except Exception as e:
|
|
308
|
+
metadata_logger.debug(f'Error while trying to fetch default solc version: {e}')
|
|
309
|
+
return None
|
|
310
|
+
return None
|
|
@@ -17,6 +17,7 @@ import csv
|
|
|
17
17
|
import json
|
|
18
18
|
import os
|
|
19
19
|
import io
|
|
20
|
+
import secrets
|
|
20
21
|
import subprocess
|
|
21
22
|
from abc import ABCMeta
|
|
22
23
|
from enum import Enum, unique, auto
|
|
@@ -40,7 +41,6 @@ sys.path.insert(0, str(scripts_dir_path))
|
|
|
40
41
|
from contextlib import contextmanager
|
|
41
42
|
from Shared.ExpectedComparator import ExpectedComparator
|
|
42
43
|
import logging
|
|
43
|
-
import random
|
|
44
44
|
import time
|
|
45
45
|
import tempfile
|
|
46
46
|
from datetime import datetime
|
|
@@ -157,7 +157,7 @@ def get_build_dir() -> Path:
|
|
|
157
157
|
|
|
158
158
|
def get_random_build_dir() -> Path:
|
|
159
159
|
for tries in range(3):
|
|
160
|
-
build_uuid = f"{datetime.now().strftime('%y_%m_%d_%H_%M_%S')}_{
|
|
160
|
+
build_uuid = f"{datetime.now().strftime('%y_%m_%d_%H_%M_%S')}_{secrets.randbelow(1_000_000):06d}{secrets.token_hex(2)}"
|
|
161
161
|
build_dir = CERTORA_INTERNAL_ROOT / Path(build_uuid)
|
|
162
162
|
if not build_dir.exists():
|
|
163
163
|
return build_dir
|
certora_cli/certoraRun.py
CHANGED
|
@@ -80,9 +80,17 @@ def run_certora(args: List[str], app: Type[App.CertoraApp] = App.EvmApp,
|
|
|
80
80
|
context.build_only = False
|
|
81
81
|
rule_handler = splitRules.SplitRulesHandler(context)
|
|
82
82
|
exit_code = rule_handler.generate_runs()
|
|
83
|
-
CloudVerification(context)
|
|
83
|
+
cv = CloudVerification(context)
|
|
84
|
+
cv.print_group_id_url()
|
|
84
85
|
if exit_code == 0:
|
|
85
86
|
print("Split rules succeeded")
|
|
87
|
+
return_value = CertoraRunResult(
|
|
88
|
+
cv.get_group_id_url(),
|
|
89
|
+
False,
|
|
90
|
+
Util.get_certora_sources_dir(),
|
|
91
|
+
cv.get_group_id_url(),
|
|
92
|
+
)
|
|
93
|
+
return handle_exit(exit_code, return_value)
|
|
86
94
|
else:
|
|
87
95
|
raise Util.ExitException("Split rules failed", exit_code)
|
|
88
96
|
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
# The Certora Prover
|
|
3
|
+
# Copyright (C) 2025 Certora Ltd.
|
|
4
|
+
#
|
|
5
|
+
# This program is free software: you can redistribute it and/or modify
|
|
6
|
+
# it under the terms of the GNU General Public License as published by
|
|
7
|
+
# the Free Software Foundation, version 3 of the License.
|
|
8
|
+
#
|
|
9
|
+
# This program is distributed in the hope that it will be useful,
|
|
10
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
12
|
+
# GNU General Public License for more details.
|
|
13
|
+
#
|
|
14
|
+
# You should have received a copy of the GNU General Public License
|
|
15
|
+
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
import sys
|
|
19
|
+
import logging
|
|
20
|
+
from pathlib import Path
|
|
21
|
+
|
|
22
|
+
scripts_dir_path = Path(__file__).parent.resolve() # containing directory
|
|
23
|
+
sys.path.insert(0, str(scripts_dir_path))
|
|
24
|
+
|
|
25
|
+
from typing import List, Optional, Dict
|
|
26
|
+
|
|
27
|
+
import CertoraProver.certoraApp as App
|
|
28
|
+
|
|
29
|
+
from CertoraProver.certoraBuildSui import build_sui_project
|
|
30
|
+
from Shared.proverCommon import (
|
|
31
|
+
build_context,
|
|
32
|
+
collect_and_dump_metadata,
|
|
33
|
+
collect_and_dump_config_layout,
|
|
34
|
+
ensure_version_compatibility,
|
|
35
|
+
run_local,
|
|
36
|
+
run_remote,
|
|
37
|
+
CertoraRunResult,
|
|
38
|
+
handle_exit,
|
|
39
|
+
catch_exits,
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
run_logger = logging.getLogger("run")
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
def run_sui_prover(args: List[str]) -> Optional[CertoraRunResult]:
|
|
46
|
+
"""
|
|
47
|
+
The main function that is responsible for the general flow of the script.
|
|
48
|
+
The general flow is:
|
|
49
|
+
1. Parse program arguments
|
|
50
|
+
2. Run the necessary steps (build/ cloud verification/ local verification)
|
|
51
|
+
"""
|
|
52
|
+
|
|
53
|
+
context, logging_manager = build_context(args, App.SuiApp)
|
|
54
|
+
timings: Dict[str, float] = {}
|
|
55
|
+
exit_code = 0 # The exit code of the script. 0 means success, any other number is an error.
|
|
56
|
+
return_value = None
|
|
57
|
+
|
|
58
|
+
# Collect and validate metadata and configuration layout
|
|
59
|
+
collect_and_dump_metadata(context)
|
|
60
|
+
collect_and_dump_config_layout(context)
|
|
61
|
+
|
|
62
|
+
# Version validation
|
|
63
|
+
ensure_version_compatibility(context)
|
|
64
|
+
|
|
65
|
+
# Build the application
|
|
66
|
+
build_sui_project(context, timings)
|
|
67
|
+
|
|
68
|
+
# Run verification if requested
|
|
69
|
+
if context.build_only:
|
|
70
|
+
return return_value
|
|
71
|
+
|
|
72
|
+
if context.local:
|
|
73
|
+
exit_code = run_local(context, timings)
|
|
74
|
+
else:
|
|
75
|
+
# Remove debug logger before running cloud verification
|
|
76
|
+
logging_manager.remove_debug_logger()
|
|
77
|
+
exit_code, return_value = run_remote(context, args, timings)
|
|
78
|
+
|
|
79
|
+
# Handle exit code
|
|
80
|
+
return handle_exit(exit_code, return_value)
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
@catch_exits
|
|
84
|
+
def entry_point() -> None:
|
|
85
|
+
"""
|
|
86
|
+
This function is the entry point of the certora_cli customer-facing package, as well as this script.
|
|
87
|
+
It is important this function gets no arguments!
|
|
88
|
+
"""
|
|
89
|
+
run_sui_prover(sys.argv[1:])
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
if __name__ == '__main__':
|
|
93
|
+
entry_point()
|
{certora_cli_beta_mirror-8.4.1.dist-info → certora_cli_beta_mirror-8.4.3.dist-info}/METADATA
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: certora-cli-beta-mirror
|
|
3
|
-
Version: 8.4.
|
|
3
|
+
Version: 8.4.3
|
|
4
4
|
Summary: Runner for the Certora Prover
|
|
5
5
|
Home-page: https://pypi.org/project/certora-cli-beta-mirror
|
|
6
6
|
Author: Certora
|
|
@@ -39,4 +39,4 @@ Dynamic: requires-dist
|
|
|
39
39
|
Dynamic: requires-python
|
|
40
40
|
Dynamic: summary
|
|
41
41
|
|
|
42
|
-
Commit
|
|
42
|
+
Commit 0d90215. Build and Run scripts for executing the Certora Prover on Solidity smart contracts.
|
|
@@ -7,9 +7,10 @@ certora_cli/certoraEVMProver.py,sha256=AH8ZeWXAs7wK6nNKFANCt6seLf9EaaFXtfpjc3xdI
|
|
|
7
7
|
certora_cli/certoraEqCheck.py,sha256=qfZq7bpU1kbAIezC66W61VfKNZz7Uywg2Ygup62qYeo,1069
|
|
8
8
|
certora_cli/certoraMutate.py,sha256=XhFHyNVP_sk-3XkY6AAV5fVliEFAVRq-JeDGsqE5IQQ,3333
|
|
9
9
|
certora_cli/certoraRanger.py,sha256=thJ4EKo-MFHklCk-7zJADZ-9SO6eCg1AFv88-QssLj0,1289
|
|
10
|
-
certora_cli/certoraRun.py,sha256=
|
|
10
|
+
certora_cli/certoraRun.py,sha256=c3ySo9attnuMdrnWxUNKLu4PgKsqgoYrUgJnL0Ej3Qs,6651
|
|
11
11
|
certora_cli/certoraSolanaProver.py,sha256=1R1YnGHCofb05GqFgpxRh3ZmHkmwMm1hPM7rfeiEu7o,3250
|
|
12
12
|
certora_cli/certoraSorobanProver.py,sha256=SYJKz5Sw-N0bJrSa1njRCE53R9_PMz7IWLhfamOjisk,2840
|
|
13
|
+
certora_cli/certoraSuiProver.py,sha256=gRs-iihB35ZSEIQ5-hJN-wLgrHZlcfmpk76Wr6vza74,2827
|
|
13
14
|
certora_cli/rustMutator.py,sha256=6AvOGU8Ijz89zW_ZJCWlfXkeobJsk7EsqZhK7Eqwn-Y,14544
|
|
14
15
|
certora_cli/CertoraProver/__init__.py,sha256=QHNr-PJQAoyuPgTkO7gg23GRchiWSXglWNG7yLSQZvs,849
|
|
15
16
|
certora_cli/CertoraProver/certoraApp.py,sha256=RKJ2Krb_CzbRUvczbdE6FhUDrFcvrR8j0JS8MNWXX7s,1469
|
|
@@ -18,9 +19,9 @@ certora_cli/CertoraProver/certoraBuildCacheManager.py,sha256=DnVd7w92xjmg0DIrMgo
|
|
|
18
19
|
certora_cli/CertoraProver/certoraBuildDataClasses.py,sha256=hO0w3YK9V9gZsTbh4gxxlnEAaOiubUwfzNEw6uL1HaE,14841
|
|
19
20
|
certora_cli/CertoraProver/certoraBuildRust.py,sha256=ZPbNp4ttRmzcKhFsgHSiHDRExNPaLOzgxTRqu23o1D0,6061
|
|
20
21
|
certora_cli/CertoraProver/certoraBuildSui.py,sha256=zMXD2XnC4oqRDzPcBvSZmVquL3UG5paBZkfUT3JPbYY,4180
|
|
21
|
-
certora_cli/CertoraProver/certoraCloudIO.py,sha256=
|
|
22
|
+
certora_cli/CertoraProver/certoraCloudIO.py,sha256=ElRVD-c69aSURtgobuxbEfg6rPzQDSTqtTZJmeT_SYU,54430
|
|
22
23
|
certora_cli/CertoraProver/certoraCollectConfigurationLayout.py,sha256=Rln6LsqMp-u0H2fAFulTLAn7GW-j3ox2XZSz0ghdjk0,14116
|
|
23
|
-
certora_cli/CertoraProver/certoraCollectRunMetadata.py,sha256=
|
|
24
|
+
certora_cli/CertoraProver/certoraCollectRunMetadata.py,sha256=SonKgq2l6_8o6xySbinEinEd32Ufrk3VB0Roq-CmwoM,13718
|
|
24
25
|
certora_cli/CertoraProver/certoraCompilerParameters.py,sha256=r35y03IRwWIoz1GCNC7PuW3n8JPz9J1NGwhwUYKdYtI,1452
|
|
25
26
|
certora_cli/CertoraProver/certoraConfigIO.py,sha256=-1EhJYsiheYvyCgOOWrRCQBjqtqNXrpMKJYRq5cKJ0Y,8171
|
|
26
27
|
certora_cli/CertoraProver/certoraContext.py,sha256=bBbLPet5si6jFEdL1TBORN-HCiJGQK7hD6OQZ_ODmFY,28878
|
|
@@ -65,16 +66,16 @@ certora_cli/Shared/ExpectedComparator.py,sha256=eyRR-jni4WJoa6j2TK2lnZ89Tyb8U99w
|
|
|
65
66
|
certora_cli/Shared/__init__.py,sha256=s0dhvolFtsS4sRNzPVhC_rlw8mm194rCZ0WhOxInY40,1025
|
|
66
67
|
certora_cli/Shared/certoraAttrUtil.py,sha256=Nw8ban5Axp6c6dT-KJfCD9i9tKnGk1DbvRDDNH3--DU,8574
|
|
67
68
|
certora_cli/Shared/certoraLogging.py,sha256=cV2UQMhQ5j8crGXgeq9CEamI-Lk4HgdiA3HCrP-kSR4,14013
|
|
68
|
-
certora_cli/Shared/certoraUtils.py,sha256=
|
|
69
|
+
certora_cli/Shared/certoraUtils.py,sha256=OM_dwh9-j6EbWL6bRJ7JR53aSBr8EqsTL1JeCfsx7pc,59472
|
|
69
70
|
certora_cli/Shared/certoraValidateFuncs.py,sha256=mYguICGfUwVZ9qPBFajss1xqHPDR-KRtskgERLum4AM,43225
|
|
70
71
|
certora_cli/Shared/proverCommon.py,sha256=DUB-uEKjOkZ-8qil6xukPqfTynpigXW-gcrm0_kRUZY,11383
|
|
71
|
-
certora_jars/ASTExtraction.jar,sha256=
|
|
72
|
-
certora_jars/CERTORA-CLI-VERSION-METADATA.json,sha256=
|
|
73
|
-
certora_jars/Typechecker.jar,sha256=
|
|
72
|
+
certora_jars/ASTExtraction.jar,sha256=G0r0_sl2Y_OTzYUxgIAC3kHfoUEf1nxXwK_FOBkL6kg,20972855
|
|
73
|
+
certora_jars/CERTORA-CLI-VERSION-METADATA.json,sha256=9LbOn2ZL18lmcgKVKT4VDx8NqLPXFXqclA-Nni0SBrs,143
|
|
74
|
+
certora_jars/Typechecker.jar,sha256=5eqOpUOYmnU2Y-5ib15wp2ULAYpOuCJiD5pEQWwzLmI,20935014
|
|
74
75
|
certora_jars/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
75
|
-
certora_cli_beta_mirror-8.4.
|
|
76
|
-
certora_cli_beta_mirror-8.4.
|
|
77
|
-
certora_cli_beta_mirror-8.4.
|
|
78
|
-
certora_cli_beta_mirror-8.4.
|
|
79
|
-
certora_cli_beta_mirror-8.4.
|
|
80
|
-
certora_cli_beta_mirror-8.4.
|
|
76
|
+
certora_cli_beta_mirror-8.4.3.dist-info/LICENSE,sha256=UGKSKIJSetF8m906JLKqNLkUS2CL60XfQdNvxBvpQXo,620
|
|
77
|
+
certora_cli_beta_mirror-8.4.3.dist-info/METADATA,sha256=3aYkCI6UBQeA8C92Zx5TQpHBcLOCUAfo5xKwoLybK7w,1286
|
|
78
|
+
certora_cli_beta_mirror-8.4.3.dist-info/WHEEL,sha256=9Ig2YBzm5cpS_YWKLeuYxVAxcKv_uDQsCzy9XJbRZ_g,110
|
|
79
|
+
certora_cli_beta_mirror-8.4.3.dist-info/entry_points.txt,sha256=YXGQmR4tGdYD9lLdG_TEJkmVNrRauCtCDE88HwvO2Jo,569
|
|
80
|
+
certora_cli_beta_mirror-8.4.3.dist-info/top_level.txt,sha256=8C77w3JLanY0-NW45vpJsjRssyCqVP-qmPiN9FjWiX4,38
|
|
81
|
+
certora_cli_beta_mirror-8.4.3.dist-info/RECORD,,
|
{certora_cli_beta_mirror-8.4.1.dist-info → certora_cli_beta_mirror-8.4.3.dist-info}/entry_points.txt
RENAMED
|
@@ -7,3 +7,4 @@ certoraRanger = certora_cli.certoraRanger:entry_point
|
|
|
7
7
|
certoraRun = certora_cli.certoraRun:entry_point
|
|
8
8
|
certoraSolanaProver = certora_cli.certoraSolanaProver:entry_point
|
|
9
9
|
certoraSorobanProver = certora_cli.certoraSorobanProver:entry_point
|
|
10
|
+
certoraSuiProver = certora_cli.certoraSuiProver:entry_point
|
certora_jars/ASTExtraction.jar
CHANGED
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name": "certora-cli-beta-mirror", "tag": "8.4.
|
|
1
|
+
{"name": "certora-cli-beta-mirror", "tag": "8.4.3", "branch": "", "commit": "0d90215", "timestamp": "20251030.12.0.379579", "version": "8.4.3"}
|
certora_jars/Typechecker.jar
CHANGED
|
Binary file
|
|
File without changes
|
|
File without changes
|
{certora_cli_beta_mirror-8.4.1.dist-info → certora_cli_beta_mirror-8.4.3.dist-info}/top_level.txt
RENAMED
|
File without changes
|