certora-cli-alpha-master 20251012.8.16.603503__py3-none-macosx_10_9_universal2.whl → 20251012.20.20.862738__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/certoraBuild.py +4 -3
- certora_cli/CertoraProver/certoraBuildCacheManager.py +6 -3
- certora_cli/CertoraProver/certoraContextAttributes.py +11 -0
- certora_cli/Shared/certoraUtils.py +12 -0
- {certora_cli_alpha_master-20251012.8.16.603503.dist-info → certora_cli_alpha_master-20251012.20.20.862738.dist-info}/METADATA +2 -2
- {certora_cli_alpha_master-20251012.8.16.603503.dist-info → certora_cli_alpha_master-20251012.20.20.862738.dist-info}/RECORD +13 -13
- certora_jars/ASTExtraction.jar +0 -0
- certora_jars/CERTORA-CLI-VERSION-METADATA.json +1 -1
- certora_jars/Typechecker.jar +0 -0
- {certora_cli_alpha_master-20251012.8.16.603503.dist-info → certora_cli_alpha_master-20251012.20.20.862738.dist-info}/LICENSE +0 -0
- {certora_cli_alpha_master-20251012.8.16.603503.dist-info → certora_cli_alpha_master-20251012.20.20.862738.dist-info}/WHEEL +0 -0
- {certora_cli_alpha_master-20251012.8.16.603503.dist-info → certora_cli_alpha_master-20251012.20.20.862738.dist-info}/entry_points.txt +0 -0
- {certora_cli_alpha_master-20251012.8.16.603503.dist-info → certora_cli_alpha_master-20251012.20.20.862738.dist-info}/top_level.txt +0 -0
@@ -1554,9 +1554,10 @@ class CertoraBuildGenerator:
|
|
1554
1554
|
@param compiler_collector: Solidity or Vyper compiler collector
|
1555
1555
|
@return:
|
1556
1556
|
"""
|
1557
|
+
solc_json_contract_key = contract_file_as_provided if self.context.use_relpaths_for_solc_json else contract_file_posix_abs
|
1557
1558
|
compiler_collector_lang = compiler_collector.smart_contract_lang
|
1558
1559
|
if compiler_collector_lang == CompilerLangSol() or compiler_collector_lang == CompilerLangYul():
|
1559
|
-
sources_dict = {str(
|
1560
|
+
sources_dict = {str(solc_json_contract_key): {
|
1560
1561
|
"urls": [str(contract_file_posix_abs)]}} # type: Dict[str, Dict[str, Any]]
|
1561
1562
|
output_selection = ["transientStorageLayout", "storageLayout", "abi", "evm.bytecode",
|
1562
1563
|
"evm.deployedBytecode", "evm.methodIdentifiers", "evm.assembly",
|
@@ -2008,7 +2009,7 @@ class CertoraBuildGenerator:
|
|
2008
2009
|
srclist = {"0": file_abs_path}
|
2009
2010
|
report_srclist = {"0": file_abs_path}
|
2010
2011
|
|
2011
|
-
report_source_file = report_srclist[[idx for idx in srclist if srclist[idx] == file_abs_path][0]]
|
2012
|
+
report_source_file = report_srclist[[idx for idx in srclist if Util.abs_posix_path(srclist[idx]) == file_abs_path][0]]
|
2012
2013
|
|
2013
2014
|
# all "contracts in SDC" are the same for every primary contract of the compiled file.
|
2014
2015
|
# we can therefore compute those just once...
|
@@ -2086,7 +2087,7 @@ class CertoraBuildGenerator:
|
|
2086
2087
|
if new_path is None:
|
2087
2088
|
file_abs_path = Util.abs_posix_path(build_arg_contract_file)
|
2088
2089
|
# for vyper, because there are no autofinders, at least find the main file
|
2089
|
-
if (orig_file == file_abs_path and
|
2090
|
+
if (Util.abs_posix_path(orig_file) == file_abs_path and
|
2090
2091
|
((Util.get_certora_sources_dir() / build_arg_contract_file).exists() or
|
2091
2092
|
Path(build_arg_contract_file).exists())):
|
2092
2093
|
new_srclist_map[idx] = build_arg_contract_file
|
@@ -179,9 +179,12 @@ class CertoraBuildCacheManager:
|
|
179
179
|
trg = trg_path_with_additional_included_files / post_autofinder_dir.name
|
180
180
|
if post_autofinder_dir != trg:
|
181
181
|
if post_autofinder_dir.is_dir():
|
182
|
-
if
|
183
|
-
|
184
|
-
|
182
|
+
# if we match on the cache, and we run a few certoraRun-s in parallel,
|
183
|
+
# it could be this folder already exists. But the exact contents do not matter and are likely to
|
184
|
+
# agree with the exception of spec files. So let's merge the folders so that the
|
185
|
+
# sources are in any case runnable
|
186
|
+
if not trg.exists():
|
187
|
+
Util.safe_merge_folder(post_autofinder_dir, trg, shutil.ignore_patterns())
|
185
188
|
else:
|
186
189
|
# highly unlikely .post_autofinder.[digit] will be a file and not a directory,
|
187
190
|
# but would rather not crash and future-proof instead
|
@@ -753,6 +753,17 @@ class EvmAttributes(AttrUtil.Attributes):
|
|
753
753
|
disables_build_cache=True # prefer to be extra careful with this rare option
|
754
754
|
)
|
755
755
|
|
756
|
+
USE_RELPATHS_FOR_SOLC_JSON = AttrUtil.AttributeDefinition(
|
757
|
+
arg_type=AttrUtil.AttrArgType.BOOLEAN,
|
758
|
+
help_msg="Uses relative paths when constructing json keys for solc's standard-json input",
|
759
|
+
default_desc="By using relative paths for the standard json, some rare compilation errors can be prevented",
|
760
|
+
argparse_args={
|
761
|
+
'action': AttrUtil.STORE_TRUE
|
762
|
+
},
|
763
|
+
affects_build_cache_key=True,
|
764
|
+
disables_build_cache=False
|
765
|
+
)
|
766
|
+
|
756
767
|
IGNORE_SOLIDITY_WARNINGS = AttrUtil.AttributeDefinition(
|
757
768
|
arg_type=AttrUtil.AttrArgType.BOOLEAN,
|
758
769
|
help_msg="Ignore all Solidity compiler warnings",
|
@@ -514,6 +514,18 @@ def safe_copy_folder(source: Path, dest: Path, ignore_patterns: Callable[[str, L
|
|
514
514
|
shutil.rmtree(copy_temp, ignore_errors=True)
|
515
515
|
|
516
516
|
|
517
|
+
def safe_merge_folder(source: Path, dest: Path, ignore_patterns: Callable[[str, List[str]], Iterable[str]]) -> None:
|
518
|
+
"""
|
519
|
+
Safely merge source to dest. dest may exist. Will overwrite existing files
|
520
|
+
On certain OS/kernels/FS, copying a folder f into a subdirectory of f will
|
521
|
+
send copy tree into an infinite loop. This sidesteps the problem by first copying through a temporary folder.
|
522
|
+
"""
|
523
|
+
copy_temp = tempfile.mkdtemp()
|
524
|
+
shutil.copytree(source, copy_temp, ignore=ignore_patterns, dirs_exist_ok=True)
|
525
|
+
shutil.copytree(copy_temp, dest, dirs_exist_ok=True)
|
526
|
+
shutil.rmtree(copy_temp, ignore_errors=True)
|
527
|
+
|
528
|
+
|
517
529
|
def as_posix(path: str) -> str:
|
518
530
|
"""
|
519
531
|
Converts path from windows to unix
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.2
|
2
2
|
Name: certora-cli-alpha-master
|
3
|
-
Version: 20251012.
|
3
|
+
Version: 20251012.20.20.862738
|
4
4
|
Summary: Runner for the Certora Prover
|
5
5
|
Home-page: https://pypi.org/project/certora-cli-alpha-master
|
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 67b032d. Build and Run scripts for executing the Certora Prover on Solidity smart contracts.
|
@@ -13,8 +13,8 @@ certora_cli/certoraSorobanProver.py,sha256=SYJKz5Sw-N0bJrSa1njRCE53R9_PMz7IWLhfa
|
|
13
13
|
certora_cli/rustMutator.py,sha256=6AvOGU8Ijz89zW_ZJCWlfXkeobJsk7EsqZhK7Eqwn-Y,14544
|
14
14
|
certora_cli/CertoraProver/__init__.py,sha256=QHNr-PJQAoyuPgTkO7gg23GRchiWSXglWNG7yLSQZvs,849
|
15
15
|
certora_cli/CertoraProver/certoraApp.py,sha256=RKJ2Krb_CzbRUvczbdE6FhUDrFcvrR8j0JS8MNWXX7s,1469
|
16
|
-
certora_cli/CertoraProver/certoraBuild.py,sha256=
|
17
|
-
certora_cli/CertoraProver/certoraBuildCacheManager.py,sha256=
|
16
|
+
certora_cli/CertoraProver/certoraBuild.py,sha256=4fDUL8cOEsJcy3gysZymc35QKl7Ht28DeZaGgDvIRvc,225385
|
17
|
+
certora_cli/CertoraProver/certoraBuildCacheManager.py,sha256=DnVd7w92xjmg0DIrMgoJnCvaU0yCz7ySy0M4RiHEXEM,13648
|
18
18
|
certora_cli/CertoraProver/certoraBuildDataClasses.py,sha256=hO0w3YK9V9gZsTbh4gxxlnEAaOiubUwfzNEw6uL1HaE,14841
|
19
19
|
certora_cli/CertoraProver/certoraBuildRust.py,sha256=ZPbNp4ttRmzcKhFsgHSiHDRExNPaLOzgxTRqu23o1D0,6061
|
20
20
|
certora_cli/CertoraProver/certoraBuildSui.py,sha256=zMXD2XnC4oqRDzPcBvSZmVquL3UG5paBZkfUT3JPbYY,4180
|
@@ -24,7 +24,7 @@ certora_cli/CertoraProver/certoraCollectRunMetadata.py,sha256=i31dkYt8kwlX44SHZt
|
|
24
24
|
certora_cli/CertoraProver/certoraCompilerParameters.py,sha256=r35y03IRwWIoz1GCNC7PuW3n8JPz9J1NGwhwUYKdYtI,1452
|
25
25
|
certora_cli/CertoraProver/certoraConfigIO.py,sha256=-1EhJYsiheYvyCgOOWrRCQBjqtqNXrpMKJYRq5cKJ0Y,8171
|
26
26
|
certora_cli/CertoraProver/certoraContext.py,sha256=bBbLPet5si6jFEdL1TBORN-HCiJGQK7hD6OQZ_ODmFY,28878
|
27
|
-
certora_cli/CertoraProver/certoraContextAttributes.py,sha256=
|
27
|
+
certora_cli/CertoraProver/certoraContextAttributes.py,sha256=jtL_0nnRbPJ8pMNmMekDHZqTQueQGP_-tOSN6-4ql0Y,70680
|
28
28
|
certora_cli/CertoraProver/certoraContextClass.py,sha256=d7HDqM72K7YnswR7kEcAHGwkFNrTqRz5-_0m7cl2Mso,900
|
29
29
|
certora_cli/CertoraProver/certoraContextValidator.py,sha256=clXwmYHIBUmOJ8ADRUmu9U6_pNe_tXRNawvUPBLlYVY,46490
|
30
30
|
certora_cli/CertoraProver/certoraContractFuncs.py,sha256=-CV7MkmsrwYfdYFAd6ZZib_6-mDG_ytxPM4hAjxtbMM,7137
|
@@ -65,16 +65,16 @@ certora_cli/Shared/ExpectedComparator.py,sha256=eyRR-jni4WJoa6j2TK2lnZ89Tyb8U99w
|
|
65
65
|
certora_cli/Shared/__init__.py,sha256=s0dhvolFtsS4sRNzPVhC_rlw8mm194rCZ0WhOxInY40,1025
|
66
66
|
certora_cli/Shared/certoraAttrUtil.py,sha256=Nw8ban5Axp6c6dT-KJfCD9i9tKnGk1DbvRDDNH3--DU,8574
|
67
67
|
certora_cli/Shared/certoraLogging.py,sha256=cV2UQMhQ5j8crGXgeq9CEamI-Lk4HgdiA3HCrP-kSR4,14013
|
68
|
-
certora_cli/Shared/certoraUtils.py,sha256=
|
68
|
+
certora_cli/Shared/certoraUtils.py,sha256=GeA4o74TxKeW206je_H8B6wzDFuPIz0j6EyQo5sJeyU,59325
|
69
69
|
certora_cli/Shared/certoraValidateFuncs.py,sha256=mYguICGfUwVZ9qPBFajss1xqHPDR-KRtskgERLum4AM,43225
|
70
70
|
certora_cli/Shared/proverCommon.py,sha256=uZkl9PDLPj81kKRnBnlPUmvhMZovNP25_74No_7jaQ4,11215
|
71
|
-
certora_jars/ASTExtraction.jar,sha256=
|
72
|
-
certora_jars/CERTORA-CLI-VERSION-METADATA.json,sha256=
|
73
|
-
certora_jars/Typechecker.jar,sha256=
|
71
|
+
certora_jars/ASTExtraction.jar,sha256=13O4etpraDNmYn1-EP1mndH1rA_Re9Lja3rnoqsENCw,20968739
|
72
|
+
certora_jars/CERTORA-CLI-VERSION-METADATA.json,sha256=98ug5HZLVWkSyS6AHGqlIU9PyQqfzhCeQpzFHiANNFs,170
|
73
|
+
certora_jars/Typechecker.jar,sha256=z_ncJOQXPOrO2u2Ge_JmQqMuXTb_lC3QetTYcZIe4-0,20930898
|
74
74
|
certora_jars/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
75
|
-
certora_cli_alpha_master-20251012.
|
76
|
-
certora_cli_alpha_master-20251012.
|
77
|
-
certora_cli_alpha_master-20251012.
|
78
|
-
certora_cli_alpha_master-20251012.
|
79
|
-
certora_cli_alpha_master-20251012.
|
80
|
-
certora_cli_alpha_master-20251012.
|
75
|
+
certora_cli_alpha_master-20251012.20.20.862738.dist-info/LICENSE,sha256=UGKSKIJSetF8m906JLKqNLkUS2CL60XfQdNvxBvpQXo,620
|
76
|
+
certora_cli_alpha_master-20251012.20.20.862738.dist-info/METADATA,sha256=lzTwxe2GyAlETa58QbgMSu3KJpjS2XXnTSexuUwFtnA,1304
|
77
|
+
certora_cli_alpha_master-20251012.20.20.862738.dist-info/WHEEL,sha256=9Ig2YBzm5cpS_YWKLeuYxVAxcKv_uDQsCzy9XJbRZ_g,110
|
78
|
+
certora_cli_alpha_master-20251012.20.20.862738.dist-info/entry_points.txt,sha256=ClZiFkCYDdK25_ufxZvnE2Rx_kNk1_4vj7KpgYUKxGM,509
|
79
|
+
certora_cli_alpha_master-20251012.20.20.862738.dist-info/top_level.txt,sha256=8C77w3JLanY0-NW45vpJsjRssyCqVP-qmPiN9FjWiX4,38
|
80
|
+
certora_cli_alpha_master-20251012.20.20.862738.dist-info/RECORD,,
|
certora_jars/ASTExtraction.jar
CHANGED
Binary file
|
@@ -1 +1 @@
|
|
1
|
-
{"name": "certora-cli-alpha-master", "tag": "", "branch": "master", "commit": "
|
1
|
+
{"name": "certora-cli-alpha-master", "tag": "", "branch": "master", "commit": "67b032d", "timestamp": "20251012.20.20.862738", "version": "20251012.20.20.862738+67b032d"}
|
certora_jars/Typechecker.jar
CHANGED
Binary file
|
File without changes
|
File without changes
|
File without changes
|