<div class="pull-right"> <img src="https://files.peakd.com/file/peakd-hive/inertia/aJnQFjOw-logo-128.png" /> </div> This is a version bump and should not adversely affect existing applications that use the `hive-ruby` gem. Changes are focused on performance improvements to `Hive::Stream` subroutines. The main change is that we no longer have to rely on `json-rpc-batch` to stream blocks. Prior to this change, if the API node supported batched requests, it would ask for up to 50 blocks using [this published standard](https://www.jsonrpc.org/specification#batch). But not all API endpoints supported the standard. In HF24, we got the [`block_api.get_block_range`](https://developers.hive.io/apidefinitions/#block_api.get_block_range) method. And although not all endpoints support this method, it's much more supported than `json-rpc-batch`. Hive Ruby will try whatever the endpoint will provide, starting with `get_block_range`, then `json-rpc-batch`, and then just fall back on non-batched requests. In addition to this new method, if you area streaming virtual operations, Hive Ruby will now use [`account_history_api.enum_virtual_ops`](https://developers.hive.io/apidefinitions/#account_history_api.enum_virtual_ops) (if supported). This will improve performance and reliability, even when streaming virtual operations from the head block. See rev.: [94142bc]( https://gitlab.syncad.com/hive/hive-ruby/-/commit/94142bc9b21a662ce8f467c60f1e039a7e62d832) To update your application: ```bash bundle update hive-ruby ``` See previous `hive-ruby` posts: [peakd.com/c/hive-139531/search?q=hive-ruby](https://peakd.com/c/hive-139531/search?q=hive-ruby)
author | inertia | ||||||
---|---|---|---|---|---|---|---|
permlink | ruby-client-for-hive-hive-ruby-103 | ||||||
category | hive-139531 | ||||||
json_metadata | "{"app":"peakd/2021.04.2","format":"markdown","description":"Updated mostly for block streaming clients.","tags":["hive","ruby"],"links":["https://www.jsonrpc.org/specification#batch","https://developers.hive.io/apidefinitions/#block_api.get_block_range","https://developers.hive.io/apidefinitions/#account_history_api.enum_virtual_ops","https://gitlab.syncad.com/hive/hive-ruby/-/commit/94142bc9b21a662ce8f467c60f1e039a7e62d832","https://peakd.com/c/hive-139531/search?q=hive-ruby"],"image":["https://files.peakd.com/file/peakd-hive/inertia/aJnQFjOw-logo-128.png"]}" | ||||||
created | 2021-04-23 05:05:09 | ||||||
last_update | 2021-04-23 05:05:09 | ||||||
depth | 0 | ||||||
children | 1 | ||||||
last_payout | 2021-04-30 05:05:09 | ||||||
cashout_time | 1969-12-31 23:59:59 | ||||||
total_payout_value | 18.722 HBD | ||||||
curator_payout_value | 14.913 HBD | ||||||
pending_payout_value | 0.000 HBD | ||||||
promoted | 0.000 HBD | ||||||
body_length | 1,668 | ||||||
author_reputation | 344,124,293,856,703 | ||||||
root_title | "Ruby Client for Hive: hive-ruby-1.0.3" | ||||||
beneficiaries |
| ||||||
max_accepted_payout | 1,000,000.000 HBD | ||||||
percent_hbd | 10,000 | ||||||
post_id | 103,227,551 | ||||||
net_rshares | 35,571,184,262,819 | ||||||
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
tombstone | 0 | 32,524,787,102 | 1.5% | ||
inertia | 0 | 2,456,075,027,708 | 100% | ||
arcange | 0 | 139,765,107,613 | 2% | ||
raphaelle | 0 | 1,834,771,778 | 2% | ||
felixxx | 0 | 1,474,576,525,519 | 100% | ||
magicmonk | 0 | 2,569,098,767,469 | 100% | ||
toolbox | 0 | 0 | 2% | ||
titusfrost | 0 | 59,654,830,075 | 100% | ||
jacobts | 0 | 83,461,846,949 | 66% | ||
gringalicious | 0 | 4,099,743,602,456 | 50% | ||
mangos | 0 | 1,682,622,531,500 | 36% | ||
walterjay | 0 | 3,643,385,038 | 0.35% | ||
seablue | 0 | 9,216,551,472 | 100% | ||
honusurf | 0 | 5,195,169,856 | 100% | ||
steemitboard | 0 | 11,556,566,786 | 3% | ||
justinashby | 0 | 11,522,910,601 | 66% | ||
dyrt88 | 0 | 2,890,507,984 | 100% | ||
borislavzlatanov | 0 | 120,086,704,173 | 100% | ||
freebornsociety | 0 | 1,722,337,250 | 10% | ||
roomservice | 0 | 3,921,067,215 | 3.75% | ||
fullofhope | 0 | 96,155,789,457 | 50% | ||
sam99 | 0 | 136,388,017,693 | 11.55% | ||
spectrumecons | 0 | 765,284,194,386 | 15% | ||
joeyarnoldvn | 0 | 618,335,914 | 2.21% | ||
vallesleoruther | 0 | 80,128,027,313 | 100% | ||
themarkymark | 0 | 2,904,516,551,749 | 10% | ||
noboxes | 0 | 51,340,104,359 | 50% | ||
buildawhale | 0 | 6,879,793,956,891 | 10% | ||
tomiscurious | 0 | 257,117,546,385 | 57.1% | ||
therealwolf | 0 | 563,954,715,040 | 5% | ||
fatman | 0 | 20,505,307,924 | 5% | ||
revisesociology | 0 | 346,062,815,212 | 20% | ||
makerhacks | 0 | 31,918,780,731 | 10% | ||
vegoutt-travel | 0 | 11,238,795,640 | 15% | ||
fulcrumleader | 0 | 5,962,678,470 | 100% | ||
tradingideas | 0 | 1,269,601,695 | 100% | ||
smartsteem | 0 | 578,385,859,026 | 5% | ||
steeminer4up | 0 | 1,229,700,848 | 100% | ||
mamaloves | 0 | 1,934,463,632 | 50% | ||
fourfourfun | 0 | 7,925,371,052 | 25% | ||
candyboy | 0 | 841,876,217 | 100% | ||
upmyvote | 0 | 6,965,628,957 | 10% | ||
jewel-lover | 0 | 1,685,951,961 | 100% | ||
holger80 | 0 | 4,902,270,633,476 | 100% | ||
fantasycrypto | 0 | 120,261,029,882 | 100% | ||
maxpatternman | 0 | 255,613,268 | 50% | ||
asgarth | 0 | 1,303,739,236,609 | 50% | ||
movement19 | 0 | 6,437,956,811 | 2.5% | ||
wildarms65 | 0 | 6,566,059,422 | 100% | ||
ange.nkuru | 0 | 27,908,604,873 | 100% | ||
frassman | 0 | 4,328,097,155 | 25% | ||
zemiatin | 0 | 8,976,176,342 | 50% | ||
yameen | 0 | 39,089,543,463 | 20% | ||
lordbutterfly | 0 | 814,536,352,606 | 100% | ||
promobot | 0 | 90,991,797,827 | 100% | ||
fw206 | 0 | 167,633,994,059 | 45.1% | ||
enforcer48 | 0 | 119,576,389,793 | 15% | ||
hymanadkins | 0 | 527,649,025 | 100% | ||
bitt.nerd | 0 | 3,426,736,009 | 100% | ||
smartvote | 0 | 50,661,347,226 | 2.4% | ||
fullnodeupdate | 0 | 45,842,290,359 | 100% | ||
pboulet | 0 | 611,646,156 | 0.7% | ||
reverendrum | 0 | 4,987,875,118 | 100% | ||
anti-bully | 0 | 1,009,662,797 | 100% | ||
actnearn | 0 | 1,571,092,714,201 | 100% | ||
smonia | 0 | 1,946,654,857 | 100% | ||
steemfriends | 0 | 11,024,889,317 | 100% | ||
bluerobo | 0 | 85,581,269,014 | 100% | ||
smon-fan | 0 | 2,069,983,730 | 100% | ||
thegames | 0 | 756,164,020 | 50% | ||
tr777 | 0 | 1,726,893,936 | 100% | ||
sm-jewel | 0 | 1,294,365,995 | 100% | ||
tr77 | 0 | 1,634,888,284 | 100% | ||
smoner | 0 | 1,463,021,324 | 100% | ||
smonian | 0 | 1,712,015,242 | 100% | ||
smon-joa | 0 | 1,351,408,638 | 100% | ||
jjangjjanggirl | 0 | 1,486,399,445 | 100% | ||
abbenay | 0 | 562,052,397 | 5% | ||
smonbear | 0 | 1,722,305,193 | 100% | ||
epicdice | 0 | 1,562,079,392 | 1.5% | ||
ssc-token | 0 | 1,330,198,835 | 100% | ||
likwid | 0 | 14,810,373,770 | 100% | ||
tradingideas2 | 0 | 0 | 100% | ||
tina-tina | 0 | 362,369,063 | 100% | ||
happiness19 | 0 | 0 | 100% | ||
gdhaetae | 0 | 368,954,629 | 100% | ||
dnflsms | 0 | 1,660,166,832 | 100% | ||
downvoteme | 0 | 37,250,633,442 | 50% | ||
jessy22 | 0 | 1,271,552,466 | 100% | ||
crimianales | 0 | 2,794,509,455 | 41.05% | ||
keepit2 | 0 | 1,315,357,682 | 100% | ||
khalpoint | 0 | 540,788,429 | 50% | ||
photosnap | 0 | 9,527,682,960 | 25% | ||
kgsupport | 0 | 2,270,442,010 | 50% | ||
dalz4 | 0 | 779,265,759 | 90% | ||
fengchao | 0 | 8,903,256,352 | 2% | ||
blue-witness | 0 | 16,443,998,499 | 100% | ||
laruche | 0 | 28,694,105,376 | 0.7% | ||
captainhive | 0 | 295,051,885,166 | 15% | ||
hiveonboard | 0 | 9,712,015,129 | 3.75% | ||
hive-143869 | 0 | 1,092,756,276 | 0.7% | ||
ninnu | 0 | 46,673,938,490 | 10% | ||
poshbot | 0 | 5,879,726,349 | 10% | ||
damadama | 0 | 469,899,158 | 54.6% | ||
recoveryinc | 0 | 3,505,206,571 | 5% | ||
hive-108278 | 0 | 878,575,890 | 50% | ||
dying | 0 | 11,814,440,571 | 5% | ||
borniet | 0 | 729,795,908 | 12% | ||
stemcur | 0 | 1,124,528,060 | 100% | ||
resiliencia.pal | 0 | 1,852,073,932 | 100% | ||
samrisso | 0 | 137,095,730,827 | 5% | ||
zdigital222 | 0 | 17,168,576 | 91.6% |
``` require 'hive' params = { voter: 'xxxxx', author: 'xxxxx', permlink: 'xxxxx', weight: 10000 } Hive::Broadcast.vote(wif: 'xxxxxxxxx', params: params) do |result| puts result end ``` I was following the documentation and according to me I have put the code correctly to make the vote, but when I use it I get the following error. ``` /home/shadowmyst/.rvm/gems/ruby-3.1.1/gems/hive-ruby-1.0.3/lib/hive/api.rb:46:in `api_name=': can't modify frozen #<Class:#<Class:0x00007f8ac055ebd0>>: #<Class:0x00007f8ac055ebd0> (FrozenError) from /home/shadowmyst/.rvm/gems/ruby-3.1.1/gems/hive-ruby-1.0.3/lib/hive.rb:88:in `const_missing' from /home/shadowmyst/.rvm/gems/ruby-3.1.1/gems/hive-ruby-1.0.3/lib/hive/transaction_builder.rb:46:in `initialize' from /home/shadowmyst/.rvm/gems/ruby-3.1.1/gems/hive-ruby-1.0.3/lib/hive/broadcast.rb:1367:in `new' from /home/shadowmyst/.rvm/gems/ruby-3.1.1/gems/hive-ruby-1.0.3/lib/hive/broadcast.rb:1367:in `process' from /home/shadowmyst/.rvm/gems/ruby-3.1.1/gems/hive-ruby-1.0.3/lib/hive/broadcast.rb:70:in `vote' ``` I would like to know what is the mistake I made, or what is the reason why it is not working for me?
author | shadowmyst |
---|---|
permlink | re-inertia-rbi3ts |
category | hive-139531 |
json_metadata | {"tags":["hive-139531"],"app":"peakd/2022.05.4"} |
created | 2022-05-07 07:08:18 |
last_update | 2022-05-07 07:08:18 |
depth | 1 |
children | 0 |
last_payout | 2022-05-14 07:08:18 |
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,206 |
author_reputation | 189,254,431,316,230 |
root_title | "Ruby Client for Hive: hive-ruby-1.0.3" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 112,983,727 |
net_rshares | 4,410,753,935 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
criptocuates | 0 | 4,410,753,935 | 100% |