Skip to content

Commit ecad9f5

Browse files
rv-jenkinsrv-auditorgithub-actions[bot]dkcumming
authored
Update dependency: deps/kmir_release (#26)
### Collapse `prove-rs` into `prove` [986](runtimeverification/mir-semantics#986) - Removed `ProveRsOpts` for `KMirProveOpts` - `ProveOpts` is a collision so `KMirProveOpts` is used ### fix(symbolic-spl): align multisig cheatcode with 3-signer layout [977](runtimeverification/mir-semantics#977) - SPL-token reduce `Multisig` signers from 11 to 3 - SPL-token reduce `Multisig` size from 355 to 99 ### Change the number of signers from 11 to 3 [982](runtimeverification/mir-semantics#982) - P-token reduce `Multisig` signers from 11 to 3 - P-token reduce `Multisig` size from 355 to 99 --------- Co-authored-by: devops <devops@runtimeverification.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: dkcumming <daniel.cumming@runtimeverification.com>
1 parent 873a01f commit ecad9f5

8 files changed

Lines changed: 30 additions & 45 deletions

File tree

deps/kmir_release

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.4.185
1+
0.4.186

package/version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.1.15
1+
0.1.16

pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,19 @@ build-backend = "hatchling.build"
44

55
[project]
66
name = "kompass"
7-
version = "0.1.15"
7+
version = "0.1.16"
88
description = "K Semantics for the Solana ecosystem"
99
requires-python = "~=3.10"
1010
dependencies = [
11-
"kmir@git+https://github.com/runtimeverification/mir-semantics.git@v0.4.185#subdirectory=kmir",
11+
"kmir@git+https://github.com/runtimeverification/mir-semantics.git@v0.4.186#subdirectory=kmir",
1212
]
1313

1414
[[project.authors]]
1515
name = "Runtime Verification, Inc."
1616
email = "contact@runtimeverification.com"
1717

1818
[tool.uv.sources]
19-
kmir = { git = "https://github.com/runtimeverification/mir-semantics.git", rev = "v0.4.185", subdirectory = "kmir" }
19+
kmir = { git = "https://github.com/runtimeverification/mir-semantics.git", rev = "v0.4.186", subdirectory = "kmir" }
2020

2121
[project.scripts]
2222
kompass = "kompass.__main__:main"

src/kompass/__main__.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88
from kmir.__main__ import _arg_parser as kmir_arg_parser
99
from kmir.__main__ import _parse_args as kmir_parse_args
1010
from kmir.cargo import CargoProject
11-
from kmir.options import KMirOpts, ProveRSOpts, PruneOpts, RunOpts
11+
from kmir.options import KMirOpts
12+
from kmir.options import ProveOpts as KMirProveOpts
13+
from kmir.options import PruneOpts, RunOpts
1214
from kmir.options import ShowOpts as KMirShowOpts
1315
from kmir.options import ViewOpts as KMirViewOpts
1416
from kmir.smir import SMIRInfo
@@ -44,9 +46,9 @@ def _kompass_run(opts: RunOpts) -> None:
4446
print(kompass.kore_to_pretty(result))
4547

4648

47-
def _kompass_prove_rs(opts: ProveRSOpts) -> None:
49+
def _kompass_prove(opts: KMirProveOpts) -> None:
4850
kompass = Kompass(HASKELL_DEF_DIR, LLVM_LIB_DIR, bug_report=opts.bug_report)
49-
proof = kompass.prove_rs(opts)
51+
proof = kompass.prove_program(opts)
5052
print(str(proof.summary))
5153
if not proof.passed:
5254
sys.exit(1)
@@ -106,7 +108,7 @@ def _run_prove(opts: ProveOpts) -> bool:
106108

107109
kompass = Kompass(HASKELL_DEF_DIR, LLVM_LIB_DIR, bug_report=opts.bug_report)
108110

109-
prove_rs_opts = ProveRSOpts(
111+
prove_opts = KMirProveOpts(
110112
rs_file=smir,
111113
proof_dir=opts.proof_dir if opts.proof_dir is not None else target_dir / 'proofs',
112114
haskell_target='kompass.haskell',
@@ -119,7 +121,7 @@ def _run_prove(opts: ProveOpts) -> bool:
119121
smir=True,
120122
start_symbol=opts.start_symbol,
121123
)
122-
proof = kompass.prove_rs(prove_rs_opts)
124+
proof = kompass.prove_program(prove_opts)
123125
print(str(proof.summary))
124126
return proof.passed
125127

@@ -205,8 +207,8 @@ def kompass(args: Sequence[str]) -> None:
205207
_kompass_show(opts)
206208
case PruneOpts():
207209
_kompass_prune(opts)
208-
case ProveRSOpts():
209-
_kompass_prove_rs(opts)
210+
case KMirProveOpts():
211+
_kompass_prove(opts)
210212
case _:
211213
raise AssertionError
212214

src/kompass/kdist/kompass/spl-token.md

Lines changed: 6 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -205,23 +205,21 @@ module KMIR-SPL-TOKEN
205205
=> dynamicSize(17)
206206
[priority(30)]
207207
208-
// Multisig data buffer length (Multisig::LEN = 355)
208+
// Multisig data buffer length (runtime-verification Multisig::LEN = 99)
209209
rule #maybeDynamicSize(
210210
dynamicSize(_),
211211
SPLDataBuffer(
212212
Aggregate(variantIdx(0),
213213
ListItem(Integer(_, 8, false)) // m
214214
ListItem(Integer(_, 8, false)) // n
215215
ListItem(BoolVal(_)) // is_initialized
216-
ListItem(Range( // signers: [Pubkey; 11]
217-
ListItem(_) ListItem(_) ListItem(_) ListItem(_) ListItem(_)
218-
ListItem(_) ListItem(_) ListItem(_) ListItem(_) ListItem(_)
219-
ListItem(_)
216+
ListItem(Range( // signers: [Pubkey; 3]
217+
ListItem(_) ListItem(_) ListItem(_)
220218
))
221219
)
222220
)
223221
)
224-
=> dynamicSize(355)
222+
=> dynamicSize(99)
225223
[priority(30)]
226224
```
227225

@@ -446,25 +444,17 @@ The `#initBorrow` helper resets borrow counters to 0 and sets the correct dynami
446444
ListItem(Integer(?SplMultisigM:Int, 8, false)) // m: u8
447445
ListItem(Integer(?SplMultisigN:Int, 8, false)) // n: u8
448446
ListItem(BoolVal(?_SplMultisigInitialised:Bool)) // is_initialized: bool
449-
ListItem(Range( // signers: [Pubkey; 11]
447+
ListItem(Range( // signers: [Pubkey; 3]
450448
ListItem(Aggregate(variantIdx(0), ListItem(Range(?SplSigner0:List))))
451449
ListItem(Aggregate(variantIdx(0), ListItem(Range(?SplSigner1:List))))
452450
ListItem(Aggregate(variantIdx(0), ListItem(Range(?SplSigner2:List))))
453-
ListItem(Aggregate(variantIdx(0), ListItem(Range(?SplSigner3:List))))
454-
ListItem(Aggregate(variantIdx(0), ListItem(Range(?SplSigner4:List))))
455-
ListItem(Aggregate(variantIdx(0), ListItem(Range(?SplSigner5:List))))
456-
ListItem(Aggregate(variantIdx(0), ListItem(Range(?SplSigner6:List))))
457-
ListItem(Aggregate(variantIdx(0), ListItem(Range(?SplSigner7:List))))
458-
ListItem(Aggregate(variantIdx(0), ListItem(Range(?SplSigner8:List))))
459-
ListItem(Aggregate(variantIdx(0), ListItem(Range(?SplSigner9:List))))
460-
ListItem(Aggregate(variantIdx(0), ListItem(Range(?SplSigner10:List))))
461451
))
462452
)
463453
)
464454
)
465455
~> #forceSetPlaceValue(
466456
place(LOCAL, appendP(PROJS, REFCELL_PROJS)), // navigate to RefCell for borrow init
467-
#initBorrow(operandCopy(place(LOCAL, appendP(PROJS, REFCELL_PROJS))), 355)
457+
#initBorrow(operandCopy(place(LOCAL, appendP(PROJS, REFCELL_PROJS))), 99)
468458
)
469459
~> #continueAt(TARGET)
470460
</k>
@@ -475,14 +465,6 @@ The `#initBorrow` helper resets borrow counters to 0 and sets the correct dynami
475465
andBool #isSplPubkey(?SplSigner0)
476466
andBool #isSplPubkey(?SplSigner1)
477467
andBool #isSplPubkey(?SplSigner2)
478-
andBool #isSplPubkey(?SplSigner3)
479-
andBool #isSplPubkey(?SplSigner4)
480-
andBool #isSplPubkey(?SplSigner5)
481-
andBool #isSplPubkey(?SplSigner6)
482-
andBool #isSplPubkey(?SplSigner7)
483-
andBool #isSplPubkey(?SplSigner8)
484-
andBool #isSplPubkey(?SplSigner9)
485-
andBool #isSplPubkey(?SplSigner10)
486468
[priority(30), preserves-definedness]
487469
```
488470

src/tests/integration/data/token/spl-token/spl-multisig-signer-index.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ enum ProgramError {
4545
InvalidAccountData,
4646
}
4747

48-
const MAX_SIGNERS: usize = 11;
48+
const MAX_SIGNERS: usize = 3;
4949

5050
#[derive(Clone, Debug)]
5151
struct Multisig {
@@ -56,7 +56,7 @@ struct Multisig {
5656
}
5757

5858
impl Multisig {
59-
const LEN: usize = 355;
59+
const LEN: usize = 99;
6060

6161
fn unpack_from_slice(data: &[u8]) -> Result<Self, ProgramError> {
6262
if data.len() < Self::LEN {

src/tests/integration/test_token.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44

55
import pytest
66
from kmir.kmir import KMIR, KMIRAPRNodePrinter
7-
from kmir.options import ProveRSOpts, ShowOpts
7+
from kmir.options import ProveOpts as KMirProveOpts
8+
from kmir.options import ShowOpts
89
from kmir.testing.fixtures import assert_or_update_show_output
910
from pyk.cterm.show import CTermShow
1011
from pyk.kast.pretty import PrettyPrinter
@@ -46,13 +47,13 @@ def test_token_prove_rs(rs_file: Path, kmir: KMIR, update_expected_output: bool)
4647
start_symbols = START_SYMBOLS.get(rs_file.stem, ['main'])
4748

4849
for start_symbol in start_symbols:
49-
prove_rs_opts = ProveRSOpts(
50+
prove_opts = KMirProveOpts(
5051
rs_file,
5152
start_symbol=start_symbol,
5253
haskell_target='kompass.haskell',
5354
llvm_lib_target='kompass.llvm-library',
5455
)
55-
apr_proof = KMIR.prove_rs(prove_rs_opts)
56+
apr_proof = KMIR.prove_program(prove_opts)
5657

5758
if should_show:
5859
printer = PrettyPrinter(kmir.definition)

uv.lock

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)