certora-cli-beta-mirror 7.29.0__py3-none-any.whl → 7.29.2__py3-none-any.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.
@@ -16,7 +16,7 @@
16
16
  import glob
17
17
  import shutil
18
18
  from pathlib import Path
19
- from typing import Set, List
19
+ from typing import Set
20
20
 
21
21
  from CertoraProver.certoraBuild import build_source_tree
22
22
  from CertoraProver.certoraContextClass import CertoraContext
@@ -25,42 +25,9 @@ import CertoraProver.certoraContextAttributes as Attrs
25
25
  from Shared import certoraUtils as Util
26
26
 
27
27
 
28
- def build_rust_app(context: CertoraContext) -> None:
29
- build_command: List[str] = []
30
- feature_flag = None
31
- if context.build_script:
32
- build_command = [context.build_script]
33
- feature_flag = '--cargo_features'
34
-
35
- elif not context.files:
36
- build_command = ["cargo", "certora-sbf"]
37
- feature_flag = '--features'
38
- if context.cargo_tools_version:
39
- build_command.append("--tools-version")
40
- build_command.append(context.cargo_tools_version)
41
-
42
- if build_command:
43
- if context.cargo_features is not None:
44
- build_command.extend([feature_flag] + context.cargo_features)
45
-
46
- build_command.extend(['--json', '-l'])
47
-
48
- if context.test == str(Util.TestValue.SOLANA_BUILD_CMD):
49
- raise Util.TestResultsReady(build_command)
50
-
51
- run_rust_build(context, build_command)
52
-
53
- else:
54
- if not context.files:
55
- raise Util.CertoraUserInputError("'files' or 'build_script' must be set for Rust projects")
56
- if len(context.files) > 1:
57
- raise Util.CertoraUserInputError("Rust projects must specify exactly one executable in 'files'.")
58
-
59
- try:
60
- Util.get_certora_sources_dir().mkdir(parents=True, exist_ok=True)
61
- shutil.copy(Util.get_last_conf_file(), Util.get_certora_sources_dir() / Util.LAST_CONF_FILE)
62
- except Exception as e:
63
- raise Util.CertoraUserInputError(f"Collecting build files failed with the exception: {e}")
28
+ def set_rust_build_directory(context: CertoraContext) -> None:
29
+ if not context.files:
30
+ build_rust_app(context)
64
31
 
65
32
  copy_files_to_build_dir(context)
66
33
 
@@ -74,6 +41,25 @@ def build_rust_app(context: CertoraContext) -> None:
74
41
  except Exception as e:
75
42
  raise Util.CertoraUserInputError(f"Collecting build files failed with the exception: {e}")
76
43
 
44
+ def build_rust_app(context: CertoraContext) -> None:
45
+ assert not context.files, "build_rust_app: expecting files to be empty"
46
+ if context.build_script:
47
+ build_command = [context.build_script, '--json', '-l']
48
+ feature_flag = '--cargo_features'
49
+ else: # cargo
50
+ build_command = ["cargo", "certora-sbf", '--json']
51
+ feature_flag = '--features'
52
+ if context.cargo_tools_version:
53
+ build_command.extend(["--tools-version", context.cargo_tools_version])
54
+
55
+ if context.cargo_features is not None:
56
+ build_command.append(feature_flag)
57
+ build_command.extend(context.cargo_features)
58
+
59
+ if context.test == str(Util.TestValue.SOLANA_BUILD_CMD):
60
+ raise Util.TestResultsReady(build_command)
61
+
62
+ run_rust_build(context, build_command)
77
63
 
78
64
  def add_solana_files_from_prover_args(context: CertoraContext) -> None:
79
65
  if context.prover_args:
@@ -134,7 +120,7 @@ def collect_files_from_rust_sources(context: CertoraContext, sources: Set[Path])
134
120
  sources.add(file_path)
135
121
 
136
122
  sources.add(project_directory.absolute())
137
- if Path(context.build_script).exists():
123
+ if context.build_script:
138
124
  sources.add(Path(context.build_script).resolve())
139
125
  if getattr(context, 'conf_file', None) and Path(context.conf_file).exists():
140
126
  sources.add(Path(context.conf_file).absolute())
@@ -70,6 +70,16 @@ Response = requests.models.Response
70
70
 
71
71
  FEATURES_REPORT_FILE = Path("featuresReport.json")
72
72
 
