Architecture
P2P networks are used exclusively to maximise trustlessnes.
- (Ethereum) a layer one blockchain to store key data in cases where ownership and write permissions require transparency.
- (IPFS) a content addressed storage network that ensures authenticity of data and content,
- (The Graph) an indexing protocol to efficiently query blockchain data,
- (Fluence) a programmable P2P network that can run autonomous scripts bridging between the aforementioned three P2P networks
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:
- The filter script (to the left) creates event filters (listeners) for each of the DAO's that subscribe to the Public Record DAO
- The poll script (to the right) uses the event filters to capture events on the blockchain that signal that a vote has been cast.
- When a vote event is captured, the id of the vote is used to collect the latest state of the vote from the subgraph.
- With the latest data an html/css/js widget is created.
- The cid for the head of the data collection is retrieved from a text filed in an ens resolver contract.
- The data collection tree is rebuild from bottom up with the new data and the updated widget and published on ipfs.
- The dnslink for public-record.org is updated with the cid for the new head of the data collection.
- The cid for the new head of the data collection is written to the ens resolver contract.