Skip to content

Commit

Permalink
chore: Fix build for TVM 0.42-alpha10
Browse files Browse the repository at this point in the history
- The `TasmObject` trait now requires all nested structures to also
  implement `TasmObject`. And `TasmObject` is not defined for `enum`
  types, so a test had to be changed.
- FRI from Triton VM now implement `Copy`. So linter will not allow us
  to call the `clone` method on it.

Still missing port of some verifier (recursion) related types.
  • Loading branch information
Sword-Smith committed Sep 10, 2024
1 parent ad59fe2 commit 151cb45
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@ use twenty_first::prelude::AlgebraicHasher;

use crate::tests_and_benchmarks::ozk::rust_shadows as tasm;

#[derive(BFieldCodec, PartialEq, Eq, Clone, Debug, Arbitrary)]
enum MyEnum {
A(u64, Digest),
B,
C,
#[derive(BFieldCodec, TasmObject, PartialEq, Eq, Clone, Debug, Arbitrary)]
struct MyStruct {
inner_a: (u64, Digest),
inner_b: Digest,
inner_c: Vec<u128>,
}

#[derive(BFieldCodec, TasmObject, PartialEq, Eq, Clone, Debug, Arbitrary)]
struct TestStruct {
a: Vec<XFieldElement>,
b: MyEnum,
b: MyStruct,
c: u32,
d: Vec<Digest>,
e: Digest,
Expand Down
2 changes: 1 addition & 1 deletion src/tests_and_benchmarks/ozk/rust_shadows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ pub(super) fn tasmlib_verifier_fri_verify(
fri_parameters: &FriVerify,
) -> Vec<(u32, XFieldElement)> {
let fri = fri_parameters._to_fri();
let tasm_lib_fri: tasm_lib::verifier::fri::verify::FriVerify = fri.clone().into();
let tasm_lib_fri: tasm_lib::verifier::fri::verify::FriVerify = fri.into();
let (advance_nd_digests_by, ret) = SPONGE_STATE.with_borrow_mut(|maybe_sponge_state| {
let sponge_state = maybe_sponge_state.as_mut().unwrap();
let proof_stream_before_fri = proof_iter
Expand Down

0 comments on commit 151cb45

Please sign in to comment.