Sources transaction field: SUBMIT_POST #3
Replies: 4 comments 34 replies
-
Hey @HPaulson, congrats for starting the first community proposal discussion in this repo! Overall this is an interesting idea. I have a few thoughts that I think are worth exploring:
My thinking currently is that adding a slice of strings to the transaction wouldn't achieve the desired filtering goals, but I would really like to hear more about this to clear up my understanding! |
Beta Was this translation helpful? Give feedback.
-
i believe its important to be able to pinpoint where a transaction came from, apart from the use case Hunter mentioned, i see a at least one other good case -> forensic investigations of bad actors not sure if the best thing would be a public key associated with them, or some sort of unique hash based on few properties of the node (physical/virtual , network, etc) |
Beta Was this translation helpful? Give feedback.
-
@lazynina What exactly does "the community [...approving] your proposal" consist of? Is the above discussion adequate to request core team approval? If not, what further discussion shall occur? Is there an ideal time period a discussion should be open for before becoming a PR? (Asking more so in general, but applies to this discussion) |
Beta Was this translation helpful? Give feedback.
-
Thanks for the great discussion. Bit of a brain dump here -- I think there's a way to make this work, but below are my concerns/recommendations/questions.
Perhaps instead of source, we can have community agreed upon tags, which are a bit more general - e.g. "high-quality image", "nsfw", etc. However, the categorization of posts may not be efficient to maintain on-chain in the long run. brain dump over - rebooting nina |
Beta Was this translation helpful? Give feedback.
-
CIP: To be assigned
Title:
Sources
field forSUBMIT_POST
transactionsAuthor: Hunter Paulson <@HPaulson>
Discussions URL: #3
Created: 2021-07-07
Note: This is a CIP duplication of bitclout/core #32
One-Line Description
Add a new
Sources
field added toSUBMIT_POST
transaction types to allow applications to specify where a post is meant to display.Explanation and Motivation
As the BitClout ecosystem expands, and many new applications are built on top of the protocol, having a standard for node-specific content will become vital. For example, if an engineer wanted to create an app built on top of the protocol which only displayed posts meant for that app (For example, if you wanted to make a Reddit-like app, it wouldn't make sense to display all posts from all subreddits on one twitter-like feed), the app could formulate a field like such in the request:
Sources: ["myApp.com"]
. BitClout.com, and any other nodes looking to display all content, could use the"Default"
source to signify it displays regular content not specific to an application type. Those nodes could filter by this source. This could allow engineers to display posts only allowed for their source, without doing anything too hacky.I think for the long-term success of BitClout we need many types of applications built on top of the protocol, and additions like this would be very very helpful in accomplishing such.
Specification
Backend
The new field,
Sources: []string
, should be added to typings for bothPostEntryResponse
andSubmitPostRequest
. Additionally, theSubmitPost
function should be updated to include the data fromSources
in its call toCreateSubmitPostTxn
.In addition, the backend should add a conditional to check if a post is meant for the node it's running on -- though it would be at the discretion of the node operator to set such using a comma-separated list of the accepted sources in a backend flag. For example,
--sources "prism.red, love4src.com"
would active such a conditional to only return posts which includeprism.red
ORlove4src.com
in itsSources
array, and no flag would include all posts regardless of itsSources
. BitClout.com's node should be updated accordingly, displaying posts that include theDefault
source.Core
The
CreateSubmitPostTxn
function should be updated to accept theSources
data as a parameter. TheSource
field should also be added to theSubmitPostMetadata
struct with its appropriate[]byte
type. Finally, the usages ofSubmitPostMetadata
should be updated: Main, TestFrontend
The
SubmitPost
method should be updated to includeSources: Array<string>
as an parameter, and should include such as an argument when calling theApi post function
. Additionally, thesubmitPost
method should be updated accordingly, includingSources: ["Default"]
in it's call toSubmitPost()
.Other Solutions
While methods for accomplishing such a task already exist, for example hiding a post by default and making use of
PostExtraData
to identify the source application & if the post is actually hidden or not, however, I think having a standard method of doing such would be a much better, and long-lasting, solution.Backwards Compatibility
There are no known issues with backward compatibility.
Test Cases
The only required test should be an update to
TestSerializeSubmitPost
, as described above.Security Considerations
No known concerns.
Beta Was this translation helpful? Give feedback.
All reactions