Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skeleton VM for StoffelMPC #22

Merged
merged 71 commits into from
Jan 27, 2022
Merged

Skeleton VM for StoffelMPC #22

merged 71 commits into from
Jan 27, 2022

Conversation

Mikerah
Copy link
Contributor

@Mikerah Mikerah commented Dec 31, 2021

I started filling out some basics of what behaviors the MPC VM for Stoffel should have. Since there is very little documentation on how the VMs of SCALE-MAMBA and MP-SPDZ behave, we will need to both grok how those operate and then make suitable software engineering decisions on how we will implement them. This PR is mainly for defining the high-level behavior so that we can focus on deeper behaviors as we start to understand how MPC VMs work.

I have opened several issues in which we can discuss implementation details and how they might change due to the needs of MPC, namely #21.

Mikerah and others added 30 commits November 20, 2021 21:22
…rcuits, added common.rs for instructions common to both GC and Arithmetic circuits
@th4s th4s assigned th4s and Mikerah and unassigned Mikerah and th4s Jan 11, 2022
@th4s th4s assigned th4s and Mikerah and unassigned Mikerah and th4s Jan 11, 2022
@Mikerah Mikerah changed the title [WIP] Skeleton VM for StoffelMPC Skeleton VM for StoffelMPC Jan 19, 2022
Copy link
Contributor

@th4s th4s left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some things:

  • Figure out how instructions can manipulate memory.
  • How will vm pc interact with processor pc?

vm/Cargo.toml Outdated Show resolved Hide resolved
vm/src/state.rs Outdated Show resolved Hide resolved
vm/src/state.rs Outdated
Comment on lines 10 to 16
pub(crate) struct Register<T: MPCType>(Vec<T>);

#[derive(Clone, Debug, Default)]
pub(crate) struct StackRegister<T: MPCType>(Vec<T>);

#[derive(Clone, Debug)]
pub(crate) struct Memory<T: MPCType, const N: usize>([T; N]);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, so normally pub is more open than pub(crate).
If there is a pub-"path" to some function/struct/enum you can use it in other modules, and even in other crates. The pub(crate) restricts it to just this crate and it is then not usable in other crates.

vm/src/processors/arithmetic.rs Outdated Show resolved Hide resolved
vm/src/processors/boolean.rs Outdated Show resolved Hide resolved
@Mikerah Mikerah merged commit b43a12b into main Jan 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants