MCPcopy Create free account
hub / github.com/ciphermodelabs/ciphercore / prepare_context

Function prepare_context

ciphercore-base/src/mpc/mpc_truncate.rs:467–480  ·  view source on GitHub ↗
(
        t: Type,
        party_id: IOStatus,
        output_parties: Vec<IOStatus>,
        scale: u128,
        inline_config: InlineConfig,
    )

Source from the content-addressed store, hash-verified

465 use crate::mpc::mpc_compiler::{prepare_for_mpc_evaluation, IOStatus, PARTIES};
466
467 fn prepare_context(
468 t: Type,
469 party_id: IOStatus,
470 output_parties: Vec<IOStatus>,
471 scale: u128,
472 inline_config: InlineConfig,
473 ) -> Result<Context> {
474 let c = simple_context(|g| {
475 let i = g.input(t)?;
476 g.truncate(i, scale)
477 })?;
478
479 prepare_for_mpc_evaluation(c, vec![vec![party_id]], vec![output_parties], inline_config)
480 }
481
482 fn prepare_input(input: Vec<u128>, input_status: IOStatus, t: Type) -> Result<Vec<Value>> {
483 let mpc_input = match t {

Callers 1

truncate_helperFunction · 0.70

Calls 4

simple_contextFunction · 0.85
inputMethod · 0.45
truncateMethod · 0.45

Tested by

no test coverage detected