The ordinary case: the records are here, and contribution_fn is
evaluated in-process. contribute() computes the contribution and
encrypts it with the public parameters the site was given when
it was configured, so what leaves is already a ciphertext.
Arguments
- name
short identifier shown in printed output. A single non-empty string; it names the site in every error message, so an empty or vectorized name is rejected at construction.
- state
an environment for mutable bookkeeping — the public parameters the site was given when it was configured, its own key share under threshold keys, and, on the frozen legacy path, the next link in the round-robin chain. Default: a fresh empty env.
- data
whatever
contribution_fnneeds in order to answer — a dataset, a database connection, a cohort identifier.- contribution_fn
a function with signature
function(data, theta)returning this site's contribution atthetaas a plain numeric value. It does not encrypt;contribute()does that. May returnNAto signal thatthetais non-evaluable here.
Value
an S7 object of class LocalSite. Construct with
make_worker().
Details
A LocalSite demonstrates the protocol's roles inside one R
session. It is not a deployment boundary: its data, and under
threshold keys its key share, are objects in this process, and
anything else in this process can reach them. Separating the
parties for real means separately controlled processes, which is
what RemoteSite is for.
