Good news! Radiator got some bug fixes. Nothing all that important, but I also did a bit of the groundwork needed to support transaction singing. In this update: * Logging support, mainly because some annoying messages started showing up from Hashie. * A quick price feed history lookup. * A few missing RPC method names. * Bug fix for when streaming and there are no transactions in the block. It happens. * Improved tests. --- #### Transaction Signing, almost. Because of [Dan's post](https://steemit.com/steem/@dantheman/steem-and-bitshares-cryptographic-security-update), I have to say, that cleared up a bit of confusion on my part. It's not like I've been working on this since November, but every time I looked at the code examples, I just didn't know what to make of it. But now, I think I'm pretty much up to speed. There's only one problem. I can't get it to work. And it's a problem that has been described before, I just need to research it a bit more. The problem I'm having is, when I build a transaction and broadcast it, I get this message: `tx_missing_posting_auth` I'm having trouble finding where my mistake is. I'm aware that if, for instance, you don't format the timestamp correctly, you might get this message. In fact, it seems like this is what you get when the node can't figure out what you're doing. But I'm sure it's all on my end. And I'm sure it's simple. If you want to take a stab at troubleshooting, I recommend starting here: https://github.com/inertia186/radiator/blob/master/test/radiator/transaction_test.rb#L22 This test is supposed to mirror what @xeroc documented here: https://steemit.com/steem/@xeroc/steem-transaction-signing-in-a-nutshell It does so to the best of my ability, yet the message I get when I run it on a live console is `tx_missing_posting_auth`, like I mentioned. Anyway, I'll keep troubleshooting. --- **UPDATE:** Troubleshooting complete. Radiator is now able to sign transactions. I just need to make it aware of all operations because for testing purposes, it only supports `vote`. But here's an example of that: ```ruby require 'radiator' transaction = Radiator::Transaction.new(wif: '5JLw5dgQAx6rhZEgNN5C2ds1V47RweGshynFSWFbaMohsYsBvE8') vote = { type: :vote, voter: 'xeroc', author: 'xeroc', permlink: 'piston', weight: 10000 } operation = Radiator::Operation.new(vote) transaction.operations << operation transaction.process(true) ``` ---  Related Links: * Original announcement: [radiator - STEEM Ruby API Client](https://steemit.com/steem/@inertia/radiator-steem-ruby-api-client) * Previous Update: [Radiator Update: Streaming](https://steemit.com/radiator/@inertia/radiator-update-streaming) * GitHub: [https://github.com/inertia186/radiator](https://github.com/inertia186/radiator) * Tags: [#radiator](https://steemit.com/created/radiator), [#ruby](https://steemit.com/created/ruby)
author | inertia |
---|---|
permlink | radiator-update-getting-ready-for-transaction-signing |
category | radiator |
json_metadata | {"tags":["radiator","ruby","api","steem","update"],"users":["xeroc"],"image":["http://www.steemimg.com/images/2016/08/19/RadiatorCoolingFan-54in-Webfdcb1.png"],"links":["https://steemit.com/steem/@dantheman/steem-and-bitshares-cryptographic-security-update","https://github.com/inertia186/radiator/blob/master/test/radiator/transaction_test.rb#L22","https://steemit.com/steem/@xeroc/steem-transaction-signing-in-a-nutshell","https://steemit.com/steem/@inertia/radiator-steem-ruby-api-client","https://steemit.com/radiator/@inertia/radiator-update-streaming","https://github.com/inertia186/radiator","https://steemit.com/created/radiator","https://steemit.com/created/ruby"],"app":"steemit/0.1","format":"markdown"} |
created | 2017-02-25 06:55:00 |
last_update | 2017-02-25 21:24:24 |
depth | 0 |
children | 12 |
last_payout | 2017-03-28 08:19:15 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 38.194 HBD |
curator_payout_value | 1.034 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 2,992 |
author_reputation | 346,568,901,399,561 |
root_title | "Radiator Update: Getting Ready for Transaction Signing" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 0 |
post_id | 2,588,850 |
net_rshares | 46,242,426,607,611 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
penambang | 0 | 35,231,808,538 | 100% | ||
tombstone | 0 | 19,665,619,581,929 | 100% | ||
sandra | 0 | 53,636,481,178 | 80% | ||
abit | 0 | 621,986,794,841 | 1% | ||
ihashfury | 0 | 60,476,946,595 | 55.2% | ||
roadscape | 0 | 8,903,580,524,099 | 100% | ||
wang | 0 | 153,027,539,637 | 1% | ||
adm | 0 | -5,015,046,704,792 | -100% | ||
boy | 0 | 21,746,184,110 | 100% | ||
xeroc | 0 | 2,150,207,627,180 | 100% | ||
steem-id | 0 | 178,787,921,033 | 100% | ||
bue-witness | 0 | 26,493,755,822 | 100% | ||
bunny | 0 | 3,944,678,133 | 100% | ||
bue | 0 | 422,548,657,960 | 100% | ||
mini | 0 | 11,631,481,633 | 100% | ||
moon | 0 | 1,480,874,790 | 100% | ||
aizensou | 0 | 658,671,597,447 | 100% | ||
jason | 0 | 40,638,094,786 | 55.2% | ||
pfunk | 0 | 827,273,325,149 | 100% | ||
pairmike | 0 | 3,726,450,461 | 1% | ||
pheonike | 0 | 11,537,760,195 | 6% | ||
proctologic | 0 | 98,768,828,650 | 70% | ||
healthcare | 0 | 4,346,627,062 | 100% | ||
abcd | 0 | 3,151,605,808 | 100% | ||
daniel.pan | 0 | 6,866,844,038 | 100% | ||
konelectric | 0 | 812,091,563 | 1% | ||
jchch | 0 | 97,735,923,911 | 100% | ||
proctologic2 | 0 | 209,629,474 | 70% | ||
ilanaakoundi | 0 | 80,735,925,993 | 100% | ||
helen.tan | 0 | 1,992,709,897 | 100% | ||
escrow | 0 | 482,932,652 | 100% | ||
proctologic3 | 0 | 546,396,959 | 70% | ||
jamtaylor | 0 | 55,495,525,524 | 100% | ||
leesunmoo | 0 | 716,103,713,249 | 100% | ||
forrestwillie | 0 | 646,546,705 | 1% | ||
teamsteem | 0 | 427,974,147,158 | 100% | ||
cryptoctopus | 0 | 1,369,415,425,038 | 100% | ||
blakemiles84 | 0 | 286,083,284,689 | 100% | ||
dragonslayer109 | 0 | 378,130,339,988 | 100% | ||
thecryptofiend | 0 | 281,520,771,141 | 100% | ||
justtryme90 | 0 | 107,479,548,276 | 40% | ||
applecrisp | 0 | 286,262,391 | 20% | ||
hisnameisolllie | 0 | 48,929,722,588 | 100% | ||
juanmiguelsalas | 0 | 35,255,689,160 | 100% | ||
pangur-ban | 0 | 2,267,857,772 | 100% | ||
andrei | 0 | 252,344,819 | 1% | ||
schro | 0 | 75,634,252,410 | 100% | ||
tee-em | 0 | 70,980,902,153 | 100% | ||
crok | 0 | 4,178,114,096 | 100% | ||
grey580 | 0 | 373,784,258 | 1% | ||
bacchist | 0 | 126,973,375,676 | 100% | ||
artem-sokoloff | 0 | 9,034,458,438 | 100% | ||
good-karma | 0 | 10,930,379,859 | 1% | ||
picokernel | 0 | 181,447,052,915 | 100% | ||
vi1son | 0 | 36,157,812,727 | 100% | ||
ausbitbank | 0 | 130,077,572,881 | 100% | ||
steem1653 | 0 | 3,717,591,813 | 90% | ||
steemit-life | 0 | 175,747,792,209 | 60% | ||
bitland | 0 | 1,875,011,829 | 22% | ||
speda | 0 | 70,171,597,385 | 100% | ||
jamesjarman | 0 | 1,703,113,676 | 1% | ||
transisto | 0 | 5,629,343,532,653 | 55% | ||
meesterboom | 0 | 81,685,854,156 | 100% | ||
mapipaz | 0 | 1,401,596,710 | 100% | ||
karenmckersie | 0 | 1,796,297,236 | 1% | ||
inertia | 0 | 232,549,158,080 | 100% | ||
rouketas | 0 | 58,345,276 | 100% | ||
arcange | 0 | 34,663,001,513 | 100% | ||
demotruk | 0 | 717,238,439,047 | 100% | ||
coininstant | 0 | 71,069,472,397 | 100% | ||
thylbom | 0 | 205,415,241,869 | 100% | ||
ubg | 0 | 587,434,810 | 1% | ||
bitcoiner | 0 | 41,748,312,665 | 100% | ||
bola | 0 | 14,778,262,499 | 40% | ||
celsius100 | 0 | 45,280,583,542 | 100% | ||
sokal | 0 | 2,436,914,707 | 100% | ||
seb | 0 | 1,143,807,433 | 100% | ||
raymonjohnstone | 0 | 9,216,310,462 | 100% | ||
sokoloffa | 0 | 14,851,009,951 | 100% | ||
mysteem | 0 | 108,108,435 | 1% | ||
royalmacro | 0 | 29,675,148,291 | 70% | ||
greymass | 0 | 31,386,407,050 | 100% | ||
originate | 0 | 226,001,170,676 | 100% | ||
dirty.hera | 0 | 190,790,503 | 100% | ||
craigslist | 0 | 2,945,250,947 | 100% | ||
allasyummyfood | 0 | 127,346,354,473 | 100% | ||
felixxx | 0 | 58,776,367,832 | 100% | ||
toxichan | 0 | 162,279,423 | 1% | ||
timelapse | 0 | 462,632,014 | 1% | ||
achim86 | 0 | 28,959,793,735 | 100% | ||
steemleak | 0 | 5,025,000,726 | 100% | ||
d3nv3r | 0 | 3,120,503,962 | 50% | ||
dolov | 0 | 1,547,372,306 | 50% | ||
tannukas6 | 0 | 63,575,178 | 1% | ||
steemradio | 0 | 1,050,786,896 | 100% | ||
randyclemens | 0 | 4,328,787,325 | 100% | ||
darthnava | 0 | 373,703,143 | 1% | ||
borran | 0 | 12,700,101,640 | 100% | ||
ioc | 0 | 1,029,984,388,700 | 100% | ||
virtualgrowth | 0 | 6,881,246,499 | 30% | ||
lamech-m | 0 | 4,937,644,524 | 100% | ||
ripplerm | 0 | 13,938,105,350 | 100% | ||
neptun | 0 | 244,187,449,502 | 100% | ||
jsantana | 0 | 821,000,715 | 0.1% | ||
jyp | 0 | 134,367,387,889 | 100% | ||
sethlinson | 0 | 4,034,042,380 | 20% | ||
hilarski | 0 | 48,058,238,580 | 20% | ||
ats-david | 0 | 276,812,232,917 | 100% | ||
barrydutton | 0 | 1,234,186,726 | 1% | ||
stephenkendal | 0 | 34,845,268,772 | 100% | ||
sneak | 0 | 67,606,872,344 | 100% | ||
steemitguide | 0 | 629,002,423 | 1% | ||
richardcrill | 0 | 1,439,780,191 | 1% | ||
l0k1 | 0 | 157,437,734,184 | 80% | ||
betamusic | 0 | 24,955,932,754 | 100% | ||
maarnio | 0 | 7,731,029,700 | 100% | ||
ebargains | 0 | 36,836,719,230 | 100% | ||
jacobts | 0 | 229,268,447 | 1% | ||
finleyexp | 0 | 51,098,890 | 1% | ||
jsg | 0 | 81,744,124,339 | 100% | ||
patelincho | 0 | 110,945,336 | 1% | ||
littlescribe | 0 | 17,731,649,314 | 100% | ||
burnin | 0 | 11,916,201,301 | 100% | ||
bestoftherest | 0 | 4,600,051,085 | 100% | ||
bitcoinparadise | 0 | 24,914,284,315 | 100% | ||
whatsup | 0 | 43,949,871,217 | 100% | ||
paxmagnus | 0 | 18,670,619,881 | 100% | ||
michelle.gent | 0 | 158,349,154,583 | 100% | ||
thegame | 0 | 1,559,776,399 | 30% | ||
surpassinggoogle | 0 | 12,528,944,193 | 100% | ||
steembets | 0 | 1,584,003,190 | 30% | ||
dodders007 | 0 | 47,605,059,453 | 100% | ||
walden | 0 | 8,413,101,425 | 100% | ||
thesteemawards | 0 | 482,512,769 | 20% | ||
abdullar | 0 | 1,932,005,706,859 | 100% | ||
ninkhisibir | 0 | 5,786,819,348 | 100% | ||
gamer00 | 0 | 4,456,608,499 | 1% | ||
steem-meme | 0 | 1,925,634,847 | 20% | ||
revostrike | 0 | 115,659,937 | 1% | ||
sunscape | 0 | 10,439,326,519 | 20% | ||
giantbear | 0 | 1,237,406,087 | 1% | ||
stray | 0 | 422,823,447 | 1% | ||
supergoodliving | 0 | 29,652,404,702 | 100% | ||
meanpeoplesuck | 0 | 139,733,556 | 100% | ||
lovethepeople | 0 | 95,042,573 | 70% | ||
daisyd | 0 | 241,039,027 | 1% | ||
vladtheimpaler | 0 | 1,931,714,382 | 100% | ||
steemland.com | 0 | 1,584,136,522 | 30% | ||
porco-bastardo | 0 | 92,354,860 | 70% | ||
angel76 | 0 | 13,400,649,838 | 100% | ||
sqube | 0 | 2,967,917,826 | 1% | ||
whatageek | 0 | 691,735,830 | 1% | ||
crowdfundedwhale | 0 | 35,307,622,200 | 60% | ||
trans-juanmi | 0 | 6,195,099,449 | 60% | ||
doodleman | 0 | 12,743,420,878 | 100% | ||
gutzofter | 0 | 67,372,735,582 | 100% | ||
fosho | 0 | 242,475,492 | 40% | ||
smysullivan | 0 | 5,914,293,506 | 50% | ||
steemprentice | 0 | 13,686,820,713 | 30% | ||
reisman | 0 | 242,533,778 | 1% | ||
ourlifestory | 0 | 36,005,323,794 | 100% | ||
irawandedy | 0 | 1,225,050,548 | 100% | ||
seablue | 0 | 342,863,994 | 1% | ||
writingamigo | 0 | 41,578,521,760 | 100% | ||
juliosalas | 0 | 1,000,982,509 | 60% | ||
meysam | 0 | 507,674,386 | 1% | ||
kyra-kristian | 0 | 77,542,766 | 100% | ||
throughtheglass | 0 | 4,703,742,836 | 70% | ||
jphenderson | 0 | 452,739,084 | 30% | ||
akbar-nur | 0 | 0 | 100% | ||
tamersameeh | 0 | 561,699,402 | 100% | ||
stmdxrafi | 0 | 122,844,726 | 100% | ||
johnthehoan | 0 | 582,357,809 | 100% | ||
mathworksheets | 0 | 2,059,708,770 | 100% | ||
steemnews24 | 0 | 127,051,590 | 100% | ||
alexandergomez | 0 | 31,263,396,294 | 100% | ||
darth-azrael | 0 | 3,465,054,936 | 70% | ||
driptorchpress | 0 | 76,911,711 | 1% | ||
barvon | 0 | 6,739,362,836 | 100% | ||
fisteganos | 0 | 3,844,258,542 | 40% | ||
thedeplorable1 | 0 | 526,993,204 | 1% | ||
k3t3r | 0 | 32,014,851,162 | 100% | ||
ogochukwu | 0 | 254,053,476 | 1% | ||
tonylondon | 0 | 606,440,314 | 100% | ||
esterinapeka | 0 | 1,688,759,991 | 100% | ||
michaelnonso | 0 | 80,110,578 | 100% | ||
benjiparler | 0 | 427,601,319 | 100% | ||
t4st3r | 0 | 1,760,656,257 | 100% | ||
denmarkguy | 0 | 246,809,579 | 1% | ||
mestyz | 0 | 116,144,418 | 100% | ||
vegaiq | 0 | 334,520,143 | 100% | ||
filotasriza3 | 0 | 4,599,768,237 | 100% | ||
emeka | 0 | 98,343,575 | 100% | ||
decentralizd | 0 | 300,560,559 | 100% | ||
kamidela | 0 | 51,025,493 | 100% | ||
poksinblog | 0 | 211,354,858 | 100% | ||
bookman | 0 | 2,885,318,358 | 100% | ||
pepe.maya | 0 | 0 | 100% | ||
mrmoneyman | 0 | 232,964,908 | 100% | ||
zeteticmindset | 0 | 0 | 100% |
> tx_missing_posting_auth the message state that your txn doesn't had the correct signature. either you signed it with wrong a key, or there's a problem with your signing algorithm.
author | ripplerm |
---|---|
permlink | re-inertia-radiator-update-getting-ready-for-transaction-signing-20170225t191905762z |
category | radiator |
json_metadata | {"tags":["radiator"],"app":"steemit/0.1"} |
created | 2017-02-25 19:19:03 |
last_update | 2017-02-25 19:19:03 |
depth | 1 |
children | 0 |
last_payout | 2017-03-28 08:19:15 |
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 | 184 |
author_reputation | 12,900,481,895,884 |
root_title | "Radiator Update: Getting Ready for Transaction Signing" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 2,592,309 |
net_rshares | 0 |
I'm not familiar with ruby... am i understand correctly that the tx.expiration keep changing on each loop of signature generation? ``` loop do @expiration += 1 sig = ec.sign_compact(digest_hex, @private_key.priv, public_key_hex) next if public_key_hex != ec.recover_compact(digest_hex, sig) return sig if canonical? sig end ``` https://github.com/inertia186/radiator/blob/master/lib/radiator/transaction.rb#L102
author | ripplerm |
---|---|
permlink | re-inertia-radiator-update-getting-ready-for-transaction-signing-20170226t083423245z |
category | radiator |
json_metadata | {"tags":["radiator"],"links":["https://github.com/inertia186/radiator/blob/master/lib/radiator/transaction.rb#L102"],"app":"steemit/0.1"} |
created | 2017-02-26 08:34:21 |
last_update | 2017-02-26 08:34:21 |
depth | 1 |
children | 3 |
last_payout | 2017-03-28 08:19:15 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.094 HBD |
curator_payout_value | 0.010 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 476 |
author_reputation | 12,900,481,895,884 |
root_title | "Radiator Update: Getting Ready for Transaction Signing" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 2,596,044 |
net_rshares | 231,208,294,745 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
inertia | 0 | 228,688,406,118 | 100% | ||
seb | 0 | 1,143,807,433 | 100% | ||
tamersameeh | 0 | 655,366,987 | 100% | ||
johnthehoan | 0 | 604,568,956 | 100% | ||
mestyz | 0 | 116,145,251 | 100% |
Correct. It adds a second for each generation attempt. That's probably way too much time to add, but it hasn't been an issue. Graphenej does this too, but they only add 1 millisecond per iteration. I should probably do the same. https://github.com/kenCode-de/graphenej/blob/master/graphenej/src/main/java/de/bitsharesmunich/graphenej/Transaction.java#L145
author | inertia |
---|---|
permlink | re-ripplerm-re-inertia-radiator-update-getting-ready-for-transaction-signing-20170226t084107309z |
category | radiator |
json_metadata | {"tags":["radiator"],"links":["https://github.com/kenCode-de/graphenej/blob/master/graphenej/src/main/java/de/bitsharesmunich/graphenej/Transaction.java#L145"],"app":"steemit/0.1"} |
created | 2017-02-26 08:41:06 |
last_update | 2017-02-26 08:41:06 |
depth | 2 |
children | 2 |
last_payout | 2017-03-28 08:19:15 |
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 | 360 |
author_reputation | 346,568,901,399,561 |
root_title | "Radiator Update: Getting Ready for Transaction Signing" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 2,596,078 |
net_rshares | 13,938,126,173 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
ripplerm | 0 | 13,938,126,173 | 100% |
this step is redundant IMO.... but it's okay if the users are aware of it. - he can't set a fixed expiration, - tx_id can't be determined until signing done.
author | ripplerm |
---|---|
permlink | re-inertia-re-ripplerm-re-inertia-radiator-update-getting-ready-for-transaction-signing-20170226t090410051z |
category | radiator |
json_metadata | {"tags":["radiator"],"app":"steemit/0.1"} |
created | 2017-02-26 09:04:09 |
last_update | 2017-02-26 09:04:09 |
depth | 3 |
children | 1 |
last_payout | 2017-03-28 08:19:15 |
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 | 160 |
author_reputation | 12,900,481,895,884 |
root_title | "Radiator Update: Getting Ready for Transaction Signing" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 2,596,164 |
net_rshares | 0 |
Perhaps create the same signed tx with steem.js and radiator and diff them? Example failed txes/code here in comments might allow some community members to help out.
author | sneak |
---|---|
permlink | re-inertia-radiator-update-getting-ready-for-transaction-signing-20170225t092837064z |
category | radiator |
json_metadata | {"tags":["radiator"],"app":"steemit/0.1"} |
created | 2017-02-25 09:28:36 |
last_update | 2017-02-25 09:28:36 |
depth | 1 |
children | 4 |
last_payout | 2017-03-28 08:19:15 |
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 | 166 |
author_reputation | 28,694,344,106,492 |
root_title | "Radiator Update: Getting Ready for Transaction Signing" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 2,589,267 |
net_rshares | 233,910,741,949 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
inertia | 0 | 232,549,501,676 | 100% | ||
rouketas | 0 | 50,010,236 | 100% | ||
tamersameeh | 0 | 561,699,402 | 100% | ||
johnthehoan | 0 | 582,360,724 | 100% | ||
mestyz | 0 | 116,144,418 | 100% | ||
kamidela | 0 | 51,025,493 | 100% |
Yep, good point. I should probably make sure the digest hash is the same in `steem.js` just before it signs. To that end, here's the ruby code to set up the initial conditions: ```ruby options = { wif: '5JLw5dgQAx6rhZEgNN5C2ds1V47RweGshynFSWFbaMohsYsBvE8', ref_block_num: 36029, ref_block_prefix: 1164960351, expiration: Time.parse('2016-08-08T12:24:17 Z'), } @transaction = Radiator::Transaction.new(options) ``` I'm using the wif and block data @xeroc uses in his examples so the serialization matches, which it does. Normally, from the console, these things and the timestamp are based on what the blockchain says + 30 seconds. I tried 15 seconds just now, no-go. The purpose of this comment is to make sure the digest (hash) is correct. Anyway, this creates the transaction data: ```ruby vote = { type: :vote, voter: 'xeroc', author: 'xeroc', permlink: 'piston', weight: 10000 } operation = Radiator::Operation.new(vote) @transaction.operations << operation refute_nil bytes = @transaction.send(:to_bytes) ``` Which creates a serialization: ``` 0000000000000000000000000000000000000000000000000000000000000000BD8C5FE26F45F179A8570100057865726F63057865726F6306706973746F6E102700 ``` And a corresponding hash (aka digest via `Digest::SHA256.digest` in ruby) that is ready to sign: ``` 582176B1DAF89984BC8B4FDCB24FF1433D1EB114A8C4BF20FB22AD580D035889 ``` Note, I hexlified the final hash here so I can post it for reference. *Normally*, the hash is signed without the hexilfy step.
author | inertia |
---|---|
permlink | re-sneak-re-inertia-radiator-update-getting-ready-for-transaction-signing-20170225t095956230z |
category | radiator |
json_metadata | {"tags":["radiator"],"users":["xeroc"],"app":"steemit/0.1"} |
created | 2017-02-25 09:59:57 |
last_update | 2017-02-25 09:59:57 |
depth | 2 |
children | 3 |
last_payout | 2017-03-28 08:19:15 |
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 | 1,638 |
author_reputation | 346,568,901,399,561 |
root_title | "Radiator Update: Getting Ready for Transaction Signing" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 2,589,357 |
net_rshares | 0 |
Ok, turns out, I was generating a bad digest. I'm still looking at specifically why. I can generate the correct digest for the previous example: ``` ccbcb7d64444356654febe83b8010ca50d99edd0389d273b63746ecaf21adb92 ``` In addition to switching to lower case hexlified output (which only affects debugging), I also had to trim the input, but that's not really the fix because it's binary. I need a better way to tell when the bytes being hashed are being sent with extra, erroneous byte. --- When it outputs the correct digest, there's still a problem, but it's progress! The response I get changed from `tx_missing_posting_auth` to `assert_exception`: ``` Assert Exception trx.ref_block_prefix == tapos_block_summary.block_id._hash[1]: {"trx.ref_block_prefix":1717647203,"tapos_block_summary":2083887546} th_a database.cpp:3281 _apply_transaction ```
author | inertia |
---|---|
permlink | re-inertia-re-sneak-re-inertia-radiator-update-getting-ready-for-transaction-signing-20170225t190822252z |
category | radiator |
json_metadata | {"tags":["radiator"],"app":"steemit/0.1"} |
created | 2017-02-25 19:08:21 |
last_update | 2017-02-25 19:08:21 |
depth | 3 |
children | 2 |
last_payout | 2017-03-28 08:19:15 |
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 | 871 |
author_reputation | 346,568,901,399,561 |
root_title | "Radiator Update: Getting Ready for Transaction Signing" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 2,592,218 |
net_rshares | 0 |
I'm trying to kickstart the use of a new tag, #steemdev, your content should use that tag. I'll pretty much upvote anything that is legit steem related dev content posted with that tag and downvote what's not.
author | transisto |
---|---|
permlink | re-inertia-radiator-update-getting-ready-for-transaction-signing-20170226t223312107z |
category | radiator |
json_metadata | {"tags":["steemdev","radiator"],"app":"steemit/0.1"} |
created | 2017-02-26 22:33:09 |
last_update | 2017-02-26 22:33:09 |
depth | 1 |
children | 1 |
last_payout | 2017-03-28 08:19:15 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.106 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 209 |
author_reputation | 330,357,940,720,833 |
root_title | "Radiator Update: Getting Ready for Transaction Signing" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 2,600,674 |
net_rshares | 235,476,063,573 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
inertia | 0 | 233,380,212,141 | 100% | ||
seb | 0 | 1,143,807,433 | 100% | ||
tamersameeh | 0 | 561,768,119 | 100% | ||
johnthehoan | 0 | 303,166,317 | 100% | ||
mestyz | 0 | 87,109,563 | 100% |
Good to know.
author | abit |
---|---|
permlink | re-transisto-re-inertia-radiator-update-getting-ready-for-transaction-signing-20170228t183100809z |
category | radiator |
json_metadata | {"tags":["radiator"],"app":"steemit/0.1"} |
created | 2017-02-28 18:31:51 |
last_update | 2017-02-28 18:31:51 |
depth | 2 |
children | 0 |
last_payout | 2017-03-28 08:19:15 |
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 | 13 |
author_reputation | 141,171,499,037,785 |
root_title | "Radiator Update: Getting Ready for Transaction Signing" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 2,614,703 |
net_rshares | 0 |