certora-cli-alpha-master 20241219.14.2.692388__py3-none-any.whl → 20241219.17.27.526466__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- certora_cli/EVMVerifier/certoraContext.py +10 -4
- certora_cli/EVMVerifier/certoraContextAttributes.py +8 -9
- certora_cli/EVMVerifier/certoraContextValidator.py +6 -3
- certora_cli/EVMVerifier/certoraParseBuildScript.py +5 -5
- certora_cli/Shared/certoraUtils.py +2 -1
- {certora_cli_alpha_master-20241219.14.2.692388.dist-info → certora_cli_alpha_master-20241219.17.27.526466.dist-info}/METADATA +2 -2
- {certora_cli_alpha_master-20241219.14.2.692388.dist-info → certora_cli_alpha_master-20241219.17.27.526466.dist-info}/RECORD +13 -13
- certora_jars/CERTORA-CLI-VERSION-METADATA.json +1 -1
- certora_jars/Typechecker.jar +0 -0
- {certora_cli_alpha_master-20241219.14.2.692388.dist-info → certora_cli_alpha_master-20241219.17.27.526466.dist-info}/LICENSE +0 -0
- {certora_cli_alpha_master-20241219.14.2.692388.dist-info → certora_cli_alpha_master-20241219.17.27.526466.dist-info}/WHEEL +0 -0
- {certora_cli_alpha_master-20241219.14.2.692388.dist-info → certora_cli_alpha_master-20241219.17.27.526466.dist-info}/entry_points.txt +0 -0
- {certora_cli_alpha_master-20241219.14.2.692388.dist-info → certora_cli_alpha_master-20241219.17.27.526466.dist-info}/top_level.txt +0 -0
@@ -1,10 +1,10 @@
|
|
1
1
|
import argparse
|
2
2
|
import hashlib
|
3
3
|
import json
|
4
|
-
import logging
|
5
4
|
import os
|
6
5
|
import re
|
7
6
|
import sys
|
7
|
+
import logging
|
8
8
|
|
9
9
|
|
10
10
|
from pathlib import Path
|
@@ -106,9 +106,15 @@ def get_local_run_cmd(context: CertoraContext) -> str:
|
|
106
106
|
@return: A command for running the prover locally
|
107
107
|
"""
|
108
108
|
run_args = []
|
109
|
-
|
109
|
+
|
110
|
+
if hasattr(context, 'rust_executables'):
|
111
|
+
run_args.append(os.path.join(context.rust_project_directory, context.rust_executables))
|
112
|
+
elif context.is_tac or Attrs.is_rust_app():
|
110
113
|
# For Rust app we assume the files holds the executable for the prover, currently we support a single file
|
111
|
-
|
114
|
+
try:
|
115
|
+
run_args.append(context.files[0])
|
116
|
+
except Exception:
|
117
|
+
raise RuntimeError("get_local_run_cmd: cannot find context.files[0]")
|
112
118
|
|
113
119
|
if Attrs.is_evm_app() and context.cache is not None:
|
114
120
|
run_args.extend(['-cache', context.cache])
|
@@ -231,7 +237,7 @@ def get_args(args_list: Optional[List[str]] = None) -> CertoraContext:
|
|
231
237
|
|
232
238
|
validator = Cv.CertoraContextValidator(context)
|
233
239
|
validator.validate()
|
234
|
-
if Attrs.is_evm_app():
|
240
|
+
if Attrs.is_evm_app() or Attrs.is_rust_app():
|
235
241
|
current_build_directory = Util.get_build_dir()
|
236
242
|
if context.build_dir is not None and current_build_directory != context.build_dir:
|
237
243
|
Util.reset_certora_internal_dir(context.build_dir)
|
@@ -161,6 +161,14 @@ class CommonAttributes(AttrUtil.Attributes):
|
|
161
161
|
disables_build_cache=False
|
162
162
|
)
|
163
163
|
|
164
|
+
BUILD_DIR = AttrUtil.AttributeDefinition(
|
165
|
+
attr_validation_func=Vf.validate_build_dir,
|
166
|
+
argparse_args={
|
167
|
+
'action': AttrUtil.UniqueStore
|
168
|
+
},
|
169
|
+
affects_build_cache_key=False,
|
170
|
+
disables_build_cache=False
|
171
|
+
)
|
164
172
|
|
165
173
|
class DeprecatedAttributes(AttrUtil.Attributes):
|
166
174
|
AUTO_NONDET_DIFFICULT_INTERNAL_FUNCS = AttrUtil.AttributeDefinition(
|
@@ -639,15 +647,6 @@ class EvmAttributes(AttrUtil.Attributes):
|
|
639
647
|
disables_build_cache=False
|
640
648
|
)
|
641
649
|
|
642
|
-
BUILD_DIR = AttrUtil.AttributeDefinition(
|
643
|
-
attr_validation_func=Vf.validate_build_dir,
|
644
|
-
argparse_args={
|
645
|
-
'action': AttrUtil.UniqueStore
|
646
|
-
},
|
647
|
-
affects_build_cache_key=False,
|
648
|
-
disables_build_cache=False
|
649
|
-
)
|
650
|
-
|
651
650
|
DISABLE_LOCAL_TYPECHECKING = AttrUtil.AttributeDefinition(
|
652
651
|
arg_type=AttrUtil.AttrArgType.BOOLEAN,
|
653
652
|
argparse_args={
|
@@ -173,14 +173,17 @@ class CertoraContextValidator:
|
|
173
173
|
"'disable_source_finders' is set to true while 'dynamic_bound' is set to 1 or higher"
|
174
174
|
)
|
175
175
|
context.disable_source_finders = True
|
176
|
-
|
176
|
+
package_name = Util.get_package_and_version()[1]
|
177
177
|
# if --fe_version was not set then if the package is alpha/beta we set it to latest else we set it to production
|
178
178
|
if not context.fe_version:
|
179
|
-
lastest_packages = [Util.
|
180
|
-
if
|
179
|
+
lastest_packages = [Util.ALPHA_PACKAGE_MASTER_NAME, Util.BETA_PACKAGE_NAME, Util.BETA_MIRROR_PACKAGE_NAME]
|
180
|
+
if package_name in lastest_packages:
|
181
181
|
context.fe_version = str(Util.FeValue.LATEST)
|
182
182
|
else:
|
183
183
|
context.fe_version = str(Util.FeValue.PRODUCTION)
|
184
|
+
if Util.ALPHA_PACKAGE_NAME in package_name and not context.prover_version:
|
185
|
+
raise Util.CertoraUserInputError('When running an "alpha release", a specific branch must be supplied '
|
186
|
+
'via --prover_version. For example: "--prover_version master"')
|
184
187
|
|
185
188
|
check_conflicting_branch_and_hash(context)
|
186
189
|
set_wait_for_results_default(context)
|
@@ -1,19 +1,19 @@
|
|
1
1
|
import subprocess
|
2
2
|
import json
|
3
|
-
|
3
|
+
import logging
|
4
4
|
|
5
5
|
from EVMVerifier.certoraContextClass import CertoraContext
|
6
6
|
from Shared import certoraUtils as Util
|
7
|
-
|
7
|
+
|
8
|
+
build_script_logger = logging.getLogger("build_script")
|
8
9
|
|
9
10
|
|
10
11
|
def run_script_and_parse_json(context: CertoraContext) -> None:
|
11
12
|
if not context.build_script:
|
12
13
|
return
|
13
14
|
try:
|
14
|
-
|
15
|
-
result = subprocess.run([
|
16
|
-
env=env, cwd=Path(context.build_script).resolve().parent)
|
15
|
+
build_script_logger.info(f"Building from script {context.build_script}")
|
16
|
+
result = subprocess.run([context.build_script, '--json'], capture_output=True, text=True)
|
17
17
|
|
18
18
|
# Check if the script executed successfully
|
19
19
|
if result.returncode != 0:
|
@@ -79,7 +79,8 @@ LAST_CONF_FILE = Path("run.conf")
|
|
79
79
|
EMV_JAR = Path("emv.jar")
|
80
80
|
CERTORA_SOURCES = Path(".certora_sources")
|
81
81
|
SOLANA_DEFAULT_COMMAND = "cargo +solana build-sbf"
|
82
|
-
ALPHA_PACKAGE_NAME = 'certora-cli-alpha
|
82
|
+
ALPHA_PACKAGE_NAME = 'certora-cli-alpha'
|
83
|
+
ALPHA_PACKAGE_MASTER_NAME = ALPHA_PACKAGE_NAME + '-master'
|
83
84
|
# contract names in Solidity consists of alphanums, underscores and dollar signs
|
84
85
|
# https://docs.soliditylang.org/en/latest/grammar.html#a4.SolidityLexer.Identifier
|
85
86
|
SOLIDITY_ID_SUBSTRING_RE = r"[a-zA-Z_$][a-zA-Z0-9_$]*" # string *contains* a valid solidity ID
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: certora-cli-alpha-master
|
3
|
-
Version: 20241219.
|
3
|
+
Version: 20241219.17.27.526466
|
4
4
|
Summary: Runner for the Certora Prover
|
5
5
|
Home-page: https://pypi.org/project/certora-cli-alpha-master
|
6
6
|
Author: Certora
|
@@ -23,4 +23,4 @@ Requires-Dist: StrEnum
|
|
23
23
|
Requires-Dist: tomli
|
24
24
|
Requires-Dist: universalmutator
|
25
25
|
|
26
|
-
Commit
|
26
|
+
Commit b0ee123. Build and Run scripts for executing the Certora Prover on Solidity smart contracts.
|
@@ -13,16 +13,16 @@ certora_cli/EVMVerifier/certoraCloudIO.py,sha256=b26JbU3aTEU0BO7gIlJ14tosQfv3wgV
|
|
13
13
|
certora_cli/EVMVerifier/certoraCollectRunMetadata.py,sha256=selEf-p7UW8_70-AbPfa5659ki6WcGrBwfPkUQWKhFU,10322
|
14
14
|
certora_cli/EVMVerifier/certoraCompilerParameters.py,sha256=PDKW3K_lNeRNPHisW0e5hYtfu6unDRjJUop-yItGHO0,762
|
15
15
|
certora_cli/EVMVerifier/certoraConfigIO.py,sha256=oyNOyBjVWFfB1dmj0jNnEwvokM7UMoGZ91luSh-cFGk,4634
|
16
|
-
certora_cli/EVMVerifier/certoraContext.py,sha256=
|
17
|
-
certora_cli/EVMVerifier/certoraContextAttributes.py,sha256=
|
16
|
+
certora_cli/EVMVerifier/certoraContext.py,sha256=aYvsuedXdiHsdEbok9hRT3KZcaNY8HIg_Lee3HBVVrE,22266
|
17
|
+
certora_cli/EVMVerifier/certoraContextAttributes.py,sha256=Lx1vi9PgPiUcv0xRsdQncvknkpdvMWagGsT-Tw0saX4,55636
|
18
18
|
certora_cli/EVMVerifier/certoraContextClass.py,sha256=qdHYmrzI4zeQaAaMnonw4C-h1PFrPEhI84trrgvxFj0,210
|
19
|
-
certora_cli/EVMVerifier/certoraContextValidator.py,sha256=
|
19
|
+
certora_cli/EVMVerifier/certoraContextValidator.py,sha256=zQupDhoTMu0aA3Rmp6x6KgOa_CNd5A3Cqf60_vJZ5rE,37560
|
20
20
|
certora_cli/EVMVerifier/certoraContractFuncs.py,sha256=W3lAvKotGKK7ZGJLg4yYh0FzTwwSQJbZMpizyGaYXZo,6229
|
21
21
|
certora_cli/EVMVerifier/certoraExtensionInfo.py,sha256=bHjEBKg3qQ1lS419KSU6v6HKbhrSOz2TmEE21YrOfYI,1336
|
22
22
|
certora_cli/EVMVerifier/certoraJobList.py,sha256=JlPOANEzNHP6cDrM5UKfO314pmWYokuhAPTkH3ezNb4,10768
|
23
23
|
certora_cli/EVMVerifier/certoraMiniSpecParser.py,sha256=Thtcr1BLmCz9xOiOkaP04mSnrDaqIUOUSCM81TrqD_s,8970
|
24
24
|
certora_cli/EVMVerifier/certoraNodeFilters.py,sha256=0e8iPdj4cWjwReaAhfJhpdnSUYc8gephmKQzOOP5X_g,2140
|
25
|
-
certora_cli/EVMVerifier/certoraParseBuildScript.py,sha256=
|
25
|
+
certora_cli/EVMVerifier/certoraParseBuildScript.py,sha256=HiBfBRXCl7ER1aBSzJFARgBWj8Z4doT6ApcicdhHNnU,1425
|
26
26
|
certora_cli/EVMVerifier/certoraSourceFinders.py,sha256=fZLYGjNgntIySnG76DwsjRZ-UHiy0zEkM6xNP7cYpDE,18342
|
27
27
|
certora_cli/EVMVerifier/certoraType.py,sha256=TPrgRwUnY-krN1SxpCHGB0zwN-TR1bxb-NFdnaigA-k,28626
|
28
28
|
certora_cli/EVMVerifier/certoraVerifyGenerator.py,sha256=OT5zrtQMXDoaVdGfQ4_gbAnITin3nlXgXTgw3msqlNQ,9452
|
@@ -51,14 +51,14 @@ certora_cli/Shared/ExpectedComparator.py,sha256=rDDY3-FaE3OS_ZjZ-nOyvUTlUp8eQCHw
|
|
51
51
|
certora_cli/Shared/__init__.py,sha256=QGoFb_Uu87tWp4E4L6C_VtzdG-sfNrzdNtRK79h5_Lw,333
|
52
52
|
certora_cli/Shared/certoraAttrUtil.py,sha256=IbIIvTbtPzmPSSrK7VIWZNitkz1iwvW_e0ggX1e2joY,6751
|
53
53
|
certora_cli/Shared/certoraLogging.py,sha256=5Lx-XWKl7GnwnWi7KlwTLIfsEvUvCTZ8KeyfNyi_6RU,13323
|
54
|
-
certora_cli/Shared/certoraUtils.py,sha256=
|
54
|
+
certora_cli/Shared/certoraUtils.py,sha256=WmVX8Hz5wMZ7WI2JhYavAilH1kO3fwKLUBsf4hQ4b-o,53676
|
55
55
|
certora_cli/Shared/certoraValidateFuncs.py,sha256=OOjPAkcfrURZDD4oDjOMBFTvY6wwQSXboXzu-47AUbY,36871
|
56
|
-
certora_jars/CERTORA-CLI-VERSION-METADATA.json,sha256=
|
57
|
-
certora_jars/Typechecker.jar,sha256=
|
56
|
+
certora_jars/CERTORA-CLI-VERSION-METADATA.json,sha256=bGTkY5e7Oboh6smzO5-o6N8SPKkGQMNrPYJNLlVYaDI,170
|
57
|
+
certora_jars/Typechecker.jar,sha256=fwyph9bf1n9iHWzq0CVY7hTEjve80CdjQwa2D8_-uzE,16755362
|
58
58
|
certora_jars/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
59
|
-
certora_cli_alpha_master-20241219.
|
60
|
-
certora_cli_alpha_master-20241219.
|
61
|
-
certora_cli_alpha_master-20241219.
|
62
|
-
certora_cli_alpha_master-20241219.
|
63
|
-
certora_cli_alpha_master-20241219.
|
64
|
-
certora_cli_alpha_master-20241219.
|
59
|
+
certora_cli_alpha_master-20241219.17.27.526466.dist-info/LICENSE,sha256=VeEBJLgfzZqyAUfjLoKUztf7KJBBUjtZ1ap99eQubOo,1065
|
60
|
+
certora_cli_alpha_master-20241219.17.27.526466.dist-info/METADATA,sha256=vq8b6kCBTYrIEJUL1SWIbqbp_R9S8MRt4Nc8M8iMtMM,838
|
61
|
+
certora_cli_alpha_master-20241219.17.27.526466.dist-info/WHEEL,sha256=P9jw-gEje8ByB7_hXoICnHtVCrEwMQh-630tKvQWehc,91
|
62
|
+
certora_cli_alpha_master-20241219.17.27.526466.dist-info/entry_points.txt,sha256=Y90wInBDlKPSU3YnuTn3JqAsSgPRTDHc8lf6BfKILjY,261
|
63
|
+
certora_cli_alpha_master-20241219.17.27.526466.dist-info/top_level.txt,sha256=8C77w3JLanY0-NW45vpJsjRssyCqVP-qmPiN9FjWiX4,38
|
64
|
+
certora_cli_alpha_master-20241219.17.27.526466.dist-info/RECORD,,
|
@@ -1 +1 @@
|
|
1
|
-
{"name": "certora-cli-alpha-master", "tag": "", "branch": "master", "commit": "
|
1
|
+
{"name": "certora-cli-alpha-master", "tag": "", "branch": "master", "commit": "b0ee123", "timestamp": "20241219.17.27.526466", "version": "20241219.17.27.526466+b0ee123"}
|
certora_jars/Typechecker.jar
CHANGED
Binary file
|
File without changes
|
File without changes
|
File without changes
|