You are viewing a single comment's thread from:

RE: Pocket Protocol

in #pocket5 years ago

Still new to the blockchain dev side. But when you create a comment, there is a function that calculates the permlink of the comment then you use it as part of the broadcast command. That permlink is a concaténation various metadata a time stamp. Maybe a solution would be to let the confirmer generate the permalink in such a way that any confirmation to the same send transaction is always unique: re-permlink-of-send-comment-confirmer. As permlink needs to be unique only the first who sends the confirmation would be recorded. Just a thought...


It's a good idea, but it's vulnerable to an attack that could totally shut down pocket: a bad guy could just reply to every pocket op with the reserved permlink and an empty comment, rendering the op unconfirmable.

Good point

Regarding replay from genesis. Would using something like SteemSQL or SteemData (MongoDB) helps with speed? We could query only posts that contains valid pocket op and process them. And instead of keeping an list of all users and their post count it can add them as it finds them in a valid post. After a replay it can use the blockchain directly.

I haven't used those services, so I don't know their capabilities. However, a query on posts wouldn't work because a single post can contain multiple pocket operations due to editing. You really do have to query the blockchain directly.

But if there is a service that lets you see something about what is in a block before you download the whole thing, that could be very helpful. For example, if a block is outside the Genesis interval and it contains no comment ops, then it's not relevant to pocket. That sort of thing.

Also, you only need the first 30-40 characters of a pocketsend to check it it's valid. Don't know if that helps any.

I’ll investigate. I think there is a way to get the last version of a post. And maybe a way to get the block details by doing two calls, one to get a preview of the content and another one if we detect a comment op.

Coin Marketplace

STEEM 0.19
TRX 0.08
JST 0.023
BTC 27862.22
ETH 1906.89
USDT 1.00
SBD 2.20