73
+ class EcoEnum(Util.NoValEnum):
74
+ EVM = Util.auto()
75
+ SOROBAN = Util.auto()
76
+ SOLANA = Util.auto()
77
+
78
+ class ProductEnum(Util.NoValEnum):
79
+ PROVER = Util.auto()
80
+ RANGER = Util.auto()
81
+ SOPHY = Util.auto()
82
+
73
83
 
74
84
  class TimeError(Exception):
75
85
  """A custom exception used to report on time elapsed errors"""
@@ -631,6 +641,20 @@ class CloudVerification:
631
641
 
632
642
  auth_data["useLatestFe"] = self.context.fe_version == str(Util.FeValue.LATEST)
633
643
 
644
+ if Attrs.is_solana_app():
645
+ auth_data["ecosystem"] = EcoEnum.SOLANA.name
646
+ elif Attrs.is_soroban_app():
647
+ auth_data["ecosystem"] = EcoEnum.SOROBAN.name
648
+ else:
649
+ auth_data["ecosystem"] = EcoEnum.EVM.name
650
+
651
+ if Attrs.is_ranger_app():
652
+ auth_data["product"] = ProductEnum.RANGER.name
653
+ elif Attrs.is_sophy_app():
654
+ auth_data["product"] = ProductEnum.SOPHY.name
655
+ else:
656
+ auth_data["product"] = ProductEnum.PROVER.name
657
+
634
658
  if Attrs.is_evm_app() and self.context.cache is not None:
635
659
  auth_data["toolSceneCacheKey"] = self.context.cache
636
660
 
@@ -121,7 +121,9 @@ def get_local_run_cmd(context: CertoraContext) -> List[str]:
121
121
  run_args = []
122
122
 
123
123
  if Attrs.is_rust_app():
124
- run_args.append(Path(context.files[0]).name)
124
+ # For local runs, we want path to be relative to cwd instead of zip root.
125
+ rust_rel_path = os.path.relpath(Path(context.files[0]), os.getcwd())
126
+ run_args.append(rust_rel_path)
125
127
  elif context.is_tac:
126
128
  # For Rust app we assume the files holds the executable for the prover, currently we support a single file
127
129
  try:
@@ -276,6 +278,8 @@ def get_args(args_list: Optional[List[str]] = None) -> CertoraContext:
276
278
  if Attrs.is_evm_app():
277
279
  validator.check_args_post_argparse()
278
280
  setup_cache(context) # Here context.cache, context.user_defined_cache are set
281
+ if Attrs.is_rust_app():
282
+ validator.check_rust_args_post_argparse()
279
283
 
280
284
  attrs_to_relative(context)
281
285
  # Setup defaults (defaults are not recorded in conf file)
@@ -1854,3 +1854,6 @@ def is_evm_app() -> bool:
1854
1854
 
1855
1855
  def is_ranger_app() -> bool:
1856
1856
  return get_attribute_class() == RangerAttributes
1857
+
1858
+ def is_sophy_app() -> bool:
1859
+ return False # wait for the tool to be added
@@ -154,6 +154,14 @@ class CertoraContextValidator:
154
154
  elif value not in [True, False]:
155
155
  raise Util.CertoraUserInputError(f"value of {conf_key} {value} is not a boolean (true/false)")
156
156
 
157
+ def check_rust_args_post_argparse(self) -> None:
158
+ context = self.context
159
+ if context.files:
160
+ if context.build_script:
161
+ raise Util.CertoraUserInputError("'files' and 'build_script' cannot be both set for Rust projects")
162
+ if len(context.files) > 1:
163
+ raise Util.CertoraUserInputError("Rust projects must specify exactly one executable in 'files'.")
164
+
157
165
  def check_args_post_argparse(self) -> None:
