Data Processing
To start, a group needs to be defined. This is typically done by assigning a group ID and creating a list of peers, as shown below:
And lets assume we have some attestations in AS already:
Once the group is defined, the next step is to search AttestationStation to construct an opinion map. This is done by iterating through each peer in the group and searching for relevant attestations. The pseudo code snippet below demonstrates this process:
In this code, peer_i
and peer_j
represent two peers in the group, and AS.attestations(peer_i, peer_j, group_id)
retrieves the attestation between the two peers for the given group ID. The resulting opinion map, stored in the op_map variable, is a two-dimensional array that maps each peer to a list of their attestations with other peers in the group.
Here's an example of what the opinion map might look like, based on the attestations shown earlier:
Last updated