Just finished first version of comment edit history plugin, source code is here: https://github.com/abitmore/steem/tree/dev-comment-history-plugin ### How to use 1- Compile In local steemd directory, ``` git remote add abit https://github.com/abitmore/steem.git git fetch abit git checkout v0.14.2 git merge abit/dev-comment-history-plugin git submodule update --init --recursive mkdir build cd build cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_CONTENT_PATCHING=OFF -DLOW_MEMORY_NODE=ON .. make steemd ``` 2- Edit config.ini, enable the plugin and API: ``` # Set an API to be publicly available, may be specified multiple times public-api = database_api login_api comment_history_api # Plugin(s) to enable, may be specified multiple times enable-plugin = witness comment_history ``` 3- Start steemd with --rpc-endpoint and --replay ``` cd /parent/path/to/data /path/to/steemd -s seed.steemed.net:2001 --rpc-endpoint --replay ``` 4- Query ``` wscat -c ws://127.0.0.1:8090/ws/ > {"id": 1, "jsonrpc": "2.0", "method": "call", "params": [2, "get_comment_history", ["bluehorseshoe","a-simple-how-to-charcoal-grill-a-damn-good-t-bone-steak"]]} < {"id":1,"result":[{"author":"bluehorseshoe","permlink":"a-simple-how-to-charcoal-grill-a-damn-good-t-bone-steak","block":5783105,"trx_in_block":2,"op_in_trx":0},{"author":"bluehorseshoe","permlink":"a-simple-how-to-charcoal-grill-a-damn-good-t-bone-steak","block":5783119,"trx_in_block":2,"op_in_trx":0},{"author":"bluehorseshoe","permlink":"a-simple-how-to-charcoal-grill-a-damn-good-t-bone-steak","block":5783196,"trx_in_block":3,"op_in_trx":0},{"author":"bluehorseshoe","permlink":"a-simple-how-to-charcoal-grill-a-damn-good-t-bone-steak","block":5783265,"trx_in_block":5,"op_in_trx":0},{"author":"bluehorseshoe","permlink":"a-simple-how-to-charcoal-grill-a-damn-good-t-bone-steak","block":5783468,"trx_in_block":5,"op_in_trx":0}]} ``` With this API we can get the block number and the transaction id in the block and operation id in the transaction, then we can use `get_block` API to get more detailed data. ### TODO * return detailed data directly? If do, return patched content or the diff only? Please advice. //Update 1: Related feature request on github: https://github.com/steemit/steemit.com/issues/21
author | abit |
---|---|
permlink | steemd-comment-edit-history-plugin-first-version |
category | steem |
json_metadata | {"tags":["steem","dev","plugin"],"links":["https://github.com/abitmore/steem/tree/dev-comment-history-plugin","https://github.com/steemit/steemit.com/issues/21"]} |
created | 2016-10-13 02:44:03 |
last_update | 2016-10-13 02:53:45 |
depth | 0 |
children | 5 |
last_payout | 2016-11-13 04:22:42 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 15.576 HBD |
curator_payout_value | 3.155 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 2,264 |
author_reputation | 141,171,499,037,785 |
root_title | "Steemd Comment Edit History Plugin - First Version" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 1,520,061 |
net_rshares | 28,663,942,214,633 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
neogen1 | 0 | 640,456,662,493 | 100% | ||
hermes | 0 | 674,927,078,235 | 100% | ||
hermes-miner | 0 | 815,832,043,055 | 100% | ||
thorium1 | 0 | 465,036,285,621 | 100% | ||
thorium2 | 0 | 407,310,528,731 | 100% | ||
datasecuritynode | 0 | 5,586,469,484,507 | 100% | ||
bunkermining | 0 | 482,649,290,610 | 100% | ||
bitshares.org | 0 | 207,937,968,588 | 100% | ||
blockchainbunker | 0 | 137,564,880,222 | 100% | ||
blocktech | 0 | 49,490,610,533 | 100% | ||
neominer2016 | 0 | 12,973,005,208 | 100% | ||
abderus | 0 | 206,219,173,185 | 100% | ||
olympus-steemy | 0 | 8,957,954,467 | 100% | ||
hephaestus | 0 | 228,077,134,269 | 100% | ||
aquarius.com | 0 | 114,659,008,472 | 100% | ||
minosman | 0 | 49,994,157,118 | 100% | ||
aphrodite | 0 | 142,871,106,638 | 100% | ||
hotels.com | 0 | 17,409,780,550 | 100% | ||
aries.com | 0 | 14,374,620,941 | 100% | ||
rabbitminer | 0 | 82,841,041,290 | 100% | ||
insurance.com | 0 | 23,384,085,537 | 100% | ||
fund.com | 0 | 102,642,756,709 | 100% | ||
heracles | 0 | 13,785,647,902 | 100% | ||
bunkerchainlabs | 0 | 20,404,938,807 | 100% | ||
rossco99 | 0 | 1,529,044,602,526 | 100% | ||
roadscape | 0 | 7,847,211,776,159 | 100% | ||
boy | 0 | 5,005,927,615 | 100% | ||
bue-witness | 0 | 6,084,779,662 | 100% | ||
bunny | 0 | 1,056,884,345 | 100% | ||
bue | 0 | 92,119,804,265 | 100% | ||
tigerminer | 0 | 1,653,066,170 | 100% | ||
mini | 0 | 2,681,408,820 | 100% | ||
moon | 0 | 343,769,157 | 100% | ||
bhuz | 0 | 2,429,702,196,404 | 100% | ||
boatymcboatface | 0 | 813,212,413,391 | 100% | ||
vip | 0 | 89,068,683,080 | 100% | ||
healthcare | 0 | 1,006,355,021 | 100% | ||
daniel.pan | 0 | 1,577,171,244 | 100% | ||
peerplays | 0 | 198,568,176,270 | 100% | ||
apollo | 0 | 17,142,877,602 | 100% | ||
athena | 0 | 11,062,961,865 | 100% | ||
muses | 0 | 1,784,407,886 | 100% | ||
perseus | 0 | 289,702,725 | 100% | ||
helen.tan | 0 | 463,808,164 | 100% | ||
unosuke | 0 | 39,506,824,650 | 40% | ||
dave-hughes | 0 | 3,118,685,662 | 25% | ||
morning | 0 | 45,873,749,461 | 100% | ||
jademont | 0 | 21,427,658,177 | 100% | ||
fkn | 0 | 1,498,817,418 | 4.5% | ||
paco-steem | 0 | 535,966,985 | 99% | ||
spaninv | 0 | 4,443,832,587 | 99% | ||
elishagh1 | 0 | 2,630,077,616 | 6.75% | ||
cryptoctopus | 0 | 985,440,377,435 | 99% | ||
murh | 0 | 1,718,910,334 | 19.81% | ||
kodi | 0 | 557,257,500 | 100% | ||
theshell | 0 | 85,435,529,746 | 100% | ||
drinkzya | 0 | 7,814,450,719 | 25% | ||
applecrisp | 0 | 1,557,937,122 | 25% | ||
stiletto | 0 | 391,069,762 | 99% | ||
hisnameisolllie | 0 | 154,746,324,493 | 100% | ||
wingz | 0 | 105,794,470,490 | 100% | ||
wongshiying | 0 | 32,150,725,791 | 100% | ||
tee-em | 0 | 9,559,801,977 | 100% | ||
grandpere | 0 | 8,204,651,439 | 99% | ||
christoryan | 0 | 628,515,351 | 25% | ||
kimziv | 0 | 120,951,232,098 | 100% | ||
fyrstikken | 0 | 100,518,512,301 | 10% | ||
clement | 0 | 19,763,515,541 | 100% | ||
azaan | 0 | 1,023,406,027 | 25% | ||
good-karma | 0 | 92,675,746,001 | 100% | ||
orly | 0 | 3,261,281,068 | 100% | ||
konstantin | 0 | 19,933,882,196 | 100% | ||
robrigo | 0 | 241,199,192,944 | 100% | ||
tcfxyz | 0 | 25,173,949,822 | 100% | ||
futurefood | 0 | 9,377,839,430 | 100% | ||
picokernel | 0 | 64,602,916,608 | 100% | ||
furion | 0 | 24,600,775,366 | 10.12% | ||
ausbitbank | 0 | 8,966,884,645 | 25% | ||
steem1653 | 0 | 2,858,637,194 | 100% | ||
akareyon | 0 | 24,773,200,661 | 100% | ||
gikitiki | 0 | 4,801,405,157 | 100% | ||
asim | 0 | 11,185,965,511 | 100% | ||
jesta | 0 | 984,318,078,481 | 100% | ||
snowden | 0 | 81,844,918 | 100% | ||
thegoodguy | 0 | 4,672,431,226 | 100% | ||
biophil | 0 | 39,379,606,064 | 100% | ||
juvyjabian | 0 | 7,792,987,667 | 100% | ||
anduweb | 0 | 19,929,423,224 | 100% | ||
poseidon | 0 | 2,048,067,809 | 25% | ||
bitcoiner | 0 | 1,885,686,509 | 25% | ||
tarindel | 0 | 8,476,147,894 | 100% | ||
deanliu | 0 | 47,983,366,255 | 100% | ||
rea | 0 | 107,661,120,599 | 100% | ||
oecp85 | 0 | 5,375,084,647 | 100% | ||
positive | 0 | 809,384,657 | 3% | ||
yarly | 0 | 1,758,818,502 | 100% | ||
yarly2 | 0 | 262,826,948 | 100% | ||
yarly3 | 0 | 263,219,168 | 100% | ||
yarly4 | 0 | 151,792,316 | 100% | ||
yarly5 | 0 | 152,662,135 | 100% | ||
yarly7 | 0 | 86,965,981 | 100% | ||
anca3drandom | 0 | 42,498,383,547 | 100% | ||
lemooljiang | 0 | 17,241,473,025 | 100% | ||
ace108 | 0 | 4,061,901,714 | 57% | ||
sisterholics | 0 | 22,458,975,818 | 100% | ||
yarly10 | 0 | 422,834,779 | 100% | ||
yarly11 | 0 | 225,675,349 | 100% | ||
royalmacro | 0 | 4,218,336,607 | 25% | ||
yarly12 | 0 | 78,743,746 | 100% | ||
steemster1 | 0 | 108,873,172 | 100% | ||
topten | 0 | 188,537,959 | 100% | ||
glitterpig | 0 | 6,610,879,515 | 100% | ||
bergy | 0 | 2,839,585,944 | 25% | ||
metaflute | 0 | 1,102,836,839 | 100% | ||
sharon | 0 | 51,143,991 | 100% | ||
lillianjones | 0 | 50,742,911 | 100% | ||
laonie | 0 | 700,865,396,201 | 100% | ||
timcliff | 0 | 23,218,301,805 | 100% | ||
myfirst | 0 | 25,147,588,214 | 100% | ||
somebody | 0 | 152,835,445,338 | 100% | ||
kingofcoin | 0 | 299,811,451 | 100% | ||
flysaga | 0 | 5,700,743,721 | 100% | ||
midnightoil | 0 | 32,457,920,538 | 100% | ||
cjclaro | 0 | 7,250,337,229 | 50% | ||
steemleak | 0 | 1,404,632,093 | 25% | ||
elfkitchen | 0 | 8,832,728,726 | 100% | ||
fishingvideos | 0 | 4,891,049,781 | 100% | ||
xiaokongcom | 0 | 2,781,793,579 | 100% | ||
msjennifer | 0 | 51,143,767 | 100% | ||
ciao | 0 | 50,841,397 | 100% | ||
steemo | 0 | 50,521,096 | 100% | ||
xianjun | 0 | 5,310,948,975 | 100% | ||
steema | 0 | 50,390,768 | 100% | ||
confucius | 0 | 51,841,614 | 100% | ||
miacats | 0 | 113,267,603,053 | 98% | ||
bitcalm | 0 | 79,639,651,049 | 100% | ||
jarvis | 0 | 51,166,070 | 100% | ||
microluck | 0 | 342,981,299 | 100% | ||
fortuner | 0 | 50,692,212 | 100% | ||
bolekilolek | 0 | 57,795,833 | 100% | ||
johnbyrd | 0 | 50,698,107 | 100% | ||
thomasaustin | 0 | 50,682,252 | 100% | ||
thermor | 0 | 50,680,459 | 100% | ||
ficholl | 0 | 50,691,211 | 100% | ||
widell | 0 | 50,673,817 | 100% | ||
unnsmed | 0 | 54,032,538 | 100% | ||
revelbrooks | 0 | 50,311,250 | 100% | ||
dave-mohican | 0 | 109,128,769 | 25% | ||
imag1ne | 0 | 4,294,047,215 | 100% | ||
curpose | 0 | 50,416,427 | 100% | ||
laonie11 | 0 | 12,359,579,295 | 100% | ||
troich | 0 | 50,588,612 | 100% | ||
crion | 0 | 50,593,879 | 100% | ||
hitherise | 0 | 50,271,139 | 100% | ||
wiss | 0 | 50,262,756 | 100% | ||
stroully | 0 | 51,033,798 | 100% | ||
debmund | 0 | 187,268,452 | 25% | ||
thadm | 0 | 50,712,038 | 100% | ||
prof | 0 | 50,710,305 | 100% | ||
yorsens | 0 | 50,370,757 | 100% | ||
bane | 0 | 50,065,875 | 100% | ||
vive | 0 | 50,059,754 | 100% | ||
coad | 0 | 50,054,445 | 100% | ||
dubi | 0 | 102,614,014,729 | 100% | ||
sofa | 0 | 50,840,303 | 100% | ||
ailo | 0 | 50,933,404 | 100% | ||
bestoftherest | 0 | 145,091,011 | 100% | ||
paxmagnus | 0 | 14,578,850,332 | 100% | ||
nelyp | 0 | 3,047,971,389 | 100% | ||
michelle.gent | 0 | 11,070,223,807 | 100% | ||
eavy | 0 | 50,441,122 | 100% | ||
roto | 0 | 50,454,901 | 100% | ||
psyduck | 0 | 103,737,193 | 100% | ||
stringer | 0 | 103,102,425 | 100% | ||
xiaofang | 0 | 3,166,105,319 | 100% | ||
igtes | 0 | 51,787,544 | 100% | ||
buffett | 0 | 103,095,100 | 100% | ||
birds90 | 0 | 5,745,744,352 | 100% | ||
bjloves | 0 | 2,128,741,762 | 100% | ||
msgjhiepenaranda | 0 | 157,094,666 | 100% | ||
dianargenti | 0 | 767,235,385 | 100% | ||
storage | 0 | 59,868,240 | 100% | ||
blackmarket | 0 | 53,303,811 | 100% | ||
gifts | 0 | 50,162,950 | 100% | ||
toddemaher1 | 0 | 109,714,291 | 100% | ||
psitorn | 0 | 1,048,394,858 | 25% | ||
thegoodvybe | 0 | 51,690,966 | 100% | ||
dongu | 0 | 156,594,026,680 | 100% | ||
vickymcm172 | 0 | 112,895,874 | 100% |
Hope to see this in a release soon! I suggest returning the patched content as this will make it less work for end clients.
author | bitcoiner |
---|---|
permlink | re-abit-steemd-comment-edit-history-plugin-first-version-20161013t055014154z |
category | steem |
json_metadata | {"tags":["steem"]} |
created | 2016-10-13 05:50:12 |
last_update | 2016-10-13 05:50:12 |
depth | 1 |
children | 1 |
last_payout | 2016-11-13 04:22:42 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 123 |
author_reputation | 28,017,014,641,958 |
root_title | "Steemd Comment Edit History Plugin - First Version" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 1,520,965 |
net_rshares | 155,538,787,840 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
abit | 0 | 155,538,787,840 | 1% |
Thanks for discussing. If the node or plugin store a copy of full content for every patch, it will definitely use a lot of RAM. From this point of view I tend to encourage clients to apply patches by their own. If the node/API re-apply patches for every query, it will probably be expensive to compute, but seems doable.
author | abit |
---|---|
permlink | re-bitcoiner-re-abit-steemd-comment-edit-history-plugin-first-version-20161013t080946005z |
category | steem |
json_metadata | {"tags":["steem"]} |
created | 2016-10-13 08:09:45 |
last_update | 2016-10-13 08:09:45 |
depth | 2 |
children | 0 |
last_payout | 2016-11-13 04:22:42 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 320 |
author_reputation | 141,171,499,037,785 |
root_title | "Steemd Comment Edit History Plugin - First Version" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 1,521,551 |
net_rshares | 7,254,553,702 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
bitcoiner | 0 | 7,254,553,702 | 100% |
What is the purpose of this? See how one edited his comment?
author | james-show |
---|---|
permlink | re-abit-steemd-comment-edit-history-plugin-first-version-20161013t025207450z |
category | steem |
json_metadata | {"tags":["steem"]} |
created | 2016-10-13 02:52:12 |
last_update | 2016-10-13 02:52:12 |
depth | 1 |
children | 1 |
last_payout | 2016-11-13 04:22:42 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 60 |
author_reputation | 5,698,866,469,447 |
root_title | "Steemd Comment Edit History Plugin - First Version" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 1,520,113 |
net_rshares | 0 |
Yes.
author | abit |
---|---|
permlink | re-james-show-re-abit-steemd-comment-edit-history-plugin-first-version-20161013t025248735z |
category | steem |
json_metadata | {"tags":["steem"]} |
created | 2016-10-13 02:52:48 |
last_update | 2016-10-13 02:52:48 |
depth | 2 |
children | 0 |
last_payout | 2016-11-13 04:22:42 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 4 |
author_reputation | 141,171,499,037,785 |
root_title | "Steemd Comment Edit History Plugin - First Version" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 1,520,117 |
net_rshares | 0 |
cool. Tech Genius FTW!
author | quinneaker |
---|---|
permlink | re-abit-steemd-comment-edit-history-plugin-first-version-20161013t031311194z |
category | steem |
json_metadata | {"tags":["steem"]} |
created | 2016-10-13 03:13:12 |
last_update | 2016-10-13 03:13:12 |
depth | 1 |
children | 0 |
last_payout | 2016-11-13 04:22:42 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 22 |
author_reputation | 326,681,856,591,722 |
root_title | "Steemd Comment Edit History Plugin - First Version" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 1,520,242 |
net_rshares | 0 |