Architecture

P2P networks are used exclusively to maximise trustlessnes.

Below you may find a schematic presentation of the two scripts running on the Fluence network and the connections they make with the other P2P networks:

  1. The poll script (to the right) uses the event filters to capture events on the blockchain that signal that a vote has been cast.
  2. When a vote event is captured, the id of the vote is used to collect the latest state of the vote from the subgraph.
  3. With the latest data an html/css/js widget is created.
  4. The cid for the head of the data collection is retrieved from a text filed in an ens resolver contract.
  5. The data collection tree is rebuild from bottom up with the new data and the updated widget and published on ipfs.
  6. The dnslink for public-record.org is updated with the cid for the new head of the data collection.
  7. The cid for the new head of the data collection is written to the ens resolver contract.