Implement new costing function for {divide,quotient,mod,remainder}_integer

As well as fixing a couple of other issues thanks to conformance
  tests. Some functions like multiply_integer or verify_ed25519_signature
  have also slightly changed their costing function.
This commit is contained in:
KtorZ
2024-08-14 02:46:04 +02:00
parent 2cb87f4f8f
commit 42784965d2
5 changed files with 352 additions and 181 deletions

View File

@@ -94,8 +94,13 @@ fn plutus_conformance_tests(language: Language) {
match eval {
Ok((actual, cost)) => {
pretty_assertions::assert_eq!(expected, Ok(actual), "{}", path.display());
if let Ok(budget) = file_to_budget(&expected_budget_file) {
pretty_assertions::assert_eq!(budget, cost, "{}", path.display());
match language {
Language::PlutusV1 | Language::PlutusV2 => {}
Language::PlutusV3 => {
if let Ok(budget) = file_to_budget(&expected_budget_file) {
pretty_assertions::assert_eq!(budget, cost, "{}", path.display());
}
}
}
}
Err(err) => pretty_assertions::assert_eq!(expected, Err(err), "{}", path.display()),