github.com/alexdevranger/node-1.8.27@v0.0.0-20221128213301-aa5841e41d2d/swarm/storage/feed/doc.go (about) 1 /* 2 Package feeds defines Swarm Feeds. 3 4 Swarm Feeds allows a user to build an update feed about a particular topic 5 without resorting to ENS on each update. 6 The update scheme is built on swarm chunks with chunk keys following 7 a predictable, versionable pattern. 8 9 A Feed is tied to a unique identifier that is deterministically generated out of 10 the chosen topic. 11 12 A Feed is defined as the series of updates of a specific user about a particular topic 13 14 Actual data updates are also made in the form of swarm chunks. The keys 15 of the updates are the hash of a concatenation of properties as follows: 16 17 updateAddr = H(Feed, Epoch ID) 18 where H is the SHA3 hash function 19 Feed is the combination of Topic and the user address 20 Epoch ID is a time slot. See the lookup package for more information. 21 22 A user looking up a the latest update in a Feed only needs to know the Topic 23 and the other user's address. 24 25 The Feed Update data is: 26 updatedata = Feed|Epoch|data 27 28 The full update data that goes in the chunk payload is: 29 updatedata|sign(updatedata) 30 31 Structure Summary: 32 33 Request: Feed Update with signature 34 Update: headers + data 35 Header: Protocol version and reserved for future use placeholders 36 ID: Information about how to locate a specific update 37 Feed: Represents a user's series of publications about a specific Topic 38 Topic: Item that the updates are about 39 User: User who updates the Feed 40 Epoch: time slot where the update is stored 41 42 */ 43 package feed