158
166
  """
159
167
  Performs checks over the arguments after basic argparse parsing
certora_cli/certoraRun.py CHANGED
@@ -32,7 +32,7 @@ from CertoraProver.certoraCollectRunMetadata import collect_run_metadata
32
32
  from CertoraProver.certoraCollectConfigurationLayout import collect_configuration_layout
33
33
  from Shared.certoraLogging import LoggingManager
34
34
  from CertoraProver.certoraBuild import build
35
- from CertoraProver.certoraBuildRust import build_rust_app
35
+ from CertoraProver.certoraBuildRust import set_rust_build_directory
36
36
  import CertoraProver.certoraContext as Ctx
37
37
 
38
38
  from CertoraProver import certoraContextValidator as Cv
@@ -132,7 +132,7 @@ def run_certora(args: List[str], attrs_class: Optional[Type[AttrUtil.Attributes]
132
132
  raise Util.ExitException("Split rules failed", exit_code)
133
133
 
134
134
  if Attrs.is_rust_app():
135
- build_rust_app(context)
135
+ set_rust_build_directory(context)
136
136
 
137
137
  if context.local:
138
138
  check_cmd = Ctx.get_local_run_cmd(context)
@@ -35,7 +35,7 @@ from CertoraProver import certoraContextValidator as Cv
35
35
 
36
36
  import CertoraProver.certoraContext as Ctx
37
37
  import CertoraProver.certoraContextAttributes as Attrs
38
- from CertoraProver.certoraBuildRust import build_rust_app
38
+ from CertoraProver.certoraBuildRust import set_rust_build_directory
39
39
 
40
40
  from certoraRun import CertoraRunResult, VIOLATIONS_EXIT_CODE, CertoraFoundViolations
41
41
 
@@ -104,7 +104,7 @@ def run_solana_prover(args: List[str]) -> Optional[CertoraRunResult]:
104
104
  run_logger.debug("Build Solana target")
105
105
  build_start = time.perf_counter()
106
106
 
107
- build_rust_app(context)
107
+ set_rust_build_directory(context)
108
108
  build_end = time.perf_counter()
109
109
  timings["buildTime"] = round(build_end - build_start, 4)
110
110
  if context.test == str(Util.TestValue.AFTER_BUILD):
@@ -34,7 +34,7 @@ from CertoraProver import certoraContextValidator as Cv
34
34
  from CertoraProver.certoraContextClass import CertoraContext
35
35
  from CertoraProver.certoraCollectRunMetadata import collect_run_metadata
36
36
  from CertoraProver.certoraCollectConfigurationLayout import collect_configuration_layout
37
- from CertoraProver.certoraBuildRust import build_rust_app
37
+ from CertoraProver.certoraBuildRust import set_rust_build_directory
38
38
  from CertoraProver.certoraCloudIO import CloudVerification, validate_version_and_branch
39
39
  from certoraRun import CertoraRunResult, VIOLATIONS_EXIT_CODE, CertoraFoundViolations
40
40
 
@@ -132,7 +132,7 @@ def build_project(context: CertoraContext) -> Dict:
132
132
  run_logger.debug("Build Soroban target")
133
133
 
134
134
  build_start = time.perf_counter()
135
- build_rust_app(context)
135
+ set_rust_build_directory(context)
136
136
  build_end = time.perf_counter()
137
137
 
138
138
  timings["buildTime"] = round(build_end - build_start, 4)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: certora-cli-beta-mirror
3
- Version: 7.29.0
3
+ Version: 7.29.2
4
4
  Summary: Runner for the Certora Prover
5
5
  Home-page: https://pypi.org/project/certora-cli-beta-mirror
6
6
  Author: Certora
@@ -37,4 +37,4 @@ Dynamic: requires-dist
37
37
  Dynamic: requires-python
38
38
  Dynamic: summary
39
39
 
40
- Commit 3f35845. Build and Run scripts for executing the Certora Prover on Solidity smart contracts.
40
+ Commit 58a3aa6. Build and Run scripts for executing the Certora Prover on Solidity smart contracts.
@@ -4,24 +4,24 @@ certora_cli/certoraEVMProver.py,sha256=12qxurzLtv0sS0NbHYY8yVlE0C7hvXRep2UyA0rCX
4
4
  certora_cli/certoraEqCheck.py,sha256=qfZq7bpU1kbAIezC66W61VfKNZz7Uywg2Ygup62qYeo,1069
5
5
  certora_cli/certoraMutate.py,sha256=XhFHyNVP_sk-3XkY6AAV5fVliEFAVRq-JeDGsqE5IQQ,3333
6
6
  certora_cli/certoraRanger.py,sha256=dJ49hGmHkED9-3wRw14Z8qPWeCP4DYPJAqPQKi52N1U,2302
7
- certora_cli/certoraRun.py,sha256=IGAYmf-KiM0TJuVQQ6-KaZQQBFe0aJGnso9MpPXHL0Q,13981
8
- certora_cli/certoraSolanaProver.py,sha256=UjXcnauGwJLY9pdqnjwrq26kOtAJT_qIHRVFVuOxAf0,7803
9
- certora_cli/certoraSorobanProver.py,sha256=4PW4CxWNDArjIH3FDriFwC7ZJv0BKpeBjGuGJxtCy74,9608
7
+ certora_cli/certoraRun.py,sha256=TTmV_WcWF2LG-7Rg9LC23HZDRwve4reHkd67o9pvJh8,14001
8
+ certora_cli/certoraSolanaProver.py,sha256=zGDAnSED8CoAkQN6wtPcbK_nIJMVt72VB_AqiOy_XJg,7823
9
+ certora_cli/certoraSorobanProver.py,sha256=jop6hkRyOLYYWJsnuGK_OHsyt6V_SaPmC5y02Y4CLpo,9628
10
10
  certora_cli/rustMutator.py,sha256=6AvOGU8Ijz89zW_ZJCWlfXkeobJsk7EsqZhK7Eqwn-Y,14544
11
11
  certora_cli/CertoraProver/__init__.py,sha256=QHNr-PJQAoyuPgTkO7gg23GRchiWSXglWNG7yLSQZvs,849
12
12
  certora_cli/CertoraProver/certoraBuild.py,sha256=JRZ4CrEhSPmNZTTw_vcL_kcJijKTaaB0MHj9RXBHEyM,206914
13
13
  certora_cli/CertoraProver/certoraBuildCacheManager.py,sha256=dzXC8A-V9gr1GGsPYglQLlFLoR2Tk4dTJuMHaxXBfgw,13257
14
14
  certora_cli/CertoraProver/certoraBuildDataClasses.py,sha256=8tPny9-pasC7CCRKQclaVQ3qcEDNa6EdOUu1ZWh0MZY,14704
15
- certora_cli/CertoraProver/certoraBuildRust.py,sha256=aX2P19P3htb_-X0-CuZjjYdAd3m7UVxwFxg5r6iS2-k,6518
16
- certora_cli/CertoraProver/certoraCloudIO.py,sha256=FIwM6SO-f4HbWj78Z9kcVMQw0N98XhbBiOiexSWN8aw,53250
15
+ certora_cli/CertoraProver/certoraBuildRust.py,sha256=l81mZHGOhfSL8jme6I_O_aAiu3wxdHAg-jPEFQvFFdg,5936
16
+ certora_cli/CertoraProver/certoraCloudIO.py,sha256=oYhNAcyhQa97_5OrpFsewcD6sksoKD8aJz_Iw1-ihg8,53980
17
17
  certora_cli/CertoraProver/certoraCollectConfigurationLayout.py,sha256=waMo5_nzirDaK7aoPCfoS7jOqqi_6huRc-_jTrDcZO8,14252
18
18
  certora_cli/CertoraProver/certoraCollectRunMetadata.py,sha256=n67E7hjVdPlBXMh1FMzcWSgu3v5SfFM_HOO2JpbCeY0,11787
19
19
  certora_cli/CertoraProver/certoraCompilerParameters.py,sha256=r35y03IRwWIoz1GCNC7PuW3n8JPz9J1NGwhwUYKdYtI,1452
20
20
  certora_cli/CertoraProver/certoraConfigIO.py,sha256=H3ebbIBO8xXTf8ArBPnZV1TmDBExQVDF2zc9Yu1v0Xo,7493
21
- certora_cli/CertoraProver/certoraContext.py,sha256=trrOxYutHtSqg3ePwHecRBs3_derI5jPcNCWP_Ucm5I,25598
22
- certora_cli/CertoraProver/certoraContextAttributes.py,sha256=NKFbn9hgEQvZig2rgsfbvE-ppsYJHwHYUrkMZKpuGcI,67763
21
+ certora_cli/CertoraProver/certoraContext.py,sha256=0AihMYuUAGHWjbiSOMiDM6FVW5OyvEAxE51GPnMxSKg,25821
22
+ certora_cli/CertoraProver/certoraContextAttributes.py,sha256=9BY24VkDhZd6kB2mDibzi78LGznAQTRJlAVIOyAP9Rs,67842
23
23
  certora_cli/CertoraProver/certoraContextClass.py,sha256=d7HDqM72K7YnswR7kEcAHGwkFNrTqRz5-_0m7cl2Mso,900
24
- certora_cli/CertoraProver/certoraContextValidator.py,sha256=3y8SGRJko0LW-D8HlWygcSSH6uyBKwwGY_jo8-puN_Q,46075
24
+ certora_cli/CertoraProver/certoraContextValidator.py,sha256=iSB2byuHmi1G4xG-ViVvBrZv7e1mdxPmlWdV3AaN_l4,46492
25
25
  certora_cli/CertoraProver/certoraContractFuncs.py,sha256=ipSwge5QQzp8qhUavY44bZ-eCR6szK_HWwSIWqQyuR0,6921
26
26
  certora_cli/CertoraProver/certoraExtensionInfo.py,sha256=YlShzdoqJQgXXj3r0TJ3fir1KntIR99Rk8JN5qii2lk,2026
27
27
  certora_cli/CertoraProver/certoraJobList.py,sha256=FBIYgJ60I0Ok7vchfTbcuJJbiXgnfAhrONoVeZoHti4,11464
@@ -60,12 +60,12 @@ certora_cli/Shared/certoraAttrUtil.py,sha256=ZsoS6xbSZnAjEoPEcfiJi6CvHU-1ySBKubv
60
60
  certora_cli/Shared/certoraLogging.py,sha256=cV2UQMhQ5j8crGXgeq9CEamI-Lk4HgdiA3HCrP-kSR4,14013
61
61
  certora_cli/Shared/certoraUtils.py,sha256=khp1BAlpW0WwMq92u887R05nPDqWAnLkY1kVk2ZT0Ek,55147
62
62
  certora_cli/Shared/certoraValidateFuncs.py,sha256=WG4UiyES8u49o3XmuRIvNf79rcpWFuCKtV__QUptOEQ,41852
63
- certora_jars/CERTORA-CLI-VERSION-METADATA.json,sha256=zvqXLfv-KL122-QtVCLQiMEsMynQdGQA-zYMeHDSptY,146
64
- certora_jars/Typechecker.jar,sha256=sfV9EGc2AevkWfAopmcelJvbhtazZWYF52JmbmZ8r_Y,16968728
63
+ certora_jars/CERTORA-CLI-VERSION-METADATA.json,sha256=Za6_27u1jrs62Skw_0bMZuvbB-ENszuOemxpampg4T8,146
64
+ certora_jars/Typechecker.jar,sha256=LUqp9Z4alP8lgXwoIbRIYSiQKsmvvFhw8ggSnZ7OaXg,17135545
65
65
  certora_jars/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
66
- certora_cli_beta_mirror-7.29.0.dist-info/LICENSE,sha256=UGKSKIJSetF8m906JLKqNLkUS2CL60XfQdNvxBvpQXo,620
67
- certora_cli_beta_mirror-7.29.0.dist-info/METADATA,sha256=31Q-oxltoa2dRPa1cORu6majmrBk6w4GJjj-R7myGCk,1231
68
- certora_cli_beta_mirror-7.29.0.dist-info/WHEEL,sha256=jB7zZ3N9hIM9adW7qlTAyycLYW9npaWKLRzaoVcLKcM,91
69
- certora_cli_beta_mirror-7.29.0.dist-info/entry_points.txt,sha256=_SQ5_uYOAJXtqEW992nIvq7blW9cWFSUVEdbMGuy--4,443
70
- certora_cli_beta_mirror-7.29.0.dist-info/top_level.txt,sha256=8C77w3JLanY0-NW45vpJsjRssyCqVP-qmPiN9FjWiX4,38
71
- certora_cli_beta_mirror-7.29.0.dist-info/RECORD,,
66
+ certora_cli_beta_mirror-7.29.2.dist-info/LICENSE,sha256=UGKSKIJSetF8m906JLKqNLkUS2CL60XfQdNvxBvpQXo,620
67
+ certora_cli_beta_mirror-7.29.2.dist-info/METADATA,sha256=8eIHY-6Cz4piLlIQCinubwBx-4EqnQ87mJ4ghJAasAQ,1231
68
+ certora_cli_beta_mirror-7.29.2.dist-info/WHEEL,sha256=jB7zZ3N9hIM9adW7qlTAyycLYW9npaWKLRzaoVcLKcM,91
69
+ certora_cli_beta_mirror-7.29.2.dist-info/entry_points.txt,sha256=_SQ5_uYOAJXtqEW992nIvq7blW9cWFSUVEdbMGuy--4,443
70
+ certora_cli_beta_mirror-7.29.2.dist-info/top_level.txt,sha256=8C77w3JLanY0-NW45vpJsjRssyCqVP-qmPiN9FjWiX4,38
71
+ certora_cli_beta_mirror-7.29.2.dist-info/RECORD,,
@@ -1 +1 @@
1
- {"name": "certora-cli-beta-mirror", "tag": "7.29.0", "branch": "", "commit": "3f35845", "timestamp": "20250508.13.19.941262", "version": "7.29.0"}
1
+ {"name": "certora-cli-beta-mirror", "tag": "7.29.2", "branch": "", "commit": "58a3aa6", "timestamp": "20250603.16.56.366885", "version": "7.29.2"}
Binary file