This repository was archived by the owner on May 7, 2025. It is now read-only.
Refractor of the skeleton and introduction of new instructions#47
Open
hdvanegasm wants to merge 15 commits into
Open
Refractor of the skeleton and introduction of new instructions#47hdvanegasm wants to merge 15 commits into
hdvanegasm wants to merge 15 commits into
Conversation
In this commit, I deleted the Instruction struct making the old Opcode struct to be the one in charge of all of the Instruction functionality. Now, Instruction is an enum and we can implement all the functionalities as implementing it for an enum.
…nd ark-serialize. Also added an import in arithmetic.rs
Inclusion of updates in arkworks-rs/algebra
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
General idea
Given that the current idea of StoffelMPC is to support just the HoneyBadgerMPC protocol, this PR aims to change the skeleton of the library in order to reduce the complexity and to add functionalities specific to the HoneyBadgerMPC protocol. Also, I changed the skeleton, so that the components of the VM resemble something that is more traditional according to other MPC VMs like SCALE-MAMBA and MP-SDPZ.
Changelog
November 17, 2023
ArithmeticCoretoStoffelVMaccording to SCALE-MAMBA specification (Section 5.1). In such framework, there is no private memory for each thread.Public,Secret, andVmType, from theMPCProtocoltrait and added the typeDomain, which is the underlying domain of computation of the protocol.into_vm_typefrom the traitMPCProtocol.November 20, 2023
Sharestruct to hold the share that each party has.NumbertoMpcTypethat will be the trait that groups all the types held by the VM. In particularShare<T>and the field of the curve BLS12_381 implement theMpcTypetrait.MpcTypes. The rationale behind this is that the memory will hold typesShare<T>(for the secret values) andFieldtypes (for the clear values).arkdependencies.November 22, 2023
MemoryAddras a new type for indexing memory positions.processorfield fromInstructionstruct. Now Instruction does not have a generic.codehas been removed fromStoffelVMstruct and it was replaced byprograms: Vec<Program>. Remmeber that we need an Schedule to manage all the programs that are being executed.Schedulestruct to manage the prgrams. However, according to SCALE-MAMBA, the programs vector are inside theSchedulestruct.Memoryto represent the global memory, and the different arrays for each data type areMemoryArraysaiming for a better modularity during the execution.December 1, 2023
From December 4, 2023 to December 7, 2023
num-bigintcrate to perform the arithmetic betweenBigIntegersgiven that this crate supports way more arithmetic operations than the library fromark-ff. I added two functionsfrom_domain_to_bigint<T>()andfrom_domain_to_bigint<T>()to perform this task. We should consider if this is enough or if it needs a better level of abstraction.December 11, 2023 to December 15, 2023.
BigIntegerarkworks-rs/algebra#713