forked from mirror/go-ethereum
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
1.4 KiB
44 lines
1.4 KiB
6 years ago
|
/*
|
||
6 years ago
|
Package feeds defines Swarm Feeds.
|
||
6 years ago
|
|
||
6 years ago
|
Swarm Feeds allows a user to build an update feed about a particular topic
|
||
6 years ago
|
without resorting to ENS on each update.
|
||
|
The update scheme is built on swarm chunks with chunk keys following
|
||
|
a predictable, versionable pattern.
|
||
|
|
||
6 years ago
|
A Feed is tied to a unique identifier that is deterministically generated out of
|
||
6 years ago
|
the chosen topic.
|
||
|
|
||
6 years ago
|
A Feed is defined as the series of updates of a specific user about a particular topic
|
||
6 years ago
|
|
||
|
Actual data updates are also made in the form of swarm chunks. The keys
|
||
|
of the updates are the hash of a concatenation of properties as follows:
|
||
|
|
||
6 years ago
|
updateAddr = H(Feed, Epoch ID)
|
||
6 years ago
|
where H is the SHA3 hash function
|
||
6 years ago
|
Feed is the combination of Topic and the user address
|
||
6 years ago
|
Epoch ID is a time slot. See the lookup package for more information.
|
||
|
|
||
6 years ago
|
A user looking up a the latest update in a Feed only needs to know the Topic
|
||
|
and the other user's address.
|
||
6 years ago
|
|
||
6 years ago
|
The Feed Update data is:
|
||
|
updatedata = Feed|Epoch|data
|
||
6 years ago
|
|
||
6 years ago
|
The full update data that goes in the chunk payload is:
|
||
6 years ago
|
updatedata|sign(updatedata)
|
||
6 years ago
|
|
||
|
Structure Summary:
|
||
|
|
||
6 years ago
|
Request: Feed Update with signature
|
||
|
Update: headers + data
|
||
6 years ago
|
Header: Protocol version and reserved for future use placeholders
|
||
|
ID: Information about how to locate a specific update
|
||
6 years ago
|
Feed: Represents a user's series of publications about a specific Topic
|
||
6 years ago
|
Topic: Item that the updates are about
|
||
6 years ago
|
User: User who updates the Feed
|
||
6 years ago
|
Epoch: time slot where the update is stored
|
||
|
|
||
|
*/
|
||
6 years ago
|
package feed
|